|
@@ -50,11 +50,11 @@
|
|
|
<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-inline">
|
|
<div class="layui-input-inline">
|
|
|
- <input type="text" name="sallPrice" maxlength="30" id ="sallPrice" lay-verify="sallPrice" autocomplete="off" placeholder="请输入售货价" class="layui-input">
|
|
|
|
|
|
|
+ <input type="number" onblur="value=zhzs(this.value)" name="sallPrice" maxlength="30" id ="sallPrice" lay-verify="sallPrice" autocomplete="off" placeholder="请输入售货价" class="layui-input">
|
|
|
</div>
|
|
</div>
|
|
|
<label class="layui-form-label">*成本价:</label>
|
|
<label class="layui-form-label">*成本价:</label>
|
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
|
- <input type="text" name="costPrice" maxlength="30" id ="costPrice" lay-verify="costPrice" autocomplete="off" placeholder="请输入成本价" class="layui-input">
|
|
|
|
|
|
|
+ <input type="number" onblur="value=zhzs(this.value)" name="costPrice" maxlength="30" id ="costPrice" lay-verify="costPrice" autocomplete="off" placeholder="请输入成本价" class="layui-input">
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -64,14 +64,14 @@
|
|
|
</div>
|
|
</div>
|
|
|
<label class="layui-form-label">促销价:</label>
|
|
<label class="layui-form-label">促销价:</label>
|
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
|
- <input type="text" name="promottonPrice" maxlength="30" id ="promottonPrice" lay-verify="promottonPrice" autocomplete="off" placeholder="请输入促销" class="layui-input">
|
|
|
|
|
|
|
+ <input type="number" onblur="value=zhzs(this.value)" name="promottonPrice" maxlength="30" id ="promottonPrice" lay-verify="promottonPrice" autocomplete="off" placeholder="请输入促销" class="layui-input">
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<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-inline">
|
|
<div class="layui-input-inline">
|
|
|
- <input type="text" name="gamePrice" maxlength="30" id ="gamePrice" lay-verify="gamePrice" autocomplete="off" placeholder="请输入游戏价" class="layui-input">
|
|
|
|
|
|
|
+ <input type="number" onblur="value=zhzs(this.value)" name="gamePrice" maxlength="30" id ="gamePrice" lay-verify="gamePrice" autocomplete="off" placeholder="请输入游戏价" class="layui-input">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="layui-form-item" id = "game" ondblclick="closeGame()">
|
|
<div class="layui-form-item" id = "game" ondblclick="closeGame()">
|
|
@@ -82,6 +82,18 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="layui-form-item" id = "range" style="display: none;">
|
|
|
|
|
+ <div class="layui-inline">
|
|
|
|
|
+ <label class="layui-form-label">中奖范围</label>
|
|
|
|
|
+ <div class="layui-input-inline" style="width: 100px;">
|
|
|
|
|
+ <input type="text" name="price_min" placeholder="¥" autocomplete="off" lay-verify="price_min" class="layui-input" id = "price_min" maxlength="10">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-form-mid">-</div>
|
|
|
|
|
+ <div class="layui-input-inline" style="width: 100px;">
|
|
|
|
|
+ <input type="text" name="price_max" placeholder="¥" autocomplete="off" lay-verify="price_max" class="layui-input" id = "price_max" maxlength="10">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<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" >
|
|
@@ -186,6 +198,29 @@
|
|
|
data.field.isContainImg = "0"
|
|
data.field.isContainImg = "0"
|
|
|
}
|
|
}
|
|
|
data.field.imgUrl = imgUrl; */
|
|
data.field.imgUrl = imgUrl; */
|
|
|
|
|
+ var type = $("select[name='type']").val();
|
|
|
|
|
+ if(type == '02'){
|
|
|
|
|
+ var price_min = $('#price_min').val();
|
|
|
|
|
+ var price_max = $('#price_max').val();
|
|
|
|
|
+ if(isEmpty(price_min)){
|
|
|
|
|
+ layer.msg('中奖范围不能为空',function() {time:2000});
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(isEmpty(price_max)){
|
|
|
|
|
+ layer.msg('中奖范围不能为空',function() {time:2000});
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(isNaN(price_min)){
|
|
|
|
|
+ layer.msg('中奖范围类型错误',function() {time:2000});
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(isNaN(price_max)){
|
|
|
|
|
+ layer.msg('中奖范围类型错误',function() {time:2000});
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ data.field.drawAmount = price_min+'-'+price_max;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$.request({
|
|
$.request({
|
|
|
action : '../../MachineManageAction/addProEquRel',
|
|
action : '../../MachineManageAction/addProEquRel',
|
|
|
data : data.field ,
|
|
data : data.field ,
|
|
@@ -209,11 +244,14 @@
|
|
|
deleteTabPage('201001-03-04');
|
|
deleteTabPage('201001-03-04');
|
|
|
});
|
|
});
|
|
|
form.on('select(type)', function(data){
|
|
form.on('select(type)', function(data){
|
|
|
- if(data.value ==30){
|
|
|
|
|
- $('#luckno').show();
|
|
|
|
|
- }else{
|
|
|
|
|
- $('#luckno').hide();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(data.value == 03){
|
|
|
|
|
+ $('#luckno').show();
|
|
|
|
|
+ }else if(data.value == 02){
|
|
|
|
|
+ $('#range').show();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $('#range').hide();
|
|
|
|
|
+ $('#luckno').hide();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -284,10 +322,46 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- })
|
|
|
|
|
|
|
+ })
|
|
|
initSelect('isPromotton', "IS_PROMOTION", "isPromotton", '', true);
|
|
initSelect('isPromotton', "IS_PROMOTION", "isPromotton", '', true);
|
|
|
initSelect('isFragile', "IS_FRAGILE", "isFragile", '', true);
|
|
initSelect('isFragile', "IS_FRAGILE", "isFragile", '', true);
|
|
|
initSelect('type', 'GAME_EQU_TYPE', 'type', '', true);
|
|
initSelect('type', 'GAME_EQU_TYPE', 'type', '', true);
|
|
|
|
|
+ //(商品售价+促销价)~(商品售价+游戏价)
|
|
|
|
|
+ $("#sallPrice").bind('input propertychange',function(){
|
|
|
|
|
+ zjfwstr();
|
|
|
|
|
+ });
|
|
|
|
|
+ $("#gamePrice").bind('input propertychange',function(){
|
|
|
|
|
+ zjfwstr();
|
|
|
|
|
+ });
|
|
|
|
|
+ $("#promottonPrice").bind('input propertychange',function(){
|
|
|
|
|
+ zjfwstr();
|
|
|
|
|
+ });
|
|
|
|
|
+ function zjfwstr() {
|
|
|
|
|
+ var type = $("select[name='type']").val();
|
|
|
|
|
+ if(type == '02'){
|
|
|
|
|
+ //售价
|
|
|
|
|
+ var sallPrice = parseFloat($('#sallPrice').val()).toFixed(2);; ;
|
|
|
|
|
+ //游戏价
|
|
|
|
|
+ var gamePrice = parseFloat($('#gamePrice').val()).toFixed(2);;
|
|
|
|
|
+ //促销价
|
|
|
|
|
+ var promottonPrice = parseFloat($('#promottonPrice').val()).toFixed(2);;
|
|
|
|
|
+ $('#price_min').val(parseFloat(parseFloat(sallPrice)+ parseFloat(promottonPrice)).toFixed(2) );
|
|
|
|
|
+ $('#price_max').val(parseFloat(parseFloat(sallPrice)+parseFloat(gamePrice)).toFixed(2));
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ /*自定义处理数字*/
|
|
|
|
|
+ function zhzs(value) {
|
|
|
|
|
+ value = value.replace(/^0{1,}/g, '');
|
|
|
|
|
+ if (value != '')
|
|
|
|
|
+ value = parseFloat(value).toFixed(2);
|
|
|
|
|
+ else
|
|
|
|
|
+ value = parseFloat(0).toFixed(2);
|
|
|
|
|
+ return value;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
</body>
|
|
</body>
|
|
|
|
|
|