You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/HistryOpSeaeIndex.js

1246 lines
41 KiB
JavaScript

2 years ago
Ext.namespace('Shipping');
var HistryAdd =1;
Shipping.HistryOpSeaeIndex = function (config, addtype) {
Ext.applyIf(this, config);
HistryAdd = addtype;
this.initUIComponents();
window.Shipping.HistryOpSeaeIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.HistryOpSeaeIndex, Ext.Panel, {
PageSize: 30,
ParentWin: null,
feeType: 0,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
StoreFee: null,
StoreFeeUnit: null,
StoreFeeCust: null,
EditRecord: null,
initUIComponents: function () {
this.SEAEHISTRYUSECOPYTEMPLATE = 0;
Ext.define('CodeOpTemplateDetail', {
extend: 'Ext.data.Model',
fields: [
{ name: 'GID', type: 'string' },
{ name: 'LINKGID', type: 'string' },
{ name: 'FIELDNAME', type: 'string' },
{ name: 'DEFVALUE', type: 'string' }
]
});
//定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'MsOpSeaeModel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpSeae/GetFenList',
reader: {
id: 'BSNO',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#region 主grid
this.initgirdcolums = [{
sortable: true,
id: '',
dataIndex: '',
header: '',
width: 0
}, {
sortable: true,
id: '',
dataIndex: 'BSNO',
header: '业务编号',
width: 0
}, {
sortable: true,
id: '',
dataIndex: 'CUSTNO',
header: '委托编号',
width: 120
}, {
sortable: true,
id: '',
dataIndex: 'ORDERNO',
header: '订舱编号',
width: 120
}, {
sortable: true,
id: '',
dataIndex: 'ORDERTYPE',
header: '订舱方式',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'BSSTATUSREF',
header: '业务锁定',
align: 'center',
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'FEESTATUSREF',
header: '费用锁定',
align: 'center',
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'DRFEESTATUS',
header: '应收费用',
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_pass';
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRFEESTATUS',
header: '应付费用',
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_pass';
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRINVSTATUS',
header: '应收开票',
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '已开票') {
meta.tdCls = 'feestatus_pass';
} else if (value == '部分开票') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
}
,
{
sortable: true,
id: '',
dataIndex: 'OPSTATUS',
header: '业务状态',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'BLTYPE',
header: '装运方式',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'ETD',
header: '开船日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'MBLNO',
header: '主提单号',
width: 120,
filter: {
type: 'string'
// specify disabled to disable the filter menu
//, disabled: true
}
},
{
sortable: true,
id: '',
dataIndex: 'CUSTOMERNAME',
header: '委托单位',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'ETA',
header: '预抵日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'BSDATE',
header: '修改日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'GOODSNAME',
header: '品名',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'PKGS',
header: '件数',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'KGS',
header: '毛重',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CBM',
header: '尺码',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CNTRTOTAL',
header: '集装箱',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'HBLNO',
header: '分提单号',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'ACCDATE',
header: '会计期间',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'BSSOURCE',
header: '业务来源',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'BSSOURCEDETAIL',
header: '来源明细',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'INPUTBY',
header: '录入人',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CREATETIME',
header: '创建时间',
width: 120
},
{
sortable: true,
id: '',
dataIndex: 'OP',
header: '操作员',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'SALE',
header: '揽货人',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'VESSEL',
header: '船名',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'VOYNO',
header: '航次',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'PORTLOAD',
header: '装货港',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'PORTDISCHARGE',
header: '卸货港',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'DESTINATION',
header: '目的地',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CNTR1',
header: '箱型1',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR2',
header: '箱型2',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR3',
header: '箱型3',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR4',
header: '箱型4',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR5',
header: '箱型5',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR6',
header: '箱型6',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR7',
header: '箱型7',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR8',
header: '箱型8',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR9',
header: '箱型9',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR10',
header: '箱型10',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'OTCNTR',
header: '其他箱型',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'TEU',
header: '箱TEU',
width: 40
},
{
sortable: true,
id: '',
dataIndex: 'CUSTOMSER',
header: '报关行',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'KINDPKGS',
header: '件数包装',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CARRIER',
header: '船公司',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'TRUCKER',
header: '承运车队',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'LANE',
header: '航线',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'AGENTID',
header: '代理',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'FORWARDER',
header: '订舱代理',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'PORTDISCHARGEID',
header: '卸港代码',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'YARD',
header: '场站',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'SERVICECONTRACTNO',
header: '服务合同号',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CUSTSERVICE',
header: '客服',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'DOC',
header: '单证',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'VOUNO',
header: '凭证号',
width: 60
}, {
sortable: true,
dataIndex: 'ISPRINTPR',
header: '打印核算单',
width: 80,
renderer: function (value, meta, record) {
if (value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISFUMIGATION',
header: '服务项目1',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISSTORAGE',
header: '服务项目2',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISLAND',
header: '服务项目3',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISCUSTOMS',
header: '服务项目4',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISINSPECTION',
header: '服务项目5',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISBOOKING',
header: '服务项目6',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISAGENT',
header: '服务项目7',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISHBLNO',
header: '服务项目8',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'SERVICE9',
header: '服务项目9',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'SERVICE10',
header: '服务项目10',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
},
{
sortable: true,
id: '',
dataIndex: 'SHIPAGENCY',
header: '船代',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'SHIPPER',
header: 'SHIPPER',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CONSIGNEE',
header: 'CONSIGNEE',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'NOTIFYPARTY',
header: 'NOTIFYPARTY',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CONTRACTNO',
header: '运费协议号',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'ISSUETYPE',
header: '签单方式',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'OPERATOR',
header: '委托单位联系人',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CLOSINGDATE',
header: '截港日期',
width: 100
},
{
sortable: true,
id: '',
dataIndex: 'CLOSEDOCDATE',
header: '截单日期',
width: 100
}, {
sortable: true,
dataIndex: 'AMEND',
header: '更改单',
width: 80,
renderer: function (value, meta, record) {
if (value != '0')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISAPPLY',
header: '是否生成报关',
width: 80,
renderer: function (value, meta, record) {
if (value != '0')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'STLNAME',
header: '结算方式',
width: 80
}, {
sortable: true,
dataIndex: 'STLDATE',
header: '结算日期',
width: 80
}, {
dataIndex: 'BLFRT',
header: '付费方式',
width: 120
}, {
dataIndex: 'APPLYNO',
header: '申请放箱号',
width: 120
}];
this.girdcolums = this.initgirdcolums;
this.gridListCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
selModel: this.gridListCheckBoxModel,
viewConfig: {
autoFill: true,
enableTextSelection: true
},
columns: this.girdcolums,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id表名中间column数组跳过一开始的几列
this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridList.columns[1] = new Ext.grid.RowNumberer();
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
if (this.SEAEHISTRYUSECOPYTEMPLATE == 1 && this.storeCodeOpTemplateDetailList.getCount() > 0) {
for (var j = 0; j < this.storeCodeOpTemplateDetailList.getCount(); j += 1) {
var member = this.storeCodeOpTemplateDetailList.getAt(j);
var fieldname = member.data.FIELDNAME;
if (fieldname == 'PlACERECEIPT') fieldname = 'PLACERECEIPT';
if (fieldname == 'PlACERECEIPTID') fieldname = 'PLACERECEIPTID';
var headfield = parentWin.formHead.getForm().findField(fieldname);
if (headfield != NaN && headfield != null) {
headfield.setValue(record.get(fieldname));
}
var headfield = parentWin.formEdit.getForm().findField(member.data.FIELDNAME);
if (headfield != NaN && headfield != null) {
headfield.setValue(record.get(fieldname));
}
var headfield = parentWin.formEDI.getForm().findField(member.data.FIELDNAME);
if (headfield != NaN && headfield != null) {
headfield.setValue(record.get(fieldname));
}
};
2 years ago
Ext.Ajax.request({
waitMsg: '正在查询主表数据...', //'正在查询主表数据...',
url: '/MvcShipping/MsOpSeae/GetAmsData',
params: {
condition: "BSNO='" + record.data.BSNO + "'"
},
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;
parentWin.formAMS.getForm().reset();
parentWin.formAMS.getForm().setValues(data);
parentWin.formAMSPIL.getForm().reset();
parentWin.formAMSPIL.getForm().setValues(data);
parentWin.formPrepTrans.getForm().reset();
parentWin.formPrepTrans.getForm().setValues(data);
parentWin.formscn.getForm().reset();
parentWin.storeMFrt1.load({ params: { code: data.SHIPPERCOUNTRY } });
parentWin.storeMFrt2.load({ params: { code: data.CONSIGNEECOUNTRY } });
parentWin.storeMFrt3.load({ params: { code: data.NOTIFYPARTYCOUNTRY } });
parentWin.formscn.getForm().setValues(data);
parentWin.formAMS.getForm().findField('AMSNO').setDisabled(false);
var field = parentWin.formAMS.getForm().findField('AMSNO');
field.setValue('*');
parentWin.formAMS.getForm().findField('AMSNO').setDisabled(true);
parentWin.panelRailWay.setVisible(data.USERAILWAY);
parentWin.panelRIVER.setVisible(data.USERIVER);
parentWin.panelTRUCK.setVisible(data.USETRUCK);
window.closeAction = 'destroy';
window.close();
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
2 years ago
} else {
parentWin.formEdit.getForm().findField('SHIPPER').setValue(record.data.SHIPPER);
parentWin.formEdit.getForm().findField('CONSIGNEE').setValue(record.data.CONSIGNEE);
parentWin.formEdit.getForm().findField('NOTIFYPARTY').setValue(record.data.NOTIFYPARTY);
parentWin.formEdit.getForm().findField('MARKS').setValue(record.data.MARKS);
parentWin.formEdit.getForm().findField('DESCRIPTION').setValue(record.data.DESCRIPTION);
parentWin.formEdit.getForm().findField('PORTLOADID').setValue(record.data.PORTLOADID);
parentWin.formEdit.getForm().findField('PORTLOAD').setValue(record.data.PORTLOAD);
parentWin.formEdit.getForm().findField('PORTDISCHARGEID').setValue(record.data.PORTDISCHARGEID);
parentWin.formEdit.getForm().findField('PORTDISCHARGE').setValue(record.data.PORTDISCHARGE);
parentWin.formEdit.getForm().findField('GOODSNAME').setValue(record.data.GOODSNAME);
parentWin.formEdit.getForm().findField('KGS').setValue(record.data.KGS);
parentWin.formEdit.getForm().findField('PLACERECEIPT').setValue(record.data.PLACERECEIPT);
parentWin.formEdit.getForm().findField('PLACEDELIVERYID').setValue(record.data.PLACEDELIVERYID);
parentWin.formEdit.getForm().findField('PLACEDELIVERY').setValue(record.data.PLACEDELIVERY);
parentWin.formEdit.getForm().findField('DESTINATIONID').setValue(record.data.DESTINATIONID);
parentWin.formEdit.getForm().findField('DESTINATION').setValue(record.data.DESTINATION);
parentWin.formEdit.getForm().findField('NOBILL').setValue(record.data.NOBILL);
parentWin.formEdit.getForm().findField('COPYNOBILL').setValue(record.data.COPYNOBILL);
parentWin.formEdit.getForm().findField('ISSUETYPE').setValue(record.data.ISSUETYPE);
parentWin.formEdit.getForm().findField('ISSUEPLACE').setValue(record.data.ISSUEPLACE);
parentWin.formEdit.getForm().findField('BLFRT').setValue(record.data.BLFRT);
parentWin.formEdit.getForm().findField('PREPARDAT').setValue(record.data.PREPARDAT);
parentWin.formEdit.getForm().findField('PAYABLEAT').setValue(record.data.PAYABLEAT);
parentWin.formEdit.getForm().findField('SERVICE').setValue(record.data.SERVICE);
parentWin.formEdit.getForm().findField('NOPKGS').setValue(record.data.NOPKGS);
parentWin.formEdit.getForm().findField('GROSSWEIGHT').setValue(record.data.GROSSWEIGHT);
parentWin.formEdit.getForm().findField('MEASUREMENT').setValue(record.data.MEASUREMENT);
parentWin.formEdit.getForm().findField('PKGS').setValue(record.data.PKGS);
parentWin.formEdit.getForm().findField('KINDPKGS').setValue(record.data.KINDPKGS);
parentWin.formEdit.getForm().findField('CBM').setValue(record.data.CBM);
parentWin.formEdit.getForm().findField('TOTALNO').setValue(record.data.TOTALNO);
parentWin.formEdit.getForm().findField('LANE').setValue(record.data.LANE);
parentWin.formEdit.getForm().findField('CARGOID').setValue(record.data.CARGOID);
parentWin.formEdit.getForm().findField('DCLASS').setValue(record.data.DCLASS);
parentWin.formEdit.getForm().findField('DUNNO').setValue(record.data.DUNNO);
parentWin.formEdit.getForm().findField('REEFERF').setValue(record.data.REEFERF);
parentWin.formEdit.getForm().findField('TEMPID').setValue(record.data.TEMPID);
parentWin.formEdit.getForm().findField('TEMPSET').setValue(record.data.TEMPSET);
parentWin.formEdit.getForm().findField('TEMPMAX').setValue(record.data.TEMPMAX);
parentWin.formEdit.getForm().findField('TEMPMIN').setValue(record.data.TEMPMIN);
parentWin.formEdit.getForm().findField('HUMIDITY').setValue(record.data.HUMIDITY);
parentWin.formEdit.getForm().findField('PLACERECEIPTID').setValue(record.data.PLACERECEIPTID);
parentWin.formEdit.getForm().findField('DPAGE').setValue(record.data.DPAGE);
parentWin.formEdit.getForm().findField('DLABEL').setValue(record.data.DLABEL);
parentWin.formEdit.getForm().findField('VESSELID').setValue(record.data.VESSELID);
parentWin.formEdit.getForm().findField('HSCODE').setValue(record.data.HSCODE);
parentWin.formEdit.getForm().findField('ISSUEPLACEID').setValue(record.data.ISSUEPLACEID);
2 years ago
parentWin.formEdit.getForm().findField('REMARK').setValue(record.data.REMARK);
2 years ago
Ext.Ajax.request({
waitMsg: '正在查询主表数据...', //'正在查询主表数据...',
url: '/MvcShipping/MsOpSeae/GetAmsData',
params: {
condition: "BSNO='" + record.data.BSNO + "'"
},
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;
parentWin.formAMS.getForm().reset();
parentWin.formAMS.getForm().setValues(data);
parentWin.formAMSPIL.getForm().reset();
parentWin.formAMSPIL.getForm().setValues(data);
parentWin.formPrepTrans.getForm().reset();
parentWin.formPrepTrans.getForm().setValues(data);
parentWin.formscn.getForm().reset();
parentWin.storeMFrt1.load({ params: { code: data.SHIPPERCOUNTRY } });
parentWin.storeMFrt2.load({ params: { code: data.CONSIGNEECOUNTRY } });
parentWin.storeMFrt3.load({ params: { code: data.NOTIFYPARTYCOUNTRY } });
parentWin.formscn.getForm().setValues(data);
parentWin.formAMS.getForm().findField('AMSNO').setDisabled(false);
var field = parentWin.formAMS.getForm().findField('AMSNO');
field.setValue('*');
parentWin.formAMS.getForm().findField('AMSNO').setDisabled(true);
parentWin.panelRailWay.setVisible(data.USERAILWAY);
parentWin.panelRIVER.setVisible(data.USERIVER);
parentWin.panelTRUCK.setVisible(data.USETRUCK);
window.closeAction = 'destroy';
window.close();
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
2 years ago
2 years ago
}
2 years ago
}, this);
//#endregion
//#region 固定费用明细表
//#region formSearch
//#region formSearch枚举参照相关
//客户加载_委托单位
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
//委托单位
_this = this;
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '委托单位',
store: this.storeCustCode,
forceSelection: true,
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
//#endregion
_this = this;
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '编号',
name: 'MblNo',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxCustCode,{
fieldLabel: '从开船日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'CustDate_Min',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '至开船日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'CustDate_Max',
enableKeyEvents: true,
listeners: {
specialkey: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
xtype: 'button',
width: 90,
text: "执行查询",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}
]
}]
}]
});
//#endregion formSearch
//#region 按钮ToolBar
//#endregion
//#region 布局
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 55,
items: [this.formSearch]
});
Ext.apply(this, {
items: [this.panelTop, this.gridList]
});
//#endregion
parentWin = window.parent.opener.panelEdit;
//#region 事件绑定
this.storeList.on('beforeload', function (store) {
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
this.storeList.on('load', function (store, records) {
if (store.getCount() > 0) {
this.gridList.getSelectionModel().select(0);
//this.gridListCheckBoxModel.selectAll();
}
}, this);
this.storeCodeOpTemplateDetailList = Ext.create('Ext.data.Store', {
model: 'CodeOpTemplateDetail',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsCodeOpTemplate/GetBodyList',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.storeCodeOpTemplateDetailList.load({ params: { condition: " LINKGID in (select top 1 GID from CODE_OP_TEMPLATE where BSTYPE='海运出口' and (op='" + GID + "' or ISPUBLIC='是') order by ISPUBLIC)" } });
//#endregion
//#region 自动刷新(已经提交但是尚未审核的业务,哪怕一票货中有一笔费用没审核也显示)
this.onAutoRefresh();
//#endregion
Ext.Ajax.request({
waitMsg: '',
url: '/MvcShipping/MsSysParamSet/GetData',
params: {
condition: "PARAMNAME='SEAEHISTRYUSECOPYTEMPLATE'"
},
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.SEAEHISTRYUSECOPYTEMPLATE = 1;
} else {
}
}
} else {
}
},
scope: this
});
// this.SetBtnRight();
}, //end initUIComponents
onAutoRefresh: function () {
var sql = '';
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
onRefreshClick: function (button, event) {
var sql = this.getCondition();
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
},
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
return '';
}
var sql = '';
//客户名称
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, "B.CUSTOMERNAME='" + CUSTOMERNAME + "'");
var mblNo = form.findField('MblNo').getValue();
sql = sql + getAndConSql(sql, mblNo, " (MBLNO like '%" + mblNo + "%' or HBLNO like '%" + mblNo + "%' or CUSTNO like '%" + mblNo + "%') ");
var custDate_Min = form.findField('CustDate_Min').getRawValue();
sql = sql + getAndConSql(sql, custDate_Min, "ETD >= '" + custDate_Min + "'");
var custDate_Max = form.findField('CustDate_Max').getRawValue();
sql = sql + getAndConSql(sql, custDate_Max, "ETD<= '" + custDate_Max + " 23:59:59'");
return sql;
}
});