|
|
@@ -40,7 +40,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
+ import { approveTaskWithVariables } from '@/api/bpm/task';
|
|
|
import storageApi from '@/api/warehouseManagement';
|
|
|
// 流程实例的详情页,可用于审批
|
|
|
export default {
|
|
|
@@ -96,22 +96,20 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
});
|
|
|
},
|
|
|
async _approveTaskWithVariables(status) {
|
|
|
- if (this.taskDefinitionKey == 'Activity_1l4tn01') {
|
|
|
- // 驳回(主管审核)
|
|
|
- if (!status) {
|
|
|
- const data = await storageApi.notProfitLoss({
|
|
|
- id: this.businessId,
|
|
|
- reason: this.form.reason,
|
|
|
- taskId: this.taskId
|
|
|
+ if (!status) {
|
|
|
+ // 报损报溢所有节点驳回后都恢复为可编辑、可重新提交。
|
|
|
+ const data = await storageApi.notProfitLoss({
|
|
|
+ id: this.businessId,
|
|
|
+ reason: this.form.reason,
|
|
|
+ taskId: this.taskId
|
|
|
+ });
|
|
|
+ if (data.data.code != '-1') {
|
|
|
+ this.$emit('handleAudit', {
|
|
|
+ status,
|
|
|
+ title: '驳回'
|
|
|
});
|
|
|
- if (data.data.code != '-1') {
|
|
|
- this.$emit('handleAudit', {
|
|
|
- status,
|
|
|
- title: '驳回'
|
|
|
- });
|
|
|
- }
|
|
|
- return;
|
|
|
}
|
|
|
+ return;
|
|
|
} else if (this.taskDefinitionKey == 'Activity_1ftg2hu') {
|
|
|
// 通过(仓管审核)
|
|
|
if (!!status) {
|
|
|
@@ -147,8 +145,7 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
let variables = {
|
|
|
pass: !!status
|
|
|
};
|
|
|
- let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
|
- API({
|
|
|
+ approveTaskWithVariables({
|
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
|
variables
|