fix:出入库时物料选择更换组件xselect
This commit is contained in:
parent
3a8631eb55
commit
e6c0069e74
|
@ -15,7 +15,18 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="物料" prop="material">
|
<el-form-item label="物料" prop="material">
|
||||||
<el-select
|
<xtSelect
|
||||||
|
:apiObj="apiObj"
|
||||||
|
v-model="form.material"
|
||||||
|
v-model:obj="selectObj"
|
||||||
|
:labelField="'full_name'"
|
||||||
|
style="width:100%"
|
||||||
|
:params="query"
|
||||||
|
@change="selectMaterialChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
|
<!-- <el-select
|
||||||
v-model="selectMaterial"
|
v-model="selectMaterial"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
clearable
|
clearable
|
||||||
|
@ -40,7 +51,7 @@
|
||||||
>隐</span
|
>隐</span
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
@ -254,6 +265,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
selectObj:{},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
|
@ -271,6 +283,7 @@ export default {
|
||||||
mioitemw:[],
|
mioitemw:[],
|
||||||
project_code:'',
|
project_code:'',
|
||||||
mTracking:10,
|
mTracking:10,
|
||||||
|
apiObj:this.$API.mtm.material.list,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -372,9 +385,11 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
query = { page: 0 ,is_hidden:false};
|
query = { page: 0 ,is_hidden:false};
|
||||||
}
|
}
|
||||||
this.$API.mtm.material.list.req(query).then((res) => {
|
this.query = query;
|
||||||
this.materialOptions = res;
|
this.apiObj=this.$API.mtm.material.list;
|
||||||
});
|
// this.$API.mtm.material.list.req(query).then((res) => {
|
||||||
|
// this.materialOptions = res;
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
async initAssemb(item) {
|
async initAssemb(item) {
|
||||||
this.selectBatchDisable = true;
|
this.selectBatchDisable = true;
|
||||||
|
@ -422,15 +437,14 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
selectMaterialChange(item) {
|
selectMaterialChange() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
var material = item.id;
|
that.form.material = that.selectObj.id;
|
||||||
that.form.material = material;
|
that.mTracking = that.selectObj.tracking;
|
||||||
that.mTracking = item.tracking;
|
|
||||||
if (type == "do_in") {
|
if (type == "do_in") {
|
||||||
if (item.is_assemb) {
|
if (that.selectObj.is_assemb) {
|
||||||
this.initAssemb(item);
|
this.initAssemb(that.selectObj);
|
||||||
} else {
|
} else {
|
||||||
this.selectBatchDisable = false;
|
this.selectBatchDisable = false;
|
||||||
this.components = [];
|
this.components = [];
|
||||||
|
|
Loading…
Reference in New Issue