| | |
| | | contactPhone: [ |
| | | { |
| | | required: true, |
| | | message: "", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete1(row) { |
| | | // console.log(row); |
| | | let data = { |
| | | cusCardId: row.cusId, |
| | | proId: row.parentProId, |
| | |
| | | .catch(() => {}); |
| | | }, |
| | | handleManualChange(row) { |
| | | console.log("这是主动出发的"); |
| | | this.updateProPrice(row); |
| | | }, |
| | | validateDiscount(row) { |
| | |
| | | (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10; |
| | | }, |
| | | updateProPrice1(row) { |
| | | console.log("进入了1"); |
| | | const ordPrice = new Big(row.ordPrice); |
| | | const discount = new Big(row.discount); |
| | | const result = ordPrice.times(discount.div(10)); |
| | |
| | | const newYsPrice = new Big(lastItem.nowPrice) |
| | | .plus(diff) |
| | | .toNumber(); |
| | | console.log( |
| | | "hhh", |
| | | this.tableData1[this.tableData1.length - 1].nowPrice, |
| | | newYsPrice |
| | | ); |
| | | // console.log( |
| | | // "hhh", |
| | | // this.tableData1[this.tableData1.length - 1].nowPrice, |
| | | // newYsPrice |
| | | // ); |
| | | this.$set( |
| | | this.tableData1[this.tableData1.length - 1], |
| | | "nowPrice", |
| | |
| | | /** 登记提交按钮 */ |
| | | submitForm() { |
| | | let _this = this; |
| | | this.$refs["form"].validate((valid) => { |
| | | if(!this.form.cusPhone || !this.form.cusName){ |
| | | this.$message.warning("请填写必填项"); |
| | | }else{ |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | // 创建表单数据的副本并去除空格 |
| | | const formData = { ...this.form }; |
| | |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | |
| | | getmailType() { |
| | |
| | | |
| | | Package() { |
| | | this.activeNames = "first"; |
| | | if (this.form.cusSex == "男") { |
| | | this.form.cusSex = 0; |
| | | } else if (this.form.cusSex == "女"){ |
| | | _this.form.cusSex = 1; |
| | | } |
| | | let cusSex = this.form.cusSex; |
| | | this.datekey = Date.now(); |
| | | //全部套餐 |
| | |
| | | Price += item.nowPrice || 0; // 累加实收金额 |
| | | this.TotalPrice = Price.toFixed(2); |
| | | }); |
| | | console.log(this.TotalPrice1, this.TotalPrice); |
| | | // 计算折扣 |
| | | this.discount = |
| | | this.TotalPrice1 > 0 |
| | |
| | | }, |
| | | |
| | | listgetOrder(data) { |
| | | const loading = this.$loading({ |
| | | lock: true, |
| | | text: '正在加载中,请稍等!', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }); |
| | | getOrder(data).then((res) => { |
| | | loading.close(); |
| | | this.$modal.msgSuccess("提交成功"); |
| | | //调接口显示导检单 |
| | | const tjNumber = res.msg; |