diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index e72df02a..eb5b33e9 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -125,7 +125,18 @@ v-model="form.count" :min="1" :precision="3" - :disabled="form.type == 'do_out'" + style="width: 100%" + @change="countChange" + /> + + + + + @@ -136,6 +147,7 @@ @@ -151,11 +163,14 @@ - + - - + + @@ -280,8 +295,11 @@ export default { wbatchOptions: [], mioitems:[''], mioitemw:[], + wprList:[], + prefix:'', project_code:'', mtype:null, + batchcount:null, mTracking:10, apiObj:this.$API.mtm.material.list, }; @@ -298,6 +316,12 @@ export default { this.getMaterialOptions(); this.getWarehouseOptions(); }, + getnumberOutLast(){ + let that = this; + that.$API.wpm.wpr.numberOutLast.req({prefix:that.prefix}).then((res) => { + console.log(res); + }); + }, getWarehouseOptions() { let that = this; this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => { @@ -450,6 +474,7 @@ export default { }, selectMaterialChange() { var that = this; + console.log('that.selectObj',that.selectObj); var type = this.form.type; that.form.material = that.selectObj.id; that.form.unit = that.selectObj.unit; @@ -477,12 +502,19 @@ export default { } }, selectBatchChange(item) { - this.form.batch = item.batch; - this.form.mb = item.id; - this.form.count = Number(item.count); - this.form.warehouse = item.warehouse; - // this.warehouseDisable = true; - this.inputBatchDisable = true; + let that = this; + if(item){ + that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => { + that.wprList = res; + }) + // that.getnumberOutLast(); + that.form.batch = item.batch; + that.form.mb = item.id; + that.batchcount = Number(item.count); + that.form.count = Number(item.count); + that.form.warehouse = item.warehouse; + that.inputBatchDisable = true; + } }, selectBatchClear() { this.form.mb = ""; @@ -566,6 +598,16 @@ export default { that.$message.error("请输入正确数量的编号") return; } + }else if(that.form.type == 'sale_out'&&that.project_code=='bxerp'){ + let mioitemw = []; + that.mioitems.forEach((item,index) => { + mioitemw[index]={ + number: item , + number_out : item, + wpr:that.wprList[index]? that.wprList[index].id:null + } + }) + that.form.mioitemw = mioitemw.filter(item=>item.wpr!==null); } try { let res;