diff --git a/src/views/wpm_bx/check_drawer.vue b/src/views/wpm_bx/check_drawer.vue index 01f2c644..abf580f0 100644 --- a/src/views/wpm_bx/check_drawer.vue +++ b/src/views/wpm_bx/check_drawer.vue @@ -31,8 +31,13 @@ - - + @@ -47,6 +52,7 @@ export default { emits: ["closed"], props: { wm: { type: String, default: "" }, + material: { type: String, default: "" }, }, data() { return { @@ -58,17 +64,32 @@ export default { 10: "抽检", 20: "全检", }, + qct_defects:[], isSaveing: false, }; }, - mounted() {}, + mounted() { + + }, methods: { open() { this.visible = true; this.paramsObj.wm = this.wm; this.apiObj = this.$API.qm.ftestwork.list; + this.getdefects(); return this; }, + //获取不合格项 + getdefects(){ + let that = this; + that.$API.qm.qct.list.req({ page: 0, qctmat__material: that.material }).then((res) => { + if(res.length>0){ + that.$API.qm.qct.item.req(res[0].id).then((res) => { + that.qct_defects = res; + }) + } + }); + }, table_del(row){ this.$API.qm.ftestwork.delete.req(row.id).then((res) => { this.$refs.drawer_table.fetch(); diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index f631311a..55d7e58d 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -180,14 +180,17 @@ -
交接数量
+ >交接数量 { return that.selectItems.indexOf(item.id)>-1; }); - data.forEach(item=>{ + data.forEach((item,index)=>{ item.wm = item.id; item.count = item.count_cando; totalCount += item.count_cando; + item.handoverbw = []; + that.getWprList(item.id,index); }) that.totalCount = totalCount; that.form.handoverb = data; }, + getWprList(id,index){ + console.log('id',id,'index',index); + let that = this; + let handoverbw = []; + that.$API.wpm.wpr.list.req({wm:id,page:0}).then((res) => { + res.forEach(wpritem=>{ + let obj = {}; + obj.wpr = wpritem.id; + obj.number = wpritem.number; + handoverbw.push(obj); + }) + that.form.handoverb[index].handoverbw = handoverbw; + }) + }, countChange(){ let that = this; let totalCount = 0; @@ -530,7 +549,7 @@ export default { //提交 submit() { let that = this; - that.$refs.dialogForm.validate(async (valid) => { + that.$refs.dialogForm.validate(async (valid) => { if (valid) { if (that.mode == "add") { that.$API.wpm.handover.create.req(that.form).then((res) => { @@ -571,7 +590,7 @@ export default { }, //表单注入数据 setData(data) { - this.totalCount = data.count; + this.totalCount = data.count?data.count:data.handoverb.count; Object.assign(this.form, data); if(data.type==30){ this.getUserList3(); diff --git a/src/views/wpm_bx/inm.vue b/src/views/wpm_bx/inm.vue index a663f516..2b373054 100644 --- a/src/views/wpm_bx/inm.vue +++ b/src/views/wpm_bx/inm.vue @@ -154,6 +154,7 @@ ref="showDrawer" v-if="visibleDrawer" :wm="wm" + :material="wmMaterial" @closed="visibleDrawer = false" > @@ -172,7 +173,7 @@

关联产品