fix:将工段放到部门前面,选中工段后,工段默认为该工段所属的部门
This commit is contained in:
parent
8c071dafbc
commit
96eaa89722
|
|
@ -95,7 +95,26 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="执行部门"
|
label="操作工段"
|
||||||
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="form.mgroup"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="为空时代表领料/入库到车间"
|
||||||
|
@change="mgroupChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in mgroupOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="操作部门"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in'"
|
v-if="form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -112,24 +131,7 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
|
||||||
label="工段"
|
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="form.mgroup"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="为空时代表领料/入库到车间"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in mgroupOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门执行人"
|
label="部门执行人"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
|
|
@ -239,6 +241,14 @@ export default {
|
||||||
this.getCustomerOptions();
|
this.getCustomerOptions();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mgroupChange(){
|
||||||
|
let that = this;
|
||||||
|
that.mgroupOptions.forEach(item=>{
|
||||||
|
if(item.id == that.form.mgroup){
|
||||||
|
this.form.belong_dept = item.belong_dept;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getmgroupOptions() {
|
getmgroupOptions() {
|
||||||
this.$API.mtm.mgroup.list.req({page: 0}).then(res=>{
|
this.$API.mtm.mgroup.list.req({page: 0}).then(res=>{
|
||||||
this.mgroupOptions = res;
|
this.mgroupOptions = res;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue