|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsOpCtnBsCardReAudit = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsOpCtnBsCardReAudit.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsOpCtnBsCardReAudit, Ext.Panel, {
|
|
|
|
|
|
ParentWin: null,
|
|
|
OpStatus: 'add',
|
|
|
StoreList: null,
|
|
|
editRecord: null,
|
|
|
editFactryRecord: null,
|
|
|
FactryStatus: 'add',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
this.serialNo = 0;
|
|
|
this.workSerialNo = 0;
|
|
|
this.bodyDel = [];
|
|
|
this.bsno ="";
|
|
|
this.sqlctn = "";
|
|
|
this.sqlcontext = "";
|
|
|
this.pricegid = "";
|
|
|
this.reauditgid = "";
|
|
|
|
|
|
this.initAuditgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: 'BSNO',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '委托编号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: '主提单号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BILLSTATUSREF',
|
|
|
header: '申请状态',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BLTYPE',
|
|
|
header: '类型',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNNUM',
|
|
|
header: '箱量',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'APPLICANTREF',
|
|
|
header: '申请人',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'APPLYTIME',
|
|
|
header: '申请时间',
|
|
|
width: 140
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITUSERREF',
|
|
|
header: '审核人',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITTIME',
|
|
|
header: '审核时间',
|
|
|
width: 140
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REJECTUSERREF',
|
|
|
header: '驳回人',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REJECTTIME',
|
|
|
header: '驳回时间',
|
|
|
width: 140
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REJECTREASON',
|
|
|
header: '驳回原因',
|
|
|
width: 160
|
|
|
}
|
|
|
];
|
|
|
|
|
|
this.Auditgirdcolums = this.initAuditgirdcolums;
|
|
|
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
//定义数据集
|
|
|
this.storeListAudit = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpCtnBsCardReAudit',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCardReAudit/GetDataList',
|
|
|
reader: {
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 30
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.AuditGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
_this = this;
|
|
|
//定义Grid
|
|
|
this.gridListAudit = new Ext.grid.GridPanel({
|
|
|
store: this.storeListAudit,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selModel: this.AuditGridCheckBoxModel,
|
|
|
columns: this.Auditgirdcolums,
|
|
|
// paging bar on the bottom
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeListAudit,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.Auditgirdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.Auditgirdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
// this.InitGrid(this.girdcolums, '');
|
|
|
this.gridListAudit.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
// this.SelectedRecord = record;
|
|
|
// this.OprationStatus = 'edit';
|
|
|
// // DsOpenEditWin('/MvcContainer/MsOpPrice/SeaeEdit', record.data.GID);
|
|
|
|
|
|
// var openSet = "height=500, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 500) / 2 + ",Left= " + (screen.width - 600) / 2
|
|
|
// var openType = record.data.GID;
|
|
|
// var openUrl = "/MvcContainer/MsOpPrice/YardEdit";
|
|
|
// window.open(openUrl, openType, openSet);
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
this.gridListAudit.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.sortfield = column.dataIndex;
|
|
|
this.sortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
this.gridListAudit.columns[1] = new Ext.grid.RowNumberer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//枚举参照相关(编辑form)
|
|
|
this.formname = 'MsOpCtnBsCardReAudit';
|
|
|
|
|
|
|
|
|
|
|
|
//表参照相关(编辑form)
|
|
|
|
|
|
_this = this;
|
|
|
//#region 按钮Toolbar
|
|
|
//this.panelBtn = new Ext.Panel({
|
|
|
// region: "north",
|
|
|
// tbar: [{
|
|
|
// id: 'btnSubmitAudit',
|
|
|
// text: '提交审核',
|
|
|
// tooltip: '提交审核',
|
|
|
// handler: function (button, event) {
|
|
|
// this.onSubmitAuditClick();
|
|
|
// },
|
|
|
// scope: this
|
|
|
// }, {
|
|
|
// id: 'btnSubmitAuditBack',
|
|
|
// text: '取消提交',
|
|
|
// tooltip: '取消提交',
|
|
|
// handler: function (button, event) {
|
|
|
// this.onSubmitAuditBackClick();
|
|
|
// },
|
|
|
// scope: this
|
|
|
// }, {
|
|
|
// text: '引入运价方案',
|
|
|
// tooltip: '引入运价方案',
|
|
|
// id: "btnadddetail",
|
|
|
// iconCls: "btnadddetail",
|
|
|
// handler: function (button, event) {
|
|
|
// this.addPriceProject();
|
|
|
// },
|
|
|
// scope: this
|
|
|
// }
|
|
|
// ]
|
|
|
//}); //end 按钮Toolbar
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
//#region 运价方案form
|
|
|
//编辑form
|
|
|
this.formEdit = Ext.widget('form', {
|
|
|
region: 'north',
|
|
|
height: 145,
|
|
|
frame: true,
|
|
|
bodyPadding: 5,
|
|
|
autoScroll: true,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 70,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'fieldset',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: 'GID',
|
|
|
name: 'GID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'COMPANYID',
|
|
|
name: 'COMPANYID', flex: 0, hidden: true, margins: '0'
|
|
|
}, {
|
|
|
fieldLabel: 'PRICETYPE',
|
|
|
name: 'PRICETYPE', flex: 0, hidden: true, margins: '0'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '方案类别',
|
|
|
readOnly: true,
|
|
|
name: 'PRJECTTYPE'
|
|
|
}, {
|
|
|
fieldLabel: '运价来源',
|
|
|
readOnly: true,
|
|
|
name: 'PRJECTSOURCE'
|
|
|
}, {
|
|
|
fieldLabel: '代理',
|
|
|
readOnly: true,
|
|
|
name: 'AGENTNAME'
|
|
|
}, {
|
|
|
fieldLabel: '开始日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'BEGINDATE'
|
|
|
}, {
|
|
|
fieldLabel: '有效日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'VALIDETD'
|
|
|
}, {
|
|
|
fieldLabel: '起运港',
|
|
|
readOnly: true,
|
|
|
name: 'PORTLOAD'
|
|
|
}, {
|
|
|
fieldLabel: '目的港',
|
|
|
readOnly: true,
|
|
|
name: 'PORTDISCHARGE'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '船公司',
|
|
|
readOnly: true,
|
|
|
name: 'CARRIER'
|
|
|
}, {
|
|
|
fieldLabel: '货物类别',
|
|
|
readOnly: true,
|
|
|
name: 'GOODTYPE'
|
|
|
}, {
|
|
|
fieldLabel: '方案状态',
|
|
|
readOnly: true,
|
|
|
name: 'BSSTATUS'
|
|
|
}, {
|
|
|
fieldLabel: '是否中转',
|
|
|
name: 'ISTRANSPORT'
|
|
|
}, {
|
|
|
fieldLabel: '是否最优方案',
|
|
|
labelWidth: 90,
|
|
|
name: 'ISBEST'
|
|
|
}, {
|
|
|
fieldLabel: '报价日期',
|
|
|
format: 'Y-m-d',
|
|
|
flex: 1,
|
|
|
xtype: 'datefield',
|
|
|
name: 'PRICEDATE'
|
|
|
}, {
|
|
|
fieldLabel: '是否停用',
|
|
|
name: 'ISSTOP'
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '航程',
|
|
|
name: 'VOYAGE'
|
|
|
}, {
|
|
|
fieldLabel: '日租金',
|
|
|
name: 'RENTOFDAY'
|
|
|
}, {
|
|
|
fieldLabel: '租金',
|
|
|
name: 'RENTAMOUNT'
|
|
|
}, {
|
|
|
fieldLabel: '运输条款',
|
|
|
name: 'SERVICE'
|
|
|
}, {
|
|
|
fieldLabel: '箱状态',
|
|
|
name: 'CTNSTATUS'
|
|
|
}, {
|
|
|
fieldLabel: '佣金比率',
|
|
|
name: 'CHANGERATE',
|
|
|
regex: /^(-?\d+)(\.\d+)?$/,
|
|
|
regexText: '请输入正确的数值!'
|
|
|
}, {
|
|
|
fieldLabel: '创建人',
|
|
|
readOnly: true,
|
|
|
disabled: true,
|
|
|
name: 'INPUTBYREF'
|
|
|
}]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '创建日期',
|
|
|
readOnly: true,
|
|
|
disabled: true,
|
|
|
name: 'INPUTTIME'
|
|
|
}, {
|
|
|
fieldLabel: '维护人',
|
|
|
name: 'OPREF'
|
|
|
}, {
|
|
|
fieldLabel: '方案批注',
|
|
|
name: 'PRJECTMARK'
|
|
|
}, {
|
|
|
fieldLabel: '备注',
|
|
|
flex: 3,
|
|
|
name: 'REMARKS'
|
|
|
}, {
|
|
|
fieldLabel: '单罐成本',
|
|
|
name: 'TTLINUSDCOST'
|
|
|
}, {
|
|
|
fieldLabel: '总成本',
|
|
|
name: 'TTLCOST'
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
//#region 运价明细信息
|
|
|
this.storeBodyList = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpPriceItems',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCardReAudit/GetPriceItemsList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//明细表表格
|
|
|
this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
clicksToEdit: 1
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.initgirdbillcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: '编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'LINKGID',
|
|
|
header: '业务编号',
|
|
|
hidden: true,
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ITEMSNO',
|
|
|
header: '序号',
|
|
|
renderer: Ext.util.Format.numberRenderer('00'),
|
|
|
align: 'right',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: '付款方',
|
|
|
width: 110
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEENAME',
|
|
|
header: '费用名称',
|
|
|
width: 140
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'UNIT',
|
|
|
header: '标准',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURRENCY',
|
|
|
header: '币别',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'EXCHANGERATE',
|
|
|
header: '汇率',
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
align: 'right',
|
|
|
width: 110
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'UNITPRICE',
|
|
|
header: '单价',
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
align: 'right',
|
|
|
width: 110
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'QUANTITY',
|
|
|
header: '数量',
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
align: 'right',
|
|
|
width: 110
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AMOUNT',
|
|
|
header: '金额',
|
|
|
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { try { var lsValue = usMoney(value, 2, '', false); if (lsValue != "NaN") { value = lsValue; if (parseFloat(lsValue) < 0) { return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>'; } } else { return value; } } catch (e) { return value; } return value; },
|
|
|
align: 'right',
|
|
|
width: 110
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARKS',
|
|
|
header: '备注',
|
|
|
width: 250
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PRICECLASS',
|
|
|
header: '类别归属',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISSTOP',
|
|
|
header: '是否停用', //'是否海运',
|
|
|
width: 60,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '1' || value == true || value == 'true') {
|
|
|
return "是";
|
|
|
} else {
|
|
|
return "否";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEESTATUS_REF',
|
|
|
header: '费用状态',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REASON',
|
|
|
header: '原因',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBYREF',
|
|
|
header: '创建人',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTTIME',
|
|
|
header: '创建日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFYUSERREF',
|
|
|
header: '录入人',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFYTIME',
|
|
|
header: '录入日期',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITNAME',
|
|
|
header: '审核人',
|
|
|
width: 60
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITDATE',
|
|
|
header: '审核日期',
|
|
|
width: 80
|
|
|
}];
|
|
|
this.girdbillcolums = this.initgirdbillcolums;
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
this.gridListBody = new Ext.grid.GridPanel({
|
|
|
store: this.storeBodyList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [this.gridListCellEditing],
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
selType: 'cellmodel',
|
|
|
viewConfig: {
|
|
|
autoFill: true,
|
|
|
getRowClass: function (record, rowIndex, rowParams, store) {
|
|
|
var feeStatus = record.get('FEESTATUS');
|
|
|
return Shipping.FeeGetRowClass(feeStatus);
|
|
|
}
|
|
|
},
|
|
|
tbar: [{
|
|
|
text: '保存列表样式',
|
|
|
menu: [
|
|
|
{
|
|
|
text: '保存',
|
|
|
handler: function (button, event) {
|
|
|
_this.girdbillcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'bill', _this.gridListBody.columns, _this.girdbillcolums, 1, true);
|
|
|
}
|
|
|
}, {
|
|
|
text: '初始化',
|
|
|
handler: function (menu, event) {
|
|
|
_this.girdbillcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'bill', _this.gridListBody.columns, _this.initgirdbillcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}],
|
|
|
|
|
|
columns: this.girdbillcolums
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//#region 业务卡信息
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpCtnBsCard',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GId',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
|
|
|
width: 30
|
|
|
});
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
id: '',
|
|
|
dataIndex: '',
|
|
|
header: '',
|
|
|
width: 0
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COMPANYID',
|
|
|
header: 'COMPANYID',
|
|
|
hidden: true,
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNNO',
|
|
|
header: '箱号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'APPLYNO',
|
|
|
header: '放箱申请编号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNPROP',
|
|
|
header: '箱属',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCLOSE',
|
|
|
header: '锁定',
|
|
|
width: 100,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true') {
|
|
|
return "<img src='../../../../TruckMng/Content/Images/Lock.png' />";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_PUTCTN',
|
|
|
header: '放箱通知发送',
|
|
|
width: 100,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true') {
|
|
|
return "是";
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PUTCTNDATE',
|
|
|
header: '放箱通知发送时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMERNAME',
|
|
|
header: '委托单位',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'GOODSNAME',
|
|
|
header: '货物名称',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PREGOODSNAME',
|
|
|
header: '前装货品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETD',
|
|
|
header: '开船日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ETA',
|
|
|
header: '到港日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'AGENTNAME',
|
|
|
header: '目的港代理',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUR_PORT',
|
|
|
header: '当前位置',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUR_DATE',
|
|
|
header: '当前时间',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CYCLE_DAY',
|
|
|
header: '周期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTNO',
|
|
|
header: '委托编号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'OP',
|
|
|
header: '操作',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MBLNO',
|
|
|
header: '主提单号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CARRIER',
|
|
|
header: '船公司',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_STATOIN',
|
|
|
header: '起运港场站',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_CNT_TIME',
|
|
|
header: '起运港提箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'LOADFACTORY',
|
|
|
header: '装货工厂',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD',
|
|
|
header: '起运港',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT',
|
|
|
header: '目的港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DEST_CNT_TIME',
|
|
|
header: '目的港提箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DEST_RTCNT_TIME',
|
|
|
header: '目的港还箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_STATOIN',
|
|
|
header: '目的港场站',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DETAIN_CTN_DAYS',
|
|
|
header: '滞箱天数',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PRE_CNT_TIME',
|
|
|
header: '预计提箱日期',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_RETURE_EMPTY',
|
|
|
header: '是否返空',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_POD_CLEAN',
|
|
|
header: '否目的港清洗',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'IS_BOOKING',
|
|
|
header: '是否订舱',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_CUSTNO',
|
|
|
header: '空返委托编号',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_MBLNO',
|
|
|
header: '空返提单号',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_CARRIER',
|
|
|
header: '空返船公司',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_CONTRACT',
|
|
|
header: '运费约价',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_PORTLOAD_CNT_TIME',
|
|
|
header: '空返起运港提箱日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_PORTLOAD',
|
|
|
header: '空返起运港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_ETD',
|
|
|
header: '空返开船日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DESTPORT',
|
|
|
header: '空返目的港',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_ETA',
|
|
|
header: '空返到港日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DESTPORT_STATOIN',
|
|
|
header: '空返目的港场站',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DEST_CNT_TIME',
|
|
|
header: '空返目的港提箱日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'I_DEST_RTCNT_TIME',
|
|
|
header: '空返目的港还箱日期',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_FREE_DAYS',
|
|
|
header: '起运港免箱使天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_OVER_DAYS',
|
|
|
header: '起运港超期天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_OVER_DAYS_FEE',
|
|
|
header: '起运港箱使费/天',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PORTLOAD_OVER_DAYS_AMT',
|
|
|
header: '起运港箱使费',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_FREE_DAYS',
|
|
|
header: '目的港免箱使天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_OVER_DAYS',
|
|
|
header: '目的港超期天数',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_OVER_DAYS_FEE',
|
|
|
header: '目的港箱使费/天',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DESTPORT_OVER_DAYS_AMT',
|
|
|
header: '目的港箱使费',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BOOKGOODNAME',
|
|
|
header: '订舱品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CUSTOMGOODNAME',
|
|
|
header: '报关品名',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TRUCKNAME',
|
|
|
header: '录车队',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTBYREF',
|
|
|
header: '录入人',
|
|
|
width: 100
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'INPUTTIME',
|
|
|
header: '录入时间',
|
|
|
width: 100
|
|
|
}
|
|
|
];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
|
|
|
|
|
|
this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
_this = this;
|
|
|
//定义Grid
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'north',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
height: 150,
|
|
|
disableSelection: false,
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true
|
|
|
},
|
|
|
selModel: this.GridCheckBoxModel,
|
|
|
columns: this.girdcolums
|
|
|
|
|
|
,
|
|
|
// paging bar on the bottom
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.girdcolums = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
this.girdcolums.unshift(new Ext.grid.RowNumberer());
|
|
|
|
|
|
this.gridList.reconfigure(this.storeList, this.girdcolums);
|
|
|
//#endregion
|
|
|
|
|
|
//#region 费用表
|
|
|
|
|
|
this.panelFee = new Shipping.FeeEditGrid({
|
|
|
region: 'center',
|
|
|
layout: 'border'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelFee.stroplb = 'OpCtnBsCard';
|
|
|
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "WTDW-委托单位", "CUSTTYPE": "委托单位", "CUSTNAME": "CUSTOMERNAME" });
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "CD-车队", "CUSTTYPE": "车队", "CUSTNAME": "TRUCKNAME" });
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "MDGDL-目的港代理", "CUSTTYPE": "目的港代理", "CUSTNAME": "AGENTNAME" });
|
|
|
this.panelFee.StoreCustType.add({ "SCUSTTYPE": "DCGS-订舱公司", "CUSTTYPE": "订舱公司", "CUSTNAME": "AGENTNAME" });
|
|
|
|
|
|
this.panelFee.StoreDrOpRange.load({ params: { optype: "modOtherRecvFeeManagement" } });
|
|
|
this.panelFee.StoreCrOpRange.load({ params: { optype: "modOtherPayFeeManagement" } });
|
|
|
this.panelFee.storeFeeNameRef.load({ params: { condition: "" } });
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
this.panelCtnBody = new Ext.Panel({
|
|
|
title: '业务卡信息',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
// autoScroll: true,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.gridList, this.panelFee]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelBody = new Ext.Panel({
|
|
|
title: '运价方案信息',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
// autoScroll: true,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.formEdit,this.gridListBody]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.MainTab = new Ext.tab.Panel({
|
|
|
layout: "border",
|
|
|
region: "center", split: true,
|
|
|
items: [
|
|
|
this.panelCtnBody,this.panelBody
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region formSearch 查询面板
|
|
|
_this = this;
|
|
|
|
|
|
this.storeBLTYPE = Ext.create('Ext.data.Store', {
|
|
|
fields: ['FSTATUS', 'NAME']
|
|
|
});
|
|
|
this.storeBLTYPE.add({ "FSTATUS": "返空", "NAME": "返空" });
|
|
|
this.storeBLTYPE.add({ "FSTATUS": "调拨", "NAME": "调拨" });
|
|
|
this.storeBLTYPE.add({ "FSTATUS": "空返-调拨", "NAME": "空返-调拨" });
|
|
|
this.storeBLTYPE.add({ "FSTATUS": "调拨-空返", "NAME": "调拨-空返" });
|
|
|
|
|
|
this.comboxBLTYPE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '类型',
|
|
|
store: this.storeBLTYPE,
|
|
|
valueField: 'FSTATUS',
|
|
|
displayField: 'NAME',
|
|
|
forceSelection: true,
|
|
|
name: 'BLTYPE'
|
|
|
});
|
|
|
|
|
|
this.storeAddDCType = Ext.create('Ext.data.Store', {
|
|
|
fields: ['DC', 'NAME']
|
|
|
});
|
|
|
this.storeAddDCType.add({ "DC": "", "NAME": "全部" });
|
|
|
this.storeAddDCType.add({ "DC": "1", "NAME": "未审核" });
|
|
|
this.storeAddDCType.add({ "DC": "2", "NAME": "已审核" });
|
|
|
|
|
|
this.comboxaddDCType = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '审核状态',
|
|
|
store: this.storeAddDCType,
|
|
|
valueField: 'DC',
|
|
|
displayField: 'NAME',
|
|
|
forceSelection: true,
|
|
|
name: 'DC',
|
|
|
value: '1',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'north',
|
|
|
height:45,
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 70,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
|
|
|
items: [{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '箱号',
|
|
|
name: 'CTNNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxaddDCType, {
|
|
|
fieldLabel: '编号',
|
|
|
name: 'BSNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, this.comboxBLTYPE, {
|
|
|
fieldLabel: '开船日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDbgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'ETDend',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
width: 90,
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
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
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [
|
|
|
{
|
|
|
text: "重置条件",
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
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: "btnadd",
|
|
|
id:"btnAuditPass",
|
|
|
handler: function (button, event) {
|
|
|
// this.onAuditBillPassClick();
|
|
|
this.winAuditShow2.show();
|
|
|
},
|
|
|
scope: this
|
|
|
|
|
|
},
|
|
|
'-',
|
|
|
{
|
|
|
text: "驳回提交",
|
|
|
iconCls: "btndelete",
|
|
|
id: "btnAuditBack",
|
|
|
handler: function (button, event) {
|
|
|
this.onAuditBillBackClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '撤销审核',
|
|
|
id: "btnCancelAudit",
|
|
|
handler: function (button, event) {
|
|
|
this.onCancelAuditClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: '撤销最终审核',
|
|
|
id: "btnAuditBackAll",
|
|
|
handler: function (button, event) {
|
|
|
this.onCancelAuditLastClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}
|
|
|
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
//#region 日志表
|
|
|
|
|
|
Ext.define('MsOpAuditLog', {
|
|
|
extend: 'Ext.data.Model',
|
|
|
idProperty: 'ADLGID',
|
|
|
fields: [
|
|
|
{ name: 'ADLGID', type: 'string' },
|
|
|
{ name: 'BSNO', type: 'string' },
|
|
|
{ name: 'ERRMSG', type: 'string' },
|
|
|
{ name: 'ERROP', type: 'string' },
|
|
|
{ name: 'ERRCUST', type: 'string' },
|
|
|
{ name: 'AUDITTYPE', type: 'string' },
|
|
|
{ name: 'AUDITREMARK', type: 'string' },
|
|
|
{ name: 'AUDITUSER', type: 'string' },
|
|
|
{ name: 'AUDITUSERREF', type: 'string' },
|
|
|
{ name: 'AUDITTIME', type: 'string' },
|
|
|
{ name: 'ISAMEND', type: 'string' },
|
|
|
{ name: 'SORT', type: 'number' }
|
|
|
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeLog = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpAuditLog',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsOpAuditDetail/GetAuditLogList',
|
|
|
reader: {
|
|
|
id: 'ADLGID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.initLogcolumn = [
|
|
|
{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'ADLGID',
|
|
|
header: 'ADLGID',
|
|
|
width: 130
|
|
|
}, {
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: 'BSNO',
|
|
|
width: 70,
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITUSER',
|
|
|
header: '操作人',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITTIME',
|
|
|
header: '操作时间',
|
|
|
//renderer: 'Y-m-d H:i:s',
|
|
|
width: 90
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITTYPE',
|
|
|
header: '类型',
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITREMARK',
|
|
|
header: '备注或审核意见',
|
|
|
width: 120
|
|
|
}
|
|
|
];
|
|
|
this.Logcolumn = this.initLogcolumn;
|
|
|
|
|
|
this.gridList_Log = new Ext.grid.GridPanel({
|
|
|
store: this.storeLog,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
//selModel: this.MainCB,
|
|
|
columns: this.Logcolumn,
|
|
|
tbar: [{
|
|
|
text: '保存列表样式', //保存列表样式
|
|
|
menu: [
|
|
|
{
|
|
|
text: '保存', //保存
|
|
|
handler: function (button, event) {
|
|
|
_this.Logcolumn = DsTruck.SaveGridPanel(GID, 'AuditDetailLog', _this.gridList_Log.columns, _this.Logcolumn, 0, true);
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: '初始化', //初始化
|
|
|
handler: function (menu, event) {
|
|
|
_this.gridList_Log.reconfigure(this.storeLog, _this.initLogcolumn);
|
|
|
_this.Logcolumn = DsTruck.SaveGridPanel(GID, 'AuditDetailLog', _this.gridList_Log.columns, _this.initLogcolumn, 0, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}],
|
|
|
//plugins: [this.cellEditing],
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true
|
|
|
},
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeLog,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.Logcolumn = DsTruck.GetGridPanel(GID, 'AuditDetailLog', this.Logcolumn, 0);
|
|
|
this.gridList_Log.reconfigure(this.storeLog, this.Logcolumn);
|
|
|
|
|
|
this.storeLog.on('beforeload', function (store) {
|
|
|
|
|
|
var sql = " BSNO='" + this.strBSNO + "'";
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
}, this);
|
|
|
|
|
|
this.panelLogList = new Ext.Panel({
|
|
|
title: '审核日志',
|
|
|
layout: "border",
|
|
|
region: 'east',
|
|
|
width: 380,
|
|
|
//height: 300,
|
|
|
margin: '1 1',
|
|
|
split: true,
|
|
|
items: [this.gridList_Log]
|
|
|
});
|
|
|
|
|
|
//#endregion 日志表
|
|
|
|
|
|
this.panelBill = new Ext.Panel({
|
|
|
// title: '业务信息',
|
|
|
layout: "border",
|
|
|
region: 'north',
|
|
|
height: 200,
|
|
|
frame: true,
|
|
|
split: true,
|
|
|
items: [this.gridListAudit, this.panelLogList]
|
|
|
});
|
|
|
|
|
|
//#region 布局
|
|
|
//控件布局
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 230,
|
|
|
split: true,
|
|
|
items: [this.panelBtn, this.formSearch, this.panelBill]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelTop, this.MainTab]
|
|
|
});
|
|
|
|
|
|
this.gridListAudit.getSelectionModel().on('select', function (model, record, index) {
|
|
|
var BSNO = record.data.BSNO;
|
|
|
this.reauditgid = record.data.GID;
|
|
|
this.pricegid = record.data.PRICEGID;
|
|
|
if (record.data.PRICEGID != '') {
|
|
|
this.LoadPriceData('edit', "GID='" + record.data.PRICEGID + "'", record.data.TTLINUSDCOST, record.data.TTLCOST);
|
|
|
}
|
|
|
this.sqlctn = " (SELECT BSCARDGID FROM op_ctnbscard_reaudit_detail where LINKGID='" + this.reauditgid+ "') ";
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: " GID IN " + this.sqlctn },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
this.LoadFeeData();
|
|
|
var acondition = "";
|
|
|
acondition = " LINKGID='" + this.reauditgid + "'";
|
|
|
this.storeBodyList.load({ params: { condition: acondition } });
|
|
|
this.storeLog.load({ params: { condition: " (BSNO='" + this.reauditgid + "') " } });
|
|
|
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
//绑定查询窗体
|
|
|
|
|
|
this.storeListAudit.on('load', function (store, records) {
|
|
|
if (store.getCount() > 0) {
|
|
|
this.gridListAudit.getSelectionModel().select(0);
|
|
|
} else {
|
|
|
this.pricegid = '111111';
|
|
|
this.sqlctn = " (SELECT BSCARDGID FROM op_ctnbscard_reaudit_detail where LINKGID='" + this.pricegid + "') ";
|
|
|
this.LoadPriceData('edit', "GID='" + this.pricegid + "'",0,0);
|
|
|
this.storeList.removeAll();
|
|
|
this.LoadFeeData();
|
|
|
this.storeBodyList.removeAll();
|
|
|
this.storeLog.removeAll();
|
|
|
|
|
|
}
|
|
|
}, this);
|
|
|
this.storeBodyList.on('beforeload', function (store) {
|
|
|
var pricegid = this.reauditgid;
|
|
|
var acondition = " LINKGID='" + pricegid + "'";
|
|
|
Ext.apply(store.proxy.extraParams, { condition: acondition });
|
|
|
}, this);
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: " GID IN " + this.sqlctn });
|
|
|
}, this);
|
|
|
this.onRefreshClick();
|
|
|
//绑定事件
|
|
|
|
|
|
this.storeAuditer2 = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserActionRefListRm' }
|
|
|
});
|
|
|
|
|
|
this.storeAuditer2.load(({ params: { MODULENAME: 'modBLFeeAudit' } }));
|
|
|
this.comboxAuditer2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '下一步审核人', //揽货人
|
|
|
store: this.storeAuditer2,
|
|
|
forceSelection: true,
|
|
|
name: 'PS_AUDIT',
|
|
|
valueField: 'GID',
|
|
|
displayField: 'CodeAndName',
|
|
|
enableKeyEvents: true
|
|
|
});
|
|
|
|
|
|
|
|
|
this.CheckIsFinish2 = new Ext.form.Checkbox({
|
|
|
fieldLabel: '是否最终审核', //'不输出箱号封号',
|
|
|
readOnly: true,
|
|
|
checked: false,
|
|
|
name: 'ISFINISH'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.formAuditShow2 = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 100,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
this.comboxAuditer2,this.CheckIsFinish2, {
|
|
|
fieldLabel: '审核意见', //'AGENT',
|
|
|
name: 'AUDITREMARK',
|
|
|
xtype: 'textareafield',
|
|
|
grow: true,
|
|
|
height: 50,
|
|
|
anchor: '100%',
|
|
|
flex: 1.8
|
|
|
|
|
|
}
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.winAuditShow2 = 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.formAuditShow2],
|
|
|
buttons: [{
|
|
|
text: "确认审核",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
var form = _this.formAuditShow2.getForm();
|
|
|
var auditer = form.findField('PS_AUDIT').getValue();
|
|
|
var ISFINISH = '0';
|
|
|
if (_this.CheckIsFinish2.checked)
|
|
|
ISFINISH = '1';
|
|
|
var AUDITREMARK = form.findField('AUDITREMARK').getValue();
|
|
|
//if (ISFINISH == '0' && (auditer == '' || auditer == undefined)) {
|
|
|
// Ext.Msg.show({ title: '提示', msg: '不是最终审核,下一步审核人不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
// return;
|
|
|
//}
|
|
|
|
|
|
_this.onAuditBillPassClick(auditer, AUDITREMARK, ISFINISH);
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: "关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winAuditShow2.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
var btnAuditPass = Ext.getCmp('btnAuditPass');
|
|
|
var btnAuditBack = Ext.getCmp('btnAuditBack');
|
|
|
var btnCancelAudit = Ext.getCmp('btnCancelAudit');
|
|
|
var btnAuditBackAll = Ext.getCmp('btnAuditBackAll');
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modBsCardReAudit_BackAudit"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
_this.CheckIsFinish2.setRawValue(true);
|
|
|
_this.CheckIsFinish2.setReadOnly(false);
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modBsCardReAudit_BackLast"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
btnAuditBackAll.enable();
|
|
|
} else {
|
|
|
btnAuditBackAll.disable();
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
btnAuditBackAll.disable();
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modBsCardReAudit_Audit"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
btnAuditPass.enable();
|
|
|
btnAuditBack.enable();
|
|
|
} else {
|
|
|
btnAuditPass.disable();
|
|
|
btnAuditBack.disable();
|
|
|
}
|
|
|
} else {
|
|
|
btnAuditPass.disable();
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modBsCardReAudit_AuditBack"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success) {
|
|
|
btnCancelAudit.enable();
|
|
|
} else {
|
|
|
btnCancelAudit.disable();
|
|
|
}
|
|
|
} else {
|
|
|
btnCancelAudit.disable();
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
|
|
|
|
|
|
LoadPriceData: function (opstatus, condition, TTLINUSDCOST, TTLCOST) {
|
|
|
this.serialNo = 0;
|
|
|
this.workSerialNo = 0;
|
|
|
this.bodyDel = [];
|
|
|
|
|
|
this.opStatus = opstatus;
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在查询主表数据...',
|
|
|
url: '/MvcContainer/MsOpPrice/GetProjectData',
|
|
|
params: {
|
|
|
handle: opstatus,
|
|
|
condition: condition
|
|
|
},
|
|
|
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 data = result.data;
|
|
|
this.formEdit.getForm().reset();
|
|
|
this.formEdit.getForm().setValues(data);
|
|
|
this.formEdit.getForm().findField('TTLINUSDCOST').setValue(TTLINUSDCOST);
|
|
|
this.formEdit.getForm().findField('TTLCOST').setValue(TTLCOST);
|
|
|
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}, // end LoadDate
|
|
|
|
|
|
LoadFeeData: function () {
|
|
|
|
|
|
var BSNOStr = '';
|
|
|
|
|
|
var feesql = " and isnull(ch_fee.WMSOUTBSNO,'')='' AND ch_fee.BSNO IN " + this.sqlctn;
|
|
|
|
|
|
|
|
|
this.panelFee.feecondition = feesql;
|
|
|
this.panelFee.CR_condition = " ch_fee.INPUTMODE='代理报价' and ch_fee.Feetype=2 " + this.panelFee.feecondition;
|
|
|
this.panelFee.EditRecord = this.EditRecord;
|
|
|
this.panelFee.strBSNO = this.BsNo;
|
|
|
this.panelFee.strPBSNO = this.BsNo;
|
|
|
this.panelFee.strMBLNO = this.BsNo;
|
|
|
this.panelFee.StoreDateCurr.load({ params: { optype: "OpCtnBsCard", bsno: this.BsNo } });
|
|
|
this.panelFee.StoreUnit.load({ params: { bsno: this.BsNo, bstype: "OpCtnBsCard" } });
|
|
|
|
|
|
//this.panelFee.LoadDrChFee();
|
|
|
this.panelFee.LoadInputMode(" ch_fee.Feetype=2 " + this.panelFee.feecondition);
|
|
|
this.panelFee.LoadCrChFee();
|
|
|
|
|
|
|
|
|
}, // end LoadDate
|
|
|
onAuditBillPassClick: function (auditer, AUDITREMARK, ISFINISH) {
|
|
|
|
|
|
var selections = this.gridListAudit.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择需审核的费用!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
if (BILLSTATUS == '2') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许审核!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定审核通过选中的业务吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在审核数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在审核数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCardReAudit/AuditBillList',
|
|
|
params: {
|
|
|
bill: jsonbodyAddDatas,
|
|
|
audit: auditer,
|
|
|
auditremark: AUDITREMARK,
|
|
|
isfinish: ISFINISH
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
_this.storeListAudit.reload();
|
|
|
Ext.Msg.show({ title: '提示', msg: '审核成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
this.winAuditShow2.close();
|
|
|
}
|
|
|
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);
|
|
|
|
|
|
},
|
|
|
|
|
|
onAuditBillBackClick: function () {
|
|
|
|
|
|
var selections = this.gridListAudit.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择需驳回的单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
if ((BILLSTATUS == '2' || BILLSTATUS == '0')) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许驳回!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
_this = this;
|
|
|
|
|
|
Ext.MessageBox.show({
|
|
|
title: "确认驳回!",
|
|
|
msg: "请输入驳回原因!",
|
|
|
width: 300,
|
|
|
buttons: Ext.MessageBox.OKCANCEL,
|
|
|
multiline: true,
|
|
|
fn: function (btn, text) {
|
|
|
if (btn == "ok") {
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCardReAudit/AuditBillBack',
|
|
|
params: {
|
|
|
bill: jsonbodyAddDatas,
|
|
|
reasean: text
|
|
|
},
|
|
|
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.storeListAudit.reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.MessageBox.alert('错误', response.responseText);
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
},
|
|
|
onCancelAuditClick: function () {
|
|
|
|
|
|
var selections = this.gridListAudit.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择需驳回的单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
if ((BILLSTATUS == '2')) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许驳回!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', "确实要撤销选中的申请吗?", function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCardReAudit/CloseAuditBill',
|
|
|
params: {
|
|
|
bill: jsonbodyAddDatas,
|
|
|
islast: false
|
|
|
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (!jsonresult.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
this.storeListAudit.reload();
|
|
|
Ext.MessageBox.hide();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
|
|
|
},
|
|
|
success: function (response, options) { },
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
onCancelAuditLastClick: function() {
|
|
|
|
|
|
var selections = this.gridListAudit.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择需驳回的单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BILLSTATUS = rec.data.BILLSTATUS;
|
|
|
if ((BILLSTATUS == '0')) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许驳回!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', "确实要撤销选中的申请吗?", function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCardReAudit/CloseAuditBill',
|
|
|
params: {
|
|
|
bill: jsonbodyAddDatas,
|
|
|
islast:true
|
|
|
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (!jsonresult.Success) {
|
|
|
Ext.Msg.show({
|
|
|
title: Zi.LAN.TiShi,
|
|
|
msg: result.Message,
|
|
|
icon: Ext.MessageBox.ERROR,
|
|
|
buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
else {
|
|
|
this.storeListAudit.reload();
|
|
|
Ext.MessageBox.hide();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.MessageBox.alert(Zi.LAN.Error, response.responseText);
|
|
|
},
|
|
|
success: function (response, options) { },
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
gridListAfterEdit: function (editor, e, eOpts) {
|
|
|
if (e.value == e.originalValue) return;
|
|
|
if (e.field == 'REJECTID') {
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
onViewWorkFlowDetailClick: function () {
|
|
|
|
|
|
var Gid = this.reauditgid;
|
|
|
|
|
|
|
|
|
var openSet = "height=700, width=1024, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 750) / 2 + ",Left= " + (screen.width - 1100) / 2
|
|
|
var openType = "_blank";
|
|
|
var openUrl = "";
|
|
|
var openUrl = "../../Account/Chfee_payapplication/Map?bsno=" + Gid + "&name=";
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
//#region 编辑时按钮等的状态
|
|
|
GetEditStatus: function () {
|
|
|
var canedit = false;
|
|
|
//var BSSTATUS = this.formHead.getForm().findField('BILLSTATUSREF').getValue();
|
|
|
//if (BSSTATUS == '审核通过' || BSSTATUS == '提交审核') {
|
|
|
|
|
|
//} else {
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
},
|
|
|
onRefreshClick: function (button, event) {
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.storeListAudit.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: _this.sqlcontext},
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
var sql = this.sqlcontext;
|
|
|
this.storeListAudit.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql},
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = "";
|
|
|
|
|
|
|
|
|
var StrAudit = " a.AUDITUSER='" + GID + "' and isnull(a.ISFINISH,0)<>1 ";
|
|
|
|
|
|
//var StrAudit = " EXISTS (select 1 from op_ctnbscard_reaudit left join workflow_using wu on wu.bsno=op_ctnbscard_reaudit.GID left join workflow_step st "
|
|
|
//StrAudit = StrAudit + " on (st.WORKFLOWID=wu.WORKFLOWID and st.GROUPID=WU.CurrentID) where b.GID=op_ctnbscard_reaudit.GID "
|
|
|
//StrAudit = StrAudit + " and (wu.TYPENO=818) "
|
|
|
|
|
|
//StrAudit = StrAudit + " and isnull((power(2,(ST.STEPNO)) & wu.stepno),0)>0 and st.AUDITOR='" + GID + "' and op_ctnbscard_reaudit.BILLSTATUS=2 "
|
|
|
//StrAudit = StrAudit + " ) ";
|
|
|
|
|
|
var BSNO = form.findField('BSNO').getValue();
|
|
|
// sql = sql + getAndConSql(sql, BSNO, " (BSNO like '%" + BSNO + "%' or CUSTNO like '%" + BSNO + "%' or I_CUSTNO like '%" + BSNO + "%' or MBLNO like '%" + BSNO + "%' ) ");
|
|
|
sql = sql + getAndConSql(sql, BSNO, " (s.BSNO like '%" + BSNO + "%' or s.CUSTNO like '%" + BSNO + "%' or s.MBLNO like '%" + BSNO + "%') ");
|
|
|
// sql = sql + getAndConSql(sql, BSNO, " (BSNO like '%" + BSNO + "%' or CUSTNO like '%" + BSNO + "%' or I_CUSTNO like '%" + BSNO + "%' or MBLNO like '%" + BSNO + "%' ) ");
|
|
|
|
|
|
var CTNNO = form.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, "EXISTS (SELECT 1 FROM op_ctnbscard_reaudit_detail D LEFT JOIN op_ctnbscard C ON (C.GID=D.BSCARDGID) WHERE D.LINKGID=B.GID AND C.CTNNO like '%" + CTNNO + "%')");
|
|
|
|
|
|
var BLTYPE = form.findField('BLTYPE').getValue();
|
|
|
sql = sql + getAndConSql(sql, BLTYPE, "BLTYPE='" + BLTYPE + "'");
|
|
|
|
|
|
var expDateBgn = form.findField('ETDbgn').getRawValue();
|
|
|
var expDateEnd = form.findField('ETDend').getRawValue();
|
|
|
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "s.ETD>='" + expDateBgn + "'");
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "s.ETD<='" + expDateEnd + " 23:59:59'");
|
|
|
|
|
|
|
|
|
|
|
|
var DC = form.findField('DC').getValue();
|
|
|
if (DC != '') {
|
|
|
if (DC == '1') {
|
|
|
sql = sql + getAndConSql(sql, DC, StrAudit);
|
|
|
} else if (DC == '2') {
|
|
|
sql = sql + getAndConSql(sql, DC, " EXISTS (select 1 from op_audit_log L WHERE L.BSNO=B.GID AND L.AUDITTYPE='审核' and AUDITUSER='" + SHOWNAME + "' ) ");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
setSaveBtnStatus: function (enable) {
|
|
|
var btnESave = Ext.getCmp('btnsave');
|
|
|
var btnESaveAndClose = Ext.getCmp('btnsaveandclose');
|
|
|
var btnESaveAndNew = Ext.getCmp('btnsaveandnew');
|
|
|
var btnECopyAndNew = Ext.getCmp('btncopyandsave');
|
|
|
var btnadddetail = Ext.getCmp('btnadddetail');
|
|
|
var btndeldetail = Ext.getCmp('btndeldetail');
|
|
|
|
|
|
if (enable) {
|
|
|
btnESave.enable();
|
|
|
btnESaveAndClose.enable();
|
|
|
btnESaveAndNew.enable();
|
|
|
btnECopyAndNew.enable();
|
|
|
btnadddetail.enable();
|
|
|
btndeldetail.enable();
|
|
|
|
|
|
} else {
|
|
|
btnESave.disable();
|
|
|
btnESaveAndClose.disable();
|
|
|
btnESaveAndNew.disable();
|
|
|
btnECopyAndNew.disable();
|
|
|
btnadddetail.disable();
|
|
|
btndeldetail.disable();
|
|
|
}
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|