123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- Ext.define('make.view.sys.parameter.tabpage.finance', {
- extend: 'Ext.form.Panel',
- xtype: 'make-finance-panel',
- cls: 'sys-finance-panel x-sys-setting',
- layout: 'column',
- border: 1,
- bodyPadding: 5,
- scrollable: true,
- autoScroll: true,
- defaults: {
- padding: '8 10 0 40',
- columnWidth: 0.3
- },
- viewModel: {
- data: {
- recSourceValue: 'CHECK',
- paySourceValue: 'CHECK',
- billUserNameValue: '',
- billPassWordValue: ''
- }
- },
- items: [{
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">初始化期间设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20',
- }, {
- xtype: 'textfield',
- fieldLabel: '初始化期间',
- name: 'initPeriod',
- bind: '{initPeriodValue}',
- editable:false
- }, {
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">默认税率设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20',
- }, {
- xtype: 'combo',
- fieldLabel: '默认税率',
- readOnly: false,
- queryMode: 'local',
- displayField: 'name',
- valueField: 'value',
- editable: true,
- name: 'defaultTaxRate',
- bind: '{defaultTaxRateValue}',
- store: Ext.create('Ext.data.Store', {
- fields: ['name', 'value'],
- data: [
- { value: '0', name: '0' },
- { value: '3', name: '3' },
- { value: '6', name: '6' },
- { value: '13', name: '13' }
- ]
- })
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*系统客户与供应商新增默认交易税率</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">存货计价设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20',
- }, {
- xtype: 'combo',
- fieldLabel: '存货计价方式',
- readOnly: false,
- queryMode: 'local',
- displayField: 'name',
- valueField: 'value',
- name: 'cucaltor',
- bind: '{cucaltorValue}',
- store: Ext.create('Ext.data.Store', {
- fields: ['name', 'value'],
- data: [
- { value: 'WACC', name: '加权平均数' },
- { value: 'FIFO', name: '先进先出法' },
- ]
- })
- }, {
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">本位币设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20',
- }, {
- xtype: 'combo',
- fieldLabel: '本位币',
- readOnly: false,
- queryMode: 'local',
- displayField: 'name',
- valueField: 'value',
- name: 'defaultCurrency',
- bind: '{defaultCurrencyValue}',
- store: Ext.create('Ext.data.Store', {
- fields: ['name', 'value'],
- data: [
- { value: 'RMB', name: 'RMB' },
- { value: 'USD', name: 'USD' },
- { value: 'EUR', name: 'EUR' },
- { value: 'HKD', name: 'HKD' },
- { value: 'JPY', name: 'JPY' },
- ]
- })
- }, {
- xtype: 'displayfield',
- value: '<div style="color:#A9A9A9;">*本位币修改之后会自动重算业务单据的汇率以及成本等,开账第二个月后不允许修改</div>',
- columnWidth: 0.9
- }, {
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">发票来源设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20'
- }, {
- xtype: 'fieldset',
- title: '应收发票来源',
- layout: 'column',
- columnWidth: 0.6,
- margin: '0 0 0 40',
- items: [{
- xtype: 'radiogroup',
- margin: '0 0 20 25',
- name: 'recSource',
- simpleValue: true,
- defaultType: 'container',
- columns: 1,
- bind: '{recSourceValue}',
- items: [
- { xtype: 'radiofield', boxLabel: '销售对账单', inputValue: 'CHECK' },
- { xtype: 'radiofield', boxLabel: '应收开票', inputValue: 'PRODIO' },
- { xtype: 'radiofield', boxLabel: '销售出货/退货审核自动产生', inputValue: 'PRODIOAUTO' }
- ]
- }]
- }, {
- xtype: 'fieldset',
- title: '应付发票来源',
- layout: 'column',
- columnWidth: 0.6,
- margin: '0 0 0 40',
- items: [{
- xtype: 'radiogroup',
- margin: '0 0 20 25',
- name: 'paySource',
- simpleValue: true,
- defaultType: 'container',
- columns: 1,
- bind: '{paySourceValue}',
- items: [
- { xtype: 'radiofield', boxLabel: saas.util.BaseUtil.getCompanyApp() == 'trade-app' ? '采购对账单' : '采购对账单、外协对账单', inputValue: 'CHECK' },
- { xtype: 'radiofield', boxLabel: '应付开票', inputValue: 'PRODIO' },
- { xtype: 'radiofield', boxLabel: saas.util.BaseUtil.getCompanyApp() == 'trade-app' ? '采购入库/退货审核自动产生' : '采购入库/退货、外协验收/验退审核自动产生', inputValue: 'PRODIOAUTO' }
- ]
- }]
- }, {
- xtype: 'component',
- html: '<div style="padding:8px 12px;background-color: #ecedf0;color:#404040">开票对接设置</div>',
- columnWidth: 1,
- padding: '8 10 0 20'
- }, {
- xtype: 'textfield',
- name: 'billUserName',
- bind: '{billUserNameValue}',
- fieldLabel: '账号',
- labelWidth: 50,
- columnWidth: 0.6
- }, {
- xtype: 'textfield',
- name: 'billPassWord',
- bind: '{billPassWordValue}',
- fieldLabel: '密码',
- labelWidth: 50,
- columnWidth: 0.6
- }],
- initComponent: function () {
- var me = this,
- viewModel = me.getViewModel(),
- mainViewModel = Ext.getCmp('mainView').getViewModel(),
- billsourceAP = mainViewModel.get('BillOutAPSource'),
- billsourceAR = mainViewModel.get('BillOutARSource'),
- billUserName = mainViewModel.get('billUserName'),
- billPassWord = mainViewModel.get('billPassWord'),
- defaultCurrency = mainViewModel.get('defaultCurrency'),
- cucaltor = mainViewModel.get('cucaltor'),
- defaultTaxRate = mainViewModel.get('defaultTaxRate'),
- initPeriod = mainViewModel.get('initPeriod');
- if (billsourceAP) {
- viewModel.set('paySourceValue', billsourceAP);
- }
- if (billsourceAR) {
- viewModel.set('recSourceValue', billsourceAR);
- }
- if (billUserName) {
- viewModel.set('billUserNameValue', billUserName);
- }
- if (billPassWord) {
- viewModel.set('billPassWordValue', billPassWord);
- }
- if (defaultCurrency) {
- viewModel.set('defaultCurrencyValue', defaultCurrency); //本位币
- }
- if (cucaltor) {
- viewModel.set('cucaltorValue', cucaltor); //存货计价方式
- }
- if (defaultTaxRate) {
- viewModel.set('defaultTaxRateValue', defaultTaxRate); //默认税率
- }
- if (initPeriod) {
- viewModel.set('initPeriodValue', initPeriod); //初始化期间
- }
- me.callParent(arguments);
- }
- });
|