From dd043652e2fb0e5613a39d09292fa32c7b789b30 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 16 五月 2026 13:58:38 +0800
Subject: [PATCH] 过程检功能修改,修改三种检验修改时delete item.id限制
---
src/pages/qualityManagement/processInspection/add.vue | 52 +++++++++++++++++++++++++++-------------------------
1 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/src/pages/qualityManagement/processInspection/add.vue b/src/pages/qualityManagement/processInspection/add.vue
index 87a3feb..9b362fb 100644
--- a/src/pages/qualityManagement/processInspection/add.vue
+++ b/src/pages/qualityManagement/processInspection/add.vue
@@ -115,10 +115,10 @@
<up-input v-model="form.checkTime"
placeholder="璇烽�夋嫨妫�娴嬫棩鏈�"
readonly />
- <!-- <template #right>
+ <template #right>
<up-icon name="calendar"
@click="showDatePicker"></up-icon>
- </template> -->
+ </template>
</up-form-item>
<!-- 妫�楠岄」鐩� -->
<view class="inspection-items-container">
@@ -184,11 +184,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 +306,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 +317,8 @@
qualityInspectParamInfo,
qualityInspectDetailByProductId,
getQualityTestStandardParamByTestStandardId,
- list,
} from "@/api/qualityManagement/materialInspection.js";
+ import { getProcessList } from "@/api/productionManagement/processManagement.js";
import { userListNoPage } from "@/api/system/user.js";
// 鏄剧ず鎻愮ず淇℃伅
@@ -454,7 +458,7 @@
// 鏄惁涓虹紪杈戞ā寮�
const isEdit = computed(() => {
- const id = getPageId();
+ const id = optionsId.value;
return !!id;
});
@@ -463,13 +467,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 +606,8 @@
// 鑾峰彇宸ュ簭鍒楄〃
const getprocessList = () => {
- list().then(res => {
- processList.value = res.data;
+ getProcessList({ size: -1, current: -1 }).then(res => {
+ processList.value = res.data?.records || res.data || [];
});
};
@@ -706,11 +703,11 @@
loading.value = true;
form.value.inspectType = 1;
- if (isEdit.value) {
- tableData.value.forEach(item => {
- delete item.id;
- });
- }
+ // if (!isEdit.value) {
+ tableData.value.forEach(item => {
+ delete item.id;
+ });
+ // }
const data = { ...form.value, qualityInspectParams: tableData.value };
data.quantity = Number(data.quantity);
@@ -737,7 +734,7 @@
// 鍒濆鍖栬〃鍗�
const initForm = async () => {
- const id = getPageId();
+ const id = optionsId.value;
if (id) {
// 缂栬緫妯″紡锛屽姞杞芥暟鎹�
// 鍏堥噸缃〃鍗曟暟鎹�
@@ -890,6 +887,11 @@
onShow(() => {
initForm();
});
+ const optionsId = ref("");
+ onLoad(options => {
+ optionsId.value = options.id || "";
+ initForm();
+ });
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3