From 7bdc84b5844d2a481e2f17cdd2c8204fd4a403ee Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 29 九月 2025 16:48:31 +0800
Subject: [PATCH] 业务管理相关页面添加`批号`查询条件
---
src/views/business/unpass/components/addUnPass.vue | 43 +++++++++++++++++++++++++++++++++----------
1 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/src/views/business/unpass/components/addUnPass.vue b/src/views/business/unpass/components/addUnPass.vue
index ed3c3cd..f706a98 100644
--- a/src/views/business/unpass/components/addUnPass.vue
+++ b/src/views/business/unpass/components/addUnPass.vue
@@ -4,11 +4,18 @@
:close-on-press-escape="false">
<div class="table">
<el-table class="el-table" ref="productTable" :data="productList" max-height="800px" tooltip-effect="dark"
- border v-loading="tableLoading" @selection-change="selectProduct" style="margin-bottom: 10px;"
- @select-all="handleAll">
+ v-loading="tableLoading" @selection-change="selectProduct" style="margin-bottom: 10px;"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border @select-all="handleAll">
<el-table-column type="selection" width="65"></el-table-column>
- <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" min-width="140"
- show-overflow-tooltip></el-table-column>
+ <el-table-column prop="isBinding" label="绫诲瀷" min-width="140" show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.isBinding" clearable size="small">
+ <el-option :value="1" label="缁戝畾鍊�"></el-option>
+ <el-option :value="0" label="涓嶅悎鏍煎��"></el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column prop="inspectionItemClass" label="妫�楠岄」鍒嗙被" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140"
show-overflow-tooltip></el-table-column>
@@ -16,8 +23,10 @@
<el-table-column prop="ask" label="瑕佹眰鍊�" min-width="220px"></el-table-column>
<el-table-column prop="lastValue" label="妫�楠岀粨鏋�" min-width="140" show-overflow-tooltip></el-table-column>
<el-table-column prop="insResult" label="缁撴灉鍒ゅ畾" min-width="140" show-overflow-tooltip>
- <template>
- <el-tag type="danger">涓嶅悎鏍�</el-tag>
+ <template slot-scope="scope">
+ <el-tag type="success" v-if="scope.row.insResult === 1">鍚堟牸</el-tag>
+ <el-tag type="danger" v-if="scope.row.insResult === 0">涓嶅悎鏍�</el-tag>
+ <el-tag type="info" v-if="scope.row.insResult === 3">涓嶅垽瀹�</el-tag>
</template>
</el-table-column>
</el-table>
@@ -32,6 +41,7 @@
<script>
import {addUnqualifiedRetest, getInsProductUnqualified} from '@/api/business/unpass.js'
+import {getInsProduct} from "@/api/business/inspectionTask";
export default {
name: "addUnPass",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -61,7 +71,7 @@
getInsOrder(info) {
this.tableLoading = true
try {
- getInsProductUnqualified({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag }).then(res => {
+ getInsProduct({ id: info.id, type: info.type, laboratory: info.laboratory, rawMaterialTag: info.rawMaterialTag,repetitionTag: info.repetitionTag,cableTag: info.cableTag }).then(res => {
if (res.code === 200) {
this.productList = res.data
}
@@ -77,6 +87,15 @@
this.$message.warning('璇烽�夋嫨闇�瑕佸娴嬬殑妫�楠岄」')
return
}
+ // 妫�鏌ユ槸鍚︽墍鏈夐�変腑鐨勮閮介�夋嫨浜� isBinding
+ const hasUnselectedBinding = this.productListSelected.some(
+ (row) => row.isBinding === null || row.isBinding === undefined
+ );
+
+ if (hasUnselectedBinding) {
+ this.$message.error("璇风‘淇濋�変腑鐨勬暟鎹兘閫夋嫨浜嗙被鍨嬶紒");
+ return;
+ }
this.$confirm('纭鎻愪氦涓嶅悎鏍煎娴�?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -88,16 +107,20 @@
});
},
handlePass() {
+ const ids = this.productListSelected.map(item => ({
+ id: item.id,
+ isBinding: item.isBinding
+ }));
this.handlePassLoading = true
try {
- addUnqualifiedRetest({
- ids: this.productIds
- }).then(res => {
+ addUnqualifiedRetest(ids).then(res => {
if (res.code === 200) {
this.$message.success('鎻愪氦鎴愬姛')
this.$emit('resetAddUnPass')
}
this.handlePassLoading = false
+ }).catch(e => {
+ this.handlePassLoading = false
})
} catch (e) {
this.handlePassLoading = false
--
Gitblit v1.9.3