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.
132 lines
4.0 KiB
JavaScript
132 lines
4.0 KiB
JavaScript
Ext.namespace('DsTruck');
|
|
|
|
//审核报销单 报销单审核
|
|
JieKuanStart = function (records) {
|
|
var jsondata = ConvertRecordsToJsonAll(records);
|
|
|
|
Ext.Msg.wait('正在审核,请等待...');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在审核,请等待...',
|
|
url: '/OA/JieKuan2/SubmitAuditNew',
|
|
scope: this,
|
|
async: false,
|
|
params: {
|
|
JieKuan2List: jsondata
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
Ext.Msg.hide();
|
|
} 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
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//借款单审核
|
|
JieKuanAudit = function (records) {
|
|
var jsondata = ConvertRecordsToJsonAll(records);
|
|
|
|
Ext.Msg.wait('正在审核,请等待...');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在审核,请等待...',
|
|
url: '/OA/Jiekuan2/Audit',
|
|
scope: this,
|
|
async: false,
|
|
params: {
|
|
JieKuan2List: jsondata
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
Ext.Msg.hide();
|
|
/*
|
|
var newStatusRef = jsonresult.Data;
|
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
var record = records[i];
|
|
record.set('JKSTATUS', newStatus);
|
|
record.set('JKSTATUS_REF', newStatusRef);
|
|
record.commit();
|
|
}*/
|
|
} 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
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
JieKuanAuditBack = function (records,reason) {
|
|
var jsondata = ConvertRecordsToJsonAll(records);
|
|
|
|
Ext.Msg.wait('正在审核,请等待...');
|
|
Ext.Ajax.request({
|
|
waitMsg: '正在审核,请等待...',
|
|
url: '/OA/JieKuan2/AuditBack',
|
|
scope: this,
|
|
async: false,
|
|
params: {
|
|
JieKuan2List: jsondata,
|
|
reason:reason
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
Ext.Msg.hide();
|
|
} 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
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|