Ext.namespace('Shipping');
Shipping.MsOpOtherIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsOpOtherIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsOpOtherIndex, Ext.Panel, {
PageSize: 30,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '',
selectbsno: '',
sortfield: '',
sortdire: '',
initUIComponents: function () {
this.formname = "formMsOpOtherIndex"; //页面名称
//定义数据集
this.storecodeservice = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCodeOpService',
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataCtnList' }
});
this.storecodeserviceSum = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCodeOpService',
proxy: { url: '/MvcShipping/MsCodeOpService/GetDataCtnList' }
});
this.storePLList = Ext.create('Ext.data.Store', {
model: 'MsOpOtherEntity'
});
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'MsOpOtherEntity',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpOther/GetDataList',
reader: {
id: 'BSNO',
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: 'BSSTATUSREF',
header: '业务锁定',
align: 'center',
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "";
}
}
},
{
sortable: true,
dataIndex: 'FEESTATUSREF',
header: '费用锁定',
align: 'center',
width: 60,
renderer: function (value, cellmeta) {
if (value == '锁定') {
return "";
}
}
},
{
sortable: true,
id: '',
dataIndex: 'DRFEESTATUS',
header: '应收费用',
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
} else if (value == '录入状态') {
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_refer';
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
} else if (value == '未录入') {
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settle';
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_pass';
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRFEESTATUS',
header: '应付费用',
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '审核通过') {
meta.tdCls = 'feestatus_pass';
} else if (value == '录入状态') {
} else if (value == '提交审核') {
meta.tdCls = 'feestatus_refer';
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_refer';
} else if (value == '结算完毕') {
meta.tdCls = 'feestatus_settle';
} else if (value == '未录入') {
} else if (value == '部分结算') {
meta.tdCls = 'feestatus_settle';
} else if (value == '部分审核') {
meta.tdCls = 'feestatus_pass';
} else if (value == '部分提交') {
meta.tdCls = 'feestatus_refer';
} else if (value == '驳回提交') {
meta.tdCls = 'feestatus_nopass';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRINVSTATUS',
header: '应收开票',
align: 'center',
width: 60,
renderer: function (value, meta) {
if (value == '已开票') {
meta.tdCls = 'feestatus_pass';
} else if (value == '部分开票') {
meta.tdCls = 'feestatus_refer';
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'DRDUISTATUS',
header:'应收对帐', //'应收开票',
align: 'center',
// xtype: 'actioncolumn',
width: 60,
renderer: function (value, meta, record) {
if (value == '已对账') {
// value = '已开票'
meta.tdCls = 'feestatus_pass';
} else if (value == '部分对账') {
meta.tdCls = 'feestatus_refer';
// value = '部分开票'
}
return value;
}
},
{
sortable: true,
id: '',
dataIndex: 'CRINVSTATUS',
header: '应付开票', //'应收开票',
align: 'center',
// xtype: 'actioncolumn',
width: 60,
renderer: function (value, meta, record) {
var openSet = "height=200, width=650, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2
var openType = "_blank";
var openUrl = "";
openUrl = "../../MvcShipping/MsRptChInvTotal/BsCrView?handle=check&bsno=" + record.data.BSNO;
var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
if (value == '已开票') {
value = '已开票'
meta.tdCls = 'feestatus_pass';
} else if (value == '部分开票') {
meta.tdCls = 'feestatus_refer';
value = '部分开票'
}
return value;
}
}, {
sortable: true,
id: '',
dataIndex: 'BillFeeStatus',
header: '整票状态', //'整票状态',
width: 60,
renderer: function (value, meta) {
if (value == '0') {
return "未提交";
} else if (value == '1') {
meta.tdCls = 'feestatus_refer';
return "整票提交";
} else if (value == '2') {
meta.tdCls = 'feestatus_pass';
return "审核通过";
} else if (value == '4') {
meta.tdCls = 'feestatus_nopass';
return "整票驳回";
} else {
return "";
}
}
}, {
sortable: true,
dataIndex: 'OPLBNAME',
header: '业务类型',
hidden: true,
width: 80
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: '委托单位',
width: 80
}, {
sortable: true,
dataIndex: 'MBLNO',
header: '主提单号',
width: 80
}, {
sortable: true,
dataIndex: 'CONTRACTNO',
header: '合同号',
width: 80
}, {
sortable: true,
dataIndex: 'CUSTNO',
header: '委托编号',
width: 80
}, {
sortable: true,
dataIndex: 'ORDERNO',
header: '订舱编号',
width: 120
}, {
sortable: true,
dataIndex: 'HBLNO',
header: '分提单号',
width: 80
}, {
sortable: true,
dataIndex: 'BSDATE',
header: '接单日期',
width: 80
}, {
sortable: true,
dataIndex: 'ACCDATE',
header: '会计期间',
width: 80
}, {
sortable: true,
dataIndex: 'ETD',
header: 'ETD',
width: 80
}, {
sortable: true,
dataIndex: 'OP',
header: '操作',
width: 80
}, {
sortable: true,
dataIndex: 'SALE',
header: '销售',
width: 80
}, {
sortable: true,
dataIndex: 'CUSTSERVICE',
header: '客服',
width: 80
}, {
sortable: true,
dataIndex: 'OPERATOR',
header: '客户联系人',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCE',
header: '业务来源',
width: 80
}, {
sortable: true,
dataIndex: 'BSSOURCEDETAIL',
header: '来源明细',
width: 80
}, {
sortable: true,
dataIndex: 'TRADETYPE',
header: '贸易方式',
width: 80
}, {
sortable: true,
dataIndex: 'TRANSTYPE',
header: '运输类型',
width: 80
}, {
sortable: true,
dataIndex: 'VESSEL',
header: '船名',
width: 80
}, {
sortable: true,
dataIndex: 'VOYNO',
header: '航次',
width: 80
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: '装货港',
width: 80
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: '卸货港',
width: 80
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header: '品名',
width: 80
}, {
sortable: true,
dataIndex: 'KGS',
header: '毛重',
width: 80
}, {
sortable: true,
dataIndex: 'NETWEIGHT',
header: '净重',
width: 80
}, {
sortable: true,
dataIndex: 'CBM',
header: '尺码',
width: 80
}, {
sortable: true,
dataIndex: 'PKGS',
header: '件数',
width: 80
}, {
sortable: true,
dataIndex: 'KINDPKGS',
header: '件数包装',
width: 80
}, {
sortable: true,
dataIndex: 'VOUNO',
header: '凭证号',
width: 80
}, {
sortable: true,
dataIndex: 'CREATEUSER',
header: '创建人',
width: 80
}, {
sortable: true,
dataIndex: 'CREATETIME',
header: '创建日期',
width: 80
}, {
sortable: true,
dataIndex: 'MODIFIEDUSER',
header: '修改人',
width: 80
}, {
sortable: true,
dataIndex: 'MODIFIEDTIME',
header: '修改日期',
width: 80
}, {
sortable: true,
dataIndex: 'BOOKNO',
header: '手册号',
width: 80
}, {
sortable: true,
dataIndex: 'ENTERP',
header: '经营单位',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'CNTR1',
hidden: true,
header: '箱型1', //'箱型1',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR2',
hidden: true,
header: '箱型2', //'箱型2',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR3',
hidden: true,
header: '箱型3', //'箱型3',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR4',
hidden: true,
header: '箱型4', //'箱型4',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR5',
hidden: true,
header: '箱型5', //'箱型5',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR6',
hidden: true,
header: '箱型6', //'箱型6',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR7',
hidden: true,
header: '箱型7', //'箱型7',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR8',
hidden: true,
header: '箱型8', //'箱型8',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR9',
hidden: true,
header: '箱型9', //'箱型9',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'CNTR10',
hidden: true,
header: '箱型10', //'箱型10',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'OTCNTR',
header: '其他箱型', //'其他箱型',
width: 60
},
{
sortable: true,
id: '',
dataIndex: 'TEU',
header: '箱TEU', //'箱TEU',
width: 40
},
{
sortable: true,
id: '',
dataIndex: 'CNTRTOTAL',
header: '集装箱', //'集装箱',
width: 80
}, {
sortable: true,
dataIndex: 'WAREHOUSE',
header: '仓库',
width: 80
}, {
sortable: true,
dataIndex: 'REMARK',
header: '备注',
width: 200
}, {
sortable: true,
dataIndex: 'AMEND',
header: '更改单', //'更改单',
width: 80,
renderer: function (value, meta, record) {
if (value != '0')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'ISPRINTPR',
header: '打印核算单',
width: 100,
renderer: function (value, meta, record) {
if (value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE1',
header: '服务项目1',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE2',
header: '服务项目2',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE3',
header: '服务项目3',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE4',
header: '服务项目4',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE5',
header: '服务项目5',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE6',
header: '服务项目6',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE7',
header: '服务项目7',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE8',
header: '服务项目8',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE9',
header: '服务项目9',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE10',
header: '服务项目10',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE11',
header: '服务项目11',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE12',
header: '服务项目12',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE13',
header: '服务项目13',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE14',
header: '服务项目14',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE15',
header: '服务项目15',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
sortable: true,
dataIndex: 'IsSERVICE16',
header: '服务项目16',
hidden: true,
width: 100,
renderer: function (value, meta, record) {
if (value == true || value == '1')
return '√';
else
return '';
}
}, {
dataIndex: 'SALECORP',
header:'所属分部', //'货物标识',
width: 120
}, {
dataIndex: 'FRCUSTSERVICE',
header: '单证', //'货物标识',
width: 120
}, {
dataIndex: 'CARRIER',
header: '船公司', //'货物标识',
width: 120
}, {
dataIndex: 'FORWARDER',
header: '订舱代理', //'货物标识',
width: 120
}, {
dataIndex: 'TRUCKER',
header: '车队', //'货物标识',
width: 120
}, {
dataIndex: 'ISSUETYPE',
header: '签单方式', //'货物标识',
width: 120
}, {
dataIndex: 'INVDATE',
header: '账单日期', //'货物标识',
width: 120
}, {
dataIndex: 'PRINTTIME',
header: '核算单打印时间', //'货物标识',
width: 70
}, {
dataIndex: 'BLISSUESTATUS',
header: '提单签发状态', //'货物标识',
width: 70
}];
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;
this.OprationStatus = 'edit';
DsOpenEditWin('/MvcShipping/MsOpOther/Edit', record.data.BSNO);
}, 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.storeTRANSTYPE = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsShipping.ux.CustomerRefModel',
// proxy: { url: '/MvcShipping/MsBaseInfo/GetTRANSTYPERefList' }
// });
// this.storeTRANSTYPE.load({ params: { condition: ""} });
// this.comboxTRANSTYPE = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '运输方式',
// store: this.storeTRANSTYPE,
// forceSelection: true,
// name: 'TRANSTYPE',
// valueField: 'DESCRIPTION',
// displayField: 'CodeAndName'
// });
//新版键值维护表_运输类型//报关业务类型96004
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();
}
}
}
});
//
//状态_业务状态
Ext.define('BSSTATUSModel', {
extend: 'Ext.data.Model',
fields: [
{ name: 'Name', type: 'string' }
]
});
var dataBSSTATUS = [{ "Name": "未锁定" }, { "Name": "锁定" }, { "Name": ""}];
var storeBSSTATUS = Ext.create('Ext.data.Store', {
model: 'BSSTATUSModel',
data: dataBSSTATUS
});
//业务状态
this.comboxBSSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '业务锁定',
forceSelection: true,
store: storeBSSTATUS,
name: 'BSSTATUS',
valueField: 'Name',
displayField: 'Name'
});
//费用状态
this.comboxFEESTATUS = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '费用锁定',
forceSelection: true,
store: storeBSSTATUS,
name: 'FEESTATUS',
valueField: 'Name',
displayField: 'Name'
});
//人员信息加载
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
});
this.storeOpCode.load();
//操 作
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '操 作',
store: this.storeOpCode,
forceSelection: true,
name: 'OP',
queryMode: 'remote',
//flex: 0.5,
minChars: 0,
queryParam: 'CODENAME',
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.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
//委托单位
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.storeISPRINT = Ext.create('Ext.data.Store', {
fields: ['FSTATUS', 'NAME']
});
this.storeISPRINT.add({ "FSTATUS": "", "NAME": "全部" });
this.storeISPRINT.add({ "FSTATUS": "1", "NAME": "已打印" });
this.storeISPRINT.add({ "FSTATUS": "2", "NAME": "未打印" });
this.comboxISPRINT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '核算单',
store: this.storeISPRINT,
valueField: 'FSTATUS',
displayField: 'NAME',
//labelWidth: 60,
//flex: 0.6,
forceSelection: true,
name: 'ISPRINT',
value: '0',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
}
});
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 90,
msgTarget: 'qtip'
},
items: [{
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: 'CONTRACTNO',
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.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: [{
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.comboxOP, {
text: "重置",
xtype: 'button',
width: 90,
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxBSSTATUS, this.comboxFEESTATUS, {
fieldLabel: '开船月份', //'会计期间',
//flex: 0.6,
xtype: 'monthfield',
name: 'FRMONTH'
}, {
fieldLabel: '开船月份', //'会计期间',
//flex: 0.6,
xtype: 'monthfield',
name: 'TOMONTH'
}, this.comboxISPRINT, { 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: "新建",
iconCls: "btnadd",
handler: function (button, event) {
this.OprationStatus = 'add';
DsOpenEditWin('/MvcShipping/MsOpOther/Edit');
},
scope: this
}, {
text: "删除",
iconCls: "btndelete",
handler: function (button, event) {
this.onDeleteClick(button, event);
},
scope: this
}, {
text: "复制", //"复制",
id: 'btncopyaddbs',
menu: [{
text: "复制新建",
iconCls: "btnadd",
handler: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要复制的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
this.SelectedRecord = record;
this.OprationStatus = 'copyadd';
DsOpenEditWin('/MvcShipping/MsOpOther/Edit');
},
scope: this
}, {
text: "复制新建(含费用)", //"复制新建",
iconCls: "btnadd",
handler: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要复制的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
this.SelectedRecord = record;
this.OprationStatus = 'copyaddfee';
DsOpenEditWin('/MvcShipping/MsOpOther/Edit');
},
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
}, '-' ,{
text:'导出EXCEL', //"EXCEL模板导出",
iconCls: "btnexportexcel",
handler: function (button, event) {
this.onExportClick(button, event);
},
scope: this
}, '-', {
text: "其他操作",
menu: [
{ text: "批量状态更新",
handler: function (menu, event) {
_this.onUpOpStatusClick(menu, event, 1);
}
}, {
text: "业务批量修改", //"业务批量修改",
handler: function (menu, event) {
_this.winModifyShow.show();
}
}, {
text: "批量修改账单日期", //"业务批量修改",
handler: function (menu, event) {
_this.winModifyDateShow.show();
}
}, { text: "费用编辑",
handler: function (menu, event) {
_this.onFeeEditClick(menu, event);
}
}, { text: "批量费用提交",
handler: function (menu, event) {
_this.onPiLiangSubmitClick(menu, event, 1);
}
}, { text: "服务模板费用",
handler: function (menu, event) {
_this.onPiLiangServiceFeeClick(menu, event);
}
}, {
text: "导入业务(ZH)", //"EXCEL导入",
iconCls: "btnexportexcel",
handler: function (button, event) {
this.onImportBill2Click(button, event);
},
scope: this
}, {
text: "EXCEL导入", //"EXCEL导入",
iconCls: "btnexportexcel",
handler: function (button, event) {
this.onImportBillClick(button, event);
},
scope: this
}, { text: '批量整票提交', //"批量整票提交",
handler: function (menu, event) {
_this.onPiLiangZhengPiaoTiJiaoClick(1);
}
}, {
text: '撤销批量整票提交', //"批量整票提交",
handler: function (menu, event) {
_this.onPiLiangZhengPiaoTiJiaoClick(0);
}
}
//, {
// text: "青岛场站数据", //"青岛场站数据",
// handler: function (menu, event) {
// _this.onGETYARDClick(menu, event);
// }
//}
],
scope: this
}]
});
//#region 合计列表
this.SumField = [
{ name: 'NOBILL', type: 'number' },
{ name: 'TEU', type: 'number' }
];
this.storeSumList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: this.SumField,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpApply/GetDataListSum',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.girdcolumsSum = [{
sortable: true,
dataIndex: 'NOBILL',
header: '票数',
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
align: 'right',
width: 80
}
];
this.gridListSum = new Ext.grid.GridPanel({
store: this.storeSumList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsSum
});
this.panelSum = new Ext.Panel({
// title: '合 计',
layout: "border",
height: 70,
region: 'south',
margin: '0 0',
frame: true,
items: [this.gridListSum]
});
//#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.panelSum]
});
this.InitGrid(this.girdcolums);
var myDate = new Date();
var mydatestr = Ext.util.Format.date(myDate, 'Y-m');
this.sqlcontext = " op_other.ACCDATE='" + mydatestr + "'";
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.sqlcontext },
waitMsg: "正在查询数据...",
scope: this
});
this.storeList.on('beforeload', function (store) {
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
}, this);
this.onRefreshSumClick(this.sqlcontext);
//#region 批量修改窗体
//客户加载_报关报检
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
});
this.storeOpCode.load();
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '揽货人', //'揽货人',
store: this.storeOpCode,
queryMode: 'remote',
//flex: 0.5,
minChars: 0,
queryParam: 'CODENAME',
name: 'SALE',
valueField: 'UserName',
displayField: 'CodeAndName'
});
//业务来源
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'
});
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '操作', //'客服',
store: this.storeOpCode,
forceSelection: true,
queryMode: 'remote',
minChars: 0,
queryParam: 'CODENAME',
name: 'OP',
//labelWidth: 45,
//flex: 0.6,
valueField: 'UserName',
displayField: 'CodeAndName'
});
//客户加载_委托单位
this.storeCustCodeM = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListController' }
});
// this.storeCustCode.load({ params: { condition: "ISCONTROLLER='1'"} });
// this.storeCustCode.loadData(mainWin.GetPubStore("OPSEAE_CUST_ISCONTROLLER").data.items);
//委托单位
this.comboxCustCodeM = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '委托单位', //'委托单位',
store: this.storeCustCodeM,
queryMode: 'remote',
matchFieldWidth: false,
minChars: 1,
queryParam: 'CODENAME',
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
}
//,
//'beforequery': function (e) {
// return FilterCombox(e,2);//在beforequery使用此方法
//}
, specialkey: function (field, e) {
//if (e.getKey() == e.ENTER) {
// e.keyCode = 9;
//}
if (e.keyCode == 9) {
if (field.value == null) {
_rec = _this.storeCustCode.getAt(0);
_this.formModify.getForm().findField('CUSTOMERNAME').setValue(_rec.data.CustName);
}
}
}
}
});
//所属部门
this.storeDept = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.DeptModel',
proxy: { url: '/CommMng/BasicDataRef/GetDeptList' }
});
this.storeDept.load();
this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.SALEDEPT2, //'所属部门',
store: this.storeDept,
//flex: 0.5,
//labelWidth: 55,
forceSelection: true,
name: 'SALEDEPT',
valueField: 'DeptName',
displayField: 'DeptName'
//,hidden: true
});
this.storeSaleCompany = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsCompanysEntity',
proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' }
});
this.storeSaleCompany.load({ params: { condition: "" } });
this.comboxSaleCompany = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '所属分部', //'委托分公司',
store: this.storeSaleCompany,
forceSelection: true,
name: 'SALECORPID',
valueField: 'GID',
displayField: 'NAME'
});
this.formModify = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 60,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxCustCodeM, this.comboxBSSOURCE, this.comboxOP
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '开船日期', //'开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'ETD'
}, {
fieldLabel: '会计期间',
xtype: 'monthfield',
name: 'ACCDATE'
}, this.comboxSaleCompany
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
me = this;
this.winModifyShow = Ext.create('Ext.window.Window', {
title: "批量修改", //"批量修改",
width: 820,
//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.formModify],
buttons: [{
text: "确认修改", //"确认修改",
minWidth: 70,
handler: function () {
me.onModifyClick()
}
}, {
text: "关闭", //"关闭",
minWidth: 70,
handler: function () {
me.winModifyShow.close();
}
}]
});
this.formModifyDate = Ext.widget('form', {
region: 'north',
frame: true,
bodyPadding: 5,
fieldDefaults: {
margins: '2 2 2 2',
labelAlign: 'right',
flex: 1,
labelWidth: 60,
msgTarget: 'qtip'
},
items: [
{//fieldset 1
xtype: 'fieldset',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [ {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [{
fieldLabel: '账单日期', //'开船日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',
name: 'INVDATE'
}
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
}); //end this.formEdit
me = this;
this.winModifyDateShow = Ext.create('Ext.window.Window', {
title: "批量修改账单日期", //"批量修改",
width: 320,
//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.formModifyDate],
buttons: [{
text: "确认修改", //"确认修改",
minWidth: 70,
handler: function () {
me.onModifyDateClick()
}
}, {
text: "关闭", //"关闭",
minWidth: 70,
handler: function () {
me.winModifyDateShow.close();
}
}]
});
//#endregion
}, //end initUIComponents
InitGrid: function (grid) {
//var agirdcolums = Ext.clone(this.gridList.columns);
var agirdcolums = grid;
this.storecodeservice.load({ params: { condition: "OPTYPE='7'" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
for (i = 0; i < this.storecodeservice.getCount(); i += 1) {
var itemindex = i + 1;
var memberyf = this.storecodeservice.getAt(i);
for (var j = 0; j < agirdcolums.length; j++) {
if ((agirdcolums[j].dataIndex == 'Is' + memberyf.data.OPField) || (agirdcolums[j].dataIndex ==memberyf.data.OPField)) {
agirdcolums[j].header = memberyf.data.SERVICENAME;
// agirdcolums[j].hidden = false;
}
}
};
}
this.gridList.reconfigure(this.storeList, agirdcolums);
}
},
scope: this
});
// 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
});
this.onRefreshSumClick(sql);
},
onRefreshSumClick: function (sql) {
this.SumField = [
{ name: 'NOBILL', type: 'number' },
{ name: 'TEU', type: 'number' }
];
this.girdcolumsSum = [{
sortable: true,
dataIndex: 'NOBILL',
header: '票数',
align: 'right',
width: 80
}, {
sortable: true,
dataIndex: 'TEU',
header: 'TEU',
align: 'right',
width: 80
}
];
_this = this;
this.storecodeserviceSum.load({ params: { condition: "OPTYPE='7'" },
callback: function (r, options, success) {
if (success) {
if (r.length != 0) {
for (i = 0; i < _this.storecodeserviceSum.getCount(); i += 1) {
var itemindex = i + 1;
var memberyf = _this.storecodeserviceSum.getAt(i);
_this.SumField.push({ name: memberyf.data.OPField, type: 'number' });
_this.girdcolumsSum.push({
sortable: true,
dataIndex: memberyf.data.OPField,
header: memberyf.data.SERVICENAME,
width: 80
});
};
}
_this.SumField.push({ name: 'OTCNTR', type: 'number' });
_this.girdcolumsSum.push({
sortable: true,
dataIndex:'OTCNTR',
header: '其他箱型',
width: 80
});
_this.SumField.push({ name: 'PKGS', type: 'number' });
_this.girdcolumsSum.push({
sortable: true,
dataIndex: 'PKGS',
header: '件数',
width: 80
});
_this.SumField.push({ name: 'KGS', type: 'number' });
_this.girdcolumsSum.push({
sortable: true,
dataIndex: 'KGS',
header: '毛重',
width: 80
});
_this.SumField.push({ name: 'CBM', type: 'number' });
_this.girdcolumsSum.push({
sortable: true,
dataIndex: 'CBM',
header: '尺码',
width: 80
});
_this.storeSumList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
fields: _this.SumField,
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsOpOther/GetDataListSum',
reader: {
id: '',
root: 'data',
totalProperty: 'totalCount'
}
}
});
_this.gridListSum.reconfigure(_this.storeSumList, _this.girdcolumsSum);
_this.storeSumList.load({
params: { 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
});
this.onRefreshSumClick(sql);
},
onDeleteClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
if (record.data.BSSTATUS == '1') {
Ext.Msg.show({ title: '警告', msg: '业务已锁定,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
if (record.data.FEESTATUS == '1') {
Ext.Msg.show({ title: '警告', msg: '费用已锁定,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
if (this.StoreOpRange.getCount() == 0) {
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
} else {
var op = record.data.OP;
var CREATEUSER = record.data.CREATEUSER;
var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', op);
if (records.getCount() > 0) {
} else {
var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', CREATEUSER);
if (recordins.getCount() > 0) {
} else {
canedit = false;
Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
return;
}
}
}
//
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/MvcShipping/MsOpOther/Delete',
params: {
data: Ext.JSON.encode(record.data)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeList.remove(record);
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
}, //onDeleteClick
onUpOpStatusClick: function (menu, event, type) {
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 BSNOStr = '';
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
var BSNO = "'" + rec.data.BSNO + "'";
if (BSNOStr == '')
BSNOStr = BSNO;
else {
BSNOStr = BSNOStr + ',' + BSNO;
}
}
if (BSNOStr == '') {
Ext.Msg.show({ title: '提示', msg: '没有要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
this.selectbsno = " BSNO IN (" + BSNOStr + ")";
window.open('/MvcShipping/MsOpStatus/PiLiang', "PILIANGOPSTATUS", 'width=1200,height=600,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes');
}
},
onPiLiangSubmitClick: function (menu, event, type) {
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 BSNOStr = '';
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
var BSNO = "'" + rec.data.BSNO + "'";
if (BSNOStr == '')
BSNOStr = BSNO;
else {
BSNOStr = BSNOStr + ',' + BSNO;
}
}
this.storePLList.removeAll();
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
this.storePLList.add(rec.data);
}
if (BSNOStr == '') {
Ext.Msg.show({ title: '提示', msg: '没有要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
this.selectbsno = " BSNO IN (" + BSNOStr + ")";
window.open('/Account/Chfee_Audit/PiLiangSubmit', "PILIANGSUBMIT", 'width=1200,height=600,top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes');
}
},
//#region EXCEL导入
onImportBillClick: function (button, event) {
var BSNO = "";
me = this;
var imgform = new Ext.FormPanel({
region: 'center',
labelWidth: 20,
frame: true,
autoScroll: false,
border: false,
fileUpload: true,
items: [{
xtype: 'fileuploadfield',
id: 'LoadExcel',
name: 'LoadExcel',
emptyText: '请选择EXCEL文件', //'请选择EXCEL文件',
fieldLabel: 'EXCEL', //'EXCEL',
buttonText: '选择文件', //'选择文件',
allowBlank: false,
width: 200,
buttonCfg:
{
iconCls: 'uploaddialog'
},
anchor: '98%'
}],
buttons: [{
text: '上传', //'上传',
type: 'submit',
handler: function () {
var UserFilePath = Ext.getCmp('LoadExcel').getValue();
if (!CheckFileExt(UserFilePath, /.xls|.xlsx/i)) {
Ext.Msg.show({ title: '错误', msg: '请确认你上传的文件为EXCEL文件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'请确认你上传的文件为EXCEL文件!'
return;
}
if (!imgform.form.isValid()) { return; }
imgform.form.submit({
url: '/MvcShipping/MsOpOther/ImportBl',
waitMsg: '正在操作数据',
method: 'POST',
success: function (form, action) {
win.close(this);
var result = action.result;
_this.storeList.reload();
},
failure: function (form, action) {
form.reset();
if (action.failureType == Ext.form.Action.SERVER_INVALID)
Ext.MessageBox.alert('警告', action.result.errors.msg);
}
});
}
}, {
text: '关闭', //'关闭',
type: 'submit',
handler: function () {
win.close(this);
}
}]
});
var win = new Ext.Window({
title: "上传EXCEL", //"上传EXCEL",
width: 380,
height: 120,
modal: true,
resizable: false,
border: false,
items: imgform
});
win.show();
return;
},
onImportBill2Click: function (button, event) {
var BSNO = "";
me = this;
var imgform = new Ext.FormPanel({
region: 'center',
labelWidth: 20,
frame: true,
autoScroll: false,
border: false,
fileUpload: true,
items: [{
xtype: 'fileuploadfield',
id: 'LoadExcel',
name: 'LoadExcel',
emptyText: '请选择EXCEL文件', //'请选择EXCEL文件',
fieldLabel: 'EXCEL', //'EXCEL',
buttonText: '选择文件', //'选择文件',
allowBlank: false,
width: 200,
buttonCfg:
{
iconCls: 'uploaddialog'
},
anchor: '98%'
}],
buttons: [{
text: '上传', //'上传',
type: 'submit',
handler: function () {
var UserFilePath = Ext.getCmp('LoadExcel').getValue();
if (!CheckFileExt(UserFilePath, /.xls|.xlsx/i)) {
Ext.Msg.show({ title: '错误', msg: '请确认你上传的文件为EXCEL文件!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'请确认你上传的文件为EXCEL文件!'
return;
}
if (!imgform.form.isValid()) { return; }
imgform.form.submit({
url: '/MvcShipping/MsOpOther/ImportBlZh',
waitMsg: '正在操作数据',
method: 'POST',
success: function (form, action) {
win.close(this);
var result = action.result;
_this.storeList.reload();
},
failure: function (form, action) {
form.reset();
if (action.failureType == Ext.form.Action.SERVER_INVALID)
Ext.MessageBox.alert('警告', action.result.Message);
}
});
}
}, {
text: '关闭', //'关闭',
type: 'submit',
handler: function () {
win.close(this);
}
}]
});
var win = new Ext.Window({
title: "上传EXCEL", //"上传EXCEL",
width: 380,
height: 120,
modal: true,
resizable: false,
border: false,
items: imgform
});
win.show();
return;
},
//#endregion
//#region 批量修改
onModifyClick: function (menu, event) {
var GidStr = '';
var records = this.GridCheckBoxModel.selected.items;
if (records.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要修改的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务!
return;
}
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
if (rec.data.BSSTATUS == 'true') {
Ext.Msg.show({ title: '警告', msg: '已业务锁定不能修改业务', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
} else {
var op = rec.data.OP;
var inputby = rec.data.INPUTBY;
var mrecords = DsStoreQueryBy(this.StoreOpRange, 'OPID', op);
if (mrecords.getCount() > 0) {
bodyAddDatas.push(rec);
} else {
var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby);
if (recordins.getCount() > 0) {
bodyAddDatas.push(rec);
} else {
canedit = false;
Ext.Msg.show({ title: '警告', msg: '权限不足,不能修改', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
}
}
}
}
var data = this.formModify.getForm().getValues();
_this = this;
if (bodyAddDatas.length == 0) {
Ext.Msg.show({ title: '提示', msg: '没有要修改的业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: '正在修改业务...',
url: '/MvcShipping/MsOpOther/modify',
params: {
data: jsonbodyAddDatas,
modifydata: 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.onDsQuery();
_this.winModifyShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
},
onModifyDateClick: function (menu, event) {
var GidStr = '';
var records = this.GridCheckBoxModel.selected.items;
if (records.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要修改的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要修改的业务!
return;
}
var bodyAddDatas = [];
for (var i = 0; i < records.length; i++) {
var rec = records[i];
var op = rec.data.OP;
var inputby = rec.data.INPUTBY;
var mrecords = DsStoreQueryBy(this.StoreOpRange, 'OPID', op);
if (mrecords.getCount() > 0) {
bodyAddDatas.push(rec);
} else {
var recordins = DsStoreQueryBy(this.StoreOpRange, 'OPID', inputby);
if (recordins.getCount() > 0) {
bodyAddDatas.push(rec);
} else {
canedit = false;
Ext.Msg.show({ title: '警告', msg: '权限不足,不能修改', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
}
}
}
var data = this.formModifyDate.getForm().getValues();
_this = this;
if (bodyAddDatas.length == 0) {
Ext.Msg.show({ title: '提示', msg: '没有要修改的业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
Ext.Ajax.request({
waitMsg: '正在修改业务...',
url: '/MvcShipping/MsOpOther/modifyInvDate',
params: {
data: jsonbodyAddDatas,
modifydata: 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.onDsQuery();
_this.winModifyDateShow.close();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
},
//#endregion
//#region 批量模板费用
onPiLiangServiceFeeClick: function (button, event) {
var GidStr = '';
var records = this.GridCheckBoxModel.selected.items;
if (records.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
this.storePLList.removeAll();
for (var i = 0; i < records.length; i++) {
var rec = records[i];
this.storePLList.add(rec.data);
}
_this = this;
if (this.storePLList.length == 0) {
Ext.Msg.show({ title: '提示', msg: '没有要更新的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
DsOpenEditWin('/MvcShipping/MsOpOther/PiLiangServiceFeeEdit');
}
},
//#endregion
onGETYARDClick: function (button, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请选择业务', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
var BSNO = record.data.BSNO;
var MBLNO = record.data.MBLNO;
var YARD = record.data.YARD;
if (MBLNO == "" || YARD == "") {
Ext.Msg.show({ title: '提示', msg:'主提单号和场站不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //'提单号和场站不能为空!'
return;
} else {
Ext.Msg.wait('正在查询数据...');
Ext.Ajax.request({
waitMsg: '正在查询数据...',
url: '/MvcShipping/MsOpSeae/GetyardctnList',
params: {
bs: BSNO,
mblno: MBLNO,
yard: YARD,
isweb: true
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var statusdata = jsonresult.data;
var boxitems = "";
formCustomDataShow = Ext.widget('form', {
region: 'center',
autoScroll: true, height: 460,
// border: false,
bodyPadding: 0,
html: jsonresult.data
});
me = this;
winCustomDataShow = Ext.create('Ext.window.Window', {
title: "",
// closeAction: 'hide',
width: 1100,
height: 500,
layout: 'fit',
resizable: true,
modal: true,
closeAction: 'close',
closable: true,
items: [formCustomDataShow],
buttons: [{
text: "关闭", //"关闭",
minWidth: 70,
handler: function () {
winCustomDataShow.close();
}
}]
});
winCustomDataShow.show();
Ext.Msg.hide();
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '错误', msg: '服务器响应出错!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) { },
scope: this
}); //end Ext.Ajax.request
}
},
onFeeEditClick: function (menu, event) {
var selections = this.gridList.getSelectionModel().getSelection();
if (selections.length == 0) {
Ext.Msg.show({ title: '提示', msg: '请先选择业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
var record = selections[0];
this.SelectedRecord = record;
this.OprationStatus = 'edit';
DsOpenEditWin('/MvcShipping/MsOpOther/PiLiangFeeEdit');
},
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
return '';
}
var sql = '';
var MBLNO = form.findField('MBLNO').getValue();
MBLNO = MBLNO.trim();
sql = sql + getAndConSql(sql, MBLNO, "MBLNO like '%" + MBLNO + "%'");
var CUSTNO = form.findField('CUSTNO').getValue();
sql = sql + getAndConSql(sql, CUSTNO, "CUSTNO like '%" + CUSTNO + "%'");
// 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, "ACCDATE='" + ACCDATE + "'");
var CONTRACTNO = form.findField('CONTRACTNO').getValue();
sql = sql + getAndConSql(sql, CONTRACTNO, "CONTRACTNO like '%" + CONTRACTNO + "%'");
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 FRMONTH = form.findField('FRMONTH').getRawValue();
sql = sql + getAndConSql(sql, FRMONTH, "ETD>='" + FRMONTH + "-01'");
var TOMONTH = form.findField('TOMONTH').getRawValue();
if (TOMONTH != '') {
var now = new Date(TOMONTH + "-01"); //当前日期
var nowMonth = now.getMonth(); //当前月
var nowYear = now.getFullYear(); //当前年
var mydateend = new Date(nowYear, nowMonth, getMonthDays(nowMonth));
var mydatestr = Ext.util.Format.date(mydateend, 'Y-m-d');
sql = sql + getAndConSql(sql, TOMONTH, "ETD <='" + mydatestr + "'");
}
var BSDATEBgn = form.findField('BSDATEBgn').getRawValue();
sql = sql + getAndConSql(sql, BSDATEBgn, "CONVERT(char(10), BSDATE, 20) >='" + BSDATEBgn + "'");
var BSDATEEnd = form.findField('BSDATEEnd').getRawValue();
sql = sql + getAndConSql(sql, BSDATEEnd, "CONVERT(char(10), BSDATE, 20) <='" + BSDATEEnd + "'");
//业务状态
var BSSTATUS = form.findField('BSSTATUS').getValue();
if (BSSTATUS != null) {
if (BSSTATUS.toString().trim() == "锁定") {
sql = sql + getAndConSql(sql, BSSTATUS, "BSSTATUS=1");
}
else if (BSSTATUS.toString().trim() == "未锁定") {
sql = sql + getAndConSql(sql, BSSTATUS, "BSSTATUS=0");
}
}
//费用状态
var FEESTATUS = form.findField('FEESTATUS').getValue();
if (FEESTATUS != null) {
if (FEESTATUS.toString().trim() == "锁定") {
sql = sql + getAndConSql(sql, FEESTATUS, "FEESTATUS=1");
}
else if (FEESTATUS.toString().trim() == "未锁定") {
sql = sql + getAndConSql(sql, FEESTATUS, "FEESTATUS=0");
}
}
var ISPRINT = form.findField('ISPRINT').getValue();
if (ISPRINT == '2') {
sql = sql + getAndConSql(sql, ISPRINT, " ISNULL(ISPRINTPR,'')<>'1'");
} else
sql = sql + getAndConSql(sql, ISPRINT, "ISNULL(ISPRINTPR,'')='" + ISPRINT + "'");
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;
},
onExportClick: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsOpOther/GetDataListStr',
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 = 'MSOPOTHERLIST';
var sql1 = returnstr;
sql1 = sql1.replace(/\+/g, "@@@")
if (sql1 != '') {
GridExportBySql(sql1, this.formname, '综合业务列表.xls');
}
} 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
});
}
}
});
},
Print: function () {
_this = this;
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/MvcShipping/MsOpOther/GetDataListStr',
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 = 'MSOPOTHERLIST';
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 = "BSDATE desc"
var feeGidSql = '';
for (var i = 0; i < selectedRecords.length; i++) {
var record = selectedRecords[i];
var feeGId = "'" + record.get('BSNO') + "'";
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 = 'MSOPOTHERLISTSELECT';
var sql1 = "select *,(SELECT TOP 1 STATUS FROM OP_STATUS WHERE BSNO=op_other.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS from op_other WHERE BSNO IN (" + feeGidSql + ") order by " + sortstr;
var sql2 = "select *,(SELECT TOP 1 STATUS FROM OP_STATUS WHERE BSNO=op_other.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS from op_other where BSNO='" + bsno + "'";
var sql3 = "";
var sql4 = "";
var sql5 = "";
var sql6 = "";
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
},
//#region 2018年2月7日 李进举 鼎世 批量整票提交
onPiLiangZhengPiaoTiJiaoClick: function (type) {
var selections = this.GridCheckBoxModel.selected.items;
if (selections.length == 0) {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.QingXianXuanZeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); //请先选择要更新的业务!
return;
}
var BSNOStr = '';
for (var i = 0; i < selections.length; i++) {
var rec = selections[i];
var BSNO = "'" + rec.data.BSNO + "'";
if (BSNOStr == '')
BSNOStr = BSNO;
else {
BSNOStr = BSNOStr + ',' + BSNO;
}
}
if (BSNOStr == '') {
Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.MeiYouYaoGengXinDeYeWu, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
} else {
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/MsOpSeae/PiLiangZhengPiaoTiJiao',
params: {
bsno: BSNOStr,
statusvalue: 1
},
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 {
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.sqlcontext, load: 'true' },
waitMsg: Zi.LAN.ZhengZaiChaXunShuJu, //"正在查询数据...",
scope: this
});
Ext.Msg.show({
title: '提示',
msg: result.Message,
icon: Ext.MessageBox.OK,
buttons: Ext.Msg.OK
});
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
});
}
}
//#endregion
});