Ext.define('make.view.make.makeScrap.QueryPanel_2', { extend: 'saas.view.core.query.QueryPanel', xtype: 'make-makescrap-querypanel-2', controller: 'make-makescrap-querypanel', viewModel: { extend: 'saas.view.core.query.QueryPanelModel', data: { form: {}, // 查询字段记录 addEnable: false, // 显示新增按钮 auditEnable: false, // 显示审核按钮 printEnable: false, // 显示打印按钮 importEnable: false, // 显示导入按钮 exportEnable: true, // 显示导出按钮 closeEnable: false, // 显示关闭按钮 deleteEnable: false, // 显示删除按钮 deleteDisable:false, //删除按钮是否可使用 openAudit:false,//单独显示审核按钮 openUnAudit:true,//单独显示反审核按钮 openEnable:false, //显示开启 针对已取消列表 configurable: true, // 允许列设置 } }, viewName: 'make-makescrap-querypanel-2', caller: 'MakeScrap', //importUploadPath: '/api/purchse/makescrap/saveToFormal', initComponent: function () { var me = this; Ext.apply(me, { queryFormItems: [ { xtype: 'condatefield', name: 'makeScrap.createTime', fieldLabel: '日期', columnWidth: 0.5, operation: 'between', },{ xtype: 'multiqueryField', columnWidth: 0.4, name: 'multi_query', querys: { "Vend": {"field": "ms_vendname","desc":"供应商", "dbfinds": [{ from: 've_name', to: 'ms_vendname' }]}, "BillCode": {"field": "ms_code" ,"desc": "报废单号"}, "MakeCode": {"field": "md_macode" ,"desc": "制造单号"}, "Prod": {"field": "pr_code", "dbfinds": [{//物料 from: 'pr_code', to: 'pr_code' },{ from: 'pr_detail', to: 'pr_detail' }]}, "Emp":{"field": "makescrap.creatorName", "dbfinds": [{ from: 'em_name', to: 'makescrap.creatorName' }]}, }, setShowDetail: function(v){ this.showDetail = (v == 'Prod' ||v=='MakeCode'); } }], moreQueryFormItems: [{ xtype: 'condatefield', name: 'makescrap.createTime', fieldLabel: '单据日期', value:1, columnWidth: 1 }, { xtype: 'departDbfindTrigger', name: 'ms_departmentname', fieldLabel: '部门' },{ xtype: 'productDbfindTrigger', name: 'Makescrapdetail.md_prodcode', showDetail: true, 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: 'combobox', name: 'ms_statuscode', fieldLabel: '审核状态', queryMode: 'local', displayField: 'ms_status', valueField: 'ms_statuscode', emptyText :'全部', editable:false, store: Ext.create('Ext.data.ArrayStore', { fields: ['ms_statuscode', 'ms_status'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function(value) { if(value == 'ALL') { return '1=1'; }else { return 'ms_statuscode=\'' + value + '\''; } } }, { xtype: 'employeeDbfindTrigger', name: 'creatorName', fieldLabel: '录入人', emptyText:'请输入账户名称或姓名', getCondition: function(value) { if(!value) { return '1=1'; }else { return 'makescrap.creatorName like\'%' + value + '%\''; } } },{ xtype: 'employeeDbfindTrigger', name: 'ms_auditman', fieldLabel: '审核人', emptyText:'请输入账户名称或姓名', }], queryGridConfig: { idField: 'id', codeField: 'ms_code', mainIdField:'_id', detailIdField:'sd_id', addTitle: me.addTitle, addXtype: me.addXtype, defaultCondition: me.defaultCondition, baseVastUrl: me.baseVastUrl, caller: 'MakeScrap', baseColumn: [{ text: 'id', dataIndex: 'id', hidden: true, xtype: 'numbercolumn' }, { text: '报废单号', dataIndex: 'ms_code', width: 150 }, { text: '单据类型', dataIndex: 'ms_class', hidden: true }, { text: '单据日期', dataIndex: 'createTime', xtype: 'datecolumn', width: 110 }, { text: '审核状态', align: 'center', dataIndex: 'ms_status', width: 80 }, { text: '金额(元)', hidden:true, xtype: 'numbercolumn', dataIndex: 'ms_amount', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFixFormat(v, 2, true); } }, { text: '录入人', align: 'center', dataIndex: 'creatorName', width: 100 }, { text: '审核人', align: 'center', dataIndex: 'ms_auditman', width: 100 }, { text: '审核日期', align: 'center', dataIndex: 'ms_auditdate', xtype: 'datecolumn', width: 100 }, { text: '备注', dataIndex: 'ms_remark', width: 250 }], relativeColumn: [{ text: 'id', dataIndex: 'ms_id', xtype: 'numbercolumn', hidden: true }, { text: '报废单号', dataIndex: 'ms_code', width: 150 }, { text: '单据日期', dataIndex: 'createTime', xtype: 'datecolumn', width: 110 }, { text: '审核状态', align: 'center', dataIndex: 'ms_status', width: 80 }, { text: '制造单号', dataIndex: 'md_macode', width: 150, }, { text: '工单序号', dataIndex: 'md_mmdetno', align: 'center', width: 80 },{ text: '物料编号', dataIndex: 'pr_code', width: 150, }, { text: '厂家/品牌', dataIndex: 'pr_brand', width: 100 }, { text: '物料名称', dataIndex: 'pr_detail', width: 150 }, { text: '型号', dataIndex: 'pr_orispeccode', width: 200, renderer: saas.util.RenderUtil['renderer_prod'] }, { text: '规格', dataIndex: 'pr_spec', width: 250 }, { text: '报废数量', dataIndex: 'md_qty', xtype: 'numbercolumn', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 6, true); } }, { text: '单位', dataIndex: 'pr_unit', width: 65 }, { text: '报废原因', dataIndex: 'md_reason', width: 200 }, { text: '成本单价(元)', dataIndex: 'md_price', xtype: 'numbercolumn', renderer: function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 8, true); }, width: 110 }, { text: '金额(元)', hidden:true, dataIndex: 'md_total', xtype: 'numbercolumn', width: 110, renderer: function(v, m, r) { return saas.util.BaseUtil.numberFixFormat(v, 2, true); }, }, { text: '备注', dataIndex: 'md_remark', width: 250 }] } }); this.callParent(arguments); }, });