From a7dd838394ad36cadb74d6bdd379d4d098ab8d8c Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 28 三月 2025 09:13:57 +0800
Subject: [PATCH] 外购件检验提交
---
src/views/business/outsourcedParts/index.vue | 74 +++++++++++++++++++++++++-----------
1 files changed, 51 insertions(+), 23 deletions(-)
diff --git a/src/views/business/outsourcedParts/index.vue b/src/views/business/outsourcedParts/index.vue
index eaecbd8..8da7077 100644
--- a/src/views/business/outsourcedParts/index.vue
+++ b/src/views/business/outsourcedParts/index.vue
@@ -20,7 +20,7 @@
</el-form>
<div>
<el-button size="mini" type="primary">鑾峰彇璁㈠崟</el-button>
- <el-button size="mini" type="primary" @click="openAdd('鏂板')">鏂板</el-button>
+ <!-- <el-button size="mini" type="primary" @click="openAdd('鏂板')">鏂板</el-button> -->
</div>
</div>
<lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 220px)'"
@@ -59,9 +59,17 @@
</el-input>
</el-form-item>
<el-form-item label="妫�娴嬬粨鏋�" prop="result" v-if="title == '妫�楠�'">
- <el-switch v-model="addForm.result" active-text="鍚堟牸" inactive-text="涓嶅悎鏍�" active-value="鍚堟牸"
+ <el-select v-model="addForm.result" placeholder="璇烽�夋嫨">
+ <el-option label="鍚堟牸" value="鍚堟牸">
+ </el-option>
+ <el-option label="涓嶅悎鏍�" value="涓嶅悎鏍�">
+ </el-option>
+ <el-option label="涓嶅垽鏂�" value="涓嶅垽鏂�">
+ </el-option>
+ </el-select>
+ <!-- <el-switch v-model="addForm.result" active-text="鍚堟牸" inactive-text="涓嶅悎鏍�" active-value="鍚堟牸"
inactive-value="涓嶅悎鏍�">
- </el-switch>
+ </el-switch> -->
</el-form-item>
<el-form-item label="娴嬭瘯鏂囦欢" prop="file" v-if="title == '妫�楠�'">
<el-upload action="#" :auto-upload="false" :multiple="false"
@@ -80,13 +88,14 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
-import { selectInspection, addOrUpdateInspection, delInspection } from '@/api/business/outsourcedParts.js'
+import { selectInspection, addOrUpdateInspection, delInspection, updateInspection } from '@/api/business/outsourcedParts.js'
export default {
components: { limsTable },
data() {
return {
queryParams: {},
tableData: [],
+ value: '',
column: [
{ label: "濮旀墭缂栧彿", prop: "entrustmentNo" },
{ label: "浜у搧", prop: "name" },
@@ -120,23 +129,23 @@
dataType: "action",
label: "鎿嶄綔",
operation: [
- {
- name: "缂栬緫",
- type: "text",
- clickFun: (row) => {
- this.openAdd("缂栬緫", row);
- },
- },
- {
- name: "鍒犻櫎",
- type: "text",
- clickFun: (row) => {
- this.handleDelete(row);
- },
- disabled: (row) => {
- return !!row.ratifyUser
- },
- },
+ // {
+ // name: "缂栬緫",
+ // type: "text",
+ // clickFun: (row) => {
+ // this.openAdd("缂栬緫", row);
+ // },
+ // },
+ // {
+ // name: "鍒犻櫎",
+ // type: "text",
+ // clickFun: (row) => {
+ // this.handleDelete(row);
+ // },
+ // disabled: (row) => {
+ // return !!row.ratifyUser
+ // },
+ // },
{
name: "妫�楠�",
type: "text",
@@ -171,6 +180,9 @@
inspectionItems: [
{ required: true, message: "璇疯緭鍏ュ瑙�", trigger: "blur" },
],
+ result: [
+ { required: true, message: "璇烽�夋嫨妫�娴嬬粨鏋�", trigger: "change" },
+ ],
},
uploading: false,
inspectionTaskState: []
@@ -180,6 +192,7 @@
this.getDicts("inspection_task_state").then((response) => {
this.inspectionTaskState = this.dictToValue(response.data);
});
+ this.getList()
},
methods: {
getList() {
@@ -246,9 +259,24 @@
// 妫�楠�
let fd = new FormData();
//鏂囦欢淇℃伅涓璻aw鎵嶆槸鐪熺殑鏂囦欢
- if (this.file) {
- fd.append("file", this.file.raw);
+ if (this.addForm.file) {
+ fd.append("file", this.addForm.file.raw);
}
+ fd.append("inspectionItems", this.addForm.inspectionItems);
+ fd.append("result", this.addForm.result);
+ fd.append("id", this.addForm.id); // 娣诲姞id鍙傛暟
+ updateInspection(fd)
+ .then(res => {
+ this.uploading = false;
+ if (res.code === 200) {
+ this.$message.success("妫�楠屾彁浜ゆ垚鍔�");
+ this.refresh();
+ this.addDia = false;
+ }
+ })
+ .catch(err => {
+ this.uploading = false;
+ });
}
} else {
return false;
--
Gitblit v1.9.3