|
|
//押箱管理
|
|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.OP_SERVICEBILLIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.OP_SERVICEBILLIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.OP_SERVICEBILLIndex, Ext.Panel, {
|
|
|
PageSize: 50,
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
pageSize: 50,
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
ChangeListData:null,
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
this.formname = "OP_SERVICEBILLIndex";
|
|
|
|
|
|
this.sqlcontext = '';
|
|
|
|
|
|
/////////////////////////////////////////
|
|
|
//#region 主列表
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'OP_SERVICEBILLmb',
|
|
|
remoteSort: false,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
//url: '/TruckMng/MsRptPcHeadOperate/QryData_ADL',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/GetDataList',
|
|
|
//this.storeList.proxy.url = '/TruckMng/MsRptPcHeadOperate/QryData_ADL';
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.column = [
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: 'BSNO',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'PARENTID',
|
|
|
header: 'PARENTID',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'CORPID',
|
|
|
header: 'CORPID',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'SALECORPID',
|
|
|
header: 'SALECORPID',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'DEPT',
|
|
|
header: 'DEPT',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'SALEDEPT',
|
|
|
header: 'SALEDEPT',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'SALE',
|
|
|
header: 'SALE',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'BSSTATUS',
|
|
|
header: 'BSSTATUS',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'FEESTATS',
|
|
|
header: 'FEESTATS',
|
|
|
width: 30
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BILLSTATUS',
|
|
|
header: Zi.LAN.OPSTATUS,
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
var BSNO = record.data.BSNO;
|
|
|
|
|
|
var btnstr = '<a href="#" >' + value +'</a>'
|
|
|
|
|
|
return btnstr;
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '委托编号',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: '委托单位',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: Zi.LAN.MBLNO,
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SERVICETYPE',
|
|
|
header: Zi.LAN.SERVICETYPE,
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSDATE',
|
|
|
header: Zi.LAN.INPUTDATE,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: Zi.LAN.ETA,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'ATA', hidden: true,
|
|
|
header: Zi.LAN.ATA,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VESSEL',
|
|
|
header: Zi.LAN.VESSEL,
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'VOYNO',
|
|
|
header: Zi.LAN.VOYNO,
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: Zi.LAN.CARRIER,
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'SHIPAGENCY',
|
|
|
header: Zi.LAN.SHIPAGENCY,
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEE_1',
|
|
|
header: Zi.LAN.FEETITLE,
|
|
|
width: 80
|
|
|
}, {
|
|
|
dataIndex: 'CangDanShiJian',
|
|
|
header: '舱单',
|
|
|
align: 'center',
|
|
|
width: 35,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
if (value != "") {
|
|
|
return "<div title=\"" + value + "\"><img src=\"/images/yuan.png\" height=\"12\" width=\"12\" /></div>"
|
|
|
} else {
|
|
|
return "<b style=\"color:#FF0000\">---</b>";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'HaiFangShiJian',
|
|
|
header: '海放',
|
|
|
align: 'center',
|
|
|
width: 35,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
if (value != "") {
|
|
|
return "<div title=\"" + value + "\"><img src=\"/images/yuan.png\" height=\"12\" width=\"12\" /></div>"
|
|
|
} else {
|
|
|
return "<b style=\"color:#FF0000\">---</b>";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'TiHuo',
|
|
|
header: '提货',
|
|
|
align: 'center',
|
|
|
width: 35,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
if (value == "已提货") {
|
|
|
return "<div title=\"" + value + "\"><img src=\"/images/yuan.png\" height=\"12\" width=\"12\" /></div>"
|
|
|
} else if (value == "部分提货") {
|
|
|
return "<div title=\"" + value + "\"><img src=\"/images/yuan2.png\" height=\"12\" width=\"12\" /></div>"
|
|
|
} else {
|
|
|
return "<b style=\"color:#FF0000\">---</b>";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
dataIndex: 'FanKong',
|
|
|
header: '返空',
|
|
|
align: 'center',
|
|
|
width: 35,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
|
|
|
if (value == "已返空") {
|
|
|
return "<div title=\"" + value + "\"><img src=\"/images/yuan.png\" height=\"12\" width=\"12\" /></div>"
|
|
|
} else if (value == "部分返空") {
|
|
|
return "<div title=\"" + value + "\"><img src=\"/images/yuan2.png\" height=\"12\" width=\"12\" /></div>"
|
|
|
} else {
|
|
|
return "<b style=\"color:#FF0000\">---</b>";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBY',
|
|
|
header: Zi.LAN.OP,
|
|
|
width: 80
|
|
|
}
|
|
|
,{
|
|
|
sortable: true,
|
|
|
dataIndex: 'OT1',
|
|
|
header: '其他操作',
|
|
|
align: 'center',
|
|
|
// xtype: 'actioncolumn',
|
|
|
width: 80,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
//var BSNO = record.data.BSNO;
|
|
|
var docname = "单据管理";
|
|
|
|
|
|
if (value > 0) {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
docname += "(" + value + ")";
|
|
|
}
|
|
|
|
|
|
var btnstr = '<a href="#" >' + docname +'</a>'
|
|
|
|
|
|
return btnstr;
|
|
|
}
|
|
|
}
|
|
|
, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OT2',
|
|
|
header: '',
|
|
|
align: 'center',
|
|
|
// xtype: 'actioncolumn',
|
|
|
width: 55,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
//var BSNO = record.data.BSNO;
|
|
|
var docname = "反馈";
|
|
|
if (value > 0) {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
docname += "(" + value + ")";
|
|
|
}
|
|
|
|
|
|
|
|
|
var btnstr = '<a href="#" >' + docname +'</a>'
|
|
|
|
|
|
return btnstr;
|
|
|
}
|
|
|
}
|
|
|
, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OT3',
|
|
|
header: '',
|
|
|
align: 'center',
|
|
|
// xtype: 'actioncolumn',
|
|
|
width: 55,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
//alert(value);
|
|
|
|
|
|
//var BSNO = record.data.BSNO;
|
|
|
var docname = "账单";
|
|
|
if (value > 0) {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
docname += "(" + value + ")";
|
|
|
} else {
|
|
|
if (record.data.GETBILL == "true") {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
}
|
|
|
var btnstr = '<a href="#" >' + docname +'</a>'
|
|
|
//var filejson = value;
|
|
|
return btnstr;
|
|
|
|
|
|
//var openSet = "height=1000, width=950, 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/OP_SERVICEBILL/Edit?handle=edit&BSNO=" + record.data.BSNO;
|
|
|
//var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')";
|
|
|
//value = '<a href="' + openUrl + '" onclick="' + winstr + ';return false">' + value + '</a>'
|
|
|
|
|
|
//return value;
|
|
|
}
|
|
|
}
|
|
|
, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OT4',
|
|
|
header: '',
|
|
|
align: 'center',
|
|
|
// xtype: 'actioncolumn',
|
|
|
width: 55,
|
|
|
renderer: function (value, meta, record) {
|
|
|
|
|
|
|
|
|
//var BSNO = record.data.BSNO;
|
|
|
|
|
|
if (value > 0) {
|
|
|
meta.tdCls = 'feestatus_pass';
|
|
|
} else {
|
|
|
if (record.data.GETINV == "true") {
|
|
|
meta.tdCls = 'feestatus_refer';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var btnstr = '<a href="#" >发票</a>'
|
|
|
|
|
|
return btnstr;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 40
|
|
|
});
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
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.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
|
|
|
//selModel: this.MainCB,
|
|
|
columns: this.column,
|
|
|
plugins: [
|
|
|
//this.cellEditing
|
|
|
],
|
|
|
features: [{
|
|
|
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
|
|
|
}],
|
|
|
/*features: [{
|
|
|
id: 'group',
|
|
|
ftype: 'grouping',
|
|
|
groupHeaderTpl: '{name}',
|
|
|
hideGroupedHeader: true,
|
|
|
enableGroupingMenu: true
|
|
|
}],*/
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true,
|
|
|
getRowClass: function (record, rowIndex, rowParams, store) {
|
|
|
//var YXSTATE = record.get('YXSTATE');
|
|
|
//return Shipping.GetAuditClass(BLSTATUS);
|
|
|
}
|
|
|
},
|
|
|
bbar: [Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
}), this.Pagenum],
|
|
|
|
|
|
});
|
|
|
|
|
|
/////////////以下部分为获取存储的gridpanel显示样式
|
|
|
this.column = DsTruck.GetGridPanel(USERID, this.formname, this.column);
|
|
|
//使用者id,表名 ,中间column数组
|
|
|
this.column.unshift(new Ext.grid.RowNumberer());
|
|
|
this.gridList.reconfigure(this.storeList, this.column);
|
|
|
////////////////////////////
|
|
|
|
|
|
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
// alert('0....' + dataview.toString() + ',' + record.toString() + ',' + item.toString() + ',' + index.toString() + ',' + e.toString() + ',' + b.toString());
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/MvcShipping/OP_SERVICEBILL/Edit?parentType=SERVICEBILL', record.data.BSNO,"600","600",200,400);
|
|
|
}, this);
|
|
|
|
|
|
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
var _this = this;
|
|
|
this.gridList.on("cellclick", function (grid, rowIndex, colIndex, record, event) {
|
|
|
|
|
|
var rec = record;// grid.getSelectionModel().getSelection()[0];
|
|
|
|
|
|
var column = grid.getHeaderAtIndex(colIndex);
|
|
|
|
|
|
var FieldName = column.dataIndex;
|
|
|
|
|
|
//alert(record.data.BSNO);
|
|
|
|
|
|
//alert(FieldName);
|
|
|
|
|
|
//alert(rec.data.BSNO);
|
|
|
|
|
|
if (FieldName == "BILLSTATUS")
|
|
|
{
|
|
|
_this.ShowBILLSTATUS_Log(rec.data.BSNO);
|
|
|
}
|
|
|
|
|
|
if (FieldName == "OT1") {
|
|
|
|
|
|
doccondition = " BSNO='" + rec.data.BSNO + "' and RECEIPTTYPE<>'账单'and RECEIPTTYPE<>'发票' ";
|
|
|
|
|
|
_this.storeDocList.load({
|
|
|
params: { condition: doccondition },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this,
|
|
|
callback: function () {
|
|
|
|
|
|
if (_this.storeDocList.getCount() > 0) {
|
|
|
_this.winDocShow.show();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (FieldName == "OT2")
|
|
|
{
|
|
|
_this.SelectedRecord = record;
|
|
|
_this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/MvcShipping/OP_SERVICEBILL/Edit?parentType=SERVICEBILL', record.data.BSNO, "600", "600", 200, 400);
|
|
|
}
|
|
|
|
|
|
if (FieldName == "OT3") {
|
|
|
//alert("账单")
|
|
|
|
|
|
doccondition = " BSNO='" + rec.data.BSNO + "' and RECEIPTTYPE='账单' ";
|
|
|
|
|
|
_this.storeDocList.load({
|
|
|
params: { condition: doccondition },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this,
|
|
|
callback: function () {
|
|
|
|
|
|
if (_this.storeDocList.getCount() > 0) {
|
|
|
_this.winDocShow.show();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
if (FieldName == "OT4") {
|
|
|
doccondition = " BSNO='" + rec.data.BSNO + "' and RECEIPTTYPE='发票' ";
|
|
|
|
|
|
_this.storeDocList.load({
|
|
|
params: { condition: doccondition },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this,
|
|
|
callback: function () {
|
|
|
|
|
|
if (_this.storeDocList.getCount() > 0) {
|
|
|
_this.winDocShow.show();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (FieldName == "TiHuo") {
|
|
|
_this.ShowCtnInfo(rec.data.BSNO);
|
|
|
}
|
|
|
if (FieldName == "FanKong") {
|
|
|
_this.ShowCtnInfo(rec.data.BSNO);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
//#region formSearch
|
|
|
|
|
|
//#region formSearch枚举参照相关
|
|
|
parentWin = window.parent.opener;
|
|
|
|
|
|
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
|
|
|
});
|
|
|
this.storeCustCode.load();
|
|
|
//this.storeCustCode.loadData(window.parent.GetPubStore("INFOCLIENT_ISCONTROLLER").data.items);
|
|
|
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '委托单位',
|
|
|
store: this.storeCustCode,
|
|
|
//queryMode: 'remote',
|
|
|
minChars: 1,
|
|
|
//queryParam: 'CODENAME',
|
|
|
matchFieldWidth: false,
|
|
|
name: 'CUSTOMERNAME',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'beforequery': function (e) {
|
|
|
return FilterCombox(e);//在beforequery使用此方法
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeCARRIER = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListCARRIER' }
|
|
|
});
|
|
|
this.storeCARRIER.load({ params: { condition: "ISCARRIER='1'"} });
|
|
|
this.comboxCARRIER = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '船公司',
|
|
|
store: this.storeCARRIER,
|
|
|
//queryMode: 'remote',
|
|
|
//minChars: 1,
|
|
|
//queryParam: 'CODENAME',
|
|
|
name: 'CARRIER',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'beforequery': function (e) {
|
|
|
return FilterCombox(e);//在beforequery使用此方法
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//客户加载_船代
|
|
|
this.storeSHIPAGENCY = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.CustomRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListSHIPAGENCY' }
|
|
|
});
|
|
|
//船代
|
|
|
this.storeSHIPAGENCY.load();
|
|
|
this.comboxSHIPAGENCY = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: Zi.LAN.SHIPAGENCY, //'船代',
|
|
|
store: this.storeSHIPAGENCY,
|
|
|
forceSelection: true,
|
|
|
queryMode: 'local',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CODENAME',
|
|
|
name: 'SHIPAGENCY',
|
|
|
valueField: 'CustName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
this.storeUser = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserLinkRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserLinkRefListRm' }
|
|
|
});
|
|
|
this.storeUser.load({ params: { condition: "" } });
|
|
|
|
|
|
|
|
|
//所属部门
|
|
|
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: 1,
|
|
|
labelWidth: 55,
|
|
|
forceSelection: true,
|
|
|
name: 'SALEDEPT',
|
|
|
valueField: 'DeptName',
|
|
|
displayField: 'DeptName',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'beforequery': function (e) {
|
|
|
return FilterCombox(e);//在beforequery使用此方法
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeSERVICETYPE = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.storeSERVICETYPE.load({ params: { enumTypeId: 96300 } });
|
|
|
this.comboxSERVICETYPE = Ext.create('DsExt.ux.RefEnumCombox', {
|
|
|
fieldLabel: '业务类型',
|
|
|
store: this.storeSERVICETYPE,
|
|
|
forceSelection: true,
|
|
|
valueField: 'EnumValueName',
|
|
|
displayField: 'EnumValueName',
|
|
|
name: 'SERVICETYPE',
|
|
|
listeners: {
|
|
|
//scope: this,
|
|
|
//'select': function (combo, records, eOpts) {
|
|
|
// if (records.length > 0) {
|
|
|
// var data = combo.value;
|
|
|
// //向理由窗口填入选择的内容
|
|
|
// Ext.getCmp("TuiReasonText").setValue(data);
|
|
|
|
|
|
// }
|
|
|
//}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeBILLSTATUS = Ext.create('DsExt.ux.RefEnumStore', {});
|
|
|
this.storeBILLSTATUS.load({ params: { enumTypeId: 96301 } });
|
|
|
this.comboxBILLSTATUS = Ext.create('DsExt.ux.RefEnumCombox', {
|
|
|
fieldLabel: '业务状态',
|
|
|
store: this.storeBILLSTATUS,
|
|
|
forceSelection: true,
|
|
|
valueField: 'EnumValueName',
|
|
|
displayField: 'EnumValueName',
|
|
|
name: 'BILLSTATUS',
|
|
|
listeners: {
|
|
|
//scope: this,
|
|
|
//'select': function (combo, records, eOpts) {
|
|
|
// if (records.length > 0) {
|
|
|
// var data = combo.value;
|
|
|
// //向理由窗口填入选择的内容
|
|
|
// Ext.getCmp("TuiReasonText").setValue(data);
|
|
|
|
|
|
// }
|
|
|
//}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeCompany = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'companymb',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetcompanyList' }
|
|
|
});
|
|
|
this.storeCompany.load({ params: { condition: " ISDISABLE=0 " } });
|
|
|
this.comboxCompany = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '所属分部',
|
|
|
store: this.storeCompany,
|
|
|
//width: 80,
|
|
|
name: 'CORPID',
|
|
|
valueField: 'gid',
|
|
|
displayField: 'name',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0) {
|
|
|
this.storeUser.load({
|
|
|
params: { condition: "CORPID='" + combo.value + "'", dbname: records[0].data.DBNAME }
|
|
|
,
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
//....
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//this.storeUser = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
// model: 'DsShipping.ux.UserRefModel',
|
|
|
// proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
//});
|
|
|
//this.storeUser.load({ params: { condition: "" } });
|
|
|
|
|
|
//#endregion
|
|
|
_this = this;
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '1 1 1 1',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 85,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
|
|
|
{
|
|
|
fieldLabel: '提单号',
|
|
|
//labelWidth: 110,
|
|
|
name: 'MBLNO',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
, this.comboxSERVICETYPE
|
|
|
, this.comboxBILLSTATUS
|
|
|
, {
|
|
|
fieldLabel: '船名',
|
|
|
//labelWidth: 110,
|
|
|
name: 'VESSEL',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '航次',
|
|
|
//labelWidth: 110,
|
|
|
name: 'VOYNO',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}//, {xtype:'hiddenfield'}
|
|
|
, this.comboxCARRIER
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
fieldLabel: '下单时间',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATE_BGN',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'BSDATE_END',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
fieldLabel: '开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETA_BGN',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETA_END',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '备注',
|
|
|
//labelWidth: 110,
|
|
|
name: 'REMARK',
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxSHIPAGENCY
|
|
|
]
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
|
|
|
]
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
//#endregion formSearch
|
|
|
|
|
|
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [
|
|
|
{
|
|
|
text: "新建", id: "btnadd",
|
|
|
iconCls: "btnadd",
|
|
|
handler: function (button, event) {
|
|
|
this.OprationStatus = 'add';
|
|
|
DsOpenEditWin('/MvcShipping/OP_SERVICEBILL/Edit?parentType=SERVICEBILL', "新建服务订单", "600", "600", 200, 400);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "删除", id: "btndelete",
|
|
|
iconCls: "btndelete",
|
|
|
handler: function (button, event) {
|
|
|
this.onDeleteClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
|
|
|
, {
|
|
|
text: "导出", id: "export",
|
|
|
tooltip: 'export',
|
|
|
handler: function (button, event) {
|
|
|
//this.PushState("30011");
|
|
|
this.onExportClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
|
|
|
, {
|
|
|
xtype: 'button',hidden:true,
|
|
|
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
|
|
|
}, /*{
|
|
|
id: "btnFeeAuditReject",
|
|
|
text: '驳回提交费用业务',
|
|
|
tooltip: '驳回提交费用业务',
|
|
|
iconCls: "btnrefuse",
|
|
|
handler: function (button, event) {
|
|
|
this.onAuditRefuseClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
},*/
|
|
|
{
|
|
|
text: "保存列表样式",
|
|
|
id: "btntest",
|
|
|
handler: function (button, event) {
|
|
|
var formname = this.formname;
|
|
|
var tempcolumns = this.gridList.columns;
|
|
|
DsTruck.SaveGridPanel(USERID, formname, tempcolumns, this.column, 0, false);
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "申请发票",
|
|
|
iconCls: "btnrefer",
|
|
|
handler: function (button, event) {
|
|
|
this.onGetInv(button, event);
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
text: "申请账单",
|
|
|
iconCls: "btnrefer",
|
|
|
handler: function (button, event) {
|
|
|
this.onGetBill(button, event);
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
|
|
|
, '-', {
|
|
|
text: "刷新运踪",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshYunZong(button, event);
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "重置条件",
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
this.onResetClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
saveQuerySetting(this.formname, this.formSearch, true, true);
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
//#region 布局
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 95,
|
|
|
items: [this.formSearch, this.panelBtn]
|
|
|
});
|
|
|
|
|
|
this.panelMain = new Ext.Panel({
|
|
|
//title: '',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
height: 600,
|
|
|
margin: '1 2',
|
|
|
split: true,
|
|
|
items: [this.gridList]
|
|
|
});
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.panelMain]
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//#region 提前加载服务项目
|
|
|
this.storeFEEService = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsExtEnumModel',
|
|
|
proxy: { url: '/CommMng/PubSys/GetEnumValueList' }
|
|
|
});
|
|
|
this.storeFEEService.load({
|
|
|
params: { enumTypeId: 96302 }
|
|
|
});
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
//#region 以下集中绑定事件
|
|
|
|
|
|
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
Ext.apply(store.proxy.extraParams, { condition: this.sqlcontext, sort: sortstr });
|
|
|
}, this);
|
|
|
|
|
|
this.gridList.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
this.LoadInitData();
|
|
|
|
|
|
this.LoadData();
|
|
|
|
|
|
this.storeDocList = Ext.create('Ext.data.Store', {
|
|
|
model: 'ReceiptDocmb',
|
|
|
remoteSort: false,
|
|
|
pageSize: this.PageSize,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/Import/ReceiptDoc/GetDocList',
|
|
|
reader: {
|
|
|
idProperty: '',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//this.DocCM = Ext.create('Ext.selection.CheckboxModel');
|
|
|
this.gridDocList = new Ext.grid.GridPanel({
|
|
|
store: this.storeDocList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
border: false,
|
|
|
hideHeaders: true,
|
|
|
//width: 350,
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
|
|
|
//selModel: this.DocCM,
|
|
|
selType: 'cellmodel',
|
|
|
tbar: [
|
|
|
],
|
|
|
columns: [{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'RECEIPTTYPE',
|
|
|
header: '单据类型',
|
|
|
editor: this.comboxReceiptid_DOC,
|
|
|
width: 80,
|
|
|
renderer: function (value, p, record) {
|
|
|
if (value != "发票" && value != "账单" && value != "回馈单据") {
|
|
|
return "原始单据"
|
|
|
} else {
|
|
|
return value;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'R_GID',
|
|
|
header: 'R_GID',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: 'BSNO',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'URL',
|
|
|
header: '文件名',
|
|
|
width: 260,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.Driect_URL + '" style=' + '"text-decoration:none" target="_blank"' + '>' + value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'Driect_URL',
|
|
|
header: 'Driect_URL',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'MODIFIEDUSER',
|
|
|
header: 'MODIFIEDUSER',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'MODIFIEDUSERRef',
|
|
|
header: '修改人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'MODIFIEDTIME',
|
|
|
header: '修改时间',
|
|
|
width: 85
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.winDocShow = Ext.create('Ext.window.Window', {
|
|
|
title: "", //"生成INTTR",
|
|
|
width: 380,
|
|
|
height: 200,
|
|
|
id: "winDocShow",
|
|
|
//height :600,
|
|
|
//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.gridDocList
|
|
|
],
|
|
|
|
|
|
});
|
|
|
|
|
|
//近期使用过的开票信息
|
|
|
this.storeLASTInvInfo= Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'LASTInvInfomb',
|
|
|
proxy: { url: '/MvcShipping/OP_SERVICEBILL/GetInvInfo' }
|
|
|
});
|
|
|
|
|
|
this.comboxCompanyName = Ext.create('DsExt.ux.RefTableCombox', {//Ext.ux.form.field.BoxSelect
|
|
|
fieldLabel: '发票抬头',
|
|
|
allowBlank: false,
|
|
|
forceSelection: false,
|
|
|
name: 'CompanyName',
|
|
|
emptyText: '发票公司抬头',
|
|
|
blankText: '发票公司抬头',
|
|
|
flex: 1,
|
|
|
store: this.storeLASTInvInfo,
|
|
|
queryMode: 'remote',
|
|
|
minChars: 0,
|
|
|
queryParam: 'CompanyName',
|
|
|
triggerOnClick: false,
|
|
|
valueField: 'CompanyName',
|
|
|
displayField: 'CompanyName',
|
|
|
listeners: {
|
|
|
scope: this,
|
|
|
|
|
|
'select': function (combo, records, eOpts) {
|
|
|
if (records.length > 0)
|
|
|
{
|
|
|
var rec = records[0].data;
|
|
|
_this.formInvInfo.getForm().findField('CompanyName').setValue(rec.CompanyName);
|
|
|
_this.formInvInfo.getForm().findField('TaxCode').setValue(rec.TaxCode);
|
|
|
_this.formInvInfo.getForm().findField('Address').setValue(rec.Address);
|
|
|
_this.formInvInfo.getForm().findField('Tel').setValue(rec.Tel);
|
|
|
_this.formInvInfo.getForm().findField('Bank').setValue(rec.Bank);
|
|
|
_this.formInvInfo.getForm().findField('BankAccount').setValue(rec.BankAccount);
|
|
|
_this.formInvInfo.getForm().findField('Remark').setValue(rec.Remark);
|
|
|
|
|
|
//Ext.MessageBox.confirm(Zi.LAN.TiShi, "是否要用选定的联系信息覆盖通知人信息?", function (btn) {
|
|
|
// if (btn == 'yes') {
|
|
|
|
|
|
//var rec = records[0].data;
|
|
|
//_this.formDjyOrder.getForm().findField('ShipperName').setValue(rec.ShipperName);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartAddress').setValue(rec.NotifypartAddress);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartCountry').setValue(rec.NotifypartCountry);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartProvince').setValue(rec.NotifypartProvince);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartCity').setValue(rec.NotifypartCity);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartCounty').setValue(rec.NotifypartCounty);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartPostCode').setValue(rec.NotifypartPostCode);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartFirstName').setValue(rec.NotifypartFirstName);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartLastName').setValue(rec.NotifypartLastName);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartPhoneCountryCode').setValue(rec.NotifypartPhoneCountryCode);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartPhoneCode').setValue(rec.NotifypartPhoneCode);
|
|
|
//_this.formDjyOrder.getForm().findField('NotifypartPhone').setValue(rec.NotifypartPhone);
|
|
|
|
|
|
//})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.formInvInfo = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
//width: 495,
|
|
|
//height: 345,
|
|
|
region: 'center',
|
|
|
id: "formInvInfo",
|
|
|
bodyPadding: 3,
|
|
|
layout: 'anchor',
|
|
|
//flex:1,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
//id: 'formDjyOrder_COSCO_1',
|
|
|
layout: 'anchor',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
id: "INVMBLNO"
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
//width: 420,
|
|
|
name:"INVBSNO",
|
|
|
hidden:true,
|
|
|
flex: 1,
|
|
|
id: "INVBSNO"
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
_this.comboxCompanyName
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '税号',
|
|
|
allowBlank: false,
|
|
|
emptyText: '税号',
|
|
|
blankText: '税号',
|
|
|
name: 'TaxCode'
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '地址',
|
|
|
allowBlank: false,
|
|
|
emptyText: '地址',
|
|
|
blankText: '地址',
|
|
|
name: 'Address'
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '电话',
|
|
|
allowBlank: false,
|
|
|
emptyText: '电话',
|
|
|
blankText: '电话',
|
|
|
name: 'Tel'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '开户行',
|
|
|
allowBlank: false,
|
|
|
emptyText: '开户行',
|
|
|
blankText: '开户行',
|
|
|
name: 'Bank'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '银行账户',
|
|
|
allowBlank: false,
|
|
|
emptyText: '银行账户',
|
|
|
blankText: '银行账户',
|
|
|
name: 'BankAccount'
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '开票信息',
|
|
|
allowBlank: false,
|
|
|
emptyText: '开票信息',
|
|
|
blankText: '开票信息',
|
|
|
name: 'Remark'
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]
|
|
|
}
|
|
|
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.winInvInfo = Ext.create('Ext.window.Window', {
|
|
|
title: "发票申请",
|
|
|
width: 500,
|
|
|
height: 350,
|
|
|
id: "winInvInfo",
|
|
|
//height :600,
|
|
|
//plain : true,
|
|
|
|
|
|
iconCls: "addicon",
|
|
|
resizable: false,
|
|
|
// 是否可以拖动
|
|
|
// draggable:false,
|
|
|
collapsible: true, // 允许缩放条
|
|
|
closeAction: 'close',
|
|
|
closable: true,
|
|
|
floating: true,
|
|
|
modal: 'true',
|
|
|
buttonAlign: "center",
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
items: [
|
|
|
this.formInvInfo
|
|
|
|
|
|
],
|
|
|
buttons: [
|
|
|
{
|
|
|
text: "确定发送", //"确定发送",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
|
|
|
_this.DoGetInv();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//, {
|
|
|
//text: Zi.LAN.btndelete, //"删除",
|
|
|
//minWidth: 70,
|
|
|
//handler: function () {
|
|
|
|
|
|
//}
|
|
|
//}
|
|
|
|
|
|
, {
|
|
|
text: "关闭", //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winInvInfo.close();
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.formGetBill = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
//width: 495,
|
|
|
//height: 345,
|
|
|
region: 'center',
|
|
|
id: "formGetBill",
|
|
|
bodyPadding: 1,
|
|
|
layout: 'anchor',
|
|
|
//flex:1,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'anchor',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
id: "BILLMBLNO"
|
|
|
}]
|
|
|
},
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
//width: 420,
|
|
|
name: "BILLBSNO",
|
|
|
hidden: true,
|
|
|
flex: 1,
|
|
|
id: "BILLBSNO"
|
|
|
}]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [
|
|
|
{
|
|
|
xtype: 'textfield',
|
|
|
fieldLabel: '备注',
|
|
|
allowBlank: false,
|
|
|
emptyText: '备注',
|
|
|
blankText: '备注',
|
|
|
name: 'Remark'
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]
|
|
|
}
|
|
|
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.winGetBill = Ext.create('Ext.window.Window', {
|
|
|
title: "发票申请",
|
|
|
width: 500,
|
|
|
height: 150,
|
|
|
id: "winGetBill",
|
|
|
//height :600,
|
|
|
//plain : true,
|
|
|
|
|
|
iconCls: "addicon",
|
|
|
resizable: false,
|
|
|
// 是否可以拖动
|
|
|
// draggable:false,
|
|
|
collapsible: true, // 允许缩放条
|
|
|
closeAction: 'close',
|
|
|
closable: true,
|
|
|
floating: true,
|
|
|
modal: 'true',
|
|
|
buttonAlign: "center",
|
|
|
bodyStyle: "padding:0 0 0 0",
|
|
|
items: [
|
|
|
this.formGetBill
|
|
|
],
|
|
|
buttons: [
|
|
|
{
|
|
|
text: "确定发送", //"确定发送",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.DoGetBill();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//, {
|
|
|
//text: Zi.LAN.btndelete, //"删除",
|
|
|
//minWidth: 70,
|
|
|
//handler: function () {
|
|
|
|
|
|
//}
|
|
|
//}
|
|
|
|
|
|
, {
|
|
|
text: "关闭", //"关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winGetBill.close();
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
LoadInitData: function () {
|
|
|
if (this.sqlcontext == '') {
|
|
|
this.sqlcontext = "ACCDATE='" + currdate.format('yyyy-MM') + "'";
|
|
|
}
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, condition: this.sqlcontext },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onRefreshYunZong: function () {
|
|
|
//刷新运踪
|
|
|
//对选中的单号执行调用接口查询
|
|
|
|
|
|
|
|
|
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 GidSql = '';
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var record = selections[i];
|
|
|
var GId = "" + record.get('BSNO') + "";
|
|
|
if (GidSql == '') {
|
|
|
GidSql = GId;
|
|
|
} else {
|
|
|
GidSql = GidSql + "," + GId;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
Ext.Msg.wait('正在查询数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询数据...',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/RefreshYunZong',
|
|
|
params: {
|
|
|
BSNOList: GidSql
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.onRefreshClick();
|
|
|
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) {
|
|
|
this.onRefreshClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
|
|
|
|
|
|
var feeGidSql = '';
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var record = selections[i];
|
|
|
var feeGId = "'" + record.get('BSNO') + "'";
|
|
|
if (feeGidSql == '') {
|
|
|
feeGidSql = feeGId;
|
|
|
} else {
|
|
|
feeGidSql = feeGidSql + "," + feeGId;
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
onResetClick: function (button, event) {
|
|
|
this.formSearch.getForm().reset();
|
|
|
},
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
|
this.PageSize = this.Pagenum.getValue();
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, sort: sortstr },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
//}
|
|
|
},
|
|
|
|
|
|
onDsQuery: function (button, event) {
|
|
|
|
|
|
var sql = this.sqlcontext;
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, condition: sql, sort: sortstr},
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
//}
|
|
|
},
|
|
|
|
|
|
|
|
|
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];
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/DelHead',
|
|
|
params: {
|
|
|
BSNO: record.data.BSNO
|
|
|
},
|
|
|
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);
|
|
|
}, //onDeleteClickwinChangeShow
|
|
|
|
|
|
onGetInv: 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 bsnoStr = "";
|
|
|
|
|
|
var MBLNOStr = "";
|
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var record = selections[i];
|
|
|
if (bsnoStr != "") bsnoStr += ",";
|
|
|
bsnoStr += record.data.BSNO;
|
|
|
|
|
|
if (MBLNOStr != "") MBLNOStr += ",";
|
|
|
MBLNOStr += record.data.MBLNO;
|
|
|
}
|
|
|
|
|
|
var mblnolabel = Ext.getCmp("INVMBLNO");
|
|
|
mblnolabel.setText(MBLNOStr);
|
|
|
|
|
|
var bsnofield = Ext.getCmp("INVBSNO");
|
|
|
bsnofield.setValue(bsnoStr);
|
|
|
|
|
|
this.winInvInfo.show();
|
|
|
},
|
|
|
|
|
|
onGetBill: 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 bsnoStr = "";
|
|
|
|
|
|
var MBLNOStr = "";
|
|
|
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var record = selections[i];
|
|
|
if (bsnoStr != "") bsnoStr += ",";
|
|
|
bsnoStr += record.data.BSNO;
|
|
|
|
|
|
if (MBLNOStr != "") MBLNOStr += ",";
|
|
|
MBLNOStr += record.data.MBLNO;
|
|
|
}
|
|
|
|
|
|
var mblnolabel = Ext.getCmp("BILLMBLNO");
|
|
|
mblnolabel.setText(MBLNOStr);
|
|
|
|
|
|
var bsnofield = Ext.getCmp("BILLBSNO");
|
|
|
bsnofield.setValue(bsnoStr);
|
|
|
|
|
|
this.winGetBill.show();
|
|
|
},
|
|
|
|
|
|
|
|
|
getCondition: function () {
|
|
|
|
|
|
var form = this.formSearch.getForm();
|
|
|
var sql = '';
|
|
|
|
|
|
//20170309 增加逻辑
|
|
|
//
|
|
|
//只能看到“”
|
|
|
|
|
|
var MBLNO = form.findField('MBLNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, MBLNO, " mblno like '%" + MBLNO + "%' ");
|
|
|
|
|
|
var SERVICETYPE = form.findField('SERVICETYPE').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, SERVICETYPE, " SERVICETYPE = '" + SERVICETYPE + "' ");
|
|
|
|
|
|
var BILLSTATUS = form.findField('BILLSTATUS').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BILLSTATUS, " BILLSTATUS = '" + BILLSTATUS + "' ");
|
|
|
|
|
|
var VESSEL = form.findField('VESSEL').getValue();
|
|
|
sql = sql + getAndConSql(sql, VESSEL, " VESSEL like '%" + VESSEL + "%' ");
|
|
|
|
|
|
var VOYNO = form.findField('VOYNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, VOYNO, " VOYNO like '%" + VOYNO + "%' ");
|
|
|
|
|
|
|
|
|
var BSDATE_BGN = form.findField('BSDATE_BGN').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATE_BGN, " BSDATE>='" + BSDATE_BGN + "'");
|
|
|
|
|
|
var BSDATE_END = form.findField('BSDATE_END').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATE_END, " BSDATE<='" + BSDATE_END + " 23:59:59'");
|
|
|
|
|
|
|
|
|
var ETA_BGN = form.findField('ETA_BGN').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETA_BGN, " ETA>='" + ETA_BGN + "'");
|
|
|
|
|
|
var ETA_END = form.findField('ETA_END').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, ETA_END, " ETA<='" + ETA_END + " 23:59:59'");
|
|
|
|
|
|
|
|
|
var REMARK = form.findField('REMARK').getValue();
|
|
|
sql = sql + getAndConSql(sql, REMARK, " REMARK like '%" + REMARK + "%'");
|
|
|
|
|
|
var CARRIER = form.findField('CARRIER').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, CARRIER, " CARRIER='" + CARRIER + "'");
|
|
|
|
|
|
var SHIPAGENCY = form.findField('SHIPAGENCY').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, SHIPAGENCY, " SHIPAGENCY='" + SHIPAGENCY + "'");
|
|
|
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
|
|
|
ret[3] = this.storeCompany;
|
|
|
ret[4] = this.storeUser;
|
|
|
ret[5] = this.storeCARRIER;
|
|
|
ret[6] = this.storeSHIPAGENCY;
|
|
|
|
|
|
ret[7] = this.storeFEEService;
|
|
|
|
|
|
//ret[3] = this.storeCustCode;
|
|
|
//ret[4] = this.storeCompany;
|
|
|
//ret[5] = this.storeUser;
|
|
|
//ret[6] = this.storeDept;
|
|
|
|
|
|
//ret[7] = this.storeCARRIER;
|
|
|
//ret[8] = this.storeCodeLoadport;
|
|
|
//ret[9] = this.storeVESSEL;
|
|
|
//ret[10] = this.storeVOYNO;
|
|
|
//ret[11] = this.storeTRUCK;
|
|
|
//ret[12] = this.storeYARD;
|
|
|
//ret[13] = this.storeCONSIGNEE;
|
|
|
|
|
|
//ret[14] = this.storeCtn;
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//onAddClick: function (button, event) {
|
|
|
|
|
|
// this.OprationStatus = 'add';
|
|
|
// DsOpenEditWin2("/MvcShipping/OP_SERVICEBILL/Edit", "新建服务订单", "500", "600", 200, 400);
|
|
|
|
|
|
//}, //onDeleteClick
|
|
|
|
|
|
//onExportClick: function (button, event) {
|
|
|
// GridExportExcelPage(this.gridList);
|
|
|
//},
|
|
|
//#region 打印
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
if (this.storeList.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/GetDataListStr',
|
|
|
params: {
|
|
|
condition: _this.sqlcontext
|
|
|
},
|
|
|
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;
|
|
|
}
|
|
|
var returnstr = jsonresult.data;
|
|
|
var printType = 'OP_SERVICEBILLLIST';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
, ShowBILLSTATUS_Log: function (BSNO) {
|
|
|
|
|
|
//var customername = this.formHead.getForm().findField('CUSTOMERNAME').getValue();
|
|
|
title = "状态信息";
|
|
|
|
|
|
model = Ext.define('op_status_md', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'ST_ID',
|
|
|
fields: [
|
|
|
{ name: 'ST_ID', type: 'string' },
|
|
|
{ name: 'BSNO', type: 'string' },
|
|
|
{ name: 'STATUS', type: 'string' },
|
|
|
{ name: 'ISCOMP', type: 'bool' },
|
|
|
{ name: 'ISOPEN', type: 'string' },
|
|
|
{ name: 'ISOPENREF', type: 'string' },
|
|
|
{ name: 'COMPTIME', type: 'date', dateFormat: 'Y-m-d H:i:s' },
|
|
|
{ name: 'COMPOP', type: 'string' },
|
|
|
{ name: 'INPUTBY', type: 'string' },
|
|
|
{ name: 'INPUTTIME', type: 'string' },
|
|
|
{ name: 'OPTIME', type: 'string' },
|
|
|
{ name: 'REMARK', type: 'string' },
|
|
|
{ name: 'STATUS_OPSEAE', type: 'string' },
|
|
|
{ name: 'ORDNO', type: 'number' },
|
|
|
{ name: 'STTYPE', type: 'string' },
|
|
|
{ name: 'STTYPESTR', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
proxyUrl = '/MvcShipping/MsOpStatus/GetListData';
|
|
|
|
|
|
condition = " BSNO='" + BSNO +"' ";
|
|
|
|
|
|
columns = [
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'STATUS',
|
|
|
header: '业务状态',
|
|
|
width: 90
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COMPTIME',
|
|
|
header: '状态时间',
|
|
|
width: 120,
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s')
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COMPOP',
|
|
|
header: '操作人',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: '备注',
|
|
|
width: 140
|
|
|
}
|
|
|
];
|
|
|
|
|
|
ShowPublicINFO(title, model, proxyUrl, condition, columns, 500);
|
|
|
}
|
|
|
|
|
|
, LoadData()
|
|
|
{
|
|
|
this.onRefreshClick();
|
|
|
}
|
|
|
|
|
|
, onExportClick: function (button, event) {
|
|
|
_this = this;
|
|
|
var sortstr = '';
|
|
|
|
|
|
if (this.sortfield != '' && this.sortdire != '') {
|
|
|
|
|
|
sortstr = this.sortfield + ' ' + this.sortdire;
|
|
|
}
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/GetDataListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
condition: sql,
|
|
|
sort: sortstr
|
|
|
},
|
|
|
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 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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
, ShowCtnInfo: function (BSNO) {
|
|
|
|
|
|
title = "";
|
|
|
|
|
|
model = Ext.define('OP_CTN_md', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'CNTRNO',
|
|
|
fields: [
|
|
|
{ name: 'CNTRNO', type: 'string' },
|
|
|
{ name: 'TiHuoShiJian', type: 'string' },
|
|
|
{ name: 'FanKongShiJian', type: 'string' }
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
proxyUrl = '/MvcShipping/OP_SERVICEBILL/GetCtnList';
|
|
|
|
|
|
condition = BSNO;
|
|
|
|
|
|
columns = [
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CNTRNO',
|
|
|
header: '箱号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TiHuoShiJian',
|
|
|
header: '提货',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FanKongShiJian',
|
|
|
header: '返空',
|
|
|
width: 120
|
|
|
}
|
|
|
];
|
|
|
|
|
|
ShowPublicINFO(title, model, proxyUrl, condition, columns, 380);
|
|
|
}
|
|
|
|
|
|
, DoGetInv() {
|
|
|
|
|
|
var Form = this.formInvInfo.getForm();
|
|
|
|
|
|
|
|
|
if (!Form.isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
var data = Form.getValues();
|
|
|
|
|
|
BSNO = data.INVBSNO;
|
|
|
|
|
|
INVINFO = Ext.JSON.encode(data);
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/DoGetInv',
|
|
|
params: {
|
|
|
BSNO: BSNO,
|
|
|
INVINFO: INVINFO
|
|
|
},
|
|
|
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
|
|
|
}
|
|
|
|
|
|
, DoGetBill() {
|
|
|
|
|
|
var Form = this.formGetBill.getForm();
|
|
|
|
|
|
if (!Form.isValid()) {
|
|
|
return;
|
|
|
}
|
|
|
var data = Form.getValues();
|
|
|
|
|
|
BSNO = data.BILLBSNO;
|
|
|
|
|
|
//INVINFO = Ext.JSON.encode(data);
|
|
|
Remark = data.Remark;
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/OP_SERVICEBILL/DoGetBill',
|
|
|
params: {
|
|
|
BSNO: BSNO,
|
|
|
Remark: Remark
|
|
|
},
|
|
|
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
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|