Ext.define('make.view.sys.parameter.tabpage.supplyChain', { extend: 'Ext.panel.Panel', xtype: 'make-supplychain-panel', cls: 'sys-supplychain-panel x-sys-setting', // controller: 'sys-power-formpanel', // viewModel: 'sys-power-formpanel', layout: 'column', border: 1, bodyPadding: 5, scrollable: true, defaults: { padding: '8 10 0 40', columnWidth: 0.3 }, viewModel: { data: { forCalValue: '0' } }, items: [{ xtype: 'component', html: '
请购管理设置
', columnWidth: 1, padding: '8 10 0 20', }, { xtype: 'combobox', name: 'getPriceAndVendor', fieldLabel: '请购单取价优先选项', labelWidth: 140, store: Ext.create('Ext.data.Store', { fields: ['valueField', 'displayField'], data : [ {"valueField":"最低价", "displayField":"最低价"}, {"valueField":"最新价", "displayField":"最新价"} ] }), queryMode: 'local', displayField: 'displayField', valueField: 'valueField', bind: '{getPriceAndVendorValue}' }, { xtype: 'component', html: '
采购管理设置
', columnWidth: 1, padding: '8 10 0 20', }, { xtype: 'textfield', fieldLabel: '询价默认有效天数', labelWidth: 120, name: 'InquiryEffectiveDays', bind: '{InquiryEffectiveDays}' }, { xtype: 'displayfield', value: '
*采购询价截止日期=询价日期+询价默认有效天数
', columnWidth: 0.9 }, { xtype: 'textfield', fieldLabel: '价格默认有效天数', name: 'ValidDateByPrice', labelWidth: 120, bind: '{ValidDateByPriceValue}' }, { xtype: 'displayfield', value: '
*核价单物料截止日期=生效日期+价格默认有效天数
', columnWidth: 0.9 }, { xtype: 'component', html: '若需要管控采购单价必须从核价单取价,请勾选', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'ForceGetPrice', padding: '0 0 0 50', margin: '5 0 20 0', boxLabel: '强制取价', bind: '{ForceGetPriceValue}' } /*{ xtype: 'component', html: '
品质管理设置
', columnWidth: 1, padding: '8 10 0 20', }, { xtype: 'component', html: '若您需要采购验收入库进行检验管理,请勾选', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'forceGetValue', padding: '0 0 0 50', margin:'5 0 20 0', boxLabel: '启用采购收料检验', }, { xtype: 'component', html: '若您需要外协验收入库进行检验管理,请勾选', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'forceGetValue', padding: '0 0 0 50', margin:'5 0 20 0', boxLabel: '启用外协收料检验', }, { xtype: 'component', html: '若您需要制造完工入库进行检验管理,请勾选', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'forceGetValue', padding: '0 0 0 50', margin:'5 0 20 0', boxLabel: '启用完工入库检验', }*/, { xtype: 'component', html: '
智能采购设置
', columnWidth: 1, padding: '8 10 0 20', }, { xtype: 'checkbox', name: 'ENABLEMRP', padding: '0 0 0 50', margin: '5 0 0 0', columnWidth: 0.6, boxLabel: '系统自动运算智能采购并投放采购单', bind: '{ENABLEMRPValue}' }, { xtype: 'displayfield', value: '',//占位 columnWidth: 0.3 }, { xtype: 'textfield', fieldLabel: '固定提前期(天)', labelWidth: 120, name: 'FixedLeadTime', bind: '{FixedLeadTime}' }, { xtype: 'displayfield', value: '
*设置则交期运算和智能采购运算时,会考虑物料固定提前期
', columnWidth: 0.9 }, { xtype: 'fieldset', title: '合并采购设置', layout: 'column', columnWidth: 0.6, margin: '0 0 0 40', items: [{ xtype: 'radiogroup', columnWidth: 0.3, margin: '0 0 10 25', name: 'mergePurc', simpleValue: true, defaultType: 'container', columns: 1, bind: '{mergePurcValue}', items: [ { xtype: 'radiofield', boxLabel: '不合并', inputValue: '0' }, { xtype: 'radiofield', boxLabel: '全部合并', inputValue: '1' }, { xtype: 'radiofield', boxLabel: '按天数合并', inputValue: '2' } ] }, { columnWidth: 0.3, xtype: 'numberfield', name: 'mergeDays', margin: '65 0 10', bind: { value:'{mergeDaysValue}', disabled: "{'2'!=mergePurcValue}" }, }] }, { xtype: 'fieldset', title: '其它设置', layout: 'column', columnWidth: 0.6, margin: '0 0 20 40', items: [{ margin: '0 0 15 25', xtype: 'checkbox', name: 'safetystock', boxLabel: '安全库存纳入需求', inputValue: '1', columnWidth: 0.5, bind:'{safetystockValue}' }, { margin: '0 0 15 25', xtype: 'checkbox', name: 'mpq', boxLabel: '最小包装采购', inputValue: '1', columnWidth: 0.5, bind:'{mpqValue}' },] },{ xtype: 'component', html: '
交期运算设置
', columnWidth: 1, padding: '8 10 0 20', },{ xtype: 'checkbox', name: 'useAutoATP', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '启用交期自动运算', bind: '{useAutoATP}' }, { xtype: 'displayfield', value: '
*自动计算交期
', columnWidth: 0.9 },{ xtype: 'component', html: '若需要管控物料必须设置提前期才允许备货,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'foreCastHasLeadtime', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '产品或下阶物料需设置提前期', bind: '{foreCastHasLeadtime}' }, { xtype: 'displayfield', value: '
*启用则备货单提交、审核时判断所有涉及的外购件是否有设置提前期,没有则限制
', columnWidth: 0.9 },{ xtype: 'component', html: '若需要管控非外购产品无有效BOM不允许下销售订单,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'saleHasBom', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '非外购产品需有BOM才可下销售订单', bind: '{saleHasBom}' }, { xtype: 'displayfield', value: '
*启用则销售单提交、审核时如果物料生产类型不是外购,要判断是否存在已审核BOM
', columnWidth: 0.9 },{ xtype: 'component', html: '若需要管控物料必须设置提前期才允许下销售订单,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'saleHasLeadtime', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '产品或下阶物料需设置提前期', bind: '{saleHasLeadtime}' }, { xtype: 'displayfield', value: '
*启用则订单提交、审核时判断所有涉及的外购件是否有设置提前期,没有则限制
', columnWidth: 0.9 },{ xtype: 'combo', fieldLabel: '交期运算优先选项', labelWidth: 120, name: 'atpType', bind: '{atpType}', queryMode: 'local', displayField: 'value', valueField: 'value', editable: false, store: Ext.create('Ext.data.ArrayStore', { fields: ['value'], data: [ ["订单优先"], ["交期优先"] ] }), }, { xtype: 'displayfield', value: '
*设置优先选项,则交期运算时优先选项就取这个
', columnWidth: 0.9 },{ xtype: 'component', html: '若需要交期运算后需求自动生成询价单,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'autoInquiryAfterAtp', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '交期运算后自动询价', bind: '{autoInquiryAfterAtp}' }, { xtype: 'displayfield', value: '
*启用则销售订单审核后自动将交期运算中的需求生成公共询价
', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'BOMChangeRelativeMake', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: 'BOM变更时变更未结案和未领料工单', bind: '{BOMChangeRelativeMake}' }, { xtype: 'component', html: '若需要备货单审核后自动投放制造工单,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'autoThrowMakeAfterAuditForecast', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '审核后自动投放工单', bind: '{autoThrowMakeAfterAuditForecast}', columnWidth: 0.9 },{ xtype: 'radiogroup', margin:'0 0 10 15', name:'forecastThrowMakeStatus', fieldLabel: '自动投放工单状态', labelWidth:150, simpleValue:true, defaultType: 'container', bind:'{forecastThrowMakeStatus}', items: [ {xtype: 'radiofield',boxLabel: '未审核', inputValue: 'UNAUDITED'}, {xtype: 'radiofield',boxLabel: '已审核', inputValue: 'AUDITED'} ] , columnWidth: 0.3 },{ xtype: 'displayfield', value: '
*启用则备货单审核后自动按照需求数量生成工单
', columnWidth: 0.9 }, { xtype: 'component', html: '若需要销售订单审核后自动投放制造工单,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'autoThrowMakeAfterAuditSale', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '审核后自动投放工单', bind: '{autoThrowMakeAfterAuditSale}', columnWidth: 0.9 },{ xtype: 'radiogroup', margin:'0 0 10 15', name:'saleThrowMakeStatus', labelWidth:150, fieldLabel: '自动投放工单状态', simpleValue:true, defaultType: 'container', bind:'{saleThrowMakeStatus}', items: [ {xtype: 'radiofield',boxLabel: '未审核', inputValue: 'UNAUDITED'}, {xtype: 'radiofield',boxLabel: '已审核', inputValue: 'AUDITED'} ] , columnWidth: 0.3 },{ xtype: 'displayfield', value: '
*启用则销售订单审核后自动按照需求数量生成工单
', columnWidth: 0.9 }, { xtype: 'component', html: '若需要控制备货单、销售订单工单时产品资料必须有填写每日产能,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'needDailyCapacity', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '产品资料未填写每日产能不允许转工单', bind: '{needDailyCapacity}', columnWidth: 0.9 },{ xtype: 'displayfield', value: '
*启用则备货单、销售订单转工单时会判断产品资料有无填写每日产能,未填写不允许转工单
', columnWidth: 0.9 }, { xtype: 'component', html: '若需要制造工单退完备损才允许结案,请勾选此项:', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'makeEndNeedBackLoss', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '制造工单结案需要退备损数', bind: '{makeEndNeedBackLoss}', columnWidth: 0.9 },{ xtype: 'displayfield', value: '
*启用则制造工单结案时会判断备损有无退回或报废(备损数=需求数-工单数*单位用量)
', columnWidth: 0.9 }, { xtype: 'component', html: '若需要外协工单退完备损才允许结案,请勾选此项: ', columnWidth: 0.9 }, { xtype: 'checkbox', name: 'osMakeEndNeedBackLoss', padding: '0 0 0 50', margin: '5 0 0 0', boxLabel: '外协工单结案需要退备损数', bind: '{osMakeEndNeedBackLoss}', columnWidth: 0.9 },{ xtype: 'displayfield', value: '
*启用则外协工单结案时会判断备损有无退回或报废(备损数=需求数-工单数*单位用量)
', columnWidth: 0.9 },], initComponent: function () { var me = this, viewModel = me.getViewModel(), mainViewModel = Ext.getCmp('mainView').getViewModel(), forceGetPrice = mainViewModel.get('ForceGetPrice'), validDateByPrice = mainViewModel.get('ValidDateByPrice'), InquiryEffectiveDays = mainViewModel.get('InquiryEffectiveDays'), ENABLEMRP = mainViewModel.get('ENABLEMRP'), //系统自动运算智能采购并投放采购单 mergePurc = mainViewModel.get('mergePurc'), //采购合并设置 mergeDays = mainViewModel.get('mergeDays'), //合并天数 safetystock = mainViewModel.get('safetystock'), //安全库存纳入需求 fixedLeadTime = mainViewModel.get('FixedLeadTime'), //固定提前期 mpq = mainViewModel.get('mpq'), //最小包采购 getPriceAndVendor = mainViewModel.get('getPriceAndVendor');//请购单取价优先选项 if (forceGetPrice) { viewModel.set('ForceGetPriceValue', forceGetPrice); } if (validDateByPrice) { viewModel.set('ValidDateByPriceValue', validDateByPrice); } if (InquiryEffectiveDays) { viewModel.set('InquiryEffectiveDays', InquiryEffectiveDays); } if(ENABLEMRP){ viewModel.set('ENABLEMRPValue', ENABLEMRP); } if(mergePurc){ viewModel.set('mergePurcValue', mergePurc); } if(mergeDays){ viewModel.set('mergeDaysValue', mergeDays); } if(safetystock){ viewModel.set('safetystockValue', safetystock); } if(mpq){ viewModel.set('mpqValue', mpq); } if(getPriceAndVendor){ viewModel.set('getPriceAndVendorValue', getPriceAndVendor); } if(fixedLeadTime){ viewModel.set('FixedLeadTime', fixedLeadTime); } me.callParent(arguments); } });