|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsRptRepairView = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsRptRepairView.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsRptRepairView, Ext.Panel, {
|
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
sqlcontextc: '',
|
|
|
PageSize: 100,
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
bslistdrsortfield: '',
|
|
|
bslistdrsortdire: '',
|
|
|
bslistcrsortfield: '',
|
|
|
bslistcrsortdire: '',
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.formname = "MsRptRepairView"; //页面名称
|
|
|
this.sqlcontext = '';
|
|
|
this.sqlcontextc = '';
|
|
|
this.sqlcontextr = '';
|
|
|
this.SelectedPic = '';
|
|
|
this.sqltype = '1';
|
|
|
Ext.Ajax.timeout = 120000;
|
|
|
|
|
|
//#region 维修
|
|
|
|
|
|
this.storeListRepair = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpCtnRepair',
|
|
|
pageSize: this.PageSize,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnRepairList',
|
|
|
timeout: 120000,
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
_thisRepairView = this;
|
|
|
|
|
|
this.initgirdcolums1 = [{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'LINKID',
|
|
|
header: 'LINKID',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNNO',
|
|
|
header: '箱号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
width: 200
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITSTATUS',
|
|
|
header: '状态',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'REPAIRITEMS',
|
|
|
header: '维修改装项目',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'REPAIRTIME',
|
|
|
header: '维修改装日期',
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURSTATOIN',
|
|
|
header: '场站',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEENAME',
|
|
|
header: '费用名称',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURRENCY',
|
|
|
header: '币别',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AMOUNT',
|
|
|
header: '金额',
|
|
|
width: 150
|
|
|
},
|
|
|
{ sortable: true,
|
|
|
dataIndex: 'IMAGE1',
|
|
|
header: '改装前照片',
|
|
|
width: 140,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.IMAGE_LINDADDR + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
xtype: 'actioncolumn',
|
|
|
width: 150,
|
|
|
text: '改装前照片', //操作
|
|
|
items: [{
|
|
|
icon: '/images/icons/L5.gif', // Use a URL in the icon config
|
|
|
tooltip: '预览',
|
|
|
getClass: function (v, meta, rec) {
|
|
|
var filePath = rec.get('IMAGE_LINDADDR');
|
|
|
if (filePath == '' || filePath == null) {
|
|
|
return '';
|
|
|
} else {
|
|
|
return 'button_view';
|
|
|
}
|
|
|
},
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
var filePath = rec.get('IMAGE_LINDADDR');
|
|
|
if (filePath == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有文件无法预览!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
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 = "";
|
|
|
openUrl = "../../MvcContainer/MsOpCtnBsCard/ZipView?handle=check&filePath=" + filePath;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
//DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'IMAGE2',
|
|
|
header: '改装后照片',
|
|
|
width: 140,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.IMAGE_LINDADDR2 + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
xtype: 'actioncolumn',
|
|
|
width: 150,
|
|
|
text: '改装后照片', //操作
|
|
|
items: [{
|
|
|
icon: '/images/icons/L5.gif', // Use a URL in the icon config
|
|
|
tooltip: '预览',
|
|
|
getClass: function (v, meta, rec) {
|
|
|
var filePath = rec.get('IMAGE_LINDADDR2');
|
|
|
if (filePath == '' || filePath == null) {
|
|
|
return '';
|
|
|
} else {
|
|
|
return 'button_view';
|
|
|
}
|
|
|
|
|
|
},
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
var filePath = rec.get('IMAGE_LINDADDR2');
|
|
|
if (filePath == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有文件无法预览!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
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 = "";
|
|
|
openUrl = "../../MvcContainer/MsOpCtnBsCard/ZipView?handle=check&filePath=" + filePath;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
//DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARKS',
|
|
|
header: '备注',
|
|
|
width: 150
|
|
|
}];
|
|
|
|
|
|
this.girdcolums1 = this.initgirdcolums1;
|
|
|
|
|
|
|
|
|
//明细表表格
|
|
|
this.gridListRepairCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
clicksToEdit: 1
|
|
|
});
|
|
|
this.RepairGridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
|
|
|
this.gridListRepair = new Ext.grid.GridPanel({
|
|
|
store: this.storeListRepair,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [this.gridListRepairCellEditing],
|
|
|
selModel: this.RepairGridCheckBoxModel,
|
|
|
selType: 'cellmodel',
|
|
|
columns: this.girdcolums1,
|
|
|
tbar: [{
|
|
|
text:'保存列表样式', //保存列表样式
|
|
|
menu: [
|
|
|
{
|
|
|
text:'保存', //保存
|
|
|
handler: function (button, event) {
|
|
|
_thisRepairView.girdcolums1 = DsTruck.SaveGridPanel(USERID, _thisRepairView.formname + '1', _thisRepairView.gridListRepair.columns, _thisRepairView.girdcolums1, 0, true);
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text:'初始化', //初始化
|
|
|
handler: function (menu, event) {
|
|
|
_thisRepairView.gridListRepair.reconfigure(_thisRepairView.storeListRepair, _thisRepairView.initgirdcolums1);
|
|
|
_thisRepairView.girdcolums1 = DsTruck.SaveGridPanel(USERID, _thisRepairView.formname + '1', _thisRepairView.gridListRepair.columns, _thisRepairView.initgirdcolums1, 0, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}],
|
|
|
// paging bar on the bottom
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeListRepair,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
_thisRepairView.girdcolums1 = DsTruck.GetGridPanel(USERID, _thisRepairView.formname + '1', _thisRepairView.girdcolums1, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
|
|
|
_thisRepairView.gridListRepair.reconfigure(_thisRepairView.storeListRepair, _thisRepairView.girdcolums1);
|
|
|
|
|
|
|
|
|
|
|
|
this.gridListRepair.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusEdit?bsno=' + record.data.LINKGID, record.data.GID);
|
|
|
}, this);
|
|
|
|
|
|
this.gridListRepair.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.bslistdrsortfield = column.dataIndex;
|
|
|
this.bslistdrsortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
//#region 清洗
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListClearing = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpCtnClearing',
|
|
|
pageSize: this.PageSize,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnClearingList',
|
|
|
timeout: 120000,
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.initgirdcolums2=[{
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true, hidden: true,
|
|
|
dataIndex: 'LINKID',
|
|
|
header: 'LINKID',
|
|
|
width: 80
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CTNNO',
|
|
|
header: '箱号',
|
|
|
width: 200
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
width: 200
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AUDITSTATUS',
|
|
|
header: '状态',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURSTATOIN',
|
|
|
header: '场站',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'INSTATOINTIME',
|
|
|
header: '进场时间',
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 120
|
|
|
},
|
|
|
{ sortable: true,
|
|
|
dataIndex: 'IMAGE1',
|
|
|
header: '进场照片',
|
|
|
width: 140,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.IMAGE_LINDADDR + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
|
|
|
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
xtype: 'actioncolumn',
|
|
|
width: 50,
|
|
|
text: '进场照片', //操作
|
|
|
items: [{
|
|
|
icon: '/images/icons/L5.gif', // Use a URL in the icon config
|
|
|
tooltip: '预览',
|
|
|
getClass: function (v, meta, rec) {
|
|
|
var filePath = rec.get('IMAGE_LINDADDR');
|
|
|
if (filePath == '' || filePath == null) {
|
|
|
return '';
|
|
|
} else {
|
|
|
return 'button_view';
|
|
|
}
|
|
|
},
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
var filePath = rec.get('IMAGE_LINDADDR');
|
|
|
if (filePath == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有文件无法预览!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
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 = "";
|
|
|
openUrl = "../../MvcContainer/MsOpCtnBsCard/ZipView?handle=check&filePath=" + filePath;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
//DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
}
|
|
|
}]
|
|
|
}, {
|
|
|
xtype: 'actioncolumn',
|
|
|
width: 50,
|
|
|
text: 'EIR照片', //操作
|
|
|
items: [{
|
|
|
icon: '/images/icons/L5.gif', // Use a URL in the icon config
|
|
|
tooltip: '预览',
|
|
|
getClass: function (v, meta, rec) {
|
|
|
var filePath = rec.get('EIRPATH');
|
|
|
if (filePath == '' || filePath == null) {
|
|
|
return '';
|
|
|
} else {
|
|
|
return 'button_view';
|
|
|
}
|
|
|
},
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
var filePath = rec.get('EIRPATH');
|
|
|
if (filePath == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有文件无法预览!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
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 = "";
|
|
|
openUrl = "../../MvcContainer/MsOpCtnBsCard/ZipView?handle=check&filePath=" + filePath;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
//DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
{ sortable: true,
|
|
|
dataIndex: 'EIR',
|
|
|
header: 'EIR照片',
|
|
|
width: 140,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.EIRPATH + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CLEARINGMODE',
|
|
|
header: '清洗方式',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PREGOODSNAME',
|
|
|
header: '前装货',
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCLEAR_CERT',
|
|
|
header: '是否有清洁证',
|
|
|
hidden: true,
|
|
|
editor: {
|
|
|
xtype: 'checkboxfield',
|
|
|
inputValue: '1',
|
|
|
uncheckedValue: '0'
|
|
|
// selectOnFocus: true
|
|
|
},
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true' || value == '1') {
|
|
|
return "√";
|
|
|
} else return "";
|
|
|
},
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CHECKGOV',
|
|
|
header: '检测机构',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCLEAR_PLAN',
|
|
|
header: '发送清洗计划',
|
|
|
hidden: true,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true' || value == '1') {
|
|
|
return "√";
|
|
|
} else return "";
|
|
|
},
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CLEARTIME',
|
|
|
header: '清洗时间',
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
|
|
|
width: 120
|
|
|
},
|
|
|
{ sortable: true,
|
|
|
dataIndex: 'IMAGE_CLEAR',
|
|
|
header: '清洗照片',
|
|
|
width: 140,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.IMAGE_CLEARPATH + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
xtype: 'actioncolumn',
|
|
|
width: 50,
|
|
|
text: '清洗照片', //操作
|
|
|
items: [{
|
|
|
icon: '/images/icons/L5.gif', // Use a URL in the icon config
|
|
|
tooltip: '预览',
|
|
|
getClass: function (v, meta, rec) {
|
|
|
var filePath = rec.get('IMAGE_CLEARPATH');
|
|
|
if (filePath == '' || filePath == null) {
|
|
|
return '';
|
|
|
} else {
|
|
|
return 'button_view';
|
|
|
}
|
|
|
},
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
var filePath = rec.get('IMAGE_CLEARPATH');
|
|
|
if (filePath == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有文件无法预览!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
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 = "";
|
|
|
openUrl = "../../MvcContainer/MsOpCtnBsCard/ZipView?handle=check&filePath=" + filePath;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
//DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
{ sortable: true,
|
|
|
dataIndex: 'IMAGE_CHECKGOV',
|
|
|
header: '清洁证照片',
|
|
|
width: 140,
|
|
|
renderer: function (value, p, record) {
|
|
|
return '<a href="' + record.data.IMAGE_CHECKGOVPATH + '" style=' + '"text-decoration:none"' + '>' + value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
|
|
|
{
|
|
|
xtype: 'actioncolumn',
|
|
|
width: 50,
|
|
|
text: '清洁证照片', //操作
|
|
|
items: [{
|
|
|
icon: '/images/icons/L5.gif', // Use a URL in the icon config
|
|
|
tooltip: '预览',
|
|
|
getClass: function (v, meta, rec) {
|
|
|
var filePath = rec.get('IMAGE_CHECKGOVPATH');
|
|
|
if (filePath == '' || filePath == null) {
|
|
|
return '';
|
|
|
} else {
|
|
|
return 'button_view';
|
|
|
}
|
|
|
},
|
|
|
handler: function (grid, rowIndex, colIndex) {
|
|
|
var rec = grid.getStore().getAt(rowIndex);
|
|
|
var filePath = rec.get('IMAGE_CHECKGOVPATH');
|
|
|
if (filePath == '') {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有文件无法预览!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
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 = "";
|
|
|
openUrl = "../../MvcContainer/MsOpCtnBsCard/ZipView?handle=check&filePath=" + filePath;
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
|
|
|
//DsOpenEditWin(filePath, "", "650", "1250");
|
|
|
}
|
|
|
}]
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCOMPLETE',
|
|
|
header: '是否完成',
|
|
|
hidden: true,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 'true' || value == '1') {
|
|
|
return "√";
|
|
|
} else return "";
|
|
|
},
|
|
|
width: 60
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'FEENAME',
|
|
|
header: '费用名称',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CURRENCY',
|
|
|
header: '币别',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'AMOUNT',
|
|
|
header: '金额',
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARKS',
|
|
|
header: '备注',
|
|
|
width: 150
|
|
|
}];
|
|
|
|
|
|
this.girdcolums2 = this.initgirdcolums2;
|
|
|
|
|
|
//明细表表格
|
|
|
|
|
|
this.gridListClearing = new Ext.grid.GridPanel({
|
|
|
store: this.storeListClearing,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
selType: 'cellmodel',
|
|
|
columns: this.girdcolums2,
|
|
|
tbar: [{
|
|
|
text: '保存列表样式', //保存列表样式
|
|
|
menu: [
|
|
|
{
|
|
|
text: '保存', //保存
|
|
|
handler: function (button, event) {
|
|
|
_thisRepairView.girdcolums2 = DsTruck.SaveGridPanel(USERID, _thisRepairView.formname + '2', _thisRepairView.gridListClearing.columns, _thisRepairView.girdcolums2, 0, true);
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: '初始化', //初始化
|
|
|
handler: function (menu, event) {
|
|
|
_thisRepairView.gridListClearing.reconfigure(_thisRepairView.storeListClearing, _thisRepairView.initgirdcolums1);
|
|
|
_thisRepairView.girdcolums2 = DsTruck.SaveGridPanel(USERID, _thisRepairView.formname + '2', _thisRepairView.gridListClearing.columns, _thisRepairView.initgirdcolums2, 0, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}],
|
|
|
// paging bar on the bottom
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeListClearing,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.gridListClearing.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
DsOpenEditWin('/MvcContainer/MsOpCtnBsCard/CtnStatusEdit?bsno=' + record.data.LINKGID, record.data.GID);
|
|
|
}, this);
|
|
|
|
|
|
this.girdcolums2 = DsTruck.GetGridPanel(USERID, this.formname+'2', this.girdcolums2, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
|
|
|
this.gridListClearing.reconfigure(this.storeListClearing, this.girdcolums2);
|
|
|
|
|
|
|
|
|
this.gridListClearing.addListener('sortchange', function (ct, column, direction, eOpts) {
|
|
|
this.bslistcrsortfield = column.dataIndex;
|
|
|
this.bslistcrsortdire = direction;
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#endregion formSearch
|
|
|
this.panelRepair = new Ext.Panel({
|
|
|
title: '维修改装信息',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
split: true,
|
|
|
// autoScroll: true,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.gridListRepair]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelClearing = new Ext.Panel({
|
|
|
title: '清洗信息',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
// autoScroll: true,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.gridListClearing]
|
|
|
});
|
|
|
|
|
|
this.panelCodeCtnTkView = new Shipping.MsCodeCtnTkView({
|
|
|
title: '罐箱信息',
|
|
|
region: 'center',
|
|
|
layout: 'border'
|
|
|
});
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
this.tabpanel = new Ext.TabPanel
|
|
|
({
|
|
|
activeTab: 0,
|
|
|
autoWidth: true,
|
|
|
border: false,
|
|
|
frame: false,
|
|
|
region: 'center',
|
|
|
id: "TabPanelID",
|
|
|
enableTabScroll: true,
|
|
|
items:
|
|
|
[
|
|
|
this.panelRepair,
|
|
|
this.panelClearing,
|
|
|
this.panelCodeCtnTkView
|
|
|
]
|
|
|
});
|
|
|
|
|
|
//查询工具条
|
|
|
|
|
|
|
|
|
// this.panelTop = new Ext.Panel({
|
|
|
// layout: "border",
|
|
|
// region: "north",
|
|
|
// height: 75,
|
|
|
// items: [this.formSearch, this.panelBtn]
|
|
|
// });
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.tabpanel]
|
|
|
});
|
|
|
|
|
|
this.sqlcontext = '';
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListRepair.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _thisRepairView.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
this.storeListClearing.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _thisRepairView.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
//this.sqlcontext=" LINKGID in (select GID from op_ctnbscard where CTNNO like '%" + CTNNO + "%') ";
|
|
|
//this.onDsQuery();
|
|
|
// this.onRefreshClick();
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
InitGrid: function (grid) {
|
|
|
var agirdcolums = grid;
|
|
|
this.gridList.reconfigure(this.storeList, agirdcolums);
|
|
|
|
|
|
},
|
|
|
loadctn: function (CTNNOSTR) {
|
|
|
// if (this.CTNNOSTR != '') {
|
|
|
this.panelCodeCtnTkView.ctnno ="";
|
|
|
this.panelCodeCtnTkView.LoadData('edit',CTNNOSTR);
|
|
|
// }
|
|
|
},
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
|
|
this.sqlcontext = this.getCondition();
|
|
|
if (this.sqltype == '0') {
|
|
|
var sql = this.getConditionr();
|
|
|
this.sqlcontextr = sql;
|
|
|
this.storeListRepair.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
var sql2 = this.getConditionc();
|
|
|
this.sqlcontextc = sql2;
|
|
|
this.storeListClearing.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql2 },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
} else {
|
|
|
if (this.sqltype == '1') {
|
|
|
var sql = this.getConditionr();
|
|
|
this.sqlcontextr = sql;
|
|
|
this.storeListRepair.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
} else if (this.sqltype == '2') {
|
|
|
var sql2 = this.getConditionc();
|
|
|
this.sqlcontextc = sql2;
|
|
|
this.storeListClearing.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql2 },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
var sql = this.sqlcontext;
|
|
|
this.sqlcontextr = sql;
|
|
|
this.storeListRepair.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
var sql2 = this.sqlcontext;
|
|
|
this.sqlcontextc = sql2;
|
|
|
this.storeListClearing.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql2 },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
onAuditPassClick: function () {
|
|
|
|
|
|
var selections = this.gridListRepair.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.AUDITSTATUS;
|
|
|
if (BILLSTATUS == '提交审核' || BILLSTATUS == '申请修改') {
|
|
|
bodyAddDatas.push(rec);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许审核!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
_thisRepairView = this;
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定审核通过选中的业务吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在审核数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在审核数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/AuditOpCtnRepair',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: '0'
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
_thisRepairView.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: '审核成功!', 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);
|
|
|
|
|
|
},
|
|
|
|
|
|
onAuditBackClick: function () {
|
|
|
|
|
|
var selections = this.gridListBody.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.AUDITSTATUS;
|
|
|
if ((BILLSTATUS == '审核通过' || BILLSTATUS == '提交审核')) {
|
|
|
bodyAddDatas.push(rec);
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许驳回!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
_thisRepairView = this;
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定驳回选中的业务吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
Ext.Msg.wait('正在驳回数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在驳回数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/AuditOpCtnRepair',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
type: '4'
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
_thisRepairView.onRefreshClick();
|
|
|
Ext.Msg.show({ title: '提示', msg: '驳回成功!', 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);
|
|
|
|
|
|
},
|
|
|
getGridPicButton: function (txt) {
|
|
|
return "<button class=\"button_grid tip tip-right\" data-tip=\"\" onclick=\" this.SelectedPic='" + txt + "'\"></button>";
|
|
|
|
|
|
},
|
|
|
|
|
|
getCondition: function () {
|
|
|
|
|
|
|
|
|
var sql = '';
|
|
|
var formAll = this.formSearch.getForm();
|
|
|
|
|
|
var CTNNO = formAll.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, " LINKGID in (select GID from op_ctnbscard where CTNNO like '%" + CTNNO + "%')");
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
getConditionr: function () {
|
|
|
var form = this.formSearchRepaire.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = '';
|
|
|
var formAll = this.formSearch.getForm();
|
|
|
|
|
|
var CTNNO = formAll.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, " LINKGID in (select GID from op_ctnbscard where CTNNO like '%" + CTNNO + "%')");
|
|
|
|
|
|
|
|
|
var CTNNO = form.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, " LINKGID in (select GID from op_ctnbscard where CTNNO like '%" + CTNNO + "%')");
|
|
|
|
|
|
|
|
|
var expDateBgn = form.findField('ETDbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "REPAIRTIME>='" + expDateBgn + "'");
|
|
|
|
|
|
var expDateEnd = form.findField('ETDend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "REPAIRTIME<='" + expDateEnd + " 23:59:59'");
|
|
|
|
|
|
var expINPUTBgn = form.findField('INPUTbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expINPUTBgn, "INPUTTIME>='" + expINPUTBgn + "'");
|
|
|
|
|
|
var expINPUTEnd = form.findField('INPUTend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expINPUTEnd, "INPUTTIME<='" + expINPUTEnd + " 23:59:59'");
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
getConditionc: function () {
|
|
|
var form = this.formSearchClear.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = '';
|
|
|
var formAll = this.formSearch.getForm();
|
|
|
|
|
|
var CTNNO = formAll.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, " LINKGID in (select GID from op_ctnbscard where CTNNO like '%" + CTNNO + "%')");
|
|
|
|
|
|
|
|
|
var CTNNO = form.findField('CTNNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CTNNO, " LINKGID in (select GID from op_ctnbscard where CTNNO like '%" + CTNNO + "%')");
|
|
|
|
|
|
|
|
|
var expDateBgn = form.findField('ETDbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateBgn, "CLEARTIME>='" + expDateBgn + "'");
|
|
|
|
|
|
var expDateEnd = form.findField('ETDend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expDateEnd, "CLEARTIME<='" + expDateEnd + " 23:59:59'");
|
|
|
|
|
|
|
|
|
|
|
|
var expINPUTBgn = form.findField('INPUTbgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expINPUTBgn, "INPUTTIME>='" + expINPUTBgn + "'");
|
|
|
|
|
|
var expINPUTEnd = form.findField('INPUTend').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, expINPUTEnd, "INPUTTIME<='" + expINPUTEnd + " 23:59:59'");
|
|
|
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
ret[3] = this.SelectedPic;
|
|
|
return ret;
|
|
|
},
|
|
|
|
|
|
onSaveGridClick: function (button, event) {
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
this.girdcolums1 = DsTruck.SaveGridPanel(USERID, this.formname + '1', this.gridListRepair.columns, this.girdcolums1, 1, true);
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
this.girdcolums2 = DsTruck.SaveGridPanel(USERID, this.formname + '2', this.gridListClearing.columns, this.girdcolums2, 1, true);
|
|
|
}
|
|
|
|
|
|
},
|
|
|
oninitGridClick: function (button, event) {
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
this.gridListRepair.reconfigure(this.storeListRepair, this.initgirdcolums1);
|
|
|
this.girdcolums1 = DsTruck.SaveGridPanel(USERID, this.formname + '1', this.gridListRepair.columns, this.initgirdcolums1, 1, true);
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
this.gridListClearing.reconfigure(this.storeListClearing, this.initgirdcolums2);
|
|
|
this.girdcolums2 = DsTruck.SaveGridPanel(USERID, this.formname + '2', this.gridListClearing.columns, this.initgirdcolums2, 1, true);
|
|
|
}
|
|
|
|
|
|
},
|
|
|
onExportClick: function (button, event) {
|
|
|
|
|
|
_thisRepairView = this;
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
|
|
|
if (this.storeListRepair.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = ' LINKGID,REPAIRTIME';
|
|
|
|
|
|
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
|
|
|
|
|
|
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
|
|
|
}
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnRepairListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
start: 0, limit: this.PageSize,
|
|
|
condition: this.sqlcontextr,
|
|
|
sortstr: 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 printType = 'MSRPTREPAIR';
|
|
|
var sql1 = returnstr;
|
|
|
sql1 = sql1.replace(/\+/g, "@@@")
|
|
|
if (sql1 != '') {
|
|
|
GridExportBySql(sql1, this.formname+'1', '维修报表.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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
|
|
|
if (this.storeListClearing.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = ' LINKGID,CLEARTIME';
|
|
|
|
|
|
if (this.bslistcrsortfield != '' && this.bslistcrsortdire != '') {
|
|
|
|
|
|
sortstr = this.bslistcrsortfield + ' ' + this.bslistcrsortdire;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnClearingListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
start: 0, limit: this.PageSize,
|
|
|
condition: this.sqlcontextc,
|
|
|
sortstr: 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 printType = 'MSRPTREPAIR2';
|
|
|
var sql1 = returnstr;
|
|
|
sql1 = sql1.replace(/\+/g, "@@@")
|
|
|
if (sql1 != '') {
|
|
|
GridExportBySql(sql1, this.formname + '2', '清洗报表.xls');
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({
|
|
|
title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
|
|
|
_thisRepairView = this;
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
|
|
|
if (this.storeListRepair.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = ' LINKGID,REPAIRTIME';
|
|
|
|
|
|
if (this.bslistdrsortfield != '' && this.bslistdrsortdire != '') {
|
|
|
|
|
|
sortstr = this.bslistdrsortfield + ' ' + this.bslistdrsortdire;
|
|
|
}
|
|
|
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnRepairListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
start: 0, limit: this.PageSize,
|
|
|
condition: this.sqlcontext,
|
|
|
sortstr: 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 printType = 'MSRPTREPAIR';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
|
|
|
if (this.storeListClearing.getCount() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var sortstr = ' LINKGID,CLEARTIME';
|
|
|
|
|
|
if (this.bslistcrsortfield != '' && this.bslistcrsortdire != '') {
|
|
|
|
|
|
sortstr = this.bslistcrsortfield + ' ' + this.bslistcrsortdire;
|
|
|
}
|
|
|
|
|
|
Ext.Msg.wait('正在组织数据, 请稍侯..');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在组织数据...',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnClearingListStr',
|
|
|
scope: this,
|
|
|
params: {
|
|
|
start: 0, limit: this.PageSize,
|
|
|
condition: this.sqlcontextc,
|
|
|
sortstr: 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 printType = 'MSRPTREPAIR2';
|
|
|
var sql1 = returnstr;
|
|
|
var sql2 = "";
|
|
|
var sql3 = "";
|
|
|
var sql4 = "";
|
|
|
var sql5 = "";
|
|
|
var sql6 = "";
|
|
|
|
|
|
PrintComm(printType, sql1, sql2, sql3, sql4, sql5, sql6);
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '请重试',
|
|
|
msg: '服务器响应出错',
|
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|