You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

829 lines
32 KiB
JavaScript

10 months ago
Ext.namespace('Shipping');
String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, ""); }
Shipping.MsInfoClientFeedbackIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.MsInfoClientFeedbackIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.MsInfoClientFeedbackIndex, Ext.Panel, {
PageSize: 100,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
initUIComponents: function () {
this.formname = "formMsInfoClientFeedbackIndex"; //页面名称
//#region gridList列表 下拉框信息加载
//权限范围
this.StoreOpRange = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsOP',
proxy: { url: '/MvcShipping/MsBaseInfo/GetOpRang' }
});
this.StoreOpRange.load({ params: { optype: "modMsInfoClientFeedback"} });
//反馈类型
this.storeInfoClassFEEDBACKTYPE = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsInfoClassModel',
proxy: { url: '/CommMng/BasicDataRef/GetMsInfoClass' }
});
this.storeInfoClassFEEDBACKTYPE.load({ params: { condition: "parentID='CI20161222000001' and del_sign=0"} });
this.comboxInfoClassFEEDBACKTYPE = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: '反馈类型',
store: this.storeInfoClassFEEDBACKTYPE,
forceSelection: false, //输入值是否严格为待选列表中存在的值
//matchFieldWidth: false, //下拉款自适应宽度
//allowBlank: false,
id: 'FEEDBACKTYPE',
valueField: 'CLASSNAME',
displayField: 'CLASSNAME',
value: '日常维护'
});
this.comboxInfoClassFEEDBACKTYPE_2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '反馈类型',
store: this.storeInfoClassFEEDBACKTYPE,
forceSelection: false, //输入值是否严格为待选列表中存在的值
//matchFieldWidth: false, //下拉款自适应宽度
//allowBlank: false,
name: 'FEEDBACKTYPE_2',
valueField: 'CLASSNAME',
displayField: 'CLASSNAME'
});
//客户维护方式
this.storeInfoClassACTION = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsInfoClassModel',
proxy: { url: '/CommMng/BasicDataRef/GetMsInfoClass' }
});
this.storeInfoClassACTION.load({ params: { condition: "parentID='CI20170122000001' and del_sign=0"} });
this.comboxInfoClassACTION = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: '客户维护方式',
store: this.storeInfoClassACTION,
forceSelection: false, //输入值是否严格为待选列表中存在的值
//matchFieldWidth: false, //下拉款自适应宽度
//allowBlank: false,
id: 'ACTION',
valueField: 'CLASSNAME',
displayField: 'CLASSNAME',
value: ''
});
this.comboxInfoClassACTION_2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '维护方式',
store: this.storeInfoClassACTION,
forceSelection: false, //输入值是否严格为待选列表中存在的值
//matchFieldWidth: false, //下拉款自适应宽度
//allowBlank: false,
name: 'ACTION_2',
valueField: 'CLASSNAME',
displayField: 'CLASSNAME',
value: ''
});
//维护状态
this.storeInfoClassSTATUS = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsInfoClassModel',
proxy: { url: '/CommMng/BasicDataRef/GetMsInfoClass' }
});
this.storeInfoClassSTATUS.load({ params: { condition: "parentID='CI20161220000007' and del_sign=0"} });
this.comboxInfoClassSTATUS_2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '维护状态',
store: this.storeInfoClassSTATUS,
forceSelection: false, //输入值是否严格为待选列表中存在的值
//matchFieldWidth: false, //下拉款自适应宽度
//allowBlank: false,
name: 'STATUS_2',
valueField: 'CLASSNAME',
displayField: 'CLASSNAME'
});
//客户子项目
this.storeInfoClientItem = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.MsInfoClientItemModel',
proxy: { url: '/CommMng/BasicDataRef/GetMsInfoClientItem' }
});
//this.storeInfoClientItem.load({ params: { condition: "LINKGID=''"} });
this.comboxInfoClientItem = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: '客户子项目',
store: this.storeInfoClientItem,
forceSelection: false, //输入值是否严格为待选列表中存在的值
//allowBlank: false,
id: 'PROJECT',
valueField: 'ITEMNAME',
displayField: 'ITEMNAME',
//matchFieldWidth: false, //下拉款自适应宽度
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'focus': function (combo, eOpts) {
var selections = this.gridList.getSelectionModel().getSelection(); //获得选中的项
var sPROJECT = selections[0].data.PROJECT;
this.storeInfoClientItem.load({ params: { condition: "LINKGID=(select top 1 GID from info_client where SHORTNAME='" + sPROJECT + "')"} });
}
}
});
//客户加载_委托单位
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCustCode.load({ params: { condition: "ISCONTROLLER=1"} });
this.comboxCustCode = Ext.create('DsExt.ux.RefTableCombox', {
//fieldLabel: '委托单位',
store: this.storeCustCode,
forceSelection: true,
matchFieldWidth: false, //下拉款自适应宽度
id: 'COMPANYID',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'select': function (combo, records, eOpts) {
var selections = this.gridList.getSelectionModel().getSelection(); //获得选中的项
if (combo.value.toString() != "") {
this.storeInfoClientItem.load({ params: { condition: "LINKGID='" + records[0].data.GId.toString() + "'"} });
//
Ext.Ajax.request({
waitMsg: '正在查询汇率值...',
url: '/SoftMng/MsInfoClientFeedback/GetSTLNAME',
params: {
LINKGID: records[0].data.GId.toString()
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
//Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.MessageBox.INFO, buttons: Ext.Msg.OK });
return;
}
var strArg = result.data.toString(); //.split("");
//var FCYNO = strArg[0].toString();
if (strArg != "") {
selections[0].set('STLNAME', strArg);
}
else {
selections[0].set('STLNAME', "");
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
async: false,
scope: this
});
//
}
else {
this.storeInfoClientItem.load({ params: { condition: "LINKGID=''"} });
selections[0].set('STLNAME', "");
}
},
'blur': function (combo, records, eOpts) {
var selections = this.gridList.getSelectionModel().getSelection(); //获得选中的项
if (combo.value.toString() == "") {
this.storeInfoClientItem.load({ params: { condition: "LINKGID=''"} });
selections[0].set('STLNAME', "");
}
}
//
}
});
this.comboxCustCode_2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '客户名称',
store: this.storeCustCode,
forceSelection: true,
matchFieldWidth: false, //下拉款自适应宽度
name: 'COMPANYID_2',
valueField: 'CustName',
displayField: 'CodeAndName'
});
//#endregion
//#region formSearch 查询面板
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
border: false,
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: [this.comboxInfoClassSTATUS_2, this.comboxInfoClassFEEDBACKTYPE_2, this.comboxInfoClassACTION_2, this.comboxCustCode_2]
}]//end items(fieldset 1)
}]//end root items
});
//#endregion formSearch
//#region 定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'VW_Feedback_InfoEntity',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/SoftMng/MsInfoClientFeedback/GetDataList',
reader: {
id: 'FEEDBACKID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#endregion
//#region 定义Grid
this.girdcolums = [{
dataIndex: 'FEEDBACKID',
hidden: true,
width: 80
},
{
dataIndex: 'STATUS',
header: '信息状态',
width: 100
},
{
//sortable: true,
dataIndex: 'BEGINDATE',
header: '开始时间',
editor: {
xtype: 'datefield',
format: 'Y-m-d',
selectOnFocus: true
},
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
width: 100
},
{
dataIndex: 'COMPANYID',
header: '客户',
width: 120,
editor: this.comboxCustCode
},
{
dataIndex: 'MASTER',
header: '客户负责人',
width: 80,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'REMARK',
header: '问题',
width: 200,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'REMARK_HF',
header: '回复',
width: 200,
editor: {
xtype: 'textfield',
selectOnFocus: true
}
},
{
dataIndex: 'PROJECT',
header: '客户项目',
width: 100,
editor: this.comboxInfoClientItem
},
{
dataIndex: 'FEEDBACKTYPE',
header: '反馈类型',
width: 80,
editor: this.comboxInfoClassFEEDBACKTYPE
},
{
dataIndex: 'ACTION',
header: '维护方式',
width: 80,
editor: this.comboxInfoClassACTION
},
{
dataIndex: 'EXPENSE',
header: '维护费用',
align: 'right',
width: 80,
editor: {
xtype: 'textfield',
selectOnFocus: true
},
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
try {
var lsValue = usMoney(value, 2, '', false);
if (lsValue != "NaN") {
value = lsValue; if (parseFloat(lsValue) < 0) {
return '<SPAN style="COLOR: red">' + lsValue + '</SPAN>';
}
}
else {
return value;
}
}
catch (e) {
return value;
}
return value;
}
},
{
dataIndex: 'STLNAME',
header: '维护类型',
width: 60
},
{
dataIndex: 'FEEDBACKID',
header: '反馈编号',
width: 130
},
{
dataIndex: 'MODIFYUSER',
header: '修改人',
width: 80
},
{
dataIndex: 'MODIFYDATE',
header: '修改时间',
width: 150
},
{
dataIndex: 'REMARKID',
hidden: true,
width: 0
},
{
dataIndex: 'REMARKID_HF',
hidden: true,
width: 0
},
{
dataIndex: 'USERTYPE',
hidden: true,
width: 0
},
{
dataIndex: 'MODIFYUSERGID',
header: '修改人GID',
hidden: true,
width: 0
}];
//#endregion
//#region gridList列表显示信息
this.gridListCellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1 //1单击2双击
});
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false, //是否显示表格列的菜单
hideHeaders: false, //是否隐藏表头
enableColumnHide: false, //隐藏表头列
sortableColumns: false, //隐藏表头排序
trackMouseOver: true, //高亮显示鼠标所在的行默认为true,
disableSelection: false, //是否禁止选择表格行或列默认为false
//stripeRows: true, //斑马线效果
rowLines: true,
columnLines: true,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
//selType: 'cellmodel',
plugins: [this.gridListCellEditing],
columns: this.girdcolums,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
//#endregion
//#region gridList函数
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
this.SelectedRecord = record;
this.OprationStatus = 'edit';
DsOpenEditWin('/SoftMng/MsInfoClientFeedback/Edit', "维护信息", "600", "1000", 200, 200);
}, this);
this.gridList.on('cellclick', function (_thisTable, td, cellIndex, record, tr, rowIndex, e, eOpts) {
if (cellIndex == 6) {
return false;
}
if (record.data.USERTYPE.toString().trim() == "客户" && (cellIndex == 0 || cellIndex == 1 || cellIndex == 2 || cellIndex == 3 || cellIndex == 4 || cellIndex == 5 || cellIndex == 6 || cellIndex == 7 || cellIndex == 10 || cellIndex == 11)) {
return false;
}
}, this);
this.gridList.on('edit', function (editor, e, eOpts) {
if (e.value == e.originalValue) { return; }
//
if (e.field == 'COMPANYID') {
this.storeInfoClientItem.load({ params: { condition: "LINKGID='" + e.value + "'"} });
}
//
//#region 保存
var madedate = this.GetDateStr(0);
var member = e.record;
sName = member.data.BEGINDATE;
if (sName == null) {
if (e.originalValue.toString() != "") {
member.set("BEGINDATE", e.originalValue);
}
else {
member.set("BEGINDATE", madedate);
}
}
sName = member.data.REMARK.toString().trim().replace(/<br>/g, "\r\n");
member.set("REMARK", sName);
sName = member.data.REMARK_HF.toString().trim().replace(/<br>/g, "\r\n");
member.set("REMARK_HF", sName);
//
Ext.Ajax.request({
waitMsg: '正在保存数据...',
url: '/SoftMng/MsInfoClientFeedback/Save',
scope: this,
params: {
data: Ext.JSON.encode(member.data)
},
callback: function (options, success, response) {
if (success) {
//Ext.MessageBox.hide();
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
member.set("FEEDBACKID", jsonresult.Data.FEEDBACKID.toString());
member.set("REMARKID", jsonresult.Data.REMARKID.toString().trim() == "" ? "*" : jsonresult.Data.REMARKID.toString().trim());
member.set("REMARKID_HF", jsonresult.Data.REMARKID_HF.toString().trim() == "" ? "*" : jsonresult.Data.REMARKID_HF.toString().trim());
member.set("MODIFYDATE", jsonresult.Data.MODIFYDATE.toString().trim());
member.set("MODIFYUSERGID", jsonresult.Data.MODIFYUSERGID.toString().trim());
member.set("REMARK", jsonresult.Data.REMARK.toString().trim().replace(/\r\n/g, "<br>"));
member.set("REMARK_HF", jsonresult.Data.REMARK_HF.toString().trim().replace(/\r\n/g, "<br>"));
e.record.commit();
//this.editRecord.commit();
//this.storeList.load({ params: { condition: "" }, waitMsg: "正在刷新数据...", scope: this });
} 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 });
}
}
});
//#endregion
}, this);
//#endregion
//#region 页面布局
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) {
this.onClearSql(button, event);
},
scope: this
}, '-', {
text: '添加',
tooltip: '添加',
id: "btnadd",
iconCls: "btnadd",
handler: function (button, event) {
this.onAddClick();
},
scope: this
}, {
text: "删除",
iconCls: "btndelete",
handler: function (button, event) {
this.onDeleteClick(button, event);
},
scope: this
}, '-', {
text: "提交",
iconCls: "btnEnter",
handler: function (button, event) {
this.onEnterClick(button, event);
},
scope: this
}
// , '-',
// {
// text: "打印",
// iconCls: 'btnprint',
// handler: function (button, event) {
// this.Print();
// },
// scope: this
// }
]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 65,
border: false,
items: [this.panelBtn, this.formSearch]
});
Ext.apply(this, {
items: [this.panelTop, this.gridList]
});
//#endregion
//#region 加载数据
this.storeList.on('beforeload', function (store) { Ext.apply(store.proxy.extraParams, { condition: "" }); }, this);
this.onRefreshClick();
//#endregion
}, //end initUIComponents
//#region 刷新
onRefreshClick: function (button, event) {
var sql = this.getCondition();
this.sqlcontext = sql;
this.storeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql }, waitMsg: "正在查询数据...", scope: this });
},
getCondition: function () {
var sql = '';
//维护状态
var STATUS_2 = this.formSearch.getForm().findField('STATUS_2').getValue();
if (STATUS_2 != null) {
if (STATUS_2 != "") {
sql = sql + getAndConSql(sql, STATUS_2, "STATUS='" + STATUS_2.toString().trim() + "'");
}
}
//反馈类型
var FEEDBACKTYPE_2 = this.formSearch.getForm().findField('FEEDBACKTYPE_2').getValue();
if (FEEDBACKTYPE_2 != null) {
if (FEEDBACKTYPE_2 != "") {
sql = sql + getAndConSql(sql, FEEDBACKTYPE_2, "FEEDBACKTYPE='" + FEEDBACKTYPE_2.toString().trim() + "'");
}
}
//客户维护方式
var ACTION_2 = this.formSearch.getForm().findField('ACTION_2').getValue();
if (ACTION_2 != null) {
if (ACTION_2 != "") {
sql = sql + getAndConSql(sql, ACTION_2, "ACTION='" + ACTION_2.toString().trim() + "'");
}
}
//客户加载_委托单位
var COMPANYID_2 = this.formSearch.getForm().findField('COMPANYID_2').getValue();
if (COMPANYID_2 != null) {
if (COMPANYID_2 != "") {
sql = sql + getAndConSql(sql, COMPANYID_2, "COMPANYID='" + COMPANYID_2.toString().trim() + "'");
}
}
return sql;
},
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
},
//#endregion
//#region 新增
onAddClick: function () {
var n = this.storeList.getCount();
var madedate = this.GetDateStr(0);
//
var record = Ext.create('VW_Feedback_InfoEntity', {
FEEDBACKID: '*', //反馈编号
STATUS: '已受理未完成', //信息状态
FEEDBACKID: '*', //反馈编号
BEGINDATE: madedate, //开始时间
FEEDBACKTYPE: '', //反馈类型
COMPANYID: '', //客户
MASTER: '', //客户负责人
PROJECT: '', //客户项目
STLNAME: '',
ACTION: '', //维护方式
EXPENSE: '0.00', //维护费用
REMARK: '', //问题
REMARK_HF: '', //回复
MODIFYUSER: SHOWNAME, //修改人
MODIFYDATE: madedate, //修改时间
REMARKID: '*',
REMARKID_HF: '*',
USERTYPE: '客服'
});
//this.storeList.add(record);
this.storeList.insert(0, record);
this.gridListCellEditing.startEditByPosition({ row: 0, column: 3 }); //n
},
//#endregion
//#region 删除
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;
}
if (selections[0].data.USERTYPE.toString() == "客户") {
Ext.Msg.show({ title: '提示', msg: '客户录入的问题不允许删除!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
//
// if (this.StoreOpRange.getCount() == 0) {
// Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
// return;
// } else {
// var sMODIFYUSERGID = selections[0].data.MODIFYUSERGID;
// var records = DsStoreQueryBy(this.StoreOpRange, 'OPID', sMODIFYUSERGID);
// if (records.getCount() > 0) {
// } else {
// canedit = false;
// Ext.Msg.show({ title: '警告', msg: '权限不足,不允许删除!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK });
// return;
// }
// }
//
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/SoftMng/MsInfoClientFeedback/Delete',
params: {
data: Ext.JSON.encode(selections[0].data)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
//this.storeList.remove(selections[0]);
this.onRefreshClick();
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
}); //end Ext.Ajax.request
}
}, this);
},
//#endregion
//#region 提交
onEnterClick: 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;
}
if (selections[0].data.STATUS.toString() != "已提交未受理" && selections[0].data.STATUS.toString() != "已受理未完成") {
Ext.Msg.show({ title: '提示', msg: '只有“已提交未受理”与“已受理未完成”的状态允许操作提交成“已完成未验收”的状态!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
return;
}
//
Ext.MessageBox.confirm('提示', '确定提交该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在提交数据...');
Ext.Ajax.request({
waitMsg: '正在提交数据...',
url: '/SoftMng/MsInfoClientFeedback/onEnter',
params: {
data: Ext.JSON.encode(selections[0].data)
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.onRefreshClick();
Ext.Msg.show({ title: '提示', msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
}
else {
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
}
},
failure: function (response, options) {
Ext.Msg.show({ title: '警告', msg: '服务器响应出错,请重试', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK });
},
success: function (response, options) {
},
scope: this
});
}
}, this);
},
//#endregion
//#region 其他
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
return ret;
},
//#endregion
//#region 获取当前日期
GetDateStr: function (AddDayCount) {
var dd = new Date();
dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
var y = dd.getFullYear();
var m = dd.getMonth() + 1; //获取当前月份的日期
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
//#endregion
//#region 打印
Print: function () {
if (this.storeList.getCount() == 0) {
return;
}
Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据...',
url: '/SoftMng/MsInfoClientFeedback/GetDataListStr',
scope: this,
params: {
condition: "",
printstr: 'true'
},
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 = 'MsInfoClientFeedbackList';
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
});
}
}
});
}
//#endregion
});