fix:辅料库借用、归还、退货
This commit is contained in:
parent
fd154547f2
commit
1f52ccc540
|
@ -6,20 +6,27 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('do_out')"
|
@click="add('do_out')"
|
||||||
v-auth="'mio.do'"
|
v-auth="'mio.do'"
|
||||||
>生产领料</el-button
|
>生产领料</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('pur_in')"
|
@click="add('pur_in')"
|
||||||
v-auth="'mio.pur'"
|
v-auth="'mio.pur'"
|
||||||
>采购入库</el-button
|
>采购入库</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="add('other_out')"
|
@click="add('borrow_out')"
|
||||||
v-auth="'mio.pur'"
|
v-auth="'mio.pur'"
|
||||||
>退货</el-button
|
>领用出库</el-button>
|
||||||
>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('return_in')"
|
||||||
|
v-auth="'mio.pur'"
|
||||||
|
>退还入库</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="add('pur_out')"
|
||||||
|
v-auth="'mio.pur'"
|
||||||
|
>退货</el-button>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.type"
|
v-model="query.type"
|
||||||
clearable
|
clearable
|
||||||
|
@ -183,16 +190,24 @@ export default {
|
||||||
typeDict: {
|
typeDict: {
|
||||||
pur_in: "采购入库",
|
pur_in: "采购入库",
|
||||||
do_out: "领料出库",
|
do_out: "领料出库",
|
||||||
other_out: "退货",
|
pur_out: "退货",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
},
|
},
|
||||||
cateOptions: [{ id: "pur_in", name: "采购入库" }, { id: "do_out", name: "领料出库" }, { id: "other_out", name: "退货"}],
|
cateOptions: [
|
||||||
|
{ id: "pur_in", name: "采购入库" },
|
||||||
|
{ id: "do_out", name: "领料出库" },
|
||||||
|
{ id: "borrow_out", name: "领用出库" },
|
||||||
|
{ id: "return_in", name: "退还入库" },
|
||||||
|
{ id: "other_out", name: "退货"},
|
||||||
|
],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
record: false,
|
record: false,
|
||||||
},
|
},
|
||||||
query: {},
|
query: {},
|
||||||
params: {
|
params: {
|
||||||
type__in: "pur_in,do_out,other_out",
|
type__in: "pur_in,pur_out,do_out,other_out,borrow_out,return_in",
|
||||||
materials__type__in: "40, 50, 60, 70",
|
materials__type__in: "40, 50, 60, 70",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="供应商"
|
label="供应商"
|
||||||
v-if="form.type == 'other_in' || form.type == 'pur_in'"
|
v-if="form.type == 'other_in' || form.type == 'pur_in'||form.type == 'pur_out'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.supplier"
|
v-model="form.supplier"
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="执行部门"
|
label="执行部门"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'"
|
v-if="form.type == 'do_in' || form.type == 'do_out' || form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.belong_dept"
|
v-model="form.belong_dept"
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="工段"
|
label="工段"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'"
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.mgroup"
|
v-model="form.mgroup"
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门执行人"
|
label="部门执行人"
|
||||||
v-if="form.type == 'do_in' || form.type == 'do_out'"
|
v-if="form.type == 'do_in' || form.type == 'do_out'|| form.type == 'borrow_out' || form.type == 'return_in'"
|
||||||
>
|
>
|
||||||
<el-select v-model="form.do_user" clearable style="width: 100%">
|
<el-select v-model="form.do_user" clearable style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -185,9 +185,12 @@ export default {
|
||||||
do_out: "生产领料",
|
do_out: "生产领料",
|
||||||
sale_out: "销售发货",
|
sale_out: "销售发货",
|
||||||
pur_in: "采购入库",
|
pur_in: "采购入库",
|
||||||
|
pur_out: "退货",
|
||||||
do_in: "生产入库",
|
do_in: "生产入库",
|
||||||
other_in: "其他入库",
|
other_in: "其他入库",
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
|
borrow_out: "领用出库",
|
||||||
|
return_in: "退还入库",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -226,7 +229,7 @@ export default {
|
||||||
} else if (type == "sale_out") {
|
} else if (type == "sale_out") {
|
||||||
this.getOrderOptions();
|
this.getOrderOptions();
|
||||||
this.getCustomerOptions();
|
this.getCustomerOptions();
|
||||||
} else if (type == "do_in" || type == "do_out") {
|
} else if (type == "do_in" || type == "do_out" || type == "borrow_out" || type == "return_in") {
|
||||||
this.getDeptOptions();
|
this.getDeptOptions();
|
||||||
this.getmgroupOptions();
|
this.getmgroupOptions();
|
||||||
this.getgetDeptUsers();
|
this.getgetDeptUsers();
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="form.type == 'pur_in'||form.type == 'other_in'||form.type == 'do_out'||form.type=='sale_out'||form.type=='other_out'">
|
<el-col v-if="form.type == 'pur_in'||form.type == 'pur_out'||form.type == 'other_in'||form.type == 'do_out'||form.type=='sale_out'||form.type=='other_out'||form.type=='pur_out'||form.type=='borrow_out'">
|
||||||
<el-form-item label="仓库已有批次">
|
<el-form-item label="仓库已有批次">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="selectBatch"
|
v-model="selectBatch"
|
||||||
|
@ -314,11 +314,18 @@ export default {
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
getWBatchs() {
|
getWBatchs() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let params = {material: this.form.material,page: 0};
|
||||||
if (this.mgroup != null) {
|
if (this.mgroup != null) {
|
||||||
this.$API.wpm.wmaterial.list.req({mgroup: this.mgroup,material: this.form.material,state:10,page: 0}).then((res) => {
|
params.mgroup= this.mgroup;
|
||||||
this.wbatchOptions = res;
|
if(that.type=='do_in'){
|
||||||
});
|
params.state = 10;
|
||||||
|
}
|
||||||
|
}else if (this.mioObj.belong_dept != null){
|
||||||
|
params.belong_dept = this.mioObj.belong_dept;
|
||||||
}
|
}
|
||||||
|
this.$API.wpm.wmaterial.list.req(params).then((res) => {
|
||||||
|
this.wbatchOptions = res;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getMaterialOptions() {
|
getMaterialOptions() {
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
|
@ -376,9 +383,20 @@ export default {
|
||||||
this.inputBatchDisable = true;
|
this.inputBatchDisable = true;
|
||||||
} else if (type == "other_out") {
|
} else if (type == "other_out") {
|
||||||
this.inputBatchDisable = true;
|
this.inputBatchDisable = true;
|
||||||
} else {
|
} else if (type == "pur_out"||type == "borrow_out"||type == "return_in") {
|
||||||
|
query = {
|
||||||
|
page: 0,
|
||||||
|
type__in: 40,
|
||||||
|
is_hidden: false,
|
||||||
|
orderitem_material__order: this.mioObj.order?this.mioObj.order:null,
|
||||||
|
};
|
||||||
|
this.inputBatchDisable = true;
|
||||||
|
}else {
|
||||||
query = { page: 0 ,is_hidden:false};
|
query = { page: 0 ,is_hidden:false};
|
||||||
}
|
}
|
||||||
|
if(type == "return_in"){
|
||||||
|
this.inputBatchDisable = false;
|
||||||
|
}
|
||||||
this.query = query;
|
this.query = query;
|
||||||
this.apiObj=this.$API.mtm.material.list;
|
this.apiObj=this.$API.mtm.material.list;
|
||||||
// this.$API.mtm.material.list.req(query).then((res) => {
|
// this.$API.mtm.material.list.req(query).then((res) => {
|
||||||
|
@ -436,7 +454,7 @@ export default {
|
||||||
that.form.material = that.selectObj.id;
|
that.form.material = that.selectObj.id;
|
||||||
that.form.unit = that.selectObj.unit;
|
that.form.unit = that.selectObj.unit;
|
||||||
that.form.unit_price = that.selectObj.unit_price;
|
that.form.unit_price = that.selectObj.unit_price;
|
||||||
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:that.selectObj.batch;
|
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:'';
|
||||||
that.mTracking = that.selectObj.tracking;
|
that.mTracking = that.selectObj.tracking;
|
||||||
if (type == "do_in") {
|
if (type == "do_in") {
|
||||||
if (that.selectObj.is_assemb) {
|
if (that.selectObj.is_assemb) {
|
||||||
|
|
Loading…
Reference in New Issue