|
|
@@ -90,7 +90,8 @@
|
|
|
updateTech,
|
|
|
productionSupervisorReApprove,
|
|
|
UpdateInformation,
|
|
|
- salesManagerApprove
|
|
|
+ salesManagerApprove,
|
|
|
+ salesmanApprove
|
|
|
} from '@/api/bpm/components/saleManage/saleorder';
|
|
|
import { approveTask, delegateTask } from '@/api/bpm/task';
|
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
|
@@ -157,6 +158,7 @@
|
|
|
reason: this.form.reason,
|
|
|
technicianId: this.form.technicianId
|
|
|
});
|
|
|
+ this.$emit('handleAudit', {status});
|
|
|
}
|
|
|
//技术员修改
|
|
|
if (this.taskDefinitionKey === 'technicianApprove') {
|
|
|
@@ -173,7 +175,7 @@
|
|
|
try {
|
|
|
await updateTech(arr);
|
|
|
await this._approveTask();
|
|
|
- this.$emit('handleAudit', status);
|
|
|
+ this.$emit('handleAudit', {status});
|
|
|
} catch (error) {}
|
|
|
});
|
|
|
}
|
|
|
@@ -185,19 +187,23 @@
|
|
|
reason: this.form.reason,
|
|
|
status
|
|
|
});
|
|
|
- this.$emit('handleAudit', status,status===0?'驳回':"");
|
|
|
+ this.$emit('handleAudit', {status,title: status === 0 ? '驳回' : ''});
|
|
|
} catch (error) {}
|
|
|
}
|
|
|
//销售员补充
|
|
|
if (this.taskDefinitionKey === 'salesmanApprove') {
|
|
|
+ if (status === 0) {
|
|
|
+ await this.salesmanApproveHttp(status);
|
|
|
+ this.$emit('handleAudit',{status,title: '驳回'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.$emit('getTableValue', async (data) => {
|
|
|
let arr = await data;
|
|
|
-
|
|
|
if (arr) {
|
|
|
try {
|
|
|
await UpdateInformation(arr);
|
|
|
- await this._approveTask();
|
|
|
- this.$emit('handleAudit', status,status===0?'驳回':"");
|
|
|
+ await this.salesmanApproveHttp(status);
|
|
|
+ this.$emit('handleAudit', {status});
|
|
|
} catch (error) {}
|
|
|
}
|
|
|
});
|
|
|
@@ -211,12 +217,19 @@
|
|
|
reason: this.form.reason,
|
|
|
status
|
|
|
});
|
|
|
- this.$emit('handleAudit', status, status===0?'驳回':"");
|
|
|
+ this.$emit('handleAudit', {status,title: status === 0 ? '驳回' : ''});
|
|
|
} catch (error) {}
|
|
|
}
|
|
|
},
|
|
|
- async _approveTask() {
|
|
|
- await approveTask({ id: this.taskId, reason: this.form.reason });
|
|
|
+ salesmanApproveHttp(status) {
|
|
|
+ return salesmanApprove({
|
|
|
+ id: this.taskId,
|
|
|
+ reason: this.form.reason,
|
|
|
+ status
|
|
|
+ });
|
|
|
+ },
|
|
|
+ _approveTask() {
|
|
|
+ return approveTask({ id: this.taskId, reason: this.form.reason });
|
|
|
}
|
|
|
}
|
|
|
};
|