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/MsOpReceipt/MsOpReceiptIndex.js

1902 lines
68 KiB
JavaScript

2 years ago
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',
1 year ago
fieldLabel: Zi.LAN.bottles,
2 years ago
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',
1 year ago
header: Zi.LAN.RECEIPTNO,
2 years ago
width: 100
}, {
sortable: true,
dataIndex: 'RECEIPTTYPE',
1 year ago
header: Zi.LAN.RECEIPTTYPE,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'DOCNUM',
1 year ago
header: Zi.LAN.DOCNUM, //'件数',
2 years ago
width: 60,
}, {
sortable: true,
dataIndex: 'RECEIVE_MAN',
1 year ago
header: Zi.LAN.RECEIVE_MAN,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'RECEIVE_DATE',
1 year ago
header: Zi.LAN.RECEIVE_DATE,
2 years ago
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'SEND_MAN',
1 year ago
header: Zi.LAN.SEND_MAN,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'SEND_DATE',
1 year ago
header: Zi.LAN.SEND_DATE,
2 years ago
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'TRANCER',
1 year ago
header: Zi.LAN.TRANCER,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'TRANCNO',
1 year ago
header: Zi.LAN.TRANCNO,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'ISREPEAT',
1 year ago
header: Zi.LAN.ISREPEAT,
2 years ago
width: 60,
renderer: function (value, meta) {
if (value == 'true') {
1 year ago
return Zi.LAN.SHI;
2 years ago
} else {
return "";
}
}
}, {
sortable: true,
dataIndex: 'REPEAT_MAN',
1 year ago
header: Zi.LAN.REPEAT_MAN ,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'REPEAT_DATE',
1 year ago
header: Zi.LAN.REPEAT_DATE,
2 years ago
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'ISRECEIVE',
1 year ago
header: Zi.LAN.ISRECEIVE,
2 years ago
width: 60,
renderer: function (value, meta) {
if (value == 'true') {
1 year ago
return Zi.LAN.SHI;
2 years ago
} else {
return "";
}
}
}, {
sortable: true,
dataIndex: 'RETURN_MAN',
1 year ago
header: Zi.LAN.RETURN_MAN ,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'RETURN_DATE',
1 year ago
header: Zi.LAN.RETURN_DATE,
2 years ago
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'RETURN_TRANCER',
1 year ago
header: Zi.LAN.RETURN_TRANCER,
2 years ago
width: 100
}, {
sortable: true,
dataIndex: 'RETURN_TRANCNO',
1 year ago
header: Zi.LAN.RETURN_TRANCNO,
2 years ago
width: 100
}, {
sortable: true,
dataIndex: 'REMARK',
1 year ago
header: Zi.LAN.REMARK,
2 years ago
width: 200
},
{
sortable: true,
dataIndex: 'CUSTOMDATE',
1 year ago
text: Zi.LAN.CUSTOMDATE,
2 years ago
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
1 year ago
text: Zi.LAN.CUSTOMERNAME,
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
1 year ago
text: Zi.LAN.CUSTFULLNAME,
2 years ago
width: 140
}, {
sortable: true,
dataIndex: 'CUSTNO',
1 year ago
text: Zi.LAN.CUSTNO,
2 years ago
width: 136
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
1 year ago
text: Zi.LAN.CUSTOMNO,
2 years ago
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
1 year ago
text: Zi.LAN.ENTERP,
2 years ago
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
1 year ago
text: Zi.LAN.MBLNO,
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
1 year ago
text: Zi.LAN.HBLNO,
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
1 year ago
text: Zi.LAN.ETD,
2 years ago
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
1 year ago
text: Zi.LAN.VESSEL,
2 years ago
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
1 year ago
text: Zi.LAN.VOYNO,
2 years ago
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
1 year ago
text: Zi.LAN.SALE ,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'OP',
1 year ago
text: Zi.LAN.OP,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'DOC',
1 year ago
text: Zi.LAN.DOC ,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
1 year ago
text: Zi.LAN.CUSTSERVICE,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'FRCUSTSERVICE',
1 year ago
text: Zi.LAN.FRCUSTSERVICE,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'CONTRACTNO',
1 year ago
text: Zi.LAN.CONTRACTNO ,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
1 year ago
text: Zi.LAN.PORTLOAD,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
1 year ago
text: Zi.LAN.PORTDISCHARGE,
2 years ago
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
1 year ago
header: Zi.LAN.DESTINATION,
2 years ago
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
1 year ago
text: Zi.LAN.ACCDATE,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
1 year ago
text: Zi.LAN.CARRIER,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'LANE',
1 year ago
text: Zi.LAN.LANE,
2 years ago
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
1 year ago
text: Zi.LAN.BSSOURCE,
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'YARD',
1 year ago
text: Zi.LAN.YARD,
2 years ago
width: 120
}, {
sortable: true,
dataIndex: 'FORWARDER',
1 year ago
text: Zi.LAN.FORWARDER,
2 years ago
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',
1 year ago
loadMask: { msg: Zi.LAN.ShuJuJiaZaiZhongQingShaoDeng},
2 years ago
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,
1 year ago
displayMsg: Zi.LAN.displayMsg,
emptyMsg: Zi.LAN.emptyMsg
2 years ago
}), 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 == "空运出口") {
2 years ago
openUrl = "../../MvcShipping/MsOpAire/EditView?handle=check&bsno=" + record.data.PARENTID;
2 years ago
} else if (record.data.OPLBNAME == "空运进口") {
2 years ago
openUrl = "../../MvcShipping/MsOpAiri/EditView?handle=check&bsno=" + record.data.PARENTID;
2 years ago
} else if (record.data.OPLBNAME == "报关业务") {
2 years ago
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;
2 years ago
} 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', {
1 year ago
fieldLabel: Zi.LAN.BsType,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.ENTERP,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.TRANSTYPE,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.OP,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.BSSOURCE,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.CUSTOMERNAME,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.TRANCER,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.ISREPEAT,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.ISRECEIVE,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.RECEIPTTYPE,
2 years ago
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: [{
1 year ago
fieldLabel: Zi.LAN.MBLNO,
2 years ago
name: 'MBLNO',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
1 year ago
fieldLabel: Zi.LAN.RECEIPTNO,
2 years ago
name: 'RECEIPTNO',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxCustCode, this.comboxTRANSTYPE, {
1 year ago
fieldLabel: Zi.LAN.CUSTNO,
2 years ago
name: 'CUSTNO',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxRECEIPTTYPE, {
1 year ago
text: Zi.LAN.ChongZhi,
2 years ago
width: 90,
xtype: 'button',
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
1 year ago
fieldLabel: Zi.LAN.ETD,
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDBgn',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
1 year ago
fieldLabel: Zi.LAN.ETD,
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDEnd',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
1 year ago
fieldLabel: Zi.LAN.RECEIVE_DATE,
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'BSDATEBgn',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
1 year ago
fieldLabel: Zi.LAN.RECEIVE_DATE,
2 years ago
format: 'Y-m-d',
xtype: 'datefield',
name: 'BSDATEEnd',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
1 year ago
fieldLabel: Zi.LAN.ACCDATE,
2 years ago
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,
1 year ago
text: Zi.LAN.ZhiXingChaXun,
2 years ago
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [ this.comboxOP, this.comboxTRANCER2, {
1 year ago
fieldLabel: Zi.LAN.TRANCNO,
2 years ago
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,
1 year ago
text: Zi.LAN.Gengduo,
2 years ago
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
}, '-', {
1 year ago
text: Zi.LAN.btntest,
2 years ago
id: "btntest",
menu: [
1 year ago
{
text: Zi.LAN.SaveGridPanel,
2 years ago
handler: function (button, event) {
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
}
1 year ago
}, {
text: Zi.LAN.SaveGridPanel2,
2 years ago
handler: function (menu, event) {
_this.InitGrid(_this.initgirdcolums);
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
}
}],
scope: this
}, '-',
{
1 year ago
text: Zi.LAN.btnprint,
2 years ago
iconCls: 'btnprint',
menu: [
{
1 year ago
text: Zi.LAN.Print,
2 years ago
handler: function (menu, event) {
_this.Print();
}
}, {
1 year ago
text: Zi.LAN.PrintSelect,
2 years ago
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', {
1 year ago
fieldLabel: Zi.LAN.TRANCER,
2 years ago
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',
1 year ago
fieldLabel: Zi.LAN.FANWEI, //'报文类型',
2 years ago
id: 'sdFILETYPE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
1 year ago
boxLabel: Zi.LAN.XUANZHONG, //'订舱',
2 years ago
name: 'FILETYPE',
checked: true,
inputValue: 'S'
}, {
1 year ago
boxLabel: Zi.LAN.QUANBU, //'确认',
2 years ago
name: 'FILETYPE',
inputValue: 'A'
}]
}]
},{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
1 year ago
fieldLabel: Zi.LAN.SEND_MAN,
2 years ago
name: 'SEND_MAN'
}, {
1 year ago
fieldLabel: Zi.LAN.SEND_DATE, //'ATD',
2 years ago
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'SEND_DATE'
}
]//end items(fieldset 1)
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxTRANCER,{
1 year ago
fieldLabel: Zi.LAN.TRANCNO ,
2 years ago
name: 'TRANCNO'
}
]//end items(fieldset 1)
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
this.winformSongDanShowShow = Ext.create('Ext.window.Window', {
1 year ago
title: Zi.LAN.QueRenSongDan, //"发送预配舱单",
2 years ago
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: [{
1 year ago
text: Zi.LAN.QueRenSongDan, //"确定发送",
2 years ago
minWidth: 70,
handler: function () {
_this.onSongDan();
}
}, {
1 year ago
text: Zi.LAN.GuanBi, //"关闭",
2 years ago
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',
1 year ago
fieldLabel: Zi.LAN.FANWEI, //'报文类型',
2 years ago
id: 'sdFILETYPE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
1 year ago
boxLabel: Zi.LAN.XUANZHONG, //'订舱',
2 years ago
name: 'FILETYPE',
checked: true,
inputValue: 'S'
}, {
1 year ago
boxLabel: Zi.LAN.QUANBU, //'确认',
2 years ago
name: 'FILETYPE',
inputValue: 'A'
}]
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
1 year ago
fieldLabel: Zi.LAN.REPEAT_MAN,
2 years ago
name: 'REPEAT_MAN'
}, {
1 year ago
fieldLabel: Zi.LAN.REPEAT_DATE, //'ATD',
2 years ago
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'REPEAT_DATE'
}
]//end items(fieldset 1)
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
1 year ago
fieldLabel: Zi.LAN.ISREPEAT, //'是否SOC',
2 years ago
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', {
1 year ago
title: Zi.LAN.QueRenHuiDan, //"发送预配舱单",
2 years ago
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: [{
1 year ago
text: Zi.LAN.QueRenHuiDan, //"确定发送",
2 years ago
minWidth: 70,
handler: function () {
_this.onHuiDan();
}
}, {
1 year ago
text: Zi.LAN.GuanBi, //"关闭",
2 years ago
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',
1 year ago
fieldLabel: Zi.LAN.FANWEI, //'报文类型',
2 years ago
id: 'sdFILETYPE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
1 year ago
boxLabel: Zi.LAN.XUANZHONG, //'订舱',
2 years ago
name: 'FILETYPE',
checked: true,
inputValue: 'S'
}, {
1 year ago
boxLabel: Zi.LAN.QUANBU, //'确认',
2 years ago
name: 'FILETYPE',
inputValue: 'A'
}]
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
1 year ago
fieldLabel: Zi.LAN.RETURN_MAN,
2 years ago
name: 'RETURN_MAN'
}, {
1 year ago
fieldLabel: Zi.LAN.RETURN_DATE, //'ATD',
2 years ago
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'RETURN_DATE'
}
]//end items(fieldset 1)
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
1 year ago
fieldLabel: Zi.LAN.ISRECEIVE, //'是否SOC',
2 years ago
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', {
1 year ago
title: Zi.LAN.QueRenHuanDan, //"发送预配舱单",
2 years ago
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: [{
1 year ago
text: Zi.LAN.QueRenHuanDan, //"确定发送",
2 years ago
minWidth: 70,
handler: function () {
_this.onHuanDan();
}
}, {
1 year ago
text: Zi.LAN.GuanBi, //"关闭",
2 years ago
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 },
1 year ago
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu ,
2 years ago
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 },
1 year ago
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu ,
2 years ago
scope: this
});
},
onSongDan: function () {
if (this.storeList.getCount() == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
return;
}
var cgFILETYPE = Ext.getCmp('sdFILETYPE');
var FILETYPE = cgFILETYPE.getValue();
var data = this.formSongDanShow.getForm().getValues();
if (FILETYPE.FILETYPE == 'A') {
Ext.Ajax.request({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
_this.winformSongDanShowShow.close();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
} else {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
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({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
_this.winformSongDanShowShow.close();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
}
},
onCancelSongDan: function () {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
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({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
},
onHuiDan: function () {
if (this.storeList.getCount() == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
return;
}
var cgFILETYPE = Ext.getCmp('sdFILETYPE');
var FILETYPE = cgFILETYPE.getValue();
var data = this.formHuiDanShow.getForm().getValues();
if (FILETYPE.FILETYPE == 'A') {
Ext.Ajax.request({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
_this.winformHuiDanShowShow.close();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
} else {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
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({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
_this.winformHuiDanShowShow.close();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
}
},
onCancelHuiDan: function () {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
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({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
},
onHuanDan: function () {
if (this.storeList.getCount() == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
return;
}
var cgFILETYPE = Ext.getCmp('sdFILETYPE');
var FILETYPE = cgFILETYPE.getValue();
var data = this.formHuanDanShow.getForm().getValues();
if (FILETYPE.FILETYPE == 'A') {
Ext.Ajax.request({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
_this.winformHuanDanShowShow.close();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
} else {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
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({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
_this.winformHuanDanShowShow.close();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
}
},
onCancelHuanDan: function () {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要生成的业务
2 years ago
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({
1 year ago
waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu,
2 years ago
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({
1 year ago
title: Zi.LAN.TiShi,
2 years ago
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
1 year ago
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
2 years ago
_this.storeList.reload();
}
} else {
1 year ago
Ext.MessageBox.alert(Zi.LAN.FuWuQiXiangYingChuCuo, response.responseText);
2 years ago
}
},
scope: this
});
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
}, //onDeleteClick
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
1 year ago
Ext.Msg.alert(Zi.LAN.TiShi, '查询条件赋值错误,请检查。');
2 years ago
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);
}
});