From fcef237a3a7bcfc04a1bb5ae0d9cfc79b5c79c93 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 29 八月 2026 15:10:01 +0800
Subject: [PATCH] 天津_建诚恒商贸 1.备件管理-新增独立备件出库功能入口,支持直接完成备件领用出库操作。 2.设备保养-支持按日期分组折叠展示,分组条目可展开查看明细;单条明细行末尾增加【保养完成】操作按钮,可单独办结单条保养任务;折叠汇总状态下,新增【一键保养完成】批量操作按钮,快速办结当前分组全部保养项。 3.设备巡检-按日期分组折叠展示,分组支持展开查看明细;每条巡检明细后增设【巡检完成】按钮,支持单独办结单条巡检记录;分组折叠未展开状态下,提供【一键巡检完成】批量操作,统一办结该分组下所有巡检任务。 4.增值税对比-优化数据展示逻辑,列表展示各订单增值税明细;页面右侧新增柱状可视化图表,直观对比进销项增值税数据。 5.管理驾驶舱-指标修改:将顶部「销售产品数」调整为「销售订单数」;时间筛选:页面左上角新增日期范围下拉筛选控件,所有统计指标标注当前筛选时段;
---
src/views/customerService/afterSalesHandling/components/formDia.vue | 45 ++++++++++++++++++++++++---------------------
1 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/src/views/customerService/afterSalesHandling/components/formDia.vue b/src/views/customerService/afterSalesHandling/components/formDia.vue
index cfdb01c..4b2964b 100644
--- a/src/views/customerService/afterSalesHandling/components/formDia.vue
+++ b/src/views/customerService/afterSalesHandling/components/formDia.vue
@@ -10,7 +10,7 @@
:model="form"
label-width="140px"
label-position="top"
- :rules="rules"
+ :rules="operationType === 'view' ? {} : rules"
ref="formRef"
>
<el-row :gutter="30">
@@ -63,7 +63,7 @@
v-model="form.proDesc"
placeholder="璇疯緭鍏�"
clearable
- disabled
+ :disabled="operationType === 'view'"
type="textarea"
/>
</el-form-item>
@@ -118,8 +118,9 @@
</el-row>
<template #footer>
<div class="dialog-footer">
- <el-button type="primary" @click="submitForm">纭</el-button>
- <el-button @click="closeDia">鍙栨秷</el-button>
+ <el-button v-if="operationType === 'approve'" type="primary" @click="submitForm">纭</el-button>
+ <el-button v-if="operationType === 'approve'" @click="closeDia">鍙栨秷</el-button>
+ <el-button v-else type="primary" @click="closeDia">鍏抽棴</el-button>
</div>
</template>
</el-dialog>
@@ -131,6 +132,7 @@
import useUserStore from "@/store/modules/user.js";
import {userListNoPageByTenantId} from "@/api/system/user.js";
import {afterSalesServiceAdd, afterSalesServiceDispose, afterSalesServiceUpdate} from "@/api/customerService/index.js";
+import { getCurrentDate } from "@/utils/index.js";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
const dialogFormVisible = ref(false);
@@ -168,8 +170,14 @@
userList.value = res.data;
});
form.value = {...row}
- form.value.disposeUserId = userStore.id;
- form.value.disDate = getCurrentDate();
+ if (type === 'approve') {
+ if (!form.value.disposeUserId) {
+ form.value.disposeUserId = userStore.id;
+ }
+ if (!form.value.disDate) {
+ form.value.disDate = getCurrentDate();
+ }
+ }
}
// const setName = (code) => {
// const index = userList.value.findIndex(item => item.deviceModel === code);
@@ -179,13 +187,16 @@
// }
// }
const submitForm = () => {
+ if (operationType.value === 'view') {
+ closeDia();
+ return;
+ }
proxy.$refs["formRef"].validate(valid => {
- if (valid) {
- afterSalesServiceDispose(form.value).then(response => {
- proxy.$modal.msgSuccess("鏂板鎴愬姛")
- closeDia()
- })
- }
+ if (!valid) return;
+ afterSalesServiceDispose(form.value).then(() => {
+ proxy.$modal.msgSuccess("澶勭悊鎴愬姛")
+ closeDia()
+ })
})
}
// 鍏抽棴寮规
@@ -194,14 +205,6 @@
dialogFormVisible.value = false;
emit('close')
};
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
- const day = String(today.getDate()).padStart(2, "0");
- return `${year}-${month}-${day}`;
-}
defineExpose({
openDialog,
});
@@ -209,4 +212,4 @@
<style scoped>
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3