解决数据下拉加载的bug,调整专区样式,完善充值记录
This commit is contained in:
parent
b4438b4638
commit
3f6a12ee67
|
@ -31,7 +31,6 @@ Page({
|
|||
})
|
||||
},
|
||||
onChange(e) {
|
||||
console.log('e', e)
|
||||
this.setData({
|
||||
active: e.detail.index,
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// pages/home/index.js
|
||||
import { getMeterDetail, getMeterList, getTenementMeterList } from "../../service/meter";
|
||||
import { getOwnTenementList } from "../../service/tenement";
|
||||
import { getOwnTenementList, getTenementExceptionalCase } from "../../service/tenement";
|
||||
import { alertInfo, alertSuccess } from "../../utils/index";
|
||||
import request from '../../utils/request';
|
||||
import { getDot } from "../../utils/system";
|
||||
|
@ -125,6 +125,15 @@ Page({
|
|||
},
|
||||
async recharge() {
|
||||
const { user, money, meter, tenement, park } = this.data;
|
||||
const { code, message, data } = await getTenementExceptionalCase(park?.id, tenement?.id);
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
if (data === 1) {
|
||||
alertInfo("账号存在异常,无法进行充值,请联系客服处理")
|
||||
return;
|
||||
}
|
||||
const that = this;
|
||||
if (!user || !user.id) {
|
||||
alertInfo("请先登录")
|
||||
|
|
|
@ -78,7 +78,6 @@ Page({
|
|||
alertError("没有开票信息")
|
||||
return;
|
||||
}
|
||||
console.log('res.tempFilePath', res.tempFilePath, sheetRes.tapIndex)
|
||||
wx.openDocument({
|
||||
filePath: res.tempFilePath,
|
||||
// fileType: sheetRes.tapIndex === 0 ? 'xml' : "pdf", // 3. 这个必须写合法类型,不然下载不了 !!!
|
||||
|
|
|
@ -27,7 +27,7 @@ Page({
|
|||
return;
|
||||
}
|
||||
let next = true;
|
||||
if (total <= page * 20) {
|
||||
if (total <= page / 20) {
|
||||
next = false;
|
||||
}
|
||||
this.setData({
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
<view class="answer"> {{ item.content }} </view>
|
||||
</view>
|
||||
</view>
|
||||
<empty bind:refresh="getList" />
|
||||
<empty wx:else="" bind:refresh="getList" />
|
||||
</view>
|
||||
</scrollPageWrapper>
|
|
@ -69,10 +69,14 @@ Page({
|
|||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
if (!res.tempFilePath) {
|
||||
alertError("获取文件失败")
|
||||
alertInfo("获取文件失败")
|
||||
rej()
|
||||
return;
|
||||
}
|
||||
if (res.tempFilePath.endsWith(".json")) {
|
||||
alertInfo("下载文件失败")
|
||||
return;
|
||||
}
|
||||
wx.openDocument({
|
||||
filePath: res.tempFilePath,
|
||||
fileType: [ "pdf"], // 3. 这个必须写合法类型,不然下载不了 !!!
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
border="{{ false }}"
|
||||
wx:elif="{{detail.orderStatus === 2}}"
|
||||
/>
|
||||
|
||||
<van-field
|
||||
value="已充值"
|
||||
label="订单状态"
|
||||
|
@ -104,6 +105,15 @@
|
|||
border="{{ false }}"
|
||||
wx:else
|
||||
/>
|
||||
<van-field
|
||||
value="{{detail.reason}}"
|
||||
label="拒绝理由"
|
||||
type="textarea"
|
||||
autosize="{{true}}"
|
||||
readonly
|
||||
border="{{ false }}"
|
||||
wx:if="{{detail.orderStatus === 2}}"
|
||||
/>
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
|
|
|
@ -3,6 +3,7 @@ import { getRechargeList } from "../../service/recharge";
|
|||
import { getTenementMeterList } from "../../service/meter";
|
||||
import { getYears, alertInfo, loadingFunc } from "../../utils/index";
|
||||
import request from "../../utils/request";
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
const { OK } = request;
|
||||
Page({
|
||||
|
||||
|
@ -79,6 +80,14 @@ Page({
|
|||
})
|
||||
this.init(currentYear, codeId, pay)
|
||||
},
|
||||
showAnswer() {
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '只统计已完成充值的数据,处理中和已退回不计入总额内',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
},
|
||||
onChangeMeter(e) {
|
||||
const { id, code, } = e;
|
||||
const { year, pay } = this.data;
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
"van-icon": "@vant/weapp/icon/index",
|
||||
"custom-status-bar": "/components/customStatusBar/index",
|
||||
"custom-picker": "/components/picker/index",
|
||||
"empty": "/components/empty/index"
|
||||
"empty": "/components/empty/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
|
@ -34,6 +34,13 @@
|
|||
<view class="rechargeStatus rechargeBack" wx:elif="{{item.orderStatus === 2}}"> 已退回 </view>
|
||||
<view class="rechargeStatus rechargeSuccess" wx:else> 充值成功 </view>
|
||||
</view>
|
||||
<view class="allMoney"> 总计<van-icon name="question-o" bind:click="showAnswer" style="font-size: 40rpx; margin-left: 8rpx;margin-right:8rpx;" />:{{amount}} </view>
|
||||
<van-divider
|
||||
contentPosition="center"
|
||||
>
|
||||
没有更多了
|
||||
</van-divider>
|
||||
<view style="height: 40rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else>
|
||||
|
@ -47,4 +54,5 @@
|
|||
bind:ok="onOk"
|
||||
bind:cancel="onCancel"
|
||||
type="{{type}}"
|
||||
/>
|
||||
/>
|
||||
<van-dialog id="van-dialog" />
|
||||
|
|
|
@ -69,10 +69,10 @@
|
|||
}
|
||||
|
||||
.allMoney {
|
||||
flex: 1;
|
||||
font-size: 34rpx;
|
||||
margin-top: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
text-align: right;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.type {
|
||||
|
|
|
@ -30,6 +30,10 @@ Page({
|
|||
clickService(e) {
|
||||
console.log('e', e)
|
||||
const { type, value } = e.currentTarget.dataset.data;
|
||||
if (!value) {
|
||||
alertInfo("暂未开通")
|
||||
return;
|
||||
}
|
||||
switch(type) {
|
||||
case 0:
|
||||
const [appId, path] = value.split(",")
|
||||
|
|
|
@ -3,4 +3,9 @@
|
|||
width: 100%;
|
||||
height: auto;
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.servicesWrapper {
|
||||
min-height: 80vh;
|
||||
background: linear-gradient(to bottom, var(--middle-green), #fff );
|
||||
}
|
|
@ -19,8 +19,6 @@
|
|||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": true,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
|
@ -45,11 +43,10 @@
|
|||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
},
|
||||
"condition": {},
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"appid": "wxb34b4e70f8a5c6f1",
|
||||
"projectname": "elec",
|
||||
"condition": {}
|
||||
"appid": "wxb34b4e70f8a5c6f1"
|
||||
}
|
|
@ -14,4 +14,9 @@ export const getOwnTenementList = async function() {
|
|||
// 获取商户详情
|
||||
export const getTenementDetail = async function(id) {
|
||||
return await GET(`/wx/getTenementDetail/${id}`);
|
||||
}
|
||||
|
||||
// 获取商户是否限电
|
||||
export const getTenementExceptionalCase = async function(pid, tid) {
|
||||
return await GET(`/wx/exceptionalCase/${pid}/${tid}`);
|
||||
}
|
Loading…
Reference in New Issue
Block a user