|
@@ -47,7 +47,7 @@
|
|
|
<view>
|
|
|
</view>
|
|
|
<u-toast ref="repeat" position="bottom" />
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -84,7 +84,7 @@
|
|
|
}
|
|
|
},
|
|
|
onBackPress(options) {
|
|
|
-
|
|
|
+
|
|
|
if (options.from == 'backbutton') {
|
|
|
this.$u.route({
|
|
|
type: 'switchTab',
|
|
@@ -102,7 +102,7 @@
|
|
|
uni.getNetworkType({
|
|
|
success: function(res) {
|
|
|
let none = res.networkType
|
|
|
-
|
|
|
+
|
|
|
if (none == 'none') {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -114,22 +114,22 @@
|
|
|
});
|
|
|
uni.$on('data', res => {
|
|
|
this.lisi = res.lisi
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
//开始扫码
|
|
|
const innerAudioContext = uni.createInnerAudioContext();
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/start.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
this.coord = ''
|
|
|
},
|
|
|
- onShow(){
|
|
|
+ onShow() {
|
|
|
this.mounteds()
|
|
|
},
|
|
|
methods: {
|
|
@@ -150,7 +150,7 @@
|
|
|
})
|
|
|
},
|
|
|
async tishi(res) {
|
|
|
-
|
|
|
+
|
|
|
let this_ = this
|
|
|
this_.baidu = res
|
|
|
qqmapsdk.reverseGeocoder({
|
|
@@ -171,19 +171,19 @@
|
|
|
latitude: this_.baidu.latitude
|
|
|
}
|
|
|
}).then(res => {
|
|
|
-
|
|
|
-
|
|
|
- if(res.data.code != 0){
|
|
|
+
|
|
|
+
|
|
|
+ if (res.data.code != 0) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '获取定位失败,请稍后再试~'
|
|
|
})
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this_.baidu = res.data.data.result
|
|
|
this_.addreev(this_.baidu, aress)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
-
|
|
|
+
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '网络繁忙请稍后再试~'
|
|
@@ -201,7 +201,7 @@
|
|
|
//手动录入调用
|
|
|
manualentry() {
|
|
|
if (this.number_a.length != 0) {
|
|
|
-
|
|
|
+
|
|
|
if (this.degree == undefined) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -209,7 +209,7 @@
|
|
|
position: "bottom"
|
|
|
})
|
|
|
return
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
request({
|
|
|
url: '/storeScan/storeScanGetTyre',
|
|
|
method: 'Post',
|
|
@@ -224,77 +224,154 @@
|
|
|
scanAddress: this.address
|
|
|
}
|
|
|
}).then(res => {
|
|
|
-
|
|
|
- if (res.data.code == 513) {
|
|
|
-
|
|
|
- let name = 'regular'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 514) {
|
|
|
-
|
|
|
- let name = 'nonoperating'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 515) {
|
|
|
-
|
|
|
- let name = 'warehousing'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 517) {
|
|
|
-
|
|
|
- let name = 'atypism'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 518) {
|
|
|
-
|
|
|
- let name = 'gobeyond'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 519) {
|
|
|
-
|
|
|
- let name = 'notallow'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 500) {
|
|
|
-
|
|
|
- let name = 'error'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 0) {
|
|
|
-
|
|
|
- this.res = res
|
|
|
-
|
|
|
- for (let i = 0; i < this.lisi.length; i++) {
|
|
|
- if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
-
|
|
|
- let err = {
|
|
|
- "data": {
|
|
|
- "msg": "请勿重复录入",
|
|
|
+
|
|
|
+ this.tips = "胎号"
|
|
|
+
|
|
|
+ switch (res.data.code) {
|
|
|
+ case 513:
|
|
|
+ {
|
|
|
+ let name = 'regular'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 514:
|
|
|
+ {
|
|
|
+ let name = 'nonoperating'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 515:
|
|
|
+ {
|
|
|
+ let name = 'warehousing'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 517:
|
|
|
+ {
|
|
|
+ let name = 'atypism'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 518:
|
|
|
+ {
|
|
|
+ let name = 'gobeyond'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 519:
|
|
|
+ {
|
|
|
+ let name = 'notallow'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 520:
|
|
|
+ {
|
|
|
+ let name = 'repeat-out'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 500:
|
|
|
+ {
|
|
|
+ let name = 'error'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 0:
|
|
|
+ {
|
|
|
+ this.res = res
|
|
|
+
|
|
|
+ for (let i = 0; i < this.lisi.length; i++) {
|
|
|
+ if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
+
|
|
|
+ let err = {
|
|
|
+ "data": {
|
|
|
+ "msg": "请勿重复录入",
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ let name = 'duplicateentry'
|
|
|
+ this.tipss(err, name)
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- let name = 'duplicateentry'
|
|
|
- this.tipss(err, name)
|
|
|
- return
|
|
|
+ this.container()
|
|
|
+ break
|
|
|
}
|
|
|
- }
|
|
|
- this.container()
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // if (res.data.code == 513) {
|
|
|
+
|
|
|
+ // let name = 'regular'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 514) {
|
|
|
+
|
|
|
+ // let name = 'nonoperating'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 515) {
|
|
|
+
|
|
|
+ // let name = 'warehousing'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 517) {
|
|
|
+
|
|
|
+ // let name = 'atypism'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 518) {
|
|
|
+
|
|
|
+ // let name = 'gobeyond'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 519) {
|
|
|
+
|
|
|
+ // let name = 'notallow'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 500) {
|
|
|
+
|
|
|
+ // let name = 'error'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 0) {
|
|
|
+
|
|
|
+ // this.res = res
|
|
|
+
|
|
|
+ // for (let i = 0; i < this.lisi.length; i++) {
|
|
|
+ // if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
+
|
|
|
+ // let err = {
|
|
|
+ // "data": {
|
|
|
+ // "msg": "请勿重复录入",
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // let name = 'duplicateentry'
|
|
|
+ // this.tipss(err, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.container()
|
|
|
+ // }
|
|
|
+
|
|
|
}).catch(err => {
|
|
|
// this.$refs.repeat.show({
|
|
|
// title: "网络繁忙,请稍后再试",
|
|
|
// type: 'default',
|
|
|
// position: 'bottom'
|
|
|
// })
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
.finally(() => {
|
|
|
// Loading.close()
|
|
@@ -319,11 +396,11 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/' + name + '.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
container() {
|
|
@@ -337,17 +414,17 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/entered.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
this.show_s = false
|
|
|
-
|
|
|
+
|
|
|
this.number_a = ''
|
|
|
-
|
|
|
+
|
|
|
this.lisi.push({
|
|
|
specs: this.res.data.data[0].specs,
|
|
|
flagRegular: this.res.data.data[0].isRegular,
|
|
@@ -362,7 +439,7 @@
|
|
|
plyRating: this.res.data.data[0].plyRating,
|
|
|
scanWay: '0'
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//获取扫码控件
|
|
@@ -370,7 +447,7 @@
|
|
|
uni.getNetworkType({
|
|
|
success: function(res) {
|
|
|
let none = res.networkType
|
|
|
-
|
|
|
+
|
|
|
if (none == 'none') {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -381,18 +458,21 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/failure.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
this.number = val
|
|
|
this.number_s = val
|
|
|
+ if (val.length != 0) {
|
|
|
+ this.tips = "胎号"
|
|
|
+ }
|
|
|
if (this.degree == undefined) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -400,7 +480,7 @@
|
|
|
position: "bottom"
|
|
|
})
|
|
|
return
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
request({
|
|
|
url: '/storeScan/storeScanGetTyre',
|
|
|
method: 'Post',
|
|
@@ -415,78 +495,154 @@
|
|
|
scanAddress: this.address
|
|
|
}
|
|
|
}).then(res => {
|
|
|
-
|
|
|
+
|
|
|
this.tips = "胎号"
|
|
|
- if (res.data.code == 513) {
|
|
|
-
|
|
|
- let name = 'regular'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 514) {
|
|
|
-
|
|
|
- let name = 'nonoperating'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 515) {
|
|
|
-
|
|
|
- let name = 'warehousing'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 517) {
|
|
|
-
|
|
|
- let name = 'atypism'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 518) {
|
|
|
-
|
|
|
- let name = 'gobeyond'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 519) {
|
|
|
-
|
|
|
- let name = 'notallow'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 500) {
|
|
|
-
|
|
|
- let name = 'error'
|
|
|
- this.tipss(res, name)
|
|
|
- return
|
|
|
- }
|
|
|
- if (res.data.code == 0) {
|
|
|
-
|
|
|
- this.res = res
|
|
|
-
|
|
|
- for (let i = 0; i < this.lisi.length; i++) {
|
|
|
- if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
-
|
|
|
- let err = {
|
|
|
- "data": {
|
|
|
- "msg": "请勿重复录入",
|
|
|
+
|
|
|
+ switch (res.data.code) {
|
|
|
+ case 513:
|
|
|
+ {
|
|
|
+ let name = 'regular'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 514:
|
|
|
+ {
|
|
|
+ let name = 'nonoperating'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 515:
|
|
|
+ {
|
|
|
+ let name = 'warehousing'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 517:
|
|
|
+ {
|
|
|
+ let name = 'atypism'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 518:
|
|
|
+ {
|
|
|
+ let name = 'gobeyond'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 519:
|
|
|
+ {
|
|
|
+ let name = 'notallow'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 520:
|
|
|
+ {
|
|
|
+ let name = 'repeat-out'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 500:
|
|
|
+ {
|
|
|
+ let name = 'error'
|
|
|
+ this.tipss(res, name)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 0:
|
|
|
+ {
|
|
|
+ this.res = res
|
|
|
+
|
|
|
+ for (let i = 0; i < this.lisi.length; i++) {
|
|
|
+ if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
+
|
|
|
+ let err = {
|
|
|
+ "data": {
|
|
|
+ "msg": "请勿重复录入",
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ let name = 'duplicateentry'
|
|
|
+ this.tipss(err, name)
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- let name = 'duplicateentry'
|
|
|
- this.tipss(err, name)
|
|
|
- return
|
|
|
+ this.container()
|
|
|
+ break
|
|
|
}
|
|
|
- }
|
|
|
- this.container()
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // if (res.data.code == 513) {
|
|
|
+
|
|
|
+ // let name = 'regular'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 514) {
|
|
|
+
|
|
|
+ // let name = 'nonoperating'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 515) {
|
|
|
+
|
|
|
+ // let name = 'warehousing'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 517) {
|
|
|
+
|
|
|
+ // let name = 'atypism'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 518) {
|
|
|
+
|
|
|
+ // let name = 'gobeyond'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 519) {
|
|
|
+
|
|
|
+ // let name = 'notallow'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 500) {
|
|
|
+
|
|
|
+ // let name = 'error'
|
|
|
+ // this.tipss(res, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (res.data.code == 0) {
|
|
|
+
|
|
|
+ // this.res = res
|
|
|
+
|
|
|
+ // for (let i = 0; i < this.lisi.length; i++) {
|
|
|
+ // if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
+
|
|
|
+ // let err = {
|
|
|
+ // "data": {
|
|
|
+ // "msg": "请勿重复录入",
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // let name = 'duplicateentry'
|
|
|
+ // this.tipss(err, name)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.container()
|
|
|
+ // }
|
|
|
+
|
|
|
}).catch(err => {
|
|
|
this.$refs.repeat.show({
|
|
|
title: "网络繁忙,请稍后再试",
|
|
|
type: 'default',
|
|
|
position: 'bottom'
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
.finally(() => {
|
|
|
// Loading.close()
|
|
@@ -495,11 +651,11 @@
|
|
|
},
|
|
|
container_s() {
|
|
|
this.show_d = false
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
this.number_s = ''
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
this.lisi.push({
|
|
|
specs: this.res_s.data.data[0].specs,
|
|
@@ -515,16 +671,16 @@
|
|
|
plyRating: this.res_s.data.data[0].plyRating,
|
|
|
scanWay: '1'
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
const innerAudioContext = uni.createInnerAudioContext();
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/scansuccess.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
this.$refs.repeat.show({
|
|
|
title: '扫码成功',
|
|
@@ -533,7 +689,7 @@
|
|
|
})
|
|
|
},
|
|
|
confirm(index) {
|
|
|
-
|
|
|
+
|
|
|
this.lisi.splice(index, 1)
|
|
|
},
|
|
|
scancodein() {
|
|
@@ -560,11 +716,11 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/rescan.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
}
|