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.
DS7/DSWeb/Areas/MvcShipping/Viewsjs/RptCwGLDetail/RptCwGLDetailIndex.js

879 lines
32 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Ext.namespace('Shipping');
Shipping.RptCwGLDetailIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.Shipping.RptCwGLDetailIndex.superclass.constructor.call(this);
};
Ext.extend(Shipping.RptCwGLDetailIndex, Ext.Panel, {
PageSize: 1000,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
sqlcontext: '',
strCwSTARTGID: '',
initUIComponents: function () {
this.formname = "formRptCwGLDetailIndex"; //明细账
//#region formSearch 下拉框信息加载
//科目加载
this.storeCwAccitems = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CwAccitemsGlModel',
proxy: { url: '/CommMng/BasicDataRef/GetCwAccitemsGl' }
});
this.storeCwAccitems.load({ params: { condition: "ISENABLE=1"} });
this.comboxACCNAME = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '科目名称',
store: this.storeCwAccitems,
forceSelection: true, //输入值是否严格为待选列表中存在的值
allowBlank: false,
id: 'ACCID',
name: 'ACCID',
valueField: 'ACCID',
displayField: 'ACCIDNAME',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this, beforequery: function (e) {
return FilterCombox(e);//在beforequery使用此方法
},
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
});
//币别
this.storeCodeCurrency = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CodeCurrencyModel',
proxy: { url: '/MvcShipping/RptCwGLDetail/GetCodeCurrencyList' }
});
this.storeCodeCurrency.load();
this.comboxCodeCurrency = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '币别',
store: this.storeCodeCurrency,
forceSelection: true,
name: 'CURRENCY',
valueField: 'CODENAME',
displayField: 'CODENAME',
value: '综合本位币',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
});
//客户加载
this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' }
});
this.storeCustCode.load({ params: { condition: ""} });
this.comboxCust = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '客户',
store: this.storeCustCode,
forceSelection: true,
queryMode: 'remote',
minChars: 1,
queryParam: 'CODENAME',
id: 'CustNAME',
name: 'CustNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
});
//部门加载
this.storeDept = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.DeptModel',
proxy: { url: '/CommMng/BasicDataRef/GetDeptList_All_Group' }//proxy: { url: '/CommMng/BasicDataRef/GetDeptList' }
});
this.storeDept.load({ params: { condition: ""} });
this.comboxDept = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '部门',
store: this.storeDept,
forceSelection: true,
id: 'DeptName',
name: 'DeptName',
valueField: 'DeptName',
displayField: 'DeptName',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
});
//人员信息加载
this.storeOpCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeOpCode.load();
this.comboxSALE = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '人员',
store: this.storeOpCode,
forceSelection: true,
id: 'SALE',
name: 'SALE',
valueField: 'UserName',
displayField: 'CodeAndName',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
});
//项目加载
this.storeCwItem = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.CwItemModel',
proxy: { url: '/CommMng/BasicDataRef/GetCwItemList' }
});
this.storeCwItem.load();
this.comboxCwItem = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '项目',
store: this.storeCwItem,
forceSelection: true,
id: 'ITEMNAME',
name: 'ITEMNAME',
valueField: 'ITEMNAME',
displayField: 'CodeAndName',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
});
//#endregion
//#region 定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'RptCwGLDetailModel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/RptCwGLDetail/GetDataList',
reader: {
id: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
//#endregion
//#region 定义列
this.girdcolums = [{
sortable: false,
dataIndex: 'GID',
header: '唯一编码',
hidden: true,
width: 0
}, {
sortable: false,
dataIndex: 'VOUDATE',
header: '日期',
align: 'center',
width: 90
}, {
sortable: false,
dataIndex: 'VKNO',
header: '凭证字',
align: 'center',
width: 50
}, {
sortable: false,
dataIndex: 'VOUNO',
header: '凭证号',
align: 'center',
width: 50
}, {
sortable: false,
dataIndex: 'EXPLAN',
header: '摘要',
width: 200
}, {
sortable: false,
dataIndex: 'DR',
header: '借方',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: false,
dataIndex: 'CR',
header: '贷方',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: false,
dataIndex: 'DC',
header: '方向',
align: 'center',
width: 40
}, {
sortable: false,
dataIndex: 'BLC',
header: '余额',
align: 'right',
width: 100,
renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) {
value = usMoney(value, 2, '', true);
return value;
}
}, {
sortable: false,
dataIndex: 'ORDNO',
header: 'ORDNO',
hidden: true,
width: 0
}];
//#endregion
//#region List列表显示信息
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
width: 40
});
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
enableHdMenu: false, //是否显示表格列的菜单
stripeRows: true, //斑马线效果
rowLines: true,
columnLines: true,
columns: this.girdcolums,
viewConfig: {
enableTextSelection: true, //允许复制数据
autoFill: true
},
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
/////////////以下部分为获取存储的gridpanel显示样式
this.column = DsTruck.GetGridPanel(USERID, this.formname, this.girdcolums, 1); //使用者id表名中间column数组跳过一开始的几列
this.gridList.reconfigure(this.storeList, this.girdcolums);
this.gridList.columns[0] = new Ext.grid.RowNumberer();
////////////////////////////////////////////////
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
var sVKNO = record.data.VKNO.toString();
if (sVKNO != "") {
this.SelectedRecord = record;
this.OprationStatus = 'edit';
DsOpenEditWin('/MvcShipping/MsCwVouchersGl/Edit', "凭证录入", "500", "940", "10", "10");
}
}, this);
//#endregion
//#region formSearch 查询面板
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: [this.comboxCodeCurrency, this.comboxACCNAME, {
fieldLabel: '会计期间',
xtype: 'monthfield',
editable: false,
allowBlank: false, //是否允许为空
id: 'ACCDATEbgn',
name: 'ACCDATEbgn',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
}, {
fieldLabel: '至',
//labelWidth: 20,
xtype: 'monthfield',
editable: false,
allowBlank: false, //是否允许为空
id: 'ACCDATEend',
name: 'ACCDATEend',
enableKeyEvents: true, //激活键盘事件
listeners: {
scope: this,
'keyup': {
fn: function (_field, e) {
if (e.getKey() == 13) {
this.onRefreshClick();
}
},
scope: this
}
}
}]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxCust, this.comboxDept, this.comboxSALE, this.comboxCwItem]
}]
}]//end items(fieldset 1)
});
//#endregion formSearch
//#region 按钮工具条
this.CheckSaveQuery = new Ext.form.Checkbox({
fieldLabel: '记忆查询条件',
checked: true,
width: 120
});
this.panelBtn = new Ext.Panel({
region: "center",
border: false,
tbar: [{
text: "执行查询",
id: "btnRefresh",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
var isvisible = false;
var issavevalue = false;
if (this.CheckSaveQuery.checked) {
issavevalue = true
}
saveQuerySetting(this.formname, this.formSearch, isvisible, issavevalue);
},
scope: this
}, {
text: "重置条件",
iconCls: "btnreset",
handler: function (button, event) {
this.onClearSql(button, event);
},
scope: this
}, '-', {
text: "导出Excel",
id: "btnExportExcel",
iconCls: 'btnexportexcel',
handler: function (button, event) {
this.onExportClick(button, event);
},
scope: this
}, {
text: "打印",
iconCls: 'btnprint',
handler: function (button, event) {
this.Print();
},
scope: this
}, '-', this.CheckSaveQuery]
});
//#endregion
//#region 页面布局
this.panelZQ = new Ext.Panel({
layout: "border",
region: "east",
width: 500,
style: 'text-align:right;',
border: false,
items: [{
xtype: 'displayfield',
id: 'lbTitle2',
name: 'lbTitle2',
value: "  "
}]
});
this.panelTopF = new Ext.Panel({
layout: "border",
region: "north",
height: 26,
//border: false,
items: [this.panelBtn, this.panelZQ]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 95,
border: false,
items: [this.panelTopF, this.formSearch]
});
Ext.apply(this, {
border: false,
items: [this.panelTop, this.gridList]
});
//this.onRefreshClick();
//#endregion
//#region 页面加载
this.storeList.on('beforeload', function (store) {
var sql = this.getCondition();
var ACCDATEbgn = this.getACCDATEbgn();
var ACCDATEend = this.getACCDATEend();
var strCURRENCY = this.getCURRENCY();
var strACCID = this.getACCID();
var strCustNAME = this.getCustNAME();
var strDeptName = this.getDeptName();
var strSALE = this.getSALE();
var strITEMNAME = this.getITEMNAME();
if (sql.toString() != "") {
Ext.apply(store.proxy.extraParams, { condition: sql, ACCDATEbgn: ACCDATEbgn, ACCDATEend: ACCDATEend, strCURRENCY: strCURRENCY, strACCID: strACCID, strCustNAME: strCustNAME, strDeptName: strDeptName, strSALE: strSALE, strITEMNAME: strITEMNAME, sType: '2' });
}
}, this);
//加载事件
this.InitData();
LoadQueryData(this.formname, this.formSearch, this.CheckSaveQuery);
//#endregion
}, //end initUIComponents
//#region 加载事件
InitData: function () {
Ext.Ajax.request({
waitMsg: '正在查询主表数据...',
url: '/MvcShipping/RptCwGenlegAccitems/GetData',
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
if (!result.Success) {
return;
}
data = result.data;
var arrtmp = data.toString().split("&");
this.strCwSTARTGID = arrtmp[0].toString();
var strCwSTARTNAME = arrtmp[1].toString();
var strCwACCDATE = arrtmp[2].toString();
var sYear = arrtmp[3].toString();
var sMonth = arrtmp[4].toString();
//
var sZQ = "  当前登录账套:“" + strCwSTARTNAME + "”  当前财务账期:“" + sYear + "年第" + sMonth + "期”  ";
Ext.getCmp("lbTitle2").setValue(sZQ);
Ext.getCmp("ACCDATEbgn").setValue(strCwACCDATE);
Ext.getCmp("ACCDATEend").setValue(strCwACCDATE);
//
var combo = Ext.getCmp("ACCID");
if (combo.store.data.length > 0) {
combo.setValue(combo.store.data.items[0].data.ACCID); //选中
}
} else {
//Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
async: false,
scope: this
});
}, //end InitData
//#endregion
//#region 执行查询
onRefreshClick: function (button, event) {
var sql = this.getCondition();
var ACCDATEbgn = this.getACCDATEbgn();
var ACCDATEend = this.getACCDATEend();
var strCURRENCY = this.getCURRENCY();
var strACCID = this.getACCID();
var strCustNAME = this.getCustNAME();
var strDeptName = this.getDeptName();
var strSALE = this.getSALE();
var strITEMNAME = this.getITEMNAME();
_this = this;
if (sql.toString() != "") {
this.sqlcontext = sql;
Ext.Msg.wait('正在计算数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在计算数据...',
url: '/MvcShipping/RptCwGLDetail/GetDataList',
params: { start: 0, limit: _this.PageSize, sort: '', condition: sql, ACCDATEbgn: ACCDATEbgn, ACCDATEend: ACCDATEend, strCURRENCY: strCURRENCY, strACCID: strACCID, strCustNAME: strCustNAME, strDeptName: strDeptName, strSALE: strSALE, strITEMNAME: strITEMNAME, sType: '1' },
callback: function (options, success, response) {
if (success) {
this.storeList.load({
params: { start: 0, limit: _this.PageSize, sort: '', condition: sql, ACCDATEbgn: ACCDATEbgn, ACCDATEend: ACCDATEend, strCURRENCY: strCURRENCY, strACCID: strACCID, strCustNAME: strCustNAME, strDeptName: strDeptName, strSALE: strSALE, strITEMNAME: strITEMNAME, sType: '2' },
waitMsg: "正在查询数据...",
async: false, //同步请求数据
callback: function (options, response, success) {
if (success) {
} else {
Ext.Msg.show({ title: '请重试', msg: '服务器响应出错', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
},
timeout: 12000000, //120秒
scope: this
});
Ext.Msg.hide();
} else {
Ext.Msg.show({ title: '请重试', msg: '服务器响应出错', icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
}
},
timeout: 12000000, //30秒
scope: this
});
/*
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql, ACCDATEbgn: ACCDATEbgn, ACCDATEend: ACCDATEend, strCURRENCY: strCURRENCY, strACCID: strACCID, strCustNAME: strCustNAME, strDeptName: strDeptName, strSALE: strSALE, strITEMNAME: strITEMNAME, sType: '1' },
waitMsg: "正在查询数据...",
callback: function (options, response, success) {
if (success) {
if (response.sorters.length != 0) {
} 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 });
}
},
timeout: 12000000, //120秒
scope: this
});
*/
}
},
//#endregion
//#region 查询
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查!');
return '';
}
var sql = '';
//#region formSearch 查询面板
//会计期间
var ACCDATEbgn = form.findField('ACCDATEbgn').getRawValue();
var ACCDATEend = form.findField('ACCDATEend').getRawValue();
if (ACCDATEbgn.toString() == "" || ACCDATEend.toString() == "") {
alert('请先选择会计期间!');
return '';
}
sql = sql + getAndConSql(sql, ACCDATEbgn, "ACCDATE>='" + ACCDATEbgn + "'");
sql = sql + getAndConSql(sql, ACCDATEend, "ACCDATE<='" + ACCDATEend + "'");
//var ACCID = form.findField('ACCID').getValue();
//sql = sql + getAndConSql(sql, ACCID, "LINKGID in (select GID from cw_accitems_gl where [YEAR]=SUBSTRING('" + ACCDATEbgn + "',1,4) and ACCID like '" + ACCID + "%')");
//#endregion formSearch
return sql;
},
getACCDATEbgn: function () {
var form = this.formSearch.getForm();
//会计期间
var ACCDATEbgn = form.findField('ACCDATEbgn').getRawValue();
if (ACCDATEbgn.toString() == "") {
alert('请先选择会计期间!');
return '';
}
ACCDATEbgn = " and ACCDATE='" + ACCDATEbgn + "'";
return ACCDATEbgn;
},
getACCDATEend: function () {
var form = this.formSearch.getForm();
//会计期间
var ACCDATEend = form.findField('ACCDATEend').getRawValue();
if (ACCDATEend.toString() == "") {
alert('请先选择会计期间!');
return '';
}
ACCDATEend = " and ACCDATE='" + ACCDATEend + "'";
return ACCDATEend;
},
getCURRENCY: function () {
var form = this.formSearch.getForm();
var strCURRENCY = form.findField('CURRENCY').getValue();
return strCURRENCY;
},
getACCID: function () {
var form = this.formSearch.getForm();
var strACCID = form.findField('ACCID').getValue();
return strACCID;
},
getCustNAME: function () {
var form = this.formSearch.getForm();
var strCustNAME = form.findField('CustNAME').getValue();
return strCustNAME;
},
getDeptName: function () {
var form = this.formSearch.getForm();
var strDeptName = form.findField('DeptName').getValue();
return strDeptName;
},
getSALE: function () {
var form = this.formSearch.getForm();
var strSALE = form.findField('SALE').getValue();
return strSALE;
},
getITEMNAME: function () {
var form = this.formSearch.getForm();
var strITEMNAME = form.findField('ITEMNAME').getValue();
return strITEMNAME;
},
//#endregion
//#region 重置条件
onClearSql: function () {
var form = this.formSearch.getForm();
form.reset();
this.InitData();
}, //onDeleteClick
//#endregion
//#region 导出Excel
onExportClick: function (button, event) {
if (this.storeList.getCount() == 0) {
return;
}
var ACCDATEbgn = this.getACCDATEbgn();
var ACCDATEend = this.getACCDATEend();
var strCURRENCY = this.getCURRENCY();
var strACCID = this.getACCID();
var strCustNAME = this.getCustNAME();
var strDeptName = this.getDeptName();
var strSALE = this.getSALE();
var strITEMNAME = this.getITEMNAME();
//Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯...',
url: '/MvcShipping/RptCwGLDetail/GetDataListStr',
params: {
condition: this.sqlcontext,
ACCDATEbgn: ACCDATEbgn,
ACCDATEend: ACCDATEend,
strCURRENCY: strCURRENCY,
strACCID: strACCID,
strCustNAME: strCustNAME,
strDeptName: strDeptName,
strSALE: strSALE,
strITEMNAME: strITEMNAME,
isPrint: 'false'
},
callback: function (options, success, response) {
if (success) {
var ddd = Ext.MessageBox.isVisible();
if (Ext.MessageBox.isVisible()) {
Ext.MessageBox.hide();
}
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnStr = jsonresult.data;
if (returnStr.toString() != "") {
var openSet = "height=1, width=400, toolbar=no, menubar=no,scrollbars=no, resizable=no,location=no, status=no,Top=" + (screen.height - 200) / 2 + ",Left=" + (screen.width - 400) / 2;
var openType = "_blank";
var condition1 = returnStr.toString().replace(/\+/g, "%2B"); //将+号替换为十六进制
condition1 = escape(condition1);
var openUrl = "../../Reports/RptExport.aspx?handle=RptCwGLDetailIndex&formname=" + this.formname + "&condition1=" + condition1;
window.open(openUrl, openType, openSet);
}
} 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 });
}
},
scope: this
});
},
//ExtJs 自带的导出当前页的excel导出函数
onExportClick2: function (button, event) {
GridExportExcelPage(this.gridList);
},
//#endregion
//#region 打印
Print: function () {
if (this.storeList.getCount() == 0) {
return;
}
var ACCDATEbgn = this.getACCDATEbgn();
var ACCDATEend = this.getACCDATEend();
var strCURRENCY = this.getCURRENCY();
var strACCID = this.getACCID();
var strCustNAME = this.getCustNAME();
var strDeptName = this.getDeptName();
var strSALE = this.getSALE();
var strITEMNAME = this.getITEMNAME();
var ACCDATEFR = this.formSearch.getForm().findField('ACCDATEbgn').getRawValue();
var ACCDATETO = this.formSearch.getForm().findField('ACCDATEend').getRawValue();
//Ext.Msg.wait('正在组织数据, 请稍侯..');
Ext.Ajax.request({
waitMsg: '正在组织数据, 请稍侯...',
url: '/MvcShipping/RptCwGLDetail/GetDataListStr',
params: {
condition: this.sqlcontext,
ACCDATEbgn: ACCDATEbgn,
ACCDATEend: ACCDATEend,
strCURRENCY: strCURRENCY,
strACCID: strACCID,
strCustNAME: strCustNAME,
strDeptName: strDeptName,
strSALE: strSALE,
strITEMNAME: strITEMNAME,
isPrint: 'true'
},
callback: function (options, success, response) {
if (success) {
var ddd = Ext.MessageBox.isVisible();
if (Ext.MessageBox.isVisible()) {
Ext.MessageBox.hide();
}
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
var returnStr = jsonresult.data;
var printType = 'RptCwGLDetailList';
var sql1 = returnStr;
var sql2 = "select '" + ACCDATEFR + "' ACCDATEFR,'" + ACCDATETO + "' ACCDATETO,'" + strCURRENCY + "' CURRENCY,'" + strACCID + "' ACCID,'" + strCustNAME + "' CUSTNAME,'"
+ strDeptName + "' DEPT,'" + strSALE + "' SALE,'" + strITEMNAME + "' ITEMNAME";
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
});
}
},
scope: this
});
},
//#endregion
//#region 页面传值
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
ret[3] = this.sqlcontext;
ret[4] = Ext.getCmp('btnRefresh');
ret[5] = null;
ret[6] = null;
ret[7] = null;
ret[8] = null;
ret[9] = null;
ret[10] = null;
return ret;
},
OprationSwapJK: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
ret[3] = this.sqlcontext;
ret[4] = Ext.getCmp('btnRefresh');
ret[5] = null;
ret[6] = null;
ret[7] = null;
ret[8] = null;
ret[9] = null;
ret[10] = null;
return ret;
}
//#endregion
});