master
wangxinglong 2022-03-28 20:07:17 +08:00
parent 95ff287fb3
commit 4a83c39831
2 changed files with 28 additions and 9 deletions

View File

@ -60,12 +60,22 @@
$("#price").text(0);
return false;
}
if (agency < consumer) {
if(agency>0 || consumer>0){
if (agency < consumer) {
$("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency)));
}else{
$("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer)));
}
}else if(agency>0){
$("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency)));
}else{
}
else if(consumer>0){
$("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer)));
}
else{
$("#price").text(0);
}
}
jsPrice();
</script>

View File

@ -18,7 +18,7 @@
<div class="layui-form-itemBox2 between-center">
<div class="layui-form-item">
<label class="layui-form-label">(领券)分销者占比(%)</label>
<label class="layui-form-label">分销者占比(%)</label>
<div class="layui-input-block">
<input class="layui-input" type="number" id="distribution" onblur="jsPrice()" name="distribution" value="{$item.distribution ?? 0}"/>
</div>
@ -27,7 +27,7 @@
<div class="layui-form-itemBox2 between-center">
<div class="layui-form-item">
<label class="layui-form-label">(销)分销者占比(%)</label>
<label class="layui-form-label">核销者占比(%)</label>
<div class="layui-input-block">
<input class="layui-input" type="number" id="distributed" onblur="jsPrice()" name="distributed" value="{$item.distributed ?? 0}"/>
</div>
@ -58,12 +58,21 @@
$("#price").text(0);
return false;
}
if (distributed < distribution) {
$("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed)));
}else{
if(distribution>0 || distributed>0){
if (distribution < distributed) {
$("#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();
</script>