Commit 98cd840f authored by 沈翠玲's avatar 沈翠玲

投料校验

parent e1bfa2c2
......@@ -609,7 +609,11 @@
</uni-tr>
</uni-table>
</scroll-view>
<view class="sum">共{{feedingInspectionList.length}}条</view>
<view class="sum">
<view class="pro-wrapper"><progress :percent="computedPercentage" show-info stroke-width="10" /></view>
<view>已校验:{{ computedAttr3 }}条</view>
<view>共{{feedingInspectionList.length}}条</view>
</view>
</view>
</view>
</u-modal>
......@@ -1542,6 +1546,16 @@ export default {
computed: {
computedQuantity() {
return this.feedbackForm.quantityQualify + this.feedbackForm.quantityUnqualify;
},
computedAttr3 () {
const list = this.feedingInspectionList.filter(v=>v.attr3 == 1)
return list.length
},
computedPercentage () {
if (!this.feedingInspectionList || this.feedingInspectionList.length === 0) return 100
let per = (this.computedAttr3 / this.feedingInspectionList.length) * 100
per = Math.round(per)
return per
}
},
methods: {
......@@ -1578,27 +1592,37 @@ export default {
handleUpdateKnifeTemp(code) {
if (this.knifeTempType === '1') {
if(this.tableSelectData[0].isExistTool === '1') {
this.$u.api.dModel.checkIsExsitToolWindow({ type: this.knifeTempType, sn: code, taskWorkunitId: this.tableSelectData[0].taskWorkunitId }).then((res) => {
if (res.code === 200) {
if (res.data) {
uni.showModal({
title: '系统提示',
content: '是否新增刀模版和产品工序的关联?',
success: (res) => {
if (res.confirm) {
this.confirmKnifeTemp(code)
} else {
this.$u.toast("刀模版SN不一致")
const [wlbm, ] = code.split('-')
const item = this.dModelData.find(v=>v.sapItemCode === wlbm)
if(item) {
if (item.typeName === '已上机') {
this.$u.toast('已上机,重复扫码')
} else {
this.confirmKnifeTemp(code)
}
} else {
this.$u.api.dModel.checkIsExsitToolWindow({ type: this.knifeTempType, sn: code, taskWorkunitId: this.tableSelectData[0].taskWorkunitId }).then((res) => {
if (res.code === 200) {
if (res.data) {
uni.showModal({
title: '系统提示',
content: '是否新增刀模版和产品工序的关联?',
success: (res) => {
if (res.confirm) {
this.confirmKnifeTemp(code)
} else {
this.$u.toast("刀模版SN不一致")
}
}
}
})
})
} else {
this.confirmKnifeTemp(code)
}
} else {
this.confirmKnifeTemp(code)
this.$u.toast(res.msg)
}
} else {
this.$u.toast(res.msg)
}
})
})
}
} else {
this.confirmKnifeTemp(code)
}
......@@ -3360,8 +3384,14 @@ export default {
position: absolute;
bottom: -30px;
right: 5px;
display: flex;
font-size: 14px;
.pro-wrapper {
width: 400rpx;
}
view {
margin-right: 10rpx;
}
}
}
.mynotable {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment