pull/2/head
xiaozhiyong 2 years ago
parent a63dba10a2
commit 4c55408455
  1. 21
      financialCenter/business/index.vue
  2. 14
      financialCenter/serviceStation/index.vue
  3. 2
      pages.json
  4. 2
      pages/index/menu.json
  5. 164
      priceAdjustmentTask/addTask/addTask.vue

@ -6,12 +6,16 @@
left-icon="back" title="公司账户管理" /> left-icon="back" title="公司账户管理" />
<view class="seach"> <view class="seach">
<uni-easyinput @confirm='seachFn' style="border-radius:12rpx ;" prefixIcon="search" <uni-easyinput @confirm='seachFn' style="border-radius:12rpx ;" prefixIcon="search"
placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索" v-model="paramter.params.companyName" placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索"
placeholder="请输入公司名称"> v-model="paramter.params.companyName" placeholder="请输入公司名称">
</uni-easyinput> </uni-easyinput>
</view> </view>
</view> </view>
<view style="flex:1;overflow: hidden;"> <view style="flex:1;overflow: hidden;">
<view v-if="!tableList.length"
style="width: 100vw; height: 100%; display: flex;align-items: center;justify-content: center;">
<image src="@/static/qx.png" style="width: 500rpx; height: 355rpx;"></image>
</view>
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'> <scroll-view style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'>
<view class="container"> <view class="container">
<view class="item" v-for="item,index in tableList" :key="index" <view class="item" v-for="item,index in tableList" :key="index"
@ -35,6 +39,9 @@
paramter: { paramter: {
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
sorted:{
createTime:'desc'
},
params: { params: {
companyName: '' companyName: ''
} }
@ -46,9 +53,6 @@
this.styles = uni.getMenuButtonBoundingClientRect() this.styles = uni.getMenuButtonBoundingClientRect()
this.getByPage() this.getByPage()
}, },
// onShow() {
// this.getByPage()
// },
methods: { methods: {
seachFn() { seachFn() {
this.tableList = [] this.tableList = []
@ -58,6 +62,13 @@
}, },
getByPage() { getByPage() {
serve.getByPage(this.paramter).then(res => { serve.getByPage(this.paramter).then(res => {
if (!res.data.list.length) {
uni.showToast({
title: '没有数据了哦~',
icon: 'none'
})
return
}
this.tableList = this.tableList.concat(res.data.list); this.tableList = this.tableList.concat(res.data.list);
}) })
}, },

@ -12,6 +12,10 @@
</view> </view>
</view> </view>
<view style="flex:1;overflow: hidden;"> <view style="flex:1;overflow: hidden;">
<view v-if="!tableList.length"
style="width: 100vw; height: 100%; display: flex;align-items: center;justify-content: center;">
<image src="@/static/qx.png" style="width: 500rpx; height: 355rpx;"></image>
</view>
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'> <scroll-view style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'>
<view class="container"> <view class="container">
<view class="item" v-for="item,index in tableList" :key="index" <view class="item" v-for="item,index in tableList" :key="index"
@ -35,6 +39,9 @@
paramter: { paramter: {
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
sorted:{
createTime:'desc'
},
params: { params: {
accountName: '' accountName: ''
} }
@ -58,6 +65,13 @@
}, },
getByPage() { getByPage() {
serve.getByPage(this.paramter).then(res => { serve.getByPage(this.paramter).then(res => {
if (!res.data.list.length) {
uni.showToast({
title: '没有数据了哦~',
icon: 'none'
})
return
}
this.tableList = this.tableList.concat(res.data.list); this.tableList = this.tableList.concat(res.data.list);
}) })
}, },

@ -399,7 +399,7 @@
"path": "business/detail", "path": "business/detail",
"style": { "style": {
"navigationBarBackgroundColor": "#2866FF", "navigationBarBackgroundColor": "#2866FF",
"navigationBarTitleText": "企业账户管理", "navigationBarTitleText": "公司账户管理",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }

@ -121,7 +121,7 @@
"submenu":[ "submenu":[
{ {
"icon":"iconxiugaijiage", "icon":"iconxiugaijiage",
"name":"企业账户管理", "name":"公司账户管理",
"router":"/financialCenter/business/index", "router":"/financialCenter/business/index",
"lable":"finance:account:enterprise" "lable":"finance:account:enterprise"
}, },

@ -65,10 +65,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
原价:{{ Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].marketPrice).toFixed(2)}} 原价:{{ Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].marketPrice).toFixed(2)}}
</text> </text>
<uni-icons
v-if="aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].marketPricetipIsShow"
id="oilProductCode" style="margin-left: 15rpx;margin-top: 2rpx;" type="info-filled"
size="20"
@tap="tipAppear('发改委价格',aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].marketPrice)">
</uni-icons>
</view> </view>
<view slot="body" class="list_right "> <view slot="body" class="list_right ">
<view style="width: 100%;display: flex; "> <view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('marketPrice')" type="digit" <input :disabled='disabled' placeholder="请输入价格"
@input="inputFn('marketPrice','marketPrice')" type="digit"
v-model="aboutEnterprise.marketPrice" class="list_right_input" /> v-model="aboutEnterprise.marketPrice" class="list_right_input" />
<text class="yuan"></text> <text class="yuan"></text>
</view> </view>
@ -81,11 +88,15 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
原价:{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].sitePrice).toFixed(2)}} 原价:{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].sitePrice).toFixed(2)}}
</text> </text>
<uni-icons v-if="aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].sitePricetipIsShow"
style="margin-left: 15rpx;margin-top: 2rpx;" type="info-filled" size="15"
@tap="tipAppear('油站价格',aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].sitePrice)">
</uni-icons>
</view> </view>
<view slot="body" class="list_right "> <view slot="body" class="list_right ">
<view style="width: 100%;display: flex; "> <view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('sitePrice')" type="digit" <input :disabled='disabled' placeholder="请输入价格" @input="inputFn('sitePrice','sitePrice')"
v-model="aboutEnterprise.sitePrice" class="list_right_input" /> type="digit" v-model="aboutEnterprise.sitePrice" class="list_right_input" />
<text class="yuan"></text> <text class="yuan"></text>
</view> </view>
</view> </view>
@ -128,11 +139,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].enterprisePrice).toFixed(2)}} {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].enterprisePrice).toFixed(2)}}
</text> </text>
<uni-icons
v-if="aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].enterprisePricetipIsShow"
style="margin-left: 15rpx;margin-top: 2rpx;" type="info-filled" size="15"
@tap="tipAppear('企业价',aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].enterprisePrice)">
</uni-icons>
</view> </view>
<view slot="body" class="list_right "> <view slot="body" class="list_right ">
<view style="width: 100%;display: flex; "> <view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('newEnterprisePrice')" <input :disabled='disabled' placeholder="请输入价格"
type="digit" v-model="aboutEnterprise.newEnterprisePrice" class="list_right_input" /> @input="inputFn('newEnterprisePrice','enterprisePrice')" type="digit"
v-model="aboutEnterprise.newEnterprisePrice" class="list_right_input" />
<text class="yuan"></text> <text class="yuan"></text>
</view> </view>
</view> </view>
@ -144,11 +161,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].floorPrice||0).toFixed(4)}} {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].floorPrice||0).toFixed(4)}}
</text> </text>
<uni-icons
v-if="aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].floorPricetipIsShow"
style="margin-left: 15rpx;margin-top: 2rpx;" type="info-filled" size="15"
@tap="tipAppear('底价',aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].floorPrice || 0, 4)">
</uni-icons>
</view> </view>
<view slot="body" class="list_right "> <view slot="body" class="list_right ">
<view style="width: 100%;display: flex; "> <view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('newFloorPrice')" <input :disabled='disabled' placeholder="请输入价格"
type="digit" v-model="aboutEnterprise.newFloorPrice" class="list_right_input" /> @input="inputFn('newFloorPrice','floorPrice')" type="digit"
v-model="aboutEnterprise.newFloorPrice" class="list_right_input" />
<text class="yuan"></text> <text class="yuan"></text>
</view> </view>
</view> </view>
@ -161,11 +184,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;"> style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice).toFixed(2)}} {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice).toFixed(2)}}
</text> </text>
<uni-icons
v-if="aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPricetipIsShow"
style="margin-left: 15rpx;margin-top: 2rpx;" type="info-filled" size="15"
@tap="tipAppear('结算价',aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice)">
</uni-icons>
</view> </view>
<view slot="body" class="list_right "> <view slot="body" class="list_right ">
<view style="width: 100%;display: flex; "> <view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('newSettlementPrice')" <input :disabled='disabled' placeholder="请输入价格"
type="digit" v-model="aboutEnterprise.newSettlementPrice" class="list_right_input" /> @input="inputFn('newSettlementPrice','settlementPrice')" type="digit"
v-model="aboutEnterprise.newSettlementPrice" class="list_right_input" />
<text class="yuan"></text> <text class="yuan"></text>
</view> </view>
</view> </view>
@ -201,6 +230,17 @@
<view class="list_footer"> <view class="list_footer">
<button @tap="postFn" class="list_butten ">保存</button> <button @tap="postFn" class="list_butten ">保存</button>
</view> </view>
<!-- <view v-show="windowInfo.show" :style="{top:windowInfo.x,left:windowInfo.y}" class="tip-container">
{{windowInfo.text}}
</view> -->
<uni-popup ref="popup" type="top" background-color="#fff">
<view style="padding: 20rpx 50rpx; text-align: center;">
{{windowInfo.text}}
</view>
</uni-popup>
<popup @confirmFn='confirmFn' @closeFn='closeFn' :styles="{width:'610rpx'}" v-model="isShow.oliType"> <popup @confirmFn='confirmFn' @closeFn='closeFn' :styles="{width:'610rpx'}" v-model="isShow.oliType">
<view slot="coment"> <view slot="coment">
<view class="olipopup"> <view class="olipopup">
@ -275,6 +315,12 @@
export default { export default {
data() { data() {
return { return {
windowInfo: {
show: false,
x: 0,
y: 0,
text: ''
},
immediate: null, immediate: null,
time: null, time: null,
timing: 0, timing: 0,
@ -386,13 +432,22 @@
value: 1 value: 1
}, },
], ],
priceArr: ['marketPrice', 'sitePrice', 'enterprisePrice', 'floorPrice', 'settlementPrice']
} }
}, },
onLoad() { onLoad() {
let that = this let that = this
uni.$on('serviceStation', function(e) { uni.$on('serviceStation', function(e) {
console.log('%c 油站参数更新↓', 'font-size:50px;color:red') console.log('%c 油站参数更新↓', 'font-size:50px;color:red')
that.aboutEnterprise = Object.assign(that.aboutEnterprise, e) 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.aboutEnterprise.siteId = that.aboutEnterprise.id
that.clearFn(); that.clearFn();
uni.removeStorage({ uni.removeStorage({
@ -407,7 +462,7 @@
`${start.getFullYear()}-${start.getMonth()+1}-${start.getDate()} ${start.getHours()}:${start.getMinutes()}:00` `${start.getFullYear()}-${start.getMonth()+1}-${start.getDate()} ${start.getHours()}:${start.getMinutes()}:00`
console.log(this.start, '---') console.log(this.start, '---')
}, },
created() {},
watch: { watch: {
'isShow.oliType': { 'isShow.oliType': {
handler(n, o) { handler(n, o) {
@ -483,7 +538,33 @@
}); });
}, },
created() {
// this.tipAppear = this.tipAppear()
},
methods: { 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) { icontype(item) {
'use strict' 'use strict'
return Number(this.aboutEnterprise[item.price]) > Number(this.aboutEnterprise[item.oldePrice]) ? 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` this.aboutEnterprise.subEntryTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:00`
console.log(e) console.log(e)
}, },
inputFn(e) { inputFn(e, originE) {
console.log(this.aboutEnterprise[e]) console.log(this.aboutEnterprise[e])
if (this.aboutEnterprise[e].indexOf('.') != -1) { if (this.aboutEnterprise[e].indexOf('.') != -1) {
if (e == 'newFloorPrice') { if (e == 'newFloorPrice') {
if (this.aboutEnterprise[e].split('.')[1].length > 4) { if (this.aboutEnterprise[e].split('.')[1].length > 4) {
@ -627,8 +709,9 @@
title: '最多保留小数点后4位', title: '最多保留小数点后4位',
icon: 'none' icon: 'none'
}) })
this.$nextTick(function() { this.$nextTick(() => {
this.aboutEnterprise[e] = Number(this.aboutEnterprise[e]).toFixed(4) this.aboutEnterprise[e] = Number(this.aboutEnterprise[e]).toFixed(4)
}) })
} }
} else { } else {
@ -637,13 +720,25 @@
title: '最多保留小数点后两位', title: '最多保留小数点后两位',
icon: 'none' icon: 'none'
}) })
this.$nextTick(function() { this.$nextTick(() => {
this.aboutEnterprise[e] = Number(this.aboutEnterprise[e]).toFixed(2) 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() { postFn() {
let checkPage = { let checkPage = {
@ -721,6 +816,37 @@
}) })
return 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) { if (+this.aboutEnterprise.newFloorPrice > +this.aboutEnterprise.newEnterprisePrice) {
uni.showModal({ uni.showModal({
title: '当前调价后,存在企业价低于底价,超出合理范围,是否确认', title: '当前调价后,存在企业价低于底价,超出合理范围,是否确认',
@ -1072,4 +1198,16 @@
padding: 19rpx 20rpx 0 20rpx; padding: 19rpx 20rpx 0 20rpx;
box-sizing: border-box; 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;
}
</style> </style>

Loading…
Cancel
Save