|  | @@ -15,8 +15,12 @@
 | 
	
		
			
				|  |  |          <p class="p3">{{ data.goods_person_name_desc }}</p>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <div class="price">
 | 
	
		
			
				|  |  | -        <p v-if="data.price">¥{{ data.price }}</p>
 | 
	
		
			
				|  |  | -        <p v-if="data.goods_price">¥{{ data.goods_price }}</p>
 | 
	
		
			
				|  |  | +        <p v-if="data.hasOwnProperty('price')">
 | 
	
		
			
				|  |  | +          ¥<span v-html="changePrice(data.price, 16)"></span>
 | 
	
		
			
				|  |  | +        </p>
 | 
	
		
			
				|  |  | +        <p v-if="data.hasOwnProperty('goods_price')">
 | 
	
		
			
				|  |  | +          ¥<span v-html="changePrice(data.goods_price, 16)"></span>
 | 
	
		
			
				|  |  | +        </p>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div class="promotionCode">
 | 
	
	
		
			
				|  | @@ -36,26 +40,36 @@
 | 
	
		
			
				|  |  |          v-if="isShow"
 | 
	
		
			
				|  |  |          >{{ $t("Key94") }}</span
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  | -      <span class="sp2" v-else>-{{ discount_money }}</span>
 | 
	
		
			
				|  |  | +      <template v-else>
 | 
	
		
			
				|  |  | +        <span class="sp2" v-if="discount_code_status == 1"
 | 
	
		
			
				|  |  | +          >-<span v-html="changePrice(discount_money, 16)"></span
 | 
	
		
			
				|  |  | +        ></span>
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div class="total">
 | 
	
		
			
				|  |  |        <p class="p1">
 | 
	
		
			
				|  |  |          <!-- 一件商品,总金额 -->
 | 
	
		
			
				|  |  |          <span>{{ $t("Key53") }}: </span>
 | 
	
		
			
				|  |  | -        <span class="co-value" v-if="data.price">¥{{ data.price }}</span>
 | 
	
		
			
				|  |  | -        <span class="co-value" v-if="data.goods_price"
 | 
	
		
			
				|  |  | -          >¥{{ data.goods_price }}</span
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | +        <span class="co-value" v-if="data.hasOwnProperty('price')"
 | 
	
		
			
				|  |  | +          >¥<span v-html="changePrice(data.price, 16)"></span
 | 
	
		
			
				|  |  | +        ></span>
 | 
	
		
			
				|  |  | +        <span class="co-value" v-if="data.hasOwnProperty('goods_price')"
 | 
	
		
			
				|  |  | +          >¥<span v-html="changePrice(data.goods_price, 16)"></span
 | 
	
		
			
				|  |  | +        ></span>
 | 
	
		
			
				|  |  |        </p>
 | 
	
		
			
				|  |  |        <p class="p2">
 | 
	
		
			
				|  |  |          <!-- 优惠折扣 -->
 | 
	
		
			
				|  |  |          <span>{{ $t("Key54") }}: </span>
 | 
	
		
			
				|  |  | -        <span class="co-value">-¥{{ discount_money }}</span>
 | 
	
		
			
				|  |  | +        <span class="co-value"
 | 
	
		
			
				|  |  | +          >-¥<span v-html="changePrice(discount_money, 16)"></span
 | 
	
		
			
				|  |  | +        ></span>
 | 
	
		
			
				|  |  |        </p>
 | 
	
		
			
				|  |  |        <p class="p3">
 | 
	
		
			
				|  |  |          <!-- 应付 -->
 | 
	
		
			
				|  |  |          <span>{{ $t("Key55") }}: </span>
 | 
	
		
			
				|  |  | -        <span class="co-value">¥{{ receivables_money }}</span>
 | 
	
		
			
				|  |  | +        <span class="co-value"
 | 
	
		
			
				|  |  | +          >¥<span v-html="changePrice(receivables_money, 24)"></span
 | 
	
		
			
				|  |  | +        ></span>
 | 
	
		
			
				|  |  |        </p>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div class="submitBtn">
 | 
	
	
		
			
				|  | @@ -74,8 +88,9 @@ export default {
 | 
	
		
			
				|  |  |      //这里存放数据
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        discount_code: "", //优惠码
 | 
	
		
			
				|  |  | -      discount_money: "0.00", // 优惠金额
 | 
	
		
			
				|  |  | +      discount_money: 0, // 优惠金额
 | 
	
		
			
				|  |  |        receivables_money: "", // 应收款
 | 
	
		
			
				|  |  | +      discount_code_status: 0, //优惠码状态
 | 
	
		
			
				|  |  |        back_discount_code: "",
 | 
	
		
			
				|  |  |        isShow: true,
 | 
	
		
			
				|  |  |        loading: false,
 | 
	
	
		
			
				|  | @@ -118,7 +133,7 @@ export default {
 | 
	
		
			
				|  |  |      //更改优惠码
 | 
	
		
			
				|  |  |      changeCode() {
 | 
	
		
			
				|  |  |        this.isShow = true;
 | 
	
		
			
				|  |  | -      this.discount_money = "0.00";
 | 
	
		
			
				|  |  | +      this.discount_money = 0;
 | 
	
		
			
				|  |  |        this.receivables_money = this.data.hasOwnProperty("price")
 | 
	
		
			
				|  |  |          ? this.data.price
 | 
	
		
			
				|  |  |          : this.data.goods_price;
 | 
	
	
		
			
				|  | @@ -126,7 +141,7 @@ export default {
 | 
	
		
			
				|  |  |      clearData() {
 | 
	
		
			
				|  |  |        this.isShow = true;
 | 
	
		
			
				|  |  |        this.discount_code = "";
 | 
	
		
			
				|  |  | -      this.discount_money = "0.00";
 | 
	
		
			
				|  |  | +      this.discount_money = 0;
 | 
	
		
			
				|  |  |        this.receivables_money = this.data.hasOwnProperty("price")
 | 
	
		
			
				|  |  |          ? this.data.price
 | 
	
		
			
				|  |  |          : this.data.goods_price;
 | 
	
	
		
			
				|  | @@ -155,13 +170,35 @@ export default {
 | 
	
		
			
				|  |  |          discount_code: this.discount_code.trim(),
 | 
	
		
			
				|  |  |        };
 | 
	
		
			
				|  |  |        getLearnWebContent(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | -        this.isShow = false;
 | 
	
		
			
				|  |  |          this.codeloading = false;
 | 
	
		
			
				|  |  | -        this.back_discount_code = res.discount_code;
 | 
	
		
			
				|  |  | -        this.discount_money = res.discount_money; // 优惠金额
 | 
	
		
			
				|  |  | -        this.receivables_money = res.receivables_money; // 应收款
 | 
	
		
			
				|  |  | +        this.discount_code_status = res.discount_code_status;
 | 
	
		
			
				|  |  | +        if (this.discount_code_status != 1 && this.discount_code_status != 2) {
 | 
	
		
			
				|  |  | +          this.$message.warning("优惠码无效");
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          if (this.discount_code_status == 2) {
 | 
	
		
			
				|  |  | +            this.$message.warning("优惠码已被使用");
 | 
	
		
			
				|  |  | +          } else {
 | 
	
		
			
				|  |  | +            this.isShow = false;
 | 
	
		
			
				|  |  | +            this.back_discount_code = res.discount_code;
 | 
	
		
			
				|  |  | +            this.discount_money = res.discount_money; // 优惠金额
 | 
	
		
			
				|  |  | +            this.receivables_money = res.receivables_money; // 应收款
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    changePrice(price, fontSize1, fontSize2) {
 | 
	
		
			
				|  |  | +      price = price ? price : 0;
 | 
	
		
			
				|  |  | +      price = price.toFixed(2);
 | 
	
		
			
				|  |  | +      price = price.toString();
 | 
	
		
			
				|  |  | +      let arr = price.split(".");
 | 
	
		
			
				|  |  | +      let str = `<span style="font-size: ${fontSize1 ? fontSize1 : 16}px;">${
 | 
	
		
			
				|  |  | +        arr[0]
 | 
	
		
			
				|  |  | +      }</span>.<span style="font-size: ${fontSize2 ? fontSize2 : 16}px;">${
 | 
	
		
			
				|  |  | +        arr[1]
 | 
	
		
			
				|  |  | +      }</span>`;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      return str;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    //生命周期 - 创建完成(可以访问当前this实例)
 | 
	
		
			
				|  |  |    created() {},
 |