|
@@ -94,7 +94,7 @@
|
|
|
<label>订单备注</label>
|
|
|
<input style="font-size: 12px" type="text" placeholder="(选填:特殊要求,可以在此备注)" id="textarea">
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</li>
|
|
|
<li class="mui-table-view-cell" style="padding: 0;margin: 0;display: none;">
|
|
|
<div class="mui-input-group">
|
|
@@ -191,7 +191,7 @@
|
|
|
var exchangeColorId='';
|
|
|
var t1=0,t2=0,all_t=0;
|
|
|
var user38Interests=2;
|
|
|
- var isSpell=getParam('isSpell');
|
|
|
+ var isSpell=2; //不能拼单
|
|
|
var orderId=getParam('orderId');
|
|
|
var isSpellstr='';
|
|
|
var productId='';
|
|
@@ -382,23 +382,23 @@
|
|
|
for(let i = 0; i < dt.data.cartItems.length; i++) {
|
|
|
pro_all_count+=dt.data.cartItems[i].cartNum;
|
|
|
// 购物车小计,分--元
|
|
|
- let total = dt.data.cartItems[i].cartNum * dt.data.cartItems[i].productPrice / 100;
|
|
|
+ let total = dt.data.cartItems[i].cartNum * dt.data.cartItems[i].productDiscount / 100;
|
|
|
let pro_color = switchcolor(dt.data.cartItems[i].cartColorId);
|
|
|
let colorImg = switchColorImg(dt.data.cartItems[i].cartColorId);
|
|
|
let cartProductId = dt.data.cartItems[i].cartProductId;
|
|
|
let colorId=dt.data.cartItems[i].cartColorId;
|
|
|
- let productPrice = dt.data.cartItems[i].productPrice;
|
|
|
+ let productDiscount = dt.data.cartItems[i].productDiscount;
|
|
|
if(isSpell==1){
|
|
|
total = dt.data.cartItems[i].cartNum * dt.data.cartItems[i].colorSpellAmount / 100;
|
|
|
if(this.productIsSpell==2){
|
|
|
- productPrice=dt.data.cartItems[i].colorSpellAmount;
|
|
|
+ productDiscount=dt.data.cartItems[i].colorSpellAmount;
|
|
|
}else{
|
|
|
- productPrice=dt.data.cartItems[i].productPrice;
|
|
|
+ productDiscount=dt.data.cartItems[i].productDiscount;
|
|
|
}
|
|
|
}
|
|
|
total = total.toFixed(2); // 保留两位小数
|
|
|
let num = dt.data.cartItems[i].cartNum;
|
|
|
- if (dt.data.cartItems[i].productPrice / 100 == 3280) {
|
|
|
+ if (dt.data.cartItems[i].productDiscount / 100 == 3280) {
|
|
|
liNote = liNote +
|
|
|
"<li class='mui-table-view-cell mui-media'>" +
|
|
|
"<a>" +
|
|
@@ -407,7 +407,7 @@
|
|
|
"<div class='wt-space gwc_tit'>" + dt.data.cartItems[i].productName + "</div>" +
|
|
|
"<div><small class='mui-h6'>" + dt.data.cartItems[i].productColor + " x "+dt.data.cartItems[i].cartNum+"</small></div>"+
|
|
|
"</div>" +
|
|
|
- "<div class='price_sp cl-gwc' id='product-" + cartProductId + "' price='" + productPrice + "'>¥" + total + "</div>"+
|
|
|
+ "<div class='price_sp cl-gwc' id='product-" + cartProductId + "' price='" + productDiscount + "'>¥" + total + "</div>"+
|
|
|
"</a>" +
|
|
|
"</li>";
|
|
|
cNum = cNum + num ;
|
|
@@ -421,7 +421,7 @@
|
|
|
"<div class='wt-space gwc_tit'>" + dt.data.cartItems[i].productName + "</div>" +
|
|
|
"<div><small class='mui-h6'>" + dt.data.cartItems[i].productColor + " x "+dt.data.cartItems[i].cartNum+"</small></div>"+
|
|
|
"</div>" +
|
|
|
- "<div class='price_sp cl-gwc' id='product-" + cartProductId + "' price='" + productPrice + "'>¥" + total + "</div>"+
|
|
|
+ "<div class='price_sp cl-gwc' id='product-" + cartProductId + "' price='" + productDiscount + "'>¥" + total + "</div>"+
|
|
|
"</a>" +
|
|
|
"</li>";
|
|
|
}
|
|
@@ -499,25 +499,25 @@
|
|
|
} else {
|
|
|
if(yhq_type == 1) {
|
|
|
|
|
|
- if(accDiv(payTotal, 100)>=enough){
|
|
|
- if(yhq_val > usePayMoney) {
|
|
|
- yhq_check.removeAttr("checked");
|
|
|
- yhq_val = 0;
|
|
|
- mui.alert(' ', '当前优惠券不可用', function() {});
|
|
|
- }
|
|
|
- $("#yhq_name").html(yhq_check.prev().html());
|
|
|
- $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
|
|
|
- $("#accSub,#accSub>div:first-child").show();
|
|
|
- console.log(usePayMoney)
|
|
|
- $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
|
|
|
- $(".dhq-last-add").hide();
|
|
|
- exchangeColorId='';
|
|
|
- }else{
|
|
|
- yhq_check.removeAttr("checked");
|
|
|
- yhq_val = 0;
|
|
|
- mui.alert(' ', '当前商品金额不满足使用条件', function() {});
|
|
|
- }
|
|
|
- }else if(yhq_type == 3){
|
|
|
+ if(accDiv(payTotal, 100)>=enough){
|
|
|
+ if(yhq_val > usePayMoney) {
|
|
|
+ yhq_check.removeAttr("checked");
|
|
|
+ yhq_val = 0;
|
|
|
+ mui.alert(' ', '当前优惠券不可用', function() {});
|
|
|
+ }
|
|
|
+ $("#yhq_name").html(yhq_check.prev().html());
|
|
|
+ $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
|
|
|
+ $("#accSub,#accSub>div:first-child").show();
|
|
|
+ console.log(usePayMoney)
|
|
|
+ $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
|
|
|
+ $(".dhq-last-add").hide();
|
|
|
+ exchangeColorId='';
|
|
|
+ }else{
|
|
|
+ yhq_check.removeAttr("checked");
|
|
|
+ yhq_val = 0;
|
|
|
+ mui.alert(' ', '当前商品金额不满足使用条件', function() {});
|
|
|
+ }
|
|
|
+ }else if(yhq_type == 3){
|
|
|
if(yhq_val > (usePayMoney - ipt_balance)) {
|
|
|
yhq_check.removeAttr("checked");
|
|
|
yhq_val = 0;
|
|
@@ -548,14 +548,14 @@
|
|
|
$("#user-pay-money-span").html(usePayMoney);
|
|
|
}
|
|
|
}else {
|
|
|
- yhq_val = accSub(usePayMoney, Math.floor(accMul(yhq_check.val(), usePayMoney) * 100) / 100);
|
|
|
- $("#yhq_name").html(yhq_check.prev().html());
|
|
|
- $("#yhq_price").html("- ¥"+yhq_val);
|
|
|
- $("#accSub,#accSub>div:first-child").show();
|
|
|
- $(".dhq-last-add").hide();
|
|
|
- $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
|
|
|
- exchangeColorId='';
|
|
|
- }
|
|
|
+ yhq_val = accSub(usePayMoney, Math.floor(accMul(yhq_check.val(), usePayMoney) * 100) / 100);
|
|
|
+ $("#yhq_name").html(yhq_check.prev().html());
|
|
|
+ $("#yhq_price").html("- ¥"+yhq_val);
|
|
|
+ $("#accSub,#accSub>div:first-child").show();
|
|
|
+ $(".dhq-last-add").hide();
|
|
|
+ $("#user-pay-money-span").html((usePayMoney - yhq_val - ipt_balance).toFixed(2));
|
|
|
+ exchangeColorId='';
|
|
|
+ }
|
|
|
}
|
|
|
$("#pro-count").text(pro_all_count);//总件数
|
|
|
} else {
|
|
@@ -794,17 +794,17 @@
|
|
|
} else {
|
|
|
if(yhq_type == 1) {
|
|
|
if(accDiv(payTotal, 100)>=enough){
|
|
|
- if(yhq_val > usePayMoney) {
|
|
|
- yhq_check.removeAttr("checked");
|
|
|
- yhq_val = 0;
|
|
|
- mui.alert(' ', '当前优惠券不可用', function() {});
|
|
|
- }
|
|
|
- $("#yhq_name").html(yhq_check.prev().html());
|
|
|
- $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
|
|
|
- $("#accSub,#accSub>div:first-child").show();
|
|
|
- $("#user-pay-money-span").html((accDiv(payTotal, 100) -yhq_val- ipt_balance).toFixed(2));
|
|
|
- $(".dhq-last-add").hide();
|
|
|
- exchangeColorId='';
|
|
|
+ if(yhq_val > usePayMoney) {
|
|
|
+ yhq_check.removeAttr("checked");
|
|
|
+ yhq_val = 0;
|
|
|
+ mui.alert(' ', '当前优惠券不可用', function() {});
|
|
|
+ }
|
|
|
+ $("#yhq_name").html(yhq_check.prev().html());
|
|
|
+ $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
|
|
|
+ $("#accSub,#accSub>div:first-child").show();
|
|
|
+ $("#user-pay-money-span").html((accDiv(payTotal, 100) -yhq_val- ipt_balance).toFixed(2));
|
|
|
+ $(".dhq-last-add").hide();
|
|
|
+ exchangeColorId='';
|
|
|
}else{
|
|
|
yhq_check.removeAttr("checked");
|
|
|
yhq_val = 0;
|
|
@@ -812,26 +812,26 @@
|
|
|
}
|
|
|
}else if(yhq_type == 3){
|
|
|
if(yhq_id==10000){
|
|
|
- if(yhq_val > (usePayMoney - ipt_balance)) {
|
|
|
- $("input[couponid=10000]:checked").removeAttr("checked");
|
|
|
- yhq_val = 0;
|
|
|
- mui.alert(' ', '当前优惠券不可用', function() {});
|
|
|
- }
|
|
|
- $("#yhq_name").html($("input[couponid=10000]:checked").prev().html());
|
|
|
- $("#yhq_price").html("免费兑换1支T1或T2滤芯");
|
|
|
- $("#accSub,#accSub>div:first-child").show();
|
|
|
- $(".dhq-last-add").show();
|
|
|
- console.log(yhq_val)
|
|
|
- if($(".dhq-last-add").length>0){
|
|
|
- yhq_val = 0;
|
|
|
- }
|
|
|
- }else if(yhq_id==10001){
|
|
|
- $("#yhq_name").html(yhq_check.prev().html());
|
|
|
- $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
|
|
|
- $("#accSub,#accSub>div:first-child").show();
|
|
|
- $(".dhq-last-add").hide();
|
|
|
- exchangeColorId='';
|
|
|
- }
|
|
|
+ if(yhq_val > (usePayMoney - ipt_balance)) {
|
|
|
+ $("input[couponid=10000]:checked").removeAttr("checked");
|
|
|
+ yhq_val = 0;
|
|
|
+ mui.alert(' ', '当前优惠券不可用', function() {});
|
|
|
+ }
|
|
|
+ $("#yhq_name").html($("input[couponid=10000]:checked").prev().html());
|
|
|
+ $("#yhq_price").html("免费兑换1支T1或T2滤芯");
|
|
|
+ $("#accSub,#accSub>div:first-child").show();
|
|
|
+ $(".dhq-last-add").show();
|
|
|
+ console.log(yhq_val)
|
|
|
+ if($(".dhq-last-add").length>0){
|
|
|
+ yhq_val = 0;
|
|
|
+ }
|
|
|
+ }else if(yhq_id==10001){
|
|
|
+ $("#yhq_name").html(yhq_check.prev().html());
|
|
|
+ $("#yhq_price").html("- ¥"+parseInt(yhq_val).toFixed(2));
|
|
|
+ $("#accSub,#accSub>div:first-child").show();
|
|
|
+ $(".dhq-last-add").hide();
|
|
|
+ exchangeColorId='';
|
|
|
+ }
|
|
|
//$("#user-pay-money-span").html((usePayMoney -yhq_val- ipt_balance).toFixed(2));
|
|
|
} else {
|
|
|
yhq_val = accSub(usePayMoney, Math.floor(accMul(yhq_check.val(), usePayMoney) * 100) / 100);
|