From 4a92926022804550f943803a0253efca5c130d2f Mon Sep 17 00:00:00 2001
From: liugongyu <290219706@qq.com>
Date: Tue, 17 May 2022 13:38:47 +0800
Subject: [PATCH] 商户券明细
---
common/common.js | 22 ++++++++++++++++++++++
pages/businessCard/cardDetail.vue | 336 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------
2 files changed, 204 insertions(+), 154 deletions(-)
diff --git a/common/common.js b/common/common.js
index d1d5d9f..dd43f6e 100644
--- a/common/common.js
+++ b/common/common.js
@@ -171,6 +171,27 @@ var dateFormat = function (msd) { // 时间转换
}
return time;
}
+
+var cardTypeFormat = function(num){
+ if(num == '1'){
+ return '单次券'
+ }
+ if(num == 2){
+ return '时长券'
+ }
+ if(num == 3){
+ return '满减券'
+ }
+ if(num == 4){
+ return '金额券'
+ }
+ if(num == 5){
+ return '包天券'
+ }
+ if(num == 6){
+ return '折扣券'
+ }
+}
export default {
// deviceInfo,
hs_wxPay_appId,
@@ -183,6 +204,7 @@ export default {
requestSign,
moneyFormat,
dateFormat,
+ cardTypeFormat,
// 接口
userLogin,
indexInfo,
diff --git a/pages/businessCard/cardDetail.vue b/pages/businessCard/cardDetail.vue
index 24abad3..ae18a00 100644
--- a/pages/businessCard/cardDetail.vue
+++ b/pages/businessCard/cardDetail.vue
@@ -9,8 +9,8 @@
所有类型
-
- {{array[index]}}
+
+ {{array[index].text}}
@@ -22,8 +22,9 @@
所有状态
-
- {{arrayWay[indexWay]}}
+
+ {{arrayWay[indexWay].text}}
@@ -57,159 +58,167 @@
-
-
-
-
-
-
-
-
- JE000100011
+
+
+
+
+
+
+
+
+
+
+ {{i.cardNo}}
+
+
+ {{i.carNumber}}
+
-
- {{i.carNumber}}
+
+
+ 领取时间
+
+
+
+ 已使用
+
+
+ 未使用
+
-
-
-
- 领取时间
- 2020-11-01 01:01:01
-
-
- 已使用
+
+
+ 使用时间
+
+
+
+
+ {{i.fullCutValue}}元/张
+
-
-
- 使用时间
- 2020-11-01 01:01:01
-
-
- {{i.fullCutValue}}元/张
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
- JE000100011
-
-
- 京A123456
-
-
-
-
- 领取时间
- 2020-11-01 01:01:01
-
-
- 已使用
-
-
-
-
- 使用时间
- 2020-11-01 01:01:01
-
-
- 5元/张
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- JE000100011
-
-
- 京A123456
-
-
-
-
- 领取时间
- 2020-11-01 01:01:01
-
-
- 已失效
-
-
-
-
- 失效时间
- 2020-11-01 01:01:01
-
-
- 5元/张
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- JE000100011
-
-
- 京A123456
-
-
-
-
- 领取时间
- 2020-11-01 01:01:01
-
-
- 未使用
-
-
-
-
- 有效截止
- 2020-11-01 01:01:01
-
-
- 5元/张
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -221,10 +230,21 @@ export default {
})
return {
title: 'picker',
- array: ['单次券', '时长券', '满减券', '金额券', '包天券'],
- arrayWay: ['已使用/绑定', '未使用'],
+ array: [
+ {text: '单次券', id: 1},
+ {text: '时长券', id: 2},
+ {text: '满减券', id: 3},
+ {text: '金额券', id: 4},
+ {text: '包天券', id: 5},
+ ],
+ arrayWay: [
+ {text: '已使用/绑定', id: 1},
+ {text: '未使用', id: 0},
+ ],
index: 0,
indexWay: 0,
+ cardType: '1', //卡券类型 :1-单次券,2-时长券,3-满减券,4-金额券,5-包天券
+ isUesed: '1', //1:已使用/绑定 0:未使用
beginTime: currentDate,
endTime: currentDate,
rows: [],
@@ -259,16 +279,17 @@ export default {
}
},
methods: {
+
couponIssuedParkPage: function () {
console.log(this.arrayWay)
let that = this
let paramsData = {
pageNum: this.pageNum,
pageSize: this.pageSize,
- beginTime: this.beginTime,
- endTime: this.endTime,
- cardType: '', //卡券类型 :1-单次券,2-时长券,3-满减券,4-金额券,5-包天券
- isUesed: '1', //所有状态:已失效,已使用、未使用
+ beginTime: this.beginTime+' 00:00:00',
+ endTime: this.endTime+' 23:59:59',
+ cardType: this.cardType.toString(), //卡券类型 :1-单次券,2-时长券,3-满减券,4-金额券,5-包天券
+ isUesed: this.isUesed.toString(), //1:已使用/绑定 0:未使用
}
// 首页信息获取 接口
that.$myRequest({
@@ -280,19 +301,26 @@ export default {
console.log(this.dataList)
})
},
- bindPickerChange: function (e) {
+ bindPickerChange: function (e, storage) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
+ this.cardType = storage[this.index].id
+ this.couponIssuedParkPage()
},
- bindPickerChangeWay: function (e) {
- console.log('picker发送选择改变,携带值为', e.detail.value)
+ bindPickerChangeWay: function (e, storage) {
+ console.log(storage)
this.indexWay = e.detail.value
+ this.isUesed = storage[this.indexWay].id
+ this.couponIssuedParkPage()
},
bindStartDateChange: function (e) {
+ console.log(e.detail.value)
this.beginTime = e.detail.value
+ this.couponIssuedParkPage()
},
bindEndDateChange: function (e) {
this.endTime = e.detail.value
+ this.couponIssuedParkPage()
},
getDate(type) {
const date = new Date();
--
libgit2 0.21.4