|
@@ -58,9 +58,14 @@
|
|
<view class="scanButton flex align_center" @click="openCamera">
|
|
<view class="scanButton flex align_center" @click="openCamera">
|
|
<u-icon name="scan" size="60"></u-icon><text class="ml10">扫描VIN</text>
|
|
<u-icon name="scan" size="60"></u-icon><text class="ml10">扫描VIN</text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 直接取货 -->
|
|
|
|
+ <view class="quickButton flex align_center" v-if="userInfo.sysUserFlag == '1'" @click="showAction = true">
|
|
|
|
+ <text>没有VIN,直接取货</text>
|
|
|
|
+ </view>
|
|
<view class="flex align_center justify_center">
|
|
<view class="flex align_center justify_center">
|
|
<u-image src="/static/banner1.png" width="645" height="504"></u-image>
|
|
<u-image src="/static/banner1.png" width="645" height="504"></u-image>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-action-sheet :list="actionList" @click="clickAction" v-model="showAction"></u-action-sheet>
|
|
</view>
|
|
</view>
|
|
<!-- 扫描记录 -->
|
|
<!-- 扫描记录 -->
|
|
<view class="list-box">
|
|
<view class="list-box">
|
|
@@ -98,7 +103,7 @@
|
|
} from 'vuex'
|
|
} from 'vuex'
|
|
import scrollBox from '@/components/scrollBox.vue'
|
|
import scrollBox from '@/components/scrollBox.vue'
|
|
import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
|
|
import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
|
|
- import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty } from '@/api/shelf.js'
|
|
|
|
|
|
+ import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode } from '@/api/shelf.js'
|
|
import { xprhStoreApplyRead } from '@/api/xprh.js'
|
|
import { xprhStoreApplyRead } from '@/api/xprh.js'
|
|
import { listLookUp, getLookUpDatas } from '@/api/data.js';
|
|
import { listLookUp, getLookUpDatas } from '@/api/data.js';
|
|
import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
|
|
import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
|
|
@@ -117,7 +122,18 @@
|
|
orderTodo: null,
|
|
orderTodo: null,
|
|
avatarUrl:'',
|
|
avatarUrl:'',
|
|
navHeight: '44',
|
|
navHeight: '44',
|
|
- scanMaxNums: 10
|
|
|
|
|
|
+ scanMaxNums: 10,
|
|
|
|
+ showAction: false,
|
|
|
|
+ actionList: [
|
|
|
|
+ {
|
|
|
|
+ text: '扫描条形码/二维码',
|
|
|
|
+ fontSize: 32
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '按产品编码查询',
|
|
|
|
+ fontSize: 32
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -154,6 +170,8 @@
|
|
this.getListLookUp();
|
|
this.getListLookUp();
|
|
// 获取支付,收款方式
|
|
// 获取支付,收款方式
|
|
this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
|
|
this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
|
|
|
|
+ // 价格类型
|
|
|
|
+ this.getLookUpList('PRICE_SHOW_TYPE', 'vuex_priceTypeList');
|
|
// 初始化页面
|
|
// 初始化页面
|
|
this.pageInit()
|
|
this.pageInit()
|
|
})
|
|
})
|
|
@@ -308,8 +326,62 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 保证金支付
|
|
// 保证金支付
|
|
- toPayBondAmount(){
|
|
|
|
-
|
|
|
|
|
|
+ toPayBondAmount(){},
|
|
|
|
+ // 选择取货方式
|
|
|
|
+ clickAction(index){
|
|
|
|
+ const shelfSn = this.hasShelf.shelfSn
|
|
|
|
+ // 扫描
|
|
|
|
+ if(index == 0){
|
|
|
|
+ uni.scanCode({
|
|
|
|
+ success: function (res) {
|
|
|
|
+ console.log(res);
|
|
|
|
+ const params = {
|
|
|
|
+ codeType: res.scanType == 'QR_CODE' ? 0 : 1,
|
|
|
|
+ }
|
|
|
|
+ // 二维码
|
|
|
|
+ if(res.scanType == 'QR_CODE'){
|
|
|
|
+ const ret = res.result.split("&")
|
|
|
|
+ params.productSn = ret[1] // 产品编码sn
|
|
|
|
+ }else{
|
|
|
|
+ params.qrCode = res.result
|
|
|
|
+ }
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "正在查询产品..."
|
|
|
|
+ })
|
|
|
|
+ // 确认取货
|
|
|
|
+ getProductfindByScanCode(params).then(res => {
|
|
|
|
+ if(res.status == 200 && res.data){
|
|
|
|
+ if(res.data.currentInven){
|
|
|
|
+ const params = Object.assign({shelfSn: shelfSn, billSource: res.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'},res.data)
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/queryByCode/confirmQh?data='+ encodeURIComponent(JSON.stringify(res.data))
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '产品库存为0,无法取货!',
|
|
|
|
+ confirmText: '好的',
|
|
|
|
+ showCancel: false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '产品不属于此货架,请重新扫描!',
|
|
|
|
+ confirmText: '好的',
|
|
|
|
+ showCancel: false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else{
|
|
|
|
+ // 按编码搜索
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/queryByCode/queryByCode'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 去扫描
|
|
// 去扫描
|
|
openCamera(){
|
|
openCamera(){
|
|
@@ -416,6 +488,20 @@
|
|
opacity: 0.8;
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .quickButton{
|
|
|
|
+ margin: 0 0 0.5em 0;
|
|
|
|
+ padding: 0.5em;
|
|
|
|
+ background: #fff;
|
|
|
|
+ color: #333;
|
|
|
|
+ font-size: 1.5em;
|
|
|
|
+ border-radius: 5em;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ border:0.1rpx solid #eee;
|
|
|
|
+ box-shadow: 1rpx 2rpx 5rpx #f8f8f8;
|
|
|
|
+ &:active{
|
|
|
|
+ opacity: 0.8;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.ml10{
|
|
.ml10{
|
|
margin-left: 0.4em;
|
|
margin-left: 0.4em;
|
|
}
|
|
}
|