This commit is contained in:
zhaohengkun 2024-10-11 17:17:09 +08:00
parent 920f67828c
commit ac483aee69
2 changed files with 42 additions and 24 deletions

View File

@ -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 }}&nbsp;{{ 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()

View File

@ -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>