This commit is contained in:
caoqianming 2024-04-10 10:22:38 +08:00
commit c16c5fcd17
2 changed files with 54 additions and 57 deletions

View File

@ -317,7 +317,7 @@ export default {
}, },
apiObj: null, apiObj: null,
params: {}, params: {},
formTableData: null, formTableData: [],
ftestWork: "", ftestWork: "",
type: "", type: "",
userList: [], userList: [],
@ -338,8 +338,7 @@ export default {
that.$API.qm.ftestwork.item.req(that.ftestWork).then((res) => { that.$API.qm.ftestwork.item.req(that.ftestWork).then((res) => {
that.workObj = res; that.workObj = res;
that.addTemplate.test_date = res.test_date; that.addTemplate.test_date = res.test_date;
that.addTemplate.test_numer = res.batch + "_1"; that.getCheckList(that.ftestWork);
that.getCheckList();
}); });
let tag = that.type == "bang" ? "prod_bang" : "prod_guan"; let tag = that.type == "bang" ? "prod_bang" : "prod_guan";
that.getTestItem(tag, that.ftestWork); that.getTestItem(tag, that.ftestWork);
@ -407,15 +406,16 @@ export default {
}, },
// //
delCheck(id) { delCheck(id) {
this.$confirm(`确定删除吗?`, "提示", { let that = this;
that.$confirm(`确定删除吗?`, "提示", {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$API.qm.ftest.delete that.$API.qm.ftest.delete
.req(id) .req(id)
.then((res) => { .then((res) => {
this.$message.success("删除成功"); that.$message.success("删除成功");
this.$refs.table.refresh(); that.getCheckList(that.ftestWork);
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -425,29 +425,29 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
saveCheck(row) { saveCheck(row) {
let that = this;
console.log(row); console.log(row);
let index = this.formTableData.findIndex( let index = this.formTableData.findIndex(
(item) => item.id == row.id (item) => item.id == row.id
); );
if (row.id && row.id !== "") { if (row.id && row.id !== "") {
this.$API.qm.ftest.update that.$API.qm.ftest.update
.req(row.id, row) .req(row.id, row)
.then((res) => { .then((res) => {
this.formTableData[index].isEdit = false; that.formTableData[index].isEdit = false;
this.$message.success("操作成功"); that.$message.success("操作成功");
this.$refs.formTable.refresh();
}) })
.catch((err) => { .catch((err) => {
return err; return err;
}); });
} else { } else {
this.$API.qm.ftest.create that.$API.qm.ftest.create
.req(row) .req(row)
.then((res) => { .then((res) => {
this.formTableData[index].isEdit = false; that.formTableData[index].isEdit = false;
this.$message.success("操作成功"); that.$message.success("操作成功");
this.$refs.formTable.refresh(); that.getCheckList(that.ftestWork);
}) })
.catch((err) => { .catch((err) => {
return err; return err;

View File

@ -175,6 +175,36 @@
> >
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="批次号" prop="material_in">
<el-select
v-model="form.batch"
placeholder="批次号"
filterable
clearable
style="width: 100%"
>
<el-option
v-for="item in wMaterialOptions"
:key="item.batch"
:label="item.batch"
:value="item.batch"
>
<div
style="
display: flex;
justify-content: space-between;
"
>
<span>{{ item.batch }}</span>
<span style="color: #aaaaaa">{{
item.count
}}</span>
</div>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="班次" prop="shift"> <el-form-item label="班次" prop="shift">
<el-select <el-select
@ -218,36 +248,7 @@
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="批次号" prop="material_in">
<el-select
v-model="form.batch"
placeholder="批次号"
filterable
clearable
style="width: 100%"
>
<el-option
v-for="item in wMaterialOptions"
:key="item.batch"
:label="item.batch"
:value="item.batch"
>
<div
style="
display: flex;
justify-content: space-between;
"
>
<span>{{ item.batch }}</span>
<span style="color: #aaaaaa">{{
item.count
}}</span>
</div>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="退火时间" prop="material"> <el-form-item label="退火时间" prop="material">
<el-date-picker <el-date-picker
@ -1274,14 +1275,12 @@ export default {
this.form.count_n_qx; this.form.count_n_qx;
} else if (this.activeType == "退火") { } else if (this.activeType == "退火") {
this.form.count_notok = this.form.count_notok =
this.form.count_n_wq + this.form.count_n_xzp +
this.form.count_n_tw + this.form.count_n_thhs +
this.form.count_n_dl + this.form.count_n_hs +
this.form.count_n_pb +
this.form.count_n_dxt +
this.form.count_n_js + this.form.count_n_js +
this.form.count_n_qx + this.form.count_n_qx +
this.form.count_n_xzp; this.form.count_n_qt;
this.form.count_real = this.form.count_real =
this.form.count_ok + this.form.count_notok; this.form.count_ok + this.form.count_notok;
this.form.count_use = this.form.count_real; this.form.count_use = this.form.count_real;
@ -1334,14 +1333,12 @@ export default {
} else if (this.activeType == "退火") { } else if (this.activeType == "退火") {
// this.form.mgroup = "3428194648706011136"; // this.form.mgroup = "3428194648706011136";
this.form.count_notok = this.form.count_notok =
this.form.count_n_wq + this.form.count_n_xzp +
this.form.count_n_tw + this.form.count_n_thhs +
this.form.count_n_dl + this.form.count_n_hs +
this.form.count_n_pb +
this.form.count_n_dxt +
this.form.count_n_js + this.form.count_n_js +
this.form.count_n_qx + this.form.count_n_qx +
this.form.count_n_xzp; this.form.count_n_qt;
this.form.count_real = this.form.count_real =
this.form.count_ok + this.form.count_notok; this.form.count_ok + this.form.count_notok;
this.form.count_use = this.form.count_real; this.form.count_use = this.form.count_real;