feat(wms/objection): 新增部门意见全量展示功能
新增针对deptId为3的审批节点,展示所有历史部门审批意见的功能,补充了4号部门的名称映射并调整了任务排序逻辑
This commit is contained in:
@@ -66,7 +66,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDeptName(deptId) {
|
getDeptName(deptId) {
|
||||||
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
|
const map = { 1: '生产部', 2: '质量部', 3: '销售部(吴部长)', 4: '陈总审批' };
|
||||||
return map[deptId] || '部门' + deptId;
|
return map[deptId] || '部门' + deptId;
|
||||||
},
|
},
|
||||||
parseTime(time, option) {
|
parseTime(time, option) {
|
||||||
|
|||||||
@@ -86,6 +86,12 @@
|
|||||||
|
|
||||||
<CoilInfoSection :coilList="dialogCoilList" :loading="coilLoading" :editable="false" />
|
<CoilInfoSection :coilList="dialogCoilList" :loading="coilLoading" :editable="false" />
|
||||||
|
|
||||||
|
<!-- 吴部长:展示前面所有部门意见 -->
|
||||||
|
<div v-if="queryParams.deptId === 3 && allTaskList.length > 0" class="section-gap" />
|
||||||
|
<div v-if="queryParams.deptId === 3 && allTaskList.length > 0">
|
||||||
|
<DepartmentOpinionSection :taskList="allTaskList" @refresh="loadAllTasks" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="currentTask.taskStatus === 1 && opinionForm.deptOpinion" class="section-gap" />
|
<div v-if="currentTask.taskStatus === 1 && opinionForm.deptOpinion" class="section-gap" />
|
||||||
<div v-if="currentTask.taskStatus === 1 && opinionForm.deptOpinion" class="opinion-preview-wrapper">
|
<div v-if="currentTask.taskStatus === 1 && opinionForm.deptOpinion" class="opinion-preview-wrapper">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
@@ -133,11 +139,12 @@ import ContractInfoSection from "./components/ContractInfoSection.vue";
|
|||||||
import FlowOverviewSection from "./components/FlowOverviewSection.vue";
|
import FlowOverviewSection from "./components/FlowOverviewSection.vue";
|
||||||
import DeptOpinionForm from "./components/DeptOpinionForm.vue";
|
import DeptOpinionForm from "./components/DeptOpinionForm.vue";
|
||||||
import DeptOpinionPreview from "./components/DeptOpinionPreview.vue";
|
import DeptOpinionPreview from "./components/DeptOpinionPreview.vue";
|
||||||
|
import DepartmentOpinionSection from "./components/DepartmentOpinionSection.vue";
|
||||||
import FileList from "@/components/FileList/index.vue";
|
import FileList from "@/components/FileList/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AftermarketOpinion",
|
name: "AftermarketOpinion",
|
||||||
components: { DragResizePanel, HeaderControlSection, BasicInfoSection, CoilInfoSection, ContractInfoSection, FlowOverviewSection, DeptOpinionForm, DeptOpinionPreview, FileList },
|
components: { DragResizePanel, HeaderControlSection, BasicInfoSection, CoilInfoSection, ContractInfoSection, FlowOverviewSection, DeptOpinionForm, DeptOpinionPreview, DepartmentOpinionSection, FileList },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -157,6 +164,7 @@ export default {
|
|||||||
opinionForm: { deptOpinion: '', fillFile: '' },
|
opinionForm: { deptOpinion: '', fillFile: '' },
|
||||||
acceptDetail: {},
|
acceptDetail: {},
|
||||||
dialogCoilList: [],
|
dialogCoilList: [],
|
||||||
|
allTaskList: [],
|
||||||
currentTask: {},
|
currentTask: {},
|
||||||
isEditable: false
|
isEditable: false
|
||||||
};
|
};
|
||||||
@@ -196,6 +204,7 @@ export default {
|
|||||||
this.detailLoading = true;
|
this.detailLoading = true;
|
||||||
this.coilLoading = true;
|
this.coilLoading = true;
|
||||||
this.dialogCoilList = [];
|
this.dialogCoilList = [];
|
||||||
|
this.allTaskList = [];
|
||||||
this.acceptDetail = row.acceptInfo || {};
|
this.acceptDetail = row.acceptInfo || {};
|
||||||
|
|
||||||
listAcceptCoilRel({ acceptId: row.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
listAcceptCoilRel({ acceptId: row.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
|
||||||
@@ -209,6 +218,11 @@ export default {
|
|||||||
fillFile: task.fillFile || ''
|
fillFile: task.fillFile || ''
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 吴部长:加载所有部门意见
|
||||||
|
if (this.queryParams.deptId === 3) {
|
||||||
|
this.loadAllTasks();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
refreshDetail() {
|
refreshDetail() {
|
||||||
if (!this.currentTask.acceptId) return;
|
if (!this.currentTask.acceptId) return;
|
||||||
@@ -230,6 +244,20 @@ export default {
|
|||||||
// 只要节点task状态为待处理(0)就可编辑
|
// 只要节点task状态为待处理(0)就可编辑
|
||||||
return status >= 1 && status <= 3;
|
return status >= 1 && status <= 3;
|
||||||
},
|
},
|
||||||
|
loadAllTasks() {
|
||||||
|
if (!this.currentTask.acceptId) return;
|
||||||
|
listComplaintTask({
|
||||||
|
acceptId: this.currentTask.acceptId,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 999
|
||||||
|
}).then(r => {
|
||||||
|
const tasks = r.rows || [];
|
||||||
|
// 按 deptId 排序: 质量部(2)→生产部(1)→陈总(4)
|
||||||
|
const order = { 2: 1, 1: 2, 4: 3 };
|
||||||
|
tasks.sort((a, b) => (order[a.deptId] || 99) - (order[b.deptId] || 99));
|
||||||
|
this.allTaskList = tasks;
|
||||||
|
});
|
||||||
|
},
|
||||||
confirmCancel() {
|
confirmCancel() {
|
||||||
this.$modal.confirm('确认取消?已填写的内容将不会保存。').then(() => {
|
this.$modal.confirm('确认取消?已填写的内容将不会保存。').then(() => {
|
||||||
this.currentTask = {};
|
this.currentTask = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user