修改缴费记录和对公
This commit is contained in:
parent
6e2608925c
commit
8482453da0
|
@ -1,4 +1,4 @@
|
|||
import { getParkList } from "../../service/park";
|
||||
import { getLoginParkList } from "../../service/park";
|
||||
import { getTenementList } from "../../service/tenement";
|
||||
import request from '../../utils/request'
|
||||
|
||||
|
@ -32,7 +32,7 @@ Component({
|
|||
async onInput(e) {
|
||||
switch(this.data.type) {
|
||||
case 0:
|
||||
const { data = [], code, message } = await getParkList({ keyword: e.detail });
|
||||
const { data = [], code, message } = await getLoginParkList({ keyword: e.detail });
|
||||
this.setData({
|
||||
list: data,
|
||||
visible: true,
|
||||
|
|
|
@ -4,6 +4,7 @@ import { createPublicTopUp } from '../../service/recharge'
|
|||
import { uploadFile, uploadPublicFile } from "../../service/public";
|
||||
import { alertInfo, loadingFunc, getFileName, alertSuccess } from "../../utils/index";
|
||||
import request from '../../utils/request';
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
|
||||
const { OK } = request;
|
||||
|
||||
|
@ -77,11 +78,22 @@ Page({
|
|||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
alertSuccess("已提交,待审核")
|
||||
setTimeout(() => {
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '订单提交成功!请耐心等待管理员审核,如果疑问请联系客服',
|
||||
confirmButtonOpenType: "contact",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "联系客服",
|
||||
cancelButtonText: "关闭"
|
||||
}).then(() => {
|
||||
|
||||
}).catch(() => {
|
||||
wx.redirectTo({
|
||||
url: '/pages/home/index',
|
||||
url: '/pages/rechargeRecord/index',
|
||||
})
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
||||
}, 600)
|
||||
},
|
||||
handleDelete() {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"navigator": "/components/navigator/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-uploader": "@vant/weapp/uploader/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
|
|
|
@ -22,4 +22,5 @@
|
|||
/>
|
||||
|
||||
<van-button bind:tap="handleSubmit" type="info" block style="margin-top: 20rpx;"> 提交 </van-button>
|
||||
</view>
|
||||
</view>
|
||||
<van-dialog id="van-dialog" />
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"navigator": "/components/navigator/index",
|
||||
"scrollPageWrapper": "/components/scrollPageWrapper/index"
|
||||
"scrollPageWrapper": "/components/scrollPageWrapper/index",
|
||||
"empty": "/components/empty/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
|
@ -2,9 +2,12 @@
|
|||
<scrollPageWrapper>
|
||||
<navigator title="常见问题" canBack="{{true}}" />
|
||||
<view class="content">
|
||||
<view wx:for="{{questions}}" wx:key="index">
|
||||
<view class="question"> {{index + 1}}、 {{ item.name }} </view>
|
||||
<view class="answer"> {{ item.content }} </view>
|
||||
<view wx:if="{{questions.length}}">
|
||||
<view wx:for="{{questions}}" wx:key="index">
|
||||
<view class="question"> {{index + 1}}、 {{ item.name }} </view>
|
||||
<view class="answer"> {{ item.content }} </view>
|
||||
</view>
|
||||
</view>
|
||||
<empty bind:refresh="getList" />
|
||||
</view>
|
||||
</scrollPageWrapper>
|
|
@ -83,6 +83,27 @@
|
|||
readonly
|
||||
border="{{ false }}"
|
||||
/>
|
||||
<van-field
|
||||
value="处理中"
|
||||
label="订单状态"
|
||||
readonly
|
||||
border="{{ false }}"
|
||||
wx:if="{{detail.orderStatus === 1}}"
|
||||
/>
|
||||
<van-field
|
||||
value="已退回"
|
||||
label="订单状态"
|
||||
readonly
|
||||
border="{{ false }}"
|
||||
wx:elif="{{detail.orderStatus === 2}}"
|
||||
/>
|
||||
<van-field
|
||||
value="已充值"
|
||||
label="订单状态"
|
||||
readonly
|
||||
border="{{ false }}"
|
||||
wx:else
|
||||
/>
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
|
|
|
@ -16,6 +16,7 @@ Page({
|
|||
list: [
|
||||
|
||||
],
|
||||
way: ["现金", "银行卡", "支付宝", "微信", "云闪付","对公转账", "小程序-微信支付"],
|
||||
show: false,
|
||||
columns: [],
|
||||
type: "",
|
||||
|
@ -40,6 +41,18 @@ Page({
|
|||
title: "表计"
|
||||
})
|
||||
},
|
||||
clickType() {
|
||||
this.setData({
|
||||
type: "pay",
|
||||
columns: [
|
||||
{id: undefined, name: "全部" },
|
||||
{id: 1, name: "对公" },
|
||||
{id: 2, name: "微信" },
|
||||
],
|
||||
show: true,
|
||||
title: "充值类型"
|
||||
})
|
||||
},
|
||||
onOk(e) {
|
||||
const { type, value = {} } = e.detail;
|
||||
if (type === "year") {
|
||||
|
@ -50,9 +63,13 @@ Page({
|
|||
this.onChangeMeter(value)
|
||||
return;
|
||||
}
|
||||
if (type === "pay") {
|
||||
this.onChangePay(value)
|
||||
return;
|
||||
}
|
||||
},
|
||||
onChangeYear(e) {
|
||||
const { codeId } = this.data;
|
||||
const { codeId, pay } = this.data;
|
||||
const currentYear = e
|
||||
this.setData({
|
||||
year: currentYear,
|
||||
|
@ -60,11 +77,11 @@ Page({
|
|||
show: false,
|
||||
title: ""
|
||||
})
|
||||
this.init(currentYear, codeId)
|
||||
this.init(currentYear, codeId, pay)
|
||||
},
|
||||
onChangeMeter(e) {
|
||||
const { id, code } = e;
|
||||
const { year } = this.data;
|
||||
const { id, code, } = e;
|
||||
const { year, pay } = this.data;
|
||||
this.setData({
|
||||
codeId: id,
|
||||
meterCode: code,
|
||||
|
@ -72,7 +89,19 @@ Page({
|
|||
show: false,
|
||||
title: ""
|
||||
})
|
||||
this.init(year, id)
|
||||
this.init(year, id, pay)
|
||||
},
|
||||
onChangePay(e) {
|
||||
const { id, name } = e;
|
||||
console.log('e', e)
|
||||
const { year, codeId } = this.data;
|
||||
this.setData({
|
||||
payType: name,
|
||||
type: "",
|
||||
show: false,
|
||||
title: ""
|
||||
})
|
||||
this.init(year,codeId, id, )
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
|
@ -102,8 +131,8 @@ Page({
|
|||
meterList: data || [],
|
||||
})
|
||||
},
|
||||
async init(year, codeId) {
|
||||
const { code, message, data = [], amount = 0 } = await getRechargeList(year, codeId);
|
||||
async init(year, codeId, pay) {
|
||||
const { code, message, data = [], amount = 0 } = await getRechargeList(year, codeId, pay);
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<van-icon name="arrow-down" custom-class="down" />
|
||||
</view>
|
||||
<view class="tenementPicker" bind:tap="clickType">
|
||||
<view wx:if="{{typeText}}" class="tenementName"> {{ typeText }} </view>
|
||||
<view wx:if="{{payType}}" class="tenementName"> {{ payType }} </view>
|
||||
<view wx:else> 全部类型 </view>
|
||||
<van-icon name="arrow-down" custom-class="down" />
|
||||
</view>
|
||||
|
@ -25,9 +25,14 @@
|
|||
<view class="codeTime">
|
||||
<view class="code"> {{ item.meter.address }} </view>
|
||||
<view class="time"> {{ item.time }} </view>
|
||||
<view class="way"> {{ way[item.paymentType] }} </view>
|
||||
</view>
|
||||
<view class="money"> {{ item.money }}元 </view>
|
||||
<van-icon name="arrow" />
|
||||
|
||||
<view class="rechargeStatus rechargeWait" wx:if="{{item.orderStatus === 1}}"> 处理中 </view>
|
||||
<view class="rechargeStatus rechargeBack" wx:elif="{{item.orderStatus === 2}}"> 已退回 </view>
|
||||
<view class="rechargeStatus rechargeSuccess" wx:else> 充值成功 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
border-right: 0;
|
||||
border-top: 0;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.recordsItem:last-child {
|
||||
border-bottom: 0;
|
||||
|
@ -89,4 +90,30 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.way {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.rechargeStatus {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
font-size: 26rpx;
|
||||
padding: 4rpx 10rpx;
|
||||
}
|
||||
|
||||
.rechargeWait {
|
||||
background-color: rgb(234,226,26);
|
||||
}
|
||||
|
||||
.rechargeSuccess {
|
||||
background-color: rgb(88,165,141);
|
||||
}
|
||||
|
||||
.rechargeBack {
|
||||
background-color: rgb(229,229,229);
|
||||
}
|
|
@ -2,9 +2,9 @@ import apis from '../utils/request';
|
|||
const { GET, POST, PUT, DELETE } = apis
|
||||
|
||||
// 获取充值记录
|
||||
export const getRechargeList = async function(year, codeId) {
|
||||
export const getRechargeList = async function(year = "", codeId = "", pay = "") {
|
||||
const tenement = wx.getStorageSync('tenement')?.id
|
||||
return await GET(`/wx/getRechargeList?year=${year}&tenement=${tenement}&codeId=${codeId}`);
|
||||
return await GET(`/wx/getRechargeList?year=${year}&tenement=${tenement}&codeId=${codeId}&pay=${pay}`);
|
||||
}
|
||||
|
||||
// 预备充值请求
|
||||
|
|
Loading…
Reference in New Issue
Block a user