|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsRptRepairIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsRptRepairIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsRptRepairIndex, Ext.Panel, {
|
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
sqlcontext: '',
|
|
|
sqlcontextc: '',
|
|
|
PageSize: 100,
|
|
|
sortfield: '',
|
|
|
sortdire: '',
|
|
|
bslistdrsortfield: '',
|
|
|
bslistdrsortdire: '',
|
|
|
bslistcrsortfield: '',
|
|
|
bslistcrsortdire: '',
|
|
|
initUIComponents: function () {
|
|
|
|
|
|
this.formname = "formMsRptRepairIndex"; //页面名称
|
|
|
this.sqlcontext = '';
|
|
|
this.sqlcontextc = '';
|
|
|
|
|
|
//#region 维修
|
|
|
|
|
|
this.storeListRepair = Ext.create('Ext.data.Store', {
|
|
|
model: 'MsOpCtnRepair',
|
|
|
pageSize: this.PageSize,
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcContainer/MsOpCtnBsCard/GetOpCtnRepairList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
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>';
|
|
|
}
|
|
|
},
|
|
|
{ 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>';
|
|
|
}
|
|
|
}, {
|
|
|
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,
|
|
|
// paging bar on the bottom
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeListRepair,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.girdcolums1 = DsTruck.GetGridPanel(USERID, this.formname+'1', this.girdcolums1, 1); //使用者id,表名,中间column数组,跳过一开始的几列
|
|
|
|
|
|
this.gridListRepair.reconfigure(this.storeListRepair, this.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',
|
|
|
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>';
|
|
|
}
|
|
|
},
|
|
|
{ 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>';
|
|
|
}
|
|
|
},
|
|
|
{ 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>';
|
|
|
}
|
|
|
}, {
|
|
|
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,
|
|
|
// 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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#region formSearch 查询面板
|
|
|
_this = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'north',
|
|
|
height: 50,
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '录入日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'INPUTbgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'INPUTend',
|
|
|
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.storeListClearing;
|
|
|
winAccess.formname = this.formname;
|
|
|
winAccess.condition = sql;
|
|
|
winAccess.show();
|
|
|
return;
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
|
|
|
|
|
|
this.formSearchClear = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'north',
|
|
|
height: 50,
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 90,
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '录入日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'INPUTbgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
name: 'INPUTend',
|
|
|
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.getConditionc();
|
|
|
var winAccess = new Shipping.DsQuery({
|
|
|
|
|
|
});
|
|
|
winAccess.StoreList = this.storeListClearing;
|
|
|
winAccess.formname = this.formname+'2';
|
|
|
winAccess.condition = sql;
|
|
|
winAccess.show();
|
|
|
return;
|
|
|
},
|
|
|
scope: this
|
|
|
}]
|
|
|
}
|
|
|
|
|
|
]//end items(fieldset 1)
|
|
|
}]//end root items
|
|
|
});
|
|
|
//#endregion formSearch
|
|
|
this.panelRepair = new Ext.Panel({
|
|
|
title: '维修改装信息',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
split: true,
|
|
|
// autoScroll: true,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.formSearch,this.gridListRepair]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.panelClearing = new Ext.Panel({
|
|
|
title: '清洗信息',
|
|
|
layout: "border",
|
|
|
region: 'center',
|
|
|
animate: true,
|
|
|
// autoScroll: true,
|
|
|
// containerScroll: true,
|
|
|
frame: false,
|
|
|
items: [this.formSearchClear,this.gridListClearing]
|
|
|
});
|
|
|
|
|
|
|
|
|
//#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.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [
|
|
|
{
|
|
|
text: "执行查询",
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.onRefreshClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
text: "重置条件",
|
|
|
iconCls: "btnreset",
|
|
|
handler: function (button, event) {
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "打印",
|
|
|
iconCls: 'btnprint',
|
|
|
handler: function (button, event) {
|
|
|
this.Print();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
id: "btntest",
|
|
|
menu: [
|
|
|
{ text: "保存列表",
|
|
|
handler: function (button, event) {
|
|
|
_this.onSaveGridClick(button, event);
|
|
|
|
|
|
}
|
|
|
}, { text: "刷新列表",
|
|
|
handler: function (button, event) {
|
|
|
_this.oninitGridClick(button, event);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
// this.panelTop = new Ext.Panel({
|
|
|
// layout: "border",
|
|
|
// region: "north",
|
|
|
// height: 75,
|
|
|
// items: [this.formSearch, this.panelBtn]
|
|
|
// });
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.panelBtn, this.tabpanel]
|
|
|
});
|
|
|
|
|
|
this.sqlcontext = '';
|
|
|
|
|
|
|
|
|
|
|
|
this.storeListRepair.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontext });
|
|
|
}, this);
|
|
|
|
|
|
this.storeListClearing.on('beforeload', function (store) {
|
|
|
Ext.apply(store.proxy.extraParams, { condition: _this.sqlcontextc });
|
|
|
}, this);
|
|
|
|
|
|
// this.onRefreshClick();
|
|
|
|
|
|
}, //end initUIComponents
|
|
|
InitGrid: function (grid) {
|
|
|
var agirdcolums = grid;
|
|
|
this.gridList.reconfigure(this.storeList, agirdcolums);
|
|
|
|
|
|
},
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
var sql = this.getCondition();
|
|
|
this.sqlcontext = sql;
|
|
|
this.storeListRepair.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
var sql2 = this.getConditionc();
|
|
|
this.sqlcontextc = sql2;
|
|
|
this.storeListClearing.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql2 },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onDsQuery: function () {
|
|
|
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
var sql = this.sqlcontext;
|
|
|
this.storeListRepair.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
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);
|
|
|
|
|
|
_this = 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) {
|
|
|
_this.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);
|
|
|
|
|
|
_this = 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) {
|
|
|
_this.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);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = '';
|
|
|
|
|
|
|
|
|
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 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;
|
|
|
|
|
|
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) {
|
|
|
|
|
|
_this = this;
|
|
|
if (this.tabpanel.getActiveTab() == this.panelRepair) {
|
|
|
GridExportExcelPage(this.gridListRepair);
|
|
|
} else if (this.tabpanel.getActiveTab() == this.panelClearing) {
|
|
|
GridExportExcelPage(this.gridListClearing);
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
Print: function () {
|
|
|
|
|
|
|
|
|
|
|
|
_this = 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
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|