123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456 |
- 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: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">请购管理设置</div>',
- 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: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">采购管理设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20',
- }, {
- xtype: 'textfield',
- fieldLabel: '询价默认有效天数',
- labelWidth: 120,
- name: 'InquiryEffectiveDays',
- bind: '{InquiryEffectiveDays}'
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*采购询价截止日期=询价日期+询价默认有效天数</div>',
- columnWidth: 0.9
- }, {
- xtype: 'textfield',
- fieldLabel: '价格默认有效天数',
- name: 'ValidDateByPrice',
- labelWidth: 120,
- bind: '{ValidDateByPriceValue}'
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*核价单物料截止日期=生效日期+价格默认有效天数</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若需要管控采购单价必须从核价单取价,请勾选</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'ForceGetPrice',
- padding: '0 0 0 50',
- margin: '5 0 20 0',
- boxLabel: '强制取价',
- bind: '{ForceGetPriceValue}'
- } /*{
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">品质管理设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20',
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若您需要采购验收入库进行检验管理,请勾选</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'forceGetValue',
- padding: '0 0 0 50',
- margin:'5 0 20 0',
- boxLabel: '启用采购收料检验',
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若您需要外协验收入库进行检验管理,请勾选</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'forceGetValue',
- padding: '0 0 0 50',
- margin:'5 0 20 0',
- boxLabel: '启用外协收料检验',
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若您需要制造完工入库进行检验管理,请勾选</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'forceGetValue',
- padding: '0 0 0 50',
- margin:'5 0 20 0',
- boxLabel: '启用完工入库检验',
- }*/, {
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">智能采购设置</div>',
- 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: '<div style="color:#A9A9A9;">*设置则交期运算和智能采购运算时,会考虑物料固定提前期</div>',
- 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: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">交期运算设置</div>',
- 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: '<div style="color:#A9A9A9;">*自动计算交期</div>',
- columnWidth: 0.9
- },{
- xtype: 'component',
- html: '<span style="color:#505363;">若需要管控物料必须设置提前期才允许备货,请勾选此项:</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'foreCastHasLeadtime',
- padding: '0 0 0 50',
- margin: '5 0 0 0',
- boxLabel: '产品或下阶物料需设置提前期',
- bind: '{foreCastHasLeadtime}'
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*启用则备货单提交、审核时判断所有涉及的外购件是否有设置提前期,没有则限制</div>',
- columnWidth: 0.9
- },{
- xtype: 'component',
- html: '<span style="color:#505363;">若需要管控非外购产品无有效BOM不允许下销售订单,请勾选此项:</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'saleHasBom',
- padding: '0 0 0 50',
- margin: '5 0 0 0',
- boxLabel: '非外购产品需有BOM才可下销售订单',
- bind: '{saleHasBom}'
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*启用则销售单提交、审核时如果物料生产类型不是外购,要判断是否存在已审核BOM</div>',
- columnWidth: 0.9
- },{
- xtype: 'component',
- html: '<span style="color:#505363;">若需要管控物料必须设置提前期才允许下销售订单,请勾选此项:</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'saleHasLeadtime',
- padding: '0 0 0 50',
- margin: '5 0 0 0',
- boxLabel: '产品或下阶物料需设置提前期',
- bind: '{saleHasLeadtime}'
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*启用则订单提交、审核时判断所有涉及的外购件是否有设置提前期,没有则限制</div>',
- 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: '<div style="color:#A9A9A9;">*设置优先选项,则交期运算时优先选项就取这个</div>',
- columnWidth: 0.9
- },{
- xtype: 'component',
- html: '<span style="color:#505363;">若需要交期运算后需求自动生成询价单,请勾选此项:</span>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'autoInquiryAfterAtp',
- padding: '0 0 0 50',
- margin: '5 0 0 0',
- boxLabel: '交期运算后自动询价',
- bind: '{autoInquiryAfterAtp}'
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*启用则销售订单审核后自动将交期运算中的需求生成公共询价</div>',
- columnWidth: 0.9
- }, {
- xtype: 'checkbox',
- name: 'BOMChangeRelativeMake',
- padding: '0 0 0 50',
- margin: '5 0 0 0',
- boxLabel: 'BOM变更时变更未结案和未领料工单',
- bind: '{BOMChangeRelativeMake}'
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若需要备货单审核后自动投放制造工单,请勾选此项:</span>',
- 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: '<div style="color:#A9A9A9;">*启用则备货单审核后自动按照需求数量生成工单</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若需要销售订单审核后自动投放制造工单,请勾选此项:</span>',
- 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: '<div style="color:#A9A9A9;">*启用则销售订单审核后自动按照需求数量生成工单</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若需要控制备货单、销售订单工单时产品资料必须有填写每日产能,请勾选此项:</span>',
- 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: '<div style="color:#A9A9A9;">*启用则备货单、销售订单转工单时会判断产品资料有无填写每日产能,未填写不允许转工单</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若需要制造工单退完备损才允许结案,请勾选此项:</span>',
- 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: '<div style="color:#A9A9A9;">*启用则制造工单结案时会判断备损有无退回或报废(备损数=需求数-工单数*单位用量)</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<span style="color:#505363;">若需要外协工单退完备损才允许结案,请勾选此项: </span>',
- 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: '<div style="color:#A9A9A9;">*启用则外协工单结案时会判断备损有无退回或报废(备损数=需求数-工单数*单位用量)</div>',
- 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);
- }
- });
|