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