|
|
@ -4,7 +4,7 @@ |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|
|
|
<view class=""> |
|
|
|
<inspectComDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData" |
|
|
|
<inspectComDetailCard :dataContent="item" :jobContent="jobContent" @remove="updateData" |
|
|
|
:isShowBatch="false" @updateData='updateData'> |
|
|
|
</inspectComDetailCard> |
|
|
|
</view> |
|
|
@ -44,7 +44,8 @@ |
|
|
|
getPackingNumberAndBatch, |
|
|
|
} from '@/common/basic.js'; |
|
|
|
import { |
|
|
|
getInventoryStatusName |
|
|
|
getInventoryStatusName, |
|
|
|
|
|
|
|
} from '@/common/directory.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -87,11 +88,16 @@ |
|
|
|
businessTypeInfo: {}, |
|
|
|
locationTypeList: [], |
|
|
|
managementList: [], |
|
|
|
selectedItem: {} |
|
|
|
selectedItem: {}, |
|
|
|
failedQty:0, |
|
|
|
crackQty:0 |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
this.id = option.id; |
|
|
|
this.failedQty = option.failedQty; |
|
|
|
this.crackQty = option.crackQty; |
|
|
|
|
|
|
|
if (this.id != undefined) { |
|
|
|
// //新建的任务自动接收 |
|
|
|
// if (option.status == "1") { |
|
|
@ -172,6 +178,8 @@ |
|
|
|
} else { |
|
|
|
if (res.data.subList.length > 0) { |
|
|
|
that.jobContent = res.data; |
|
|
|
that.jobContent.failedQty= this.failedQty |
|
|
|
that.jobContent.crackQty = this.crackQty; |
|
|
|
that.subList = res.data.subList; |
|
|
|
that.subList.forEach(res => { |
|
|
|
res.batch = that.jobContent.batch |
|
|
@ -417,11 +425,11 @@ |
|
|
|
detail.failedQty = detail.failedQty; |
|
|
|
detail.crackQty = detail.crackQty; |
|
|
|
detail.notPassedQty = detail.notPassedQty; |
|
|
|
detail.goodQty = detail.qty - detail.failedQty - detail.crackQty; |
|
|
|
// detail.goodQty = detail.handleQty - detail.failedQty - detail.crackQty; |
|
|
|
detail.inspectUser = this.$store.state.user.id |
|
|
|
|
|
|
|
//合格数==样品数,全部合格 |
|
|
|
if (detail.goodQty == detail.qty) { |
|
|
|
if (detail.goodQty == detail.handleQty) { |
|
|
|
detail.toInventoryStatus = "OK" |
|
|
|
} else { |
|
|
|
//合格数!=样品数,全部合格 |
|
|
@ -432,15 +440,24 @@ |
|
|
|
detail.toInventoryStatus = "NOK" |
|
|
|
} |
|
|
|
} |
|
|
|
// detail.singlePrice = detail.balance.singlePrice; |
|
|
|
// detail.amount = detail.balance.singlePrice * detail.handleQty; |
|
|
|
|
|
|
|
detail.singlePrice = detail.balance.singlePrice; |
|
|
|
detail.amount = detail.balance.singlePrice * detail.handleQty; |
|
|
|
// detail.arriveDate = detail.balance.arriveDate; |
|
|
|
// detail.produceDate = detail.balance.produceDate; |
|
|
|
// detail.expireDate = detail.balance.expireDate; |
|
|
|
|
|
|
|
detail.arriveDate = detail.balance.arriveDate; |
|
|
|
detail.produceDate = detail.balance.produceDate; |
|
|
|
detail.expireDate = detail.balance.expireDate; |
|
|
|
list.push(detail) |
|
|
|
}else { |
|
|
|
detail.sampleQty = detail.qty; |
|
|
|
detail.failedQty = 0; |
|
|
|
detail.crackQty = 0; |
|
|
|
detail.notPassedQty = 0; |
|
|
|
detail.goodQty = detail.qty; |
|
|
|
detail.inspectUser = this.$store.state.user.id |
|
|
|
detail.toInventoryStatus = "OK" |
|
|
|
} |
|
|
|
|
|
|
|
list.push(detail) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.jobContent.subList = list |
|
|
@ -457,6 +474,7 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|