Commit 20f557b6686342cb5c8cca688e63c41dec4ab3de
Merge remote-tracking branch 'origin/branch' into branch
Showing
3 changed files
with
238 additions
and
2 deletions
pages.json
| ... | ... | @@ -13,6 +13,14 @@ |
| 13 | 13 | }, |
| 14 | 14 | "pages": [ |
| 15 | 15 | // pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
| 16 | + | |
| 17 | + | |
| 18 | + { | |
| 19 | + "path": "pages/businessCard/cardPrint", | |
| 20 | + "style": { | |
| 21 | + "navigationBarTitleText": "卡券打印" | |
| 22 | + } | |
| 23 | + }, | |
| 16 | 24 | { |
| 17 | 25 | "path": "pages/index/index", |
| 18 | 26 | "style": { | ... | ... |
pages/businessCard/cardPrint.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 | + | |
| 15 | + <view style="padding: 15px"> | |
| 16 | + 二维码有效期:(自打印时间算起) | |
| 17 | + <uni-number-box @change="changeValue" /> | |
| 18 | + </view> | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + <view class="uni-padding-wrap uni-common-mt"> | |
| 23 | + <!--<button type="primary" style="margin-bottom: 15px">停止自动发放</button>--> | |
| 24 | + <button type="warn">立即打印</button> | |
| 25 | + </view> | |
| 26 | + | |
| 27 | + | |
| 28 | + </view> | |
| 29 | +</template> | |
| 30 | + | |
| 31 | +<script> | |
| 32 | +import common from "../../common/common.js"; | |
| 33 | +export default { | |
| 34 | + data() { | |
| 35 | + const currentDate = this.getDate({ | |
| 36 | + format: true | |
| 37 | + }) | |
| 38 | + return { | |
| 39 | + numberValue: 0, | |
| 40 | + title: 'picker', | |
| 41 | + array: ['全部', '充值', '支付'], | |
| 42 | + arrayWay: ['所有方式', '微信', '线下公对公'], | |
| 43 | + index: 0, | |
| 44 | + indexWay: 0, | |
| 45 | + benginDate: currentDate, | |
| 46 | + overDate: currentDate, | |
| 47 | + rows:[], | |
| 48 | + pageNum:1,//当前页 | |
| 49 | + pageSize:1,//每页条数 | |
| 50 | + reload:false, | |
| 51 | + status:'more', | |
| 52 | + contentText:{ | |
| 53 | + contentdown:'上拉加载更多~', | |
| 54 | + contentrefresh:'正在加载更多~', | |
| 55 | + contentmore:'我是有底线的~' | |
| 56 | + }, | |
| 57 | + iconType:'auto', // 图标样式 | |
| 58 | + } | |
| 59 | + }, | |
| 60 | + onLoad(params) { | |
| 61 | + wx.showShareMenu({ | |
| 62 | + withShareTicket: true | |
| 63 | + }) | |
| 64 | + // this.mycarNumber = params.carNumber; | |
| 65 | + // this.myorderId = params.orderId; | |
| 66 | + // this.myparkCode = params.parkCode; | |
| 67 | + // this.myorderState = params.orderState; | |
| 68 | + // this.totalFee = params.totalFee | |
| 69 | + // this.unPayFee = params.unPayFee | |
| 70 | + // if (params.orderState == 5) { | |
| 71 | + // //停车补缴单 103 | |
| 72 | + // this.mypaySrcType = '103' | |
| 73 | + // } else { | |
| 74 | + // this.mypaySrcType = '101' | |
| 75 | + // } | |
| 76 | + // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode); | |
| 77 | + // this.getWxCode(); | |
| 78 | + // this.PDlogin(); | |
| 79 | + //console.log("xxxmake = "+this.makedateFormat()); | |
| 80 | + }, | |
| 81 | + onShow() { | |
| 82 | + var me = this; | |
| 83 | + var userInfo = me.getGlobalUser("globalUser"); | |
| 84 | + if (userInfo != null) { | |
| 85 | + me.phoneNumb = userInfo.userPhone; | |
| 86 | + } | |
| 87 | + var pages = getCurrentPages(); | |
| 88 | + var currPage = pages[pages.length - 1]; //当前页面 | |
| 89 | + console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon); | |
| 90 | + me.selCoupon = currPage.data.selCoupon; | |
| 91 | + console.log(JSON.stringify(me.selCoupon)); | |
| 92 | + // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon | |
| 93 | + // .discValue); | |
| 94 | + // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) { | |
| 95 | + }, | |
| 96 | + computed: { | |
| 97 | + startDate() { | |
| 98 | + return this.getDate('start'); | |
| 99 | + }, | |
| 100 | + endDate() { | |
| 101 | + return this.getDate('end'); | |
| 102 | + } | |
| 103 | + }, | |
| 104 | + methods: { | |
| 105 | + change(value) { | |
| 106 | + this.numberValue = value | |
| 107 | + }, | |
| 108 | + actionsClick(text){ | |
| 109 | + uni.showToast({ | |
| 110 | + title:text, | |
| 111 | + icon:'none' | |
| 112 | + }) | |
| 113 | + }, | |
| 114 | + bindPickerChange: function (e) { | |
| 115 | + console.log('picker发送选择改变,携带值为', e.detail.value) | |
| 116 | + this.index = e.detail.value | |
| 117 | + }, | |
| 118 | + bindPickerChangeWay: function (e) { | |
| 119 | + console.log('picker发送选择改变,携带值为', e.detail.value) | |
| 120 | + this.indexWay = e.detail.value | |
| 121 | + }, | |
| 122 | + bindStartDateChange: function (e) { | |
| 123 | + this.benginDate = e.detail.value | |
| 124 | + }, | |
| 125 | + bindEndDateChange: function (e) { | |
| 126 | + this.overDate = e.detail.value | |
| 127 | + }, | |
| 128 | + getDate(type) { | |
| 129 | + const date = new Date(); | |
| 130 | + let year = date.getFullYear(); | |
| 131 | + let month = date.getMonth() + 1; | |
| 132 | + let day = date.getDate(); | |
| 133 | + if (type === 'start') { | |
| 134 | + year = year - 60; | |
| 135 | + } else if (type === 'end') { | |
| 136 | + year = year + 2; | |
| 137 | + } | |
| 138 | + month = month > 9 ? month : '0' + month; | |
| 139 | + day = day > 9 ? day : '0' + day; | |
| 140 | + return `${year}-${month}-${day}`; | |
| 141 | + }, | |
| 142 | + } | |
| 143 | +} | |
| 144 | +</script> | |
| 145 | + | |
| 146 | +<style lang="scss" scoped> | |
| 147 | + /deep/ .uni-section{ | |
| 148 | + padding-bottom: 10px; | |
| 149 | + } | |
| 150 | + .rechargeWrap{ | |
| 151 | + position: relative; | |
| 152 | + .rechargeArrow{ | |
| 153 | + position: absolute; | |
| 154 | + right: 10px; | |
| 155 | + top: 30px; | |
| 156 | + font-size: 20px; | |
| 157 | + color: #999; | |
| 158 | + } | |
| 159 | + } | |
| 160 | + .recordCon { | |
| 161 | + padding-right: 35px; | |
| 162 | + color: #999; | |
| 163 | + display: flex; | |
| 164 | + justify-content: space-between; | |
| 165 | + } | |
| 166 | + | |
| 167 | + .container { | |
| 168 | + overflow: hidden; | |
| 169 | + } | |
| 170 | + | |
| 171 | + .custom-cover { | |
| 172 | + flex: 1; | |
| 173 | + flex-direction: row; | |
| 174 | + position: relative; | |
| 175 | + } | |
| 176 | + | |
| 177 | + .cover-content { | |
| 178 | + position: absolute; | |
| 179 | + bottom: 0; | |
| 180 | + left: 0; | |
| 181 | + right: 0; | |
| 182 | + height: 40px; | |
| 183 | + background-color: rgba($color: #000000, $alpha: 0.4); | |
| 184 | + display: flex; | |
| 185 | + flex-direction: row; | |
| 186 | + align-items: center; | |
| 187 | + padding-left: 15px; | |
| 188 | + font-size: 14px; | |
| 189 | + color: #fff; | |
| 190 | + } | |
| 191 | + | |
| 192 | + .card-actions { | |
| 193 | + display: flex; | |
| 194 | + flex-direction: row; | |
| 195 | + justify-content: space-around; | |
| 196 | + align-items: center; | |
| 197 | + height: 45px; | |
| 198 | + border-top: 1px #eee solid; | |
| 199 | + } | |
| 200 | + .card-actions-item { | |
| 201 | + display: flex; | |
| 202 | + flex-direction: row; | |
| 203 | + align-items: center; | |
| 204 | + } | |
| 205 | + .card-actions-item-text { | |
| 206 | + font-size: 12px; | |
| 207 | + color: #666; | |
| 208 | + margin-left: 5px; | |
| 209 | + } | |
| 210 | + .cover-image { | |
| 211 | + flex: 1; | |
| 212 | + height: 150px; | |
| 213 | + } | |
| 214 | + .no-border { | |
| 215 | + border-width: 0; | |
| 216 | + } | |
| 217 | + | |
| 218 | +</style> | ... | ... |
pages/businessCard/printCard.vue
| ... | ... | @@ -17,10 +17,16 @@ |
| 17 | 17 | </view> |
| 18 | 18 | </view> |
| 19 | 19 | |
| 20 | + <view style="padding: 15px"> | |
| 21 | + 二维码有效期:(自打印时间算起) | |
| 22 | + <uni-number-box @change="changeValue" /> | |
| 23 | + </view> | |
| 24 | + | |
| 25 | + | |
| 20 | 26 | |
| 21 | 27 | <view class="uni-padding-wrap uni-common-mt"> |
| 22 | - <button type="primary" style="margin-bottom: 15px">停止自动发放</button> | |
| 23 | - <button type="warn">打印静态二维码</button> | |
| 28 | + <!--<button type="primary" style="margin-bottom: 15px">停止自动发放</button>--> | |
| 29 | + <button type="warn">立即打印</button> | |
| 24 | 30 | </view> |
| 25 | 31 | |
| 26 | 32 | |
| ... | ... | @@ -35,6 +41,7 @@ export default { |
| 35 | 41 | format: true |
| 36 | 42 | }) |
| 37 | 43 | return { |
| 44 | + numberValue: 0, | |
| 38 | 45 | title: 'picker', |
| 39 | 46 | array: ['全部', '充值', '支付'], |
| 40 | 47 | arrayWay: ['所有方式', '微信', '线下公对公'], |
| ... | ... | @@ -100,6 +107,9 @@ export default { |
| 100 | 107 | } |
| 101 | 108 | }, |
| 102 | 109 | methods: { |
| 110 | + change(value) { | |
| 111 | + this.numberValue = value | |
| 112 | + }, | |
| 103 | 113 | actionsClick(text){ |
| 104 | 114 | uni.showToast({ |
| 105 | 115 | title:text, | ... | ... |