Commit fd014141627f5cce4d52f74b3c0f4ecbcba3ce63

Authored by chenbiao
1 parent 882bb478

add 修复bug余额明细 详情支付方式更新

pages/rechargeDetail/outDetail.vue
1 <template> 1 <template>
2 - <view>  
3 - <view style="height: 100px;line-height: 100px;" class="uni-center">  
4 - <text style="font-size: 32px;font-weight: 500;">{{changeFeeDetail}}</text>  
5 - </view>  
6 - <view class="border-bg"></view> 2 + <view>
  3 + <view style="height: 100px;line-height: 100px;" class="uni-center">
  4 + <text style="font-size: 32px;font-weight: 500;">{{changeFeeDetail}}</text>
  5 + </view>
  6 + <view class="border-bg"></view>
7 7
8 - <view class="uni-list">  
9 - <view class="uni-list-cell paddingTopBottom">  
10 - <view class="uni-list-cell-left">  
11 - 订单编号  
12 - </view>  
13 - <view class="uni-list-cell-db">  
14 - {{orderId | tranNull}}  
15 - </view>  
16 - </view>  
17 - <view class="uni-list-cell paddingTopBottom">  
18 - <view class="uni-list-cell-left">  
19 - 支付时间  
20 - </view>  
21 - <view class="uni-list-cell-db">  
22 - {{payTime | tranNull}}  
23 - </view>  
24 - </view>  
25 - <view class="uni-list-cell paddingTopBottom">  
26 - <view class="uni-list-cell-left">  
27 - 支付方式  
28 - </view>  
29 - <view class="uni-list-cell-db color-green">  
30 - {{payType | tranNull}}  
31 - </view>  
32 - </view>  
33 - <view class="uni-list-cell paddingTopBottom">  
34 - <view class="uni-list-cell-left">  
35 - 交易类型  
36 - </view>  
37 - <view class="uni-list-cell-db">  
38 - {{typeName | tranNull}}  
39 - </view>  
40 - </view>  
41 - <view class="" v-if="cardIsShow">  
42 - <view class="uni-list-cell paddingTopBottom">  
43 - <view class="uni-list-cell-left">  
44 - 卡券类型  
45 - </view>  
46 - <view class="uni-list-cell-db">  
47 - {{cardType | tranNull}}  
48 - </view>  
49 - </view>  
50 - <view class="uni-list-cell paddingTopBottom">  
51 - <view class="uni-list-cell-left">  
52 - 规则名称  
53 - </view>  
54 - <view class="uni-list-cell-db">  
55 - {{cardRuleName | tranNull}}  
56 - </view>  
57 - </view>  
58 - <view class="uni-list-cell paddingTopBottom">  
59 - <view class="uni-list-cell-left">  
60 - 购买数量  
61 - </view>  
62 - <view class="uni-list-cell-db">  
63 - {{cardNum | tranNull}}张  
64 - </view>  
65 - </view> 8 + <view class="uni-list">
  9 + <view class="uni-list-cell paddingTopBottom">
  10 + <view class="uni-list-cell-left">
  11 + 订单编号
  12 + </view>
  13 + <view class="uni-list-cell-db">
  14 + {{orderId | tranNull}}
  15 + </view>
  16 + </view>
  17 + <view class="uni-list-cell paddingTopBottom">
  18 + <view class="uni-list-cell-left">
  19 + 支付时间
  20 + </view>
  21 + <view class="uni-list-cell-db">
  22 + {{payTime | tranNull}}
  23 + </view>
  24 + </view>
  25 + <view class="uni-list-cell paddingTopBottom">
  26 + <view class="uni-list-cell-left">
  27 + 支付方式
  28 + </view>
  29 + <view class="uni-list-cell-db color-green">
  30 + {{payType | tranNull}}
  31 + </view>
  32 + </view>
  33 + <view class="uni-list-cell paddingTopBottom">
  34 + <view class="uni-list-cell-left">
  35 + 交易类型
  36 + </view>
  37 + <view class="uni-list-cell-db">
  38 + {{typeName | tranNull}}
  39 + </view>
  40 + </view>
  41 + <view class="" v-if="cardIsShow">
  42 + <view class="uni-list-cell paddingTopBottom">
  43 + <view class="uni-list-cell-left">
  44 + 卡券类型
  45 + </view>
  46 + <view class="uni-list-cell-db">
  47 + {{cardType | tranNull}}
  48 + </view>
  49 + </view>
  50 + <view class="uni-list-cell paddingTopBottom">
  51 + <view class="uni-list-cell-left">
  52 + 规则名称
  53 + </view>
  54 + <view class="uni-list-cell-db">
  55 + {{cardRuleName | tranNull}}
  56 + </view>
  57 + </view>
  58 + <view class="uni-list-cell paddingTopBottom">
  59 + <view class="uni-list-cell-left">
  60 + 购买数量
  61 + </view>
  62 + <view class="uni-list-cell-db">
  63 + {{cardNum | tranNull}}张
  64 + </view>
  65 + </view>
66 66
67 - </view>  
68 - </view>  
69 - <view class="border-bg"></view> 67 + </view>
  68 + </view>
  69 + <view class="border-bg"></view>
