diff --git a/pages/stationDetail/ZYSite.vue b/pages/stationDetail/ZYSite.vue index 6916f38..40a8b9f 100644 --- a/pages/stationDetail/ZYSite.vue +++ b/pages/stationDetail/ZYSite.vue @@ -117,11 +117,11 @@ - + 车牌识别 - + @@ -312,6 +312,39 @@ + + + + + + + + + + + + + + + + 识别失败! + + + + + + + + + + + + + + + + @@ -390,7 +423,9 @@ curIndex: null, InputNumber: 0, plateNumberOcr:'', - plateNumberOcrShow:false + plateNumberOcrShow:false, + showPlicePhoto:'', + plateNumberImages:'' } }, onLoad(option) { @@ -483,6 +518,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=>{ @@ -497,6 +551,7 @@ } }, srcPhoto(){ + this.showPlicePhoto='' let _that = this uni.chooseImage({ count: 1, //默认9 @@ -526,10 +581,16 @@ uni.hideLoading() console.log(e) let obj = JSON.parse(e.data) - console.log(obj,obj.data,obj.data.carNo) - _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' } }) @@ -1138,6 +1199,13 @@ } } else { if(this.plateNumberOcrShow == true){ + if(!this.plateNumberOcr){ + uni.showToast({ + icon: 'none', + title: '请上传车牌照片' + }) + return + } var data6 = { siteId: this.siteData.siteId, priceId: this.insertResult.priceId, @@ -1148,6 +1216,7 @@ createSource: "WECHAT_MINIAPPS", //类型:String 必有字段 备注:创建来源 orderSource: "WECHAT_MINIAPPS", vehicleLicenseNum: this.plateNumberOcr, + plateNumberImages: this.plateNumberImages, // 车牌照片地址 customerId: this.siteData.customerId, //类型:String 必有字段 备注:司机id companyId: this.siteData.companyId, //类型:String 必有字段 备注:企业id oilsBar: this.insertResult.bar,