|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsOpCtnBsCardIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsOpCtnBsCardIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsOpCtnBsCardIndex, Ext.Panel, {
|
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
PageSize: 50,
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
AccDate: null,
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.formname = "formMsOpCtnBsCardIndex"; //页面名称
|
|
|
|
|
|
this.openertype = getUrlParam("opener");
|
|
|
|
|
|
this.storeListLock = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
fields: [
|
|
|
{ name: 'GID', type: 'string' },
|
|
|
{ name: 'FIELDNAME', type: 'string' }
|
|
|
|
|
|
],
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetLockField',
|
|
|
reader: {
|
|
|
id: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.worksql = getUrlParam('worksql');
|
|
|
|
|
|
//定义数据集
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpCtnBsCard',
|
|
|
pageSize: this.PageSize,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: '每页记录数',
|
|
|
labelAlign: 'right',
|
|
|
value: this.PageSize,
|
|
|
maxValue: 100000,
|
|
|
width: 170,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 30
|
|
|
});
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: '',
|
|
|
header: '',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COMPANYID',
|
|
|
header: 'COMPANYID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNNO',
|
|
|
header: '箱号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'APPLYNO',
|
|
|
header: '放箱申请编号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNPROP',
|
|
|
header: '箱属',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFYTIME',
|
|
|
header: '更新时间',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCLOSE',
|
|
|
header: '锁定',
|
|
|
width: 100,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_PUTCTN',
|
|
|
header: '放箱通知发送',
|
|
|
width: 100,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true') {
|
|
|
return "是";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PUTCTNDATE',
|
|
|
header: '放箱通知发送时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PUTCTNAUDITSTATUS',
|
|
|
header: '放箱通知审核状态',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PUTCTNAUDITBYREF',
|
|
|
header: '放箱通知审核人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: '委托单位',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: '货物名称',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAMEREF',
|
|
|
header: '货物名称(含英文简称)',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PREGOODSNAME',
|
|
|
header: '前装货品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: '开船日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PREI_ETA',
|
|
|
header: '预抵日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: '到港日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTNAME',
|
|
|
header: '目的港代理',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUR_PORT',
|
|
|
header: '当前位置',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUR_DATE',
|
|
|
header: '当前时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CYCLE_DAY',
|
|
|
header: '周期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '委托编号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: '操作',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: '主提单号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: '船公司',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_STATOIN',
|
|
|
header: '起运港场站',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_CNT_TIME',
|
|
|
header: '起运港提箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'LOADFACTORY',
|
|
|
header: '装货工厂',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: '起运港',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT',
|
|
|
header: '目的港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DEST_CNT_TIME',
|
|
|
header: '目的港提箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DEST_RTCNT_TIME',
|
|
|
header: '目的港还箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_STATOIN',
|
|
|
header: '目的港场站',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DETAIN_CTN_DAYS',
|
|
|
header: '滞箱天数',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PRE_CNT_TIME',
|
|
|
header: '预计提箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_RETURE_EMPTY',
|
|
|
header: '是否返空',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_POD_CLEAN',
|
|
|
header: '否目的港清洗',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_BOOKING',
|
|
|
header: '是否订舱',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_CUSTNO',
|
|
|
header: '空返委托编号',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_MBLNO',
|
|
|
header: '空返提单号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_CARRIER',
|
|
|
header: '空返船公司',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_CONTRACT',
|
|
|
header: '运费约价',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_PORTLOAD_CNT_TIME',
|
|
|
header: '空返起运港提箱日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_PORTLOAD',
|
|
|
header: '空返起运港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_ETD',
|
|
|
header: '空返开船日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DESTPORT',
|
|
|
header: '空返目的港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_ETA',
|
|
|
header: '空返到港日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DESTPORT_STATOIN',
|
|
|
header: '空返目的港场站',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DEST_CNT_TIME',
|
|
|
header: '空返目的港提箱日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DEST_RTCNT_TIME',
|
|
|
header: '空返目的港还箱日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_FREE_DAYS',
|
|
|
header: '起运港免箱使天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_OVER_DAYS',
|
|
|
header: '起运港超期天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_OVER_DAYS_FEE',
|
|
|
header: '起运港箱使费/天',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_OVER_DAYS_AMT',
|
|
|
header: '起运港箱使费',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_FREE_DAYS',
|
|
|
header: '目的港免箱使天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_OVER_DAYS',
|
|
|
header: '目的港超期天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_OVER_DAYS_FEE',
|
|
|
header: '目的港箱使费/天',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_OVER_DAYS_AMT',
|
|
|
header: '目的港箱使费',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MDGXSFSTATUS',
|
|
|
header: '目的港箱使费生成状态',
|
|
|
width: 140,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var acolor = '#000000';
|
|
|
if (record.data.MDGXSFSTATUS === '') {
|
|
|
acolor = '#000000';
|
|
|
} else if (value === '已生成,已引入') {
|
|
|
acolor = '#00bc12';
|
|
|
} else if (value === '已生成,未引入') {
|
|
|
acolor = '#B87070';
|
|
|
} else if (value === '已还箱,未生成') {
|
|
|
acolor = '#B87070';
|
|
|
} else if (value === '未还箱,未生成') {
|
|
|
acolor = '#B87070';
|
|
|
}else {
|
|
|
acolor = ' #000000';
|
|
|
}
|
|
|
returnValue = '<b style=' + '"color:' + acolor + '"' + '">' + value + '</b>';
|
|
|
return returnValue;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BOOKGOODNAME',
|
|
|
header: '订舱品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMGOODNAME',
|
|
|
header: '报关品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRUCKNAME',
|
|
|
header: '录车队',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBYREF',
|
|
|
header: '录入人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTTIME',
|
|
|
header: '录入时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICE',
|
|
|
header: '运输条款',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'NEEDBEHEATED',
|
|
|
header: '是否加热',
|
|
|
width: 80,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true') {
|
|
|
return "是";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTINPUTBY',
|
|
|
header: '代理维护人',
|
|
|
width: 100
|
|
|
}
|
|
|
];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
_this = this;
|
|
|
//定义Grid
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true
|
|
|
},
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
columns: this.girdcolums
|
|
|
|
|
|
,
|
|
|
// paging bar on the bottom
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.girdcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
if (BSCARDTYPE == '1')
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/Edit', record.data.GID);
|
|
|
else
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusEdit', record.data.GID);
|
|
|
}, this);
|
|
|
|
|
|
var isloadfee = true;
|
|
|
this.gridList.getSelectionModel().on('select', function (model, record, index) {
|
|
|
if (!isloadfee) return;
|
|
|
if (this.formMDEdit.isHidden() == true) return;
|
|
|
var bsno = record.data.GID;
|
|
|
var sql = "";
|
|
|
sql = " BSNO='" + bsno + "'";
|
|
|
isloadfee = false;
|
|
|
var ISCLOSE = record.data.ISCLOSE;
|
|
|
|
|
|
this.formMDEdit.getForm().reset();
|
|
|
this.formMDEdit.getForm().loadRecord(record);
|
|
|
if (ISCLOSE == 'true') {
|
|
|
Ext.getCmp('btnUpPORTLOADDATE').disable();
|
|
|
Ext.getCmp('btnLockPORTLOADDATE').disable();
|
|
|
Ext.getCmp('btnUnLockPORTLOADDATE').disable();
|
|
|
Ext.getCmp('btnUpPORTLOAD_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnLockPORTLOAD_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUnLockPORTLOAD_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUpETD').disable();
|
|
|
Ext.getCmp('btnLockETD').disable();
|
|
|
Ext.getCmp('btnUnLockETD').disable();
|
|
|
Ext.getCmp('btnUpETA').disable();
|
|
|
Ext.getCmp('btnLockETA').disable();
|
|
|
Ext.getCmp('btnUnLockETA').disable();
|
|
|
Ext.getCmp('btnUnLockDEST_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnLockDEST_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUpDEST_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUpDEST_RTCNT_TIME').disable();
|
|
|
Ext.getCmp('btnLockDEST_RTCNT_TIME').disable();
|
|
|
Ext.getCmp('btnUnLockDEST_RTCNT_TIME').disable();
|
|
|
Ext.getCmp('btnUpI_PORTLOAD_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnLockI_PORTLOAD_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUnLockI_PORTLOAD_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUpI_ETD').disable();
|
|
|
Ext.getCmp('btnLockI_ETD').disable();
|
|
|
Ext.getCmp('btnUnLockI_ETD').disable();
|
|
|
Ext.getCmp('btnUpI_ETA').disable();
|
|
|
Ext.getCmp('btnLockI_ETA').disable();
|
|
|
Ext.getCmp('btnUnLockI_ETA').disable();
|
|
|
Ext.getCmp('btnUpI_DEST_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnLockI_DEST_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUnLockI_DEST_CNT_TIME').disable();
|
|
|
Ext.getCmp('btnUpI_DEST_RTCNT_TIME').disable();
|
|
|
Ext.getCmp('btnLockI_DEST_RTCNT_TIME').disable();
|
|
|
Ext.getCmp('btnUnLockI_DEST_RTCNT_TIME').disable();
|
|
|
} else {
|
|
|
Ext.getCmp('btnUpPORTLOADDATE').enable();
|
|
|
Ext.getCmp('btnLockPORTLOADDATE').enable();
|
|
|
Ext.getCmp('btnUnLockPORTLOADDATE').enable();
|
|
|
Ext.getCmp('btnUpPORTLOAD_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnLockPORTLOAD_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUnLockPORTLOAD_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUpETD').enable();
|
|
|
Ext.getCmp('btnLockETD').enable();
|
|
|
Ext.getCmp('btnUnLockETD').enable();
|
|
|
Ext.getCmp('btnUpETA').enable();
|
|
|
Ext.getCmp('btnLockETA').enable();
|
|
|
Ext.getCmp('btnUnLockETA').enable();
|
|
|
Ext.getCmp('btnUnLockDEST_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnLockDEST_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUpDEST_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUpDEST_RTCNT_TIME').enable();
|
|
|
Ext.getCmp('btnLockDEST_RTCNT_TIME').enable();
|
|
|
Ext.getCmp('btnUnLockDEST_RTCNT_TIME').enable();
|
|
|
Ext.getCmp('btnUpI_PORTLOAD_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnLockI_PORTLOAD_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUnLockI_PORTLOAD_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUpI_ETD').enable();
|
|
|
Ext.getCmp('btnLockI_ETD').enable();
|
|
|
Ext.getCmp('btnUnLockI_ETD').enable();
|
|
|
Ext.getCmp('btnUpI_ETA').enable();
|
|
|
Ext.getCmp('btnLockI_ETA').enable();
|
|
|
Ext.getCmp('btnUnLockI_ETA').enable();
|
|
|
Ext.getCmp('btnUpI_DEST_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnLockI_DEST_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUnLockI_DEST_CNT_TIME').enable();
|
|
|
Ext.getCmp('btnUpI_DEST_RTCNT_TIME').enable();
|
|
|
Ext.getCmp('btnLockI_DEST_RTCNT_TIME').enable();
|
|
|
Ext.getCmp('btnUnLockI_DEST_RTCNT_TIME').enable();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
this.storeListLock.load({ params: { condition: sql },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
isloadfee = true;
|
|
|
if (_this.storeListLock.getCount() > 0) {
|
|
|
for (var j = 0; j < _this.storeListLock.getCount(); j += 1) {
|
|
|
var member = _this.storeListLock.getAt(j);
|
|
|
var headfield = _this.formMDEdit.getForm().findField('IS_' + member.data.FIELDNAME);
|
|
|
headfield.setValue(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
// this.gridList.on({
|
|
|
// selectionchange: function (sm, selections) {
|
|
|
// if (selections.length == 0) {
|
|
|
// _this.formMDEdit.setVisible(false);
|
|
|
|
|
|
// }
|
|
|
// }
|
|
|
// });
|
|
|
|
|
|
|
|
|
//#region formSearch 查询面板
|
|
|
_this = this;
|
|
|
|
|
|
//客户加载_委托单位
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
|
});
|
|
|
this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
|
|
|
//委托单位
|
|
|
_this = this;
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
forceSelection: true,
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
labelwidth = 60;
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 60,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
|
|
|
items: [{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '箱号',
|
|
|
labelWidth: labelwidth,
|
|
|
name: 'CTNNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '编号',
|
|
|
labelWidth: labelwidth,
|
|
|
name: 'BSNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxCustCode, {
|
|
|
fieldLabel: '开船日期',
|
|
|
labelWidth: labelwidth,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDbgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
labelWidth: labelwidth,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDend',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '只显示每罐箱最新',
|
|
|
labelWidth: 110,
|
|
|
xtype: 'checkbox',
|
|
|
name: 'ONLYNEW',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: "高级查询",
|
|
|
iconCls: "btnmore",
|
|
|
handler: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
var winAccess = new Shipping.DsQuery({
|
|
|
|
|
|
});
|
|
|
winAccess.StoreList = this.storeList;
|
|
|
winAccess.formname = this.formname;
|
|
|
winAccess.condition = sql;
|
|
|
winAccess.show();
|
|
|
return;
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [
|
|
|
{
|
|
|
text: "新建",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnadd',
|
|
|
handler: function (button, event) {
|
|
|
this.OprationStatus = 'add';
|
|
|
if (BSCARDTYPE == '1')
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/Edit');
|
|
|
else
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusEdit');
|
|
|
},
|
|
|
scope: this
|
|
|
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "删除",
|
|
|
iconCls: "btndelete",
|
|
|
id: 'btndelete',
|
|
|
handler: function (button, event) {
|
|
|
this.onDeleteClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打印",
|
|
|
iconCls: 'btnprint',
|
|
|
menu: [
|
|
|
{ text: "全部",
|
|
|
handler: function (menu, event) {
|
|
|
_this.Print();
|
|
|
}
|
|
|
}, { text: "选择打印",
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelect();
|
|
|
}
|
|
|
}, { text: "打印放箱通知单",
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelectPutCtn();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打开",
|
|
|
iconCls: "btnright", id: "OPEN",
|
|
|
handler: function (button, event) {
|
|
|
this.onOpenClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
, '-', {
|
|
|
text: "保存列表样式",
|
|
|
id: "btntest",
|
|
|
menu: [
|
|
|
{ text: "保存",
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
|
|
|
}
|
|
|
}, { text: "初始化",
|
|
|
handler: function (menu, event) {
|
|
|
_this.InitGrid(_this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "放箱通知审核",
|
|
|
id: "btnPUTCTNAUDIT",
|
|
|
menu: [
|
|
|
{ text: "审核通过",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAuditSelPutCtnClick('1');
|
|
|
}
|
|
|
}, { text: "取消审核通过",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onAuditSelPutCtnClick('0');
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "放箱通知发送",
|
|
|
menu: [
|
|
|
{ text: "放箱通知发送",
|
|
|
handler: function (menu, event) {
|
|
|
_this.winFeeCloseShow.show();
|
|
|
}
|
|
|
}, { text: "取消放箱通知发送",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onCancelSelPutCtnClick();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "业务卡锁定",
|
|
|
menu: [
|
|
|
{ text: "业务卡锁定",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onSelLockClick();
|
|
|
}
|
|
|
}, { text: "取消业务卡锁定",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onCancelSelLockClick();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: "箱使跟踪",
|
|
|
id: 'CtnUpDate',
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
if (this.formMDEdit.isHidden() == true)
|
|
|
this.formMDEdit.setVisible(true);
|
|
|
else
|
|
|
this.formMDEdit.setVisible(false);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.formMDEdit = Ext.widget('form', {
|
|
|
region: 'east',
|
|
|
width: 600,
|
|
|
frame: true,
|
|
|
hidden: true,
|
|
|
bodyPadding: 5,
|
|
|
title: '箱使跟踪表',
|
|
|
// autoScroll: true,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'fieldset',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: 'GID',
|
|
|
name: 'GID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'COMPANYID',
|
|
|
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'SEABSNO',
|
|
|
name: 'SEABSNO', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'ISCLOSE',
|
|
|
name: 'ISCLOSE', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'APPLYNO',
|
|
|
name: 'APPLYNO', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: '业务卡编号',
|
|
|
allowBlank: true,
|
|
|
labelWidth: 120,
|
|
|
readOnly: true,
|
|
|
flex: 1,
|
|
|
name: 'BSNO'
|
|
|
}, {
|
|
|
fieldLabel: '箱号',
|
|
|
readOnly: true,
|
|
|
name: 'CTNNO'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '起运港进港日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
labelWidth: 120,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PORTLOADDATE'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_PORTLOADDATE'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpPORTLOADDATE',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('PORTLOADDATE');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockPORTLOADDATE',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('PORTLOADDATE');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockPORTLOADDATE',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('PORTLOADDATE');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '起运港提箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
labelWidth: 120,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PORTLOAD_CNT_TIME'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_PORTLOAD_CNT_TIME'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpPORTLOAD_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('PORTLOAD_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockPORTLOAD_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('PORTLOAD_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockPORTLOAD_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('PORTLOAD_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
labelWidth: 120,
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETD'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_ETD'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpETD',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('ETD');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockETD',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('ETD');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockETD',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('ETD');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '到港日期',
|
|
|
format: 'Y-m-d',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETA'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_ETA'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpETA',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('ETA');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockETA',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('ETA');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockETA',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('ETA');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '目的港提箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'DEST_CNT_TIME'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_DEST_CNT_TIME'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpDEST_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('DEST_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockDEST_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('DEST_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockDEST_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('DEST_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '目的港还箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'DEST_RTCNT_TIME'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_DEST_RTCNT_TIME'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpDEST_RTCNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('DEST_RTCNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockDEST_RTCNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('DEST_RTCNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockDEST_RTCNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('DEST_RTCNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '空返起运港提箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'I_PORTLOAD_CNT_TIME'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_I_PORTLOAD_CNT_TIME'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpI_PORTLOAD_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('I_PORTLOAD_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockI_PORTLOAD_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('I_PORTLOAD_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockI_PORTLOAD_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('I_PORTLOAD_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '空返开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
labelWidth: 120,
|
|
|
xtype: 'datefield',
|
|
|
name: 'I_ETD'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_I_ETD'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpI_ETD',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('I_ETD');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockI_ETD',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('I_ETD');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockI_ETD',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('I_ETD');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '空返到港日期',
|
|
|
format: 'Y-m-d',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'I_ETA'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_I_ETA'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpI_ETA',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('I_ETA');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockI_ETA',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('I_ETA');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockI_ETA',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('I_ETA');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '空返目的港提箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
labelWidth: 120,
|
|
|
xtype: 'datefield',
|
|
|
name: 'I_DEST_CNT_TIME'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_I_DEST_CNT_TIME'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpI_DEST_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('I_DEST_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockI_DEST_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('I_DEST_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockI_DEST_CNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('I_DEST_CNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '空返还箱日期',
|
|
|
format: 'Y-m-d',
|
|
|
labelWidth: 120,
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'I_DEST_RTCNT_TIME'
|
|
|
}, {
|
|
|
fieldLabel: '是否锁定',
|
|
|
inputValue: true,
|
|
|
readOnly: true,
|
|
|
flex: 0.5,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'IS_I_DEST_RTCNT_TIME'
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "更新",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUpI_DEST_RTCNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UpBsDate('I_DEST_RTCNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "锁定",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnLockI_DEST_RTCNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.LockBsDate('I_DEST_RTCNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: "解除",
|
|
|
iconCls: "btnadd",
|
|
|
id: 'btnUnLockI_DEST_RTCNT_TIME',
|
|
|
handler: function (button, event) {
|
|
|
this.UnLockBsDate('I_DEST_RTCNT_TIME');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 75,
|
|
|
items: [this.formSearch, this.panelBtn]
|
|
|
});
|
|
|
this.panelCenter = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "center",
|
|
|
items: [this.gridList, this.formMDEdit]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.panelCenter]
|
|
|
});
|
|
|
|
|
|
this.sqlcontext = '';
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
if (!isNullorEmpty(this.worksql)) {
|
|
|
this.worksql = this.worksql.replace(/@@/g, '=')
|
|
|
this.sqlcontext = this.worksql;
|
|
|
this.onDsQuery();
|
|
|
|
|
|
} else {
|
|
|
if (!this.isotheropen())
|
|
|
this.onRefreshClick();
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formAccMonthShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '放箱通知时间',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'AccDate'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
me = this;
|
|
|
|
|
|
|
|
|
this.winFeeCloseShow = Ext.create('Ext.window.Window', {
|
|
|
title: "发送放箱通知",
|
|
|
width: 420,
|
|
|
//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.formAccMonthShow],
|
|
|
buttons: [{
|
|
|
text: "确认发送",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
var form = me.formAccMonthShow.getForm();
|
|
|
me.AccDate = form.findField('AccDate').getRawValue();
|
|
|
if (me.AccDate == '' || me.AccDate == null || me.AccDate == undefined) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '必须有放箱通知发送时间!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
_this.onSelPutCtnClick()
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: "关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
me.winFeeCloseShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
this.storeCodeDisport = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CodeDisportModel',
|
|
|
autoLoad: true,
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCodeDisportList' }
|
|
|
});
|
|
|
this.storeCodeDisport.load();
|
|
|
|
|
|
|
|
|
var btndelete = Ext.getCmp('btndelete');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "CTNBSCARDDEL"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
btndelete.disable();
|
|
|
} else {
|
|
|
btndelete.enable();
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
var btnadd = Ext.getCmp('btnadd');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "CTNBSCARDNEW"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
btnadd.disable();
|
|
|
} else {
|
|
|
btnadd.enable();
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
var btnPUTCTNAUDIT = Ext.getCmp('btnPUTCTNAUDIT');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "CTNBSCARDAUDITPUTCTN"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
btnPUTCTNAUDIT.disable();
|
|
|
} else {
|
|
|
btnPUTCTNAUDIT.enable();
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
var btnCtnUpDate = Ext.getCmp('CtnUpDate');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "CTNUPDATE"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
btnCtnUpDate.disable();
|
|
|
this.formMDEdit.setVisible(false);
|
|
|
} else {
|
|
|
btnCtnUpDate.enable();
|
|
|
this.formMDEdit.setVisible(true);
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
if (this.isotheropen()) {
|
|
|
BSNO = getUrlParam("BSNO");
|
|
|
sql = " APPLYNO=(select APPLYNO from v_op_bs where BSNO='" + BSNO + "') ";
|
|
|
this.dosearch(sql);
|
|
|
}
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
InitGrid: function (grid) {
|
|
|
var agirdcolums = grid;
|
|
|
this.gridList.reconfigure(this.storeList, agirdcolums);
|
|
|
|
|
|
},
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
this.dosearch(sql);
|
|
|
|
|
|
},
|
|
|
dosearch: function (sql) {
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
this.sqlcontext = sql;
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (r.length > 0) {
|
|
|
this.gridList.getSelectionModel().select(0);
|
|
|
} else {
|
|
|
this.formMDEdit.getForm().reset();
|
|
|
this.formMDEdit.getForm().loadRecord();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
var sql = this.sqlcontext;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (r.length > 0) {
|
|
|
this.gridList.getSelectionModel().select(0);
|
|
|
} else {
|
|
|
this.formMDEdit.getForm().reset();
|
|
|
this.formMDEdit.getForm().loadRecord();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
onDeleteClick: function (button, event) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var record = selections[0];
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/Delete',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.onDsQuery();
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //onDeleteClick
|
|
|
onOpenClick: function (button, event) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
record = selections[0];
|
|
|
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
if (BSCARDTYPE == '1')
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/Edit', record.data.GID);
|
|
|
else
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusEdit', record.data.GID);
|
|
|
}, //onOpenClick
|
|
|
UpBsDate: function (datefield) {
|
|
|
|
|
|
var gid = this.formMDEdit.getForm().findField('GID').getValue();
|
|
|
var datefieldValue = this.formMDEdit.getForm().findField(datefield).getRawValue();
|
|
|
//var msg = this.checkBsDate(datefield);
|
|
|
//if (!isNullorEmpty(msg)) {
|
|
|
// Ext.Msg.show({ title: '错误', msg: msg, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
// return;
|
|
|
//}
|
|
|
|
|
|
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
var GidStr = '';
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = "'" + rec.data.GID + "'";
|
|
|
if (GidStr == '')
|
|
|
GidStr = Gid;
|
|
|
else {
|
|
|
|
|
|
GidStr = GidStr + ',' + Gid;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定要更新' + records.length+'票吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在更新数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在更新数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/UpdateFieldDate',
|
|
|
params: {
|
|
|
GID: GidStr,
|
|
|
fieldname: datefield,
|
|
|
update: datefieldValue
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var sql = "";
|
|
|
sql = " BSNO='" + gid + "'";
|
|
|
_this.storeListLock.load({ params: { condition: sql },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (_this.storeListLock.getCount() > 0) {
|
|
|
for (var j = 0; j < _this.storeListLock.getCount(); j += 1) {
|
|
|
var member = _this.storeListLock.getAt(j);
|
|
|
var headfield = _this.formMDEdit.getForm().findField('IS_' + member.data.FIELDNAME);
|
|
|
headfield.setValue(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
for (i = 0; i < this.storeList.getCount(); i += 1) {
|
|
|
var memberyf = this.storeList.getAt(i);
|
|
|
if (memberyf.data.GID == gid) {
|
|
|
memberyf.set(datefield, datefieldValue);
|
|
|
memberyf.commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //
|
|
|
|
|
|
checkBsDate: function (datefield) {
|
|
|
|
|
|
_this = this;
|
|
|
function getformvalue(fieldname) {
|
|
|
var _r = _this.formMDEdit.getForm().findField(fieldname).getRawValue();
|
|
|
return _r;
|
|
|
}
|
|
|
|
|
|
this.StoreBsDate = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'BsDateModel',
|
|
|
proxy: { url: '' }
|
|
|
});
|
|
|
//this.StoreBsDate.add({ "FIELDNAME": "PORTLOAD_CNT_TIME", "NAME": "起运港进港日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "PORTLOAD_CNT_TIME", "NAME": "起运港提箱日期"});
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "ETD", "NAME": "开船日期"});
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "ETA", "NAME": "到港日期"});
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "DEST_CNT_TIME", "NAME": "目的港提箱日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "DEST_RTCNT_TIME", "NAME": "目的港还箱日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "I_PORTLOAD_CNT_TIME", "NAME": "空返起运港提箱日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "I_ETD", "NAME": "空返开船日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "I_ETA", "NAME": "空返到港日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "I_DEST_CNT_TIME", "NAME": "空返目的港提箱日期" });
|
|
|
this.StoreBsDate.add({ "FIELDNAME": "I_DEST_RTCNT_TIME", "NAME": "空返目的港还箱日期" });
|
|
|
|
|
|
var PREVRECORD = null;
|
|
|
var CURRrec = null;
|
|
|
var msg = "";
|
|
|
|
|
|
this.StoreBsDate.each(function (record) {
|
|
|
CURRrec = record;
|
|
|
if (PREVRECORD == null) {
|
|
|
PREVRECORD = record;
|
|
|
} else {
|
|
|
|
|
|
PREVtimeStr = getformvalue(PREVRECORD.data.FIELDNAME);
|
|
|
CURRtimeStr = getformvalue(CURRrec.data.FIELDNAME);
|
|
|
|
|
|
if (isNullorEmpty(CURRtimeStr)) { }
|
|
|
else {
|
|
|
if (isNullorEmpty(PREVtimeStr)) {
|
|
|
msg = '[' + CURRrec.data.NAME + ']有数据而[' + PREVRECORD.data.NAME + '] 还未填写!';
|
|
|
return msg;
|
|
|
}
|
|
|
PREVtime = new Date(PREVtimeStr);
|
|
|
CURRtime = new Date(CURRtimeStr);
|
|
|
if (PREVtime > CURRtime) {
|
|
|
msg = '[' + CURRrec.data.NAME + ']时间早于[' + PREVRECORD.data.NAME + '] 请检查数据!';
|
|
|
return msg;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
return msg;
|
|
|
|
|
|
},
|
|
|
|
|
|
LockBsDate: function (datefield) {
|
|
|
|
|
|
var gid = this.formMDEdit.getForm().findField('GID').getValue();
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
var GidStr = '';
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = "'" + rec.data.GID + "'";
|
|
|
if (GidStr == '')
|
|
|
GidStr = Gid;
|
|
|
else {
|
|
|
|
|
|
GidStr = GidStr + ',' + Gid;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定要锁定选中的' + records.length +'票吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在更新数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在更新数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/LockField',
|
|
|
params: {
|
|
|
GID: GidStr,
|
|
|
fieldname: datefield
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var sql = "";
|
|
|
sql = " BSNO='" + gid + "'";
|
|
|
_this.formMDEdit.getForm().findField('IS_PORTLOADDATE').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_PORTLOAD_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_ETD').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_ETA').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_DEST_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_DEST_RTCNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_PORTLOAD_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_ETD').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_ETA').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_DEST_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_DEST_RTCNT_TIME').setValue(false);
|
|
|
|
|
|
_this.storeListLock.load({ params: { condition: sql },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (_this.storeListLock.getCount() > 0) {
|
|
|
for (var j = 0; j < _this.storeListLock.getCount(); j += 1) {
|
|
|
var member = _this.storeListLock.getAt(j);
|
|
|
var headfield = _this.formMDEdit.getForm().findField('IS_' + member.data.FIELDNAME);
|
|
|
headfield.setValue(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //
|
|
|
UnLockBsDate: function (datefield) {
|
|
|
|
|
|
var gid = this.formMDEdit.getForm().findField('GID').getValue();
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
var GidStr = '';
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = "'" + rec.data.GID + "'";
|
|
|
if (GidStr == '')
|
|
|
GidStr = Gid;
|
|
|
else {
|
|
|
|
|
|
GidStr = GidStr + ',' + Gid;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定要取消锁定选中的' + records.length +'票业务卡吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在更新数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在更新数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/UnLockField',
|
|
|
params: {
|
|
|
GID: GidStr,
|
|
|
fieldname: datefield
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var sql = "";
|
|
|
sql = " BSNO='" + gid + "'";
|
|
|
_this.formMDEdit.getForm().findField('IS_PORTLOADDATE').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_PORTLOAD_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_ETD').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_ETA').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_DEST_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_DEST_RTCNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_PORTLOAD_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_ETD').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_ETA').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_DEST_CNT_TIME').setValue(false);
|
|
|
_this.formMDEdit.getForm().findField('IS_I_DEST_RTCNT_TIME').setValue(false);
|
|
|
_this.storeListLock.load({ params: { condition: sql },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
if (_this.storeListLock.getCount() > 0) {
|
|
|
for (var j = 0; j < _this.storeListLock.getCount(); j += 1) {
|
|
|
var member = _this.storeListLock.getAt(j);
|
|
|
var headfield = _this.formMDEdit.getForm().findField('IS_' + member.data.FIELDNAME);
|
|
|
headfield.setValue(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //
|
|
|
|
|
|
onSelPutCtnClick: function () {
|
|
|
|
|
|
var GidStr = '';
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要发送放箱通知的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.IS_PUTCTN
|
|
|
if (status != 'true') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有要发送放箱通知的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在锁定...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/PutCtn',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
PutDate: _this.AccDate
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winFeeCloseShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onAuditSelPutCtnClick: function (type) {
|
|
|
|
|
|
var GidStr = '';
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要审核发送放箱通知的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.PUTCTNAUDITSTATUS;
|
|
|
if (type == '1') {
|
|
|
if (status == '未审核' || status == '') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
} else {
|
|
|
if (status == '审核通过') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有要审核发送放箱通知的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在审核...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/AuditPutCtn',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: type
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onCancelSelPutCtnClick: function () {
|
|
|
|
|
|
var GidStr = '';
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要取消发送放箱通知的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.IS_PUTCTN
|
|
|
if (status == 'true') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有要取消发送放箱通知的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在锁定...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/CancelPutCtn',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onSelLockClick: function () {
|
|
|
|
|
|
var GidStr = '';
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要锁定的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.ISCLOSE
|
|
|
if (status != 'true') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有要锁定的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在锁定...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/LockBs',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
// _this.onDsQuery();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onCancelSelLockClick: function () {
|
|
|
|
|
|
var GidStr = '';
|
|
|
var records = this.GridCheckBoxModel.selected.items;
|
|
|
if (records.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要取消锁定的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
|
var rec = records[i];
|
|
|
var Gid = rec.data.BSNO;
|
|
|
var status = rec.data.ISCLOSE
|
|
|
if (status == 'true') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
_this = this;
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有要取消锁定的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在锁定...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/CancelLockBs',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = '';
|
|
|
|
|
|
|
|
|
var BSNO = form.findField('BSNO').getValue();
|
|
|
// sql = sql + getAndConSql(sql, BSNO, " (BSNO like '%" + BSNO + "%' or CUSTNO like '%" + BSNO + "%' or I_CUSTNO like '%" + BSNO + "%' or MBLNO like '%" + BSNO + "%' ) ");
|
|
|
sql = sql + getAndConSql(sql, BSNO, " (BSNO like '%" + BSNO + "%' ) ");
|
|
|
|
|
|
var CTNNO = form.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, "CTNNO like '%" + CTNNO + "%'");
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var expDateBgn = form.findField('ETDbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "ETD>='" + expDateBgn + "'");
|
|
|
|
|
|
var expDateEnd = form.findField('ETDend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "ETD<='" + expDateEnd + " 23:59:59'");
|
|
|
|
|
|
var ONLYNEW = form.findField('ONLYNEW').getValue();
|
|
|
if (isTrue(ONLYNEW)) {
|
|
|
sql = sql + getAndConSql(sql, ONLYNEW, " GID in (select gid from v_top_opctnbscard)");
|
|
|
}
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bsno = '11111';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.GID;
|
|
|
}
|
|
|
|
|
|
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetDataListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
printstr: 'true',
|
|
|
sort: sortstr
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnstr = jsonresult.data;
|
|
|
var printType = 'MSOPCTNBSCARD';
|
|
|
var sql1 = returnstr;
|
|
|
|
|
|
var sql2 = "Select GID 编号";
|
|
|
sql2 = sql2 + ",BSNO 业务编号 , CTNNO 箱号, CUR_PORT 当期位置, GOODSNAME 货物名称 ";
|
|
|
sql2 = sql2 + " , MBLNO 主提单号, CUSTNO 委托编号, CUSTOMERNAME 委托单位, PORTLOAD_STATOIN 起运港场站, GOODSNAME 货物名称";
|
|
|
sql2 = sql2 + " ,PORTLOAD_CNT_TIME 提箱日期 ,PRE_CNT_TIME 预计提箱日期, LOADFACTORY 装货工厂";
|
|
|
sql2 = sql2 + ", PORTLOAD 起运港, ETD 开船日期 ,DESTPORT 目的港 , ETA 到港日期 ,PREETA 预抵日期, AGENTNAME 目的港代理";
|
|
|
sql2 = sql2 + " , DEST_CNT_TIME 目的港提箱日期 ,DEST_RTCNT_TIME 目的港还箱日期 ,DESTPORT_STATOIN 目的港堆存场站 ";
|
|
|
sql2 = sql2 + " , DESTPORT_FREE_DAYS 免费箱使天数, DESTPORT_OVER_DAYS 超期天数,DESTPORT_OVER_DAYS_FEE 箱使费天, DESTPORT_OVER_DAYS_AMT 超期箱使费 ,DETAIN_CTN_DAYS 滞箱天数 ";
|
|
|
sql2 = sql2 + " ,I_MBLNO 进口主提单号, I_CUSTNO 进口委托编号,I_PORTLOAD 进口堆存场站 ";
|
|
|
sql2 = sql2 + " ,I_PORTLOAD_CNT_TIME 进口提箱日期 ";
|
|
|
sql2 = sql2 + " ,I_PORTLOAD 进口起运港 ,I_ETD 进口开船日期 ,i_DESTPORT 进口目的港, I_ETA 进口到港日期 ";
|
|
|
sql2 = sql2 + " , I_DEST_CNT_TIME 进口目的港提箱日期 ,I_DEST_RTCNT_TIME 进口目的港还箱日期 ,I_DESTPORT_STATOIN 进口目的港堆存场站 ";
|
|
|
sql2 = sql2 + " from op_ctnbscard where GID='" + bsno + "'";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6, '');
|
|
|
|
|
|
} 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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
PrintSelect: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
var selectedRecords = [];
|
|
|
var storeadd = null;
|
|
|
selectedRecords = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
if (selectedRecords.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要打印的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = 'CTNNO';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
var feeGidSql = '';
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var record = selectedRecords[i];
|
|
|
var feeGId = "'" + record.get('GID') + "'";
|
|
|
if (feeGidSql == '') {
|
|
|
feeGidSql = feeGId;
|
|
|
} else {
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
var bsno = '11111';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.GID;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSOPCTNBSCARDSELECT';
|
|
|
var sql1 = "Select op_ctnbscard.GID 编号";
|
|
|
sql1 = sql1 + ",BSNO 业务编号 , CTNNO 箱号, CUR_PORT 当期位置, GOODSNAME 货物名称 ";
|
|
|
sql1 = sql1 + " , MBLNO 主提单号, CUSTNO 委托编号, CUSTOMERNAME 委托单位, PORTLOAD_STATOIN 起运港场站, GOODSNAME 货物名称";
|
|
|
sql1 = sql1 + " ,PORTLOAD_CNT_TIME 提箱日期,PRE_CNT_TIME 预计提箱日期 , LOADFACTORY 装货工厂";
|
|
|
sql1 = sql1 + ", PORTLOAD 起运港, ETD 开船日期 ,DESTPORT 目的港 , ETA 到港日期 ,PREETA 预抵日期, AGENTNAME 目的港代理";
|
|
|
sql1 = sql1 + " , DEST_CNT_TIME 目的港提箱日期 ,DEST_RTCNT_TIME 目的港还箱日期 ,DESTPORT_STATOIN 目的港堆存场站 ";
|
|
|
sql1 = sql1 + " , DESTPORT_FREE_DAYS 免费箱使天数, DESTPORT_OVER_DAYS 超期天数,DESTPORT_OVER_DAYS_FEE 箱使费天, DESTPORT_OVER_DAYS_AMT 超期箱使费 ,DETAIN_CTN_DAYS 滞箱天数,TRUCKNAME 车队,TRUCKLINKNAME 车队联系人 ";
|
|
|
sql1 = sql1 + " ,I_MBLNO 进口主提单号, I_CUSTNO 进口委托编号,I_PORTLOAD 进口堆存场站 ";
|
|
|
sql1 = sql1 + " ,I_PORTLOAD_CNT_TIME 进口提箱日期 ";
|
|
|
sql1 = sql1 + " ,I_PORTLOAD 进口起运港 ,I_ETD 进口开船日期,i_DESTPORT 进口目的港,I_ETA 进口到港日期 ";
|
|
|
sql1 = sql1 + " , I_DEST_CNT_TIME 进口目的港提箱日期 ,I_DEST_RTCNT_TIME 进口目的港还箱日期 ,I_DESTPORT_STATOIN 进口目的港堆存场站 ";
|
|
|
sql1 = sql1 + " , ClientSTATOIN.Tel 场站电话 ,ClientSTATOIN.CHIEF 场站联系人,ClientSTATOIN.ADDR 场站地址 ";
|
|
|
sql1 = sql1 + " from op_ctnbscard "
|
|
|
sql1 = sql1 + " Left join info_client ClientSTATOIN on ClientSTATOIN.SHORTNAME=op_ctnbscard.PORTLOAD_STATOIN ";
|
|
|
sql1 = sql1 + "WHERE op_ctnbscard.GID IN (" + feeGidSql + ") order by CTNNO ";
|
|
|
|
|
|
var sql2 = "select * from op_ctnbscard where GID='" + bsno + "'";
|
|
|
var sql3 = "SELECT [CTNNO] 罐号,[CTNPROP] 箱属,[NAMEPLATE] 铭牌信息 ,[OWNERCTN] 罐东 ,[MADEDATE] 制造年限";
|
|
|
sql3 = sql3 + ",(select ShowName from [user] where GID=code_ctntk.INPUTBY) as 录入人";
|
|
|
sql3 = sql3 + ",(select TOP 1 GOODSNAME FROM op_ctnbscard WHERE CTNNO=code_ctntk.CTNNO";
|
|
|
sql3 = sql3 + " ORDER BY PORTLOAD_CNT_TIME DESC) as 所装货";
|
|
|
// sql3 = sql3 + ",(select TOP 1 CUR_PORT FROM op_ctnbscard WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
// sql3 = sql3 + " ORDER BY PORTLOAD_CNT_TIME DESC) as 当前位置";
|
|
|
sql3 = sql3 + ",(select TOP 1 当前位置 FROM v_tk_cutdate WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " ORDER BY 当前日期 DESC) as 当前位置 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 当前日期 FROM v_tk_cutdate WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " ORDER BY 当前日期 DESC) as 当前日期 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 下一日期 FROM v_tk_cutdate WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " ORDER BY 下一日期 DESC) as 下一日期 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 前装货 FROM v_tk_preGoodsName WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " order by PORTLOAD_CNT_TIME desc ) as 前装货 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 DEST_RTCNT_TIME FROM op_ctnbscard WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " order by DEST_RTCNT_TIME desc ) as 最后还箱日期 ";
|
|
|
sql3 = sql3 + " from code_ctntk";
|
|
|
sql3 = sql3 + " where (ISSTOPUSE=0 OR ISSTOPUSE IS NULL) AND CTNPROP in ('租赁箱','自有箱')";
|
|
|
sql3 = sql3 + " ORDER BY CTNNO ";
|
|
|
|
|
|
var sql4 = "Select op_ctnbscard.GID 编号";
|
|
|
sql4 = sql4 + ", op_ctnbscard.CTNNO 箱号,[dbo].F_GetRepairItems(op_ctnbscard.GID) 改装列表";
|
|
|
sql4 = sql4 + " from op_ctnbscard ";
|
|
|
sql4 = sql4 + "WHERE op_ctnbscard.GID IN (" + feeGidSql + ") order by op_ctnbscard.CTNNO ";
|
|
|
|
|
|
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
},
|
|
|
PrintSelectPutCtn: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
var selectedRecords = [];
|
|
|
var storeadd = null;
|
|
|
selectedRecords = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
if (selectedRecords.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要打印的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = 'CTNNO';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
var feeGidSql = '';
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var record = selectedRecords[i];
|
|
|
if (record.get('PUTCTNAUDITSTATUS') == '审核通过') {
|
|
|
var feeGId = "'" + record.get('GID') + "'";
|
|
|
if (feeGidSql == '') {
|
|
|
feeGidSql = feeGId;
|
|
|
} else {
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
|
|
|
if (feeGidSql == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '必须审核后才可以打印,没有要打印的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bsno = '11111';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.GID;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSOPCTNBSCARDSELECTPUTCTN';
|
|
|
var sql1 = "Select op_ctnbscard.GID 编号";
|
|
|
sql1 = sql1 + ",BSNO 业务编号 , CTNNO 箱号, CUR_PORT 当期位置, GOODSNAME 货物名称 ";
|
|
|
sql1 = sql1 + " , MBLNO 主提单号, CUSTNO 委托编号, CUSTOMERNAME 委托单位, PORTLOAD_STATOIN 起运港场站, GOODSNAME 货物名称";
|
|
|
sql1 = sql1 + " ,PORTLOAD_CNT_TIME 提箱日期,PRE_CNT_TIME 预计提箱日期 , LOADFACTORY 装货工厂";
|
|
|
sql1 = sql1 + ", PORTLOAD 起运港, ETD 开船日期 ,DESTPORT 目的港 , ETA 到港日期 , AGENTNAME 目的港代理";
|
|
|
sql1 = sql1 + " , DEST_CNT_TIME 目的港提箱日期 ,DEST_RTCNT_TIME 目的港还箱日期 ,DESTPORT_STATOIN 目的港堆存场站 ";
|
|
|
sql1 = sql1 + " , DESTPORT_FREE_DAYS 免费箱使天数, DESTPORT_OVER_DAYS 超期天数,DESTPORT_OVER_DAYS_FEE 箱使费天, DESTPORT_OVER_DAYS_AMT 超期箱使费 ,DETAIN_CTN_DAYS 滞箱天数,TRUCKNAME 车队,TRUCKLINKNAME 车队联系人 ";
|
|
|
sql1 = sql1 + " ,I_MBLNO 进口主提单号, I_CUSTNO 进口委托编号,I_PORTLOAD 进口堆存场站 ";
|
|
|
sql1 = sql1 + " ,I_PORTLOAD_CNT_TIME 进口提箱日期 ";
|
|
|
sql1 = sql1 + " ,I_PORTLOAD 进口起运港 ,I_ETD 进口开船日期,i_DESTPORT 进口目的港,I_ETA 进口到港日期 ";
|
|
|
sql1 = sql1 + " , I_DEST_CNT_TIME 进口目的港提箱日期 ,I_DEST_RTCNT_TIME 进口目的港还箱日期 ,I_DESTPORT_STATOIN 进口目的港堆存场站 ";
|
|
|
sql1 = sql1 + " , ClientSTATOIN.Tel 场站电话 ,ClientSTATOIN.CHIEF 场站联系人,ClientSTATOIN.ADDR 场站地址 ";
|
|
|
sql1 = sql1 + " from op_ctnbscard "
|
|
|
sql1 = sql1 + " Left join info_client ClientSTATOIN on ClientSTATOIN.SHORTNAME=op_ctnbscard.PORTLOAD_STATOIN ";
|
|
|
sql1 = sql1 + " Left join op_ctnrepair on op_ctnrepair.LINKGID=op_ctnbscard.GID ";
|
|
|
|
|
|
sql1 = sql1 + "WHERE op_ctnbscard.GID IN (" + feeGidSql + ") order by CTNNO ";
|
|
|
|
|
|
var sql2 = "select * from op_ctnbscard where GID='" + bsno + "'";
|
|
|
var sql3 = "SELECT [CTNNO] 罐号,[CTNPROP] 箱属,[NAMEPLATE] 铭牌信息 ,[OWNERCTN] 罐东 ,[MADEDATE] 制造年限";
|
|
|
sql3 = sql3 + ",(select ShowName from [user] where GID=code_ctntk.INPUTBY) as 录入人";
|
|
|
sql3 = sql3 + ",(select TOP 1 GOODSNAME FROM op_ctnbscard WHERE CTNNO=code_ctntk.CTNNO";
|
|
|
sql3 = sql3 + " ORDER BY PORTLOAD_CNT_TIME DESC) as 所装货";
|
|
|
// sql3 = sql3 + ",(select TOP 1 CUR_PORT FROM op_ctnbscard WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
// sql3 = sql3 + " ORDER BY PORTLOAD_CNT_TIME DESC) as 当前位置";
|
|
|
sql3 = sql3 + ",(select TOP 1 当前位置 FROM v_tk_cutdate WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " ORDER BY 当前日期 DESC) as 当前位置 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 当前日期 FROM v_tk_cutdate WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " ORDER BY 当前日期 DESC) as 当前日期 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 下一日期 FROM v_tk_cutdate WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " ORDER BY 下一日期 DESC) as 下一日期 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 前装货 FROM v_tk_preGoodsName WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " order by PORTLOAD_CNT_TIME desc ) as 前装货 ";
|
|
|
sql3 = sql3 + ",(select TOP 1 DEST_RTCNT_TIME FROM op_ctnbscard WHERE CTNNO=code_ctntk.CTNNO ";
|
|
|
sql3 = sql3 + " order by DEST_RTCNT_TIME desc ) as 最后还箱日期 ";
|
|
|
sql3 = sql3 + " from code_ctntk";
|
|
|
sql3 = sql3 + " where (ISSTOPUSE=0 OR ISSTOPUSE IS NULL) AND CTNPROP in ('租赁箱','自有箱')";
|
|
|
sql3 = sql3 + " ORDER BY CTNNO ";
|
|
|
|
|
|
var sql4 = "Select op_ctnbscard.GID 编号";
|
|
|
sql4 = sql4 + ", op_ctnbscard.CTNNO 箱号,[dbo].F_GetRepairItems(op_ctnbscard.GID) 改装列表";
|
|
|
sql4 = sql4 + " from op_ctnbscard ";
|
|
|
sql4 = sql4 + "WHERE op_ctnbscard.GID IN (" + feeGidSql + ") order by op_ctnbscard.CTNNO ";
|
|
|
|
|
|
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
}
|
|
|
, isotheropen: function () {
|
|
|
if (isNullorEmpty(this.opener())) return false;
|
|
|
return true;
|
|
|
}
|
|
|
, opener: function () {
|
|
|
return this.openertype;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|