|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.BillCheckOutEdit = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.BillCheckOutEdit.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.BillCheckOutEdit, Ext.Panel, {
|
|
|
ParentWin: null,
|
|
|
OpStatus: 'add',
|
|
|
StoreList: null,
|
|
|
editRecord: null,
|
|
|
Editdata: null,
|
|
|
stroplb: '签单业务',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
this.bodyDel = [];
|
|
|
this.itemindex = 1;
|
|
|
this.myDate = new Date();
|
|
|
this.accdatesameetd = 0;
|
|
|
this.MsPeriod = null;
|
|
|
this.SALEORDERDEPTBYOP = 0;
|
|
|
this.copyfee = false;
|
|
|
|
|
|
this.Add_formname = "formMsOpSeaeIndex";
|
|
|
|
|
|
//parentWin = window.parent.opener;
|
|
|
//mainWin = getMainForm(parentWin);
|
|
|
|
|
|
//#region 相关数据集
|
|
|
this.storeDefValue = Ext.create('Ext.data.Store', {
|
|
|
model: 'DsShipping.ux.OpDefValue',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsCodeOpDef/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeMustBe = Ext.create('Ext.data.Store', {
|
|
|
model: 'DsShipping.ux.OpDefValue',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsCodeOpMustField/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsCodeOpService',
|
|
|
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataList' }
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//委托单位
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
|
});
|
|
|
//this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'" } });
|
|
|
//this.storeCustCode.loadData(mainWin.GetPubStore("INFOCLIENT_ISCONTROLLER").data.items);
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
forceSelection: true,
|
|
|
matchFieldWidth: false, //下拉款自适应宽度
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
autoSelect:true,
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
//allowBlank: false,
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
//if (records.length > 0) {
|
|
|
// var basicForm = _this.formEdit.getForm();
|
|
|
// var ENTERP = basicForm.findField('ENTERP').getValue();
|
|
|
// if (ENTERP == '' || ENTERP == null) {
|
|
|
// basicForm.findField('ENTERP').setValue(combo.value);
|
|
|
// }
|
|
|
// this.formHead.getForm().findField('SALECORPID').setValue(records[0].data.SALECORPID);
|
|
|
// this.formHead.getForm().findField('SALE').setValue(records[0].data.SALE);
|
|
|
// var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + combo.value + "')";
|
|
|
// this.storeInfoClientContact.load({
|
|
|
// params: { condition: s },
|
|
|
// callback: function (r, options, success) {
|
|
|
// if (success) {
|
|
|
// if (this.storeInfoClientContact.getCount() > 0) {
|
|
|
// var member = this.storeInfoClientContact.getAt(0);
|
|
|
// this.comboxInfoClientContact.setValue(member.data.SHOWNAME);
|
|
|
// } else {
|
|
|
// this.comboxInfoClientContact.setValue('');
|
|
|
// }
|
|
|
// }
|
|
|
// },
|
|
|
// scope: this
|
|
|
// });
|
|
|
// if (records[0].data.BSSOURCE != '') {
|
|
|
// this.formEdit.getForm().findField('BSSOURCE').setValue(records[0].data.BSSOURCE);
|
|
|
// var recs = DsStoreQueryBy(this.storeSource, 'SourceName', records[0].data.BSSOURCE);
|
|
|
// if (recs.getCount() > 0) {
|
|
|
// var data = recs.getAt(0).data;
|
|
|
// var s = "SOURCEID='" + data.SourceID + "'";
|
|
|
// this.storeSourceDetail.load({ params: { condition: s } });
|
|
|
// } else {
|
|
|
// var BSSOURCEDETAIL = this.formHead.getForm().findField('BSSOURCEDETAIL');
|
|
|
// BSSOURCEDETAIL.setValue('');
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//委托单位_联系人
|
|
|
this.storeInfoClientContact = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.InfoClientContactModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetInfoClientContactList' }
|
|
|
});
|
|
|
|
|
|
//this.storeInfoClientContact.load();
|
|
|
this.comboxInfoClientContact = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '客户联系人', //'客户操作',
|
|
|
store: this.storeInfoClientContact,
|
|
|
// forceSelection: true,
|
|
|
name: 'RECEIVER',
|
|
|
valueField: 'SHOWNAME',
|
|
|
displayField: 'SHOWNAME',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
|
|
|
var Selectedrecords = DsStoreQueryBy(this.storeInfoClientContact, 'GID', records[0].data.GID);
|
|
|
if (Selectedrecords.getCount() > 0) {
|
|
|
var Selectedrecord = Selectedrecords.getAt(0).data;
|
|
|
this.formHead.getForm().findField('RECEIVEEMAIL').setValue(Selectedrecord.EMAIL);
|
|
|
|
|
|
} else {
|
|
|
this.formHead.getForm().findField('RECEIVEEMAIL').setValue('');
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
//权限范围
|
|
|
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsOP',
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
|
|
|
});
|
|
|
|
|
|
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.storeFEEUP = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeFEEUP.add({ "FSTATUS": "", "NAME": "" });
|
|
|
this.storeFEEUP.add({ "FSTATUS": false, "NAME": "否" });
|
|
|
this.storeFEEUP.add({ "FSTATUS": true, "NAME": "是" });
|
|
|
|
|
|
this.comboxSENDED = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: "是否已发出", //是否费用提交
|
|
|
store: this.storeFEEUP,
|
|
|
valueField: 'FSTATUS',
|
|
|
readOnly:true,
|
|
|
displayField: 'NAME',
|
|
|
// flex: 0.7,
|
|
|
//labelWidth: 90,
|
|
|
forceSelection: true,
|
|
|
name: 'SENDED',
|
|
|
value: '',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
//keyup: function (field, e) {
|
|
|
// if (e.getKey() == e.ENTER) {
|
|
|
// _this.onRefreshClick();
|
|
|
// }
|
|
|
//}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.comboxISCHECKOUT = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: "已签出", //是否费用提交
|
|
|
store: this.storeFEEUP,
|
|
|
valueField: 'FSTATUS',
|
|
|
readOnly: true,
|
|
|
displayField: 'NAME',
|
|
|
// flex: 0.7,
|
|
|
//labelWidth: 90,
|
|
|
forceSelection: true,
|
|
|
name: 'ISCHECKOUT',
|
|
|
id:"formISCHECKOUT",
|
|
|
value: '',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
//keyup: function (field, e) {
|
|
|
// if (e.getKey() == e.ENTER) {
|
|
|
// _this.onRefreshClick();
|
|
|
// }
|
|
|
//}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefList' }
|
|
|
});
|
|
|
this.storeOpCode.load();
|
|
|
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '揽货人',
|
|
|
//labelWidth: 90,
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'SALE',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
_this = this;
|
|
|
this.formHead = Ext.widget('form', {
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
collapsed: false,
|
|
|
collapsible: true,
|
|
|
//height:120,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
fieldLabel: 'GID',
|
|
|
id:"formGID",
|
|
|
name: 'GID', hidden: true
|
|
|
}, {
|
|
|
fieldLabel: '签单条编号',
|
|
|
name: 'CHECKOUTNO', readOnly: true
|
|
|
}, {
|
|
|
fieldLabel: '委托单位',
|
|
|
readOnly: true,
|
|
|
name: 'CUSTOMERNAME'
|
|
|
},
|
|
|
this.comboxSaleCompany
|
|
|
, {
|
|
|
fieldLabel: '录入人',
|
|
|
readOnly: true,
|
|
|
name: 'INPUTBY',
|
|
|
value: SHOWNAME
|
|
|
}, {
|
|
|
fieldLabel: '发送人',
|
|
|
readOnly: true,
|
|
|
name: 'SENDER'
|
|
|
}, {
|
|
|
fieldLabel: 'CORPID',
|
|
|
hidden: true,
|
|
|
name: 'CORPID'
|
|
|
}, {
|
|
|
fieldLabel: 'SALECORPID',
|
|
|
hidden: true,
|
|
|
name: 'SALECORPID'
|
|
|
}, {
|
|
|
fieldLabel: 'MAILPDFURL',
|
|
|
hidden: true,
|
|
|
name: 'MAILPDFURL'
|
|
|
}, {
|
|
|
fieldLabel: 'SIGNPDFURL',
|
|
|
hidden: true,
|
|
|
name: 'SIGNPDFURL'
|
|
|
},{
|
|
|
fieldLabel: 'INSIGN',
|
|
|
id: "formINSIGN",
|
|
|
name: 'INSIGN', hidden: true,
|
|
|
value:false
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
|
|
|
this.comboxInfoClientContact,
|
|
|
, {
|
|
|
fieldLabel: '客户收件邮箱',
|
|
|
name: 'RECEIVEEMAIL'
|
|
|
}
|
|
|
, this.comboxSENDED
|
|
|
, this.comboxISCHECKOUT
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
|
|
|
//{
|
|
|
// fieldLabel: '客户收件邮箱',
|
|
|
// name: 'RECEIVEEMAIL'
|
|
|
//}
|
|
|
|
|
|
]
|
|
|
}]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
}); //end this.formHead
|
|
|
|
|
|
|
|
|
//按钮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: 'btnESave',
|
|
|
text: "保存",
|
|
|
iconCls: "btnsave",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('0');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
id: 'btnESaveAndClose',
|
|
|
text: "保存并关闭",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('1');
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
id: 'btnESaveAndNew',
|
|
|
text: "保存并新建",
|
|
|
handler: function (button, event) {
|
|
|
this.Save('2');
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "关闭",
|
|
|
handler: function (button, event) {
|
|
|
window.close();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "新建",
|
|
|
id: 'btnENew',
|
|
|
handler: function (button, event) {
|
|
|
this.LoadData('add', '');
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
|
|
|
//, '-', {
|
|
|
//text: "打印",
|
|
|
//iconCls: "btnprint",
|
|
|
//handler: function (button, event) {
|
|
|
// this.Print();
|
|
|
//},
|
|
|
//scope: this
|
|
|
//}
|
|
|
|
|
|
, '-', {
|
|
|
text: "生成签单条并发出",
|
|
|
iconCls: "btnprint",
|
|
|
id:"SendBtn",
|
|
|
handler: function (button, event) {
|
|
|
this.DoSend();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "执行签单",
|
|
|
iconCls: "btnprint",
|
|
|
handler: function (button, event) {
|
|
|
this.OpenWrite();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "查看已签单据",
|
|
|
iconCls: "btnreturn",
|
|
|
handler: function (button, event) {
|
|
|
this.OpenSign();
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}); //end 按钮Toolbar
|
|
|
|
|
|
//#region 签单条明细
|
|
|
|
|
|
|
|
|
////////////////
|
|
|
this.storeBodyList = Ext.create('Ext.data.Store', {
|
|
|
model: 'VWBillCheckOutDetailModel',
|
|
|
remoteSort: false,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/BillCheckOut/GetBodyList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//单据表表格
|
|
|
//this.cellEditingBody = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
// clicksToEdit: 1
|
|
|
//});
|
|
|
this.GridBodyCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
this.gridBodyList = new Ext.grid.GridPanel({
|
|
|
title: '签单条业务明细',
|
|
|
store: this.storeBodyList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
//layout: "border",
|
|
|
//anchor: '100% 50%',
|
|
|
split: true,
|
|
|
autoScroll: true,
|
|
|
//height: 240,
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [
|
|
|
//this.cellEditingBody
|
|
|
],
|
|
|
selModel: this.GridBodyCheckBoxModel,
|
|
|
selType: 'cellmodel',
|
|
|
tbar: [
|
|
|
{
|
|
|
text: '删除明细',
|
|
|
tooltip: '删除明细',
|
|
|
iconCls: "btndeletedetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onDelBodyClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: '刷新',
|
|
|
id: 'bodyrefresh',
|
|
|
tooltip: '刷新',
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.storeBodyList.load({ params: { GID: this.editRecord.get('GID') } });
|
|
|
},
|
|
|
scope: this
|
|
|
}],
|
|
|
columns: [
|
|
|
new Ext.grid.RowNumberer() ,
|
|
|
{
|
|
|
sortable: false,
|
|
|
dataIndex: 'GID',
|
|
|
header: '惟一编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'LINKGID',
|
|
|
header: '业务编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CHECKOUTNO',
|
|
|
header: '签单条编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '关联业务号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: '主提单号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'HBLNO',
|
|
|
header: '分提单号',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: 'ETD',
|
|
|
width: 90
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VESSEL',
|
|
|
header: '船名',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOYNO',
|
|
|
header: '航次',
|
|
|
width: 140
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
//#region 待添加业务明细
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'north',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxAddCustCode, this.comboxOpLb, {
|
|
|
fieldLabel: '编号检索',
|
|
|
name: 'CustomNo',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '从ETD',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ExpDateBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到ETD',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ExpDateEnd',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxSALE, {
|
|
|
xtype: 'button',
|
|
|
width: 30,
|
|
|
text: "",
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
var form = this.formSearch.getForm();
|
|
|
form.reset();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 30,
|
|
|
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
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxCustCode, {
|
|
|
fieldLabel: '会计期间',
|
|
|
xtype: 'monthfield',
|
|
|
name: 'ACCDATEFR',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '会计期间',
|
|
|
xtype: 'monthfield',
|
|
|
name: 'ACCDATETO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxINVSTATUS, this.comboxISADVANCEDPAY
|
|
|
, this.comboxSaleCompany
|
|
|
//, {
|
|
|
//fieldLabel: '发票号',
|
|
|
//name: 'InvNo',
|
|
|
//enableKeyEvents: true,
|
|
|
//listeners: {
|
|
|
// specialkey: function (field, e) {
|
|
|
// if (e.getKey() == e.ENTER) {
|
|
|
// _this.onRefreshClick();
|
|
|
// }
|
|
|
// }
|
|
|
//}
|
|
|
//}
|
|
|
|
|
|
, {
|
|
|
xtype: 'button',
|
|
|
width: 60,
|
|
|
text: "查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeAddOpseaeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: 50,
|
|
|
model: 'MsOpSeaeModel',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsOpSeae/GetDataList',
|
|
|
reader: {
|
|
|
id: 'BSNO',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.GridBodyCheckBoxModel2 = Ext.create('Ext.selection.CheckboxModel');
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: '每页记录数',
|
|
|
labelAlign: 'right',
|
|
|
value: 50,
|
|
|
maxValue: 1000,
|
|
|
width: 180,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.initgirdbilladdcolums = [{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: '',
|
|
|
header: '',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BillFeeStatus',
|
|
|
header: '整票状态', //'整票状态',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
if (value == '0') {
|
|
|
return "未提交";
|
|
|
} else if (value == '1') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
return "整票提交";
|
|
|
} else if (value == '2') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
return "审核通过";
|
|
|
} else if (value == '4') {
|
|
|
meta.tdCls = 'feestatus_nopass';
|
|
|
return "整票驳回";
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BSNO',
|
|
|
header: Zi.LAN.BSNO2, //'业务编号',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: Zi.LAN.CUSTNO, //'委托编号',
|
|
|
width: 120,
|
|
|
filter: true,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
meta.tdCls = 'mblno';
|
|
|
|
|
|
btnurl = getGridCopyButton(value);
|
|
|
|
|
|
return btnurl + value;
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ORDERNO',
|
|
|
header: Zi.LAN.ORDERNO, //'订舱编号',
|
|
|
width: 120,
|
|
|
filter: true
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ORDERTYPE',
|
|
|
header: Zi.LAN.ORDERTYPE, //'订舱方式',
|
|
|
width: 120,
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['操作录入', '销售订舱']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BSSTATUSREF',
|
|
|
header: Zi.LAN.BSSTATUSREF, //'业务锁定',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['锁定', '未锁定']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'FEESTATUSREF',
|
|
|
header: Zi.LAN.FEESTATUSREF, //'费用锁定',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '锁定') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['锁定', '未锁定']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRFEESTATUS',
|
|
|
header: Zi.LAN.DRFEESTATUS, //'应收费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '驳回提交') {
|
|
|
meta.tdCls = 'feestatus_nopass';
|
|
|
}
|
|
|
return value;
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['录入状态', '提交审核', '部分结算',
|
|
|
'未录入', '部分审核', '部分提交', '审核通过']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CRFEESTATUS',
|
|
|
header: Zi.LAN.CRFEESTATUS, //'应付费用',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '审核通过') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '录入状态') {
|
|
|
|
|
|
} else if (value == '提交审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '结算完毕') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '未录入') {
|
|
|
} else if (value == '部分结算') {
|
|
|
meta.tdCls = 'feestatus_settle';
|
|
|
} else if (value == '部分审核') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '部分提交') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
} else if (value == '驳回提交') {
|
|
|
meta.tdCls = 'feestatus_nopass';
|
|
|
}
|
|
|
return value;
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['录入状态', '提交审核', '部分结算',
|
|
|
'未录入', '部分审核', '部分提交', '审核通过']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRINVSTATUS',
|
|
|
header: Zi.LAN.DRINVSTATUS, //'应收开票',
|
|
|
align: 'center',
|
|
|
// xtype: 'actioncolumn',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsRptChInvTotal/BsView?handle=check&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
if (value == '已开票') {
|
|
|
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">已开票</a>'
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分开票') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
|
|
|
}
|
|
|
return value;
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['已开票', '部分开票', '未开票']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CRINVSTATUS',
|
|
|
header: Zi.LAN.CRINVSTATUS, //'应收开票',
|
|
|
align: 'center',
|
|
|
// xtype: 'actioncolumn',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsRptChInvTotal/BsCrView?handle=check&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
if (value == '已开票') {
|
|
|
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">已开票</a>'
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分开票') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
|
|
|
}
|
|
|
return value;
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['已开票', '部分开票', '未开票']
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DRDUISTATUS',
|
|
|
header: Zi.LAN.DRDUISTATUS, //'应收对账',
|
|
|
align: 'center',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
if (value == '已对账') {
|
|
|
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">已开票</a>'
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '部分对账') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
// value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">部分开票</a>'
|
|
|
}
|
|
|
return value;
|
|
|
},
|
|
|
filter: {
|
|
|
type: 'list',
|
|
|
options: ['已对账', '部分对账', '未对账']
|
|
|
}
|
|
|
}
|
|
|
,
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'OPSTATUS',
|
|
|
header: Zi.LAN.OPSTATUS, //'业务状态',
|
|
|
width: 60,
|
|
|
renderer: function (value, metadata, record, rowIndex) {
|
|
|
|
|
|
metadata.style = "background-color:" + record.data.COLOR;
|
|
|
return value;
|
|
|
},
|
|
|
filter: true
|
|
|
}
|
|
|
// ,
|
|
|
// {
|
|
|
|
|
|
// text: Zi.LAN.MANIFESTSTATUS, //'舱单状态',
|
|
|
// align: 'center',
|
|
|
// width: 130,
|
|
|
// menuDisabled: true,
|
|
|
// sortable: false,
|
|
|
// dataIndex: 'MANIFESTSTATUS',
|
|
|
// icon: '../../../../TruckMng/Content/Images/search.png',
|
|
|
// xtype: 'actiontextcolumn',
|
|
|
// handler: function (grid, rowIndex, colIndex) {
|
|
|
// var rec = grid.getStore().getAt(rowIndex);
|
|
|
// // alert(rec.get('BSNO'));
|
|
|
// _this.onCustomStatusClick(rec);
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
,
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BLTYPE',
|
|
|
header: Zi.LAN.BLTYPE, //'装运方式',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ETD',//'ETD'
|
|
|
header: Zi.LAN.ETD, //'开船日期',
|
|
|
width: 80,
|
|
|
filter: {
|
|
|
type: 'date',
|
|
|
dataIndex: 'ETD'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: Zi.LAN.MBLNO, //'主提单号',
|
|
|
width: 120,
|
|
|
filter: {
|
|
|
type: 'string',
|
|
|
dataIndex: 'MBLNO'
|
|
|
},
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
meta.tdCls = 'mblno';
|
|
|
|
|
|
btnurl = getGridCopyButton(value);
|
|
|
|
|
|
return btnurl + value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: Zi.LAN.CUSTOMERNAME, //'委托单位',
|
|
|
width: 120,
|
|
|
filter: {
|
|
|
type: 'string',
|
|
|
dataIndex: 'CUSTOMERNAME'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ETA',
|
|
|
header: Zi.LAN.ETA, //'预抵日期',
|
|
|
width: 80,
|
|
|
filter: {
|
|
|
type: 'date',
|
|
|
dataIndex: 'ETA'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: Zi.LAN.BSDATE, //'修改日期',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: Zi.LAN.GOODSNAME, //'品名',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'PKGS',
|
|
|
header: Zi.LAN.PKGS, //'件数',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'KGS',
|
|
|
header: Zi.LAN.KGS2, //'毛重',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CBM',
|
|
|
header: Zi.LAN.CBM2, //'尺码',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTRTOTAL',
|
|
|
header: Zi.LAN.CNTRTOTAL2, //'集装箱',
|
|
|
width: 80
|
|
|
},
|
|
|
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'HBLNO',
|
|
|
header: Zi.LAN.HBLNO, //'分提单号',
|
|
|
width: 120,
|
|
|
filter: {
|
|
|
type: 'string',
|
|
|
dataIndex: 'HBLNO'
|
|
|
},
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
meta.tdCls = 'mblno';
|
|
|
|
|
|
btnurl = getGridCopyButton(value);
|
|
|
|
|
|
return btnurl + value;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ACCDATE',
|
|
|
header: Zi.LAN.ACCDATE, //'会计期间',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BSSOURCE',
|
|
|
header: Zi.LAN.BSSOURCE, //'业务来源',
|
|
|
width: 80,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'BSSOURCEDETAIL',
|
|
|
header: Zi.LAN.BSSOURCEDETAIL, //'来源明细',
|
|
|
width: 80,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'INPUTBY',
|
|
|
header: Zi.LAN.INPUTBY2, //'录入人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CREATETIME',
|
|
|
header: Zi.LAN.CREATETIME2, //'创建时间',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'OP',
|
|
|
header: Zi.LAN.OP, //'操作员',
|
|
|
width: 80,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'SALE',
|
|
|
header: Zi.LAN.SALE, //'揽货人',
|
|
|
width: 80,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'VESSEL',
|
|
|
header: Zi.LAN.VESSEL, //'船名',
|
|
|
width: 100,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'VOYNO',
|
|
|
header: Zi.LAN.VOYNO, //'航次',
|
|
|
width: 60,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: Zi.LAN.PORTLOAD, //'装货港',
|
|
|
width: 100,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
header: Zi.LAN.PORTDISCHARGE, //'卸货港',
|
|
|
width: 100,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DESTINATION',
|
|
|
header: Zi.LAN.DESTINATION, //'目的地',
|
|
|
width: 100,
|
|
|
filter: true
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR1',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR1, //'箱型1',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR2',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR2, //'箱型2',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR3',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR3, //'箱型3',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR4',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR4, //'箱型4',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR5',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR5, //'箱型5',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR6',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR6, //'箱型6',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR7',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR7, //'箱型7',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR8',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR8, //'箱型8',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR9',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR9, //'箱型9',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CNTR10',
|
|
|
hidden: true,
|
|
|
header: Zi.LAN.CNTR10, //'箱型10',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'OTCNTR',
|
|
|
header: Zi.LAN.OTCNTR, //'其他箱型',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'TEU',
|
|
|
header: Zi.LAN.TEU, //'箱TEU',
|
|
|
width: 40
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CUSTOMSER',
|
|
|
header: Zi.LAN.CUSTOMSER, //'报关行',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'KINDPKGS',
|
|
|
header: Zi.LAN.KINDPKGS, //'件数包装',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: Zi.LAN.CARRIER, //'船公司',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'TRUCKER',
|
|
|
header: Zi.LAN.TRUCKER, //'承运车队',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'TRUCKSTATUS',
|
|
|
header: Zi.LAN.TRUCKSTATUS, //'承运车队',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'LANE',
|
|
|
header: Zi.LAN.LANE, //'航线',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'SERVICE',
|
|
|
header: Zi.LAN.SERVICE, //'航线',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'AGENTID',
|
|
|
header: Zi.LAN.AGENTID, //'代理',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'FORWARDER',
|
|
|
header: Zi.LAN.FORWARDER, //'订舱代理',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'PORTDISCHARGEID',
|
|
|
header: Zi.LAN.PORTDISCHARGEID, //'卸港代码',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'YARD',
|
|
|
header: Zi.LAN.YARD, //'场站',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'SERVICECONTRACTNO',
|
|
|
header: Zi.LAN.SERVICECONTRACTNO, //'服务合同号',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CUSTSERVICE',
|
|
|
header: Zi.LAN.CUSTSERVICE, //'客服',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'FRCUSTSERVICE',
|
|
|
header: Zi.LAN.FRCUSTSERVICE, //'客服',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DOC',
|
|
|
header: Zi.LAN.DOC, //'单证',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'VOUNO',
|
|
|
header: Zi.LAN.VOUNO, //'凭证号',
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'IRCODE',
|
|
|
header: Zi.LAN.IRCODE, //'凭证号',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISPRINTPR',
|
|
|
header: Zi.LAN.ISPRINTPR, //'打印核算单',
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISFUMIGATION',
|
|
|
header: Zi.LAN.ISFUMIGATION, //'服务项目1',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISSTORAGE',
|
|
|
header: Zi.LAN.ISSTORAGE, //'服务项目2',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISLAND',
|
|
|
header: Zi.LAN.ISLAND, //'服务项目3',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCUSTOMS',
|
|
|
header: Zi.LAN.ISCUSTOMS, //'服务项目4',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISINSPECTION',
|
|
|
header: Zi.LAN.ISINSPECTION, //'服务项目5',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISBOOKING',
|
|
|
header: Zi.LAN.ISBOOKING, //'服务项目6',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISAGENT',
|
|
|
header: Zi.LAN.ISAGENT, //'服务项目7',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISHBLNO',
|
|
|
header: Zi.LAN.ISHBLNO, //'服务项目8',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICE9',
|
|
|
header: Zi.LAN.SERVICE9, //'服务项目9',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICE10',
|
|
|
header: Zi.LAN.SERVICE10, //'服务项目10',
|
|
|
hidden: true,
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCONTAINERSOC',
|
|
|
header: Zi.LAN.ISCONTAINERSOC, //'服务项目10',
|
|
|
width: 100,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == true || value == 'true' || value == '1')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'SHIPAGENCY',
|
|
|
header: Zi.LAN.SHIPAGENCY, //'船代',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'SHIPPER',
|
|
|
header: Zi.LAN.SHIPPER, //'SHIPPER',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CONSIGNEE',
|
|
|
header: Zi.LAN.CONSIGNEE, //'CONSIGNEE',
|
|
|
width: 100,
|
|
|
filter: {
|
|
|
type: 'string',
|
|
|
dataIndex: 'CONSIGNEE'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'NOTIFYPARTY',
|
|
|
header: Zi.LAN.NOTIFYPARTY, //'NOTIFYPARTY',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'SHIPPERID',
|
|
|
header: Zi.LAN.SHIPPERNAME, //'SHIPPER',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'DESCRIPTION',
|
|
|
header: Zi.LAN.DESCRIPTION, //'SHIPPER',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CONTRACTNO',
|
|
|
header: Zi.LAN.CONTRACTNO, //'运费协议号',
|
|
|
width: 100,
|
|
|
filter: {
|
|
|
type: 'string',
|
|
|
dataIndex: 'CONTRACTNO'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'ISSUETYPE',
|
|
|
header: Zi.LAN.ISSUETYPE, //'签单方式',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'OPERATOR',
|
|
|
header: Zi.LAN.OPERATOR2, //'委托单位联系人',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CLOSINGDATE',
|
|
|
header: Zi.LAN.CLOSINGDATE, //'截港日期',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: 'CLOSEDOCDATE',
|
|
|
header: Zi.LAN.CLOSEDOCDATE, //'截单日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AMEND',
|
|
|
header: Zi.LAN.AMEND, //'更改单',
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value != '0')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISAPPLY',
|
|
|
header: Zi.LAN.ISAPPLY, //'是否生成报关',
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value != '0')
|
|
|
return '√';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'STLNAME',
|
|
|
header: Zi.LAN.STLNAME, //'结算方式',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'STLDATE',
|
|
|
header: Zi.LAN.STLDATE, //'结算日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
dataIndex: 'BLFRT',
|
|
|
header: Zi.LAN.BLFRT, //'付费方式',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'APPLYNO',
|
|
|
header: Zi.LAN.APPLYNO, //'申请放箱号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'CARGOID',
|
|
|
header: '货物标示', //'货物标识',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'BLISSUESTATUS',
|
|
|
header: '提单签发状态', //'货物标识',
|
|
|
width: 120,
|
|
|
renderer: function (value, meta) {
|
|
|
|
|
|
if (value == '提单签出') {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else if (value == '提单签入') {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
return value;
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'INVNO',
|
|
|
header: Zi.LAN.INVNO, //'货物标识',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'REMARK',
|
|
|
header: Zi.LAN.REMARK, //'货物标识',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'OPERATORFAX',
|
|
|
header: Zi.LAN.OTREMARK, //'其他备注',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'PLACERECEIPT',
|
|
|
header: Zi.LAN.PLACERECEIPTID, //'货物标识',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'SALECORP',
|
|
|
header: Zi.LAN.SALECOMPANY, //'货物标识',
|
|
|
width: 120
|
|
|
}, {
|
|
|
dataIndex: 'DCLASS',
|
|
|
header: Zi.LAN.DCLASS, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'DUNNO',
|
|
|
header: Zi.LAN.DUNNO, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'TEMPSET',
|
|
|
header: Zi.LAN.TEMPSET, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'ATD',
|
|
|
header: Zi.LAN.ATD, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'SALEDEPT',
|
|
|
header: Zi.LAN.SALEDEPT2, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'CUSTOMNO',
|
|
|
header: Zi.LAN.CUSTOMNO, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'TRANSREMARK',
|
|
|
header: Zi.LAN.TRANSREMARK, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'TRANSPORT',
|
|
|
header: Zi.LAN.TRANSPORT, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'ENTERP',
|
|
|
header: Zi.LAN.ENTERP, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'DELIVERYDATE',
|
|
|
header: Zi.LAN.DELIVERYDATE, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'PLACEDELIVERY',
|
|
|
header: Zi.LAN.PLACEDELIVERY, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'ISSUEPLACE',
|
|
|
header: Zi.LAN.ISSUEPLACEID, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'FINANCIALSTAFF',
|
|
|
header: Zi.LAN.FINANCIALSTAFF, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'FINANCIALSTAFFFAX',
|
|
|
header: Zi.LAN.INSURANCEOP, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'ISSUEDATE',
|
|
|
header: Zi.LAN.ISSUEDATE, //'货物标识',
|
|
|
width: 70
|
|
|
}, {
|
|
|
dataIndex: 'ISCANCEL',
|
|
|
header: '退舱', //'退舱',
|
|
|
width: 60,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else if (value == '2')
|
|
|
return '申请退舱';
|
|
|
else if (value == '4')
|
|
|
return '驳回申请';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'ISTUI',
|
|
|
header: '推航次', //'推航次',
|
|
|
width: 70,
|
|
|
renderer: function (value, meta, record) {
|
|
|
if (value == '1')
|
|
|
return '√';
|
|
|
else if (value == '2')
|
|
|
return '申请推航次';
|
|
|
else if (value == '4')
|
|
|
return '驳回申请';
|
|
|
else
|
|
|
return '';
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'TRUCKCTNSTATUS',
|
|
|
text: Zi.LAN.TRUCKCTNSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.TRUCKCTNSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.TRUCKCTNSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'CTNRETURNSTATUS',
|
|
|
text: Zi.LAN.CTNRETURNSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.CTNRETURNSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.CTNRETURNSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'HGYDSTATUS',
|
|
|
text: Zi.LAN.HGYDSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.HGYDSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.HGYDSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'CUSTOMSSTATUS',
|
|
|
text: Zi.LAN.CUSTOMSSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.CUSTOMSSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.CUSTOMSSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'PORTSTATUS',
|
|
|
text: Zi.LAN.PORTSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.PORTSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.PORTSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'EXPSTATUS',
|
|
|
text: Zi.LAN.EXPSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.EXPSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.EXPSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'ATASTATUS',
|
|
|
text: Zi.LAN.ATASTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.ATASTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.ATASTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'STCSSTATUS',
|
|
|
text: Zi.LAN.STCSSTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.STCSSTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.STCSSTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: false,
|
|
|
dataIndex: 'RCVESTATUS',
|
|
|
text: Zi.LAN.RCVESTATUS,
|
|
|
width: 56,
|
|
|
renderer: function (value, meta, record) {
|
|
|
var openSet = "height=230, width=750, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 700) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
openUrl = "../../MvcShipping/MsOpBill/CtnStatusView?handle=check&mblno=" + record.data.MBLNO + "&bsno=" + record.data.BSNO;
|
|
|
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
|
|
|
if (record.data.RCVESTATUS == 1) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:green;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else if (record.data.RCVESTATUS == 2) {
|
|
|
return '<a style="text-decoration:none;" href="' + openUrl + '" onclick="' + winstr + ';return false"><span style=\"color:yellow;font-size:30px;text-align:center\"> ●</span></a>'
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
];
|
|
|
|
|
|
this.girdbilladdcolums = this.initgirdbilladdcolums;
|
|
|
|
|
|
this.gridAddOpseaeList = new Ext.grid.GridPanel({
|
|
|
title: '待添加业务',
|
|
|
store: this.storeAddOpseaeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
layout: "border",
|
|
|
//height: 240,
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [
|
|
|
//this.cellEditingBody
|
|
|
],
|
|
|
selModel: this.GridBodyCheckBoxModel2,
|
|
|
selType: 'cellmodel',
|
|
|
tbar: [
|
|
|
{
|
|
|
text: '添加明细',
|
|
|
tooltip: '添加明细',
|
|
|
id: 'AddBill',
|
|
|
iconCls: "btnadddetail",
|
|
|
handler: function (button, event) {
|
|
|
this.onAddClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: '刷新',
|
|
|
id: 'addlistrefresh',
|
|
|
tooltip: '刷新',
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.storeAddOpseaeList.load();
|
|
|
},
|
|
|
scope: this
|
|
|
}],
|
|
|
columns: this.girdbilladdcolums,
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeAddOpseaeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: Zi.LAN.displayMsg, //'当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: Zi.LAN.emptyMsg//'没有数据'
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
this.girdbilladdcolums = DsTruck.GetGridPanel(USERID, this.Add_formname, this.girdbilladdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
// this.girdcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
this.gridAddOpseaeList.reconfigure(this.storeAddOpseaeList, this.girdbilladdcolums);
|
|
|
this.gridAddOpseaeList.columns[1] = new Ext.grid.RowNumberer();
|
|
|
////////////////////////////////////////////////
|
|
|
|
|
|
this.storeAddOpseaeList.on('beforeload', function (store) {
|
|
|
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
this.paneladd = new Ext.Panel({
|
|
|
title: '添加业务明细',
|
|
|
layout: "border",
|
|
|
id:"paneladd",
|
|
|
autoScroll: true,
|
|
|
collapsed: false,
|
|
|
collapsible: true,
|
|
|
//region: 'center',
|
|
|
region: 'south',
|
|
|
//layout: "border",
|
|
|
//anchor: '100% 50%',
|
|
|
height: 420,
|
|
|
split: true,
|
|
|
items: [
|
|
|
this.formSearch,
|
|
|
this.gridAddOpseaeList
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.bodypanel = new Ext.Panel
|
|
|
({
|
|
|
activeTab: 0,
|
|
|
autoWidth: true,
|
|
|
border: false,
|
|
|
frame: false,
|
|
|
|
|
|
layout: "border",
|
|
|
|
|
|
region: 'center',
|
|
|
|
|
|
id: "bodypanel",
|
|
|
enableTabScroll: true,
|
|
|
split: true,
|
|
|
autoScroll: true,
|
|
|
items:
|
|
|
[
|
|
|
this.gridBodyList,
|
|
|
this.paneladd
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelBtn, this.formHead, this.bodypanel]
|
|
|
});
|
|
|
|
|
|
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
|
|
|
//});
|
|
|
|
|
|
//Ext.Ajax.request({
|
|
|
// waitMsg: '',
|
|
|
// url: '/MvcShipping/MsSysParamSet/GetData',
|
|
|
// params: {
|
|
|
// condition: "PARAMNAME='SALEORDERDEPTBYOP'"
|
|
|
// },
|
|
|
// callback: function (options, success, response) {
|
|
|
// if (success) {
|
|
|
// var result = Ext.JSON.decode(response.responseText);
|
|
|
// if (result.Success != true) {
|
|
|
|
|
|
// } else {
|
|
|
// var data = result.data;
|
|
|
// if (data.PARAMVALUE == '1') {
|
|
|
// this.SALEORDERDEPTBYOP = 1;
|
|
|
// } else {
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
// } else {
|
|
|
|
|
|
// }
|
|
|
// },
|
|
|
// scope: this
|
|
|
//});
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
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.LoadPeriod(this.opStatus);
|
|
|
//if (this.opStatus == 'copyaddfee') {
|
|
|
// this.opStatus = 'copyadd';
|
|
|
// this.copyfee = true;
|
|
|
//}
|
|
|
|
|
|
//
|
|
|
if (this.opStatus == 'edit') {
|
|
|
|
|
|
condition = " GID='" + this.editRecord.get('GID') + "'";
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
|
|
|
} else if (this.opStatus == 'add') {
|
|
|
this.LoadDefValue();
|
|
|
}
|
|
|
|
|
|
//if (this.opStatus == 'copyadd') {
|
|
|
// this.LoadCopyData(this.editRecord.get('BSNO'), this.copyfee);
|
|
|
//} else {
|
|
|
// if (this.opStatus == 'edit')
|
|
|
// this.LoadData(this.opStatus, condition);
|
|
|
//}
|
|
|
|
|
|
// this.storecodeservice.load({ params: { condition: "OPTYPE='7'" },
|
|
|
// callback: function (r, options, success) {
|
|
|
// if (success) {
|
|
|
// if (r.length != 0) {
|
|
|
|
|
|
// var checkboxitems = "";
|
|
|
// checkboxitems = "[";
|
|
|
// for (i = 0; i < this.storecodeservice.getCount(); i += 1) {
|
|
|
// var memberyf = this.storecodeservice.getAt(i);
|
|
|
// if (i == 0) {
|
|
|
// var checkboxSingleItem = "{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:'1',name:'Is" + memberyf.data.OPField + "',id:'Is" + memberyf.data.OPField + "'";
|
|
|
// checkboxSingleItem += "}";
|
|
|
// } else {
|
|
|
// var checkboxSingleItem = ",{boxLabel:'" + memberyf.data.SERVICENAME + "',inputValue:'1',name:'Is" + memberyf.data.OPField + "',id:'Is" + memberyf.data.OPField + "'";
|
|
|
// checkboxSingleItem += "}";
|
|
|
// }
|
|
|
// checkboxitems += checkboxSingleItem;
|
|
|
// };
|
|
|
// checkboxitems += "]";
|
|
|
|
|
|
//// _this.myCheckboxGroup = new Ext.form.CheckboxGroup({
|
|
|
////// id: 'myGroup',
|
|
|
//// xtype: 'checkboxgroup',
|
|
|
//// fieldLabel: '服务项目',
|
|
|
//// columns: 8,
|
|
|
//// items: eval(checkboxitems)
|
|
|
//// });
|
|
|
//// _this.formHead.add(_this.myCheckboxGroup);
|
|
|
//// _this.formHead.doLayout();
|
|
|
|
|
|
// }
|
|
|
// if (this.opStatus == 'copyadd') {
|
|
|
// this.LoadCopyData(this.editRecord.get('BSNO'),this.copyfee);
|
|
|
// } else {
|
|
|
// if (this.opStatus == 'edit')
|
|
|
// this.LoadData(this.opStatus, condition);
|
|
|
// }
|
|
|
// //if (this.opStatus == 'add') {
|
|
|
// // this.LoadPeriod('add');
|
|
|
// //}
|
|
|
|
|
|
// }
|
|
|
// },
|
|
|
// scope: this
|
|
|
// });
|
|
|
|
|
|
|
|
|
}, //end InitData
|
|
|
|
|
|
LoadData: function (opstatus, condition) {
|
|
|
this.bodyDel = [];
|
|
|
this.opStatus = opstatus;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/GetData',
|
|
|
params: {
|
|
|
handle: opstatus,
|
|
|
condition: condition
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: '提示',
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
data = result.data;
|
|
|
|
|
|
//处理日期
|
|
|
data = this.SetHeadDate(data);
|
|
|
|
|
|
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues(data);
|
|
|
//this.formEdit.getForm().reset();
|
|
|
//this.formEdit.getForm().setValues(data);
|
|
|
this.GetEditStatus();
|
|
|
if (this.opStatus == 'add') {
|
|
|
//var basicForm = this.formHead.getForm();
|
|
|
|
|
|
}
|
|
|
//if (this.opStatus == 'copyadd')
|
|
|
// this.CopyNewData(data);
|
|
|
var CUSTOMERNAME = data.CUSTOMERNAME;
|
|
|
|
|
|
if (CUSTOMERNAME != '') {
|
|
|
var s = " LINKID in (select gid from [info_client] where SHORTNAME='" + CUSTOMERNAME + "')";
|
|
|
this.storeInfoClientContact.load({ params: { condition: s } });
|
|
|
}
|
|
|
|
|
|
if (data.SENDED == true) {
|
|
|
this.paneladd.collapse();
|
|
|
Ext.getCmp("paneladd").collapse();
|
|
|
|
|
|
|
|
|
} else {
|
|
|
this.paneladd.expand();
|
|
|
Ext.getCmp("paneladd").expand();
|
|
|
}
|
|
|
|
|
|
|
|
|
this.storeBodyList.load({ params: { GID: data.GID } });
|
|
|
|
|
|
//this.setCanEdit();
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
//var billno = '*';
|
|
|
//var gid = '*';
|
|
|
//if (this.opStatus == 'edit') {
|
|
|
// billno = this.editRecord.get('BSNO');
|
|
|
//}
|
|
|
|
|
|
|
|
|
},
|
|
|
LoadCopyData: function (bsno, CopyFee,fen=false) {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcShipping/MsOp_SuperVision_Truck/GetCopyData',
|
|
|
params: {
|
|
|
condition: "BSNO='" + bsno + "'",
|
|
|
copyfee: CopyFee
|
|
|
},
|
|
|
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;
|
|
|
}
|
|
|
|
|
|
data = result.data;
|
|
|
|
|
|
if (fen) {
|
|
|
data.BILLTYPE = "分单";
|
|
|
}
|
|
|
|
|
|
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues(data);
|
|
|
//this.formEdit.getForm().reset();
|
|
|
//this.formEdit.getForm().setValues(data);
|
|
|
|
|
|
this.opStatus = 'add';
|
|
|
|
|
|
var arrNewRecords = this.storePLList.add(data);
|
|
|
this.editRecord = arrNewRecords[0];
|
|
|
this.Editdata = data;
|
|
|
this.GetEditStatus();
|
|
|
this.LoadPeriod(this.opStatus);
|
|
|
this.panelFee.EditRecord = this.editRecord;
|
|
|
this.panelFee.strBSNO = this.editRecord.get('BSNO');
|
|
|
this.panelFee.strMBLNO = this.editRecord.get('MBLNO');
|
|
|
this.panelFee.StoreUnit.load({ params: { BSNO: data.BSNO, bstype: "op_other" } });
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "op_other", BSNO: data.BSNO } });
|
|
|
|
|
|
this.panelFee.storeDrChFee.load({ params: { billno: data.BSNO, type: 1, optype: "op_other" } });
|
|
|
this.panelFee.storeCrChFee.load({ params: { billno: data.BSNO, type: 2, optype: "op_other" } });
|
|
|
|
|
|
this.panelFee.storeBodySum.load({
|
|
|
params: { bsno: data.BSNO, optype: "op_other" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
_thisfee.setTotalHead();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.panelFee.storeChFeeGain.load({ params: { bsno: data.BSNO, optype: "op_other" } });
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
CopyNewData: function () {
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
this.opStatus = 'add';
|
|
|
//basicForm.findField('BSNO').setDisabled(false);
|
|
|
var BSNO = NewGuid();
|
|
|
var field = basicForm.findField('BSNO');
|
|
|
field.setValue(BSNO);
|
|
|
//basicForm.findField('BSNO').setDisabled(true);
|
|
|
field = basicForm.findField('CUSTNO');
|
|
|
field.setValue('');
|
|
|
field = basicForm.findField('OP');
|
|
|
field.setValue(SHOWNAME);
|
|
|
field = basicForm.findField('CUSTSERVICE');
|
|
|
field.setValue(SHOWNAME);
|
|
|
field = basicForm.findField('SALE');
|
|
|
field.setValue(SHOWNAME);
|
|
|
|
|
|
var field = basicForm.findField('BSSTATUSREF');
|
|
|
field.setValue('未锁定');
|
|
|
var field = basicForm.findField('FEESTATUSREF');
|
|
|
field.setValue('未锁定');
|
|
|
|
|
|
var myDate = new Date();
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m-d');
|
|
|
field = basicForm.findField('BSDATE');
|
|
|
field.setValue(mydatestr);
|
|
|
var mydatestr = Ext.util.Format.date(myDate, 'Y-m');
|
|
|
field = basicForm.findField('ACCDATE');
|
|
|
field.setValue(mydatestr);
|
|
|
|
|
|
this.GetEditStatus();
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
LoadPeriod: function (opstatus) {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/Account/ChMonthClose/GetNowPeriod',
|
|
|
params: {
|
|
|
condition: ''
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
return;
|
|
|
}
|
|
|
data = result.data;
|
|
|
this.MsPeriod = data;
|
|
|
this.LoadPeriodStatus(opstatus);
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
LoadPeriodStatus: function (opstatus) {
|
|
|
|
|
|
//var ETD = this.formEdit.getForm().findField('ETD').getRawValue();
|
|
|
//var ACCDATE = this.formHead.getForm().findField('ACCDATE').getValue();
|
|
|
|
|
|
//if (ETD == '') {
|
|
|
// this.formEdit.getForm().findField('ETD').setMinValue(this.MsPeriod.FDAY);
|
|
|
// this.formEdit.getForm().findField('ETD').setReadOnly(false);
|
|
|
//} else {
|
|
|
// var oDate1 = new Date(ETD);
|
|
|
// var oDate2 = new Date(this.MsPeriod.FDAY);
|
|
|
// if (oDate1.getTime() >= oDate2.getTime()) {
|
|
|
// this.formEdit.getForm().findField('ETD').setMinValue(this.MsPeriod.FDAY);
|
|
|
// this.formEdit.getForm().findField('ETD').setReadOnly(false);
|
|
|
// } else {
|
|
|
// if (opstatus == 'add' || opstatus == 'copyadd') {
|
|
|
// this.formEdit.getForm().findField('ETD').setValue(this.MsPeriod.FDAY);
|
|
|
// this.formEdit.getForm().findField('ETD').setMinValue(this.MsPeriod.FDAY);
|
|
|
// this.formEdit.getForm().findField('ETD').setReadOnly(false);
|
|
|
// }
|
|
|
// else {
|
|
|
// this.formEdit.getForm().findField('ETD').setMinValue('');
|
|
|
// this.formEdit.getForm().findField('ETD').setReadOnly(true);
|
|
|
// }
|
|
|
// }
|
|
|
//}
|
|
|
//var oDate1 = new Date(ACCDATE + '-01');
|
|
|
//var oDate2 = new Date(this.MsPeriod.PERIOD + '-01');
|
|
|
//if (oDate1.getTime() >= oDate2.getTime()) {
|
|
|
// this.formHead.getForm().findField('ACCDATE').setMinValue(this.MsPeriod.PERIOD);
|
|
|
// this.formHead.getForm().findField('ACCDATE').setReadOnly(false);
|
|
|
//} else {
|
|
|
// if (opstatus == 'add' || opstatus == 'copyadd') {
|
|
|
// this.formHead.getForm().findField('ACCDATE').setMinValue(this.MsPeriod.PERIOD);
|
|
|
// this.formHead.getForm().findField('ACCDATE').setValue(this.MsPeriod.PERIOD);
|
|
|
// this.formHead.getForm().findField('ACCDATE').setReadOnly(false);
|
|
|
// }
|
|
|
// else {
|
|
|
// this.formHead.getForm().findField('ACCDATE').setMinValue('');
|
|
|
// this.formHead.getForm().findField('ACCDATE').setReadOnly(true);
|
|
|
// }
|
|
|
//}
|
|
|
},
|
|
|
|
|
|
// end LoadDate
|
|
|
|
|
|
Save: function (type) {
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
if (!basicForm.isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var data = this.formHead.getForm().getValues(false, false, false);
|
|
|
|
|
|
//bodyDatas = [];
|
|
|
//for (i = 0; i < this.storeBodyList.getCount(); i += 1) {
|
|
|
// var memberyf = this.storeBodyList.getAt(i);
|
|
|
// bodyDatas.push(memberyf);
|
|
|
//}
|
|
|
|
|
|
//var jsonBody = ConvertRecordsToJson(bodyDatas);
|
|
|
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在保存数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/Save',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
opstatus: this.opStatus,
|
|
|
data: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnData = jsonresult.Data;
|
|
|
|
|
|
returnData = this.SetHeadDate(returnData);
|
|
|
|
|
|
this.formHead.getForm().reset();
|
|
|
this.formHead.getForm().setValues(returnData);
|
|
|
//this.formEdit.getForm().reset();
|
|
|
//this.formEdit.getForm().setValues(returnData);
|
|
|
|
|
|
if (this.opStatus == 'add') {
|
|
|
var arrNewRecords = this.StoreList.add(returnData);
|
|
|
this.editRecord = arrNewRecords[0];
|
|
|
}
|
|
|
else if (this.opStatus == 'edit') {
|
|
|
var editp = Ext.create('BillCheckOutModel', returnData);
|
|
|
this.editRecord.fields.each(function (field) {
|
|
|
if (field.persist) {
|
|
|
name = field.name;
|
|
|
if (name != 'GID')
|
|
|
this.editRecord.set(name, editp.get(name));
|
|
|
}
|
|
|
}, this);
|
|
|
this.editRecord.commit();
|
|
|
}
|
|
|
if (type == '0') {
|
|
|
this.opStatus = 'edit';
|
|
|
|
|
|
this.storeBodyList.load({ params: { GID: data.GID } });
|
|
|
} else if (type == '1') {
|
|
|
this.opStatus = 'edit';
|
|
|
window.close();
|
|
|
} else if (type == '2') {
|
|
|
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
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}, //end save
|
|
|
|
|
|
|
|
|
//#region 清空委托编号
|
|
|
ClearCustNo: function () {
|
|
|
var CUSTNO = this.formHead.getForm().findField('CUSTNO').getValue();
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询委托编号状态...', //'正在查询委托编号状态...',
|
|
|
url: '/MvcShipping/MsSysBillNoSet/DeleteBsNo',
|
|
|
params: {
|
|
|
custno: CUSTNO
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
|
|
|
} else {
|
|
|
this.formHead.getForm().findField('CUSTNO').setValue('');
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('服务器响应出错...', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
GetEditStatus: function () {
|
|
|
var canedit = false;
|
|
|
var ISCHECKOUT = this.formHead.getForm().findField('ISCHECKOUT').getValue();
|
|
|
|
|
|
_this = this;
|
|
|
if (ISCHECKOUT == "true") {
|
|
|
canedit = false;
|
|
|
this.setSaveBtnStatus(canedit);
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
GetFeeCustNoStatus: function () {
|
|
|
var BSNO = this.formHead.getForm().findField('BSNO').getValue();
|
|
|
var custno = _this.formHead.getForm().findField('CUSTNO');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetFeeCustNoEnable',
|
|
|
params: {
|
|
|
bsno: BSNO,
|
|
|
custno: custno
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success == true) {
|
|
|
custno.setReadOnly(true);
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
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 headfield = this.formHead.getForm().findField(member.data.FIELDNAME);
|
|
|
if (headfield != NaN && headfield != null)
|
|
|
headfield.setValue(member.data.DEFVALUE);
|
|
|
//var headfield = this.formEdit.getForm().findField(member.data.FIELDNAME);
|
|
|
//if (headfield != NaN && headfield != null)
|
|
|
// headfield.setValue(member.data.DEFVALUE);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
this.GetEditStatus();
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
LoadMustBe: function () {
|
|
|
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 headfield = this.formHead.getForm().findField(member.data.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);
|
|
|
|
|
|
}
|
|
|
//var headfield = this.formEdit.getForm().findField(member.data.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
|
|
|
});
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
setSaveBtnStatus: function (enable) {
|
|
|
var btnESave = Ext.getCmp('btnESave');
|
|
|
var btnESave2 = Ext.getCmp('btnESave2');
|
|
|
var btnESaveAndClose = Ext.getCmp('btnESaveAndClose');
|
|
|
var btnESaveAndNew = Ext.getCmp('btnESaveAndNew');
|
|
|
|
|
|
if (enable) {
|
|
|
btnESave.enable();
|
|
|
btnESave2.enable();
|
|
|
btnESaveAndClose.enable();
|
|
|
btnESaveAndNew.enable();
|
|
|
} else {
|
|
|
btnESave.disable();
|
|
|
btnESave2.disable();
|
|
|
btnESaveAndClose.disable();
|
|
|
btnESaveAndNew.disable();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
//#region 明细表相关方法
|
|
|
onAddBodyClick: function (button, event) {
|
|
|
// var newSerialno = DsGetNewSerialNo(this.storeBodyList, this.serialNo);
|
|
|
// this.serialNo = newSerialno;
|
|
|
var record = Ext.create('MsOpSuperVisionTruckDetailModel', {
|
|
|
'GID': NewGuid(),
|
|
|
'BSNO': '',
|
|
|
'ROWNUM': this.getLinenum(),
|
|
|
'TRUCKNO': '',
|
|
|
'CUSTOMERNAME': '',
|
|
|
'PKGS': 0,
|
|
|
'KGS': 0,
|
|
|
'CBM': 0,
|
|
|
'RECEIVER': '',
|
|
|
'RECEIVER_TEL': '',
|
|
|
'HBLNO': '',
|
|
|
'DESTINATION': '',
|
|
|
'KINDPKGS': '',
|
|
|
'REMARK': ''
|
|
|
});
|
|
|
|
|
|
this.storeBodyList.add(record);
|
|
|
|
|
|
var n = this.storeBodyList.getCount();
|
|
|
this.cellEditingBody.startEditByPosition({ row: n - 1, column: 2 });
|
|
|
}, //end onAddDetailClick
|
|
|
|
|
|
onDelBodyClick: function (button, event) {
|
|
|
this.deleteDetail();
|
|
|
}, //onDelDetailClick
|
|
|
BodyAfterEdit: function (editor, e, eOpts) {
|
|
|
//需要自己实现里面的事件
|
|
|
|
|
|
},
|
|
|
|
|
|
deleteDetail: function () {
|
|
|
var selectedRecords = this.gridBodyList.selModel.getSelection();
|
|
|
this.bodyDel = [];
|
|
|
GID = "";
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var rec = selectedRecords[i];
|
|
|
// alert(rec.ContractNo);
|
|
|
if (rec.BSNO != "" || rec.BSNO != "*") //如果是新增但没有保存的数据,没有必要提交到后台
|
|
|
{
|
|
|
this.bodyDel.push(rec);
|
|
|
}
|
|
|
//alert(i);
|
|
|
this.storeBodyList.remove(selectedRecords[i]);
|
|
|
if (GID != "") GID += ",";
|
|
|
GID += selectedRecords[i].data.GID;
|
|
|
}
|
|
|
|
|
|
if (this.bodyDel.length > 0) {
|
|
|
|
|
|
//var jsonBody = ConvertRecordsToJsonAll(this.bodyDel);
|
|
|
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/DelDetail',
|
|
|
params: {
|
|
|
GID: GID
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
Ext.MessageBox.hide();
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
|
|
|
//Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.MessageBox.hide();
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
Ext.MessageBox.hide();
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
getLinenum: function (button, event) {
|
|
|
var _L = 0;
|
|
|
for (var i = 0; i < this.storeBodyList.getCount(); i++) {
|
|
|
var _t = parseInt(this.storeBodyList.getAt(i).get("ROWNUM"));
|
|
|
if (_t > _L) { _L = _t; }
|
|
|
}
|
|
|
_L++;
|
|
|
return _L;
|
|
|
},
|
|
|
//#endregion
|
|
|
|
|
|
//#region 上一票,下一票
|
|
|
|
|
|
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;
|
|
|
}
|
|
|
|
|
|
|
|
|
var children = this.tabOtherPanel.items;
|
|
|
if (children) {
|
|
|
for (var i = children.length - 1, len = 0; i >= len; i--) {
|
|
|
if (children.items[i].id) {
|
|
|
if (children.items[i].id == 'pnlmodOpOtherInfo') {
|
|
|
// this.tabSeaepanel.setActiveTab(i);
|
|
|
} else {
|
|
|
children.items[i].close();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
this.tabOtherPanel.doLayout();
|
|
|
|
|
|
j = j - 1;
|
|
|
this.editRecord = this.StoreList.getAt(j);
|
|
|
if (this.opStatus == 'edit') {
|
|
|
condition = "GID='" + this.editRecord.get('GID') + "'";
|
|
|
this.storeBodyList.load({ params: { GID: this.editRecord.get('GID') } });
|
|
|
}
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
},
|
|
|
NextRecord: function () {
|
|
|
var j = this.StoreList.indexOf(this.editRecord);
|
|
|
|
|
|
if (j == (this.StoreList.data.length - 1)) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '已经是最后一票', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); //'警告', '已是最后一票'
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
var children = this.tabOtherPanel.items;
|
|
|
if (children) {
|
|
|
for (var i = children.length - 1, len = 0; i >= len; i--) {
|
|
|
if (children.items[i].id) {
|
|
|
if (children.items[i].id == 'pnlmodOpOtherInfo') {
|
|
|
//this.tabSeaepanel.setActiveTab(i);
|
|
|
} else {
|
|
|
children.items[i].close();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
this.tabOtherPanel.doLayout();
|
|
|
|
|
|
j = j + 1;
|
|
|
this.editRecord = this.StoreList.getAt(j);
|
|
|
if (this.opStatus == 'edit') {
|
|
|
condition = "GID='" + this.editRecord.get('GID') + "'";
|
|
|
this.storeBodyList.load({ params: { GID: this.editRecord.get('GID') } });
|
|
|
}
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
},
|
|
|
//#endregion
|
|
|
|
|
|
Print: function () {
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
var billNo = basicForm.findField('BSNO').value;
|
|
|
if (billNo == '*' || billNo == '') {
|
|
|
Ext.Msg.show({ title: '错误', msg: '单据还没有保存,请保存后再打印', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSOPOHTER';
|
|
|
var sql1 = "SET LANGUAGE 'us_english' SELECT * FROM op_other WHERE BSNO = '" + billNo + "'";
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
},
|
|
|
getIsModify: function () {
|
|
|
|
|
|
var feepanel = Ext.getCmp('pnlmodOpOtherAllFee');
|
|
|
|
|
|
if (feepanel != NaN && feepanel != null) {
|
|
|
var feemodify = feepanel.panelFee.getModifyStatus();
|
|
|
if (feemodify) {
|
|
|
return '费用信息';
|
|
|
}
|
|
|
}
|
|
|
var feeamendpanel = Ext.getCmp('pnlmodOpOtherAmendFee');
|
|
|
|
|
|
if (feeamendpanel != NaN && feeamendpanel != null) {
|
|
|
var feemodify = feeamendpanel.panelFee.getModifyStatus();
|
|
|
if (feemodify) {
|
|
|
return '更改单信息';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.formHead.getForm().isDirty() == true) {
|
|
|
return '业务信息';
|
|
|
}
|
|
|
else return '';
|
|
|
},
|
|
|
|
|
|
SetHeadDate(data) {
|
|
|
if (data.CreateTime)
|
|
|
data.CreateTime = data.CreateTime.replace(" 00:00:00", "");
|
|
|
if (data.ETD)
|
|
|
data.ETD = data.ETD.replace(" 00:00:00", "");
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
,
|
|
|
GetNewHBLNO() {
|
|
|
BSNO = this.editRecord.get('BSNO');
|
|
|
_this = this;
|
|
|
if (this.opStatus == 'add') {
|
|
|
Ext.Msg.show({ title: '注意', msg: '请先保存业务信息后再打开其他模块!', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
} else {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在获取数据...',
|
|
|
url: '/MvcShipping/MsOp_SuperVision_Truck/GetNewHBLNO',
|
|
|
params: {
|
|
|
BSNO: BSNO
|
|
|
},
|
|
|
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
//Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnData = jsonresult.Data;
|
|
|
|
|
|
_hblno = returnData.HBLNO;
|
|
|
_timemark = parseInt(returnData.TimeMark);
|
|
|
|
|
|
_this.formHead.getForm().findField('HBLNO').setValue(_hblno);
|
|
|
_this.formHead.getForm().findField('TimeMark').setValue(_timemark);
|
|
|
} 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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
, setCanEdit() {
|
|
|
var 主分单 = Ext.getCmp("BILLTYPE");
|
|
|
|
|
|
if (this.opStatus == 'add') {
|
|
|
主分单.readOnly = false;
|
|
|
} else {
|
|
|
主分单.readOnly = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
, onRefreshClick: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
this.storeAddOpseaeList.pageSize = this.PageSize;
|
|
|
this.storeAddOpseaeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql } });
|
|
|
}
|
|
|
|
|
|
, getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = " (not exists(select 1 from BillCheckOut_Detail where BSNO=b.BSNO) and exists(select 1 from op_status where bsno=b.bsno and STATUS='提单签入') )";
|
|
|
|
|
|
var customNo = form.findField('CustomNo').getValue();
|
|
|
sql = sql + getAndConSql(sql, customNo, " (b.CUSTNO like '%" + customNo + "%' or b.MBLNO like '%" + customNo + "%' or b.HBLNO like '%" + customNo + "%' or b.CUSTOMNO like '%" + customNo + "%')");
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "b.CUSTOMERNAME ='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var expDateBgn = form.findField('ExpDateBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "b.ETD >='" + expDateBgn + "'");
|
|
|
|
|
|
var expDateEnd = form.findField('ExpDateEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "b.ETD <='" + expDateEnd + "'");
|
|
|
|
|
|
//var ACCDATE = form.findField('ACCDATEFR').getRawValue();
|
|
|
//sql = sql + getAndConSql(sql, ACCDATE, "b.ACCDATE>='" + ACCDATE + "'");
|
|
|
|
|
|
//var ACCDATETO = form.findField('ACCDATETO').getRawValue();
|
|
|
//sql = sql + getAndConSql(sql, ACCDATETO, "b.ACCDATE<='" + ACCDATETO + "'");
|
|
|
|
|
|
var SALE = form.findField('SALE').getValue();
|
|
|
sql = sql + getAndConSql(sql, SALE, "B.SALE ='" + SALE + "'");
|
|
|
|
|
|
var SALECORPID = form.findField('SALECORPID').getValue();
|
|
|
sql = sql + getAndConSql(sql, SALECORPID, "B.SALECORPID ='" + SALECORPID + "'");
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
}
|
|
|
|
|
|
, onAddClick: function () {
|
|
|
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
|
|
|
var GID = this.formHead.getForm().findField('GID').getValue();
|
|
|
_this = this;
|
|
|
|
|
|
var selections = this.gridAddOpseaeList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: "请先选择要添加的业务", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要退舱的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if ((GID == '*') || basicForm.isDirty()) {
|
|
|
|
|
|
if (!basicForm.isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
var type = 0;
|
|
|
var data = basicForm.getValues();
|
|
|
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在保存数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/Save',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
opstatus: this.opStatus,
|
|
|
data: Ext.JSON.encode(data)
|
|
|
},
|
|
|
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.formHead.getForm().setValues(returnData);
|
|
|
|
|
|
if (this.opStatus == 'add') {
|
|
|
var arrNewRecords = this.StoreList.add(returnData);
|
|
|
this.editRecord = arrNewRecords[0];
|
|
|
}
|
|
|
else if (this.opStatus == 'edit') {
|
|
|
var editp = Ext.create('MsChPayapplication', returnData);
|
|
|
|
|
|
this.editRecord.fields.each(function (field) {
|
|
|
if (field.persist) {
|
|
|
name = field.name;
|
|
|
if (name != 'id')
|
|
|
this.editRecord.set(name, editp.get(name));
|
|
|
}
|
|
|
}, this);
|
|
|
this.editRecord.commit();
|
|
|
}
|
|
|
this.opStatus = 'edit';
|
|
|
_this.addBillfn();
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
var returnData = jsonresult.Data;
|
|
|
this.formHead.getForm().setValues(returnData);
|
|
|
|
|
|
Ext.Msg.show({
|
|
|
title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
|
|
|
this.addBillfn();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
, addBillfn: function () {
|
|
|
|
|
|
var selectedRecords = this.gridAddOpseaeList.selModel.getSelection();
|
|
|
|
|
|
var basicForm = this.formHead.getForm();
|
|
|
|
|
|
var GID = this.formHead.getForm().findField('GID').getValue();
|
|
|
|
|
|
if (selectedRecords.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有选择要添加的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
var BSNOs = "";
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
|
|
|
//var rec = selectedRecords[i];
|
|
|
//var feeBSNO = "'" + rec.data.BSNO + "'";
|
|
|
//if (feeBSNOSql == '') {
|
|
|
// feeBSNOSql = feeBSNO;
|
|
|
//} else {
|
|
|
// feeBSNOSql = feeBSNOSql + "," + feeBSNO;
|
|
|
//}
|
|
|
|
|
|
var rec = selectedRecords[i];
|
|
|
if (BSNOs!="") BSNOs += ",";
|
|
|
BSNOs += rec.data.BSNO;
|
|
|
}
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在添加数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/AddBill',
|
|
|
params: {
|
|
|
GID: GID,
|
|
|
BSNOs: BSNOs
|
|
|
},
|
|
|
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 {
|
|
|
|
|
|
resultData = result.Data;
|
|
|
|
|
|
condition = "GID='" + resultData.GID + "'";
|
|
|
this.opStatus = "edit";
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
, DoSend: function () {
|
|
|
if (this.opStatus == 'add') {
|
|
|
Ext.Msg.show({ title: '错误', msg: "请先保存签单业务", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.storeBodyList.length==0) {
|
|
|
Ext.Msg.show({ title: '错误', msg: "请先添加至少一个业务", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var GID = this.formHead.getForm().findField('GID').getValue();
|
|
|
|
|
|
var SendBtn = Ext.getCmp('SendBtn');
|
|
|
SendBtn.disable();
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在添加数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/NoticeCustomerToCheckOut',
|
|
|
params: {
|
|
|
BSNOs: GID
|
|
|
},
|
|
|
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
|
|
|
});
|
|
|
|
|
|
DelayEnable(SendBtn, 1000);
|
|
|
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
resultData = result.Data;
|
|
|
|
|
|
condition = "GID='" + GID + "'";
|
|
|
|
|
|
this.LoadData(this.opStatus, condition);
|
|
|
|
|
|
MsgTip("提示", "发送成功", 1000);
|
|
|
DelayEnable(SendBtn, 5000);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
|
|
|
SendBtn.enable();
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
, OpenWrite: function () {
|
|
|
|
|
|
INSIGN = Ext.getCmp("formINSIGN");
|
|
|
|
|
|
if (INSIGN.getValue()=="true") return;
|
|
|
|
|
|
|
|
|
|
|
|
if (this.opStatus == 'add') {
|
|
|
Ext.Msg.show({ title: '错误', msg: "请先保存签单业务", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var _this = this;
|
|
|
var data = this.formHead.getForm().getValues(false, false, false);
|
|
|
|
|
|
if (data.SENDED != true) {
|
|
|
Ext.Msg.show({ title: '错误', msg: "只有发出之后的签单条才能签字", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var mailpdfurl = data.MAILPDFURL;
|
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
xhr.open('GET', mailpdfurl, true);// get请求,同步加载
|
|
|
xhr.responseType = "blob"; // 表示接收文件流数据
|
|
|
xhr.setRequestHeader("client_type", "DESKTOP_WEB");
|
|
|
|
|
|
if (!data.RECEIVER) {
|
|
|
data.RECEIVER = data.CUSTOMERNAME;
|
|
|
}
|
|
|
|
|
|
xhr.onload = function () {
|
|
|
if (this.status == 200) {
|
|
|
var blob = this.response;
|
|
|
//将Blob 对象转换成 base64 字符串
|
|
|
var reader = new FileReader();
|
|
|
reader.readAsDataURL(blob);
|
|
|
reader.onload = function (e) {
|
|
|
var base64Str = reader.result; //转为base64 格式的字符串
|
|
|
//
|
|
|
var base64 = base64Str.replace(/^data:application\/\w+;base64,/, "");
|
|
|
|
|
|
var senddata = {
|
|
|
code: data.GID,//唯一编码
|
|
|
name: data.CHECKOUTNO,//文书名称
|
|
|
requestAppName: "测试系统",//请求应用名称
|
|
|
showData: base64,//要显示的数据 pdf文件base64
|
|
|
showDataType: "pdf",//显示数据类型
|
|
|
collectInfoType: "3",//采集信息类型 3签名指纹 64签名加识别或指纹
|
|
|
userCode: usercode,
|
|
|
userName: SHOWNAME,
|
|
|
deptCode: DEPTNAME,
|
|
|
deptName: DEPTNAME,
|
|
|
businessNumber: data.CHECKOUTNO,
|
|
|
businessCode: data.GID,
|
|
|
signerName: data.RECEIVER,
|
|
|
|
|
|
signHeight: "",
|
|
|
signWidth: "",
|
|
|
fingerprintHeight: "",
|
|
|
fingerprintWidth: "",
|
|
|
faceHeight: "",
|
|
|
faceWidth: "",
|
|
|
|
|
|
keyValuePairs: {
|
|
|
"用户身份证号": ""
|
|
|
}
|
|
|
};
|
|
|
console.log(senddata);
|
|
|
psSignSignerNotifyWithShowData(_this.psSignSignerNotifyWithShowDataCallback, senddata, senddata);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
xhr.send();
|
|
|
|
|
|
INSIGN.setValue("true");
|
|
|
|
|
|
//Ext.Ajax.request({
|
|
|
// waitMsg: '正在查询主表数据...',
|
|
|
// url: mailpdfurl,
|
|
|
// callback: function (options, success, response) {
|
|
|
// if (success) {
|
|
|
// _text = response.responseText;
|
|
|
// base64Str = "";
|
|
|
// let reader = new FileReader();
|
|
|
// reader.readAsDataURL(response);//readAsDataURL
|
|
|
// reader.onload = function (e) {
|
|
|
// let base64Str = reader.result; //转为base64 格式的字符串
|
|
|
// callback(base64Str);
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
// Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
// }
|
|
|
// },
|
|
|
// scope: this
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
, psSignSignerNotifyWithShowDataCallback(success, message, data, cbParam) {
|
|
|
if (success) {
|
|
|
_this = this;
|
|
|
//alert(data.pk);
|
|
|
//alert(data.relations);
|
|
|
//alert(data.signer);
|
|
|
//alert(data.sign);
|
|
|
//alert(data.finger);
|
|
|
//alert(data.fingerprint);
|
|
|
//alert(data.face);
|
|
|
|
|
|
//alert(data.mergedPictures);
|
|
|
//alert(data.signPdf);
|
|
|
|
|
|
var imgbase64 = "data:image/png;base64," + data.mergedPictures;
|
|
|
var pdfbase64 = data.signPdf;
|
|
|
|
|
|
nametile = Math.random() * 1000;
|
|
|
|
|
|
|
|
|
this.formImg = Ext.widget('form', { //便于速记创建一个微件的xtype配置对象。
|
|
|
// layout: "border",
|
|
|
region: 'north',
|
|
|
height: 700,
|
|
|
//collapsed: false, //设置为 true 则将 fieldset 初始化为收缩状态
|
|
|
//collapsible: true, //设置为 true 则允许 fieldset 可以收缩,并自动的渲染 收缩/展开 切换按钮到 组头(legend) 元素中, 设置为 false 则让 fieldset 保持静态的大小,也没有收缩按钮.
|
|
|
frame: true,
|
|
|
bodyPadding: 3,
|
|
|
trackResetOnLoad: true, //如果设为true,reset()重置到最近被加载的或setValues()的数据,而不是最初创建表单时的。
|
|
|
fieldDefaults: { //设定样式,如果指定此配置项, 则该对象内部的属性将会被应用到所有添加到此容器内的 Ext.form.Labelable 实例(e.g. Ext.form.field.Base 或者 Ext.form.FieldContainer),
|
|
|
// 作为其默认值. 而在每个 field 自己的配置项中相应的属性会具有较高的优先级, 当然, 其父容器的 defaults config 也比此配置项优先。
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1, //此配置项将被应用到布局管理的容器的子项中.
|
|
|
//每个含有flex属性的子项将会被根据当前子项的flex值与所有其他含flex值子项的值的和 的相对比例进行伸缩('hbox'中横向, 'vbox'中纵向).
|
|
|
labelWidth: 80,
|
|
|
msgTarget: 'qtip'
|
|
|
//,split:true
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'anchor', flex: 1,
|
|
|
defaultType: 'textfield',
|
|
|
height: 700,
|
|
|
items: [
|
|
|
|
|
|
{
|
|
|
xtype: 'box', //或者xtype: 'component',
|
|
|
id: 'IMAGEURLPANEL' + nametile,
|
|
|
width: 690, //图片宽度
|
|
|
height: 500, //图片高度
|
|
|
autoEl: {
|
|
|
tag: 'img', //指定为img标签
|
|
|
src: imgbase64 //指定url路径 //显示
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.winCheckRuleListShow = Ext.create('Ext.window.Window', {
|
|
|
title: "签名预览",
|
|
|
width: 700,
|
|
|
height: 500,
|
|
|
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: [formImg],
|
|
|
buttons: [{
|
|
|
text: "关闭", //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
INSIGN = Ext.getCmp("formINSIGN");
|
|
|
INSIGN.setValue("false");
|
|
|
|
|
|
_this.winCheckRuleListShow.close();
|
|
|
delete _this.formImg;
|
|
|
delete _this.winCheckRuleListShow;
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: "确定保存", //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
GID = Ext.getCmp("formGID").getValue();
|
|
|
|
|
|
Ext.Msg.wait('正在保存数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在保存数据...',
|
|
|
url: '/MvcShipping/BillCheckOut/SaveSignPdf',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
GID: GID,
|
|
|
Base64Str: pdfbase64
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
MsgTip("提示", "保存完成", 1200);
|
|
|
Ext.getCmp("formISCHECKOUT").setValue(true);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({
|
|
|
title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
|
|
|
INSIGN = Ext.getCmp("formINSIGN");
|
|
|
INSIGN.setValue("false");
|
|
|
|
|
|
_this.winCheckRuleListShow.close();
|
|
|
delete _this.formImg;
|
|
|
delete _this.winCheckRuleListShow;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
//this.formHead.getForm().setValues(data);
|
|
|
|
|
|
this.winCheckRuleListShow.show();
|
|
|
|
|
|
} else {
|
|
|
alert(message);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
, OpenSign() {
|
|
|
|
|
|
if (this.opStatus == 'add') {
|
|
|
Ext.Msg.show({ title: '错误', msg: "请先保存签单业务", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
var _this = this;
|
|
|
var data = this.formHead.getForm().getValues(false, false, false);
|
|
|
|
|
|
if (data.SENDED != true) {
|
|
|
Ext.Msg.show({ title: '错误', msg: "只有发出之后的签单条才能签字", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var pdfurl = "../../UploadFiles/MailFile/" + data.CHECKOUTNO + "_Sign.pdf";;
|
|
|
|
|
|
window.open(pdfurl);
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|