diff --git a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ProjectOrderStatusEnum.java b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ProjectOrderStatusEnum.java index 2bb4c8e6..8109eb95 100644 --- a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ProjectOrderStatusEnum.java +++ b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ProjectOrderStatusEnum.java @@ -11,6 +11,7 @@ import lombok.Getter; public enum ProjectOrderStatusEnum { REPULSE(3, "已打回"), SAVE(4, "已保存"), + ALTER(8, "发起变更"), SUBMIT_AUDIT(8, "已送审"), AUDIT(16, "已审核"), APPROVE(32, "已启动"), diff --git a/mes-ui/mes-ui-admin-vue3/src/locales/en.ts b/mes-ui/mes-ui-admin-vue3/src/locales/en.ts index 72cad6b5..fe33c512 100644 --- a/mes-ui/mes-ui-admin-vue3/src/locales/en.ts +++ b/mes-ui/mes-ui-admin-vue3/src/locales/en.ts @@ -301,6 +301,7 @@ export default { approve: 'Approve', terminate: 'Terminate', detailArchive: 'Detail', + alter: 'Alter', typeCreate: 'Dict Type Create', typeUpdate: 'Dict Type Eidt', dataCreate: 'Dict Data Create', diff --git a/mes-ui/mes-ui-admin-vue3/src/locales/zh-CN.ts b/mes-ui/mes-ui-admin-vue3/src/locales/zh-CN.ts index aef93cd5..c439d10d 100644 --- a/mes-ui/mes-ui-admin-vue3/src/locales/zh-CN.ts +++ b/mes-ui/mes-ui-admin-vue3/src/locales/zh-CN.ts @@ -302,6 +302,7 @@ export default { approve: '批准', terminate: '终止', detailArchive: '详情', + alter: '变更', typeCreate: '字典类型新增', typeUpdate: '字典类型编辑', dataCreate: '字典数据新增', diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/archive.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/archive.vue index ac43d702..ab51e611 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/archive.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/archive.vue @@ -212,6 +212,7 @@ defineOptions({ name: 'ProjectOrderArchive' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const router = useRouter(); +const { query } = useRoute() const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 @@ -248,7 +249,7 @@ const queryParams = reactive({ businessManName: undefined, isSnapshot: 1, snapshotId: undefined, - snapshotCode: undefined, + snapshotCode: query.code, orderTime: [], snapshotOrderTime: [], }) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue index 6bd4b93c..b07bca65 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/detail.vue @@ -7,7 +7,7 @@ -
+
已发货
@@ -27,9 +27,9 @@ >距交货还有{{ betweenDay(new Date(), new Date(formData.projectEndTime)) + 1 }}天
- -
+ + + @@ -142,7 +150,7 @@ - {{ formatDate(formData.orderTime, 'YYYY-MM-DD') }} + {{ query.active != 'detailArchive' ? formatDate(formData.orderTime, 'YYYY-MM-DD') : formatDate(formData.snapshotOrderTime, 'YYYY-MM-DD')}} @@ -454,7 +462,7 @@ - + 新增 @@ -1048,9 +1056,13 @@ const submitForm = async (active) => { if (active != 'REPULSE') { formData.value.activeOpinion = '' } + // 如变更 置为已变更 + if (active == 'ALTER') { + formData.value.hasAlter = 1; + } const data = formData.value as unknown as ProjectOrderApi.ProjectOrderVO - if (active == 'SUBMIT_AUDIT') { + if ('SUBMIT_AUDIT,ALTER'.indexOf(active) > -1) { // 子项目信息不能为空 if (!data.projectOrderSubs || data.projectOrderSubs.length == 0) { message.error('子项目信息不能为空') @@ -1058,7 +1070,7 @@ const submitForm = async (active) => { } } - if ((active == 'SAVE' || active == 'SUBMIT_AUDIT') && !formData.value.hasAlter) { + if ((active == 'SAVE' || active == 'SUBMIT_AUDIT') && active != 'ALTER') { // 不能提交存在数量为0的数据 if (data.projectOrderSubs && data.projectOrderSubs.length > 0) { if (data.projectOrderSubs.some((sub) => !sub.amount || sub.amount <= 0)) { @@ -1068,11 +1080,12 @@ const submitForm = async (active) => { } } + // 变更 if (active == 'ALTER') { // 总数量不能为0 if (data.projectOrderSubs && data.projectOrderSubs.length > 0) { const total = data.projectOrderSubs.reduce((acc, cur) => { - return acc + cur + return acc + cur.amount }, 0) if (total <= 0) { message.error('子项目数量和不能为0') @@ -1081,7 +1094,7 @@ const submitForm = async (active) => { } } - // 附件校验 + // 附件校验 if('SUBMIT_AUDIT,ALTER'.indexOf(active) > -1){ if(formData.value.hasContract){ const hasContractFile = formData.value.attachments.some((file) => { diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/index.vue index 3761a9ba..0adc186b 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/projectorder/index.vue @@ -196,7 +196,7 @@ > 编辑 - + 更多 @@ -207,7 +207,7 @@ 查看详情 打印开发项目启动单 订单变更 - 查看变更日志 + 查看归档日志 去发货 @@ -343,7 +343,7 @@ const handleExport = async () => { } } -const handleCommand = async (command, id) => { +const handleCommand = async (command, id, code) => { switch (command){ case 'detail': openDetail('detail', id); @@ -354,8 +354,13 @@ const handleCommand = async (command, id) => { case 'alter': openDetail('alter', id); break; - case 'viewAlter': - // TODO + case 'viewArchive': + router.push({ + name: 'ProjectOrderArchive', + query: { + code: code + } + }) break; case 'delivery': // TODO