Ext.define('saas.view.sale.saleout.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'sale-saleout-querypanel', controller: 'sale-saleout-querypanel', viewModel: 'sale-saleout-querypanel', viewName: 'sale-saleout-querypanel', queryFormItems: [{ xtype: 'textfield', name: 'pi_inoutno', emptyText:'请输入单号或客户', getCondition: function(value) { return ' (pi_inoutno like\'%' + value + '%\' or pi_custcode like \'%'+value+'%\' or pi_custname like \'%'+value+'%\' ) '; } }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '日期', allowBlank: true, columnWidth: 0.5 }, { xtype: 'productDbfindTrigger', name: 'pr_detail', fieldLabel: '物料', emptyText: '输入物料编号或名称', showDetail: true }, { xtype: 'combobox', name: 'pi_statuscode', fieldLabel: '单据状态', queryMode: 'local', emptyText :'全部', editable:false, displayField: 'pi_status', valueField: 'pi_statuscode', store: Ext.create('Ext.data.ArrayStore', { fields: ['pi_statuscode', 'pi_status'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'pi_statuscode=\'' + value + '\''; } } }, { xtype: 'multicombo', name: 'pi_prstatuscode', fieldLabel: '收款状态', emptyText :'全部', datas: [ ["RECNONE", "未收款"], ["RECPART", "部分收款"], ["RECALL", "已收款"] ] }, { xtype: 'warehouseDbfindTrigger', name: 'pd_whname', emptyText:'请输入物料编号或名称', fieldLabel: '仓库', showDetail: true }, { xtype: 'textfield', name: 'pi_sacode', fieldLabel: '关联销售单号', emptyText: '输入单号', }, { xtype: 'accountDbfindTrigger', name: 'creatorName', fieldLabel: '录入人', emptyText: '输入人员编号或姓名', getCondition: function(value) { if(!value) { return '1=1'; }else { return 'prodinout.creatorName like\'%' + value + '%\''; } } }, { xtype: 'accountDbfindTrigger', name: 'pi_auditman', fieldLabel: '审核人', emptyText: '输入人员编号或姓名', }], moreQueryFormItems: [], queryGridConfig: { idField:'id', codeField:'pi_inoutno', addTitle:'出货单', addXtype:'sale-saleout-formpanel', defaultCondition:' pi_class = \'出货单\'', baseVastUrl: '/api/sale/prodinout/', caller:'SaleOut', baseColumn: [{ 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: '关联销售单号', dataIndex: 'pi_sacode', width: 150 },{ text: '总金额', dataIndex: 'pi_total', xtype:'numbercolumn', width: 110 }, { text: '单据状态', align: 'center', dataIndex: 'pi_status', width: 90 },{ text: '收款状态', align: 'center', dataIndex: 'pi_prstatus', width: 90 },{ text: '业务员', dataIndex: 'sa_seller', width: 90, hidden :true }, { text: '录入人', dataIndex: 'creatorName', width :110 },{ text: '审核人', dataIndex: 'pi_auditman', width: 110 }, { text: '备注', dataIndex: 'pi_remark', width: 250 },{ text: '未含税金额', dataIndex: 'pi_nettotal', xtype:'numbercolumn', hidden :true },{ text: '单据类型', dataIndex: 'pi_class', hidden :true }], relativeColumn: [{ 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) { 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', 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 > 8 ? 8 : arr[1].length)).fill('0'); var format = '0.' + xr.join(''); return Ext.util.Format.number(v, format); } }, { text: '备注', dataIndex: 'pd_remark', width: 250 }] } });