fix:车间库存检验记录
This commit is contained in:
parent
7831d87869
commit
29a9af5312
|
@ -15,7 +15,6 @@
|
||||||
stripe
|
stripe
|
||||||
:params="paramsObj"
|
:params="paramsObj"
|
||||||
>
|
>
|
||||||
<!-- <el-table-column type="index" width="50" /> -->
|
|
||||||
<el-table-column label="检验类型">
|
<el-table-column label="检验类型">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.type2 == 10">
|
<el-tag v-if="scope.row.type2 == 10">
|
||||||
|
@ -28,43 +27,16 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料批次" prop="batch">
|
<el-table-column label="物料批次" prop="batch">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总数" prop="count">
|
<el-table-column label="检验数" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验数">
|
<el-table-column label="合格数" prop="count_ok">
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling }}</span>
|
|
||||||
<span v-else>{{ scope.row.count }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="合格数">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok }}</span>
|
|
||||||
<span v-else>{{ scope.row.count_ok }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不合格数" prop="count_notok">
|
<el-table-column label="不合格数" prop="count_notok">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合格率">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok/scope.row.count_sampling*100 }}%</span>
|
|
||||||
<span v-else>{{ scope.row.count_ok/scope.row.count*100 }}%</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="检验日期" prop="test_date">
|
<el-table-column label="检验日期" prop="test_date">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验人" prop="test_user_name">
|
<el-table-column label="检验人" prop="test_user_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作" fixed="right" width="60">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
v-auth="'ftestwork.update'"
|
|
||||||
@click="table_del(scope.row)"
|
|
||||||
>删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
<span>{{ item.batch }}</span>
|
<span>{{ item.batch }}</span>
|
||||||
<span v-if="item.material_">({{ item.material_.process_name }})</span>
|
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
|
||||||
|
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<span>{{ item.count }}</span>
|
<span>{{ item.count }}</span>
|
||||||
|
@ -168,8 +168,16 @@
|
||||||
<span>{{ listItem.count_cando }}</span>
|
<span>{{ listItem.count_cando }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7" >
|
||||||
<el-form-item label="交接数量">
|
<el-form-item label="" style="position: relative;">
|
||||||
|
<div style="position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -80px;
|
||||||
|
width: 80px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;"
|
||||||
|
@click="showbw($index)"
|
||||||
|
>交接数量</div>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="listItem.count"
|
v-model="listItem.count"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@ -189,6 +197,16 @@
|
||||||
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-card shadow="false" v-if="bwVisible" style="position: relative;">
|
||||||
|
<template #header>
|
||||||
|
<div style="width: 10px;height: 35px;"></div>
|
||||||
|
<el-icon style="position: absolute;right: 10px;top: 10px;font-size: 25px;" @click="bwVisibleClose"><el-icon-circle-close /></el-icon>
|
||||||
|
</template>
|
||||||
|
<div v-for="(item2,index2) in form.handoverb[bwIndex].handoverbw" :key="item2" style="display: flex;justify-content: space-between;padding-bottom: 10px;padding-left: 10px;">
|
||||||
|
<span>{{ item2.number }}</span>
|
||||||
|
<el-button @click="deletebw(index2)" type="primary">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="total-count">总计:{{ totalCount }}</div>
|
<div class="total-count">总计:{{ totalCount }}</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -292,6 +310,7 @@ export default {
|
||||||
},
|
},
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
|
bwIndex:0,
|
||||||
userList: [],
|
userList: [],
|
||||||
userList2: [],
|
userList2: [],
|
||||||
deptOptions:[],
|
deptOptions:[],
|
||||||
|
@ -299,6 +318,7 @@ export default {
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
addShow: false,
|
addShow: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
|
bwVisible:false,
|
||||||
scanVisible:false,
|
scanVisible:false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
|
@ -338,6 +358,18 @@ export default {
|
||||||
that.getMgroupOptions();
|
that.getMgroupOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deletebw(index){
|
||||||
|
this.form.handoverb[this.bwIndex].handoverbw.splice(index,1);
|
||||||
|
this.form.handoverb[this.bwIndex].count--;
|
||||||
|
},
|
||||||
|
showbw(index){
|
||||||
|
this.bwIndex = index;
|
||||||
|
console.log('this.form.handoverb[index].handoverbw',this.form.handoverb[index].handoverbw);
|
||||||
|
this.bwVisible = true;
|
||||||
|
},
|
||||||
|
bwVisibleClose(){
|
||||||
|
this.bwVisible = false;
|
||||||
|
},
|
||||||
//获取部门列表
|
//获取部门列表
|
||||||
getDeptOptions() {
|
getDeptOptions() {
|
||||||
this.$API.system.dept.list
|
this.$API.system.dept.list
|
||||||
|
@ -557,7 +589,7 @@ export default {
|
||||||
indexs = index;
|
indexs = index;
|
||||||
return item.wm == res.wm;
|
return item.wm == res.wm;
|
||||||
})
|
})
|
||||||
//有handoverb
|
//handoverb里有这个物料批次
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
//判断是否有wpr,若无将wpr放进去
|
//判断是否有wpr,若无将wpr放进去
|
||||||
if(arr[0].handoverbw&&arr[0].handoverbw.length>0){
|
if(arr[0].handoverbw&&arr[0].handoverbw.length>0){
|
||||||
|
@ -570,28 +602,36 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
obj1.wpr = res.id;
|
obj1.wpr = res.id;
|
||||||
|
obj1.number = res.number;
|
||||||
|
that.form.handoverb[indexs].count+=1;
|
||||||
that.form.handoverb[indexs].handoverbw.push(obj1);
|
that.form.handoverb[indexs].handoverbw.push(obj1);
|
||||||
|
console.log('1',that.form);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.form.handoverb[indexs].handoverbw = [];
|
that.form.handoverb[indexs].handoverbw = [];
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
obj1.wpr = res.id;
|
obj1.wpr = res.id;
|
||||||
|
obj1.number = res.number;
|
||||||
|
that.form.handoverb[indexs].count=1;
|
||||||
that.form.handoverb[indexs].handoverbw.push(obj1);
|
that.form.handoverb[indexs].handoverbw.push(obj1);
|
||||||
|
console.log('2',that.form);
|
||||||
}
|
}
|
||||||
}else{//无handoverb
|
}else{//handoverb里没有有这个物料批次
|
||||||
that.materialOptions.forEach((item) => {
|
that.materialOptions.forEach((item) => {
|
||||||
console.log('item.id',item.id);
|
console.log('item.id',item.id);
|
||||||
if(item.id == res.wm){
|
if(item.id == res.wm){
|
||||||
let obj2 = {};
|
let obj2 = {};
|
||||||
obj2.wm = item.id;
|
obj2.wm = item.id;
|
||||||
obj2.batch = item.batch;
|
obj2.batch = item.batch;
|
||||||
obj2.counts = item.count;
|
obj2.count_cando = item.count;
|
||||||
obj2.handoverbw = [];
|
obj2.handoverbw = [];
|
||||||
obj2.count = 1;
|
obj2.count = 1;
|
||||||
let obj3 = {};
|
let obj3 = {};
|
||||||
obj3.wpr = res.id;
|
obj3.wpr = res.id;
|
||||||
|
obj3.number = res.number;
|
||||||
obj2.handoverbw.push(obj3);
|
obj2.handoverbw.push(obj3);
|
||||||
that.form.handoverb.push(obj2);
|
that.form.handoverb.push(obj2);
|
||||||
|
console.log('3',that.form);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -600,7 +640,7 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
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;
|
||||||
})
|
})
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
that.$message.error("该批次已存在")
|
that.$message.error("该批次已存在")
|
||||||
|
@ -610,9 +650,10 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
obj.counts = item.count;
|
obj.count_cando = item.count;
|
||||||
obj.count = item.count;
|
obj.count = item.count;
|
||||||
that.form.handoverb.push(obj)
|
that.form.handoverb.push(obj);
|
||||||
|
console.log('4',that.form);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue