This commit is contained in:
cun-nan 2024-09-21 11:33:14 +08:00
parent b49079e40e
commit ca6c095895
5 changed files with 421 additions and 364 deletions

View File

@ -3,10 +3,10 @@
<div class="left-box">
<div class="box-top">
<div class="o-top" v-if="userInfo">
<div>
<div style="width: 50%">
<div class="d-s">
<img src="./imgs/new_user.png" style="width: 28px;height: 28px;margin-right: 10px">
<div>
<div >
<div style="font-weight: bold">{{chooseVipUser.name||'匿名'}}</div>
<div class="d-s">
<span>{{chooseVipUser.mobile}}</span>
@ -15,13 +15,13 @@
</div>
</div>
</div>
<div class="d-s">
<div class="d-s" >
<div style="font-size: 12px;margin-right: 5px">储值卡{{chooseVipUser.cardBalance}} </div>
<div style="font-size: 12px">囤油卡1000.000</div>
</div>
</div>
<div class="d-s">
<div class="d-s" style="width: 50%">
<div class="an_bor" @click="addMemberRecharge()">会员充值</div>
<div class="an_bor" @click="restVipUser">重置会员</div>
<div class="an_bor" @click="addFreeTicket()" >赠送优惠券</div>
@ -237,12 +237,16 @@
<div style="font-size: 16px;color: #ff9655">打印所有二维码</div>
</div>
<div class="wrap-tc">
<div class="tc_wa" :class="{'tc-active' : freeIndex == index }" @click="setFreeIndex(index)" v-for="(item,index) in freeTicketList">{{item.name}}</div>
<div class="tc_wa" :class="{'tc-active' : freeIndex == index }" @click="setFreeIndex(index)"
v-for="(item,index) in freeTicketList">{{ item.name }}
</div>
</div>
</div>
<div class="right_tc">
<div style="font-weight: 600;font-size: 16px;color: #333333;text-align: center;margin-bottom: 15px">优惠价格固定1元</div>
<div style="font-weight: 600;font-size: 16px;color: #333333;margin-bottom: 10px" >油品立减券</div>
<div style="font-weight: 600;font-size: 16px;color: #333333;text-align: center;margin-bottom: 15px">
优惠价格固定1元
</div>
<div style="font-weight: 600;font-size: 16px;color: #333333;margin-bottom: 10px">油品立减券</div>
<div style="margin-bottom: 10px">可用时间周一至周日 全天</div>
<div style="display: flex">
<div style="width: 70px">可用日期</div>
@ -272,7 +276,7 @@
<div class="red-size">微信扫一扫</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleDownloadqrCode('collection')" >下载二维码</el-button>
<el-button type="primary" @click="handleDownloadqrCode('collection')">下载二维码</el-button>
</span>
</el-dialog>
<el-dialog
@ -429,7 +433,7 @@ import pickUp from './newHomeComponents/pickUpTheOrder.vue'
import accountPending from './newHomeComponents/accountPending.vue'
import memberRecharge from './newHomeComponents/memberRecharge.vue'
import refuelingAmount from './newHomeComponents/refuelingAmount.vue'
import { cashRegisterList, cashRegisterGoodsList } from '@/api/newHome/newHome.js'
import {cashRegisterList, cashRegisterGoodsList} from '@/api/newHome/newHome.js'
import {QRCodeByStoreId} from "@/api/staff/qrcode";
import {userListByPhone} from "@/api/cashier/user";
import Vue from 'vue';
@ -592,6 +596,11 @@ export default {
},
computed: {
chooseUser(data){
//
this.userInfo = true
this.chooseVipUser = data
},
getGoodsItem() {
if (this.oilGunClearing.amount && this.oilGunClearing.amount !== undefined) {
//
@ -1649,6 +1658,27 @@ input {
padding: 10px 5px;
border-radius: 8px;
color: white;
::v-deep.el-input__inner {
background: transparent !important;
border: white 1px solid;
.el-input__placeholder{
color: red;
}
}
::v-deep input:-moz-placeholder,
::v-deep textarea:-moz-placeholder {
color: #fff;
}
::v-deep input:-ms-input-placeholder,
::v-deep textarea:-ms-input-placeholder {
color: #fff;
}
::v-deep input::-webkit-input-placeholder,
::v-deep textarea::-webkit-input-placeholder {
color: #fff ;
}
}
.wrap-tc{
width: 100%;

View File

@ -56,7 +56,8 @@
<view class="_gbox" v-for="(item,index) in oilTypeList" :key="index">
<view class="_ns">{{item.oilName}}{{item.oilType}}</view>
<view class="_ns">¥{{item.oilPrice}}</view>
<view class="_ns _lv">0.12%</view>
<view class="_ns _lv" v-if="upOrDown==1">{{item.amplitudeOfChange}}</view>
<view class="_ns _red" v-else>{{item.amplitudeOfChange}}</view>
</view>
<!-- <view class="_gbox">
<view class="_ns">92#汽油</view>
@ -270,8 +271,27 @@
onlyFromCamera: true,
success: (res) => {
console.log('扫描二维码成功,结果:' + JSON.stringify(res) + res.result);
let storeId = ""
let staffId = ""
let str = res.result.split("?")[1];
if (str.includes("&")) {
let arr = str.split("&");
arr.forEach(item => {
if (item.includes("storeId")) {
storeId = item.split("=")[1]
} else if (item.includes("staffId")) {
staffId = item.split("=")[1]
}
})
} else {
storeId = str.split("=")[1]
}
console.log(storeId,staffId,289);
uni.setStorageSync("storeId", storeId)
this.getUserAuthority();
uni.navigateTo({
url: '/pagesHome/check/index'
url: '/pages/refuel/refuel?staffId='+staffId
})
},
error: (res) => {

View File

@ -11,7 +11,7 @@
储值卡余额
</view>
<view class="card-num">
¥{{cardBalance.cardBalance}}
¥{{cardBalance.cardBalance || 0}}
</view>
<!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx
@ -29,7 +29,7 @@
剩余油量
</view>
<view class="card-num">
{{cardBalance.refuelMoney || 0}}L
0L
</view>
<!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx
@ -39,14 +39,14 @@
<view class="top_card">
<view class="">礼品卡</view>
<view class="">
面值 1000
兑换记录
</view>
</view>
<view class="card-b">
卡号xxxxxxxxxxxxxxxxx
已兑换{{cardBalance.giftCardCount || 0}}
</view>
<view class="card-b">
卡密xxxxxxxxxxxxxxxxx
累计兑换金额{{cardBalance.giftCardAmount || 0}}
</view>
<!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx
@ -71,6 +71,7 @@
cardsList: [],
cardsIndex: 0,
title: '',
giftInfo:{},
}
},
@ -140,6 +141,7 @@
}).then(res => {
if (res.code == 200) {
this.cardBalance = res.data
console.log(res.data);
}
})
},

