From 2ba942f6b0d888f9b5a8207371534fba1a96b9f0 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Fri, 19 Jan 2024 10:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E9=85=92=E5=8D=A1?= =?UTF-8?q?=E9=A2=9D=E5=BA=A6=E8=BD=AC=E8=B5=A0=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96=E3=80=81=E6=8E=A5=E6=94=B6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=90=9C=E7=B4=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 2 +- .../online_payment/record/quota_transfer.vue | 145 ++++++++++++++---- 2 files changed, 113 insertions(+), 34 deletions(-) diff --git a/pages.json b/pages.json index b176daa..0d3d4b1 100644 --- a/pages.json +++ b/pages.json @@ -567,7 +567,7 @@ { "path": "online_payment/record/quota_transfer", "style": { - "navigationBarTitleText": "酒卡转赠" + "navigationBarTitleText": "酒卡额度转赠" } }, { diff --git a/pages/users/online_payment/record/quota_transfer.vue b/pages/users/online_payment/record/quota_transfer.vue index d2cc7e5..9e90081 100644 --- a/pages/users/online_payment/record/quota_transfer.vue +++ b/pages/users/online_payment/record/quota_transfer.vue @@ -3,32 +3,47 @@ - - - 接收用户:{{ (consume_info.nickname || consume_info.real_name || consume_info.uid) || '请选择接收用户' }} - - {{ consume_info.uid > 0 ? '切换' : '选择' }} - - - + + + + + + + + - 转赠额度 - - ¥ - + + 接收用户 + - + + + 转赠额度 + + ¥ + + + + 剩余可用额度 {{ pointUserInfo.available }} - + 实际到账数量 {{ pay_info.receipt_num }} - + 手续费 {{ pay_info.service_charge }} @@ -48,7 +63,7 @@ 搜索 取消 - + @@ -60,6 +75,7 @@ 选中 + @@ -91,6 +107,7 @@ export default { consume_list: {}, consume_search: { search_text: '', + search_id_and_phone: '', default_consume_id: 0, }, // 提交信息 @@ -137,6 +154,12 @@ export default { this.pay_info.receipt_num = (Number(this.pay_info.transfer_num) - Number(this.pay_info.service_charge)).toFixed(2) }, deep: false + }, + 'consume_search.search_id_and_phone':{ + handler(val) { + this.getConsumeList(); + }, + deep: false } }, methods: { @@ -156,7 +179,7 @@ export default { let _this = this; // 获取用户信息 this.getUserInfo(); - this.showConsumePopup(); + // this.showConsumePopup(); }, // 获取用户持有信息 getUserInfo(){ @@ -173,7 +196,7 @@ export default { }, // 兑换用户选择 - 显示弹框 showConsumePopup(){ - if(Object.keys(this.consume_list).length <= 0) this.getConsumeList(); + // if(Object.keys(this.consume_list).length <= 0) this.getConsumeList(); // 不存在默认选中 显示弹框 this.$refs.selectedConsume.open('center'); }, @@ -184,17 +207,17 @@ export default { // 兑换用户选择 - 获取列表 getConsumeList(){ let _this = this; + if(_this.consume_search.search_id_and_phone.length <= 0){ + // this.$util.Tips({ + // title: '请输入搜索内容!' + // }); + return false; + } consumeList(this.consume_search) .then(res => { _this.consume_list = res.data || {}; // 判断:是否只有一个替换点-是则选中 - if(Object.values(_this.consume_list).length == 1){ - _this.selectedConsume(_this.consume_list[0]); - } - // 判断:是否存在默认选中提货点 - else if(_this.consume_search.default_consume_id > 0){ - _this.selectedConsume(_this.consume_list[0]); - } + _this.selectedConsume(_this.consume_list[0]); }) .catch(err => { this.$util.Tips({ @@ -204,7 +227,7 @@ export default { }, // 兑换用户选择 - 选中 selectedConsume(item){ - this.consume_info = item; + this.consume_info = item || {}; this.consumeClosePopup(); }, // 确认付款 @@ -270,6 +293,9 @@ export default { height: 30rpx; background: #1777ff; } + .padding15{ + padding: 15rpx 0; + } // 顶部内容 .top{ width: 100%; @@ -347,10 +373,58 @@ export default { border-radius: 15rpx; padding: 20rpx; box-shadow: 0px 3px 5px 0px #ececec; + .receive-user{ + width: 100%; + display: inline-flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: flex-start; + .name{ + width: 150rpx; + height: 60rpx; + line-height: 60rpx; + font-size: 30rpx; + font-weight: bold; + } + .user-search{ + width: calc(100% - 140rpx) !important; + height: 60rpx; + line-height: 60rpx; + } + } + .receive-user-info{ + width: 100%; + display: inline-flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: flex-start; + .left{ + width: 100rpx; + text-align: left; + .left-image{ + width: 90rpx; + height: 90rpx; + border-radius: 50%; + } + } + .right{ + width: calc(100% - 100rpx); + .nickname{ + width: 100%; + font-size: 30rpx; + font-weight: bold; + } + .uid{ + width: 100%; + } + } + } .title{ height: 60rpx; line-height: 60rpx; - font-size: 26rpx; + font-size: 30rpx; font-weight: bold; } .input-box{ @@ -462,8 +536,8 @@ export default { border-radius: 15rpx; font-size: 30rpx; text-align: center; - height: 70rpx; - line-height: 70rpx; + height: 80rpx; + line-height: 80rpx; position: absolute; left: 20rpx; bottom: 150rpx; @@ -481,9 +555,10 @@ export default { border-radius: 20rpx; .search-content{ + --search-height-: 70rpx; width: 100%; - height: 60rpx; - line-height: 60rpx; + height: var(--search-height-); + line-height: var(--search-height-); display: inline-flex; flex-direction: row; flex-wrap: nowrap; @@ -491,10 +566,12 @@ export default { justify-content: flex-start; .money-input{ width: calc(100% - (100rpx * 2)) !important; - height: 60rpx; - line-height: 60rpx; + height: var(--search-height-); + line-height: var(--search-height-); } .search-btn{ + height: var(--search-height-); + line-height: var(--search-height-); width: 100rpx; text-align: center; font-size: 28rpx; @@ -502,6 +579,8 @@ export default { color: #fff; } .close-btn{ + height: var(--search-height-); + line-height: var(--search-height-); width: 100rpx; text-align: center; font-size: 28rpx;