Commit 2204c266 by 袁成

Merge branch 'develop' of ssh://nvwa.jiuqi.com.cn:2222/GFP/RBC/rbc-frontend into develop-yuancheng

parents c35a4cc3 da3ca9d3
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
}) })
}, },
approvalLogical: function (bill, param) { approvalLogical: function (bill, param) {
const getApprovalList = () => {
let taskId = bill.getGlobalParam('reviewParam').taskId; let taskId = bill.getGlobalParam('reviewParam').taskId;
bill.setControlsSate(param["_control_name_"], "enable", false) bill.setControlsSate(param["_control_name_"], "enable", false)
let selectedApprovers = [] let selectedApprovers = []
...@@ -140,15 +141,15 @@ export default { ...@@ -140,15 +141,15 @@ export default {
}).catch(() => { }).catch(() => {
GMS.$hideContainer.$Message.error('未找到下一节点的审批人'); GMS.$hideContainer.$Message.error('未找到下一节点的审批人');
}) })
}, }
executeApproval: function(bill, param) {
if (param.param.actions) { if (param.param.actions) {
let saveParam = { let saveParam = {
actions: param.param.actions actions: param.param.actions
} }
bill.executeServerAction(saveParam, function (code, data) { bill.executeServerAction(saveParam, function (code, data) {
if (code === 200) { if (code === 200) {
this.approval(bill, param); getApprovalList()
} else { } else {
bill.setControlsSate(param["_control_name_"], "enable", true) bill.setControlsSate(param["_control_name_"], "enable", true)
if (data.message.includes('还款金额不能大于未还金额')) { if (data.message.includes('还款金额不能大于未还金额')) {
...@@ -160,10 +161,10 @@ export default { ...@@ -160,10 +161,10 @@ export default {
} }
}.bind(this)); }.bind(this));
} else { } else {
this.approval(bill, param); getApprovalList()
} }
}, },
approval: function (bill, param) { executeApproval: function(bill, param) {
let taskId = bill.getGlobalParam('reviewParam').taskId; let taskId = bill.getGlobalParam('reviewParam').taskId;
let comments = bill.getGlobalParam('reviewParam').suggestions ? bill.getGlobalParam('reviewParam').suggestions : ""; let comments = bill.getGlobalParam('reviewParam').suggestions ? bill.getGlobalParam('reviewParam').suggestions : "";
GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=1&comments=' + comments).then( GMS.$http.post('/rbc/workflow/approve/completed/' + taskId + '?result=1&comments=' + comments).then(
......
...@@ -58,6 +58,8 @@ export default { ...@@ -58,6 +58,8 @@ export default {
} else { } else {
GMS.vbus.$emit("resetBillData", data.data.id,state); GMS.vbus.$emit("resetBillData", data.data.id,state);
} }
}else{
GMS.vbus.$Message.info('请返回单据id');
} }
if (data.data && data.data.message) { if (data.data && data.data.message) {
GMS.vbus.$Message.info(data.data.message); GMS.vbus.$Message.info(data.data.message);
......
...@@ -1012,6 +1012,13 @@ export default { ...@@ -1012,6 +1012,13 @@ export default {
"paramDes": [ "paramDes": [
{ {
"isRequired": true, "isRequired": true,
"ref": "columnField",
"type": "field",
"title": "页面名称",
"key": "billName"
},
{
"isRequired": true,
"ref": "bill", "ref": "bill",
"type": "metaData", "type": "metaData",
"title": "跳转页面", "title": "跳转页面",
......
...@@ -8,32 +8,12 @@ export default { ...@@ -8,32 +8,12 @@ export default {
if (context.getTableType) { if (context.getTableType) {
let _tn = context.getTableType(table); let _tn = context.getTableType(table);
let _data = context.getSubData(_tn.title); let _data = context.getSubData(_tn.title);
if (_data instanceof Array) { return _data.length>0
let field = arguments[0][0].FieldCode
let matchProp = arguments[0][1].StaticValue
let matchValue = arguments[0][2].StaticValue
if (matchValue) {
for (const iterator of _data) {
let _val = iterator.getValue(field)
if (_val instanceof Object) {
if (_val[matchProp] == matchValue) {
size++;
}
} else {
if (_val == matchValue) {
size++;
}
}
}
} else {
size = _data.length
}
}
} }
} }
return size return size
}, },
getResultType: function () { getResultType: function () {
return FMR.ConstDataTypes.General; return 1;
} }
} }
\ No newline at end of file
...@@ -8,10 +8,10 @@ export default { ...@@ -8,10 +8,10 @@ export default {
return; return;
} }
const uuid = getUUID(); const uuid = getUUID();
const billState = param.canEdit ? '': 'readOnly' const billState = param.canEdit ? '': 'readOnly';
let templateName = param.billName || param.viewName;
let index = context.selects[0]._index||(context.selects[0]._serialIndex)*1-1; let index = context.selects[0]._index||(context.selects[0]._serialIndex)*1-1;
setQueryTag(context.currentDataQueryConditionSet,index,param.viewName,uuid);//上张下张用 setQueryTag(context.currentDataQueryConditionSet,index,templateName,uuid);//上张下张用
let templateName = param.viewName;
let billId = context.selects[0][param.billId]; let billId = context.selects[0][param.billId];
window.GMS.workflowTaskId = context.selects[0][param.taskId] window.GMS.workflowTaskId = context.selects[0][param.taskId]
if ( if (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment