From 70e08980b2fcf49dc0505984cc310ce9850c761b Mon Sep 17 00:00:00 2001 From: zhang_12370 <z2864490065@outlook.com> Date: 星期四, 10 七月 2025 18:16:16 +0800 Subject: [PATCH] 首页模块 销售数据 月度对比 --- src/views/inspectionManagement/components/formDia.vue | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/views/inspectionManagement/components/formDia.vue b/src/views/inspectionManagement/components/formDia.vue index 91e9c5c..a492bfc 100644 --- a/src/views/inspectionManagement/components/formDia.vue +++ b/src/views/inspectionManagement/components/formDia.vue @@ -57,7 +57,7 @@ <el-option label="鍛ㄥ叚" value="SAT"/> <el-option label="鍛ㄦ棩" value="SUN"/> </el-select> - <el-time-picker v-model="form.frequencyDetail" placeholder="閫夋嫨鏃堕棿" format="HH:mm" + <el-time-picker v-model="form.time" placeholder="閫夋嫨鏃堕棿" format="HH:mm" value-format="HH:mm" style="width: 50%"/> </el-form-item> </el-col> @@ -98,7 +98,7 @@ </template> <script setup> -import {reactive, ref, computed} from "vue"; +import {reactive, ref} from "vue"; import useUserStore from '@/store/modules/user' import {addOrEditTimingTask} from "@/api/inspectionManagement/index.js"; import {userListAll} from "@/api/publicApi/index.js"; @@ -135,6 +135,7 @@ }) if (type === 'edit') { form.value = {...row} + form.value.inspector = form.value.inspectorIds.split(',').map(Number) } } @@ -144,26 +145,19 @@ dialogVisitable.value = false emit('closeDia') } -const selectedDateTime = ref(null) -// 璁$畻鏄熸湡鍑� -const dayOfWeek = computed(() => { - if (!selectedDateTime.value) return '' - - const date = new Date(selectedDateTime.value) - const dayIndex = date.getDay() - - const weekDays = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�'] - return weekDays[dayIndex] -}) // 鎻愪氦鍚堝苟琛ㄥ崟 const submitForm = () => { - proxy.$refs["formRef"].validate(valid => { + proxy.$refs["formRef"].validate(async valid => { if (valid) { form.value.inspectorIds = form.value.inspector.join(',') if (form.value.frequencyType === 'WEEKLY') { - form.value.frequencyDetail = form.value.week + ',' + form.value.frequencyDetail + let frequencyDetail = '' + frequencyDetail = form.value.week + ',' + form.value.time + form.value.frequencyDetail = frequencyDetail } + let res = await userStore.getInfo() + form.value.registrantId = res.user.userId addOrEditTimingTask(form.value).then(() => { cancel() proxy.$modal.msgSuccess('鎻愪氦鎴愬姛') -- Gitblit v1.9.3