Ext.define('make.view.make.bom.QueryPanel_1', { extend: 'saas.view.core.query.QueryPanel', xtype: 'make-bom-querypanel-1', controller: 'make-bom-querypanel', viewModel: { extend: 'saas.view.core.query.QueryPanelModel', data: { form: {}, // 查询字段记录 addEnable: false, // 显示新增按钮 auditEnable: false, // 显示审核按钮 printEnable: false, // 显示打印按钮 importEnable: true, // 显示导入按钮 exportEnable: true, // 显示导出按钮 closeEnable: false, // 显示关闭按钮 deleteEnable: true, // 显示删除按钮 deleteDisable:false, //删除按钮是否可使用 openAudit:true,//单独显示审核按钮 openUnAudit:false,//单独显示反审核按钮 openEnable:false, //显示开启 针对已取消列表 configurable: true, // 允许列设置 } }, viewName: 'make-bom-querypanel', caller: 'Bom', importUploadPath: '/api/make/bom/saveToFormal', initComponent: function () { var me = this; Ext.apply(this, { queryFormItems: [ { xtype: 'condatefield', name: 'BOM.createTime', //name: 'pi_date', fieldLabel: '日期', columnWidth: 0.5, value: '7', operation: 'between', },{ xtype: 'multiqueryField', columnWidth: 0.4, name: 'multi_query', querys: { "Prod": {"field": "bo_mothercode", "dbfinds": [{//物料 from: 'pr_code', to: 'bo_mothercode' },{ from: 'pr_detail', to: 'pr_detail' }]}, //工作中心 "BillCode": {"field": "bo_wcname" ,"desc": "工作中心"}, "Emp":{"field": "BOM.creatorName", "dbfinds": [{ from: 'em_name', to: 'BOM.creatorName' }]}, } }], moreQueryFormItems: [{ xtype: 'condatefield', name: 'bom.createTime', fieldLabel: '单据日期', value:1, columnWidth: 1 }, { xtype: 'productDbfindTrigger', name: 'bo_mothercode', fieldLabel: '物料编号' },{ xtype: 'textfield', name: 'pr_detail', fieldLabel: '产品名称', readOnly: true, }, { xtype: 'textfield', name: 'pr_orispeccode', fieldLabel: '产品型号', readOnly: true, }, { xtype: "remotecombo", name: "pr_brand", fieldLabel: "厂家/品牌", storeUrl: '/api/document/productbrand/getCombo', editable: false, hiddenBtn:true },{ xtype: 'remotecombo', name: "bo_wcname", fieldLabel: "工作中心", storeUrl: '/api/document/workcenter/getCombo', editable: false, hiddenBtn:true },{ xtype: 'combobox', name: 'bo_statuscode', fieldLabel: '审核状态', queryMode: 'local', displayField: 'bo_status', valueField: 'bo_statuscode', emptyText :'全部', editable:false, store: Ext.create('Ext.data.ArrayStore', { fields: ['bo_statuscode', 'bo_status'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'bo_statuscode=\'' + value + '\''; } } }, { xtype: 'employeeDbfindTrigger', name: 'creatorName', fieldLabel: '录入人', emptyText:'请输入账户名称或姓名', getCondition: function(value) { if(!value) { return '1=1'; }else { return 'bom.creatorName like\'%' + value + '%\''; } } },{ xtype: 'employeeDbfindTrigger', name: 'bo_auditman', fieldLabel: '审核人', emptyText:'请输入账户名称或姓名', }], queryGridConfig: { idField: 'id', codeField: 'bo_code', mainIdField:'_id', detailIdField:'bd_boid', addTitle: 'BOM', addXtype: 'make-bom-formpanel', defaultCondition: me.defaultCondition, //baseVastUrl: '/api/make/bom/', baseVastUrl: me.baseVastUrl, caller: 'Bom', baseColumn: [{ text: 'id', dataIndex: 'id', hidden: true, xtype: 'numbercolumn' }, { text: '单据编号', dataIndex: 'bo_code', width: 150 }, { text: '产品编号', dataIndex: 'bo_mothercode', width: 150 }, { text: '产品名称', dataIndex: 'bo_mothername', width: 150 },{ text: '产品型号', dataIndex: 'pr_orispeccode', width: 150, renderer: saas.util.RenderUtil['renderer_prod'] }, { text: '单位', dataIndex: 'pr_unit', width: 150 }, { text: '工作中心', dataIndex: 'bo_wcname', width: 110 },{ text: '状态', dataIndex: 'bo_status', width: 110 },{ text: '制单人', dataIndex: 'creatorName', width: 100, }], relativeColumn: [{ text: 'id', dataIndex: 'id', hidden: true, xtype: 'numbercolumn' }, { text: '单据编号', dataIndex: 'bo_code', width: 150 }, { text: '产品编号', dataIndex: 'bo_mothercode', width: 150 }, { text: '产品名称', dataIndex: 'bo_mothername', width: 150 },{ text: '产品型号', dataIndex: 'pr_orispeccode', width: 150 }, { text: '单位', dataIndex: 'pr_unit', width: 150 }, { text: '工作中心', dataIndex: 'bo_wcname', width: 110 },{ text: '状态', dataIndex: 'bo_status', width: 110 },{ text: '制单人', dataIndex: 'creatorName', width: 100, }] } }); this.callParent(arguments); }, });