From 1cc0753efced5f8dcc6f0b3ae98b6cd04aa27e1d Mon Sep 17 00:00:00 2001 From: zhangyouji Date: Wed, 21 Feb 2024 15:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/components/price-select-tab.vue | 74 ++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/BagStation/pages/components/price-select-tab.vue b/BagStation/pages/components/price-select-tab.vue index cca9ffe..cab3d30 100644 --- a/BagStation/pages/components/price-select-tab.vue +++ b/BagStation/pages/components/price-select-tab.vue @@ -385,6 +385,39 @@ + + + + + + + + + + + + + + + + 识别失败! + + + + + + + + + + + + + + + + @@ -525,7 +558,9 @@ realMoney: '', xoilAmountGun: '', plateNumberOcr:'', - plateNumberOcrShow:false + plateNumberOcrShow:false, + showPlicePhoto:'', + plateNumberImages:'' } }, created() { @@ -622,6 +657,25 @@ } }, methods: { + manualInput(){ + this.showPlicePhoto='' + this.$refs.inputDialog.open() + }, + inputClose(){ + this.$refs.inputDialog.close() + }, + inputConfirm(val){ + if(val){ + this.plateNumberOcr = val + this.$refs.inputDialog.close() + }else{ + uni.showToast({ + title: '请输入车牌号', + icon: 'none' + }) + } + + }, getCompanyConfig(companyId){ if(companyId){ user.getCompanyConfigByCompanyId(companyId).then(res=>{ @@ -635,6 +689,7 @@ } }, srcPhoto(){ + this.showPlicePhoto='' let _that = this uni.chooseImage({ count: 1, //默认9 @@ -663,9 +718,16 @@ success(e) { uni.hideLoading() let obj = JSON.parse(e.data) - _that.plateNumberOcr = obj.data.carNo + if(obj.data&&obj.data.carNo){ + _that.plateNumberOcr = obj.data.carNo + _that.plateNumberImages = obj.data.imgUrl + }else{ + _that.plateNumberOcr = '' + _that.showPlicePhoto = 'show' + } },fail(res){ uni.hideLoading() + _that.showPlicePhoto = 'show' } }) @@ -1212,6 +1274,13 @@ 'xoilAmountGun': this.vol } } else { + if(!this.plateNumberOcr){ + uni.showToast({ + icon: 'none', + title: '请上传车牌照片' + }) + return + } if(this.plateNumberOcrShow == true){ var orderData = { amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '', @@ -1221,6 +1290,7 @@ orderSource: "WECHAT_MINIAPPS", //类型:String 必有字段 备注:订单来源(WECHAT_MINIAPPS) plateNumber: this.plateNumberOcrShow == true ? this.plateNumberOcr : this .plateNumber, //类型:String 必有字段 备注:车牌号 + plateNumberImages: this.plateNumberImages, // 车牌照片地址 siteUserName: this.jober, //类型:String 必有字段 备注:加油员 oilsBar: this.oilBar, //类型:Number 必有字段 备注:油枪 volume: this.activeChannelCode == 'TY' ? this.tyRes.liter : this