You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3211 lines
132 KiB
JavaScript
3211 lines
132 KiB
JavaScript
//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.modPcHeadEdit_GDFY = 0;
|
|
this.fixSerialNo = 0;
|
|
this.fixBodyDel = [];
|
|
this.accdatesameetd = 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: 'DrvName', type: 'string' },
|
|
{ name: 'DdName', 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: '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: '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: 'RealFuel', 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.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} });
|
|
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
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'
|
|
});
|
|
|
|
|
|
_thisPc = this;
|
|
|
|
//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' }
|
|
]
|
|
});
|
|
|
|
|
|
|
|
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,
|
|
name: 'TruckNo',
|
|
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.storeFrTruckNo = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'MsWlBsHeadRefMsWlTruck',
|
|
proxy: { url: '/TruckMng/MsWlPc/GetTruckNoListRm' }
|
|
});
|
|
this.storeFrTruckNo.load({ params: { condition: "" } });
|
|
|
|
this.comboxFrTruckNo = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: '外点车号',
|
|
store: this.storeFrTruckNo,
|
|
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.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.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,
|
|
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/GetDrvNameListRm' }
|
|
});
|
|
this.storeDrvName.load({ params: { condition: "" } });
|
|
this.comboxDrvName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: '空箱司机',
|
|
store: this.storeDrvName,
|
|
name: 'DrvCode',
|
|
queryMode: 'remote',
|
|
minChars: 1,
|
|
queryParam: 'DrvName',
|
|
valueField: 'DrvName',
|
|
displayField: 'DrvName'
|
|
,
|
|
listeners: {
|
|
beforequery: function (e) {
|
|
return FilterCombox(e, 1); //在beforequery使用此方法
|
|
},
|
|
scope: this
|
|
}
|
|
});
|
|
|
|
this.storeFrDrvName = Ext.create('DsExt.ux.RefTableStore', {
|
|
model: 'MsWlBsHeadRefMsWlDriver',
|
|
proxy: { url: '/TruckMng/MsWlPc/GetDrvNameListRm' }
|
|
});
|
|
this.storeFrDrvName.load({ params: { condition: "" } });
|
|
this.comboxFrDrvName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: '外点司机',
|
|
store: this.storeFrDrvName,
|
|
queryMode: 'remote',
|
|
minChars: 1,
|
|
queryParam: 'DrvName',
|
|
name: 'FrDrvName',
|
|
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/GetDrvNameListRm' }
|
|
});
|
|
this.storeWmsDrvName.load({ params: { condition: "" } });
|
|
this.comboxWmsDrvName = Ext.create('DsExt.ux.RefTableCombox', {
|
|
fieldLabel: '入库司机',
|
|
store: this.storeWmsDrvName,
|
|
queryMode: 'remote',
|
|
minChars: 1,
|
|
queryParam: 'DrvName',
|
|
name: 'WmsDrvName',
|
|
valueField: 'DrvName',
|
|
displayField: 'DrvName'
|
|
,
|
|
listeners: {
|
|
beforequery: function (e) {
|
|
return FilterCombox(e, 1); //在beforequery使用此方法
|
|
},
|
|
scope: this
|
|
}
|
|
});
|
|
|
|
|
|
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: '箱型', //'箱型',
|
|
store: this.storeCodeCtn,
|
|
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: 'DrvCode',
|
|
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: 'UserName',
|
|
name: 'UserName', flex: 0, hidden: true, margins: '0'
|
|
}, { fieldLabel: 'FEESTATUS',
|
|
name: 'FEESTATUS', 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: 'ChangedReson'
|
|
}, {
|
|
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.comboxCTNALL, {
|
|
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.3,
|
|
boxLabel: "",
|
|
fieldLabel: "怕水湿",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISGAOWEN",
|
|
flex: 0.3,
|
|
boxLabel: "",
|
|
fieldLabel: "怕高温",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISXIANLIANG",
|
|
flex: 0.3,
|
|
boxLabel: "",
|
|
fieldLabel: "只限量",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISCHECHUAN",
|
|
flex: 0.3,
|
|
boxLabel: "",
|
|
fieldLabel: "车船",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISHAIWU",
|
|
flex: 0.3,
|
|
boxLabel: "",
|
|
fieldLabel: "海污",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISFENGXIANG",
|
|
flex: 0.3,
|
|
boxLabel: "",
|
|
fieldLabel: "封箱",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISWEISHENBAO",
|
|
flex: 0.3,
|
|
boxLabel: "",
|
|
fieldLabel: "危申报",
|
|
inputValue: true, //选中的值
|
|
uncheckedValue: false, //未选中的值
|
|
checked: false //绘制时的选中状态
|
|
}, {
|
|
xtype: "checkbox", //checkbox控件
|
|
name: "ISBAOGUAN",
|
|
flex: 0.3,
|
|
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: '绑定',
|
|
name: 'DispatchName'
|
|
}, this.comboxFrTruckNo, this.comboxFrDrvName
|
|
|
|
]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textfield',
|
|
items: [{
|
|
fieldLabel: '到厂日期',
|
|
format: 'Y-m-d',
|
|
xtype: 'datefield',
|
|
name: 'ArriveDate'
|
|
}, this.comboxFactory, {
|
|
fieldLabel: '工厂地点',
|
|
flex: 1,
|
|
name: 'FactoryAddrSe'
|
|
}, {
|
|
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: 'Ton'
|
|
}, {
|
|
fieldLabel: '空箱分成',
|
|
flex: 0.5,
|
|
name: 'AroundTon'
|
|
}, {
|
|
fieldLabel: '入库时间',
|
|
format: 'Y-m-d',
|
|
xtype: 'datefield',
|
|
name: 'RtnDocTime'
|
|
}, this.comboxWmsTruckNo, this.comboxWmsDrvName
|
|
]
|
|
}, {
|
|
xtype: 'container',
|
|
layout: 'hbox',
|
|
defaultType: 'textarea',
|
|
items: [{
|
|
fieldLabel: '空箱要求',
|
|
height: 80,
|
|
flex: 3,
|
|
name: 'DstAreaSe'
|
|
}, {
|
|
xtype: 'button',
|
|
iconCls: "btnsearchBig",
|
|
width: 20,
|
|
handler: function (button, event) {
|
|
this.ShowBigEdit("DstAreaSe", '空箱要求');
|
|
},
|
|
scope: this
|
|
}, {
|
|
fieldLabel: '派车要求',
|
|
height: 80,
|
|
flex: 3,
|
|
name: 'DetiNationSe'
|
|
}, {
|
|
xtype: 'button',
|
|
iconCls: "btnsearchBig",
|
|
width: 20,
|
|
handler: function (button, event) {
|
|
this.ShowBigEdit("DetiNationSe", '派车要求');
|
|
},
|
|
scope: this
|
|
}, {
|
|
fieldLabel: '入库要求',
|
|
height: 80,
|
|
flex: 3,
|
|
name: 'ContainerTypeSe'
|
|
}, {
|
|
xtype: 'button',
|
|
iconCls: "btnsearchBig",
|
|
width: 20,
|
|
handler: function (button, event) {
|
|
this.ShowBigEdit("ContainerTypeSe", '入库要求');
|
|
},
|
|
scope: this
|
|
}, {
|
|
fieldLabel: '调度备注',
|
|
height: 80,
|
|
flex: 3,
|
|
name: 'LinkTelSe'
|
|
}, {
|
|
xtype: 'button',
|
|
iconCls: "btnsearchBig",
|
|
width: 20,
|
|
handler: function (button, event) {
|
|
this.ShowBigEdit("LinkTelSe", '调度备注');
|
|
},
|
|
scope: this
|
|
}, {
|
|
fieldLabel: '备注',
|
|
height: 80,
|
|
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');
|
|
},
|
|
scope: this
|
|
},
|
|
{
|
|
id: 'bsbtnSaveAndClose',
|
|
text: "保存并关闭",
|
|
handler: function (button, event) {
|
|
this.Save('1');
|
|
},
|
|
scope: this
|
|
},
|
|
'-',
|
|
{
|
|
id: 'bsbtnSaveAndNew',
|
|
text: "保存并新建",
|
|
handler: function (button, event) {
|
|
this.Save('2');
|
|
},
|
|
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
|
|
},
|
|
{
|
|
text: "引入场站数据",
|
|
handler: function (button, event) {
|
|
this.onCreateFenClick();
|
|
},
|
|
scope: this
|
|
},
|
|
{
|
|
text: "场站数据查看",
|
|
handler: function (button, event) {
|
|
this.onGETYARDClick();
|
|
},
|
|
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: 'Auditoperator', type: 'string' },
|
|
{ name: 'ENTEROPERATOR', type: 'string' },
|
|
{ name: 'FTruckNo', type: 'string' },
|
|
{ name: 'ENTERDATE', 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,
|
|
hidden: true,
|
|
layout: "border",
|
|
region: 'west',
|
|
width: 260,
|
|
items: [this.gridListFix]
|
|
});
|
|
|
|
//#endregion 明细表
|
|
|
|
//#region 布局
|
|
this.panelTop = new Ext.Panel({
|
|
layout: "border",
|
|
region: "north",
|
|
height: 355,
|
|
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();
|
|
|
|
}
|
|
}, ]
|
|
|
|
});
|
|
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 (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('ContainerType').setValue(this.editRecord.get('ContainerType'));
|
|
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') } });
|
|
|
|
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;
|
|
|
|
if (opstatus == 'add') {
|
|
data.PcBillType = '';
|
|
}
|
|
|
|
|
|
this.formEdit.getForm().reset();
|
|
this.formEdit.getForm().setValues(data);
|
|
if (this.opStatus == 'add') {
|
|
this.LoadDefValue();
|
|
}
|
|
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(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('ContainerType').setValue(this.editRecord.get('ContainerType'));
|
|
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') } });
|
|
|
|
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) {
|
|
var basicForm = this.formEdit.getForm();
|
|
if (!basicForm.isValid()) {
|
|
return;
|
|
}
|
|
|
|
/* basicForm.findField('BillNo').setDisabled(false);*/
|
|
|
|
var data = basicForm.getValues();
|
|
|
|
/* 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 jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas);
|
|
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);
|
|
|
|
|
|
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:jsonCtnBody
|
|
},
|
|
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.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 } });
|
|
|
|
} else if (type == '1') {
|
|
window.close();
|
|
} else {
|
|
this.LoadData('add', '');
|
|
}
|
|
} 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
|
|
|
|
|
|
|
|
|
|
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, '正在提交审核数据, 请稍侯..');
|
|
},
|
|
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 cntrnostr = '';
|
|
|
|
var cntrnostr = _thisPc.formEdit.getForm().findField('ContainerNo').getValue();
|
|
//if (ContainerNo != '') {
|
|
// 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 bodydatas = [];
|
|
var sealnostr = '';
|
|
var pkgsstr = '';
|
|
var tixiangshijian = '';
|
|
var fanchangshijian = '';
|
|
var ctnnum = 0;
|
|
var createfen = 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';
|
|
if (cntrnostr == '' ||cntrnostr.indexOf(member.data.CNTRNO)<0) {
|
|
bodydatas.push(member);
|
|
cntrnostr = cntrnostr + ' ' + member.data.CNTRNO;
|
|
sealnostr = sealnostr + ' ' + member.data.SEALNO;
|
|
pkgsstr = pkgsstr + ' ' + member.data.PKGS + '/' + member.data.KGS + '/' + member.data.CBM;
|
|
}
|
|
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');
|
|
ctnnum = ctnnum + 1;
|
|
|
|
};
|
|
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('ContainerQty');
|
|
//field.setValue(ctnnum);
|
|
|
|
|
|
//var field = _thisPc.formEdit.getForm().findField('ContainerNoSe');
|
|
//if (field.getValue()=='') field.setValue(pkgsstr);
|
|
|
|
var field = _thisPc.formEdit.getForm().findField('ArriveDate');
|
|
if (field.getValue=="")
|
|
field.setValue(tixiangshijian);
|
|
var field = _thisPc.formEdit.getForm().findField('ReturnDate');
|
|
if (field.getValue == "")
|
|
field.setValue(fanchangshijian);
|
|
|
|
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
|
|
});
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
Ext.MessageBox.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
|
|
}
|
|
|
|
|
|
},
|
|
|
|
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');
|
|
|
|
|
|
if (enable) {
|
|
bsbtnSave.enable();
|
|
bsbtnSaveAndClose.enable();
|
|
bsbtnSaveAndNew.enable();
|
|
} else {
|
|
bsbtnSave.disable();
|
|
bsbtnSaveAndClose.disable();
|
|
bsbtnSaveAndNew.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);
|
|
}
|
|
});
|
|
|
|
|