|
|
//2013-03-15 删除固定费用
|
|
|
Ext.namespace('DsTruck');
|
|
|
|
|
|
DsTruck.MsPcHYRDEdit = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.DsTruck.MsPcHYRDEdit.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(DsTruck.MsPcHYRDEdit, Ext.Panel, {
|
|
|
|
|
|
ParentWin: null,
|
|
|
OpStatus: 'add',
|
|
|
StoreList: null,
|
|
|
editRecord: null,
|
|
|
stroplb: '陆运装箱',
|
|
|
selectPGID: '',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.fixSerialNo = 0;
|
|
|
this.fixBodyDel = [];
|
|
|
this.accdatesameetd = 0;
|
|
|
this.modPcHeadEdit_GDFY = 0;
|
|
|
this.MsPeriod = null;
|
|
|
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'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Ext.define('PCmb', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: '',
|
|
|
fields: [
|
|
|
{ name: 'ywType', type: 'string' },
|
|
|
{ name: 'PcBillType', type: 'string' },
|
|
|
{ name: 'PcBillTypeREF', type: 'string' },
|
|
|
{ name: 'timeMark', type: 'string' },
|
|
|
{ name: 'gId', type: 'string' },
|
|
|
{ name: 'PGid', type: 'string' },
|
|
|
{ name: 'BLTYPE', type: 'string' },
|
|
|
{ name: 'RowNumber', type: 'string' },
|
|
|
{ name: 'BillNo', type: 'string' },
|
|
|
{ name: 'ExpDate', type: 'string'},
|
|
|
{ name: 'GroupDate', type: 'string' },
|
|
|
{ name: 'EndPortDate', type: 'string'},
|
|
|
{ name: 'EtDate', type: 'string' },
|
|
|
{ name: 'VoyVeg', type: 'string' },
|
|
|
{ name: 'VoyVegSe', type: 'string' },
|
|
|
{ name: 'EtDateSe', type: 'string' },
|
|
|
{ name: 'ArriveDate', type: 'string' },
|
|
|
{ name: 'ReturnDate', type: 'string' },
|
|
|
{ name: 'CustomerName', type: 'string' },
|
|
|
{ name: 'F_CustomerName', type: 'string' },
|
|
|
{ name: 'DdName', type: 'string' },
|
|
|
{ name: 'DrvName', type: 'string' },
|
|
|
{ name: 'TruckNo', type: 'string' },
|
|
|
{ name: 'MblNo', type: 'string' },
|
|
|
{ name: 'LinkMan', type: 'string' },
|
|
|
{ name: 'DstArea', type: 'string' },
|
|
|
{ name: 'DetiNation', type: 'string' },
|
|
|
{ name: 'ContainerQty', type: 'string' },
|
|
|
{ name: 'Ton', type: 'string' },
|
|
|
{ name: 'AroundTon', type: 'string' },
|
|
|
{ name: 'OverLoadMil', type: 'string' },
|
|
|
{ name: 'LoadCount', type: 'string' },
|
|
|
{ name: 'LoadPlace', type: 'string' },
|
|
|
{ name: 'TruckSpec', type: 'string' },
|
|
|
{ name: 'IsDouble', type: 'string' },
|
|
|
{ name: 'Property', type: 'string' },
|
|
|
{ name: 'YUNFEI', type: 'string' },
|
|
|
{ name: 'HCHJ', type: 'string' },
|
|
|
{ name: 'ZXF', type: 'string' },
|
|
|
{ name: 'DDF', type: 'string' },
|
|
|
{ name: 'QTFee', type: 'string' },
|
|
|
{ name: 'TotalFee', type: 'string' },
|
|
|
{ name: 'Remark', type: 'string' },
|
|
|
{ name: 'FEESTATUS', type: 'string' },
|
|
|
{ name: 'FEESTATUSREF', type: 'string' },
|
|
|
{ name: 'BSSTATUSREF', type: 'string' },
|
|
|
{ name: 'UserCode', type: 'string' },
|
|
|
{ name: 'UserName', type: 'string' },
|
|
|
{ name: 'OrgName', type: 'string' },
|
|
|
{ name: 'LrDate', type: 'string' },
|
|
|
{ name: 'PCSTATUSREF', type: 'string' },
|
|
|
{ name: 'RefBillNo', type: 'string' },
|
|
|
{ name: 'RefBillNose', type: 'string' },
|
|
|
{ name: 'MblNoSe', type: 'string' },
|
|
|
{ name: 'ContainerType', type: 'string' },
|
|
|
{ name: 'LinkTel', type: 'string' },
|
|
|
{ name: 'YardName', type: 'string' },
|
|
|
{ name: 'LinkManSe', type: 'string' },
|
|
|
{ name: 'LinkTelSe', type: 'string' },
|
|
|
{ name: 'RtnYardName', type: 'string' },
|
|
|
{ name: 'BsType', type: 'string' },
|
|
|
{ name: 'CustName', type: 'string' },
|
|
|
{ name: 'CustLikeManName', type: 'string' },
|
|
|
{ name: 'DispatchName', type: 'string' },
|
|
|
{ name: 'INVOICENO', type: 'string' },
|
|
|
{ name: 'KINDPKGS', type: 'string' },
|
|
|
{ name: 'CUSTNO', type: 'string' },
|
|
|
{ name: 'SalesName', type: 'string' },
|
|
|
{ name: 'GoodsName', type: 'string' },
|
|
|
{ name: 'RtnDocStatus', type: 'string' },
|
|
|
{ name: 'RtnDocTime', type: 'string' },
|
|
|
{ name: 'PORTLOAD', type: 'string' },
|
|
|
{ name: 'DESTINATION', type: 'string' },
|
|
|
{ name: 'SALECORPID', type: 'string' },
|
|
|
{ name: 'SALECORP', type: 'string' },
|
|
|
{ name: 'DCLASS', type: 'string' },
|
|
|
{ name: 'DUNNO', type: 'string' },
|
|
|
{ name: 'OPSTATUS', type: 'string' },
|
|
|
{ name: 'COLOR', type: 'string' },
|
|
|
{ name: 'FuelPrice', type: 'number' },
|
|
|
{ name: 'FuelQty', type: 'number' },
|
|
|
{ name: 'RealMil', type: 'number' },
|
|
|
{ name: 'RatedMil', type: 'number' },
|
|
|
{ name: 'RatedFuel', type: 'number' },
|
|
|
{ name: 'DetiNationSe', type: 'string' },
|
|
|
{ name: 'FactoryAddrSe', type: 'string' },
|
|
|
{ name: 'ContainerNoSe', type: 'string' },
|
|
|
{ name: 'ISSHUISHI', type: 'boolean' },
|
|
|
{ name: 'ISGAOWEN', type: 'boolean' },
|
|
|
{ name: 'ISXIANLIANG', type: 'boolean' },
|
|
|
{ name: 'ISCHECHUAN', type: 'boolean' },
|
|
|
{ name: 'ISHAIWU', type: 'boolean' },
|
|
|
{ name: 'ISFENGXIANG', type: 'boolean' },
|
|
|
{ name: 'ISWEISHENBAO', type: 'boolean' },
|
|
|
{ name: 'ISBAOGUAN', type: 'boolean' },
|
|
|
{ name: 'ISPINGTAI', type: 'boolean' },
|
|
|
{ name: 'FrTruckNo', type: 'string' },
|
|
|
{ name: 'FrDrvName', type: 'string' },
|
|
|
{ name: 'WmsTruckNo', type: 'string' },
|
|
|
{ name: 'WmsDrvName', type: 'string' },
|
|
|
{ name: 'ChangedReson', type: 'string' },
|
|
|
{ name: 'LoadFactory', type: 'string' },
|
|
|
{ name: 'CargoID', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
Ext.define('Tradermb', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'gid',
|
|
|
fields: [
|
|
|
{ name: 'gid', type: 'string' },
|
|
|
{ name: 'name', type: 'string' },
|
|
|
{ name: 'codename', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
Ext.define('DsShipping.ux.CustomRefModel', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
fields: [
|
|
|
{ name: 'GId', type: 'string' },
|
|
|
{ name: 'CustCode', type: 'string' },
|
|
|
{ name: 'CustName', type: 'string' },
|
|
|
{ name: 'CodeAndName', type: 'string' },
|
|
|
{ name: 'SALE', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
Ext.define('MsOpSeaeDetail', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
fields: [
|
|
|
{ name: 'GID', type: 'string' },
|
|
|
{ name: 'CTN_ID', type: 'string' },
|
|
|
{ name: 'MASTERNO', type: 'string' },
|
|
|
{ name: 'BSNO', type: 'string' },
|
|
|
{ name: 'sub_bno', type: 'string' },
|
|
|
{ name: 'bno', type: 'string' },
|
|
|
{ name: 'CTNCODE', type: 'string' },
|
|
|
{ name: 'SIZE', type: 'string' },
|
|
|
{ name: 'CTN', type: 'string' },
|
|
|
{ name: 'CTNNUM', type: 'int' },
|
|
|
{ name: 'TEU', type: 'int' },
|
|
|
{ name: 'CTNALL', type: 'string' },
|
|
|
{ name: 'CNTRNO', type: 'string' },
|
|
|
{ name: 'SEALNO', type: 'string' },
|
|
|
{ name: 'PKGS', type: 'int' },
|
|
|
{ name: 'KGS', type: 'decimal' },
|
|
|
{ name: 'CBM', type: 'decimal' },
|
|
|
{ name: 'FENPKGS', type: 'int' },
|
|
|
{ name: 'FENKGS', type: 'decimal' },
|
|
|
{ name: 'FENCBM', type: 'decimal' },
|
|
|
{ name: 'REMARK', type: 'string' },
|
|
|
{ name: 'KINDPKGS', type: 'string' },
|
|
|
{ name: 'TAREWEIGHT', type: 'decimal' }, //箱皮重
|
|
|
{ name: 'TTLWEIGHT', type: 'decimal' }, //箱皮重
|
|
|
{ name: 'GOODSNAME', type: 'string' }, //箱皮重
|
|
|
{ name: 'EXITDOOR', type: 'string' }, //箱皮重
|
|
|
{ name: 'ENTERDOOR', type: 'string' }, //箱皮重
|
|
|
{ name: 'CTNSTATUS', type: 'string' }, //箱皮重
|
|
|
{ name: 'MASTERNO', type: 'string' },
|
|
|
{ name: 'VESSEL', type: 'string' }, //箱皮重
|
|
|
{ name: 'VOYNO', type: 'string' }, //箱皮重
|
|
|
{ name: 'MBLNO', type: 'string' }, //箱皮重
|
|
|
{ name: 'TRUCKNO', type: 'string' }, //箱皮重
|
|
|
{ name: 'TRUCKTYPE', type: 'string' }, //箱皮重
|
|
|
{ name: 'ONBORD', type: 'string' }, //箱皮重
|
|
|
{ name: 'ETD', type: 'string' },
|
|
|
{ name: 'ISTEMP', type: 'string' },//暂出
|
|
|
{ name: 'WEIGHTYPE', type: 'string' }, //称重方式
|
|
|
{ name: 'WEIGHKGS', type: 'decimal' }, //称重重量
|
|
|
{ name: 'WEIGHATTN', type: 'string' }, //Shipper VGM 联系人
|
|
|
{ name: 'WEIGHTEL', type: 'string' }, //VGM联系人的联系方式
|
|
|
{ name: 'WEIGHSIGN', type: 'string' }, ////VGM负责人签名
|
|
|
{ name: 'WEIGHDATE', type: 'string' }, //VGM称重日期
|
|
|
{ name: 'VGMADDR', type: 'string' }, ////VGM负责人签名
|
|
|
{ name: 'VGMEMAIL', type: 'string' }, //VGM称重日期
|
|
|
{ name: 'TiXiangShiJian', type: 'string' },
|
|
|
{ name: 'FanChangShiJian', type: 'string' },
|
|
|
{ name: 'TRUCKER', type: 'string' },
|
|
|
{ name: 'TRUCKFEE', type: 'decimal' },
|
|
|
{ name: 'FREESTORAGEDAY', type: 'int' },
|
|
|
{ name: 'STORAGEDAY', type: 'int' },
|
|
|
{ name: 'STORAGEPRICE', type: 'decimal' },
|
|
|
{ name: 'STORAGEFEE', type: 'decimal' },
|
|
|
{ name: 'FREECTNDAY', type: 'int' },
|
|
|
{ name: 'CTNDAY', type: 'int' },
|
|
|
{ name: 'CTNPRICE', type: 'decimal' },
|
|
|
{ name: 'CTNFEE', type: 'decimal' },
|
|
|
{ name: 'PCTN_ID', type: 'string' },
|
|
|
{ name: 'VGMCONNCOM', type: 'string' } //VGM联系公司
|
|
|
|
|
|
]
|
|
|
});
|
|
|
|
|
|
//#region 编辑Form
|
|
|
_this = this;
|
|
|
|
|
|
this.storeCustomerName = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'Tradermb',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetTraderRm' }
|
|
|
});
|
|
|
this.storeCustomerName.load();
|
|
|
this.comboxCustomerName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
id: "CustomerName", //hidden: true,
|
|
|
forceSelection: true,
|
|
|
store: this.storeCustomerName,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'CustomerName',
|
|
|
valueField: 'name',
|
|
|
displayField: 'codename',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
//var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + combo.value + "')";
|
|
|
//this.storeInfoClientContact.load({ params: { condition: s} });
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
_thisPc = this;
|
|
|
|
|
|
|
|
|
this.StoreBLTYPE = Ext.create('Ext.data.Store', {
|
|
|
fields: ['BLTYPE']
|
|
|
});
|
|
|
this.StoreBLTYPE.add({ "BLTYPE": "派车主票" });
|
|
|
this.StoreBLTYPE.add({ "BLTYPE": "派车分票" });
|
|
|
this.StoreBLTYPE.add({ "BLTYPE": "派车单票" });
|
|
|
|
|
|
|
|
|
this.comboxBLTYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '派车单类型',
|
|
|
store: this.StoreBLTYPE,
|
|
|
forceSelection: true,
|
|
|
name: 'BLTYPE',
|
|
|
valueField: 'BLTYPE',
|
|
|
displayField: 'BLTYPE',
|
|
|
value: '派车单票'
|
|
|
});
|
|
|
|
|
|
this.StorePcBillType = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.StorePcBillType.load({ params: { enumTypeId: 99046} });
|
|
|
|
|
|
|
|
|
this.comboxPcBillType = Ext.create('DsExt.ux.RefEnumCombox', {
|
|
|
fieldLabel: '类型',
|
|
|
store: this.StorePcBillType,
|
|
|
forceSelection: true,
|
|
|
name: 'PcBillType'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.StoreTruckType = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.StoreTruckType.load({ params: { enumTypeId: 99019} });
|
|
|
|
|
|
|
|
|
this.comboxTruckType = Ext.create('DsExt.ux.RefEnumCombox', {
|
|
|
fieldLabel: '车型',
|
|
|
store: this.StoreTruckType,
|
|
|
//flex: 0.5,
|
|
|
labelWidth: 60, // forceSelection: true,
|
|
|
name: 'TruckSpec'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeTruckSpec = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.storeTruckSpec.load({ params: { enumTypeId: 99025 } });
|
|
|
|
|
|
this.comboxTruckSpec = Ext.create('DsExt.ux.RefEnumCombox', {
|
|
|
fieldLabel: '业务来源',
|
|
|
store: this.storeTruckSpec,
|
|
|
/* labelWidth: 60,*/
|
|
|
//flex: 0.5,
|
|
|
forceSelection: true,
|
|
|
name: 'TruckSpec'
|
|
|
});
|
|
|
|
|
|
//this.StoreBsType = Ext.create('Ext.data.Store', {
|
|
|
// fields: ['BLTYPE']
|
|
|
//});
|
|
|
//this.StoreBsType.add({ "BLTYPE": "海运出口" });
|
|
|
//this.StoreBsType.add({ "BLTYPE": "海运进口" });
|
|
|
//this.StoreBsType.add({ "BLTYPE": "空运出口" });
|
|
|
//this.StoreBsType.add({ "BLTYPE": "空运进口" });
|
|
|
|
|
|
|
|
|
//this.comboxBsType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
// fieldLabel: '业务类型',
|
|
|
// store: this.StoreBsType,
|
|
|
// forceSelection: true,
|
|
|
// name: 'BsType',
|
|
|
// valueField: 'BLTYPE',
|
|
|
// displayField: 'BLTYPE'
|
|
|
//});
|
|
|
Ext.define('DsShipping.ux.CodePackageModel', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
fields: [
|
|
|
{ name: 'PKGS', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
//件数包装
|
|
|
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', {
|
|
|
store: this.storeCodePackage,
|
|
|
name: 'KINDPKGS',
|
|
|
valueField: 'PKGS',
|
|
|
displayField: 'PKGS'
|
|
|
});
|
|
|
|
|
|
Ext.define('MsWlBsHeadRefMsWlTruck', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
fields: [
|
|
|
{ name: 'TruckNo', type: 'string' },
|
|
|
{ name: 'DrvCode', type: 'string' },
|
|
|
{ name: 'DrvName', type: 'string' },
|
|
|
{ name: 'Mobile', type: 'string' },
|
|
|
{ name: 'OWNER', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.storeTruckNo = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsWlBsHeadRefMsWlTruck',
|
|
|
proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' }
|
|
|
});
|
|
|
this.storeTruckNo.load({ params: { condition: ""} });
|
|
|
|
|
|
this.comboxTruckNo = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '空箱车号',
|
|
|
store: this.storeTruckNo,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'TruckNo',
|
|
|
name: 'TruckNo',
|
|
|
valueField: 'TruckNo',
|
|
|
displayField: 'TruckNo',
|
|
|
matchFieldWidth: true,
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
this.formEdit.getForm().findField('F_CustomerName').setValue(records[0].data.OWNER);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeWmsTruckNo = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsWlBsHeadRefMsWlTruck',
|
|
|
proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' }
|
|
|
});
|
|
|
this.storeWmsTruckNo.load({ params: { condition: "" } });
|
|
|
|
|
|
this.comboxWmsTruckNo = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '入库车号',
|
|
|
store: this.storeWmsTruckNo,
|
|
|
name: 'WmsTruckNo',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'TruckNo',
|
|
|
valueField: 'TruckNo',
|
|
|
displayField: 'TruckNo',
|
|
|
matchFieldWidth: true,
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
this.formEdit.getForm().findField('F_CustomerName').setValue(records[0].data.OWNER);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
////委托单位_联系人
|
|
|
//this.storeInfoClientContact = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
// model: 'DsShipping.ux.InfoClientContactModel',
|
|
|
// proxy: { url: '/CommMng/BasicDataRef/GetInfoClientContactList' }
|
|
|
//});
|
|
|
|
|
|
//this.comboxInfoClientContactYard = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
// fieldLabel: '客户联系人',
|
|
|
// store: this.storeInfoClientContact,
|
|
|
// name: 'LinkMan',
|
|
|
// valueField: 'SHOWNAME',
|
|
|
// displayField: 'SHOWNAME',
|
|
|
// listeners: {
|
|
|
// scope: this,
|
|
|
// 'select': function (combo, records, eOpts) {
|
|
|
// if (records.length > 0) {
|
|
|
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
//});
|
|
|
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefList' }
|
|
|
});
|
|
|
this.storeOpCode.load({ params: { condition: ""} });
|
|
|
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '揽货人', //'揽货人',
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'SalesName',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName',
|
|
|
value: SHOWNAME
|
|
|
});
|
|
|
//人员信息加载
|
|
|
this.storeDdCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
|
|
|
});
|
|
|
this.storeDdCode.load();
|
|
|
//客服
|
|
|
this.comboxDdName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '客服',
|
|
|
store: this.storeDdCode,
|
|
|
queryMode: 'remote',
|
|
|
//flex: 0.5,
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
// flex: 0.5,
|
|
|
forceSelection: true,
|
|
|
name: 'DdName',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
//人员信息加载
|
|
|
this.storeDOCCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
|
|
|
});
|
|
|
this.storeDOCCode.load();
|
|
|
//客服
|
|
|
this.comboxDOCName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '单证',
|
|
|
store: this.storeDOCCode,
|
|
|
queryMode: 'remote',
|
|
|
//flex: 0.5,
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
// flex: 0.5,
|
|
|
forceSelection: true,
|
|
|
name: 'LinkManSe',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
//客户加载_场站
|
|
|
this.storeYARD = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListYARD' }
|
|
|
});
|
|
|
// this.storeYARD.loadData(this.mainWin.GetPubStore("OPSEAE_YARD").data.items);
|
|
|
this.storeYARD.load();
|
|
|
//
|
|
|
this.comboxYARD = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '场站', //'场站',
|
|
|
store: this.storeYARD,
|
|
|
forceSelection: true,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'YardName',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
//货物标识
|
|
|
this.StoreCargoid = Ext.create('Ext.data.Store', {
|
|
|
fields: [ 'NAME']
|
|
|
});
|
|
|
this.StoreCargoid.add({"NAME": "S普通货" });
|
|
|
|
|
|
this.StoreCargoid.add({ "NAME": "D危险品" });
|
|
|
|
|
|
|
|
|
|
|
|
this.comboxCargoid = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
store: this.StoreCargoid,
|
|
|
fieldLabel: "货物标识",
|
|
|
forceSelection: true,
|
|
|
width: 1200,
|
|
|
name: 'CargoID',
|
|
|
valueField: 'NAME',
|
|
|
displayField: 'NAME'
|
|
|
|
|
|
});
|
|
|
Ext.define('MsCodeFactry', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'GID',
|
|
|
fields: [
|
|
|
{ name: 'GID', type: 'string' },
|
|
|
{ name: 'CODENAME', type: 'string' },
|
|
|
{ name: 'CUSTOMERNAME', type: 'string' },
|
|
|
{ name: 'FACTRYNAME', type: 'string' },
|
|
|
{ name: 'FACTRYADDR', type: 'string' },
|
|
|
{ name: 'FACTRYATTN', type: 'string' },
|
|
|
{ name: 'FACTRYTEL', type: 'string' },
|
|
|
{ name: 'CodeAndName', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
//客户加载_工厂
|
|
|
this.storeFactry = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsCodeFactry',
|
|
|
proxy: { url: '/MvcShipping/MsCodeFactry/GetDataListRm' }
|
|
|
});
|
|
|
this.storeFactry.load();
|
|
|
//工厂
|
|
|
this.comboxFactory = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '工厂名称',
|
|
|
flex: 1,
|
|
|
store: this.storeFactry,
|
|
|
matchFieldWidth: false, //下拉款自适应宽度
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
autoSelect: true,
|
|
|
name: 'LoadFactory',
|
|
|
valueField: 'FACTRYNAME',
|
|
|
displayField: 'CodeAndName',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
var dataFactory = records[0].data;
|
|
|
this.formEdit.getForm().findField('FactoryAddrSe').setValue(dataFactory.FACTRYADDR);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.storeRtnDocStatus = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeRtnDocStatus.add({ "FSTATUS": "无装箱证明", "NAME": "无装箱证明" });
|
|
|
this.storeRtnDocStatus.add({ "FSTATUS": "无转港", "NAME": "无转港" });
|
|
|
this.storeRtnDocStatus.add({ "FSTATUS": "已办", "NAME": "已办" });
|
|
|
this.storeRtnDocStatus.add({ "FSTATUS": "1", "NAME": "1" });
|
|
|
this.storeRtnDocStatus.add({ "FSTATUS": "缺附件", "NAME": "缺附件" });
|
|
|
this.storeRtnDocStatus.add({ "FSTATUS": "完结", "NAME": "完结" });
|
|
|
|
|
|
|
|
|
this.comboxRtnDocStatus = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '集港单', //是否开垫付
|
|
|
store: this.storeRtnDocStatus,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
forceSelection: true,
|
|
|
name: 'RtnDocStatus',
|
|
|
enableKeyEvents: true
|
|
|
});
|
|
|
|
|
|
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:'所属分部', //'委托分公司',
|
|
|
store: this.storeSaleCompany,
|
|
|
forceSelection: true,
|
|
|
name: 'SALECORPID',
|
|
|
valueField: 'GID',
|
|
|
displayField: 'NAME'
|
|
|
});
|
|
|
|
|
|
this.storeDrvName = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsWlBsHeadRefMsWlDriver',
|
|
|
proxy: { url: '/TruckMng/MsWlPc/GetDrvNameList' }
|
|
|
});
|
|
|
this.storeDrvName.load({ params: { condition: "" } });
|
|
|
this.comboxDrvName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '空箱司机',
|
|
|
store: this.storeDrvName,
|
|
|
name: 'DrvCode',
|
|
|
valueField: 'DrvName',
|
|
|
displayField: 'DrvName'
|
|
|
,
|
|
|
listeners: {
|
|
|
beforequery: function (e) {
|
|
|
return FilterCombox(e, 1); //在beforequery使用此方法
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeWmsDrvName = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsWlBsHeadRefMsWlDriver',
|
|
|
proxy: { url: '/TruckMng/MsWlPc/GetDrvNameList' }
|
|
|
});
|
|
|
this.storeWmsDrvName.load({ params: { condition: "" } });
|
|
|
this.comboxWmsDrvName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '入库司机',
|
|
|
store: this.storeWmsDrvName,
|
|
|
name: 'WmsDrvName',
|
|
|
valueField: 'DrvName',
|
|
|
displayField: 'DrvName'
|
|
|
,
|
|
|
listeners: {
|
|
|
beforequery: function (e) {
|
|
|
return FilterCombox(e, 1); //在beforequery使用此方法
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeBodyList = 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.StoreCTNSTATUS = Ext.create('Ext.data.Store', {
|
|
|
fields: ['ID', 'NAME']
|
|
|
});
|
|
|
this.StoreCTNSTATUS.add({ "ID": "F", "NAME": "整箱" });
|
|
|
this.StoreCTNSTATUS.add({ "ID": "E", "NAME": "空箱" });
|
|
|
this.StoreCTNSTATUS.add({ "ID": "L", "NAME": "拼箱" });
|
|
|
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'
|
|
|
});
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 40
|
|
|
});
|
|
|
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.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
clicksToEdit: 1
|
|
|
});
|
|
|
|
|
|
this.initctncolumns = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTN_ID',
|
|
|
header: '编号', //'编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号', //'业务编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
},
|
|
|
//{
|
|
|
//sortable: true,
|
|
|
//dataIndex: 'CTNCODE',
|
|
|
//header: Zi.LAN.CTNCODE, //'序号',
|
|
|
//width: 30
|
|
|
//},
|
|
|
|
|
|
{
|
|
|
dataIndex: 'CTNALL',
|
|
|
header: '箱型', //'箱型',
|
|
|
width: 65,
|
|
|
editor: this.comboxCTNALL
|
|
|
}, {
|
|
|
dataIndex: 'CTNNUM',
|
|
|
header: '箱量', //'箱量',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'CNTRNO',
|
|
|
header: '箱号', //'箱号',
|
|
|
width: 100,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
// regex: /^[a-zA-Z]{4}[0-9]{7}$/,
|
|
|
// regextext: Zi.LAN., //'请输入正确的箱号!',
|
|
|
selectOnFocus: true
|
|
|
},
|
|
|
renderer: function (value, cellmeta) {
|
|
|
return value.trim();
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'SEALNO',
|
|
|
header: '封号', //'封号',
|
|
|
width: 80,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PKGS',
|
|
|
header: '件数', //'件数',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'KINDPKGS',
|
|
|
header: '包装', //'包装',
|
|
|
width: 70,
|
|
|
editor: this.comboxKINDPKGS
|
|
|
}, {
|
|
|
dataIndex: 'KGS',
|
|
|
header: '重量', //'重量',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'CBM',
|
|
|
header: '尺码', //'尺码',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'TTLWEIGHT',
|
|
|
header: '参考重量', //'参考重量',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta, record) {
|
|
|
return Add(record.data.KGS, record.data.TAREWEIGHT);
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'WEIGHTYPE',
|
|
|
header: '称重方式', //'称重方式',
|
|
|
width: 60,
|
|
|
editor: this.comboxWEIGHTYPE
|
|
|
}, {
|
|
|
dataIndex: 'WEIGHKGS',
|
|
|
header: '称重重量', //'称重重量',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'WEIGHATTN',
|
|
|
header: 'VGM联系人', //'VGM联系人',
|
|
|
width: 80,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'VGMCONNCOM',
|
|
|
header: 'VGM联系人', //'VGM联系人',
|
|
|
width: 80,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'WEIGHTEL',
|
|
|
header: 'VGM联系电话', //'VGM联系电话',
|
|
|
width: 80,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'WEIGHSIGN',
|
|
|
header: 'VGM联系人签名', //'VGM联系人签名',
|
|
|
width: 100,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'WEIGHDATE',
|
|
|
header: 'VGM称重日期', //'VGM称重日期',
|
|
|
editor: {
|
|
|
xtype: 'datefield',
|
|
|
format: 'Y-m-d'
|
|
|
},
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 100
|
|
|
}, {
|
|
|
dataIndex: 'VGMADDR',
|
|
|
header: 'VGM地址', //'VGM联系人签名',
|
|
|
width: 100,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'VGMEMAIL',
|
|
|
header: 'VGM邮箱', //'VGM联系人签名',
|
|
|
width: 100,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'REMARK',
|
|
|
header: '备注', //'备注',
|
|
|
width: 150,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'CTNSTATUS',
|
|
|
header: '箱状态', //'箱状态',
|
|
|
width: 70,
|
|
|
editor: this.comboxCTNSTATUS,
|
|
|
renderer: function (value, p, record) {
|
|
|
if (value == 'E')
|
|
|
return Zi.LAN.KongXiang;
|
|
|
else if (value == 'L')
|
|
|
return Zi.LAN.PinXiang;
|
|
|
else return Zi.LAN.ZhengXiang;
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'ISTEMP',
|
|
|
header: '箱状态', //'箱状态',
|
|
|
width: 70,
|
|
|
editor: this.comboxISTEMP,
|
|
|
renderer: function (value, p, record) {
|
|
|
if (value == '1')
|
|
|
return '是';
|
|
|
else return '否';
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'MASTERNO',
|
|
|
header: '主拼号', //'主拼号',
|
|
|
width: 100,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'TRUCKER',
|
|
|
header: '车队',
|
|
|
width: 65,
|
|
|
editor: this.comboxTRUCKERCTN
|
|
|
}, {
|
|
|
dataIndex: 'TRUCKNO',
|
|
|
header: '车号', //'车号',
|
|
|
width: 100,
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRUCKFEE',
|
|
|
header: '运费', //'运费',
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
keyNavEnabled: false,
|
|
|
selectOnFocus: true,
|
|
|
hideTrigger: true,
|
|
|
mouseWheelEnabled: false,
|
|
|
decimalPrecision: 2,
|
|
|
enableKeyEvents: true
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
dataIndex: 'FREESTORAGEDAY',
|
|
|
header:'免堆天数',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'STORAGEDAY',
|
|
|
header: '堆存天数',
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'STORAGEPRICE',
|
|
|
header: '堆存费/天', //'运费',
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
keyNavEnabled: false,
|
|
|
selectOnFocus: true,
|
|
|
hideTrigger: true,
|
|
|
mouseWheelEnabled: false,
|
|
|
decimalPrecision: 2,
|
|
|
enableKeyEvents: true
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'STORAGEFEE',
|
|
|
header:'堆存费', //'运费',
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
keyNavEnabled: false,
|
|
|
selectOnFocus: true,
|
|
|
hideTrigger: true,
|
|
|
mouseWheelEnabled: false,
|
|
|
decimalPrecision: 2,
|
|
|
enableKeyEvents: true
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
dataIndex: 'FREECTNDAY',
|
|
|
header: "免箱使天数",
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TIXIANGSHIJIAN',
|
|
|
header: "提箱时间", //'VGM称重日期',
|
|
|
editor: {
|
|
|
xtype: 'datefield',
|
|
|
format: 'Y-m-d'
|
|
|
},
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 100
|
|
|
}, {
|
|
|
dataIndex: 'CTNDAY',
|
|
|
header: "箱使天数",
|
|
|
width: 60,
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNPRICE',
|
|
|
header: "箱使费/天", //'运费',
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
keyNavEnabled: false,
|
|
|
selectOnFocus: true,
|
|
|
hideTrigger: true,
|
|
|
mouseWheelEnabled: false,
|
|
|
decimalPrecision: 2,
|
|
|
enableKeyEvents: true
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNFEE',
|
|
|
header: "箱使费", //'运费',
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
keyNavEnabled: false,
|
|
|
selectOnFocus: true,
|
|
|
hideTrigger: true,
|
|
|
mouseWheelEnabled: false,
|
|
|
decimalPrecision: 2,
|
|
|
enableKeyEvents: true
|
|
|
},
|
|
|
align: 'right',
|
|
|
width: 80
|
|
|
}];
|
|
|
|
|
|
this.ctncolumns = this.initctncolumns;
|
|
|
this.CtnGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeBodyList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [this.gridListCellEditing],
|
|
|
selModel: this.CtnGridCheckBoxModel,
|
|
|
selType: 'cellmodel',
|
|
|
|
|
|
tbar: [
|
|
|
|
|
|
{
|
|
|
text: '增加明细', //'增加明细',
|
|
|
tooltip: '增加明细', //'增加明细',
|
|
|
id: "btnadddetail",
|
|
|
iconCls: "btnadddetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onAddCtnDetailClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '删除明细', //'删除明细',
|
|
|
tooltip: '删除明细', //'删除明细',
|
|
|
id: "btndeldetail",
|
|
|
iconCls: "btndeletedetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onDelCtnDetailClick(1);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
, '-', {
|
|
|
text: '展开集装箱', //'展开集装箱',
|
|
|
id: "btnadddetail2",
|
|
|
handler: function (button, event) {
|
|
|
this.onUpDetailClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '引入场站数据', //'引入场站数据',
|
|
|
id: "btnaddyarddata",
|
|
|
handler: function (button, event) {
|
|
|
this.onaddyarddataClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
text: "场站数据查看",
|
|
|
handler: function (button, event) {
|
|
|
this.onGETYARDClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '引入EXCEL数据', //'引入EXCEL数据',
|
|
|
menu: [
|
|
|
{
|
|
|
text: "集装箱信息", //"集装箱信息",
|
|
|
handler: function (button, event) {
|
|
|
_thisPc.onImportCtnClick(button, event);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
iconCls: "btnmore",
|
|
|
handler: function (button, event) {
|
|
|
_thisPc.winCtnListShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式", //"保存列表样式",
|
|
|
menu: [
|
|
|
{
|
|
|
text: "保存", //"保存",
|
|
|
handler: function (button, event) {
|
|
|
_thisPc.ctncolumns = DsTruck.SaveGridPanel(USERID, 'PCCTNCOLUMN', _thisPc.gridList.columns, _thisPc.ctncolumns, 0, true);
|
|
|
_thisPc.gridList.reconfigure(this.storeBodyList, _thisPc.ctncolumns);
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: "初始化", //"初始化",
|
|
|
handler: function (menu, event) {
|
|
|
_thisPc.gridList.reconfigure(_thisPc.storeBodyList, _thisPc.initctncolumns);
|
|
|
_thisPc.ctncolumns = DsTruck.SaveGridPanel(USERID, 'PCCTNCOLUMN', _thisPc.gridList.columns, _thisPc.initctncolumns, 0, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}],
|
|
|
|
|
|
columns: this.ctncolumns
|
|
|
});
|
|
|
this.ctncolumns = DsTruck.GetGridPanel(USERID, 'PCCTNCOLUMN', this.ctncolumns, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.ctncolumns.unshift(new Ext.grid.RowNumberer());
|
|
|
this.gridList.reconfigure(this.storeBodyList, this.ctncolumns);
|
|
|
|
|
|
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: "数据加载中,请稍等..." },//"数据加载中,请稍等..."
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModelCtn,
|
|
|
plugins: [this.gridListCellEditing2],
|
|
|
selType: 'cellmodel',
|
|
|
|
|
|
tbar: [{
|
|
|
text: '增加明细', //'增加明细',
|
|
|
tooltip: '增加明细', //'增加明细',
|
|
|
id: "btnadddetails",
|
|
|
iconCls: "btnadddetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onAddCtnDetailClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '删除明细', //'删除明细',
|
|
|
tooltip: '删除明细', //'删除明细',
|
|
|
id: "btndeldetails",
|
|
|
iconCls: "btndeletedetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onDelCtnDetailClick(2);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
, '-', {
|
|
|
text: '展开集装箱', //'展开集装箱',
|
|
|
id: "btnadddetail2s",
|
|
|
handler: function (button, event) {
|
|
|
this.onUpDetailClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '引入场站数据', //'引入场站数据',
|
|
|
id: "btnaddyarddatas",
|
|
|
handler: function (button, event) {
|
|
|
this.onaddyarddataClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式", //"保存列表样式",
|
|
|
menu: [
|
|
|
{
|
|
|
text: "保存", //"保存",
|
|
|
handler: function (button, event) {
|
|
|
_this.ctncolumns = DsTruck.SaveGridPanel(USERID, 'PCCTNCOLUMN', _this.gridListshow.columns, _this.ctncolumns, 0, true);
|
|
|
_this.gridList.reconfigure(this.storeBodyList, _this.ctncolumns);
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: "初始化", //"初始化",
|
|
|
handler: function (menu, event) {
|
|
|
_this.gridListshow.reconfigure(this.storeBodyList, _this.initctncolumns);
|
|
|
_this.ctncolumns = DsTruck.SaveGridPanel(USERID, 'PCCTNCOLUMN', _this.gridListshow.columns, _this.initctncolumns, 0, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}],
|
|
|
|
|
|
columns: this.ctncolumns
|
|
|
});
|
|
|
|
|
|
this.gridListshow.on('edit', function (editor, e, eOpts) {
|
|
|
this.gridAfterEdit(editor, e, eOpts);
|
|
|
}, this);
|
|
|
|
|
|
_thisPc.winCtnListShow = Ext.create('Ext.window.Window', {
|
|
|
title: "集装箱明细", //"集装箱明细",
|
|
|
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: "关闭", //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_thisPc.winCtnListShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelBodyCtn = new Ext.Panel({
|
|
|
// title: Zi.LAN.panelBodyCtn, //'集装箱信息',
|
|
|
layout: "border",
|
|
|
height: 110,
|
|
|
//margin: '5 10',
|
|
|
frame: true,
|
|
|
items: [this.gridList]
|
|
|
});
|
|
|
|
|
|
this.storeCodeContainerType = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CodeCtnModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeCtnList' }
|
|
|
});
|
|
|
this.storeCodeContainerType.load();
|
|
|
this.comboxContainerType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '箱型', //'箱型',
|
|
|
store: this.storeCodeContainerType,
|
|
|
forceSelection: true,
|
|
|
name: 'ContainerType',
|
|
|
valueField: 'CTN',
|
|
|
displayField: 'CTN'
|
|
|
});
|
|
|
|
|
|
this.storeLinkMan = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsWlBsHeadRefMsWlDriver',
|
|
|
proxy: { url: '/TruckMng/MsWlPc/GetDrvNameList' }
|
|
|
});
|
|
|
this.storeLinkMan.load({ params: { condition: "" } });
|
|
|
this.comboxLinkMan = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '押运员',
|
|
|
store: this.storeLinkMan,
|
|
|
name: 'LinkMan',
|
|
|
valueField: 'DrvName',
|
|
|
displayField: 'DrvName'
|
|
|
,
|
|
|
listeners: {
|
|
|
beforequery: function (e) {
|
|
|
return FilterCombox(e, 1); //在beforequery使用此方法
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//编辑form
|
|
|
this.formEdit = Ext.widget('form', {
|
|
|
region: 'center',
|
|
|
frame: true,
|
|
|
bodyPadding: 1,
|
|
|
autoScroll: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 70,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '录入日期',
|
|
|
name: 'LrDate', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '记账日期',
|
|
|
name: 'JzDate', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '用户编码',
|
|
|
name: 'UserCode', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '卸货工厂',
|
|
|
name: 'FactoryAddr', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '组织编码',
|
|
|
name: 'OrgCode', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '组织名称',
|
|
|
name: 'OrgName', flex: 0, hidden: true, margins: '0'
|
|
|
}, { fieldLabel: 'gId',
|
|
|
name: 'gId', flex: 0, hidden: true, margins: '0'
|
|
|
}, { fieldLabel: 'PGid',
|
|
|
name: 'PGid', flex: 0, hidden: true, margins: '0'
|
|
|
}, { fieldLabel: 'RefBillNo',
|
|
|
name: 'RefBillNo', flex: 0, hidden: true, margins: '0'
|
|
|
}, { fieldLabel: 'RefBillNose',
|
|
|
name: 'RefBillNose', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'BillNo',
|
|
|
name: 'BillNo', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'Property',
|
|
|
name: 'Property', flex: 0, hidden: true, margins: '0'
|
|
|
}, { fieldLabel: 'FEESTATUS',
|
|
|
name: 'FEESTATUS', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'UserName',
|
|
|
name: 'UserName', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'BsType',
|
|
|
name: 'BsType', value:'装箱',flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '时间戳',
|
|
|
name: 'timeMark', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '工作号',
|
|
|
// allowBlank: false,
|
|
|
/* disabled: true,*/
|
|
|
name: 'CUSTNO'
|
|
|
}, this.comboxCustomerName, this.comboxBLTYPE, {
|
|
|
fieldLabel: '会计期间', //'会计期间',
|
|
|
xtype: 'monthfield',
|
|
|
/* flex: 0.5,*/
|
|
|
name: 'ACCDATE'
|
|
|
}, {
|
|
|
fieldLabel: '业务锁定',
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
name: 'BSSTATUSREF'
|
|
|
}, {
|
|
|
fieldLabel: '费用锁定', //'费用锁定',
|
|
|
readOnly: true,
|
|
|
labelWidth: 60,
|
|
|
flex: 0.5,
|
|
|
disabled: true,
|
|
|
name: 'FEESTATUSREF'
|
|
|
}, this.comboxTruckSpec
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxSALE, this.comboxDdName, this.comboxDOCName, this.comboxRtnDocStatus, this.comboxYARD, {
|
|
|
fieldLabel: '业务日期',
|
|
|
xtype: 'datefield',
|
|
|
format: 'Y-m-d', name: 'ExpDate'
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [ {
|
|
|
fieldLabel: '英文船名',
|
|
|
name: 'VoyVeg'
|
|
|
},{
|
|
|
fieldLabel: '中文船名',
|
|
|
name: 'VoyVegSe'
|
|
|
}, {
|
|
|
fieldLabel: '航次',
|
|
|
name: 'EtDateSe'
|
|
|
}, {
|
|
|
fieldLabel: '绑定',
|
|
|
name: 'DispatchName'
|
|
|
}, {
|
|
|
fieldLabel: '预计到港时间',
|
|
|
labelWidth: 100,
|
|
|
xtype: 'datetimefield',
|
|
|
format: 'Y-m-d', name: 'EndPortDate'
|
|
|
}, {
|
|
|
fieldLabel: '预计离港时间',
|
|
|
labelWidth: 100,
|
|
|
xtype: 'datetimefield',
|
|
|
format: 'Y-m-d', name: 'EtDate'
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '主提单号',
|
|
|
name: 'MblNoSe'
|
|
|
}, this.comboxContainerType, {
|
|
|
fieldLabel: '箱量',
|
|
|
name: 'ContainerQty'
|
|
|
}, {
|
|
|
fieldLabel: '箱号',
|
|
|
name: 'ContainerNo'
|
|
|
}, {
|
|
|
fieldLabel: '封号',
|
|
|
name: 'SealNo'
|
|
|
}, {
|
|
|
fieldLabel: '件重尺',
|
|
|
name: 'ContainerNoSe'
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '品名',
|
|
|
flex: 1,
|
|
|
name: 'GoodsName'
|
|
|
}, this.comboxPcBillType, this.comboxCargoid, {
|
|
|
fieldLabel: 'UN',
|
|
|
name: 'DUNNO'
|
|
|
}, {
|
|
|
fieldLabel: '主危',
|
|
|
name: 'DCLASS'
|
|
|
}, {
|
|
|
fieldLabel: '副危',
|
|
|
flex: 0.5,
|
|
|
name: 'YardCodeSe'
|
|
|
}, {
|
|
|
fieldLabel: '闪点',
|
|
|
flex: 0.5,
|
|
|
name: 'YardNameSe'
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISSHUISHI",
|
|
|
flex: 0.4,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "怕水湿",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISGAOWEN",
|
|
|
flex: 0.4,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "怕高温",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISXIANLIANG",
|
|
|
flex: 0.4,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "只限量",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISHAIWU",
|
|
|
flex: 0.4,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "海污",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISFENGXIANG",
|
|
|
flex: 0.4,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "封箱",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISWEISHENBAO",
|
|
|
flex: 0.4,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "危申报",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISBAOGUAN",
|
|
|
flex: 0.6,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "报关",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISRIZHAO",
|
|
|
flex: 0.3,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "日照",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISBOCHUAN",
|
|
|
flex: 0.3,
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "驳船",
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
fieldLabel: '空箱时间',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ReturnDate'
|
|
|
}, this.comboxTruckNo, this.comboxDrvName,
|
|
|
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [ {
|
|
|
xtype: "checkbox", //checkbox控件
|
|
|
name: "ISPINGTAI",
|
|
|
boxLabel: "",
|
|
|
fieldLabel: "平台空箱",
|
|
|
flex: 0.5,
|
|
|
inputValue: true, //选中的值
|
|
|
uncheckedValue: false, //未选中的值
|
|
|
checked: false //绘制时的选中状态
|
|
|
}, {
|
|
|
fieldLabel: '入库趟数',
|
|
|
flex: 0.5,
|
|
|
name: 'LoadCount'
|
|
|
}, {
|
|
|
fieldLabel: '入库分成',
|
|
|
flex: 0.5,
|
|
|
name: 'OverLoadMil'
|
|
|
}, {
|
|
|
fieldLabel: '外点分成',
|
|
|
flex: 0.5,
|
|
|
name: 'Ton'
|
|
|
}, {
|
|
|
fieldLabel: '空箱分成',
|
|
|
flex: 0.5,
|
|
|
name: 'AroundTon'
|
|
|
}, {
|
|
|
fieldLabel: '装箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ArriveDate'
|
|
|
}, {
|
|
|
fieldLabel: '装箱地点',
|
|
|
name: 'FactoryAddrSe'
|
|
|
}, {
|
|
|
fieldLabel: '入库时间',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'RtnDocTime'
|
|
|
}, this.comboxWmsTruckNo,
|
|
|
{
|
|
|
text: "生成派车",
|
|
|
iconCls: "btnmore",
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
handler: function (button, event) {
|
|
|
this.Save('0', '1');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
}, this.panelBodyCtn,{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textarea',
|
|
|
items: [{
|
|
|
fieldLabel: '空箱要求',
|
|
|
height: 50,
|
|
|
flex: 3,
|
|
|
name: 'DstAreaSe'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnsearchBig",
|
|
|
width: 20,
|
|
|
handler: function (button, event) {
|
|
|
this.ShowBigEdit("DstAreaSe", '空箱要求');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
fieldLabel: '装箱要求',
|
|
|
height: 50,
|
|
|
flex: 3,
|
|
|
name: 'DetiNationSe'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnsearchBig",
|
|
|
width: 20,
|
|
|
handler: function (button, event) {
|
|
|
this.ShowBigEdit("DetiNationSe", '装箱要求');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
fieldLabel: '入库要求',
|
|
|
height: 50,
|
|
|
flex: 3,
|
|
|
name: 'ContainerTypeSe'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnsearchBig",
|
|
|
width: 20,
|
|
|
handler: function (button, event) {
|
|
|
this.ShowBigEdit("ContainerTypeSe", '入库要求');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
fieldLabel: '备注',
|
|
|
height: 50,
|
|
|
flex: 3,
|
|
|
name: 'Remark'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnsearchBig",
|
|
|
width: 20,
|
|
|
handler: function (button, event) {
|
|
|
this.ShowBigEdit("Remark", '备注');
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxLinkMan, {
|
|
|
fieldLabel: '司机公里',
|
|
|
name: 'RatedMil'
|
|
|
}, {
|
|
|
fieldLabel: '规定公里',
|
|
|
name: 'RealMil'
|
|
|
}, {
|
|
|
fieldLabel: '标准油耗',
|
|
|
name: 'RatedFuel'
|
|
|
}, {
|
|
|
fieldLabel: '实际油耗',
|
|
|
name: 'RealFuel'
|
|
|
}, {
|
|
|
fieldLabel: '油价',
|
|
|
name: 'FuelPrice'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
//#region 按钮Toolbar
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
id: 'btnEPrev',
|
|
|
text: "上一票",
|
|
|
// iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.PrevRecord();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
id: 'btnENext',
|
|
|
text: "下一票",
|
|
|
// iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.NextRecord();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
id: 'bsbtnSave',
|
|
|
text: "保存",
|
|
|
iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('0','0');
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
id: 'bsbtnSaveAndClose',
|
|
|
text: "保存并关闭",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('1', '0');
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
id: 'bsbtnSaveAndNew',
|
|
|
text: "保存并新建",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('2', '0');
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: "关闭",
|
|
|
handler: function (button, event) {
|
|
|
window.close();
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
id: 'bsbtnNew',
|
|
|
text: "新建",
|
|
|
handler: function (button, event) {
|
|
|
this.LoadData('add', '');
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
basicForm.findField('BillNo').setDisabled(false);
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
id: 'bsbtnCopyAndNew',
|
|
|
text: "复制新建",
|
|
|
handler: function (button, event) {
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
this.opStatus = 'add';
|
|
|
basicForm.findField('gId').setDisabled(false);
|
|
|
var field = basicForm.findField('gId');
|
|
|
var BSNO = 'PC' + NewGuid();
|
|
|
var oldbsno = field.getValue();
|
|
|
var oldmasterno = basicForm.findField('PGid').getValue();
|
|
|
field.setValue(BSNO);
|
|
|
if (oldbsno == "" || oldbsno == oldmasterno) {
|
|
|
field = basicForm.findField('PGid');
|
|
|
field.setValue(BSNO);
|
|
|
}
|
|
|
field = basicForm.findField('BillNo');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('ContainerNo');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('SealNo');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('CUSTNO');
|
|
|
field.setValue('');
|
|
|
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d');
|
|
|
basicForm.findField('ExpDate').setValue(mydatestr);
|
|
|
|
|
|
_thisPc.panelFee.strBSNO = BSNO;
|
|
|
_thisPc.panelFee.storeDrChFee.removeAll();
|
|
|
_thisPc.panelFee.storeCrChFee.removeAll();
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
id: 'bsbtnDriverFee',
|
|
|
text: "利润转司机费用",
|
|
|
handler: function (button, event) {
|
|
|
|
|
|
|
|
|
for (i = 0; i < this.panelFee.storeDrChFee.getCount(); i += 1) {
|
|
|
var memberyf = this.panelFee.storeDrChFee.getAt(i);
|
|
|
if (memberyf.data.FeeStatus != '0') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '系统费用还未审核完毕', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
for (i = 0; i < this.panelFee.storeCrChFee.getCount(); i += 1) {
|
|
|
var memberyf = this.panelFee.storeCrChFee.getAt(i);
|
|
|
if (memberyf.data.FeeStatus != '0') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '系统费用还未审核完毕', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
this.winRatio.show();
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: "打印",
|
|
|
iconCls: "btnprint",
|
|
|
handler: function (button, event) {
|
|
|
this.Print();
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: '刷新',
|
|
|
handler: function (button, event) {
|
|
|
this.opStatus = 'edit';
|
|
|
var condition = " BillNo='" + this.editRecord.get('BillNo') + "'";
|
|
|
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
}); //end 按钮Toolbar
|
|
|
//#endregion
|
|
|
|
|
|
//#region 固定费用明细表
|
|
|
|
|
|
//明细表表格相关
|
|
|
|
|
|
|
|
|
this.storeFeeTypeCodeRef = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.FeeTypeRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetFeeTypeRefList' }
|
|
|
});
|
|
|
this.storeFeeTypeCodeRef.load({ params: { condition: " ISTRUCKINGFIXED ='1' " } });
|
|
|
|
|
|
this.comboxFeeTypeCodeRef = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
store: this.storeFeeTypeCodeRef,
|
|
|
matchFieldWidth: false,
|
|
|
name: 'FeeTypeCode',
|
|
|
valueField: 'FeeCode',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
Ext.define('MsWlPcFixed', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'GId',
|
|
|
fields: [
|
|
|
{ name: 'BillNo', type: 'string' },
|
|
|
{ name: 'SerialNo', type: 'number' },
|
|
|
{ name: 'CreditDebit', type: 'string' },
|
|
|
{ name: 'CreditDebit_Ref', type: 'string' },
|
|
|
{ name: 'FeeTypeCode', type: 'string' },
|
|
|
{ name: 'FeeTypeCode_Ref', type: 'string' },
|
|
|
{ name: 'FeeTypeName', type: 'string' },
|
|
|
{ name: 'DistCount', type: 'number' },
|
|
|
{ name: 'Price', type: 'number' },
|
|
|
{ name: 'FsTotal', type: 'number' },
|
|
|
{ name: 'JsTotal', type: 'number' },
|
|
|
{ name: 'Remark', type: 'string' },
|
|
|
{ name: 'GId', type: 'string' },
|
|
|
{ name: 'FeeStatus', type: 'number' },
|
|
|
{ name: 'FeeStatus_Ref', type: 'string' },
|
|
|
{ name: 'SubmitDate', type: 'date' },
|
|
|
{ name: 'FTruckNo', type: 'string' },
|
|
|
{ name: 'ENTEROPERATOR', type: 'string' },
|
|
|
{ name: 'ENTERDATE', type: 'string' },
|
|
|
{ name: 'Auditoperator', type: 'string' },
|
|
|
{ name: 'AuditDate', type: 'date' },
|
|
|
{ name: 'AuditStatus', type: 'number' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
//明细表-数据集
|
|
|
this.storeBodyFix = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsWlPcFixed',
|
|
|
remoteSort: false,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/GetFeeFixBodyList',
|
|
|
reader: {
|
|
|
id: 'GId',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeFixTruckNo = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsWlBsHeadRefMsWlTruck',
|
|
|
proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' }
|
|
|
});
|
|
|
this.storeFixTruckNo.load({ params: { condition: "" } });
|
|
|
|
|
|
this.comboxFixTruckNo = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
store: this.storeFixTruckNo,
|
|
|
name: 'FrTruckNo',
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'TruckNo',
|
|
|
valueField: 'TruckNo',
|
|
|
displayField: 'TruckNo',
|
|
|
matchFieldWidth: true,
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
// this.formEdit.getForm().findField('F_CustomerName').setValue(records[0].data.OWNER);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//明细表表格
|
|
|
this.cellEditingFix = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
clicksToEdit: 1
|
|
|
});
|
|
|
|
|
|
this.gridListFix = new Ext.grid.GridPanel({
|
|
|
store: this.storeBodyFix,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [this.cellEditingFix],
|
|
|
selType: 'cellmodel',
|
|
|
tbar: [{
|
|
|
text: '增加明细',
|
|
|
tooltip: '增加明细',
|
|
|
iconCls: "btnadddetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onAddDetailClick(button, event, '1');
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '删除明细',
|
|
|
tooltip: '删除明细',
|
|
|
iconCls: "btndeletedetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onDelDetailClick(button, event, '1');
|
|
|
},
|
|
|
scope: this
|
|
|
}],
|
|
|
columns: [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BillNo',
|
|
|
header: '单据号',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SerialNo',
|
|
|
header: '序号',
|
|
|
width: 40
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FeeTypeCode',
|
|
|
header: '费用编码',
|
|
|
renderer: function (value, p, record) {
|
|
|
if (value == null || value == '')
|
|
|
return '';
|
|
|
else
|
|
|
return value + '-' + record.data.FeeTypeCode_Ref;
|
|
|
},
|
|
|
editor: this.comboxFeeTypeCodeRef,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FeeTypeName',
|
|
|
header: '费用名称',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FsTotal',
|
|
|
header: '金额',
|
|
|
editor: {
|
|
|
xtype: 'numberfield',
|
|
|
allowBlank: false,
|
|
|
selectOnFocus: true
|
|
|
},
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FTruckNo',
|
|
|
header: '车号',
|
|
|
editor: this.comboxFixTruckNo,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'Remark',
|
|
|
header: '备注',
|
|
|
editor: {
|
|
|
xtype: 'textfield',
|
|
|
selectOnFocus: true
|
|
|
},
|
|
|
width: 150
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.gridListFix.on('edit', function (editor, e, eOpts) {
|
|
|
this.gridListFixAfterEdit(editor, e, eOpts);
|
|
|
}, this);
|
|
|
this.cellEditingFix.on('beforeedit', function (editor, e) {
|
|
|
return this.cellEditingFixBeforeEdit(editor, e);
|
|
|
}, this);
|
|
|
|
|
|
this.panelFix = new Ext.Panel({
|
|
|
title: '固定成本',
|
|
|
split: true,
|
|
|
layout: "border",
|
|
|
region: 'west',
|
|
|
hidden:true,
|
|
|
width: 400,
|
|
|
items: [this.gridListFix]
|
|
|
});
|
|
|
|
|
|
//#endregion 明细表
|
|
|
|
|
|
//#region 布局
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 420,
|
|
|
items: [this.panelBtn, this.formEdit]
|
|
|
});
|
|
|
|
|
|
this.panelFee = new Shipping.FeeEditGrid({
|
|
|
region: 'center',
|
|
|
layout: 'border'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.panelFee.stroplb = 'tMsWlPcHead';
|
|
|
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CustomerName" });
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "F_CustomerName" });
|
|
|
|
|
|
this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement"} });
|
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherRecvFeeManagement"} });
|
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: "ISTRUCKING='1' " } });
|
|
|
//this.panelFeeAll = new Ext.Panel({
|
|
|
// layout: "border",
|
|
|
// region: 'center',
|
|
|
// animate: true,
|
|
|
// autoScroll: true,
|
|
|
// frame: false,
|
|
|
// //closable:true,
|
|
|
// items: [this.panelFix, this.panelFee]
|
|
|
//});
|
|
|
|
|
|
this.panelFeeTtl = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "center",
|
|
|
items: [this.panelFix,this.panelFee]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelSeae = new Ext.Panel({
|
|
|
title: '委托信息',
|
|
|
// id: 'pnlmodNewOpSeaeInfo',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
//closable:true,
|
|
|
items: [this.panelTop, this.panelFeeTtl]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.tabSeaepanel = new Ext.TabPanel({
|
|
|
activeTab: 0,
|
|
|
autoWidth: true,
|
|
|
border: true,
|
|
|
frame: false,
|
|
|
region: 'center',
|
|
|
// id: "TabSeaePanel",
|
|
|
enableTabScroll: true,
|
|
|
items:
|
|
|
[
|
|
|
this.panelSeae
|
|
|
]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.tabSeaepanel]
|
|
|
});
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
parentWin = window.parent.opener;
|
|
|
this.InitData();
|
|
|
this.LoadMustBe();
|
|
|
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
|
|
|
});
|
|
|
|
|
|
//#region 转司机费用比例
|
|
|
this.formRatio = Ext.widget('form', {
|
|
|
//region: 'north',
|
|
|
//title: '比例',
|
|
|
flex: 1,
|
|
|
frame: true,
|
|
|
bodyPadding: 0,
|
|
|
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 110,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'fieldset',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '比例',
|
|
|
name: 'Ratio',
|
|
|
value:'30%',
|
|
|
//xtype: 'numberfield',
|
|
|
//regex: /^(([^0][0-9]+|0)\.([0-9]{1,2}))$/,
|
|
|
regex: /^((\d+\.?\d*)|(\d*\.\d+))\%$/,
|
|
|
regexText: '请输入百分比,不要忘记百分号吖'
|
|
|
}]
|
|
|
|
|
|
}]
|
|
|
|
|
|
}]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
me = this;
|
|
|
this.winRatio = Ext.create('Ext.window.Window', {
|
|
|
title: '设定百分比', //"",
|
|
|
width: 320,
|
|
|
//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.formRatio],
|
|
|
buttons: [{
|
|
|
text: '确定', //"确定修改",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
//批量修改
|
|
|
me.GainToDriverFee();
|
|
|
|
|
|
}
|
|
|
}, ]
|
|
|
|
|
|
});
|
|
|
|
|
|
this.storeBodyList.on('beforeload', function (store) {
|
|
|
if (this.isfen && this.opStatus == 'add') {
|
|
|
var condition = "BSNO='" + _thisPc.MainEditRecord.get('gId') + "'";
|
|
|
} else if (this.opStatus == 'add') {
|
|
|
var condition = "BSNO='xxxxxx'";
|
|
|
} else {
|
|
|
|
|
|
var condition = "BSNO='" + _thisPc.editRecord.get('gId') + "'";
|
|
|
}
|
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: condition });
|
|
|
}, this);
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: 'modPcHeadEdit_GDFY'
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
this.modPcHeadEdit_GDFY = 1;
|
|
|
this.panelFix.setVisible(true);
|
|
|
} else {
|
|
|
this.modPcHeadEdit_GDFY = 0;
|
|
|
this.panelFix.setVisible(false);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: 'modPcHeadEdit_CUSTHIDE'
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
Ext.getCmp('CustomerName').hide();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
this.FormBigMemoShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
height: 480,
|
|
|
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: 'textareafield',
|
|
|
// grow: true,
|
|
|
name: 'DSMEMO',
|
|
|
anchor: '100%',
|
|
|
height: 480,
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
blur: function (field, The, eOpts) {
|
|
|
_thisPc.FormBigMemoShow.getForm().findField('DSMEMO')
|
|
|
.setValue(field.value.toUpperCase());
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
});
|
|
|
|
|
|
this.winBigMemoShow = Ext.create('Ext.window.Window', {
|
|
|
title: "", //"集装箱明细",
|
|
|
width: 750,
|
|
|
height: 550,
|
|
|
//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.FormBigMemoShow],
|
|
|
buttons: [{
|
|
|
text: '确定', //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_thisPc.showField.setValue(_thisPc.FormBigMemoShow.getForm().findField('DSMEMO').getValue());
|
|
|
_thisPc.winBigMemoShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
//#endregion
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
//#region 加载数据
|
|
|
InitData: function () {
|
|
|
this.opStatus = 'add';
|
|
|
var condition = '';
|
|
|
if (parentWin) {
|
|
|
var ret = parentWin.OprationSwap();
|
|
|
this.opStatus = ret[0];
|
|
|
this.StoreList = ret[1];
|
|
|
this.editRecord = ret[2];
|
|
|
this.selectPGID = ret[3];
|
|
|
}
|
|
|
|
|
|
if (this.opStatus == 'edit' || this.opStatus == 'copy' || this.opStatus == 'copyfee')
|
|
|
condition = " BillNo='" + this.editRecord.get('BillNo') + "'";
|
|
|
if (this.opStatus == 'copy' || this.opStatus == 'copyfee')
|
|
|
this.LoadCopyData(this.opStatus, condition);
|
|
|
else
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
|
|
|
}, //end InitData
|
|
|
|
|
|
LoadData: function (opstatus, condition) {
|
|
|
|
|
|
this.fixSerialNo = 0;
|
|
|
this.fixBodyDel = [];
|
|
|
|
|
|
this.opStatus = opstatus;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/GetHYRDData',
|
|
|
params: {
|
|
|
handle: opstatus,
|
|
|
condition: condition
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = result.data;
|
|
|
|
|
|
if (opstatus == 'add') {
|
|
|
data.PcBillType = '';
|
|
|
}
|
|
|
|
|
|
this.formEdit.getForm().reset();
|
|
|
this.formEdit.getForm().setValues(data);
|
|
|
if (this.opStatus == 'add') {
|
|
|
this.LoadDefValue();
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.selectPGID != '') {
|
|
|
var PGid = this.formEdit.getForm().findField('PGid');
|
|
|
PGid.setValue(this.selectPGID);
|
|
|
if (this.editRecord != NaN && this.editRecord != null) {
|
|
|
this.formEdit.getForm().findField('CUSTNO').setValue(this.editRecord.get('CUSTNO'));
|
|
|
this.formEdit.getForm().findField('TruckSpec').setValue(this.editRecord.get('TruckSpec'));
|
|
|
this.formEdit.getForm().findField('CustomerName').setValue(this.editRecord.get('CustomerName'));
|
|
|
this.formEdit.getForm().findField('SalesName').setValue(this.editRecord.get('SalesName'));
|
|
|
this.formEdit.getForm().findField('DdName').setValue(this.editRecord.get('DdName'));
|
|
|
this.formEdit.getForm().findField('YardName').setValue(this.editRecord.get('YardName'));
|
|
|
this.formEdit.getForm().findField('LinkManSe').setValue(this.editRecord.get('LinkManSe'));
|
|
|
this.formEdit.getForm().findField('BLTYPE').setValue('派车分票');
|
|
|
this.formEdit.getForm().findField('LoadFactory').setValue(this.editRecord.get('LoadFactory'));
|
|
|
this.formEdit.getForm().findField('DetiNationSe').setValue(this.editRecord.get('DetiNationSe'));
|
|
|
this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode'));
|
|
|
this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType'));
|
|
|
this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg'));
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d');
|
|
|
this.formEdit.getForm().findField('ExpDate').setValue(mydatestr);
|
|
|
this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe'));
|
|
|
this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe'));
|
|
|
this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate'));
|
|
|
this.formEdit.getForm().findField('EtDate').setValue(this.editRecord.get('EtDate'));
|
|
|
this.formEdit.getForm().findField('MblNoSe').setValue(this.editRecord.get('MblNoSe'));
|
|
|
this.formEdit.getForm().findField('ContainerQty').setValue(1);
|
|
|
this.formEdit.getForm().findField('GoodsName').setValue(this.editRecord.get('GoodsName'));
|
|
|
this.formEdit.getForm().findField('ContainerNoSe').setValue(this.editRecord.get('ContainerNoSe'));
|
|
|
this.formEdit.getForm().findField('ContainerNo').setValue(this.editRecord.get('ContainerNo'));
|
|
|
this.formEdit.getForm().findField('SealNo').setValue(this.editRecord.get('SealNo'));
|
|
|
this.formEdit.getForm().findField('DUNNO').setValue(this.editRecord.get('DUNNO'));
|
|
|
this.formEdit.getForm().findField('DCLASS').setValue(this.editRecord.get('DCLASS'));
|
|
|
this.formEdit.getForm().findField('YardCodeSe').setValue(this.editRecord.get('YardCodeSe'));
|
|
|
this.formEdit.getForm().findField('YardNameSe').setValue(this.editRecord.get('YardNameSe'));
|
|
|
this.formEdit.getForm().findField('ISSHUISHI').setValue(this.editRecord.get('ISSHUISHI'));
|
|
|
this.formEdit.getForm().findField('ISGAOWEN').setValue(this.editRecord.get('ISGAOWEN'));
|
|
|
this.formEdit.getForm().findField('ISXIANLIANG').setValue(this.editRecord.get('ISXIANLIANG'));
|
|
|
this.formEdit.getForm().findField('ISHAIWU').setValue(this.editRecord.get('ISHAIWU'));
|
|
|
this.formEdit.getForm().findField('ISFENGXIANG').setValue(this.editRecord.get('ISFENGXIANG'));
|
|
|
this.formEdit.getForm().findField('ISWEISHENBAO').setValue(this.editRecord.get('ISWEISHENBAO'));
|
|
|
this.formEdit.getForm().findField('ISBAOGUAN').setValue(this.editRecord.get('ISBAOGUAN'));
|
|
|
this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName'));
|
|
|
this.formEdit.getForm().findField('ReturnDate').setValue(this.editRecord.get('ReturnDate'));
|
|
|
this.formEdit.getForm().findField('ISPINGTAI').setValue(this.editRecord.get('ISPINGTAI'));
|
|
|
this.formEdit.getForm().findField('RtnDocTime').setValue(this.editRecord.get('RtnDocTime'));
|
|
|
this.formEdit.getForm().findField('WmsTruckNo').setValue(this.editRecord.get('WmsTruckNo'));
|
|
|
this.formEdit.getForm().findField('WmsDrvName').setValue(this.editRecord.get('WmsDrvName'));
|
|
|
this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate'));
|
|
|
this.formEdit.getForm().findField('DstAreaSe').setValue(this.editRecord.get('DstAreaSe'));
|
|
|
/* this.formEdit.getForm().findField('SealNoSe').setValue(this.editRecord.get('SealNoSe'));*/
|
|
|
this.formEdit.getForm().findField('ContainerTypeSe').setValue(this.editRecord.get('ContainerTypeSe'));
|
|
|
this.formEdit.getForm().findField('Remark').setValue(this.editRecord.get('Remark'));
|
|
|
this.formEdit.getForm().findField('FactoryAddrSe').setValue(this.editRecord.get('FactoryAddrSe'));
|
|
|
}
|
|
|
}
|
|
|
this.LoadPeriod();
|
|
|
if (data.BSSTATUSREF != '锁定') {
|
|
|
this.setSaveBtnStatus(true);
|
|
|
} else {
|
|
|
this.setSaveBtnStatus(false);
|
|
|
}
|
|
|
var editp = Ext.create('PCmb', data);
|
|
|
this.LoadFeeData(editp);
|
|
|
this.storeBodyFix.load({ params: { billno: this.editRecord.get('gId') } });
|
|
|
this.storeBodyList.load({ params: { condition: "BSNO='" + this.editRecord.get('gId') +"'" } });
|
|
|
var children = this.tabSeaepanel.items;
|
|
|
if (children) {
|
|
|
for (var i = children.length - 1, len = 0; i >= len; i--) {
|
|
|
if (children.items[i].id) {
|
|
|
if (children.items[i].id == 'pnlmodPcAmendFee') {
|
|
|
children.items[i].close();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.paneltabfeeamend = new Shipping.PcAmendFee({
|
|
|
id: 'pnlmodPcAmendFee',
|
|
|
layout: "border",
|
|
|
region: "center",
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
closable: true,
|
|
|
title: '更改单信息'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.tabSeaepanel.add(this.paneltabfeeamend);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
|
|
|
this.panelReceipt = new Shipping.ReceiptEditGrid({
|
|
|
region: 'center',
|
|
|
layout: 'border',
|
|
|
title: '单据信息'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelReceipt.EditRecord = this.editRecord;
|
|
|
this.panelReceipt.stroplb = 'tMsWlPcHead';
|
|
|
this.panelReceipt.strBSNO = this.editRecord.get('gId');
|
|
|
this.panelReceipt.strMBLNO = this.editRecord.get('MblNoSe');
|
|
|
this.panelReceipt.StoreDrOpRange.load({ params: { optype: "modOpReceiptManagement" } });
|
|
|
this.panelReceipt.storeDrOpReceipt.load({ params: { billno: this.editRecord.get('gId'), optype: "tMsWlPcHead" } });
|
|
|
this.panelReceipt.storeDocList.load({ params: { condition: " BSNO='" + this.editRecord.get('gId') + "'" } });
|
|
|
|
|
|
this.tabSeaepanel.add(this.panelReceipt);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
var paneltabitems = new Ext.Panel({
|
|
|
id: 'pnlopstatus',
|
|
|
layout: "fit",
|
|
|
region: "center",
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
closable: true,
|
|
|
title:'状态管理',
|
|
|
html: ' <iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="../../MvcShipping/MsOpStatus"> </iframe>'
|
|
|
});
|
|
|
this.tabSeaepanel.add(paneltabitems);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
if (data.CustomerName != '') {
|
|
|
//var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + data.CustomerName + "')";
|
|
|
//this.storeInfoClientContact.load({ params: { condition: s} });
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}, // end LoadDate
|
|
|
|
|
|
LoadCopyData: function (opstatus, condition) {
|
|
|
|
|
|
this.fixSerialNo = 0;
|
|
|
this.fixBodyDel = [];
|
|
|
|
|
|
this.opStatus = opstatus;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/GetHYRDData',
|
|
|
params: {
|
|
|
handle: 'edit',
|
|
|
condition: condition
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = result.data;
|
|
|
|
|
|
|
|
|
|
|
|
this.formEdit.getForm().reset();
|
|
|
this.formEdit.getForm().setValues(data);
|
|
|
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
|
|
|
basicForm.findField('gId').setDisabled(false);
|
|
|
var field = basicForm.findField('gId');
|
|
|
var BSNO = 'PC' + NewGuid();
|
|
|
var oldbsno = field.getValue();
|
|
|
var oldmasterno = basicForm.findField('PGid').getValue();
|
|
|
field.setValue(BSNO);
|
|
|
if (oldbsno == "" || oldbsno == oldmasterno) {
|
|
|
field = basicForm.findField('PGid');
|
|
|
field.setValue(BSNO);
|
|
|
}
|
|
|
field = basicForm.findField('BillNo');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('ContainerNo');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('SealNo');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('CUSTNO');
|
|
|
field.setValue('');
|
|
|
if (this.opStatus == 'copyfee') {
|
|
|
this.LoadCopyFeeData(oldbsno, BSNO);
|
|
|
} else {
|
|
|
_thisPc.panelFee.strBSNO = BSNO;
|
|
|
_thisPc.panelFee.storeDrChFee.removeAll();
|
|
|
_thisPc.panelFee.storeCrChFee.removeAll();
|
|
|
}
|
|
|
|
|
|
this.opStatus = 'add';
|
|
|
|
|
|
if (this.selectPGID != '') {
|
|
|
var PGid = this.formEdit.getForm().findField('PGid');
|
|
|
PGid.setValue(this.selectPGID);
|
|
|
if (this.editRecord != NaN && this.editRecord != null) {
|
|
|
this.formEdit.getForm().findField('CustomerName').setValue(this.editRecord.get('CustomerName'));
|
|
|
this.formEdit.getForm().findField('SalesName').setValue(this.editRecord.get('SalesName'));
|
|
|
this.formEdit.getForm().findField('DdName').setValue(this.editRecord.get('DdName'));
|
|
|
this.formEdit.getForm().findField('YardName').setValue(this.editRecord.get('YardName'));
|
|
|
this.formEdit.getForm().findField('LinkManSe').setValue(this.editRecord.get('LinkManSe'));
|
|
|
this.formEdit.getForm().findField('BLTYPE').setValue('派车分票');
|
|
|
this.formEdit.getForm().findField('LoadFactory').setValue(this.editRecord.get('LoadFactory'));
|
|
|
this.formEdit.getForm().findField('DetiNationSe').setValue(this.editRecord.get('DetiNationSe'));
|
|
|
this.formEdit.getForm().findField('DrvCode').setValue(this.editRecord.get('DrvCode'));
|
|
|
this.formEdit.getForm().findField('PcBillType').setValue(this.editRecord.get('PcBillType'));
|
|
|
this.formEdit.getForm().findField('VoyVeg').setValue(this.editRecord.get('VoyVeg'));
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d');
|
|
|
this.formEdit.getForm().findField('ExpDate').setValue(mydatestr);
|
|
|
this.formEdit.getForm().findField('VoyVegSe').setValue(this.editRecord.get('VoyVegSe'));
|
|
|
this.formEdit.getForm().findField('EtDateSe').setValue(this.editRecord.get('EtDateSe'));
|
|
|
this.formEdit.getForm().findField('EndPortDate').setValue(this.editRecord.get('EndPortDate'));
|
|
|
this.formEdit.getForm().findField('EtDate').setValue(this.editRecord.get('EtDate'));
|
|
|
this.formEdit.getForm().findField('MblNoSe').setValue(this.editRecord.get('MblNoSe'));
|
|
|
this.formEdit.getForm().findField('ContainerQty').setValue(this.editRecord.get('ContainerQty'));
|
|
|
this.formEdit.getForm().findField('GoodsName').setValue(this.editRecord.get('GoodsName'));
|
|
|
this.formEdit.getForm().findField('ContainerNoSe').setValue(this.editRecord.get('ContainerNoSe'));
|
|
|
this.formEdit.getForm().findField('ContainerNo').setValue(this.editRecord.get('ContainerNo'));
|
|
|
this.formEdit.getForm().findField('SealNo').setValue(this.editRecord.get('SealNo'));
|
|
|
this.formEdit.getForm().findField('DUNNO').setValue(this.editRecord.get('DUNNO'));
|
|
|
this.formEdit.getForm().findField('DCLASS').setValue(this.editRecord.get('DCLASS'));
|
|
|
this.formEdit.getForm().findField('YardCodeSe').setValue(this.editRecord.get('YardCodeSe'));
|
|
|
this.formEdit.getForm().findField('YardNameSe').setValue(this.editRecord.get('YardNameSe'));
|
|
|
this.formEdit.getForm().findField('ISSHUISHI').setValue(this.editRecord.get('ISSHUISHI'));
|
|
|
this.formEdit.getForm().findField('ISGAOWEN').setValue(this.editRecord.get('ISGAOWEN'));
|
|
|
this.formEdit.getForm().findField('ISXIANLIANG').setValue(this.editRecord.get('ISXIANLIANG'));
|
|
|
this.formEdit.getForm().findField('ISHAIWU').setValue(this.editRecord.get('ISHAIWU'));
|
|
|
this.formEdit.getForm().findField('ISFENGXIANG').setValue(this.editRecord.get('ISFENGXIANG'));
|
|
|
this.formEdit.getForm().findField('ISWEISHENBAO').setValue(this.editRecord.get('ISWEISHENBAO'));
|
|
|
this.formEdit.getForm().findField('ISBAOGUAN').setValue(this.editRecord.get('ISBAOGUAN'));
|
|
|
this.formEdit.getForm().findField('DispatchName').setValue(this.editRecord.get('DispatchName'));
|
|
|
this.formEdit.getForm().findField('ReturnDate').setValue(this.editRecord.get('ReturnDate'));
|
|
|
this.formEdit.getForm().findField('ISPINGTAI').setValue(this.editRecord.get('ISPINGTAI'));
|
|
|
this.formEdit.getForm().findField('RtnDocTime').setValue(this.editRecord.get('RtnDocTime'));
|
|
|
this.formEdit.getForm().findField('WmsTruckNo').setValue(this.editRecord.get('WmsTruckNo'));
|
|
|
this.formEdit.getForm().findField('WmsDrvName').setValue(this.editRecord.get('WmsDrvName'));
|
|
|
this.formEdit.getForm().findField('ArriveDate').setValue(this.editRecord.get('ArriveDate'));
|
|
|
this.formEdit.getForm().findField('DstAreaSe').setValue(this.editRecord.get('DstAreaSe'));
|
|
|
/* this.formEdit.getForm().findField('SealNoSe').setValue(this.editRecord.get('SealNoSe'));*/
|
|
|
this.formEdit.getForm().findField('ContainerTypeSe').setValue(this.editRecord.get('ContainerTypeSe'));
|
|
|
this.formEdit.getForm().findField('Remark').setValue(this.editRecord.get('Remark'));
|
|
|
this.formEdit.getForm().findField('FactoryAddrSe').setValue(this.editRecord.get('FactoryAddrSe'));
|
|
|
}
|
|
|
}
|
|
|
this.LoadPeriod();
|
|
|
if (data.BSSTATUSREF != '锁定') {
|
|
|
this.setSaveBtnStatus(true);
|
|
|
} else {
|
|
|
this.setSaveBtnStatus(false);
|
|
|
}
|
|
|
var editp = Ext.create('PCmb', data);
|
|
|
|
|
|
this.storeBodyFix.load({ params: { billno: this.editRecord.get('gId') } });
|
|
|
this.storeBodyList.load({ params: { condition: "BSNO='" + this.editRecord.get('gId') + "'" } });
|
|
|
var children = this.tabSeaepanel.items;
|
|
|
if (children) {
|
|
|
for (var i = children.length - 1, len = 0; i >= len; i--) {
|
|
|
if (children.items[i].id) {
|
|
|
if (children.items[i].id == 'pnlmodPcAmendFee') {
|
|
|
children.items[i].close();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.paneltabfeeamend = new Shipping.PcAmendFee({
|
|
|
id: 'pnlmodPcAmendFee',
|
|
|
layout: "border",
|
|
|
region: "center",
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
closable: true,
|
|
|
title: '更改单信息'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.tabSeaepanel.add(this.paneltabfeeamend);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
|
|
|
this.panelReceipt = new Shipping.ReceiptEditGrid({
|
|
|
region: 'center',
|
|
|
layout: 'border',
|
|
|
title: '单据信息'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelReceipt.EditRecord = this.editRecord;
|
|
|
this.panelReceipt.stroplb = 'tMsWlPcHead';
|
|
|
this.panelReceipt.strBSNO = BSNO;
|
|
|
this.panelReceipt.strMBLNO = this.editRecord.get('MblNoSe');
|
|
|
this.panelReceipt.StoreDrOpRange.load({ params: { optype: "modOpReceiptManagement" } });
|
|
|
this.panelReceipt.storeDrOpReceipt.load({ params: { billno: BSNO, optype: "tMsWlPcHead" } });
|
|
|
this.panelReceipt.storeDocList.load({ params: { condition: " BSNO='" + BSNO+ "'" } });
|
|
|
|
|
|
this.tabSeaepanel.add(this.panelReceipt);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
var paneltabitems = new Ext.Panel({
|
|
|
id: 'pnlopstatus',
|
|
|
layout: "fit",
|
|
|
region: "center",
|
|
|
autoScroll: true,
|
|
|
frame: false,
|
|
|
closable: true,
|
|
|
title: '状态管理',
|
|
|
html: ' <iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="../../MvcShipping/MsOpStatus"> </iframe>'
|
|
|
});
|
|
|
this.tabSeaepanel.add(paneltabitems);
|
|
|
this.tabSeaepanel.doLayout();
|
|
|
|
|
|
if (data.CustomerName != '') {
|
|
|
//var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + data.CustomerName + "')";
|
|
|
//this.storeInfoClientContact.load({ params: { condition: s } });
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}, // end LoadDate
|
|
|
|
|
|
LoadFeeData: function (EditRecord) {
|
|
|
this.panelFee.EditRecord = EditRecord;
|
|
|
var bsno = EditRecord.get('gId');
|
|
|
var bltype = EditRecord.get('BLTYPE');
|
|
|
|
|
|
|
|
|
this.panelFee.strBSNO = bsno;
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "tMsWlPcHead", bsno: bsno} });
|
|
|
this.panelFee.StoreUnit.load({ params: { bsno: bsno, bstype: "tMsWlPcHead" } });
|
|
|
this.panelFee.strbltype = bltype;
|
|
|
if (bltype == '派车主票') {
|
|
|
this.panelFee.LoadDrChFee2("FEETYPE=1 AND BSNO IN (SELECT BSNO FROM V_OP_BS WHERE MASTERNO='" + bsno+"')");
|
|
|
this.panelFee.LoadCrChFee2("FEETYPE=2 AND BSNO IN (SELECT BSNO FROM V_OP_BS WHERE MASTERNO='" + bsno + "')");
|
|
|
} else {
|
|
|
this.panelFee.storeDrChFee.load({ params: { billno: bsno, type: 1, optype: "tMsWlPcHead" } });
|
|
|
this.panelFee.storeCrChFee.load({ params: { billno: bsno, type: 2, optype: "tMsWlPcHead" } });
|
|
|
}
|
|
|
this.panelFee.storeBodySum.load({
|
|
|
params: { bsno: bsno, bltype: bltype,optype: "tMsWlPcHead" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
_thisfee.setTotalHead();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.panelFee.storeChFeeGain.load({ params: { bsno: bsno, bltype:bltype,optype: "普通货", oplb: "tMsWlPcHead" } });
|
|
|
this.panelFee.storeBodyList_GuDingFeeWeiHu.load();
|
|
|
if (this.panelFee.strbltype == '拼箱主票' || this.panelFee.strbltype == '派车主票') {
|
|
|
this.panelFee.tabTotal.add(this.panelFee.panelCustMaster);
|
|
|
this.panelFee.storeChFeeMasterGain.load({ params: { bsno:bsno } });
|
|
|
}
|
|
|
//this.storeCtnList.load({ params: { condition: "LE_ID='" + bsno + "'" } });
|
|
|
|
|
|
//this.storeBodyFix.load({ params: { billno: bsno } });
|
|
|
}, // end LoadDate
|
|
|
LoadCopyFeeData: function (oldbsno, bsno) {
|
|
|
this.panelFee.EditRecord = this.editRecord;
|
|
|
this.panelFee.strBSNO = bsno;
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "tMsWlPcHead", bsno: oldbsno } });
|
|
|
this.panelFee.StoreUnit.load({ params: { bsno: oldbsno, bstype: "tMsWlPcHead" } });
|
|
|
|
|
|
this.panelFee.storeDrChFee.load({
|
|
|
params: { billno: oldbsno, type: 1, optype: "tMsWlPcHead" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
|
|
|
if (_thisPc.panelFee.storeDrChFee.getCount() > 0) {
|
|
|
for (var j = 0; j < _thisPc.panelFee.storeDrChFee.getCount(); j += 1) {
|
|
|
var memberbody = _thisPc.panelFee.storeDrChFee.getAt(j);
|
|
|
memberbody.set("GId", NewGuid());
|
|
|
memberbody.set("BsNo", "*");
|
|
|
memberbody.set("FeeStatus",1);
|
|
|
memberbody.commit();
|
|
|
}
|
|
|
} else {
|
|
|
_thisPc.panelFee.storeDrChFee.removeAll();
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this });
|
|
|
this.panelFee.storeCrChFee.load({
|
|
|
params: { billno: oldbsno, type: 2, optype: "tMsWlPcHead" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (_thisPc.panelFee.storeCrChFee.getCount() > 0) {
|
|
|
for (var j = 0; j < _thisPc.panelFee.storeCrChFee.getCount(); j += 1) {
|
|
|
var memberbody = _thisPc.panelFee.storeCrChFee.getAt(j);
|
|
|
memberbody.set("GId", NewGuid());
|
|
|
memberbody.set("BsNo", "*");
|
|
|
memberbody.set("FeeStatus", 1);
|
|
|
memberbody.commit();
|
|
|
}
|
|
|
} else {
|
|
|
_thisPc.panelFee.storeCrChFee.removeAll();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
this.panelFee.storeBodySum.removeAll();
|
|
|
this.panelFee.storeChFeeGain.removeAll();
|
|
|
this.panelFee.storeBodyList_GuDingFeeWeiHu.load();
|
|
|
//this.storeCtnList.load({
|
|
|
// params: { condition: "LE_ID='" + oldbsno + "'" },
|
|
|
// callback: function (r, options, success) {
|
|
|
// if (success) {
|
|
|
// if (_this.storeCtnList.getCount() > 0) {
|
|
|
// for (var j = 0; j < _this.storeCtnList.getCount(); j += 1) {
|
|
|
// var memberbody = _this.storeCtnList.getAt(j);
|
|
|
// memberbody.set("BSNO", "*");
|
|
|
// memberbody.commit();
|
|
|
// }
|
|
|
// } else {
|
|
|
// _this.storeCtnList.removeAll();
|
|
|
// }
|
|
|
// }
|
|
|
// },
|
|
|
// scope: this
|
|
|
//});
|
|
|
|
|
|
//this.storeBodyFix.load({ params: { billno: bsno } });
|
|
|
}, // end LoadDate
|
|
|
|
|
|
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('ExpDate').getRawValue();
|
|
|
if (ETD == '') {
|
|
|
this.formEdit.getForm().findField('ExpDate').setMinValue(this.MsPeriod.FDAY);
|
|
|
this.formEdit.getForm().findField('ExpDate').setReadOnly(false);
|
|
|
} else {
|
|
|
var oDate1 = new Date(ETD);
|
|
|
var oDate2 = new Date(this.MsPeriod.FDAY);
|
|
|
if (oDate1.getTime() >= oDate2.getTime()) {
|
|
|
this.formEdit.getForm().findField('ExpDate').setMinValue(this.MsPeriod.FDAY);
|
|
|
this.formEdit.getForm().findField('ExpDate').setReadOnly(false);
|
|
|
} else {
|
|
|
if (opstatus == 'add' || opstatus == 'copyadd') {
|
|
|
this.formEdit.getForm().findField('ExpDate').setValue('');
|
|
|
this.formEdit.getForm().findField('ExpDate').setMinValue(this.MsPeriod.FDAY);
|
|
|
this.formEdit.getForm().findField('ExpDate').setReadOnly(false);
|
|
|
}
|
|
|
else {
|
|
|
this.formEdit.getForm().findField('ExpDate').setMinValue('');
|
|
|
this.formEdit.getForm().findField('ExpDate').setReadOnly(true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
var ACCDATE = this.formEdit.getForm().findField('ACCDATE').getValue();
|
|
|
var oDate1 = new Date(ACCDATE + '-01');
|
|
|
var oDate2 = new Date(this.MsPeriod.PERIOD + '-01');
|
|
|
if (oDate1.getTime() >= oDate2.getTime()) {
|
|
|
this.formEdit.getForm().findField('ACCDATE').setMinValue(this.MsPeriod.PERIOD);
|
|
|
this.formEdit.getForm().findField('ACCDATE').setReadOnly(false);
|
|
|
} else {
|
|
|
if (opstatus == 'add' || opstatus == 'copyadd') {
|
|
|
this.formEdit.getForm().findField('ACCDATE').setMinValue(this.MsPeriod.PERIOD);
|
|
|
this.formEdit.getForm().findField('ACCDATE').setReadOnly(false);
|
|
|
}
|
|
|
else {
|
|
|
this.formEdit.getForm().findField('ACCDATE').setMinValue('');
|
|
|
this.formEdit.getForm().findField('ACCDATE').setReadOnly(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
Save: function (type, createpc) {
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
if (!basicForm.isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/* basicForm.findField('BillNo').setDisabled(false);*/
|
|
|
|
|
|
var data = basicForm.getValues();
|
|
|
data.BsType = '装箱';
|
|
|
|
|
|
/* basicForm.findField('BillNo').setDisabled(true);*/
|
|
|
var bodyctndatas = [];
|
|
|
//for (var i = 0; i < this.storeCtnList.getCount(); i += 1) {
|
|
|
// var member = this.storeCtnList.getAt(i);
|
|
|
// bodyctndatas.push(member);
|
|
|
//}
|
|
|
//;
|
|
|
|
|
|
var bodyFixdatas = [];
|
|
|
for (var i = 0; i < this.storeBodyFix.getCount(); i += 1) {
|
|
|
var member = this.storeBodyFix.getAt(i);
|
|
|
bodyFixdatas.push(member);
|
|
|
}
|
|
|
;
|
|
|
var jsonFixBody = ConvertRecordsToJson(bodyFixdatas);
|
|
|
var jsonFixDelBody = ConvertRecordsToJsonAll(this.fixBodyDel);
|
|
|
|
|
|
var bodydatas = [];
|
|
|
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
|
|
|
var member = this.storeBodyList.getAt(i);
|
|
|
var WEIGHDATE = member.data.WEIGHDATE;
|
|
|
if (WEIGHDATE != '')
|
|
|
WEIGHDATE = Ext.util.Format.date(WEIGHDATE, 'Y-m-d');
|
|
|
member.data.WEIGHDATE = WEIGHDATE;
|
|
|
var TIXIANGSHIJIAN = member.data.TIXIANGSHIJIAN;
|
|
|
if (TIXIANGSHIJIAN != '')
|
|
|
TIXIANGSHIJIAN = Ext.util.Format.date(TIXIANGSHIJIAN, 'Y-m-d');
|
|
|
member.data.TIXIANGSHIJIAN = TIXIANGSHIJIAN;
|
|
|
if (member.data.TAREWEIGHT == '') member.data.TAREWEIGHT = '0';
|
|
|
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
|
|
|
var jsonBody = ConvertRecordsToJsonAll(bodydatas);
|
|
|
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在保存数据...',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/SaveHYRD',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
opstatus: this.opStatus,
|
|
|
data: Ext.JSON.encode(data),
|
|
|
fixbody: jsonFixBody,
|
|
|
fixdelbody: jsonFixDelBody,
|
|
|
ctnbody: jsonBody,
|
|
|
createpc: createpc
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnData = jsonresult.Data;
|
|
|
this.formEdit.getForm().setValues(returnData);
|
|
|
if (returnData.BSSTATUSREF != '锁定') {
|
|
|
this.setSaveBtnStatus(true);
|
|
|
} else {
|
|
|
this.setSaveBtnStatus(false);
|
|
|
}
|
|
|
if (this.opStatus == 'add') {
|
|
|
var arrNewRecords = this.StoreList.insert(0, returnData);
|
|
|
this.editRecord = this.StoreList.getAt(0);
|
|
|
}
|
|
|
else if (this.opStatus == 'edit') {
|
|
|
var editp = Ext.create('PCmb', 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();
|
|
|
|
|
|
}
|
|
|
if (type == '0') {
|
|
|
this.opStatus = 'edit';
|
|
|
/* basicForm.findField('BillNo').setDisabled(true);*/
|
|
|
|
|
|
//for (var i = 0; i < this.storeBodyFix.getCount(); i += 1) {
|
|
|
// var member = this.storeBodyFix.getAt(i);
|
|
|
// member.set("BillNo", this.editRecord.get('gId'));
|
|
|
// member.commit();
|
|
|
//};
|
|
|
|
|
|
var LE_ID = this.editRecord.get('gId');
|
|
|
//for (var j = 0; j < this.storeCtnList.getCount(); j += 1) {
|
|
|
// var memberbody = this.storeCtnList.getAt(j);
|
|
|
// memberbody.set("LE_ID", LE_ID);
|
|
|
// memberbody.commit();
|
|
|
//};
|
|
|
this.LoadFeeData(this.editRecord);
|
|
|
//this.panelFee.strBSNO = LE_ID;
|
|
|
//this.panelFee.StoreDateCurr.load({ params: { optype: "tMsWlPcHead", bsno: LE_ID } });
|
|
|
//this.panelFee.StoreUnit.load({ params: { bsno: LE_ID, bstype: "tMsWlPcHead" } });
|
|
|
this.storeBodyFix.load({ params: { billno: LE_ID } });
|
|
|
this.storeBodyList.load({ params: { condition: "BSNO='" + LE_ID + "'" } });
|
|
|
|
|
|
} else if (type == '1') {
|
|
|
window.close();
|
|
|
} else {
|
|
|
this.LoadData('add', '');
|
|
|
}
|
|
|
if (createpc=='1') {
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
_thisPc.panelFee.onPostDetailClick(null, null, 3);
|
|
|
}, //end save
|
|
|
|
|
|
onCreateFenClick: function () {
|
|
|
|
|
|
|
|
|
Ext.Ajax.timeout = 6000000;
|
|
|
|
|
|
var YARD = this.formEdit.getForm().findField('YardName').getValue();
|
|
|
if (YARD == '' || YARD == NaN || YARD == null) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '场站不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'场站不能为空!'
|
|
|
return;
|
|
|
}
|
|
|
var MBLNO = this.formEdit.getForm().findField('MblNoSe').getValue();
|
|
|
if (MBLNO == '' || MBLNO == NaN || MBLNO == null) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '主提单号不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'主提单号不能为空!'
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var BSNO = this.formEdit.getForm().findField('gId').getValue();
|
|
|
Ext.Msg.wait('正在提取数据, 请稍侯..');
|
|
|
var storeyardctn = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpSeaeDetail',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
timeout: 6000000,//60秒,
|
|
|
url: '/MvcShipping/MsOpSeae/GetyardctnList',
|
|
|
reader: {
|
|
|
id: 'BSNO,CTNCODE,CTN_ID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
storeyardctn.load({
|
|
|
params: { bs: BSNO, mblno: MBLNO, yard: YARD },
|
|
|
timeout: 6000000,//60秒,
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(options.response.responseText);
|
|
|
if (storeyardctn.getCount() > 0) {
|
|
|
var member = storeyardctn.getAt(0);
|
|
|
var sVESSEL = "";
|
|
|
var sVOYNO = "";
|
|
|
var tixiangshijian = '';
|
|
|
var fanchangshijian = '';
|
|
|
var bodydatas = [];
|
|
|
for (var j = 0; j < storeyardctn.getCount(); j += 1) {
|
|
|
var member = storeyardctn.getAt(j);
|
|
|
var WEIGHDATE = member.data.WEIGHDATE;
|
|
|
if (WEIGHDATE != '')
|
|
|
WEIGHDATE = Ext.util.Format.date(WEIGHDATE, 'Y-m-d');
|
|
|
member.data.WEIGHDATE = WEIGHDATE;
|
|
|
var TIXIANGSHIJIAN = member.data.TIXIANGSHIJIAN;
|
|
|
if (TIXIANGSHIJIAN != '')
|
|
|
TIXIANGSHIJIAN = Ext.util.Format.date(TIXIANGSHIJIAN, 'Y-m-d');
|
|
|
member.data.TIXIANGSHIJIAN = TIXIANGSHIJIAN;
|
|
|
if (member.data.TAREWEIGHT == '') member.data.TAREWEIGHT = '0';
|
|
|
var tixiangshijian = member.data.TiXiangShiJian;
|
|
|
if (tixiangshijian != '')
|
|
|
tixiangshijian = Ext.util.Format.date(tixiangshijian, 'Y-m-d');
|
|
|
var fanchangshijian = member.data.FanChangShiJian;
|
|
|
if (fanchangshijian != '')
|
|
|
fanchangshijian = Ext.util.Format.date(fanchangshijian, 'Y-m-d');
|
|
|
bodydatas.push(member);
|
|
|
};
|
|
|
|
|
|
var field = _thisPc.formEdit.getForm().findField('RtnDocTime');
|
|
|
if (field.getValue == "")
|
|
|
field.setValue(fanchangshijian);
|
|
|
var field = _thisPc.formEdit.getForm().findField('ArriveDate');
|
|
|
if (field.getValue == "")
|
|
|
field.setValue(tixiangshijian);
|
|
|
|
|
|
var jsonBody = ConvertRecordsToJsonAll(bodydatas);
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在保存数据...',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/CreateHYRDFen',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
bsno: BSNO,
|
|
|
ctnbody: jsonBody
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({
|
|
|
title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
//
|
|
|
//
|
|
|
|
|
|
} else {
|
|
|
if (jsonresult.Success) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '没有提取的相关数据!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'没有提取的相关数据!'
|
|
|
} else
|
|
|
Ext.Msg.show({ title: '警告', msg: jsonresult.Message, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
onAddCtnDetailClick: function () {
|
|
|
//var newSerialno = DsGetNewSerialNo(this.storeBodyList, this.serialNo);
|
|
|
|
|
|
|
|
|
|
|
|
var CTNSTATUS = 'F';
|
|
|
var MASTERNO = '';
|
|
|
var prdata = null;
|
|
|
if (this.storeBodyList.getCount() > 0) {
|
|
|
var memberbody = this.storeBodyList.getAt(this.storeBodyList.getCount() - 1);
|
|
|
prdata = memberbody.data;
|
|
|
// CTNSTATUS = memberbody.data.CTNSTATUS;
|
|
|
// MASTERNO = memberbody.data.MASTERNO;
|
|
|
}
|
|
|
|
|
|
var newSerialno = this.DsGetNewNo(this.storeBodyList);
|
|
|
this.serialNo = newSerialno;
|
|
|
if (prdata != null) {
|
|
|
var record = Ext.create('MsOpSeaeDetail', {
|
|
|
CTN_ID: NewGuid(),
|
|
|
BSNO: '*',
|
|
|
CTNCODE: newSerialno,
|
|
|
CTNALL: prdata.CTNALL,
|
|
|
CTNNUM: 1,
|
|
|
CNTRNO: '',
|
|
|
SEALNO: '',
|
|
|
PKGS: prdata.PKGS,
|
|
|
KINDPKGS: prdata.KINDPKGS,
|
|
|
KGS: prdata.KGS,
|
|
|
TAREWEIGHT: prdata.TAREWEIGHT,
|
|
|
CBM: prdata.CBM,
|
|
|
FENPKGS: prdata.FENPKGS,
|
|
|
FENKGS: prdata.FENKGS,
|
|
|
FENCBM: prdata.FENCBM,
|
|
|
WEIGHTYPE: prdata.WEIGHTYPE,
|
|
|
WEIGHKGS: prdata.WEIGHKGS,
|
|
|
WEIGHATTN: prdata.WEIGHATTN,
|
|
|
WEIGHTEL: prdata.WEIGHTEL,
|
|
|
WEIGHSIGN: prdata.WEIGHSIGN,
|
|
|
// WEIGHATTN: custop,
|
|
|
// WEIGHTEL: custoptel,
|
|
|
// WEIGHSIGN: custop,
|
|
|
CTNSTATUS: CTNSTATUS,
|
|
|
MASTERNO: MASTERNO,
|
|
|
TRUCKER: prdata.TRUCK,
|
|
|
TRUCKFEE: prdata.TRUCKFEE,
|
|
|
FREESTORAGEDAY: prdata.FREESTORAGEDAY,
|
|
|
STORAGEDAY: prdata.STORAGEDAY,
|
|
|
STORAGEPRICE: prdata.STORAGEPRICE,
|
|
|
STORAGEFEE: prdata.STORAGEFEE,
|
|
|
FREECTNDAY: prdata.FREECTNDAY,
|
|
|
CTNDAY: prdata.CTNDAY,
|
|
|
CTNPRICE: prdata.CTNPRICE,
|
|
|
CTNFEE: prdata.CTNFEE,
|
|
|
REMARK: prdata.REMARK
|
|
|
});
|
|
|
this.storeBodyList.add(record);
|
|
|
var n = this.storeBodyList.getCount();
|
|
|
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 2 });
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var record = Ext.create('MsOpSeaeDetail', {
|
|
|
CTN_ID: NewGuid(),
|
|
|
BSNO: '*',
|
|
|
CTNCODE: newSerialno,
|
|
|
CTNALL: '',
|
|
|
CTNNUM: 1,
|
|
|
CNTRNO: '',
|
|
|
SEALNO: '',
|
|
|
PKGS: 0,
|
|
|
KINDPKGS: '',
|
|
|
KGS: 0,
|
|
|
TAREWEIGHT: 0,
|
|
|
CBM: 0,
|
|
|
FENPKGS: 0,
|
|
|
FENKGS: 0,
|
|
|
FENCBM: 0,
|
|
|
WEIGHTYPE: '',
|
|
|
WEIGHKGS: 0,
|
|
|
WEIGHATTN: '',
|
|
|
WEIGHTEL: '',
|
|
|
WEIGHSIGN: '',
|
|
|
// WEIGHATTN: custop,
|
|
|
// WEIGHTEL: custoptel,
|
|
|
// WEIGHSIGN: custop,
|
|
|
CTNSTATUS: CTNSTATUS,
|
|
|
MASTERNO: MASTERNO,
|
|
|
TRUCKER: '',
|
|
|
TRUCKFEE: 0,
|
|
|
FREESTORAGEDAY: 0,
|
|
|
STORAGEDAY: 0,
|
|
|
STORAGEPRICE: 0,
|
|
|
STORAGEFEE: 0,
|
|
|
FREECTNDAY: 0,
|
|
|
CTNDAY: 0,
|
|
|
CTNPRICE: 0,
|
|
|
CTNFEE: 0,
|
|
|
REMARK: ''
|
|
|
});
|
|
|
this.storeBodyList.add(record);
|
|
|
var n = this.storeBodyList.getCount();
|
|
|
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 2 });
|
|
|
}
|
|
|
|
|
|
},
|
|
|
DsGetNewNo: function (store) {
|
|
|
var result = store.getCount();
|
|
|
if (result == 0) {
|
|
|
return '01';
|
|
|
}
|
|
|
// var record = store.getAt(result - 1).data.CTNCODE;
|
|
|
result = result + 1;
|
|
|
var resultstr = result.toString();
|
|
|
|
|
|
if (resultstr.length == 1) resultstr = '0' + resultstr;
|
|
|
return resultstr;
|
|
|
},
|
|
|
onDelCtnDetailClick: function (type) {
|
|
|
if (type == 1)
|
|
|
var selectedRecords = this.gridList.selModel.getSelection();
|
|
|
else
|
|
|
var selectedRecords = this.gridListshow.selModel.getSelection();
|
|
|
Ext.MessageBox.confirm('提示', '确定要删除吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var rec = selectedRecords[i];
|
|
|
if (rec.data.BSNO == "" || rec.data.BSNO == "*")//如果是新增但没有保存的数据,没有必要提交到后台
|
|
|
{
|
|
|
this.storeBodyList.remove(selectedRecords[i]);
|
|
|
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
//this.storeBodyList.remove(selectedRecords[i]);
|
|
|
}
|
|
|
if (bodyAddDatas.length != 0) {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...', //'正在删除数据...',
|
|
|
url: '/MvcShipping/MsOpSeae/DeleteDetailNew',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeBodyList.reload();
|
|
|
MsgTip('提示', jsonresult.Message);
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
}, this);
|
|
|
},
|
|
|
|
|
|
onUpDetailClick: function () {
|
|
|
|
|
|
|
|
|
var StoreCtn = Ext.create('Ext.data.Store', {
|
|
|
fields: [
|
|
|
{ name: 'CTN', type: 'string' },
|
|
|
{ name: 'CTNNUM', type: 'number' },
|
|
|
{ name: 'PKGS', type: 'number' },
|
|
|
{ name: 'KINDPKGS', type: 'string' },
|
|
|
{ name: 'KGS', type: 'number' },
|
|
|
{ name: 'CBM', type: 'number' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
for (var j = 0; j < this.storeBodyList.getCount(); j += 1) {
|
|
|
var memberbody = this.storeBodyList.getAt(j);
|
|
|
if (memberbody.data.CTNNUM > 1) {
|
|
|
StoreCtn.add({ "CTN": memberbody.data.CTNALL, "CTNNUM": memberbody.data.CTNNUM, "PKGS": memberbody.data.PKGS, "KINDPKGS": memberbody.data.KINDPKGS, "KGS": memberbody.data.KGS, "CBM": memberbody.data.CBM });
|
|
|
};
|
|
|
var pkgs = memberbody.data.PKGS;
|
|
|
var kgs = memberbody.data.KGS;
|
|
|
var cbm = memberbody.data.CBM;
|
|
|
var ctnnum = memberbody.data.CTNNUM;
|
|
|
|
|
|
memberbody.set("CTNNUM", 1);
|
|
|
memberbody.set("PKGS", Div(pkgs, ctnnum));
|
|
|
memberbody.set("KGS", Div(kgs, ctnnum));
|
|
|
memberbody.set("CBM", Div(cbm, ctnnum));
|
|
|
memberbody.commit();
|
|
|
};
|
|
|
|
|
|
for (var j = 0; j < StoreCtn.getCount(); j += 1) {
|
|
|
var memberbody = StoreCtn.getAt(j);
|
|
|
for (var I = 0; I < memberbody.data.CTNNUM - 1; I += 1) {
|
|
|
|
|
|
var pkgs = memberbody.data.PKGS;
|
|
|
var kgs = memberbody.data.KGS;
|
|
|
var cbm = memberbody.data.CBM;
|
|
|
var ctnnum = memberbody.data.CTNNUM;
|
|
|
var kingpkgs = memberbody.data.KINDPKGS;
|
|
|
|
|
|
var newSerialno = this.DsGetNewNo(this.storeBodyList);
|
|
|
this.serialNo = newSerialno;
|
|
|
var record = Ext.create('MsOpSeaeDetail', {
|
|
|
CTN_ID: NewGuid(),
|
|
|
BSNO: '*',
|
|
|
CTNCODE: newSerialno,
|
|
|
CTNALL: memberbody.data.CTN,
|
|
|
CTNNUM: 1,
|
|
|
CNTRNO: '',
|
|
|
SEALNO: '',
|
|
|
PKGS: Div(pkgs, ctnnum),
|
|
|
KINDPKGS: kingpkgs,
|
|
|
KGS: Div(kgs, ctnnum),
|
|
|
TAREWEIGHT: 0,
|
|
|
CBM: Div(cbm, ctnnum),
|
|
|
WEIGHTYPE: '',
|
|
|
WEIGHKGS: 0,
|
|
|
WEIGHATTN: '',
|
|
|
WEIGHTEL: '',
|
|
|
WEIGHSIGN: '',
|
|
|
FENPKGS: 0,
|
|
|
FENKGS: 0,
|
|
|
FENCBM: 0,
|
|
|
CTNSTATUS: 'F',
|
|
|
MASTERNO: '',
|
|
|
TRUCKER: '',
|
|
|
TRUCKFEE: 0,
|
|
|
FREESTORAGEDAY: 0,
|
|
|
STORAGEDAY: 0,
|
|
|
STORAGEPRICE: 0,
|
|
|
STORAGEFEE: 0,
|
|
|
FREECTNDAY: 0,
|
|
|
CTNDAY: 0,
|
|
|
CTNPRICE: 0,
|
|
|
CTNFEE: 0,
|
|
|
REMARK: ''
|
|
|
});
|
|
|
this.storeBodyList.add(record);
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
var n = this.storeBodyList.getCount();
|
|
|
this.gridListCellEditing.startEditByPosition({ row: n - 1, column: 3 });
|
|
|
},
|
|
|
|
|
|
onaddyarddataClick: function () {
|
|
|
|
|
|
|
|
|
Ext.Ajax.timeout = 6000000;
|
|
|
|
|
|
var YARD = this.formEdit.getForm().findField('YardName').getValue();
|
|
|
if (YARD == '' || YARD == NaN || YARD == null) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '场站不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'场站不能为空!'
|
|
|
return;
|
|
|
}
|
|
|
var MBLNO = this.formEdit.getForm().findField('MblNoSe').getValue();
|
|
|
if (MBLNO == '' || MBLNO == NaN || MBLNO == null) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '主提单号不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'主提单号不能为空!'
|
|
|
return;
|
|
|
}
|
|
|
//if (this.storeBodyList.getCount() != 0) {
|
|
|
// Ext.Msg.show({ title: '警告', msg: '已存在集装箱信息不允许引入!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'场站不能为空!'
|
|
|
// return;
|
|
|
// //Ext.MessageBox.confirm('提示', '已存在集装箱信息确认要引入吗?',
|
|
|
// // function (btn) {
|
|
|
// // if (btn != 'yes') {
|
|
|
// // return;
|
|
|
|
|
|
// // }
|
|
|
// // });
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
var BSNO = this.formEdit.getForm().findField('gId').getValue();
|
|
|
Ext.Msg.wait('正在提取数据, 请稍侯..');
|
|
|
var storeyardctn = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpSeaeDetail',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
timeout: 6000000,//60秒,
|
|
|
url: '/MvcShipping/MsOpSeae/GetyardctnList',
|
|
|
reader: {
|
|
|
id: 'BSNO,CTNCODE,CTN_ID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
storeyardctn.load({
|
|
|
params: { bs: BSNO, mblno: MBLNO, yard: YARD },
|
|
|
timeout: 6000000,//60秒,
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(options.response.responseText);
|
|
|
if (storeyardctn.getCount() > 0) {
|
|
|
var member = storeyardctn.getAt(0);
|
|
|
if (member.data.CTNALL != '') {
|
|
|
var bodydatas = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpSeaeDetail',
|
|
|
remoteSort: true
|
|
|
});
|
|
|
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
|
|
|
var memberbody = this.storeBodyList.getAt(i);
|
|
|
if (memberbody.data.BSNO == "" || memberbody.data.BSNO == "*") {
|
|
|
_thisPc.storeBodyList.remove(memberbody);
|
|
|
} else {
|
|
|
if (memberbody.data.CNTRNO == "") {
|
|
|
bodydatas.add(memberbody);
|
|
|
_thisPc.storeBodyList.remove(memberbody);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for (var i = 0; i < bodydatas.getCount(); i += 1) {
|
|
|
var memberbodydel = bodydatas.getAt(i);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...', //'正在删除数据...',
|
|
|
url: '/MvcShipping/MsOpSeae/DeleteDetail',
|
|
|
params: {
|
|
|
data: Ext.JSON.encode(memberbodydel.data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
var sVESSEL = "";
|
|
|
var sVOYNO = "";
|
|
|
|
|
|
var bodydatas = [];
|
|
|
for (var j = 0; j < storeyardctn.getCount(); j += 1) {
|
|
|
var member = storeyardctn.getAt(j);
|
|
|
var sVESSEL = member.data.VESSEL;
|
|
|
var sVOYNO = member.data.VOYNO;
|
|
|
member.data.CTNALL = member.data.CTNALL.replace("HQ", "HC");
|
|
|
var _kgs = parseFloat(member.data.KGS);
|
|
|
var _tareweight = parseFloat(member.data.TAREWEIGHT);
|
|
|
var _WEIGHKGS = Add(_kgs, _tareweight);
|
|
|
|
|
|
var selectrecords = DsStoreQueryBy(this.storeBodyList, 'CNTRNO', member.data.CNTRNO);
|
|
|
if (selectrecords.length > 0) {
|
|
|
for (var i = 0; i < this.storeBodyList.getCount(); i += 1) {
|
|
|
var memberbody = this.storeBodyList.getAt(i);
|
|
|
if (memberbody.data.CNTRNO == member.data.CNTRNO) {
|
|
|
|
|
|
if (member.data.SEALNO != '') {
|
|
|
memberbody.set("SEALNO", member.data.SEALNO.trim());
|
|
|
}
|
|
|
|
|
|
|
|
|
//if (member.data.PKGS != 0) {
|
|
|
// memberbody.set("PKGS", member.data.PKGS);
|
|
|
//}
|
|
|
|
|
|
//if (member.data.KGS != 0) {
|
|
|
// memberbody.set("KGS", member.data.KGS);
|
|
|
//}
|
|
|
|
|
|
//if (member.data.CBM != 0) {
|
|
|
// memberbody.set("CBM", member.data.CBM);
|
|
|
//}
|
|
|
|
|
|
//if (member.data.TAREWEIGHT != 0) {
|
|
|
// memberbody.set("TAREWEIGHT", member.data.TAREWEIGHT);
|
|
|
//}
|
|
|
|
|
|
//if (member.data.KGS != 0 && member.data.TAREWEIGHT != 0) {
|
|
|
// memberbody.set("WEIGHKGS", _WEIGHKGS);
|
|
|
// memberbody.set("TTLWEIGHT", _WEIGHKGS);
|
|
|
//}
|
|
|
memberbody.commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
var addKINDPKGS = member.data.KINDPKGS;
|
|
|
var CTNSTATUS = member.data.CTNSTATUS;
|
|
|
var MASTERNO = member.data.MASTERNO;
|
|
|
|
|
|
var _kgs = parseFloat(member.data.KGS);
|
|
|
var _tareweight = parseFloat(member.data.TAREWEIGHT);
|
|
|
var _WEIGHKGS = Add(_kgs, _tareweight);
|
|
|
|
|
|
var newSerialno = this.DsGetNewNo(this.storeBodyList);
|
|
|
this.serialNo = newSerialno;
|
|
|
var record = Ext.create('MsOpSeaeDetail', {
|
|
|
CTN_ID: NewGuid(),
|
|
|
BSNO: '*',
|
|
|
CTNCODE: newSerialno,
|
|
|
CTNALL: member.data.CTNALL.trim(),
|
|
|
CTNNUM: 1,
|
|
|
CNTRNO: member.data.CNTRNO.trim(),
|
|
|
SEALNO: member.data.SEALNO.trim(),
|
|
|
PKGS: 0,
|
|
|
KINDPKGS: addKINDPKGS,
|
|
|
KGS:0 ,
|
|
|
TAREWEIGHT:0,
|
|
|
CBM: 0,
|
|
|
WEIGHTYPE: "累加",
|
|
|
TTLWEIGHT:0,
|
|
|
WEIGHKGS:0,
|
|
|
WEIGHATTN: '',
|
|
|
WEIGHTEL: '',
|
|
|
WEIGHSIGN: '',
|
|
|
FENPKGS: 0,
|
|
|
FENKGS: 0,
|
|
|
FENCBM: 0,
|
|
|
CTNSTATUS: CTNSTATUS,
|
|
|
MASTERNO: MASTERNO,
|
|
|
TRUCKER: '',
|
|
|
TRUCKFEE: 0,
|
|
|
FREESTORAGEDAY: 0,
|
|
|
STORAGEDAY: 0,
|
|
|
STORAGEPRICE: 0,
|
|
|
STORAGEFEE: 0,
|
|
|
FREECTNDAY: 0,
|
|
|
CTNDAY: 0,
|
|
|
CTNPRICE: 0,
|
|
|
CTNFEE: 0,
|
|
|
REMARK: ''
|
|
|
});
|
|
|
this.storeBodyList.add(record);
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
var cntrnostr = '';
|
|
|
var sealnostr = '';
|
|
|
var pkgsstr = '';
|
|
|
var ctnnum = 0;
|
|
|
for (var j = 0; j < storeyardctn.getCount(); j += 1) {
|
|
|
var member = storeyardctn.getAt(j);
|
|
|
var WEIGHDATE = member.data.WEIGHDATE;
|
|
|
if (WEIGHDATE != '')
|
|
|
WEIGHDATE = Ext.util.Format.date(WEIGHDATE, 'Y-m-d');
|
|
|
member.data.WEIGHDATE = WEIGHDATE;
|
|
|
var TIXIANGSHIJIAN = member.data.TIXIANGSHIJIAN;
|
|
|
if (TIXIANGSHIJIAN != '')
|
|
|
TIXIANGSHIJIAN = Ext.util.Format.date(TIXIANGSHIJIAN, 'Y-m-d');
|
|
|
member.data.TIXIANGSHIJIAN = TIXIANGSHIJIAN;
|
|
|
if (member.data.TAREWEIGHT == '') member.data.TAREWEIGHT = '0';
|
|
|
cntrnostr = cntrnostr + ' ' + member.data.CNTRNO;
|
|
|
sealnostr = sealnostr + ' ' + member.data.SEALNO;
|
|
|
pkgsstr = pkgsstr + ' ' + member.data.PKGS + '/' + member.data.KGS + '/' + member.data.CBM;
|
|
|
ctnnum = ctnnum + member.data.CTNNUM;
|
|
|
|
|
|
};
|
|
|
var field = _thisPc.formEdit.getForm().findField('ContainerNo');
|
|
|
field.setValue(cntrnostr);
|
|
|
var field = _thisPc.formEdit.getForm().findField('SealNo');
|
|
|
field.setValue(sealnostr);
|
|
|
//var field = _thisPc.formEdit.getForm().findField('ContainerNoSe');
|
|
|
//if (field.getValue() == '') field.setValue(pkgsstr);
|
|
|
//var field = _thisPc.formEdit.getForm().findField('ContainerQty');
|
|
|
//field.setValue(ctnnum);
|
|
|
|
|
|
//if ((ctnnum != 1) && (bodydatas.length!=0)) {
|
|
|
// var jsonBody = ConvertRecordsToJsonAll(bodydatas);
|
|
|
// Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
// Ext.Ajax.request({
|
|
|
// waitMsg: '正在保存数据...',
|
|
|
// url: '/TruckMng/PcHeadEdit_WFSD/CreateHYRDFen',
|
|
|
// scope: this,
|
|
|
// params: {
|
|
|
// bsno: BSNO,
|
|
|
// ctnbody: jsonBody
|
|
|
// },
|
|
|
// callback: function (options, success, response) {
|
|
|
// if (success) {
|
|
|
// Ext.MessageBox.hide();
|
|
|
// var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
// if (jsonresult.Success) {
|
|
|
// Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
// } else {
|
|
|
// Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
// }
|
|
|
// } else {
|
|
|
// Ext.Msg.show({
|
|
|
// title: '请重试',
|
|
|
// msg: '服务器响应出错',
|
|
|
// icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
// });
|
|
|
// }
|
|
|
// }
|
|
|
// });
|
|
|
//}
|
|
|
|
|
|
//
|
|
|
Ext.Msg.hide();
|
|
|
//
|
|
|
|
|
|
} else {
|
|
|
if (jsonresult.Success) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '没有提取的相关数据!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'没有提取的相关数据!'
|
|
|
} else
|
|
|
Ext.Msg.show({ title: '警告', msg: jsonresult.Message, icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
|
|
|
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
onGETYARDClick: function () {
|
|
|
var YARD = this.formEdit.getForm().findField('YardName').getValue();
|
|
|
if (YARD == '' || YARD == NaN || YARD == null) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '场站不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'场站不能为空!'
|
|
|
return;
|
|
|
}
|
|
|
var MBLNO = this.formEdit.getForm().findField('MblNoSe').getValue();
|
|
|
if (MBLNO == '' || MBLNO == NaN || MBLNO == null) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '主提单号不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });//'主提单号不能为空!'
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var BSNO = this.formEdit.getForm().findField('gId').getValue();
|
|
|
|
|
|
if (MBLNO == "" || YARD == "") {
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/MvcShipping/MsOpSeae/GetyardctnList',
|
|
|
params: {
|
|
|
bs: BSNO,
|
|
|
mblno: MBLNO,
|
|
|
yard: YARD,
|
|
|
isweb: true
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
|
var statusdata = jsonresult.data;
|
|
|
var boxitems = "";
|
|
|
|
|
|
|
|
|
formCustomDataShow = Ext.widget('form', {
|
|
|
region: 'center',
|
|
|
autoScroll: true, height: 460,
|
|
|
// border: false,
|
|
|
bodyPadding: 0,
|
|
|
html: jsonresult.data
|
|
|
|
|
|
});
|
|
|
|
|
|
me = this;
|
|
|
winCustomDataShow = Ext.create('Ext.window.Window', {
|
|
|
title: "",
|
|
|
// closeAction: 'hide',
|
|
|
width: 1100,
|
|
|
height: 500,
|
|
|
layout: 'fit',
|
|
|
resizable: true,
|
|
|
modal: true,
|
|
|
closeAction: 'close',
|
|
|
closable: true,
|
|
|
items: [formCustomDataShow],
|
|
|
buttons: [{
|
|
|
text: "关闭", //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
winCustomDataShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
winCustomDataShow.show();
|
|
|
|
|
|
Ext.Msg.hide();
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) { },
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
onImportCtnClick: function (button, event) {
|
|
|
|
|
|
|
|
|
var BSNO = this.formEdit.getForm().findField('gId').getValue();
|
|
|
var condition = " BSNO='" + BSNO + "'";
|
|
|
|
|
|
me = this;
|
|
|
|
|
|
var imgform = new Ext.FormPanel({
|
|
|
region: 'center',
|
|
|
labelWidth: 20,
|
|
|
frame: true,
|
|
|
autoScroll: false,
|
|
|
border: false,
|
|
|
fileUpload: true,
|
|
|
items: [{
|
|
|
xtype: 'fileuploadfield',
|
|
|
id: 'LoadExcel',
|
|
|
name: 'LoadExcel',
|
|
|
emptyText: '请选择EXCEL文件', //'请选择EXCEL文件',
|
|
|
fieldLabel: 'EXCEL', //'EXCEL',
|
|
|
buttontext: '选择文件', //'选择文件',
|
|
|
allowBlank: false,
|
|
|
width: 200,
|
|
|
buttonCfg:
|
|
|
{
|
|
|
iconCls: 'uploaddialog'
|
|
|
},
|
|
|
anchor: '98%'
|
|
|
}],
|
|
|
buttons: [{
|
|
|
text: '上传', //'上传',
|
|
|
type: 'submit',
|
|
|
handler: function () {
|
|
|
var UserFilePath = Ext.getCmp('LoadExcel').getValue();
|
|
|
if (!CheckFileExt(UserFilePath, /.xls|.xlsx/i)) {
|
|
|
Ext.Msg.show({ title: '错误', msg: '请确认你上传的文件为EXCEL文件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//'请确认你上传的文件为EXCEL文件!'
|
|
|
return;
|
|
|
}
|
|
|
if (!imgform.form.isValid()) { return; }
|
|
|
imgform.form.submit({
|
|
|
url: '/MvcShipping/MsOpSeae/ImportCtn',
|
|
|
waitMsg: '正在上传', //'正在上传',
|
|
|
method: 'POST',
|
|
|
params: {
|
|
|
bsno: BSNO
|
|
|
},
|
|
|
success: function (form, action) {
|
|
|
win.close(this);
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: '上传成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//'上传成功!'
|
|
|
me.storeBodyList.load({
|
|
|
params: { condition: condition },
|
|
|
callback: function (r, options, success) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
failure: function (form, action) {
|
|
|
form.reset();
|
|
|
Ext.Msg.show({ title: '错误', msg: '上传过程出现错误!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });//'上传过程出现错误!'
|
|
|
}
|
|
|
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
text: '关闭', //'关闭',
|
|
|
type: 'submit',
|
|
|
handler: function () {
|
|
|
win.close(this);
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
var win = new Ext.Window({
|
|
|
title: '上传EXCEL', //"上传EXCEL",
|
|
|
width: 380,
|
|
|
height: 120,
|
|
|
modal: true,
|
|
|
resizable: false,
|
|
|
border: false,
|
|
|
items: imgform
|
|
|
|
|
|
});
|
|
|
win.show();
|
|
|
|
|
|
return;
|
|
|
},
|
|
|
|
|
|
|
|
|
getCustName: function () {
|
|
|
var custName = this.formEdit.getForm().findField('CustName');
|
|
|
return custName.getValue();
|
|
|
},
|
|
|
|
|
|
onSubmitAuditClick: function (button, event) {
|
|
|
var records = this.feeGridCheckBoxModel.selected.items;
|
|
|
|
|
|
DsTruck.MsChFeeAudit(records, 2, '正在提交审核数据, 请稍侯..');
|
|
|
},
|
|
|
|
|
|
|
|
|
onAddDetailClick: function (button, event, type) {
|
|
|
if (this.modPcHeadEdit_GDFY == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改!
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
var allow = this.getAllowOperationDetail();
|
|
|
if (allow == false) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var store = null;
|
|
|
|
|
|
store = this.storeBodyFix;
|
|
|
|
|
|
|
|
|
var newSerialno = this.GetHandleSerialNo(store, type);
|
|
|
|
|
|
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
var CustomerName = this.formEdit.getForm().findField('CustomerName').getValue()
|
|
|
|
|
|
|
|
|
var record = null;
|
|
|
|
|
|
record = Ext.create('MsWlPcFixed', {
|
|
|
GId: NewGuid(),
|
|
|
BillNo: '*',
|
|
|
SerialNo: newSerialno,
|
|
|
FeeStatus: 1,
|
|
|
FeeStatus_Ref: '录入状态',
|
|
|
AuditStatus: 0,
|
|
|
CreditDebit: "2",
|
|
|
CreditDebit_Ref: "应付",
|
|
|
FeeTypeCode: '',
|
|
|
FeeTypeCode_Ref: '',
|
|
|
FeeTypeName: '',
|
|
|
DistCount: 0,
|
|
|
Price: 0,
|
|
|
FsTotal: 0,
|
|
|
JsTotal: 0,
|
|
|
Remark: ''
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
store.add(record);
|
|
|
|
|
|
var editColumnIndex = 0;
|
|
|
var cellediting = null;
|
|
|
|
|
|
cellediting = this.cellEditingFix;
|
|
|
editColumnIndex = 2;
|
|
|
|
|
|
var n = store.getCount();
|
|
|
cellediting.startEditByPosition({ row: n - 1, column: editColumnIndex });
|
|
|
},
|
|
|
|
|
|
GetHandleSerialNo: function (store, type) {
|
|
|
var result = 0;
|
|
|
|
|
|
result = this.fixSerialNo;
|
|
|
|
|
|
|
|
|
if (result == 0) {
|
|
|
for (var i = 0; i < store.getCount(); i += 1) {
|
|
|
var member = store.getAt(i);
|
|
|
if (member.data.SerialNo > result) {
|
|
|
result = member.data.SerialNo;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
result = result + 1;
|
|
|
this.fixSerialNo = result;
|
|
|
|
|
|
return result;
|
|
|
},
|
|
|
|
|
|
onDelDetailClick: function (button, event, type) {
|
|
|
if (this.modPcHeadEdit_GDFY == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改!
|
|
|
return;
|
|
|
}
|
|
|
var allow = this.getAllowOperationDetail();
|
|
|
if (allow == false) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var store = null;
|
|
|
|
|
|
store = this.storeBodyFix;
|
|
|
|
|
|
|
|
|
var result = 0;
|
|
|
|
|
|
result = this.fixSerialNo;
|
|
|
|
|
|
if (result == 0) {
|
|
|
for (var i = 0; i < store.getCount(); i += 1) {
|
|
|
var member = store.getAt(i);
|
|
|
if (member.data.SerialNo > this.giSerialNo) {
|
|
|
result = member.data.SerialNo;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.fixSerialNo = result;
|
|
|
|
|
|
|
|
|
var selectedRecords = [];
|
|
|
|
|
|
selectedRecords = this.gridListFix.selModel.getSelection();
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
|
|
|
if (selectedRecords.length > 0) {
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var rec = selectedRecords[i];
|
|
|
if (rec.BillNo != "" || rec.BillNo != "*") //如果是新增但没有保存的数据,没有必要提交到后台
|
|
|
{
|
|
|
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.storeBodyFix.remove(selectedRecords[i]);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (bodyAddDatas.length != 0) {
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...', //'正在删除数据...',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/DeleteFixBodyList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
Ext.Msg.show({ title: '错误', msg:"删除成功!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
this.storeBodyFix.reload();
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
getAllowOperationDetail: function () {
|
|
|
var feeStatus = this.getFeeStatus();
|
|
|
if (feeStatus == '0' || feeStatus == '' || typeof (feeStatus) == 'undefined' || feeStatus == false || feeStatus == 'false')
|
|
|
return true;
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: "此票委托已费用已锁定,不允许操作费用!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
gridListFixAfterEdit: function (editor, e, eOpts) {
|
|
|
|
|
|
if (e.field == 'FeeTypeCode') {
|
|
|
|
|
|
var records = DsStoreQueryBy(this.storeFeeTypeCodeRef, 'FeeCode', e.value);
|
|
|
|
|
|
if (records.getCount() > 0) {
|
|
|
var data = records.getAt(0).data;
|
|
|
e.record.set('FeeTypeCode_Ref', data.Name);
|
|
|
e.record.set('FeeTypeName', data.Name);
|
|
|
} else {
|
|
|
e.record.set('FeeTypeCode_Ref', '');
|
|
|
e.record.set('FeeTypeName', '');
|
|
|
}
|
|
|
} else if (e.field == 'CreditDebit') {
|
|
|
var recordsCreditDebit = DsStoreQueryBy(this.storeCreditDebitRef, 'EnumValueId', e.value);
|
|
|
if (recordsCreditDebit.getCount() > 0) {
|
|
|
var dataCreditDebit = recordsCreditDebit.getAt(0).data;
|
|
|
e.record.set('CreditDebit_Ref', dataCreditDebit.EnumValueName);
|
|
|
} else {
|
|
|
e.record.set('CreditDebit_Ref', '');
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
|
|
cellEditingFixBeforeEdit: function (editor, e) {
|
|
|
var feeStatus = this.getFeeStatus();
|
|
|
var billStatus = this.getBillStatus();
|
|
|
var canedit = feeStatus == '0' && billStatus == '0';
|
|
|
if (this.modPcHeadEdit_GDFY == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有权限修改费用', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });//当前费用已対帐无法修改!
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
return canedit;
|
|
|
},
|
|
|
|
|
|
ShowBigEdit: function (fieldname, cname) {
|
|
|
this.showField = _thisPc.formEdit.getForm().findField(fieldname);
|
|
|
var value = this.showField.getValue();
|
|
|
this.winBigMemoShow.setTitle(cname);
|
|
|
this.FormBigMemoShow.getForm().findField('DSMEMO').setValue(value);
|
|
|
this.winBigMemoShow.show();
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
PrevRecord: function () {
|
|
|
var j = this.StoreList.indexOf(this.editRecord);
|
|
|
if (j == 0) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '已是最前一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
if (j == this.StoreList.count) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
j = j - 1;
|
|
|
this.editRecord = this.StoreList.getAt(j);
|
|
|
// this.BsNo = this.editRecord.get('BSNO');
|
|
|
this.opStatus = 'edit';
|
|
|
var condition = " BillNo='" + this.editRecord.get('BillNo') + "'";
|
|
|
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
},
|
|
|
NextRecord: function () {
|
|
|
var j = this.StoreList.indexOf(this.editRecord);
|
|
|
|
|
|
if (j == (this.StoreList.count - 1)) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '已是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
j = j + 1;
|
|
|
this.editRecord = this.StoreList.getAt(j);
|
|
|
// this.BsNo = this.editRecord.get('BSNO');
|
|
|
this.opStatus = 'edit';
|
|
|
var condition = " BillNo='" + this.editRecord.get('BillNo') + "'";
|
|
|
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
|
|
|
},
|
|
|
setSaveBtnStatus: function (enable) {
|
|
|
var bsbtnSave = Ext.getCmp('bsbtnSave');
|
|
|
var bsbtnSaveAndClose = Ext.getCmp('bsbtnSaveAndClose');
|
|
|
var bsbtnSaveAndNew = Ext.getCmp('bsbtnSaveAndNew');
|
|
|
var btnadddetail = Ext.getCmp('btnadddetail');
|
|
|
var btndeldetail = Ext.getCmp('btndeldetail');
|
|
|
var btnadddetails = Ext.getCmp('btnadddetails');
|
|
|
var btndeldetails = Ext.getCmp('btndeldetails');
|
|
|
|
|
|
if (enable) {
|
|
|
bsbtnSave.enable();
|
|
|
bsbtnSaveAndClose.enable();
|
|
|
bsbtnSaveAndNew.enable();
|
|
|
btnadddetail.enable();
|
|
|
btndeldetail.enable();
|
|
|
btnadddetails.enable();
|
|
|
btndeldetails.enable();
|
|
|
} else {
|
|
|
bsbtnSave.disable();
|
|
|
bsbtnSaveAndClose.disable();
|
|
|
bsbtnSaveAndNew.disable();
|
|
|
btnadddetail.disable();
|
|
|
btndeldetail.disable();
|
|
|
btnadddetails.disable();
|
|
|
btndeldetails.disable();
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
LoadDefValue: function () {
|
|
|
this.storeDefValue.load({
|
|
|
params: { condition: "BSTYPE='陆运装箱'" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (this.storeDefValue.getCount() > 0) {
|
|
|
for (var j = 0; j < this.storeDefValue.getCount(); j += 1) {
|
|
|
var member = this.storeDefValue.getAt(j);
|
|
|
var fieldname = member.data.FIELDNAME;
|
|
|
if (fieldname == 'Cargoid') fieldname = 'CargoID';
|
|
|
|
|
|
var headfield = this.formEdit.getForm().findField(fieldname);
|
|
|
if (headfield != NaN && headfield != null)
|
|
|
headfield.setValue(member.data.DEFVALUE);
|
|
|
|
|
|
};
|
|
|
} else { }
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
/* this.GetEditStatus();*/
|
|
|
},
|
|
|
LoadMustBe: function () {
|
|
|
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.storeMustBe.load({
|
|
|
params: { condition: "BSTYPE='陆运装箱'" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (this.storeMustBe.getCount() > 0) {
|
|
|
for (var j = 0; j < this.storeMustBe.getCount() ; j += 1) {
|
|
|
var member = this.storeMustBe.getAt(j);
|
|
|
var fieldname = member.data.FIELDNAME;
|
|
|
if (fieldname == 'Cargoid') fieldname = 'CargoID';
|
|
|
|
|
|
var headfield = this.formEdit.getForm().findField(fieldname);
|
|
|
if (headfield != NaN && headfield != null) {
|
|
|
if (member.data.ISMUST == "1")
|
|
|
headfield.allowBlank = false;
|
|
|
if (member.data.ISCOLOR == "1")
|
|
|
headfield.setFieldStyle({ background: '#ffc' });
|
|
|
if (member.data.ISREADONLY == "1")
|
|
|
headfield.setReadOnly(true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
GainToDriverFee: function () {
|
|
|
var ratio = this.formRatio.getForm().findField('Ratio').getValue();
|
|
|
this.winRatio.close();
|
|
|
var ttlprofit = '';
|
|
|
for (i = 0; i < this.panelFee.storeBodySum.getCount(); i += 1) {
|
|
|
var memberyf = this.panelFee.storeBodySum.getAt(i);
|
|
|
if (memberyf.data.CURR == '合计') {
|
|
|
|
|
|
ttlprofit = memberyf.data.PR;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
|
|
|
var bsno = basicForm.findField('gId').value;
|
|
|
var data = basicForm.getValues();
|
|
|
var feevalue = returnfloat(ttlprofit) * returnfloat(ratio)/100;
|
|
|
|
|
|
Ext.Msg.wait('正在生成相关费用, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在生成相关费用...',
|
|
|
url: '/TruckMng/PcHeadEdit_WFSD/CreateDriverFee',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
FeeValue: feevalue,
|
|
|
data: Ext.JSON.encode(data)
|
|
|
|
|
|
},
|
|
|
success: function (resp, opts) {
|
|
|
Ext.MessageBox.hide();
|
|
|
this.panelFee.storeCrChFee.load({ params: { billno: bsno, type: 2, optype: "tMsWlPcHead" } });
|
|
|
},
|
|
|
failure: function (resp, opts) {
|
|
|
Ext.MessageBox.hide();
|
|
|
Ext.Msg.show({
|
|
|
title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
getFeeStatus: function () {
|
|
|
var basicForm = this.formEdit.getForm();
|
|
|
var feeStatus = basicForm.findField('FEESTATUS').value;
|
|
|
return feeStatus;
|
|
|
}
|
|
|
,
|
|
|
getBillStatus: function () {
|
|
|
//var basicForm = this.formEdit.getForm();
|
|
|
//var billStatus = basicForm.findField('BillStatus').value;
|
|
|
//return billStatus;
|
|
|
return '0';
|
|
|
},
|
|
|
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 = 'MSWLBS';
|
|
|
var sql1 = "SET LANGUAGE 'us_english ' "
|
|
|
+ " select * from tMsWlPcHead WHERE BillNo = '" + billNo + "' order by BillNo";
|
|
|
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
DispatchTruck: function () {
|
|
|
|
|
|
},
|
|
|
setBtnOnlyQuery: function () {
|
|
|
var bsbtnSave = Ext.getCmp('bsbtnSave');
|
|
|
var bsbtnSaveAndClose = Ext.getCmp('bsbtnSaveAndClose');
|
|
|
var bsbtnSaveAndNew = Ext.getCmp('bsbtnSaveAndNew');
|
|
|
var bsbtnNew = Ext.getCmp('bsbtnNew');
|
|
|
|
|
|
bsbtnSave.setVisible(false);
|
|
|
bsbtnSaveAndClose.setVisible(false);
|
|
|
bsbtnSaveAndNew.setVisible(false);
|
|
|
bsbtnNew.setVisible(false);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|