|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsOpReceiptIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsOpReceiptIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsOpReceiptIndex, Ext.Panel, {
|
|
|
PageSize: 30,
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
selectbsno: '',
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
this.formname = "formMsOpReceiptIndex"; //页面名称
|
|
|
//定义数据集
|
|
|
|
|
|
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsCodeOpService',
|
|
|
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataList' }
|
|
|
});
|
|
|
|
|
|
this.storePLList = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpReceipt'
|
|
|
});
|
|
|
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpReceipt',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsOpReceipt/GetBLDataList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 50
|
|
|
});
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
this.Pagenum = Ext.create('Ext.form.field.Number', {
|
|
|
name: 'bottles',
|
|
|
fieldLabel: Zi.LAN.bottles,
|
|
|
labelAlign: 'right',
|
|
|
value: this.PageSize,
|
|
|
maxValue: 100000,
|
|
|
width: 180,
|
|
|
minValue: 0,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
hidden: true,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RECEIPTNO',
|
|
|
header: Zi.LAN.RECEIPTNO,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RECEIPTTYPE',
|
|
|
header: Zi.LAN.RECEIPTTYPE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DOCNUM',
|
|
|
header: Zi.LAN.DOCNUM, //'件数',
|
|
|
width: 60,
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RECEIVE_MAN',
|
|
|
header: Zi.LAN.RECEIVE_MAN,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RECEIVE_DATE',
|
|
|
header: Zi.LAN.RECEIVE_DATE,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y',结果是”09/24/2008”
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SEND_MAN',
|
|
|
header: Zi.LAN.SEND_MAN,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SEND_DATE',
|
|
|
header: Zi.LAN.SEND_DATE,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y',结果是”09/24/2008”
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRANCER',
|
|
|
header: Zi.LAN.TRANCER,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRANCNO',
|
|
|
header: Zi.LAN.TRANCNO,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISREPEAT',
|
|
|
header: Zi.LAN.ISREPEAT,
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
if (value == 'true') {
|
|
|
return Zi.LAN.SHI;
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REPEAT_MAN',
|
|
|
header: Zi.LAN.REPEAT_MAN ,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REPEAT_DATE',
|
|
|
header: Zi.LAN.REPEAT_DATE,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y',结果是”09/24/2008”
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISRECEIVE',
|
|
|
header: Zi.LAN.ISRECEIVE,
|
|
|
width: 60,
|
|
|
renderer: function (value, meta) {
|
|
|
if (value == 'true') {
|
|
|
return Zi.LAN.SHI;
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RETURN_MAN',
|
|
|
header: Zi.LAN.RETURN_MAN ,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RETURN_DATE',
|
|
|
header: Zi.LAN.RETURN_DATE,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y',结果是”09/24/2008”
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RETURN_TRANCER',
|
|
|
header: Zi.LAN.RETURN_TRANCER,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'RETURN_TRANCNO',
|
|
|
header: Zi.LAN.RETURN_TRANCNO,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: Zi.LAN.REMARK,
|
|
|
width: 200
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMDATE',
|
|
|
text: Zi.LAN.CUSTOMDATE,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
text: Zi.LAN.CUSTOMERNAME,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTFULLNAME',
|
|
|
text: Zi.LAN.CUSTFULLNAME,
|
|
|
width: 140
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
text: Zi.LAN.CUSTNO,
|
|
|
width: 136
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMNO',
|
|
|
text: Zi.LAN.CUSTOMNO,
|
|
|
width: 136
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ENTERP',
|
|
|
text: Zi.LAN.ENTERP,
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
text: Zi.LAN.MBLNO,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'HBLNO',
|
|
|
text: Zi.LAN.HBLNO,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
text: Zi.LAN.ETD,
|
|
|
width: 86
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VESSEL',
|
|
|
text: Zi.LAN.VESSEL,
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOYNO',
|
|
|
text: Zi.LAN.VOYNO,
|
|
|
width: 50
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'SALE',
|
|
|
text: Zi.LAN.SALE ,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
text: Zi.LAN.OP,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DOC',
|
|
|
text: Zi.LAN.DOC ,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTSERVICE',
|
|
|
text: Zi.LAN.CUSTSERVICE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FRCUSTSERVICE',
|
|
|
text: Zi.LAN.FRCUSTSERVICE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CONTRACTNO',
|
|
|
text: Zi.LAN.CONTRACTNO ,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
text: Zi.LAN.PORTLOAD,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTDISCHARGE',
|
|
|
text: Zi.LAN.PORTDISCHARGE,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTINATION',
|
|
|
header: Zi.LAN.DESTINATION,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ACCDATE',
|
|
|
text: Zi.LAN.ACCDATE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
text: Zi.LAN.CARRIER,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'LANE',
|
|
|
text: Zi.LAN.LANE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSSOURCE',
|
|
|
text: Zi.LAN.BSSOURCE,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'YARD',
|
|
|
text: Zi.LAN.YARD,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FORWARDER',
|
|
|
text: Zi.LAN.FORWARDER,
|
|
|
width: 120
|
|
|
}];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
//定义Grid
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
_this = this;
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
columns: this.girdcolums,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true
|
|
|
},
|
|
|
// paging bar on the bottom
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: Zi.LAN.displayMsg,
|
|
|
emptyMsg: Zi.LAN.emptyMsg
|
|
|
}), this.Pagenum]
|
|
|
});
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
this.gridList.columns[0] = new Ext.grid.RowNumberer();
|
|
|
////////////////////////////
|
|
|
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
if (record.data.OPLBNAME == "海运出口") {
|
|
|
openUrl = "../../MvcShipping/MsOpSeae/EditView?handle=check&bsno=" + record.data.PARENTID;
|
|
|
}
|
|
|
else if (record.data.OPLBNAME == "海运进口" || record.data.OPLBNAME == "海运进口散货") {
|
|
|
openUrl = "../../MvcShipping/MsOpSeai/EditView?handle=check&bsno=" + record.data.PARENTID;
|
|
|
} else if (record.data.OPLBNAME == "空运出口") {
|
|
|
openUrl = "../../MvcShipping/MsOpAire/EditView?handle=check&bsno=" + record.data.PARENTID;
|
|
|
} else if (record.data.OPLBNAME == "空运进口") {
|
|
|
openUrl = "../../MvcShipping/MsOpAiri/EditView?handle=check&bsno=" + record.data.PARENTID;
|
|
|
} else if (record.data.OPLBNAME == "报关业务") {
|
|
|
openUrl = "../../MvcShipping/MsOpApply/EditView?handle=check&bsno=" + record.data.PARENTID;
|
|
|
} else if (record.data.OPLBNAME == "综合业务") {
|
|
|
openUrl = "../../MvcShipping/MsOpOther/EditView?handle=check&bsno=" + record.data.PARENTID;
|
|
|
} else {
|
|
|
openUrl = "../../MvcShipping/MsOpBill/MsOpFeeView?handle=check&bsno=" + record.data.BSNO;
|
|
|
}
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
}, this);
|
|
|
|
|
|
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
//#region formSearch 查询条件
|
|
|
|
|
|
_this = this;
|
|
|
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'MsOP',
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
|
|
|
});
|
|
|
this.StoreOpRange.load({ params: { optype: "modOpOtherList"} });
|
|
|
//
|
|
|
this.storeBsType = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.storeBsType.load({ params: { enumTypeId: 96004} });
|
|
|
this.comboxBsType = Ext.create('DsExt.ux.RefEnumCombox', {
|
|
|
fieldLabel: Zi.LAN.BsType,
|
|
|
store: this.storeBsType,
|
|
|
forceSelection: true,
|
|
|
name: 'BsType',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
//
|
|
|
this.storeEnterpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomerRefModel',
|
|
|
proxy: { url: '/MvcShipping/MsBaseInfo/GetCustomerRefList' }
|
|
|
});
|
|
|
this.storeEnterpCode.load({ params: { condition: "ISENTERP='1'"} });
|
|
|
this.comboxEnterp = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.ENTERP,
|
|
|
store: this.storeEnterpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'ENTERP',
|
|
|
valueField: 'DESCRIPTION',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.storeTSysEnumValueCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.TSysEnumValueDataModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetTSysEnumValueList' }
|
|
|
});
|
|
|
this.storeTSysEnumValueCode.load({ params: { condition: " and EnumTypeID=96004"} });
|
|
|
this.comboxTRANSTYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.TRANSTYPE,
|
|
|
store: this.storeTSysEnumValueCode,
|
|
|
forceSelection: true,
|
|
|
name: 'TRANSTYPE',
|
|
|
valueField: 'EnumValueName',
|
|
|
displayField: 'EnumValueName',
|
|
|
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/GetUserRefList' }
|
|
|
});
|
|
|
this.storeOpCode.load();
|
|
|
//操 作
|
|
|
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.OP,
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'OP',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
this.storeSource = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.SourceModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetSource' }
|
|
|
});
|
|
|
|
|
|
this.storeSource.load();
|
|
|
|
|
|
this.comboxBSSOURCE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.BSSOURCE,
|
|
|
store: this.storeSource,
|
|
|
forceSelection: true,
|
|
|
name: 'BSSOURCE',
|
|
|
valueField: 'SourceName',
|
|
|
displayField: 'SourceName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
//客户加载_委托单位
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
|
|
|
});
|
|
|
|
|
|
//委托单位
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.CUSTOMERNAME,
|
|
|
store: this.storeCustCode,
|
|
|
forceSelection: true,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
//specialkey: function (field, e) {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.comboxTRANCER2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.TRANCER,
|
|
|
store: this.storeExpress,
|
|
|
forceSelection: true,
|
|
|
name: 'TRANCER',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
this.storeISREPEAT = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeISREPEAT.add({ "FSTATUS": "", "NAME": "全部" });
|
|
|
this.storeISREPEAT.add({ "FSTATUS": "0", "NAME": "否" });
|
|
|
this.storeISREPEAT.add({ "FSTATUS": "1", "NAME": "是" });
|
|
|
|
|
|
this.comboxISREPEAT = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.ISREPEAT,
|
|
|
store: this.storeISREPEAT,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
//flex: 0.5,
|
|
|
//labelWidth: 55,
|
|
|
forceSelection: true,
|
|
|
name: 'ISREPEAT',
|
|
|
value: '',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeISRECEIVE = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeISRECEIVE.add({ "FSTATUS": "", "NAME": "全部" });
|
|
|
this.storeISRECEIVE.add({ "FSTATUS": "0", "NAME": "否" });
|
|
|
this.storeISRECEIVE.add({ "FSTATUS": "1", "NAME": "是" });
|
|
|
|
|
|
this.comboxISRECEIVE= Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.ISRECEIVE,
|
|
|
store: this.storeISRECEIVE,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
//flex: 0.5,
|
|
|
//labelWidth: 55,
|
|
|
forceSelection: true,
|
|
|
name: 'ISRECEIVE',
|
|
|
value: '',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//键值维护表_贸易方式
|
|
|
this.storeCrmKeyCodeCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CrmKeyCodeModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCrmKeyCodeList' }
|
|
|
});
|
|
|
this.storeCrmKeyCodeCode.load({ params: { condition: " and KEYTYPE='单据类型'" } });
|
|
|
this.comboxRECEIPTTYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.RECEIPTTYPE,
|
|
|
store: this.storeCrmKeyCodeCode,
|
|
|
forceSelection: true,
|
|
|
name: 'RECEIPTTYPE',
|
|
|
valueField: 'KEYVALUE',
|
|
|
displayField: 'KEYVALUE'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 80,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.MBLNO,
|
|
|
name: 'MBLNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.RECEIPTNO,
|
|
|
name: 'RECEIPTNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxCustCode, this.comboxTRANSTYPE, {
|
|
|
fieldLabel: Zi.LAN.CUSTNO,
|
|
|
name: 'CUSTNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxRECEIPTTYPE, {
|
|
|
text: Zi.LAN.ChongZhi,
|
|
|
width: 90,
|
|
|
xtype: 'button',
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
this.onClearSql(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.ETD,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.ETD,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDEnd',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.RECEIVE_DATE,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATEBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.RECEIVE_DATE,
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATEEnd',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.ACCDATE,
|
|
|
format: 'Y-m',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ACCDATE',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxBSSOURCE, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: Zi.LAN.ZhiXingChaXun,
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [ this.comboxOP, this.comboxTRANCER2, {
|
|
|
fieldLabel: Zi.LAN.TRANCNO,
|
|
|
name: 'TRANCNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
keyup: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxISREPEAT, this.comboxISRECEIVE, { xtype: 'hiddenfield' }, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: Zi.LAN.Gengduo,
|
|
|
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
|
|
|
}]
|
|
|
}]
|
|
|
}]
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
text: "确认送单",
|
|
|
handler: function (button, event) {
|
|
|
this.winformSongDanShowShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "取消送单",
|
|
|
handler: function (button, event) {
|
|
|
this.onCancelSongDan();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "确认回单",
|
|
|
handler: function (button, event) {
|
|
|
this.winformHuiDanShowShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "取消回单",
|
|
|
handler: function (button, event) {
|
|
|
this.onCancelHuiDan();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "确认还单",
|
|
|
handler: function (button, event) {
|
|
|
this.winformHuanDanShowShow.show();
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "取消还单",
|
|
|
handler: function (button, event) {
|
|
|
this.onCancelHuanDan();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: Zi.LAN.btntest,
|
|
|
id: "btntest",
|
|
|
menu: [
|
|
|
{
|
|
|
text: Zi.LAN.SaveGridPanel,
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.SaveGridPanel2,
|
|
|
handler: function (menu, event) {
|
|
|
_this.InitGrid(_this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: Zi.LAN.btnprint,
|
|
|
iconCls: 'btnprint',
|
|
|
menu: [
|
|
|
{
|
|
|
text: Zi.LAN.Print,
|
|
|
handler: function (menu, event) {
|
|
|
_this.Print();
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.PrintSelect,
|
|
|
handler: function (menu, event) {
|
|
|
_this.PrintSelect();
|
|
|
}
|
|
|
}],
|
|
|
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
//#region 合计列表
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 126,
|
|
|
items: [this.formSearch, this.panelBtn]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.gridList]
|
|
|
});
|
|
|
this.InitGrid(this.girdcolums);
|
|
|
|
|
|
|
|
|
this.onRefreshClick();
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
var sql = this.getCondition();
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
this.storeExpress = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
|
});
|
|
|
this.storeExpress.load({ params: { condition: "ISEXPRESS='1'" } });
|
|
|
|
|
|
|
|
|
//船公司
|
|
|
this.comboxTRANCER = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.TRANCER,
|
|
|
store: this.storeExpress,
|
|
|
forceSelection: true,
|
|
|
name: 'TRANCER',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formSongDanShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 80,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
fieldLabel: Zi.LAN.FANWEI, //'报文类型',
|
|
|
id: 'sdFILETYPE',
|
|
|
defaults: { flex: 1 },
|
|
|
layout: 'hbox',
|
|
|
items: [{
|
|
|
boxLabel: Zi.LAN.XUANZHONG, //'订舱',
|
|
|
name: 'FILETYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.QUANBU, //'确认',
|
|
|
name: 'FILETYPE',
|
|
|
inputValue: 'A'
|
|
|
}]
|
|
|
}]
|
|
|
},{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.SEND_MAN,
|
|
|
name: 'SEND_MAN'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.SEND_DATE, //'ATD',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'SEND_DATE'
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [this.comboxTRANCER,{
|
|
|
fieldLabel: Zi.LAN.TRANCNO ,
|
|
|
name: 'TRANCNO'
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
});
|
|
|
|
|
|
this.winformSongDanShowShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.QueRenSongDan, //"发送预配舱单",
|
|
|
width: 450,
|
|
|
//height : 120,
|
|
|
//plain : true,
|
|
|
iconCls: "addicon",
|
|
|
resizable: false,
|
|
|
// 是否可以拖动
|
|
|
// draggable:false,
|
|
|
collapsible: true, // 允许缩放条
|
|
|
closeAction: 'close',
|
|
|
closable: true,
|
|
|
modal: 'true',
|
|
|
buttonAlign: "center",
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
items: [this.formSongDanShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QueRenSongDan, //"确定发送",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.onSongDan();
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi, //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winformSongDanShowShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formHuiDanShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 80,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
fieldLabel: Zi.LAN.FANWEI, //'报文类型',
|
|
|
id: 'sdFILETYPE',
|
|
|
defaults: { flex: 1 },
|
|
|
layout: 'hbox',
|
|
|
items: [{
|
|
|
boxLabel: Zi.LAN.XUANZHONG, //'订舱',
|
|
|
name: 'FILETYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.QUANBU, //'确认',
|
|
|
name: 'FILETYPE',
|
|
|
inputValue: 'A'
|
|
|
}]
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.REPEAT_MAN,
|
|
|
name: 'REPEAT_MAN'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.REPEAT_DATE, //'ATD',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'REPEAT_DATE'
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.ISREPEAT, //'是否SOC',
|
|
|
inputValue: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'ISREPEAT'
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
});
|
|
|
|
|
|
this.winformHuiDanShowShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.QueRenHuiDan, //"发送预配舱单",
|
|
|
width: 450,
|
|
|
//height : 120,
|
|
|
//plain : true,
|
|
|
iconCls: "addicon",
|
|
|
resizable: false,
|
|
|
// 是否可以拖动
|
|
|
// draggable:false,
|
|
|
collapsible: true, // 允许缩放条
|
|
|
closeAction: 'close',
|
|
|
closable: true,
|
|
|
modal: 'true',
|
|
|
buttonAlign: "center",
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
items: [this.formHuiDanShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QueRenHuiDan, //"确定发送",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.onHuiDan();
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi, //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winformHuiDanShowShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
this.formHuanDanShow = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 80,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
xtype: 'radiogroup',
|
|
|
fieldLabel: Zi.LAN.FANWEI, //'报文类型',
|
|
|
id: 'sdFILETYPE',
|
|
|
defaults: { flex: 1 },
|
|
|
layout: 'hbox',
|
|
|
items: [{
|
|
|
boxLabel: Zi.LAN.XUANZHONG, //'订舱',
|
|
|
name: 'FILETYPE',
|
|
|
checked: true,
|
|
|
inputValue: 'S'
|
|
|
}, {
|
|
|
boxLabel: Zi.LAN.QUANBU, //'确认',
|
|
|
name: 'FILETYPE',
|
|
|
inputValue: 'A'
|
|
|
}]
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.RETURN_MAN,
|
|
|
name: 'RETURN_MAN'
|
|
|
}, {
|
|
|
fieldLabel: Zi.LAN.RETURN_DATE, //'ATD',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'RETURN_DATE'
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: Zi.LAN.ISRECEIVE, //'是否SOC',
|
|
|
inputValue: true,
|
|
|
xtype: 'checkboxfield',
|
|
|
name: 'ISRECEIVE'
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
});
|
|
|
|
|
|
this.winformHuanDanShowShow = Ext.create('Ext.window.Window', {
|
|
|
title: Zi.LAN.QueRenHuanDan, //"发送预配舱单",
|
|
|
width: 450,
|
|
|
//height : 120,
|
|
|
//plain : true,
|
|
|
iconCls: "addicon",
|
|
|
resizable: false,
|
|
|
// 是否可以拖动
|
|
|
// draggable:false,
|
|
|
collapsible: true, // 允许缩放条
|
|
|
closeAction: 'close',
|
|
|
closable: true,
|
|
|
modal: 'true',
|
|
|
buttonAlign: "center",
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
items: [this.formHuanDanShow],
|
|
|
buttons: [{
|
|
|
text: Zi.LAN.QueRenHuanDan, //"确定发送",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.onHuanDan();
|
|
|
}
|
|
|
}, {
|
|
|
text: Zi.LAN.GuanBi, //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winformHuanDanShowShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
InitGrid: function (grid) {
|
|
|
//var agirdcolums = Ext.clone(this.gridList.columns);
|
|
|
var agirdcolums = grid;
|
|
|
this.gridList.reconfigure(this.storeList, agirdcolums);
|
|
|
// this.gridList.reconfigure(this.storeList, agirdcolums);
|
|
|
},
|
|
|
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu ,
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
//var girdcolums = this.gridList.getColumnMode();
|
|
|
var sql = this.sqlcontext;
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
this.storeList.pageSize = this.PageSize;
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu ,
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onSongDan: function () {
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var cgFILETYPE = Ext.getCmp('sdFILETYPE');
|
|
|
var FILETYPE = cgFILETYPE.getValue();
|
|
|
var data = this.formSongDanShow.getForm().getValues();
|
|
|
|
|
|
if (FILETYPE.FILETYPE == 'A') {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/SongDanAll',
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
formdata: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winformSongDanShowShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/SongDan',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
formdata: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winformSongDanShowShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onCancelSongDan: function () {
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/CancelSongDan',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
onHuiDan: function () {
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var cgFILETYPE = Ext.getCmp('sdFILETYPE');
|
|
|
var FILETYPE = cgFILETYPE.getValue();
|
|
|
var data = this.formHuiDanShow.getForm().getValues();
|
|
|
|
|
|
if (FILETYPE.FILETYPE == 'A') {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/HuiDanAll',
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
formdata: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winformHuiDanShowShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/HuiDan',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
formdata: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winformHuiDanShowShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onCancelHuiDan: function () {
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/CancelHuiDan',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
onHuanDan: function () {
|
|
|
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var cgFILETYPE = Ext.getCmp('sdFILETYPE');
|
|
|
var FILETYPE = cgFILETYPE.getValue();
|
|
|
var data = this.formHuanDanShow.getForm().getValues();
|
|
|
|
|
|
if (FILETYPE.FILETYPE == 'A') {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/HuanDanAll',
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
formdata: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winformHuanDanShowShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/HuanDan',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
formdata: Ext.JSON.encode(data)
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
_this.winformHuanDanShowShow.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onCancelHuanDan: function () {
|
|
|
var selections = this.GridCheckBoxModel.selected.items;
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
bodyAddDatas.push(rec);
|
|
|
|
|
|
}
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
|
|
|
url: '/MvcShipping/MsOpReceipt/CancelHuanDan',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (!result.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
return;
|
|
|
} else {
|
|
|
|
|
|
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
_this.storeList.reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onClearSql: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
form.reset();
|
|
|
}, //onDeleteClick
|
|
|
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert(Zi.LAN.TiShi, '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = '';
|
|
|
|
|
|
var MBLNO = form.findField('MBLNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, MBLNO, "b.MBLNO like '%" + MBLNO + "%'");
|
|
|
|
|
|
var CUSTNO = form.findField('CUSTNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTNO, "b.CUSTNO like '%" + CUSTNO + "%'");
|
|
|
|
|
|
var RECEIPTNO = form.findField('RECEIPTNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, RECEIPTNO, "r.RECEIPTNO like '%" + RECEIPTNO + "%'");
|
|
|
|
|
|
var TRANCER = form.findField('TRANCER').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRANCER, "r.TRANCER='" + TRANCER + "'");
|
|
|
|
|
|
var RECEIPTTYPE = form.findField('RECEIPTTYPE').getValue();
|
|
|
sql = sql + getAndConSql(sql, RECEIPTTYPE, "r.RECEIPTTYPE='" + RECEIPTTYPE + "'");
|
|
|
|
|
|
|
|
|
|
|
|
var TRANCNO = form.findField('TRANCNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRANCNO, "r.TRANCNO like '%" + TRANCNO + "%'");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ISREPEAT = form.findField('ISREPEAT').getValue();
|
|
|
if (ISREPEAT=='0')
|
|
|
sql = sql + getAndConSql(sql, ISREPEAT, " r.ISREPEAT=0");
|
|
|
if (ISREPEAT == '1')
|
|
|
sql = sql + getAndConSql(sql, ISREPEAT, " r.ISREPEAT=1");
|
|
|
|
|
|
var ISRECEIVE = form.findField('ISRECEIVE').getValue();
|
|
|
if (ISRECEIVE == '0')
|
|
|
sql = sql + getAndConSql(sql, ISRECEIVE, " r.ISRECEIVE=0");
|
|
|
if (ISRECEIVE == '1')
|
|
|
sql = sql + getAndConSql(sql, ISRECEIVE, " r.ISRECEIVE=1");
|
|
|
|
|
|
|
|
|
// var ORDERNO = form.findField('ORDERNO').getValue();
|
|
|
// sql = sql + getAndConSql(sql, ORDERNO, "ORDERNO like '%" + ORDERNO + "%'");
|
|
|
|
|
|
//会计期间
|
|
|
var ACCDATE = form.findField('ACCDATE').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ACCDATE, "b.ACCDATE='" + ACCDATE + "'");
|
|
|
|
|
|
|
|
|
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");
|
|
|
|
|
|
var TRANSTYPE = form.findField('TRANSTYPE').getValue();
|
|
|
sql = sql + getAndConSql(sql, TRANSTYPE, "TRANSTYPE= '" + TRANSTYPE + "'");
|
|
|
|
|
|
var BSSOURCE = form.findField('BSSOURCE').getValue();
|
|
|
sql = sql + getAndConSql(sql, BSSOURCE, "BSSOURCE= '" + BSSOURCE + "'");
|
|
|
|
|
|
var OP = form.findField('OP').getValue();
|
|
|
sql = sql + getAndConSql(sql, OP, "OP= '" + OP + "'");
|
|
|
|
|
|
var ETDBgn = form.findField('ETDBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDBgn, "CONVERT(char(10), ETD, 20) >='" + ETDBgn + "'");
|
|
|
var ETDEnd = form.findField('ETDEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETDEnd, "CONVERT(char(10), ETD, 20) <='" + ETDEnd + "'");
|
|
|
|
|
|
var BSDATEBgn = form.findField('BSDATEBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEBgn, "CONVERT(char(10), r.RECEIVE_DATE, 20) >='" + BSDATEBgn + "'");
|
|
|
var BSDATEEnd = form.findField('BSDATEEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEEnd, "CONVERT(char(10), r.RECEIVE_DATE, 20) <='" + BSDATEEnd + "'");
|
|
|
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
ret[3] = this.selectbsno;
|
|
|
ret[4] = 'op_other';
|
|
|
ret[5] = this.storePLList;
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcShipping/MsOpReceipt/GetBLDataList',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
condition: _this.sqlcontext,
|
|
|
printstr: 'true'
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
Ext.MessageBox.hide();
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
var returnstr = jsonresult.data;
|
|
|
var printType = 'MSOPRECEIPTLIST';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
PrintSelect: function () {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
var selectedRecords = [];
|
|
|
var storeadd = null;
|
|
|
selectedRecords = this.GridCheckBoxModel.selected.items;
|
|
|
|
|
|
|
|
|
if (selectedRecords.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择要打印的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
if (sortstr == "") sortstr = "CREATETIME desc"
|
|
|
|
|
|
var feeGidSql = '';
|
|
|
for (var i = 0; i < selectedRecords.length; i++) {
|
|
|
var record = selectedRecords[i];
|
|
|
var feeGId = "'" + record.get('GID') + "'";
|
|
|
if (feeGidSql == '') {
|
|
|
feeGidSql = feeGId;
|
|
|
} else {
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
var bsno = '11111';
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length != 0) {
|
|
|
var record = selections[0];
|
|
|
bsno = record.data.BSNO;
|
|
|
}
|
|
|
|
|
|
var printType = 'MSOPRECEIPTLISTSELECT';
|
|
|
var sql1 = "select * from op_receipt WHERE GID IN (" + feeGidSql + ") order by " + sortstr;
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|