From 3eaa7e28218b227bda647f2da21e6d9317832eef Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 15 九月 2025 15:08:15 +0800
Subject: [PATCH] 库存预警修改
---
src/views/inspectionManagement/components/formDia.vue | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/src/views/inspectionManagement/components/formDia.vue b/src/views/inspectionManagement/components/formDia.vue
index 91e9c5c..9d9a9fd 100644
--- a/src/views/inspectionManagement/components/formDia.vue
+++ b/src/views/inspectionManagement/components/formDia.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <el-dialog :title="operationType === 'add' ? '鏂板宸℃浠诲姟' : '缂栬緫閿�鍞嚭搴�'"
+ <el-dialog :title="operationType === 'add' ? '鏂板宸℃浠诲姟' : '缂栬緫宸℃浠诲姟'"
v-model="dialogVisitable" width="800px" @close="cancel">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row>
@@ -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,20 @@
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(',')
+ delete form.value.inspector
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