From 552ec6b7d8ccc56c379da195fc6c9c74312b1070 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 22 五月 2026 17:57:46 +0800
Subject: [PATCH] OA部分查询条件变更
---
src/pages/qualityManagement/processInspection/add.vue | 47 +++++++++++++++++++++++++++--------------------
1 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/src/pages/qualityManagement/processInspection/add.vue b/src/pages/qualityManagement/processInspection/add.vue
index 87a3feb..2f6a6d0 100644
--- a/src/pages/qualityManagement/processInspection/add.vue
+++ b/src/pages/qualityManagement/processInspection/add.vue
@@ -51,6 +51,7 @@
</up-form-item>
<up-form-item label="鎸囨爣閫夋嫨"
prop="testStandardId"
+ required
border-bottom>
<up-input v-model="testStandardDisplay"
placeholder="璇烽�夋嫨鎸囨爣"
@@ -184,11 +185,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="showprocessSheet"
:actions="processOptions"
@@ -302,7 +307,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";
@@ -313,8 +318,8 @@
qualityInspectParamInfo,
qualityInspectDetailByProductId,
getQualityTestStandardParamByTestStandardId,
- list,
} from "@/api/qualityManagement/materialInspection.js";
+ import { getProcessList } from "@/api/productionManagement/processManagement.js";
import { userListNoPage } from "@/api/system/user.js";
// 鏄剧ず鎻愮ず淇℃伅
@@ -442,7 +447,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" }],
@@ -454,7 +459,7 @@
// 鏄惁涓虹紪杈戞ā寮�
const isEdit = computed(() => {
- const id = getPageId();
+ const id = optionsId.value;
return !!id;
});
@@ -463,13 +468,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 = () => {
@@ -609,8 +607,8 @@
// 鑾峰彇宸ュ簭鍒楄〃
const getprocessList = () => {
- list().then(res => {
- processList.value = res.data;
+ getProcessList({ size: -1, current: -1 }).then(res => {
+ processList.value = res.data?.records || res.data || [];
});
};
@@ -698,6 +696,10 @@
showToast("璇烽�夋嫨浜у搧");
return;
}
+ if (!form.value.testStandardId) {
+ showToast("璇烽�夋嫨鎸囨爣");
+ return;
+ }
if (!form.value.checkResult) {
showToast("璇烽�夋嫨妫�娴嬬粨鏋�");
return;
@@ -706,7 +708,7 @@
loading.value = true;
form.value.inspectType = 1;
- if (isEdit.value) {
+ if (!isEdit.value) {
tableData.value.forEach(item => {
delete item.id;
});
@@ -737,7 +739,7 @@
// 鍒濆鍖栬〃鍗�
const initForm = async () => {
- const id = getPageId();
+ const id = optionsId.value;
if (id) {
// 缂栬緫妯″紡锛屽姞杞芥暟鎹�
// 鍏堥噸缃〃鍗曟暟鎹�
@@ -890,6 +892,11 @@
onShow(() => {
initForm();
});
+ const optionsId = ref("");
+ onLoad(options => {
+ optionsId.value = options.id || "";
+ initForm();
+ });
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3