diff --git a/src/api/model/qm.js b/src/api/model/qm.js index 05a94fd8..ba06dece 100644 --- a/src/api/model/qm.js +++ b/src/api/model/qm.js @@ -185,5 +185,11 @@ export default { ); }, }, + submit: { + name: "提交", + req: async function (id) { + return await http.post(`${config.API_URL}/qm/ftestwork/${id}/submit/`); + }, + }, }, }; diff --git a/src/views/qm/mlogs.vue b/src/views/qm/mlogs.vue index 17cf6594..9d6b5717 100644 --- a/src/views/qm/mlogs.vue +++ b/src/views/qm/mlogs.vue @@ -31,7 +31,6 @@ row-key="id" :params="params" :query="params" - @row-click="table_detail" > @@ -41,11 +40,15 @@ - + @@ -109,7 +112,7 @@ export default { this.dialog.detail = false; this.$refs.table.refresh(); }, - //添加日志 + //添加检验 table_add() { let mode = this.mgroupName+"Add"; console.log('mode',mode) @@ -118,7 +121,7 @@ export default { this.$refs.saveDialog.open(mode); }); }, - //编辑日志 + //编辑检验 table_edit(row) { let mode = this.mgroupName+"Edit"; this.dialog.save = true; @@ -126,21 +129,32 @@ export default { this.$refs.saveDialog.open(mode).setData(row); }); }, - //日志详情 - table_detail(row) { - this.mlogId = row.id; - this.dialog.detail = true; + table_show(row) { + let mode = this.mgroupName+"Show"; + this.dialog.save = true; this.$nextTick(() => { - this.$refs.detailDialog.open(); + this.$refs.saveDialog.open(mode).setData(row); }); }, - //日志删除 + //提交检验 + table_submit(row){ + let that = this; + that.$API.qm.ftestwork.submit.req(row.id).then((res) => { + if (res.err_msg) { + that.$message.error(res.err_msg); + } else { + that.$refs.table.refresh(); + that.$message.success("提交成功"); + } + }); + }, + //检验删除 table_del(row) { this.$confirm(`确定删除吗?`, "提示", { type: "warning", }).then(() => { var id = row.id; - this.$API.wpm.mlog.delete.req(id).then((res) => { + this.$API.qm.ftestwork.delete.req(id).then((res) => { if (res.err_msg) { this.$message.error(res.err_msg); } else { @@ -150,22 +164,6 @@ export default { }); }); }, - //日志撤回 - mlogRevert(row) { - this.$confirm(`确定撤回该日志吗?`, "提示", { - type: "warning", - }).then(() => { - var id = row.id; - this.$API.wpm.mlog.revert.req(id).then((res) => { - if (res.err_msg) { - this.$message.error(res.err_msg); - } else { - this.$refs.table.refresh(); - this.$message.success("撤回成功"); - } - }); - }); - }, //表格选择后回调事件 selectionChange(selection) { diff --git a/src/views/qm/products_form.vue b/src/views/qm/products_form.vue index 153c4f7a..5ec0fa14 100644 --- a/src/views/qm/products_form.vue +++ b/src/views/qm/products_form.vue @@ -21,6 +21,7 @@ v-model="form.batch" placeholder="物料批次" clearable + :disabled="mode=='sizeShow'||mode=='facadeShow'" style="width: 100%" @change="handleChange" > @@ -30,6 +31,8 @@ :label="item.batch" :value="item.id" > + {{item.batch}} + ({{item.count}}) @@ -37,7 +40,7 @@ @@ -49,6 +52,7 @@ type="date" value-format="YYYY-MM-DD" style="width: 100%" + :disabled="mode=='sizeShow'||mode=='facadeShow'" /> @@ -56,9 +60,10 @@ @@ -78,6 +83,7 @@ v-model="form.count_notok" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange('notok')" > @@ -91,6 +97,7 @@ v-model="count_notok_json.count_n_hqnj" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -102,6 +109,7 @@ v-model="count_notok_json.count_n_hqnjyd" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -113,6 +121,7 @@ v-model="count_notok_json.count_n_hqwj" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -124,6 +133,7 @@ v-model="count_notok_json.count_n_hqwjyd" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -135,6 +145,7 @@ v-model="count_notok_json.count_n_wj" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -146,6 +157,7 @@ v-model="count_notok_json.count_n_yd" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -157,6 +169,7 @@ v-model="count_notok_json.count_n_txd" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -168,6 +181,7 @@ v-model="count_notok_json.count_n_hd" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -181,6 +195,7 @@ v-model="count_notok_json.count_n_qp" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -192,6 +207,7 @@ v-model="count_notok_json.count_n_swen" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -203,6 +219,7 @@ v-model="count_notok_json.count_n_bb" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -214,6 +231,7 @@ v-model="count_notok_json.count_n_zb" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -225,6 +243,7 @@ v-model="count_notok_json.count_n_hs" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -236,6 +255,7 @@ v-model="count_notok_json.count_n_md" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -247,6 +267,7 @@ v-model="count_notok_json.count_n_hqbx" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -258,6 +279,7 @@ v-model="count_notok_json.count_n_dj" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -269,6 +291,7 @@ v-model="count_notok_json.count_n_ps" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -280,6 +303,7 @@ v-model="count_notok_json.count_n_lq" style="width: 100%" precision="0" + :disabled="mode=='sizeShow'||mode=='facadeShow'" @change="handleCountChange" > @@ -287,7 +311,7 @@ - + 保存 取消 @@ -304,8 +328,10 @@ export default { modeTitle: { sizeAdd: "尺寸检验", sizeEdit: "尺寸检验", + sizeShow: "尺寸检验", facadeAdd: "外观和内质检验", facadeEdit: "外观和内质检验", + facadeShow: "外观和内质检验", }, loading: false, form: { @@ -314,7 +340,6 @@ export default { count: null, count_ok: null, count_notok: 0, - count_sampling:0, count_notok_json:{} }, count_notok_json:{ @@ -355,6 +380,7 @@ export default { }, ], }, + formCount:null, visible: false, isSaveing: false, options: [], @@ -373,7 +399,7 @@ export default { return this; }, handleCheckChange(){ - this.form.count_ok = this.form.count_sampling-this.form.count_notok; + this.form.count_ok = this.form.count-this.form.count_notok; }, handleCountChange(type){ if(type == 'notok'){ @@ -414,7 +440,7 @@ export default { this.count_notok_json.count_n_ps+ this.count_notok_json.count_n_lq; } - this.form.count_ok = this.form.count_sampling - this.form.count_notok; + this.form.count_ok = this.form.count - this.form.count_notok; }, //获取物料批次 getMaterialBatch() { @@ -436,7 +462,7 @@ export default { console.log(val); that.options.forEach((item) => { if (item.id == val) { - that.form.count = item.count; + that.form.count = that.formCount = item.count; that.form.batch = item.batch; that.form.material = item.material; that.form.wm = item.id; @@ -479,7 +505,8 @@ export default { //表单注入数据 setData(data) { Object.assign(this.form, data); - this.form.test_group = this.form.split(","); + this.formCount = this.form.count; + // this.form.test_group = this.form.split(","); }, //设置过滤项 setFilters(filters) { diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue index ffaac6ee..01bb22ec 100644 --- a/src/views/wpm_gx/inm.vue +++ b/src/views/wpm_gx/inm.vue @@ -67,6 +67,15 @@ prop="count" min-width="80" > + + +