|
@@ -42,16 +42,23 @@
|
|
|
@click="handleAudit(1)"
|
|
@click="handleAudit(1)"
|
|
|
>通过
|
|
>通过
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ icon="el-icon-edit-outline"
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ v-if="taskDefinitionKey === 'productionSupervisorApprove1'"
|
|
|
|
|
+ @click="handleAudit(1, 'zp')"
|
|
|
|
|
+ >指派技术员
|
|
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
icon="el-icon-circle-close"
|
|
icon="el-icon-circle-close"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="handleAudit(0)"
|
|
@click="handleAudit(0)"
|
|
|
- v-if="
|
|
|
|
|
|
|
+ v-if="!
|
|
|
[
|
|
[
|
|
|
- 'productionSupervisorApprove2',
|
|
|
|
|
- 'salesManagerApprove',
|
|
|
|
|
- 'salesmanApprove'
|
|
|
|
|
|
|
+ 'productionSupervisorApprove1',
|
|
|
|
|
+ 'technicianApprove',
|
|
|
].includes(taskDefinitionKey)
|
|
].includes(taskDefinitionKey)
|
|
|
"
|
|
"
|
|
|
>驳回
|
|
>驳回
|
|
@@ -92,7 +99,7 @@
|
|
|
UpdateInformation,
|
|
UpdateInformation,
|
|
|
salesManagerApprove,
|
|
salesManagerApprove,
|
|
|
salesmanApprove
|
|
salesmanApprove
|
|
|
- } from '@/api/bpm/components/saleManage/saleorder';
|
|
|
|
|
|
|
+ } from '@/api/bpm/components/saleManage/quotation';
|
|
|
import { approveTask, delegateTask } from '@/api/bpm/task';
|
|
import { approveTask, delegateTask } from '@/api/bpm/task';
|
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
|
|
|
|
|
@@ -144,21 +151,25 @@
|
|
|
this.$emit('handleBackList');
|
|
this.$emit('handleBackList');
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- async handleAudit(status) {
|
|
|
|
|
|
|
+ async handleAudit(status, type) {
|
|
|
//生产主管审批选择技术员
|
|
//生产主管审批选择技术员
|
|
|
if (this.taskDefinitionKey === 'productionSupervisorApprove1') {
|
|
if (this.taskDefinitionKey === 'productionSupervisorApprove1') {
|
|
|
- if (!this.form.technicianId) {
|
|
|
|
|
|
|
+ if (!this.form.technicianId && type == 'zp') {
|
|
|
this.$message.warning(`请选择技术人员!`);
|
|
this.$message.warning(`请选择技术人员!`);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (type == 'zp') {
|
|
|
|
|
+ await assignTechnician({
|
|
|
|
|
+ businessId: this.businessId,
|
|
|
|
|
+ id: this.taskId,
|
|
|
|
|
+ reason: this.form.reason,
|
|
|
|
|
+ technicianId: this.form.technicianId
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ await this.salesmanApproveHttp(status);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- await assignTechnician({
|
|
|
|
|
- businessId: this.businessId,
|
|
|
|
|
- id: this.taskId,
|
|
|
|
|
- reason: this.form.reason,
|
|
|
|
|
- technicianId: this.form.technicianId
|
|
|
|
|
- });
|
|
|
|
|
- this.$emit('handleAudit', {status});
|
|
|
|
|
|
|
+ this.$emit('handleAudit', { status });
|
|
|
}
|
|
}
|
|
|
//技术员修改
|
|
//技术员修改
|
|
|
if (this.taskDefinitionKey === 'technicianApprove') {
|
|
if (this.taskDefinitionKey === 'technicianApprove') {
|
|
@@ -175,7 +186,7 @@
|
|
|
try {
|
|
try {
|
|
|
await updateTech(arr);
|
|
await updateTech(arr);
|
|
|
await this._approveTask();
|
|
await this._approveTask();
|
|
|
- this.$emit('handleAudit', {status});
|
|
|
|
|
|
|
+ this.$emit('handleAudit', { status });
|
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -187,14 +198,17 @@
|
|
|
reason: this.form.reason,
|
|
reason: this.form.reason,
|
|
|
status
|
|
status
|
|
|
});
|
|
});
|
|
|
- this.$emit('handleAudit', {status,title: status === 0 ? '驳回' : ''});
|
|
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ status,
|
|
|
|
|
+ title: status === 0 ? '驳回' : ''
|
|
|
|
|
+ });
|
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
}
|
|
}
|
|
|
//销售员补充
|
|
//销售员补充
|
|
|
if (this.taskDefinitionKey === 'salesmanApprove') {
|
|
if (this.taskDefinitionKey === 'salesmanApprove') {
|
|
|
if (status === 0) {
|
|
if (status === 0) {
|
|
|
await this.salesmanApproveHttp(status);
|
|
await this.salesmanApproveHttp(status);
|
|
|
- this.$emit('handleAudit',{status,title: '驳回'});
|
|
|
|
|
|
|
+ this.$emit('handleAudit', { status, title: '驳回' });
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.$emit('getTableValue', async (data) => {
|
|
this.$emit('getTableValue', async (data) => {
|
|
@@ -203,7 +217,7 @@
|
|
|
try {
|
|
try {
|
|
|
await UpdateInformation(arr);
|
|
await UpdateInformation(arr);
|
|
|
await this.salesmanApproveHttp(status);
|
|
await this.salesmanApproveHttp(status);
|
|
|
- this.$emit('handleAudit', {status});
|
|
|
|
|
|
|
+ this.$emit('handleAudit', { status });
|
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -217,7 +231,10 @@
|
|
|
reason: this.form.reason,
|
|
reason: this.form.reason,
|
|
|
status
|
|
status
|
|
|
});
|
|
});
|
|
|
- this.$emit('handleAudit', {status,title: status === 0 ? '驳回' : ''});
|
|
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ status,
|
|
|
|
|
+ title: status === 0 ? '驳回' : ''
|
|
|
|
|
+ });
|
|
|
} catch (error) {}
|
|
} catch (error) {}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -236,3 +253,4 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss"></style>
|
|
<style lang="scss"></style>
|
|
|
|
|
+@/api/bpm/components/saleManage/quotation
|