Ext.define('trade.view.sys.parameter.tabpage.supplyChain', { extend: 'Ext.panel.Panel', xtype: 'trade-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: { } }, 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: '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 0 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: '若需要管控物料必须设置提前期才允许下销售订单,请勾选此项:', 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 },], initComponent: function () { var me = this, viewModel = me.getViewModel(), mainViewModel = Ext.getCmp('mainView').getViewModel(), getPriceAndVendor = mainViewModel.get('getPriceAndVendor'), 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'), //安全库存纳入需求 mpq = mainViewModel.get('mpq'); //最小包采购 if (getPriceAndVendor) { viewModel.set('getPriceAndVendorValue', 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); } me.callParent(arguments); } });