|
@@ -39,7 +39,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
- <text class="user-rz">
|
|
|
|
|
|
+ <text v-if="userInfo.identifyType=='VISITOR'" class="user-rz">
|
|
认证成为门店
|
|
认证成为门店
|
|
</text>
|
|
</text>
|
|
<u-icon name="arrow-right"></u-icon>
|
|
<u-icon name="arrow-right"></u-icon>
|
|
@@ -59,12 +59,17 @@
|
|
<view class="list-box">
|
|
<view class="list-box">
|
|
<!-- 扫描记录 -->
|
|
<!-- 扫描记录 -->
|
|
<u-cell-group :border="false">
|
|
<u-cell-group :border="false">
|
|
- <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" value="全部">
|
|
|
|
|
|
+ <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" :value="userInfo.identifyType=='VISITOR'?'':'全部'">
|
|
<u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
|
|
<u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
|
|
</u-cell-item>
|
|
</u-cell-item>
|
|
</u-cell-group>
|
|
</u-cell-group>
|
|
<u-cell-group :border="false" v-if="hasLogin">
|
|
<u-cell-group :border="false" v-if="hasLogin">
|
|
- <u-cell-item v-for="item in vinList" @click="toChoosePart(item)" :key="item.id" :title="item.vinCode" :title-style="{fontSize:'1em'}" :label="item.brandName +' '+item.modelName">
|
|
|
|
|
|
+ <u-cell-item v-for="item in vinList"
|
|
|
|
+ @click="toChoosePart(item)"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :title="item.vinCode"
|
|
|
|
+ :title-style="{fontSize:'1em'}"
|
|
|
|
+ :label="userInfo.identifyType=='VISITOR' ? '' : (item.brandName +' '+item.modelName)">
|
|
<text slot="icon"></text>
|
|
<text slot="icon"></text>
|
|
</u-cell-item>
|
|
</u-cell-item>
|
|
<view style="padding: 20upx;">
|
|
<view style="padding: 20upx;">
|
|
@@ -106,7 +111,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['hasLogin']),
|
|
|
|
|
|
+ ...mapState(['hasLogin','vuex_vinScanNums']),
|
|
hasShelf(){
|
|
hasShelf(){
|
|
return this.$store.state.vuex_storeShelf
|
|
return this.$store.state.vuex_storeShelf
|
|
},
|
|
},
|
|
@@ -153,6 +158,8 @@
|
|
this.getStoreShelf()
|
|
this.getStoreShelf()
|
|
// 获取扫描记录
|
|
// 获取扫描记录
|
|
this.getVinLog()
|
|
this.getVinLog()
|
|
|
|
+ // 获取扫描次数
|
|
|
|
+ this.$store.dispatch("getScanNums")
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取数据字典
|
|
// 获取数据字典
|
|
@@ -193,15 +200,18 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 获取上方滚动扫描记录
|
|
getScrollLog(){
|
|
getScrollLog(){
|
|
scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
|
|
scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
|
|
this.list = res.data.list || []
|
|
this.list = res.data.list || []
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 获取当前门店扫描记录
|
|
getVinLog(){
|
|
getVinLog(){
|
|
this.vinList = []
|
|
this.vinList = []
|
|
this.status = "loading"
|
|
this.status = "loading"
|
|
- getScanVinLogList({pageNo:1,pageSize:5}).then(res => {
|
|
|
|
|
|
+ // VISITOR:游客,EMPLOYEE:雇员
|
|
|
|
+ getScanVinLogList({pageNo:1,pageSize:5,identifyType: this.userInfo.identifyType}).then(res => {
|
|
this.vinList = res.data.list || []
|
|
this.vinList = res.data.list || []
|
|
this.vinList = this.vinList.filter(item => item.vinCode)
|
|
this.vinList = this.vinList.filter(item => item.vinCode)
|
|
this.status = 'nomore'
|
|
this.status = 'nomore'
|
|
@@ -234,21 +244,44 @@
|
|
},
|
|
},
|
|
// 去扫描
|
|
// 去扫描
|
|
openCamera(){
|
|
openCamera(){
|
|
- uni.navigateTo({
|
|
|
|
- url: this.hasLogin ? "/pages/scan-frame/scan-frame" : '/pages/login/login'
|
|
|
|
- })
|
|
|
|
|
|
+ if(this.userInfo.identifyType=='VISITOR'){
|
|
|
|
+ if(this.vuex_vinScanNums < 10){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: this.hasLogin ? "/pages/scan-frame/scan-frame" : '/pages/login/login'
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '个人用户扫描VIN限10次/天,您的次数已用完!',
|
|
|
|
+ confirmText: '去认证',
|
|
|
|
+ success(res) {
|
|
|
|
+ if(res.confirm) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/storeManage/storeAuth'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: this.hasLogin ? "/pages/scan-frame/scan-frame" : '/pages/login/login'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 查看扫描记录
|
|
// 查看扫描记录
|
|
toAllRecord(){
|
|
toAllRecord(){
|
|
- uni.navigateTo({
|
|
|
|
- url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
|
|
|
|
- })
|
|
|
|
|
|
+ if(this.userInfo.identifyType == 'EMPLOYEE'){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: this.hasLogin ? "/pages/vinRecord/vinRecord" : '/pages/login/login'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
toUser(){
|
|
toUser(){
|
|
if(this.hasLogin){
|
|
if(this.hasLogin){
|
|
// 用户详细信息 或 门店认证
|
|
// 用户详细信息 或 门店认证
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: !this.hasLogin ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
|
|
|
|
|
|
+ url: this.userInfo.identifyType=='EMPLOYEE' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|