|
@ -1,57 +1,95 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page-wraper" style="background-color: #fff;"> |
|
|
<view class="page-wraper" style="background-color: #fff;"> |
|
|
|
|
|
|
|
|
|
|
|
<view class="header"> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view> |
|
|
<com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="" v-if="dataContent"> |
|
|
<view class="page-wraper" v-if="dataContent"> |
|
|
|
|
|
<view class="" style="font-size: 35rpx;padding: 10rpx; padding-left: 15rpx;"> |
|
|
<view class="" style="font-size: 35rpx;padding: 10rpx; padding-left: 15rpx;"> |
|
|
生产计划:{{dataContent.number}} |
|
|
生产计划:{{dataContent.planNumber}} |
|
|
</view> |
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
|
<view class=""> |
|
|
|
|
|
<item-qty :dataContent="dataContent" :isShowBalanceQty="false"></item-qty> |
|
|
<view class="cell_box uni-flex uni-row"> |
|
|
|
|
|
<view class="cell_info"> |
|
|
|
|
|
<view class="text_lightblue">计划数</view> |
|
|
|
|
|
<view>{{dataContent.planQty}}{{dataContent.uom}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="cell_info"> |
|
|
|
|
|
<view class="text_lightblue">已完工</view> |
|
|
|
|
|
<view>{{ dataContent.goodQty }}{{dataContent.uom}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="cell_info"> |
|
|
|
|
|
<view class="text_lightblue">未完工</view> |
|
|
|
|
|
<view>{{dataContent.noGoodQty}}{{dataContent.uom}}</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view class='split_line'></view> |
|
|
<view class="" style="margin-left: 20rpx;"> |
|
|
|
|
|
|
|
|
<view class="" style="padding-top: 10rpx; padding-bottom: 10rpx; margin-left: 10rpx;"> |
|
|
|
|
|
<item :dataContent="dataContent"></item> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class='split_line'></view> |
|
|
|
|
|
<view class="uni-flex uni-row space-between" style="align-items: center"> |
|
|
|
|
|
<view style="word-break: break-all;"> |
|
|
<batch :batch="dataContent.batch"></batch> |
|
|
<batch :batch="dataContent.batch"></batch> |
|
|
<view class="card_view "> |
|
|
<view class="card_view "> |
|
|
<text style="color: #FFA500;padding: 5px;font-size: 35rpx;">包装规格</text> |
|
|
<text style="color: #FFA500;padding: 5px;font-size: 30rpx;">包装规格</text> |
|
|
<text class="card_content ">{{dataContent.packUnit}} </text> |
|
|
<text class="card_content ">{{dataContent.packUnit}} </text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class='split_line'></view> |
|
|
<view style="word-break: break-all; font-size: 35rpx; font-weight: bold;"> |
|
|
<view class="page-main"> |
|
|
<text v-if="dataContent.handleQty>0" style="color: #FFA500;">{{dataContent.handleQty}}/</text> |
|
|
|
|
|
{{dataContent.packQtyHint}} |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
<view class='split_line' v-if="dataContent"></view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view style="margin-top: 480rpx; padding-bottom: 160rpx;" v-if="dataContent"> |
|
|
|
|
|
|
|
|
|
|
|
<scroll-view scroll-y="true" class=""> |
|
|
|
|
|
<view class="scan_view" v-for="(item, index) in showList" :key="index"> |
|
|
<uni-swipe-action> |
|
|
<uni-swipe-action> |
|
|
<view class="scan_view" v-for="(item, index) in dataContent.subList" :key="index"> |
|
|
|
|
|
<uni-swipe-action-item :right-options="options" @click="swipeClick($event,item,index)"> |
|
|
<uni-swipe-action-item :right-options="options" @click="swipeClick($event,item,index)"> |
|
|
<view class="" style="margin-left: 40rpx; padding-top: 10rpx; padding-bottom: 10rpx;"> |
|
|
<view class="uni-flex uni-row " |
|
|
<text style="font-size: 35rpx;color: #B66463;">唯一码</text> |
|
|
style="margin-left: 50rpx; padding-top: 10rpx; padding-bottom: 10rpx;"> |
|
|
<text style="font-size: 35rpx;"> {{item.code}}</text> |
|
|
<view class="auto-wrap" style="font-size: 35rpx;font-weight: bold; width: 100%;"> |
|
|
|
|
|
<text style="font-size: 30rpx;color: #B66463;">唯一码 </text> |
|
|
|
|
|
{{item.content}} |
|
|
</view> |
|
|
</view> |
|
|
</uni-swipe-action-item> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</uni-swipe-action-item> |
|
|
</uni-swipe-action> |
|
|
</uni-swipe-action> |
|
|
|
|
|
<u-line color="#D8D8D8"></u-line> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
<uni-load-more :status="loadingType" v-if="showList.length>0" /> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="page-footer"> |
|
|
<view class="page-footer" v-if="dataContent"> |
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
<view class="uni-flex u-col-center space-between " style="background-color:ghostwhite; width: 100%; "> |
|
|
style="background-color:ghostwhite; width: 100%; "> |
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class="uni-flex uni-row"> |
|
|
<view class="uni-flex uni-row"> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<view class=" uni-flex uni-row"> |
|
|
<button class="btn_single_clear" style="margin-right: 50rpx;" hover-class="btn_clear_after" |
|
|
<button class="btn_single_clear" hover-class="btn_commit_after" style="margin-right: 50rpx;" |
|
|
@click="clear">清空</button> |
|
|
@click="clear">清空</button> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
<comReceiptPopup ref="comReceiptPopup" @confirm='requestConfirm'></comReceiptPopup> |
|
|
<comReceiptPopup ref="comReceiptPopup" @confirm='requestConfirm'></comReceiptPopup> |
|
|
<win-scan-button v-if="dataContent" @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-button v-if="dataContent" @goScan='openScanPopup'></win-scan-button> |
|
|
<win-scan-fg-label ref="scanPopup" @getResult='getScanResult' title='制品标签'></win-scan-fg-label> |
|
|
<win-scan-fg-label ref="scanPopup" @getResult='getScanResult' title='制品标签'></win-scan-fg-label> |
|
@ -62,32 +100,53 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
isCheckMesCode, |
|
|
isCheckMesCode, |
|
|
planReceiptSubmit |
|
|
planReceiptSubmit, |
|
|
|
|
|
createPutawayRequestByPlan, |
|
|
|
|
|
createInspectRequestByPlan, |
|
|
|
|
|
getPlanByNumber |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
getRemoveOption |
|
|
calc |
|
|
|
|
|
} from '@/common/calc.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
getRemoveOption, |
|
|
|
|
|
deepCopyData, |
|
|
|
|
|
getCurrDateTime, |
|
|
|
|
|
compare |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
import comReceiptPopup from '@/pages/fg/coms/comReceiptPopup.vue' |
|
|
import comReceiptPopup from '@/pages/fg/coms/comReceiptPopup.vue' |
|
|
import itemQty from '@/mycomponents/item/itemQty.vue' |
|
|
import item from '@/mycomponents/item/item.vue' |
|
|
import batch from '@/mycomponents/balance/batch.vue' |
|
|
import batch from '@/mycomponents/balance/batch.vue' |
|
|
import pack from '@/mycomponents/balance/pack.vue' |
|
|
import pack from '@/mycomponents/balance/pack.vue' |
|
|
import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue" |
|
|
import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue" |
|
|
|
|
|
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue" |
|
|
|
|
|
import { |
|
|
|
|
|
Exception |
|
|
|
|
|
} from 'sass'; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
comBlankView, |
|
|
comBlankView, |
|
|
comReceiptPopup, |
|
|
comReceiptPopup, |
|
|
itemQty, |
|
|
item, |
|
|
batch, |
|
|
batch, |
|
|
pack, |
|
|
pack, |
|
|
winScanButton, |
|
|
winScanButton, |
|
|
winScanFgLabel |
|
|
winScanFgLabel, |
|
|
|
|
|
comFgCard |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
dataContent: null, |
|
|
dataContent: null, |
|
|
options: [] |
|
|
options: [], |
|
|
|
|
|
showList: [], |
|
|
|
|
|
allList: [], |
|
|
|
|
|
index: 1, |
|
|
|
|
|
loadingType: "", |
|
|
|
|
|
pageSize: 20 |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
@ -97,11 +156,29 @@ |
|
|
this.options = getRemoveOption() |
|
|
this.options = getRemoveOption() |
|
|
this.openFg(); |
|
|
this.openFg(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
onReachBottom() { |
|
|
|
|
|
console.log("onReachBottom") |
|
|
|
|
|
//避免多次触发 |
|
|
|
|
|
if (this.loadingType == 'nomore') { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
this.index++; |
|
|
|
|
|
var list = this.getDataPage(this.index, this.pageSize) |
|
|
|
|
|
if (list.length > 0) { |
|
|
|
|
|
// this.showList=list |
|
|
|
|
|
this.showList = this.showList.concat(list) |
|
|
|
|
|
} else { |
|
|
|
|
|
//没有更多了 |
|
|
|
|
|
this.loadingType = "nomore"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
|
|
|
openFg() { |
|
|
openFg() { |
|
|
setTimeout(res => { |
|
|
setTimeout(res => { |
|
|
if (this.$refs.comReceiptPopup) { |
|
|
if (this.$refs.comReceiptPopup) { |
|
@ -113,49 +190,173 @@ |
|
|
requestConfirm(result) { |
|
|
requestConfirm(result) { |
|
|
this.dataContent = { |
|
|
this.dataContent = { |
|
|
itemCode: result.itemCode, |
|
|
itemCode: result.itemCode, |
|
|
number: result.number, //计划单号 |
|
|
planNumber: result.planNumber, //计划单号 |
|
|
handleQty: 0, |
|
|
handleQty: 0, |
|
|
qty: result.planQty, |
|
|
qty: 0, |
|
|
batch: result.batch, |
|
|
planQty: result.planQty, |
|
|
packUnit: "3031", |
|
|
goodQty: result.goodQty, |
|
|
|
|
|
noGoodQty: calc.sub(result.planQty, result.goodQty), |
|
|
|
|
|
packQtyHint: result.packQtyHint, |
|
|
|
|
|
packQty: result.packQty, |
|
|
uom: result.uom, |
|
|
uom: result.uom, |
|
|
subList: [{ |
|
|
batch: result.batch, |
|
|
code: "1234" |
|
|
packUnit: result.packUnit, |
|
|
|
|
|
workStationCode: result.workStationCode, |
|
|
|
|
|
subList: [] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
initList() { |
|
|
|
|
|
this.index = 1; |
|
|
|
|
|
this.showList = [] |
|
|
|
|
|
this.loadingType = ""; |
|
|
|
|
|
this.showList = this.getDataPage(this.index, this.pageSize) |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
code: "12345" |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
getDataPage(pageNo, pageSize) { |
|
|
|
|
|
//计算总页数 |
|
|
|
|
|
var totalPages = Math.ceil(this.allList.length / pageSize); |
|
|
|
|
|
//当前页起始索引 |
|
|
|
|
|
const start = (pageNo - 1) * pageSize; |
|
|
|
|
|
const end = start + pageSize; //当前页结束索引 |
|
|
|
|
|
return this.allList.slice(start, end) |
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
swipeClick(e, dataContent, index) { |
|
|
swipeClick(e, dataContent, index) { |
|
|
if (e.content.text == "移除") { |
|
|
if (e.content.text == "移除") { |
|
|
this.dataContent.subList.splice(index,1); |
|
|
this.$refs.comMessage.showQuestionMessage("是否要移除", res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.allList.splice(index, 1); |
|
|
|
|
|
this.initList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
commit() { |
|
|
async commit() { |
|
|
planReceiptSubmit(params).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
if (this.allList.length == 0) { |
|
|
if (res.data) { |
|
|
this.showErrorMessage("请先扫描唯一码") |
|
|
this.showCommitSuccessMessage(res.data) |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
let params = this.setParams() |
|
|
|
|
|
console.log(JSON.stringify(params)) |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "提交中...", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
let list = [] |
|
|
|
|
|
var planData = await planReceiptSubmit(params) |
|
|
|
|
|
if (planData.data) { |
|
|
|
|
|
|
|
|
|
|
|
planData.data.forEach(item => { |
|
|
|
|
|
list.push({ |
|
|
|
|
|
itemCode: item.itemCode, // 物品代码 |
|
|
|
|
|
itemName: item.itemName, // 物品名称 |
|
|
|
|
|
packName: item.packName, // 包装名称 |
|
|
|
|
|
packageCode: item.toPackingNumber, // 包装号 |
|
|
|
|
|
batch: item.toBatch, //批次 |
|
|
|
|
|
parentNumber: item.parentNumber, //父包装号 |
|
|
|
|
|
itemType: item.itemType, //物料类型 |
|
|
|
|
|
asnNumber: item.asnNumber, //ASN |
|
|
|
|
|
supplierCode: item.supplierCode, // 供应商 |
|
|
|
|
|
qty: item.qty, // 数量 |
|
|
|
|
|
printTimes: getCurrDateTime(), // 打印时间 |
|
|
|
|
|
productionLineCode: item.productionLineCode, //生产线 |
|
|
|
|
|
barcodeString: item.barcodeString, // 标签信息 |
|
|
|
|
|
barcodeBase64: '', |
|
|
|
|
|
requestNumber: item.requestNumber |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
throw new Error("提交失败") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
createPutawayRequestByPlan(list[0].requestNumber).then(res=>{ |
|
|
|
|
|
createInspectRequestByPlan(list[0].requestNumber) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var queryParams = { |
|
|
|
|
|
filters: [{ |
|
|
|
|
|
column: "plan_type", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "assemble" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
column: "number", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.dataContent.planNumber |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var planeInfo = await getPlanByNumber(queryParams); |
|
|
|
|
|
if (planeInfo.data && planeInfo.data.list.length > 0) { |
|
|
|
|
|
if (planeInfo.data.list[0].goodQty >= planeInfo.data.list[0].planQty) { |
|
|
|
|
|
this.clear(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dataContent.planNumber = planeInfo.data.list[0].number; |
|
|
|
|
|
this.dataContent.handleQty = 0; |
|
|
|
|
|
this.dataContent.planQty = planeInfo.data.list[0].planQty |
|
|
|
|
|
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.showList=[]; |
|
|
|
|
|
this.allList=[] |
|
|
|
|
|
this.index=1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
throw new Error("未查找到单据信息") |
|
|
} |
|
|
} |
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成报工记录<br>", list) |
|
|
|
|
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
var hint = error.message ? error.message : error |
|
|
|
|
|
this.showErrorMessage(hint) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setParams() { |
|
|
|
|
|
this.allList.forEach(res => { |
|
|
|
|
|
res.outsideItemCode = res.itemCode |
|
|
|
|
|
res.outsideProduceDate = null |
|
|
|
|
|
res.outsideSerialNumber = res.order |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.dataContent.subList = this.allList |
|
|
|
|
|
|
|
|
|
|
|
return this.dataContent |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
clear() { |
|
|
clear() { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("是否要清空?", res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.clearData() |
|
|
|
|
|
this.openFg(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
clearData() { |
|
|
|
|
|
this.dataContent = null |
|
|
|
|
|
this.showList = [] |
|
|
|
|
|
this.allList = [] |
|
|
|
|
|
this.index = 1; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
var itemCode = this.dataContent.itemCode |
|
|
var itemCode = this.dataContent.itemCode |
|
|
// itemCode = "015553147" |
|
|
|
|
|
console.log("物料", itemCode) |
|
|
console.log("物料", itemCode) |
|
|
this.$refs.scanPopup.openScanPopup(itemCode); |
|
|
this.$refs.scanPopup.openScanPopup(itemCode); |
|
|
}, |
|
|
}, |
|
@ -166,27 +367,34 @@ |
|
|
isCheckMesCode(result.content).then(res => { |
|
|
isCheckMesCode(result.content).then(res => { |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
if (that.dataContent) { |
|
|
if (that.dataContent) { |
|
|
let list = that.dataContent.subList; //应该按零件号查找 |
|
|
|
|
|
|
|
|
|
|
|
var itemIndex = list.findIndex(r => |
|
|
var itemIndex = this.allList.findIndex(r => |
|
|
r.itemCode == result.itemCode && |
|
|
r.itemCode == result.itemCode && |
|
|
// r.productDate == result.productDate && |
|
|
|
|
|
r.order == result.order); |
|
|
r.order == result.order); |
|
|
//不存在 |
|
|
//不存在 |
|
|
if (itemIndex == -1) { |
|
|
if (itemIndex == -1) { |
|
|
list.push(result); |
|
|
// if (this.allList.length > this.dataContent.packQty) { |
|
|
that.calcFgQty(); |
|
|
// this.showErrorMessage("唯一码数量不能大于计划数量") |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
result.countTime = new Date(); |
|
|
|
|
|
this.allList.push(result); |
|
|
|
|
|
this.allList.sort(compare('countTime')); //按扫描信息排序 |
|
|
|
|
|
this.initList() |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
this.calcFgQty(); |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("标签【" + result.content + '】已经扫描,是否移除', confirm => { |
|
|
this.$refs.comMessage.showQuestionMessage("唯一码【" + result.content + |
|
|
list.splice(itemIndex, 1) |
|
|
'】已经扫描,是否移除', |
|
|
|
|
|
res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.allList.splice(itemIndex, 1) |
|
|
|
|
|
this.allList.sort(compare('countTime')); //按扫描信息排序 |
|
|
|
|
|
this.initList() |
|
|
that.calcFgQty(); |
|
|
that.calcFgQty(); |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
setTimeout(r => { |
|
|
|
|
|
this.scanPopupGetFocus(); |
|
|
|
|
|
}, 500) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
@ -196,8 +404,11 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
calcFgQty() { |
|
|
calcFgQty() { |
|
|
this.dataContent.handleQty =this.dataContent.subList.length; |
|
|
this.dataContent.handleQty = this.allList.length; |
|
|
if (this.dataContent.handleQty == this.dataContent.qty) { |
|
|
if (this.dataContent.handleQty == this.dataContent.packQty) { |
|
|
|
|
|
if (this.$refs.scanPopup) { |
|
|
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
|
|
} |
|
|
this.commit() |
|
|
this.commit() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -212,16 +423,99 @@ |
|
|
this.$refs.scanPopup.losefocus(); |
|
|
this.$refs.scanPopup.losefocus(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
showCommitSuccessMessage(hint) { |
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint, pointData) { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
this.dataContent=null; |
|
|
if (pointData.length > 0) { |
|
|
this.openFg(); |
|
|
uni.navigateTo({ |
|
|
|
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showErrorMessage(message) { |
|
|
|
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.scanPopupGetFocus() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style scoped lang="scss"> |
|
|
|
|
|
page { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.page-wraper { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.header { |
|
|
|
|
|
position: fixed; |
|
|
|
|
|
/* #ifdef H5 */ |
|
|
|
|
|
top: 88rpx; |
|
|
|
|
|
/* #endif */ |
|
|
|
|
|
left: 0; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
z-index: 10; |
|
|
|
|
|
padding: 10rpx; |
|
|
|
|
|
/* 确保头部在内容之上 */ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.page-footer { |
|
|
|
|
|
position: fixed; |
|
|
|
|
|
bottom: 0; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
right: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.page-main { |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.page-main-scroll { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
right: 0; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
bottom: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.page-main-list { |
|
|
|
|
|
/* height: 80rpx; |
|
|
|
|
|
line-height: 80rpx; */ |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
background: #e0e0e0; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item_scaned { |
|
|
|
|
|
background-color: antiquewhite; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auto-wrap { |
|
|
|
|
|
white-space: normal; |
|
|
|
|
|
word-break: break-all; |
|
|
|
|
|
overflow-wrap: break-word; |
|
|
|
|
|
/* 对于兼容性更好的情况 */ |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |