|
@@ -3,17 +3,6 @@
|
|
|
<u-tabs :list="tabs" @click="sectionChange" style="background-color: #fff;" :current=current
|
|
|
:itemStyle="{'width':'375rpx','padding':'24rpx'}" lineHeight="2px" lineWidth="30px"></u-tabs>
|
|
|
<view class="contain" v-show="cdshow==true">
|
|
|
- <!-- 日期选择器 -->
|
|
|
- <!-- <view class="topbilledit">
|
|
|
- <view class="changetime1">
|
|
|
- <picker mode="date" :value="dataForm.costCycle" fields="month" @change="dateChange">
|
|
|
- <view class="selestDate">{{dataForm.costCycle}}</view>
|
|
|
- </picker>
|
|
|
- </view>
|
|
|
- <view class="changetime2">
|
|
|
- <u-icon name="arrow-down-fill" color="#666666" size="20"></u-icon>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
<view class="nodata" v-if="nodata==true">
|
|
|
暂无数据
|
|
|
</view>
|
|
@@ -21,22 +10,35 @@
|
|
|
<!-- <view style="padding:16rpx 0 16rpx 32rpx">
|
|
|
共有 <span style="color: red">{{totalnumber}}</span>条记录
|
|
|
</view> -->
|
|
|
- <view class="paisong2" style="margin-top: 16rpx;">
|
|
|
- <view class="status s2">
|
|
|
- 待支付
|
|
|
- </view>
|
|
|
- <view class="subtit">
|
|
|
- 物业费: <span>¥{{zddata.amount}}</span>
|
|
|
- </view>
|
|
|
- <view class="subtit">
|
|
|
- 管理费:¥ {{zddata.glf}}
|
|
|
- </view>
|
|
|
- <view class="subtit">
|
|
|
- 中央空调使用费:¥ {{zddata.ktf}}
|
|
|
- </view>
|
|
|
- <view class="subtit">
|
|
|
- 电梯费:¥ {{zddata.dtf}}
|
|
|
+ <view class="paisong" style="margin-top: 16rpx;" v-for="(item,index) in billLists">
|
|
|
+ <u-icon name="arrow-up" @click="item.showMore=false" class="iconBtn" size="20px"
|
|
|
+ v-if="item.showMore" color="#999"></u-icon>
|
|
|
+ <u-icon name="arrow-down" @click="item.showMore=true" class="iconBtn" size="22px" color="#999"
|
|
|
+ v-else></u-icon>
|
|
|
+ <view class="title">
|
|
|
+ {{item.costType | getDictLab(that)}}: <span>¥{{item.amount}}
|
|
|
+ <text class="status s1" v-if='item.status==1'>
|
|
|
+ 已支付
|
|
|
+ </text>
|
|
|
+ <text class="status s2" v-if='item.status==2'>
|
|
|
+ 待支付
|
|
|
+ </text>
|
|
|
+ <text class="status s3" v-if='item.status==3'>
|
|
|
+ 支付失败
|
|
|
+ </text></span>
|
|
|
+
|
|
|
</view>
|
|
|
+ <template v-if="item.showMore">
|
|
|
+ <view class="subtit" style="margin-top: 16rpx;" v-for="subItem in item.billLists"
|
|
|
+ :key="subItem.id">
|
|
|
+ <template v-if="item.costType!='PropertyFee'">
|
|
|
+ {{subItem.equipName}}:{{subItem.amount}}
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{subItem.costType| getDictLab2(that)}}:{{subItem.amount}}
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
@@ -58,13 +60,28 @@
|
|
|
<view style="padding:16rpx 0 16rpx 32rpx">
|
|
|
共有 <span style="color: red">{{totalnumber}}</span>条记录
|
|
|
</view>
|
|
|
- <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'
|
|
|
- style="height:400px;flex:1;padding-bottom: 49px;">
|
|
|
+ <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'
|
|
|
+ style="height:400px;flex:1;padding-bottom: 49px;">
|
|
|
<u-list-item v-for="(item, index) in indexList" :key="index">
|
|
|
<view class="paisong2">
|
|
|
- <view class="status" v-if="item.status==1">
|
|
|
+ <view class="status" v-if="item.type=='Subsidy'">
|
|
|
+ 补助
|
|
|
+ </view>
|
|
|
+ <view class="status s2" v-if="item.type=='PreStorage'">
|
|
|
预存
|
|
|
</view>
|
|
|
+ <view class="status s3" v-if="item.type=='Refund'">
|
|
|
+ 退费
|
|
|
+ </view>
|
|
|
+ <view class="status s4" v-if="item.type=='Water'">
|
|
|
+ 水费
|
|
|
+ </view>
|
|
|
+ <view class="status s4" v-if="item.type=='Elec'">
|
|
|
+ 电费
|
|
|
+ </view>
|
|
|
+ <view class="status s4" v-if="item.type=='PropertyFee'">
|
|
|
+ 物业费
|
|
|
+ </view>
|
|
|
<view class="title">{{item.tenantInfo.name}}</view>
|
|
|
<view class="subtit">
|
|
|
扣缴金额: <span>¥{{item.amount}}</span>
|
|
@@ -84,15 +101,16 @@
|
|
|
</view>
|
|
|
</u-list-item>
|
|
|
</u-list>
|
|
|
- <view class="Predeposit" v-show="dibucaidan">
|
|
|
- <span @click="prestore('预存')">预存</span>
|
|
|
- <span @click="prestore('补助')">补助</span>
|
|
|
- </view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="Predeposit">
|
|
|
+ <span @click="prestore('预存')">预存</span>
|
|
|
+ <span @click="prestore('补助')">补助</span>
|
|
|
+ </view>
|
|
|
<u-picker :show="showtype" :itemHeight="80" :columns="columnstype" keyName="dictLabel" @confirm="confirmtype"
|
|
|
@cancel='canceltype'> </u-picker>
|
|
|
- <u-popup :show="showpayjine" @close="closepay1" @open="openpay1" mode="bottom" :round="10" :closeable=true
|
|
|
+ <u-popup :show="showpayjine" @close="closepay1" mode="bottom" :round="10" :closeable=true
|
|
|
:closeOnClickOverlay=true>
|
|
|
<view class="paytall1" style="padding-bottom: 20rpx;">
|
|
|
<view class="hejitop">
|
|
@@ -109,21 +127,6 @@
|
|
|
<u-button type="primary" text="确认支付" @click="Confirmationpaymentjine"></u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <view class="paytall">
|
|
|
- <view class="hejitop">
|
|
|
- {{prestorename}}
|
|
|
- </view>
|
|
|
- <view class="zhifufs">
|
|
|
- <u--form labelWidth="30" labelPosition="left" :model="model1" :rules="rules" ref="uForm">
|
|
|
- <u-form-item label="¥" prop="userInfo.amount" borderBottom ref="item1">
|
|
|
- <u--input v-model="model1.userInfo.amount" border="none" placeholder="点击输入金额"></u--input>
|
|
|
- </u-form-item>
|
|
|
- </u--form>
|
|
|
- </view>
|
|
|
- <view style="margin: 0 32rpx;">
|
|
|
- <u-button type="primary" text="确定" @click="Confirmationpaymentjine"></u-button>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
</u-popup>
|
|
|
|
|
|
<view class="canys" v-if="zhifucanvas">
|
|
@@ -145,13 +148,17 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ that: this,
|
|
|
+ billstype: [],
|
|
|
+ columnstype: [],
|
|
|
+ PropertyTypedata: [],
|
|
|
+ billLists: [],
|
|
|
tabs: [{
|
|
|
name: '账单明细',
|
|
|
}, {
|
|
|
name: '扣缴记录'
|
|
|
}],
|
|
|
zhifucanvas: false,
|
|
|
- dibucaidan: true,
|
|
|
prestorename: '',
|
|
|
model1: {
|
|
|
userInfo: {
|
|
@@ -192,7 +199,6 @@
|
|
|
},
|
|
|
nodata: true,
|
|
|
pd: true,
|
|
|
- columnstype: [],
|
|
|
jfpost: {
|
|
|
tenantId: "",
|
|
|
costCycle: "",
|
|
@@ -205,35 +211,23 @@
|
|
|
},
|
|
|
//监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
|
|
|
onLoad: function(options) {
|
|
|
-
|
|
|
//option为object类型,会序列化上个页面传递的参数
|
|
|
this.fatherparameter = JSON.parse(decodeURIComponent(options.para));
|
|
|
-
|
|
|
- let getDictDataList = uni.getStorageSync('getDictDataList');
|
|
|
- for (let i = 0; i < getDictDataList.length; i++) {
|
|
|
- if (getDictDataList[i].dictType == 'PayType') {
|
|
|
- this.columnstype = [getDictDataList[i].dataList]
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if (getDictDataList[i].dictType == 'PayStatus') {
|
|
|
- this.payStatusList = [getDictDataList[i].dataList]
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: this.fatherparameter.name
|
|
|
+ })
|
|
|
this.dataForm.tenantId = this.fatherparameter.id;
|
|
|
this.dataForm.costCycle = this.fatherparameter.cycle;
|
|
|
this.dataForm.page = 1;
|
|
|
-
|
|
|
-
|
|
|
this.jfpost.tenantId = this.fatherparameter.id;
|
|
|
this.jfpost.costCycle = this.fatherparameter.cycle;
|
|
|
this.jfpost.page = 1;
|
|
|
-
|
|
|
this.getalldata();
|
|
|
- // this.getPayStatusList();
|
|
|
- //this.getPayTypeList();
|
|
|
+ var getDictDataList = uni.getStorageSync('getDictDataList');
|
|
|
+ this.billstype = getDictDataList.filter((item) => item.dictType == 'PayType');
|
|
|
+ this.columnstype = [this.billstype[0].dataList];
|
|
|
+ this.PropertyTypedata = getDictDataList.filter((item) => item.dictType == 'PropertyType');
|
|
|
+ console.log(this.columnstype)
|
|
|
},
|
|
|
//监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
|
|
|
onReady() {},
|
|
@@ -246,103 +240,107 @@
|
|
|
onUnload() {},
|
|
|
//监听用户下拉动作,一般用于下拉刷新
|
|
|
onPullDownRefresh() {},
|
|
|
-
|
|
|
-
|
|
|
+ filters: {
|
|
|
+ getDictLab(v, that) {
|
|
|
+ let val = that.billstype[0].dataList.filter((item) => item.dictValue == v);
|
|
|
+ if (val && val[0]) {
|
|
|
+ return val[0].dictLabel;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getDictLab2(v, that) {
|
|
|
+ let val = that.PropertyTypedata[0].dataList.filter((item) => item.dictValue == v);
|
|
|
+ if (val && val[0]) {
|
|
|
+ return val[0].dictLabel || '11';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ // 创建订单
|
|
|
+ createOrder(postdata, type) {
|
|
|
+ uni.request({
|
|
|
+ url: BaseApi.BaseApi + '/pay/createOrder',
|
|
|
+ method: "POST",
|
|
|
+ data: postdata,
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/x-www-form-urlencoded',
|
|
|
+ "token": uni.getStorageSync('tokendata'),
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (type) {
|
|
|
+ let qrcode = new QRCode('canvas', {
|
|
|
+ text: res.data.codeUrl, // weixin://wxpay/bizpayurl?pr=sZz****
|
|
|
+ width: 213,
|
|
|
+ height: 213,
|
|
|
+ colorDark: "black",
|
|
|
+ colorLight: "white",
|
|
|
+ correctLevel: QRCode.CorrectLevel.H,
|
|
|
+ });
|
|
|
+ if (this.prestorename == '补助') {
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //预存和补助按钮点击
|
|
|
prestore(e) {
|
|
|
this.showpayjine = true;
|
|
|
- this.dibucaidan = false;
|
|
|
this.prestorename = e;
|
|
|
},
|
|
|
+ //确认支付预存和补助
|
|
|
Confirmationpaymentjine() {
|
|
|
this.$refs.uForm.validate().then(res => {
|
|
|
this.showpayjine = false;
|
|
|
- this.Predepositshow = false;
|
|
|
- this.dibucaidan = true;
|
|
|
if (this.prestorename == '预存') {
|
|
|
this.prestoredata(this.model1.userInfo.amount)
|
|
|
} else if (this.prestorename == '补助') {
|
|
|
this.subsidydata(this.model1.userInfo.amount)
|
|
|
- } else if (this.prestorename == '退费') {
|
|
|
- // this.refunddata(this.model1.userInfo.amount)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}).catch(errors => {
|
|
|
uni.$u.toast('校验失败');
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
//预存
|
|
|
prestoredata(e) {
|
|
|
this.zhifucanvas = true;
|
|
|
+ this.showpayjine = false;
|
|
|
let postdata = {
|
|
|
totalFee: e,
|
|
|
tenantId: this.dataForm.tenantId,
|
|
|
tradeType: 'NATIVE',
|
|
|
billIds: ''
|
|
|
}
|
|
|
- uni.request({
|
|
|
- url: BaseApi.BaseApi + '/pay/createOrder',
|
|
|
- method: "POST",
|
|
|
- data: postdata,
|
|
|
- header: {
|
|
|
- 'content-type': 'application/x-www-form-urlencoded',
|
|
|
- "token": uni.getStorageSync('tokendata'),
|
|
|
- },
|
|
|
- success: (res) => {
|
|
|
- let qrcode = new QRCode('canvas', {
|
|
|
- text: res.data.codeUrl, // weixin://wxpay/bizpayurl?pr=sZz****
|
|
|
- width: 213,
|
|
|
- height: 213,
|
|
|
- colorDark: "black",
|
|
|
- colorLight: "white",
|
|
|
- correctLevel: QRCode.CorrectLevel.H,
|
|
|
- });
|
|
|
- // 10秒之后调取查询订单
|
|
|
- let that = this;
|
|
|
- setTimeout(function() {
|
|
|
- that.zhifucanvas = false;
|
|
|
- that.zddata = {};
|
|
|
- that.dataForm.page = 1;
|
|
|
- that.getalldata();
|
|
|
- this.jfpost.page = 1;
|
|
|
- this.indexList = [];
|
|
|
- this.getjfdata();
|
|
|
- }, 15000);
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
+ this.createOrder(postdata, 1);
|
|
|
},
|
|
|
//补助
|
|
|
subsidydata(e) {
|
|
|
+ this.zhifucanvas = true;
|
|
|
+ this.showpayjine = false;
|
|
|
let postdata = {
|
|
|
totalFee: e,
|
|
|
tenantId: this.fatherparameter.id,
|
|
|
tradeType: 'NATIVE',
|
|
|
billIds: ''
|
|
|
}
|
|
|
- this.$api.postJson('/pay/createOrder', postdata)
|
|
|
- .then(res => {
|
|
|
- this.$refs.uNotify.success('补助成功')
|
|
|
- })
|
|
|
+ this.createOrder(postdata, 1);
|
|
|
},
|
|
|
closepay1() {
|
|
|
this.showpayjine = false
|
|
|
- this.dibucaidan = true;
|
|
|
- },
|
|
|
- openpay1() {
|
|
|
- console.log('open');
|
|
|
},
|
|
|
+ //微信二维码关闭
|
|
|
guanbi() {
|
|
|
this.zhifucanvas = false;
|
|
|
- this.Predepositshow = true;
|
|
|
- this.getalldata();
|
|
|
this.getjfdata();
|
|
|
},
|
|
|
+ //取消预存
|
|
|
canceltype() {
|
|
|
this.showtype = false;
|
|
|
},
|
|
|
+ //类型查询确定
|
|
|
confirmtype(e) {
|
|
|
this.showtype = false;
|
|
|
this.expensedata = e.value[0].dictLabel;
|
|
@@ -355,12 +353,13 @@
|
|
|
this.jfpost.page = 1;
|
|
|
this.getjfdata();
|
|
|
},
|
|
|
+ //类型查询
|
|
|
typechange() {
|
|
|
this.showtype = true;
|
|
|
},
|
|
|
+ //tab 切换
|
|
|
sectionChange(val) {
|
|
|
this.current = val.index;
|
|
|
- console.log(val.index)
|
|
|
if (val.index == 0) {
|
|
|
this.cdshow = true;
|
|
|
} else if (val.index == 1) {
|
|
@@ -371,6 +370,7 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ //加载更多
|
|
|
scrolltolower() {
|
|
|
if (this.pd) {
|
|
|
this.getjfdata();
|
|
@@ -378,11 +378,11 @@
|
|
|
return
|
|
|
}
|
|
|
},
|
|
|
+ //扣缴记录
|
|
|
getjfdata() {
|
|
|
this.$api.get('/payrecord/page', this.jfpost)
|
|
|
.then(res => {
|
|
|
this.totalnumber = res.data.data.total;
|
|
|
- // console.log('111111111111111111',res.data.data.list)
|
|
|
if (res.data.data.list.length != 0) {
|
|
|
this.indexList.push(...res.data.data.list);
|
|
|
this.jfpost.page = this.jfpost.page + 1;
|
|
@@ -399,15 +399,7 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
- dateChange(e) {
|
|
|
- this.myday = e.target.value;
|
|
|
- this.dataForm.costCycle = e.target.value;
|
|
|
- this.jfpost.costCycle = e.target.value;
|
|
|
-
|
|
|
- this.zddata = {};
|
|
|
- this.dataForm.page = 1;
|
|
|
- this.getalldata();
|
|
|
- },
|
|
|
+ //账单明细
|
|
|
getalldata() {
|
|
|
this.$api.post('/billinfo/billDetail', this.dataForm)
|
|
|
.then(res => {
|
|
@@ -416,12 +408,11 @@
|
|
|
if (res.data.data.length == 0) {
|
|
|
this.nodata = true;
|
|
|
} else {
|
|
|
+ for (let i = 0; i < res.data.data.length; i++) {
|
|
|
+ res.data.data[i].showMore = false;
|
|
|
+ }
|
|
|
this.nodata = false;
|
|
|
- this.zddata.amount = res.data.data[0].amount;
|
|
|
- this.zddata.glf = res.data.data[0].billLists[0].amount;
|
|
|
- this.zddata.ktf = res.data.data[0].billLists[1].amount;
|
|
|
- this.zddata.dtf = res.data.data[0].billLists[2].amount;
|
|
|
-
|
|
|
+ this.billLists = res.data.data;
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -587,20 +578,31 @@
|
|
|
span {
|
|
|
color: #FA5555;
|
|
|
font-weight: 600;
|
|
|
- }
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .status {
|
|
|
+ width: 50px;
|
|
|
+ padding: 3px 3px 10px 3px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #09C700;
|
|
|
+ border-radius: 11px;
|
|
|
+ position: absolute;
|
|
|
+ right: -50px;
|
|
|
+ top: -10px;
|
|
|
+ transform: scale(0.8);
|
|
|
+
|
|
|
+ &.s1 {
|
|
|
+ background: url('@/static/imgs/paySuccess.png') no-repeat;
|
|
|
+ background-size: 100%;
|
|
|
+ }
|
|
|
|
|
|
- .status {
|
|
|
- width: 100rpx;
|
|
|
- padding: 6rpx;
|
|
|
- text-align: center;
|
|
|
- font-size: 24rpx;
|
|
|
- color: #fff;
|
|
|
- background-color: #09C700;
|
|
|
- border-radius: 22rpx;
|
|
|
- position: absolute;
|
|
|
- left: 40%;
|
|
|
- top: 20rpx;
|
|
|
- transform: scale(.85);
|
|
|
+ &.s2 {
|
|
|
+ background: url('@/static/imgs/payerror.png') no-repeat;
|
|
|
+ background-size: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -644,8 +646,16 @@
|
|
|
color: #fff;
|
|
|
|
|
|
&.s2 {
|
|
|
+ background-color: #09C700;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.s3 {
|
|
|
background-color: #FA5555;
|
|
|
}
|
|
|
+
|
|
|
+ &.s4 {
|
|
|
+ background-color: #FF9C27;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|