Commit e3eb21f6fa532b59859756452a174335cafadc6e

Authored by 刘淇
1 parent 9abdc179

发放券

common/uni.css
... ... @@ -26,6 +26,9 @@ progress, checkbox-group{
26 26 form {
27 27 width: 100%;
28 28 }
  29 +.uni-con-width{
  30 + width: 100%;
  31 +}
29 32 .uni-flex {
30 33 display: flex;
31 34 flex-direction: row;
... ... @@ -39,6 +42,9 @@ form {
39 42 .uni-column {
40 43 flex-direction: column;
41 44 }
  45 +.uni-space-between{
  46 + justify-content: space-between;
  47 +}
42 48 .uni-link{
43 49 color:#576B95;
44 50 font-size:26rpx;
... ...
pages.json
... ... @@ -13,12 +13,14 @@
13 13 },
14 14 "pages": [
15 15 // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
  16 +
16 17 {
17   - "path": "pages/businessCard/buyCard",
  18 + "path": "pages/businessCard/provideCard",
18 19 "style": {
19   - "navigationBarTitleText": "商户卡券购买"
  20 + "navigationBarTitleText": "发放卡券"
20 21 }
21 22 },
  23 +
22 24 {
23 25 "path": "pages/businessCard/businessCard",
24 26 "style": {
... ... @@ -26,6 +28,19 @@
26 28 }
27 29 },
28 30 {
  31 + "path": "pages/businessCard/cardDetail",
  32 + "style": {
  33 + "navigationBarTitleText": "卡券申领明细"
  34 + }
  35 + },
  36 + {
  37 + "path": "pages/businessCard/buyCard",
  38 + "style": {
  39 + "navigationBarTitleText": "商户卡券购买"
  40 + }
  41 + },
  42 +
  43 + {
29 44 "path": "pages/parkRecordList/recordDetail",
30 45 "style": {
31 46 "navigationBarTitleText": "订单详情"
... ...
pages/businessCard/businessCard.vue
... ... @@ -23,10 +23,16 @@
23 23 <uni-icons type="cart-filled" size="18" color="#999"></uni-icons>
24 24 <text class="card-actions-item-text">购买</text>
25 25 </view>
26   - <view class="card-actions-item" @click="actionsClick('购买')">
  26 + <view class="card-actions-item" @click="actionsClick('发放')">
27 27 <uni-icons type="redo-filled" size="18" color="#999"></uni-icons>
28   - <text class="card-actions-item-text">购买</text>
  28 + <text class="card-actions-item-text">发放</text>
  29 + </view>
  30 + <view class="card-actions-item" @click="actionsClick('打印')">
  31 + <uni-icons type="shop-filled" size="18" color="#999"></uni-icons>
  32 + <text class="card-actions-item-text">打印</text>
29 33 </view>
  34 +
  35 +
30 36 </view>
31 37 </uni-card>
32 38 </uni-section>
... ...
pages/businessCard/cardDetail.vue 0 → 100644
  1 +<template>
  2 + <view>
  3 + <view class="statistics yellow-bg uni-list-cell-pd" style="color: #fff">共18张券被领取,合计金额100.00元,其中已使用16张</view>
  4 +
  5 +
  6 + <view class="uni-list">
  7 + <view class="uni-list-cell">
  8 + <view class="uni-list-cell-left">
  9 + 所有类型
  10 + </view>
  11 + <view class="uni-list-cell-db">
  12 + <picker @change="bindPickerChange" :value="index" :range="array">
  13 + <view class="uni-input">{{array[index]}}</view>
  14 + </picker>
  15 + </view>
  16 + </view>
  17 + </view>
  18 +
  19 + <view class="uni-list">
  20 + <view class="uni-list-cell">
  21 + <view class="uni-list-cell-left">
  22 + 所有状态
  23 + </view>
  24 + <view class="uni-list-cell-db">
  25 + <picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay">
  26 + <view class="uni-input">{{arrayWay[indexWay]}}</view>
  27 + </picker>
  28 + </view>
  29 + </view>
  30 + </view>
  31 +
  32 +
  33 + <view class="uni-list">
  34 + <view class="uni-list-cell">
  35 + <view class="uni-list-cell-left">
  36 + 开始时间
  37 + </view>
  38 + <view class="uni-list-cell-db">
  39 + <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange">
  40 + <view class="uni-input">{{benginDate}}</view>
  41 + </picker>
  42 + </view>
  43 + </view>
  44 + </view>
  45 +
  46 + <view class="uni-list">
  47 + <view class="uni-list-cell">
  48 + <view class="uni-list-cell-left">
  49 + 结束时间
  50 + </view>
  51 + <view class="uni-list-cell-db">
  52 + <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange">
  53 + <view class="uni-input">{{overDate}}</view>
  54 + </picker>
  55 + </view>
  56 + </view>
  57 + </view>
  58 +
  59 + <uni-section title="8折(折扣券)" type="line">
  60 + <uni-list>
  61 + <uni-list-item>
  62 + <template v-slot:body>
  63 + <view class="slot-box uni-con-width">
  64 + <view class="uni-flex uni-space-between ">
  65 + <view class="color-blue">
  66 + JE000100011
  67 + </view>
  68 + <view class="color-blue">
  69 + 京A123456
  70 + </view>
  71 + </view>
  72 + <view class="uni-flex uni-space-between" style="padding: 10px 0">
  73 + <view>
  74 + <text class="color-blue paddingRight" >领取时间</text>
  75 + 2020-11-01 01:01:01
  76 + </view>
  77 + <view class="color-green">
  78 + 已使用
  79 + </view>
  80 + </view>
  81 + <view class="uni-flex uni-space-between">
  82 + <view>
  83 + <text class="color-red paddingRight">使用时间</text>
  84 + 2020-11-01 01:01:01
  85 + </view>
  86 + <view class="color-green">
  87 + 5元/张
  88 + </view>
  89 + </view>
  90 + </view>
  91 + </template>
  92 + </uni-list-item>
  93 + </uni-list>
  94 + </uni-section>
  95 +
  96 +
  97 + <uni-section title="8折(折扣券)" type="line">
  98 + <uni-list>
  99 + <uni-list-item>
  100 + <template v-slot:body>
  101 + <view class="slot-box uni-con-width">
  102 + <view class="uni-flex uni-space-between ">
  103 + <view class="color-blue">
  104 + JE000100011
  105 + </view>
  106 + <view class="color-blue">
  107 + 京A123456
  108 + </view>
  109 + </view>
  110 + <view class="uni-flex uni-space-between" style="padding: 10px 0">
  111 + <view>
  112 + <text class="color-blue paddingRight" >领取时间</text>
  113 + 2020-11-01 01:01:01
  114 + </view>
  115 + <view class="color-red">
  116 + 已失效
  117 + </view>
  118 + </view>
  119 + <view class="uni-flex uni-space-between">
  120 + <view>
  121 + <text class="color-red paddingRight">失效时间</text>
  122 + 2020-11-01 01:01:01
  123 + </view>
  124 + <view class="color-green">
  125 + 5元/张
  126 + </view>
  127 + </view>
  128 + </view>
  129 + </template>
  130 + </uni-list-item>
  131 + </uni-list>
  132 + </uni-section>
  133 +
  134 + <uni-section title="8折(折扣券)" type="line">
  135 + <uni-list>
  136 + <uni-list-item>
  137 + <template v-slot:body>
  138 + <view class="slot-box uni-con-width">
  139 + <view class="uni-flex uni-space-between ">
  140 + <view class="color-blue">
  141 + JE000100011
  142 + </view>
  143 + <view class="color-blue">
  144 + 京A123456
  145 + </view>
  146 + </view>
  147 + <view class="uni-flex uni-space-between" style="padding: 10px 0">
  148 + <view>
  149 + <text class="color-blue paddingRight" >领取时间</text>
  150 + 2020-11-01 01:01:01
  151 + </view>
  152 + <view class="color-blue">
  153 + 未使用
  154 + </view>
  155 + </view>
  156 + <view class="uni-flex uni-space-between">
  157 + <view>
  158 + <text class="color-green paddingRight">有效截止</text>
  159 + 2020-11-01 01:01:01
  160 + </view>
  161 + <view class="color-green">
  162 + 5元/张
  163 + </view>
  164 + </view>
  165 + </view>
  166 + </template>
  167 + </uni-list-item>
  168 + </uni-list>
  169 + </uni-section>
  170 +
  171 +
  172 + </view>
  173 +</template>
  174 +
  175 +<script>
  176 +import common from "../../common/common.js";
  177 +export default {
  178 + data() {
  179 + const currentDate = this.getDate({
  180 + format: true
  181 + })
  182 + return {
  183 + title: 'picker',
  184 + array: ['折扣券', '金额券', '单次券', '包天券', '满减券', '时长券'],
  185 + arrayWay: ['所有状态', '已失效', '已使用', '未使用', '已失效'],
  186 + index: 0,
  187 + indexWay: 0,
  188 + benginDate: currentDate,
  189 + overDate: currentDate,
  190 + rows: [],
  191 + pageNum: 1,//当前页
  192 + pageSize: 1,//每页条数
  193 + reload: false,
  194 + status: 'more',
  195 + contentText: {
  196 + contentdown: '上拉加载更多~',
  197 + contentrefresh: '正在加载更多~',
  198 + contentmore: '我是有底线的~'
  199 + },
  200 + iconType: 'auto', // 图标样式
  201 + }
  202 + },
  203 + onLoad(params) {
  204 + wx.showShareMenu({
  205 + withShareTicket: true
  206 + })
  207 + // this.mycarNumber = params.carNumber;
  208 + // this.myorderId = params.orderId;
  209 + // this.myparkCode = params.parkCode;
  210 + // this.myorderState = params.orderState;
  211 + // this.totalFee = params.totalFee
  212 + // this.unPayFee = params.unPayFee
  213 + // if (params.orderState == 5) {
  214 + // //停车补缴单 103
  215 + // this.mypaySrcType = '103'
  216 + // } else {
  217 + // this.mypaySrcType = '101'
  218 + // }
  219 + // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode);
  220 + // this.getWxCode();
  221 + // this.PDlogin();
  222 + //console.log("xxxmake = "+this.makedateFormat());
  223 + },
  224 + onShow() {
  225 + var me = this;
  226 + var userInfo = me.getGlobalUser("globalUser");
  227 + if (userInfo != null) {
  228 + me.phoneNumb = userInfo.userPhone;
  229 + }
  230 + var pages = getCurrentPages();
  231 + var currPage = pages[pages.length - 1]; //当前页面
  232 + console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon);
  233 + me.selCoupon = currPage.data.selCoupon;
  234 + console.log(JSON.stringify(me.selCoupon));
  235 + // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon
  236 + // .discValue);
  237 + // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {
  238 + },
  239 + computed: {
  240 + startDate() {
  241 + return this.getDate('start');
  242 + },
  243 + endDate() {
  244 + return this.getDate('end');
  245 + }
  246 + },
  247 + methods: {
  248 + bindPickerChange: function (e) {
  249 + console.log('picker发送选择改变,携带值为', e.detail.value)
  250 + this.index = e.detail.value
  251 + },
  252 + bindPickerChangeWay: function (e) {
  253 + console.log('picker发送选择改变,携带值为', e.detail.value)
  254 + this.indexWay = e.detail.value
  255 + },
  256 + bindStartDateChange: function (e) {
  257 + this.benginDate = e.detail.value
  258 + },
  259 + bindEndDateChange: function (e) {
  260 + this.overDate = e.detail.value
  261 + },
  262 + getDate(type) {
  263 + const date = new Date();
  264 + let year = date.getFullYear();
  265 + let month = date.getMonth() + 1;
  266 + let day = date.getDate();
  267 + if (type === 'start') {
  268 + year = year - 60;
  269 + } else if (type === 'end') {
  270 + year = year + 2;
  271 + }
  272 + month = month > 9 ? month : '0' + month;
  273 + day = day > 9 ? day : '0' + day;
  274 + return `${year}-${month}-${day}`;
  275 + },
  276 + }
  277 +}
  278 +</script>
  279 +
  280 +<style lang="scss" scoped>
  281 + .rechargeWrap {
  282 + position: relative;
  283 + .rechargeArrow {
  284 + position: absolute;
  285 + right: 10px;
  286 + top: 30px;
  287 + font-size: 20px;
  288 + color: #999;
  289 + }
  290 + }
  291 +
  292 + .recordCon {
  293 + padding-right: 35px;
  294 + color: #999;
  295 + display: flex;
  296 + justify-content: space-between;
  297 + }
  298 +
  299 + .paddingRight{
  300 + padding-right: 20px;
  301 + }
  302 +</style>
... ...
pages/businessCard/provideCard.vue 0 → 100644
  1 +<template>
  2 + <view>
  3 + <uni-section title="50%(折扣券)" type="line">
  4 + <uni-card padding="0" spacing="0">
  5 + <uni-list>
  6 + <uni-list-item title="适应车场" rightText="万达商业广场" >
  7 + <text></text>
  8 + </uni-list-item>
  9 + <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item>
  10 + </uni-list>
  11 + </uni-card>
  12 + </uni-section>
  13 +
  14 + <view class=" uni-card">
  15 + <view style="width: 80%;height: 100px;border: 1px solid #ccc;margin: 0 auto">
  16 +
  17 + </view>
  18 + </view>
  19 +
  20 +
  21 +
  22 + </view>
  23 +</template>
  24 +
  25 +<script>
  26 +import common from "../../common/common.js";
  27 +export default {
  28 + data() {
  29 + const currentDate = this.getDate({
  30 + format: true
  31 + })
  32 + return {
  33 + title: 'picker',
  34 + array: ['全部', '充值', '支付'],
  35 + arrayWay: ['所有方式', '微信', '线下公对公'],
  36 + index: 0,
  37 + indexWay: 0,
  38 + benginDate: currentDate,
  39 + overDate: currentDate,
  40 + rows:[],
  41 + pageNum:1,//当前页
  42 + pageSize:1,//每页条数
  43 + reload:false,
  44 + status:'more',
  45 + contentText:{
  46 + contentdown:'上拉加载更多~',
  47 + contentrefresh:'正在加载更多~',
  48 + contentmore:'我是有底线的~'
  49 + },
  50 + iconType:'auto', // 图标样式
  51 + }
  52 + },
  53 + onLoad(params) {
  54 + wx.showShareMenu({
  55 + withShareTicket: true
  56 + })
  57 + // this.mycarNumber = params.carNumber;
  58 + // this.myorderId = params.orderId;
  59 + // this.myparkCode = params.parkCode;
  60 + // this.myorderState = params.orderState;
  61 + // this.totalFee = params.totalFee
  62 + // this.unPayFee = params.unPayFee
  63 + // if (params.orderState == 5) {
  64 + // //停车补缴单 103
  65 + // this.mypaySrcType = '103'
  66 + // } else {
  67 + // this.mypaySrcType = '101'
  68 + // }
  69 + // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode);
  70 + // this.getWxCode();
  71 + // this.PDlogin();
  72 + //console.log("xxxmake = "+this.makedateFormat());
  73 + },
  74 + onShow() {
  75 + var me = this;
  76 + var userInfo = me.getGlobalUser("globalUser");
  77 + if (userInfo != null) {
  78 + me.phoneNumb = userInfo.userPhone;
  79 + }
  80 + var pages = getCurrentPages();
  81 + var currPage = pages[pages.length - 1]; //当前页面
  82 + console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon);
  83 + me.selCoupon = currPage.data.selCoupon;
  84 + console.log(JSON.stringify(me.selCoupon));
  85 + // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon
  86 + // .discValue);
  87 + // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) {
  88 + },
  89 + computed: {
  90 + startDate() {
  91 + return this.getDate('start');
  92 + },
  93 + endDate() {
  94 + return this.getDate('end');
  95 + }
  96 + },
  97 + methods: {
  98 + actionsClick(text){
  99 + uni.showToast({
  100 + title:text,
  101 + icon:'none'
  102 + })
  103 + },
  104 + bindPickerChange: function (e) {
  105 + console.log('picker发送选择改变,携带值为', e.detail.value)
  106 + this.index = e.detail.value
  107 + },
  108 + bindPickerChangeWay: function (e) {
  109 + console.log('picker发送选择改变,携带值为', e.detail.value)
  110 + this.indexWay = e.detail.value
  111 + },
  112 + bindStartDateChange: function (e) {
  113 + this.benginDate = e.detail.value
  114 + },
  115 + bindEndDateChange: function (e) {
  116 + this.overDate = e.detail.value
  117 + },
  118 + getDate(type) {
  119 + const date = new Date();
  120 + let year = date.getFullYear();
  121 + let month = date.getMonth() + 1;
  122 + let day = date.getDate();
  123 + if (type === 'start') {
  124 + year = year - 60;
  125 + } else if (type === 'end') {
  126 + year = year + 2;
  127 + }
  128 + month = month > 9 ? month : '0' + month;
  129 + day = day > 9 ? day : '0' + day;
  130 + return `${year}-${month}-${day}`;
  131 + },
  132 + }
  133 +}
  134 +</script>
  135 +
  136 +<style lang="scss" scoped>
  137 + /deep/ .uni-section{
  138 + padding-bottom: 10px;
  139 + }
  140 + .rechargeWrap{
  141 + position: relative;
  142 + .rechargeArrow{
  143 + position: absolute;
  144 + right: 10px;
  145 + top: 30px;
  146 + font-size: 20px;
  147 + color: #999;
  148 + }
  149 + }
  150 + .recordCon {
  151 + padding-right: 35px;
  152 + color: #999;
  153 + display: flex;
  154 + justify-content: space-between;
  155 + }
  156 +
  157 + .container {
  158 + overflow: hidden;
  159 + }
  160 +
  161 + .custom-cover {
  162 + flex: 1;
  163 + flex-direction: row;
  164 + position: relative;
  165 + }
  166 +
  167 + .cover-content {
  168 + position: absolute;
  169 + bottom: 0;
  170 + left: 0;
  171 + right: 0;
  172 + height: 40px;
  173 + background-color: rgba($color: #000000, $alpha: 0.4);
  174 + display: flex;
  175 + flex-direction: row;
  176 + align-items: center;
  177 + padding-left: 15px;
  178 + font-size: 14px;
  179 + color: #fff;
  180 + }
  181 +
  182 + .card-actions {
  183 + display: flex;
  184 + flex-direction: row;
  185 + justify-content: space-around;
  186 + align-items: center;
  187 + height: 45px;
  188 + border-top: 1px #eee solid;
  189 + }
  190 + .card-actions-item {
  191 + display: flex;
  192 + flex-direction: row;
  193 + align-items: center;
  194 + }
  195 + .card-actions-item-text {
  196 + font-size: 12px;
  197 + color: #666;
  198 + margin-left: 5px;
  199 + }
  200 + .cover-image {
  201 + flex: 1;
  202 + height: 150px;
  203 + }
  204 + .no-border {
  205 + border-width: 0;
  206 + }
  207 +</style>
... ...