70 70
71 - </view> 71 + </view>
72 </template> 72 </template>
73 73
74 <script> 74 <script>
75 -export default {  
76 - data() {  
77 - return {  
78 - changeFeeDetail: '',  
79 - orderId: '',  
80 - payTime: '',  
81 - typeName: '',  
82 - payType: '商户余额',  
83 - cardRuleName: '',  
84 - cardType: '',  
85 - cardNum: '',  
86 - cardIsShow: false,  
87 - }  
88 - },  
89 - onLoad(params) {  
90 - wx.showShareMenu({  
91 - withShareTicket: true  
92 - })  
93 - let option = JSON.parse(params.optionData)  
94 - console.log(option)  
95 - this.changeFeeDetail = option.changeFeeDetail  
96 - this.orderId = option.orderId  
97 - this.typeName = option.typeName  
98 - this.payTime = option.opTime  
99 - if (option.kind == 1) {  
100 - this.payType = '支付宝'  
101 - }  
102 - if (option.kind == 2) {  
103 - this.payType = '微信'  
104 - }  
105 - if (option.kind == 3) {  
106 - this.payType = '平台现金'  
107 - }  
108 - if (option.typeName == "购买卡券") {  
109 - this.cardIsShow = true;  
110 - this.getCouponInfo();  
111 - } else {  
112 - this.cardIsShow = false;  
113 - }  
114 - },  
115 - onShow() {  
116 - var me = this;  
117 - var userInfo = me.getGlobalUser("globalUser");  
118 - if (userInfo != null) {  
119 - me.phoneNumb = userInfo.userPhone;  
120 - }  
121 - var pages = getCurrentPages();  
122 - var currPage = pages[pages.length - 1]; //当前页面  
123 - console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon);  
124 - me.selCoupon = currPage.data.selCoupon;  
125 - console.log(JSON.stringify(me.selCoupon));  
126 - // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon  
127 - // .discValue);  
128 - // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {  
129 - },  
130 - computed: {  
131 - startDate() {  
132 - return this.getDate('start');  
133 - },  
134 - endDate() {  
135 - return this.getDate('end');  
136 - }  
137 - },  
138 - methods: {  
139 - bindPickerChange: function (e) {  
140 - console.log('picker发送选择改变,携带值为', e.detail.value)  
141 - this.index = e.detail.value  
142 - },  
143 - bindPickerChangeWay: function (e) {  
144 - console.log('picker发送选择改变,携带值为', e.detail.value)  
145 - this.indexWay = e.detail.value  
146 - },  
147 - bindStartDateChange: function (e) {  
148 - this.benginDate = e.detail.value  
149 - },  
150 - bindEndDateChange: function (e) {  
151 - this.overDate = e.detail.value  
152 - },  
153 - getDate(type) {  
154 - const date = new Date();  
155 - let year = date.getFullYear();  
156 - let month = date.getMonth() + 1;  
157 - let day = date.getDate();  
158 - if (type === 'start') {  
159 - year = year - 60;  
160 - } else if (type === 'end') {  
161 - year = year + 2;  
162 - }  
163 - month = month > 9 ? month : '0' + month;  
164 - day = day > 9 ? day : '0' + day;  
165 - return `${year}-${month}-${day}`;  
166 - },  
167 - getCouponInfo() {  
168 - let that = this  
169 - let paramsData = {  
170 - orderId: that.orderId  
171 - }  
172 - that.$myRequest({  
173 - url: that.$common.couponInfo,  
174 - method: 'POST',  
175 - data: that.$common.requestSign(paramsData)  
176 - }).then(res => {  
177 - console.log(res)  
178 - that.cardType = res.data.cardTypeName  
179 - that.cardRuleName = res.data.cardRuleName  
180 - that.cardNum = res.data.buyNum  
181 - })  
182 - },  
183 - }  
184 -} 75 + export default {
  76 + data() {
  77 + return {
  78 + changeFeeDetail: '',
  79 + orderId: '',
  80 + payTime: '',
  81 + typeName: '',
  82 + payType: '商户余额',
  83 + cardRuleName: '',
  84 + cardType: '',
  85 + cardNum: '',
  86 + cardIsShow: false,
  87 + }
  88 + },
  89 + onLoad(params) {
  90 + wx.showShareMenu({
  91 + withShareTicket: true
  92 + })
  93 + let option = JSON.parse(params.optionData)
  94 + console.log(option)
  95 + this.changeFeeDetail = option.changeFeeDetail
  96 + this.orderId = option.orderId
  97 + this.typeName = option.typeName
  98 + this.payTime = option.opTime
  99 + this.payType = option.typeName
  100 +
  101 + if (option.typeName == "购买卡券") {
  102 + this.cardIsShow = true;
  103 + this.getCouponInfo();
  104 + } else {
  105 + this.cardIsShow = false;
  106 + }
  107 + },
  108 + onShow() {
  109 + var me = this;
  110 + var userInfo = me.getGlobalUser("globalUser");
  111 + if (userInfo != null) {
  112 + me.phoneNumb = userInfo.userPhone;
  113 + }
  114 + var pages = getCurrentPages();
  115 + var currPage = pages[pages.length - 1]; //当前页面
  116 + console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon);
  117 + me.selCoupon = currPage.data.selCoupon;
  118 + console.log(JSON.stringify(me.selCoupon));
  119 + // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon
  120 + // .discValue);
  121 + // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {
  122 + },
  123 + computed: {
  124 + startDate() {
  125 + return this.getDate('start');
  126 + },
  127 + endDate() {
  128 + return this.getDate('end');
  129 + }
  130 + },
  131 + methods: {
  132 + bindPickerChange: function(e) {
  133 + console.log('picker发送选择改变,携带值为', e.detail.value)
  134 + this.index = e.detail.value
  135 + },
  136 + bindPickerChangeWay: function(e) {
  137 + console.log('picker发送选择改变,携带值为', e.detail.value)
  138 + this.indexWay = e.detail.value
  139 + },
  140 + bindStartDateChange: function(e) {
  141 + this.benginDate = e.detail.value
  142 + },
  143 + bindEndDateChange: function(e) {
  144 + this.overDate = e.detail.value
  145 + },
  146 + getDate(type) {
  147 + const date = new Date();
  148 + let year = date.getFullYear();
  149 + let month = date.getMonth() + 1;
  150 + let day = date.getDate();
  151 + if (type === 'start') {
  152 + year = year - 60;
  153 + } else if (type === 'end') {
  154 + year = year + 2;
  155 + }
  156 + month = month > 9 ? month : '0' + month;
  157 + day = day > 9 ? day : '0' + day;
  158 + return `${year}-${month}-${day}`;
  159 + },
  160 + getCouponInfo() {
  161 + let that = this
  162 + let paramsData = {
  163 + orderId: that.orderId
  164 + }
  165 + that.$myRequest({
  166 + url: that.$common.couponInfo,
  167 + method: 'POST',
  168 + data: that.$common.requestSign(paramsData)
  169 + }).then(res => {
  170 + console.log(res)
  171 + that.cardType = res.data.cardTypeName
  172 + that.cardRuleName = res.data.cardRuleName
  173 + that.cardNum = res.data.buyNum
  174 + })
  175 + },
  176 + }
  177 + }
