Ext.define('saas.view.stock.otherOut.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'stock-otherout-querypanel', controller: 'stock-otherout-querypanel', viewModel: 'stock-otherout-querypanel', viewName: 'stock-otherout-querypanel', initComponent: function () { Ext.apply(this, { queryFormItems: [{ xtype: 'textfield', name: 'pi_inoutno', emptyText: '请输入单号', getCondition: function (value) { if (value == 'ALL') { return '1=1'; } else { return ' (pi_inoutno like\'%' + value + '%\') '; } } }, { xtype: 'productDbfindTrigger', name: 'pr_detail', emptyText: '输入物料编号或名称', showDetail: true, margin: '0 0 0 20' }, { xtype: 'condatefield', name: 'pi_date', fieldLabel: '日期', columnWidth: 0.5, operation: 'between' }, { xtype: 'customerDbfindTrigger', name: 'pi_custname', fieldLabel: '客户', emptyText: '输入客户编号或名称' }, { xtype: 'combobox', name: 'pi_statuscode', fieldLabel: '单据状态', allowBlank: true, emptyText: '全部', editable: false, queryMode: 'local', 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: 'warehouseDbfindTrigger', name: 'pd_whname', fieldLabel: '仓库', emptyText: '请输入仓库编号或名称', showDetail: true }, { xtype: 'employeeDbfindTrigger', name: 'accountDbfindTrigger', fieldLabel: '录入人', emptyText: '请输入人员编号或名称', getCondition: function (value) { if (!value) { return '1=1'; } else { return 'prodinout.creatorName like\'%' + value + '%\''; } } }, { xtype: 'employeeDbfindTrigger', name: 'accountDbfindTrigger', fieldLabel: '审核人', emptyText: '请输入人员编号或名称' }], queryGridConfig: { idField: 'id', codeField: 'pi_inoutno', addTitle: '其它出库单', addXtype: 'stock-otherout-formpanel', defaultCondition: ' pi_class = \'其它出库单\'', baseVastUrl: '/api/storage/prodinout/', caller: 'OtherOut', baseColumn: [{ text: 'id', dataIndex: 'id', hidden: true, xtype: 'numbercolumn' }, { text: '出库单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据日期', dataIndex: 'pi_date', xtype: 'datecolumn', width: 110 }, { text: '金额(元)', xtype: 'numbercolumn', dataIndex: 'pi_costtotal', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 2, true); }, }, { text: '审核状态', align: 'center', dataIndex: 'pi_status', width: 80 }, { text: '客户名称', dataIndex: 'pi_custname', width: 200 }, { text: '备注', dataIndex: 'pi_remark', width: 250 }], relativeColumn: [{ text: 'id', dataIndex: 'pi_id', xtype: 'numbercolumn', hidden: true }, { text: '出库单号', dataIndex: 'pi_inoutno', width: 150 }, { text: '单据日期', dataIndex: 'pi_date', xtype: 'datecolumn', width: 110 }, { text: '客户名称', dataIndex: 'pi_custname', width: 200 }, { text: '审核状态', align: 'center', dataIndex: 'pi_status', width: 80 }, { text: '物料编号', dataIndex: 'pd_prodcode', width: 150 }, { text: '品牌', dataIndex: 'pr_brand', width: 100 }, { text: '物料名称', dataIndex: 'pr_detail', width: 150 }, { text: '型号', dataIndex: 'pr_orispeccode', width: 200 }, { text: '规格', dataIndex: 'pr_spec', width: 200 }, { text: '仓库', dataIndex: 'pd_whname', width: 120 }, { text: '数量', dataIndex: 'pd_outqty', xtype: 'numbercolumn', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 3, false); } }, { text: '单位', dataIndex: 'pr_unit', width: 65 }, { text: '单价(元)', dataIndex: 'pd_price', xtype: 'numbercolumn', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 4, true); } }, { text: '金额(元)', dataIndex: 'pd_total', xtype: 'numbercolumn', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 2, true); } }, { text: '备注', dataIndex: 'pd_remark', width: 250 }] } }); this.callParent(arguments); }, });