|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, ""); }
|
|
|
|
|
|
Shipping.MsCwDesignGlIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsCwDesignGlIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsCwDesignGlIndex, Ext.Panel, {
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
this.formname = "formMsCwDesignGlIndex"; //总账账套接口设置
|
|
|
|
|
|
//#region formSearch 下拉框信息加载
|
|
|
//应收账款
|
|
|
this.storeCwAccitemsAR = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsAR.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxAR = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '应收账款',
|
|
|
store: this.storeCwAccitemsAR,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'AR',
|
|
|
name: 'AR',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//应付账款
|
|
|
this.storeCwAccitemsAP = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsAP.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxAP = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '应付账款',
|
|
|
store: this.storeCwAccitemsAP,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'AP',
|
|
|
name: 'AP',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//应收账款外币
|
|
|
this.storeCwAccitemsARFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsARFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxARFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '应收账款外币',
|
|
|
store: this.storeCwAccitemsARFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'ARFC',
|
|
|
name: 'ARFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//应收账款外币
|
|
|
this.storeCwAccitemsAPFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsAPFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1" } });
|
|
|
this.comboxAPFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '应付账款外币',
|
|
|
store: this.storeCwAccitemsAPFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'APFC',
|
|
|
name: 'APFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
////税额
|
|
|
//this.storeCwAccitemsINVTAX = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
// model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
// proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
//});
|
|
|
//this.storeCwAccitemsINVTAX.load({ params: { condition: "DETAILED=1 and ISENABLE=1" } });
|
|
|
//this.comboxINVTAX = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
// fieldLabel: '发票税额',
|
|
|
// store: this.storeCwAccitemsINVTAX,
|
|
|
// forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
// id: 'INVTAX',
|
|
|
// name: 'INVTAX',
|
|
|
// valueField: 'ACCID', //ACCNAME
|
|
|
// displayField: 'ACCIDNAME',
|
|
|
// allowBlank: false //不允许为空
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//预收账款
|
|
|
this.storeCwAccitemsDR = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsDR.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxDR = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '预收账款',
|
|
|
store: this.storeCwAccitemsDR,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'DR',
|
|
|
name: 'DR',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
});
|
|
|
|
|
|
//预付账款
|
|
|
this.storeCwAccitemsCR = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsCR.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxCR = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '预付账款',
|
|
|
store: this.storeCwAccitemsCR,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'CR',
|
|
|
name: 'CR',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
});
|
|
|
|
|
|
//预收账款外币
|
|
|
this.storeCwAccitemsDRFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsDRFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxDRFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '预收账款外币',
|
|
|
store: this.storeCwAccitemsARFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'DRFC',
|
|
|
name: 'DRFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
});
|
|
|
|
|
|
//预付账款外币
|
|
|
this.storeCwAccitemsCRFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsCRFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxCRFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '预付账款外币',
|
|
|
store: this.storeCwAccitemsCRFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'CRFC',
|
|
|
name: 'CRFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
});
|
|
|
|
|
|
//预付账款外币
|
|
|
this.storeCwAccitemsFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '财务费用',
|
|
|
store: this.storeCwAccitemsFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'FC',
|
|
|
name: 'FC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
});
|
|
|
|
|
|
//主营业务收入
|
|
|
this.storeCwAccitemsMBINCOME = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsMBINCOME.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxMBINCOME = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '主营业务收入',
|
|
|
store: this.storeCwAccitemsMBINCOME,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'MBINCOME',
|
|
|
name: 'MBINCOME',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//主营业务支出
|
|
|
this.storeCwAccitemsMBSPENDING = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsMBSPENDING.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxMBSPENDING = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '主营业务支出',
|
|
|
store: this.storeCwAccitemsMBSPENDING,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'MBSPENDING',
|
|
|
name: 'MBSPENDING',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//主营收入外币
|
|
|
this.storeCwAccitemsTMFCI = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsTMFCI.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxTMFCI = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '主营收入外币',
|
|
|
store: this.storeCwAccitemsTMFCI,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'TMFCI',
|
|
|
name: 'TMFCI',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//主营支出外币
|
|
|
this.storeCwAccitemsTMSFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsTMSFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxTMSFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '主营支出外币',
|
|
|
store: this.storeCwAccitemsTMSFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'TMSFC',
|
|
|
name: 'TMSFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//收费结算贷方默认科目代码
|
|
|
this.storeCwAccitemsARMBSPENDING = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsARMBSPENDING.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxARMBSPENDING = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
//fieldLabel: '收费结算贷方',
|
|
|
store: this.storeCwAccitemsARMBSPENDING,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'ARMBSPENDING',
|
|
|
name: 'ARMBSPENDING',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
//allowBlank: false, //不允许为空
|
|
|
});
|
|
|
|
|
|
//收费结算贷方外币默认科目代码
|
|
|
this.storeCwAccitemsARTMSFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsARTMSFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxARTMSFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
//fieldLabel: '收费结算贷方外币',
|
|
|
store: this.storeCwAccitemsARTMSFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'ARTMSFC',
|
|
|
name: 'ARTMSFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
//allowBlank: false, //不允许为空
|
|
|
});
|
|
|
|
|
|
//付费结算借方默认科目代码
|
|
|
this.storeCwAccitemsAPMBSPENDING = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsAPMBSPENDING.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxAPMBSPENDING = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
//fieldLabel: '付费结算借方',
|
|
|
store: this.storeCwAccitemsAPMBSPENDING,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'APMBSPENDING',
|
|
|
name: 'APMBSPENDING',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
//allowBlank: false, //不允许为空
|
|
|
});
|
|
|
|
|
|
//付费结算借方外币默认科目代码
|
|
|
this.storeCwAccitemsAPTMSFC = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsAPTMSFC.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxAPTMSFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
//fieldLabel: '付费结算借方外币',
|
|
|
store: this.storeCwAccitemsAPTMSFC,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'APTMSFC',
|
|
|
name: 'APTMSFC',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME'
|
|
|
//allowBlank: false, //不允许为空
|
|
|
});
|
|
|
|
|
|
//现金科目
|
|
|
this.storeCwAccitemsCASH = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsCASH.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxCASH = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '现金科目',
|
|
|
store: this.storeCwAccitemsCASH,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'CASH',
|
|
|
name: 'CASH',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//汇兑收益
|
|
|
this.storeCwAccitemsEGOL = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsEGOL.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxEGOL = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '汇兑收益', //汇兑损益
|
|
|
store: this.storeCwAccitemsEGOL,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
name: 'EGOL',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//汇兑损失
|
|
|
this.storeCwAccitemsEGOL2 = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsEGOL2.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxEGOL2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '汇兑损失', //汇兑损益
|
|
|
store: this.storeCwAccitemsEGOL2,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
name: 'ExchangeLoss',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//销项税科目
|
|
|
this.storeCwAccitemsOUTPUTTAX = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsOUTPUTTAX.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxOUTPUTTAX = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '销项税科目',
|
|
|
store: this.storeCwAccitemsOUTPUTTAX,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'OUTPUTTAX',
|
|
|
name: 'OUTPUTTAX',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false //不允许为空
|
|
|
});
|
|
|
|
|
|
//进项税科目
|
|
|
this.storeCwAccitemsINPUTTAX = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwAccitemsGlModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
|
|
|
});
|
|
|
this.storeCwAccitemsINPUTTAX.load({ params: { condition: "DETAILED=1 and ISENABLE=1"} });
|
|
|
this.comboxINPUTTAX = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '进项税科目',
|
|
|
store: this.storeCwAccitemsINPUTTAX,
|
|
|
forceSelection: true, //输入值是否严格为待选列表中存在的值
|
|
|
id: 'INPUTTAX',
|
|
|
name: 'INPUTTAX',
|
|
|
valueField: 'ACCID', //ACCNAME
|
|
|
displayField: 'ACCIDNAME',
|
|
|
allowBlank: false, //不允许为空
|
|
|
labelWidth: 185
|
|
|
});
|
|
|
|
|
|
//键值维护表
|
|
|
this.storeCrmKeyCodeCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CrmKeyCodeModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCrmKeyCodeList' }
|
|
|
});
|
|
|
this.storeCrmKeyCodeCode.load({ params: { condition: " and KEYTYPE='凭证字'"} });
|
|
|
//凭证字1
|
|
|
this.comboxTVW = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '凭证字',
|
|
|
flex: 1,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'TVW',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE',
|
|
|
value: '记',
|
|
|
allowBlank: false
|
|
|
});
|
|
|
//付款凭证字
|
|
|
this.comboxBPVW = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '付款凭证字',
|
|
|
flex: 1,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'BPVW',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE',
|
|
|
value: '付',
|
|
|
allowBlank: false
|
|
|
});
|
|
|
//收款凭证字
|
|
|
this.comboxBRTW = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '收款凭证字',
|
|
|
flex: 1,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'BRTW',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE',
|
|
|
value: '收',
|
|
|
allowBlank: false
|
|
|
});
|
|
|
//凭证字外币
|
|
|
this.comboxTVWFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '外币凭证字',
|
|
|
flex: 1,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'TVWFC',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE',
|
|
|
value: '记',
|
|
|
hidden: true
|
|
|
});
|
|
|
//付款凭证字外币
|
|
|
this.comboxBPVWFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '外币付款凭证字',
|
|
|
flex: 1,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'BPVWFC',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE',
|
|
|
value: '付',
|
|
|
allowBlank: false
|
|
|
});
|
|
|
//收款凭证字外币
|
|
|
this.comboxBRTWFC = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '外币收款凭证字',
|
|
|
flex: 1,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'BRTWFC',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE',
|
|
|
value: '收',
|
|
|
allowBlank: false
|
|
|
});
|
|
|
|
|
|
//核算办法
|
|
|
Ext.define('AMCODEModel', { extend: 'Ext.data.Model', fields: [{ name: 'Name', type: 'string'}] });
|
|
|
var dataAMCODE = [{ "Name": "全额" }, { "Name": "差额"}];
|
|
|
var storeAMCODE = Ext.create('Ext.data.Store', { model: 'AMCODEModel', data: dataAMCODE });
|
|
|
this.comboxAMCODE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '核算办法',
|
|
|
flex: 1,
|
|
|
forceSelection: true,
|
|
|
store: storeAMCODE,
|
|
|
id: 'AMCODE',
|
|
|
name: 'AMCODE',
|
|
|
valueField: 'Name',
|
|
|
displayField: 'Name',
|
|
|
value: '全额'
|
|
|
});
|
|
|
|
|
|
//项目加载
|
|
|
this.storeCwItem = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CwItemModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCwItemList' }
|
|
|
});
|
|
|
this.storeCwItem.load();
|
|
|
this.comboxCwItem = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
//fieldLabel: '核算项目',
|
|
|
store: this.storeCwItem,
|
|
|
forceSelection: true,
|
|
|
id: 'ITEMNAME',
|
|
|
name: 'ITEMNAME',
|
|
|
valueField: 'ITEMNAME',
|
|
|
displayField: 'ITEMNAME'
|
|
|
});
|
|
|
|
|
|
this.storeOPTYPE = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.storeOPTYPE.load({ params: { enumTypeId: 96005} });
|
|
|
this.comboxOPTYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
id: 'comboxOPTYPE',
|
|
|
//fieldLabel: '业务类型',
|
|
|
store: this.storeOPTYPE,
|
|
|
forceSelection: true,
|
|
|
name: 'OPTYPE',
|
|
|
valueField: 'EnumValueName',
|
|
|
displayField: 'EnumValueName'
|
|
|
});
|
|
|
|
|
|
//财务软件
|
|
|
Ext.define('FSOFTCODEModel', { extend: 'Ext.data.Model', fields: [{ name: 'Name', type: 'string' }, { name: 'Value', type: 'int'}] });
|
|
|
var dataFSOFTCODE = [{ "Name": "", "Value": 0 }, { "Name": "金蝶迷你", "Value": 1 }, { "Name": "金蝶标准", "Value": 2 }, { "Name": "金蝶k3", "Value": 3 }, { "Name": "用友U8", "Value": 4 }, { "Name": "用友NC", "Value": 7 }, { "Name": "金蝶专业", "Value": 8 }, { "Name": "金蝶K3(2)", "Value": 9 }, { "Name": "金蝶云星空webapi", "Value": 10 }]; //, { "Name": "浪潮", "Value": 5 }, { "Name": "SyBase", "Value": 6 }
|
|
|
var storeFSOFTCODE = Ext.create('Ext.data.Store', { model: 'FSOFTCODEModel', data: dataFSOFTCODE });
|
|
|
this.comboxFSOFTCODE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '财务软件',
|
|
|
forceSelection: true,
|
|
|
store: storeFSOFTCODE,
|
|
|
name: 'FSOFTCODE',
|
|
|
flex: 1,
|
|
|
labelAlign: 'right',
|
|
|
//labelWidth: 60,
|
|
|
//width: 150,
|
|
|
valueField: 'Value',
|
|
|
displayField: 'Name',
|
|
|
value: '0'
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//#region 编辑formHead 基本信息
|
|
|
this.formHead = Ext.widget('form', {
|
|
|
title: '参数设置',
|
|
|
region: 'north',
|
|
|
style: 'border:0px solid black; border-top:0;', //隐藏边框
|
|
|
frame: true,
|
|
|
border: false,
|
|
|
fieldDefaults: {
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 100
|
|
|
},
|
|
|
items: [{ xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '编号',
|
|
|
name: 'GID',
|
|
|
hidden: true,
|
|
|
value: "*"
|
|
|
}, this.comboxFSOFTCODE, this.comboxTVW, this.comboxBRTW, this.comboxBPVW]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxAMCODE, { xtype: 'hiddenfield', flex: 1 }, this.comboxTVWFC, this.comboxBRTWFC, this.comboxBPVWFC]//
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{ xtype: 'hiddenfield', width: 45 }, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISMBINCOME",
|
|
|
name: "ISMBINCOME",
|
|
|
boxLabel: "是否合并生成成本收入凭证中的主营业务科目",
|
|
|
width: 270,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISCTGCIC",
|
|
|
name: "ISCTGCIC",
|
|
|
boxLabel: "合并生成成本收入凭证",
|
|
|
width: 210,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISMGSC",
|
|
|
name: "ISMGSC",
|
|
|
boxLabel: "合并生成结算凭证",
|
|
|
width: 150,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox",
|
|
|
id: "ISSETTLEMENTSOPEN",
|
|
|
name: "ISSETTLEMENTSOPEN",
|
|
|
boxLabel: "是否自动弹出结算凭证",
|
|
|
width: 150,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox",
|
|
|
id: "ISSTLEXCHANGERATEISVAR",
|
|
|
name: "ISSTLEXCHANGERATEISVAR",
|
|
|
boxLabel: "结算凭证收入成本汇率可变",
|
|
|
width: 165,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox",
|
|
|
id: "ISSTLDATE",
|
|
|
name: "ISSTLDATE",
|
|
|
boxLabel: "结算日期默认为凭证日期",
|
|
|
width: 165,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox",
|
|
|
id: "ISSALECORP",
|
|
|
name: "ISSALECORP",
|
|
|
boxLabel: "根据核算单位生成",
|
|
|
width: 165,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{ xtype: 'hiddenfield', width: 45 },{
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISFILLSERIALNO",
|
|
|
name: "ISFILLSERIALNO",
|
|
|
boxLabel: "是否在生成凭证号时补号",
|
|
|
width: 270,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISMERGEBANK",
|
|
|
name: "ISMERGEBANK",
|
|
|
boxLabel: "是否合并生成结算凭证中的银行科目",
|
|
|
width: 210,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISADVANCE",
|
|
|
name: "ISADVANCE",
|
|
|
boxLabel: "结算凭证按预收预付生成",
|
|
|
width: 150,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISSTLEGOL",
|
|
|
name: "ISSTLEGOL",
|
|
|
boxLabel: "结算凭证生成汇兑损益",
|
|
|
width: 150,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISVBM",
|
|
|
name: "ISVBM",
|
|
|
boxLabel: "凭证禁止修改",
|
|
|
width: 160,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false, //绘制时的选中状态
|
|
|
hidden: true
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISSTLCR",
|
|
|
name: "ISSTLCR",
|
|
|
boxLabel: "结算凭证生成成本分录",
|
|
|
width: 165,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISINVRATESELF",
|
|
|
name: "ISINVRATESELF",
|
|
|
boxLabel: "发票凭证税单独分录",
|
|
|
width: 165,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRATESET",
|
|
|
name: "ISRATESET",
|
|
|
boxLabel: "是否默认系统设置汇率",
|
|
|
width: 165,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: false
|
|
|
}]
|
|
|
}, { xtype: 'hiddenfield', height: 10}]//end items(fieldset 1)
|
|
|
});
|
|
|
|
|
|
this.formKHLB = Ext.widget('form', {
|
|
|
title: '客户、供应商 类别设置',
|
|
|
region: 'north',
|
|
|
border: false,
|
|
|
frame: true,
|
|
|
collapsible: true, //将激活折叠功能
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '客户',
|
|
|
name: 'CANAME',
|
|
|
value: '客户',
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 35,
|
|
|
allowBlank: false
|
|
|
}, {
|
|
|
fieldLabel: '部门',
|
|
|
name: 'DANAME',
|
|
|
value: '部门',
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 40,
|
|
|
allowBlank: false
|
|
|
}, {
|
|
|
fieldLabel: '职员',
|
|
|
name: 'PANAEM',
|
|
|
value: '职员',
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 40,
|
|
|
allowBlank: false
|
|
|
}, {
|
|
|
fieldLabel: '供应商',
|
|
|
name: 'SANAME',
|
|
|
value: '供应商',
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 50,
|
|
|
allowBlank: false
|
|
|
}]
|
|
|
}]//end items(fieldset 1)
|
|
|
});
|
|
|
|
|
|
this.formGZZY = Ext.widget('form', {
|
|
|
title: '挂账组成部分',
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
border: false,
|
|
|
collapsible: true, //将激活折叠功能
|
|
|
fieldDefaults: {
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 60
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '票号',
|
|
|
xtype: 'radiogroup',
|
|
|
name: 'rdoPiaoHao',
|
|
|
vertical: true,
|
|
|
items: [
|
|
|
{ id: 'rdoNO', boxLabel: '不使用', name: 'PiaoHao', inputValue: '', width: 60 },
|
|
|
{ id: 'rdoCUSTNO', boxLabel: '委托编号', name: 'PiaoHao', inputValue: 'CUSTNO', width: 70 },
|
|
|
{ id: 'rdoINVOICENO', boxLabel: '发票号(发票挂账)', name: 'PiaoHao', inputValue: 'INVOICENO', width: 120 },
|
|
|
{ id: 'rdoMBLNO', boxLabel: '主提单号', name: 'PiaoHao', inputValue: 'MBLNO', width: 70, checked: true }
|
|
|
]
|
|
|
}]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: "摘要",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISCLIENTNAME",
|
|
|
name: "ISCLIENTNAME",
|
|
|
boxLabel: "客户名称",
|
|
|
width: 150,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISCUSTNO",
|
|
|
name: "ISCUSTNO",
|
|
|
boxLabel: "委托编号/发票号",
|
|
|
width: 120,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISMBLNO",
|
|
|
name: "ISMBLNO",
|
|
|
boxLabel: "主提单号",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISVESSEL",
|
|
|
name: "ISVESSEL",
|
|
|
boxLabel: "船名",
|
|
|
width: 60,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISVOYNO",
|
|
|
name: "ISVOYNO",
|
|
|
boxLabel: "航次",
|
|
|
width: 60,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISBSSOURCE",
|
|
|
name: "ISBSSOURCE",
|
|
|
boxLabel: "业务来源",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISSALE",
|
|
|
name: "ISSALE",
|
|
|
boxLabel: "揽货人",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISINVEXPLANONRATE",
|
|
|
name: "ISINVEXPLANONRATE",
|
|
|
boxLabel: "发票挂账按税率生成",
|
|
|
width: 130,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}]
|
|
|
}, { xtype: 'hiddenfield', height: 6 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '应收摘要模板',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
name: 'DREXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '应付摘要模板',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
name: 'CREXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '主营业务收入摘要模板',
|
|
|
flex: 1,
|
|
|
labelWidth: 160,
|
|
|
name: 'MBINCOMEEXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '主营业务支出摘要模板',
|
|
|
flex: 1,
|
|
|
labelWidth: 160,
|
|
|
name: 'MBSPENDINGEXPLAN',
|
|
|
}]
|
|
|
}, { xtype: 'hiddenfield', height: 6 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '发票应收摘要模板',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
name: 'INVDREXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '发票应付摘要模板',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
name: 'INVCREXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '发票主营收入摘要模板',
|
|
|
flex: 1,
|
|
|
labelWidth: 160,
|
|
|
name: 'INVMBINCOMEEXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '发票主营支出摘要模板',
|
|
|
flex: 1,
|
|
|
labelWidth: 160,
|
|
|
name: 'INVMBSPENDINGEXPLAN',
|
|
|
}]
|
|
|
}]//end items(fieldset 1)
|
|
|
});
|
|
|
|
|
|
this.formJSZY = Ext.widget('form', {
|
|
|
title: '结算组成部分',
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
border: false,
|
|
|
collapsible: true, //将激活折叠功能
|
|
|
fieldDefaults: {
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 60
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '票号',
|
|
|
flex: 1,
|
|
|
xtype: 'radiogroup',
|
|
|
name: 'rdoPiaoHaoRP',
|
|
|
vertical: true,
|
|
|
items: [
|
|
|
{ id: 'rdoRPNO', boxLabel: '不使用', name: 'PiaoHaoRP', inputValue: '', width: 60 },
|
|
|
{ id: 'rdoRPCUSTNO', boxLabel: '委托编号', name: 'PiaoHaoRP', inputValue: 'CUSTNO', width: 70 },
|
|
|
{ id: 'rdoRPMBLNO', boxLabel: '主提单号', name: 'PiaoHaoRP', inputValue: 'MBLNO', width: 70, checked: true }
|
|
|
]
|
|
|
},{
|
|
|
fieldLabel: '收款摘要模板',
|
|
|
labelWidth: 100,
|
|
|
flex: 1,
|
|
|
name: 'STLDREXPLAN',
|
|
|
}, {
|
|
|
fieldLabel: '付款摘要模板',
|
|
|
labelWidth: 100,
|
|
|
flex: 1,
|
|
|
name: 'STLCREXPLAN',
|
|
|
}]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: "摘要",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPCLIENTNAME",
|
|
|
name: "ISRPCLIENTNAME",
|
|
|
boxLabel: "客户名称",
|
|
|
width: 150,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPCUSTNO",
|
|
|
name: "ISRPCUSTNO",
|
|
|
boxLabel: "委托编号",
|
|
|
width: 120,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPMBLNO",
|
|
|
name: "ISRPMBLNO",
|
|
|
boxLabel: "主提单号",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
checked: true //绘制时的选中状态
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPVESSEL",
|
|
|
name: "ISRPVESSEL",
|
|
|
boxLabel: "船名",
|
|
|
width: 60,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPVOYNO",
|
|
|
name: "ISRPVOYNO",
|
|
|
boxLabel: "航次",
|
|
|
width: 60,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPBSSOURCE",
|
|
|
name: "ISRPBSSOURCE",
|
|
|
boxLabel: "业务来源",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPSALE",
|
|
|
name: "ISRPSALE",
|
|
|
boxLabel: "揽货人",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPBILLNO",
|
|
|
name: "ISRPBILLNO",
|
|
|
boxLabel: "结算单号",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
xtype: "checkbox",
|
|
|
id: "ISRPBILLNO_ACAD",
|
|
|
name: "ISRPBILLNO_ACAD",
|
|
|
boxLabel: "申请单号",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISRPSTLDATE",
|
|
|
name: "ISRPSTLDATE",
|
|
|
boxLabel: "结算日期",
|
|
|
width: 80,
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false" //未选中的值
|
|
|
}]
|
|
|
}]//end items(fieldset 1)
|
|
|
});
|
|
|
|
|
|
this.formPZKM = Ext.widget('form', {
|
|
|
title: '凭证科目设置',
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
border: false,
|
|
|
collapsible: true, //将激活折叠功能
|
|
|
fieldDefaults: {
|
|
|
labelAlign: 'right',
|
|
|
labelWidth: 110
|
|
|
},
|
|
|
items: [{ xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxAR, this.comboxDR, this.comboxMBINCOME, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISARMBSPENDING",
|
|
|
name: "ISARMBSPENDING",
|
|
|
width: 170,
|
|
|
boxLabel: "是否默认收费结算贷方",
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
listeners: {
|
|
|
'change': function (field, newValue, oldValue, eOpts) {
|
|
|
if (field.checked.toString() == "false") {
|
|
|
Ext.getCmp('ISARTMSFC').setValue("false");
|
|
|
}
|
|
|
else {
|
|
|
Ext.getCmp('ISARTMSFC').setValue("true");
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
}, this.comboxARMBSPENDING]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxARFC, this.comboxDRFC, this.comboxTMFCI, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISARTMSFC",
|
|
|
name: "ISARTMSFC",
|
|
|
width: 170,
|
|
|
boxLabel: "是否默认收费结算贷方外币",
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
listeners: {
|
|
|
'change': function (field, newValue, oldValue, eOpts) {
|
|
|
if (field.checked.toString() == "false") {
|
|
|
Ext.getCmp('ISARMBSPENDING').setValue("false");
|
|
|
}
|
|
|
else {
|
|
|
Ext.getCmp('ISARMBSPENDING').setValue("true");
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
}, this.comboxARTMSFC]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxAP, this.comboxCR, this.comboxMBSPENDING, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISAPMBSPENDING",
|
|
|
name: "ISAPMBSPENDING",
|
|
|
width: 170,
|
|
|
boxLabel: "是否默认付费结算借方",
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
listeners: {
|
|
|
'change': function (field, newValue, oldValue, eOpts) {
|
|
|
if (field.checked.toString() == "false") {
|
|
|
Ext.getCmp('ISAPTMSFC').setValue("false");
|
|
|
}
|
|
|
else {
|
|
|
Ext.getCmp('ISAPTMSFC').setValue("true");
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
}, this.comboxAPMBSPENDING]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxAPFC, this.comboxCRFC, this.comboxTMSFC, {
|
|
|
//fieldLabel: "",
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
id: "ISAPTMSFC",
|
|
|
name: "ISAPTMSFC",
|
|
|
width: 170,
|
|
|
boxLabel: "是否默认付费结算借方外币",
|
|
|
inputValue: "true", //选中的值
|
|
|
uncheckedValue: "false", //未选中的值
|
|
|
listeners: {
|
|
|
'change': function (field, newValue, oldValue, eOpts) {
|
|
|
if (field.checked.toString() == "false") {
|
|
|
Ext.getCmp('ISAPMBSPENDING').setValue("false");
|
|
|
}
|
|
|
else {
|
|
|
Ext.getCmp('ISAPMBSPENDING').setValue("true");
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
}, this.comboxAPTMSFC]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxCASH, this.comboxOUTPUTTAX, this.comboxINPUTTAX]
|
|
|
}, { xtype: 'hiddenfield', height: 10 }, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxEGOL, this.comboxEGOL2, this.comboxFC]
|
|
|
}, { xtype: 'hiddenfield', height: 10}]//end items(fieldset 1)
|
|
|
});
|
|
|
|
|
|
this.formBlank = Ext.widget('form', {
|
|
|
region: 'south',
|
|
|
height: 30,
|
|
|
style: 'border:0px solid black; border-top:0;', //隐藏边框
|
|
|
frame: true,
|
|
|
border: false,
|
|
|
items: [{ xtype: 'container'}]
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//#region 凭证_核算项目
|
|
|
//#region 定义数据集
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsCwDesignGlItemModel',
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsCwDesignGl/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data'
|
|
|
}
|
|
|
},
|
|
|
autoLoad: true
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//#region 列定义
|
|
|
this.girdcolums = [{
|
|
|
sortable: false,
|
|
|
dataIndex: 'GID',
|
|
|
text: '唯一编码',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
text: '核算项目',
|
|
|
dataIndex: 'ITEMNAME',
|
|
|
width: 200,
|
|
|
align: 'center',
|
|
|
editor: this.comboxCwItem
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
text: '业务类型',
|
|
|
dataIndex: 'OPTYPE',
|
|
|
width: 200,
|
|
|
align: 'center',
|
|
|
editor: this.comboxOPTYPE
|
|
|
}];
|
|
|
//#endregion
|
|
|
|
|
|
//#region gridList列表显示信息
|
|
|
this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
clicksToEdit: 1 //1单击,2双击
|
|
|
});
|
|
|
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
region: 'center',
|
|
|
//border: false,
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false, //是否显示表格列的菜单
|
|
|
hideHeaders: false, //是否隐藏表头
|
|
|
rowLines: true,
|
|
|
columnLines: true,
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
plugins: [this.gridListCellEditing],
|
|
|
selType: 'cellmodel',
|
|
|
columns: this.girdcolums
|
|
|
});
|
|
|
//#endregion
|
|
|
//#endregion
|
|
|
|
|
|
//#region 按钮工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
border: false,
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
id: 'btnsave',
|
|
|
text: "保存",
|
|
|
tooltip: '保存',
|
|
|
iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.Save();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "刷新",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.InitData();
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}); //end 按钮Toolbar
|
|
|
|
|
|
this.panelBtn2 = new Ext.Panel({
|
|
|
border: false,
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
text: '添加',
|
|
|
tooltip: '添加',
|
|
|
id: "btnadd",
|
|
|
iconCls: "btnadd",
|
|
|
handler: function (button, event) {
|
|
|
this.onAddClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存",
|
|
|
tooltip: '保存',
|
|
|
iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.Save();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '删除',
|
|
|
tooltip: '删除',
|
|
|
id: "btndel",
|
|
|
iconCls: "btndelete",
|
|
|
handler: function (button, event) {
|
|
|
this.onDelClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}); //end 按钮Toolbar
|
|
|
//#endregion
|
|
|
|
|
|
//#region 页面布局
|
|
|
this.panelPZXM = new Ext.Panel({
|
|
|
title: '凭证核算项目设置',
|
|
|
region: "north",
|
|
|
frame: true,
|
|
|
border: false,
|
|
|
collapsible: true, //将激活折叠功能
|
|
|
//margins: '0 0 0 0',
|
|
|
//style : 'margin: 10px 5px 15px 20px;',
|
|
|
items: [this.panelBtn2, this.gridList]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
border: false,
|
|
|
items: [this.panelBtn, this.formHead, this.formKHLB, this.formGZZY, this.formJSZY, this.formPZKM, this.panelPZXM]
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//加载事件
|
|
|
this.InitData();
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
//#region 加载事件
|
|
|
InitData: function () {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcShipping/MsCwDesignGl/GetData',
|
|
|
params: {
|
|
|
condition: ""
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
//
|
|
|
var data = result.data;
|
|
|
if (data.GID != "*" && data.GID != "") {
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues(data);
|
|
|
this.formKHLB.getForm().reset();
|
|
|
this.formKHLB.getForm().setValues(data);
|
|
|
this.formGZZY.getForm().reset();
|
|
|
this.formGZZY.getForm().setValues(data);
|
|
|
this.formJSZY.getForm().reset();
|
|
|
this.formJSZY.getForm().setValues(data);
|
|
|
this.formPZKM.getForm().reset();
|
|
|
this.formPZKM.getForm().setValues(data);
|
|
|
//
|
|
|
this.storeList.load({ params: { condition: "LINKGID='" + data.GID.toString() + "'" }, waitMsg: "正在查询数据...", scope: this });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}, //end InitData
|
|
|
//#endregion
|
|
|
|
|
|
//#region 按钮函数
|
|
|
onAddClick: function () {
|
|
|
var record = Ext.create('MsCwDesignGlItemModel', {
|
|
|
GID: '*',
|
|
|
ITEMNAME: '',
|
|
|
OPTYPE: ''
|
|
|
});
|
|
|
this.storeList.add(record);
|
|
|
var n = this.storeList.getCount();
|
|
|
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 0 });
|
|
|
},
|
|
|
|
|
|
Save: function (button, event) {
|
|
|
if (!this.formHead.getForm().isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
if (!this.formKHLB.getForm().isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
if (!this.formGZZY.getForm().isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
if (!this.formJSZY.getForm().isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
if (!this.formPZKM.getForm().isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
var ddsaf = Ext.getCmp('ISAPMBSPENDING').getValue();
|
|
|
var dssaf = Ext.getCmp('APMBSPENDING').getValue();
|
|
|
if (Ext.getCmp('ISAPMBSPENDING').getValue() && Ext.getCmp('APMBSPENDING').getValue() == null) {
|
|
|
Ext.Msg.show({ title: '错误', msg: "如果选中默认付费结算借方,则科目不允许为空!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
if (Ext.getCmp('ISAPTMSFC').getValue() && Ext.getCmp('APTMSFC').getValue() == null) {
|
|
|
Ext.Msg.show({ title: '错误', msg: "如果选中默认付费结算借方外币,则科目不允许为空!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
//
|
|
|
this.formHead.getForm().findField('GID').setDisabled(false);
|
|
|
var dataHead = this.formHead.getForm().getValues(false, false, false);
|
|
|
var dataKHLB = this.formKHLB.getForm().getValues(false, false, false);
|
|
|
var dataGZZY = this.formGZZY.getForm().getValues(false, false, false);
|
|
|
var dataJSZY = this.formJSZY.getForm().getValues(false, false, false);
|
|
|
var dataPZKM = this.formPZKM.getForm().getValues(false, false, false);
|
|
|
this.formHead.getForm().findField('GID').setDisabled(true);
|
|
|
//
|
|
|
var jsonBody;
|
|
|
if (this.storeList.getCount() > 0) {
|
|
|
var j = 0;
|
|
|
var bodydatas = [];
|
|
|
for (var i = 0; i < this.storeList.getCount(); i += 1) {
|
|
|
var member = this.storeList.getAt(i);
|
|
|
var sITEMGID = "";
|
|
|
var AccitemsList = DsStoreQueryBy(this.storeCwItem, 'ITEMNAME', member.get("ITEMNAME").toString());
|
|
|
if (AccitemsList.length > 0) {
|
|
|
var AccitemsRaw = AccitemsList.getAt(0);
|
|
|
if (AccitemsRaw != null) {
|
|
|
sITEMGID = AccitemsRaw.data.GID.toString();
|
|
|
}
|
|
|
}
|
|
|
member.set("ITEMGID", sITEMGID);
|
|
|
//memberbody.commit();
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
if (bodydatas.length > 0) {
|
|
|
jsonBody = ConvertRecordsToJsonAll(bodydatas);
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在保存数据...',
|
|
|
url: '/MvcShipping/MsCwDesignGl/Save',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
dataHead: Ext.JSON.encode(dataHead),
|
|
|
dataKHLB: Ext.JSON.encode(dataKHLB),
|
|
|
dataGZZY: Ext.JSON.encode(dataGZZY),
|
|
|
dataJSZY: Ext.JSON.encode(dataJSZY),
|
|
|
dataPZKM: Ext.JSON.encode(dataPZKM),
|
|
|
jsonBody: jsonBody
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var data = jsonresult.Data;
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues(data);
|
|
|
this.formKHLB.getForm().reset();
|
|
|
this.formKHLB.getForm().setValues(data);
|
|
|
this.formGZZY.getForm().reset();
|
|
|
this.formGZZY.getForm().setValues(data);
|
|
|
this.formJSZY.getForm().reset();
|
|
|
this.formJSZY.getForm().setValues(data);
|
|
|
this.formPZKM.getForm().reset();
|
|
|
this.formPZKM.getForm().setValues(data);
|
|
|
//
|
|
|
this.formHead.getForm().findField('GID').setDisabled(false);
|
|
|
this.formHead.getForm().findField('GID').setValue(data.GID);
|
|
|
this.formHead.getForm().findField('GID').setDisabled(true);
|
|
|
//
|
|
|
this.storeList.load({ params: { condition: "LINKGID='" + data.GID.toString() + "'" }, waitMsg: "正在查询数据...", scope: this });
|
|
|
//this.InitData();
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onDelClick: function () {
|
|
|
var selectedRecords = this.gridList.selModel.getSelection();
|
|
|
var rec = selectedRecords[0];
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/MsCwDesignGl/Delete',
|
|
|
params: {
|
|
|
data: Ext.JSON.encode(rec.data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.formHead.getForm().findField('GID').setDisabled(false);
|
|
|
var sGID = this.formHead.getForm().findField('GID').getValue();
|
|
|
this.formHead.getForm().findField('GID').setDisabled(true);
|
|
|
this.storeList.load({ params: { condition: "LINKGID='" + sGID + "'" }, waitMsg: "正在查询数据...", scope: this });
|
|
|
Ext.Msg.hide();
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}
|
|
|
//#endregion
|
|
|
});
|
|
|
|
|
|
|