|
@@ -1,94 +1,205 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <header class="mui-bar mui-bar-nav">
|
|
|
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
- <h1 class="mui-title">账单详情</h1>
|
|
|
- </header>
|
|
|
- <div class="mui-content vongi-pay vongi-qingjiadt">
|
|
|
+ <common @asynCallBack="asynCallBack"></common>
|
|
|
+ <top-header :pageTitle="pageTitle" ></top-header>
|
|
|
+
|
|
|
+ <div class="mui-content vongi-pay vongi-qingjiadt">
|
|
|
<div class="vongi-center mui-content-padded margin30">
|
|
|
- <div class="vongi-zd vongi-zdto flew-items">
|
|
|
- <img src="~$project/assets/img/payli.png" width="24">
|
|
|
- <h3>11月半年度账单</h3>
|
|
|
- </div>
|
|
|
- <h1 class="margin10">121907.50</h1>
|
|
|
- <h4 class="color55f868">已支付</h4>
|
|
|
+ <div class="vongi-zd vongi-zdto flew-items">
|
|
|
+ <img :src="detail.goodsPic" width="24">
|
|
|
+ <h3>{{detail.billName}}</h3>
|
|
|
+ </div>
|
|
|
+ <h1 class="margin10">{{detail.totalFee}}</h1>
|
|
|
+ <h4 class="color55f868">{{detail.orderInfo.payStatusStr}}</h4>
|
|
|
</div>
|
|
|
<form class="mui-input-group">
|
|
|
-
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>缴费单位</label>
|
|
|
- <span>荆州万乘企业管理咨询有限公司</span>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <div class="mui-input-row">
|
|
|
+ <label>缴费单位</label>
|
|
|
+ <span>{{detail.companyName}}</span>
|
|
|
+ </div>
|
|
|
<div class="mui-input-row">
|
|
|
<label>推送用户</label>
|
|
|
- <span>陈冲</span>
|
|
|
+ <span>{{detail.personName}}</span>
|
|
|
</div>
|
|
|
- <div class="mui-input-row">
|
|
|
+ <div class="mui-input-row" v-if="detail.orderInfo.payName">
|
|
|
<label>付款方式</label>
|
|
|
- <span class="color55f868">微信支付</span>
|
|
|
- </div>
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>订单号</label>
|
|
|
- <span>00000000</span>
|
|
|
- </div>
|
|
|
- <div class="mui-input-row">
|
|
|
- <label>创建时间</label>
|
|
|
- <span>2020-11-28 14:13</span>
|
|
|
+ <span class="color55f868">{{detail.orderInfo.payNameStr}}</span>
|
|
|
</div>
|
|
|
<div class="mui-input-row">
|
|
|
+ <label>订单号</label>
|
|
|
+ <span>{{detail.outOrderNo}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row">
|
|
|
+ <label>创建时间</label>
|
|
|
+ <span>{{detail.createTime}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="mui-input-row" v-if="detail.orderInfo.payName">
|
|
|
<label>缴费时间</label>
|
|
|
- <span>2020-11-28 14:13</span>
|
|
|
+ <span>{{detail.orderInfo.payTime}}</span>
|
|
|
</div>
|
|
|
</form>
|
|
|
<ul class="mui-table-view openfyy-list margin60">
|
|
|
<li class="mui-table-view-cell mui-collapse">
|
|
|
- <a class="mui-navigate-right" href="#">账单明细</a>
|
|
|
+ <a class="mui-navigate-right" >账单明细</a>
|
|
|
<div class="mui-collapse-content">
|
|
|
<ul class="mui-table-view vongi-pay-list openfyy-list">
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <div class=" mui-card-content-inner flew-sp">
|
|
|
- <div class="mui-media-body">
|
|
|
- <div class='mui-ellipsis flew-sp flew-items'><span class="color4fc5f7">电费</span>(22733-22678=55度)</div>
|
|
|
- <p>生活缴费</p>
|
|
|
- </div>
|
|
|
- <span class="mui-h2">56.06元</span>
|
|
|
- </div>
|
|
|
- <p class="mui-card-footer">起止日期:2020-11-20至2021-05-19</p>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <div class=" mui-card-content-inner flew-sp">
|
|
|
- <div class="mui-media-body">
|
|
|
- <div class='mui-ellipsis flew-sp flew-items'><span class="color4fc5f7">电费</span>(22733-22678=55度)</div>
|
|
|
- <p>生活缴费</p>
|
|
|
- </div>
|
|
|
- <span class="mui-h2">56.06元</span>
|
|
|
- </div>
|
|
|
- <p class="mui-card-footer">起止日期:2020-11-20至2021-05-19</p>
|
|
|
- </li>
|
|
|
+ <li class="mui-table-view-cell" v-for="mod in list">
|
|
|
+ <div class=" mui-card-content-inner flew-sp">
|
|
|
+ <div class="mui-media-body">
|
|
|
+ <div class='mui-ellipsis flew-sp flew-items'><span class="color4fc5f7">{{mod.goodsName}}</span>({{mod.numStr}})</div>
|
|
|
+ <p>{{mod.standard}}</p>
|
|
|
+ </div>
|
|
|
+ <span class="mui-h2">{{mod.details}}元</span>
|
|
|
+ </div>
|
|
|
+ <p class="mui-card-footer">起止日期:{{beginEndTime(mod.beginEndTime)}}</p>
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
- <div class="fyy-footer vongi-footer">
|
|
|
+ <div class="fyy-footer vongi-footer" v-if="detail.payStatus==10">
|
|
|
<div class="vongi-yjbtn mui-right">
|
|
|
- <button type="submit" class="mui-btn mui-btn-primary mui-btn-outlined marginl5">支付宝</button>
|
|
|
- <button type="submit" class="mui-btn mui-btn-green mui-btn-outlined marginl5">微信支付</button>
|
|
|
+ <button type="submit" class="mui-btn mui-btn-primary mui-btn-outlined marginl5" @click="submit(2)">支付宝</button>
|
|
|
+ <button type="submit" class="mui-btn mui-btn-green mui-btn-outlined marginl5" @click="submit(1)">微信支付</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--弹窗-->
|
|
|
- <div class="mui-popup mui-popup-in vongi-mui-pop">
|
|
|
+ <div class="mui-popup mui-popup-in vongi-mui-pop" v-show="qrcodeBool">
|
|
|
<div class="mui-popup-inner vongi-pop-inner">
|
|
|
- <img src="~$project/assets/img/huodoma.png" width="100%"/>
|
|
|
- <img src="~$project/assets/img/paywx.png" width="100"/>
|
|
|
- </div>
|
|
|
+ <img id="qrcode" :src="qrCodeImg" width="100%"/>
|
|
|
+ <img src="~$project/assets/img/paywx.png" width="100" v-if="paytypeindex=='1'" />
|
|
|
+ <img src="~$project/assets/img/payzfb.png" width="100" v-if="paytypeindex=='2'" />
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="mui-popup-backdrop mui-active"></div>
|
|
|
+ <div class="mui-popup-backdrop mui-active" @click="qrcodeBool=false" v-if="qrcodeBool"></div>
|
|
|
+ <loading :visible="isLoading"></loading>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
+
|
|
|
<script>
|
|
|
+ import * as API_Pay from "$project/apis/payment";
|
|
|
+ import Common from "$project/components/Common.vue";
|
|
|
+ import Loading from "$project/components/Loading.vue";
|
|
|
+ import TopHeader from "$project/components/TopHeader.vue";
|
|
|
+ import QRCode from 'qrcodejs2'
|
|
|
+
|
|
|
+ import { mapGetters, mapMutations } from "vuex";
|
|
|
+
|
|
|
+ import {
|
|
|
+ convertCanvasToImage,
|
|
|
+
|
|
|
+ } from "$project/utils";
|
|
|
+ export default {
|
|
|
+ name: "MasterMineBillInfo",
|
|
|
+ components: {
|
|
|
+ Common,
|
|
|
+ Loading,
|
|
|
+ TopHeader,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageTitle: "账单详情",
|
|
|
+
|
|
|
+ qrCodeImg: "",
|
|
|
+ isLoading: true,
|
|
|
+ detail: {
|
|
|
+ orderInfo:{}
|
|
|
+ },
|
|
|
+ leftShow:true,
|
|
|
+
|
|
|
+ list: [],
|
|
|
+ goodsTpey: {},
|
|
|
+ id: "",
|
|
|
+ qrCodeImg:'',
|
|
|
+ qrcodeBool:false,
|
|
|
+ paytypeindex:'',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.id = this.$route.query.id;
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ beginEndTime(str){
|
|
|
+ return str.replace(',','至');
|
|
|
+ },
|
|
|
+ qrcode(url){
|
|
|
+
|
|
|
+ let qrcode = new QRCode('qrcode', {
|
|
|
+ width: 200,
|
|
|
+ height: 200,
|
|
|
+ text: url,
|
|
|
+ correctLevel: QRCode.CorrectLevel.M,
|
|
|
+
|
|
|
+ })
|
|
|
+ var canvas = document.getElementsByTagName('canvas')[0];
|
|
|
+ this.qrCodeImg = convertCanvasToImage(canvas);
|
|
|
+ this.qrcodeBool=true;
|
|
|
+
|
|
|
+ },
|
|
|
+ submit(paytypeindex) {
|
|
|
+ this.isLoading=true;
|
|
|
+ this.paytypeindex=paytypeindex;
|
|
|
+ if(paytypeindex=="1"){
|
|
|
+ API_Pay.wxNativePay(this.id ,'').then(url=>{
|
|
|
+ this.isLoading = false;
|
|
|
+
|
|
|
+ this.qrcode(url);
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+
|
|
|
+ }else if(paytypeindex=="2"){
|
|
|
+ API_Pay.tradePrecreatePay(this.id ,'').then(url=>{
|
|
|
+ this.isLoading = false;
|
|
|
+ this.qrcode(url);
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ getDetail() {
|
|
|
+ this.isLoading = true;
|
|
|
+
|
|
|
+ API_Pay.orderDetail({ id: this.id })
|
|
|
+ .then((res) => {
|
|
|
+
|
|
|
+ this.detail=res;
|
|
|
+ this.list=res.list;
|
|
|
+ this.isLoading = false;
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ asynCallBack() {},
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getDetail();
|
|
|
+ },
|
|
|
+ destroyed() {},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ openId: "wx_openid",
|
|
|
+ token: "token",
|
|
|
+ person_data: "person_data",
|
|
|
+ person_popedom: "person_popedom",
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|