Commit 90239f08 by Joey

feat(@gms/gms-plugin-billexpand): 同意默认意见,驳回意见必填

parent 6be176d1
......@@ -154,6 +154,14 @@ export default {
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
? bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
: '';
if (!comments) {
comments = '同意'
bill.setGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT, {
taskId,
suggestions: comments
})
}
const fn = () => {
saveBill(bill, param).then(() => {
......
......@@ -9,7 +9,7 @@ export default {
if (!this.isApproverEqulloginer(bill, param)) {
GMS.$hideContainer.$Message.error('单据审批状态已发生变化,请刷新界面')
return
}
}
let curTagId = window.nros.context.getCurrTag();
let oldObj = curTagId && GMS.oldBillDataMap[curTagId]?GMS.oldBillDataMap[curTagId]:GMS.oldBillData;
let flag = compareData(oldObj, bill.getBuillData()) || bill.getGlobalParam("noRunTimeFormula");
......@@ -51,10 +51,22 @@ export default {
}
},
approval: function(bill, param){
if (!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT) || !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId) {
if (
!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT)
|| !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId
) {
GMS.$hideContainer.$Message.error('请配置审批轨迹')
return
}
if (
!bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT)
|| !bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
) {
GMS.$hideContainer.$Message.error('请输入审批意见')
bill.setControlsSate(param["_control_name_"], "enable", true)
return
}
let taskId = bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).taskId;
let comments =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
......
......@@ -52,7 +52,7 @@ export const showSignModal = (bill, param, nodeName) => {
const approvalComment =
bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT)
&& bill.getGlobalParam(BILL_GLOBAL_PARAM.APPROVAL_COMMENT).suggestions
|| ''
|| '同意'
const subDataObj = bill.getSubData(SIGNATURE_TABLE_NAME)
const tableLength = subDataObj.length || 0
const subDataIndex = tableLength - 1
......
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