935090232@qq.com
2022-02-18 e0437d0452badd411685ef7c6c846f5721fd2f7c
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -218,6 +218,7 @@
         userList: [],
         treeSelect : [],
         payMoneys : [],
         order:{},
         printPaper : false,
      },
      created : function() {
@@ -253,7 +254,7 @@
                        goodsCash: 0,
                        achieveType : _this.achieveTypeList[0].value,
                        commission : 0,
                        isShare: false,
                        isShare: false
                     });
                  }
               });
@@ -309,6 +310,7 @@
                  goodsCash: achieve.goodsCash,
                  achieveType: achieve.achieveType,
                  projPercentage: achieve.commission,
                  payMethod:"现金",
               };
               achaeveList.push(achieveNew);
            })
@@ -323,8 +325,19 @@
                  data: _this.cardInfo,
                  url: url,
                  callback: function (data) {
                     _this.order.id = data.mapInfo.orderId;
                     if (_this.printPaper) {
                        _this.$message.success(data.info);
                        _this.print();
                     } else {
                        _this.$message.success({
                           message : data.info,
                           duration : 1000,
                           onClose() {
                              _this.closeFrame();
                           }
                        });
                     }
                     if(parent.myGrid) {
@@ -335,7 +348,7 @@
                        parent.app.vipInfoFn();
                     }
                     _this.closeFrame();
                     // _this.closeFrame();
                  }
               });
            }
@@ -351,9 +364,9 @@
                  title: "打印订单",
                  area: ['250px', '550px'],
                  maxmin: true,
                  content: [basePath + '/admin/redirect/hive/beautySalon/print-order?id=' + this.order.id],
                  content: [basePath + '/admin/order/printOrder?id=' + this.order.id],
                  cancel: function (index, layero) {
                     _this.closeFram();
                     _this.closeFrame();
                  }
               });
            } else {
@@ -435,8 +448,11 @@
            let _this = this;
            let jsqMap={};
            let isOk=true;
            console.log(this.achieveList);
            let rechargeMoney=parseFloat(_this.rechargeMoney);
            for(let i=0 ; i< this.achieveList.length; i++){
               let achieve=this.achieveList[i];
               if(!isNaN(achieve.goodsCash)  ){
                  key=achieve.achieveType;
                  if(!jsqMap[key]){
@@ -444,17 +460,21 @@
                  }else{
                     jsqMap[key]=jsqMap[key]+parseFloat(achieve.goodsCash);
                  }
                  if(jsqMap[key]>_this.rechargeMoney) {
                     this.$message.error("业绩分配金额大于支付金额");
                     isOk = false;
                     return;
                  }
               }else{
                  this.$message.error("业绩分配金额请填写数字");
                  isOk=false;
                  return;
               }
            };
            for(money in jsqMap ){
               if(money > rechargeMoney) {
                  this.$message.error("业绩分配金额大于支付金额");
                  isOk = false;
                  return;
               }
            }
            console.log("isOk",isOk);
            return isOk;
         },