diff --git a/financialCenter/business/index.vue b/financialCenter/business/index.vue index 91db499..1babc25 100644 --- a/financialCenter/business/index.vue +++ b/financialCenter/business/index.vue @@ -6,12 +6,16 @@ left-icon="back" title="公司账户管理" /> + placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索" + v-model="paramter.params.companyName" placeholder="请输入公司名称"> - + + + + { + if (!res.data.list.length) { + uni.showToast({ + title: '没有数据了哦~', + icon: 'none' + }) + return + } this.tableList = this.tableList.concat(res.data.list); }) }, @@ -65,7 +76,7 @@ scrolltolower() { this.paramter.currentPage += 1 this.getByPage() - + }, handlerNumber(number) { if (number == 0) return number @@ -74,8 +85,8 @@ } return +number.toFixed(2) }, - - jump(e, path,item) { + + jump(e, path, item) { console.log(123) switch (e) { case -1: @@ -96,7 +107,7 @@ .uni-easyinput__content { background-color: #fff; } - + .header { position: relative; width: 100%; diff --git a/financialCenter/serviceStation/index.vue b/financialCenter/serviceStation/index.vue index be9f455..4485248 100644 --- a/financialCenter/serviceStation/index.vue +++ b/financialCenter/serviceStation/index.vue @@ -12,6 +12,10 @@ + + + { + if (!res.data.list.length) { + uni.showToast({ + title: '没有数据了哦~', + icon: 'none' + }) + return + } this.tableList = this.tableList.concat(res.data.list); }) }, diff --git a/pages.json b/pages.json index e8bf190..0acdbe5 100644 --- a/pages.json +++ b/pages.json @@ -399,7 +399,7 @@ "path": "business/detail", "style": { "navigationBarBackgroundColor": "#2866FF", - "navigationBarTitleText": "企业账户管理", + "navigationBarTitleText": "公司账户管理", "enablePullDownRefresh": false } diff --git a/pages/index/menu.json b/pages/index/menu.json index d28d2d9..88ee3ef 100644 --- a/pages/index/menu.json +++ b/pages/index/menu.json @@ -121,7 +121,7 @@ "submenu":[ { "icon":"iconxiugaijiage", - "name":"企业账户管理", + "name":"公司账户管理", "router":"/financialCenter/business/index", "lable":"finance:account:enterprise" }, diff --git a/priceAdjustmentTask/addTask/addTask.vue b/priceAdjustmentTask/addTask/addTask.vue index cfdd0dc..18a8bca 100644 --- a/priceAdjustmentTask/addTask/addTask.vue +++ b/priceAdjustmentTask/addTask/addTask.vue @@ -65,10 +65,17 @@ style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> 原价:{{ Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].marketPrice).toFixed(2)}} + + - @@ -81,11 +88,15 @@ style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> 原价:{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].sitePrice).toFixed(2)}} + + - + @@ -128,11 +139,17 @@ style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].enterprisePrice).toFixed(2)}} + + - + @@ -144,11 +161,17 @@ style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].floorPrice||0).toFixed(4)}} + + - + @@ -161,11 +184,17 @@ style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice).toFixed(2)}} + + - + @@ -201,6 +230,17 @@ + + + + + + {{windowInfo.text}} + + + @@ -275,6 +315,12 @@ export default { data() { return { + windowInfo: { + show: false, + x: 0, + y: 0, + text: '' + }, immediate: null, time: null, timing: 0, @@ -386,13 +432,22 @@ value: 1 }, ], + priceArr: ['marketPrice', 'sitePrice', 'enterprisePrice', 'floorPrice', 'settlementPrice'] } }, onLoad() { let that = this + uni.$on('serviceStation', function(e) { console.log('%c 油站参数更新↓', 'font-size:50px;color:red') that.aboutEnterprise = Object.assign(that.aboutEnterprise, e) + console.log('that.aboutEnterprise', that.aboutEnterprise) + that.aboutEnterprise.oilSiteOilsPrices.map(item => { + that.priceArr.forEach(key => { + item[`${key}tipIsShow`] = false + }) + return item + }) that.aboutEnterprise.siteId = that.aboutEnterprise.id that.clearFn(); uni.removeStorage({ @@ -407,7 +462,7 @@ `${start.getFullYear()}-${start.getMonth()+1}-${start.getDate()} ${start.getHours()}:${start.getMinutes()}:00` console.log(this.start, '---') }, - created() {}, + watch: { 'isShow.oliType': { handler(n, o) { @@ -483,7 +538,33 @@ }); }, + created() { + // this.tipAppear = this.tipAppear() + }, methods: { + tipAppear(title, originalPrice, num = 2) { + originalPrice = originalPrice.toFixed(num) + let text = + `调整后${title}建议控制在${((originalPrice * 1000) / 1000 - 0.6).toFixed(num)}~${((originalPrice * 1000) / 1000 + 0.6).toFixed(num)}之间` + this.windowInfo.text = text + this.$refs.popup.open() + return + const query = uni.createSelectorQuery().in(this); + return (pos, item) => { + console.log(1) + setTimeout(() => { + query.select(pos).boundingClientRect(data => { + this.windowInfo = { + x: `${data.left}rpx`, + y: `${data.top}rpx`, + text: '发改委价格', + show: true + } + }).exec(); + }, 0) + } + // this.$refs.popup.open() + }, icontype(item) { 'use strict' return Number(this.aboutEnterprise[item.price]) > Number(this.aboutEnterprise[item.oldePrice]) ? @@ -618,8 +699,9 @@ this.aboutEnterprise.subEntryTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:00` console.log(e) }, - inputFn(e) { + inputFn(e, originE) { console.log(this.aboutEnterprise[e]) + if (this.aboutEnterprise[e].indexOf('.') != -1) { if (e == 'newFloorPrice') { if (this.aboutEnterprise[e].split('.')[1].length > 4) { @@ -627,8 +709,9 @@ title: '最多保留小数点后4位', icon: 'none' }) - this.$nextTick(function() { + this.$nextTick(() => { this.aboutEnterprise[e] = Number(this.aboutEnterprise[e]).toFixed(4) + }) } } else { @@ -637,13 +720,25 @@ title: '最多保留小数点后两位', icon: 'none' }) - this.$nextTick(function() { + this.$nextTick(() => { this.aboutEnterprise[e] = Number(this.aboutEnterprise[e]).toFixed(2) + }) } } + } + this.isMeetWithTip(e, originE) + }, + isMeetWithTip(e, originE) { + let originalInfo = this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex] + if (!originalInfo) { + return + } + let originalPrice = originalInfo[originE] + let newPrice = this.aboutEnterprise[e] + originalInfo[`${originE}tipIsShow`] = +newPrice > +originalPrice + 0.6 || +newPrice < +originalPrice - 0.6 }, postFn() { let checkPage = { @@ -721,6 +816,37 @@ }) return } + let info = this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex] + let result = this.priceArr.some(item => { + return info[`${item}tipIsShow`] + }) + + if(result) { + uni.showModal({ + title: '部分调整后价格,可能超出合理范围。是否确认', + confirmText: '确认', + icon: 'none', + success: (res) => { + if (res.confirm) { + if (+this.aboutEnterprise.newFloorPrice > +this.aboutEnterprise.newEnterprisePrice) { + uni.showModal({ + title: '当前调价后,存在企业价低于底价,超出合理范围,是否确认', + confirmText: '确认', + icon: 'none', + success: (res) => { + if (res.confirm) { + this.countdownInit() + } + } + }) + return + } + this.countdownInit() + } + } + }) + return + } if (+this.aboutEnterprise.newFloorPrice > +this.aboutEnterprise.newEnterprisePrice) { uni.showModal({ title: '当前调价后,存在企业价低于底价,超出合理范围,是否确认', @@ -1072,4 +1198,16 @@ padding: 19rpx 20rpx 0 20rpx; box-sizing: border-box; } + + .tip-container { + position: absolute; + padding: 15rpx 25rpx; + display: block; + width: 300rpx; + color: #fff; + // height: 200rpx; + background: #33333390; + border-radius: 20rpx; + z-index: 20; + }