diff --git a/src/views/qm/product.vue b/src/views/qm/product.vue
index 9ebbb4f9..6b92508e 100644
--- a/src/views/qm/product.vue
+++ b/src/views/qm/product.vue
@@ -38,6 +38,7 @@
+
@@ -86,7 +87,7 @@
v-if="dialog.check"
:materialCate="materialCate"
:ftestWork="ftestWork"
- @closed="dialog.check = false"
+ @closed="handleCheckClose"
>
@@ -169,6 +170,10 @@ export default {
handleQuery() {
this.$refs.table.queryData(this.query);
},
+ handleCheckClose() {
+ this.dialog.check = false;
+ this.$refs.table.refresh();
+ },
resetQuery() {
this.query = {};
},
diff --git a/src/views/qm/productCheck.vue b/src/views/qm/productCheck.vue
index f73b0c96..7bafed5d 100644
--- a/src/views/qm/productCheck.vue
+++ b/src/views/qm/productCheck.vue
@@ -32,7 +32,7 @@
workObj.count_sampling
}}
- {{item.batch}}、
+ {{item.batch}};
-
+
-
+
-
+
-
+
-
-
-
+
+
+
@@ -215,7 +211,7 @@
>
删除
@@ -266,6 +262,8 @@ export default {
},
data() {
return {
+ apiUserObj: this.$API.system.user.list,
+ apiUserParams: {posts__code__contains: "check"},
addTemplate: {
ftestitems: [{ test_val_json: "", check_val: "", testitem: "" ,choices:[],field_type:'',name:''}],
test_date: "", //work获取
@@ -306,7 +304,6 @@ export default {
let tags = that.materialCate;
that.getTestItem(tags, that.ftestWork);
- that.getUserList(that.ftestWork);
},
methods: {
open() {
@@ -335,15 +332,6 @@ export default {
});
},
- //获取员工
- getUserList() {
- let that = this;
- this.$API.system.user.list
- .req({ page: 0, posts__code__contains: "check" })
- .then((res) => {
- that.userList = res;
- });
- },
table_edit(row) {
this.dialog.worksave = true;
this.$nextTick(() => {
@@ -381,17 +369,22 @@ export default {
});
},
//删除
- delCheck(id) {
+ delCheck(row, index) {
+ if (row.id == undefined) {
+ this.formTableData.splice(index, 1);
+ return
+ }
let that = this;
that.$confirm(`确定删除吗?`, "提示", {
type: "warning",
})
.then(() => {
that.$API.qm.ftest.delete
- .req(id)
+ .req(row.id)
.then((res) => {
that.$message.success("删除成功");
that.getCheckList(that.ftestWork);
+ this.getFtestWork();
return res;
})
.catch((err) => {
@@ -400,9 +393,14 @@ export default {
})
.catch(() => {});
},
+ getFtestWork() {
+ let that = this;
+ that.$API.qm.ftestwork.item.req(that.ftestWork).then((res) => {
+ that.workObj = res;
+ });
+ },
saveCheck(row) {
let that = this;
- console.log(row);
let index = this.formTableData.findIndex(
(item) => item.id == row.id
);
@@ -413,6 +411,7 @@ export default {
.then((res) => {
that.formTableData[index].isEdit = false;
that.$message.success("操作成功");
+ this.getFtestWork();
})
.catch((err) => {
return err;
@@ -424,6 +423,7 @@ export default {
that.formTableData[index].isEdit = false;
that.$message.success("操作成功");
that.getCheckList(that.ftestWork);
+ this.getFtestWork();
})
.catch((err) => {
return err;
diff --git a/src/views/qm/product_form.vue b/src/views/qm/product_form.vue
index 183dae18..9df574a6 100644
--- a/src/views/qm/product_form.vue
+++ b/src/views/qm/product_form.vue
@@ -23,6 +23,7 @@
clearable
style="width: 100%"
@change="handleChange"
+ disabled="mode != 'add'"
>
-
-
-
-
-
-
+
-
+
-
-
-
+
+
+
@@ -116,6 +103,7 @@ export default {
emits: ["success", "closed"],
data() {
return {
+ apiUserObj: this.$API.system.user.list,
loading: false,
form: {
type:'prod',