pull/2/head
xiaozhiyong 2 years ago
parent a63dba10a2
commit 4c55408455
  1. 33
      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="公司账户管理" />
<view class="seach">
<uni-easyinput @confirm='seachFn' style="border-radius:12rpx ;" prefixIcon="search"
placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索" v-model="paramter.params.companyName"
placeholder="请输入公司名称">
placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索"
v-model="paramter.params.companyName" placeholder="请输入公司名称">
</uni-easyinput>
</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'>
<view class="container">
<view class="item" v-for="item,index in tableList" :key="index"
@ -35,8 +39,11 @@
paramter: {
currentPage: 1,
pageSize: 10,
sorted:{
createTime:'desc'
},
params: {
companyName:''
companyName: ''
}
},
tableList: []
@ -46,9 +53,6 @@
this.styles = uni.getMenuButtonBoundingClientRect()
this.getByPage()
},
// onShow() {
// this.getByPage()
// },
methods: {
seachFn() {
this.tableList = []
@ -58,6 +62,13 @@
},
getByPage() {
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);
})
},
@ -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%;

@ -12,6 +12,10 @@
</view>
</view>
<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'>
<view class="container">
<view class="item" v-for="item,index in tableList" :key="index"
@ -35,6 +39,9 @@
paramter: {
currentPage: 1,
pageSize: 10,
sorted:{
createTime:'desc'
},
params: {
accountName: ''
}
@ -58,6 +65,13 @@
},
getByPage() {
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);
})
},

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

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

@ -65,10 +65,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
原价:{{ Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].marketPrice).toFixed(2)}}
</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 slot="body" class="list_right ">
<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" />
<text class="yuan"></text>
</view>
@ -81,11 +88,15 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
原价:{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].sitePrice).toFixed(2)}}
</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 slot="body" class="list_right ">
<view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('sitePrice')" type="digit"
v-model="aboutEnterprise.sitePrice" class="list_right_input" />
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('sitePrice','sitePrice')"
type="digit" v-model="aboutEnterprise.sitePrice" class="list_right_input" />
<text class="yuan"></text>
</view>
</view>
@ -128,11 +139,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].enterprisePrice).toFixed(2)}}
</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 slot="body" class="list_right ">
<view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('newEnterprisePrice')"
type="digit" v-model="aboutEnterprise.newEnterprisePrice" class="list_right_input" />
<input :disabled='disabled' placeholder="请输入价格"
@input="inputFn('newEnterprisePrice','enterprisePrice')" type="digit"
v-model="aboutEnterprise.newEnterprisePrice" class="list_right_input" />
<text class="yuan"></text>
</view>
</view>
@ -144,11 +161,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].floorPrice||0).toFixed(4)}}
</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 slot="body" class="list_right ">
<view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('newFloorPrice')"
type="digit" v-model="aboutEnterprise.newFloorPrice" class="list_right_input" />
<input :disabled='disabled' placeholder="请输入价格"
@input="inputFn('newFloorPrice','floorPrice')" type="digit"
v-model="aboutEnterprise.newFloorPrice" class="list_right_input" />
<text class="yuan"></text>
</view>
</view>
@ -161,11 +184,17 @@
style="font-size: 22rpx; color:#EE0707;margin-left: 30rpx;">
{{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice).toFixed(2)}}
</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 slot="body" class="list_right ">
<view style="width: 100%;display: flex; ">
<input :disabled='disabled' placeholder="请输入价格" @input="inputFn('newSettlementPrice')"
type="digit" v-model="aboutEnterprise.newSettlementPrice" class="list_right_input" />
<input :disabled='disabled' placeholder="请输入价格"
@input="inputFn('newSettlementPrice','settlementPrice')" type="digit"
v-model="aboutEnterprise.newSettlementPrice" class="list_right_input" />
<text class="yuan"></text>
</view>
</view>
@ -201,6 +230,17 @@
<view class="list_footer">
<button @tap="postFn" class="list_butten ">保存</button>
</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">
<view slot="coment">
<view class="olipopup">
@ -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;
}
</style>

Loading…
Cancel
Save