feat(wms/objection): 新增部门意见全量展示功能

新增针对deptId为3的审批节点,展示所有历史部门审批意见的功能,补充了4号部门的名称映射并调整了任务排序逻辑
This commit is contained in:
王文昊
2026-07-11 10:30:40 +08:00
parent 3c506e8ca6
commit 68d068844b
2 changed files with 30 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ export default {
}
},
getDeptName(deptId) {
const map = { 1: '生产部', 2: '质量部', 3: '销售部' };
const map = { 1: '生产部', 2: '质量部', 3: '销售部(吴部长)', 4: '陈总审批' };
return map[deptId] || '部门' + deptId;
},
parseTime(time, option) {

View File

@@ -86,6 +86,12 @@
<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="opinion-preview-wrapper">
<div class="section-title">
@@ -133,11 +139,12 @@ import ContractInfoSection from "./components/ContractInfoSection.vue";
import FlowOverviewSection from "./components/FlowOverviewSection.vue";
import DeptOpinionForm from "./components/DeptOpinionForm.vue";
import DeptOpinionPreview from "./components/DeptOpinionPreview.vue";
import DepartmentOpinionSection from "./components/DepartmentOpinionSection.vue";
import FileList from "@/components/FileList/index.vue";
export default {
name: "AftermarketOpinion",
components: { DragResizePanel, HeaderControlSection, BasicInfoSection, CoilInfoSection, ContractInfoSection, FlowOverviewSection, DeptOpinionForm, DeptOpinionPreview, FileList },
components: { DragResizePanel, HeaderControlSection, BasicInfoSection, CoilInfoSection, ContractInfoSection, FlowOverviewSection, DeptOpinionForm, DeptOpinionPreview, DepartmentOpinionSection, FileList },
data() {
return {
loading: false,
@@ -157,6 +164,7 @@ export default {
opinionForm: { deptOpinion: '', fillFile: '' },
acceptDetail: {},
dialogCoilList: [],
allTaskList: [],
currentTask: {},
isEditable: false
};
@@ -196,6 +204,7 @@ export default {
this.detailLoading = true;
this.coilLoading = true;
this.dialogCoilList = [];
this.allTaskList = [];
this.acceptDetail = row.acceptInfo || {};
listAcceptCoilRel({ acceptId: row.acceptId, pageNum: 1, pageSize: 999 }).then(r => {
@@ -209,6 +218,11 @@ export default {
fillFile: task.fillFile || ''
};
});
// 吴部长:加载所有部门意见
if (this.queryParams.deptId === 3) {
this.loadAllTasks();
}
},
refreshDetail() {
if (!this.currentTask.acceptId) return;
@@ -230,6 +244,20 @@ export default {
// 只要节点task状态为待处理(0)就可编辑
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() {
this.$modal.confirm('确认取消?已填写的内容将不会保存。').then(() => {
this.currentTask = {};