4 Commits

Author SHA1 Message Date
lixuan
3ebb5ec952 Merge branch 'master' of http://121.196.213.68:3000/caoliancun/MP_XOIL_company_new into lixuan 2022-11-24 15:09:40 +08:00
lixuan
b4acb8c469 xiugai 2022-11-24 15:09:12 +08:00
caolc
7130e6e200 111 2022-11-11 09:25:50 +08:00
caolc
2e5389afa5 价格回显修改,列表刷新修改 2022-11-11 09:24:20 +08:00
6 changed files with 41 additions and 13 deletions

View File

@@ -106,6 +106,7 @@
}, },
data() { data() {
return { return {
hideCard:[],
loadStatus: 'load', loadStatus: 'load',
userTotal: {}, userTotal: {},
historyList: [], historyList: [],
@@ -234,11 +235,17 @@
} }
}) })
}, },
getCards() { async getCards() {
accountApi.getUserAccount().then(res => { await accountApi.getSyncDeductions().then(res => {
if (res.code == 20000) {
this.hideCard = res.data.companyIds
}
})
await accountApi.getUserAccount().then(res => {
if (res.code == 20000) { if (res.code == 20000) {
if (res.data.length > 0) { if (res.data.length > 0) {
this.cardList = res.data this.cardList = res.data
this.cardList = this.cardList.filter(item=>!this.hideCard.includes(item.companyId))
this.cardList.forEach(item => { this.cardList.forEach(item => {
this.$set(item,'currentPage',1) this.$set(item,'currentPage',1)
this.$set(item,'loadStatus','more') this.$set(item,'loadStatus','more')

View File

@@ -115,8 +115,7 @@
// console.log(String(value).split('.')[1].substring(2,4),String(value).split('.')[1].length,'*-*-*-*-'); // console.log(String(value).split('.')[1].substring(2,4),String(value).split('.')[1].length,'*-*-*-*-');
// console.log( Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01,'************'); // console.log( Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01,'************');
// return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2); // return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2);
return String(value).split('.')[1]&&String(value).split('.')[1].length>2? return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
} else { } else {
return Number(value).toFixed(2) return Number(value).toFixed(2)
} }

View File

@@ -88,7 +88,7 @@ Vue.prototype.olitype = function(value){
} }
Vue.prototype.moneyIntercept = function(value){ Vue.prototype.moneyIntercept = function(value){
if (value != 'xxx.x') { if (value != 'xxx.x') {
return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2); return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
} else { } else {
return Number(value).toFixed(2) return Number(value).toFixed(2)
} }

View File

@@ -145,9 +145,9 @@
}else{ }else{
this.getOrder(this.ative) this.getOrder(this.ative)
} }
setTimeout(function() { // setTimeout(function() {
uni.stopPullDownRefresh() // uni.stopPullDownRefresh()
}, 1000); // }, 1000);
}, },
onReachBottom() { onReachBottom() {
console.log('这里是onReachBottom') console.log('这里是onReachBottom')
@@ -227,6 +227,8 @@
this.status.loadOrderStatus = 'load' this.status.loadOrderStatus = 'load'
} }
} }
}).finally(()=>{
uni.stopPullDownRefresh()
}) })
}, },
@@ -268,6 +270,8 @@
this.status.loadOrderStatus = 'load' this.status.loadOrderStatus = 'load'
} }
} }
}).finally(()=>{
uni.stopPullDownRefresh()
}) })
}, },
changeHaed(code){ changeHaed(code){

View File

@@ -57,7 +57,7 @@
<view class="text-center"> <view class="text-center">
<text class="text-sm">您一共有 <text class="text-sm">您一共有
<text <text
class="oil-main-color padding-left-xs padding-right-xs">{{userTotal.oilCardNumber}}</text> class="oil-main-color padding-left-xs padding-right-xs">{{cardSum.length}}</text>
张油卡</text> 张油卡</text>
</view> </view>
</view> </view>
@@ -139,6 +139,9 @@
}, },
data() { data() {
return { return {
showCard:[],
hideCard:[],
cardSum:[],
yellowURL: this.global.yellowURL, yellowURL: this.global.yellowURL,
imgURL: this.global.imgURL, imgURL: this.global.imgURL,
starUrl: this.global.starUrl, starUrl: this.global.starUrl,
@@ -198,12 +201,27 @@
url: '/BagMoney/pages/oilCards/oilCards' url: '/BagMoney/pages/oilCards/oilCards'
}) })
}, },
getAmount() { async getAmount() {
accountApi.getTotalOilCardInfo().then(res => {
await accountApi.getTotalOilCardInfo().then(res => {
console.log(1)
if (res.code == 20000) { if (res.code == 20000) {
this.userTotal = res.data this.userTotal = res.data
} }
}) })
await accountApi.getUserAccount().then(res => {
console.log(2)
this.showCard = []
res.data.forEach(item=>{
this.showCard.push(item.companyId)
})
})
await accountApi.getSyncDeductions().then(res => {
console.log(3)
if (res.code == 20000) {
this.cardSum = this.showCard.filter(item=>!res.data.companyIds.includes(item))
}
})
}, },
copy() { copy() {
uni.setClipboardData({ uni.setClipboardData({

View File

@@ -5,7 +5,7 @@ import utils from '@/utils/encode'
// const env = 'test' // const env = 'test'
const env = 'production' const env = 'production'
// 45 // 45
const testUrl = 'http://192.168.0.54:38080' const testUrl = 'http://192.168.0.45:38080'
// const productUrl = 'https://www.xingoil.com/adminapi' // const productUrl = 'https://www.xingoil.com/adminapi'
const productUrl = 'http://uat.xingoil.com/adminapi' const productUrl = 'http://uat.xingoil.com/adminapi'