diff --git a/api/priceAdjustmentTask.js b/api/priceAdjustmentTask.js
index b6d6b34..4a97c37 100644
--- a/api/priceAdjustmentTask.js
+++ b/api/priceAdjustmentTask.js
@@ -28,5 +28,11 @@ export default {
method: 'post',
data:data
})
- }
+ },
+ priceAdjustment(id) {
+ return request({
+ url: `/oil-site/xoilSiteGroupStrategy/priceAdjustment/${id}`,
+ method: 'get',
+ })
+ }
}
diff --git a/oilAccount/page/accountRecharge/add.vue b/oilAccount/page/accountRecharge/add.vue
index 4fefda8..11c46cd 100644
--- a/oilAccount/page/accountRecharge/add.vue
+++ b/oilAccount/page/accountRecharge/add.vue
@@ -30,14 +30,14 @@
{{postData.companyName?postData.companyName:'选择账户后自动带出'}}
-
+
账户余额
- {{postData.balance?postData.balance:''}}
+ {{postData.balance?postData.balance:'0'}}
待审核充值金额
- {{postData.theRemainingAmount?postData.theRemainingAmount:''}}
+ {{postData.theRemainingAmount?postData.theRemainingAmount:'0'}}
@@ -568,6 +568,7 @@
.flex_jw{
display: flex;
justify-content:space-between;
+ margin-bottom: 15rpx;
}
.addDiver_body {
diff --git a/pages.json b/pages.json
index fd24ac5..46fb927 100644
--- a/pages.json
+++ b/pages.json
@@ -66,7 +66,7 @@
// }
// ,{
// "path" : "priceAdjustment/page/index/index",
- // "style" :
+ // "style" :
// {
// "navigationBarTitleText": "",
// "enablePullDownRefresh": false
@@ -75,7 +75,7 @@
// }
// ,{
// "path" : "salesRanking/page/index/index",
- // "style" :
+ // "style" :
// {
// "navigationBarTitleText": "动销排名,
// ",
@@ -85,7 +85,7 @@
// }
// ,{
// "path" : "pages/index/newindex",
- // "style" :
+ // "style" :
// {
// "navigationBarTitleText": "",
// "enablePullDownRefresh": false
@@ -391,7 +391,7 @@
}, {
"path": "page/accountRecharge/add",
"style": {
- "navigationBarTitleText": "油站账户充值(仅调回拨)",
+ "navigationBarTitleText": "油站账户充值",
"enablePullDownRefresh": false
}
diff --git a/priceAdjustmentTask/addTask/addTask.vue b/priceAdjustmentTask/addTask/addTask.vue
index 483cb96..3c505f2 100644
--- a/priceAdjustmentTask/addTask/addTask.vue
+++ b/priceAdjustmentTask/addTask/addTask.vue
@@ -74,9 +74,10 @@
-
+ v-model="aboutEnterprise.marketPrice" class="list_right_input"
+ :style="{color:dislpayData.marketPrice?'#d5d5d5':' '}"/>
元
@@ -95,8 +96,9 @@
-
+
元
@@ -147,9 +149,10 @@
-
+ v-model="aboutEnterprise.newEnterprisePrice" class="list_right_input"
+ :style="{color:dislpayData.enterprisePrice?'#d5d5d5':' '}"/>
元
@@ -169,9 +172,10 @@
-
+ v-model="aboutEnterprise.newFloorPrice" class="list_right_input"
+ :style="{color:dislpayData.floorPrice?'#d5d5d5':' '}"/>
元
@@ -182,7 +186,7 @@
结算价
- {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice).toFixed(4)}}
+ {{Number(aboutEnterprise.oilSiteOilsPrices[aboutEnterprise.oloIndex].settlementPrice).toFixed(2)}}
-
+ v-model="aboutEnterprise.newSettlementPrice" class="list_right_input"
+ :style="{color:dislpayData.settlementPrice?'#d5d5d5':' '}"/>
元
@@ -226,6 +231,61 @@
+
+
+
+ 策略组:{{stationStrategyData.strategyName}}
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ 发改委价:{{stationStrategyData.marketPricePoint==1?'自定义': strategyFormula(stationStrategyData.marketPricePoint)}}
+ {{ stationStrategyData.marketPriceOperator == null || stationStrategyData.marketPriceOperator == undefined ?
+ '' : stationStrategyData.marketPriceOperator}}
+ {{ stationStrategyData.marketPriceStrategy == null || stationStrategyData.marketPriceStrategy == undefined ?
+ '' : stationStrategyData.marketPriceStrategy }}
+
+
+ 底价:{{stationStrategyData.floorPricePoint==1?'自定义': strategyFormula(stationStrategyData.floorPricePoint)}}
+ {{ stationStrategyData.floorPriceOperator == null || stationStrategyData.floorPriceOperator == undefined ?
+ '' : stationStrategyData.floorPriceOperator}}
+ {{ stationStrategyData.floorPriceStrategy == null || stationStrategyData.floorPriceStrategy == undefined ?
+ '' : stationStrategyData.floorPriceStrategy }}
+
+
+ 油站价:{{stationStrategyData.sitePricePoint==1?'自定义': strategyFormula(stationStrategyData.sitePricePoint)}}
+ {{ stationStrategyData.sitePriceOperator == null || stationStrategyData.sitePriceOperator == undefined ?
+ '' : stationStrategyData.sitePriceOperator}}
+ {{ stationStrategyData.sitePriceStrategy == null || stationStrategyData.sitePriceStrategy == undefined ?
+ '' : stationStrategyData.sitePriceStrategy }}
+
+
+ 结算价:{{stationStrategyData.settlementPricePoint==1?'自定义': strategyFormula(stationStrategyData.settlementPricePoint)}}
+ {{ stationStrategyData.settlementPriceOperator == null || stationStrategyData.settlementPriceOperator == undefined ?
+ '' : stationStrategyData.settlementPriceOperator}}
+ {{ stationStrategyData.settlementPriceStrategy == null || stationStrategyData.settlementPriceStrategy == undefined ?
+ '' : stationStrategyData.settlementPriceStrategy }}
+
+
+ 企业价:{{stationStrategyData.companyPricePoint==1?'自定义': strategyFormula(stationStrategyData.companyPricePoint)}}
+ {{ stationStrategyData.companyPriceOperator == null || stationStrategyData.companyPriceOperator == undefined ?
+ '' : stationStrategyData.companyPriceOperator}}
+ {{ stationStrategyData.companyPriceStrategy ==null || stationStrategyData.companyPriceStrategy == undefined ?
+ '' : stationStrategyData.companyPriceStrategy }}
+
+
+
+
@@ -432,7 +492,42 @@
value: 1
},
],
- priceArr: ['marketPrice', 'sitePrice', 'enterprisePrice', 'floorPrice', 'settlementPrice']
+ priceArr: ['marketPrice', 'sitePrice', 'enterprisePrice', 'floorPrice', 'settlementPrice'],
+ radiolistPlice: [{
+ name: '启用',
+ value: '0'
+ },
+ {
+ name: '临时禁用',
+ value: '1'
+ },
+ ],
+ radioPlice:'0',
+ stationStrategyData:{},
+ priceStrategyData: [{
+ lable: '发改委价',
+ value: 'marketPrice',
+ }, {
+ lable: '油站价',
+ value: 'sitePrice',
+ },{
+ lable: '企业价',
+ value: 'companyPrice'
+ }, {
+ lable: '底价',
+ value: 'floorPrice'
+ }, {
+ lable: '结算价',
+ value: 'settlementPrice'
+ }],
+ isApplication:true,
+ dislpayData: {
+ marketPrice: false,
+ sitePrice: false,
+ enterprisePrice: false,
+ settlementPrice: false,
+ floorPrice: false
+ },
}
},
onLoad() {
@@ -472,7 +567,164 @@
this.disabled = false
}
}
- }
+ },
+ 'aboutEnterprise.marketPrice'(val){
+ // 发改委价
+ let decimal = 100
+ if (val != ''&&this.isApplication == true) {
+ let applicationStra = this.stationStrategyData
+
+ // 油站价
+ if (applicationStra.sitePricePoint == 'marketPrice' && applicationStra.sitePriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.sitePriceOperator, applicationStra.sitePriceStrategy)
+ this.aboutEnterprise.sitePrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ // 底价
+ if (applicationStra.floorPricePoint == 'marketPrice' && applicationStra.floorPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.floorPriceOperator, applicationStra.floorPriceStrategy)
+ this.aboutEnterprise.newFloorPrice =
+ Math.round(countPrice * 10000) / 10000
+ }
+ // 企业价
+ if (applicationStra.companyPricePoint == 'marketPrice' && applicationStra.companyPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.companyPriceOperator, applicationStra.companyPriceStrategy)
+ this.aboutEnterprise.newEnterprisePrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ // 结算价
+ if (applicationStra.otherPricePoint == 'marketPrice' && applicationStra.settlementPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.settlementPriceOperator, applicationStra.settlementPriceStrategy)
+ this.aboutEnterprise.newSettlementPrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ }
+ },
+ 'aboutEnterprise.newFloorPrice'(val){
+ // 底价
+ let decimal = 100
+ if (val != ''&&this.isApplication == true) {
+ let applicationStra = this.stationStrategyData
+ // 企业价
+ if (applicationStra.companyPricePoint == 'floorPrice' && applicationStra.companyPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.companyPriceOperator, applicationStra.companyPriceStrategy)
+ this.aboutEnterprise.newEnterprisePrice =Math.round(countPrice * decimal) / decimal
+ }
+ // 结算价
+ if (applicationStra.settlementPricePoint == 'floorPrice' && applicationStra.settlementPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.settlementPriceOperator, applicationStra.settlementPriceStrategy)
+ this.aboutEnterprise.newSettlementPrice =Math.round(countPrice * decimal) / decimal
+ }
+ // 油站价
+ if (applicationStra.sitePricePoint == 'floorPrice' && applicationStra.sitePriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.sitePriceOperator, applicationStra.sitePriceStrategy)
+ this.aboutEnterprise.sitePrice = Math.round(countPrice * decimal) / decimal
+ }
+ // 发改委价
+ if (applicationStra.marketPricePoint == 'floorPrice' && applicationStra.marketPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.marketPriceOperator, applicationStra.marketPriceStrategy)
+ this.aboutEnterprise.marketPrice =Math.round(countPrice * decimal) / decimal
+ }
+ }
+ },
+ 'aboutEnterprise.newSettlementPrice'(val){
+ // 结算价
+ let decimal = 100
+ if (val != ''&&this.isApplication == true) {
+ let applicationStra = this.stationStrategyData
+ // 油站价
+ if (applicationStra.sitePricePoint == 'settlementPrice' && applicationStra.sitePriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.sitePriceOperator, applicationStra.sitePriceStrategy)
+ this.aboutEnterprise.sitePrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ // 底价
+ if (applicationStra.floorPricePoint == 'settlementPrice' && applicationStra.floorPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.floorPriceOperator, applicationStra.floorPriceStrategy)
+ this.aboutEnterprise.newFloorPrice =
+ Math.round(countPrice * 10000) / 10000
+ }
+ // 企业价
+ if (applicationStra.companyPricePoint == 'settlementPrice' && applicationStra.companyPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.companyPriceOperator, applicationStra.companyPriceStrategy)
+ this.aboutEnterprise.newEnterprisePrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ // 发改委价
+ if (applicationStra.marketPricePoint == 'settlementPrice' && applicationStra.marketPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.marketPriceOperator, applicationStra.marketPriceStrategy)
+ this.aboutEnterprise.marketPrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ }
+ },
+ 'aboutEnterprise.sitePrice'(val){
+ // 油站价
+ let decimal = 100
+ if (val != ''&&this.isApplication == true) {
+ let applicationStra = this.stationStrategyData
+ // 底价
+ if (applicationStra.floorPricePoint == 'sitePrice' && applicationStra.floorPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.floorPriceOperator, applicationStra.floorPriceStrategy)
+ this.aboutEnterprise.newFloorPrice =
+ Math.round(countPrice * 10000) / 10000
+ }
+
+ // 企业价
+ if (applicationStra.companyPricePoint == 'sitePrice' && applicationStra.companyPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.companyPriceOperator, applicationStra.companyPriceStrategy)
+ this.aboutEnterprise.newEnterprisePrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+
+ // 结算价
+ if (applicationStra.settlementPricePoint == 'sitePrice' && applicationStra.settlementPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.settlementPriceOperator, applicationStra.settlementPriceStrategy)
+ this.aboutEnterprise.newSettlementPrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ // 发改委价
+ if (applicationStra.marketPricePoint == 'sitePrice' && applicationStra.marketPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.marketPriceOperator, applicationStra.marketPriceStrategy)
+ this.aboutEnterprise.marketPrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ }
+ },
+ 'aboutEnterprise.newEnterprisePrice'(val){
+ // 企业价
+ let decimal = 100
+ if (val != ''&&this.isApplication == true) {
+ let applicationStra = this.stationStrategyData
+
+ // 底价
+ if (applicationStra.floorPricePoint == 'companyPrice' && applicationStra.floorPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.floorPriceOperator, applicationStra.floorPriceStrategy)
+ this.aboutEnterprise.newFloorPrice =
+ Math.round(countPrice * 10000) / 10000
+ }
+
+ // 结算价
+ if (applicationStra.settlementPricePoint == 'companyPrice' && applicationStra.settlementPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.settlementPriceOperator, applicationStra.settlementPriceStrategy)
+ this.aboutEnterprise.newSettlementPrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+
+ // 油站价
+ if (applicationStra.sitePricePoint == 'companyPrice' && applicationStra.sitePriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.sitePriceOperator, applicationStra.sitePriceStrategy)
+ this.aboutEnterprise.sitePrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ // 发改委价
+ if (applicationStra.marketPricePoint == 'companyPrice' && applicationStra.marketPriceOperator != '') {
+ let countPrice = this.strategyHandle(val, applicationStra.marketPriceOperator, applicationStra.marketPriceStrategy)
+ this.aboutEnterprise.marketPrice =
+ Math.round(countPrice * decimal) / decimal
+ }
+ }
+ },
},
filters: {
state: function(e) {
@@ -542,6 +794,90 @@
// this.tipAppear = this.tipAppear()
},
methods: {
+ radioPliceChange(e){
+ if(e =='1'){
+ this.isApplication = false
+ this.displayStrategy({})
+ }else {
+ this.isApplication = true
+ this.displayStrategy(this.stationStrategyData)
+ }
+ },
+ displayStrategy(val) {
+ if (JSON.stringify(val) === '{}') {
+ this.dislpayData.marketPrice = false
+ this.dislpayData.sitePrice = false
+ this.dislpayData.enterprisePrice = false
+ this.dislpayData.settlementPrice = false
+ this.dislpayData.floorPrice = false
+ } else {
+ if (val.marketPricePoint == '1' || val.marketPricePoint == '') {
+ this.dislpayData.marketPrice = false
+ } else {
+ this.dislpayData.marketPrice = true
+ }
+ if (val.sitePricePoint == '1' || val.sitePricePoint == '') {
+ this.dislpayData.sitePrice = false
+ } else {
+ this.dislpayData.sitePrice = true
+ }
+ if (val.companyPricePoint == '1' || val.companyPricePoint == '') {
+ this.dislpayData.enterprisePrice = false
+ } else {
+ this.dislpayData.enterprisePrice = true
+ }
+ if (val.settlementPricePoint == '1' || val.settlementPricePoint == '') {
+ this.dislpayData.settlementPrice = false
+ } else {
+ this.dislpayData.settlementPrice = true
+ }
+ if (val.floorPricePoint == '1' || val.floorPricePoint == '') {
+ this.dislpayData.floorPrice = false
+ } else {
+ this.dislpayData.floorPrice = true
+ }
+ }
+ },
+ strategyHandle(num1,type,num2){
+ let obj = {
+ "+":() => {
+ return Number(num1) + Number(num2)
+ },
+ "-":() => {
+ return Number(num1) - Number(num2)
+ },
+ "*":() => {
+ return Number(num1) * Number(num2)
+ },
+ "/":() => {
+ return Number(num1) / Number(num2)
+ }
+ }
+ let a = obj[type]()
+ return a
+ },
+ strategyFormula(formula) {
+ let formulaText = ''
+ if (!formula) {
+ return '自定义'
+ }
+ if (formula == 'marketPrice') {
+ formulaText = '发改委价'
+ } else if (formula == 'sitePrice') {
+ formulaText = '油站价'
+ } else if (formula == 'settlementPrice') {
+ formulaText = '结算价'
+ } else if (formula == 'floorPrice') {
+ formulaText = '底价'
+ } else if (formula == 'companyPrice') {
+ formulaText = '企业价'
+ } else if (formula == 'otherPrice') {
+ formulaText = '三方价'
+ } else {
+ formulaText = formula
+ }
+ return formulaText
+ },
tipAppear(title, originalPrice, num = 2) {
originalPrice = originalPrice.toFixed(num)
let text =
@@ -674,13 +1010,21 @@
this.aboutEnterprise.newFloorPrice = JSON.parse(JSON.stringify(Number(this.aboutEnterprise
.oilSiteOilsPrices[this.aboutEnterprise.oloIndex].floorPrice || 0))).toFixed(4);
this.aboutEnterprise.newSettlementPrice = JSON.parse(JSON.stringify(Number(this.aboutEnterprise
- .oilSiteOilsPrices[this.aboutEnterprise.oloIndex].settlementPrice))).toFixed(4);
+ .oilSiteOilsPrices[this.aboutEnterprise.oloIndex].settlementPrice))).toFixed(2);
this.aboutEnterprise.oldfloorRemark = this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex]
.floorRemark || '暂无说明'
this.aboutEnterprise = Object.assign(this.aboutEnterprise, this.aboutEnterprise.oilSiteOilsPrices[this
.aboutEnterprise.oloIndex])
// this.aboutEnterprise.floorRemark = ''
this.aboutEnterprise.siteOilsPriceId = this.aboutEnterprise.id
+ let id = this.aboutEnterprise.oilSiteOilsPrices[this.aboutEnterprise.oloIndex].id
+ priceAdjustmentTask.priceAdjustment(id).then(res=>{
+ this.stationStrategyData = res.data
+ this.displayStrategy(this.stationStrategyData)
+ }).catch(err => {
+ this.stationStrategyData = err.data == null ? {} : err.data
+ this.displayStrategy(this.stationStrategyData)
+ })
this.isShow.oliType = false
},
seleoli() {
@@ -703,7 +1047,7 @@
console.log(this.aboutEnterprise[e])
if (this.aboutEnterprise[e].indexOf('.') != -1) {
- if (['newFloorPrice', 'newSettlementPrice'].includes(e)) {
+ if (e == 'newFloorPrice') {
if (this.aboutEnterprise[e].split('.')[1].length > 4) {
uni.showToast({
title: '最多保留小数点后4位',
@@ -711,6 +1055,7 @@
})
this.$nextTick(() => {
this.aboutEnterprise[e] = Number(this.aboutEnterprise[e]).toFixed(4)
+
})
}
} else {
@@ -819,16 +1164,15 @@
let result = this.priceArr.some(item => {
return info[`${item}tipIsShow`]
})
-
- if (result) {
+
+ if(result) {
uni.showModal({
title: '部分调整后价格,可能超出合理范围。是否确认',
confirmText: '确认',
icon: 'none',
success: (res) => {
if (res.confirm) {
- if (+this.aboutEnterprise.newFloorPrice > +this.aboutEnterprise
- .newEnterprisePrice) {
+ if (+this.aboutEnterprise.newFloorPrice > +this.aboutEnterprise.newEnterprisePrice) {
uni.showModal({
title: '当前调价后,存在企业价低于底价,超出合理范围,是否确认',
confirmText: '确认',
@@ -845,7 +1189,7 @@
}
}
})
- return
+ return
}
if (+this.aboutEnterprise.newFloorPrice > +this.aboutEnterprise.newEnterprisePrice) {
uni.showModal({
@@ -1210,4 +1554,7 @@
border-radius: 20rpx;
z-index: 20;
}
+ .strategyPrice{
+ line-height: 50rpx;
+ }