|
|
@@ -167,19 +167,18 @@ export default {
|
|
|
post("goods/goodsDetail", da).then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
this.goodsInfo = res.data.data;
|
|
|
- this.obligation = res.data.data.pickerPrice.price;
|
|
|
post("goods/freight", { type: da.type }).then((res) => {
|
|
|
if (res.code === 0) this.freight = res.data.freight;
|
|
|
|
|
|
// 计算待支付
|
|
|
- // let p = this.Data.type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
|
|
|
- // let y = (this.Data.is_sell == 1 || this.Data.prom_type == 1) ? 0 : this.freight; // 运费 寄售的话退运费为0
|
|
|
- // // let a = p * this.Data.num + y * this.Data.num; //商品总价
|
|
|
- // // let b = a - this.userinfo.user_money; //待支付金额
|
|
|
- // let a = this.$h.Mul(p,this.Data.num) + this.$h.Mul(y,this.Data.num); //商品总价
|
|
|
- // let b = this.$h.Sub(a,this.userinfo.user_money); //待支付金额
|
|
|
- // if (["4", "5", "6"].includes(this.Data.type)) this.obligation = a;
|
|
|
- // else this.obligation = b > 0 ? b : 0;
|
|
|
+ let p = this.Data.type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
|
|
|
+ let y = (this.Data.is_sell == 1 || this.Data.prom_type == 1) ? 0 : this.freight; // 运费 寄售的话退运费为0
|
|
|
+ // let a = p * this.Data.num + y * this.Data.num; //商品总价
|
|
|
+ // let b = a - this.userinfo.user_money; //待支付金额
|
|
|
+ let a = this.$h.Mul(p,this.Data.num) + this.$h.Mul(y,this.Data.num); //商品总价
|
|
|
+ let b = this.$h.Sub(a,this.userinfo.user_money); //待支付金额
|
|
|
+ if (["4", "5", "6"].includes(this.Data.type)) this.obligation = a;
|
|
|
+ else this.obligation = b > 0 ? b : 0;
|
|
|
});
|
|
|
}
|
|
|
});
|