/** * 待收款 */ Ext.define('saas.view.home.infoCardList.Recment', { extend: 'saas.view.home.infoCardList.InfoList', xtype: 'home-infocardlist-recment', listUrl: '/api/sale/prodinout/homepageList/', idField: 'id', codeField: 'pi_inoutno', // detailTitle: '出货单', // detailXType: 'sale-saleout-formpanel', condition: 'pi_class in (\'出货单\',\'销售退货单\') and prodinout.companyId=#{companyId} and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=#{companyId} and ifnull(sl_namount,0)<>0)', listColumns: [{ text: 'id', dataIndex: 'id', hidden:true, xtype: 'numbercolumn' }, { text: '出货单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据日期', dataIndex: 'pi_date', xtype:'datecolumn', width: 110 },{ text: '客户名称', dataIndex: 'pi_custname', width: 250 }, { text: '单据状态', align: 'center', dataIndex: 'pi_status', width: 90 }, { text: '明细序号', dataIndex: 'pd_pdno', xtype: 'numbercolumn', width: 100, renderer : function(v) { var format = '0' return Ext.util.Format.number(v, format); } }, { text: '关联销售单号', dataIndex: 'pd_ordercode', width: 150 }, { text: '订单序号', dataIndex: 'pd_orderdetno', xtype:'numbercolumn', width: 100, renderer : function(v) { if (v == 0) { v= ''; } var format = '0' return Ext.util.Format.number(v, format); } }, { text: '物料编号', dataIndex: 'pd_prodcode', width: 150 }, { text: '物料名称', dataIndex: 'pr_detail', width: 150 }, { text: '出货数量', // dataIndex: 'pd_outqty', dataIndex: 'qty', xtype:'numbercolumn', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0'); var format = '0.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '销售单价', dataIndex: 'pd_sendprice', xtype:'numbercolumn', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0'); var format = '0.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '金额', dataIndex: 'pd_ordertotal', xtype:'numbercolumn', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0'); var format = '0.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '税率', dataIndex: 'pd_taxrate', xtype:'numbercolumn', width: 80, renderer : function(v) { return Ext.util.Format.number(v, '0'); } }, { text: '成本单价', dataIndex: 'pd_price', xtype:'numbercolumn', width: 110, renderer : function(v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0'); var format = '0.' + xr.join(); return Ext.util.Format.number(v, format); } }, { text: '备注', dataIndex: 'pd_remark', width: 250 }], listeners: { beforeopendetail: function(grid, record) { var pi_class = record.get('pi_class'), detailTitle = '出货单', detailXType = 'sale-saleout-formpanel'; if(pi_class == '销售退货单') { detailTitle = '销售退货单'; detailXType = 'sale-salein-formpanel'; } grid.detailTitle = detailTitle; grid.detailXType = detailXType; return true; } } });