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

1898 lines
67 KiB
JavaScript

3 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',
fieldLabel: '每页记录数',
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: '单据编号',
width: 100
}, {
sortable: true,
dataIndex: 'RECEIPTTYPE',
header: '单据类型',
width: 80
}, {
sortable: true,
dataIndex: 'DOCNUM',
header: '单据份数', //'件数',
width: 60,
}, {
sortable: true,
dataIndex: 'RECEIVE_MAN',
header: '接单人',
width: 80
}, {
sortable: true,
dataIndex: 'RECEIVE_DATE',
header: '接单日期',
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'SEND_MAN',
header: '送单人',
width: 80
}, {
sortable: true,
dataIndex: 'SEND_DATE',
header: '送单日期',
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'TRANCER',
header: '送单快递公司',
width: 80
}, {
sortable: true,
dataIndex: 'TRANCNO',
header: '送单快递单号',
width: 80
}, {
sortable: true,
dataIndex: 'ISREPEAT',
header: '是否回单',
width: 60,
renderer: function (value, meta) {
if (value == 'true') {
return "是";
} else {
return "";
}
}
}, {
sortable: true,
dataIndex: 'REPEAT_MAN',
header: '回单人',
width: 80
}, {
sortable: true,
dataIndex: 'REPEAT_DATE',
header: '回单日期',
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'ISRECEIVE',
header: '是否还单',
width: 60,
renderer: function (value, meta) {
if (value == 'true') {
return "是";
} else {
return "";
}
}
}, {
sortable: true,
dataIndex: 'RETURN_MAN',
header: '还单人',
width: 80
}, {
sortable: true,
dataIndex: 'RETURN_DATE',
header: '还单日期',
renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y'结果是”09/24/2008”
width: 80
}, {
sortable: true,
dataIndex: 'RETURN_TRANCER',
header: '还单的快递公司',
width: 100
}, {
sortable: true,
dataIndex: 'RETURN_TRANCNO',
header: '还单的快递单号',
width: 100
}, {
sortable: true,
dataIndex: 'REMARK',
header: '备注',
width: 200
},
{
sortable: true,
dataIndex: 'CUSTOMDATE',
text: '报关日期',
width: 86
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
text: '委托单位',
width: 120
}, {
sortable: true,
dataIndex: 'CUSTFULLNAME',
text: '委托单位全称',
width: 140
}, {
sortable: true,
dataIndex: 'CUSTNO',
text: '委托编号',
width: 136
}, {
sortable: true,
dataIndex: 'CUSTOMNO',
text: '报关单号',
width: 136
}, {
sortable: true,
dataIndex: 'ENTERP',
text: '经营单位',
width: 100
}, {
sortable: true,
dataIndex: 'MBLNO',
text: '主提单号',
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
text: '分提单号',
width: 120
}, {
sortable: true,
dataIndex: 'ETD',
text: '开船日期',
width: 86
}, {
sortable: true,
dataIndex: 'VESSEL',
text: '船名',
width: 200
}, {
sortable: true,
dataIndex: 'VOYNO',
text: '航次',
width: 50
}, {
sortable: true,
dataIndex: 'SALE',
text: '业务员',
width: 80
}, {
sortable: true,
dataIndex: 'OP',
text: '操作',
width: 80
}, {
sortable: true,
dataIndex: 'DOC',
text: '单证',
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
text: '客服员',
width: 80
}, {
sortable: true,
dataIndex: 'FRCUSTSERVICE',
text: '海外客服员',
width: 80
}, {
sortable: true,
dataIndex: 'CONTRACTNO',
text: '运费协议号',
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
text: '起运港',
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
text: '卸货港',
width: 150
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: '目的地',
width: 150
}, {
sortable: true,
dataIndex: 'ACCDATE',
text: '会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'CARRIER',
text: '船公司',
width: 80
}, {
sortable: true,
dataIndex: 'LANE',
text: '航线',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
text: '业务来源',
width: 120
}, {
sortable: true,
dataIndex: 'YARD',
text: '场站',
width: 120
}, {
sortable: true,
dataIndex: 'FORWARDER',
text: '订舱代理',
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: "数据加载中,请稍等..." },
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: '当前显示 {0} - {1}条记录 /共 {2}条记录',
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.BSNO;
} else if (record.data.OPLBNAME == "空运进口") {
openUrl = "../../MvcShipping/MsOpAiri/EditView?handle=check&bsno=" + record.data.BSNO;
} else if (record.data.OPLBNAME == "报关业务") {
openUrl = "../../MvcShipping/MsOpApply/EditView?handle=check&bsno=" + record.data.BSNO;
} 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: '运输类型',
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: '经营单位',
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: '运输类型',
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: '操 作',
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: '业务来源',
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: '委托单位',
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: '快递公司',
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: '是否回单',
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: '是否还单',
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: '单据类型',
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: '主提单号',
name: 'MBLNO',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '单据编号',
name: 'RECEIPTNO',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxCustCode, this.comboxTRANSTYPE, {
fieldLabel: '委托编号',
name: 'CUSTNO',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, this.comboxRECEIPTTYPE, {
text: "重置",
width: 90,
xtype: 'button',
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '从业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDBgn',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '到业务日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ETDEnd',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '从接单日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'BSDATEBgn',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '到接单日期',
format: 'Y-m-d',
xtype: 'datefield',
name: 'BSDATEEnd',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
}, {
fieldLabel: '会计期间',
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: "查询",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [ this.comboxOP, this.comboxTRANCER2, {
fieldLabel: '快递单号',
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: "更多",
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: "保存列表样式",
id: "btntest",
menu: [
{ text: "保存",
handler: function (button, event) {
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
}
}, { text: "初始化",
handler: function (menu, event) {
_this.InitGrid(_this.initgirdcolums);
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
}
}],
scope: this
}, '-',
{
text: "打印",
iconCls: 'btnprint',
menu: [
{
text: "全部",
handler: function (menu, event) {
_this.Print();
}
}, {
text: "选择打印",
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: '快递公司',
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:'范围', //'报文类型',
id: 'sdFILETYPE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
boxLabel:'选中', //'订舱',
name: 'FILETYPE',
checked: true,
inputValue: 'S'
}, {
boxLabel:'全部', //'确认',
name: 'FILETYPE',
inputValue: 'A'
}]
}]
},{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '送单人',
name: 'SEND_MAN'
}, {
fieldLabel:'送单日期', //'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: '快递单号',
name: 'TRANCNO'
}
]//end items(fieldset 1)
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
});
this.winformSongDanShowShow = Ext.create('Ext.window.Window', {
title: "确认送单", //"发送预配舱单",
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: "确认送单", //"确定发送",
minWidth: 70,
handler: function () {
_this.onSongDan();
}
}, {
text: "关闭", //"关闭",
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: '范围', //'报文类型',
id: 'sdFILETYPE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
boxLabel: '选中', //'订舱',
name: 'FILETYPE',
checked: true,
inputValue: 'S'
}, {
boxLabel: '全部', //'确认',
name: 'FILETYPE',
inputValue: 'A'
}]
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '回单人',
name: 'REPEAT_MAN'
}, {
fieldLabel: '回单日期', //'ATD',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'REPEAT_DATE'
}
]//end items(fieldset 1)
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel:'是否回单', //'是否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: "确认回单", //"发送预配舱单",
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: "确认回单", //"确定发送",
minWidth: 70,
handler: function () {
_this.onHuiDan();
}
}, {
text: "关闭", //"关闭",
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: '范围', //'报文类型',
id: 'sdFILETYPE',
defaults: { flex: 1 },
layout: 'hbox',
items: [{
boxLabel: '选中', //'订舱',
name: 'FILETYPE',
checked: true,
inputValue: 'S'
}, {
boxLabel: '全部', //'确认',
name: 'FILETYPE',
inputValue: 'A'
}]
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '还单人',
name: 'RETURN_MAN'
}, {
fieldLabel: '还单日期', //'ATD',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'RETURN_DATE'
}
]//end items(fieldset 1)
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '是否还单', //'是否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: "确认还单", //"发送预配舱单",
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: "确认还单", //"确定发送",
minWidth: 70,
handler: function () {
_this.onHuanDan();
}
}, {
text: "关闭", //"关闭",
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: "正在查询数据...",
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: "正在查询数据...",
scope: this
});
},
onSongDan: function () {
if (this.storeList.getCount() == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
_this.winformSongDanShowShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
} else {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg:'请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
_this.winformSongDanShowShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
},
onCancelSongDan: function () {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
onHuiDan: function () {
if (this.storeList.getCount() == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
_this.winformHuiDanShowShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
} else {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
_this.winformHuiDanShowShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
},
onCancelHuiDan: function () {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
onHuanDan: function () {
if (this.storeList.getCount() == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
_this.winformHuanDanShowShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
} else {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
_this.winformHuanDanShowShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
},
onCancelHuanDan: function () {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', 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: '正在锁定...',
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: '提示',
msg: result.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
return;
} else {
Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
_this.storeList.reload();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
}, //onDeleteClick
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
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);
}
});