|
|
Ext.namespace('Shipping');
|
|
|
|
|
|
Shipping.MsOpTaskIndex = function (config) {
|
|
|
Ext.applyIf(this, config);
|
|
|
this.initUIComponents();
|
|
|
window.Shipping.MsOpTaskIndex.superclass.constructor.call(this);
|
|
|
};
|
|
|
|
|
|
Ext.extend(Shipping.MsOpTaskIndex, Ext.Panel, {
|
|
|
PageSize: 30,
|
|
|
|
|
|
OprationStatus: null, //仅当弹出界面时使用
|
|
|
SelectedRecord: null,
|
|
|
EditRecord: null,
|
|
|
BsNo: "",
|
|
|
stroplb: "",
|
|
|
sqlcontext: '',
|
|
|
|
|
|
initUIComponents: function () {
|
|
|
//定义数据集
|
|
|
|
|
|
|
|
|
// var mainform = window.parent._this;
|
|
|
_this = this;
|
|
|
_this.sqlcontext = "";
|
|
|
_this.sqlcontextall = "";
|
|
|
_this.sqlcontextselect = " 1=1 ";
|
|
|
|
|
|
this.formname = "MsOpTaskIndex"; //页面名称
|
|
|
|
|
|
//人员信息加载
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
this.storeOpCode.load();
|
|
|
//客服
|
|
|
this.comboxCUSTSERVICE = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'COMPOP',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
this.formHead = Ext.widget('form', {
|
|
|
region: 'north',
|
|
|
frame: true,
|
|
|
height: 170,
|
|
|
// title: '空返信息',
|
|
|
bodyPadding: 5,
|
|
|
// autoScroll: true,
|
|
|
trackResetOnLoad: true,
|
|
|
fieldDefaults: {
|
|
|
margins: '0 0 0 0',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 100,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
|
|
|
{
|
|
|
xtype: 'container',
|
|
|
layout: {
|
|
|
type: 'hbox',
|
|
|
align: 'middle'
|
|
|
},
|
|
|
height: 50,
|
|
|
items: [{
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='green' size='5'>0</font> <br> 新建",
|
|
|
height: 45,
|
|
|
cls: 'center-text',
|
|
|
id: 'NewALL',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建'";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='red' size='5'>0</font> <br>高",
|
|
|
height: 45,
|
|
|
id: 'NewG',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and TASKCLASS=2 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#FF9912' size='5'>0</font> <br>中",
|
|
|
height: 45,
|
|
|
id: 'NewZ',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and TASKCLASS=1 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#3D9140' size='5'>0</font> <br>低",
|
|
|
height: 45,
|
|
|
id: 'NewD',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and TASKCLASS=0 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#00C957' size='5'>0</font> <br>0~10",
|
|
|
height: 45,
|
|
|
id: 'New10',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and t.WORKDAY<=10";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#1E90FF' size='5'>0</font> <br>11~20",
|
|
|
height: 45,
|
|
|
id: 'New20',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and t.WORKDAY>10 AND t.WORKDAY<=20";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#FFD700' size='5'>0</font> <br>21~30",
|
|
|
height: 45,
|
|
|
id: 'New30',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and t.WORKDAY>20 AND t.WORKDAY<=30";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#B0171F' size='5'>0</font> <br>30天以上",
|
|
|
height: 45,
|
|
|
id: 'NewV30',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='新建' and t.WORKDAY>30";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: {
|
|
|
type: 'hbox',
|
|
|
align: 'middle'
|
|
|
},
|
|
|
height: 50,
|
|
|
items: [{
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#FF7D40' size='5'>0</font> <br> 进行中",
|
|
|
height: 45,
|
|
|
cls: 'center-text',
|
|
|
id: 'DoALL',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中'";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='red' size='5'>0</font> <br>高",
|
|
|
height: 45,
|
|
|
id: 'DoG',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and TASKCLASS=1 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#FF9912' size='5'>0</font> <br>中",
|
|
|
height: 45,
|
|
|
id: 'DoZ',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and TASKCLASS=1 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#3D9140' size='5'>0</font> <br>低",
|
|
|
height: 45,
|
|
|
id: 'DoD',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and TASKCLASS=0 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#00C957' size='5'>0</font> <br>0~10",
|
|
|
height: 45,
|
|
|
id: 'Do10',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and t.WORKDAY<=10";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#1E90FF' size='5'>0</font> <br>11~20",
|
|
|
height: 45,
|
|
|
id: 'Do20',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and t.WORKDAY>10 and t.WORKDAY<=20";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#FFD700' size='5'>0</font> <br>21~30",
|
|
|
height: 45,
|
|
|
id: 'Do30',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and t.WORKDAY>20 and t.WORKDAY<=30";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#B0171F' size='5'>0</font> <br>30天以上",
|
|
|
height: 45,
|
|
|
id: 'DoV30',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='进行中' and t.WORKDAY>30 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}, {
|
|
|
xtype: 'container',
|
|
|
layout: {
|
|
|
type: 'hbox',
|
|
|
align: 'middle'
|
|
|
},
|
|
|
height: 50,
|
|
|
items: [{
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#191970' size='5'>0</font> <br> 完成",
|
|
|
height: 45,
|
|
|
cls: 'center-text',
|
|
|
id: 'OverALL',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='完成'";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "",
|
|
|
height: 45,
|
|
|
id: 'OverG',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () { console.log('click el'); }
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "",
|
|
|
height: 45,
|
|
|
id: 'OverZ',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () { console.log('click el'); }
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "",
|
|
|
height: 45,
|
|
|
id: 'OverD',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () { console.log('click el'); }
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#00C957' size='5'>0</font> <br>0~10",
|
|
|
height: 45,
|
|
|
id: 'Over10',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='完成' and t.WORKDAY<=10 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#1E90FF' size='5'>0</font> <br>11~20",
|
|
|
height: 45,
|
|
|
id: 'Over20',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='完成' and t.WORKDAY>10 and t.WORKDAY<=20 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#FFD700' size='5'>0</font> <br>21~30",
|
|
|
height: 45,
|
|
|
id: 'Over30',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='完成' and t.WORKDAY>20 and t.WORKDAY<=30 ";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
xtype: 'label',
|
|
|
flex: 1,
|
|
|
html: "<font color='#B0171F' size='5'>0</font> <br>30天以上",
|
|
|
height: 45,
|
|
|
id: 'OverV30',
|
|
|
cls: 'center-text',
|
|
|
listeners: {
|
|
|
click: {
|
|
|
element: 'el', //bind to the underlying el property on the panel
|
|
|
fn: function () {
|
|
|
_this.sqlcontextselect = "t.TASKSTATUS='完成' and t.WORKDAY>30";
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
]//end items(fieldset 1)
|
|
|
}//end fieldset 1
|
|
|
]//end root items
|
|
|
}); //end this.formEdit
|
|
|
|
|
|
this.storeList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpTask',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsOpTaskNew/GetDataList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.initgirdcolums = [{
|
|
|
sortable: true,
|
|
|
dataIndex: 'GID',
|
|
|
header: 'GID',
|
|
|
hidden: true,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'BSNO',
|
|
|
header: '业务编号',
|
|
|
hidden: true,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'PTASKNO',
|
|
|
header: 'PTASKNO',
|
|
|
hidden: true,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CORPID',
|
|
|
header: 'CORPID',
|
|
|
hidden: true,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'FILENO',
|
|
|
header: 'FILENO',
|
|
|
hidden: true,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MAILNO',
|
|
|
header: 'MAILNO',
|
|
|
hidden: true,
|
|
|
width: 150
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TASKSTATUS',
|
|
|
align: 'left',
|
|
|
header: '状态',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATEUSERREF',
|
|
|
align: 'center',
|
|
|
header: '创建人',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CREATETIME',
|
|
|
align: 'center',
|
|
|
header: '创建时间',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'MODIFYTIME',
|
|
|
align: 'center',
|
|
|
header: '更新时间',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'CLOSEDATE',
|
|
|
align: 'center',
|
|
|
header: '截止日期',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'COMPLETETIME',
|
|
|
align: 'center',
|
|
|
header: '完成时间',
|
|
|
renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s'),
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TASKOP',
|
|
|
align: 'center',
|
|
|
header: '指派人',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'TASKCLASS',
|
|
|
align: 'center',
|
|
|
header: '优先级',
|
|
|
width: 80,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == 2) {
|
|
|
return "高";
|
|
|
} else if (value == 1) {
|
|
|
return "中";
|
|
|
} else return "低";
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'DEPT',
|
|
|
align: 'center',
|
|
|
header: '涉及部门',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TASKTYPE',
|
|
|
align: 'left',
|
|
|
header: '类型',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
sortable: true,
|
|
|
dataIndex: 'TASKTITLE',
|
|
|
align: 'left',
|
|
|
header: '问题标题',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'WORKDAY',
|
|
|
align: 'center',
|
|
|
header: '进行中天数',
|
|
|
width: 120
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'ISCOMPLETE',
|
|
|
align: 'center',
|
|
|
header: '是否完成',
|
|
|
width: 80,
|
|
|
renderer: function (value, cellmeta) {
|
|
|
if (value == '1') {
|
|
|
return "完成";
|
|
|
} else return "未完成";
|
|
|
}
|
|
|
}, {
|
|
|
sortable: true,
|
|
|
dataIndex: 'REMARK',
|
|
|
header: '备注',
|
|
|
width: 150
|
|
|
}
|
|
|
];
|
|
|
|
|
|
this.girdcolums = this.initgirdcolums;
|
|
|
this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
|
|
|
clicksToEdit: 1
|
|
|
});
|
|
|
|
|
|
this.CheckBoxModel = Ext.create('Ext.selection.CheckboxModel');
|
|
|
//定义Grid
|
|
|
this.gridList = new Ext.grid.GridPanel({
|
|
|
store: this.storeList,
|
|
|
enableHdMenu: false,
|
|
|
region: 'center',
|
|
|
loadMask: { msg: "数据加载中,请稍等..." },
|
|
|
trackMouseOver: true,
|
|
|
disableSelection: false,
|
|
|
plugins: [this.gridListCellEditing],
|
|
|
selModel: this.CheckBoxModel,
|
|
|
selType: 'cellmodel',
|
|
|
viewConfig: {
|
|
|
enableTextSelection: true, //允许复制数据
|
|
|
autoFill: true
|
|
|
},
|
|
|
columns: this.girdcolums,
|
|
|
bbar: Ext.create('Ext.PagingToolbar', {
|
|
|
store: this.storeList,
|
|
|
displayInfo: true,
|
|
|
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
|
|
|
emptyMsg: "没有数据"
|
|
|
})
|
|
|
});
|
|
|
|
|
|
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
|
|
|
this.SelectedRecord = record;
|
|
|
this.OprationStatus = 'edit';
|
|
|
var openSet = "height=700, width=1200, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 700) / 2 + ",Left= " + (screen.width - 1000) / 2
|
|
|
var openType = record.data.GID;
|
|
|
var openUrl = "/MvcShipping/MsOpTaskNew/Edit";
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
}, this);
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
//人员信息加载
|
|
|
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
this.storeOpCode.load();
|
|
|
//操 作
|
|
|
this.comboxOP = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '指派人',
|
|
|
store: this.storeOpCode,
|
|
|
forceSelection: true,
|
|
|
name: 'TASKOP',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formSearch = Ext.widget('form', {
|
|
|
frame: true,
|
|
|
region: 'center',
|
|
|
bodyPadding: 5,
|
|
|
fieldDefaults: {
|
|
|
margins: '2 2 2 2',
|
|
|
labelAlign: 'right',
|
|
|
flex: 1,
|
|
|
labelWidth: 60,
|
|
|
msgTarget: 'qtip'
|
|
|
},
|
|
|
|
|
|
items: [
|
|
|
{//fieldset 1
|
|
|
xtype: 'container',
|
|
|
defaultType: 'textfield',
|
|
|
layout: 'anchor',
|
|
|
defaults: {
|
|
|
anchor: '100%'
|
|
|
},
|
|
|
items: [{
|
|
|
xtype: 'container',
|
|
|
layout: 'hbox',
|
|
|
defaultType: 'textfield',
|
|
|
items: [{
|
|
|
fieldLabel: '委托编号',
|
|
|
name: 'CUSTNO',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
, {
|
|
|
fieldLabel: '问题标题',
|
|
|
name: 'TASKTITLE',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
, this.comboxOP,{
|
|
|
fieldLabel: '从创建日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
labelWidth: 65,
|
|
|
name: 'ExpDateBgn',
|
|
|
enableKeyEvents: true,
|
|
|
listeners: {
|
|
|
specialkey: function (field, e) {
|
|
|
if (e.getKey() == e.ENTER) {
|
|
|
_this.onRefreshClick();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
fieldLabel: '到创建日期',
|
|
|
format: 'Y-m-d',
|
|
|
xtype: 'datefield',
|
|
|
labelWidth: 65,
|
|
|
name: 'ExpDateEnd',
|
|
|
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();
|
|
|
if (sql != '')
|
|
|
sql = _this.sqlcontextselect + " and " + sql;
|
|
|
else sql = _this.sqlcontextselect;
|
|
|
|
|
|
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 fieldset 1
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
//查询工具条
|
|
|
this.panelBtn = new Ext.Panel({
|
|
|
region: "north",
|
|
|
tbar: [{
|
|
|
text: "新建",
|
|
|
iconCls: "btnadd",
|
|
|
handler: function (button, event) {
|
|
|
this.OprationStatus = 'add';
|
|
|
|
|
|
var openSet = "height=700, width=1200, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 500) / 2 + ",Left= " + (screen.width - 1000) / 2
|
|
|
var openType = "";
|
|
|
var openUrl = "/MvcShipping/MsOpTaskNew/Edit";
|
|
|
window.open(openUrl, openType, openSet);
|
|
|
// DsOpenEditWin('/MvcContainer/MsOpPrice/SeaeEdit');
|
|
|
},
|
|
|
scope: this
|
|
|
|
|
|
}, '-',
|
|
|
{
|
|
|
text: "删除",
|
|
|
iconCls: "btndelete",
|
|
|
handler: function (button, event) {
|
|
|
this.onDeleteClick(button, event);
|
|
|
},
|
|
|
scope: this
|
|
|
},
|
|
|
{
|
|
|
xtype: 'button',
|
|
|
text: '刷新', //刷新
|
|
|
iconCls: "btnrefresh",
|
|
|
handler: function (button, event) {
|
|
|
this.Refresh();
|
|
|
|
|
|
},
|
|
|
scope: this
|
|
|
}, {
|
|
|
xtype: 'button',
|
|
|
text: '指派', //刷新
|
|
|
handler: function (button, event) {
|
|
|
this.onUpdateTaskOpClick();
|
|
|
},
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "状态确认",
|
|
|
menu: [
|
|
|
{
|
|
|
text: "完成",
|
|
|
id:'btnover',
|
|
|
handler: function (button, event) {
|
|
|
_this.onUpTransStatusClick('完成');
|
|
|
}
|
|
|
}, {
|
|
|
text: "进行中",
|
|
|
handler: function (menu, event) {
|
|
|
_this.onUpTransStatusClick('进行中');
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}, '-', {
|
|
|
text: "保存列表样式",
|
|
|
id: "btntest",
|
|
|
menu: [
|
|
|
{
|
|
|
text: "保存",
|
|
|
handler: function (button, event) {
|
|
|
this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.girdcolums, 1, true);
|
|
|
}
|
|
|
}, {
|
|
|
text: "初始化",
|
|
|
handler: function (menu, event) {
|
|
|
_this.gridList.reconfigure(_this.storeList, _this.initgirdcolums);
|
|
|
_this.girdcolums = DsTruck.SaveGridPanel(USERID, _this.formname, _this.gridList.columns, _this.initgirdcolums, 1, true);
|
|
|
}
|
|
|
}],
|
|
|
scope: this
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
this.panelTop = new Ext.Panel({
|
|
|
layout: "border",
|
|
|
region: "north",
|
|
|
height: 80,
|
|
|
items: [this.panelBtn, this.formSearch]
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Ext.apply(this, {
|
|
|
items: [this.formHead, this.panelTop, this.gridList]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: 'isnull(ISCOMPLETE,0)=0' },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
this.storeList.on('beforeload', function (store) {
|
|
|
var sql = this.sqlcontext
|
|
|
Ext.apply(store.proxy.extraParams, { condition: sql });
|
|
|
}, this);
|
|
|
this.onInitClick();
|
|
|
|
|
|
var btnover = Ext.getCmp('btnover');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '',
|
|
|
url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable',
|
|
|
params: {
|
|
|
modulename: "modOpTaskNewOver"
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var result = Ext.JSON.decode(response.responseText);
|
|
|
if (result.Success != true) {
|
|
|
btnover.disable();
|
|
|
} else {
|
|
|
btnover.enable();
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
scope: this
|
|
|
});
|
|
|
|
|
|
//人员信息加载
|
|
|
this.storeOpCode2 = Ext.create('DsExt.ux.RefTableStore', {
|
|
|
model: 'DsShipping.ux.UserRefModel',
|
|
|
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
|
|
|
});
|
|
|
this.storeOpCode2.load();
|
|
|
//操 作
|
|
|
this.comboxOP2 = Ext.create('DsExt.ux.RefTableCombox', {
|
|
|
fieldLabel: '指派人',
|
|
|
store: this.storeOpCode2,
|
|
|
forceSelection: true,
|
|
|
name: 'TASKOP',
|
|
|
valueField: 'UserName',
|
|
|
displayField: 'CodeAndName'
|
|
|
});
|
|
|
|
|
|
|
|
|
this.formAuditShow = 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.comboxOP2
|
|
|
]//end root items
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.winAuditShow = 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.formAuditShow],
|
|
|
buttons: [{
|
|
|
text: "确认指派",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
var form = _this.formAuditShow.getForm();
|
|
|
var auditer = form.findField('TASKOP').getRawValue();
|
|
|
|
|
|
if (auditer == '' || auditer == undefined) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '指派人不能为空!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
_this.onUpdateTaskOpFnClick(auditer);
|
|
|
|
|
|
|
|
|
}
|
|
|
}, {
|
|
|
text: "关闭",
|
|
|
minWidth: 70,
|
|
|
handler: function () {
|
|
|
_this.winAuditShow.close();
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
|
|
|
// this.onRefreshClick();
|
|
|
|
|
|
},
|
|
|
|
|
|
onInitClick: function (button, event) {
|
|
|
|
|
|
this.storeCountList = Ext.create('Ext.data.Store', {
|
|
|
pageSize: this.PageSize,
|
|
|
model: 'MsOpTaskCount',
|
|
|
remoteSort: true,
|
|
|
proxy: {
|
|
|
type: 'ajax',
|
|
|
url: '/MvcShipping/MsOpTaskNew/GetCountList',
|
|
|
reader: {
|
|
|
id: 'GID',
|
|
|
root: 'data',
|
|
|
totalProperty: 'totalCount'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
this.storeCountList.load({
|
|
|
params: { condition:"" },
|
|
|
callback: function (r, options, success) {
|
|
|
if (success) {
|
|
|
_this.setTotalHead();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
setTotalHead: function () {
|
|
|
for (i = 0; i < this.storeCountList.getCount(); i += 1) {
|
|
|
var memberyf = this.storeCountList.getAt(i);
|
|
|
if (memberyf.data.TASKSTATUS == '新建') {
|
|
|
var STR = Ext.getCmp("NewALL");
|
|
|
STR.update("<font color = 'green' size = '5' >" + memberyf.data.ALLCOUNT + "</font > <br> 新建")
|
|
|
var STR = Ext.getCmp("NewG");
|
|
|
STR.update("<font color = 'red' size = '5' >" + memberyf.data.GCOUNT + "</font > <br> 高")
|
|
|
var STR = Ext.getCmp("NewZ");
|
|
|
STR.update("<font color = '#FF9912' size = '5' >" + memberyf.data.ZCOUNT + "</font > <br> 中")
|
|
|
var STR = Ext.getCmp("NewD");
|
|
|
STR.update("<font color = '#3D9140' size = '5' >" + memberyf.data.DCOUNT + "</font > <br>低")
|
|
|
var STR = Ext.getCmp("New10");
|
|
|
STR.update("<font color = '#00C957' size = '5' >" + memberyf.data.D10COUNT + "</font > <br>0~10")
|
|
|
var STR = Ext.getCmp("New20");
|
|
|
STR.update("<font color = '#1E90FF' size = '5' >" + memberyf.data.D20COUNT + "</font > <br>11~20")
|
|
|
var STR = Ext.getCmp("New30");
|
|
|
STR.update("<font color = '#FFD700' size = '5' >" + memberyf.data.D30COUNT + "</font > <br>21~30")
|
|
|
var STR = Ext.getCmp("NewV30");
|
|
|
STR.update("<font color = '#B0171F' size = '5' >" + memberyf.data.DOV30COUNT + "</font > <br>30天以上")
|
|
|
|
|
|
}
|
|
|
if (memberyf.data.TASKSTATUS == '进行中') {
|
|
|
var STR = Ext.getCmp("DoALL");
|
|
|
STR.update("<font color = '#FF7D40' size = '5' >" + memberyf.data.ALLCOUNT + "</font > <br> 进行中")
|
|
|
var STR = Ext.getCmp("DoG");
|
|
|
STR.update("<font color = 'red' size = '5' >" + memberyf.data.GCOUNT + "</font > <br> 高")
|
|
|
var STR = Ext.getCmp("DoZ");
|
|
|
STR.update("<font color = '#FF9912' size = '5' >" + memberyf.data.ZCOUNT + "</font > <br> 中")
|
|
|
var STR = Ext.getCmp("DoD");
|
|
|
STR.update("<font color = '#3D9140' size = '5' >" + memberyf.data.DCOUNT + "</font > <br>低")
|
|
|
var STR = Ext.getCmp("Do10");
|
|
|
STR.update("<font color = '#00C957' size = '5' >" + memberyf.data.D10COUNT + "</font > <br>0~10")
|
|
|
var STR = Ext.getCmp("Do20");
|
|
|
STR.update("<font color = '#1E90FF' size = '5' >" + memberyf.data.D20COUNT + "</font > <br>11~20")
|
|
|
var STR = Ext.getCmp("Do30");
|
|
|
STR.update("<font color = '#FFD700' size = '5' >" + memberyf.data.D30COUNT + "</font > <br>21~30")
|
|
|
var STR = Ext.getCmp("DoV30");
|
|
|
STR.update("<font color = '#B0171F' size = '5' >" + memberyf.data.DOV30COUNT + "</font > <br>30天以上")
|
|
|
|
|
|
}
|
|
|
if (memberyf.data.TASKSTATUS == '完成') {
|
|
|
var STR = Ext.getCmp("OverALL");
|
|
|
STR.update("<font color = '#191970' size = '5' >" + memberyf.data.ALLCOUNT + "</font > <br> 完成")
|
|
|
var STR = Ext.getCmp("OverG");
|
|
|
STR.update("")
|
|
|
var STR = Ext.getCmp("OverZ");
|
|
|
STR.update("")
|
|
|
var STR = Ext.getCmp("OverD");
|
|
|
STR.update("")
|
|
|
var STR = Ext.getCmp("Over10");
|
|
|
STR.update("<font color = '#00C957' size = '5' >" + memberyf.data.D10COUNT + "</font > <br>0~10")
|
|
|
var STR = Ext.getCmp("Over20");
|
|
|
STR.update("<font color = '#1E90FF' size = '5' >" + memberyf.data.D20COUNT + "</font > <br>11~20")
|
|
|
var STR = Ext.getCmp("Over30");
|
|
|
STR.update("<font color = '#FFD700' size = '5' >" + memberyf.data.D30COUNT + "</font > <br>21~30")
|
|
|
var STR = Ext.getCmp("OverV30");
|
|
|
STR.update("<font color = '#B0171F' size = '5' >" + memberyf.data.DOV30COUNT + "</font > <br>30天以上")
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onRefreshClick: function (button, event) {
|
|
|
|
|
|
|
|
|
|
|
|
var sql = this.getCondition();
|
|
|
|
|
|
if (sql != '')
|
|
|
sql = _this.sqlcontextselect + " and " + sql;
|
|
|
else sql = _this.sqlcontextselect;
|
|
|
|
|
|
this.sqlcontext = sql;
|
|
|
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onDsQuery: function (button, event) {
|
|
|
|
|
|
var sql=this.sqlcontext;
|
|
|
|
|
|
this.storeList.load({
|
|
|
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
|
|
|
waitMsg: "正在查询数据...",
|
|
|
scope: this
|
|
|
});
|
|
|
},
|
|
|
|
|
|
|
|
|
onUpdateTaskOpClick: function () {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择需指派的单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
var BILLSTATUS = rec.data.BSSTATUS;
|
|
|
if ((rec.data.TASKSTATUS != '完成') && ((SHOWNAME == rec.data.CREATEUSERREF) || (SHOWNAME == rec.data.TASKOP)))
|
|
|
{
|
|
|
|
|
|
} else {
|
|
|
Ext.Msg.show({ title: '提示', msg: '当前状态不允许指派!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
};
|
|
|
}
|
|
|
this.winAuditShow.show();
|
|
|
},
|
|
|
|
|
|
onUpdateTaskOpFnClick: function (opdata) {
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择需指派的单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
if ((rec.data.TASKSTATUS != '完成') && ((SHOWNAME == rec.data.CREATEUSERREF) || (SHOWNAME == rec.data.TASKOP))) {
|
|
|
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: '/MvcShipping/MsOpTaskNew/UpdateTaskOpList',
|
|
|
params: {
|
|
|
bill: jsonbodyAddDatas,
|
|
|
taskop: opdata
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
_this.storeList.reload();
|
|
|
Ext.Msg.show({ title: '提示', msg: '成功!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
this.winAuditShow.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);
|
|
|
|
|
|
},
|
|
|
|
|
|
getCondition: function () {
|
|
|
var form = this.formSearch.getForm();
|
|
|
if (!form.isValid()) {
|
|
|
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
var sql = "";
|
|
|
|
|
|
|
|
|
|
|
|
var CUSTNO = form.findField('CUSTNO').getValue();
|
|
|
sql = sql + getAndConSql(sql, CUSTNO, " t.CUSTNO like '%" + CUSTNO + "%'");
|
|
|
|
|
|
var TASKTITLE = form.findField('TASKTITLE').getValue();
|
|
|
sql = sql + getAndConSql(sql, TASKTITLE, " t.TASKTITLE like '%" + TASKTITLE + "%'");
|
|
|
|
|
|
|
|
|
var BSDATEBgn = form.findField('ExpDateBgn').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEBgn, "CONVERT(char(10), t.CREATETIME, 20) >='" + BSDATEBgn + "'");
|
|
|
var BSDATEEnd = form.findField('ExpDateEnd').getRawValue();
|
|
|
sql = sql + getAndConSql(sql, BSDATEEnd, "CONVERT(char(10), t.CREATETIME, 20) <='" + BSDATEEnd + " 23:59:59'");
|
|
|
|
|
|
var TASKOP = form.findField('TASKOP').getValue();
|
|
|
sql = sql + getAndConSql(sql, TASKOP, "b.TASKOP='" + TASKOP + "'");
|
|
|
|
|
|
return sql;
|
|
|
},
|
|
|
|
|
|
onDeleteClick: function (button, event) {
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择单据!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var bodyAddDatas = [];
|
|
|
for (var i = 0; i < selections.length; i++) {
|
|
|
var rec = selections[i];
|
|
|
if ((rec.data.TASKSTATUS == '新建') && (SHOWNAME == rec.data.CREATEUSERREF))
|
|
|
bodyAddDatas.push(rec);
|
|
|
}
|
|
|
|
|
|
if (bodyAddDatas.length == 0) {
|
|
|
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有需要删除的记录!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas);
|
|
|
|
|
|
Ext.Msg.wait('正在删除数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在删除数据...',
|
|
|
url: '/MvcShipping/MsOpTaskNew/Delete',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) {
|
|
|
},
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
}
|
|
|
}, this);
|
|
|
}, //onDeleteClick
|
|
|
onUpTransStatusClick: function (transstatus) {
|
|
|
|
|
|
var selections = this.gridList.getSelectionModel().getSelection();
|
|
|
if (selections.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '请先选择任务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
var bodydatas = [];
|
|
|
for (var i = 0; i < selections.length ; i += 1) {
|
|
|
var member = selections[i];
|
|
|
if (SHOWNAME == member.data.CREATEUSERREF || SHOWNAME == member.data.TASKOP)
|
|
|
bodydatas.push(member);
|
|
|
}
|
|
|
if (bodydatas.length == 0) {
|
|
|
Ext.Msg.show({ title: '提示', msg: '没有需要更新的任务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
return;
|
|
|
}
|
|
|
Ext.MessageBox.confirm('提示', '确实要将选中任务的状态更改为<' + transstatus + '>吗?', function (btn) {
|
|
|
if (btn == 'yes') {
|
|
|
|
|
|
var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodydatas);
|
|
|
Ext.Msg.wait('正在操作数据...');
|
|
|
Ext.Ajax.request({
|
|
|
waitMsg: '正在操作数据...',
|
|
|
url: '/MvcShipping/MsOpTaskNew/UpTransStatusList',
|
|
|
params: {
|
|
|
data: jsonbodyAddDatas,
|
|
|
transstatus: transstatus
|
|
|
},
|
|
|
callback: function (options, success, response) {
|
|
|
if (success) {
|
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
|
if (jsonresult.Success) {
|
|
|
this.storeList.reload();
|
|
|
Ext.Msg.hide();
|
|
|
}
|
|
|
else {
|
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
failure: function (response, options) {
|
|
|
Ext.Msg.show({ title: '警告', msg: '服务器响应出错!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
|
|
|
},
|
|
|
success: function (response, options) { },
|
|
|
scope: this
|
|
|
}); //end Ext.Ajax.request
|
|
|
|
|
|
}
|
|
|
}, this);
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
OprationSwap: function () {
|
|
|
var ret = new Array();
|
|
|
ret[0] = this.OprationStatus;
|
|
|
ret[1] = this.storeList;
|
|
|
ret[2] = this.SelectedRecord;
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|