diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index b4f624fc..037f15fc 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -389,6 +389,7 @@ export default { this.params.mio = this.mioId; this.apiObj = this.$API.inm.mioitem.list; this.getMio(); + sessionStorage.removeItem('mioitemSelecObj'); }, methods: { printSetting(){ diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index 1d9e7062..d7301db9 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -13,7 +13,7 @@ label-width="120px" > - + 该小箱放在第几个大箱 @@ -289,7 +289,7 @@ export default { material: [{required: true,message: "请选择所需产品",trigger: "blur"}], warehouse: [{required: true,message: "请选择仓库",trigger: "blur"}], }, - selectObj:{}, + selectObj:null, showDigit:false, visible: false, isSaveing: false, @@ -322,6 +322,20 @@ export default { this.url_code = url1.split('/')[3]; let config_base = that.$TOOL.data.get("BASE_INFO").base; that.project_code = config_base.base_code; + // console.log('that.type',that.type); + if(that.type=='other_in'||that.type=='do_in'||that.type=='do_out'){ + let mioitemSelecObj =JSON.parse(sessionStorage.getItem("mioitemSelecObj")); + // console.log('mioitemSelecObj',mioitemSelecObj); + if(mioitemSelecObj!==null){ + that.selectObj = mioitemSelecObj; + that.form.material = that.selectObj.id; + that.form.unit = that.selectObj.unit; + that.form.unit_price = that.selectObj.unit_price; + that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:''; + that.mTracking = that.selectObj.tracking; + that.getBatchOptions(); + } + } }, methods: { init() { @@ -481,7 +495,9 @@ export default { }, selectMaterialChange() { var that = this; - console.log('that.selectObj',that.selectObj); + if(that.selectObj.id!==undefined&&that.selectObj.id!==null){ + sessionStorage.setItem("mioitemSelecObj",JSON.stringify(that.selectObj)); + } var type = this.form.type; that.form.material = that.selectObj.id; that.form.unit = that.selectObj.unit;