185 </script> 178 </script>
186 179
187 <style lang="scss" scoped> 180 <style lang="scss" scoped>
188 - .rechargeWrap {  
189 - position: relative; 181 + .rechargeWrap {
  182 + position: relative;
190 183
191 - .rechargeArrow {  
192 - position: absolute;  
193 - right: 10px;  
194 - top: 30px;  
195 - font-size: 20px;  
196 - color: #999;  
197 - }  
198 - } 184 + .rechargeArrow {
  185 + position: absolute;
  186 + right: 10px;
  187 + top: 30px;
  188 + font-size: 20px;
  189 + color: #999;
  190 + }
  191 + }
199 192
200 - .recordCon {  
201 - padding-right: 35px;  
202 - color: #999;  
203 - display: flex;  
204 - justify-content: space-between;  
205 - } 193 + .recordCon {
  194 + padding-right: 35px;
  195 + color: #999;
  196 + display: flex;
  197 + justify-content: space-between;
  198 + }
206 </style> 199 </style>
pages/rechargeDetail/rechargeDetail.vue
@@ -67,17 +67,11 @@ @@ -67,17 +67,11 @@
67 <text>{{item.payStateDesc}}</text> 67 <text>{{item.payStateDesc}}</text>
68 </view> 68 </view>
69 <view class="recordCon uni-list-cell-pd"> 69 <view class="recordCon uni-list-cell-pd">
70 - <!--<text v-if="item.typeName == '购买卡券'" class="color-green">{{item.typeName}}</text>-->  
71 - <!--<text v-if="item.typeName == '微信充值'" class="color-green">{{item.typeName}}</text>-->  
72 - <!--<text v-if="item.typeName == '支付停车费'" class="color-red">{{item.typeName}}</text>-->  
73 - <!--<text v-if="item.typeName == '支付宝充值'" class="color-blue">{{item.typeName}}</text>-->  
74 - <!--<text v-if="item.typeName == '平台现金充值'" class="color-red">{{item.typeName}}</text>-->  
75 -  
76 - <text v-if="item.kind == '1'" class="color-green">支付宝</text>  
77 - <text v-if="item.typeName == '2'" class="color-green">微信</text>  
78 - <text v-if="item.typeName == '3'" class="color-red">平台现金</text>  
79 -  
80 - 70 + <text class="color-green">{{item.typeName}}</text>
  71 + <!-- <text v-if="item.type == '2'" class="color-green">{{item.typeName}}</text> -->
  72 + <!-- <text v-if="item.type == '3'" class="color-red">{{item.typeName}}</text> -->
  73 + <!-- <text v-if="item.type == '1'" class="color-blue">{{item.typeName}}</text> -->
  74 +
81 <text>{{item.opTime}}</text> 75 <text>{{item.opTime}}</text>
82 </view> 76 </view>
83 <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright"> 77 <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">