From 949707d0ec97c4c061d4711fa6d9752c1f57b3fa Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 31 Dec 2024 14:45:51 +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 --- BagAuth/pages/login/login.vue | 12 +- BagStation/orderDetail/orderDetail.vue | 61 +++++- .../pages/components/price-select-tab.vue | 191 ++++++++++-------- BagStation/pages/makeOrder/G7Supplier.vue | 22 ++ BagStation/pages/makeOrder/payResult.vue | 56 ++++- .../pages/newRoutePlanning/chooseLocation.vue | 2 +- .../newRoutePlanning/newRoutePlanning.vue | 4 +- BagStation/pages/overviewMap/overviewMap.vue | 5 +- .../pages/stationDetail/stationDetail.vue | 10 +- pages.json | 7 + pages/tabbar/station/stationList.vue | 2 + utils/request.js | 2 +- 12 files changed, 264 insertions(+), 110 deletions(-) create mode 100644 BagStation/pages/makeOrder/G7Supplier.vue diff --git a/BagAuth/pages/login/login.vue b/BagAuth/pages/login/login.vue index 3e2c44a..2749b93 100644 --- a/BagAuth/pages/login/login.vue +++ b/BagAuth/pages/login/login.vue @@ -100,7 +100,7 @@ this.otherUser = true uni.clearStorageSync() this.weChatLogin(option) - console.log('当前为卡力用户') + // console.log('当前为卡力用户') return } } @@ -170,17 +170,17 @@ } uni.setStorageSync('isOther',_that.otherUser) uni.setStorageSync('otherUserInfo',sysCustomerInfos) - console.log('此处为data参数:',data) - console.log('当前为卡利用户:companyId 为',sysCustomerInfos.companyId) + // console.log('此处为data参数:',data) + // console.log('当前为卡利用户:companyId 为',sysCustomerInfos.companyId) oilIdentityApi.wechatLogin(data).then(res=>{ - console.log('这里是wechatLogin',res) + // console.log('这里是wechatLogin',res) this.OtherloginSuccess(res) - console.log(res) + // console.log(res) }) return } }else{ - console.log('这里是213','----') + // console.log('这里是213','----') this.autoLogin() } // uni.setStorageSync('isOther',_that.otherUser) diff --git a/BagStation/orderDetail/orderDetail.vue b/BagStation/orderDetail/orderDetail.vue index f22c275..9e3fd60 100644 --- a/BagStation/orderDetail/orderDetail.vue +++ b/BagStation/orderDetail/orderDetail.vue @@ -13,9 +13,13 @@ - + + + + + @@ -73,6 +77,12 @@ {{order.sitePrice?order.sitePrice+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}} + + 油机价格 + {{order.sitePriceAmount?order.sitePriceAmount+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}} + + 优惠价格 { - console.log(res) + // console.log(res) this.val = res.data if (res.code == 40000) { this.showQr = false } else if (res.code == 20000) { - this.showQr = true + if (res.data.writeOffType === 'url') { + uni.navigateTo({ + url: `/BagStation/pages/makeOrder/G7Supplier?url=${encodeURIComponent(res.data.codeStr)}` + }) + return + } + if (res.data.writeOffType === 'image') { + this.baseImage = res.data.codeStr + this.showQr = true + return + } + this.val = res.data.codeStr; this.foreground = this.val.indexOf('SHLFC/V1') == -1 ? '#000' : '#1A487E'; + this.showQr = true } }) }, @@ -402,6 +425,31 @@ + \ No newline at end of file diff --git a/BagStation/pages/components/price-select-tab.vue b/BagStation/pages/components/price-select-tab.vue index 2dbf00c..aaa74ca 100644 --- a/BagStation/pages/components/price-select-tab.vue +++ b/BagStation/pages/components/price-select-tab.vue @@ -135,7 +135,7 @@ + placeholder="请输入油机金额" value="" style="border-bottom: 1px solid #efefef;" :disabled="readonlyRealMoney" /> @@ -166,7 +166,7 @@ + placeholder="加油金额" value="" /> @@ -188,24 +188,24 @@ - - + + 车牌识别 - - + + - + - - - + + + 优惠 @@ -385,9 +385,9 @@ - + - + @@ -395,29 +395,31 @@ - - - - - - 识别失败! + + + + + + 识别失败! + + + + + + + + - - - - - - - - - + - + @@ -459,6 +461,7 @@ }, data() { return { + readonlyRealMoney: false, thirdPartyDynamicData: ['LAIYOU'], vlom: '', discount: '', @@ -557,10 +560,10 @@ checkBar: [], realMoney: '', xoilAmountGun: '', - plateNumberOcr:'', - plateNumberOcrShow:false, - showPlicePhoto:'', - plateNumberImages:'' + plateNumberOcr: '', + plateNumberOcrShow: false, + showPlicePhoto: '', + plateNumberImages: '' } }, created() { @@ -570,8 +573,7 @@ companyId = JSON.parse(uni.getStorageSync('companyCard')).companyId if (otherUser) { this.isOtherUser = true - } else { - } + } else {} this.showtitles = oilItem.listTag; this.init() this.getCompanyConfig(companyId) @@ -645,39 +647,39 @@ } }, methods: { - manualInput(){ - this.showPlicePhoto='' + manualInput() { + this.showPlicePhoto = '' this.$refs.inputDialog.open() }, - inputClose(){ + inputClose() { this.$refs.inputDialog.close() }, - inputConfirm(val){ - if(val){ + inputConfirm(val) { + if (val) { this.plateNumberOcr = val this.$refs.inputDialog.close() - }else{ + } else { uni.showToast({ title: '请输入车牌号', icon: 'none' }) } - + }, - getCompanyConfig(companyId){ - if(companyId){ - user.getCompanyConfigByCompanyId(companyId).then(res=>{ - if(res.data.plateNumberOcr==1){ + getCompanyConfig(companyId) { + if (companyId) { + user.getCompanyConfigByCompanyId(companyId).then(res => { + if (res.data.plateNumberOcr == 1) { this.plateNumberOcrShow = true - }else{ + } else { this.plateNumberOcrShow = false } - + }) } }, - srcPhoto(){ - this.showPlicePhoto='' + srcPhoto() { + this.showPlicePhoto = '' let _that = this uni.chooseImage({ count: 1, //默认9 @@ -688,7 +690,7 @@ title: '识别中', mask: true }); - + const JSESSIONID = utils.uuid() uni.uploadFile({ url: 'http://uat.xingoil.com/adminapi/oil-oss/obejct/carNoIdentify', @@ -706,20 +708,21 @@ success(e) { uni.hideLoading() let obj = JSON.parse(e.data) - if(obj.data&&obj.data.carNo){ - _that.plateNumberOcr = obj.data.carNo - _that.plateNumberImages = obj.data.imgUrl - }else{ + if (obj.data && obj.data.carNo) { + _that.plateNumberOcr = obj.data.carNo + _that.plateNumberImages = obj.data.imgUrl + } else { _that.plateNumberOcr = '' _that.showPlicePhoto = 'show' } - },fail(res){ + }, + fail(res) { uni.hideLoading() _that.showPlicePhoto = 'show' } }) - + } }) @@ -1247,8 +1250,8 @@ 'xoilAmountGun': this.vol } } else { - if(this.plateNumberOcrShow == true){ - if(!this.plateNumberOcr){ + if (this.plateNumberOcrShow == true) { + if (!this.plateNumberOcr) { uni.showToast({ icon: 'none', title: '请上传车牌照片' @@ -1256,27 +1259,27 @@ return } var orderData = { - amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '', - shareCompanyQuota: 0, // 共享标识 - priceId: this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键 - orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单) - 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 - .vol, //类型:Number 必有字段 备注:加油升数 - realPrice: this.oilSitePriceDetailsVo[this.radio].sitePrice, //类型:Number 必有字段 备注:实际加油价格 - suppleMark: 0, //类型:Number 必有字段 备注:补录标识(0:实时订单 1:补录订单) - createSource: "XOIL_DRIVER_COMPANY_WECHAT_APPLET", //类型:String 必有字段 备注:创建来源( XOIL_DRIVER_COMPANY_WECHAT_APPLET) - // "deviceImei": "mock", //类型:String 可有字段 备注:设备唯一码 - // "networkIp": "mock" //类型:String 可有字段 备注:ip地址 - 'version': 1, - 'xoilAmountGun': this.vol - } - }else{ + amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '', + shareCompanyQuota: 0, // 共享标识 + priceId: this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键 + orderType: "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单) + 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 + .vol, //类型:Number 必有字段 备注:加油升数 + realPrice: this.oilSitePriceDetailsVo[this.radio].sitePrice, //类型:Number 必有字段 备注:实际加油价格 + suppleMark: 0, //类型:Number 必有字段 备注:补录标识(0:实时订单 1:补录订单) + createSource: "XOIL_DRIVER_COMPANY_WECHAT_APPLET", //类型:String 必有字段 备注:创建来源( XOIL_DRIVER_COMPANY_WECHAT_APPLET) + // "deviceImei": "mock", //类型:String 可有字段 备注:设备唯一码 + // "networkIp": "mock" //类型:String 可有字段 备注:ip地址 + 'version': 1, + 'xoilAmountGun': this.vol + } + } else { var orderData = { amountGun: this.activeChannelCode == 'TY' ? this.ty.realMoney : '', shareCompanyQuota: 0, // 共享标识 @@ -1298,7 +1301,7 @@ 'xoilAmountGun': this.vol } } - + } let location = uni.getStorageSync('location') || { longitude: '', @@ -1344,11 +1347,31 @@ this.radio = 0 this.plateNumbers = res.data.plateNumbers this.oilSitePriceDetailsVo = res.data.oilSitePriceDetailsVo + + + this.couponFaceValueListHandle(this.radio) + this.activeSitePrice = res.data.oilSitePriceDetailsVo[0].priceId + this.siteUserNames = res.data.siteUserNames } }) }, + couponFaceValueListHandle(index) { + if (this.oilSitePriceDetailsVo[index].couponFaceValueList) { + this.readonlyRealMoney = true + this.checkMoney = this.oilSitePriceDetailsVo[index].couponFaceValueList.reduce((prev, item) => { + prev.push({ + value: +item, + name: (+item).toFixed(0), + checked: false, + hot: false, + }) + return prev + }, []) + console.log('this.checkMoney', this.checkMoney) + } + }, pickJober(e) { this.joberIndex = e.detail.value }, @@ -1391,6 +1414,8 @@ this.activeSitePrice = this.oilSitePriceDetailsVo[this.radio].priceId this.realMoney = '--' this.xoilAmountGun = '' + + this.couponFaceValueListHandle(this.radio) }, tabSelect(e) { this.activeChannelCode = e.currentTarget.dataset.channelCode; @@ -1795,4 +1820,4 @@ .padding-bottom-40 { padding-bottom: 20%; } - + \ No newline at end of file diff --git a/BagStation/pages/makeOrder/G7Supplier.vue b/BagStation/pages/makeOrder/G7Supplier.vue new file mode 100644 index 0000000..c6ef7ec --- /dev/null +++ b/BagStation/pages/makeOrder/G7Supplier.vue @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/BagStation/pages/makeOrder/payResult.vue b/BagStation/pages/makeOrder/payResult.vue index 17b29f2..96683d7 100644 --- a/BagStation/pages/makeOrder/payResult.vue +++ b/BagStation/pages/makeOrder/payResult.vue @@ -20,10 +20,15 @@ - + + + + + @@ -36,7 +41,7 @@ {{ seconds }}s - 提示:该二维码每隔3分钟自动刷新一次 + 提示:该二维码每隔3分钟自动刷新一次 如核销失败,可点击二维码进行立即刷新,再次进行核销。 @@ -86,6 +91,11 @@ @onShowThirdResult="onShowThirdResult"> --> + + 油机价格 + {{order.sitePriceAmount?order.sitePriceAmount+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}} + 加油金额 @@ -153,6 +163,7 @@ data() { const now = new Date() return { + baseImage:'', foreground: '#000', oilItem: {}, status: "", @@ -258,10 +269,22 @@ this.showQr = false this.showtext = true } else if (res.code == 20000) { - this.showQr = true this.showtext = false + if (res.data.writeOffType === 'url') { + uni.navigateTo({ + url: `./G7Supplier?url=${encodeURIComponent(res.data.codeStr)}` + }) + return + } + if (res.data.writeOffType === 'image') { + this.baseImage = res.data.codeStr + this.showQr = true + return + } + this.val = res.data.codeStr this.foreground = this.val.indexOf('SHLFC/V1') == -1 ? '#000' : '#1A487E'; + this.showQr = true } }) }, @@ -413,7 +436,30 @@ } - + \ No newline at end of file diff --git a/BagStation/pages/newRoutePlanning/chooseLocation.vue b/BagStation/pages/newRoutePlanning/chooseLocation.vue index c21a675..ed04963 100644 --- a/BagStation/pages/newRoutePlanning/chooseLocation.vue +++ b/BagStation/pages/newRoutePlanning/chooseLocation.vue @@ -88,7 +88,7 @@ }, created() { this.TXSDK = new amapFile({ - key: 'UTXBZ-BUH6D-TQD44-HCEG4-UKOFT-U2BDN' + key: 'YR3BZ-EWX3M-JFW6U-6TREG-FXFJH-CMFWY' }); }, methods: { diff --git a/BagStation/pages/newRoutePlanning/newRoutePlanning.vue b/BagStation/pages/newRoutePlanning/newRoutePlanning.vue index 1207aaf..325f42d 100644 --- a/BagStation/pages/newRoutePlanning/newRoutePlanning.vue +++ b/BagStation/pages/newRoutePlanning/newRoutePlanning.vue @@ -9,7 +9,7 @@ @@ -82,7 +82,7 @@ }, created() { this.TXSDK = new amapFile({ - key: 'UTXBZ-BUH6D-TQD44-HCEG4-UKOFT-U2BDN' + key: 'YR3BZ-EWX3M-JFW6U-6TREG-FXFJH-CMFWY' }); }, watch: { diff --git a/BagStation/pages/overviewMap/overviewMap.vue b/BagStation/pages/overviewMap/overviewMap.vue index 87525ae..f22ea23 100644 --- a/BagStation/pages/overviewMap/overviewMap.vue +++ b/BagStation/pages/overviewMap/overviewMap.vue @@ -7,7 +7,7 @@ @@ -111,8 +111,9 @@ // this.newMapMoveToLocation(this.circles[0].longitude,this.circles[0].latitude) }, created() { + // UTXBZ-BUH6D-TQD44-HCEG4-UKOFT-U2BDN this.TXSDK = new amapFile({ - key: 'UTXBZ-BUH6D-TQD44-HCEG4-UKOFT-U2BDN' + key: 'YR3BZ-EWX3M-JFW6U-6TREG-FXFJH-CMFWY' }); }, watch: { diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index 200a121..1649397 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -238,12 +238,14 @@ uni.setStorageSync('siteId', option.siteId) return } - + + + let oilItem = option.channerCode == 'TY' ? uni.getStorageSync('OtherSiteInfo') : option.item ? JSON.parse( option.item) : { siteId: option.siteId } - + // console.log('oilItemoilItem',oilItem) uni.setStorageSync('oilItem', oilItem) this.getSiteInfo(oilItem.siteId) this.siteId = oilItem.siteId @@ -264,7 +266,7 @@ methods: { arousePhone() { uni.makePhoneCall({ - phoneNumber:'4008-56-5355' + phoneNumber: '4008-56-5355' }) }, areaJump() { @@ -787,4 +789,4 @@ line-height: 30px; font-size: 16px; } - + \ No newline at end of file diff --git a/pages.json b/pages.json index 0e41c37..2225b14 100644 --- a/pages.json +++ b/pages.json @@ -255,6 +255,13 @@ } }, { + "path": "pages/makeOrder/G7Supplier", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + },{ "path": "pages/makeOrder/JXPayResult", "style": { "navigationBarTitleText": "", diff --git a/pages/tabbar/station/stationList.vue b/pages/tabbar/station/stationList.vue index 59cf494..451f3e1 100644 --- a/pages/tabbar/station/stationList.vue +++ b/pages/tabbar/station/stationList.vue @@ -562,6 +562,8 @@ }, toDetail(item) { + + item.siteImages = item.siteImages && item.siteImages.split('?')[0] let itemS = JSON.stringify(item) if (item.channelCode === 'TY') { uni.setStorageSync('OtherSiteInfo', item) diff --git a/utils/request.js b/utils/request.js index f289df6..6c707d0 100644 --- a/utils/request.js +++ b/utils/request.js @@ -3,7 +3,7 @@ import utils from '@/utils/encode' // const env = 'test' const env = 'production' - +// const testUrl = 'http://192.168.110.77:38080' // const productUrl = 'http://uat.xingoil.com/adminapi' const productUrl = 'https://www.xingoil.com/adminapi'