setter
parent
95ff287fb3
commit
4a83c39831
|
@ -60,12 +60,22 @@
|
||||||
$("#price").text(0);
|
$("#price").text(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(agency>0 || consumer>0){
|
||||||
if (agency < consumer) {
|
if (agency < consumer) {
|
||||||
|
|
||||||
$("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency)));
|
$("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency)));
|
||||||
}else{
|
}else{
|
||||||
$("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer)));
|
$("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer)));
|
||||||
}
|
}
|
||||||
|
}else if(agency>0){
|
||||||
|
$("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency)));
|
||||||
|
}
|
||||||
|
else if(consumer>0){
|
||||||
|
$("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer)));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$("#price").text(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
jsPrice();
|
jsPrice();
|
||||||
</script>
|
</script>
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="layui-form-itemBox2 between-center">
|
<div class="layui-form-itemBox2 between-center">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">(领券)分销者占比(%)</label>
|
<label class="layui-form-label">分销者占比(%)</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input class="layui-input" type="number" id="distribution" onblur="jsPrice()" name="distribution" value="{$item.distribution ?? 0}"/>
|
<input class="layui-input" type="number" id="distribution" onblur="jsPrice()" name="distribution" value="{$item.distribution ?? 0}"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<div class="layui-form-itemBox2 between-center">
|
<div class="layui-form-itemBox2 between-center">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">(核销)分销者占比(%)</label>
|
<label class="layui-form-label">核销者占比(%)</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input class="layui-input" type="number" id="distributed" onblur="jsPrice()" name="distributed" value="{$item.distributed ?? 0}"/>
|
<input class="layui-input" type="number" id="distributed" onblur="jsPrice()" name="distributed" value="{$item.distributed ?? 0}"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,11 +58,20 @@
|
||||||
$("#price").text(0);
|
$("#price").text(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (distributed < distribution) {
|
if(distribution>0 || distributed>0){
|
||||||
|
if (distribution < distributed) {
|
||||||
$("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed)));
|
|
||||||
}else{
|
|
||||||
$("#price").text( {$minPrice}+"*"+"(100/"+distribution+")" +"="+({$minPrice}*(100/distribution)));
|
$("#price").text( {$minPrice}+"*"+"(100/"+distribution+")" +"="+({$minPrice}*(100/distribution)));
|
||||||
|
}else{
|
||||||
|
$("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed)));
|
||||||
|
}
|
||||||
|
}else if(distribution>0){
|
||||||
|
$("#price").text( {$minPrice}+"*"+"(100/"+distribution+")" +"="+({$minPrice}*(100/distribution)));
|
||||||
|
}
|
||||||
|
else if(distributed>0){
|
||||||
|
$("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed)));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$("#price").text(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jsPrice();
|
jsPrice();
|
||||||
|
|
Loading…
Reference in New Issue