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/OA/Viewsjs/Jiekuan/JiekuanIndex.js

965 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('DsTruck');
DsTruck.Chfee_managementIndex = function (config) {
Ext.applyIf(this, config);
this.initUIComponents();
window.DsTruck.Chfee_managementIndex.superclass.constructor.call(this);
};
Ext.extend(DsTruck.Chfee_managementIndex, Ext.Panel, {
PageSize: 500,
OprationStatus: null, //仅当弹出界面时使用
SelectedRecord: null,
VISIBLERANGE: 0,
OPERATERANGE: 0,
initUIComponents: function () {
//定义数据集
this.storeList = Ext.create('Ext.data.Store', {
model: 'Jiekuanmb',
remoteSort: false,
pageSize: this.PageSize,
proxy: {
type: 'ajax',
url: '/OA/Jiekuan/GetDataList',
reader: {
idProperty: 'GID',
root: 'data',
totalProperty: 'totalCount'
}
}
});
this.formname = "OA_Jiekuan";
//枚举参照
this.BXCB = Ext.create('Ext.selection.CheckboxModel', { checkOnly: true });
Ext.grid.RowNumberer = Ext.extend(Ext.grid.RowNumberer, {
width: 45
});
this.column = [{
sortable: true,
dataIndex: '', id: "",
header: '',
width: 80
}, /*{
sortable: true, hidden: true,
dataIndex: 'GID',
header: 'GID',
width: 80
},*/
{
sortable: true, hidden: true,
dataIndex: 'ENTEROPERATOR',
header: 'ENTEROPERATOR',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'BSNO',
header: 'BSNO',
width: 120
}, {
sortable: true,
dataIndex: 'GID',
header: '借款单号',
width: 140
}, {
sortable: true, hidden: true,
dataIndex: 'MBLNO',
header: '提单号',
width: 120
}, {
sortable: true,
dataIndex: 'SHOWNAME',
header: '制单人',
width: 80
},
{
sortable: true,
dataIndex: 'ENTERDATE',
header: '借款时间',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'COMPANYID',
header: 'COMPANYID',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'DEPTID',
header: 'DEPTID',
width: 80
},
{
sortable: true,
dataIndex: 'DEPTNAME',
header: '部门',
width: 80
},
{
sortable: true,
dataIndex: 'AMOUNT',
header: '金额',
width: 80,
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;
}
},
{
sortable: true, hidden: true,
dataIndex: 'ISDELETE',
header: 'ISDELETE',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'DELETEUSER',
header: 'DELETEUSER',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'DELETETIME',
header: 'DELETETIME',
width: 80
},
{
sortable: true, hidden: true,
dataIndex: 'JKSTATUS', id: "JKSTATUS",
header: 'JKSTATUS',
width: 80
}, {
sortable: true,
dataIndex: 'JKSTATUS_REF', id: "JKSTATUS_REF",
header: '借款状态',
width: 80
}, {
sortable: true, hidden: true,
dataIndex: 'REMAIN', id: "REMAIN",
header: 'REMAIN',
width: 80
}];
//定义Grid
this.gridList = new Ext.grid.GridPanel({
store: this.storeList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
stripeRows: true,
viewConfig: {
enableTextSelection: true
},
stateful: true,
selModel: this.BXCB,
columns: [new Ext.grid.RowNumberer()],
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
/////////////以下部分为获取存储的gridpanel显示样式
this.column = DsTruck.GetGridPanel(USERID, this.formname, this.column, 1, true);
//使用者id表名 中间column数组跳过一开始的几列
this.gridList.reconfigure(this.storeList, this.column);
this.gridList.columns[0] = new Ext.grid.RowNumberer();
////////////////////////////
this.gridList.addListener('itemdblclick', function (dataview, record, item, index, e, b) {
// alert('0....' + dataview.toString() + ',' + record.toString() + ',' + item.toString() + ',' + index.toString() + ',' + e.toString() + ',' + b.toString());
this.SelectedRecord = record;
this.OprationStatus = 'edit';
DsOpenEditWin("/OA/Jiekuan/Edit", "", "450", "1000");
}, this);
this.storeCHEQUEList = Ext.create('Ext.data.Store', {
model: 'CHEQUEmb',
remoteSort: false,
pruneModifiedRecords: true,
proxy: {
type: 'ajax',
url: '/OA/Jiekuan/GetCHEQUE',
reader: {
id: 'gid',
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.grid.RowNumberer_CHEQUE = Ext.extend(Ext.grid.RowNumberer, {
width: 45
});
this.CHEQUEList = new Ext.grid.GridPanel({
store: this.storeCHEQUEList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
stripeRows: true,
viewConfig: {
enableTextSelection: true
},
stateful: true,
features: [{
ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
}],
//selModel: this.BXCB,
columns: [new Ext.grid.RowNumberer_CHEQUE(),
{
sortable: true, hidden: true,
dataIndex: 'GID',
header: 'GID',
width: 80
}, {
sortable: true,
dataIndex: 'CUSTOMERNAME',
header: '客户名称',
editor: this.comboxCustomerNameRef,
width: 120
},
{
sortable: true, hidden: true,
dataIndex: 'BILLNO',
header: 'BILLNO',
width: 80
}, {
sortable: true,
dataIndex: 'MBLNO',
header: '业务编号(提单号)',
//hidden: true,
width: 150
},
{
sortable: true,
dataIndex: 'CHEQUENO',
header: '支票号',
width: 80
},
{
sortable: true,
dataIndex: 'CHEQUEAMOUNTUPPER',
header: '借款金额',
summaryType: 'sum',
width: 80,
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;
}
},
{
sortable: true,
dataIndex: 'PURPOSE',
header: '用途',
width: 80
},
{
sortable: true,
dataIndex: 'ModifiedTime',
header: '预计收回时间',
width: 80,
renderer: Ext.util.Format.dateRenderer('Y-m-d')
},
{
sortable: true,
dataIndex: 'CHEQUEAMOUNT',
header: '实际支取金额',
summaryType: 'sum',
width: 80,
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;
}
},
{
sortable: true,
dataIndex: 'PASSWORD',
header: '密码',
width: 80
},
{
sortable: true,
dataIndex: 'CHEQUECUSTNAME',
header: '密码领取人',
width: 80
},
{
sortable: true,
dataIndex: 'CHEQUEMAKETIME',
header: '支取时间',
width: 80
},
{
sortable: true,
dataIndex: 'PRINTTIME',
header: '开出时间',
},
{
sortable: true,
dataIndex: 'PRINTUSER',
header: '开出人',
width: 80
}],
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeCHEQUEList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
//#region formSearch
this.storeDEPT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsTruckMng.ux.DEPTRefModel',
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,
name: 'DEPTID', id: "DEPTID",
valueField: 'GID',
displayField: 'DeptName'
});
this.storeUser = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsTruckMng.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeUser.load({ params: { condition: ""} });
this.comboxUser = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '借款人',
store: this.storeUser,
name: 'ENTEROPERATOR',
id: "ENTEROPERATOR",
valueField: 'UserCode',
displayField: 'CodeAndName',
value: usercode
});
this.storeCustomerNameRef = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsTruckMng.ux.CustomRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetCustomRefList' }
});
this.storeCustomerNameRef.load({ params: { condition: ""} });
this.comboxCustomerNameRef = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '委托单位',
forceSelection:true,
store: this.storeCustomerNameRef,
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName'
});
/*
this.storeBS = Ext.create('DsExt.ux.RefTableStore', {
model: 'BSmb',
proxy: { url: '/OA/Baoxiao/GetBSNO' }
});
this.storeBS.load({ params: { COMPANYID: COMPANYID} });
this.comboxMAKETIMEUPPER = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '业务编号',
forceSelection: true,
store: this.storeBS,
name: 'MAKETIMEUPPER',
valueField: 'BSNO',
displayField: 'MBLNO'
});
*/
this.formSearch = Ext.widget('form', {
frame: true,
region: 'center',
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: 'MAKETIMEUPPER', id: "MAKETIMEUPPER", flex: 1
},
{
fieldLabel: '借款单号',
name: 'GID', id: "GID_S", flex: 1
}, {
fieldLabel: '支票号',
name: 'CHEQUENO', id: "CHEQUENO", flex: 1
}, this.comboxUser, {
fieldLabel: '只显示还未借出',
labelwidth: 120,
xtype: 'checkbox',
name: 'YJC'
}]
}]
}, //end items(fieldset 1)
{//fieldset 2
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: []
}]
}, //end fieldset 2
{//fieldset 3
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [this.comboxCustomerNameRef,
{
fieldLabel: '从..借款时间',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ENTERDATE_min'
}, {
fieldLabel: '到..借款时间',
format: 'Y-m-d',
xtype: 'datefield',
name: 'ENTERDATE_max'
},
this.comboxDEPT]
}]
}, //end items(fieldset 3)
{//fieldset 5
xtype: 'container',
defaultType: 'textfield',
layout: 'anchor',
defaults: {
anchor: '100%'
},
items: [{
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: []
}]
} //end items(fieldset 5)
]//end root items
});
//#endregion formSearch
//查询工具条
this.panelBtn = new Ext.Panel({
region: "north",
tbar: [
{
text: "新建",
iconCls: "btnadd", id: "NEW",
handler: function (button, event) {
this.OprationStatus = 'add';
DsOpenEditWin("/OA/Jiekuan/Edit", "新建借款单", "450", "1000");
},
scope: this
},
{
text: "删除",
iconCls: "btndelete", id: "DEL",
handler: function (button, event) {
this.onDeleteClick(button, event);
},
scope: this
},
'-',
{
text: "执行查询",
iconCls: "btnrefresh",
handler: function (button, event) {
this.onRefreshClick(button, event);
},
scope: this
},
{
text: "重置条件",
iconCls: "btnreset",
handler: function (button, event) {
this.onResetClick(button, event);
//alert(this.getCondition);
},
scope: this
}, {
text: "保存列表样式",
id: "btntest",
handler: function (button, event) {
this.column = DsTruck.SaveGridPanel(USERID, this.formname, this.gridList.columns, this.column, 1, true);
//alert(this.column[0].id);
},
scope: this
}, '-',
{
// id: "saveandclose",
text: "提交审核", id: "Submit",
handler: function (button, event) {
this.onSubmitAuditClick();
},
scope: this
},
{
// id: "saveandclose",
text: "审核通过", id: "Pass",
handler: function (button, event) {
this.onAuditPassClick();
},
scope: this
},
{
// id: "saveandclose",
text: "驳回提交", id: "Refuse",
handler: function (button, event) {
this.onAuditRefuseClick();
},
scope: this
}
]
});
this.panelTop = new Ext.Panel({
layout: "border",
region: "north",
height: 100,
items: [this.formSearch, this.panelBtn]
});
this.page_1 = new Ext.Panel({
id: "page_1",
layout: "border",
region: "center",
title: "借款单",
items: [this.gridList
]
});
this.page_2 = new Ext.Panel({
id: "page_2",
layout: "border",
region: "center",
title: "借款情况查询",
items: [this.CHEQUEList
]
});
this.MainTab = new Ext.tab.Panel({
layout: "border",
region: "center",
items: [this.page_1, this.page_2]
})
Ext.apply(this, {
items: [this.panelTop, this.MainTab]
});
this.InitData();
//集中绑定事件
this.storeList.on('beforeload', function (store) {
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
}, //end initUIComponents
checkHandler: function () {
alert('Checked a menu item');
},
onRefreshClick: function (button, event) {
var _p = this.MainTab.getActiveTab().id;
if (_p == "page_1") {
var sql = this.getCondition();
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
}
if (_p == "page_2") {
var sql = this.getCHEQUECondition();
this.storeCHEQUEList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: sql },
waitMsg: "正在查询数据...",
scope: this
});
}
},
InitData: function () {
Ext.Ajax.request({
waitMsg: '正在查询用户权限...',
url: '/CommMng/BasicDataRef/GetAuthorityRange',
params: {
modName: "mod_Baoxiao",
USERID: USERID
},
callback: function (options, success, response) {
if (success) {
var result = Ext.JSON.decode(response.responseText);
rec = result.data;
//alert(rec.VISIBLERANGE);
//alert(rec.OPERATERANGE);
//可操作为0则全都可见3为可提交/驳回,2为可审核/驳回1为只能看
this.VISIBLERANGE = rec.VISIBLERANGE;
this.OPERATERANGE = rec.OPERATERANGE;
if (this.OPERATERANGE == '0') {
Ext.getCmp("Submit").enable();
Ext.getCmp("Pass").enable();
Ext.getCmp("Refuse").enable();
Ext.getCmp("NEW").enable();
Ext.getCmp("DEL").enable();
} else
if (this.OPERATERANGE == '1') {
Ext.getCmp("Submit").disable();
Ext.getCmp("Pass").disable();
Ext.getCmp("Refuse").disable();
Ext.getCmp("NEW").disable();
Ext.getCmp("DEL").disable();
} else
if (this.OPERATERANGE == '2') {
Ext.getCmp("Submit").disable();
Ext.getCmp("Pass").enable();
Ext.getCmp("Refuse").enable();
Ext.getCmp("NEW").disable();
Ext.getCmp("DEL").enable();
} else {
Ext.getCmp("Submit").enable();
Ext.getCmp("Pass").disable();
Ext.getCmp("Refuse").enable();
Ext.getCmp("NEW").enable();
Ext.getCmp("DEL").enable();
}
} else {
Ext.MessageBox.alert('请求出现错误,请重试', response.responseText);
}
},
scope: this
}); //request over
}, //end InitData
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 selectedRecords = [];
selectedRecords = this.gridList.selModel.getSelection();
var candelete = DsTruck.CheckBaoxiaoDelete(selectedRecords);
if (candelete == false) {
return;
}*/
var record = selections[0];
Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) {
if (btn == 'yes') {
Ext.Msg.wait('正在删除数据...');
Ext.Ajax.request({
waitMsg: '正在删除数据...',
url: '/OA/Jiekuan/Delete',
params: {
data: Ext.JSON.encode(record.data),
USERID: USERID
},
callback: function (options, success, response) {
if (success) {
var jsonresult = Ext.JSON.decode(response.responseText);
if (jsonresult.Success) {
this.storeList.remove(record);
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);
InitData();
}, //onDeleteClick
getToday: function () {
var now = new Date();
var year = now.getFullYear(); //年
var month = now.getMonth() + 1; //月
var day = now.getDate(); //日
var clock = year + "-";
if (month < 10)
clock += "0";
clock += month + "-";
if (day < 10)
clock += "0";
clock += day + " ";
return (clock);
},
onResetClick: function (button, event) {
this.formSearch.getForm().reset();
},
getCondition: function () {
var form = this.formSearch.getForm();
if (!form.isValid()) {
Ext.Msg.alert('提示', '查询条件赋值错误,请检查。');
return '';
}
if (this.VISIBLERANGE == null) {
this.VISIBLERANGE = '3';
}
if (this.VISIBLERANGE == '0')//查看权限 全部
{
var sql = '';
}
if (this.VISIBLERANGE == '1')//分公司
{
var sql = " jk.companyid='" + COMPANYID + "'";
}
if (this.VISIBLERANGE == '2')//部门
{
var sql = " jk.DEPTID ='" + DEPTGID + "'";
}
if (this.VISIBLERANGE == '3')//个人
{
var sql = " jk.ENTEROPERATOR='" + USERID + "'";
}
//OPERATERANGE
var _DEPTID = Ext.getCmp("DEPTID").getValue();
sql = sql + getAndConSql(sql, _DEPTID, "jk.DEPTID = '" + _DEPTID + "'");
var GID = Ext.getCmp("GID_S").getValue();
sql = sql + getAndConSql(sql, GID, "jk.GID like '%" + GID + "%'");
var ENTEROPERATOR = this.comboxUser.getValue();
sql = sql + getAndConSql(sql, ENTEROPERATOR, "jk.ENTEROPERATOR = (select gid from [user] where codename='" + ENTEROPERATOR + "')");
var YJC = form.findField("YJC").getValue();
if (YJC)
{ sql = sql + getAndConSql(sql, YJC, " jk.GID in (select distinct BILLNO from ch_fee_cheque where chequeno='') "); }
var CHEQUENO = Ext.getCmp("CHEQUENO").getValue();
sql = sql + getAndConSql(sql, CHEQUENO, " jk.GID in (select distinct BILLNO from ch_fee_cheque where chequeno like '%" + CHEQUENO + "%') ");
var ENTERDATE_min = form.findField('ENTERDATE_min').getRawValue();
sql = sql + getAndConSql(sql, ENTERDATE_min, "jk.ENTERDATE >= '" + ENTERDATE_min + "'");
var ENTERDATE_max = form.findField('ENTERDATE_max').getRawValue();
sql = sql + getAndConSql(sql, ENTERDATE_max, "jk.ENTERDATE <= '" + ENTERDATE_max + " 23:59:59'");
var MAKETIMEUPPER = Ext.getCmp("MAKETIMEUPPER").getValue();
sql = sql + getAndConSql(sql, MAKETIMEUPPER, " jk.GID in (select distinct BILLNO from ch_fee_cheque where MAKETIMEUPPER in( select bsno from vw_settlement where mblno like '%" + MAKETIMEUPPER + "%')) ");
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, "jk.GID in (select distinct BILLNO from ch_fee_cheque where CUSTOMERNAME='" + CUSTOMERNAME + "')");
/*
var remark = form.findField('remark').getValue();
sql = sql + getAndConSql(sql, remark, "cm.remark like '%" + remark + "%'");
var Remind = form.findField('Remind').getValue();
sql = sql + getAndConSql(sql, Remind, Remind);
*/
return sql;
},
getCHEQUECondition: function () {
var form = this.formSearch.getForm();
if (this.VISIBLERANGE == null) {
this.VISIBLERANGE = '3';
}
if (this.VISIBLERANGE == '0')//查看权限 全部
{
var sql = '';
}
if (this.VISIBLERANGE == '1')//分公司
{
var sql = " Billno in(select GID from oa_jiekuan where companyid='" + COMPANYID + "')";
}
if (this.VISIBLERANGE == '2')//部门
{
var sql = " cfc.Billno in(select GID from oa_jiekuan where DEPTID='" + DEPTGID + "')";
}
if (this.VISIBLERANGE == '3')//个人
{
var sql = " cfc.Billno in(select GID from oa_jiekuan where enteroperator='" + USERID + "')";
}
var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue();
sql = sql + getAndConSql(sql, CUSTOMERNAME, " cfc.CUSTOMERNAME='" + CUSTOMERNAME + "' ");
var MAKETIMEUPPER = form.findField('MAKETIMEUPPER').getValue();
sql = sql + getAndConSql(sql, MAKETIMEUPPER, " cfc.MAKETIMEUPPER in( select bsno from vw_settlement where mblno like '%" + MAKETIMEUPPER + "%') ");
var ENTERDATE_min = form.findField('ENTERDATE_min').getRawValue();
sql = sql + getAndConSql(sql, ENTERDATE_min, " cfc.billno in(select gid from oa_jiekuan where ENTERDATE >= '" + ENTERDATE_min + "') ");
var ENTERDATE_max = form.findField('ENTERDATE_max').getRawValue();
sql = sql + getAndConSql(sql, ENTERDATE_max, " cfc.billno in(select gid from oa_jiekuan where ENTERDATE <= '" + ENTERDATE_max + " 23:59:59') ");
var GID = Ext.getCmp("GID_S").getValue();
sql = sql + getAndConSql(sql, GID, " cfc.billno like '%" + GID + "%'");
var CHEQUENO = Ext.getCmp("CHEQUENO").getValue();
sql = sql + getAndConSql(sql, CHEQUENO, " cfc.chequeno like '%" + CHEQUENO + "%' ");
var ENTEROPERATOR = this.comboxUser.getValue();
sql = sql + getAndConSql(sql, ENTEROPERATOR, " cfc.billno in ( select gid from oa_jiekuan where ENTEROPERATOR = (select gid from [user] where codename='" + ENTEROPERATOR + "') ) ");
var _DEPTID = Ext.getCmp("DEPTID").getValue();
sql = sql + getAndConSql(sql, _DEPTID, " cfc.billno in ( select gid from oa_jiekuan where DEPTID '" + _DEPTID + "') ");
return sql;
},
onGetremind: function (field, newValue, oldValue) {
if (newValue != null) {
this.storeList.load({
params: { start: 0, limit: this.PageSize, sort: '', condition: newValue },
waitMsg: "正在查询数据...",
scope: this
});
}
},
OprationSwap: function () {
var ret = new Array();
ret[0] = this.OprationStatus;
ret[1] = this.storeList;
ret[2] = this.SelectedRecord;
return ret;
},
onSubmitAuditClick: function (button, event) {
//提交审核
var records = this.gridList.selModel.getSelection();
DsTruck.JKAudit(records, 2, '正在审核数据, 请稍侯..');
this.InitData();
},
onAuditPassClick: function (button, event) {
//审核通过
//var records = this.MainCB.selected.items;
var records = this.gridList.selModel.getSelection();
DsTruck.JKAudit(records, 0, '正在审核数据, 请稍侯..');
this.InitData();
},
onAuditRefuseClick: function (button, event) {
//驳回提交
var records = this.gridList.selModel.getSelection();
DsTruck.JKAudit(records, 6, '正在审核数据, 请稍侯..');
this.InitData();
}
});