1
This commit is contained in:
parent
920f67828c
commit
ac483aee69
@ -10,7 +10,7 @@
|
||||
<div style="font-weight: bold;margin-bottom: 2px">{{chooseVipUser.name||'匿名'}}</div>
|
||||
<div class="d-s">
|
||||
<span>{{chooseVipUser.mobile}}</span>
|
||||
<sapn style="margin: 0px 5px">普通会员</sapn>
|
||||
<span style="margin: 0px 5px">{{chooseVipUser.gradeName}}</span>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
trigger="hover">
|
||||
@ -145,7 +145,7 @@
|
||||
<div class="card-title">{{ item.gunName }}</div>
|
||||
<div class="c-b-d">
|
||||
<img :src=item.img style="width: 16px;height: 16px">
|
||||
<div>{{ item.oilName }} {{ item.oilType + '罐' }}</div>
|
||||
<div>{{ item.tankName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -207,7 +207,10 @@
|
||||
<div class="stock_name">{{ item.stock }}</div>
|
||||
<div class="u-price_name">{{ item.retailPrice }}</div>
|
||||
<div class="u-price_name">{{ item.retailPrice }}</div>
|
||||
<div class="num_name"> <el-input-number v-model="goodsList[index].num" @change="handleCilone" :max="9999" size="mini" ></el-input-number></div>
|
||||
<div class="num_name">
|
||||
<el-input-number v-model="goodsList[index].num" @change="handleCilone(goodsList[index])" :max=item.stock size="mini" :min="1">
|
||||
</el-input-number>
|
||||
</div>
|
||||
<div class="orerate_name">
|
||||
<span style="color: red;cursor: pointer" @click="deleteGoods(item.id)">删除</span>
|
||||
</div>
|
||||
@ -807,6 +810,8 @@ export default {
|
||||
this.sendCoupon.mtUserId = this.chooseVipUser.id
|
||||
this.sendCoupon.fromType = "4"
|
||||
this.sendCoupon.cardCouponId = this.sendCoupon.id
|
||||
//优惠卷 初始化状态应该是未使用
|
||||
this.sendCoupon.status=null
|
||||
sendCouponFun(this.sendCoupon).then(
|
||||
res=>{
|
||||
this.$message.success("赠送成功")
|
||||
@ -814,8 +819,22 @@ export default {
|
||||
}
|
||||
)
|
||||
},
|
||||
handleCilone(value){
|
||||
console.log(value)
|
||||
handleCilone(obj){
|
||||
// 强制组件重新渲染 elementui 组件都是通过监听数据来重新渲染 数据层级太深了 需要手动强刷
|
||||
this.$forceUpdate();
|
||||
|
||||
this.goodsList = this.goodsList.map(
|
||||
item => {
|
||||
if (item.id == obj.id) {
|
||||
return { ...item, num: obj.num }
|
||||
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取优惠总金额
|
||||
@ -835,6 +854,7 @@ export default {
|
||||
* */
|
||||
handleChangeAct(value){
|
||||
this.chooseAct = this.activityList.filter(item=>item.id === value)[0]
|
||||
console.log("选中的活动",this.chooseAct);
|
||||
if(""!=this.chooseCouponId){
|
||||
//判断已选择的优惠券是否可以与其他活动共用
|
||||
if("0"==this.chooseCoupon.useWithOther){
|
||||
@ -851,6 +871,7 @@ export default {
|
||||
* */
|
||||
handleChangeCoupon(value){
|
||||
this.chooseCoupon = this.couponList.filter(item=>item.id === value)[0]
|
||||
console.log("选中的优惠券",this.chooseCoupon)
|
||||
if("0"==this.chooseCoupon.useWithOther){
|
||||
//本优惠券不能与其他活动一起用
|
||||
this.chooseAct = {}
|
||||
@ -1109,7 +1130,6 @@ export default {
|
||||
},
|
||||
// 立即结算
|
||||
async settlement(){
|
||||
|
||||
// 油品单价
|
||||
// 油号id
|
||||
// 油枪id
|
||||
@ -1136,42 +1156,37 @@ export default {
|
||||
this.payForm.oilActualPay = this.oilGunClearing.amount
|
||||
//商品实付金额
|
||||
this.payForm.goodsActualPay = this.getGoodsNum
|
||||
//找零金额
|
||||
|
||||
//油枪id
|
||||
this.payForm.oilGunId = this.oilGunClearing.id
|
||||
//活动营销优惠金额
|
||||
this.payForm.activeAmount = null
|
||||
this.payForm.activeAmount = this.chooseAct.disAmount
|
||||
//优惠卷类型
|
||||
this.payForm.couponType = null
|
||||
this.payForm.couponType = this.chooseCoupon.type
|
||||
//付款用户
|
||||
this.payForm.payUser = this.chooseVipUser
|
||||
//油品优惠金额
|
||||
this.payForm.oilDiscount = null;
|
||||
//商品优惠金额
|
||||
this.payForm.goodsDiscount = null;
|
||||
//员工id
|
||||
this.payForm.staffId = null;
|
||||
// //员工id
|
||||
// this.payForm.staffId = this.$store.getters.userId;
|
||||
//会员消费金额 (储值卡需要减少的金额)
|
||||
this.payForm.consumeAmount = null;
|
||||
this.payForm.consumeAmount = this.realAmount;
|
||||
//会员id
|
||||
this.payForm.userId = this.chooseVipUser.id
|
||||
//使用积分数量
|
||||
this.payForm.usePoint = null;
|
||||
//积分金额
|
||||
this.payForm.pointAmount = null;
|
||||
//终端 默认传PC
|
||||
this.payForm.terminal = "PC"
|
||||
//商品 ids
|
||||
// 将集合内 所有id 拼接 , 隔开 this.goodsList
|
||||
this.payForm.goodsIds = this.goodsList.map(item=>item.id).join(",")
|
||||
//购买商品的总数量
|
||||
this.payForm.goodsNum = this.getGoodsListNum()
|
||||
//购买商品的总数量 计算属性
|
||||
this.payForm.goodsNum = this.getGoodsListNum
|
||||
//油品 + 商品 的实付总额
|
||||
this.payForm.allAmount = null
|
||||
this.payForm.allAmount = this.realAmount
|
||||
//支付码 如果是现金 传现金 金额
|
||||
this.authCode=null
|
||||
|
||||
if (this.payForm.payType == "CASH"){
|
||||
this.authCode= this.realAmount
|
||||
}
|
||||
|
||||
this.payForm.realyPayBills = this.realAmount
|
||||
this.flag = 3
|
||||
@ -1286,6 +1301,7 @@ export default {
|
||||
//选择会员
|
||||
this.userInfo = true
|
||||
this.chooseVipUser = data
|
||||
console.log('会员',this.chooseVipUser)
|
||||
//选择会员,查询可用优惠活动和优惠券
|
||||
this.getActivity()
|
||||
this.getCoupon()
|
||||
|
@ -64,7 +64,9 @@ export default {
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
// alert('submit!')
|
||||
|
||||
console.log(`ruleForm.amount 的类型是:`, typeof this.ruleForm.amount);
|
||||
|
||||
this.$emit('fatherMethod', this.ruleForm.amount.toFixed(2))
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
@ -95,7 +97,7 @@ export default {
|
||||
<div>{{ goodsItem.oilPrice }}元/L</div>
|
||||
</div>
|
||||
<el-form-item prop="amount" label="" class="item10086">
|
||||
<el-input v-model="ruleForm.amount" placeholder="请输入加油金额">
|
||||
<el-input v-model.number="ruleForm.amount" placeholder="请输入加油金额" >
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
Loading…
Reference in New Issue
Block a user