oil-station/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue

3003 lines
88 KiB
Vue
Raw Normal View History

2024-09-10 14:58:47 +08:00
<template>
2024-09-11 16:45:25 +08:00
<div class="new-contoner">
<div class="left-box">
<div class="box-top">
<div class="o-top" v-if="userInfo">
2024-09-21 11:33:14 +08:00
<div style="width: 50%">
2024-09-19 17:22:30 +08:00
<div class="d-s">
2024-09-27 09:23:47 +08:00
<img src="./imgs/new_user.png" style="width: 32px;height: 32px;margin-right: 10px">
2024-10-12 11:43:08 +08:00
<div>
<div style="font-weight: bold;margin-bottom: 2px">{{ chooseVipUser.name || '匿名' }}</div>
2024-09-19 17:22:30 +08:00
<div class="d-s">
2024-10-12 11:43:08 +08:00
<span>{{ chooseVipUser.mobile }}</span>
<span style="margin: 0px 5px">{{ chooseVipUser.gradeName }}</span>
2024-09-27 09:23:47 +08:00
<el-popover
placement="bottom"
2024-10-30 11:29:09 +08:00
trigger="hover"
>
2024-10-14 16:16:07 +08:00
<div> 储值卡{{ chooseVipUser.cardBalance || 0 }}</div>
2024-10-16 11:31:40 +08:00
<div v-if="chooseVipUser.userFuels">
2024-10-18 17:10:18 +08:00
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index">
2024-10-30 11:29:09 +08:00
囤油卡{{ item.oilNumberName }} {{ item.fuelAmount }}
2024-10-18 10:37:53 +08:00
</div>
2024-10-16 11:31:40 +08:00
</div>
2024-10-22 16:01:59 +08:00
<div v-if="chooseVipUser.fleetMember">
<div>
2024-10-29 15:40:39 +08:00
车队卡{{ chooseVipUser.fleetMember.remainingCreditLimit }}
2024-10-18 10:37:53 +08:00
</div>
2024-10-16 11:31:40 +08:00
</div>
2024-09-27 09:23:47 +08:00
<img slot="reference" src="./imgs/kbao.png" style="width: 24px;height: 24px;margin-right: 10px">
</el-popover>
2024-09-19 17:22:30 +08:00
</div>
2024-09-11 11:06:27 +08:00
</div>
</div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-19 17:22:30 +08:00
2024-09-21 11:33:14 +08:00
<div class="d-s" style="width: 50%">
<div class="an_bor" @click="addMemberRecharge()">会员充值</div>
2024-09-21 11:17:25 +08:00
<div class="an_bor" @click="restVipUser">重置会员</div>
2024-10-12 11:43:08 +08:00
<div class="an_bor" @click="addFreeTicket()">赠送优惠券</div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-12 11:49:20 +08:00
</div>
<div class="o-top" v-if="!userInfo">
2024-09-12 11:49:20 +08:00
<div class="left_input">
2024-09-21 09:54:19 +08:00
<el-autocomplete
2024-09-21 11:17:25 +08:00
v-model="userMobile"
2024-09-27 09:23:47 +08:00
style="width: 95%; "
2024-09-21 11:17:25 +08:00
:fetch-suggestions="getUser"
placeholder="请输入会员手机号"
2024-09-21 09:54:19 +08:00
>
<template slot-scope="{ item }">
2024-10-30 11:29:09 +08:00
<div class="name" @click="chooseUser(item)">{{ item.name + ' ' + item.mobile }}</div>
2024-09-21 09:54:19 +08:00
</template>
</el-autocomplete>
2024-10-12 11:43:08 +08:00
<i class="el-icon-search" style="font-size: 18px;margin-right: 10px"></i>
2024-09-12 11:49:20 +08:00
</div>
<div class="d-s">
<div class="an_bor" @click="addVip()">新增会员</div>
2024-09-12 11:49:20 +08:00
</div>
2024-09-21 09:31:11 +08:00
<!-- 渲染会员列表 -->
<div class="taber-box" v-for="(item,index) in vipUserList" :key="index">
<div class="goods_name">
<!-- <img src="../../../assets/images/goods.png" style="width: 30px;height: 30px">-->
{{ item.name }}
</div>
</div>
2024-09-11 16:45:25 +08:00
</div>
<div class="t-top">
2024-09-22 18:53:15 +08:00
<div class="three_box">油品:{{ oilGunClearing.amount || 0.00 }}</div>
2024-09-11 16:45:25 +08:00
<div style="color: #F4F5F9">|</div>
2024-09-22 18:53:15 +08:00
<div class="three_box">商品:{{ getGoodsNum }}</div>
2024-09-11 16:45:25 +08:00
<div style="color: #F4F5F9">|</div>
2024-09-22 18:53:15 +08:00
<div class="three_box">合计:{{ orderAmount }}</div>
2024-09-11 16:45:25 +08:00
</div>
2024-10-30 11:29:09 +08:00
<div class="d-top" v-loading="loadingPreferential">
2024-09-11 16:45:25 +08:00
<div class="d-b">
2024-09-11 18:14:20 +08:00
2024-09-27 10:05:48 +08:00
<el-checkbox v-model="showAct">活动优惠 <i class="el-icon-arrow-down"></i></el-checkbox>
2024-09-26 13:45:48 +08:00
<div class="or_num"></div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-11 18:14:20 +08:00
<!-- 下拉列表插入-->
2024-09-27 10:05:48 +08:00
<div v-if="showAct == true">
2024-09-22 20:24:44 +08:00
<div v-if="activityList.length>0">
2024-10-12 11:43:08 +08:00
<el-radio-group style="width: 100%" v-model="chooseActId" @change="handleChangeAct">
<div class="x-d-b" v-for="(item,index) in activityList">
<el-radio :label="item.id">{{ null == item.ruleName ? item.actName : item.ruleName }}
<div class="or_num">-{{ item.disAmount }}</div>
</el-radio>
2024-09-22 20:24:44 +08:00
</div>
</el-radio-group>
2024-09-11 18:14:20 +08:00
</div>
2024-09-22 20:24:44 +08:00
<div v-if="activityList.length==0">
暂无可用优惠活动
2024-09-11 18:14:20 +08:00
</div>
</div>
2024-09-11 16:45:25 +08:00
<div class="d-b">
2024-09-12 11:28:21 +08:00
2024-09-27 10:05:48 +08:00
<el-checkbox v-model="showCoupon">优惠券 <i class="el-icon-arrow-down"></i></el-checkbox>
2024-09-26 13:45:48 +08:00
<div class="or_num"></div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-19 17:22:30 +08:00
<!-- 下拉列表插入-->
2024-09-27 10:05:48 +08:00
<div v-if="showCoupon == true">
2024-09-26 13:45:48 +08:00
<div v-if="couponList.length>0">
2024-10-12 11:43:08 +08:00
<el-radio-group style="width: 100%" v-model="chooseCouponId" @change="handleChangeCoupon">
<div class="x-d-b" v-for="(item,index) in couponList">
<el-radio :label="item.id">{{ item.name }}
<div class="or_num">-{{ item.disAmount }}</div>
</el-radio>
2024-09-26 13:45:48 +08:00
</div>
</el-radio-group>
2024-09-19 17:22:30 +08:00
</div>
2024-09-26 13:45:48 +08:00
<div v-if="couponList.length==0">
暂无可用优惠券
2024-09-19 17:22:30 +08:00
</div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-11 18:14:20 +08:00
2024-09-11 16:45:25 +08:00
</div>
2024-09-30 14:10:07 +08:00
2024-09-11 16:45:25 +08:00
<div class="er-box"></div>
2024-10-08 13:57:18 +08:00
<div class="wrap-box" style="position: absolute;bottom: 0;">
2024-10-10 18:52:22 +08:00
<div class="f-box" v-for="(item,index) in payList" :class="{'f-acvite' : item.dictValue == payType }"
2024-09-22 20:24:44 +08:00
@click="setindex(item.dictValue)" :key="item.dictValue"
2024-09-22 18:34:17 +08:00
>{{ item.dictLabel }}
</div>
2024-09-27 09:23:47 +08:00
<div style="width: 31%"></div>
2024-09-11 16:45:25 +08:00
</div>
</div>
2024-09-21 09:24:50 +08:00
2024-09-11 16:45:25 +08:00
<div class="box-bottom">
2024-09-11 18:14:20 +08:00
<div>
2024-10-12 11:43:08 +08:00
<div class="price_">{{ realAmount }}</div>
2024-10-30 11:29:09 +08:00
<!-- <div class="price_prefer" style="font-size: 14px">油品优惠:-{{ parseFloat(disOil).toFixed(2)}}</div>-->
<!-- <div class="price_prefer" style="font-size: 14px">商品优惠:-{{ parseFloat(disGoods).toFixed(2) }}</div>-->
<div class="price_prefer">优惠合计:-{{ parseFloat(disTotal).toFixed(2) }}</div>
2024-09-11 18:14:20 +08:00
</div>
2024-10-30 11:29:09 +08:00
<div class="anniu" @click="settlement()" :class="{ disabled: !isClickable}">立即结算</div>
2024-09-11 16:45:25 +08:00
</div>
</div>
2024-09-27 09:23:47 +08:00
2024-10-30 11:29:09 +08:00
<!-- 油品-->
2024-09-11 16:45:25 +08:00
<div class="cont-box">
<div class="box-top">
<div class="cont-tab">
<div class="tab-box" v-for="(value,key,index) in tabList" :key="index" @click="setTabindex(key,index)">
<div class="tab-name" :class="{ 'active_name' : tabIndex == index }">{{ key }}</div>
2024-09-11 16:45:25 +08:00
<div class="gang" :class="{ 'active_gang' : tabIndex == index }"></div>
</div>
</div>
2024-10-22 10:05:09 +08:00
<div class="tab-kuang" style="flex-wrap: wrap;">
<div class="zo_box" v-for="(item,index) in dataList">
2024-10-30 11:29:09 +08:00
<div :class=item.classStyle @click="setRefuelingAmount(item)">
2024-10-22 10:05:09 +08:00
<div>{{ item.oilType }}&nbsp;{{ item.oilName }}</div>
<div class="card-title">{{ item.gunName }}</div>
<div class="c-b-d">
<img :src=item.img style="width: 16px;height: 16px">
<div>{{ item.tankName }}</div>
</div>
2024-09-11 16:45:25 +08:00
</div>
</div>
</div>
2024-10-12 11:43:08 +08:00
<div style=" position: absolute;bottom: 0px; width: 100%;">
2024-09-27 09:23:47 +08:00
<div class="c-bottom">
{{ getGoodsItem }}
</div>
<div class="bottom-b-d">
<!-- <div>订单笔数 <span style="color: #FF9655">0</span></div>-->
<div>油品金额 <span style="color: #FF9655">{{ oilGunClearing.amount || 0.00 }}</span></div>
</div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-27 09:23:47 +08:00
2024-09-11 16:45:25 +08:00
</div>
2024-09-11 18:14:20 +08:00
<div class="box-bottom">
2024-09-27 09:23:47 +08:00
<div class="anniu-c" @click="oilGunReset()">
2024-09-11 16:45:25 +08:00
重置
</div>
</div>
</div>
2024-10-22 10:42:47 +08:00
2024-10-30 11:29:09 +08:00
<!-- 非油商品-->
2024-09-11 16:45:25 +08:00
<div class="right-box">
<div class="box-top">
2024-09-11 18:14:20 +08:00
<div class="r-top">非油商品</div>
2024-09-12 11:49:20 +08:00
<el-autocomplete
style="width: 95%;margin: 15px "
popper-class="my-autocomplete"
2024-09-12 11:49:20 +08:00
v-model="state"
:fetch-suggestions="querySearchAsync"
placeholder="请输入内容"
@select="handleSelect"
>
<template slot-scope="{ item }">
<div class="name">{{ item.name }}</div>
</template>
</el-autocomplete>
2024-09-11 16:45:25 +08:00
<div class="taber-top">
<div class="goods_name">商品</div>
<div class="stock_name">库存</div>
<div class="u-price_name">单价</div>
2024-09-27 09:23:47 +08:00
<div class="u-price_name">会员价</div>
2024-09-11 16:45:25 +08:00
<div class="num_name">数量</div>
<div class="orerate_name">操作</div>
</div>
<!-- 渲染商品列表 -->
2024-09-30 10:30:55 +08:00
<div class="taber-box" v-for="(item,index) in goodsList" :key="index">
2024-09-30 10:30:55 +08:00
2024-09-11 16:45:25 +08:00
<div class="goods_name">
<!-- <img src="../../../assets/images/goods.png" style="width: 30px;height: 30px">-->
{{ item.name }}
2024-09-11 16:45:25 +08:00
</div>
<div class="stock_name">{{ item.stock }}</div>
<div class="u-price_name">{{ item.retailPrice }}</div>
2024-10-30 11:29:09 +08:00
<div class="u-price_name">{{ item.memberPrice }}</div>
2024-10-11 17:17:09 +08:00
<div class="num_name">
2024-10-12 11:43:08 +08:00
<el-input-number v-model="goodsList[index].num" @change="handleCilone(goodsList[index])" :max=item.stock
2024-10-30 11:29:09 +08:00
size="mini" :min="1"
>
2024-10-11 17:17:09 +08:00
</el-input-number>
</div>
2024-09-11 16:45:25 +08:00
<div class="orerate_name">
<span style="color: red;cursor: pointer" @click="deleteGoods(item.id)">删除</span>
2024-09-11 16:45:25 +08:00
</div>
</div>
2024-09-27 09:23:47 +08:00
<div style=" position: absolute;bottom: 0px; width: 100%;">
<div class="bottom-b-d">
<div>商品总数 <span style="color: #FF9655">{{ getGoodsListNum }}</span></div>
<div>商品总金额 <span style="color: #FF9655">{{ getGoodsNum }}</span></div>
</div>
2024-09-11 16:45:25 +08:00
</div>
2024-09-27 09:23:47 +08:00
2024-09-11 16:45:25 +08:00
</div>
<div class="box-bottom">
<div class="anniu-c" @click="goodsReset()">
2024-09-11 16:45:25 +08:00
重置
</div>
<div class="d-s">
<div class="anniu-lv" @click="invokePickUpTheOrder">取单</div>
<div class="anniu-lan" @click="invokeHangingAnOrder">挂单</div>
2024-09-11 16:45:25 +08:00
</div>
</div>
</div>
2024-09-11 18:14:20 +08:00
<!-- 弹窗-->
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="送券"
:visible.sync="freeTicket"
width="800px"
2024-09-19 17:22:30 +08:00
>
2024-09-30 14:10:07 +08:00
<div class="ds-tc" style="margin-top: -20px">
2024-09-19 17:22:30 +08:00
<div class="left_tc">
<div class="t-tc">
<div style="font-size: 18px;font-weight: bold">所有卡券</div>
2024-09-30 14:10:07 +08:00
2024-09-19 17:22:30 +08:00
</div>
<div class="wrap-tc">
2024-10-12 11:43:08 +08:00
<div class="tc_wa" :class="{'tc-active' : item.id == sendCoupon.id }" @click="setFreeIndex(item)"
2024-10-30 11:29:09 +08:00
v-for="(item,index) in sendCouponList"
>
2024-10-09 17:32:17 +08:00
{{ item.name }}
2024-09-21 11:33:14 +08:00
</div>
2024-09-19 17:22:30 +08:00
</div>
</div>
<div class="right_tc">
2024-09-21 11:33:14 +08:00
<div style="font-weight: 600;font-size: 16px;color: #333333;text-align: center;margin-bottom: 15px">
2024-10-12 11:43:08 +08:00
{{ sendCoupon.name }}
2024-09-21 11:33:14 +08:00
</div>
2024-10-12 11:43:08 +08:00
<div style="font-weight: 600;font-size: 16px;color: #333333;margin-bottom: 10px">{{ sendCoupon.type }}</div>
2024-10-09 17:32:17 +08:00
2024-09-19 17:22:30 +08:00
<div style="display: flex">
2024-10-09 17:32:17 +08:00
<div style="width: 70px">日期规则</div>
2024-10-12 11:43:08 +08:00
<div style="width: 150px"> {{ sendCoupon.dateText }}</div>
2024-09-19 17:22:30 +08:00
</div>
<div style="font-weight: 600;font-size: 16px;color: #333333;margin-bottom: 5px">使用规则</div>
2024-10-12 11:43:08 +08:00
<div>{{ sendCoupon.ruleText }}</div>
2024-09-24 17:47:29 +08:00
<div style="margin-top: 20px;text-align: end">
2024-09-30 14:10:07 +08:00
2024-09-24 17:47:29 +08:00
</div>
2024-09-19 17:22:30 +08:00
</div>
2024-09-30 14:10:07 +08:00
2024-09-19 17:22:30 +08:00
</div>
2024-09-30 14:10:07 +08:00
<div style="display: flex;justify-content: center">
2024-10-12 11:43:08 +08:00
<el-button type="primary" @click="sendCouponClick()">确定赠送</el-button>
2024-09-30 14:10:07 +08:00
</div>
2024-09-19 17:22:30 +08:00
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="新增会员"
:visible.sync="newMember"
width="439px"
center
2024-09-11 18:14:20 +08:00
>
<div class="tc-box">
<div>请顾客扫码领取会员卡</div>
2024-09-21 09:24:50 +08:00
<img id="collection" class="qrcode" :src="baseUrl + collectionImg"/><br/>
<div class="red-size">微信扫一扫</div>
2024-09-11 18:14:20 +08:00
</div>
<span slot="footer" class="dialog-footer">
2024-10-12 11:43:08 +08:00
<el-button type="primary" @click="handleDownloadqrCode('collection')">下载二维码</el-button>
</span>
2024-09-11 18:14:20 +08:00
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="扫码支付"
:visible.sync="ScanCodePayment"
width="439px"
center
2024-09-11 18:14:20 +08:00
>
<div class="tc-box">
<div class="title_">收款 <span style="color: #F44522">¥0.00</span></div>
<img src="./imgs/smzf.png" style="width: 171px;height: 122px;">
<div>请顾客出示付款码或者刷脸支付</div>
</div>
<span slot="footer" class="dialog-footer">
2024-10-12 11:43:08 +08:00
<el-button type="primary" @click="ScanCodePayment = false">关闭</el-button>
</span>
2024-09-11 18:14:20 +08:00
</el-dialog>
2024-10-24 16:36:30 +08:00
<el-dialog
2024-09-11 18:14:20 +08:00
title="挂单"
:visible.sync="hangingAnOrder"
width="542px"
center
>
<div class="tc-box">
<el-form :model="ruleForms" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="挂单名称" prop="name">
<el-input v-model="ruleForms.name">
2024-09-11 18:14:20 +08:00
</el-input>
</el-form-item>
<div class="h-size">
挂单只可将非油商品进行挂单,挂单成功后可在取单页面进行取单操作取单
可根据挂单名称取单
</div>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
2024-10-12 11:43:08 +08:00
<el-button @click="hangingAnOrder = false"> </el-button>
<el-button type="primary" @click="pendingOrders()">确定挂单</el-button>
</span>
2024-09-11 18:14:20 +08:00
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="支付结果"
:visible.sync="paymentResults"
width="439px"
center
2024-09-11 18:14:20 +08:00
>
<div class="tc-box">
<div class="hui-box">
<div class="hui-box-bt">
<div>支付方式</div>
<div>现金</div>
</div>
<div class="hui-box-bt">
<div>实付金额</div>
<div>¥0.00</div>
</div>
<div class="hui-box-bt">
<div>订单金额</div>
<div>¥10.00</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
2024-10-12 11:43:08 +08:00
<el-button type="primary" @click="paymentResults = false">关闭3s)</el-button>
</span>
2024-09-11 18:14:20 +08:00
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="取单"
:visible.sync="pickUpTheOrder"
width="910px"
center
2024-09-11 18:14:20 +08:00
>
<!-- 商品挂单 子组件 -->
<pickUp :pendingOrdersList="pendingOrdersList" @fatherPendingOrdersList="fatherPendingOrdersList"
@fatherPendingOrdersName="fatherPendingOrdersName"
></pickUp>
2024-09-11 18:14:20 +08:00
<span slot="footer" class="dialog-footer">
2024-09-14 11:03:53 +08:00
<el-button @click="pickUpTheOrder = false">取消</el-button>
<!-- pendingOrdersList pickUpTheOrder = false pickUpTheOrder = false -->
<el-button type="primary" @click="deletePendingOrdersList">作废</el-button>
<el-button type="primary" @click="getPendingOrdersList">取单</el-button>
2024-09-11 18:14:20 +08:00
</span>
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="挂账"
:visible.sync="accountPending"
width="542px"
center
2024-09-11 18:14:20 +08:00
>
2024-10-30 11:29:09 +08:00
<accountPending v-if="oilGunClearing.amount>0" :amount="oilGunClearing.amount" @changeAmount="changeAmount"
></accountPending>
2024-09-11 18:14:20 +08:00
<span slot="footer" class="dialog-footer">
2024-09-12 12:03:37 +08:00
<el-button @click="accountPending = false"> </el-button>
2024-10-15 16:09:34 +08:00
<el-button type="primary" @click="addHangbill"> </el-button>
2024-09-11 18:14:20 +08:00
</span>
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="会员充值"
:visible.sync="memberRecharge"
width="910px"
center
2024-09-11 18:14:20 +08:00
>
2024-09-22 16:37:06 +08:00
<memberRecharge :userId="chooseVipUser.id" ref="rechargeRef"></memberRecharge>
2024-09-11 18:14:20 +08:00
<span slot="footer" class="dialog-footer">
<el-button @click="memberRecharge = false"> </el-button>
2024-09-22 18:34:17 +08:00
<el-button type="primary" @click="rechargeConfirm()">确认充值</el-button>
2024-09-11 18:14:20 +08:00
</span>
</el-dialog>
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="加油金额"
:visible.sync="refuelingAmount"
width="542px"
center
2024-09-12 12:03:37 +08:00
>
<div class="tc-box">
<refuelingAmount :goodsItem="oilGun" ref="refuelingAmount" @fatherMethod="fatherMethod"></refuelingAmount>
2024-09-12 12:03:37 +08:00
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="refuelingAmount = false"> </el-button>
<el-button type="primary" @click="sonButton()"> </el-button>
2024-09-12 12:03:37 +08:00
</span>
</el-dialog>
2024-09-22 18:34:17 +08:00
<!-- 确认充值-->
2024-10-15 16:09:34 +08:00
<el-dialog :close-on-click-modal="false" title="确认支付订单" :visible.sync="openConfirm" width="500px"
append-to-body
2024-10-30 11:29:09 +08:00
@close="onDialogClose"
>
2024-09-22 18:34:17 +08:00
<div v-if="isPay"
2024-10-30 11:29:09 +08:00
v-loading="loading"
>
2024-10-30 14:38:47 +08:00
<div v-if="payForm.paymentType != 'fule_card'">
2024-10-30 11:29:09 +08:00
<div style="text-align: center;font-size: 15px;font-weight: bold">付款金额</div>
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
{{ payForm.realyPayBills }}
</div>
</div>
2024-09-22 18:34:17 +08:00
2024-10-30 11:29:09 +08:00
<div v-else>
<div style="text-align: center;font-size: 15px;font-weight: bold">加油升数</div>
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
{{ oilLiter }} L
</div>
2024-09-22 18:34:17 +08:00
</div>
2024-09-25 15:56:24 +08:00
2024-10-30 11:29:09 +08:00
<div
v-if="payForm.paymentType === 'ALIPAY' || payForm.paymentType === 'WECHAT' || payForm.paymentType === 'UNIONPAY' || payForm.paymentType === 'APPLET_CODE'"
>
2024-09-22 18:34:17 +08:00
<div>
<el-input v-model="payForm.authCode"
2024-10-14 14:50:36 +08:00
ref="getFocus"
2024-09-22 18:34:17 +08:00
autofocus
@keydown.enter.native="collection1"
2024-10-30 11:29:09 +08:00
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付"
>
<i slot="suffix">
2024-09-22 18:34:17 +08:00
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1"
2024-10-30 11:29:09 +08:00
xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"
>
2024-09-22 18:34:17 +08:00
<path
d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z"
2024-10-30 11:29:09 +08:00
fill="#3D3D3D" p-id="1480"
></path>
2024-09-22 18:34:17 +08:00
</svg>
</i>
</el-input>
</div>
<div class="demo-image">
<div class="block" style="text-align: center">
<el-image
style="width: 200px; height: 200px"
fit="cover"
2024-10-30 11:29:09 +08:00
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"
></el-image>
2024-09-22 18:34:17 +08:00
</div>
</div>
</div>
2024-10-30 11:29:09 +08:00
<div
v-else-if="payForm.paymentType==='card_value' || payForm.paymentType==='fule_card' || payForm.paymentType==='car_card_value'"
>
<div style="text-align: right;margin: 10px 0">
<span v-if="payType != 'fule_card'">卡余额</span>
<span v-else>卡油量</span>
<span v-if="payType != 'fule_card'" style="color: red;font-size: 18px"> {{ cardBalance }}</span>
<span v-else style="color: red;font-size: 18px"> {{ cardBalance }} L</span>
</div>
</div>
2024-09-22 18:34:17 +08:00
<div v-else>
<div>
2024-10-14 14:50:36 +08:00
<el-input v-model.number="payForm.authCode"
oninput="value=value.replace(/[^0-9]/g, '').slice(0, 10)"
type="number"
ref="getFocus"
2024-10-12 11:43:08 +08:00
autofocus maxlength="10"
2024-09-22 18:34:17 +08:00
@keydown.enter.native="collection1"
2024-10-30 11:29:09 +08:00
placeholder="请输入收款金额"
>
2024-09-22 18:34:17 +08:00
</el-input>
</div>
<div style="text-align: right;margin: 10px 0">
<span>应找零</span>
2024-10-14 14:50:36 +08:00
<span style="color: red;font-size: 18px"> {{ getChangeShould }}</span>
2024-09-22 18:34:17 +08:00
</div>
</div>
<el-divider></el-divider>
<div style="display: flex;justify-content: space-around">
<el-button @click="cancelCollection">取消收款</el-button>
<el-button type="primary" @click="collection1">确定收款</el-button>
</div>
</div>
<div v-else>
<div v-if="isPaySuccess">
<el-result icon="success" title="收款成功">
<template slot="extra">
<el-button type="primary" @click="handClose1"> </el-button>
</template>
</el-result>
</div>
<div v-else-if="isAwait">
<el-result icon="warning" title="支付等待超时,请前往订单列表查看是否支付成功!">
<template slot="extra">
<el-button type="primary" @click="handClose1"> </el-button>
</template>
</el-result>
</div>
<div v-else>
<el-result icon="error" title="支付失败,请重新支付">
<template slot="extra">
<el-button type="primary" @click="handClose1"> </el-button>
</template>
</el-result>
</div>
</div>
</el-dialog>
2024-10-30 11:29:09 +08:00
<!-- 储值卡 囤油卡 车队卡 -->
<!-- 车队卡支付-->
2024-10-24 11:44:23 +08:00
<el-dialog :close-on-click-modal="false"
2024-10-30 11:29:09 +08:00
title="车队卡支付"
:visible.sync="dialogVisible"
width="30%"
>
2024-10-16 11:31:40 +08:00
<carCard :fleetList="chooseVipUser.fleetInfoUniVos"></carCard>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
2024-09-11 16:45:25 +08:00
</div>
2024-09-10 14:58:47 +08:00
</template>
<script>
2024-09-21 09:24:50 +08:00
import QRCode from 'qrcode'
2024-10-30 11:29:09 +08:00
import html2canvas from 'html2canvas'
2024-09-11 18:14:20 +08:00
import pickUp from './newHomeComponents/pickUpTheOrder.vue'
import accountPending from './newHomeComponents/accountPending.vue'
import memberRecharge from './newHomeComponents/memberRecharge.vue'
2024-09-12 12:03:37 +08:00
import refuelingAmount from './newHomeComponents/refuelingAmount.vue'
2024-10-30 11:29:09 +08:00
import carCard from './newHomeComponents/carCard.vue'
2024-10-09 17:32:17 +08:00
import {
cashRegisterList,
cashRegisterGoodsList,
getActivityList,
getCouponList,
getCanUseCoupon,
sendCouponFun
} from '@/api/newHome/newHome.js'
2024-10-30 11:29:09 +08:00
import { QRCodeByStoreId } from '@/api/staff/qrcode'
import { userListByPhone } from '@/api/cashier/user'
2024-09-22 16:37:06 +08:00
2024-10-30 11:29:09 +08:00
import { VueClipboard } from 'vue-clipboard2'
import { getDicts } from '@/api/dict/data'
2024-09-24 11:26:20 +08:00
import {
getCheckTheStatusOfYourPaymentApi,
2024-10-12 11:43:08 +08:00
rechargeCard
2024-10-30 11:29:09 +08:00
} from '@/api/cashier/cardSet'
import { getReturnCode, printOilOrderReport, printCardValueReport, printFuelDieselReport } from '../../../api/print'
import { addLJGoods, scanAppletQrCode } from '@/api/cashier/oilorder'
import { cashierOrderByOrderNo } from '@/api/cashier/cashierorder'
import { addHangBill } from '../../../api/cashier/hangbill'
2024-09-11 11:06:27 +08:00
export default {
2024-10-09 17:32:17 +08:00
dicts: ['CardCoupon_type'],
2024-09-11 16:45:25 +08:00
data() {
return {
2024-10-30 11:29:09 +08:00
//用卡支付时候 卡的余额 根据监听器变动
cardBalance: 0,
2024-10-18 09:33:26 +08:00
disOil: 0.00,
disGoods: 0.00,
loadingPreferential: false,
2024-10-30 11:29:09 +08:00
dialogVisible: false,
2024-10-14 14:50:36 +08:00
isClickable: false, // 默认不可点击
2024-10-12 11:43:08 +08:00
payForm: {
realyPayBills: 0.00,
paymentType: 'ALIPAY',
authCode: null,
seekZero: 0.00,
activeAmount: 0.00
2024-09-22 18:34:17 +08:00
},
2024-10-12 11:43:08 +08:00
sendCoupon: {},
2024-09-22 20:24:44 +08:00
//可参加的活动
2024-10-12 11:43:08 +08:00
activityList: [],
2024-09-26 13:45:48 +08:00
//可用优惠券
2024-10-12 11:43:08 +08:00
couponList: [],
2024-09-22 20:24:44 +08:00
//选中的活动 actId_ruleId
2024-10-30 11:29:09 +08:00
chooseActId: '',
2024-09-27 10:05:48 +08:00
//选中的优惠券id
2024-10-30 11:29:09 +08:00
chooseCouponId: '',
2024-09-27 10:05:48 +08:00
//选中的活动对象
2024-10-12 11:43:08 +08:00
chooseAct: {},
2024-09-27 10:05:48 +08:00
//选中的优惠券对象
2024-10-12 11:43:08 +08:00
chooseCoupon: {},
2024-09-22 20:24:44 +08:00
//支付方式--默认支付宝
2024-10-30 11:29:09 +08:00
payType: 'ALIPAY',
2024-09-22 20:24:44 +08:00
//订单总金额
2024-10-12 11:43:08 +08:00
orderAmount: 0.00,
2024-09-22 20:24:44 +08:00
//加油升数
2024-10-12 11:43:08 +08:00
oilLiter: 0.00,
2024-09-27 10:05:48 +08:00
//订单实付金额
2024-10-12 11:43:08 +08:00
realAmount: 0.00,
2024-09-27 10:05:48 +08:00
//优惠合计金额
2024-10-12 11:43:08 +08:00
disTotal: 0.00,
openConfirm: false,
2024-09-25 15:56:24 +08:00
// 是否支付
2024-10-12 11:43:08 +08:00
isPay: false,
isPaySuccess: false,
2024-09-25 15:56:24 +08:00
isAwait: false,
2024-10-12 11:43:08 +08:00
rechargeBalCard: false,
isQuery: true,
loading: false,
2024-09-21 09:24:50 +08:00
// 门店二维码
collectionImg: '',
baseUrl: process.env.VUE_APP_BASE_API,
//
value: '',
2024-10-12 11:43:08 +08:00
userMobile: null,
//商品子组件选中时 容器
sonGoodsList: [],
//油枪 父传子
oilGun: '',
//油枪结算 容器
2024-10-15 14:27:49 +08:00
oilGunClearing: {
2024-10-15 16:09:34 +08:00
amount: 0
2024-10-15 14:27:49 +08:00
},
//商品列表
goodsList: [],
2024-09-12 11:49:20 +08:00
restaurants: [],
state: '',
//挂单数据容器
pendingOrdersList: [],
2024-09-27 10:05:48 +08:00
//是否显示可用优惠活动
showAct: true,
//是否显示可用优惠券
showCoupon: true,
2024-10-12 11:43:08 +08:00
freeTicket: false,
freeIndex: 0,
nums: 0,
payList: [],
//油枪数据 初始化容器
tabList: {
'01': [],
'02': [],
'03': [],
'04': []
},
//油枪列表数据
dataList: {},
2024-09-21 09:14:15 +08:00
userInfo: false,//判断登录状态
2024-09-11 18:14:20 +08:00
tabIndex: 0,
newMember: false,
ScanCodePayment: false,
cashPayment: false,
ruleForm: {
name: ''
2024-09-11 18:14:20 +08:00
},
ruleForms: {
name: ''
2024-09-11 18:14:20 +08:00
},
rules: {
name: [
2024-10-30 11:29:09 +08:00
{ required: true, message: '请输入挂单名称', trigger: 'blur' }
]
2024-09-11 18:14:20 +08:00
},
2024-09-12 12:03:37 +08:00
refuelingAmount: false,
2024-09-11 18:14:20 +08:00
hangingAnOrder: false,
paymentResults: false,
pickUpTheOrder: false,
accountPending: false,
2024-09-21 09:24:50 +08:00
memberRecharge: false,
2024-10-15 16:09:34 +08:00
// 挂账订单信息
credit: {},
2024-09-21 09:24:50 +08:00
//会员搜索列表
2024-10-12 11:43:08 +08:00
vipUserList: [],
chooseVipUser: {},
couponTypeList: [],
cardValueForm: {
2024-10-08 11:38:41 +08:00
cardValueId: '', // 储值卡id
mtStaffId: '', //
realName: '',
staffMobile: '',
amount: '', // 自定义充值字段
bidBalance: '', // 储值卡面值
rechargeBalance: '', // 实际支付
giftBalance: '',// 赠送金额
points: '', //赠送积分
growthValue: '', // 赠送成长值
remark: '',
paymentType: 'WECHAT', // 支付方式
royaltyType: '',// 提成类型
percentageCommissions: null,
amountCommission: null,
rechargeType: '0'
},
2024-10-12 11:43:08 +08:00
selectCard: {},
flag: 1,
jishuqi: 0,
2024-09-24 11:26:20 +08:00
continuePolling: true, // 控制轮询的变量
2024-10-12 11:43:08 +08:00
sendCouponList: []
2024-09-11 16:45:25 +08:00
}
},
watch: {
2024-10-18 09:33:26 +08:00
//监听 会员登录 刷新一下商品会员价 计算
2024-10-30 11:29:09 +08:00
chooseVipUser: {
2024-10-18 09:33:26 +08:00
deep: true,
handler(newVal) {
2024-10-30 11:29:09 +08:00
this.goodsList = this.goodsList.map(
item => {
return item
}
)
2024-10-18 09:33:26 +08:00
}
},
//监听商品列表 变化计算商品优惠
goodsList: {
handler(newVal) {
2024-10-30 11:29:09 +08:00
//如果会员不为空
if (this.chooseVipUser.hasOwnProperty('id')) {
this.disGoods = 0.00
2024-10-18 09:33:26 +08:00
// 计算商品会员价
2024-10-30 11:29:09 +08:00
console.log('走了啊', this.goodsList)
2024-10-18 09:33:26 +08:00
this.goodsList.forEach(item => {
2024-10-30 11:29:09 +08:00
const memberPrice = Number(item.retailPrice - item.memberPrice)
const num = Number(item.num)
const product = (memberPrice * num).toFixed(2) // 固定为两位小数
this.disGoods = (parseFloat(this.disGoods) + parseFloat(product)).toFixed(2)
})
2024-10-18 09:33:26 +08:00
// 优惠总金额赋值
2024-10-30 11:29:09 +08:00
this.disTotal = 0.00
this.disTotal = (parseFloat(this.disGoods) + parseFloat(this.disOil)).toFixed(2)
2024-10-18 09:33:26 +08:00
2024-10-30 11:29:09 +08:00
} else {
this.disGoods = 0.00
2024-10-22 10:42:47 +08:00
// 计算商品会员价
2024-10-30 11:29:09 +08:00
console.log('走了啊', this.goodsList)
2024-10-22 10:42:47 +08:00
this.goodsList.forEach(item => {
2024-10-30 11:29:09 +08:00
const memberPrice = Number(item.retailPrice - item.memberPrice)
const num = Number(item.num)
const product = (memberPrice * num).toFixed(2) // 固定为两位小数
this.disGoods = (parseFloat(this.disGoods) + parseFloat(product)).toFixed(2)
})
2024-10-22 10:42:47 +08:00
// 优惠总金额赋值
2024-10-30 11:29:09 +08:00
this.disTotal = 0.00
2024-10-18 09:33:26 +08:00
}
},
2024-10-30 11:29:09 +08:00
deep: true
2024-10-18 09:33:26 +08:00
},
2024-10-14 16:16:07 +08:00
//监听结算金额 是否获取
realAmount: {
2024-10-14 14:50:36 +08:00
handler(newVal) {
2024-10-30 11:29:09 +08:00
console.log('结算金额', newVal)
2024-10-15 16:09:34 +08:00
// 判断是否有结算金额
if (this.realAmount > 0) {
this.isClickable = true
} else {
this.isClickable = false
}
2024-10-14 14:50:36 +08:00
2024-10-30 11:29:09 +08:00
}
2024-10-14 14:50:36 +08:00
},
2024-09-27 10:05:48 +08:00
//监听选择的活动
chooseActId: {
handler(newVal) {
2024-10-30 11:29:09 +08:00
console.log('选择的活动发生变化', newVal)
2024-09-27 10:05:48 +08:00
//计算优惠金额
this.getDisTotal()
},
deep: true,
2024-10-30 11:29:09 +08:00
immediate: true
2024-09-27 10:05:48 +08:00
},
//监听选择的优惠券
chooseCouponId: {
handler(newVal) {
2024-10-30 11:29:09 +08:00
console.log('选择的优惠券发生变化', newVal)
2024-09-27 10:05:48 +08:00
//计算优惠金额
this.getDisTotal()
},
deep: true,
2024-10-30 11:29:09 +08:00
immediate: true
2024-09-27 10:05:48 +08:00
},
//监听订单总金额
2024-09-26 13:45:48 +08:00
orderAmount: {
handler(newVal) {
2024-10-30 11:29:09 +08:00
console.log('订单总金额发生变化', newVal)
2024-09-27 10:05:48 +08:00
//计算实付金额
this.realAmount = (this.orderAmount - this.disTotal).toFixed(2)
},
deep: true,
2024-10-30 11:29:09 +08:00
immediate: true
2024-09-27 10:05:48 +08:00
},
//监听优惠总金额
2024-10-12 11:43:08 +08:00
disTotal: {
2024-09-27 10:05:48 +08:00
handler(newVal) {
2024-10-30 11:29:09 +08:00
console.log('优惠总金额发生变化', newVal)
2024-09-27 10:05:48 +08:00
//计算实付金额
this.realAmount = (this.orderAmount - this.disTotal).toFixed(2)
2024-09-26 13:45:48 +08:00
},
deep: true,
2024-10-30 11:29:09 +08:00
immediate: true
2024-09-26 13:45:48 +08:00
},
//监听子弹窗成功 提交了 然后再隐藏子元素标签
oilGunClearing: {
immediate: true,
deep: true,
handler(newValue, oldValue) {
2024-10-30 11:29:09 +08:00
console.log('油枪发生变化', newValue)
if (newValue && newValue.hasOwnProperty('oilNameId')) {
2024-10-12 11:43:08 +08:00
this.orderAmount = (Number(newValue.amount) + Number(this.getGoodsNum)).toFixed(2)
2024-10-18 09:33:26 +08:00
// 保留两位小数
this.oilLiter = (this.oilGunClearing.amount / this.oilGunClearing.oilPrice).toFixed(2)
2024-10-12 11:43:08 +08:00
} else {
2024-09-22 18:53:15 +08:00
this.orderAmount = this.getGoodsNum
}
this.refuelingAmount = false
2024-09-27 10:05:48 +08:00
//查询可用优惠活动
this.getActivity()
//查可用优惠券
this.getCoupon()
}
},
//监听商品总金额发生变化
getGoodsNum(newVal, oldVal) {
2024-10-30 11:29:09 +08:00
console.log('商品总金额发生变化', newVal)
2024-09-22 18:53:15 +08:00
// 商品总金额发生变化,重查优惠券
2024-10-30 11:29:09 +08:00
if (this.oilGunClearing != '' && this.oilGunClearing.hasOwnProperty('oilNameId')) {
2024-10-12 11:43:08 +08:00
this.orderAmount = (Number(newVal) + Number(this.oilGunClearing.amount)).toFixed(2)
} else {
2024-09-22 18:53:15 +08:00
this.orderAmount = newVal
}
2024-10-18 09:33:26 +08:00
//商品 没有优惠券了 当前页面不能使用
}
},
components: {
2024-09-11 18:14:20 +08:00
pickUp,
accountPending,
2024-09-12 12:03:37 +08:00
memberRecharge,
2024-10-16 11:31:40 +08:00
refuelingAmount,
carCard
2024-09-11 18:14:20 +08:00
},
created() {
//初始化 油枪 商品
this.getOilList()
this.getGoodsList()
2024-10-30 11:29:09 +08:00
this.getQRCodeInfoByStoreId(0)
2024-09-22 18:34:17 +08:00
this.getPayList()
2024-10-09 17:32:17 +08:00
this.getCouponType()
},
computed: {
2024-10-15 16:09:34 +08:00
getChangeShould() {
2024-10-30 11:29:09 +08:00
let change = this.payForm.authCode - this.payForm.realyPayBills
return change.toFixed(2)
2024-10-14 14:50:36 +08:00
},
getGoodsItem() {
if (this.oilGunClearing.amount && this.oilGunClearing.amount !== undefined) {
// 8号枪21.03L/191.7936元)
2024-09-22 20:24:44 +08:00
return `${this.oilGunClearing.gunName}${this.oilLiter}L/${this.oilGunClearing.amount}元)`
} else {
return ''
}
},
//总金额
getGoodsNum() {
let total = 0
this.goodsList.forEach(item => {
total += item.retailPrice * item.num
})
2024-09-22 18:53:15 +08:00
return total.toFixed(2)
},
//总数量
getGoodsListNum() {
let total = 0
this.goodsList.forEach(item => {
total += item.num
})
return total
}
2024-09-12 11:49:20 +08:00
},
2024-09-11 16:45:25 +08:00
methods: {
2024-10-14 14:50:36 +08:00
//结算弹窗 监听关闭 清除表单
2024-10-15 16:09:34 +08:00
onDialogClose() {
this.payForm.authCode = null
2024-10-30 11:29:09 +08:00
this.cardBalance = 0
2024-10-14 14:50:36 +08:00
},
2024-10-12 11:43:08 +08:00
sendCouponClick() {
2024-10-30 11:29:09 +08:00
console.log('数量', this.sendCoupon.tfTotal - this.sendCoupon.tfGetNum)
if (this.sendCoupon.tfTotal - this.sendCoupon.tfGetNum <= 0) {
this.$message.error('优惠券已领完')
2024-10-18 09:33:26 +08:00
return
}
2024-10-09 17:32:17 +08:00
//this.sendCoupon this.chooseVipUser.id
this.sendCoupon.mtUserId = this.chooseVipUser.id
2024-10-30 11:29:09 +08:00
this.sendCoupon.fromType = '4'
2024-10-09 17:32:17 +08:00
this.sendCoupon.cardCouponId = this.sendCoupon.id
2024-10-22 13:35:39 +08:00
//清除 一些 重复字段
2024-10-12 11:43:08 +08:00
this.sendCoupon.status = null
2024-10-22 13:35:39 +08:00
this.sendCoupon.createTime = null
2024-10-30 11:29:09 +08:00
this.sendCoupon.updateTime = null
2024-10-22 13:35:39 +08:00
this.sendCoupon.updateBy = null
this.sendCoupon.createBy = null
2024-10-09 17:32:17 +08:00
sendCouponFun(this.sendCoupon).then(
2024-10-12 11:43:08 +08:00
res => {
2024-10-30 11:29:09 +08:00
if (res.code == 200) {
this.$message.success('赠送成功')
2024-10-18 09:33:26 +08:00
this.freeTicket = false
2024-10-30 11:29:09 +08:00
} else {
2024-10-18 09:33:26 +08:00
this.$message.error(res.msg)
}
2024-10-09 17:32:17 +08:00
}
)
},
2024-10-12 11:43:08 +08:00
handleCilone(obj) {
2024-10-11 17:17:09 +08:00
// 强制组件重新渲染 elementui 组件都是通过监听数据来重新渲染 数据层级太深了 需要手动强刷
2024-10-30 11:29:09 +08:00
this.$forceUpdate()
2024-10-11 17:17:09 +08:00
this.goodsList = this.goodsList.map(
item => {
if (item.id == obj.id) {
2024-10-30 11:29:09 +08:00
return { ...item, num: obj.num }
2024-10-11 17:17:09 +08:00
} else {
return item
}
}
)
2024-09-30 10:30:55 +08:00
},
2024-09-27 10:05:48 +08:00
/**
* 获取优惠总金额
* */
2024-10-12 11:43:08 +08:00
getDisTotal() {
2024-09-27 10:05:48 +08:00
this.disTotal = 0.00
2024-10-18 09:33:26 +08:00
this.disOil = 0.00
2024-10-30 11:29:09 +08:00
if ('' != this.chooseCouponId) {
this.disOil = parseFloat(this.disOil) + parseFloat(this.chooseCoupon.disAmount)
2024-09-27 10:05:48 +08:00
}
2024-10-30 11:29:09 +08:00
if ('' != this.chooseActId) {
this.disOil = parseFloat(this.disOil) + parseFloat(this.chooseAct.disAmount)
2024-09-27 10:05:48 +08:00
}
2024-10-18 09:33:26 +08:00
2024-10-30 11:29:09 +08:00
console.log('油品优惠金额', this.disOil)
console.log('商品优惠金额', this.disGoods)
2024-10-18 09:33:26 +08:00
2024-10-30 11:29:09 +08:00
this.disTotal = parseFloat(this.disOil) + parseFloat(this.disGoods)
2024-09-27 10:05:48 +08:00
},
/**
* 监听活动选择切换
* */
2024-10-12 11:43:08 +08:00
handleChangeAct(value) {
this.chooseAct = this.activityList.filter(item => item.id === value)[0]
2024-10-30 11:29:09 +08:00
console.log('选中的活动', this.chooseAct)
if ('' != this.chooseCouponId) {
2024-09-27 10:05:48 +08:00
//判断已选择的优惠券是否可以与其他活动共用
2024-10-30 11:29:09 +08:00
if ('0' == this.chooseCoupon.useWithOther) {
2024-09-27 10:05:48 +08:00
//优惠券不能与本活动共用
2024-10-30 11:29:09 +08:00
this.chooseCouponId = ''
2024-09-27 10:05:48 +08:00
this.chooseCoupon = {}
}
}
this.getDisTotal()
2024-10-30 11:29:09 +08:00
console.log('选中的活动', this.chooseAct)
2024-09-27 10:05:48 +08:00
},
/**
* 监听优惠券选择切换
* */
2024-10-12 11:43:08 +08:00
handleChangeCoupon(value) {
this.chooseCoupon = this.couponList.filter(item => item.id === value)[0]
2024-10-30 11:29:09 +08:00
console.log('选中的优惠券', this.chooseCoupon)
if ('0' == this.chooseCoupon.useWithOther) {
2024-09-27 10:05:48 +08:00
//本优惠券不能与其他活动一起用
this.chooseAct = {}
2024-10-30 11:29:09 +08:00
this.chooseActId = ''
2024-09-27 10:05:48 +08:00
}
this.getDisTotal()
2024-10-30 11:29:09 +08:00
console.log('选中的优惠券', this.chooseCoupon)
2024-09-27 10:05:48 +08:00
},
2024-10-08 11:38:41 +08:00
// 关闭支付窗口
handClose1() {
2024-10-15 16:09:34 +08:00
this.isPay = true,
2024-10-12 11:43:08 +08:00
this.isPaySuccess = false,
this.isQuery = true
2024-10-15 16:09:34 +08:00
this.openConfirm = false
2024-10-08 11:38:41 +08:00
this.payForm.authCode = null
this.payForm.seekZero = 0
this.iniz()
},
iniz() {
this.cardValueForm = {
cardValueId: '', // 储值卡id
mtStaffId: '', //
realName: '',
staffMobile: '',
amount: '', // 自定义充值字段
bidBalance: '', // 储值卡面值
rechargeBalance: '', // 实际支付
giftBalance: '',// 赠送金额
points: '', //赠送积分
growthValue: '', // 赠送成长值
remark: '',
paymentType: 'WECHAT', // 支付方式
royaltyType: '',// 提成类型
percentageCommissions: null,
amountCommission: null,
rechargeType: '0'
}
},
2024-09-24 11:26:20 +08:00
async collection1() {
2024-10-30 14:38:47 +08:00
console.log(this.flag)
2024-10-14 14:50:36 +08:00
// 这里是收银台结算 下面是会员充值
2024-10-12 11:43:08 +08:00
if (this.flag == 3) {
2024-10-12 09:01:34 +08:00
this.collection()
return
}
2024-09-24 11:26:20 +08:00
let makeChange = 0
2024-10-30 11:29:09 +08:00
if (!this.payForm.authCode && this.payForm.paymentType !== 'CASH') {
this.$message.error('请先扫码')
2024-10-12 11:43:08 +08:00
return
}
// 会员id 会员名字会员手机号码
if (this.chooseVipUser.id) {
this.payForm.mtUserId = this.chooseVipUser.id
}
// 现金找零金额
this.payForm.seekZero = makeChange
this.payForm.payChannel = 'cashier'
2024-10-30 11:29:09 +08:00
let id
2024-10-12 11:43:08 +08:00
await rechargeCard(this.payForm).then(response => {
if (response.data != null) {
2024-10-30 11:29:09 +08:00
this.loading = true
2024-10-12 11:43:08 +08:00
id = response.data.id
2024-10-09 17:32:17 +08:00
}
2024-10-30 11:29:09 +08:00
})
2024-10-12 11:43:08 +08:00
let this_ = this
2024-10-30 11:29:09 +08:00
console.log(this.payForm, 1054)
2024-10-12 11:43:08 +08:00
//
2024-10-30 11:29:09 +08:00
let timer = setInterval(async() => {
let flag = false
2024-10-12 11:43:08 +08:00
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
2024-09-24 11:26:20 +08:00
if (response.data != null) {
2024-10-12 11:43:08 +08:00
const payStatus = response.data.payStatus
2024-10-30 11:29:09 +08:00
if (payStatus === 'unpaid') {
this_.isQuery = true
} else if (payStatus === 'paid') {
2024-10-12 11:43:08 +08:00
// 当支付成功时
2024-10-30 11:29:09 +08:00
this_.isPaySuccess = true
this_.isQuery = false
2024-10-12 11:43:08 +08:00
this_.rechargeBalCard = true
// await this_.printLocally1()
2024-10-18 17:10:18 +08:00
flag = true
// await this_.cardValueReport()
// await this_.getMemberAfter();
2024-10-30 11:29:09 +08:00
clearInterval(timer)
} else if (payStatus === 'payFail') {
this_.isPaySuccess = false
this_.isQuery = false
clearInterval(timer)
2024-09-24 11:26:20 +08:00
}
}
2024-10-18 17:10:18 +08:00
// await this_.getMemberAfter();
2024-10-12 11:43:08 +08:00
})
2024-10-18 17:10:18 +08:00
if (flag) await this_.cardValueReport()
2024-10-30 11:29:09 +08:00
}, 1000)
2024-09-24 11:26:20 +08:00
2024-10-30 11:29:09 +08:00
let timer2 = setInterval(function() {
2024-10-12 11:43:08 +08:00
if (!this_.isQuery || !this_.openConfirm) {
2024-10-30 11:29:09 +08:00
this_.loading = false
this_.isPay = false
clearInterval(timer)
clearTimeout(timer3)
2024-10-12 11:43:08 +08:00
}
}, 500)
2024-10-30 11:29:09 +08:00
var timer3 = setTimeout(function() {
clearInterval(timer2)
clearInterval(timer)
this_.loading = false
this_.isPay = false
this_.isPaySuccess = false
this_.isAwait = true
2024-10-12 11:43:08 +08:00
}, 15000)
2024-09-24 11:26:20 +08:00
2024-10-30 11:29:09 +08:00
this.$forceUpdate()
2024-09-24 11:26:20 +08:00
},
2024-10-12 11:43:08 +08:00
cancelCollection() {
2024-09-24 11:26:20 +08:00
this.openConfirm = false
},
2024-09-22 18:34:17 +08:00
// 获取支付方式
2024-10-12 11:43:08 +08:00
getPayList() {
2024-10-30 11:29:09 +08:00
getDicts('payment_type').then(response => {
this.payList = response.data
2024-09-22 18:34:17 +08:00
})
},
// 确认充值
async rechargeConfirm() {
let selectCard = this.$refs.rechargeRef.selectCard
2024-10-30 14:38:47 +08:00
console.log("子弹窗表单属性", selectCard)
2024-09-22 18:34:17 +08:00
if (!selectCard.paymentType) {
2024-10-30 11:29:09 +08:00
this.$message.error('请选择支付方式')
2024-09-22 18:34:17 +08:00
return
}
2024-10-08 11:38:41 +08:00
if (!selectCard.rechargeBalance) {
2024-10-30 11:29:09 +08:00
this.$message.error('请选择输入充值本金')
2024-09-22 18:34:17 +08:00
return
}
2024-10-30 11:29:09 +08:00
console.log(selectCard, 1122)
2024-10-08 11:38:41 +08:00
this.payForm.rechargeBalance = selectCard.rechargeBalance
2024-10-18 17:10:18 +08:00
this.payForm.lockupPrice = selectCard.lockupPrice
2024-09-22 18:34:17 +08:00
this.payForm.realyPayBills = selectCard.rechargeBalance
2024-10-08 11:38:41 +08:00
this.payForm.selectCardId = selectCard.id
this.payForm.cardType = selectCard.cardType
2024-09-22 18:34:17 +08:00
this.payForm.paymentType = selectCard.paymentType
2024-10-08 11:38:41 +08:00
this.payForm.giftBalance = selectCard.giftBalance
this.payForm.points = selectCard.points
this.payForm.growthValue = selectCard.growthValue
this.payForm.chooseStaff = selectCard.chooseStaff
this.payForm.desc = selectCard.desc
this.payForm.giftCardNo = selectCard.giftCardNo
this.payForm.giftCardPwd = selectCard.giftCardPwd
this.payForm.cardCouponList = selectCard.cardCouponList
2024-10-12 11:43:08 +08:00
if (selectCard.cardType == 0) {
2024-09-24 11:26:20 +08:00
this.flag = 1
2024-10-12 11:43:08 +08:00
} else if (selectCard.cardType == 1) {
2024-09-24 11:26:20 +08:00
this.flag = 2
}
2024-09-22 18:34:17 +08:00
// // 发送扫码机请求(易联云网络下发)
// await this.getSendPrintIndex(this.realyPayBills);
2024-09-24 11:26:20 +08:00
this.memberRecharge = false
2024-10-30 11:29:09 +08:00
this.openConfirm = true
2024-09-22 18:34:17 +08:00
this.isPay = true
2024-09-24 11:26:20 +08:00
//this.getCode(this.realyPayBills, this.flag)
},
2024-10-14 14:50:36 +08:00
// 打印商品支付后的订单
2024-10-15 16:09:34 +08:00
oilOrderReport() {
2024-10-30 11:29:09 +08:00
console.log(this.goodsOrder, this.goodsList, 1095)
2024-10-14 14:50:36 +08:00
//现在油品只有一个了
2024-10-18 10:37:53 +08:00
let oilOrderR = []
2024-10-30 11:29:09 +08:00
if (this.oilGunClearing && this.oilGunClearing.amount > 0) {
2024-10-18 10:37:53 +08:00
oilOrderR = [
{
oilName: this.oilGunClearing.oilType + this.oilGunClearing.oilName,
2024-10-30 11:29:09 +08:00
amount: this.oilGunClearing.amount + ''
2024-10-18 10:37:53 +08:00
}
]
}
2024-10-14 14:50:36 +08:00
let goodsOrderR = []
2024-10-18 10:37:53 +08:00
if (this.goodsList && this.goodsList.length > 0) {
this.goodsList.forEach(order => {
2024-10-14 16:16:07 +08:00
let o = {
oilName: order.name,
unit: order.num + order.unit,
// amount : order.memberPrice.toString()
amount: order.retailPrice.toString()
2024-10-14 14:50:36 +08:00
2024-10-14 16:16:07 +08:00
}
goodsOrderR.push(o)
})
}
2024-10-14 14:50:36 +08:00
// 支付方式
const payTypeMap = {
'CASH': '现金',
'WECHAT': '微信',
'ALIPAY': '支付宝',
'UNIONPAY': '银联二维码',
2024-10-18 10:37:53 +08:00
'after_pay': '挂账',
'fule_card': '囤油卡',
'card_value': '储值卡',
2024-10-30 11:29:09 +08:00
'car_card_value': '车队卡'
}
let payTypeText = payTypeMap[this.payType] || '小程序码'
2024-10-14 14:50:36 +08:00
2024-10-15 16:09:34 +08:00
let f = {
oilOrder: oilOrderR,
goodsOrder: goodsOrderR,
payType: payTypeText,
2024-10-30 11:29:09 +08:00
unitName: '', // 挂账单位
2024-10-14 14:50:36 +08:00
// consumeAmount:this.consumeAmount,
2024-10-18 10:37:53 +08:00
creditAmount: this.realAmount,//挂账金额
2024-10-14 14:50:36 +08:00
// 优惠合计
2024-10-18 10:37:53 +08:00
discount: this.disTotal, // 油惠合计
2024-10-14 14:50:36 +08:00
// 储值卡付款
2024-10-18 10:37:53 +08:00
consumeAmount: this.realAmount,
2024-10-14 14:50:36 +08:00
// 屯油卡付款
2024-10-18 10:37:53 +08:00
consumeRefuelMoney: this.realAmount,
2024-10-14 14:50:36 +08:00
// 实付款
2024-10-18 10:37:53 +08:00
actualPay: this.realAmount,
2024-10-14 14:50:36 +08:00
// 找零
2024-10-30 11:29:09 +08:00
seekZero: this.seekZero ? this.seekZero.toFixed(2) : 0
2024-10-14 14:50:36 +08:00
}
2024-10-18 10:37:53 +08:00
if (this.credit && this.credit.unitName) f.unitName = this.credit.unitName
2024-10-15 16:09:34 +08:00
printOilOrderReport(f).then(res => {
console.log(res, 1121)
2024-10-14 14:50:36 +08:00
})
},
2024-10-18 17:10:18 +08:00
// 用户余额/礼品卡充值打印
2024-10-30 11:29:09 +08:00
cardValueReport() {
2024-10-18 17:10:18 +08:00
// 支付方式
const payTypeMap = {
'CASH': '现金',
'WECHAT': '微信',
'ALIPAY': '支付宝',
'UNIONPAY': '银联二维码',
'after_pay': '挂账',
'fule_card': '囤油卡',
'card_value': '储值卡',
2024-10-30 11:29:09 +08:00
'car_card_value': '车队卡'
}
2024-10-18 17:10:18 +08:00
2024-10-30 11:29:09 +08:00
if (this.payForm.cardType == 0 || this.payForm.cardType == 2) {
2024-10-18 17:10:18 +08:00
console.log(1226)
let payTypeText = payTypeMap[this.payForm.paymentType]
2024-10-30 11:29:09 +08:00
let actualPay = this.payForm.paymentType == 'CASH' ? this.payForm.authCode : this.payForm.realyPayBills
2024-10-18 17:10:18 +08:00
let a = {
// 充值金额
2024-10-30 11:29:09 +08:00
realyPayBills: this.payForm.realyPayBills,
2024-10-18 17:10:18 +08:00
//赠送金额
2024-10-30 11:29:09 +08:00
giftBalance: this.payForm.giftBalance,
2024-10-18 17:10:18 +08:00
// 到账金额
2024-10-30 11:29:09 +08:00
getAmount: Number(this.payForm.giftBalance) + Number(this.payForm.realyPayBills),
payType: payTypeText,
2024-10-18 17:10:18 +08:00
// 实付款
actualPay: actualPay,
// 找零
2024-10-30 11:29:09 +08:00
seekZero: this.payForm.seekZero.toFixed(2)
2024-10-18 17:10:18 +08:00
}
printCardValueReport(a).then(res => {
2024-10-30 11:29:09 +08:00
console.log(res, 1245)
2024-10-18 17:10:18 +08:00
})
}
2024-10-30 11:29:09 +08:00
if (this.payForm.cardType == 1) {
2024-10-18 17:10:18 +08:00
let payTypeText1 = payTypeMap[this.payForm.paymentType]
2024-10-30 11:29:09 +08:00
console.log(this.payForm, 1256)
2024-10-18 17:10:18 +08:00
let b = {
// 充值油品
2024-10-30 11:29:09 +08:00
oilType: this.payForm.oilName,
2024-10-18 17:10:18 +08:00
// 充值升数
2024-10-30 11:29:09 +08:00
incomeLitres: (this.payForm.rechargeBalance / this.payForm.lockupPrice).toFixed(2),
2024-10-18 17:10:18 +08:00
// 订单金额
2024-10-30 11:29:09 +08:00
realyPayBills: this.payForm.rechargeBalance,
2024-10-18 17:10:18 +08:00
// 锁价金额
2024-10-30 11:29:09 +08:00
lockupPrice: this.payForm.lockupPrice,
2024-10-18 17:10:18 +08:00
// 支付方式
2024-10-30 11:29:09 +08:00
payType: payTypeText1,
2024-10-18 17:10:18 +08:00
// 实付款
// 找零
2024-10-30 11:29:09 +08:00
seekZero: this.payForm.seekZero.toFixed(2)
2024-10-18 17:10:18 +08:00
}
2024-10-30 11:29:09 +08:00
console.log(b, 1271)
printFuelDieselReport(b).then(res => {
console.log(res, 1273)
2024-10-18 17:10:18 +08:00
})
}
},
2024-10-14 14:50:36 +08:00
//表单重置
2024-10-15 16:09:34 +08:00
resetting1() {
2024-10-30 11:29:09 +08:00
console.log('表单重置')
2024-10-18 10:37:53 +08:00
this.realAmount = 0.00
//优惠合计金额
this.disTotal = 0.00
2024-10-14 16:32:01 +08:00
//请输入手机号输入框重置
2024-10-15 16:09:34 +08:00
this.userMobile = null
2024-10-14 16:32:01 +08:00
//油枪重置
2024-10-15 16:09:34 +08:00
this.oilGunClearing = {}
2024-10-14 16:32:01 +08:00
//商品重置
2024-10-15 16:09:34 +08:00
this.goodsList = []
2024-10-14 16:32:01 +08:00
2024-10-15 16:09:34 +08:00
this.userInfo = false
2024-10-14 16:32:01 +08:00
//支付方式 默认 支付宝
2024-10-30 11:29:09 +08:00
this.payType = 'ALIPAY'
2024-10-18 10:37:53 +08:00
2024-10-30 11:29:09 +08:00
this.loading = false
2024-10-29 11:35:05 +08:00
2024-10-30 11:29:09 +08:00
this.restVipUser()
2024-10-29 11:35:05 +08:00
2024-10-14 14:50:36 +08:00
},
// 查询订单支付状态
2024-10-15 16:09:34 +08:00
queryPayStatus() {
2024-10-30 11:29:09 +08:00
let _this = this
let timer = setInterval(function() {
2024-10-14 14:50:36 +08:00
// "234520231228115544f073f4"
2024-10-30 11:29:09 +08:00
cashierOrderByOrderNo({ orderNo: _this.orderNo }).then(response => {
2024-10-15 16:09:34 +08:00
if (response.data) {
2024-10-30 11:29:09 +08:00
console.log(1318, response)
if (response.data.status == 'paid') {
_this.isPay = false
_this.isPaySuccess = true
_this.isQuery = false
2024-10-14 14:50:36 +08:00
_this.amount = 0
2024-10-30 11:29:09 +08:00
_this.loading = false
2024-10-14 14:50:36 +08:00
// _this.printLocally()
_this.oilOrderReport()
2024-10-30 11:29:09 +08:00
_this.resetting1()
2024-10-14 14:50:36 +08:00
2024-10-15 16:09:34 +08:00
if (response.data.oilOrderAmount > 0) {
2024-10-14 14:50:36 +08:00
// for (let i =0;i<_this.oilPreferentialData.length;i++){
// _this.oilPreferentialData[i].oilPreferential.storeId = response.data.storeId
// _this.oilPreferentialData[i].oilPreferential.orderAmount = response.data.oilOrderAmount
// _this.oilPreferentialData[i].oilPreferential.userId = response.data.userId
// _this.oilPreferentialData[i].oilPreferential.oilId = response.data.oils
// _this.oilPreferentialData[i].oilPreferential.mtUserLevel = _this.member.gradeId
// _this.oilPreferentialData[i].oilPreferential.cardFavorableId = _this.oilPreferentialData[_this.oilPreferentialData.length-1].cardFavorableId
// usePaymentActive(_this.oilPreferentialData[i].oilPreferential).then(res => {})
// }
}
2024-10-30 11:29:09 +08:00
clearInterval(timer)
2024-10-14 14:50:36 +08:00
}
2024-10-30 11:29:09 +08:00
if (response.data.status == 'payFail') {
_this.isPaySuccess = false
2024-10-14 14:50:36 +08:00
// _this.isPay = true;
2024-10-30 11:29:09 +08:00
_this.isQuery = false
2024-10-14 14:50:36 +08:00
2024-10-30 11:29:09 +08:00
_this.loading = false
clearInterval(timer)
2024-10-14 14:50:36 +08:00
}
2024-10-30 11:29:09 +08:00
if (response.data.status == 'unpaid') {
_this.isQuery = true
2024-10-14 14:50:36 +08:00
_this.dialogVisiblejLoading = true
}
}
// _this.resetting1();
})
2024-10-15 16:09:34 +08:00
}, 1000)
2024-10-14 14:50:36 +08:00
// 如果是为支付状态15后打开去订单页查询的接口
// if (_this.isQuery){
// setTimeout(function () {
// },10000)
// }
2024-10-30 11:29:09 +08:00
let timer2 = setInterval(function() {
2024-10-14 14:50:36 +08:00
if (!_this.isQuery || !_this.dialogVisiblej) {
2024-10-30 11:29:09 +08:00
_this.loading = false
2024-10-14 14:50:36 +08:00
// _this.isPay = true;
// _this.countdown()
2024-10-30 11:29:09 +08:00
clearInterval(timer)
clearTimeout(timer3)
2024-10-14 14:50:36 +08:00
}
}, 1000)
2024-10-30 11:29:09 +08:00
var timer3 = setTimeout(function() {
clearInterval(timer2)
clearInterval(timer)
_this.loading = false
_this.isPay = true
this.isPaySuccess = false
2024-10-14 14:50:36 +08:00
}, 15000)
},
2024-10-10 18:52:22 +08:00
// 确定收款
2024-10-12 11:43:08 +08:00
async collection() {
2024-10-30 11:29:09 +08:00
if (this.payForm.payType == 'CASH') {
2024-10-12 11:43:08 +08:00
if (this.payForm.authCode < ((+this.oilActualPay) + (+this.goodsActualPay)) || this.seekZero < 0) {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('请输入正确的金额')
return
2024-10-10 18:52:22 +08:00
}
2024-10-12 11:43:08 +08:00
if (!this.payForm.authCode && ((+this.oilActualPay) + (+this.goodsActualPay)) > 0) {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('请输入正确的金额')
return
2024-10-10 18:52:22 +08:00
}
}
2024-10-12 11:43:08 +08:00
if (!this.payForm.authCode && ((+this.oilActualPay) + (+this.goodsActualPay)) > 0) {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('请先扫码')
return
2024-10-10 18:52:22 +08:00
}
2024-10-24 16:36:30 +08:00
2024-10-29 11:35:05 +08:00
//只有在现金时候才会有找零
2024-10-30 11:29:09 +08:00
if (this.payForm.payType == 'CASH') {
2024-10-29 11:35:05 +08:00
//找零金额
this.payForm.seekZero = this.getChangeShould
2024-10-30 11:29:09 +08:00
} else {
2024-10-29 11:35:05 +08:00
this.payForm.seekZero = 0
}
2024-10-30 11:29:09 +08:00
this.loading = true
let _this = this
2024-10-10 18:52:22 +08:00
//小程序码付款
2024-10-30 11:29:09 +08:00
if (this.payForm.payType == 'APPLET_CODE') {
2024-10-12 11:43:08 +08:00
if (this.goodsList.length > 0) {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('非油商品不可使用小程序码支付')
return
2024-10-10 18:52:22 +08:00
}
2024-10-12 11:43:08 +08:00
await scanAppletQrCode(_this.payForm).then(resp => {
if (resp.data.success == 'success') {
2024-10-30 11:29:09 +08:00
setTimeout(function() {
_this.loading = false
_this.isPaySuccess = true
_this.isPay = false
2024-10-10 18:52:22 +08:00
// _this.printLocally()
_this.oilOrderReport()
2024-10-30 11:29:09 +08:00
_this.resetting1()
2024-10-12 11:43:08 +08:00
}, 3000)
} else {
2024-10-30 11:29:09 +08:00
setTimeout(function() {
_this.loading = false
_this.isPaySuccess = false
_this.isPay = false
_this.resetting1()
2024-10-10 18:52:22 +08:00
this.$modal.msgError(resp.data.error)
2024-10-12 11:43:08 +08:00
}, 3000)
2024-10-10 18:52:22 +08:00
}
})
2024-10-30 11:29:09 +08:00
return
2024-10-10 18:52:22 +08:00
}
2024-10-30 11:29:09 +08:00
let isPaySuccess = false
2024-10-12 11:43:08 +08:00
console.log(_this.payForm, 1089)
2024-10-14 14:50:36 +08:00
// 调用 支付接口 并产生 订单 返回订单号
2024-10-12 11:43:08 +08:00
await addLJGoods(_this.payForm).then(async response => {
2024-10-30 11:29:09 +08:00
_this.orderNo = response.data.orderNo
2024-10-14 14:50:36 +08:00
//支付成功 后需要打印小票
2024-10-30 11:29:09 +08:00
console.log('支付成功', response)
2024-10-14 14:50:36 +08:00
2024-10-10 18:52:22 +08:00
if (response.data.oilOrder != null) {
2024-10-30 11:29:09 +08:00
if (response.data.oilOrder.orderStatus == 'paid') {
2024-10-10 18:52:22 +08:00
2024-10-30 11:29:09 +08:00
_this.isPaySuccess = true
2024-10-10 18:52:22 +08:00
isPaySuccess = true
2024-10-30 11:29:09 +08:00
_this.isPay = false
_this.loading = false
2024-10-10 18:52:22 +08:00
_this.oilOrderReport()
_this.resetting1()
2024-10-30 11:29:09 +08:00
return
2024-10-10 18:52:22 +08:00
}
}
if (response.data.goodsOrder != null) {
2024-10-30 11:29:09 +08:00
if (response.data.goodsOrder.status == 'paid') {
_this.isPaySuccess = true
2024-10-10 18:52:22 +08:00
isPaySuccess = true
2024-10-30 11:29:09 +08:00
_this.isPay = false
_this.loading = false
2024-10-10 18:52:22 +08:00
_this.oilOrderReport()
_this.resetting1()
2024-10-30 11:29:09 +08:00
return
2024-10-10 18:52:22 +08:00
}
}
if (response.data.error == 1) {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('商品库存不足,请重新选择商品')
this.loading = false
2024-10-10 18:52:22 +08:00
this.autofocus = false
2024-10-30 11:29:09 +08:00
this.dialogVisiblej = false
return
2024-10-10 18:52:22 +08:00
}
2024-10-14 16:16:07 +08:00
if (response.data.error && response.data.error != 1) {
2024-10-10 18:52:22 +08:00
this.$modal.msgError(response.data.error)
2024-10-30 11:29:09 +08:00
this.loading = false
2024-10-10 18:52:22 +08:00
// this.dialogVisiblej = false;
2024-10-30 11:29:09 +08:00
return
2024-10-10 18:52:22 +08:00
}
})
2024-10-30 11:29:09 +08:00
this.loading = true
2024-10-30 14:38:47 +08:00
2024-10-12 11:43:08 +08:00
if (!isPaySuccess) {
2024-10-30 11:29:09 +08:00
await _this.queryPayStatus()
_this.resetting1()
2024-10-10 18:52:22 +08:00
}
},
2024-10-09 17:32:17 +08:00
// 立即结算
2024-10-12 11:43:08 +08:00
async settlement() {
2024-10-30 11:29:09 +08:00
this.cardBalance=0
// 囤油 这时候卡余额是 升
if (this.payType == 'fule_card') {
if (this.oilGunClearing.amount > 0) {
this.chooseVipUser.userFuels.find(
item => {
if (item.oilName == this.oilGunClearing.oilNameId) {
this.cardBalance = item.fuelAmount
}
}
)
}
}
// 车队
if (this.payType == 'car_card_value') {
if (this.oilGunClearing.amount > 0) {
this.cardBalance = this.chooseVipUser.fleetMember.remainingCreditLimit
}
}
// 储值
if (this.payType == 'card_value') {
if (this.oilGunClearing.amount > 0) {
this.cardBalance = this.chooseVipUser.cardBalance
}
}
// 储值卡 小程序码 囤油卡 车队卡 都不可带商品
if (this.payType == 'card_value' || this.payType == 'APPLET_CODE' || this.payType == 'fule_card' || this.payType == 'car_card_value') {
if (this.goodsList.length > 0) {
this.$modal.msgError('当前支付方式不可带商品')
return
}
}
// 储值卡 车队卡 余额都必须满足支付要求
if (this.payType == 'card_value' || this.payType == 'car_card_value') {
console.log("付款金额",this.payForm.realyPayBills)
if (this.cardBalance <= 0 || this.cardBalance < this.oilGunClearing.amount) {
this.$modal.msgError('当前卡 余额 不足')
return
}
}
// 囤油卡 升数是否满足
if (this.payType == 'fule_card'){
if (this.cardBalance <= 0 || this.cardBalance < this.oilLiter) {
this.$modal.msgError('当前卡 升数 不足')
return
}
}
//如果是挂账 不可结算
if (this.payType == 'after_pay') {
this.$modal.msgError('挂账无需结算')
return
}
2024-10-10 19:48:32 +08:00
// 油品单价
// 油号id
// 油枪id
// 油罐id
// 活动id
// 活动类型
2024-10-30 11:29:09 +08:00
this.loading = false
2024-10-18 10:37:53 +08:00
console.log(this.oilGunClearing)
2024-10-30 11:29:09 +08:00
if (this.oilGunClearing && this.oilGunClearing.amount > 0) {
2024-10-12 11:43:08 +08:00
this.payForm.oilOrder = JSON.stringify({
oilPrice: this.oilGunClearing.oilPrice,
oils: this.oilGunClearing.oilNameId,
oilGunNum: this.oilGunClearing.id,
tankId: this.oilGunClearing.tankId,
2024-10-14 14:50:36 +08:00
activeId: this.chooseAct.hasOwnProperty('actId') ? this.chooseAct.activeId : null,
2024-10-30 11:29:09 +08:00
activeType: this.chooseAct.hasOwnProperty('type') ? this.chooseAct.activeType : null
2024-10-12 11:43:08 +08:00
})
2024-10-15 16:09:34 +08:00
} else {
2024-10-12 11:43:08 +08:00
this.payForm.oilOrder = null
}
2024-10-10 19:48:32 +08:00
//商品 集合
2024-10-12 11:43:08 +08:00
this.payForm.goodsOrder = JSON.stringify(this.goodsList)
2024-10-10 19:48:32 +08:00
//支付方式
this.payForm.payType = this.payType
2024-10-10 18:52:22 +08:00
//油品订单金额
2024-10-12 11:43:08 +08:00
this.payForm.oilAmount = this.oilGunClearing.amount || 0
2024-10-10 18:52:22 +08:00
//商品订单金额
2024-10-18 10:24:06 +08:00
this.payForm.goodsAmount = this.getGoodsNum || 0
2024-10-10 18:52:22 +08:00
//油品实付金额
2024-10-30 11:29:09 +08:00
this.payForm.oilActualPay = (this.oilGunClearing.amount || 0) - (this.disOil || 0)
2024-10-10 18:52:22 +08:00
//商品实付金额
2024-10-18 10:43:49 +08:00
this.payForm.goodsActualPay = (this.getGoodsNum || 0) - (this.disGoods || 0)
2024-10-10 19:48:32 +08:00
//油枪id
this.payForm.oilGunId = this.oilGunClearing.id
//活动营销优惠金额
2024-10-12 11:43:08 +08:00
this.payForm.activeAmount = this.chooseAct.disAmount || 0.0
2024-10-14 14:50:36 +08:00
2024-10-10 19:48:32 +08:00
//优惠卷类型
2024-10-14 14:50:36 +08:00
this.payForm.couponType = this.chooseCoupon.hasOwnProperty('type') ? this.chooseCoupon.type : null
//优惠券id
this.payForm.couponId = this.chooseCoupon.hasOwnProperty('couponId') ? this.chooseCoupon.id : null
2024-10-10 19:48:32 +08:00
//付款用户
2024-10-12 11:43:08 +08:00
this.payForm.payUser = this.chooseVipUser.mobile
2024-10-10 19:48:32 +08:00
//油品优惠金额
2024-10-30 11:29:09 +08:00
this.payForm.oilDiscount = this.disOil
2024-10-10 19:48:32 +08:00
//商品优惠金额
2024-10-30 11:29:09 +08:00
this.payForm.goodsDiscount = this.disGoods
2024-10-12 09:01:34 +08:00
2024-10-10 19:48:32 +08:00
//会员消费金额 (储值卡需要减少的金额)
2024-10-30 11:29:09 +08:00
if (this.payForm.payType == 'card_value') {
this.payForm.consumeAmount = this.realAmount
} else {
2024-10-24 16:36:30 +08:00
this.payForm.consumeAmount = 0
}
2024-10-10 19:48:32 +08:00
//会员id
this.payForm.userId = this.chooseVipUser.id
//终端 默认传PC
2024-10-30 11:29:09 +08:00
this.payForm.terminal = 'PC'
2024-10-10 19:48:32 +08:00
//商品 ids
// 将集合内 所有id 拼接 , 隔开 this.goodsList
2024-10-30 11:29:09 +08:00
this.payForm.goodsIds = this.goodsList.map(item => item.id).join(',')
2024-10-11 17:17:09 +08:00
//购买商品的总数量 计算属性
this.payForm.goodsNum = this.getGoodsListNum
2024-10-10 19:48:32 +08:00
//油品 + 商品 的实付总额
2024-10-18 10:43:49 +08:00
this.payForm.allAmount = this.realAmount
2024-10-10 18:52:22 +08:00
2024-10-14 14:50:36 +08:00
this.payForm.paymentType = this.payType
//支付弹窗 相关
2024-10-15 16:09:34 +08:00
this.payForm.realyPayBills = this.realAmount
2024-10-30 11:29:09 +08:00
this.isPay = true
this.openConfirm = true
2024-10-14 14:50:36 +08:00
this.flag = 3
2024-10-09 17:32:17 +08:00
},
2024-09-24 11:26:20 +08:00
// 网络下发之后获取条码
2024-10-12 11:43:08 +08:00
getCode(amount, flag) {
2024-10-30 11:29:09 +08:00
console.log('payType', this.payForm.payType) // 现金不参与
if (this.payForm.payType == 'CASH' && flag == 1) {
2024-09-24 11:26:20 +08:00
return
}
// if (this.cardValueForm.paymentType == "CASH" && flag == 1)
// this.jishuqi++;
if (this.jishuqi == 30) {
this.jishuqi = 0
return
}
2024-10-30 11:29:09 +08:00
this.continuePolling = true
getReturnCode({ payAmount: amount }).then(res => {
if (res.data === '300' && this.continuePolling) {
2024-09-24 11:26:20 +08:00
setTimeout(() => {
2024-10-30 11:29:09 +08:00
this.getCode(amount) // 重新发起请求
}, 1000) // 停顿一秒
2024-10-12 11:43:08 +08:00
} else {
2024-09-24 11:26:20 +08:00
this.payForm.authCode = res.data
}
})
2024-09-22 18:34:17 +08:00
},
2024-09-21 09:14:15 +08:00
/**
2024-09-22 20:24:44 +08:00
* @description 油枪金额和商品金额发生变化请求后端查询可用优惠活动
* 传入后台的参数会员的用户id加油油号加油订单金额不包括商品金额加油订单总金额包括商品金额加油总升数
* @author vinjor-m
* @date 2024年9月19日
*/
2024-10-12 11:43:08 +08:00
getActivity() {
this.chooseActId = ''
2024-09-22 20:24:44 +08:00
//组装请求参数
2024-10-30 11:29:09 +08:00
if (this.oilGunClearing != '' && this.oilGunClearing.hasOwnProperty('oilNameId') && this.chooseVipUser.hasOwnProperty('id')) {
2024-09-22 20:24:44 +08:00
//油枪已结算,且已选择会员
let dataObj = {
userId: this.chooseVipUser.id,
oilId: this.oilGunClearing.oilNameId,
2024-10-12 11:43:08 +08:00
oilPrice: this.oilGunClearing.oilPrice,
2024-09-22 20:24:44 +08:00
oilAmount: this.oilGunClearing.amount,
2024-10-18 09:33:26 +08:00
// orderAmount: this.orderAmount,
2024-10-10 18:52:22 +08:00
payWay: this.payType,
2024-09-22 20:24:44 +08:00
oilLiter: this.oilLiter
}
getActivityList(dataObj).then(res => {
2024-10-30 11:29:09 +08:00
console.log('返回的可参加活动', res)
2024-09-22 20:24:44 +08:00
this.activityList = res.data
})
2024-10-12 11:43:08 +08:00
} else {
2024-09-22 20:24:44 +08:00
//可用活动清空
2024-10-12 11:43:08 +08:00
this.activityList = []
2024-09-22 20:24:44 +08:00
}
},
/**
* @description 油枪金额和商品金额发生变化请求后端查询可用优惠券
2024-09-21 09:14:15 +08:00
* 传入后台的参数会员的用户id加油油号加油订单金额不包括商品金额加油订单总金额包括商品金额加油总升数
2024-10-18 09:33:26 +08:00
* 修改后 会员的用户id加油油号加油订单金额加油总升数 现在收银台 使用优惠券 是必须有油品才行
2024-09-21 09:14:15 +08:00
* @author vinjor-m
* @date 2024年9月19日
*/
2024-10-12 11:43:08 +08:00
getCoupon() {
2024-10-30 11:29:09 +08:00
this.loadingPreferential = true
2024-10-12 11:43:08 +08:00
this.chooseCouponId = ''
2024-10-18 09:33:26 +08:00
//组装请求参数 必须有会员id 以及 商品 和 油品的任意一种
2024-10-30 11:29:09 +08:00
if (this.chooseVipUser.hasOwnProperty('id') && this.oilGunClearing != '' && this.oilGunClearing.hasOwnProperty('oilNameId')) {
2024-09-26 13:45:48 +08:00
//已选择会员且(选了商品或者加了油)
let dataObj = {
2024-09-27 10:05:48 +08:00
userId: this.chooseVipUser.id,
2024-10-10 18:52:22 +08:00
payWay: this.payType
2024-09-26 13:45:48 +08:00
}
2024-10-30 11:29:09 +08:00
if (this.oilGunClearing != '' && this.oilGunClearing.hasOwnProperty('oilNameId')) {
2024-09-26 13:45:48 +08:00
//加油油枪有值
2024-10-12 11:43:08 +08:00
dataObj['oilId'] = this.oilGunClearing.oilNameId
2024-10-30 11:29:09 +08:00
dataObj['oilAmount'] = this.oilGunClearing.amount
2024-10-12 11:43:08 +08:00
dataObj['oilLiter'] = this.oilLiter
2024-09-26 13:45:48 +08:00
}
2024-10-12 11:43:08 +08:00
if (this.goodsList.length > 0) {
2024-09-26 13:45:48 +08:00
let goodsArray = []
for (let i = 0; i < this.goodsList.length; i++) {
2024-10-12 11:43:08 +08:00
let thisGoods = this.goodsList[i]
2024-09-26 13:45:48 +08:00
let goods = {
id: thisGoods.id,
2024-10-12 11:43:08 +08:00
num: thisGoods.num,
price: thisGoods.retailPrice,
amount: thisGoods.retailPrice * thisGoods.num
2024-09-26 13:45:48 +08:00
}
goodsArray.push(goods)
2024-10-12 11:43:08 +08:00
dataObj['goods'] = JSON.stringify(goodsArray)
2024-09-26 13:45:48 +08:00
}
console.log(dataObj)
}
2024-09-22 20:24:44 +08:00
getCouponList(dataObj).then(res => {
2024-10-30 11:29:09 +08:00
console.log('返回的可用的优惠券', res)
2024-09-26 13:45:48 +08:00
this.couponList = res.data
2024-10-30 11:29:09 +08:00
this.loadingPreferential = false
})
2024-10-12 11:43:08 +08:00
} else {
this.couponList = []
2024-10-30 11:29:09 +08:00
this.loadingPreferential = false
}
2024-09-21 09:14:15 +08:00
},
2024-10-12 11:43:08 +08:00
restVipUser() {
2024-09-21 11:17:25 +08:00
this.userInfo = false
this.chooseVipUser = {}
2024-09-30 10:30:55 +08:00
this.userMobile = ''
2024-09-27 10:05:48 +08:00
this.getActivity()
this.getCoupon()
2024-09-21 11:17:25 +08:00
},
2024-10-12 11:43:08 +08:00
chooseUser(data) {
if (data) {
2024-09-21 11:17:25 +08:00
//选择会员
this.userInfo = true
this.chooseVipUser = data
2024-10-12 11:43:08 +08:00
console.log('会员', this.chooseVipUser)
2024-09-27 10:05:48 +08:00
//选择会员,查询可用优惠活动和优惠券
this.getActivity()
this.getCoupon()
2024-10-12 11:43:08 +08:00
console.log(this.chooseVipUser, 598)
2024-09-21 11:17:25 +08:00
}
},
2024-09-21 09:24:50 +08:00
// 根据手机号查询会员信息
2024-10-12 11:43:08 +08:00
getUser(queryString, cb) {
2024-10-30 11:29:09 +08:00
userListByPhone({ mobile: queryString }).then(response => {
2024-10-12 11:43:08 +08:00
if (response.data) {
cb(response.data)
console.log(response.data, 608)
} else {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('会员信息不存在')
2024-10-12 11:43:08 +08:00
}
})
2024-09-21 09:24:50 +08:00
},
// 获取二维码信息
getQRCodeInfoByStoreId(type) {
2024-10-30 11:29:09 +08:00
QRCodeByStoreId({ type: type }).then(response => {
this.collectionImg = response.data
2024-09-21 09:24:50 +08:00
})
},
// 根据字符串获取二维码图片url地址
getQRcode() {
let opts = {
2024-10-30 11:29:09 +08:00
errorCorrectionLevel: 'L',//容错级别
type: 'image/png',//生成的二维码类型
2024-09-21 09:24:50 +08:00
quality: 0.3,//二维码质量
margin: 0,//二维码留白边距
width: 180,//宽
height: 180,//高
2024-10-30 11:29:09 +08:00
text: 'http://www.xxx.com',//二维码内容
2024-09-21 09:24:50 +08:00
color: {
2024-10-30 11:29:09 +08:00
dark: '#666666',//前景色
light: '#fff'//背景色
2024-09-21 09:24:50 +08:00
}
2024-10-30 11:29:09 +08:00
}
2024-09-21 09:24:50 +08:00
if (this.qrcode.length > 0) {
//this.QRlink 生成的二维码地址url
QRCode.toDataURL(this.qrcode[0].collection, opts, (err, url) => {
if (err) throw err
//将生成的二维码路径复制给data的QRImgUrl
this.collectionImg = url
})
QRCode.toDataURL(this.qrcode[0].payment, opts, (err, url) => {
if (err) throw err
//将生成的二维码路径复制给data的QRImgUrl
this.paymentImg = url
})
}
},
// 根据dom生成图片并下载到本地
handleDownloadqrCode(id) {
html2canvas(document.getElementById(id)).then((canvas) => {
2024-10-30 11:29:09 +08:00
let imgUrl = canvas.toDataURL('image/png') //可将 canvas 转为 base64 格式
2024-09-21 09:24:50 +08:00
let a = document.createElement('a')
2024-10-30 11:29:09 +08:00
a.href = imgUrl
2024-09-21 09:24:50 +08:00
if (id == 'collection') {
2024-10-30 11:29:09 +08:00
a.download = '门店二维码' //文件名
2024-09-21 09:24:50 +08:00
} else {
2024-10-30 11:29:09 +08:00
a.download = '收款二维码' //文件名
2024-09-21 09:24:50 +08:00
}
2024-10-30 11:29:09 +08:00
document.body.appendChild(a)
a.click() // 触发点击
document.body.removeChild(a) // 然后移除
})
2024-09-21 09:24:50 +08:00
},
//油枪初始化
getOilList() {
cashRegisterList().then(res => {
this.tabList = res.data
//加上全部选项
this.tabList = {
'全部': 'all',
...this.tabList
}
for (const key in this.tabList) {
// 循环为 不同油号 赋值不同图片样式
if (key == '0#') {
this.tabList[key].forEach(item => {
item.img = './imgs/0oil.png'
item.classStyle = 'card0'
})
}
if (key == '98#') {
this.tabList[key].forEach(item => {
item.img = './imgs/98oil.png'
item.classStyle = 'card98'
})
}
if (key == '95#') {
this.tabList[key].forEach(item => {
item.img = './imgs/95oil.png'
item.classStyle = 'card95'
})
}
if (key == '92#') {
this.tabList[key].forEach(item => {
item.img = './imgs/92oil.png'
item.classStyle = 'card92'
})
}
}
// 调用一下油枪数据列表 初始化
this.setTabindex('全部', 0)
})
},
//商品初始化
async getGoodsList() {
const res = await cashRegisterGoodsList()
this.restaurants = res.data
},
invokePickUpTheOrder() {
//获取存储数据
this.pendingOrdersList = JSON.parse(window.sessionStorage.getItem('pendingOrders')) || []
2024-09-12 12:03:37 +08:00
this.pickUpTheOrder = true
},
//确定挂单
pendingOrders() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
// 1.先取出之前的转 json 然后追加 将 JSON 字符串解析回对象
this.pendingOrdersList = JSON.parse(window.sessionStorage.getItem('pendingOrders')) || []
// 2.商品列表没有数据不允许添加
if (!this.goodsList.length) {
this.$message.error('商品列表为空,请添加商品')
return
}
// 3.如果名称重复则不允许添加
let bo1 = true
this.pendingOrdersList.forEach(item => {
if (item.name == this.ruleForms.name) {
this.$message.error('名称重复,请重新输入')
bo1 = false
return
}
})
// 4.追加数据
if (bo1) {
this.pendingOrdersList.push(
{
name: this.ruleForms.name,
list: this.goodsList
}
)
// 将当前 商品订单表 放入 sessionStorage
window.sessionStorage.setItem('pendingOrders', JSON.stringify(this.pendingOrdersList))
// 清空当前商品
this.goodsList = []
//重置表单 关闭弹窗
this.ruleForms = {
name: ''
}
this.hangingAnOrder = false
2024-09-14 11:03:53 +08:00
this.$message({
message: '挂单成功',
type: 'success'
2024-10-30 11:29:09 +08:00
})
}
} else {
console.log('error submit!!')
return false
}
})
},
//挂单
invokeHangingAnOrder() {
2024-09-12 12:03:37 +08:00
this.hangingAnOrder = true
//必须 输入 挂单名称 将数据临时存储在 sessionStorage 刷新自动取消
2024-09-12 12:03:37 +08:00
},
addVip() {
2024-09-12 11:49:20 +08:00
this.newMember = true
},
2024-10-12 11:43:08 +08:00
setFreeIndex(data) {
2024-10-09 17:32:17 +08:00
//根据字段处理显示
2024-10-30 11:29:09 +08:00
let dateText = ''
2024-10-12 11:43:08 +08:00
if (data.availableOrUn == 0) {
2024-10-30 11:29:09 +08:00
dateText += '适用时间 '
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
dateText += '不适用时间 '
2024-10-09 17:32:17 +08:00
}
2024-10-12 11:43:08 +08:00
if (data.availableType == 1) {
2024-10-09 17:32:17 +08:00
//每周
2024-10-30 11:29:09 +08:00
dateText += '每周 '
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
dateText += '每月 '
2024-10-09 17:32:17 +08:00
}
2024-10-12 11:43:08 +08:00
if (data.availableOrUn == 0) {
2024-10-30 11:29:09 +08:00
dateText += data.availableDay + ' 可用'
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
dateText += data.availableDay + ' 不可用'
2024-10-09 17:32:17 +08:00
}
data.dateText = dateText
2024-10-30 11:29:09 +08:00
let amountRule = ''
2024-10-12 11:43:08 +08:00
if (data.type == 1) {
2024-10-30 11:29:09 +08:00
amountRule += '消费条件: '
if (data.useType == '1') {
amountRule += '订单金额'
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
amountRule += '实收金额'
2024-10-09 17:32:17 +08:00
}
2024-10-30 11:29:09 +08:00
amountRule += '满足金额 ' + data.reachAmount
amountRule += '优惠 ' + data.reduceAmount
2024-10-12 11:43:08 +08:00
} else if (data.type == 2) {
2024-10-30 11:29:09 +08:00
amountRule += '兑换内容: ' + data.exchangeContent
2024-10-12 11:43:08 +08:00
} else if (data.type == 3) {
2024-10-30 11:29:09 +08:00
amountRule = ''
amountRule += '优惠条件: '
if (data.useType == '1') {
amountRule += '订单金额'
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
amountRule += '实收金额'
2024-10-12 11:43:08 +08:00
}
2024-10-30 11:29:09 +08:00
amountRule += '金额起 ' + data.zkStartAmount
amountRule += '金额止 ' + data.zkEndAmount
amountRule += data.zkData * 10 + '折'
2024-10-12 11:43:08 +08:00
} else if (data.type == 4) {
2024-10-30 11:29:09 +08:00
amountRule = ''
amountRule += '消费条件: '
if (data.useType == '1') {
amountRule += '订单金额'
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
amountRule += '实收金额'
2024-10-09 17:32:17 +08:00
}
2024-10-30 11:29:09 +08:00
amountRule += '金额满 ' + data.reachAmount + ' 每' + data.ljOilNum + 'L,减' + data.ljOilAmount + '元'
2024-10-12 11:43:08 +08:00
} else if (data.type == 5) {
2024-10-30 11:29:09 +08:00
amountRule += '消费条件: '
if (data.useType == '1') {
amountRule += '订单金额'
2024-10-12 11:43:08 +08:00
} else {
2024-10-30 11:29:09 +08:00
amountRule += '实收金额'
2024-10-12 11:43:08 +08:00
}
2024-10-30 11:29:09 +08:00
amountRule += '满足金额 ' + data.reachAmount
amountRule += '优惠 ' + data.reduceAmount
2024-10-09 17:32:17 +08:00
}
data.ruleText = amountRule
2024-10-12 11:43:08 +08:00
console.log(amountRule, dateText, this.couponTypeList)
2024-10-30 11:29:09 +08:00
let tempType = ''
2024-10-09 17:32:17 +08:00
for (const item of this.couponTypeList) {
2024-10-12 11:43:08 +08:00
if (item.dictValue == data.type) {
2024-10-09 17:32:17 +08:00
tempType = item.dictLabel
}
}
data.type = tempType
this.sendCoupon = data
},
// 获取支付方式
2024-10-12 11:43:08 +08:00
getCouponType() {
2024-10-30 11:29:09 +08:00
getDicts('CardCoupon_type').then(response => {
this.couponTypeList = response.data
2024-10-09 17:32:17 +08:00
})
2024-09-19 17:22:30 +08:00
},
2024-10-12 11:43:08 +08:00
addFreeTicket() {
getCanUseCoupon().then(res => {
2024-10-09 17:32:17 +08:00
this.sendCouponList = res.data
2024-10-22 10:29:38 +08:00
this.setFreeIndex(res.data[0])
2024-10-08 11:38:41 +08:00
})
2024-09-19 17:22:30 +08:00
this.freeTicket = true
2024-10-22 10:29:38 +08:00
2024-09-19 17:22:30 +08:00
},
addMemberRecharge() {
2024-09-12 11:49:20 +08:00
this.memberRecharge = true
2024-10-12 11:43:08 +08:00
this.$nextTick(res => {
2024-10-30 11:29:09 +08:00
this.$refs.rechargeRef.getCardValueList()
2024-09-22 16:37:06 +08:00
})
2024-09-12 11:49:20 +08:00
},
setTabindex(key, index) {
//列表选中样式
2024-09-11 16:45:25 +08:00
this.tabIndex = index
if (key == '全部') {
this.dataList = []
for (const tabKey in this.tabList) {
this.dataList = this.dataList.concat(this.tabList[tabKey])
}
//因为 页面展示多加了一个 全部 要删掉第一个元素
this.dataList.shift()
} else {
for (const tabKey in this.tabList) {
if (key == tabKey) {
this.dataList = this.tabList[tabKey]
}
}
}
2024-09-12 11:28:21 +08:00
},
2024-10-15 16:09:34 +08:00
changeAmount(val) {
console.log(val, 1807)
this.credit = val
},
// 添加挂账记录
addHangbill() {
addHangBill(this.credit).then(async response => {
if (response.data == 1) {
2024-10-30 11:29:09 +08:00
await this.addOrder()
this.$modal.msgSuccess('挂账记录添加成功')
this.accountPending = false
2024-10-15 16:09:34 +08:00
// this.printLocally()
this.oilOrderReport()
2024-10-30 11:29:09 +08:00
this.payType = 'WECHAT'
this.restVipUser()
this.resetting1()
2024-10-15 16:09:34 +08:00
} else {
2024-10-30 11:29:09 +08:00
this.$modal.msgError('挂账单位可用额度不足,无法进行挂账')
2024-10-15 16:09:34 +08:00
}
})
},
// 添加挂账订单信息
async addOrder() {
if (this.oilGunClearing) {
this.payForm.oilOrder = JSON.stringify({
oilPrice: this.oilGunClearing.oilPrice,
oils: this.oilGunClearing.oilNameId,
oilGunNum: this.oilGunClearing.id,
tankId: this.oilGunClearing.tankId,
activeId: this.chooseAct.hasOwnProperty('actId') ? this.chooseAct.activeId : null,
2024-10-30 11:29:09 +08:00
activeType: this.chooseAct.hasOwnProperty('type') ? this.chooseAct.activeType : null
2024-10-15 16:09:34 +08:00
})
} else {
this.payForm.oilOrder = null
}
//商品 集合
this.payForm.goodsOrder = JSON.stringify(this.goodsList)
//支付方式
this.payForm.payType = this.payType
//油品订单金额
this.payForm.oilAmount = this.oilGunClearing.amount || 0
//商品订单金额
2024-10-18 10:24:06 +08:00
this.payForm.goodsAmount = this.getGoodsNum || 0
2024-10-15 16:09:34 +08:00
//油品实付金额
2024-10-30 11:29:09 +08:00
this.payForm.oilActualPay = this.oilGunClearing.amount ? this.oilGunClearing.getAmount - this.disOil : 0
2024-10-15 16:09:34 +08:00
//商品实付金额
2024-10-30 11:29:09 +08:00
this.payForm.goodsActualPay = this.getGoodsNum ? this.getGoodsNum - this.disGoods : 0
2024-10-15 16:09:34 +08:00
//油枪id
this.payForm.oilGunId = this.oilGunClearing.id
//活动营销优惠金额
this.payForm.activeAmount = this.chooseAct.disAmount || 0.0
//优惠卷类型
this.payForm.couponType = this.chooseCoupon.hasOwnProperty('type') ? this.chooseCoupon.type : null
//优惠券id
this.payForm.couponId = this.chooseCoupon.hasOwnProperty('couponId') ? this.chooseCoupon.id : null
//付款用户
this.payForm.payUser = this.chooseVipUser.mobile
//油品优惠金额
2024-10-30 11:29:09 +08:00
this.payForm.oilDiscount = this.disOil
2024-10-15 16:09:34 +08:00
//商品优惠金额
2024-10-30 11:29:09 +08:00
this.payForm.goodsDiscount = this.disGoods
2024-10-15 16:09:34 +08:00
//会员消费金额 (储值卡需要减少的金额)
2024-10-30 11:29:09 +08:00
this.payForm.consumeAmount = this.realAmount
2024-10-15 16:09:34 +08:00
//会员id
this.payForm.userId = this.chooseVipUser.id
//终端 默认传PC
2024-10-30 11:29:09 +08:00
this.payForm.terminal = 'PC'
2024-10-15 16:09:34 +08:00
//商品 ids
// 将集合内 所有id 拼接 , 隔开 this.goodsList
2024-10-30 11:29:09 +08:00
this.payForm.goodsIds = this.goodsList.map(item => item.id).join(',')
2024-10-15 16:09:34 +08:00
//购买商品的总数量 计算属性
this.payForm.goodsNum = this.getGoodsListNum
//油品 + 商品 的实付总额
2024-10-18 10:43:49 +08:00
this.payForm.allAmount = this.realAmount
2024-10-18 10:24:06 +08:00
2024-10-15 16:09:34 +08:00
this.payForm.paymentType = this.payType
console.log('支付类型', this.payForm.paymentType)
//支付弹窗 相关
this.payForm.realyPayBills = this.realAmount
await addLJGoods(this.payForm).then(response => {
})
2024-10-15 14:27:49 +08:00
},
2024-09-22 20:24:44 +08:00
/**
* 设置选中的支付方式
* @param value
*/
setindex(value) {
2024-10-15 16:09:34 +08:00
if (value == 'after_pay') {
if (this.getGoodsNum > 0) {
2024-10-30 11:29:09 +08:00
this.$message.error('商品订单不支持挂账')
2024-10-15 14:27:49 +08:00
return
}
2024-10-15 16:09:34 +08:00
if (this.oilGunClearing.amount <= 0) {
2024-10-30 11:29:09 +08:00
this.$message.error('请选择挂账订单')
return
2024-10-15 14:27:49 +08:00
}
this.accountPending = true
}
2024-10-29 15:40:39 +08:00
if (value == 'card_value' || value == 'fule_card' || value == 'car_card_value') {
2024-10-18 10:37:53 +08:00
if (!this.userInfo) {
2024-10-30 11:29:09 +08:00
this.$message.error('请先选择会员')
2024-10-17 17:46:51 +08:00
return
}
}
2024-10-30 11:29:09 +08:00
console.log('支付方式', value)
2024-10-10 18:52:22 +08:00
this.payType = value
2024-09-27 10:05:48 +08:00
//支付方式发生变化,查询可用优惠券和优惠活动
this.getActivity()
this.getCoupon()
2024-09-12 11:49:20 +08:00
},
setRefuelingAmount(item) {
2024-09-12 13:58:21 +08:00
this.refuelingAmount = true
//赋值 传给子组件的油枪对象
this.oilGun = item
2024-09-12 13:58:21 +08:00
},
//必须是异步方法
2024-09-12 11:49:20 +08:00
querySearchAsync(queryString, cb) {
const restaurants = this.restaurants
let results
if (queryString) {
results = restaurants.filter(this.createFilter(queryString))
} else {
results = restaurants
}
cb(results)
},
createFilter(queryString) {
return (restaurant) => {
return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
}
},
//取单 下拉框是子组件 子组件通过数据监听 将数据发送给父组件
getPendingOrdersList() {
//并且删除 父传子数据容器 以及 重新存储sessionStorage
this.pendingOrdersList = JSON.parse(window.sessionStorage.getItem('pendingOrders')) || []
if (this.pendingOrdersList.length) {
let found = false
this.pendingOrdersList = this.pendingOrdersList.filter(item => {
if (item.name === this.value) {
if (!found) {
this.goodsList = item.list
found = true
}
return false // 不保留匹配的项
}
return true // 保留不匹配的项
})
window.sessionStorage.setItem('pendingOrders', JSON.stringify(this.pendingOrdersList))
2024-09-14 11:03:53 +08:00
this.pickUpTheOrder = false
this.$message({
message: '取单成功',
type: 'success'
2024-10-30 11:29:09 +08:00
})
2024-09-14 11:03:53 +08:00
} else {
2024-09-14 11:03:53 +08:00
this.$message.error('当前无存单 请存单后再取单')
}
},
//作废 下拉框是子组件 子组件通过数据监听 将数据发送给父组件
deletePendingOrdersList() {
//并且删除 父传子数据容器 以及 重新存储sessionStorage
this.pendingOrdersList = JSON.parse(window.sessionStorage.getItem('pendingOrders')) || []
if (this.pendingOrdersList.length) {
this.pendingOrdersList = this.pendingOrdersList.filter(item => {
return item.name !== this.value
})
window.sessionStorage.setItem('pendingOrders', JSON.stringify(this.pendingOrdersList))
2024-09-14 11:03:53 +08:00
this.$message({
message: '作废成功',
type: 'success'
2024-10-30 11:29:09 +08:00
})
} else {
this.$message.error('当前无存单 请存单后再作废')
}
2024-09-12 11:49:20 +08:00
},
// 接受子组件列表数据变化
fatherPendingOrdersList(list) {
this.sonGoodsList = list
},
// 接受子组件下拉选中名字变化
fatherPendingOrdersName(value) {
this.value = value
},
//删除商品
deleteGoods(id) {
//根据id删除数组元素
this.goodsList = this.goodsList.filter(item => item.id != id)
},
// 子组件提交调用父组件方法
fatherMethod(list) {
//将当前选中油枪 放入 油枪订单容器 (需要被数据监听)
2024-10-30 11:29:09 +08:00
this.oilGunClearing = { amount: list, ...this.oilGun }
2024-09-12 11:49:20 +08:00
},
//获取子组件数据
sonButton() {
//调用子组件方法
this.$refs.refuelingAmount.submitForm('ruleForm')
},
handleSelect(row) {
let bo1 = true
2024-10-30 11:29:09 +08:00
console.log('当前选择的商品', row)
// 如果 item 存在 goodsList 则 属性+1 不存在直接添加到数组
// 使用 map 生成新数组 防止vue监听不到数组内数据变化
this.goodsList = this.goodsList.map(
item => {
if (item.id == row.id) {
bo1 = false
2024-10-30 11:29:09 +08:00
return { ...item, num: item.num + 1 }
} else {
return item
}
}
)
if (bo1) {
//如果没有先添加数量属性 默认1
row.num = 1
this.goodsList.push(row)
}
},
// 油枪重置
oilGunReset() {
this.oilGunClearing = {}
},
// 收银重置
goodsReset() {
this.goodsList = []
2024-09-11 11:06:27 +08:00
}
}
}
2024-09-10 14:58:47 +08:00
</script>
<style scoped lang="scss">
2024-10-14 14:50:36 +08:00
.disabled {
pointer-events: none; // 禁用鼠标事件
opacity: 0.6; // 半透明效果表示禁用
}
2024-09-11 16:45:25 +08:00
input {
width: 100%;
border: none;
outline: none;
background-color: transparent;
padding: 0;
margin: 0;
font-family: inherit;
font-size: inherit;
color: inherit;
}
2024-09-11 18:14:20 +08:00
2024-09-11 16:45:25 +08:00
.new-contoner {
2024-09-10 14:58:47 +08:00
width: 100%;
box-sizing: border-box;
height: 100vh;
2024-09-27 09:23:47 +08:00
box-sizing: border-box;
2024-10-12 11:43:08 +08:00
padding: 20px;
2024-09-27 09:23:47 +08:00
2024-09-11 16:45:25 +08:00
padding-bottom: 0px;
2024-09-11 11:06:27 +08:00
display: flex;
align-content: center;
justify-content: space-between;
}
2024-09-11 16:45:25 +08:00
.left-box {
width: 33%;
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
2024-09-11 11:06:27 +08:00
border-radius: 10px;
overflow: hidden;
}
2024-09-11 16:45:25 +08:00
.cont-box {
width: 33%;
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
2024-09-11 11:06:27 +08:00
border-radius: 10px;
margin: 0px 20px;
overflow: hidden;
}
2024-09-11 16:45:25 +08:00
.right-box {
2024-09-11 11:06:27 +08:00
width: 33%;
2024-09-11 16:45:25 +08:00
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
2024-09-11 11:06:27 +08:00
border-radius: 10px;
overflow: hidden;
}
2024-09-11 16:45:25 +08:00
.box-top {
2024-09-27 09:23:47 +08:00
height: 86vh;
2024-09-11 11:06:27 +08:00
background: #fff;
margin-bottom: 5px;
2024-09-11 16:45:25 +08:00
position: relative;
2024-09-11 11:06:27 +08:00
}
2024-09-11 16:45:25 +08:00
.box-bottom {
2024-09-27 09:23:47 +08:00
height: 10vh;
2024-09-11 11:06:27 +08:00
background: #fff;
2024-09-11 16:45:25 +08:00
z-index: 9;
box-sizing: border-box;
padding: 15px;
2024-09-11 18:14:20 +08:00
display: flex;
align-items: center;
justify-content: space-between
2024-09-11 11:06:27 +08:00
}
2024-09-11 16:45:25 +08:00
.o-top {
2024-09-11 11:06:27 +08:00
width: 100%;
height: 80px;
background: #FF9655;
box-sizing: border-box;
padding: 15px;
display: flex;
align-items: center;
font-size: 14px;
color: #fff;
justify-content: space-between;
}
2024-09-11 16:45:25 +08:00
.d-s {
2024-09-11 11:06:27 +08:00
display: flex;
align-items: center;
}
2024-09-11 16:45:25 +08:00
.an_bor {
2024-09-11 11:06:27 +08:00
box-sizing: border-box;
2024-09-19 17:22:30 +08:00
padding: 5px;
2024-09-11 11:06:27 +08:00
border: 1px solid #fff;
border-radius: 50px;
display: flex;
align-items: center;
font-size: 14px;
color: #FFFFFF;
justify-content: center;
margin: 0px 5px;
cursor: pointer;
}
2024-09-11 16:45:25 +08:00
.t-top {
2024-09-11 11:06:27 +08:00
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 20px 0px;
border-bottom: #F4F5F9 1px solid;
}
2024-09-11 16:45:25 +08:00
.three_box {
2024-09-11 11:06:27 +08:00
width: 33%;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: #555555;
}
2024-09-11 16:45:25 +08:00
.d-b {
2024-09-11 11:06:27 +08:00
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 15px 0px;
}
2024-09-11 16:45:25 +08:00
2024-09-11 18:14:20 +08:00
.x-d-b {
2024-09-27 10:05:48 +08:00
width: 95%;
2024-09-11 18:14:20 +08:00
display: flex;
align-items: center;
justify-content: space-between;
margin: 15px 0px;
2024-09-27 10:05:48 +08:00
margin-left: 4%;
2024-09-11 18:14:20 +08:00
}
2024-09-11 16:45:25 +08:00
.d-top {
2024-09-11 11:06:27 +08:00
width: 100%;
box-sizing: border-box;
2024-09-27 10:05:48 +08:00
padding: 0 40px 20px 40px;
2024-09-11 11:06:27 +08:00
font-size: 16px;
color: #555555;
border-bottom: #f6f8f9 4px solid;
}
2024-09-11 16:45:25 +08:00
.checkbox {
2024-09-11 11:06:27 +08:00
width: 15px;
height: 15px;
border: 1px solid #ddd;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
}
2024-09-11 16:45:25 +08:00
.d_text {
2024-09-11 11:06:27 +08:00
color: #555555;
margin-left: 10px;
2024-09-11 16:45:25 +08:00
font-size: 16px;
2024-09-11 11:06:27 +08:00
}
2024-09-11 16:45:25 +08:00
.or_num {
2024-09-11 11:06:27 +08:00
color: #FF9655;
}
2024-09-11 16:45:25 +08:00
.active {
2024-09-11 11:06:27 +08:00
background: #FF9655 !important;
color: #FFFFFF !important;
border: 1px solid #FF9655;
}
2024-09-11 16:45:25 +08:00
.three-top {
2024-09-11 11:06:27 +08:00
width: 100%;
box-sizing: border-box;
border-bottom: #f6f8f9 4px solid;
}
2024-09-11 16:45:25 +08:00
.addbor {
2024-09-11 11:06:27 +08:00
border-bottom: 1px solid #f6f8f9;
padding: 15px 40px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
}
2024-09-11 16:45:25 +08:00
.er-box {
width: 100%;
}
.wrap-box {
2024-09-27 09:23:47 +08:00
display: flex;
2024-09-11 16:45:25 +08:00
position: absolute;
bottom: 0px;
width: 100%;
flex-wrap: wrap;
box-sizing: border-box;
padding: 20px;
2024-10-12 11:43:08 +08:00
justify-content: space-between;
2024-09-11 16:45:25 +08:00
}
.f-box {
width: 31%;
height: 44px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 16px;
color: #555555;
2024-09-27 09:23:47 +08:00
2024-09-11 16:45:25 +08:00
margin-bottom: 2%;
border-radius: 10px;
border: 1px solid #409EFF;
cursor: pointer;
}
.f-acvite {
background: #409eff !important;
color: #fff !important;
2024-09-27 09:23:47 +08:00
//box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
2024-09-11 16:45:25 +08:00
}
.anniu {
width: 160px;
height: 60px;
background: linear-gradient(312deg, #FF945B 0%, #FEB37C 100%);
border-radius: 6px 6px 6px 6px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
.price_ {
font-size: 24px;
color: #333333;
font-weight: bold;
}
.price_prefer {
font-size: 16px;
color: #FF4347;
}
.cont-tab {
width: 100%;
display: flex;
align-items: center;
border-bottom: 1px solid #EEEEEE;
box-sizing: border-box;
font-size: 14px;
color: #999999;
padding: 0px 20px;
padding-top: 25px;
}
2024-09-11 18:14:20 +08:00
.r-top {
2024-09-11 16:45:25 +08:00
width: 100%;
display: flex;
align-items: center;
border-bottom: 1px solid #EEEEEE;
padding: 0px 20px;
padding-top: 15px;
padding-bottom: 10px;
font-size: 16px;
color: #555555;
}
2024-09-11 18:14:20 +08:00
.input-box {
2024-09-11 16:45:25 +08:00
width: 90%;
height: 40px;
background: #FAFAFA;
border-radius: 6px 6px 6px 6px;
border: 1px solid #DDDDDD;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0px 15px;
margin: 15px auto;
}
2024-09-11 18:14:20 +08:00
2024-09-11 16:45:25 +08:00
.gang {
width: 24px;
height: 3px;
//background: linear-gradient( 90deg, #FF8646 0%, #FFA360 100%);
border-radius: 3px 3px 3px 3px;
}
.active_gang {
background: linear-gradient(90deg, #FF8646 0%, #FFA360 100%) !important;
}
.tab-box {
margin-right: 30px;
cursor: pointer;
}
.active_name {
font-size: 14px;
color: #555555;
font-weight: bold;
}
.tab-kuang {
width: 100%;
box-sizing: border-box;
padding: 20px;
margin: 0 auto;
display: flex;
2024-10-22 10:29:38 +08:00
align-content: flex-start;
2024-09-11 16:45:25 +08:00
flex-wrap: wrap;
overflow: auto;
height: 68vh;
}
2024-10-30 11:29:09 +08:00
.zo_box {
2024-10-22 10:05:09 +08:00
width: 33.3%;
2024-10-22 10:29:38 +08:00
margin-bottom: 1%;
2024-10-22 10:05:09 +08:00
}
2024-10-30 11:29:09 +08:00
2024-09-11 16:45:25 +08:00
.card92 {
2024-10-22 10:05:09 +08:00
width: 95%;
2024-09-11 16:45:25 +08:00
height: 90px;
box-sizing: border-box;
padding: 5px;
background: rgba(255, 150, 85, 0.1);
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
border-radius: 6px 6px 6px 6px;
border: 1px solid #FF9655;
color: #FF9655;
font-size: 12px;
color: #FF9655;
overflow: hidden;
2024-09-27 09:23:47 +08:00
margin: 0 auto;
margin-bottom: 2%;
2024-09-12 13:58:21 +08:00
cursor: pointer;
2024-09-11 16:45:25 +08:00
}
.card0 {
2024-10-22 10:05:09 +08:00
width: 95%;
2024-09-11 16:45:25 +08:00
height: 90px;
box-sizing: border-box;
padding: 5px;
2024-09-11 18:14:20 +08:00
background: rgba(255, 181, 25, 0.1);
2024-09-11 16:45:25 +08:00
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
border-radius: 6px 6px 6px 6px;
border: 1px solid #FFB519;
2024-09-12 13:58:21 +08:00
cursor: pointer;
2024-09-11 16:45:25 +08:00
font-size: 12px;
color: #FFB519;
overflow: hidden;
2024-09-27 09:23:47 +08:00
margin: 0 auto;
margin-bottom: 2%;
2024-09-11 16:45:25 +08:00
}
.card98 {
2024-10-22 10:05:09 +08:00
width: 95%;
2024-09-11 16:45:25 +08:00
height: 90px;
box-sizing: border-box;
padding: 5px;
2024-09-11 18:14:20 +08:00
background: rgba(64, 158, 255, 0.1);
2024-09-11 16:45:25 +08:00
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
border-radius: 6px 6px 6px 6px;
border: 1px solid #409EFF;
font-size: 12px;
color: #409EFF;
overflow: hidden;
2024-09-27 09:23:47 +08:00
margin: 0 auto;
margin-bottom: 2%;
2024-09-12 13:58:21 +08:00
cursor: pointer;
2024-09-11 16:45:25 +08:00
}
.card95 {
2024-10-22 10:05:09 +08:00
width: 95%;
2024-09-11 16:45:25 +08:00
height: 90px;
box-sizing: border-box;
padding: 5px;
background: rgba(13, 194, 145, 0.1);
box-shadow: 0px 3px 6px 1px rgba(255, 255, 255, 0.4), inset 0px 3px 6px 1px rgba(255, 255, 255, 0.5);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0DC291;
font-size: 12px;
color: #0DC291;
overflow: hidden;
2024-09-27 09:23:47 +08:00
margin: 0 auto;
margin-bottom: 2%;
2024-09-12 13:58:21 +08:00
cursor: pointer;
2024-09-11 16:45:25 +08:00
}
.card-title {
font-size: 24px;
color: #555555;
margin: 6px auto;
text-align: center;
}
.c-b-d {
display: flex;
align-items: center;
justify-content: space-between;
}
2024-09-11 18:14:20 +08:00
.c-bottom {
2024-09-11 16:45:25 +08:00
font-size: 14px;
color: #333333;
2024-09-27 09:23:47 +08:00
//border-bottom: 2px solid #F4F5F9;
2024-09-11 16:45:25 +08:00
box-sizing: border-box;
padding: 10px 20px;
}
2024-09-11 18:14:20 +08:00
.bottom-b-d {
2024-09-27 09:23:47 +08:00
2024-09-11 16:45:25 +08:00
width: 100%;
display: flex;
align-content: center;
justify-content: space-between;
box-sizing: border-box;
padding: 10px 20px;
font-size: 16px;
color: #777777;
2024-09-27 09:23:47 +08:00
border-top: 2px solid #F4F5F9;
2024-09-11 16:45:25 +08:00
}
2024-09-11 18:14:20 +08:00
.anniu-c {
2024-09-11 16:45:25 +08:00
width: 80px;
height: 36px;
background: #FFFFFF;
border-radius: 6px 6px 6px 6px;
border: 1px solid #DDDDDD;
display: flex;
align-items: center;
justify-content: center;
color: #777777;
}
2024-09-11 18:14:20 +08:00
.anniu-lv {
2024-09-11 16:45:25 +08:00
width: 80px;
height: 36px;
2024-09-11 18:14:20 +08:00
background: linear-gradient(312deg, #9CDCA0 0%, #5BC557 100%);
2024-09-11 16:45:25 +08:00
border-radius: 6px 6px 6px 6px;
2024-09-11 18:14:20 +08:00
cursor: pointer;
2024-09-11 16:45:25 +08:00
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
2024-09-11 18:14:20 +08:00
.anniu-lan {
2024-09-11 16:45:25 +08:00
cursor: pointer;
width: 80px;
height: 36px;
2024-09-11 18:14:20 +08:00
background: linear-gradient(312deg, #70CAFD 0%, #0BADFE 100%, #02AAFE 100%);
2024-09-11 16:45:25 +08:00
border-radius: 6px 6px 6px 6px;
margin: 0px 15px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
2024-09-11 18:14:20 +08:00
.taber-top {
2024-09-11 16:45:25 +08:00
width: 100%;
box-sizing: border-box;
padding: 5px 20px;
background: #f4f5f9;
display: flex;
align-items: center;
}
2024-09-11 18:14:20 +08:00
.taber-box {
2024-09-11 16:45:25 +08:00
width: 100%;
box-sizing: border-box;
padding: 10px 20px;
border-bottom: 1px solid #f4f5f9;
display: flex;
align-items: center;
}
2024-09-11 18:14:20 +08:00
.goods_name {
2024-09-27 09:23:47 +08:00
width: 25%;
2024-09-11 16:45:25 +08:00
}
2024-09-11 18:14:20 +08:00
.stock_name {
2024-09-27 09:23:47 +08:00
width: 10%;
2024-09-11 16:45:25 +08:00
text-align: center;
}
2024-09-11 18:14:20 +08:00
.u-price_name {
2024-09-27 09:23:47 +08:00
width: 10%;
2024-09-11 16:45:25 +08:00
text-align: center;
}
2024-09-11 18:14:20 +08:00
.num_name {
2024-09-27 09:23:47 +08:00
width: 30%;
2024-09-11 16:45:25 +08:00
text-align: center;
}
2024-09-11 18:14:20 +08:00
.orerate_name {
2024-09-27 09:23:47 +08:00
width: 15%;
2024-09-11 16:45:25 +08:00
text-align: center;
2024-09-10 14:58:47 +08:00
}
2024-09-11 18:14:20 +08:00
.tc-box {
text-align: center;
}
2024-10-12 11:43:08 +08:00
.ds-tc {
2024-09-19 17:22:30 +08:00
width: 100%;
display: flex;
}
2024-10-12 11:43:08 +08:00
.left_tc {
2024-09-19 17:22:30 +08:00
width: 500px;
}
2024-10-12 11:43:08 +08:00
.right_tc {
2024-09-19 17:22:30 +08:00
width: 300px;
height: 100%;
box-sizing: border-box;
padding: 0px 15px;
2024-09-11 18:14:20 +08:00
2024-09-19 17:22:30 +08:00
}
2024-10-12 11:43:08 +08:00
.t-tc {
2024-09-19 17:22:30 +08:00
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
2024-10-12 11:43:08 +08:00
2024-09-11 18:14:20 +08:00
.red-size {
font-size: 18px;
color: #F44522;
}
.title_ {
font-size: 28px;
color: #333333;
margin-bottom: 10px;
}
.r-size {
font-size: 16px;
}
.t-size {
width: 100%;
text-align: right;
font-size: 12px;
color: #333333;
}
.h-size {
font-size: 12px;
color: #999999;
margin-left: 100px;
text-align: left;
}
.hui-box {
width: 282px;
background: #FAFAFA;
margin: 15px auto;
box-sizing: border-box;
padding: 15px;
}
.hui-box-bt {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 15px auto;
}
.left_input {
2024-09-30 10:30:55 +08:00
width: 80%;
2024-09-27 09:23:47 +08:00
overflow: hidden;
2024-09-12 11:49:20 +08:00
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-radius: 8px;
2024-09-21 09:24:50 +08:00
color: white;
2024-09-27 09:23:47 +08:00
border: 1px solid #fff;
2024-10-12 11:43:08 +08:00
2024-09-21 11:33:14 +08:00
::v-deep.el-input__inner {
background: transparent !important;
2024-09-27 09:23:47 +08:00
border: transparent 1px solid;
color: #fff;
2024-10-12 11:43:08 +08:00
.el-input__placeholder {
2024-09-27 09:23:47 +08:00
color: #fff !important;
2024-09-21 11:33:14 +08:00
}
}
::v-deep input:-moz-placeholder,
::v-deep textarea:-moz-placeholder {
color: #fff;
}
2024-10-12 11:43:08 +08:00
2024-09-21 11:33:14 +08:00
::v-deep input:-ms-input-placeholder,
::v-deep textarea:-ms-input-placeholder {
color: #fff;
}
2024-10-12 11:43:08 +08:00
2024-09-21 11:33:14 +08:00
::v-deep input::-webkit-input-placeholder,
::v-deep textarea::-webkit-input-placeholder {
2024-10-12 11:43:08 +08:00
color: #fff;
2024-09-21 11:33:14 +08:00
}
2024-09-12 11:49:20 +08:00
}
2024-10-12 11:43:08 +08:00
.wrap-tc {
2024-09-19 17:22:30 +08:00
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 15px;
}
2024-10-12 11:43:08 +08:00
.tc_wa {
2024-09-30 14:10:07 +08:00
width: 30%;
2024-09-19 17:22:30 +08:00
margin-bottom: 4%;
2024-09-30 14:10:07 +08:00
margin-right: 3%;
2024-09-19 17:22:30 +08:00
box-sizing: border-box;
padding: 10px;
background: url("./imgs/dx.png") no-repeat;
height: 65px;
background-size: 100% 100%;
cursor: pointer;
}
2024-10-12 11:43:08 +08:00
.tc-active {
2024-09-19 17:22:30 +08:00
background: url("./imgs/zxz.png") no-repeat !important;
background-size: 100% 100% !important;
color: #fff !important;
}
2024-10-12 11:43:08 +08:00
2024-09-21 09:24:50 +08:00
.qrcode {
width: 350px;
margin-top: 0px;
}
2024-10-12 11:43:08 +08:00
.el-radio-group label {
2024-09-22 20:24:44 +08:00
width: 100%;
}
2024-10-12 11:43:08 +08:00
.el-radio-group .or_num {
2024-09-22 20:24:44 +08:00
float: right;
}
2024-10-12 11:43:08 +08:00
.el-dialog__body {
2024-09-30 14:10:07 +08:00
padding-top: 0px !important;
}
2024-09-10 14:58:47 +08:00
</style>