From 1b7ff2f053d04a5332aadf59820b567cae1df8d4 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 25 三月 2025 10:14:40 +0800
Subject: [PATCH] 原辅料下单1.报检类型增加2.检验项匹配
---
src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue | 68 ++++++++++++++++++++++++++--------
1 files changed, 52 insertions(+), 16 deletions(-)
diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
index 92e3e56..ed4a048 100644
--- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
@@ -22,7 +22,8 @@
<el-form-item label="鑹叉爣锛�" prop="colorCode">
<el-input v-model="bindPartData.colorCode" size="small"></el-input>
</el-form-item>
- <el-form-item label="杩涘巶妫�楠岄」锛�" prop="inspectionItem" v-if="currentObj.objectType == '鍘熸潗鏂�'" label-width="100px">
+ <el-form-item label="杩涘巶妫�楠岄」锛�" prop="inspectionItem"
+ v-if="currentObj.objectType == '鍘熻緟鏂�' || currentObj.objectType == '鍖呮潗'" label-width="100px">
<!-- <el-input v-model="bindPartData.inspectionItem" disabled placeholder="閫夋嫨妫�楠岄」" size="small">
<template slot="append">
<el-button slot="append" icon="el-icon-search" @click="openItems"></el-button>
@@ -38,10 +39,10 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="closeBindPartDialog">鍙� 娑�</el-button>
- <el-button type="primary" @click="submitBind" :loading="bindLoad">纭� 璁�</el-button>
+ <el-button type="primary" @click="submitBind">纭� 璁�</el-button>
</span>
</el-dialog>
- <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="600px">
+ <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="900px">
<div class="body" v-if="editItem">
<lims-table :tableData="editList" :column="editColumn" height="460px" :tableLoading="tableLoading0" :key="2"
:page="editPage" @pagination="editPagination"></lims-table>
@@ -54,9 +55,16 @@
import limsTable from "@/components/Table/lims-table.vue";
import {
addProductPart,
- addTestObjectPart, deleteProductPart, deleteTestObjectPart,
+ addTestObjectPart,
+ deleteProductPart,
+ deleteTestObjectPart,
selectByProductId,
- selectByTestObjectId, updateProductPart, updateTestObjectPart, inspectionItems, productPartReview
+ selectByTestObjectId,
+ updateProductPart,
+ updateTestObjectPart,
+ inspectionItems,
+ productPartReview,
+ productPartLogList
} from "@/api/structural/structureTestObjectPart";
export default {
@@ -93,6 +101,7 @@
{ label: '闆朵欢鍙�', prop: 'partNo' },
{ label: '棰滆壊', prop: 'color' },
{ label: '鑹叉爣', prop: 'colorCode' },
+ { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' },
{
label: '鐘舵��', prop: 'review',
dataType: "tag",
@@ -136,7 +145,7 @@
productPartReview({ id: row.id }).then((res) => {
if (res.code == 200) {
this.$message.success("澶嶆牳閫氳繃");
- this.getList()();
+ this.getList();
}
});
})
@@ -192,7 +201,7 @@
partNo: '', // 闆朵欢鍙�
color: '', // 棰滆壊
colorCode: '', // 鑹叉爣
- inspectionItem: [],//鍘熸潗鏂欒繘鍘傛楠屽璞″垪琛�
+ inspectionItem: [],//鍘熻緟鏂欒繘鍘傛楠屽璞″垪琛�
},
bindPartDataRules: {
partNo: [
@@ -203,16 +212,27 @@
upIndex: 0,
addBindLoad: false,
- itemList: [],//鍘熸潗鏂欒繘鍘傛楠屽璞″垪琛�
+ itemList: [],//鍘熻緟鏂欒繘鍘傛楠屽璞″垪琛�
editItem: false,
editList: [],
editColumn: [
- { label: '闆朵欢鍙�', prop: 'inspectionItem' },
- { label: '棰滆壊', prop: 'inspectionItemSubclass' },
- { label: '鑹叉爣', prop: 'ask' },
- { label: '杩涘巶妫�楠岄」', prop: 'askTell' },
- { label: '淇敼鏃堕棿', prop: 'method' },
- { label: '淇敼浜�', prop: 'method' },
+ { label: '闆朵欢鍙�', prop: 'partNo' },
+ { label: '棰滆壊', prop: 'color' },
+ { label: '鑹叉爣', prop: 'colorCode' },
+ { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' },
+ {
+ label: '鐘舵��', prop: 'review',
+ dataType: "tag",
+ formatType: (params) => {
+ if (params == '寰呭鏍�') {
+ return 'danger'
+ } else {
+ return 'success'
+ }
+ },
+ },
+ { label: '淇敼鏃堕棿', prop: 'operTime' },
+ { label: '淇敼浜�', prop: 'operName' },
],
editPage: {
total: 0,
@@ -220,6 +240,7 @@
current: 0,
},
tableLoading0: false,
+ currentPart: {},//褰撳墠闆朵欢
// mutilSelect: []
}
},
@@ -240,11 +261,21 @@
})
},
// 淇敼璁板綍
- lookList() {
+ lookList(row) {
+ this.currentPart = row;
this.editItem = true;
this.getEditList()
},
- getEditList() { },
+ getEditList() {
+ this.tableLoading0 = true
+ productPartLogList({ id: this.currentPart.id, ...this.editPage }).then(res => {
+ this.tableLoading0 = false
+ if (res.code == 200) {
+ this.editList = res.data.records
+ this.editPage.total = res.data.total
+ }
+ })
+ },
editPagination() {
this.editPage.current = page;
this.editPage.size = limit;
@@ -282,6 +313,8 @@
if (type === 'edit') {
this.bindPartData = this.HaveJson(row)
this.bindPartData.inspectionItem = this.bindPartData.inspectionItem ? this.bindPartData.inspectionItem.split(',') : []
+ } else {
+ this.bindPartData = {}
}
},
// 鎻愪氦闆朵欢缁戝畾
@@ -294,12 +327,14 @@
color: this.bindPartData.color,
colorCode: this.bindPartData.colorCode,
partNo: this.bindPartData.partNo,
+ id: this.bindPartData.id,
inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : ''
} : {
productId: this.currentRow.id,
color: this.bindPartData.color,
colorCode: this.bindPartData.colorCode,
partNo: this.bindPartData.partNo,
+ id: this.bindPartData.id,
inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : ''
}
this.bindLoad = true
@@ -319,6 +354,7 @@
})
} else {
addProductPart(params).then(res => {
+ this.bindLoad = false
if (res.code === 200) {
this.resetForm('bindPartData')
this.addBindPartDialog = false
--
Gitblit v1.9.3