From 9ce7f98f047f0f54fa93d69a2e3d8892d44c58dc Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 16 五月 2026 13:36:28 +0800
Subject: [PATCH] 原材料检验问题修改
---
src/pages/qualityManagement/materialInspection/add.vue | 27 +++++++++++++++++----------
src/pages/qualityManagement/materialInspection/detail.vue | 3 ++-
src/pages/qualityManagement/materialInspection/index.vue | 19 ++++++++++---------
3 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/src/pages/qualityManagement/materialInspection/add.vue b/src/pages/qualityManagement/materialInspection/add.vue
index 63a94ef..6455c36 100644
--- a/src/pages/qualityManagement/materialInspection/add.vue
+++ b/src/pages/qualityManagement/materialInspection/add.vue
@@ -114,11 +114,12 @@
border-bottom>
<up-input v-model="form.checkTime"
placeholder="璇烽�夋嫨妫�娴嬫棩鏈�"
- readonly />
- <!-- <template #right>
- <up-icon name="calendar"
+ readonly
+ @click="showDatePicker" />
+ <template #right>
+ <up-icon name="arrow-right"
@click="showDatePicker"></up-icon>
- </template> -->
+ </template>
</up-form-item>
<!-- <up-form-item label="閲囪喘璁㈠崟鍙�"
prop="purchaseContractNo"
@@ -191,11 +192,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"
@@ -337,6 +342,7 @@
const loading = ref(false);
// 鏃ユ湡閫夋嫨鍣�
const showDate = ref(false);
+ const pickerValue = ref(Date.now());
// 渚涘簲鍟嗛�夋嫨
const showSupplierSheet = ref(false);
// 浜у搧閫夋嫨
@@ -483,6 +489,7 @@
// 纭鏃ユ湡閫夋嫨
const confirmDate = e => {
form.value.checkTime = dayjs(e.value).format("YYYY-MM-DD");
+ showDate.value = false;
};
// 閫夋嫨渚涘簲鍟�
@@ -705,7 +712,7 @@
loading.value = true;
form.value.inspectType = 0;
- if (isEdit.value) {
+ if (!isEdit.value) {
tableData.value.forEach(item => {
delete item.id;
});
diff --git a/src/pages/qualityManagement/materialInspection/detail.vue b/src/pages/qualityManagement/materialInspection/detail.vue
index e45b9c0..12ff7a3 100644
--- a/src/pages/qualityManagement/materialInspection/detail.vue
+++ b/src/pages/qualityManagement/materialInspection/detail.vue
@@ -15,7 +15,8 @@
</view>
<text class="header-title">{{ detailData.productName || '-' }}</text>
<view class="status-tags">
- <u-tag :type="getTagType(detailData.checkResult)"
+ <u-tag v-if="detailData.checkResult"
+ :type="getTagType(detailData.checkResult)"
size="small"
class="status-tag">
{{ detailData.checkResult || '-' }}
diff --git a/src/pages/qualityManagement/materialInspection/index.vue b/src/pages/qualityManagement/materialInspection/index.vue
index 83ab257..eb4a140 100644
--- a/src/pages/qualityManagement/materialInspection/index.vue
+++ b/src/pages/qualityManagement/materialInspection/index.vue
@@ -76,7 +76,8 @@
</view>
</view>
<view class="status-tags">
- <u-tag :type="getTagType(item.checkResult)"
+ <u-tag v-if="item.checkResult"
+ :type="getTagType(item.checkResult)"
size="mini"
class="status-tag">
{{ item.checkResult }}
@@ -117,29 +118,29 @@
</view>
<!-- 鎿嶄綔鎸夐挳 -->
<view class="action-buttons">
- <!-- <u-button type="primary"
+ <u-button type="primary"
size="small"
class="action-btn"
:disabled="item.inspectState"
@click.stop="startInspection(item)">
缂栬緫
- </u-button> -->
+ </u-button>
<u-button type="info"
size="small"
class="action-btn"
@click.stop="viewDetail(item)">
璇︽儏
</u-button>
- <!-- <u-button type="success"
+ <u-button type="success"
size="small"
class="action-btn"
:disabled="item.inspectState"
@click.stop="submitInspection(item)">
鎻愪氦
- </u-button> -->
+ </u-button>
</view>
<view class="action-buttons">
- <!-- <u-button type="info"
+ <u-button type="info"
size="small"
class="action-btn"
@click.stop="viewFileList(item)">
@@ -151,7 +152,7 @@
:disabled="item.inspectState || item.checkName !== ''"
@click.stop="assignInspector(item)">
鍒嗛厤妫�楠屽憳
- </u-button> -->
+ </u-button>
</view>
</view>
</view>
@@ -163,12 +164,12 @@
</view>
<!-- 鍒嗛〉缁勪欢 -->
<!-- 娴姩鏂板鎸夐挳 -->
- <!-- <view class="fab-button"
+ <view class="fab-button"
@click="addInspection">
<up-icon name="plus"
size="24"
color="#ffffff"></up-icon>
- </view> -->
+ </view>
<!-- 鏃ユ湡閫夋嫨鍣� -->
<up-popup v-model:show="showDate"
mode="date"
--
Gitblit v1.9.3