|
@ -42,7 +42,8 @@ |
|
|
inspectJobSubmit, |
|
|
inspectJobSubmit, |
|
|
deleteFileById, |
|
|
deleteFileById, |
|
|
getFileList, |
|
|
getFileList, |
|
|
deleteFileByTable |
|
|
deleteFileByTable, |
|
|
|
|
|
createPutAwayRequest |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
goHome, |
|
|
goHome, |
|
@ -98,7 +99,7 @@ |
|
|
fromInventoryStatuses: "", |
|
|
fromInventoryStatuses: "", |
|
|
managementList: [], |
|
|
managementList: [], |
|
|
selectedItem: {}, |
|
|
selectedItem: {}, |
|
|
jobStatus:"" |
|
|
jobStatus: "" |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
@ -125,7 +126,7 @@ |
|
|
onBackPress(e) { |
|
|
onBackPress(e) { |
|
|
//已经接收但是没提交任务 |
|
|
//已经接收但是没提交任务 |
|
|
if (e.from == 'backbutton') { |
|
|
if (e.from == 'backbutton') { |
|
|
if (this.jobStatus=="2") { |
|
|
if (this.jobStatus == "2") { |
|
|
//取消承接任务 |
|
|
//取消承接任务 |
|
|
cancleTakeInspectJob(this.id).then(res => { |
|
|
cancleTakeInspectJob(this.id).then(res => { |
|
|
uni.navigateBack(); |
|
|
uni.navigateBack(); |
|
@ -151,10 +152,9 @@ |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
deleteFileByTable(id) { |
|
|
deleteFileByTable(id) { |
|
|
deleteFileByTable("jobInspectDetail", id).then(res=>{ |
|
|
deleteFileByTable("jobInspectDetail", id).then(res => {}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
clearPicList(subList) { |
|
|
clearPicList(subList) { |
|
|
subList.forEach(item => { |
|
|
subList.forEach(item => { |
|
|
this.deleteFileByTable(item.id) |
|
|
this.deleteFileByTable(item.id) |
|
@ -247,8 +247,8 @@ |
|
|
for (let item of this.detailSource) { |
|
|
for (let item of this.detailSource) { |
|
|
for (let detail of item.subList) { |
|
|
for (let detail of item.subList) { |
|
|
if (detail != undefined && detail.scaned) { |
|
|
if (detail != undefined && detail.scaned) { |
|
|
failedQty= calc.add(failedQty,detail.failedQty) |
|
|
failedQty = calc.add(failedQty, detail.failedQty) |
|
|
crackQty= calc.add(crackQty,detail.crackQty) |
|
|
crackQty = calc.add(crackQty, detail.crackQty) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -379,10 +379,6 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submitJob() { |
|
|
submitJob() { |
|
@ -397,6 +393,13 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data) |
|
|
|
|
|
//创建完检验记录后创建上架申请 |
|
|
|
|
|
createPutAwayRequest(res.data).then(putawayres => { |
|
|
|
|
|
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data) |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
this.showErrorMessage(error); |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
} |
|
|
} |
|
@ -462,8 +465,8 @@ |
|
|
detail.failedQty = detail.failedQty; |
|
|
detail.failedQty = detail.failedQty; |
|
|
detail.crackQty = detail.crackQty; |
|
|
detail.crackQty = detail.crackQty; |
|
|
detail.notPassedQty = detail.failedQty; |
|
|
detail.notPassedQty = detail.failedQty; |
|
|
var tempQty = calc.sub(detail.handleQt,detail.failedQty) |
|
|
var tempQty = calc.sub(detail.handleQty, detail.failedQty) |
|
|
detail.goodQty = calc.sub(tempQty,detail.crackQty) ; |
|
|
detail.goodQty = calc.sub(tempQty, detail.crackQty); |
|
|
detail.inspectUser = this.$store.state.user.id |
|
|
detail.inspectUser = this.$store.state.user.id |
|
|
|
|
|
|
|
|
//合格数==样品数,全部合格 |
|
|
//合格数==样品数,全部合格 |
|
@ -518,6 +521,7 @@ |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.page-wraper { |
|
|
.page-wraper { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
@ -546,4 +550,4 @@ |
|
|
background: #e0e0e0; |
|
|
background: #e0e0e0; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |