diff --git a/src/api/model/ofm.js b/src/api/model/ofm.js index ba4a3de1..e55e9dcd 100644 --- a/src/api/model/ofm.js +++ b/src/api/model/ofm.js @@ -69,11 +69,10 @@ export default { } }, delete: { - url: `${config.API_URL}/ofm/mroom/delete/`, - name: "批量物理删除", - req: async function(data){ - return await http.post(this.url, data); - } + name: "删除", + req: async function (id) { + return await http.delete(`${config.API_URL}/ofm/mroom/${id}/`); + }, }, }, mroombooking: { @@ -97,12 +96,19 @@ export default { return await http.post(this.url, data); } }, - delete: { - url: `${config.API_URL}/ofm/mroombooking/delete/`, - name: "批量物理删除", - req: async function(data){ - return await http.post(this.url, data); + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/ofm/mroombooking/${id}/`,data + ); } + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete(`${config.API_URL}/ofm/mroombooking/${id}/`); + }, }, }, mroomslot: { diff --git a/src/views/ofm/booking_form.vue b/src/views/ofm/booking_form.vue new file mode 100644 index 00000000..e54e0268 --- /dev/null +++ b/src/views/ofm/booking_form.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/src/views/ofm/mroombooking.vue b/src/views/ofm/mroombooking.vue index 9b298306..40f0ff52 100644 --- a/src/views/ofm/mroombooking.vue +++ b/src/views/ofm/mroombooking.vue @@ -9,37 +9,35 @@ >
- - + + + + +
- - - + + + + + @@ -68,139 +57,66 @@ - - - - - - - - - - - - - - + + + diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 1ccfccb8..5eb03395 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -189,7 +189,7 @@ - + @@ -216,7 +216,7 @@ - + @@ -361,6 +361,7 @@ export default { let that = this; that.form.type = that.type; if(that.type==50){ + that.form.mtype=30; that.change_batch = true; } let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT"); @@ -596,7 +597,9 @@ export default { data = that.materialOptions.filter((item) => { return that.selectItems.indexOf(item.id)>-1; }); - that.form.new_batch = data[0].batch+'g'; + if(that.type==50){ + that.form.new_batch = data[0].batch+'-G'; + } let materialId = data[0].material; if(that.type==50){}else{ let params = { @@ -667,7 +670,6 @@ export default { that.$refs.dialogForm.validate(async (valid) => { if (valid) { if(that.mtype==30){ - that.form.mtype = 30; that.form.recive_mgroup = that.form.send_mgroup; } //合批、分批、报废,这三个交接操作直接创建并提交 @@ -773,7 +775,9 @@ export default { let hasArr = []; that.materialOptions.forEach((item) => { if(item.batch == res.batch){ - that.form.new_batch = res.batch+'g'; + if(that.type==50){ + that.form.new_batch = data[0].batch+'-G'; + } hasArr.push(item); let params = {material: item.material,type: that.type}; that.$API.wpm.handover.mgroups.req(params).then((res0) => { @@ -827,7 +831,9 @@ export default { if(arr2.length>0){ that.$message.error("该批次已存在") }else{ - that.form.new_batch = arr[0].batch+'g'; + if(that.type==50){ + that.form.new_batch = data[0].batch+'-G'; + } let params = {material: arr[0].material,type: that.type}; that.$API.wpm.handover.mgroups.req(params).then((res0) => { that.mgroupOptions = res0; @@ -882,7 +888,9 @@ export default { }else{//handoverb里没有有这个物料批次 that.materialOptions.forEach((item) => { if(item.id == res[0].wm){ - that.form.new_batch = item.batch+'g'; + if(that.type==50){ + that.form.new_batch = data[0].batch+'-G'; + } let params = {material: item.material,type: that.type}; that.$API.wpm.handover.mgroups.req(params).then((res1) => { that.mgroupOptions = res1; diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 44034738..1d330d25 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -1,6 +1,6 @@