diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue
index c0313d618..3accd5d94 100644
--- a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue
+++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue
@@ -10,7 +10,7 @@
{{chooseVipUser.name||'匿名'}}
{{chooseVipUser.mobile}}
-
普通会员
+
{{chooseVipUser.gradeName}}
@@ -145,7 +145,7 @@
{{ item.gunName }}
![]()
-
{{ item.oilName }} {{ item.oilType + '罐' }}
+
{{ item.tankName }}
@@ -207,7 +207,10 @@
{{ item.stock }}
{{ item.retailPrice }}
{{ item.retailPrice }}
-
+
+
+
+
删除
@@ -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()
diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/refuelingAmount.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/refuelingAmount.vue
index 6242010e5..4e7d71698 100644
--- a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/refuelingAmount.vue
+++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/refuelingAmount.vue
@@ -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 {
{{ goodsItem.oilPrice }}元/L
-
+
元