|
@@ -70,11 +70,11 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="scan-box">
|
|
<view class="scan-box">
|
|
- <view class="scan-box-l">
|
|
|
|
|
|
+ <view class="scan-box-l" @click="scanCode">
|
|
<u-image width="120rpx" height="120rpx" src="@/static/image/zidong-saoma-img.png"></u-image>
|
|
<u-image width="120rpx" height="120rpx" src="@/static/image/zidong-saoma-img.png"></u-image>
|
|
<view class="tips-text">扫描快速识别货物</view>
|
|
<view class="tips-text">扫描快速识别货物</view>
|
|
<view class="tips-text2">
|
|
<view class="tips-text2">
|
|
- <view class="radio-box"></view>
|
|
|
|
|
|
+ <u-icon name="checkmark-circle-fill" color="#0256FF"></u-icon>
|
|
<text>连续扫描</text>
|
|
<text>连续扫描</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -110,8 +110,8 @@
|
|
|
|
|
|
<view class="footer-box">
|
|
<view class="footer-box">
|
|
<view class="footer-box-l">
|
|
<view class="footer-box-l">
|
|
- <view>货物种类:5种</view>
|
|
|
|
- <view>货物种数:25件</view>
|
|
|
|
|
|
+ <view>货物种类:{{speciesNum}}种</view>
|
|
|
|
+ <view>货物种数:{{goodsNum}}件</view>
|
|
</view>
|
|
</view>
|
|
<button class="submitBtn" @tap="submitClick">
|
|
<button class="submitBtn" @tap="submitClick">
|
|
提交
|
|
提交
|
|
@@ -120,7 +120,7 @@
|
|
<error-pop v-model="errorShow" @close="errorShow = false" @confirm="confirm" :content="popText.errorText"></error-pop>
|
|
<error-pop v-model="errorShow" @close="errorShow = false" @confirm="confirm" :content="popText.errorText"></error-pop>
|
|
<success-pop v-model="successShow" @close="successShow = false" @backClick="backClick" :content="popText.successText"></success-pop>
|
|
<success-pop v-model="successShow" @close="successShow = false" @backClick="backClick" :content="popText.successText"></success-pop>
|
|
<!-- 扫码之后弹窗 -->
|
|
<!-- 扫码之后弹窗 -->
|
|
- <scaned-pop v-model="scanedShow" @close="scanedShow = false" @confirm="scanConfirm"></scaned-pop>
|
|
|
|
|
|
+ <scaned-pop v-if="scanedShow" v-model="scanedShow" :scanNum="scanNum" @close="scanedShow = false" @confirm="scanConfirm"></scaned-pop>
|
|
|
|
|
|
<goods-pop v-model="goodsShow" @close="goodsShow = false"></goods-pop>
|
|
<goods-pop v-model="goodsShow" @close="goodsShow = false"></goods-pop>
|
|
</view>
|
|
</view>
|
|
@@ -164,7 +164,9 @@
|
|
value1: '',
|
|
value1: '',
|
|
maxDate:Number(new Date()),
|
|
maxDate:Number(new Date()),
|
|
chooseGoodsInfo:{},
|
|
chooseGoodsInfo:{},
|
|
- voucherPicture:''
|
|
|
|
|
|
+ voucherPicture:'',
|
|
|
|
+ scanIndex:-1,
|
|
|
|
+ scanNum:1,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
@@ -207,7 +209,26 @@
|
|
return num
|
|
return num
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onShow() {
|
|
|
|
+ uni.$on('scanFinish',(data)=>{
|
|
|
|
+ if(this.goodsList.length == 0)return
|
|
|
|
+ let index = this.goodsList.findIndex(item=>item.barCode == data)
|
|
|
|
+ if(index == -1) return
|
|
|
|
+ this.scanIndex = index
|
|
|
|
+ this.scanNum = 1
|
|
|
|
+ this.scanedShow = true
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ onHide() {
|
|
|
|
+ uni.$off('scanFinish')
|
|
|
|
+ },
|
|
|
|
+ onUnload() {
|
|
|
|
+ uni.$off('scanFinish')
|
|
|
|
+ },
|
|
methods:{
|
|
methods:{
|
|
|
|
+ scanCode() {
|
|
|
|
+ this.$scan.scanCode()
|
|
|
|
+ },
|
|
calendarConfirm(val) {
|
|
calendarConfirm(val) {
|
|
this.goodsList.forEach(item=>{
|
|
this.goodsList.forEach(item=>{
|
|
if(item.id == this.chooseGoodsInfo.id) {
|
|
if(item.id == this.chooseGoodsInfo.id) {
|
|
@@ -288,7 +309,8 @@
|
|
},
|
|
},
|
|
// 扫码确认
|
|
// 扫码确认
|
|
scanConfirm() {
|
|
scanConfirm() {
|
|
-
|
|
|
|
|
|
+ this.goodsList[this.scanIndex].materialNumber += Number(val)
|
|
|
|
+ this.scanedShow = false
|
|
},
|
|
},
|
|
manualClick() {
|
|
manualClick() {
|
|
this.goodsShow = true
|
|
this.goodsShow = true
|