|
@@ -34,6 +34,14 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<l-textarea v-model="remark" :placeholder="`输入${typeText}备注`" title="备注:" /> |
|
|
<l-textarea v-model="remark" :placeholder="`输入${typeText}备注`" title="备注:" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 弹层 --> |
|
|
|
|
|
<l-modal v-model="modal" @close="reviewer = ''" title="指派审核人"> |
|
|
|
|
|
<l-checkbox-picker @input="(e)=>{reviewer = e}" :value="reviewer" :readonly="false" :range="reviewerList" |
|
|
|
|
|
required title="审核人" /> |
|
|
|
|
|
<l-button @click="userAssign" color="blue" class="block" block>确定指派</l-button> |
|
|
|
|
|
<l-button @click="()=>{modal = false;reviewer = ''}" line="blue" class="block margin-top-sm" block>取消</l-button> |
|
|
|
|
|
</l-modal> |
|
|
|
|
|
|
|
|
<view class="padding margin-top bg-white"> |
|
|
<view class="padding margin-top bg-white"> |
|
|
<l-button @click="submit" class="block" size="lg" color="green" block>提交流程{{ typeText }}</l-button> |
|
|
<l-button @click="submit" class="block" size="lg" color="green" block>提交流程{{ typeText }}</l-button> |
|
@@ -56,7 +64,13 @@ export default { |
|
|
staff: '', |
|
|
staff: '', |
|
|
remark: '', |
|
|
remark: '', |
|
|
taskParam: {}, |
|
|
taskParam: {}, |
|
|
canvas: true |
|
|
|
|
|
|
|
|
canvas: true, |
|
|
|
|
|
|
|
|
|
|
|
modal: false, |
|
|
|
|
|
reviewer: [], |
|
|
|
|
|
reviewerList: [], |
|
|
|
|
|
reviewerListId:'', |
|
|
|
|
|
submitPostData:null, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -86,6 +100,37 @@ export default { |
|
|
context.setLineJoin('round') |
|
|
context.setLineJoin('round') |
|
|
touchs = [] |
|
|
touchs = [] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 指派审核人 |
|
|
|
|
|
async userAssign() { |
|
|
|
|
|
if(!this.reviewer.length){ |
|
|
|
|
|
this.modal = false |
|
|
|
|
|
this.TOAST('请选择审核人') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
let postData = this.taskParam.formreq |
|
|
|
|
|
const res = await this.HTTP_POST('learun/adms/newwf/instance', postData, `指派审核人时发生错误`) |
|
|
|
|
|
if(!res){ |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.submitPostData.auditors = {} |
|
|
|
|
|
this.submitPostData.auditors[this.reviewerListId] = this.reviewer |
|
|
|
|
|
const success = await this.HTTP_POST( |
|
|
|
|
|
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', |
|
|
|
|
|
this.submitPostData, |
|
|
|
|
|
`提交[${this.typeText}]时发生错误` |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if (!success) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.EMIT('task-list-change') |
|
|
|
|
|
this.NAV_BACK(2) |
|
|
|
|
|
this.TOAST(`已成功提交${this.typeText}`, 'success') |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 点击「提交」按钮 |
|
|
// 点击「提交」按钮 |
|
|
async submit() { |
|
|
async submit() { |
|
@@ -155,6 +200,37 @@ export default { |
|
|
// #endif |
|
|
// #endif |
|
|
// #endif |
|
|
// #endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 是否需要指派审核人 |
|
|
|
|
|
let isNext = this.taskParam.currentNode.isNext |
|
|
|
|
|
if (this.taskParam.next == '2') { |
|
|
|
|
|
isNext = '1'; |
|
|
|
|
|
} |
|
|
|
|
|
if (isNext == '1') { |
|
|
|
|
|
let params = { |
|
|
|
|
|
code: this.taskParam.schemeCode, |
|
|
|
|
|
processId: this.taskParam.processId, |
|
|
|
|
|
taskId: this.taskParam.taskId, |
|
|
|
|
|
nodeId: this.taskParam.currentNode.id, |
|
|
|
|
|
operationCode: this.taskParam.code, |
|
|
|
|
|
} |
|
|
|
|
|
const userList = await this.HTTP_GET('learun/adms/newwf/auditer', params, `获取审核人时发生错误`) |
|
|
|
|
|
if (!userList) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let arr = Object.entries(userList) |
|
|
|
|
|
this.reviewerListId = arr[0][0] |
|
|
|
|
|
this.reviewerList = arr[0][1].map(item => { |
|
|
|
|
|
return { |
|
|
|
|
|
text: item.Name, |
|
|
|
|
|
value: item.Id |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.submitPostData = postData |
|
|
|
|
|
this.modal = true |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const success = await this.HTTP_POST( |
|
|
const success = await this.HTTP_POST( |
|
|
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', |
|
|
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', |
|
|