From aaf7a950acf1431424b24f8051414a6aeaa1fe3f Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Fri, 15 Dec 2023 18:04:33 +0800 Subject: [PATCH] 2023-12-15 --- common/config.js | 4 +- common/request.api.js | 12 + pages.json | 43 +- pages/card/card-2023-12-13.vue | 241 +++++++++ pages/card/card-223-12-12.vue | 357 -------------- pages/card/card.vue | 236 +++++++-- pages/card/card_detail.vue | 5 +- pages/card/card_detail2.vue | 4 +- pages/enterprise/corporateCard.vue | 22 +- pages/enterprise/corporate_card_detail.vue | 469 ++++++++++++++++++ pages/enterprise/corporate_card_detail2.vue | 337 +++++++++++++ pages/enterprise/welfare_card_detail.vue | 518 ++++++++++++++++++++ pages/enterprise/welfare_card_detail2.vue | 343 +++++++++++++ static/border.png | Bin 0 -> 6891 bytes utils/README.md | 60 +++ utils/weapp-qrcode.js | 426 ++++++++++++++++ 16 files changed, 2665 insertions(+), 412 deletions(-) create mode 100644 pages/card/card-2023-12-13.vue delete mode 100644 pages/card/card-223-12-12.vue create mode 100644 pages/enterprise/corporate_card_detail.vue create mode 100644 pages/enterprise/corporate_card_detail2.vue create mode 100644 pages/enterprise/welfare_card_detail.vue create mode 100644 pages/enterprise/welfare_card_detail2.vue create mode 100644 static/border.png create mode 100644 utils/README.md create mode 100644 utils/weapp-qrcode.js diff --git a/common/config.js b/common/config.js index 28a73ee..ff0a685 100644 --- a/common/config.js +++ b/common/config.js @@ -6,8 +6,8 @@ * loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面 */ module.exports = { - // baseUrl: 'http://192.168.2.106:7201', - baseUrl: 'https://supervise.yxtsoft.com/lpkapi', + baseUrl: 'http://192.168.2.106:7201', + // baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // baseUrl: 'http://jianguan.yyundong.com/api', tokenName: "Authorization", // 请求头中token的名字,与服务器端对应 loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码 diff --git a/common/request.api.js b/common/request.api.js index 2621799..978c03f 100644 --- a/common/request.api.js +++ b/common/request.api.js @@ -6,16 +6,28 @@ export default { // 不显示loading true // 提货卡列表 cardList: (params = {}) => request.post("/lpkgiftcard/gifCardByCustomerSid", params, {}, {}, true), + // 福礼卡列表 + gifcardList: (params = {}) => request.post("/empcardgift/gifCardByCustomerSid", params, {}, {}, true), // 企业卡列表 empcardList: (params = {}) => request.post("/empcard/getEmpCardByCustomerSid", params, {}, {}, true), // 提货卡详情 cardDetail: (params = {}) => request.get("/lpkgiftcard/getGifCardBySid/" + params, params, {}, {}, true), + // 福礼卡详情 + gifcardDetail: (params = {}) => request.get("/empcardgift/getGifCardBySid/" + params, params, {}, {}, true), + // 企业卡详情 + empCardDetail: (params = {}) => request.get("/empcard/getEmpCardBySid/" + params, params, {}, {}, true), // 提货日期 周六日的日期组合 isSaturAndSun: (params = {}) => request.get("/lpkgiftcard/isSaturAndSun/" + params, params, {}, {}, true), + // 提货日期 周六日的日期组合 + isSaturAndSun2: (params = {}) => request.get("/empcardgift/isSaturAndSun/" + params, params, {}, {}, true), // 提货卡预约初始化 cardBooking: (params = {}) => request.get("/lpkgiftcard/getReservationBySid/" + params, params, {}, {}, true), // 提货卡预约保存 cardBookingSave: (params = {}) => request.post("/lpksreservoorder/submission", params), + // 福礼卡预约保存 + gifcardBookingSave: (params = {}) => request.post("/empsreservoorder/submission", params), + // 企业卡生成福利卡 + empcardSave: (params = {}) => request.post("/empcardgift/generateCard", params), // 绑定提货卡 cardBind: (params = {}) => request.post("/lpkgiftcard/bindCard", params), // 绑定企业卡 diff --git a/pages.json b/pages.json index 1b1c85d..6766fc2 100644 --- a/pages.json +++ b/pages.json @@ -23,6 +23,8 @@ "path": "pages/card/card", "style": { "navigationStyle": "custom" + + } }, { @@ -109,8 +111,33 @@ "path" : "pages/enterprise/corporateCard", "style" : { - "navigationBarTitleText" : "企业卡", - "enablePullDownRefresh" : true + "navigationBarTitleText" : "企业卡" + } + }, + { + "path": "pages/enterprise/corporate_card_detail", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/enterprise/corporate_card_detail2", + "style": { + "navigationStyle": "custom" + } + }, + { + "path" : "pages/enterprise/welfare_card_detail", + "style" : + { + "navigationStyle": "custom" + } + }, + { + "path" : "pages/enterprise/welfare_card_detail2", + "style" : + { + "navigationStyle": "custom" } } ], @@ -136,12 +163,12 @@ "iconPath": "static/bomicon/bom_notRecord.png", "selectedIconPath": "static/bomicon/bom_record.png" } - // , { - // "pagePath": "pages/enterprise/corporateCard", - // "text": "企业卡", - // "iconPath": "static/bomicon/bom_notCard.png", - // "selectedIconPath": "static/bomicon/bom_card.png" - // } + , { + "pagePath": "pages/enterprise/corporateCard", + "text": "企业卡", + "iconPath": "static/bomicon/bom_notCard.png", + "selectedIconPath": "static/bomicon/bom_card.png" + } ] }, "uniIdRouter": {} diff --git a/pages/card/card-2023-12-13.vue b/pages/card/card-2023-12-13.vue new file mode 100644 index 0000000..a425f7a --- /dev/null +++ b/pages/card/card-2023-12-13.vue @@ -0,0 +1,241 @@ + + + + + \ No newline at end of file diff --git a/pages/card/card-223-12-12.vue b/pages/card/card-223-12-12.vue deleted file mode 100644 index 09f5a05..0000000 --- a/pages/card/card-223-12-12.vue +++ /dev/null @@ -1,357 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/card/card.vue b/pages/card/card.vue index a425f7a..377f76a 100644 --- a/pages/card/card.vue +++ b/pages/card/card.vue @@ -19,63 +19,148 @@ - - + - + 提货卡 + - - + + 福礼卡 - - - + - - + + + + + + + - + - + + - - 卡号: {{item.serialNumber}} - - {{item.time}} + + + + + - - 预约提货 - + + + + + + 卡号:{{item.serialNumber}} + + {{item.time}} + + + + 预约提货 + + + + + {{item.pname}} + + {{item.state}} + + + - - - {{item.pname}} - - {{item.state}} + + - + + + + + + + + + + + + + + + + + + + + + + + + 卡号:{{item.serialNumber}} + + {{item.time}} + + + + 预约提货 + + + + + 福礼卡 + + {{item.state}} + + + + + + + + + + + + - - @@ -91,6 +176,8 @@ endHeight: 0 }, data: [], + data2: [], + currentTab: 0, } }, onLoad() { @@ -98,6 +185,10 @@ // 相当与下拉刷新 this.$refs.paging.reload(true); }) + uni.$on("order3", (e) => { + // 相当与下拉刷新 + this.$refs.paging2.reload(true); + }) let info = uni.getSystemInfoSync(); this.page.startHeight = info.windowWidth * 0.6 @@ -105,6 +196,7 @@ }, onUnload() { uni.$off('order'); + uni.$off('order3'); }, onPageScroll(res) { // 渐变 @@ -128,6 +220,25 @@ _this.$refs.paging.complete(false); }) }, + + // 分页的请求 + queryList2(pageNo, pageSize) { + let _this = this + _this.$api.gifcardList({ + "current": pageNo, + "size": pageSize, + "params": { + "customerSid": getApp().globalData.sid + } + }).then((resp) => { + // 添加数据源 + this.$refs.paging2.complete(resp.records) + }).catch(e => { + // 出错了,点击重试 + _this.$refs.paging2.complete(false); + }) + }, + dialogInputConfirm(val) { // 网络请求 绑定 }, @@ -151,6 +262,20 @@ } }, + detail2(item) { + + if (item.showBtn) { + // 正常 + uni.navigateTo({ + url: '/pages/enterprise/welfare_card_detail?sid=' + item.sid + }) + } else { + // 过期 已完成 + uni.navigateTo({ + url: '/pages/enterprise/welfare_card_detail2?sid=' + item.sid + }) + } + }, booking(item) { if (!item.notRese) { @@ -162,6 +287,14 @@ }) } + }, + tab(index) { + this.currentTab = index + + }, + tabChange(event) { + console.log("eeee", event.detail.current) + this.currentTab = event.detail.current } } } @@ -238,4 +371,31 @@ page { background: #FFFFFF; } + + .tab-box { + box-sizing: border-box; + height: 100vw; + } + + .tab-content { + overflow-y: scroll; + } + + .tab-bj1 { + background: #FFF6EF; + color: #FF7200; + font-size: 16px; + border-radius: 25px; + border: 1px solid #FF7200; + padding: 5px 30px; + } + + .tab-bj2 { + background: #E7E7E7; + color: #9D9D9D; + font-size: 16px; + border-radius: 25px; + padding: 5px 30px; + border: none; + } \ No newline at end of file diff --git a/pages/card/card_detail.vue b/pages/card/card_detail.vue index 0b27670..3c8ed59 100644 --- a/pages/card/card_detail.vue +++ b/pages/card/card_detail.vue @@ -290,7 +290,7 @@ this.page.sid = options.sid this.request() this.getSun() - uni.$on("order2", (e) => { + uni.$on("order", (e) => { this.$nextTick(() => { this.$refs.pageView.setLoadState(0) }) @@ -309,7 +309,7 @@ this.page.endHeight = info.windowWidth * 0.8 }, onUnload() { - uni.$off('order2'); + uni.$off('order'); uni.$off('address'); }, methods: { @@ -369,7 +369,6 @@ _this.$api.cardBookingSave(this.data).then((resp) => { uni.navigateBack() uni.$emit('order', {}) - uni.$emit('order2', {}) }).catch(e => { _this.shortToast(e.msg) }) diff --git a/pages/card/card_detail2.vue b/pages/card/card_detail2.vue index 18d62a2..8037ce3 100644 --- a/pages/card/card_detail2.vue +++ b/pages/card/card_detail2.vue @@ -148,7 +148,7 @@ onLoad(options) { this.page.sid = options.sid this.request() - uni.$on("order2", (e) => { + uni.$on("order", (e) => { this.$nextTick(() => { this.$refs.pageView.setLoadState(0) }) @@ -161,7 +161,7 @@ this.page.endHeight = info.windowWidth * 0.8 }, onUnload() { - uni.$off('order2'); + uni.$off('order'); }, methods: { diff --git a/pages/enterprise/corporateCard.vue b/pages/enterprise/corporateCard.vue index 4aae4c8..2a45668 100644 --- a/pages/enterprise/corporateCard.vue +++ b/pages/enterprise/corporateCard.vue @@ -12,9 +12,9 @@ + style="display: flex;flex-direction: column; background-color: #fff; border-top-left-radius: 25px;border-top-right-radius: 25px;margin-top: 5vw;"> - + @@ -88,6 +88,9 @@ data() { return { data: [], + styleObject:{ + 'margin-top': '22vw' + } } }, onLoad() { @@ -118,6 +121,21 @@ uni.navigateTo({ url: '/pages/card/card_bind3' }) + }, + detail(item){ + + + if (item.showBtn) { + // 正常 + uni.navigateTo({ + url: '/pages/enterprise/corporate_card_detail?sid=' + item.sid + }) + } else { + // 过期 已完成 + uni.navigateTo({ + url: '/pages/enterprise/corporate_card_detail2?sid=' + item.sid + }) + } } } } diff --git a/pages/enterprise/corporate_card_detail.vue b/pages/enterprise/corporate_card_detail.vue new file mode 100644 index 0000000..a533cab --- /dev/null +++ b/pages/enterprise/corporate_card_detail.vue @@ -0,0 +1,469 @@ +