View File

@ -8,12 +8,12 @@
<view class="my-icons"></view>
</view> -->
<!-- 顶部区域 -->
<view class="title_">付款码</view>
<view class="size_">结账时请出示</view>
<view class="title_"><!-- 付款码 --></view>
<!-- <view class="size_">结账时请出示</view> -->
<view class="cen-box">
<!-- <view class="box-top">
<view class="box-top">
请出示此码给加油员
</view> -->
</view>
<view class="code-top">
<w-barcode :options="option"></w-barcode>
</view>
@ -33,11 +33,15 @@
</text>
</view>
<view class="bottom-box" @click="show = !show">
<view class="">
<view class="h_siz">储值卡</view>
<view class="">余额{{cardBalance.cardBalance}}</view>
<image src="@/static/icon/card.png" style="width: 30px;height: 25px;">
<view style="margin-left: 15px;" v-if="value=='oilStorageCard'">
<view>{{deduction[0].value}}</view>
<view class="h_siz">{{deduction[0].desc}}</view>
</view>
<view style="margin-left: 15px;" v-if="value=='balance'">
<view>{{deduction[1].value}}</view>
<view class="h_siz">{{deduction[1].desc}}</view>
</view>
<view class="button_c" @click="goMemberRecharge()">充值</view>
</view>
</view>
@ -53,10 +57,10 @@
<view class="title">请选择用户类型</view>
<view class="hui-size">如果付款失败尝试使用其他方式完成付款</view>
</view>
<view class="bottom-box" v-for="(item,index) in deduction" :key="index"
@click="choosePayMethod(item.value)">
<view class="bottom-box" style="justify-content: space-between;" v-for="(item,index) in deduction" :key="index"
@click="choosePayMethod(item.key)">
<view style="display: flex;align-items: center;">
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
<image src="@/static/icon/card.png" style="width: 30px;height: 25px;">
<view style="margin-left: 10px;">
<view class="">{{item.value}}</view>
<!-- <view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view> -->
@ -67,7 +71,7 @@
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="bottom-box">
<!-- <view class="bottom-box">
<view style="display: flex;align-items: center;">
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
<view style="margin-left: 10px;">
@ -78,7 +82,7 @@
<view class="">
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view> -->
</view>
</u-popup>
@ -86,8 +90,8 @@
</template>
<script>
import request from '../../utils/request'
export default {
import request from '../../utils/request'
export default {
data() {
return {
timestamp: 60,
@ -105,26 +109,26 @@ export default {
deduction: [{
key: "oilStorageCard",
value: "优先使用囤油卡付款",
desc:"若囤油卡升数不足进行支付,则会与储值卡组合付款"
desc: "若囤油卡升数不足进行支付,则会与储值卡组合付款"
},
{
key: "balance",
value: "储值卡扣款",
desc:""
desc: ""
},
],
value: "oilStorageCard",
barCode: "",
isLook: false,
timer: {},
cardBalance:{},
cardBalance: {},
}
},
onLoad() {
this.getBarCode()
this.getQrCode()
this.countdown()
this.getUserInfo()
// this.getUserInfo()
},
components: {
@ -137,7 +141,7 @@ export default {
})
},
//
getUserInfo(){
getUserInfo() {
request({
url: '/business/userManager/user/getUserBalanceApplet',
method: 'get',
@ -220,11 +224,11 @@ export default {
uni.navigateBack()
}
}
}
}
</script>
<style scoped lang="scss">
.button_c{
.button_c {
width: 60px;
height: 30px;
line-height: 30px;
@ -232,21 +236,21 @@ export default {
border-radius: 5px;
background-color: #FF9655;
color: #FFFFFF;
}
}
.content {
.content {
background: #f4f5f6;
}
}
.container {
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
// padding-top: 88px;
background-color: #ff9655;
}
}
.my-header {
.my-header {
width: 100%;
height: 88px;
background: #ff9655;
@ -265,69 +269,67 @@ export default {
position: fixed;
top: 0px;
}
}
.cen-box {
.cen-box {
width: 95%;
background: #ffffff;
box-sizing: border-box;
padding: 15px;
border-radius: 8px;
margin: 10px auto;
}
}
.box-top {
.box-top {
width: 100%;
box-sizing: border-box;
// padding: 10px 0px;
padding-bottom: 10px;
border-bottom: 1px solid #f4f5f6;
text-align: center;
font-size: 18px;
font-weight: bold;
}
}
.code-box {
.code-box {
display: flex;
align-items: center;
justify-content: center;
}
}
.code-top {
.code-top {
margin: 10px auto;
display: flex;
align-items: center;
justify-content: center;
}
}
.hui-size {
.hui-size {
font-size: 14px;
width: 100%;
text-align: center;
color: #666666;
margin-bottom: 20px;
}
}
.dis-size {
.dis-size {
display: flex;
align-items: center;
justify-content: center;
color: #666666;
font-size: 14px;
margin: 20px 0px;
}
}
.bottom-box {
.bottom-box {
width: 100%;
border-top: 1px solid #f4f5f6;
box-sizing: border-box;
padding-top: 15px;
display: flex;
align-items: center;
justify-content: space-between;
}
// align-items: center;
// justify-content: space-between;
}
.v-bottom-box {
.v-bottom-box {
width: 95%;
border-radius: 8px;
box-sizing: border-box;
@ -339,52 +341,55 @@ export default {
font-size: 14px;
color: #666666;
margin: 10px auto;
}
}
.box-popup {
.box-popup {
width: 100%;
box-sizing: border-box;
padding: 15px;
background-color: #ffffff;
}
}
.popup-top {
.popup-top {
box-sizing: border-box;
}
}
.title {
.title {
width: 100%;
text-align: center;
font-size: 18px;
font-weight: bold;
color: #000000;
}
}
.hui-size {
.hui-size {
color: #666666;
font-size: 14px;
}
}
.title_ {
.title_ {
font-size: 16px;
color: #fff;
text-align: center;
}
height: 15px;
}
.size_ {
.size_ {
font-size: 14px;
color: #FFFFFF;
text-align: center;
}
}
.h_siz {
.h_siz {
color: #666666;
}
margin-top: 5px;
font-size: 14px;
}
.x_sz {
.x_sz {
font-size: 14px;
color: #333333;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B