You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/MvcContainer/Viewsjs/MsOpCtnBsCard/MsOpCtnBsCtnStatusEdit.js

4543 lines
168 KiB
JavaScript

2 years ago
Ext.namespace('Shipping');
Shipping.MsOpBsCardEdit = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpBsCardEdit.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpBsCardEdit, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
editRecord: null,
editFactryRecord: null,
FactryStatus: 'add',
BILL: null,
GID: "",
initUIComponents: function () {
this.serialNo = 0;
this.workSerialNo = 0;
this.bodyDel = [];
this.bsno = getUrlParam('bsno');
//#region 编辑form
//枚举参照相关(编辑form)
this.ParentWin = window.parent.opener;
//客户加载_委托单位
this.storeCUSTOMER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
});
this.storeCUSTOMER.load({ params: { condition: "ISCONTROLLER='1'"} });
this.storeCUSTOMER_I = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
});
this.storeCUSTOMER_I.load({ params: { condition: "ISCONTROLLER='1'"} });
//委托单位
this.comboxCUSTOMER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '委托单位',
store: this.storeCUSTOMER,
//forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//委托单位
this.comboxCUSTOMER_I = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '空返委托单位',
store: this.storeCUSTOMER_I,
forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'I_CUSTNAME',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeListGood = Ext.create('Ext.data.Store', {
model: 'MsCodeMSDS',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsCodeMSDS/GetDataListRm',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//this.storeListGood.load({ params: { start: 0, limit: 20000, condition: ""} });
this.comboxGoods = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeListGood,
fieldLabel: '品名',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'GOODSNAME',
valueField: 'CHEMICALCGOODSNAME',
displayField: 'GOODNAMEANDCNAME',
listeners: {
'render': function (_field, eOpts) {//自定义函数,定义双击事件
var _this = this;
_field.getEl().on('dblclick', function (e, t, eOpts) {
var openSet = "height=700, width=1224, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../MsCodeMSDS/MsdsView?handle=check&goodsname=" + t.value;
window.open(openUrl, openType, openSet);
});
}
}
});
this.storeAGENT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeAGENT.load({ params: { condition: "ISAGENT='1'"} });
this.comboxAgent = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港代理',
store: this.storeAGENT,
forceSelection: true,
name: 'AGENTNAME',
valueField: 'CustName',
displayField: 'CodeAndName'
});
_this = this;
this.storeCodeDisport = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
autoLoad: true,
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
});
this.storeCodeDisport3 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
autoLoad: true,
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
});
this.storeCodeDisportI_PORTLOAD = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
autoLoad: true,
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
});
this.storeCodeDisportI_DESTPORT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
autoLoad: true,
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
});
var astoreCodeDisport = this.ParentWin.storeCodeDisport;
if (astoreCodeDisport == NaN || astoreCodeDisport == null) {
this.storeCodeDisport.load({
callback: function (r, options, success) {
if (success) {
_this.storeCodeDisport3.add(r);
_this.storeCodeDisportI_PORTLOAD.add(r);
_this.storeCodeDisportI_DESTPORT.add(r);
}
}
});
} else {
this.storeCodeDisport.loadData(astoreCodeDisport.data.items);
this.storeCodeDisportI_PORTLOAD.loadData(astoreCodeDisport.data.items);
this.storeCodeDisport3.loadData(astoreCodeDisport.data.items);
this.storeCodeDisportI_DESTPORT.loadData(astoreCodeDisport.data.items);
}
this.comboxPORTDISCHARGE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港',
store: this.storeCodeDisport,
name: 'DESTPORT',
valueField: 'PORT',
displayField: 'PORT'
});
this.comboxPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '起运港',
store: this.storeCodeDisport3,
name: 'PORTLOAD',
valueField: 'PORT',
displayField: 'PORT'
});
//#region 空返
//客户加载_船公司
this.storeICARRIER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeICARRIER.load({ params: { condition: "ISCARRIER='1'"} });
//船公司
this.comboxICARRIER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '船公司',
store: this.storeICARRIER,
forceSelection: true,
name: 'I_CARRIER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.comboxI_PORTLOAD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '起运港',
store: this.storeCodeDisportI_PORTLOAD,
name: 'I_PORTLOAD',
valueField: 'PORT',
displayField: 'PORT'
});
this.comboxI_DESTPORT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港',
store: this.storeCodeDisportI_DESTPORT,
name: 'I_DESTPORT',
valueField: 'PORT',
displayField: 'PORT'
});
//客户加载_场站
this.store_PORTLOAD_STATOIN = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.store_PORTLOAD_STATOIN.load({ params: { condition: "ISYARD='1'"} });
//场站
this.comboxPORTLOAD_STATOIN = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '起运港场站',
store: this.store_PORTLOAD_STATOIN,
forceSelection: true,
name: 'PORTLOAD_STATOIN',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeI_DESTPORT_STATOIN = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeI_DESTPORT_STATOIN.load({ params: { condition: "ISYARD='1'"} });
//场站
this.comboxI_DESTPORT_STATOIN = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港场站',
store: this.storeI_DESTPORT_STATOIN,
forceSelection: true,
name: 'I_DESTPORT_STATOIN',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeI_CONTRACT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeI_CONTRACT.load({ params: { condition: "ISAGENT='1'"} });
this.comboxI_CONTRACT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '运费约价',
store: this.storeI_CONTRACT,
forceSelection: true,
name: 'I_CONTRACT',
valueField: 'CustName',
displayField: 'CodeAndName'
});
_this = this;
this.formEdit_I = Ext.widget('form', {
region: 'north',
frame: true,
// title: '空返信息',
bodyPadding: 5,
autoScroll: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 100,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '空返委托编号',
name: 'I_CUSTNO'
}, {
fieldLabel: '空返提单号',
name: 'I_MBLNO'
}, this.comboxCUSTOMER_I, this.comboxICARRIER, this.comboxI_CONTRACT]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '起运港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'I_PORTLOAD_CNT_TIME'
}, this.comboxI_PORTLOAD, {
fieldLabel: '空返开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'I_ETD'
}, this.comboxI_DESTPORT, {
fieldLabel: '预抵日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'PREI_ETA'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '空返到港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'I_ETA'
}, this.comboxI_DESTPORT_STATOIN, {
fieldLabel: '目的港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'I_DEST_CNT_TIME'
}, {
fieldLabel: '目的港还箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'I_DEST_RTCNT_TIME'
}, { xtype: 'hiddenfield'}]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
//#endregion
//#region 调拨
//客户加载_船公司
this.storeDCARRIER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeDCARRIER.load({ params: { condition: "ISCARRIER='1'" } });
//船公司
this.comboxDCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '船公司',
store: this.storeDCARRIER,
forceSelection: true,
name: 'D_CARRIER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//委托单位
this.comboxCUSTOMER_D = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '调拨委托单位',
store: this.storeCUSTOMER_D,
forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
name: 'D_CUSTNAME',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeCodeDisportD_PORTLOAD = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
autoLoad: true,
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
});
this.storeCodeDisportD_DESTPORT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
autoLoad: true,
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportListRm' }
});
this.comboxD_PORTLOAD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '起运港',
store: this.storeCodeDisportD_PORTLOAD,
queryMode: 'remote',
minChars: 2,
queryParam: 'PORT',
name: 'D_PORTLOAD',
valueField: 'PORT',
displayField: 'PORT'
});
this.comboxD_DESTPORT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港',
store: this.storeCodeDisportD_DESTPORT,
queryMode: 'remote',
minChars: 2,
queryParam: 'PORT',
name: 'D_DESTPORT',
valueField: 'PORT',
displayField: 'PORT'
});
this.storeD_DESTPORT_STATOIN = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeD_DESTPORT_STATOIN.load({ params: { condition: "ISYARD='1'" } });
//场站
this.comboxD_DESTPORT_STATOIN = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港场站',
store: this.storeD_DESTPORT_STATOIN,
forceSelection: true,
name: 'D_DESTPORT_STATOIN',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeD_CONTRACT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeD_CONTRACT.load({ params: { condition: "ISAGENT='1'" } });
this.comboxD_CONTRACT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '运费约价',
store: this.storeD_CONTRACT,
forceSelection: true,
name: 'D_CONTRACT',
valueField: 'CustName',
displayField: 'CodeAndName'
});
_this = this;
this.formEdit_D = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
autoScroll: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 100,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '调拨委托编号',
name: 'D_CUSTNO'
}, {
fieldLabel: '调拨提单号',
name: 'D_MBLNO'
}, this.comboxCUSTOMER_D, this.comboxDCARRIER, this.comboxD_CONTRACT]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '起运港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'D_PORTLOAD_CNT_TIME'
}, this.comboxD_PORTLOAD, {
fieldLabel: '调拨开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'D_ETD'
}, this.comboxD_DESTPORT, {
fieldLabel: '预抵日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'PRED_ETA'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '调拨到港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'D_ETA'
}, this.comboxD_DESTPORT_STATOIN, {
fieldLabel: '目的港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'D_DEST_CNT_TIME'
}, {
fieldLabel: '目的港还箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'D_DEST_RTCNT_TIME'
}, { xtype: 'hiddenfield' }]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
//#endregion
//表参照相关(编辑form)
//客户加载_场站
this.storeDESTPORT_STATOIN = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeDESTPORT_STATOIN.load({ params: { condition: "ISYARD='1'"} });
//场站
this.comboxDESTPORT_STATOIN = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '目的港场站',
store: this.storeDESTPORT_STATOIN,
forceSelection: true,
name: 'DESTPORT_STATOIN',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//编辑form
this.formEdit = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
autoScroll: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: 'GID',
name: 'GID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'COMPANYID',
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'SEABSNO',
name: 'SEABSNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'ISCLOSE',
name: 'ISCLOSE', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'APPLYNO',
name: 'APPLYNO', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: '业务卡编号',
allowBlank: true,
flex: 1,
name: 'BSNO'
}, {
fieldLabel: '委托编号',
name: 'CUSTNO'
}, this.comboxCUSTOMER, {
fieldLabel: '箱号',
name: 'CTNNO'
}, {
fieldLabel: '箱属',
name: 'CTNPROP'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '提单号',
name: 'MBLNO'
}, this.comboxGoods, {
fieldLabel: '当前位置',
name: 'CUR_PORT'
}, {
fieldLabel: '当前时间',
name: 'CUR_DATE'
}, {
fieldLabel: '周期',
name: 'CYCLE_DAY'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '起运港进港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'PORTLOADDATE'
}, this.comboxPORTLOAD_STATOIN, {
fieldLabel: '起运港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'PORTLOAD_CNT_TIME'
}, {
fieldLabel: '装货工厂',
name: 'LOADFACTORY'
}, this.comboxPORTLOAD]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'ETD'
}, this.comboxPORTDISCHARGE, {
fieldLabel: '预抵日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'PREETA'
}, {
fieldLabel: '到港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'ETA'
}, this.comboxAgent]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxDESTPORT_STATOIN, {
fieldLabel: '目的港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'DEST_CNT_TIME'
}, {
fieldLabel: '目的港还箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'DEST_RTCNT_TIME'
}, {
fieldLabel: '返空状态',
readOnly: true,
flex: 0.5,
name: 'AUDITSTATUS'
}, {
fieldLabel: '是否返空',
inputValue: true,
readOnly: true,
flex: 0.5,
xtype: 'checkboxfield',
name: 'IS_RETURE_EMPTY',
listeners: {
scope: this,
'change': function (field, newValue, oldValue, eOpts) {
if (field.checked) {
_this.formEdit_I.setVisible(true);
_this.panelTop.height = 448;
_this.doLayout();
} else {
_this.formEdit_I.setVisible(false);
_this.panelTop.height = 330;
_this.doLayout();
}
}
}
}, {
fieldLabel: '是否调拨',
inputValue: true,
readOnly: true,
flex: 0.5,
xtype: 'checkboxfield',
name: 'IS_DB'
}, {
fieldLabel: '是否目的港清洗',
inputValue: true,
xtype: 'checkboxfield',
flex: 0.5,
name: 'IS_POD_CLEAN'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '备注',
flex:3.5,
name: 'REMARKS'
}, {
fieldLabel: '是否空箱调拨',
inputValue: true,
xtype: 'checkboxfield',
flex: 0.5,
name: 'EMPTYCTNALLOCATION'
}]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
//#endregion
this.formEdit_BasicFee = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
autoScroll: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 120,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: 'GID',
name: 'GID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'COMPANYID',
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: 'ISCLOSE',
name: 'ISCLOSE', flex: 0, hidden: true, margins: '0'
}, {
fieldLabel: '箱号',
name: 'CTNNO',
flex: 1
}, {
fieldLabel: '目的港代理',
name: 'AGENTNAME',
flex: 1
}, {
fieldLabel: '提单号',
readOnly: true,
name: 'MBLNO',
flex: 1
}, {
fieldLabel: '委托编号',
readOnly: true,
name: 'CUSTNO',
flex: 1
}, {
fieldLabel: '当前位置',
readOnly: true,
name: 'CUR_PORT',
flex: 1
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '当前时间',
readOnly: true,
name: 'CUR_DATE',
flex: 1
}, {
fieldLabel: '起运港免箱使天数',
labelWidth: 120,
readOnly: true,
name: 'PORTLOAD_FREE_DAYS'
}, {
fieldLabel: '起运港超期天数',
readOnly: true,
labelWidth: 120,
name: 'PORTLOAD_OVER_DAYS'
}, {
fieldLabel: '起运港箱使费/天',
labelWidth: 120,
readOnly: true,
name: 'PORTLOAD_OVER_DAYS_FEE'
}, {
labelWidth: 120,
readOnly: true,
fieldLabel: '起运港箱使费',
name: 'PORTLOAD_OVER_DAYS_AMT'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '目的港免箱使天数',
labelWidth: 120,
readOnly: true,
name: 'DESTPORT_FREE_DAYS'
}, {
fieldLabel: '目的港超期天数',
name: 'DESTPORT_OVER_DAYS'
}, {
fieldLabel: '目的港箱使费/天',
readOnly: true,
name: 'DESTPORT_OVER_DAYS_FEE'
}, {
fieldLabel: '目的港箱使费',
readOnly: true,
name: 'DESTPORT_OVER_DAYS_AMT'
}, {
fieldLabel: '周期',
name: 'CYCLE_DAY'
}
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '起运港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'PORTLOAD_CNT_TIME'
}, {
fieldLabel: '开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'ETD'
}, {
fieldLabel: '到港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'ETA'
}, {
fieldLabel: '目的港提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'DEST_CNT_TIME'
}, {
fieldLabel: '目的港还箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'DEST_RTCNT_TIME'
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '是否返空',
inputValue: true,
xtype: 'checkboxfield',
readOnly: true,
name: 'IS_RETURE_EMPTY'
}, {
fieldLabel: '空返开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'I_ETD'
}, {
fieldLabel: '空返到港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'I_ETA'
}, {
fieldLabel: '空返提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'I_DEST_CNT_TIME'
}, {
fieldLabel: '空返还箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
readOnly: true,
name: 'I_DEST_RTCNT_TIME'
}]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
this.formEdit2 = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
autoScroll: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 100,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '起运港免箱使天数',
labelWidth: 130,
readOnly: false,
name: 'PORTLOAD_FREE_DAYS'
}, {
fieldLabel: '起运港超期天数',
name: 'PORTLOAD_OVER_DAYS'
}, {
fieldLabel: '起运港箱使费/天',
readOnly: false,
name: 'PORTLOAD_OVER_DAYS_FEE'
}, {
fieldLabel: '起运港箱使费',
name: 'PORTLOAD_OVER_DAYS_AMT'
}, { xtype: 'hiddenfield'}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '目的港免箱使天数',
labelWidth: 130,
readOnly: false,
name: 'DESTPORT_FREE_DAYS'
}, {
fieldLabel: '目的港超期天数',
name: 'DESTPORT_OVER_DAYS'
}, {
fieldLabel: '滞箱天数',
name: 'DETAIN_CTN_DAYS'
}, {
fieldLabel: '目的港箱使费/天',
readOnly: false,
name: 'DESTPORT_OVER_DAYS_FEE'
}, {
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: '目的港箱使费',
name: 'DESTPORT_OVER_DAYS_AMT'
}, {
xtype: 'button',
id: 'btnaddfee',
iconCls: "btnadd",
handler: function (button, event) {
this.AddOverFee();
},
scope: this
}]
}
]
},
{
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
readOnly: true,
fieldLabel: '运输条款',
name: 'SERVICE'
}, {
readOnly: true,
fieldLabel: '是否加热',
name: 'NEEDBEHEATED',
inputValue: 'True',
xtype: 'checkboxfield'
}, {
readOnly: true,
fieldLabel: '代理维护人',
name: 'AGENTINPUTBY'
}, { xtype: 'hiddenfield' }
, { xtype: 'hiddenfield' }
]
}]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
//#region 按钮Toolbar
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: "保存",
iconCls: "btnsave",
id: 'btnESave',
handler: function (button, event) {
this.Save('0');
},
scope: this
},
{
text: "保存并关闭",
id: 'btnESaveAndClose',
handler: function (button, event) {
this.Save('1');
},
scope: this
},
'-',
{
text: "保存并新建",
id: 'btnESaveAndNew',
handler: function (button, event) {
this.Save('2');
},
scope: this
},
'-',
{
text: "复制并新建",
id: 'btncopyandsave',
handler: function (button, event) {
var basicForm = this.formEdit.getForm();
this.opStatus = 'add';
basicForm.findField('GID').setDisabled(false);
var field = basicForm.findField('GID');
var BSNO = NewGuid();
field.setValue(BSNO);
basicForm.findField('GID').setDisabled(true);
var field = basicForm.findField('BSNO');
field.setValue('');
this.storeListRepair.removeAll();
this.storeListClearing.removeAll();
this.storeListDelivery.removeAll();
this.storeBodyCostList.removeAll();
this.storeBodyCostSum.removeAll();
},
scope: this
},
'-',
{
id: 'btnECopyBs',
text: "引入业务信息",
handler: function (button, event) {
this.ImportBs();
},
scope: this
}, '-',
{
text: "申请返空",
id: 'ShenReturn',
menu: [
{ text: "申请返空",
handler: function (menu, event) {
_this.ShenReturn('1');
}
}, { text: "撤销申请",
handler: function (menu, event) {
_this.ShenReturnBack('0');
}
}, {
text: "申请调拨",
handler: function (menu, event) {
_this.ShenReturn('3');
}
}, {
text: "撤销调拨申请",
handler: function (menu, event) {
_this.ShenReturnBack('2');
}
}],
scope: this
}, '-',
{
text: "生成箱使费",
id: 'CreateOverFee',
menu: [
{ text: "起运港箱使费",
handler: function (menu, event) {
_this.CreateOverFee('1');
}
}, { text: "目的港箱使费",
handler: function (menu, event) {
_this.CreateOverFee('2');
}
}, { text: "箱使代理费",
handler: function (menu, event) {
_this.CreateOverFee('3');
}
}],
scope: this
}
]
}); //end 按钮Toolbar
//#endregion
//#region 维修
this.storeListRepair = Ext.create('Ext.data.Store', {
model: 'MsOpCtnRepair',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnRepairList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeListRepairImg = Ext.create('Ext.data.Store', {
model: 'MsOpCtnRepairImg',
remoteSort: false,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnRepairListImg',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeITEMS = Ext.create('DsExt.ux.RefTableStore', {
fields: [{ name: 'FEENAME', type: 'string' }
],
proxy: { url: '/MvcContainer/MsOpPrice/GetWXFEELIST' }
});
this.storeITEMS.load({ params: { condition: ""} });
this.comboxITEMS = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeITEMS,
forceSelection: true,
name: 'ITEMNAME',
valueField: 'FEENAME',
displayField: 'FEENAME'
});
//客户加载_场站
this.storeYARD = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeYARD.load({ params: { condition: "ISYARD='1'"} });
//场站
this.comboxYARD = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeYARD,
forceSelection: true,
name: 'CURSTATOIN',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeFeeNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.FeeTypeRefModel',
proxy: { url: '/MvcShipping/MsChFee/GetFeeTypeRefList' }
});
this.storeFeeNameRef.load({ params: { condition: ""} });
this.comboxFeeNameRef = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeFeeNameRef,
forceSelection: true,
name: 'FEENAME',
valueField: 'Name',
displayField: 'CodeAndName'
});
this.StoreCurr = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsFeeCurr',
proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' }
});
this.StoreCurr.load({ params: { condition: ""} });
this.comboxCurr = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreCurr,
forceSelection: true,
name: 'CURRENCY',
valueField: 'CURR',
displayField: 'CURR'
});
//明细表表格
this.gridListRepairCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.RepairGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridListRepair = new Ext.grid.GridPanel({
store: this.storeListRepair,
enableHdMenu: false,
layout: "border",
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
plugins: [this.gridListRepairCellEditing],
selModel: this.RepairGridCheckBoxModel,
selType: 'cellmodel',
tbar: [{
text: '增加明细',
tooltip: '增加明细',
id: "btnaddRepair",
iconCls: "btnadddetail",
handler: function (button, event) {
this.addRepairDetail();
},
scope: this
}, '-', {
text: '保存明细',
tooltip: '保存明细',
id: "btnSaveRepair",
iconCls: "btnsave",
handler: function (button, event) {
this.onPostRepairDetailClick();
},
scope: this
}, '-', {
text: '删除明细',
tooltip: '删除明细',
id: "btndelRepair",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelRepairClick();
},
scope: this
}, '-', {
text: '提交审核',
tooltip: '提交审核',
id: "btnAuditRepair",
menu:
[
{ text: "提交审核",
handler: function (menu, event) {
_this.onAuditRepairClick('1');
}
},
{ text: "撤销提交",
handler: function (menu, event) {
_this.onAuditRepairClick('2');
}
},
{ text: "申请修改",
handler: function (menu, event) {
_this.onAuditRepairClick('6');
}
}],
scope: this
}, '-',
{
text: "打印",
iconCls: 'btnprint',
id: 'btnPrintRepair',
handler: function (button, event) {
this.PrintRepair();
},
scope: this
}],
columns: [{
sortable: true, hidden: true,
dataIndex: 'GID',
header: 'GID',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'LINKID',
header: 'LINKID',
width: 80
},
{
sortable: true,
dataIndex: 'AUDITSTATUS',
header: '状态',
width: 60
},
{
sortable: true,
dataIndex: 'REPAIRITEMS',
header: '维修改装项目',
editor: this.comboxITEMS,
width: 150
},
{
sortable: true,
dataIndex: 'REPAIRTIME',
header: '维修改装日期',
editor: {
xtype: 'datefield',
format: 'Y-m-d'
},
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 100
},
{
sortable: true,
dataIndex: 'CURSTATOIN',
header: '场站',
editor: this.comboxYARD,
width: 100
},
{
sortable: true,
dataIndex: 'FEENAME',
header: '费用名称',
editor: this.comboxFeeNameRef,
width: 100
},
{
sortable: true,
dataIndex: 'CURRENCY',
header: '币别',
editor: this.comboxCurr,
width: 50
},
{
sortable: true,
dataIndex: 'AMOUNT',
header: '金额',
editor: {
xtype: 'numberfield',
keyNavEnabled: false,
selectOnFocus: true,
hideTrigger: true,
mouseWheelEnabled: false,
enableKeyEvents: true
},
width: 60
},
{ sortable: true,
dataIndex: 'IMAGE1', hidden: true,
header: '改装前照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_LINDADDR + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
},
{ sortable: true,
dataIndex: 'IMAGE2', hidden: true,
header: '改装后照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_LINDADDR2 + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
}, {
sortable: true,
dataIndex: 'REMARKS',
header: '备注',
editor: {
xtype: 'textfield',
selectOnFocus: true,
enableKeyEvents: true,
listeners: {
keydown: function (textfield, e) {
if (e.getKey() == 40) {
_thisfee.onNextKeyClick(1, 17)
} else if (e.getKey() == 38) {
_thisfee.onUpKeyClick(1, 17)
}
}
}
},
width: 150
}]
});
this.gridListRepair.getSelectionModel().on('select', function (model, record, index) {
this.BILL = record.data;
this.GID = record.data.GID;
if (this.GID != "" || this.GID != "*") {
this.storeListRepairImg.load({ params: { start: "0", limit: "999", sort: "", condition: " LINKGID='" + this.GID + "'"} });
} else { this.storeListRepairImg.removeAll(); }
//
}, this);
this.gridListRepairImgCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.RepairImgGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridListRepairImg = new Ext.grid.GridPanel({
store: this.storeListRepairImg,
enableHdMenu: false,
layout: "border",
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
plugins: [this.gridListRepairImgCellEditing],
selModel: this.RepairImgGridCheckBoxModel,
selType: 'cellmodel',
tbar: [{
text: '增加明细',
tooltip: '增加明细',
id: "btnaddRepairImg",
iconCls: "btnadddetail",
handler: function (button, event) {
this.addRepairDetailImg();
},
scope: this
}, '-', {
text: '保存明细',
tooltip: '保存明细',
id: "btnSaveRepairImg",
iconCls: "btnsave",
handler: function (button, event) {
this.onPostRepairDetailImgClick();
},
scope: this
}, '-', {
text: '删除明细',
tooltip: '删除明细',
id: "btndelRepairImg",
iconCls: "btndeletedetailImg",
handler: function (button, event) {
this.onDelRepairImgClick();
},
scope: this
}, '-', {
text: '上传照片',
tooltip: '上传照片',
id: "btnupRepairImg",
menu:
[
{
text: '上传改装前照片',
tooltip: '上传改装前照片',
handler: function (button, event) {
this.onUpRepairImgClick(1);
},
scope: this
}, {
text: '上传改装后照片',
tooltip: '上传改装后照片',
handler: function (button, event) {
this.onUpRepairImgClick(2);
},
scope: this
}],
scope: this
}],
columns: [{
sortable: true, hidden: true,
dataIndex: 'GID',
header: 'GID',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'LINKID',
header: 'LINKID',
width: 80
},
{ sortable: true,
dataIndex: 'IMAGE1',
header: '改装前照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_LINDADDR1 + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
},
{ sortable: true,
dataIndex: 'IMAGE2',
header: '改装后照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_LINDADDR2 + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
}, {
sortable: true,
dataIndex: 'REMARKS',
header: '备注',
editor: {
xtype: 'textfield',
selectOnFocus: true,
enableKeyEvents: true,
listeners: {
keydown: function (textfield, e) {
if (e.getKey() == 40) {
_thisfee.onNextKeyClick(1, 17)
} else if (e.getKey() == 38) {
_thisfee.onUpKeyClick(1, 17)
}
}
}
},
width: 150
}]
});
this.panelRepairItemImg = new Ext.Panel({
title: '照片明细',
layout: "border",
region: 'east',
animate: true,
width: 550,
split: true,
// autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridListRepairImg
]
});
this.panelRepairItem = new Ext.Panel({
title: '改装明细',
layout: "border",
region: 'center',
animate: true,
// autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridListRepair
, this.panelRepairItemImg
]
});
this.panelRepair = new Ext.Panel({
title: '改装明细',
layout: "border",
region: 'center',
animate: true,
split: true,
// autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.panelRepairItem]
});
//#endregion
//#region 清洗
this.StoreCLEARINGMODE = Ext.create('Ext.data.Store', {
fields: ['BLTYPE']
});
this.StoreCLEARINGMODE.add({ "BLTYPE": "简单清洗" });
this.StoreCLEARINGMODE.add({ "BLTYPE": "彻底清洗" });
this.comboxCLEARINGMODE = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreCLEARINGMODE,
forceSelection: true,
name: 'CLEARINGMODE',
valueField: 'BLTYPE',
displayField: 'BLTYPE'
});
this.storeCustomerNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCustomerNameRef.load({ params: { condition: ""} });
this.comboxCustomerNameRef = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeCustomerNameRef,
forceSelection: true,
name: 'CHECKGOV',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeListClearing = Ext.create('Ext.data.Store', {
model: 'MsOpCtnClearing',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnClearingList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//明细表表格
this.gridListClearingCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.ClearingGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridListClearing = new Ext.grid.GridPanel({
store: this.storeListClearing,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
plugins: [this.gridListClearingCellEditing],
selModel: this.ClearingGridCheckBoxModel,
selType: 'cellmodel',
tbar: [{
text: '增加明细',
tooltip: '增加明细',
id: "btnaddClearing",
iconCls: "btnadddetail",
handler: function (button, event) {
this.addClearingDetail();
},
scope: this
}, '-', {
text: '保存明细',
tooltip: '保存明细',
id: "btnsaveClearing",
iconCls: "btnsave",
handler: function (button, event) {
this.onPostClearingDetailClick();
},
scope: this
}, '-', {
text: '删除明细',
tooltip: '删除明细',
id: "btndelClearing",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelClearingClick();
},
scope: this
}, '-', {
text: '提交审核',
tooltip: '提交审核',
id: "btnauditClearing",
menu:
[
{ text: "提交审核",
handler: function (menu, event) {
_this.onAuditClearingClick('1');
}
},
{ text: "撤销提交",
handler: function (menu, event) {
_this.onAuditClearingClick('2');
}
},
{ text: "申请修改",
handler: function (menu, event) {
_this.onAuditClearingClick('6');
}
}],
scope: this
}, '-', {
text: '上传照片',
tooltip: '上传照片',
id: "btnupimgClearing",
menu:
[
{
text: '上传进场照片',
tooltip: '上传进场照片',
handler: function (button, event) {
this.onUpImgClearingClick(3);
},
scope: this
}, {
text: '上传EIR照片',
tooltip: '上传EIR照片',
handler: function (button, event) {
this.onUpImgClearingClick(4);
},
scope: this
}, {
text: '上传清洗照片',
tooltip: '上传清洗照片',
handler: function (button, event) {
this.onUpImgClearingClick(5);
},
scope: this
}, {
text: '上传清洁证照片',
tooltip: '上传清洁证照片',
handler: function (button, event) {
this.onUpImgClearingClick(6);
},
scope: this
}],
scope: this
}, '-',
{
text: "打印",
iconCls: 'btnprint',
id: 'btnPrintClearing',
handler: function (button, event) {
this.PrintClearing();
},
scope: this
}],
columns: [{
sortable: true, hidden: true,
dataIndex: 'GID',
header: 'GID',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'LINKID',
header: 'LINKID',
width: 80
},
{
sortable: true,
dataIndex: 'AUDITSTATUS',
header: '状态',
width: 150
},
{
sortable: true,
dataIndex: 'CURSTATOIN',
header: '场站',
editor: this.comboxYARD,
width: 100
},
{
sortable: true,
dataIndex: 'INSTATOINTIME',
header: '进场时间',
editor: {
xtype: 'datefield',
format: 'Y-m-d'
},
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 120
},
{ sortable: true,
dataIndex: 'IMAGE1',
header: '进场照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_LINDADDR + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
},
{ sortable: true,
dataIndex: 'EIR',
header: 'EIR照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.EIRPATH + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
},
{
sortable: true,
dataIndex: 'CLEARINGMODE',
header: '清洗方式',
editor: this.comboxCLEARINGMODE,
width: 120
}, {
sortable: true,
dataIndex: 'PREGOODSNAME',
header: '清洗品名',
editor: {
xtype: 'textfield',
selectOnFocus: true,
enableKeyEvents: true
},
width: 150
}, {
sortable: true,
dataIndex: 'ISCLEAR_CERT',
header: '是否有清洁证',
hidden: true,
editor: {
xtype: 'checkboxfield',
inputValue: '1',
uncheckedValue: '0'
// selectOnFocus: true
},
renderer: function (value, cellmeta) {
if (value == 'true' || value == '1') {
return "√";
} else return "";
},
width: 60
},
{
sortable: true,
dataIndex: 'CHECKGOV',
header: '检测机构',
editor: this.comboxCustomerNameRef,
width: 120
}, {
sortable: true,
dataIndex: 'ISCLEAR_PLAN',
header: '发送清洗计划',
hidden: true,
editor: {
xtype: 'checkboxfield',
inputValue: '1',
uncheckedValue: '0'
// selectOnFocus: true
},
renderer: function (value, cellmeta) {
if (value == 'true' || value == '1') {
return "√";
} else return "";
},
width: 60
},
{
sortable: true,
dataIndex: 'CLEARTIME',
header: '清洗时间',
editor: {
xtype: 'datefield',
format: 'Y-m-d'
},
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 120
},
{ sortable: true,
dataIndex: 'IMAGE_CLEAR',
header: '清洗照片',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_CLEARPATH + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
},
{ sortable: true,
dataIndex: 'IMAGE_CHECKGOV',
header: '清洁证',
width: 140,
renderer: function (value, p, record) {
return '<a href="' + record.data.IMAGE_CHECKGOVPATH + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
}
}, {
sortable: true,
dataIndex: 'ISCOMPLETE',
header: '是否完成',
hidden: true,
editor: {
xtype: 'checkboxfield',
inputValue: '1',
uncheckedValue: '0'
// selectOnFocus: true
},
renderer: function (value, cellmeta) {
if (value == 'true' || value == '1') {
return "√";
} else return "";
},
width: 60
},
{
sortable: true,
dataIndex: 'FEENAME',
header: '费用名称',
editor: this.comboxFeeNameRef,
width: 150
},
{
sortable: true,
dataIndex: 'CURRENCY',
header: '币别',
editor: this.comboxCurr,
width: 150
},
{
sortable: true,
dataIndex: 'AMOUNT',
header: '金额',
editor: {
xtype: 'numberfield',
keyNavEnabled: false,
selectOnFocus: true,
hideTrigger: true,
mouseWheelEnabled: false,
enableKeyEvents: true
},
width: 150
}, {
sortable: true,
dataIndex: 'REMARKS',
header: '备注',
editor: {
xtype: 'textfield',
selectOnFocus: true,
enableKeyEvents: true,
listeners: {
keydown: function (textfield, e) {
if (e.getKey() == 40) {
_thisfee.onNextKeyClick(1, 17)
} else if (e.getKey() == 38) {
_thisfee.onUpKeyClick(1, 17)
}
}
}
},
width: 150
}]
});
this.panelClearing = new Ext.Panel({
title: '清洗信息',
layout: "border",
region: 'center',
animate: true,
// autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridListClearing]
});
//#endregion
//#region 提箱
//客户加载_车队
this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeTRUCKER.load({ params: { condition: "ISTRUCK='1'"} });
//车队
this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '车队',
store: this.storeTRUCKER,
name: 'TRUCKNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var s = " ISOPERATOR=1 and LINKID in (select gid from [info_client] where SHORTNAME='" + combo.value + "')";
this.storeTRUCKLINKNAME.load({ params: { condition: s },
callback: function (r, options, success) {
if (success) {
if (this.storeInfoClientContact.getCount() > 0) {
var member = this.storeTRUCKLINKNAME.getAt(0);
this.comboxTRUCKLINKNAME.setValue(member.data.SHOWNAME);
this.formDeliveryHead.getForm().findField('TRUCKLINKTEL').setValue(member.data.TEL);
} else {
this.comboxTRUCKLINKNAME.setValue('');
this.formDeliveryHead.getForm().findField('TRUCKLINKTEL').setValue('');
}
}
},
scope: this
});
}
}
}
});
//委托单位_联系人
this.storeTRUCKLINKNAME = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.InfoClientContactModel',
proxy: { url: '/CommMng/BasicDataRef/GetInfoClientContactList' }
});
this.comboxTRUCKLINKNAME = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '车队联系人',
store: this.storeTRUCKLINKNAME,
name: 'TRUCKLINKNAME',
valueField: 'SHOWNAME',
displayField: 'SHOWNAME',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
this.formHead.getForm().findField('HEAD_ATTNTEL').setValue(records[0].data.TEL);
}
}
}
});
//人员信息加载
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefList' }
});
this.storeOpCode.load();
//客服
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '操作员',
store: this.storeOpCode,
forceSelection: true,
name: 'OP',
valueField: 'UserName',
displayField: 'CodeAndName'
});
this.formDeliveryHead = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
// autoScroll: true,
trackResetOnLoad: true,
collapsed: false,
collapsible: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'anchor',
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: '预计提箱日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'PRE_CNT_TIME'
}, this.comboxOP, {
fieldLabel: '是否我司订舱',
inputValue: true,
flex: 0.5, xtype: 'checkboxfield',
name: 'IS_BOOKING'
}, {
fieldLabel: '清洗品名',
name: 'PREGOODSNAME'
}, {
fieldLabel: '订舱品名',
name: 'BOOKGOODNAME'
}, {
fieldLabel: '报关品名',
name: 'CUSTOMGOODNAME'
}]
}, {
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxTRUCKER, this.comboxTRUCKLINKNAME, {
fieldLabel: '联系电话',
name: 'TRUCKLINKTEL'
}, {
fieldLabel: '装货地址',
flex: 2.5, name: 'LOADADDR'
}]
}]//end items(fieldset 1)
}]
}); //end this.formEdit
this.storeListDelivery = Ext.create('Ext.data.Store', {
model: 'MsOpCtnDelivery',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnDeliveryList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeCHECKITEMS = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeCHECKITEMS.load({ params: { enumTypeId: 97037} });
this.comboxCHECKITEMS = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeCHECKITEMS,
name: 'CHECKITEMS',
valueField: 'EnumValueName',
displayField: 'EnumValueName'
});
//明细表表格
this.gridListDeliveryCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.DeliveryGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridListDelivery = new Ext.grid.GridPanel({
store: this.storeListDelivery,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
plugins: [this.gridListDeliveryCellEditing],
selModel: this.DeliveryGridCheckBoxModel,
selType: 'cellmodel',
tbar: [{
text: '增加明细',
tooltip: '增加明细',
id: "btnaddDelivery",
iconCls: "btnadddetail",
handler: function (button, event) {
this.addDeliveryDetail();
},
scope: this
}, '-', {
text: '保存明细',
tooltip: '保存明细',
id: "btnsaveDelivery",
iconCls: "btnsave",
handler: function (button, event) {
this.onPostDeliveryDetailClick();
},
scope: this
}, '-', {
text: '删除明细',
tooltip: '删除明细',
id: "btndelDelivery",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelDeliveryClick();
},
scope: this
}, '-',
{
text: "打印",
iconCls: 'btnprint',
id: 'btnPrintDelivery',
handler: function (button, event) {
this.PrintDelivery();
},
scope: this
}],
columns: [{
sortable: true, hidden: true,
dataIndex: 'GID',
header: 'GID',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'LINKID',
header: 'LINKID',
width: 80
},
{
sortable: true,
dataIndex: 'CHECKITEMS',
header: '检查项目',
editor: this.comboxCHECKITEMS,
width: 150
}, {
sortable: true,
dataIndex: 'REMARKS',
header: '备注',
editor: {
xtype: 'textfield',
selectOnFocus: true,
enableKeyEvents: true,
listeners: {
keydown: function (textfield, e) {
if (e.getKey() == 40) {
_thisfee.onNextKeyClick(1, 17)
} else if (e.getKey() == 38) {
_thisfee.onUpKeyClick(1, 17)
}
}
}
},
width: 150
}]
});
this.panelDelivery = new Ext.Panel({
title: '提箱信息',
layout: "border",
region: 'center',
animate: true,
// autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.formDeliveryHead, this.gridListDelivery]
});
//#endregion
//#region 报价信息
this.storeBodyCostList = Ext.create('Ext.data.Store', {
model: 'MsOpCtnApplyCostItems',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnApply/GetCtnApplyCostItemsList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//明细表表格
this.gridListCostBody = new Ext.grid.GridPanel({
store: this.storeBodyCostList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
selType: 'cellmodel',
columns: [{
sortable: true,
dataIndex: 'GID',
header: '编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'LINKGID',
header: '业务编号',
hidden: true,
width: 0
}, {
sortable: true,
dataIndex: 'FEENAME',
header: '费用名称',
width: 100
}, {
sortable: true,
dataIndex: 'UNIT',
header: '标准',
width: 60
}, {
sortable: true,
dataIndex: 'CURRENCY',
header: '币别',
width: 60
}, {
sortable: true,
dataIndex: 'UNITPRICE',
header: '单价',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 90
}, {
sortable: true,
dataIndex: 'QUANTITY',
header: '数量',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 50
}, {
sortable: true,
dataIndex: 'AMOUNT',
header: '金额',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 100
}, {
sortable: true,
dataIndex: 'REMARK',
header: '备注',
width: 250
}]
});
this.storeBodyCostSum = Ext.create('Ext.data.Store', {
model: 'MsOpCtnApplyCostItems',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnApply/GetCtnApplyCostSum',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.gridListCostSum = new Ext.grid.GridPanel({
store: this.storeBodyCostSum,
enableHdMenu: false,
region: 'south',
height: 190,
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
selType: 'cellmodel',
tbar: [{ xtype: 'label', text: '费用合计',
style: 'font-size:18px',
labelColor: '#000',
//style:'background-color: #4b9bf5',
x: '5%',
y: '5%'
}],
columns: [{
sortable: false,
dataIndex: 'CURRENCY',
header: '币别',
width: 100
}, {
sortable: false,
dataIndex: 'AMOUNT',
header: '金额',
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
align: 'right',
width: 110
}]
});
this.panelCostBody = new Ext.Panel({
title: '成本核算明细',
layout: "border",
region: 'east',
width: 480,
frame: true,
split: true,
collapsed: false,
collapsible: true,
trackResetOnLoad: true,
items: [this.gridListCostBody, this.gridListCostSum]
});
//#endregion
//#region 费用信息
this.panelFee = new Shipping.FeeEditGrid({
region: 'center',
layout: 'border'
});
this.panelFee.panelDrChFee.anchor = '100% 40%';
this.panelFee.panelCrChFee.anchor = '100% 60%';
this.panelFee.stroplb = 'OpCtnBsCard';
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKNAME" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "MDGDL-目的港代理", "CUSTTYPE": "目的港代理", "CUSTNAME": "AGENTNAME" });
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCGS-订舱公司", "CUSTTYPE": "订舱公司", "CUSTNAME": "AGENTNAME" });
this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement"} });
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherPayFeeManagement"} });
this.panelFee.storeFeeNameRef.load({ params: { condition: ""} });
this.panelDrCrFee = new Ext.Panel({
layout: "border",
region: 'center',
animate: true,
// autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.panelFee, this.panelCostBody]
});
//#endregion
//#region 布局
//控件布局
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
items: [this.formEdit, this.formEdit_I, this.formEdit_D,this.formEdit2] //this.panelBtn,
});
this.tabWTpanel = new Ext.TabPanel({
activeTab: 0,
autoWidth: true,
border: true,
frame: false,
region: 'center',
minHeight: 300,
enableTabScroll: true,
items:
[
this.panelDelivery,
this.panelRepair,
this.panelClearing
]
});
this.panelBasicFee = new Ext.Panel({
title: '费用信息',
layout: "border",
region: "center",
items: [this.formEdit_BasicFee, this.panelDrCrFee] //
});
this.panelBasic = new Ext.Panel({
layout: "border",
region: "center",
autoScroll: true,
title: "业务信息",
items: [this.panelTop, this.tabWTpanel] //this.panelBtn,
});
this.tabBasicpanel = new Ext.TabPanel({
activeTab: 0,
autoWidth: true,
border: true,
frame: false,
region: 'center',
enableTabScroll: true,
items:
[
this.panelBasic,
this.panelBasicFee
]
});
Ext.apply(this, {
items: [this.panelBtn, this.tabBasicpanel]//
});
//#endregion
//绑定查询窗体
this.storeListRepair.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.storeListRepairImg.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.storeListClearing.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.storeListDelivery.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.gridListCostBody.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.storeBodyCostList.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID=(SELECT TOP 1 GID FROM op_ctnapply WHERE BSNO='" + this.editRecord.get('APPLYNO') + "')";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.storeBodyCostSum.on('beforeload', function (store) {
if (this.editRecord != null)
var acondition = " LINKGID=(SELECT TOP 1 GID FROM op_ctnapply WHERE BSNO='" + this.editRecord.get('APPLYNO') + "')";
else
var acondition = " LINKGID='11111'";
Ext.apply(store.proxy.extraParams, { condition: acondition });
}, this);
this.storeListLock = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: [
{ name: 'GID', type: 'string' },
{ name: 'FIELDNAME', type: 'string' }
],
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnBsCard/GetLockField',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//初始化数据
if (this.bsno == undefined) {
this.InitData();
} else {
this.opStatus = 'edit'
var condition = " b.GID='" + this.bsno + "'";
var condition2 = " LINKGID='" + this.bsno + "'";
this.LoadData(this.opStatus, condition, condition2);
}
this.storeBsList = Ext.create('Ext.data.Store', {
model: 'MsOpCtnBsCard',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcContainer/MsOpCtnBsCard/GetBsList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.initgirdcolumsBs = [
{
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: '委托单位',
width: 200
}, {
sortable: true,
dataIndex: 'APPLYNO',
header: '放箱申请单号',
width: 100
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: '委托编号',
width: 100
}, {
sortable: true,
dataIndex: 'ETD',
header: '开船日期',
width: 100
}, {
sortable: true,
dataIndex: 'ETA',
header: '到港日期',
width: 100
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: '起运港',
width: 100
}, {
sortable: true,
dataIndex: 'DESTPORT',
header: '卸货港',
width: 100
}, {
sortable: true,
dataIndex: 'AGENTNAME',
header: '目的港代理',
width: 100
}];
this.girdcolumsBs = this.initgirdcolumsBs;
this.gridListBs = new Ext.grid.GridPanel({
store: this.storeBsList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
selType: 'cellmodel',
tbar: [{
text: '确定引入',
tooltip: '确定引入',
iconCls: "btnadddetail",
handler: function (button, event) {
this.addBsDetail();
},
scope: this
}, '', {
text: '引入空返信息',
tooltip: '引入空返信息',
iconCls: "btnadddetail",
handler: function (button, event) {
this.addImportBsDetail();
},
scope: this
}, '-', {
text: "保存列表样式",
id: "btntest",
menu: [
{ text: "保存",
handler: function (button, event) {
this.girdcolumsBs = DsTruck.SaveGridPanel(USERID, _this.formname + 'Bs', _this.gridListBs.columns, _this.girdcolumsBs, 1, true);
}
}, { text: "初始化",
handler: function (menu, event) {
_this.InitGrid(_this.initgirdcolumsBs);
_this.girdcolumsBs = DsTruck.SaveGridPanel(USERID, _this.formname + 'Bs', _this.gridListBs.columns, _this.initgirdcolumsBs, 1, true);
}
}],
scope: this
}],
columns: this.girdcolumsBs
});
this.girdcolumsBs = DsTruck.GetGridPanel(USERID, this.formname + 'Bs', this.girdcolumsBs, 1); //使用者id表名中间column数组跳过一开始的几列
this.girdcolumsBs.unshift(new Ext.grid.RowNumberer());
this.gridListBs.reconfigure(this.storeBsList, this.girdcolumsBs);
//绑定事件
}, //end initUIComponents
InitData: function () {
this.opStatus = 'add';
var condition = '';
var condition2 = '';
if (this.ParentWin) {
var ret = this.ParentWin.OprationSwap();
this.opStatus = ret[0];
this.StoreList = ret[1];
this.editRecord = ret[2];
}
if (this.opStatus == 'edit') {
condition = " b.GID='" + this.editRecord.get('GID') + "'";
condition2 = " LINKGID='" + this.editRecord.get('GID') + "'";
}
this.LoadData(this.opStatus, condition, condition2);
}, //end InitData
LoadData: function (opstatus, condition, condition2) {
this.serialNo = 0;
this.workSerialNo = 0;
this.bodyDel = [];
this.opStatus = opstatus;
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcContainer/MsOpCtnBsCard/GetData',
params: {
handle: opstatus,
condition: 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;
this.formEdit.getForm().reset();
this.formEdit.getForm().setValues(data);
this.formEdit2.getForm().reset();
this.formEdit2.getForm().setValues(data);
this.formEdit_I.getForm().reset();
this.formEdit_I.getForm().setValues(data);
this.formEdit_BasicFee.getForm().reset();
this.formEdit_BasicFee.getForm().setValues(data);
// this.formDeliveryHead.getForm.reset();
this.formDeliveryHead.getForm().setValues(data);
document.title = MODULENAME + "-" + data.CTNNO;
if (data.ISCLOSE == true)
this.setSaveBtnStatus(false);
if (this.opStatus == 'edit') {
var acondition = condition2;
this.storeListClearing.load({ params: { condition: acondition} });
this.storeListDelivery.load({ params: { condition: acondition} });
this.storeListRepair.load({ params: { condition: acondition} });
/*
var aconditionimg = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListRepairImg.load({ params: { condition: acondition} });
*/
this.storeBodyCostList.load({ params: { condition: " LINKGID=(SELECT TOP 1 GID FROM op_ctnapply WHERE BSNO='" + data.APPLYNO + "')"} });
this.storeBodyCostSum.load({ params: { condition: " LINKGID=(SELECT TOP 1 GID FROM op_ctnapply WHERE BSNO='" + data.APPLYNO + "')"} });
this.LoadFeeData(this.editRecord);
} else {
var acondition = " LINKGID='1111111'";
this.storeListClearing.load({ params: { condition: acondition} });
this.storeListDelivery.load({ params: { condition: acondition} });
this.storeListRepair.load({ params: { condition: acondition} });
this.storeListRepairImg.load({ params: { condition: acondition} });
this.storeBodyCostList.load({ params: { condition: " LINKGID=(SELECT TOP 1 GID FROM op_ctnapply WHERE BSNO='" + data.APPLYNO + "')"} });
this.storeBodyCostSum.load({ params: { condition: " LINKGID=(SELECT TOP 1 GID FROM op_ctnapply WHERE BSNO='" + data.APPLYNO + "')"} });
}
if (data.IS_DB == true) {
this.formEdit_D.setVisible(true);
this.formEdit_I.setVisible(true);
this.panelTop.height = 566;
} else {
this.formEdit_D.setVisible(false);
if (data.IS_RETURE_EMPTY == true) {
this.formEdit_I.setVisible(true);
this.panelTop.height = 448;
} else {
this.formEdit_I.setVisible(false);
this.panelTop.height = 330;
}
}
Ext.Ajax.request({
waitMsg: '正在添加数据...',
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
params: {
modulename: 'modOpCtnBsCardDelivery'
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
} else {
SetFormReadOnly(this.formEdit, true);
SetFormReadOnly(this.formEdit2, true);
SetFormReadOnly(this.formEdit_I, true);
SetFormReadOnly(this.formEdit_D, true);
}
} else {
}
},
scope: this
});
if (this.bsno == undefined) {
var sql = " BSNO='" + this.editRecord.get('GID') + "'";
} else {
var sql = " BSNO='" + this.bsno + "'";
}
this.storeListLock.load({ params: { condition: sql },
callback: function (r, options, success) {
if (success) {
isloadfee = true;
if (_this.storeListLock.getCount() > 0) {
for (var j = 0; j < _this.storeListLock.getCount(); j += 1) {
var member = _this.storeListLock.getAt(j);
var headfield = _this.formEdit.getForm().findField(member.data.FIELDNAME);
if (headfield != NaN && headfield != null)
headfield.setReadOnly(true);
var headfield = _this.formEdit_I.getForm().findField(member.data.FIELDNAME);
if (headfield != NaN && headfield != null)
headfield.setReadOnly(true);
var headfield = _this.formEdit_D.getForm().findField(member.data.FIELDNAME);
if (headfield != NaN && headfield != null)
headfield.setReadOnly(true);
}
}
}
}
});
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}, // end LoadDate
LoadFeeData: function (EditRecord) {
this.panelFee.EditRecord = EditRecord;
if (this.bsno == undefined) {
var bsno = EditRecord.get('GID');
} else {
var bsno = this.bsno;
}
this.panelFee.strBSNO = bsno;
this.panelFee.StoreDateCurr.load({ params: { optype: "OpCtnBsCard", bsno: bsno} });
this.panelFee.StoreUnit.load({ params: { bsno: bsno, bstype: "OpCtnBsCard"} });
this.panelFee.storeDrChFee.load({ params: { billno: bsno, type: 1, optype: "OpCtnBsCard"} });
this.panelFee.storeCrChFee.load({ params: { billno: bsno, type: 2, optype: "OpCtnBsCard"} });
this.panelFee.storeBodySum.load({ params: { bsno: bsno },
callback: function (r, options, success) {
if (success) {
_thisfee.setTotalHead();
}
}
});
this.panelFee.storeChFeeGain.load({ params: { bsno: bsno} });
}, // end LoadDate
Save: function (type) {
var basicForm = this.formEdit.getForm();
if (!basicForm.isValid()) {
return;
}
basicForm.findField('GID').setDisabled(false);
var data = basicForm.getValues();
basicForm.findField('GID').setDisabled(true);
if (this.opStatus == 'add') {
data.GID = NewGuid();
}
var data2 = this.formEdit2.getForm().getValues(false, false, false);
var data3 = this.formEdit_I.getForm().getValues(false, false, false);
var data4 = this.formDeliveryHead.getForm().getValues(false, false, false);
var dataD = this.formEdit_D.getForm().getValues(false, false, false);
Object.assign(data3, dataD);
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/Save',
scope: this,
params: {
opstatus: this.opStatus,
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
data3: Ext.JSON.encode(data3),
data4: Ext.JSON.encode(data4)
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
this.formEdit.getForm().setValues(returnData);
this.formEdit2.getForm().setValues(returnData);
this.formEdit_I.getForm().setValues(returnData);
this.formEdit_D.getForm().setValues(returnData);
this.formDeliveryHead.getForm().setValues(returnData);
this.formEdit_BasicFee.getForm().setValues(returnData);
if (this.opStatus == 'add') {
var arrNewRecords = this.StoreList.add(returnData);
this.editRecord = arrNewRecords[0];
}
else if (this.opStatus == 'edit') {
var editp = Ext.create('MsOpCtnBsCard', returnData);
this.editRecord.fields.each(function (field) {
if (field.persist) {
name = field.name;
if (name != 'id')
this.editRecord.set(name, editp.get(name));
}
}, this);
this.editRecord.commit();
}
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListClearing.load({ params: { condition: acondition} });
this.storeListDelivery.load({ params: { condition: acondition} });
this.storeListRepair.load({ params: { condition: acondition} });
this.storeListRepairImg.load({ params: { condition: acondition} });
this.LoadFeeData(this.editRecord);
if (type == '0') {
this.opStatus = 'edit';
basicForm.findField('GID').setDisabled(true);
} else if (type == '1') {
window.close();
} else {
this.LoadData('add', '');
basicForm.findField('GID').setDisabled(false);
}
} 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
});
}
}
});
}, //end save
ShenReturn: function (type) {
var basicForm = this.formEdit.getForm();
if (!basicForm.isValid()) {
return;
}
var shentitle = '确认申请返空';
var shenmsg = '返空信息:';
if (type == '3') {
shentitle = '确认申请调拨';
shenmsg = '调拨信息:';
}
basicForm.findField('GID').setDisabled(false);
var data = basicForm.getValues();
basicForm.findField('GID').setDisabled(true);
if (this.opStatus == 'add') {
data.GID = NewGuid();
}
var data2 = this.formEdit2.getForm().getValues(false, false, false);
var data3 = this.formEdit_I.getForm().getValues(false, false, false);
var data4 = this.formDeliveryHead.getForm().getValues(false, false, false);
var dataD = this.formEdit_D.getForm().getValues(false, false, false);
Object.assign(data3, dataD);
Ext.MessageBox.show({
title: shentitle,
msg: shenmsg,
width: 300,
buttons: Ext.MessageBox.OKCANCEL,
multiline: true,
fn: function (btn, text) {
if (btn == "ok") {
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/ShenReturn',
scope: this,
params: {
opstatus: this.opStatus,
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
data3: Ext.JSON.encode(data3),
data4: Ext.JSON.encode(data4),
type: type,
reason: text
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
_this.formEdit.getForm().setValues(returnData);
_this.formEdit2.getForm().setValues(returnData);
_this.formEdit_I.getForm().setValues(returnData);
_this.formEdit_D.getForm().setValues(returnData);
_this.formDeliveryHead.getForm().setValues(returnData);
_this.formEdit_BasicFee.getForm().setValues(returnData);
if (_this.opStatus == 'add') {
var arrNewRecords = _this.StoreList.add(returnData);
_this.editRecord = arrNewRecords[0];
}
else if (_this.opStatus == 'edit') {
var editp = Ext.create('MsOpCtnBsCard', returnData);
_this.editRecord.fields.each(function (field) {
if (field.persist) {
name = field.name;
if (name != 'id')
_this.editRecord.set(name, editp.get(name));
}
}, this);
_this.editRecord.commit();
}
_this.opStatus = 'edit';
basicForm.findField('GID').setDisabled(true);
} 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
});
}
}
});
}
}
});
}, //end save
ShenReturnBack: function (type) {
var basicForm = this.formEdit.getForm();
if (!basicForm.isValid()) {
return;
}
basicForm.findField('GID').setDisabled(false);
var data = basicForm.getValues();
basicForm.findField('GID').setDisabled(true);
if (this.opStatus == 'add') {
data.GID = NewGuid();
}
var data2 = this.formEdit2.getForm().getValues(false, false, false);
var data3 = this.formEdit_I.getForm().getValues(false, false, false);
var data4 = this.formDeliveryHead.getForm().getValues(false, false, false);
var dataD = this.formEdit_D.getForm().getValues(false, false, false);
Object.assign(data3, dataD);
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/ShenReturn',
scope: this,
params: {
opstatus: this.opStatus,
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
data3: Ext.JSON.encode(data3),
data4: Ext.JSON.encode(data4),
type: type
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
this.formEdit.getForm().setValues(returnData);
this.formEdit2.getForm().setValues(returnData);
this.formEdit_I.getForm().setValues(returnData);
this.formEdit_D.getForm().setValues(returnData);
this.formDeliveryHead.getForm().setValues(returnData);
this.formEdit_BasicFee.getForm().setValues(returnData);
if (this.opStatus == 'add') {
var arrNewRecords = this.StoreList.add(returnData);
this.editRecord = arrNewRecords[0];
}
else if (this.opStatus == 'edit') {
var editp = Ext.create('MsOpCtnBsCard', returnData);
this.editRecord.fields.each(function (field) {
if (field.persist) {
name = field.name;
if (name != 'id')
this.editRecord.set(name, editp.get(name));
}
}, this);
this.editRecord.commit();
}
this.opStatus = 'edit';
basicForm.findField('GID').setDisabled(true);
} 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
});
}
}
});
}, //end save
CreateOverFee: function (type) {
var basicForm = this.formEdit.getForm();
if (!basicForm.isValid()) {
return;
}
basicForm.findField('GID').setDisabled(false);
var data = basicForm.getValues();
basicForm.findField('GID').setDisabled(true);
if (this.opStatus == 'add') {
data.GID = NewGuid();
}
var data2 = this.formEdit2.getForm().getValues(false, false, false);
var data3 = this.formEdit_I.getForm().getValues(false, false, false);
var data4 = this.formDeliveryHead.getForm().getValues(false, false, false);
var dataD = this.formEdit_D.getForm().getValues(false, false, false);
Object.assign(data3, dataD);
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/Save',
scope: this,
params: {
opstatus: this.opStatus,
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
data3: Ext.JSON.encode(data3),
data4: Ext.JSON.encode(data4),
iscreatefee: true,
feetype: type
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
this.formEdit.getForm().setValues(returnData);
this.formEdit2.getForm().setValues(returnData);
this.formEdit_I.getForm().setValues(returnData);
this.formEdit_D.getForm().setValues(returnData);
this.formDeliveryHead.getForm().setValues(returnData);
this.formEdit_BasicFee.getForm().setValues(returnData);
if (this.opStatus == 'add') {
var arrNewRecords = this.StoreList.add(returnData);
this.editRecord = arrNewRecords[0];
}
else if (this.opStatus == 'edit') {
var editp = Ext.create('MsOpCtnBsCard', returnData);
this.editRecord.fields.each(function (field) {
if (field.persist) {
name = field.name;
if (name != 'id')
this.editRecord.set(name, editp.get(name));
}
}, this);
this.editRecord.commit();
}
this.LoadFeeData(this.editRecord);
this.opStatus = 'edit';
basicForm.findField('GID').setDisabled(true);
} 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
});
}
}
});
}, //end save
//#region 清洗信息
addClearingDetail: function () {
if (this.opStatus == "add") {
Ext.Msg.show({ title: '提示', msg: '业务卡信息未保存,无法添加清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var MSDSID = this.formEdit.getForm().findField('GID').getValue();
var GOODSNAME = this.formEdit.getForm().findField('GOODSNAME').getValue();
var PREGOODSNAME = this.formDeliveryHead.getForm().findField('PREGOODSNAME').getValue();
//var newSerialno = DsGetNewSerialNo(this.storeBodyList, this.serialNo);
var record = Ext.create('MsOpCtnClearing', {
GID: '*',
LINKGID: MSDSID,
CURSTATOIN: '',
INSTATOINTIME: '',
AUDITSTATUS: '录入状态',
CLEARINGMODE: '',
PREGOODSNAME: GOODSNAME,
CHECKGOV: '',
CLEARTIME: '',
FEENAME: '',
CURRENCY: '',
AMOUNT: 0,
REMARKS: ''
});
this.storeListClearing.add(record);
var n = this.storeListClearing.getCount();
this.gridListClearingCellEditing.startEditByPosition({ row: n - 1, column: 1 });
},
onPostClearingDetailClick: function (button, event) {
var bodyDrChFeeDatas = [];
var i;
var MSDSID = this.formEdit.getForm().findField('GID').getValue();
for (i = 0; i < this.storeListClearing.getCount(); i += 1) {
var memberyf = this.storeListClearing.getAt(i);
memberyf.data.INSTATOINTIME = Ext.util.Format.date(memberyf.data.INSTATOINTIME, 'Y-m-d').toString();
memberyf.data.CLEARTIME = Ext.util.Format.date(memberyf.data.CLEARTIME, 'Y-m-d').toString();
bodyDrChFeeDatas.push(memberyf);
};
var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas);
_thisfee = this;
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/SaveOpCtnClearing',
scope: this,
params: {
body: jsonChFeeBody,
PID: MSDSID
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + MSDSID + "'";
this.storeListClearing.load({ params: { condition: acondition} });
} 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
});
}
}
});
}, //end save
onDelClearingClick: function () {
var selections = this.gridListClearing.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要删除的清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
if (rec.data.AUDITSTATUS != '录入状态' && rec.data.AUDITSTATUS != '驳回提交') {
Ext.Msg.show({ title: '提示', msg: '当前状态不允许删除!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
var bodyAddDatas = [];
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
if (rec.data.AUDITSTATUS == '录入状态' || rec.data.AUDITSTATUS == '驳回提交')
bodyAddDatas.push(rec);
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/MvcContainer/MsOpCtnBsCard/DeleteOpCtnClearing',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListClearing.load({ params: { condition: acondition} });
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
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 });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
onAuditClearingClick: function (type) {
var selections = this.gridListClearing.getSelectionModel().getSelection();
var statusstr = '提交';
if (type == '2' || type == '6')
statusstr = '撤销';
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要' + statusstr + '的清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定' + statusstr + '该记录吗?', function (btn) {
if (btn == 'yes') {
var bodyAddDatas = [];
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
if (type == '1' && rec.data.AUDITSTATUS == '录入状态')
bodyAddDatas.push(rec);
if (type == '2' && rec.data.AUDITSTATUS == '提交审核')
bodyAddDatas.push(rec);
if (type == '6' && rec.data.AUDITSTATUS == '审核通过')
bodyAddDatas.push(rec);
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait('正在' + statusstr + '数据...');
Ext.Ajax.request({
waitMsg: '正在' + statusstr + '数据...',
url: '/MvcContainer/MsOpCtnBsCard/AuditOpCtnClearing',
params: {
data: jsonbodyAddDatas,
type: type
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListClearing.load({ params: { condition: acondition} });
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
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 });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
onUpImgClearingClick: function (type) {
var selections = this.gridListClearing.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要上传图片的清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var GID = record.data.GID;
if (GID == '*') {
Ext.Msg.show({ title: '提示', msg: '维修记录没保存,请先保存清洗记录!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var BSNO = this.formEdit.getForm().findField('BSNO').getValue();
if (BSNO == '') {
Ext.Msg.show({ title: '提示', msg: '业务卡编号不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
PGID = this.formEdit.getForm().findField('GID').getValue();
me = this;
var imgform = new Ext.FormPanel({
region: 'center',
labelWidth: 40,
frame: true,
bodyStyle: 'padding:5px 5px 0',
autoScroll: true,
border: false,
fileUpload: true,
items: [{
xtype: 'fileuploadfield',
id: 'LoadFile',
name: 'LoadFile',
emptyText: '请选择文件',
fieldLabel: '文件',
buttonText: '选择文件',
allowBlank: false,
buttonCfg:
{
iconCls: 'uploaddialog'
},
anchor: '98%'
}],
buttons: [{
text: '上传',
type: 'submit',
handler: function () {
var UserFilePath = Ext.getCmp('LoadFile').getValue();
if (!imgform.form.isValid()) { return; }
imgform.form.submit({
url: '/MvcContainer/MsOpCtnBsCard/UploadFile',
waitMsg: '正在上传',
method: 'POST',
submitEmptyText: false,
async: false,
params: {
GID: GID,
BSNO: BSNO,
type: type
},
success: function (form, action) {
win.close(this);
Ext.Msg.show({ title: '提示', msg: '上传成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
var acondition = " LINKGID='" + PGID + "'";
me.storeListClearing.load({ params: { condition: acondition} });
},
failure: function (form, action) {
form.reset();
if (action.failureType == Ext.form.Action.SERVER_INVALID)
Ext.MessageBox.alert('警告', action.result.errors.msg);
}
});
}
}, {
text: '关闭',
type: 'submit',
handler: function () {
win.close(this);
}
}]
});
var win = new Ext.Window({
title: "上传文件",
width: 360,
height: 120,
modal: true,
resizable: false,
border: false,
items: imgform
});
win.show();
},
PrintClearing: function () {
var basicForm = this.formEdit.getForm();
var billNo = basicForm.findField('GID').value;
if (billNo == '*' || billNo == '') {
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
return;
}
var sortstr = '';
if (this.sortfield != '' && this.sortdire != '') {
sortstr = this.sortfield + ' ' + this.sortdire;
}
var printType = 'MSOPCTNBSCARDCLEARING';
var sql1 = "SELECT * FROM op_ctnbscard WHERE GID='" + billNo + "'";
var sql2 = "SELECT * FROM op_ctnclearing WHERE AUDITSTATUS='审核通过' and LINKGID='" + billNo + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
},
//#endregion
//#region 维修改装信息
addRepairDetail: function () {
if (this.opStatus == "add") {
Ext.Msg.show({ title: '提示', msg: '业务卡信息未保存,无法添加清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var MSDSID = this.formEdit.getForm().findField('GID').getValue();
//var newSerialno = DsGetNewSerialNo(this.storeBodyList, this.serialNo);
var record = Ext.create('MsOpCtnRepair', {
GID: '*',
LINKGID: MSDSID,
AUDITSTATUS: '录入状态',
REPAIRITEMS: '',
REPAIRTIME: '',
CURSTATOIN: '',
FEENAME: '',
CURRENCY: '',
AMOUNT: 0,
REMARKS: ''
});
this.storeListRepair.add(record);
var n = this.storeListRepair.getCount();
this.gridListRepairCellEditing.startEditByPosition({ row: n - 1, column: 1 });
},
addRepairDetailImg: function () {
if (this.GID == "" || this.GID == "*") {
Ext.Msg.show({ title: '提示', msg: '改装明细未保存或不存在,无法添加改装照片!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = Ext.create('MsOpCtnRepairImg', {
GID: '*',
LINKGID: this.GID,
IMAGEDESC: '',
REMARKS: ''
});
this.storeListRepairImg.add(record);
var n = this.storeListRepairImg.getCount();
this.gridListRepairCellEditing.startEditByPosition({ row: n - 1, column: 1 });
},
onPostRepairDetailClick: function (button, event) {
var bodyDrChFeeDatas = [];
var i;
var MSDSID = this.formEdit.getForm().findField('GID').getValue();
for (i = 0; i < this.storeListRepair.getCount(); i += 1) {
var memberyf = this.storeListRepair.getAt(i);
memberyf.data.REPAIRTIME = Ext.util.Format.date(memberyf.data.REPAIRTIME, 'Y-m-d').toString();
bodyDrChFeeDatas.push(memberyf);
};
var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas);
_thisfee = this;
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/SaveOpCtnRepair',
scope: this,
params: {
body: jsonChFeeBody,
PID: MSDSID
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + MSDSID + "'";
this.storeListRepair.load({ params: { condition: acondition} });
} 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
});
}
}
});
}, //end save
onPostRepairDetailImgClick: function (button, event) {
var bodyDrChFeeDatas = [];
var i;
for (i = 0; i < this.storeListRepairImg.getCount(); i += 1) {
var memberyf = this.storeListRepairImg.getAt(i);
bodyDrChFeeDatas.push(memberyf);
};
var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas);
_thisfee = this;
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/SaveOpCtnRepairImg',
scope: this,
params: {
body: jsonChFeeBody,
PID: this.GID
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.GID + "'";
this.storeListRepairImg.load({ params: { condition: acondition} });
} 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
});
}
}
});
}, //end save
onDelRepairClick: function () {
var selections = this.gridListRepair.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要删除的维修改装信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
if (rec.data.AUDITSTATUS != '录入状态' && rec.data.AUDITSTATUS != '驳回提交') {
Ext.Msg.show({ title: '提示', msg: '当前状态不允许删除!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
}
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
var bodyAddDatas = [];
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
if (rec.data.AUDITSTATUS == '录入状态' || rec.data.AUDITSTATUS == '驳回提交')
bodyAddDatas.push(rec);
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/MvcContainer/MsOpCtnBsCard/DeleteOpCtnRepair',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListRepair.load({ params: { condition: acondition} });
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
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 });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
onDelRepairImgClick: function () {
var selections = this.gridListRepairImg.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要删除的照片信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
var bodyAddDatas = [];
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
bodyAddDatas.push(rec);
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/MvcContainer/MsOpCtnBsCard/DeleteOpCtnRepairImg',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.GID + "'";
this.storeListRepairImg.load({ params: { condition: acondition} });
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
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 });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
onAuditRepairClick: function (type) {
var selections = this.gridListRepair.getSelectionModel().getSelection();
var statusstr = '提交';
if (type == '2' || type == '6')
statusstr = '撤销';
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要' + statusstr + '的清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定' + statusstr + '该记录吗?', function (btn) {
if (btn == 'yes') {
var bodyAddDatas = [];
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
if (type == '1' && rec.data.AUDITSTATUS == '录入状态')
bodyAddDatas.push(rec);
if (type == '2' && rec.data.AUDITSTATUS == '提交审核')
bodyAddDatas.push(rec);
if (type == '6' && rec.data.AUDITSTATUS == '审核通过')
bodyAddDatas.push(rec);
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait('正在' + statusstr + '数据...');
Ext.Ajax.request({
waitMsg: '正在' + statusstr + '数据...',
url: '/MvcContainer/MsOpCtnBsCard/AuditOpCtnRepair',
params: {
data: jsonbodyAddDatas,
type: type
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListRepair.load({ params: { condition: acondition} });
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
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 });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
onUpRepairImgClick: function (type) {
var selections = this.gridListRepairImg.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择上传记录信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var GID = record.data.GID;
var LINKGID = record.data.LINKGID;
if (GID == '*') {
Ext.Msg.show({ title: '提示', msg: '没有保存,请先保存!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var BSNO = this.formEdit.getForm().findField('BSNO').getValue();
if (BSNO == '') {
Ext.Msg.show({ title: '提示', msg: '业务卡编号不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
PGID = this.formEdit.getForm().findField('GID').getValue();
me = this;
var imgform = new Ext.FormPanel({
region: 'center',
labelWidth: 40,
frame: true,
bodyStyle: 'padding:5px 5px 0',
autoScroll: true,
border: false,
fileUpload: true,
items: [{
xtype: 'fileuploadfield',
id: 'LoadFile',
name: 'LoadFile',
emptyText: '请选择文件',
fieldLabel: '文件',
buttonText: '选择文件',
allowBlank: false,
buttonCfg:
{
iconCls: 'uploaddialog'
},
anchor: '98%'
}],
buttons: [{
text: '上传',
type: 'submit',
handler: function () {
var UserFilePath = Ext.getCmp('LoadFile').getValue();
if (!imgform.form.isValid()) { return; }
imgform.form.submit({
url: '/MvcContainer/MsOpCtnBsCard/UploadFile',
waitMsg: '正在上传',
method: 'POST',
submitEmptyText: false,
async: false,
params: {
GID: GID,
BSNO: BSNO,
type: type
},
success: function (form, action) {
win.close(this);
Ext.Msg.show({ title: '提示', msg: '上传成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
var acondition = " LINKGID='" + LINKGID + "'";
me.storeListRepairImg.load({ params: { condition: acondition} });
},
failure: function (form, action) {
form.reset();
if (action.failureType == Ext.form.Action.SERVER_INVALID)
Ext.MessageBox.alert('警告', action.result.errors.msg);
}
});
}
}, {
text: '关闭',
type: 'submit',
handler: function () {
win.close(this);
}
}]
});
var win = new Ext.Window({
title: "上传文件",
width: 360,
height: 120,
modal: true,
resizable: false,
border: false,
items: imgform
});
win.show();
},
PrintRepair: function () {
var basicForm = this.formEdit.getForm();
var billNo = basicForm.findField('GID').value;
if (billNo == '*' || billNo == '') {
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
return;
}
var sortstr = '';
if (this.sortfield != '' && this.sortdire != '') {
sortstr = this.sortfield + ' ' + this.sortdire;
}
var printType = 'MSOPCTNBSCARDREPAIR';
var sql1 = "SELECT * FROM op_ctnbscard WHERE GID='" + billNo + "'";
var sql2 = "SELECT * FROM op_ctnrepair WHERE AUDITSTATUS='审核通过' and LINKGID='" + billNo + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
},
//#endregion
//#region 提箱信息
addDeliveryDetail: function () {
if (this.opStatus == "add") {
Ext.Msg.show({ title: '提示', msg: '业务卡信息未保存,无法添加清洗信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var MSDSID = this.formEdit.getForm().findField('GID').getValue();
//var newSerialno = DsGetNewSerialNo(this.storeBodyList, this.serialNo);
var record = Ext.create('MsOpCtnRepair', {
GID: '*',
LINKGID: MSDSID,
REPAIRITEMS: '',
REPAIRTIME: '',
CURSTATOIN: '',
FEENAME: '',
CURRENCY: '',
AMOUNT: 0,
REMARKS: ''
});
this.storeListDelivery.add(record);
var n = this.storeListDelivery.getCount();
this.gridListDeliveryCellEditing.startEditByPosition({ row: n - 1, column: 1 });
},
onPostDeliveryDetailClick: function (button, event) {
var bodyDrChFeeDatas = [];
var i;
var MSDSID = this.formEdit.getForm().findField('GID').getValue();
for (i = 0; i < this.storeListDelivery.getCount(); i += 1) {
var memberyf = this.storeListDelivery.getAt(i);
bodyDrChFeeDatas.push(memberyf);
};
var jsonChFeeBody = ConvertRecordsToJsonAll(bodyDrChFeeDatas);
_thisfee = this;
Ext.Msg.wait('正在保存数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/MvcContainer/MsOpCtnBsCard/SaveOpCtnDelivery',
scope: this,
params: {
body: jsonChFeeBody,
PID: MSDSID
},
callback: function (options, success, response) {
if (success) {
Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + MSDSID + "'";
this.storeListDelivery.load({ params: { condition: acondition} });
} 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
});
}
}
});
}, //end save
onDelDeliveryClick: function () {
var selections = this.gridListDelivery.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要删除的互斥信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
var bodyAddDatas = [];
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
bodyAddDatas.push(rec);
}
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/MvcContainer/MsOpCtnBsCard/DeleteOpCtnDelivery',
params: {
data: jsonbodyAddDatas
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var acondition = " LINKGID='" + this.editRecord.get('GID') + "'";
this.storeListDelivery.load({ params: { condition: acondition} });
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
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 });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
PrintDelivery: function () {
var basicForm = this.formEdit.getForm();
var billNo = basicForm.findField('GID').value;
if (billNo == '*' || billNo == '') {
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
return;
}
var sortstr = '';
if (this.sortfield != '' && this.sortdire != '') {
sortstr = this.sortfield + ' ' + this.sortdire;
}
var printType = 'MSOPCTNBSCARDDELIVERY';
var sql1 = "SELECT * FROM op_ctnbscard WHERE GID='" + billNo + "'";
var sql2 = "SELECT * FROM op_ctndelivery WHERE LINKGID='" + billNo + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
},
//#endregion
ImportBs: function () {
// var BSNO = this.formEdit.getForm().findField('BSNO').getValue();
var BSNO = this.formEdit.getForm().findField('APPLYNO').getValue();
this.storeBsList.load({ params: { bsno: BSNO} });
var panelBs = new Ext.Panel({
title: '业务明细',
layout: "border",
region: 'center',
frame: true,
split: true,
collapsed: false,
collapsible: true,
trackResetOnLoad: true,
items: [this.gridListBs]
});
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [panelBs],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
},
addBsDetail: function () {
var selections = this.gridListBs.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要提取的业务信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
this.setHeadFieldValue('CUSTNO', record.data.CUSTNO); //委托编号
// this.setHeadFieldValue('CUSTOMERNAME', record.data.CUSTOMERNAME); //委托单位
this.setHeadFieldValue('MBLNO', record.data.MBLNO); //主提单号
this.setHeadFieldValue('ETD', record.data.ETD); //开船日期
this.setHeadFieldValue('PREETA', record.data.ETA); //开船日期
// this.setHeadFieldValue('AGENTNAME', record.data.AGENTNAME); //代理
winCustomDataShow.close();
},
addImportBsDetail: function () {
var IS_RETURE_EMPTY = this.formEdit.getForm().findField('IS_RETURE_EMPTY').getValue();
if (IS_RETURE_EMPTY == false || IS_RETURE_EMPTY == '') {
Ext.Msg.show({ title: '提示', msg: '只用返空业务才能引入返空信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var selections = this.gridListBs.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要提取的业务信息!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
this.setIHeadFieldValue('I_CUSTNO', record.data.CUSTNO); //委托编号
this.setIHeadFieldValue('I_CUSTNAME', record.data.CUSTOMERNAME); //委托单位
this.setIHeadFieldValue('I_MBLNO', record.data.MBLNO); //主提单号
this.setIHeadFieldValue('I_ETD', record.data.ETD); //开船日期
this.setIHeadFieldValue('I_PORTLOAD', record.data.PORTLOAD); //开船日期
this.setIHeadFieldValue('I_DESTPORT', record.data.DESTPORT); //开船日期
this.setIHeadFieldValue('PREI_ETA', record.data.ETA); //开船日期
// this.setHeadFieldValue('AGENTNAME', record.data.AGENTNAME); //代理
winCustomDataShow.close();
},
setHeadFieldValue: function (fieldName, value) {
var field = this.formEdit.getForm().findField(fieldName);
field.setValue(value);
},
setIHeadFieldValue: function (fieldName, value) {
var field = this.formEdit_I.getForm().findField(fieldName);
field.setValue(value);
},
setSaveBtnStatus: function (enable) {
var btnESave = Ext.getCmp('btnESave');
var btnESaveAndClose = Ext.getCmp('btnESaveAndClose');
var btnESaveAndNew = Ext.getCmp('btnESaveAndNew');
var btnECopyBs = Ext.getCmp('btnECopyBs');
var btnCreateOverFee = Ext.getCmp('CreateOverFee');
var btnShenReturn = Ext.getCmp('ShenReturn');
if (enable) {
btnESave.enable();
btnESaveAndClose.enable();
btnCreateOverFee.enable();
btnShenReturn.enable();
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
params: {
modulename: "CTNBSCARDNEW"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
btnESaveAndNew.disable();
btnECopyBs.disable();
} else {
btnESaveAndNew.enable();
btnECopyBs.enable();
}
} else {
}
},
scope: this
});
} else {
btnESave.disable();
btnESaveAndClose.disable();
btnESaveAndNew.disable();
btnECopyBs.disable();
btnCreateOverFee.disable();
btnShenReturn.disable();
SetFormReadOnly(this.formEdit, true);
SetFormReadOnly(this.formEdit2, true);
SetFormReadOnly(this.formEdit_I, true);
SetFormReadOnly(this.formEdit_D, true);
// var btnaddRepair = Ext.getCmp('btnaddRepair');
// var btnSaveRepair = Ext.getCmp('btnSaveRepair');
// var btndelRepair = Ext.getCmp('btndelRepair');
// var btnPrintRepair = Ext.getCmp('btnPrintRepair');
// var btnAuditRepair = Ext.getCmp('btnAuditRepair');
// var btnaddClearing = Ext.getCmp('btnaddClearing');
// var btnsaveClearing = Ext.getCmp('btnsaveClearing');
// var btndelClearing = Ext.getCmp('btndelClearing');
// var btnauditClearing = Ext.getCmp('btnauditClearing');
// var btnPrintClearing = Ext.getCmp('btnPrintClearing');
// var btnupimgClearing = Ext.getCmp('btnupimgClearing');
// var btnaddDelivery = Ext.getCmp('btnaddDelivery');
// var btnsaveDelivery = Ext.getCmp('btnsaveDelivery');
// var btndelDelivery = Ext.getCmp('btndelDelivery');
// var btnPrintDelivery = Ext.getCmp('btnPrintDelivery');
// var btnaddRepairImg = Ext.getCmp('btnaddRepairImg');
// var btnSaveRepairImg = Ext.getCmp('btnSaveRepairImg');
// var btndelRepairImg = Ext.getCmp('btndelRepairImg');
// var btnupRepairImg = Ext.getCmp('btnupRepairImg');
// btnaddRepair.disable();
// btnSaveRepair.disable();
// btndelRepair.disable();
// btnPrintRepair.disable();
// btnAuditRepair.disable();
// btnaddClearing.disable();
// btnsaveClearing.disable();
// btndelClearing.disable();
// btnauditClearing.disable();
// btnPrintClearing.disable();
// btnupimgClearing.disable();
// btnaddDelivery.disable();
// btnsaveDelivery.disable();
// btndelDelivery.disable();
// btnPrintDelivery.disable();
// btnaddRepairImg.disable();
// btnSaveRepairImg.disable();
// btndelRepairImg.disable();
// btnupRepairImg.disable();
// this.panelFee.setBtnStatusDr(false);
// this.panelFee.setBtnStatusCr(false);
}
},
getIsModify: function () {
var drmodify = this.storeListClearing.getModifiedRecords();
if (drmodify.length != 0)
return '清洗信息';
var drmodify = this.storeListDelivery.getModifiedRecords();
if (drmodify.length != 0)
return '检查信息';
var drmodify = this.storeListRepair.getModifiedRecords();
if (drmodify.length != 0)
return '维修改装信息';
if (panelEdit.formEdit.getForm().isDirty() == true) {
return '业务卡信息';
}
else return '';
} //
});