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 style="font-weight: bold;margin-bottom: 2px">{{chooseVipUser.name||'匿名'}}</div>
<div class="d-s"> <div class="d-s">
<span>{{chooseVipUser.mobile}}</span> <span>{{chooseVipUser.mobile}}</span>
<sapn style="margin: 0px 5px">普通会员</sapn> <span style="margin: 0px 5px">{{chooseVipUser.gradeName}}</span>
<el-popover <el-popover
placement="bottom" placement="bottom"
trigger="hover"> trigger="hover">
@ -145,7 +145,7 @@
<div class="card-title">{{ item.gunName }}</div> <div class="card-title">{{ item.gunName }}</div>
<div class="c-b-d"> <div class="c-b-d">
<img :src=item.img style="width: 16px;height: 16px"> <img :src=item.img style="width: 16px;height: 16px">
<div>{{ item.oilName }}&nbsp;{{ item.oilType + '罐' }}</div> <div>{{ item.tankName }}</div>
</div> </div>
</div> </div>
@ -207,7 +207,10 @@
<div class="stock_name">{{ item.stock }}</div> <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="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"> <div class="orerate_name">
<span style="color: red;cursor: pointer" @click="deleteGoods(item.id)">删除</span> <span style="color: red;cursor: pointer" @click="deleteGoods(item.id)">删除</span>
</div> </div>
@ -807,6 +810,8 @@ export default {
this.sendCoupon.mtUserId = this.chooseVipUser.id this.sendCoupon.mtUserId = this.chooseVipUser.id
this.sendCoupon.fromType = "4" this.sendCoupon.fromType = "4"
this.sendCoupon.cardCouponId = this.sendCoupon.id this.sendCoupon.cardCouponId = this.sendCoupon.id
// 使
this.sendCoupon.status=null
sendCouponFun(this.sendCoupon).then( sendCouponFun(this.sendCoupon).then(
res=>{ res=>{
this.$message.success("赠送成功") this.$message.success("赠送成功")
@ -814,8 +819,22 @@ export default {
} }
) )
}, },
handleCilone(value){ handleCilone(obj){
console.log(value) // 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){ handleChangeAct(value){
this.chooseAct = this.activityList.filter(item=>item.id === value)[0] this.chooseAct = this.activityList.filter(item=>item.id === value)[0]
console.log("选中的活动",this.chooseAct);
if(""!=this.chooseCouponId){ if(""!=this.chooseCouponId){
// //
if("0"==this.chooseCoupon.useWithOther){ if("0"==this.chooseCoupon.useWithOther){
@ -851,6 +871,7 @@ export default {
* */ * */
handleChangeCoupon(value){ handleChangeCoupon(value){
this.chooseCoupon = this.couponList.filter(item=>item.id === value)[0] this.chooseCoupon = this.couponList.filter(item=>item.id === value)[0]
console.log("选中的优惠券",this.chooseCoupon)
if("0"==this.chooseCoupon.useWithOther){ if("0"==this.chooseCoupon.useWithOther){
// //
this.chooseAct = {} this.chooseAct = {}
@ -1109,7 +1130,6 @@ export default {
}, },
// //
async settlement(){ async settlement(){
// //
// id // id
// id // id
@ -1136,42 +1156,37 @@ export default {
this.payForm.oilActualPay = this.oilGunClearing.amount this.payForm.oilActualPay = this.oilGunClearing.amount
// //
this.payForm.goodsActualPay = this.getGoodsNum this.payForm.goodsActualPay = this.getGoodsNum
//
//id //id
this.payForm.oilGunId = this.oilGunClearing.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.payUser = this.chooseVipUser
// //
this.payForm.oilDiscount = null; this.payForm.oilDiscount = null;
// //
this.payForm.goodsDiscount = null; this.payForm.goodsDiscount = null;
//id // //id
this.payForm.staffId = null; // this.payForm.staffId = this.$store.getters.userId;
// () // ()
this.payForm.consumeAmount = null; this.payForm.consumeAmount = this.realAmount;
//id //id
this.payForm.userId = this.chooseVipUser.id this.payForm.userId = this.chooseVipUser.id
//使
this.payForm.usePoint = null;
//
this.payForm.pointAmount = null;
// PC // PC
this.payForm.terminal = "PC" this.payForm.terminal = "PC"
// ids // ids
// id , this.goodsList // id , this.goodsList
this.payForm.goodsIds = this.goodsList.map(item=>item.id).join(",") 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.payForm.realyPayBills = this.realAmount
this.flag = 3 this.flag = 3
@ -1286,6 +1301,7 @@ export default {
// //
this.userInfo = true this.userInfo = true
this.chooseVipUser = data this.chooseVipUser = data
console.log('会员',this.chooseVipUser)
// //
this.getActivity() this.getActivity()
this.getCoupon() this.getCoupon()

View File

@ -64,7 +64,9 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
// alert('submit!')
console.log(`ruleForm.amount 的类型是:`, typeof this.ruleForm.amount);
this.$emit('fatherMethod', this.ruleForm.amount.toFixed(2)) this.$emit('fatherMethod', this.ruleForm.amount.toFixed(2))
} else { } else {
console.log('error submit!!') console.log('error submit!!')
@ -95,7 +97,7 @@ export default {
<div>{{ goodsItem.oilPrice }}/L</div> <div>{{ goodsItem.oilPrice }}/L</div>
</div> </div>
<el-form-item prop="amount" label="" class="item10086"> <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> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>