fix:根据交接物料限制交接工段
This commit is contained in:
parent
9a9be3857e
commit
37eeb45242
|
@ -58,7 +58,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="type==30">
|
||||
<!-- <el-col :md="12" :sm="24" v-if="type==30">
|
||||
<el-form-item label="接收部门" prop="recive_dept">
|
||||
<el-select
|
||||
v-model="form.recive_dept"
|
||||
|
@ -112,17 +112,12 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="更改批次">
|
||||
<el-switch v-model="change_batch"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||
<el-form-item label="新批次号">
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="type==50">
|
||||
<el-form-item label="更改物料">
|
||||
<xtSelect
|
||||
|
@ -143,6 +138,11 @@
|
|||
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||
<el-form-item label="新批次号">
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="交接物料">
|
||||
|
@ -238,6 +238,63 @@
|
|||
<el-row>
|
||||
<div class="total-count">总计:{{ totalCount }}</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24" v-if="type==30">
|
||||
<el-form-item label="接收部门" prop="recive_dept">
|
||||
<el-select
|
||||
v-model="form.recive_dept"
|
||||
placeholder="接收部门"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="getUserList3"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-else>
|
||||
<el-form-item label="接收工段" prop="recive_mgroup">
|
||||
<el-select
|
||||
v-model="form.recive_mgroup"
|
||||
placeholder="接收工段"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="type==40"
|
||||
@change="getUserList2"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="接收人" prop="recive_user">
|
||||
<el-select
|
||||
v-model="form.recive_user"
|
||||
placeholder="接收人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userList2"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-footer v-if="mode!=='show'">
|
||||
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||
|
@ -536,6 +593,15 @@ export default {
|
|||
let data = that.materialOptions.filter((item) => {
|
||||
return that.selectItems.indexOf(item.id)>-1;
|
||||
});
|
||||
let materialId = data[0].material;
|
||||
let params = {
|
||||
material: materialId,
|
||||
type: that.type,
|
||||
};
|
||||
console.log('params',params);
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
})
|
||||
data.forEach((item,index)=>{
|
||||
item.wm = item.id;
|
||||
item.count = item.count_cando;
|
||||
|
@ -679,6 +745,10 @@ export default {
|
|||
// console.log('2',that.form);
|
||||
}
|
||||
}else{//handoverb里没有有这个物料批次
|
||||
let params = {material: res.material,type: that.type,};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
})
|
||||
that.materialOptions.forEach((item) => {
|
||||
if(item.id == res.wm){
|
||||
let obj2 = {};
|
||||
|
@ -706,6 +776,10 @@ export default {
|
|||
if(arr.length>0){
|
||||
that.$message.error("该批次已存在")
|
||||
}else{
|
||||
let params = {material: res.material,type: that.type,};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
})
|
||||
that.materialOptions.forEach((item) => {
|
||||
if(item.batch == res.batch){
|
||||
let obj = {};
|
||||
|
|
Loading…
Reference in New Issue