|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class="page-wraper" style="background-color: #fff;"> |
|
|
|
|
|
|
|
<view class="header" > |
|
|
|
<view class="header"> |
|
|
|
<view class=""> |
|
|
|
<com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view> |
|
|
|
</view> |
|
|
@ -132,7 +132,9 @@ |
|
|
|
import { |
|
|
|
Exception |
|
|
|
} from 'sass'; |
|
|
|
import { nextTick } from 'vue'; |
|
|
|
import { |
|
|
|
nextTick |
|
|
|
} from 'vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
@ -273,9 +275,9 @@ import { nextTick } from 'vue'; |
|
|
|
console.log(JSON.stringify(params)) |
|
|
|
|
|
|
|
let list = [] |
|
|
|
try{ |
|
|
|
try { |
|
|
|
var planData = await planReceiptSubmit(params) |
|
|
|
console.log('planData',planData) |
|
|
|
console.log('planData', planData) |
|
|
|
if (planData.data) { |
|
|
|
|
|
|
|
planData.data.forEach(item => { |
|
|
@ -300,9 +302,9 @@ import { nextTick } from 'vue'; |
|
|
|
} else { |
|
|
|
throw new Error("提交失败") |
|
|
|
} |
|
|
|
}catch(error){ |
|
|
|
console.log('异常',error) |
|
|
|
if(error.indexOf('请返回开工阶段')>-1){ |
|
|
|
} catch (error) { |
|
|
|
console.log('异常', error) |
|
|
|
if (error.indexOf('请返回开工阶段') > -1) { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage('计划已完成') |
|
|
|
this.clearData() |
|
|
@ -333,21 +335,16 @@ import { nextTick } from 'vue'; |
|
|
|
|
|
|
|
var queryParams = { |
|
|
|
filters: [{ |
|
|
|
column: "plan_type", |
|
|
|
action: "==", |
|
|
|
value: "assemble" |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "number", |
|
|
|
action: "==", |
|
|
|
value: this.dataContent.planNumber |
|
|
|
} |
|
|
|
], |
|
|
|
column: "number", |
|
|
|
action: "==", |
|
|
|
value: this.dataContent.planNumber |
|
|
|
}], |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
} |
|
|
|
|
|
|
|
let isAllSubmit = Number(Number(this.dataContent.goodQty)+ Number(this.showList.length))==Number(this.dataContent.planQty) |
|
|
|
let isAllSubmit = Number(Number(this.dataContent.goodQty) + Number(this.showList.length)) == |
|
|
|
Number(this.dataContent.planQty) |
|
|
|
|
|
|
|
var planeInfo = await getPlanByNumber(queryParams); |
|
|
|
if (planeInfo.data && planeInfo.data.list.length > 0) { |
|
|
@ -360,7 +357,7 @@ import { nextTick } from 'vue'; |
|
|
|
this.dataContent.goodQty = planeInfo.data.list[0].goodQty |
|
|
|
this.dataContent.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[ |
|
|
|
0].goodQty), |
|
|
|
this.dataContent.subList = [] |
|
|
|
this.dataContent.subList = [] |
|
|
|
this.showList = []; |
|
|
|
this.allList = [] |
|
|
|
this.index = 1 |
|
|
@ -370,16 +367,16 @@ import { nextTick } from 'vue'; |
|
|
|
// throw new Error("未查找到单据信息") |
|
|
|
// } |
|
|
|
uni.hideLoading() |
|
|
|
if(isAllSubmit){ |
|
|
|
if (isAllSubmit) { |
|
|
|
this.clearData() |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.showList = []; |
|
|
|
this.allList = []; |
|
|
|
this.index = 1; |
|
|
|
this.dataContent.handleQty = 0; |
|
|
|
} |
|
|
|
|
|
|
|
nextTick(()=>{ |
|
|
|
nextTick(() => { |
|
|
|
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) |
|
|
|
}) |
|
|
|
|
|
|
@ -469,7 +466,8 @@ import { nextTick } from 'vue'; |
|
|
|
// this.dataContent.handleQty = this.allList.length; |
|
|
|
// dataContent.noGoodQty 未完工 |
|
|
|
|
|
|
|
if (this.dataContent.handleQty == this.dataContent.packQty || (this.dataContent.noGoodQty<this.dataContent.packQty&&this.dataContent.handleQty == this.dataContent.noGoodQty)) { |
|
|
|
if (this.dataContent.handleQty == this.dataContent.packQty || (this.dataContent.noGoodQty < this |
|
|
|
.dataContent.packQty && this.dataContent.handleQty == this.dataContent.noGoodQty)) { |
|
|
|
if (this.$refs.scanPopup) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
} |
|
|
@ -487,7 +485,7 @@ import { nextTick } from 'vue'; |
|
|
|
this.$refs.scanPopup.losefocus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
getH5BatchPrintingLable( number) { |
|
|
|
getH5BatchPrintingLable(number) { |
|
|
|
let _this = this |
|
|
|
batchPrintingLable(number).then(resLable => { |
|
|
|
console.log('batchPrintingLable', resLable) |
|
|
@ -503,7 +501,7 @@ import { nextTick } from 'vue'; |
|
|
|
_this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
print(pointData){ |
|
|
|
print(pointData) { |
|
|
|
let _this = this |
|
|
|
|
|
|
|
// #ifdef APP |
|
|
@ -515,10 +513,10 @@ import { nextTick } from 'vue'; |
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
let packingNumber = [] |
|
|
|
pointData.forEach(item=>{ |
|
|
|
pointData.forEach(item => { |
|
|
|
packingNumber.push(item.packageCode) |
|
|
|
}) |
|
|
|
if(packingNumber.length==0){ |
|
|
|
if (packingNumber.length == 0) { |
|
|
|
_this.showErrorMessage('包装号不能为空!') |
|
|
|
return |
|
|
|
} |
|
|
@ -555,8 +553,6 @@ import { nextTick } from 'vue'; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|