Ext.define('make.view.osmake.osMake.QueryPanel', { extend: 'saas.view.core.query.QueryPanel', xtype: 'osmake-osmake-querypanel', controller: 'osmake-osmake-querypanel', viewModel: { extend: 'saas.view.core.query.QueryPanelModel', data: { form: {}, // 查询字段记录 addEnable: false, // 显示新增按钮 auditEnable: true, // 显示审核按钮 printEnable: false, // 显示打印按钮 importEnable: false, // 显示导入按钮 exportEnable: true, // 显示导出按钮 closeEnable: false, // 显示关闭按钮 deleteEnable: true, // 显示删除按钮 deleteDisable: false, //删除按钮是否可使用 openAudit: false,//单独显示审核按钮 openUnAudit: false,//单独显示反审核按钮 openEnable: false, //显示开启 针对已取消列表 configurable: true, // 允许列设置 } }, viewName: 'osmake-osmake-querypanel', caller: 'OsMake', initComponent: function () { var me = this; Ext.apply(this, { importUploadPath:me.importUploadPath, queryFormItems: [{ xtype: 'condatefield', name: 'make.createTime', fieldLabel: '日期', columnWidth: 0.5, operation: 'between', }, { xtype: 'multiqueryField', columnWidth: 0.4, name: 'multi_query', querys: { "Prod": { "field": "ma_prodcode", "dbfinds": [{//物料 from: 'pr_code', to: 'ma_prodcode' }, { from: 'pr_detail', to: 'pr_detail' }] }, "MakeCode": { "field": "ma_code", "desc": "外协单号" }, "BillCode": { "field": "ma_salecode", "desc": "订单号" }, "Cust": { "field": "ma_custcode", "desc": "客户" }, "Vend": { "field": "ma_code", "desc": "供应商" }, "Emp": { "field": "make.creatorName", "dbfinds": [{ from: 'em_name', to: 'make.creatorName' }] }, }, setShowDetail: function(v){ this.showDetail = false; } }], moreQueryFormItems: [{ xtype: 'saledetailDbfindTrigger', name: 'ma_salecode', fieldLabel: '订单编号' }, { xtype: 'customerDbfindTrigger', name: 'ma_custname', fieldLabel: '客户名称' }, { xtype: 'condatefield', name: 'ma_delivery', fieldLabel: '交货日期', columnWidth: 1 }, { xtype: 'productMDbfindTrigger', name: 'ma_prodcode', fieldLabel: '物料编号' }, { xtype: 'textfield', name: 'pr_detail', fieldLabel: '产品名称', readOnly: true, }, { xtype: 'textfield', name: 'pr_orispeccode', fieldLabel: '产品型号', readOnly: true, }, { editable: false, xtype: "remotecombo", storeUrl: '/api/document/productbrand/getCombo', name: "pr_brand", fieldLabel: "厂家/品牌", hiddenBtn: true, }, { xtype: 'vendorDbfindTrigger', name: 'ma_vendname', fieldLabel: '外协厂商' }, { xtype: 'combobox', name: 'ma_currency', fieldLabel: '币别', queryMode: 'local', displayField: 'ma_currency', valueField: 'ma_currency', emptyText: '', editable: false, store: Ext.create('Ext.data.ArrayStore', { fields: ['ma_currency'], data: [ ["RMB", "RMB"], ["USD", "USD"], ["HKD", "HKD"] ] }), getCondition: function (value) { if (!value) { return '1=1'; } else { return 'ma_currency=\'' + value + '\''; } } }, { xtype: "remotecombo", name: "ma_kind", fieldLabel: "外协类型", storeUrl: '/api/make/kind/list/osmake', valueField: 'mk_name', displayField: 'mk_name', hiddenBtn: true, }, { xtype: 'combobox', name: 'ma_statuscode', fieldLabel: '审核状态', queryMode: 'local', displayField: 'ma_status', valueField: 'ma_statuscode', emptyText: '全部', editable: false, store: Ext.create('Ext.data.ArrayStore', { fields: ['ma_statuscode', 'ma_status'], data: [ ["ALL", "全部"], ["AUDITED", "已审核"], ["UNAUDITED", "未审核"] ] }), getCondition: function (value) { if (value == 'ALL') { return '1=1'; } else { return 'ma_statuscode=\'' + value + '\''; } } }, { xtype: 'employeeDbfindTrigger', name: 'ma_auditman', fieldLabel: '审核人', emptyText: '请输入账户名称或姓名', }, { xtype: 'employeeDbfindTrigger', name: 'creatorName', fieldLabel: '录入人', emptyText: '请输入账户名称或姓名', getCondition: function (value) { if (!value) { return '1=1'; } else { return 'make.creatorName like\'%' + value + '%\''; } } }, { xtype: 'condatefield', name: 'ma_planbegindate', fieldLabel: '计划开工日期', columnWidth: 1 }, { xtype: 'condatefield', name: 'ma_planenddate', fieldLabel: '计划完工日期', columnWidth: 1 }, { xtype: 'condatefield', name: 'make.createTime', fieldLabel: '单据日期', columnWidth: 1 }], queryGridConfig: { idField: 'ma_id', codeField: 'ma_code', mainIdField: 'ma_id', detailIdField: 'mm_id', addTitle: '外协单', addXtype: 'osmake-osmake-formpanel', baseVastUrl: '/api/make/make/', caller: 'OsMake', defaultCondition: me.defaultCondition, toolBtns: [{ xtype: 'button', text: '智能工单', cls: 'x-formpanel-btn-blue', handler: 'intelligentMake' },{ text: '结案', xtype: 'button', handler: 'onEnd', menu: { cls: 'x-query-menu', anchor: '100%', items: [{ text: '反结案', handler: 'onResEnd' }], listeners: { 'mouseleave': function (enu) { this.hide(); } } } }], baseColumn: [{ text: 'id', dataIndex: 'ma_id', hidden: true, xtype: 'numbercolumn' }, { text: '外协单号', dataIndex: 'ma_code', width: 150 }, { text: '单据日期', dataIndex: 'createTime', xtype: 'datecolumn', width: 110 }, { text: '销售单号', dataIndex: 'ma_salecode', width: 150 }, { text: '客户名称', dataIndex: 'ma_custname', width: 150 }, { text: '交货日期', align: 'center', dataIndex: 'ma_delivery', width: 100, xtype:'datecolumn' }, { text: '外协厂商', dataIndex: 'ma_vendname', width: 150 }, { text: '产品编号', dataIndex: 'ma_prodcode', width: 150 }, { text: '产品名称', dataIndex: 'ma_prdetail', width: 150 }, { text: '产品型号', dataIndex: 'ma_prorispeccode', width: 150, renderer : saas.util.RenderUtil['renderer_makeprod'] }, { text: '单位', align: 'center', dataIndex: 'ma_prunit', width: 80 }, { text: '数量', align: 'center', dataIndex: 'ma_qty', xtype: 'numbercolumn', width: 110, renderer: function (v, m, r) { return saas.util.BaseUtil.numberFormat(v, 6, true); }, }, { text: '已验收数', align: 'center', dataIndex: 'ma_madeqty', xtype: 'numbercolumn', width: 110, renderer: function (v, m, r) { return saas.util.BaseUtil.numberFormat(v, 6, true); }, }, { text: '已转验收数', align: 'center', dataIndex: 'ma_turnmadeqty', xtype: 'numbercolumn', width: 110, renderer : function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 6, true); }, },{ text: '已领齐套数', align: 'center', dataIndex: 'ma_setqty', xtype: 'numbercolumn', width: 110, renderer: function (v, m, r) { return saas.util.BaseUtil.numberFormat(v, 6, true); }, },{ text: '可验收数', align: 'center', dataIndex: 'ma_canmadeqty', xtype: 'numbercolumn', width: 110, renderer : function(v, m, r) { return saas.util.BaseUtil.numberFormat(v, 6, true); }, }, { text: '币种', dataIndex: 'ma_currency', align: 'center', width: 80, }, { text: '价税合计(元)', dataIndex: 'ma_total', width: 110, xtype: 'numbercolumn', renderer : function(v, m, r) { return saas.util.BaseUtil.numberFixFormat(v, 2, true); } },{ text: '外协类型', dataIndex: 'ma_kind', width: 100, }, { text: '审核状态', dataIndex: 'ma_status', align: 'center', width: 100, }, { text: '领料状态', dataIndex: 'ma_getstatus', align: 'center', width: 100, }, { text: '完工状态', dataIndex: 'ma_finishstatus', align: 'center', width: 100, }, { text: '制单人', dataIndex: 'creatorName', align: 'center', width: 100, }, { text: '计划开工日期', dataIndex: 'ma_planbegindate', width: 130, xtype: 'datecolumn' }, { text: '计划完工日期', dataIndex: 'ma_planenddate', width: 130, xtype: 'datecolumn' }, { text: '实际开工日期', dataIndex: 'ma_actbegindate', width: 130, xtype: 'datecolumn' }, { text: '实际完工日期', dataIndex: 'ma_actenddate', width: 130, xtype: 'datecolumn' }, { text: '结案日期', dataIndex: 'ma_enddate', width: 130, xtype: 'datecolumn' }, { text: '备注', dataIndex: 'ma_remark', width: 100 }], relativeColumn: [] } }); this.callParent(arguments); }, });