/** * 待付款 */ Ext.define('saas.view.home.infoCardList.Payment', { extend: 'saas.view.home.infoCardList.InfoList', xtype: 'home-infocardlist-payment', listUrl: '/api/purchase/prodinout/homepageList', idField: 'id', codeField: 'pi_inoutno', // detailTitle: '采购验收单', // detailXType: 'purchase-purchasein-formpanel', condition: 'pi_class in (\'采购验收单\',\'采购验退单\') and prodinout.companyId=#{companyId} and TO_DAYS(pi_date+ifnull(ve_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: 'pu_id', xtype: 'numbercolumn', hidden: true }, { text: '单据编号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据类型', dataIndex: 'pd_piclass', width: 0 }, { text: '单据日期', dataIndex: 'pi_date', xtype: 'datecolumn', width: 110 }, { text: '供应商编号', dataIndex: 'pi_vendcode', width: 0 }, { text: '供应商名称', dataIndex: 'pi_vendname', width: 150 }, { text: '审核状态', align: 'center', dataIndex: 'pi_status', width: 90 }, { text: '序号', dataIndex: 'pd_pdno', width: 80 }, { text: '相关单号', dataIndex: 'pd_ordercode', width: 150 }, { text: '物料编号', dataIndex: 'pd_prodcode', width: 150 }, { text: '物料名称', dataIndex: 'pr_detail', width: 200 }, { text: '物料规格', dataIndex: 'pr_spec', width: 150 }, { text: '单位', dataIndex: 'pr_unit', width: 80 }, { text: '数量', // dataIndex: 'pd_inqty', 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,000.' + xr.join(); return Ext.util.Format.number(v, format); }, }, { text: '仓库', dataIndex: 'pd_whname', width: 150 }, { text: '单价', dataIndex: 'pd_orderprice', xtype: 'numbercolumn', renderer: function (v) { var arr = (v + '.').split('.'); var xr = (new Array(arr[1].length)).fill('0'); var format = '0,000.' + xr.join(); return Ext.util.Format.number(v, format); }, width: 110 }, { text: '税率', dataIndex: 'pd_taxrate', xtype: 'numbercolumn', width: 80, renderer: function (v) { return Ext.util.Format.number(v, '0'); }, }, { text: '金额', dataIndex: 'pd_total', 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,000.' + xr.join(); return Ext.util.Format.number(v, format); }, }], listeners: { beforeopendetail: function(grid, record) { var pi_class = record.get('pi_class'), detailTitle = '采购验收单', detailXType = 'purchase-purchasein-formpanel'; if(pi_class == '采购验退单') { detailTitle = '采购验退单'; detailXType = 'purchase-purchaseout-formpanel'; } grid.detailTitle = detailTitle; grid.detailXType = detailXType; return true; } } });