fix:交接撤消
This commit is contained in:
parent
306a797c86
commit
eb9396f2f8
|
@ -450,6 +450,15 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
revert: {
|
||||||
|
name: "撤回",
|
||||||
|
req: async function (id, data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/wpm/handover/${id}/revert/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
mgroups:{
|
mgroups:{
|
||||||
name: "获取可交接的工段",
|
name: "获取可交接的工段",
|
||||||
req: async function (data) {
|
req: async function (data) {
|
||||||
|
|
|
@ -144,12 +144,12 @@
|
||||||
width="300"
|
width="300"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept"
|
v-if="scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept"
|
||||||
@click="table_print(scope.row)"
|
@click="table_print(scope.row)"
|
||||||
type="success"
|
type="success"
|
||||||
>打印</el-button
|
>打印</el-button
|
||||||
>
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
@click="table_receive(scope.row)"
|
@click="table_receive(scope.row)"
|
||||||
type="success"
|
type="success"
|
||||||
|
@ -160,6 +160,11 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10"
|
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10"
|
||||||
>退回</el-button>
|
>退回</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="table_reBack2(scope.row)"
|
||||||
|
v-if="scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)"
|
||||||
|
>撤消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@click="table_show(scope.row)"
|
@click="table_show(scope.row)"
|
||||||
type="warning"
|
type="warning"
|
||||||
|
@ -415,6 +420,13 @@ export default {
|
||||||
that.$refs.table.queryData(that.query);
|
that.$refs.table.queryData(that.query);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//撤消
|
||||||
|
table_reBack2(row){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.handover.revert.req(row.id).then((res) => {
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
//退回
|
//退回
|
||||||
table_reBack(row){
|
table_reBack(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<span v-else>(原料棒)</span>
|
<span v-else>(原料棒)</span>
|
||||||
|
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<span>{{ item.count }}</span>
|
<span>{{ item.count_canhandover }}</span>
|
||||||
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
||||||
({{ item.notok_sign_name }})
|
({{ item.notok_sign_name }})
|
||||||
</span>
|
</span>
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="总数量">
|
<el-form-item label="总数量">
|
||||||
<span>{{ listItem.count_cando }}</span>
|
<span>{{ listItem.count_canhandover }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" >
|
<el-col :span="7" >
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:max="listItem.count_cando"
|
:max="listItem.count_canhandover"
|
||||||
:disabled="mode==='show'||listItem.tracking==20"
|
:disabled="mode==='show'||listItem.tracking==20"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@ -442,7 +442,9 @@ export default {
|
||||||
}
|
}
|
||||||
that.materialOptions = [];
|
that.materialOptions = [];
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取车间不合格物料
|
//获取车间不合格物料
|
||||||
|
@ -455,7 +457,9 @@ export default {
|
||||||
state__in:'20,34'
|
state__in:'20,34'
|
||||||
};
|
};
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取废品库物料
|
//获取废品库物料
|
||||||
|
@ -468,7 +472,9 @@ export default {
|
||||||
state_all: 1
|
state_all: 1
|
||||||
};
|
};
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getMaterialOkFangong(){
|
getMaterialOkFangong(){
|
||||||
|
@ -480,7 +486,9 @@ export default {
|
||||||
mgroup: that.mgroupId,
|
mgroup: that.mgroupId,
|
||||||
};
|
};
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取交送工段人员
|
//获取交送工段人员
|
||||||
|
@ -591,8 +599,8 @@ export default {
|
||||||
})
|
})
|
||||||
data.forEach((item,index)=>{
|
data.forEach((item,index)=>{
|
||||||
item.wm = item.id;
|
item.wm = item.id;
|
||||||
item.count = item.count_cando;
|
item.count = item.count_canhandover;
|
||||||
totalCount += Number(item.count_cando);
|
totalCount += Number(item.count_canhandover);
|
||||||
item.tracking = item.material_.tracking;
|
item.tracking = item.material_.tracking;
|
||||||
if(item.material_.process_name){
|
if(item.material_.process_name){
|
||||||
item.process = item.material_.process_name;
|
item.process = item.material_.process_name;
|
||||||
|
@ -734,7 +742,7 @@ export default {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
if(that.form.handoverb&&that.form.handoverb.length>0){
|
if(that.form.handoverb&&that.form.handoverb.length>0){
|
||||||
that.form.handoverb.forEach((item) => {
|
that.form.handoverb.forEach((item) => {
|
||||||
if(item.batch == res.batch&&item.state==res.state){
|
if(item.batch == res.batch&&item.state==res.state&&item.defect==res.defect){
|
||||||
arr.push(item);
|
arr.push(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -760,9 +768,10 @@ export default {
|
||||||
if(item.material_.process_name){
|
if(item.material_.process_name){
|
||||||
obj.process = item.material_.process_name;
|
obj.process = item.material_.process_name;
|
||||||
}
|
}
|
||||||
obj.count_cando = item.count;
|
obj.count_cando = item.count_canhandover;
|
||||||
obj.count = item.count;
|
obj.count = item.count_canhandover;
|
||||||
obj.state = res.state;
|
obj.state = res.state;
|
||||||
|
obj.defect = res.defect;
|
||||||
obj.handoverbw = [];
|
obj.handoverbw = [];
|
||||||
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
|
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
|
||||||
let handoverbw = [];
|
let handoverbw = [];
|
||||||
|
@ -810,8 +819,8 @@ export default {
|
||||||
if(arr[0].material_.process_name){
|
if(arr[0].material_.process_name){
|
||||||
obj2.process = arr[0].material_.process_name;
|
obj2.process = arr[0].material_.process_name;
|
||||||
}
|
}
|
||||||
obj2.count_cando = arr[0].count;
|
obj2.count_cando = arr[0].count_canhandover;
|
||||||
obj2.count = arr[0].count;
|
obj2.count = arr[0].count_canhandover;
|
||||||
that.form.handoverb.push(obj2);
|
that.form.handoverb.push(obj2);
|
||||||
that.wm_in = "";
|
that.wm_in = "";
|
||||||
}
|
}
|
||||||
|
@ -866,7 +875,7 @@ export default {
|
||||||
if(item.material_.process_name){
|
if(item.material_.process_name){
|
||||||
obj2.process = item.material_.process_name;
|
obj2.process = item.material_.process_name;
|
||||||
}
|
}
|
||||||
obj2.count_cando = item.count;
|
obj2.count_cando = item.count_canhandover;
|
||||||
obj2.handoverbw = [];
|
obj2.handoverbw = [];
|
||||||
obj2.count = 1;
|
obj2.count = 1;
|
||||||
let obj3 = {};
|
let obj3 = {};
|
||||||
|
|
|
@ -187,6 +187,13 @@
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)&&scope.row.mtype == 10"
|
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)&&scope.row.mtype == 10"
|
||||||
>退回</el-button>
|
>退回</el-button>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
size="small"
|
||||||
|
type="danger"
|
||||||
|
@click="table_reBack2(scope.row)"
|
||||||
|
v-if="scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)"
|
||||||
|
>撤消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -474,6 +481,13 @@ export default {
|
||||||
that.$refs.table.queryData(that.query);
|
that.$refs.table.queryData(that.query);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//撤消
|
||||||
|
table_reBack2(row){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.handover.revert.req(row.id).then((res) => {
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
//退回
|
//退回
|
||||||
table_reBack(row){
|
table_reBack(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -52,29 +52,8 @@
|
||||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="110px"></el-table-column>
|
<el-table-column label="数量" prop="count_canhandover" width="110px"></el-table-column>
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
<!-- <el-select
|
|
||||||
v-model="selectItems"
|
|
||||||
placeholder="交接物料"
|
|
||||||
filterable
|
|
||||||
multiple
|
|
||||||
clearable
|
|
||||||
@change="materialChange"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in materialOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.batch"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
<span>{{ item.batch }}</span>
|
|
||||||
<span>({{ item.material_name }})</span>
|
|
||||||
<span v-if="item.defect_name !== null" style="color: orangered">{{ item.defect_name }}</span>
|
|
||||||
<span style="float: right">{{ item.count }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -379,33 +358,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取车间物料
|
|
||||||
// getMaterial() {
|
|
||||||
// let that = this;
|
|
||||||
// var req = {
|
|
||||||
// page: 0,
|
|
||||||
// state:10,
|
|
||||||
// tag:'done'
|
|
||||||
// };
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// req.mgroup = that.mgroupId;
|
|
||||||
// that.listParams = req;
|
|
||||||
// this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// res.forEach(item=>{
|
|
||||||
// if(that.codeText!==''&&item.batch === that.codeText){
|
|
||||||
// let obj = {};
|
|
||||||
// obj.wm = item.id;
|
|
||||||
// obj.batch = item.batch;
|
|
||||||
// obj.count = item.count_cando;
|
|
||||||
// obj.count_cando = item.count_cando;
|
|
||||||
// that.totalCount = item.count_cando;
|
|
||||||
// that.form.handoverb.push(obj)
|
|
||||||
// that.getResaveMgroups(item.material);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
getResaveMgroups(material){
|
getResaveMgroups(material){
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = {
|
||||||
|
@ -419,46 +371,6 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取车间不合格物料
|
|
||||||
// getMaterialNotok() {
|
|
||||||
// let that = this;
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// var req = {
|
|
||||||
// mgroupx: that.mgroupId,
|
|
||||||
// page: 0,
|
|
||||||
// state:20
|
|
||||||
// };
|
|
||||||
// that.listParams = req;
|
|
||||||
// this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// getMaterialRework(){
|
|
||||||
// let that = this;
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// var req = {
|
|
||||||
// mgroup: that.mgroupId,
|
|
||||||
// page: 0,
|
|
||||||
// tag : 'done'
|
|
||||||
// };
|
|
||||||
// that.listParams = req;
|
|
||||||
// this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
//获取废品库物料
|
|
||||||
// getMaterialFP() {
|
|
||||||
// let that = this;
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// var obj = {
|
|
||||||
// page: 0,
|
|
||||||
// state : 50,
|
|
||||||
// state_all: 1
|
|
||||||
// };
|
|
||||||
// that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
//获取交送工段人员
|
//获取交送工段人员
|
||||||
getUserList() {
|
getUserList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -538,7 +450,7 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
this.form.handoverb = data;
|
this.form.handoverb = data;
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
this.totalCount += Number(item.count_cando);
|
this.totalCount += Number(item.count);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -550,45 +462,36 @@ export default {
|
||||||
},
|
},
|
||||||
materialChange0(){
|
materialChange0(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {};
|
if(that.selectObj.count_canhandover>0){
|
||||||
obj.wm = that.selectObj.id;
|
let obj = {};
|
||||||
obj.batch = that.selectObj.batch;
|
obj.wm = that.selectObj.id;
|
||||||
obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
|
obj.state = that.selectObj.state;
|
||||||
obj.count = that.selectObj.count_cando;
|
obj.batch = that.selectObj.batch;
|
||||||
obj.defect_name = that.selectObj.defect_name;
|
obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
|
||||||
obj.count_cando = that.selectObj.count_cando;
|
obj.count = that.selectObj.count_canhandover;
|
||||||
obj.material = that.selectObj.material;
|
obj.defect = that.selectObj.defect;
|
||||||
if(that.form.handoverb.length>0){
|
obj.defect_name = that.selectObj.defect_name;
|
||||||
let datas = that.form.handoverb.filter((item) => {
|
obj.count_cando = that.selectObj.count_canhandover;
|
||||||
return item.wm==that.selectObj.id;
|
obj.material = that.selectObj.material;
|
||||||
});
|
if(that.form.handoverb.length>0){
|
||||||
if(datas.length>0){
|
let datas = that.form.handoverb.filter((item) => {
|
||||||
that.$message.warning('该物料已存在');
|
return item.wm==that.selectObj.id;
|
||||||
|
});
|
||||||
|
if(datas.length>0){
|
||||||
|
that.$message.warning('该物料已存在');
|
||||||
|
}else{
|
||||||
|
that.totalCount += Number(obj.count_canhandover);
|
||||||
|
that.form.handoverb.push(obj);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
that.totalCount += Number(obj.count_cando);
|
that.totalCount += Number(obj.count_canhandover);
|
||||||
that.form.handoverb.push(obj);
|
that.form.handoverb.push(obj);
|
||||||
}
|
}
|
||||||
|
that.getResaveMgroups(obj.material);
|
||||||
}else{
|
}else{
|
||||||
that.totalCount += Number(obj.count_cando);
|
that.$message.warning('该物料暂无可交接数量');
|
||||||
that.form.handoverb.push(obj);
|
|
||||||
}
|
}
|
||||||
that.getResaveMgroups(obj.material);
|
|
||||||
},
|
},
|
||||||
// materialChange() {
|
|
||||||
// let that = this;
|
|
||||||
// let totalCount = 0;
|
|
||||||
// let data = that.materialOptions.filter((item) => {
|
|
||||||
// return that.selectItems.indexOf(item.id)>-1;
|
|
||||||
// });
|
|
||||||
// data.forEach(item=>{
|
|
||||||
// item.wm = item.id;
|
|
||||||
// item.count = item.count_cando;
|
|
||||||
// totalCount += Number(item.count_cando);
|
|
||||||
// })
|
|
||||||
// that.totalCount = totalCount;
|
|
||||||
// that.form.handoverb = data;
|
|
||||||
// that.getResaveMgroups(data[0].material);
|
|
||||||
// },
|
|
||||||
countChange(){
|
countChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let totalCount = 0;
|
let totalCount = 0;
|
||||||
|
@ -676,7 +579,7 @@ export default {
|
||||||
let id = data.split('#')[1];
|
let id = data.split('#')[1];
|
||||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
let arr = that.form.handoverb.filter((item) => {
|
let arr = that.form.handoverb.filter((item) => {
|
||||||
return item.batch == res.batch;
|
return item.batch == res.batch&&item.state==res.state&&item.defect==res.defect;
|
||||||
})
|
})
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
that.$message.error("该批次已存在")
|
that.$message.error("该批次已存在")
|
||||||
|
@ -696,9 +599,11 @@ export default {
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||||
obj.count = item.count_cando;
|
obj.count = cando;
|
||||||
|
obj.state = item.state;
|
||||||
|
obj.defect = item.defect;
|
||||||
obj.defect_name = item.defect_name;
|
obj.defect_name = item.defect_name;
|
||||||
obj.count_cando = item.count_cando;
|
obj.count_cando = cando;
|
||||||
obj.material = item.material;
|
obj.material = item.material;
|
||||||
that.form.handoverb.push(obj)
|
that.form.handoverb.push(obj)
|
||||||
that.getResaveMgroups(obj.material);
|
that.getResaveMgroups(obj.material);
|
||||||
|
|
Loading…
Reference in New Issue