From 3a0f25f9d38c08e1b78afedb2f67b7bb73f8c84f Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 01 七月 2026 17:15:45 +0800
Subject: [PATCH] 会议审批列表查不出,会议申请参会人列表查不出问题修改
---
src/pages/qualityManagement/materialInspection/add.vue | 49 ++++++++++++++++++++++++++++++-------------------
1 files changed, 30 insertions(+), 19 deletions(-)
diff --git a/src/pages/qualityManagement/materialInspection/add.vue b/src/pages/qualityManagement/materialInspection/add.vue
index 0309813..e04391f 100644
--- a/src/pages/qualityManagement/materialInspection/add.vue
+++ b/src/pages/qualityManagement/materialInspection/add.vue
@@ -51,6 +51,7 @@
</up-form-item>
<up-form-item label="鎸囨爣閫夋嫨"
prop="testStandardId"
+ required
border-bottom>
<up-input v-model="testStandardDisplay"
placeholder="璇烽�夋嫨鎸囨爣"
@@ -114,9 +115,10 @@
border-bottom>
<up-input v-model="form.checkTime"
placeholder="璇烽�夋嫨妫�娴嬫棩鏈�"
- readonly />
+ readonly
+ @click="showDatePicker" />
<!-- <template #right>
- <up-icon name="calendar"
+ <up-icon name="arrow-right"
@click="showDatePicker"></up-icon>
</template> -->
</up-form-item>
@@ -191,11 +193,15 @@
</up-button>
</view>
<!-- 鏃ユ湡閫夋嫨鍣� -->
- <up-popup v-model:show="showDate"
- mode="date"
- :start-year="2020"
- :end-year="2030"
- @confirm="confirmDate" />
+ <up-popup :show="showDate"
+ mode="bottom"
+ @close="showDate = false">
+ <up-datetime-picker :show="true"
+ v-model="pickerValue"
+ @confirm="confirmDate"
+ @cancel="showDate = false"
+ mode="date" />
+ </up-popup>
<!-- 渚涘簲鍟嗛�夋嫨 -->
<up-action-sheet :show="showSupplierSheet"
:actions="supplierOptions"
@@ -309,7 +315,7 @@
<script setup>
import { ref, computed, onMounted, nextTick } from "vue";
- import { onShow } from "@dcloudio/uni-app";
+ import { onShow, onLoad } from "@dcloudio/uni-app";
import PageHeader from "@/components/PageHeader.vue";
import dayjs from "dayjs";
import { getOptions } from "@/api/procurementManagement/procurementLedger.js";
@@ -337,6 +343,7 @@
const loading = ref(false);
// 鏃ユ湡閫夋嫨鍣�
const showDate = ref(false);
+ const pickerValue = ref(Date.now());
// 渚涘簲鍟嗛�夋嫨
const showSupplierSheet = ref(false);
// 浜у搧閫夋嫨
@@ -448,7 +455,7 @@
{ required: true, message: "璇烽�夋嫨浜у搧鍨嬪彿", trigger: "change" },
],
testStandardId: [
- { required: false, message: "璇烽�夋嫨鎸囨爣", trigger: "change" },
+ { required: true, message: "璇烽�夋嫨鎸囨爣", trigger: "change" },
],
unit: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
quantity: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
@@ -460,7 +467,7 @@
// 鏄惁涓虹紪杈戞ā寮�
const isEdit = computed(() => {
- const id = getPageId();
+ const id = optionsId.value;
return !!id;
});
@@ -469,13 +476,6 @@
const v = form.value || {};
return !!(v.productMainId != null || v.purchaseLedgerId != null);
});
-
- // 鑾峰彇椤甸潰ID
- const getPageId = () => {
- const pages = getCurrentPages();
- const currentPage = pages[pages.length - 1];
- return currentPage.options.id;
- };
// 杩斿洖涓婁竴椤�
const goBack = () => {
@@ -490,6 +490,7 @@
// 纭鏃ユ湡閫夋嫨
const confirmDate = e => {
form.value.checkTime = dayjs(e.value).format("YYYY-MM-DD");
+ showDate.value = false;
};
// 閫夋嫨渚涘簲鍟�
@@ -704,6 +705,10 @@
showToast("璇烽�夋嫨浜у搧");
return;
}
+ if (!form.value.testStandardId) {
+ showToast("璇烽�夋嫨鎸囨爣");
+ return;
+ }
if (!form.value.checkResult) {
showToast("璇烽�夋嫨妫�娴嬬粨鏋�");
return;
@@ -712,7 +717,7 @@
loading.value = true;
form.value.inspectType = 0;
- if (isEdit.value) {
+ if (!isEdit.value) {
tableData.value.forEach(item => {
delete item.id;
});
@@ -743,7 +748,7 @@
// 鍒濆鍖栬〃鍗�
const initForm = async () => {
- const id = getPageId();
+ const id = optionsId.value;
if (id) {
// 缂栬緫妯″紡锛屽姞杞芥暟鎹�
// 鍏堥噸缃〃鍗曟暟鎹�
@@ -896,6 +901,12 @@
onShow(() => {
initForm();
});
+
+ const optionsId = ref("");
+ onLoad(options => {
+ optionsId.value = options.id || "";
+ initForm();
+ });
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3