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/MvcShipping/Viewsjs/BookingConfirm/Booking_SIEdit.js

8899 lines
325 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Ext.namespace('Shipping');
Shipping.Booking_SIEdit = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.Booking_SIEdit.superclass.constructor.call(this);
};
Ext.extend(Shipping.Booking_SIEdit, Ext.Panel, {
ParentWin: null,
OpStatus: 'add',
StoreList: null,
editRecord: null,
editRecord2: null,
Editdata: null,
MainEditRecord: null,
MsPeriod: null,
stroplb: '提单确认',
isfen: false,
iscopyctn: false,
subordercomp: null,
suborderop: "",
subordercustservice: "",
subordertype: "SEAE",
ruleList: null,
ruleCheckFail: false,
ruleCheckNames: '',
ruleCheckNameArr: [],
redAlertFields: [],
email: "",
reason: "",
sino:"",
initUIComponents: function () {
this.serialNo = 0;
//this.bodyDel = [];
this.itemindex = 1;
this.initloaddata = 0;
this.accdatesameetd = 0;
this.MsPeriod = null;
this.copybill = false;
this.SALEORDERDEPTBYOP = 0;
this.USEDSINTERFACE = 0;
//#region 本地数据用数据集
this.LocalData = null;
this.winAccess = null;
this.storeLocalCtnList = Ext.create('Ext.data.Store', {
model: 'MsOpSeaeDetail',
async: false,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetBodyList',
reader: {
id: 'CTN_ID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeLocalCtnDetailList = Ext.create('Ext.data.Store', {
model: 'MsOpCtnDetail',
async: false,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetOpCtnDetailList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#endregion
//#region 信息加载
parentWin = window.parent.opener._thisfenlist;
if (isNaN(parentWin) || parentWin == null) {
parentWin = window.parent.opener._this;
} else {
this.isfen = true;
}
this.storeDefValue = Ext.create('Ext.data.Store', {
model: 'DsShipping.ux.OpDefValue',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsCodeOpDef/GetDataList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeDefAmsValue = Ext.create('Ext.data.Store', {
model: 'DsShipping.ux.OpDefValue',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsCodeOpDef/GetDataList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeMustBe = Ext.create('Ext.data.Store', {
model: 'DsShipping.ux.OpDefValue',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsCodeOpMustField/GetDataList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCodeOpService',
proxy: {
url: '/MvcShipping/MsCodeOpService/GetDataList'
}
});
//权限范围
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsOP',
proxy: {
url: '/MvcShipping/MsBaseInfo/GetOpRang'
}
});
this.StoreOpRange.load({
params: {
optype: "modOrderManagement"
}
});
//人员信息加载
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetUserLinkRefListRm'
}
});
this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetUserLinkRefListRm'
}
});
this.storeOpCode3 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetUserLinkRefListRm'
}
});
this.storeOpCode4 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetUserLinkRefListRm'
}
});
this.storeOpCode5 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetUserLinkRefListRm'
}
});
var astoreOpCode = parentWin.storeOpCode;
if (isNaN(astoreOpCode) || astoreOpCode == null) { } else {
this.storeOpCode3.loadData(astoreOpCode.data.items);
this.storeOpCode4.loadData(astoreOpCode.data.items);
this.storeOpCode5.loadData(astoreOpCode.data.items);
}
this.storeOpCode.on('beforeload',
function (store) {
var sql = " u.GID IN (SELECT USERID FROM user_userattribute WHERE ATTRIBUTEID='D4BF2204-F0AC-4F12-B02C-6520D57BF806' and VALUE='true' ) ";
Ext.apply(store.proxy.extraParams, {
condition: sql
});
},
this);
//客服
this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CUSTSERVICE,
//'客服',
store: this.storeOpCode,
forceSelection: true,
queryMode: 'remote',
flex: 0.5,
minChars: 0,
queryParam: 'CODENAME',
name: 'CUSTSERVICE',
valueField: 'UserName',
displayField: 'CodeAndName',
value: SHOWNAME
});
//揽货人
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SALE,
//'揽货人',
store: this.storeOpCode2,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'SALE',
valueField: 'UserName',
displayField: 'CodeAndName',
value: SHOWNAME
//,
//listeners: {
// scope: this,
// 'select': function (combo, records, eOpts) {
// if (records.length > 0) {
// if (this.SALEORDERDEPTBYOP == 0)
// this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
// }
// }
//}
});
//操 作
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.OP,
//'操 作',
store: this.storeOpCode3,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'OP',
valueField: 'UserName',
displayField: 'CodeAndName',
value: SHOWNAME
//,
//listeners: {
// scope: this,
// 'select': function (combo, records, eOpts) {
// if (records.length > 0) {
// if (this.SALEORDERDEPTBYOP == 1)
// this.formHead.getForm().findField('SALEDEPT').setValue(records[0].data.DEPTNAME);
// }
// }
//}
});
//单证
this.comboxDOC = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.DOC,
//'单 证',
store: this.storeOpCode4,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'DOC',
valueField: 'UserName',
displayField: 'CodeAndName',
value: SHOWNAME
});
this.comboxFRCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FRCUSTSERVICE,
//'客服',
store: this.storeOpCode5,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'FRCUSTSERVICE',
valueField: 'UserName',
displayField: 'CodeAndName',
value: SHOWNAME
});
//客户加载_委托单位
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListController'
}
});
//委托单位
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CUSTOMERNAME,
//'委托单位',
store: this.storeCustCode,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
allowBlank: false
});
//委托单位_联系人
this.storeInfoClientContact = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.InfoClientContactModel',
proxy: {
url: '/CommMng/BasicDataRef/GetInfoClientContactList'
}
});
this.storeInfoClientContactFF = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.InfoClientContactModel',
proxy: {
url: '/CommMng/BasicDataRef/GetInfoClientContactList'
}
});
this.storeInfoClientContactIN = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.InfoClientContactModel',
proxy: {
url: '/CommMng/BasicDataRef/GetInfoClientContactList'
}
});
//this.storeInfoClientContact.load();
this.comboxInfoClientContact = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.OPERATOR,
//'客户操作',
store: this.storeInfoClientContact,
flex: 0.6,
// forceSelection: true,
name: 'OPERATOR',
valueField: 'SHOWNAME',
displayField: 'SHOWNAME'
});
this.comboxClientFCContact = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FINANCIALSTAFF,
//'客户财务',
store: this.storeInfoClientContactFF,
// forceSelection: true,
name: 'FINANCIALSTAFF',
valueField: 'SHOWNAME',
displayField: 'SHOWNAME'
});
this.comboxClientContactIN = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.INSURANCEOP,
//'客户财务',
store: this.storeInfoClientContactIN,
// forceSelection: true,
name: 'FINANCIALSTAFFFAX',
valueField: 'SHOWNAME',
displayField: 'SHOWNAME'
});
this.storeListMailProject = Ext.create('Ext.data.Store', {
fields: [{
name: 'GID',
type: 'string'
},
{
name: 'CUSTNAME',
type: 'string'
},
{
name: 'PROJECTNAME',
type: 'string'
},
{
name: 'ISDEF',
type: 'bool'
},
{
name: 'ISDEFREF',
type: 'string'
},
{
name: 'INPUTBY',
type: 'string'
},
{
name: 'INPUTBYREF',
type: 'string'
},
{
name: 'INPUTTIME',
type: 'string'
},
{
name: 'REMARK',
type: 'string'
}
],
pageSize: 5000,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsInfoClientMailProject/GetDataList',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.comboxMailProject = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeListMailProject,
hidden: true,
// forceSelection: true,
fieldLabel: Zi.LAN.MAILPROJECT,
//'费用类型',
valueField: 'GID',
name: 'MAILPROJECT',
displayField: 'PROJECTNAME'
});
//客户加载_船公司
this.storeCARRIER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListCARRIER'
}
});
//船公司
this.comboxCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CARRIER,
//'船公司',
store: this.storeCARRIER,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CARRIER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storeVoyVeg = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.VesselModel',
proxy: {
url: '/CommMng/BasicDataRef/GetVesselList'
}
});
this.storeVoyVeg2 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.VesselModel',
proxy: {
url: '/CommMng/BasicDataRef/GetVesselList'
}
});
this.comboxVoyVeg = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.VESSEL,
//'船 名',
store: this.storeVoyVeg,
name: 'VESSEL',
valueField: 'VESSEL',
flex: 1,
displayField: 'VESSEL'
});
this.comboxVoyVeg2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.VESSEL,
//'船 名',
store: this.storeVoyVeg2,
name: 'VESSEL2N',
valueField: 'VESSEL',
displayField: 'VESSEL'
});
this.storeVoyNo = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.VoyNoModel',
proxy: {
url: '/CommMng/BasicDataRef/GetVoyNoList'
}
});
this.comboxVoyNo = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.VOYNO,
//'航次',
store: this.storeVoyNo,
name: 'VOYNO',
valueField: 'VOYNO',
forceSelection: false,
flex: 1,
displayField: 'VOYNO'
});
//客户加载_订舱代理
this.storeFORWARDER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListFORWARDER'
}
});
//船公司
this.comboxFORWARDER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.FORWARDER,
//'订舱代理',
store: this.storeFORWARDER,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'FORWARDER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//客户加载_船代
this.storeSHIPAGENCY = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListSHIPAGENCY'
}
});
//船代
this.comboxSHIPAGENCY = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SHIPAGENCY,
//'船代',
store: this.storeSHIPAGENCY,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'SHIPAGENCY',
valueField: 'CustName',
displayField: 'CodeAndName'
});
this.storePKGTYPE = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsExtEnumModel',
proxy: {
url: '/CommMng/PubSys/GetEnumValueList'
}
});
this.storePKGTYPE.load({
params: {
enumTypeId: 97011
}
});
this.comboxPKGTYPE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PACKINGTYPE,
//'装箱类型',
store: this.storePKGTYPE,
flex: 0.5,
// forceSelection: true,
name: 'PACKINGTYPE',
valueField: 'EnumValueName',
displayField: 'EnumValueName'
});
//客户加载_仓库
this.storeWAREHOUSE = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListWAREHOUSE'
}
});
//车队
this.comboxWAREHOUSE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.WAREHOUSE,
//'仓库',
store: this.storeWAREHOUSE,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'WAREHOUSE',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//客户加载_车队
this.storeTRUCKER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK'
}
});
//车队
this.comboxTRUCKER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.TRUCKER,
//'车队',
store: this.storeTRUCKER,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'TRUCKER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//客户加载_报关报检
this.storeCUSTOMSER = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListCUSTOM'
}
});
//报关行
this.comboxCUSTOMSER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CUSTOMSER,
//'报关行',
store: this.storeCUSTOMSER,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CUSTOMSER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//品名
this.storeCodeGoodsList = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeGoodsModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeGoodsList'
}
});
this.storeCodeGoodsList.load();
this.comboxGOODSNAME = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeCodeGoodsList,
labelWidth: 250,
// forceSelection: true,
name: 'GOODSNAME',
valueField: 'GOODNAME',
displayField: 'CodeAndName'
});
this.comboxGOODCODE = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeCodeGoodsList,
name: 'HSCODE',
fieldLabel: Zi.LAN.HSCODE,
//'HS编码',
valueField: 'GOODCODE',
displayField: 'GOODCODE'
});
//业务来源
this.storeSource = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceModel',
proxy: {
url: '/CommMng/BasicDataRef/GetSource'
}
});
this.storeSource.load();
this.storeSourceDetail = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.SourceDetailModel',
proxy: {
url: '/CommMng/BasicDataRef/GetSourceDetail2'
}
});
this.comboxBSSOURCE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BSSOURCE,
//'业务来源',
store: this.storeSource,
// forceSelection: true,
name: 'BSSOURCE',
valueField: 'SourceName',
displayField: 'SourceName'
});
this.storeSourceDetail.load();
this.comboxBSSOURCEDETAIL = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BSSOURCEDETAIL,
//'来源明细',
store: this.storeSourceDetail,
// forceSelection: true,
name: 'BSSOURCEDETAIL',
valueField: 'SourceDetail',
displayField: 'SourceDetail'
});
//所属部门
this.storeDept = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.DeptModel',
proxy: {
url: '/CommMng/BasicDataRef/GetDeptList'
}
});
this.storeDept.load();
this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SALEDEPT2,
//'所属部门',
store: this.storeDept,
flex: 0.5,
labelWidth: 55,
forceSelection: true,
name: 'SALEDEPT',
valueField: 'DeptName',
displayField: 'DeptName'
//,hidden: true
});
//件数包装
this.storeCodePackage = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodePackageModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodePackageList'
}
});
this.storeCodePackage.load();
this.comboxKINDPKGS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.KINDPKGS,
//'包 装',
flex:1,
labelWidth: 60,
store: this.storeCodePackage,
padding: '0 0 0 10',
// forceSelection: true,
name: 'KINDPKGS',
valueField: 'PKGS',
displayField: 'PKGS'
});
//件数包装_集装箱列表中的下拉框加载
this.comboxKINDPKGS_CTN = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: Zi.LAN.KINDPKGS, //'件数包装',
store: this.storeCodePackage,
// forceSelection: true,
name: 'KINDPKGS',
valueField: 'PKGS',
displayField: 'PKGS'
});
//箱型_集装箱列表中的下拉框加载
this.storeCodeCtn = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeCtnModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeCtnList'
}
});
this.storeCodeCtn.load();
this.comboxCTNALL = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: Zi.LAN.CTNALL, //'箱型',
store: this.storeCodeCtn,
forceSelection: true,
name: 'CTNALL',
valueField: 'CTN',
displayField: 'CTN'
});
//箱型_集装箱列表中的下拉框加载
this.storeLANE = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.Lane',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeLaneList'
}
});
this.storeLANE.load();
this.comboxLANE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.LANE,
//'航线',
store: this.storeLANE,
// forceSelection: true,
name: 'LANE',
valueField: 'LANE',
displayField: 'LANE'
});
//客户加载_发货人
this.storeShipper = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperListRm'
}
});
this.storeShipper.on('beforeload',
function (store) {
var SERVICECONTRACTNO = _this.formHead.getForm().findField('SERVICECONTRACTNO').getValue();
Ext.apply(store.proxy.extraParams, {
contractno: SERVICECONTRACTNO
});
},
this);
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//发货人
this.comboxShipper = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SHIPPERID,
//'Shipper (发货人)',
store: this.storeShipper,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
labelWidth: 100,
flex: 0.5,
labelAlign: 'left',
name: 'SHIPPERID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName'
});
//客户加载_收货人
this.storeConsignee = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperListRm'
}
});
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//收货人
this.comboxConsignee = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CONSIGNEEID,
//'Consignee (收货人)',
labelWidth: 120,
flex: 0.5,
labelAlign: 'left',
store: this.storeConsignee,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'CONSIGNEEID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName'
});
//客户加载_通知人
this.storenotifyparty = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperListRm'
}
});
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//通知人
this.comboxNotifyParty = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.NOTIFYPARTYID,
//'Notify Party (通知人)',
store: this.storenotifyparty,
labelWidth: 120,
flex: 0.5,
labelAlign: 'left',
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'NOTIFYPARTYID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName'
});
//客户加载_代理
this.storeagent = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperListRm'
}
});
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//收货人
this.comboxAgent = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.AGENTID,
//'代 理',
store: this.storeagent,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'AGENTID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName'
});
this.StoreStlName = Ext.create('Ext.data.Store', {
fields: ['STLNAME']
});
this.StoreStlName.add({
"STLNAME": "月结"
});
this.StoreStlName.add({
"STLNAME": "半月结"
});
this.StoreStlName.add({
"STLNAME": "约定天数"
});
//this.StoreStlName.add({ "STLNAME": "周结" });
this.comboxStlName = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreStlName,
fieldLabel: Zi.LAN.STLNAME,
//'结算方式',
forceSelection: true,
readOnly: true,
flex: 0.5,
name: 'STLNAME',
valueField: 'STLNAME',
displayField: 'STLNAME'
});
this.storeTRADETERM = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeTRADETERM.load({
params: {
enumTypeId: 97023
}
});
this.comboxTRADETERM = Ext.create('DsExt.ux.RefEnumCombox', {
fieldLabel: Zi.LAN.TRADETERM,
//'贸易条款',
store: this.storeTRADETERM,
forceSelection: true,
flex: 0.5,
name: 'TRADETERM'
});
this.storeSaleCompany = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCompanysEntity',
proxy: {
url: '/MvcShipping/MsCompanys/GetNoPicDataList'
}
});
//this.storeSaleCompany.load({ params: { condition: "" } });
this.comboxSaleCompany = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SALECOMPANY,
//'委托分公司',
store: this.storeSaleCompany,
forceSelection: true,
name: 'SALECORPID',
valueField: 'GID',
displayField: 'NAME'
});
this.StoreCargoid = Ext.create('Ext.data.Store', {
fields: ['ID', 'NAME']
});
this.StoreCargoid.add({
"ID": "S",
"NAME": "S普通货"
});
this.StoreCargoid.add({
"ID": "R",
"NAME": "R冻柜"
});
this.StoreCargoid.add({
"ID": "D",
"NAME": "D危险品"
});
this.StoreCargoid.add({
"ID": "O",
"NAME": "O超限箱"
});
this.comboxCargoid = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreCargoid,
fieldLabel: "<a><font color='#FF0000'>货物标示</font></a>",
forceSelection: true,
flex:1,
name: 'CARGOID',
valueField: 'ID',
displayField: 'NAME'
});
//#endregion
//#region 编辑formHead 基本信息
this.formHead = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
collapsed: false,
collapsible: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip',
readOnly: true
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.BSNO2,
//'业务编号',
name: 'BSNO',
hidden: true
},
{
fieldLabel: Zi.LAN.MASTERNO,
//'业务编号',
name: 'MASTERNO',
hidden: true
},
{
fieldLabel: Zi.LAN.CREATETIME,
//'CREATETIME',
name: 'CREATETIME',
hidden: true
},
{
fieldLabel: Zi.LAN.INPUTBY,
//'INPUTBY',
name: 'INPUTBY',
hidden: true
},
{
fieldLabel: 'WARNCOUNT',
//'CNTRTOTAL',
name: 'WARNCOUNT',
hidden: true
},
{
fieldLabel: 'DRFEESTATUS',
//'MSHIPPERID',
name: 'DRFEESTATUS',
hidden: true
},
{
fieldLabel: 'CRFEESTATUS',
//'MSHIPPERID',
name: 'CRFEESTATUS',
hidden: true
},
{
fieldLabel: Zi.LAN.MSHIPPERID,
//'MSHIPPERID',
name: 'MSHIPPERID',
hidden: true
},
{
fieldLabel: Zi.LAN.MCONSIGNEEID,
//'MCONSIGNEEID',
name: 'MCONSIGNEEID',
hidden: true
},
{
fieldLabel: Zi.LAN.MNOTIFYPARTYID,
//'MNOTIFYPARTYID',
name: 'MNOTIFYPARTYID',
hidden: true
},
{
fieldLabel: Zi.LAN.MSHIPPER,
//'MSHIPPER',
xtype: 'textareafield',
name: 'MSHIPPER',
hidden: true
},
//{
//fieldLabel: Zi.LAN.OPERATORTEL, //'TEL',
//name: 'OPERATORTEL', hidden: true
//},
{
fieldLabel: Zi.LAN.MCONSIGNEE,
//'MCONSIGNEE',
xtype: 'textareafield',
name: 'MCONSIGNEE',
hidden: true
},
{
fieldLabel: Zi.LAN.MNOTIFYPARTY,
//'MNOTIFYPARTY',
xtype: 'textareafield',
name: 'MNOTIFYPARTY',
hidden: true
}
// , {
// fieldLabel: Zi.LAN.MBLFRT, //'MBLFRT',//付费方式 formedit中已有
// name: 'MBLFRT', hidden: true
//}
//, {
// fieldLabel: Zi.LAN.SALEDEPT, //'SALEDEPT',
// name: 'SALEDEPT', hidden: true
//}
, {
fieldLabel: 'ISCANCEL',
//'业务锁定',
disabled: true,
hidden: true,
readOnly: true,
name: 'ISCANCEL'
},
{
fieldLabel: Zi.LAN.FEESTATUSREF,
//'费用锁定',
readOnly: true,
hidden: true,
disabled: true,
name: 'FEESTATUSREF'
},
/////第一行
//this.comboxCustCode,//委托单位
{
fieldLabel: Zi.LAN.ORDERNO,
//'订舱编号',
name: 'ORDERNO'
},
{
fieldLabel: "BSSTATUS",
hidden: true,
readOnly: true,
name: 'BSSTATUS'
},
{
fieldLabel: "截单状态",
//disabled: true,
readOnly: true,
name: 'BSSTATUSREF'
},
{
fieldLabel: "提交时间",
//disabled: true,
readOnly: true,
name: 'SUBMITDATE'
},
{
fieldLabel: "主提单号",
//disabled: true,
readOnly: true,
name: 'MBLNO'
},
{
hidden: true,
fieldLabel: 'ORDNO',
//'订舱编号',
name: 'ORDNO'
},
{
fieldLabel: '提单确认号',
//提单确认号,
readOnly: true,
hidden: true,
//flex:2,
//disabled: true,
name: 'SINO'
},
{
fieldLabel: Zi.LAN.ACCDATE,
//'会计期间',
xtype: 'monthfield',
hidden: true,
name: 'ACCDATE'
},
//this.comboxBLTYPE,
{
hidden: true,
name: 'BLTYPE'
},
{
fieldLabel: Zi.LAN.CONTRACTNO,//运费协议号 约号
name: 'CONTRACTNO'
}, {
fieldLabel: "", //'SHIPPER',
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISCONTRACTNO',
readOnly:false
},
this.comboxMailProject //邮件方案 隐藏
]
},
{
xtype: 'container',
hidden: true,
//整行隐藏
layout: 'hbox',
defaultType: 'textfield',
items: [
this.comboxBSSOURCE, this.comboxBSSOURCEDETAIL, this.comboxStlName, {
fieldLabel: Zi.LAN.STLDATE,
//'结算日期', readOnly: true,
format: 'Y-m-d',
flex: 0.5,
labelWidth: 55,
readOnly: true,
// xtype: 'datefield',
name: 'STLDATE',
id: "STLDATE"
},
this.comboxSaleCompany]
},
{
xtype: 'container',
hidden: true,
//整行隐藏
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxOP, this.comboxSALE, this.comboxDOC, this.comboxCUSTSERVICE, this.comboxDept, {
fieldLabel: Zi.LAN.INVNO,
//'发票号',
//labelWidth: 50,
//flex: 0.5,
name: 'INVNO'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CUSTNO,
//'委托编号',
allowBlank: true,
hidden: true,
name: 'CUSTNO'
}, {
fieldLabel: '委托单位',
flex: 1,
name: 'CUSTOMERNAME'
},
{
fieldLabel: '截单发起人',
flex: 1,
name: 'OPERATOR'
},
{
fieldLabel: '电话',
flex: 1,
name: 'OPERATORTEL'
},
{
fieldLabel: '邮箱',
flex: 1,
name: 'OPERATORMAIL'
},
this.comboxCargoid
, {
fieldLabel: "", //'SHIPPER',
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISCARGOID',
readOnly: false
}
, {
fieldLabel: Zi.LAN.HBLNO,
hidden: true,
//'分提单号',
name: 'HBLNO'
}, {
xtype: 'button',
iconCls: "btnedit",
handler: function (button, event) {
this.GetContractFee();
},
hidden: true,
scope: this
}
]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
{
xtype: 'textareafield',
fieldLabel: "截单备注",
height: 60,
flex: 5,
name: 'SIREMARK'
}, {
fieldLabel: "", //'SHIPPER',
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISSIREMARK',
readOnly: false
}]
},
{
xtype: 'container',
hidden: true,
//整行隐藏
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.SERVICECONTRACTNO,
//'参考号'
name: 'SERVICECONTRACTNO'
},
{
fieldLabel: Zi.LAN.APPLYNO,
//'申请放箱号',
name: 'APPLYNO'
},
this.comboxClientContactIN, this.comboxClientFCContact]
}] //end items(fieldset 1)
}); //end this.formEdit
//#endregion
//#region 集装箱-数据集
this.storeBodyList = Ext.create('Ext.data.Store', {
model: 'Booking_Ctn',
async: false,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/BookingConfirm/GetBookingCtnList',
reader: {
id: 'CTN_ID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.StoreCTNSTATUS = Ext.create('Ext.data.Store', {
fields: ['ID', 'NAME']
});
this.StoreCTNSTATUS.add({
"ID": "F",
"NAME": "F整箱"
});
this.StoreCTNSTATUS.add({
"ID": "E",
"NAME": "E空箱"
});
this.StoreCTNSTATUS.add({
"ID": "L",
"NAME": "L拼箱"
});
this.comboxCTNSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreCTNSTATUS,
forceSelection: true,
name: 'CTNSTATUS',
valueField: 'ID',
displayField: 'NAME'
});
//集装箱_称重方式
this.StoreWEIGHTYPE = Ext.create('Ext.data.Store', {
fields: ['NAME']
});
this.StoreWEIGHTYPE.add({
"NAME": "累加"
});
this.StoreWEIGHTYPE.add({
"NAME": "总重"
});
this.StoreWEIGHTYPE.add({
"NAME": ""
});
this.comboxWEIGHTYPE = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreWEIGHTYPE,
forceSelection: true,
name: 'WEIGHTYPE',
valueField: 'NAME',
displayField: 'NAME'
});
//客户加载_车队
this.storeTRUCKERCTN = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListTRUCK'
}
});
//车队
this.comboxTRUCKERCTN = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeTRUCKERCTN,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'TRUCKER',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//明细表表格
this.initctncolumns = [{
sortable: true,
dataIndex: 'CTN_ID',
header: Zi.LAN.CTN_ID,
//'编号',
hidden: true,
width: 0
},
{
sortable: true,
dataIndex: 'BSNO',
header: Zi.LAN.BSNO2,
//'业务编号',
hidden: true,
width: 0
},
{
sortable: true,
dataIndex: 'CTNCODE',
header: Zi.LAN.CTNCODE,
//'序号',
width: 30
},
{
dataIndex: 'CTNALL',
header: Zi.LAN.CTNALL,
//'箱型',
width: 65,
renderer: function (value, meta, record, a, b, parentstore, c) {
_this.SetDiff_store();
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'TEU',
header: "TEU",
//'箱型',
width: 65,
renderer: function (value, meta, record, a, b, parentstore, c) {
_this.SetDiff_store();
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'CTNNUM',
header: Zi.LAN.CTNNUM,
//'箱量',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'CNTRNO',
header: Zi.LAN.CNTRNO,
//'箱号',
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'SEALNO',
header: Zi.LAN.SEALNO,
//'封号',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.PKGS,
//'件数',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'KINDPKGS',
header: Zi.LAN.KINDPKGS,
//'包装',
width: 70,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'KGS',
header: Zi.LAN.KGS3,
//'重量',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'CBM',
header: Zi.LAN.CBM2,
//'尺码',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'TAREWEIGHT',
header: Zi.LAN.TAREWEIGHT,
//'箱皮重',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'TTLWEIGHT',
header: Zi.LAN.TTLWEIGHT,
//'参考重量',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'WEIGHTYPE',
header: Zi.LAN.WEIGHTYPE,
//'称重方式',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'WEIGHKGS',
header: Zi.LAN.WEIGHKGS,
//'称重重量',
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'WEIGHATTN',
header: Zi.LAN.WEIGHATTN,
//'VGM联系人',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'VGMCONNCOM',
header: 'VGM联系公司',
//'VGM联系人',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'WEIGHTEL',
header: Zi.LAN.WEIGHTEL,
//'VGM联系电话',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'WEIGHSIGN',
header: Zi.LAN.WEIGHSIGN,
//'VGM联系人签名',
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'WEIGHDATE',
header: Zi.LAN.WEIGHDATE,
//'VGM称重日期',
//renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'VGMADDR',
header: Zi.LAN.VGMADDR,
//'VGM联系人签名',
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'VGMEMAIL',
header: Zi.LAN.VGMEMAIL,
//'VGM联系人签名',
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'REMARK',
header: Zi.LAN.REMARK,
//'备注',
width: 150,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'CTNSTATUS',
hidden: true,
header: Zi.LAN.CTNSTATUS,
//'箱状态',
width: 70,
renderer: function (value, p, record) {
if (value == 'E') return '空箱';
else if (value == 'L') return '拼箱';
else return '整箱';
}
},
{
dataIndex: 'MASTERNO',
hidden: true,
header: Zi.LAN.MASTERNO2,
//'主拼号',
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'TRUCKER',
hidden: true,
header: Zi.LAN.TRUCKER,
width: 65,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'TRUCKNO',
hidden: true,
header: Zi.LAN.TRUCKNO,
//'车号',
width: 100,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'TRUCKFEE',
hidden: true,
header: Zi.LAN.TRUCKFEE,
//'运费',
align: 'right',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'FREESTORAGEDAY',
hidden: true,
header: Zi.LAN.FREESTORAGEDAY,
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'STORAGEDAY',
hidden: true,
header: Zi.LAN.STORAGEDAY,
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'STORAGEPRICE',
hidden: true,
header: Zi.LAN.STORAGEPRICE,
//'运费',
align: 'right',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'STORAGEFEE',
hidden: true,
header: Zi.LAN.STORAGEFEE,
//'运费',
align: 'right',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'FREECTNDAY',
hidden: true,
header: Zi.LAN.FREECTNDAY,
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
dataIndex: 'CTNDAY',
hidden: true,
header: Zi.LAN.CTNDAY,
width: 60,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'CTNPRICE',
hidden: true,
header: Zi.LAN.CTNPRICE,
//'运费',
align: 'right',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
},
{
sortable: true,
dataIndex: 'CTNFEE',
hidden: true,
header: Zi.LAN.CTNFEE,
//'运费',
align: 'right',
width: 80,
renderer: function (value, meta, record, a, b, parentstore, c) {
result = _this.gridCellrenderer(value, meta, record, a, b, parentstore, c);
return result;
}
}];
this.ctncolumns = this.initctncolumns;
this.gridList = new Ext.grid.GridPanel({
store: this.storeBodyList,
enableHdMenu: false,
id: "CTNGridList",
region: 'center',
loadMask: {
msg: "数据加载中,请稍等..."
},
trackMouseOver: true,
disableSelection: false,
plugins: [
//this.gridListCellEditing
],
selType: 'cellmodel',
tbar: [
{
text: Zi.LAN.btnAddOpCtnDetail,
//'多品名维护',
id: "btnAddOpCtnDetail",
handler: function (button, event) {
this.onAddOpCtnDetail(button, event);
},
scope: this
},
{
xtype: 'label',
id: "morerecord",
hidden: true,
html: "<font color='red'>注意本地业务内的集装箱信息多于SI当中的</font>"
},
{
xtype: 'label',
id: "lessrecord",
hidden: true,
html: "<font color='red'>注意本地业务内的集装箱信息少于SI当中的</font>"
}],
columns: this.ctncolumns
});
this.ctncolumns = DsTruck.GetGridPanel(USERID, 'SEAECTNCOLUMN', this.ctncolumns, 1); //使用者id表名中间column数组跳过一开始的几列
//#endregion
//#region 数据集
this.panelBodyCtn = new Ext.Panel({
// title: Zi.LAN.panelBodyCtn, //'集装箱信息',
layout: "border",
height: 140,
//margin: '5 10',
frame: true,
items: [this.gridList]
});
this.panelBodyDr = new Ext.Panel({
title: Zi.LAN.panelBodyDr,
//'危险品信息',
layout: "border",
hidden: true,
height: 60,
frame: true,
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.DCLASS,
//'危险品等级',
flex: 1,
labelWidth: 70,
name: 'DCLASS'
},
{
fieldLabel: Zi.LAN.DUNNO,
//'危险品编号',
flex: 1,
labelWidth: 70,
name: 'DUNNO'
},
{
fieldLabel: Zi.LAN.DPAGE,
//'危险品页号',
flex: 1,
labelWidth: 70,
name: 'DPAGE'
},
{
fieldLabel: Zi.LAN.DLABEL,
//'危险品标签',
flex: 1,
labelWidth: 70,
name: 'DLABEL'
},
{
fieldLabel: Zi.LAN.LINKMAN,
//'危险品联系人',
flex: 1,
labelWidth: 90,
name: 'LINKMAN'
}]
}]
});
this.StoreTemp = Ext.create('Ext.data.Store', {
fields: ['ID', 'NAME']
});
this.StoreTemp.add({
"ID": "C",
"NAME": "C摄氏"
});
this.StoreTemp.add({
"ID": "F",
"NAME": "F华氏"
});
this.comboxTemp = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreTemp,
fieldLabel: Zi.LAN.TEMPID,
//'温度单位',
forceSelection: true,
flex: 1,
width: 120,
name: 'TEMPID',
valueField: 'ID',
displayField: 'NAME'
});
this.panelBodyRf = new Ext.Panel({
title: Zi.LAN.panelBodyRf,
//'冻柜信息',
layout: "border",
hidden: true,
height: 60,
flex: 1,
//margin: '5 10',
frame: true,
items: [{
xtype: 'container',
layout: 'column',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.REEFERF,
//'冷藏通风量',
flex: 1,
width: 150,
name: 'REEFERF'
},
{
fieldLabel: Zi.LAN.TEMPSET,
//'设置温度',
flex: 1,
width: 150,
name: 'TEMPSET'
},
this.comboxTemp, {
fieldLabel: Zi.LAN.TEMPMIN,
//'最低温度',
flex: 1,
width: 150,
name: 'TEMPMIN'
},
{
fieldLabel: Zi.LAN.TEMPMAX,
//'最高温度',
flex: 1,
width: 150,
name: 'TEMPMAX'
},
{
fieldLabel: Zi.LAN.HUMIDITY,
//'湿度',
flex: 1,
width: 150,
name: 'HUMIDITY'
}]
}]
});
//国际港口(进口装货港、出口卸货港)
this.storeCodeDisport = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport2 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport3 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport4 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport5 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport6 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport7 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport8 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.storeCodeDisport9 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
//国内港口(出口装货港、进口卸货港)
this.storeCodeLoadport = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeLoadportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeLoadportListRm'
}
});
this.storeCodeLoadport.load();
this.comboxPORTLOAD = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PORTLOAD,
//'装货港',
store: this.storeCodeLoadport,
name: 'PORTLOADID',
valueField: 'EDICODE',
displayField: 'CodeAndName',
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
// forceSelection: true,
matchFieldWidth: false
});
this.comboxPORTDISCHARGE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PORTDISCHARGE,
//'卸货港',
store: this.storeCodeDisport,
name: 'PORTDISCHARGEID',
// forceSelection: true,
valueField: 'EDICODE',
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
displayField: 'CodeAndName'
});
this.comboxDESTINATION = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.DESTINATIONID,
//'目的地',
store: this.storeCodeDisport2,
name: 'DESTINATIONID',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
valueField: 'EDICODE',
displayField: 'CodeAndName'
});
this.comboxPLACEDELIVERY = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PLACEDELIVERY,
//'交货地',
store: this.storeCodeDisport3,
name: 'PLACEDELIVERYID',
valueField: 'EDICODE',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
displayField: 'CodeAndName'
});
this.comboxPLACERECEIPT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.PLACERECEIPTID,
//'收货地点',
store: this.storeCodeDisport4,
name: 'PLACERECEIPTID',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
valueField: 'EDICODE',
displayField: 'CodeAndName'
});
this.comboxISSUEPLACE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ISSUEPLACEID,
//'签单地点',
store: this.storeCodeDisport5,
name: 'ISSUEPLACEID',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
valueField: 'EDICODE',
displayField: 'CodeAndName'
});
this.comboxPAYABLEAT = Ext.create('DsExt.ux.RefTableCombox', {
flex: 1,
fieldLabel: Zi.LAN.PAYABLEAT,
//'到付地点',
store: this.storeCodeDisport6,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
name: 'PAYABLEAT',
valueField: 'PORT',
displayField: 'PORT'
});
this.comboxPREPARDAT = Ext.create('DsExt.ux.RefTableCombox', {
flex: 1,
fieldLabel: Zi.LAN.PREPARDAT,
//'预付地点',
store: this.storeCodeDisport7,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
name: 'PREPARDAT',
valueField: 'PORT',
displayField: 'PORT'
});
//付费方式
this.storeFrt = Ext.create('DsExt.ux.RefTableStore', {
model: 'CODE_FRT',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeFrtList'
}
});
this.storeFrt.load({
params: {
condition: ""
}
});
this.comboxBLFRT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BLFRT,
//'付费方式',
store: this.storeFrt,
forceSelection: true,
name: 'BLFRT',
valueField: 'FRT',
displayField: 'FRT'
});
this.storeCodeDisport10 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeDisportModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeDisportListRm'
}
});
this.comboxTRANSPORT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.TRANSPORT,
store: this.storeCodeDisport10,
name: 'TRANSPORT',
valueField: 'PORT',
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
displayField: 'PORT'
});
//运输条款
this.storeSERVICE = Ext.create('DsExt.ux.RefTableStore', {
model: 'CODE_SERVICE',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeServiceList'
}
});
this.storeSERVICE.load({
params: {
condition: ""
}
});
this.comboxSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
flex: 1,
fieldLabel: Zi.LAN.SERVICE,
//'运输条款',
store: this.storeSERVICE,
forceSelection: true,
name: 'SERVICE',
valueField: 'SERVICE',
displayField: 'SERVICE'
});
//签单方式
this.storeISSUETYPE = Ext.create('DsExt.ux.RefTableStore', {
model: 'CODE_BLTYPE',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeBLTYPEList'
}
});
this.storeISSUETYPE.load({
params: {
condition: ""
}
});
this.comboxISSUETYPE = Ext.create('DsExt.ux.RefTableCombox', {
flex: 1,
fieldLabel: Zi.LAN.ISSUETYPE,
//'签单方式',
store: this.storeISSUETYPE,
forceSelection: true,
name: 'ISSUETYPE',
valueField: 'BLTYPE',
displayField: 'BLTYPE'
});
this.StoreBLNUM = Ext.create('Ext.data.Store', {
fields: ['NUM']
});
this.StoreBLNUM.add({
"NUM": "ZERO"
});
this.StoreBLNUM.add({
"NUM": "ONE"
});
this.StoreBLNUM.add({
"NUM": "TWO"
});
this.StoreBLNUM.add({
"NUM": "THREE"
});
this.StoreBLNUM.add({
"NUM": "FOUR"
});
this.StoreBLNUM.add({
"NUM": "FIVE"
});
this.StoreBLNUM.add({
"NUM": "SIX"
});
this.StoreBLNUM.add({
"NUM": "SEVEN"
});
this.StoreBLNUM.add({
"NUM": "EIGHT"
});
this.StoreBLNUM.add({
"NUM": "NINE"
});
this.StoreBLNUM.add({
"NUM": "TEN"
});
this.panelBodyDr2 = new Ext.Panel({
title: Zi.LAN.panelBodyDr,
//'危险品信息',
layout: "border",
region: 'center',
hidden: true,
height: 60,
width: 1200,
// frame: true,
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.DCLASS,
//'危险品等级',
flex: 1,
labelWidth: 70,
name: 'DCLASS'
},
{
fieldLabel: Zi.LAN.DUNNO,
//'危险品编号',
flex: 1,
labelWidth: 70,
name: 'DUNNO'
},
{
fieldLabel: Zi.LAN.DPAGE,
//'危险品页号',
flex: 1,
labelWidth: 70,
name: 'DPAGE'
},
{
fieldLabel: Zi.LAN.DLABEL,
//'危险品标签',
flex: 1,
labelWidth: 70,
name: 'DLABEL'
},
{
fieldLabel: Zi.LAN.LINKMAN,
//'危险品联系人',
flex: 1,
labelWidth: 90,
name: 'LINKMAN'
}]
}]
});
this.comboxTemp2 = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreTemp,
fieldLabel: Zi.LAN.TEMPID,
//'温度单位',
forceSelection: true,
flex: 1,
name: 'TEMPID',
value: 'C',
valueField: 'ID',
displayField: 'NAME'
});
this.panelBodyRf2 = new Ext.Panel({
title: Zi.LAN.panelBodyRf,
//'冻柜信息',
layout: "border",
region: 'center',
hidden: true,
height: 168,
width: 720,
//margin: '5 10',
// frame: true,
items: [{
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.REEFERF,
//'冷藏通风量',
flex: 1,
labelWidth: 80,
name: 'REEFERF'
},
{
fieldLabel: Zi.LAN.TEMPSET,
//'设置温度',
flex: 1,
name: 'TEMPSET'
},
this.comboxTemp2]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.TEMPMIN,
//'最低温度',
flex: 1,
name: 'TEMPMIN'
},
{
fieldLabel: Zi.LAN.TEMPMAX,
//'最高温度',
flex: 1,
name: 'TEMPMAX'
},
{
fieldLabel: Zi.LAN.HUMIDITY,
//'湿度',
flex: 1,
name: 'HUMIDITY'
}]
}]
}
]
});
this.formCargoShow = Ext.widget('form', {
frame: true,
region: 'center',
layout: 'hbox',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 60,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
defaultType: 'textfield',
flex: 1,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [this.panelBodyDr2, this.panelBodyRf2]
}
] //end root items
});
this.StoreTranStatus = Ext.create('Ext.data.Store', {
fields: ['CODE', 'STATUS']
});
this.StoreTranStatus.add({
"CODE": "C",
"STATUS": "出运"
});
this.StoreTranStatus.add({
"CODE": "W",
"STATUS": "未出运"
});
this.StoreTranStatus.add({
"CODE": "T",
"STATUS": "退载"
});
this.comboxTranStatus = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.TRANSTATUS,
//'出运状态',
store: this.StoreTranStatus,
forceSelection: true,
name: 'TRANSTATUS',
valueField: 'CODE',
displayField: 'STATUS'
});
//#endregion
//#region 编辑formEdit 基本信息
this.formEdit = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 7,
layout: 'anchor',
//layout: 'hbox',
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip'
,readOnly: true
},
items: [
//#region 第一块 收发通
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
margins: '2 2 2 2',
defaults: {
//anchor: '100%'
},
items: [
//#region 第一栏
{
xtype: 'container',
layout: 'anchor',
flex: 3,
defaultType: 'textfield',
items: [
//#region 发货人
{
xtype: 'container',
layout: 'hbox',
//flex: 1,
defaultType: 'textfield',
items: [
//this.comboxShipper,
{
xtype: 'label',
text: 'Shipper(发货人)'
},
//{
// name: 'SHIPPERID',
// hidden:true
//},
{
xtype: 'button',
id: 'btnUpShipper',
iconCls: "btnsave",
handler: function (button, event) {
this.UpBlStr('SHIPPER');
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "30",
handler: function (button, event) {
this.FormatTextarea(30, "SHIPPER");
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "35",
handler: function (button, event) {
this.FormatTextarea(35, "SHIPPER");
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "40",
handler: function (button, event) {
this.FormatTextarea(40, "SHIPPER");
},
hidden: true,
scope: this
},
{
xtype: 'label',
flex: 0.4,
id: 'SHIPPERSTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
height: 80,
name: 'SHIPPER',
anchor: '100%',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.SetShipperLable('SHIPPER', 35);
_this.formEdit.getForm().findField('SHIPPER').setValue(field.value.toUpperCase());
}
}
}
//#endregion
,
//#region 收货人
{
xtype: 'container',
layout: 'hbox',
//flex: 1,
defaultType: 'textfield',
items: [
//this.comboxConsignee,
{
xtype: 'label',
text: 'Consignee(收货人)'
},
{
xtype: 'button',
id: 'btnUpConsignee',
iconCls: "btnsave",
handler: function (button, event) {
this.UpBlStr('CONSIGNEE');
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "30",
handler: function (button, event) {
this.FormatTextarea(30, "CONSIGNEE");
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "35",
handler: function (button, event) {
this.FormatTextarea(35, "CONSIGNEE");
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "40",
handler: function (button, event) {
this.FormatTextarea(40, "CONSIGNEE");
},
hidden: true,
scope: this
},
{
xtype: 'label',
flex: 0.4,
id: 'CONSIGNEESTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
labelWidth: 0,
height: 80,
name: 'CONSIGNEE',
anchor: '100%',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.SetShipperLable('CONSIGNEE', 35);
_this.formEdit.getForm().findField('CONSIGNEE').setValue(field.value.toUpperCase());
}
}
}
//#endregion
,
//#region 通知人
{
xtype: 'container',
layout: 'hbox',
//flex: 1,
defaultType: 'textfield',
items: [
//this.comboxNotifyParty,
{
xtype: 'label',
text: 'Notify Party(通知人)'
},
{
xtype: 'button',
id: 'btnUpNotifyParty',
iconCls: "btnsave",
handler: function (button, event) {
this.UpBlStr('NOTIFYPARTY');
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "30",
handler: function (button, event) {
this.FormatTextarea(30, "NOTIFYPARTY");
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "35",
handler: function (button, event) {
this.FormatTextarea(35, "NOTIFYPARTY");
},
hidden: true,
scope: this
},
{
xtype: 'button',
text: "40",
handler: function (button, event) {
this.FormatTextarea(40, "NOTIFYPARTY");
},
hidden: true,
scope: this
},
{
xtype: 'label',
flex: 0.4,
id: 'NOTIFYPARTYSTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
labelWidth: 0,
height: 80,
name: 'NOTIFYPARTY',
anchor: '100%',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.SetShipperLable('NOTIFYPARTY', 35);
_this.formEdit.getForm().findField('NOTIFYPARTY').setValue(field.value.toUpperCase());
}
}
}
//#endregion
]
},
{
xtype: 'container',
layout: 'anchor',
flex: 0.05,
defaultType: 'textfield',
items: [
//{xtype:'hiddenfield',height:20},
{
fieldLabel: "", //'SHIPPER',
labelWidth: 0,
height: 80,
flex: 0.2,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISSHIPPER',
readOnly: false
},
{ xtype: 'hiddenfield', height: 15 },
{
fieldLabel: "", //'SHIPPER',
labelWidth: 0,
height: 80,
flex: 0.2,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISCONSIGNEE',
readOnly: false
},
{ xtype: 'hiddenfield', height: 15 },
{
fieldLabel: "", //'SHIPPER',
labelWidth: 0,
height: 80,
flex: 0.2,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISNOTIFYPARTY',
readOnly: false
}
]
},
//#endregion
//#region 第二栏
{
xtype: 'container',
layout: 'anchor',
flex: 4,
defaultType: 'textfield',
items: [
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
{
fieldLabel: Zi.LAN.YARD,
name: 'YARD'
}, {
flex: 0.04,
//name: 'ISYARD',
xtype: 'hiddenfield'
} , {
fieldLabel: Zi.LAN.CLOSINGDATE,
//'截港日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datetimefield',
name: 'CLOSINGDATE'
}, {
flex: 0.04,
//name: 'ISCLOSINGDATE',
xtype: 'hiddenfield'
},
{
fieldLabel: Zi.LAN.CLOSEDOCDATE,
//'截单日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datetimefield',
name: 'CLOSEDOCDATE'
}, {
flex: 0.04,
//name: 'ISCLOSEDOCDATE',
xtype: 'hiddenfield'
}
]
}
,
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
this.comboxCARRIER, {
flex: 0.04,
xtype: 'hiddenfield'//,
//name: 'ISCARRIER'
}, this.comboxVoyVeg, {
flex: 0.04,
xtype: 'hiddenfield'//,
//name: 'ISVESSEL'
}, this.comboxVoyNo, {
flex: 0.04,
xtype: 'hiddenfield'//,
//name: 'ISVOYNO'
}
]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
{
fieldLabel: Zi.LAN.ETD,
//'ETD',
format: 'Y-m-d',
flex: 1,
//xtype: 'datefield',
name: 'ETD'
}, {
flex: 0.04,
xtype: 'hiddenfield'//,
//name: 'ISETD'
} ,
{
fieldLabel: Zi.LAN.VESSELID,
//'船舶呼号',
flex: 2.075,
name: 'VESSELID'
}, {
flex: 0.04,
xtype: 'hiddenfield'//,
//name: 'ISVESSELID'
}
]
}
,
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
{
fieldLabel: Zi.LAN.PORTLOAD,
name: 'PORTLOADID'
},
{
fieldLabel: '',
name: 'PORTLOAD'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPORTLOAD',
readOnly: false
},
{
fieldLabel: Zi.LAN.PLACERECEIPTID,
name: 'PLACERECEIPTID'
}, {
fieldLabel: '',
name: 'PLACERECEIPT'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPLACERECEIPT',
readOnly: false
}
]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
{
fieldLabel: Zi.LAN.PORTDISCHARGE,
name: 'PORTDISCHARGEID'
}, {
fieldLabel: '',
name: 'PORTDISCHARGE'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPORTDISCHARGE',
readOnly: false
},
{
fieldLabel: Zi.LAN.PLACEDELIVERY,
name: 'PLACEDELIVERYID'
},
{
fieldLabel: '',
name: 'PLACEDELIVERY'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPLACEDELIVERY',
readOnly: false
}
]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
{
fieldLabel: Zi.LAN.DESTINATION,
name: 'DESTINATIONID'
}, {
fieldLabel: '',
name: 'DESTINATION'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISDESTINATION',
readOnly: false
},
{
xtype: 'hiddenfield', flex: 2.075
}
]
}
, { xtype: 'hiddenfield', flex: 1, height: 20 }
, {
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
this.comboxISSUETYPE, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISISSUETYPE',
readOnly: false
},
this.comboxSERVICE, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISSERVICE',
readOnly: false
},
{ xtype: 'hiddenfield', flex: 1.06 }
]
}
, {
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
this.comboxBLFRT, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISBLFRT',
readOnly: false
},
this.comboxMBLFRT,//此条隐藏
this.comboxPREPARDAT, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPREPARDAT',
readOnly: false
},
this.comboxPAYABLEAT, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPAYABLEAT',
readOnly: false
}
]
}
, {
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
{
fieldLabel: Zi.LAN.NOBILL,
flex: 1,
name: 'NOBILL'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISNOBILL',
readOnly: false
},
{
fieldLabel: Zi.LAN.COPYNOBILL,
flex: 1,
name: 'COPYNOBILL'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISCOPYNOBILL',
readOnly: false
},
{ xtype: 'hiddenfield', flex: 1.06 }
]
}
]
},
//#endregion
{ xtype: 'hiddenfield', flex: 0.1 }
]
}
//#endregion
,
//#region 第二块 集装箱信息
this.panelBodyCtn
//#endregion
,
//#region 第三块 唛头货描 货物简单信息
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
defaults: {
//anchor: '100%'
},
items: [
//#region 第一栏 唛头
{
xtype: 'container',
flex: 1,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'label',
html: '<html>Marks & Nos.<br>(标记与号码) </html>' //Zi.LAN.MARKSSTR, //'<html>Seal No.(封志号)<br> Marks & Nos.(标记与号码) </html>'
},
{
xtype: 'button',
//hidden:true,
text: "14",
handler: function (button, event) {
this.FormatTextarea(14, "MARKS");
},
scope: this
},
{
xtype: 'button',
text: "15",
handler: function (button, event) {
this.FormatTextarea(15, "MARKS");
},
scope: this
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISMARKS',
readOnly: false
},
{
xtype: 'label',
flex: 1,
id: 'MARKSSTR',
html: "<font color='green'></font>"
}]
}
,
{
xtype: 'textareafield',
grow: true,
height: 250,
//width:200,
name: 'MARKS',
anchor: '100%',
enableKeyEvents: true,
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.SetShipperLable('MARKS', 14);
_this.formEdit.getForm().findField('MARKS').setValue(field.value.toUpperCase());
},
keyup: function (field, The, eOpts) {
var STR = Ext.getCmp("MARKS" + 'STR');
STR.setText(field.value.length + "字", false);
}
}
}]
}
//#endregion
,
//#region 第二栏 货描
{
xtype: 'container',
flex: 1,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'label',
html: Zi.LAN.DESCRIPTIONSTR,
//'<html>&nbsp&nbsp&nbsp&nbsp&nbspDescription of Goods <br>&nbsp&nbsp&nbsp&nbsp&nbsp(包装种类与货名)</html>'
},
{
xtype: 'button',
text: "30",
handler: function (button, event) {
this.FormatTextarea(30, "DESCRIPTION");
},
scope: this
},
{
xtype: 'button',
text: "35",
handler: function (button, event) {
this.FormatTextarea(35, "DESCRIPTION");
},
scope: this
},
{
xtype: 'button',
text: "47",
handler: function (button, event) {
this.FormatTextarea(47, "DESCRIPTION");
},
scope: this
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISDESCRIPTION',
readOnly: false
},
{
xtype: 'label',
flex: 1,
id: 'DESCRIPTIONSTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: '&nbsp&nbsp',
labelSeparator: '',
labelWidth: 20,
height: 250,
name: 'DESCRIPTION',
anchor: '100%',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.SetShipperLable('DESCRIPTION', 30);
_this.formEdit.getForm().findField('DESCRIPTION').setValue(field.value.toUpperCase());
}
}
}]
}
//#endregion
,
//#region 第三栏 货物简单信息
{
xtype: 'container',
flex: 2,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'fieldset',
flex: 2,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: Zi.LAN.HSCODE,
name: 'ISHSCODE',
flex:1
}
, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISHSCODE',
readOnly: false
},
{
readOnly: false,
fieldLabel: Zi.LAN.ISCONTAINERSOC,
//'是否SOC',
flex: 1,
inputValue: true,
id: "ISCONTAINERSOC",
name: 'ISCONTAINERSOC'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
id: "ISISCONTAINERSOC",
name: 'ISISCONTAINERSOC',
readOnly: false
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [
{
fieldLabel: "集装箱",
flex:2.04,
name: 'CNTRTOTAL'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISCNTRTOTAL',
readOnly: false
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
fieldLabel: Zi.LAN.zPKGS,
//'总件数',
flex: 1,
labelWidth: 70,
readOnly: true,
name: 'PKGS'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISPKGS',
readOnly: false
}, {
fieldLabel: Zi.LAN.KINDPKGS,
//'包装',
flex: 1,
labelWidth: 70,
readOnly: true,
name: 'KINDPKGS'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISKINDPKGS',
readOnly: false
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
labelWidth: 70,
flex:1,
fieldLabel: Zi.LAN.zKGS,
//'总重量',
name: 'KGS'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISKGS',
readOnly: false
},
{
xtype:'hiddenfield',flex:1.055
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [
{
labelWidth: 70,
flex: 1,
fieldLabel: Zi.LAN.zCBM,
//'总尺码',
name: 'CBM'
}, {
fieldLabel: "",
labelWidth: 0,
flex: 0.04,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISCBM',
readOnly: false
},
{
xtype: 'hiddenfield', flex: 1.055
}]
}]
},
//#region 右侧下方隐藏部分1 危险品相关
{
xtype: 'fieldset',
id: "WXPPANEL",
hidden: true,
flex: 2,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
labelWidth: 70,
fieldLabel: "危险品类别",
name: 'DCLASS'
},
{
labelWidth: 70,
fieldLabel: "危险品编号",
name: 'DUNNO'
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
labelWidth: 70,
fieldLabel: "危险品页号",
name: 'DPAGE'
},
{
labelWidth: 70,
fieldLabel: "危险品标签",
name: 'DLABEL'
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
labelWidth: 70,
fieldLabel: "危险品联系人",
name: 'LINKMAN'
}]
}]
}
//#endregion
,
//#region 右侧下方隐藏部分2 冻柜相关
{
xtype: 'fieldset',
id: "DGPANEL",
hidden: true,
flex: 2,
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
labelWidth: 70,
fieldLabel: "设置温度",
name: 'TEMPSET'
},
{
labelWidth: 70,
fieldLabel: "温度单位",
name: 'TEMPID'
}]
},
{
xtype: 'container',
//flex:1,
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
labelWidth: 70,
fieldLabel: "通风度",
name: 'REEFERF'
},
{
labelWidth: 70,
fieldLabel: "湿度",
name: 'HUMIDITY'
}]
}]
}
//#endregion
]
}
//#endregion
]
}
//#endregion
,
//#region 右边
{
xtype: 'container',
hidden: true,
layout: 'anchor',
flex: 3,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxFORWARDER]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxAgent]
},
{
xtype: 'container',
layout: 'hbox',
//flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.AGENT,
//'AGENT',
name: 'AGENT',
xtype: 'textareafield',
grow: true,
height: 50,
anchor: '100%',
flex: 1.8,
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formEdit.getForm().findField('AGENT').setValue(field.value.toUpperCase());
}
}
},
{
xtype: 'container',
layout: 'anchor',
defaultType: 'textfield',
items: [this.comboxSHIPAGENCY, {
fieldLabel: Zi.LAN.DELIVERYDATE,
//'ATD',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'DELIVERYDATE'
}]
}]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxLANE, this.comboxCUSTOMSER, this.comboxPKGTYPE, this.comboxTRADETERM]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxWAREHOUSE, this.comboxTRUCKER, this.comboxFRCUSTSERVICE]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
]
}]
}
//#endregion
, {
xtype: 'container',
hidden: true,
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
defaults: {
anchor: '99%'
},
items: [{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
fieldLabel: Zi.LAN.ATD,
//'ATD',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'ATD'
}]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
fieldLabel: Zi.LAN.ETA,
//'预抵日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'ETA'
}]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
xtype: 'container',
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
items: [
]
},
{
xtype: 'container',
layout: 'anchor',
flex: 3,
defaultType: 'textfield',
items: [{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [this.comboxGOODSNAME]
}]
},
{
xtype: 'container',
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'label',
html: Zi.LAN.NOPKGS,
//'<html>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspNo.of containers or pkgs.<br>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp箱数或件数)</html>'
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: '&nbsp&nbsp',
labelWidth: 20,
labelSeparator: '',
height: 40,
name: 'NOPKGS',
anchor: '100%',
listeners: {
scope: this,
change: function (field, newValue, oldValue, eOpts) {
if (newValue == null || newValue == '') return;
if (newValue != oldValue) {
var SS = newValue;
var i = SS.indexOf("\n");
var num = 0;
if (i > 0) {
var slist = SS.split("\n");
for (var i = 0; i < slist.length; i += 1) {
var member = slist[i];
var str_num = this.GetStringNum(member);
if (i == 0) {
var str_kind = member.substring(str_num.length);
}
num = parseFloat(num).add(parseFloat(str_num));
}
this.formEdit.getForm().findField('PKGS').setValue(num);
this.formEdit.getForm().findField('KINDPKGS').setValue(str_kind);
this.formEdit.getForm().findField('TOTALNO').setValue('SAY:' + ToEn(num).toUpperCase() + ' ' + str_kind + ' ONLY.');
} else {
var str_num = this.GetStringNum(SS);
var str_kind = SS.substring(str_num.length);
this.formEdit.getForm().findField('PKGS').setValue(str_num);
this.formEdit.getForm().findField('KINDPKGS').setValue(str_kind);
this.formEdit.getForm().findField('TOTALNO').setValue('SAY:' + ToEn(str_num).toUpperCase() + ' ' + str_kind + ' ONLY.');
}
}
}
}
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [
]
},
{
xtype: 'label',
html: Zi.LAN.GROSSWEIGHT,
//'&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Gross Weight 毛重(公斤)'
},
{
xtype: 'textareafield',
grow: true,
height: 40,
labelWidth: 20,
labelSeparator: '',
fieldLabel: '&nbsp&nbsp',
name: 'GROSSWEIGHT',
anchor: '100%',
listeners: {
scope: this,
change: function (field, newValue, oldValue, eOpts) {
if (newValue == null || newValue == '') return;
if (newValue != oldValue) {
var SS = newValue;
var i = SS.indexOf("\n");
var num = 0;
if (i > 0) {
var slist = SS.split("\n");
for (var i = 0; i < slist.length; i += 1) {
var member = slist[i];
var str_num = this.GetStringNum(member);
num = parseFloat(num).add(parseFloat(str_num));
}
this.formEdit.getForm().findField('KGS').setValue(num);
} else {
var str_num = this.GetStringNum(SS);
this.formEdit.getForm().findField('KGS').setValue(str_num);
}
}
}
}
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'label',
width: 50,
text: Zi.LAN.KGS,
//'KGS'
}]
},
{
xtype: 'label',
html: Zi.LAN.MEASUREMENT,
//'&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Measurement 尺码(立方米)'
},
{
xtype: 'textareafield',
grow: true,
height: 40,
labelWidth: 20,
labelSeparator: '',
fieldLabel: '&nbsp&nbsp',
name: 'MEASUREMENT',
anchor: '100%',
listeners: {
scope: this,
change: function (field, newValue, oldValue, eOpts) {
if (newValue == null || newValue == '') return;
if (newValue != oldValue) {
var SS = newValue;
var i = SS.indexOf("\n");
var num = 0;
if (i > 0) {
var slist = SS.split("\n");
for (var i = 0; i < slist.length; i += 1) {
var member = slist[i];
var str_num = this.GetStringNum(member);
num = parseFloat(num).add(parseFloat(str_num));
}
this.formEdit.getForm().findField('CBM').setValue(num);
} else {
var str_num = this.GetStringNum(SS);
this.formEdit.getForm().findField('CBM').setValue(str_num);
}
}
}
}
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
xtype: 'label',
width: 50,
text: Zi.LAN.CBM,
//'CBM'
}]
}]
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.TOTALNO,
//'件数大写',
name: 'TOTALNO'
}]
},
this.panelBodyDr, this.panelBodyRf, {
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
fieldLabel: Zi.LAN.ISSUEDATE,
//'签单日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ISSUEDATE'
},
this.comboxISSUEPLACE, {
name: 'ISSUEPLACE'
}]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
fieldLabel: Zi.LAN.ISGAIQIAN,
//'是否改签',
flex: 0.5,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISGAIQIAN'
}]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
flex: 2,
fieldLabel: Zi.LAN.REMARK,
//'备注',
height: 60,
name: 'REMARK',
anchor: '100%'
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.OTREMARK,
//'备注',
height: 60,
name: 'OPERATORFAX',
anchor: '100%'
}]
}]
}
]
});
//#endregion formEdit end
//#region 拒绝截单 的窗口
this.formAuditBack = Ext.widget('form', {
frame: true,
region: 'center',
title: "<a href='#'><font color='#FF0000'>拒绝原因</font></a>",
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{
xtype: 'textfield',
grow: true,
fieldLabel: '邮箱',
labelSeparator: '',
labelWidth: 40,
//height: 100,
name: 'EMAIL',
anchor: '100%'
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: '',
labelSeparator: '',
labelWidth: 0,
height: 100,
name: 'ORREASON',
anchor: '100%'
}
] //end root items
});
//#endregion
me = this;
this.winAuditBackShow = Ext.create('Ext.window.Window', {
title: "拒绝截单",
width: 450,
//height : 120,
//plain : true,
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true,
// 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.formAuditBack],
buttons: [{
text: "确认拒绝",
minWidth: 70,
handler: function () {
var form = me.formAuditBack.getForm();
var EMAIL = form.findField('EMAIL').getValue();
if (isNullorEmpty(EMAIL)) {
Ext.Msg.show({
title: '提示',
msg: '邮箱为必填!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
};
me.email = EMAIL;
var ORREASON = form.findField('ORREASON').getRawValue();
if (ORREASON == '' || ORREASON == null || ORREASON == undefined) {
Ext.Msg.show({
title: '提示',
msg: '驳回原因为必填!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
};
me.reason = '' + ORREASON;
me.Reject();
}
},
{
text: "关闭",
minWidth: 70,
handler: function () {
me.winAuditBackShow.close();
}
}]
});
//#region 按钮Toolbar
_this = this;
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [{
id: 'btnEPrev',
text: Zi.LAN.btnEPrev,
//"上一票",
// iconCls: "btnsave",
handler: function (button, event) {
this.PrevRecord();
},
scope: this
},
{
id: 'btnENext',
text: Zi.LAN.btnENext,
//"下一票",
// iconCls: "btnsave",
handler: function (button, event) {
this.NextRecord();
},
scope: this
},
{
id: 'btnESave',
text: "确认引入",
iconCls: "btnsave",
handler: function (button, event) {
//this.checkRules();
//if (this.ruleCheckFail) {
// //Ext.MessageBox.alert("提示", "表单校验不满足如下规则:<br/><b>" + this.ruleCheckNames + "</b><br/>不允许保存");
// //return;
//}
//this.SaveAms('0');
//this.Save('0');
Ext.MessageBox.confirm('提示', '确定要引入该记录吗本地业务中的相应数据项会被SI中的数据所覆盖',
function (btn) {
if (btn == 'yes') {
_this.Save("false");
}
});
},
scope: this
},
{
id: 'btnReject',
text: "拒绝截单",
tooltip: "",
iconCls: "btnsave",
handler: function (button, event) {
Ext.MessageBox.confirm('提示', '此票提单确认将被退回,确定吗?',
function (btn) {
if (btn == 'yes') {
//_this.Reject("true");
var form = _this.formAuditBack.getForm();
var EMAIL = form.findField('EMAIL');
var formdata = _this.formHead.getForm().getValues(false, false, false);
var recemail = formdata.OPERATORMAIL;
EMAIL.setRawValue(recemail);
_this.winAuditBackShow.show();
}
});
},
scope: this
},
{
id: 'btnESaveAndClose',hidden:true,
text: Zi.LAN.btnESaveAndClose,
//"保存并关闭",
handler: function (button, event) {
//this.SaveAms('1');
//this.Save('1');
},
scope: this
},
'-', {
text: Zi.LAN.btnprint,
//"打印",
iconCls: "btnprint",
handler: function (button, event) {
this.Print();
},
scope: this
}]
}); //end 按钮Toolbar
//#endregion
//#region 舱单分票明细
this.storeManifestList = Ext.create('Ext.data.Store', {
model: 'MsOpManifestDetail',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetManifestList',
reader: {
id: 'BSNO,GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeBodyListCombox = Ext.create('Ext.data.Store', {
model: 'MsOpSeaeDetail',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetBodyList',
reader: {
id: 'BSNO,CTNCODE,CTN_ID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.comboxCTNNO = Ext.create('DsExt.ux.RefTableCombox', {
store: this.storeBodyList,
valueField: 'CNTRNO',
displayField: 'CNTRNO'
});
this.gridListManifestCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.MNGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridListManifest = new Ext.grid.GridPanel({
store: this.storeManifestList,
enableHdMenu: false,
region: 'west',
height: 750,
loadMask: {
msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng
},
//"数据加载中,请稍等..."
trackMouseOver: true,
disableSelection: false,
selModel: this.MNGridCheckBoxModel,
plugins: [this.gridListManifestCellEditing],
selType: 'cellmodel',
tbar: [{
text: Zi.LAN.btnadddetail,
//'增加明细',
tooltip: Zi.LAN.btnadddetail,
//'增加明细',
id: "btnaddmanifestdetail",
iconCls: "btnadddetail",
handler: function (button, event) {
this.onAddMNDetailClick(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.btnsavemanifestDelivery,
//'保存明细',
tooltip: Zi.LAN.btnsavemanifestDelivery,
//'保存明细',
id: "btnsavemanifestDelivery",
iconCls: "btnsave",
handler: function (button, event) {
this.onPostMNDetailClick();
},
scope: this
},
'-', {
text: Zi.LAN.btndeldetail,
//'删除明细',
tooltip: Zi.LAN.btndeldetail,
//'删除明细',
id: "btndelmanifestdetail",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelMNDetailClick(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.YinRuEXCELShuJu,
//'引入EXCEL数据',
handler: function (button, event) {
this.onImportMNClick(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.ChuanDaiCangDan,
//"船代舱单",
menu: [{
text: Zi.LAN.ExportManifestXML,
//"导出舱单XML",
handler: function (menu, event) {
_this.winExportXmlManifestShow.show();
}
},
{
text: Zi.LAN.DSManifest,
//"直发舱单",(分单)
handler: function (menu, event) {
_this.winDSMANIFESTShow_HBLNO.show();
}
}],
scope: this
},
'-', {
iconCls: "btnmore",
handler: function (button, event) {
_this.winManifestshow.show();
},
scope: this
}],
columns: [{
sortable: true,
dataIndex: 'GID',
header: Zi.LAN.GID2,
//'编号',
hidden: true,
width: 0
},
{
sortable: true,
dataIndex: 'BSNO',
header: Zi.LAN.BSNO2,
//'业务编号',
hidden: true,
width: 0
},
{
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO3,
//'分单号',
width: 130
},
{
dataIndex: 'CNTRNO',
header: Zi.LAN.CNTRNO,
//'箱号',
width: 100
},
{
dataIndex: 'SEALNO',
header: Zi.LAN.SEALNO,
//'封号',
width: 80
},
{
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.PKGS,
//'件数',
width: 60
},
{
dataIndex: 'KINDPKGS',
header: Zi.LAN.KINDPKGS,
//'包装',
width: 70,
editor: this.comboxKINDPKGS_CTN
},
{
dataIndex: 'KGS',
header: Zi.LAN.KGS3,
//'重量',
width: 60
},
{
dataIndex: 'CBM',
header: Zi.LAN.CBM2,
//'尺码',
width: 60
},
{
dataIndex: 'REMARK',
header: Zi.LAN.REMARK,
//'备注',
width: 150
}]
});
this.formManifestDescription = Ext.widget('form', {
region: 'center',
title: Zi.LAN.formManifestDescription,
//'舱单分票货描信息',
frame: true,
bodyPadding: 5,
collapsed: false,
collapsible: true,
layout: 'hbox',
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'anchor',
flex: 4,
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.GID,
//'GID',
name: 'GID',
hidden: true
},
{
fieldLabel: 'MBLNO',
//'GID',
name: 'MBLNO',
hidden: true
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.DESCRIPTION,
//'货物描述',
height: 220,
name: 'DESCRIPTION',
anchor: '100%',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
this.upMNDescription();
}
}
}]
}] //end items(fieldset 1)
}); //end this.formEdit
//this.gridListManifest.addListener('itemclick', function (dataview, record, item, index, e, b) {
// this.formManifestDescription.getForm().findField('DESCRIPTION').setValue(record.data.DESCRIPTION);
// this.formManifestDescription.getForm().findField('GID').setValue(record.data.GID);
// this.formManifestDescription.getForm().findField('MBLNO').setValue(record.data.MBLNO);
//}, this);
this.storeManifestList.on('load',
function (store, records) {
if (store.getCount() > 0) {
this.gridListManifest.getSelectionModel().select(0);
}
},
this);
this.gridListManifest.on('edit',
function (editor, e, eOpts) {
this.gridListManifestAfterEdit(editor, e, eOpts);
},
this);
this.storeManifestSumList = Ext.create('Ext.data.Store', {
model: 'MsOpManifestDetail',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetManifestSumList',
reader: {
id: 'BSNO',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.gridListManifestSum = new Ext.grid.GridPanel({
store: this.storeManifestSumList,
enableHdMenu: false,
region: 'south',
height: 150,
loadMask: {
msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng
},
//"数据加载中,请稍等..."
trackMouseOver: true,
disableSelection: false,
selType: 'cellmodel',
tbar: [{
xtype: 'label',
text: Zi.LAN.FenPiaoHeJi,
style: 'font-size:18px',
labelColor: '#000',
//style:'background-color: #4b9bf5',
x: '5%',
y: '5%'
}],
columns: [{
sortable: true,
dataIndex: 'GID',
header: Zi.LAN.GID2,
//'编号',
hidden: true,
width: 0
},
{
sortable: true,
dataIndex: 'BSNO',
header: Zi.LAN.BSNO2,
//'业务编号',
hidden: true,
width: 0
},
{
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO3,
//'分单号',
width: 130
},
{
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.PKGS,
//'件数',
width: 60
},
{
dataIndex: 'KGS',
header: Zi.LAN.KGS3,
//'重量',
width: 60
},
{
dataIndex: 'CBM',
header: Zi.LAN.CBM2,
//'尺码',
width: 60
}]
});
this.panelManifestList = new Ext.Panel({
layout: "border",
region: 'north',
height: 400,
animate: true,
autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.gridListManifest, this.formManifestDescription, this.gridListManifestSum]
});
this.panelManifest = new Ext.Panel({
title: Zi.LAN.panelManifest,
//'舱单分票信息',
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.panelManifestList]
});
//#endregion
//#region 编辑formedi edi信息
//this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
// fields: [
// { name: 'CUSTOMER', type: 'string' },
// { name: 'ENTERPID', type: 'string' }
// ],
// proxy: { url: '/MvcShipping/MsOpApply/GetENTERPLIST' }
//});
//this.storeEnterpCode.load();
//this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: Zi.LAN.ENTERP, //'经营单位',
// store: this.storeEnterpCode,
// name: 'ENTERP',
// valueField: 'CUSTOMER',
// displayField: 'CUSTOMER',
// listeners: {
// scope: this,
// 'select': function (combo, records, eOpts) {
// if (records.length > 0) {
// var Cargoinforecords = DsStoreQueryBy(this.storeEnterpCode, 'CUSTOMER', combo.value);
// if (Cargoinforecords.getCount() > 0) {
// var Cargoinfodata = Cargoinforecords.getAt(0).data;
// this.formEDI.getForm().findField('ENTERPID').setValue(Cargoinfodata.ENTERPID);
// } else {
// this.formEDI.getForm().findField('ENTERPID').setValue('');
// }
// }
// }
// }
//});
//#endregion
//客户加载_报关报检
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCustomRefListEnterp'
}
});
//报关行
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.ENTERP,
//'报关行',
store: this.storeEnterpCode,
// forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'ENTERP',
valueField: 'CustName',
displayField: 'CodeAndName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
//var Cargoinforecords = DsStoreQueryBy(this.storeEnterpCode, 'CUSTOMER', combo.value);
//if (Cargoinforecords.getCount() > 0) {
// var Cargoinfodata = Cargoinforecords.getAt(0).data;
// this.formEDI.getForm().findField('ENTERPID').setValue(Cargoinfodata.ENTERPID);
//} else {
// this.formEDI.getForm().findField('ENTERPID').setValue('');
//}
}
}
}
});
this.storeCrmKeyCodeCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CrmKeyCodeModel',
proxy: {
url: '/CommMng/BasicDataRef/GetCrmKeyCodeList'
}
});
this.storeCrmKeyCodeCode.load({
params: {
condition: " and KEYTYPE='贸易方式'"
}
});
this.comboxTRADETYPE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.TERMSDELIVERY,
//'贸易方式',
store: this.storeCrmKeyCodeCode,
forceSelection: true,
id: 'TERMSDELIVERY',
name: 'TERMSDELIVERY',
valueField: 'KEYVALUE',
displayField: 'KEYVALUE'
});
this.storeINSPECTSERVICE = Ext.create('DsExt.ux.RefEnumStore', {});
this.storeINSPECTSERVICE.load({
params: {
enumTypeId: 97024
}
});
this.comboxINSPECTSERVICE = Ext.create('DsExt.ux.RefEnumCombox', {
fieldLabel: Zi.LAN.INSPECTSERVICE,
//'报检项目',
store: this.storeINSPECTSERVICE,
forceSelection: true,
name: 'INSPECTSERVICE'
});
this.storeListPort = Ext.create('Ext.data.Store', {
pageSize: 50,
model: 'DsShipping.ux.CodeDisportModel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/CommMng/BasicDataRef/GetCodeDisportList',
reader: {
id: 'PORT',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.comboxLASTPORTOFCALL = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '最后境外港',
//'卸货港',
store: this.storeCodeDisport8,
name: 'LASTPORTOFCALLID',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
valueField: 'EDICODE',
displayField: 'CodeAndName'
});
this.formEDI = Ext.widget('form', {
region: 'north',
title: Zi.LAN.formEDI,
//'其他信息',
frame: true,
bodyPadding: 5,
collapsed: false,
collapsible: true,
layout: 'hbox',
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'anchor',
flex: 4,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CUSTOMNO,
//'报关单号',
name: 'CUSTOMNO'
},
{
fieldLabel: Zi.LAN.CUSTOMDATE,
//'报关日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'CUSTOMDATE'
},
{
fieldLabel: Zi.LAN.INSPECTIONNO,
//'商检单号',
name: 'INSPECTIONNO'
},
{
fieldLabel: Zi.LAN.INSPECTIONDATE,
//'商检日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'INSPECTIONDATE'
}]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.comboxEnterp, {
fieldLabel: Zi.LAN.ENTERPID,
//'单位编码',
name: 'ENTERPID'
},
{
fieldLabel: Zi.LAN.CUSTOMSNUM,
//'报关票数',
name: 'CUSTOMSNUM'
},
{
fieldLabel: Zi.LAN.CLEARCUSTOMDATE,
//'通关日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'CLEARCUSTOMDATE'
}]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ISMOREGOOD,
//'是否多品名',
flex: 0.5,
inputValue: true,
xtype: 'checkboxfield',
name: 'ISMOREGOOD'
},
this.comboxTRADETYPE, this.comboxINSPECTSERVICE, this.comboxVoyVeg2]
}]
},
{
xtype: 'container',
layout: 'anchor',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.EDIREMARK,
//'EDI备注',
height: 45,
name: 'EDIREMARK',
anchor: '100%'
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.VOYNO2N,
//'二程航次',
name: 'VOYNO2N'
},
{
fieldLabel: Zi.LAN.VESSELID2N,
//'二程航次',
name: 'VESSELID2N'
}]
}]
}
] //end items(fieldset 1)
}); //end this.formEdit
this.StoreAMSCOUNTRY = Ext.create('Ext.data.Store', {
fields: ['COUNTRY']
});
this.StoreAMSCOUNTRY.add({
"COUNTRY": "USD"
});
this.StoreAMSCOUNTRY.add({
"COUNTRY": "CANADA"
});
this.StoreAMSCOUNTRY.add({
"COUNTRY": "BRAZIL"
});
this.comboxAMSCOUNTRY = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.BYCOUNTRY,
//'所在国家',
store: this.StoreAMSCOUNTRY,
forceSelection: true,
name: 'BYCOUNTRY',
valueField: 'COUNTRY',
displayField: 'COUNTRY'
});
this.comboxLASTPORTOFCALL = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '最后境外港',
//'卸货港',
store: this.storeCodeDisport8,
labelWidth: 90,
name: 'LASTPORTOFCALLID',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
valueField: 'EDICODE',
displayField: 'CodeAndName'
});
this.comboxFIRSTPORTOFCALL = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '第一个停靠港',
//'卸货港',
store: this.storeCodeDisport9,
labelWidth: 90,
name: 'FIRSTPORTOFCALLID',
// forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'PORT',
valueField: 'EDICODE',
displayField: 'CodeAndName'
});
this.formAMS = Ext.widget('form', {
region: 'center',
frame: true,
bodyPadding: 5,
collapsed: false,
collapsible: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.KINGTAREWEIGHT,
//'第一层包装皮重',
labelWidth: 90,
value: 0,
name: 'KINGTAREWEIGHT'
},
{
name: 'SHIPPERNAME',
hidden: true
},
{
name: 'SHIPPERCODE',
hidden: true
},
{
name: 'SHIPPERADDR1',
hidden: true
},
{
name: 'SHIPPERADDR2',
hidden: true
},
{
name: 'SHIPPERADDR3',
hidden: true
},
{
name: 'SHIPPERCITY',
hidden: true
},
{
name: 'SHIPPERPROVINCE',
hidden: true
},
{
name: 'SHIPPERCOUNTRY',
hidden: true
},
{
name: 'SHIPPERPOSTCODE',
hidden: true
},
{
name: 'SHIPPERATTN',
hidden: true
},
{
name: 'SHIPPERTEL',
hidden: true
},
{
name: 'SHIPPEREMAIL',
hidden: true
},
{
name: 'CONSIGNEECODE',
hidden: true
},
{
name: 'CONSIGNEENAME',
hidden: true
},
{
name: 'CONSIGNEEADDR1',
hidden: true
},
{
name: 'CONSIGNEEADDR2',
hidden: true
},
{
name: 'CONSIGNEEADDR3',
hidden: true
},
{
name: 'CONSIGNEECITY',
hidden: true
},
{
name: 'CONSIGNEEPROVINCE',
hidden: true
},
{
name: 'CONSIGNEEATTN',
hidden: true
},
{
name: 'CONSIGNEETEL',
hidden: true
},
{
name: 'CONSIGNEEEMAIL',
hidden: true
},
{
name: 'NOTIFYPARTYNAME',
hidden: true
},
{
name: 'NOTIFYPARTYCODE',
hidden: true
},
{
name: 'NOTIFYPARTYADDR1',
hidden: true
},
{
name: 'NOTIFYPARTYADDR2',
hidden: true
},
{
name: 'NOTIFYPARTYADDR3',
hidden: true
},
{
name: 'NOTIFYPARTYCITY',
hidden: true
},
{
name: 'NOTIFYPARTYPROVINCE',
hidden: true
},
{
name: 'NOTIFYPARTYATTN',
hidden: true
},
{
name: 'NOTIFYPARTYTEL',
hidden: true
},
{
name: 'NOTIFYPARTYEMAIL',
hidden: true
},
{
name: 'ENTERPRISECODETYPE',
hidden: true //企业代码类型
},
{
name: 'ENTERPRISECODETYPE1',
hidden: true //企业代码类型
},
{
name: 'ENTERPRISECODETYPE2',
hidden: true //企业代码类型
},
this.comboxLASTPORTOFCALL, {
fieldLabel: '日期',
//'报关日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'LASTPORTOFCALLDATE'
},
this.comboxFIRSTPORTOFCALL, {
fieldLabel: '日期',
//'报关日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'FIRSTPORTOFCALLDATE'
},
{
fieldLabel: Zi.LAN.NVONO,
//'SCAC编号',
name: 'NVONO'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.ORDERREMARK,
//'订舱人说明',
height: 60,
name: 'ORDERREMARK',
anchor: '100%'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.BSNO2,
//'业务编号',
name: 'BSNO',
hidden: true
},
{
fieldLabel: Zi.LAN.AMSNO,
//'AMSNO',
name: 'AMSNO',
hidden: true
},
{
fieldLabel: Zi.LAN.AMSCODE,
//'AMS代码',
name: 'AMSCODE'
},
{
fieldLabel: Zi.LAN.ORDERNO,
//'定舱号',
name: 'ORDERNO'
},
this.comboxAMSCOUNTRY, {
fieldLabel: Zi.LAN.SCACCODE,
//'SCAC编号',
name: 'SCACCODE'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ITNCODE,
//'ITN编号',
name: 'ITNCODE'
},
{
fieldLabel: Zi.LAN.GOODSNCM,
//'货物NCM号',
name: 'GOODSNCM'
},
{
fieldLabel: Zi.LAN.ATTN,
//'联系人',
name: 'ATTN'
},
{
fieldLabel: Zi.LAN.ATTNTEL,
//'联系人电话',
name: 'ATTNTEL'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ATTNEMAIL,
//'联系人邮箱',
name: 'ATTNEMAIL'
},
{
fieldLabel: Zi.LAN.ATTNADDR,
//'联系人地址',
flex: 3,
name: 'ATTNADDR'
}]
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.AMSSHIPPER,
//'AMS发货人',
height: 60,
name: 'AMSSHIPPER',
anchor: '100%'
}]
},
{
xtype: 'container',
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CONSIGNEEPOSTCODE,
//'收货人邮编',
name: 'CONSIGNEEPOSTCODE'
},
{
fieldLabel: Zi.LAN.CONSIGNEETAXNO,
//'收货人税号',
name: 'CONSIGNEETAXNO'
},
{
fieldLabel: Zi.LAN.CONSIGNEECOUNTRY,
//'收货人国家',
name: 'CONSIGNEECOUNTRY'
}]
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.AMSCONSIGNEE,
//'AMS收货人',
height: 60,
name: 'AMSCONSIGNEE',
anchor: '100%'
}]
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.NOTIFYPARTYPOSTCODE,
//'通知人邮编',
name: 'NOTIFYPARTYPOSTCODE'
},
{
fieldLabel: Zi.LAN.NOTIFYPARTYTAXNO,
//'通知人税号',
name: 'NOTIFYPARTYTAXNO'
},
{
fieldLabel: Zi.LAN.NOTIFYPARTYCOUNTRY,
//'通知人国家',
name: 'NOTIFYPARTYCOUNTRY'
}]
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.AMSNOTIFYPARTY,
//'AMS通知人',
height: 60,
name: 'AMSNOTIFYPARTY',
anchor: '100%'
},
{
xtype: 'button',
text: "30",
handler: function (button, event) {
this.FormatTextarea1(30, "NOTIFYPARTYID2");
},
scope: this
},
{
xtype: 'button',
text: "35",
handler: function (button, event) {
this.FormatTextarea1(35, "NOTIFYPARTYID2");
},
scope: this
},
{
xtype: 'button',
text: "40",
handler: function (button, event) {
this.FormatTextarea1(40, "NOTIFYPARTYID2");
},
scope: this
},
{
xtype: 'label',
flex: 1,
id: 'NOTIFYPARTYID2STR',
html: "<font color='green'></font>"
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.NOTIFYPARTYID2,
//'Also Notify Party第二通知人'
height: 60,
name: 'NOTIFYPARTYID2',
anchor: '100%',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
//_this.SetShipperLable('NOTIFYPARTYID2', 30);
var fieldname = "NOTIFYPARTYID2";
var len = 30;
//var basicForm = _this.formAMS.getForm();
//var field = basicForm.findField(fieldname);
var shipperstr = Ext.getCmp(fieldname + 'STR');
var str = Billstrnum(field.getValue(), len);
shipperstr.setText(str, false);
_this.formAMS.getForm().findField('NOTIFYPARTYID2').setValue(field.value.toUpperCase());
}
}
}]
},
{
xtype: 'container',
layout: 'anchor',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: []
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.DOORADDR,
//'到门地址',
height: 80,
name: 'DOORADDR',
anchor: '100%'
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.BSNOLIST,
//'拆并单列表',
height: 80,
name: 'BSNOLIST',
anchor: '100%'
}]
}]
}]
}
] //end items(fieldset 1)
}); //end this.formEdit
//#region 编辑太平edi信息录入
//太平销售的edi代码
this.StoreSalesRepCode = Ext.create('Ext.data.Store', {
fields: ['ID', 'NAME']
});
this.StoreSalesRepCode.add({
"ID": "CN087",
"NAME": "CN087 | GRACE SUN"
});
this.StoreSalesRepCode.add({
"ID": "CN096",
"NAME": "CN096 | LEON LIANG"
});
this.StoreSalesRepCode.add({
"ID": "CN097",
"NAME": "CN097 | CHARLES GAO"
});
this.StoreSalesRepCode.add({
"ID": "CN098",
"NAME": "CN098 | TERESA LIU SHAN"
});
this.StoreSalesRepCode.add({
"ID": "CN106",
"NAME": "CN106 | HOKI YU"
});
this.StoreSalesRepCode.add({
"ID": "CN107",
"NAME": "CN107 | WILLIAM YANG JING YU"
});
this.StoreSalesRepCode.add({
"ID": "CN099",
"NAME": "CN099 | HELEN ZHANG"
});
this.StoreSalesRepCode.add({
"ID": "CN100",
"NAME": "CN100 | LEOREN"
});
this.comboxSalesRepCode = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreSalesRepCode,
fieldLabel: Zi.LAN.SalesRepCode,
//"太平销售Edi代码",
labelWidth: 100,
forceSelection: false,
allowBlank: true,
matchFieldWidth: false,
//下拉款自适应宽度
name: 'SalesRepCode',
valueField: 'ID',
displayField: 'NAME'
});
//分单发送人太平代码MasterBOLIndicator
this.StoreMasterBOLIndicator = Ext.create('Ext.data.Store', {
fields: ['ID', 'NAME']
});
this.StoreMasterBOLIndicator.add({
"ID": "1",
"NAME": "Carrier filing HBL | 船公司发HBL"
});
this.StoreMasterBOLIndicator.add({
"ID": "2",
"NAME": "Self filing HBL | 自己发"
});
this.StoreMasterBOLIndicator.add({
"ID": "3",
"NAME": "Not Applicable/Straight bl | 无HBL"
});
this.comboxMasterBOLIndicator = Ext.create('DsExt.ux.RefTableCombox', {
store: this.StoreMasterBOLIndicator,
fieldLabel: "Master BOL Indicator",
labelWidth: 120,
forceSelection: true,
allowBlank: true,
matchFieldWidth: false,
//下拉款自适应宽度
name: 'MasterBOLIndicator',
valueField: 'ID',
displayField: 'NAME'
});
this.formAMSPIL = Ext.widget('form', {
title: Zi.LAN.formAMSPIL,
//'新太平EDI信息',
region: 'center',
//south
height: 400,
frame: true,
bodyPadding: 5,
collapsed: false,
collapsible: true,
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 85,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ShipperEdiCode,
//'发货人Edi代码',
name: 'ShipperEdiCode'
},
{
fieldLabel: Zi.LAN.ConsigneeEdiCode,
//'收货人Edi代码',
name: 'ConsigneeEdiCode'
},
{
fieldLabel: Zi.LAN.NotifypartyEdiCode,
//'通知人Edi代码',
name: 'NotifypartyEdiCode'
},
this.comboxSalesRepCode, this.comboxMasterBOLIndicator] //, { xtype: 'hiddenfield'}
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ACIHBL,
//'ACI HBL',
name: 'ACIHBL'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.S0CC0C,
//'S0C C0C',
height: 50,
name: 'S0CC0C',
anchor: '100%'
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.cKHI,
//'欧盟港口、伊朗港口、KHI',
height: 50,
name: 'cKHI',
anchor: '100%'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.cNCM,
//'南美东',
height: 50,
name: 'cNCM',
anchor: '100%'
},
{
xtype: 'textareafield',
grow: true,
fieldLabel: Zi.LAN.wNCM,
//'巴西线的木质包装情况',
height: 50,
name: 'wNCM',
anchor: '100%'
}]
}] //end items(fieldset 1)
}); //end this.formEdit
//#endregion
//#region MASTER单信息
//客户加载_发货人
this.MstoreShipper = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperList'
}
});
this.MstoreShipper.load({
params: {
condition: "shippertype=2 AND ISPUBLIC=1 "
}
});
//发货人
this.McomboxShipper = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SHIPPERID,
//'Shipper (发货人)',
store: this.MstoreShipper,
labelWidth: 150,
labelAlign: 'left',
name: 'MSHIPPERID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var selectrecords = DsStoreQueryBy(this.MstoreShipper, 'SHORTNAME', combo.value);
if (selectrecords.getCount() > 0) {
var selectdata = selectrecords.getAt(0).data;
this.formMBL.getForm().findField('MSHIPPER').setValue(selectdata.SHIPPERDETAIL);
} else {
this.formMBL.getForm().findField('MSHIPPER').setValue('');
}
}
}
}
});
//客户加载_收货人
this.MstoreConsignee = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperList'
}
});
this.MstoreConsignee.load({
params: {
condition: "shippertype=1 AND ISPUBLIC=1 "
}
});
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//收货人
this.McomboxConsignee = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.CONSIGNEEID,
//'Consignee (收货人)',
labelWidth: 150,
labelAlign: 'left',
store: this.MstoreConsignee,
// forceSelection: true,
name: 'MCONSIGNEEID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var selectrecords = DsStoreQueryBy(this.MstoreConsignee, 'SHORTNAME', combo.value);
if (selectrecords.getCount() > 0) {
var selectdata = selectrecords.getAt(0).data;
this.formMBL.getForm().findField('MCONSIGNEE').setValue(selectdata.SHIPPERDETAIL);
} else {
this.formMBL.getForm().findField('MCONSIGNEE').setValue('');
}
}
}
}
});
//客户加载_通知人
this.Mstorenotifyparty = Ext.create('DsExt.ux.RefTableStore', {
model: 'OpSeaeShipper',
proxy: {
url: '/MvcShipping/MsOpSeae/GetShipperList'
}
});
this.Mstorenotifyparty.load({
params: {
condition: "shippertype=3 AND ISPUBLIC=1 "
}
});
// this.storeShipper.load({ params: { condition: "ISCONTROLLER='1'"} });
//通知人
this.McomboxNotifyParty = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.NOTIFYPARTYID,
//'Notify Party (通知人)',
store: this.Mstorenotifyparty,
labelWidth: 150,
labelAlign: 'left',
// forceSelection: true,
name: 'MNOTIFYPARTYID',
valueField: 'SHORTNAME',
displayField: 'CodeAndName',
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
if (records.length > 0) {
var selectrecords = DsStoreQueryBy(this.Mstorenotifyparty, 'SHORTNAME', combo.value);
if (selectrecords.getCount() > 0) {
var selectdata = selectrecords.getAt(0).data;
this.formMBL.getForm().findField('MNOTIFYPARTY').setValue(selectdata.SHIPPERDETAIL);
} else {
this.formMBL.getForm().findField('MNOTIFYPARTY').setValue('');
}
}
}
}
});
this.storeMFrt = Ext.create('DsExt.ux.RefTableStore', {
model: 'CODE_FRT',
proxy: {
url: '/CommMng/BasicDataRef/GetCodeFrtList'
}
});
this.storeMFrt.load({
params: {
condition: ""
}
});
this.comboxMBLFRT = Ext.create('DsExt.ux.RefTableCombox', {
flex: 1,
//hidden:false,
fieldLabel: "付费方式",
//'付费方式',
store: this.storeMFrt,
forceSelection: true,
name: 'MBLFRT',
valueField: 'FRT',
displayField: 'FRT'
});
this.formMBL = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
collapsed: false,
collapsible: true,
layout: 'hbox',
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 70,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
layout: 'anchor',
flex: 4,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'anchor',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.McomboxShipper, {
xtype: 'label',
flex: 1,
id: 'MSHIPPERSTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
height: 80,
name: 'MSHIPPER',
anchor: '100%'
}]
},
{
xtype: 'hiddenfield',
flex: 0.2
},
{
xtype: 'container',
layout: 'anchor',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.McomboxConsignee, {
xtype: 'label',
flex: 1,
id: 'MCONSIGNEESTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
height: 80,
name: 'MCONSIGNEE',
anchor: '100%'
}]
}]
},
{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'anchor',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [this.McomboxNotifyParty, {
xtype: 'label',
flex: 1,
id: 'MNOTIFYPARTYSTR',
html: "<font color='green'></font>"
}]
},
{
xtype: 'textareafield',
grow: true,
height: 80,
name: 'MNOTIFYPARTY',
anchor: '100%'
}]
},
{
xtype: 'hiddenfield',
flex: 0.2
},
{
xtype: 'container',
layout: 'anchor',
flex: 2,
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox',
flex: 1,
defaultType: 'textfield',
items: [{
xtype: 'hiddenfield',
flex: 1
}]
}]
}]
}]
}]
});
//#endregion
this.storeMFrt1 = Ext.create('DsExt.ux.RefTableStore', {
model: 'storeMFrt1',
proxy: {
url: '/CommMng/BasicDataRef/GetEnterpriseCodetype'
}
});
//#region
this.enterpriseCodetypeCombox = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: "代码类型",
store: this.storeMFrt1,
// forceSelection: true,
width: 183,
name: 'ENTERPRISECODETYPE',
valueField: 'c_enterprise_codetype',
displayField: 'c_enterprise_codetype',
listeners: {
scope: this,
change: function (field, nv, ov, eOpts) {
//var codestr=Ext.getCmp("cc1").getValue();
//if (codestr == '' || codestr.indexOf(nv+"+")<0)
// Ext.getCmp("cc1").setValue(nv+"+");
}
}
});
this.storeNameFa = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsOpSeaeEdiTemplate',
proxy: {
url: '/MvcShipping/MsOpSeaeEdiTemplate/GetDataList'
}
});
this.storeNameFa.load({
params: {
condition: "TYPE = 'F'"
}
});
this.comboxNameFa = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.NAME,
store: this.storeNameFa,
queryParam: 'DisplayName',
queryMode: 'remote',
flex: 0.5,
name: 'SHIPPERNAME',
valueField: 'NAME',
displayField: 'NAME',
listeners: {
beforequery: function (e) {
var combo = e.combo;
if (!e.forceAll) {
var value = e.query;
value = value.toUpperCase();
combo.store.filterBy(function (record, id) {
var text = record.get(combo.displayField);
text = text.toUpperCase();
return (text.indexOf(value) != -1);
});
combo.expand();
return false;
}
},
select: function (combo, records, eOpts) {
if (records.length > 0) {
_this.formscn.getForm().findField('SHIPPERNAME').setValue(records[0].data.NAME);
_this.formscn.getForm().findField('SHIPPERADDR1').setValue(records[0].data.ADDRESS);
_this.formscn.getForm().findField('SHIPPERTEL').setValue(records[0].data.TEL);
_this.formscn.getForm().findField('SHIPPERCODE').setValue(records[0].data.CODE);
_this.formscn.getForm().findField('SHIPPERCOUNTRY').setValue(records[0].data.COUNTRY);
_this.formscn.getForm().findField('ENTERPRISECODETYPE').setValue(records[0].data.CODETYPE);
var code = records[0].data.COUNTRY;
_this.storeMFrt1.load({
params: {
code: code
}
});
}
}
}
});
this.storeCountryFa = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CangDanCountry',
proxy: {
url: '/CommMng/BasicDataRef/GetCountryList'
}
});
this.storeCountryFa.load({
params: {
condition: ""
}
});
this.comboxCountryFa = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.COUNTRY,
store: this.storeCountryFa,
queryParam: 'CodeName',
queryMode: 'remote',
flex: 0.5,
name: 'SHIPPERCOUNTRY',
valueField: 'CountryCode',
forceSelection: true,
displayField: 'CodeAndName',
listeners: {
beforequery: function (e) {
var combo = e.combo;
if (!e.forceAll) {
var value = e.query;
combo.store.filterBy(function (record, id) {
var text = record.get(combo.displayField);
return (text.indexOf(value) != -1);
});
combo.expand();
return false;
}
},
select: function (combo, records, eOpts) {
if (records.length > 0) {
_this.enterpriseCodetypeCombox.setValue('');
var code = records[0].data.CountryCode;
_this.storeMFrt1.load({
params: {
code: code
}
});
}
}
}
});
this.panelShipper = new Ext.Panel({
title: Zi.LAN.SHIPPER,
layout: "anchor",
height: 280,
flex: 1,
frame: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
labelWidth: 60,
msgTarget: 'qtip'
},
items: [{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
xtype: 'hiddenfield'
}]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [this.comboxNameFa, {
xtype: "button",
text: "保存为模板",
handler: function () {
_TempType = 'F';
_this.winTempSaveShow.show();
}
}]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
fieldLabel: Zi.LAN.ADDR1,
flex: 1,
name: 'SHIPPERADDR1'
}]
},
{
xtype: 'container',
defaultType: 'textfield',
layout: 'hbox',
items: [{
fieldLabel: Zi.LAN.ADDR2,
flex: 1,
name: 'SHIPPERADDR2'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ADDR3,
flex: 1,
name: 'SHIPPERADDR3'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CITY,
flex: 1,
name: 'SHIPPERCITY'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.PROVINCE,
flex: 0.4,
name: 'SHIPPERPROVINCE'
},
this.comboxCountryFa, {
fieldLabel: Zi.LAN.POSTCODE,
labelWidth: 30,
flex: 0.4,
name: 'SHIPPERPOSTCODE'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ATTN,
flex: 0.5,
name: 'SHIPPERATTN'
},
{
fieldLabel: Zi.LAN.TEL,
labelWidth: 50,
flex: 0.5,
name: 'SHIPPERTEL'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.enterpriseCodetypeCombox, {
fieldLabel: Zi.LAN.CODE,
id: "cc1",
flex: 0.5,
name: 'SHIPPERCODE'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.EMAIL,
labelWidth: 50,
flex: 0.5,
name: 'SHIPPEREMAIL'
}]
}
]
});
this.storeMFrt2 = Ext.create('DsExt.ux.RefTableStore', {
model: 'storeMFrt1',
proxy: {
url: '/CommMng/BasicDataRef/GetEnterpriseCodetype'
}
});
this.enterpriseCodetypeCombox1 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: "代码类型",
store: this.storeMFrt2,
// forceSelection: true,
width: 183,
name: 'ENTERPRISECODETYPE1',
valueField: 'c_enterprise_codetype',
displayField: 'c_enterprise_codetype',
listeners: {
scope: this,
change: function (field, nv, ov, eOpts) {
//var codestr = Ext.getCmp("cc2").getValue();
//if (codestr == '' || codestr.indexOf(nv + "+") < 0)
// Ext.getCmp("cc2").setValue(nv + "+");
}
}
});
//#region 名称(收货人)
this.storeNameShou = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsOpSeaeEdiTemplate',
proxy: {
url: '/MvcShipping/MsOpSeaeEdiTemplate/GetDataList'
}
});
this.storeNameShou.load({
params: {
condition: "TYPE = 'S'"
}
});
this.comboxNameShou = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.NAME,
store: this.storeNameShou,
queryParam: 'DisplayName',
queryMode: 'remote',
flex: 0.5,
name: 'CONSIGNEENAME',
valueField: 'NAME',
displayField: 'NAME',
listeners: {
beforequery: function (e) {
var combo = e.combo;
if (!e.forceAll) {
var value = e.query;
value = value.toUpperCase();
combo.store.filterBy(function (record, id) {
var text = record.get(combo.displayField);
text = text.toUpperCase();
return (text.indexOf(value) != -1);
});
combo.expand();
return false;
}
},
select: function (combo, records, eOpts) {
if (records.length > 0) {
_this.formEdit.getForm().findField('CONSIGNEENAME').setValue(records[0].data.NAME);
_this.formEdit.getForm().findField('CONSIGNEEADDR1').setValue(records[0].data.ADDRESS);
_this.formEdit.getForm().findField('CONSIGNEETEL').setValue(records[0].data.TEL);
_this.formEdit.getForm().findField('CONSIGNEECODE').setValue(records[0].data.CODE);
_this.formEdit.getForm().findField('CONSIGNEECOUNTRY').setValue(records[0].data.COUNTRY);
_this.formEdit.getForm().findField('ENTERPRISECODETYPE1').setValue(records[0].data.CODETYPE);
_this.formEdit.getForm().findField('NOTIFYPARTYNAME').setValue(records[0].data.NAME);
_this.formEdit.getForm().findField('NOTIFYPARTYADDR1').setValue(records[0].data.ADDRESS);
_this.formEdit.getForm().findField('NOTIFYPARTYTEL').setValue(records[0].data.TEL);
_this.formEdit.getForm().findField('NOTIFYPARTYCODE').setValue(records[0].data.CODE);
_this.formEdit.getForm().findField('NOTIFYPARTYCOUNTRY').setValue(records[0].data.COUNTRY);
_this.formEdit.getForm().findField('ENTERPRISECODETYPE2').setValue(records[0].data.CODETYPE);
var code = records[0].data.COUNTRY;
_this.storeMFrt2.load({
params: {
code: code
}
});
}
}
}
});
//#endregion
//#region 国家(收货人)
this.storeCountryShou = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CangDanCountry',
proxy: {
url: '/CommMng/BasicDataRef/GetCountryList'
}
});
this.storeCountryShou.load({
params: {
condition: ""
}
});
this.comboxCountryShou = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.COUNTRY,
store: this.storeCountryShou,
name: 'CONSIGNEECOUNTRY',
valueField: 'CountryCode',
forceSelection: true,
flex: 0.5,
displayField: 'CodeAndName',
listeners: {
beforequery: function (e) {
var combo = e.combo;
if (!e.forceAll) {
var value = e.query;
combo.store.filterBy(function (record, id) {
var text = record.get(combo.displayField);
return (text.indexOf(value) != -1);
});
combo.expand();
return false;
}
},
select: function (combo, records, eOpts) {
if (records.length > 0) {
_this.enterpriseCodetypeCombox1.setValue('');
var code = records[0].data.CountryCode;
_this.storeMFrt2.load({
params: {
code: code
}
});
_this.formAMS.getForm().findField('CONSIGNEECOUNTRY').setValue(code);
}
}
}
});
//#endregion
this.panelConsignee = new Ext.Panel({
title: Zi.LAN.CONSIGNEE,
layout: "anchor",
height: 280,
flex: 1,
frame: true,
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
xtype: 'hiddenfield'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxNameShou, {
xtype: "button",
text: "保存为模板",
handler: function () {
_TempType = 'S';
_this.winTempSaveShow.show();
}
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ADDR1,
flex: 1,
name: 'CONSIGNEEADDR1'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ADDR2,
flex: 1,
name: 'CONSIGNEEADDR2'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ADDR3,
flex: 1,
name: 'CONSIGNEEADDR3'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.CITY,
flex: 1,
name: 'CONSIGNEECITY'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.PROVINCE,
flex: 0.4,
name: 'CONSIGNEEPROVINCE'
},
this.comboxCountryShou, {
fieldLabel: Zi.LAN.POSTCODE,
labelWidth: 50,
flex: 0.4,
name: 'CONSIGNEEPOSTCODE',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formAMS.getForm().findField('CONSIGNEEPOSTCODE').setValue(field.value);
}
}
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.ATTN,
flex: 0.5,
name: 'CONSIGNEEATTN'
},
{
fieldLabel: Zi.LAN.TEL,
labelWidth: 50,
flex: 0.5,
name: 'CONSIGNEETEL'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.enterpriseCodetypeCombox1, {
fieldLabel: Zi.LAN.CODE,
id: "cc2",
flex: 0.5,
name: 'CONSIGNEECODE'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.EMAIL,
labelWidth: 50,
flex: 0.5,
name: 'CONSIGNEEEMAIL'
}]
}
]
});
this.storeMFrt3 = Ext.create('DsExt.ux.RefTableStore', {
model: 'storeMFrt1',
proxy: {
url: '/CommMng/BasicDataRef/GetEnterpriseCodetype'
}
});
this.enterpriseCodetypeCombox2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: "代码类型",
store: this.storeMFrt3,
forceSelection: true,
width: 183,
name: 'ENTERPRISECODETYPE2',
valueField: 'c_enterprise_codetype',
displayField: 'c_enterprise_codetype',
listeners: {
scope: this,
change: function (field, nv, ov, eOpts) {
//var codestr = Ext.getCmp("cc3").getValue();
//if (codestr == '' || codestr.indexOf(nv + "+") < 0)
// Ext.getCmp("cc3").setValue(nv + "+");
}
}
});
//#region 名称(通知人)
this.storeNameTong = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsOpSeaeEdiTemplate',
proxy: {
url: '/MvcShipping/MsOpSeaeEdiTemplate/GetDataList'
}
});
this.storeNameTong.load({
params: {
condition: "TYPE = 'T'"
}
});
this.comboxNameTong = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.NAME,
store: this.storeNameTong,
queryParam: 'DisplayName',
queryMode: 'remote',
flex: 0.5,
name: 'NOTIFYPARTYNAME',
valueField: 'NAME',
displayField: 'NAME'
});
//#endregion
//#region 国家(通知人)
this.storeCountryTong = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CangDanCountry',
proxy: {
url: '/CommMng/BasicDataRef/GetCountryList'
}
});
this.storeCountryTong.load({
params: {
condition: ""
}
});
this.comboxCountryTong = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.COUNTRY,
store: this.storeCountryTong,
queryParam: 'CodeAndName',
name: 'NOTIFYPARTYCOUNTRY',
valueField: 'CountryCode',
flex: 0.5,
forceSelection: true,
displayField: 'CodeAndName',
listeners: {
beforequery: function (e) {
var combo = e.combo;
if (!e.forceAll) {
var value = e.query;
combo.store.filterBy(function (record, id) {
var text = record.get(combo.displayField);
return (text.indexOf(value) != -1);
});
combo.expand();
return false;
}
},
select: function (combo, records, eOpts) {
if (records.length > 0) {
_this.enterpriseCodetypeCombox2.setValue('');
var code = records[0].data.CountryCode;
_this.storeMFrt3.load({
params: {
code: code
}
});
_this.formAMS.getForm().findField('NOTIFYPARTYCOUNTRY').setValue(code);
}
}
}
});
//#endregion
this.panelNotifyParty = new Ext.Panel({
title: Zi.LAN.NOTIFYPARTY,
layout: "anchor",
height: 280,
flex: 1,
frame: true,
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'hiddenfield'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [this.comboxNameTong, {
xtype: "button",
text: "保存为模板",
handler: function () {
_TempType = 'T';
_this.winTempSaveShow.show();
}
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.ADDR1,
flex: 1,
name: 'NOTIFYPARTYADDR1'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.ADDR2,
flex: 1,
name: 'NOTIFYPARTYADDR2'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.ADDR3,
flex: 1,
name: 'NOTIFYPARTYADDR3'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.CITY,
flex: 1,
name: 'NOTIFYPARTYCITY'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.PROVINCE,
flex: 0.4,
name: 'NOTIFYPARTYPROVINCE'
},
this.comboxCountryTong, {
fieldLabel: Zi.LAN.POSTCODE,
flex: 0.4,
labelWidth: 50,
name: 'NOTIFYPARTYPOSTCODE',
listeners: {
scope: this,
blur: function (field, The, eOpts) {
_this.formAMS.getForm().findField('NOTIFYPARTYPOSTCODE').setValue(field.value);
}
}
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
defaults: {
anchor: '96%'
},
items: [{
fieldLabel: Zi.LAN.ATTN,
flex: 0.5,
name: 'NOTIFYPARTYATTN'
},
{
fieldLabel: Zi.LAN.TEL,
flex: 0.5,
labelWidth: 50,
name: 'NOTIFYPARTYTEL'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.enterpriseCodetypeCombox2, {
fieldLabel: Zi.LAN.CODE,
id: "cc3",
flex: 0.5,
name: 'NOTIFYPARTYCODE'
}]
},
{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: Zi.LAN.EMAIL,
labelWidth: 50,
flex: 0.5,
name: 'NOTIFYPARTYEMAIL'
}]
}]
});
this.panelscn = new Ext.Panel({
layout: "hbox",
height: 281,
items: [this.panelShipper, this.panelConsignee, this.panelNotifyParty]
});
this.formscn = Ext.widget('form', {
region: 'north',
frame: true,
title: '舱单收发通',
bodyPadding: 5,
layout: 'anchor',
trackResetOnLoad: true,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
labelWidth: 60,
msgTarget: 'qtip'
},
items: [this.panelscn]
}); //end this.formEdit
//#endregion
//#region 框架结构
this.panelpage = new Ext.Panel({
title: Zi.LAN.panelpage,
//'委托详细信息',
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
frame: false,
items: [this.formEdit]
});
this.panelEDIpage = new Ext.Panel({
title: Zi.LAN.panelEDIpage,
//'EDI及其他信息',
//layout: "border",
region: 'center',
//animate: false,
autoScroll: true,
//bodyStyle: 'overflow-x:hidden; overflow-y:scroll',
// containerScroll: true,
frame: false,
items: [this.formEDI, this.formAMS, this.formAMSPIL] //
});
this.panelMBL = new Ext.Panel({
title: Zi.LAN.panelMBL,
//'MASTER单信息',
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
// containerScroll: true,
frame: false,
items: [this.formMBL]
});
this.tabSeaeWTpanel = new Ext.TabPanel({
activeTab: 0,
autoWidth: true,
border: true,
frame: false,
region: 'center',
enableTabScroll: true,
items: [this.panelpage //,
//this.panelEDIpage,
//this.panelManifest,
//this.panelMBL,
//this.formscn
]
});
this.panelSeae = new Ext.Panel({
title: Zi.LAN.panelSeae,
//'委托信息',
id: 'pnlmodNewOpSeaeInfo',
layout: "border",
region: 'center',
animate: true,
autoScroll: true,
frame: false,
//closable:true,
items: [this.panelBtn, this.formHead, this.tabSeaeWTpanel]
});
this.tabSeaepanel = new Ext.TabPanel({
activeTab: 0,
width: 100,
layout: 'border',
border: true,
frame: false,
region: 'center',
id: "TabSeaePanel",
enableTabScroll: true,
items: [this.panelSeae],
listeners: {
scope: this,
'beforetabchange': function (tabPanel, newCard, oldCard, eOpts) {
if (oldCard.id == "pnlmodSeaeAllFee") {
var feemodify = oldCard.panelFee.getModifyStatus();
if (feemodify) {
Ext.Msg.show({
title: Zi.LAN.JingGao,
msg: Zi.LAN.QingXianBaoCunFeiYong,
icon: Ext.Msg.WARNING,
buttons: Ext.Msg.OK
}); //'费用未保存,请先保存费用!'
return false;
}
}
if (newCard.id == "pnlmodSeaeAllFee") {
newCard.panelFee.loadUnit();
}
if (oldCard.id == "pnlmodSeaeAmendFee") {
var feemodify = oldCard.panelAmendFee.getModifyStatus();
if (feemodify) {
Ext.Msg.show({
title: Zi.LAN.JingGao,
msg: Zi.LAN.QingXianBaoCunFeiYong,
icon: Ext.Msg.WARNING,
buttons: Ext.Msg.OK
}); //'费用未保存,请先保存费用!'
return false;
}
}
if (newCard.id == "pnlmodSeaeAmendFee") {
newCard.panelAmendFee.loadUnit();
}
}
}
});
Ext.apply(this, {
items: [this.tabSeaepanel]
});
//#endregion
this.LoadInitData();
//#region 其他
// parentWin = Ext.getCmp('MsOpSeaeIndex');
// parentWin = window.parent._this.MainCenter;
// parentWin = FindAtMain('pnlmodOrderManagement', parentWin);
this.InitData();
//绑定事件
//this.gridList.on('edit', function (editor, e, eOpts) {
// this.gridAfterEdit(editor, e, eOpts);
//}, this);
this.gridList.on("cellclick",
function (grid, rowIndex, colIndex, record, event) {
var rec = grid.getSelectionModel().getSelection()[0];
var column = grid.getHeaderAtIndex(colIndex);
var FieldName = column.dataIndex;
if (!_this.needFind(FieldName)) return;
//var value = rowIndex.outerText;
var value = rec.get(FieldName);
var CNTRNO = rec.get("CNTRNO");
if (_this.FindDiffenet_record(CNTRNO, FieldName, value)) {
var _localvalue = _this.FindLocal_value(CNTRNO, FieldName);
if (_this.winAccess) {
_this.winAccess.close();
_this.winAccess = null;
}
_this.winAccess = new Shipping.Diffwin({
});
_this.winAccess._sivalue = value + "";
_this.winAccess._localvalue = _localvalue;
_this.winAccess.show();
return;
}
});
//#endregion
//#region 集装箱窗体
this.storeBodyList.on('beforeload',
function (store) {
var condition = " ORDNO='" + _this.editRecord.get('SINO') + "'";
Ext.apply(store.proxy.extraParams, {
condition: condition
});
},
this);
this.gridListCellEditing2 = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
this.GridCheckBoxModelCtn = Ext.create('Ext.selection.CheckboxModel');
this.gridListshow = new Ext.grid.GridPanel({
store: this.storeBodyList,
enableHdMenu: false,
region: 'center',
loadMask: {
msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng
},
//"数据加载中,请稍等..."
trackMouseOver: true,
disableSelection: false,
selModel: this.GridCheckBoxModelCtn,
plugins: [this.gridListCellEditing2],
selType: 'cellmodel',
tbar: [{
text: Zi.LAN.btnadddetail,
//'增加明细',
tooltip: Zi.LAN.btnadddetail,
//'增加明细',
id: "btnadddetails",
iconCls: "btnadddetail",
handler: function (button, event) {
this.onAddDetailClick(button, event);
},
scope: this
},
'-', {
id: 'btnsavedetails',
text: Zi.LAN.SaveGridPanel,
//"保存",
iconCls: "btnsave",
handler: function (button, event) {
this.SaveOpCtn();
},
scope: this
},
'-', {
text: Zi.LAN.btndeldetail,
//'删除明细',
tooltip: Zi.LAN.btndeldetail,
//'删除明细',
id: "btndeldetails",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelDetailClick(button, event, 2);
},
scope: this
},
'-', {
text: Zi.LAN.btnAddOpCtnDetail,
//'多品名维护',
id: "btnAddOpCtnDetails",
handler: function (button, event) {
this.onAddOpCtnDetail(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.btnadddetail2,
//'展开集装箱',
id: "btnadddetail2s",
handler: function (button, event) {
this.onUpDetailClick(button, event);
},
scope: this
},'-', {
text: Zi.LAN.YinRuEXCELShuJu,
//'引入EXCEL数据',
menu: [{
text: Zi.LAN.YinRuEXCELCtn,
//"集装箱信息",
handler: function (button, event) {
_this.onImportCtnClick(button, event);
}
},
{
text: Zi.LAN.YinRuEXCELCtnDetail,
//"多品名",
handler: function (button, event) {
_this.onImportCtnAndDetailClick(button, event);
}
}],
scope: this
},
'-', {
text: Zi.LAN.CreateCtnFee,
//'生成应付费用',
handler: function (button, event) {
this.CreateCtnFee();
},
scope: this
},
'-', {
text: Zi.LAN.btntest,
//"保存列表样式",
menu: [{
text: Zi.LAN.SaveGridPanel,
//"保存",
handler: function (button, event) {
_this.ctncolumns = DsTruck.SaveGridPanel(USERID, 'SEAECTNCOLUMN', _this.gridListshow.columns, _this.ctncolumns, 0, true);
_this.gridList.reconfigure(this.storeBodyList, _this.ctncolumns);
}
},
{
text: Zi.LAN.SaveGridPanel2,
//"初始化",
handler: function (menu, event) {
_this.gridListshow.reconfigure(this.storeBodyList, _this.initctncolumns);
_this.ctncolumns = DsTruck.SaveGridPanel(USERID, 'SEAECTNCOLUMN', _this.gridListshow.columns, _this.initctncolumns, 0, true);
}
}],
scope: this
},
'-', {
text: Zi.LAN.updatectntruck,
//'展开集装箱',
handler: function (button, event) {
this.onUpDetailTruckClick(button, event);
},
scope: this
},
{
text: Zi.LAN.btnprintctn,
//'预览打印',
tooltip: Zi.LAN.btnprintctn,
//'预览打印',
id: "btnprintctn",
iconCls: "btnprint",
handler: function (button, event) {
this.PrintCtn(button, event);
},
scope: this
}],
columns: this.ctncolumns
});
this.gridListshow.on('edit',
function (editor, e, eOpts) {
this.gridAfterEdit(editor, e, eOpts);
},
this);
this.winCtnListShow = Ext.create('Ext.window.Window', {
title: Zi.LAN.JiZhuangXianMingXi,
//"集装箱明细",
width: 1100,
height: 750,
//plain : true,
layout: "border",
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true,
// 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.gridListshow],
buttons: [{
text: Zi.LAN.GuanBi,
//"关闭",
minWidth: 70,
handler: function () {
me.winCtnListShow.close();
}
}]
});
//#endregion
//#region 舱单分票Show
this.gridListManifestshowCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
});
// this.MNGridshowCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridListManifestshow = new Ext.grid.GridPanel({
store: this.storeManifestList,
enableHdMenu: false,
region: 'center',
loadMask: {
msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng
},
//"数据加载中,请稍等..."
trackMouseOver: true,
disableSelection: false,
selModel: this.MNGridCheckBoxModel,
plugins: [this.gridListManifestshowCellEditing],
selType: 'cellmodel',
tbar: [{
text: Zi.LAN.btnadddetail,
//'增加明细',
tooltip: Zi.LAN.btnadddetail,
//'增加明细',
id: "btnaddmanifestdetail2",
iconCls: "btnadddetail",
handler: function (button, event) {
this.onAddMNDetailClick(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.btnsavemanifestDelivery,
//'保存明细',
tooltip: Zi.LAN.btnsavemanifestDelivery,
//'保存明细',
id: "btnsavemanifestDelivery2",
iconCls: "btnsave",
handler: function (button, event) {
this.onPostMNDetailClick();
},
scope: this
},
'-', {
text: Zi.LAN.btndeldetail,
//'删除明细',
tooltip: Zi.LAN.btndeldetail,
//'删除明细',
id: "btndelmanifestdetail2",
iconCls: "btndeletedetail",
handler: function (button, event) {
this.onDelMNDetailClick(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.YinRuEXCELShuJu,
//'引入EXCEL数据',
handler: function (button, event) {
this.onImportMNClick(button, event);
},
scope: this
},
'-', {
text: Zi.LAN.ChuanDaiCangDan,
//"船代舱单",
menu: [{
text: Zi.LAN.ExportManifestXML,
//"导出舱单XML",
handler: function (menu, event) {
_this.winExportXmlManifestShow.show();
}
},
{
text: Zi.LAN.DSManifest,
//"直发舱单",(分单)
handler: function (menu, event) {
_this.winDSMANIFESTShow_HBLNO.show();
}
}],
scope: this
}],
columns: [{
sortable: true,
dataIndex: 'GID',
header: Zi.LAN.GID2,
//'编号',
hidden: true,
width: 0
},
{
sortable: true,
dataIndex: 'BSNO',
header: Zi.LAN.BSNO2,
//'业务编号',
hidden: true,
width: 0
},
{
dataIndex: 'MBLNO',
header: Zi.LAN.MBLNO3,
//'分单号',
width: 130
},
{
dataIndex: 'CNTRNO',
header: Zi.LAN.CNTRNO,
//'箱号',
width: 100,
editor: this.comboxCTNNO
},
{
dataIndex: 'SEALNO',
header: Zi.LAN.SEALNO,
//'封号',
width: 80,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
sortable: true,
dataIndex: 'PKGS',
header: Zi.LAN.PKGS,
//'件数',
width: 60,
editor: {
xtype: 'numberfield',
allowBlank: false,
selectOnFocus: true
}
},
{
dataIndex: 'KINDPKGS',
header: Zi.LAN.KINDPKGS,
//'包装',
width: 70,
editor: this.comboxKINDPKGS_CTN
},
{
dataIndex: 'KGS',
header: Zi.LAN.KGS3,
//'重量',
width: 60,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'CBM',
header: Zi.LAN.CBM2,
//'尺码',
width: 60,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'REMARK',
header: Zi.LAN.REMARK,
//'备注',
width: 150,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
}]
});
this.gridListManifestshow.on('edit',
function (editor, e, eOpts) {
this.gridListManifestAfterEdit(editor, e, eOpts);
},
this);
this.winManifestshow = Ext.create('Ext.window.Window', {
title: Zi.LAN.panelManifest,
//"集装箱明细",
width: 1000,
height: 600,
//plain : true,
layout: "border",
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true,
// 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.gridListManifestshow],
buttons: [{
text: Zi.LAN.GuanBi,
//"关闭",
minWidth: 70,
handler: function () {
me.winManifestshow.close();
}
}]
});
//#endregion
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='ACCDATESAMEETD'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.accdatesameetd = 1;
} else {
}
}
} else {
}
},
scope: this
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='OPSEAECOPYCTN'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.iscopyctn = 1;
} else {
}
}
} else {
}
},
scope: this
});
//#region 下载窗体
this.formDownloadShow = Ext.widget('form', {
frame: true,
region: 'center',
height: 100,
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [{ //fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
id: 'downloadfile',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'label',
html: '',
width: 120,
text: ''
}] //end items(fieldset 1)
} //end fieldset 1
] //end root items
});
me = this;
this.winDownloadShow = Ext.create('Ext.window.Window', {
title: Zi.LAN.XiaZaiWenJian,
//"下载文件",
width: 450,
height: 120,
//plain : true,
iconCls: "addicon",
resizable: false,
// 是否可以拖动
// draggable:false,
collapsible: true,
// 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.formDownloadShow],
buttons: [{
text: Zi.LAN.GuanBi,
//"关闭",
minWidth: 70,
handler: function () {
me.winDownloadShow.close();
}
}]
});
this.gridList.reconfigure(this.storeBodyList, this.ctncolumns);
this.gridListshow.reconfigure(this.storeBodyList, this.ctncolumns);
//#endregion
this.storeShipper.on('beforeload',
function (store) {
var CUSTOMERNAME = this.formHead.getForm().findField('CUSTOMERNAME').getValue();
var condition = "shippertype=2 AND (ISPUBLIC=1 OR CODENAME IN (SELECT CODENAME FROM info_client WHERE SHORTNAME='" + CUSTOMERNAME + "') )";
Ext.apply(store.proxy.extraParams, {
condition: condition
});
},
this);
this.storeConsignee.on('beforeload',
function (store) {
var CUSTOMERNAME = this.formHead.getForm().findField('CUSTOMERNAME').getValue();
var condition = "shippertype=1 AND (ISPUBLIC=1 OR CODENAME IN (SELECT CODENAME FROM info_client WHERE SHORTNAME='" + CUSTOMERNAME + "') )";
Ext.apply(store.proxy.extraParams, {
condition: condition
});
},
this);
this.storenotifyparty.on('beforeload',
function (store) {
var CUSTOMERNAME = this.formHead.getForm().findField('CUSTOMERNAME').getValue();
var condition = "shippertype=3 AND (ISPUBLIC=1 OR CODENAME IN (SELECT CODENAME FROM info_client WHERE SHORTNAME='" + CUSTOMERNAME + "') )";
Ext.apply(store.proxy.extraParams, {
condition: condition
});
},
this);
this.storeagent.on('beforeload',
function (store) {
var CUSTOMERNAME = this.formHead.getForm().findField('CUSTOMERNAME').getValue();
var condition = "shippertype=4 AND (ISPUBLIC=1 OR CODENAME IN (SELECT CODENAME FROM info_client WHERE SHORTNAME='" + CUSTOMERNAME + "') )";
Ext.apply(store.proxy.extraParams, {
condition: condition
});
},
this);
//LoadQueryData(this.formname + 'CargoSmartEDI', this.formCargoSmartEDIShow);
this.formTempNameShow = Ext.widget('form', {
frame: true,
region: 'center',
height: 60,
autoScroll: true,
bodyPadding: 5,
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: '模板名称',
name: 'TempName',
height: 30
}]
}] //end items(fieldset 1)
} //end fieldset 1
] //end root items
});
me = this;
this.winTempSaveShow = Ext.create('Ext.window.Window', {
title: "保存模板",
width: 300,
height: 120,
//plain : true,
iconCls: "addicon",
resizable: false,
// draggable:false,// 是否可以拖动
collapsible: true,
// 允许缩放条
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [this.formTempNameShow],
buttons: [{
text: "关闭",
minWidth: 70,
handler: function () {
me.winTempSaveShow.close();
}
},
{
text: "保存",
minWidth: 70,
handler: function () {
me.SaveSFTTemp();
me.winTempSaveShow.close();
}
}]
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='SALEORDERDEPTBYOP'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.SALEORDERDEPTBYOP = 1;
} else {
}
}
} else {
}
},
scope: this
});
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='USEDSINTERFACE'"
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success != true) {
} else {
var data = result.data;
if (data.PARAMVALUE == '1') {
this.USEDSINTERFACE = 1;
} else {
}
}
} else {
}
},
scope: this
});
},
//end initUIComponents
//#region 加载事件
InitData: function () {
this.opStatus = 'add';
var condition = '';
_this = this;
if (parentWin) {
var ret = parentWin.OprationSwap();
this.opStatus = ret[0];
this.StoreList = ret[1];
this.editRecord = ret[2];
if (this.isfen) this.MainEditRecord = ret[3];
}
if (this.opStatus == 'copyaddbill') {
this.opStatus = 'copyadd';
this.copybill = true;
}
if (this.opStatus == 'edit' || this.opStatus == 'copyadd') {
condition = " SINO='" + this.editRecord.get('SINO') + "'";
//this.storeBodyList.load({ params: { condition: condition} });
}
// if (this.opStatus == 'copyadd') {
// this.CopyNewData();
// } else {
this.storecodeservice.load({
params: {
condition: "OPTYPE='1'"
},
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
var checkboxitems = "";
checkboxitems = "[";
for (i = 0; i < this.storecodeservice.getCount(); i += 1) {
var memberyf = this.storecodeservice.getAt(i);
if (i == 0) {
var checkboxSingleItem = "{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:true,name:'" + memberyf.data.OPField + "',id:'" + memberyf.data.OPField + "',readOnly:true";
checkboxSingleItem += "}";
} else {
var checkboxSingleItem = ",{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:true,name:'" + memberyf.data.OPField + "',id:'" + memberyf.data.OPField + "',readOnly:true";
checkboxSingleItem += "}";
}
checkboxitems += checkboxSingleItem;
};
checkboxitems += "]";
_this.myCheckboxGroup = new Ext.form.CheckboxGroup({
id: 'myGroup',
hidden: true,
xtype: 'checkboxgroup',
fieldLabel: Zi.LAN.myService,
//'服务项目',
columns: 8,
//readOnly:true,
items: eval(checkboxitems)
});
this.formHead.add(_this.myCheckboxGroup);
this.formHead.doLayout();
}
this.LoadData(this.opStatus, condition);
}
},
scope: this
});
},
//end InitData
LoadData: function (opstatus, condition) {
this.serialNo = 0;
//this.bodyDel = [];
this.opStatus = opstatus;
//var SIdatas = GetStoreDataArray(StoreDiffField);
//var SIFieldList = ConvertRecordsToJsonAll(SIdatas);
//var BookingData
document.title = "网上订舱-提单确认"; //+ this.editRecord.get('ORDERNO').toString().trim();
///获取远程提单确认信息
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
//'正在查询主表数据...',
url: '/MvcShipping/BookingConfirm/GetBooking_SIData',
async: false,
params: {
handle: opstatus,
condition: condition
//,SIFieldList: SIFieldList
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
}
data = result.data;
this.Editdata = result.data;
//this.LoadInit(data);
if (data.ISCONTAINERSOC == '1') {
data.ISCONTAINERSOC = "是";
} else { data.ISCONTAINERSOC = "否" };
var ISCONTAINERSOC_Field = Ext.getCmp("ISCONTAINERSOC");
this.formHead.getForm().reset();
this.formHead.getForm().setValues(data);
this.formEdit.getForm().reset();
this.formEdit.getForm().setValues(data);
this.formEDI.getForm().reset();
this.formEDI.getForm().setValues(data);
this.formMBL.getForm().reset();
this.formMBL.getForm().setValues(data);
if (data.CUSTOMERNAME != '') {
var sql = " CUSTNAME='" + data.CUSTOMERNAME + "'";
this.storeListMailProject.load({
params: {
start: 0,
limit: 5000,
sort: '',
condition: sql
},
waitMsg: "正在查询数据...",
scope: this
});
}
Ext.getCmp("STLDATE").setValue(data.STLDATE);
if (this.opStatus == 'add') {
this.LoadDefValue();
}
if (this.opStatus == 'copyadd') this.CopyNewData(data);
this.Editdata = data;
this.GetEditStatus();
this.SetShipperLable('SHIPPER', 35);
this.SetShipperLable('CONSIGNEE', 35);
this.SetShipperLable('NOTIFYPARTY', 35);
this.SetShipperLable('MARKS', 18);
this.SetShipperLable('DESCRIPTION', 30);
if (this.isfen) {
this.formHead.getForm().findField('BLTYPE').readOnly = true;
}
this.LoadPeriod(this.opStatus);
if (data.CARGOID == "R") Ext.getCmp("DGPANEL").show();
if (data.CARGOID == "C") Ext.getCmp("WXPPANEL").show();
this.sino = data.SINO;
_this = this;
////20191218 当引入完成状态变为Confirm时
//执行CheckDiff_Main/CheckDiff_Bill 如果返回true 则询问是否删除多余项
if (data.BSSTATUS == "Confirm") {
checkmethod = 'CheckDiff_Main';
delmethod = 'DelDiff_Main';
if (data.ISMULTI == "true") {
checkmethod = 'CheckDiff_Bill';
delmethod = 'DelDiff_Bill';
}
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
//'正在查询主表数据...',
url: '/MvcShipping/BookingConfirm/' + checkmethod,
async: false,
params: {
SINO: _this.sino
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success) {
Ext.MessageBox.confirm('提示', '在本地数据中检测到多余的集装箱信息' + result.Message+' ,删除吗?',
function (btn) {
if (btn == 'yes') {
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
//'正在查询主表数据...',
url: '/MvcShipping/BookingConfirm/' + delmethod,
async: false,
params: {
SINO: _this.sino
},
callback: function (options, success, response) {
if (success) { }
}
});
}
}
);
}
}
}
})
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
//获取本地业务信息
if (this.editRecord.get('ISMULTI') == "true") {
//如果是同一业务下多票 改为从提单列表 op_seae_billmanage 内查询数据;(而非从海运出口业务内寻找数据)
var LocalCondition = " MBLNO = '" + this.getHeadValue("MBLNO") + "' "; //BSNO='" + this.editRecord.get("ORDER_BSNO") + "' and
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
//'正在查询主表数据...',
url: '/MvcShipping/MsOpSeae/GetBillData_SI',
async: false,
params: {
handle: "edit",
condition: LocalCondition
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
}
//this.LocalData = Ext.create('Booking_SImb', result.data);
this.LocalData = Ext.create('MsOpBillModel', result.data);
this.Editdata.CLOSINGDATE = this.LocalData.get("CLOSINGDATE");
this.Editdata.CLOSEDOCDATE = this.LocalData.get("CLOSEDOCDATE");
this.formEdit.getForm().setValues(this.Editdata);
var _bsno = this.LocalData.get("AS_ID");
///可以用相同查询条件
this.storeLocalCtnList.load({
params: {
condition: " BSNO = '" + _bsno + "' "
},
callback: function (options, success, response) {
var bodyCondition = condition.replace("SINO=", " ORDNO= ");
_this.storeBodyList.load({
params: {
condition: bodyCondition
}
});
},
scope: this
});
///
//this.storeLocalCtnDetailList.load({ params: { condition: "CTN_ID in(select CTN_ID from op_ctn where BSNO ='" + _bsno + "')" }, scope: this });
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
} else {
//同一业务一票 直接取op_seae主表数据 依据主提单号
var LocalCondition = " B.BSNO = '" + this.editRecord.get("ORDER_BSNO") + "' ";
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
//'正在查询主表数据...',
url: '/MvcShipping/MsOpSeae/GetData_SI',
async: false,
params: {
handle: "edit",
condition: LocalCondition
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
Ext.Msg.show({
title: Zi.LAN.TiShi,
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
}
this.LocalData = Ext.create('Booking_SImb', result.data);
this.Editdata.CLOSINGDATE = this.LocalData.get("CLOSINGDATE");
this.Editdata.CLOSEDOCDATE = this.LocalData.get("CLOSEDOCDATE");
this.formEdit.getForm().setValues(this.Editdata);
var _bsno = this.LocalData.get("BSNO");
this.storeLocalCtnList.load({
params: {
condition: " BSNO = '" + _bsno + "' "
},
callback: function (options, success, response) {
var bodyCondition = condition.replace("SINO=", " ORDNO= ");
_this.storeBodyList.load({
params: {
condition: bodyCondition
}
});
},
scope: this
});
///
this.storeLocalCtnDetailList.load({
params: {
condition: "CTN_ID in(select CTN_ID from op_ctn where BSNO ='" + _bsno + "')"
},
scope: this
});
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
///明细表
//this.storeManifestList.load({ params: { condition: condition } });
//this.storeManifestSumList.load({ params: { condition: condition } });
this.formCargoShow.getForm().reset();
this.SetDiff();
},
// end LoadDate
getHeadValue: function (FieldName) {
return this.formHead.getForm().findField(FieldName).getValue();
},
getEditValue: function (FieldName) {
return this.formEdit.getForm().findField(FieldName).getValue();
},
LoadPeriod: function (opstatus) {
Ext.Ajax.request({
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu,
//'正在查询主表数据...',
url: '/Account/ChMonthClose/GetNowPeriod',
params: {
condition: ''
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
return;
}
data = result.data;
this.MsPeriod = data;
//this.LoadPeriodStatus(opstatus);
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
//LoadPeriodStatus: function (opstatus) {
// var ETD = this.formEdit.getForm().findField('ETD').getRawValue();
// if (ETD == '') {
// this.formEdit.getForm().findField('ETD').setMinValue(this.MsPeriod.FDAY);
// this.formEdit.getForm().findField('ETD').setReadOnly(false);
// } else {
// var oDate1 = new Date(ETD);
// var oDate2 = new Date(this.MsPeriod.FDAY);
// if (oDate1.getTime() >= oDate2.getTime()) {
// this.formEdit.getForm().findField('ETD').setMinValue(this.MsPeriod.FDAY);
// this.formEdit.getForm().findField('ETD').setReadOnly(false);
// } else {
// if (opstatus == 'add' || opstatus == 'copyadd') {
// this.formEdit.getForm().findField('ETD').setMinValue(this.MsPeriod.FDAY);
// this.formEdit.getForm().findField('ETD').setReadOnly(false);
// }
// else {
// this.formEdit.getForm().findField('ETD').setMinValue('');
// this.formEdit.getForm().findField('ETD').setReadOnly(true);
// }
// }
// }
// //var ACCDATE = this.formHead.getForm().findField('ACCDATE').getValue();
// //var oDate1 = new Date(ACCDATE + '-01');
// //var oDate2 = new Date(this.MsPeriod.PERIOD + '-01');
// //if (oDate1.getTime() >= oDate2.getTime()) {
// // this.formHead.getForm().findField('ACCDATE').setMinValue(this.MsPeriod.PERIOD);
// // this.formHead.getForm().findField('ACCDATE').setReadOnly(false);
// //} else {
// // if (opstatus == 'add' || opstatus == 'copyadd') {
// // this.formHead.getForm().findField('ACCDATE').setMinValue(this.MsPeriod.PERIOD);
// // this.formHead.getForm().findField('ACCDATE').setReadOnly(false);
// // }
// // else {
// // this.formHead.getForm().findField('ACCDATE').setMinValue('');
// // this.formHead.getForm().findField('ACCDATE').setReadOnly(true);
// // }
// //}
//},
//#endregion
LoadInitData: function () {
this.storeCARRIER.load({
params: {
condition: "ISCARRIER='1'"
}
});
this.storeFORWARDER.load({
params: {
condition: "ISBOOKING='1'"
}
});
this.storeCUSTOMSER.load({
params: {
condition: "ISCUSTOM='1'"
}
});
this.storeTRUCKER.load({
params: {
condition: "ISTRUCK='1'"
}
});
this.storeWAREHOUSE.load({
params: {
condition: "ISWAREHOUSE='1'"
}
});
this.storeSHIPAGENCY.load({
params: {
condition: "ISSHIPAGENCY='1'"
}
}); //船代
//var astoreVoyVeg = parentWin.storeVoyVeg;
//if (isNaN(astoreVoyVeg) || astoreVoyVeg == null) {
// this.storeVoyVeg.load({ params: { condition: "" } });
// this.storeVoyVeg2.load({ params: { condition: "" } });
//} else {
// this.storeVoyVeg.loadData(astoreVoyVeg.data.items);
// this.storeVoyVeg2.loadData(astoreVoyVeg.data.items);
//}
},
setAllTotal: function () {
this.setPKGSTotal();
this.setKGSTotal();
this.setCBMTotal();
},
setPKGSTotal: function () {
var total = this.calcDetailTotal('PKGS');
this.setHeadFieldValue('PKGS', total);
},
setKGSTotal: function () {
var total = this.calcDetailTotal('KGS');
this.setHeadFieldValue('KGS', total);
},
setCBMTotal: function () {
var total = this.calcDetailTotal('CBM');
this.setHeadFieldValue('CBM', total);
},
calcDetailTotal: function (fieldName) {
var total = 0;
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
var member = this.storeBodyList.getAt(i);
var value = member.get(fieldName);
total = Add(total, value, 4);
}
return total;
},
setHeadFieldValue: function (fieldName, value) {
var field = this.formEdit.getForm().findField(fieldName);
field.setValue(value);
},
onAddOpCtnDetail: function (button, event) {
this.editRecord2 = this.editRecord;
DsOpenEditWin('/MvcShipping/BookingConfirm/OpCtnDetailEdit', "", "", "1300"); //this.editRecord.get('BSNO').toString()
},
OprationSwapOpCtnDetail: function () {
var ret = new Array();
ret[0] = this.editRecord2;
ret[1] = this.LocalData;
return ret;
},
onSubmitAuditClick: function () {
var Duino = this.formHead.getForm().findField('SINO').getValue();
var billstatus = this.getStatus();
if (Duino == '*') {
Ext.Msg.show({
title: '提示',
msg: '请先保存此订舱单,然后才能提交审核!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
};
if ((billstatus != "9") && (billstatus != "2")) {
Ext.Msg.show({
title: '提示',
msg: '当前状态无法提交审核!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
}
var bodydatas = [];
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
var member = this.storeBodyList.getAt(i);
bodydatas.push(member);
}
//
var jsonBody = ConvertRecordsToJsonAll(bodydatas);
//var jsonDelBody = ConvertRecordsToJsonAll(this.bodyDel);
//this.formHead.getForm().findField('ORDNO').setDisabled(false);
var data = this.formHead.getForm().getValues(false, false, false);
var data2 = this.formEdit.getForm().getValues(false, false, false);
//this.formHead.getForm().findField('ORDNO').setDisabled(true);
_this = this;
Ext.Ajax.request({
waitMsg: '正在添加数据...',
url: '/MvcShipping/MsSeaeOrder/SubmitAuditForm',
params: {
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
body: jsonBody
},
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;
} else {
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsSeaeOrder/GetData',
params: {
handle: 'edit',
condition: " SINO='" + Duino + "'"
},
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.formHead.getForm().reset();
_this.formHead.getForm().setValues(data);
_this.formEdit.getForm().reset();
_this.formEdit.getForm().setValues(data);
var editp = Ext.create('MsSeaeOrderModel', data);
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.GetEditStatus();
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
onSubmitAuditBackClick: function () {
var Duino = this.formHead.getForm().findField('SINO').getValue();
var billstatus = this.getStatus();
if (Duino == '*') {
Ext.Msg.show({
title: '提示',
msg: '请先保存付费申请,然后才能提交审核!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
};
if (billstatus != "1") {
Ext.Msg.show({
title: '提示',
msg: '当前状态无法撤销提交!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
return;
}
var bodydatas = [];
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
var member = this.storeBodyList.getAt(i);
bodydatas.push(member);
}
var jsonBody = ConvertRecordsToJsonAll(bodydatas);
//this.formHead.getForm().findField('ORDNO').setDisabled(false);
var data = this.formHead.getForm().getValues(false, false, false);
var data2 = this.formEdit.getForm().getValues(false, false, false);
//this.formHead.getForm().findField('ORDNO').setDisabled(true);
_this = this;
Ext.Ajax.request({
waitMsg: '正在添加数据...',
url: '/MvcShipping/MsSeaeOrder/SubmitAuditBackForm',
params: {
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
body: jsonBody
},
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;
} else {
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsSeaeOrder/GetData',
params: {
handle: 'edit',
condition: " SINO='" + Duino + "'"
},
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.formHead.getForm().reset();
_this.formHead.getForm().setValues(data);
_this.formEdit.getForm().reset();
_this.formEdit.getForm().setValues(data);
var editp = Ext.create('MsSeaeOrderModel', data);
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.GetEditStatus();
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
onAuditPassClick: function () {
//this.formHead.getForm().findField('ORDNO').setDisabled(false);
var data = this.formHead.getForm().getValues(false, false, false);
var data2 = this.formEdit.getForm().getValues(false, false, false);
//this.formHead.getForm().findField('ORDNO').setDisabled(true);
var _type = this.formAudit.getForm().findField('DataInputType').getRawValue();
//alert(_type);
var bodydatas = [];
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
var member = this.storeBodyList.getAt(i);
bodydatas.push(member);
}
//
var jsonBody = ConvertRecordsToJsonAll(bodydatas);
_this = this;
Ext.MessageBox.confirm('提示', '确定审核通过选中的业务吗?',
function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在审核数据...');
Ext.Ajax.request({
waitMsg: '正在审核数据...',
url: '/MvcShipping/BookingConfirm/AuditWebOrderForm',
params: {
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
body: jsonBody,
accdate: _this.accdate,
op: _this.seaeop,
custservice: _this.seaecustservice,
type: _type
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
this.formEdit.getForm().reset();
this.formEdit.getForm().setValues(returnData);
this.formHead.getForm().reset();
this.formHead.getForm().setValues(returnData);
var editp = Ext.create('BookingConfirm', 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.GetEditStatus();
Ext.Msg.show({
title: '提示',
msg: '审核成功!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
} else {
Ext.Msg.show({
title: '错误',
msg: jsonresult.Message,
icon: Ext.Msg.ERROR,
buttons: Ext.Msg.OK
});
}
_this.winAuditShow.close()
}
},
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);
},
onAuditBack: function () {
this.formHead.getForm().findField('ORDNO').setDisabled(false);
var data = this.formHead.getForm().getValues(false, false, false);
var data2 = this.formEdit.getForm().getValues(false, false, false);
this.formHead.getForm().findField('ORDNO').setDisabled(true);
_this = this;
Ext.MessageBox.confirm('提示', '确定驳回选中的业务吗?',
function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在驳回数据...');
Ext.Ajax.request({
waitMsg: '正在驳回数据...',
url: '/MvcShipping/BookingConfirm/AuditWebOrderBack',
params: {
data: Ext.JSON.encode(data),
data2: Ext.JSON.encode(data2),
orreason: _this.reason
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnData = jsonresult.Data;
this.formEdit.getForm().reset();
this.formEdit.getForm().setValues(returnData);
this.formHead.getForm().reset();
this.formHead.getForm().setValues(returnData);
var editp = Ext.create('MsSeaeOrderModel', 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.GetEditStatus();
Ext.Msg.show({
title: '提示',
msg: '驳回成功!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
} else {
Ext.Msg.show({
title: '错误',
msg: jsonresult.Message,
icon: Ext.Msg.ERROR,
buttons: Ext.Msg.OK
});
}
_this.winAuditBackShow.close();
}
},
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);
},
getToMonth: function () {
var now = new Date();
var year = now.getFullYear(); //年
var month = now.getMonth() + 1; //月
var clock = year + "-";
if (month < 10) clock = clock + "0" + month;
else clock = clock + month;
return (clock);
},
//#region 编辑时按钮等的状态
getStatus: function () {
return this.formHead.getForm().findField('BSSTATUS').getValue();
},
SetShipperLable: function (fieldname, len) {
var basicForm = this.formEdit.getForm();
var field = basicForm.findField(fieldname);
var SHIPPERSTR = Ext.getCmp(fieldname + 'STR');
var str = Billstrnum(field.getValue(), len);
SHIPPERSTR.setText(str, false);
},
GetEditStatus: function () {
/*
var canedit = false;
var BSSTATUS = this.getStatus();
//var inputby = this.formHead.getForm().findField('INPUTBY').getValue();
//var op = this.formHead.getForm().findField('OP').getValue();
_this = this;
if (BSSTATUS == "0" || BSSTATUS == "1") {
canedit = false;
this.setSaveBtnStatus(canedit);
} else {
this.StoreOpRange.load({
params: {
optype: "modSeaeOrderList"
},
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
var records = DsStoreQueryBy(_this.StoreOpRange, 'OPID', op);
if (records.getCount() > 0) {
canedit = true;
} else {
var recordins = DsStoreQueryBy(_this.StoreOpRange, 'OPID', inputby);
if (recordins.getCount() > 0) {
canedit = true;
} else {
canedit = false;
}
}
} else {
canedit = false;
}
_this.setSaveBtnStatus(canedit);
}
}
});
}
*/
},
GetStringNum: function (str) {
var num = 0;
if (str == null || str == '') return num;
if (str.length == 0) return num;
var if_find = false;
var str_num = '';
for (var i = 0; i < str.length; i += 1) {
var member = str.substr(i, 1);
if ((member == '0') || (member == '1') || (member == '2') || (member == '3') || (member == '4') || (member == '5') || (member == '6') || (member == '7') || (member == '8') || (member == '9') || (member == '.') || (member == '-')) {
if (!if_find) {
str_num = str_num + member;
}
} else {
if_find = true;
}
}
return str_num;
},
setAuditBtnStatus: function (enable) {
var btnESave = Ext.getCmp('btnESave');
//var btnESaveAndClose = Ext.getCmp('btnESaveAndClose');
var btnESaveAndNew = Ext.getCmp('btnESaveAndNew');
var btnENew = Ext.getCmp('btnENew');
var btnECopyNew = Ext.getCmp('btnECopyNew');
var btnSubmitAudit = Ext.getCmp('btnSubmitAudit');
var btnSubmitAuditBack = Ext.getCmp('btnSubmitAuditBack');
var btnEPrint = Ext.getCmp('btnEPrint');
var btnAudit = Ext.getCmp('btnAudit');
var btnAuditBack = Ext.getCmp('btnAuditBack');
btnESave.setVisible(!enable);;
//btnESaveAndClose.setVisible(!enable);
btnESaveAndNew.setVisible(!enable);
btnENew.setVisible(!enable);;
btnECopyNew.setVisible(!enable);
btnSubmitAudit.setVisible(!enable);
btnSubmitAuditBack.setVisible(!enable);
btnEPrint.setVisible(!enable);
btnAudit.setVisible(enable);
btnAuditBack.setVisible(enable);
},
setSaveBtnStatus: function (enable) {
var btnESave = Ext.getCmp('btnESave');
//var btnESaveAndClose = Ext.getCmp('btnESaveAndClose');
var btnESaveAndNew = Ext.getCmp('btnESaveAndNew');
if (enable) {
btnESave.enable();
//btnESaveAndClose.enable();
btnESaveAndNew.enable();
} else {
btnESave.disable();
//btnESaveAndClose.disable();
btnESaveAndNew.disable();
}
},
//#endregion
//#region 打印
Print: function () {
/*
var basicForm = this.formEdit.getForm();
var billNo = basicForm.findField('BillNo').value;
if (billNo == '*' || billNo == '') {
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
return;
}
var printType = 'MSWLBULKBS';
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM tMsWlBulkHead WHERE BillNo = '" + billNo + "'";
var sql2 = "";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
*/
},
//#endregion
//#region 标记不同的方法
SetDiff: function () {
//主数据对比和点击事件设置
StoreDiffField.each(function (record) {
var fieldname = record.get('FieldName');
_this.setdifferent(fieldname);
});
//var tf = "false";
//if (this.editRecord.get('ISCONTAINERSOC')) {
// tf = "true";
//}
//this.formEdit.getForm().findField("ISCONTAINERSOC").setValue(tf);
},
SetDiff_store: function () {
BENDI = this.storeLocalCtnList.count();
SI = this.storeBodyList.count();
if (BENDI > SI) {
Ext.getCmp("morerecord").show();
}
if (BENDI < SI) {
Ext.getCmp("lessrecord").show();
}
},
getSIField: function (FieldName) {
SIField = this.formHead.getForm().findField(FieldName);
if (SIField == null) SIField = this.formEdit.getForm().findField(FieldName);
return SIField;
},
getSIValue: function (FieldName) {
result = this.editRecord.get(FieldName);
//SIField = this.getSIField(FieldName);
if (result == null) return;
return result;
},
checkDifferent: function (FieldName, SIValue, LocalValue) {
if (FieldName == "ETD" || FieldName == "CLOSINGDATE"|| FieldName == "CLOSEDOCDATE") {
SItime = new Date(Date.parse(SIValue.replace(/-/g, "/")));
Localtime = new Date(Date.parse(LocalValue.replace(/-/g, "/")));
if (SItime - Localtime == 0) return true;
else return false;
}
if (SIValue == LocalValue) return true;
return false;
},
setdifferent: function (FieldName) {
SIField = this.getSIField(FieldName);
if (SIField == null) return;
if (isNullorEmpty(this.LocalData)) return;
var SIValue = this.getSIValue(FieldName) + '';
var LocalValue = this.LocalData.get(FieldName) + '';
if (FieldName == "ISCONTAINERSOC") {
if (SIValue == "1" || SIValue == "true") SIValue = "true";
else {
SIValue = "false";
}
}
if (FieldName == "KGS" || FieldName == "CBM") {
LocalValue = getFloat(LocalValue, 4);
}
a = typeof (SIValue);
b = typeof (LocalValue);
isdifferent = this.checkDifferent(FieldName, SIValue, LocalValue);
if (isdifferent) {
SIField.setFieldStyle({
background: '#fff'
});
SIField.getEl().on('click',
function (a, b) {
return;
});
//将配套checkbox设为false
var field1 = this.formHead.getForm().findField('IS' + FieldName);
if (field1) {
field1.setValue(false);
return;
}
var field2 = this.formEdit.getForm().findField('IS' + FieldName);
if (field2) {
field2.setValue(false);
}
return;
} else {
SIField.setFieldStyle({
background: '#FF6EB4'
});
SIField.getEl().on('click',
function (a, b) {
_fieldname = b.name;
var _sivalue = _this.getSIValue(_fieldname);
var _localvalue = _this.LocalData.get(_fieldname);
if (_this.winAccess) {
_this.winAccess.close();
_this.winAccess = null;
}
_this.winAccess = new Shipping.Diffwin({
});
if (_fieldname == "ISCONTAINERSOC") {
if (_sivalue == "1" || _sivalue == "true") _sivalue = "是";
else {
_sivalue = "否";
}
if (_localvalue == "1" || _localvalue == "true") _localvalue = "是";
else {
_localvalue = "否";
}
}
_this.winAccess._sivalue = _sivalue;
_this.winAccess._localvalue = _localvalue;
_this.winAccess.show();
return;
});
}
},
//传入SI当中的一条数据的一个字段名和字段值以及主键箱号寻找对应本地数据是否相同如无记录 或数据相异则返回true
FindDiffenet_record: function (CNTRNO, FieldName, FieldValue) {
result = true;
this.storeLocalCtnList.each(function (record) {
if (record.get("CNTRNO") == CNTRNO) {
var locaovalue = record.get(FieldName);
if (FieldName == "TAREWEIGHT") {
locaovalue = getFloat(locaovalue, 4) + "";
if (locaovalue.indexOf(".") < 0) {
locaovalue = locaovalue + ".0000";
}
}
if (FieldName == "WEIGHKGS") {
locaovalue = getFloat(locaovalue, 4) + "";
if (locaovalue.indexOf(".") < 0) {
locaovalue = locaovalue + ".0000";
}
}
if (locaovalue + "" == FieldValue + "") {
result = false;
} else result = true;
}
});
return result;
},
FindLocal_value: function (CNTRNO, FieldName) {
result = "NaN";
this.storeLocalCtnList.each(function (record) {
if (record.get("CNTRNO") == CNTRNO) {
result = record.get(FieldName) + "";
if (FieldName == "TAREWEIGHT") {
result = getFloat(result, 4) + "";
if (result.indexOf(".") < 0) {
result = result + ".0000";
}
}
if (FieldName == "WEIGHKGS") {
result = getFloat(result, 4) + "";
if (result.indexOf(".") < 0) {
result = result + ".0000";
}
}
}
});
return result;
},
needFind: function (FieldName) {
result = false;
CtnDiffField.each(function (record) {
if (record.get("FieldName") == FieldName) {
result = true;
}
});
return result;
},
gridCellrenderer: function (value, meta, record, a, b, parentstore, c) {
headname = _this.initctncolumns[b].dataIndex;
if (!_this.needFind(headname)) {
return value;
} else {
isdifferent = _this.FindDiffenet_record(record.get("CNTRNO"), headname, value);
if (isdifferent) {
meta.tdCls = 'feestatus_shenmodify';
}
return value;
}
},
getFieldCheck: function (FieldName) {
var checked = this.getSIValue("IS" + FieldName);
if (checked == "1" || checked == "true" || checked == true) {
return true;
} else {
return false;
}
},
PrevRecord: function () {
var j = this.StoreList.indexOf(this.editRecord);
if (j == 0) {
Ext.Msg.show({
title: Zi.LAN.JingGao,
msg: Zi.LAN.YiShiZuiQianYiPiao,
icon: Ext.Msg.ERROR,
buttons: Ext.Msg.OK
}); //'已是最前一票'
return;
}
//if (j == this.StoreList.count) {
// Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.YiShiZuiHouYiPiao, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });//'已是最后一票'
// return;
//}
j = j - 1;
this.editRecord = this.StoreList.getAt(j);
condition = " SINO='" + this.editRecord.get('SINO') + "'";
this.LoadData(this.opStatus, condition);
},
NextRecord: function () {
var j = this.StoreList.indexOf(this.editRecord);
//if (j == 0) {
// Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.YiShiZuiQianYiPiao, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });//'已是最前一票'
// return;
//}
if (j >= this.StoreList.count() - 1) {
Ext.Msg.show({
title: Zi.LAN.JingGao,
msg: Zi.LAN.YiShiZuiHouYiPiao,
icon: Ext.Msg.ERROR,
buttons: Ext.Msg.OK
}); //'已是最后一票'
return;
}
j = j + 1;
this.editRecord = this.StoreList.getAt(j);
condition = " SINO='" + this.editRecord.get('SINO') + "'";
this.LoadData(this.opStatus, condition);
},
//#endregion
Save: function (DelMore) {
//将SI数据内 需要检查区别的部分完全保存至本地
//首先将SINO传至后台 然后在后台进行处理
_this = this;
//var SIFielddatas = [];
//for (var i = 0; i < StoreDiffField.getCount(); i += 1) {
// var member = StoreDiffField.getAt(i);
// SIFielddatas.push(member);
//}
var SIdatas = GetStoreDataArray(StoreDiffField);
var SIFieldList = ConvertRecordsToJsonAll(SIdatas);
//CtnFieldList = ConvertRecordsToJsonAll(CtnDiffField);
//CtnDetailFieldList = ConvertRecordsToJsonAll(CtnDetailDiffField);
var CtnFielddatas = GetStoreDataArray(CtnDiffField);
var CtnFieldList = ConvertRecordsToJsonAll(CtnFielddatas);
var CtnDetailFielddatas = GetStoreDataArray(CtnDetailDiffField);
var CtnDetailFieldList = ConvertRecordsToJsonAll(CtnDetailFielddatas);
var data1 = this.formHead.getForm().getValues();
var data2 = this.formEdit.getForm().getValues();
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/BookingConfirm/SaveSI',
params: {
SINO: _this.editRecord.get('SINO'),
data1: Ext.JSON.encode(data1),
data2: Ext.JSON.encode(data2),
SIFieldList: SIFieldList,
CtnFieldList: CtnFieldList,
CtnDetailFieldList: CtnDetailFieldList,
DelMore: DelMore
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success) {
Ext.Msg.show({
title: '提示',
msg: '引入成功!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK,
fn: function (btn) {
if (btn === 'ok') {
_this.LoadData('edit', " SINO= '" + _this.editRecord.get('SINO') + "'");
} else {
_this.LoadData('edit', " SINO= '" + _this.editRecord.get('SINO') + "'");
}
}
});
} else {
Ext.Msg.show({
title: Zi.LAN.JingGao,
msg: result.Message,
icon: Ext.Msg.WARNING,
buttons: Ext.Msg.OK,
fn: function (btn) {
if (btn === 'ok') {
_this.LoadData('edit', " SINO= '" + _this.editRecord.get('SINO') + "'");
} else {
_this.LoadData('edit', " SINO= '" + _this.editRecord.get('SINO') + "'");
}
}
}); //'费用未保存,请先保存费用!'
//_this.LoadData('edit', " SINO= '" + this.editRecord.get('SINO') + "'");
}
}
},
scope: this
});
}
,
Reject: function (DelMore) {
//将SI数据内 需要检查区别的部分完全保存至本地
//首先将SINO传至后台 然后在后台进行处理
_this = this;
//var SIFielddatas = [];
//for (var i = 0; i < StoreDiffField.getCount(); i += 1) {
// var member = StoreDiffField.getAt(i);
// SIFielddatas.push(member);
//}
var SIdatas = GetStoreDataArray(StoreDiffField);
var SIFieldList = ConvertRecordsToJsonAll(SIdatas);
//CtnFieldList = ConvertRecordsToJsonAll(CtnDiffField);
//CtnDetailFieldList = ConvertRecordsToJsonAll(CtnDetailDiffField);
var CtnFielddatas = GetStoreDataArray(CtnDiffField);
var CtnFieldList = ConvertRecordsToJsonAll(CtnFielddatas);
var CtnDetailFielddatas = GetStoreDataArray(CtnDetailDiffField);
var CtnDetailFieldList = ConvertRecordsToJsonAll(CtnDetailFielddatas);
var data1 = this.formHead.getForm().getValues();
var data2 = this.formEdit.getForm().getValues();
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/BookingConfirm/RejectSI',
params: {
SINO: _this.editRecord.get('SINO'),
orreason: _this.reason,
email: _this.email
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (result.Success) {
Ext.Msg.show({
title: '提示',
msg: '拒绝成功!',
icon: Ext.Msg.INFO,
buttons: Ext.Msg.OK
});
_this.LoadData('edit', " SINO= '" + this.editRecord.get('SINO') + "'");
_this.winAuditBackShow.close();
} else {
Ext.Msg.show({
title: Zi.LAN.JingGao,
msg: result.Message,
icon: Ext.Msg.WARNING,
buttons: Ext.Msg.OK
}); //'费用未保存,请先保存费用!'
_this.LoadData('edit', " SINO= '" + this.editRecord.get('SINO') + "'");
_this.winAuditBackShow.close();
}
}
},
scope: this
});
}
});