Pārlūkot izejas kodu

机器设备修改

pangjl 5 gadi atpakaļ
vecāks
revīzija
624efd4271

+ 1 - 0
src/main/resources/com/minpay/db/table/own/mapper/MachineManageMapper.xml

@@ -243,6 +243,7 @@
 	<select id="queryFunction" resultType="hashmap"
 			parameterType="java.util.Map">
 		SELECT
+		ifb.IIF_NAME		'name',
 		ifb.IIF_HTML		'html'
 		FROM im_item_function_branch fb
 		LEFT JOIN im_item_function ifb

+ 104 - 166
src/main/webapp/admin/machineManage/editmachine.html

@@ -57,90 +57,12 @@
                     </div>
                 </div>
             </div>
-            <div class="layui-form-item">
-                <label class="layui-form-label fap-form-item-require" >版本类型:</label>
-                <div class="layui-input-block">
-                    <input type="checkbox" name="versionType" title="直接购买" lay-skin="primary" value = "00" lay-verify="required">
-                    <input type="checkbox" name="versionType" title="幸运购" lay-skin="primary" value = "01" lay-verify="required">
-                    <input type="checkbox" name="versionType" title="游戏购" lay-skin="primary" value = "02" lay-verify="required">
-                    <input type="checkbox" name="versionType" title="10倍" lay-skin="primary" value = "03" lay-verify="required">
-                    <input type="checkbox" name="versionType" title="7件商品" lay-skin="primary" value = "04" lay-verify="required">
-                    <input type="checkbox" name="versionType" title="参与分配(超级菜单)" lay-skin="primary" value = "05" lay-verify="required">
-                </div>
-            </div>
-            <div class="layui-form-item">
-                <label class="layui-form-label fap-form-item fap-form-item-require" >机器类型:</label>
-                <div class="layui-input-block" >
-                    <input type="radio" name="equType" value="00" title="支付盒子售货机" checked="" onclick="one(0)" lay-filter="sss">
-                    <input type="radio" name="equType" value="01" title="支付盒子存货机" onclick="one(1)" lay-filter="sss">
-                    <input type="radio" name="equType" value="02" title="便携式售货机" onclick="one(2)" lay-filter="sss">
-                </div>
-            </div>
-            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
-                <legend style="color: #1b9eff">收款信息</legend>
-            </fieldset>
-            <div class="layui-form-item">
-                <div class="layui-inline">
-                    <label class="layui-form-label">微信公众号:</label>
-                    <div class="layui-input-inline">
-                        <input type="tel" name="wcAccountName" id = "wcAccountName" lay-verify="wcAccountName"  placeholder="请输入微信公众号"autocomplete="off" class="layui-input" onclick="chooseWeChat()">
-                        <input type="hidden" name="wcAccount" id = "wcAccount" lay-verify="wcAccount"  placeholder="请输入微信公众号"autocomplete="off" class="layui-input">
-                    </div>
-                </div>
-                <div class="layui-inline">
-                    <label class="layui-form-label">支付宝账号:</label>
-                    <div class="layui-input-inline">
-                        <input type="tel" name="zfbAccount" id = "zfbAccount" lay-verify="zfbAccount"  placeholder="请输入支付宝账号"autocomplete="off" class="layui-input">
-                    </div>
-                </div>
-            </div>
-            <div class="layui-form-item">
-                <label class="layui-form-label fap-form-item-require" >收款通道:</label>
-                <div class="layui-input-block">
-                    <input type="radio" name="creditChannel" title="富有扫呗" lay-skin="primary" value = "00" lay-verify="required">
-                    <input type="radio" name="creditChannel" title="合利宝" lay-skin="primary" value = "01" lay-verify="required">
-                    <input type="radio" name="creditChannel" title="收钱吧" lay-skin="primary" value = "02" lay-verify="required">
-                </div>
-            </div>
-            <div class="layui-form-item">
-                <div class="layui-inline">
-                    <label class="layui-form-label" style="width: 105px;">手续费:</label>
-                    <div class="layui-input-inline">
-                        <input type="tel" name="charge" id = "charge" lay-verify="charge"  placeholder="请输入手续费"autocomplete="off" class="layui-input">
-                    </div>
-                </div>
-                <div class="layui-inline">
-                    <label class="layui-form-label">收款机构号/收款商户号:</label>
-                    <div class="layui-input-inline">
-                        <input type="tel" name="payeeNoName" id = "payeeNoName" lay-verify="payeeNoName"  placeholder="请输入收款机构号/收款商户号"autocomplete="off" class="layui-input" onclick="checkmchnt()">
-                        <input type="hidden" name="payeeNo" id = "payeeNo" lay-verify="payeeNo"  placeholder="请输入收款机构号/收款商户号"autocomplete="off" class="layui-input">
-                    </div>
-                </div>
-            </div>
+            <div id="banbenleixing"></div>
+            <div id="jiqileixing"></div>
+            <div id="shoukuan"></div>
             <div id="huilv">
             </div>
-            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
-                <legend style="color: #1b9eff">幸运购信息</legend>
-            </fieldset>
-            <div class="layui-form-item">
-                <label class="layui-form-label" style = "width: 120px;">支付金额:</label>
-                <div class="layui-input-inline" id ="payment">
-                </div>
-            </div>
-            <div class="layui-form-item">
-                <label class="layui-form-label fap-form-item fap-form-item-require" style="margin-left: 25px">支付金额类型:</label>
-                <div class="layui-input-block" >
-                    <input type="radio" name="paymentType" value="00" title="随机" checked="" onclick="one(0)" lay-filter="sss">
-                    <input type="radio" name="paymentType" value="01" title="固定" onclick="one(1)" lay-filter="sss">
-                </div>
-            </div>
-            <div class="layui-form-item">
-                <label class="layui-form-label fap-form-item fap-form-item-require" style="margin-left: 25px">是否支持余额:</label>
-                <div class="layui-input-block" >
-                    <input type="radio" name="supportBalance" value="00" title="支持" checked="" onclick="one(0)" lay-filter="sss">
-                    <input type="radio" name="supportBalance" value="01" title="不支持" onclick="one(1)" lay-filter="sss">
-                </div>
-            </div>
+            <div id="xingyungou"></div>
             <div class="layui-form-item box-button" >
             <div class="layui-input-block">
                 <button class="layui-btn" lay-submit="" lay-filter="demo1">提交</button>
@@ -154,6 +76,106 @@
 	    layui.use('form', function(){
 	    	  var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
 	     	 var rowData = layui.sessionData("ROW_DATA").NOW_ROW;
+            $.request({
+                action : '../../MachineManageAction/queryFunction',
+                data : { branchId: rowData.branchid},
+                success : function(data) {
+                    debugger;
+                    if (data.data.length>0){
+                        for (var i =0;i<data.data.length;i++){
+                            if (data.data[i].name =='机器类型'){
+                                $('#jiqileixing').html(data.data[i].html);
+                                var channelCheckbox = $("form").find("input[name='equType']");
+                                // 渠道
+                                if (rowData.equType != null) {
+                                    if (rowData.equType == "00") {
+                                        $(channelCheckbox[00]).attr("checked", true);
+                                    } else if (rowData.equType == "01") {
+                                        $(channelCheckbox[01]).attr("checked", true);
+                                    } else if (rowData.equType == "02"){
+                                        $(channelCheckbox[02]).attr("checked", true);
+                                    }
+                                    form.render();
+                                }
+                            }else if (data.data[i].name =='版本类型'){
+                                $('#banbenleixing').html(data.data[i].html);
+                                var versionCheckbox = $("form").find("input[name='versionType']");
+                                if ( rowData.versionType != null){
+                                    var version = rowData.versionType.split(',')
+                                    for(var i = 0;i<version.length;i++){
+                                        var j = version[i];
+                                        if (j == "00"){
+                                            $(versionCheckbox[00]).attr("checked", true);
+                                        }else if (j == "01"){
+                                            $(versionCheckbox[01]).attr("checked", true);
+                                        }else if (j == "02"){
+                                            $(versionCheckbox[02]).attr("checked", true);
+                                        }else if (j == "03"){
+                                            $(versionCheckbox[03]).attr("checked", true);
+                                        }else if (j == "04"){
+                                            $(versionCheckbox[04]).attr("checked", true);
+                                        }else if (j == "05"){
+                                            $(versionCheckbox[05]).attr("checked", true);
+                                        }else if (j == "06"){
+                                            $(versionCheckbox[06]).attr("checked", true);
+                                        }else {
+                                            $(versionCheckbox[07]).attr("checked", true);
+                                        }
+                                    }
+                                    form.render();
+                                }
+                            }else if (data.data[i].name =='汇率'){
+                                $('#huilv').html(data.data[i].html);
+                                $('#exchangeRate').val(rowData.exchangeRate);
+                            }else if (data.data[i].name =='收款信息'){
+                                $('#shoukuan').html(data.data[i].html);
+                                var creditCheckbox = $("form").find("input[name='creditChannel']");
+                                // 渠道
+                                if (rowData.creditChannel != null) {
+                                    if (rowData.creditChannel == "00") {
+                                        $(creditCheckbox[00]).attr("checked", true);
+                                    } else if (rowData.creditChannel == "01") {
+                                        $(creditCheckbox[01]).attr("checked", true);
+                                    }else if (rowData.creditChannel == "02"){
+                                        $(creditCheckbox[02]).attr("checked", true);
+                                    }
+                                    form.render();
+                                }
+                                $('#charge').val(rowData.charge);
+                                $('#payeeNoName').val(rowData.payeeNoName);
+                                $('#payeeNo').val(rowData.payeeNo);
+                                $('#zfbAccount').val(rowData.zfbAccount);
+                                $('#wcAccount').val(rowData.wcAccount);
+                                $('#wcAccountName').val(rowData.wcAccountName);
+                            }else if (data.data[i].name =='幸运购'){
+                                $('#xingyungou').html(data.data[i].html);
+                                $('#payment').val(rowData.payment);
+                                var paymentCheckbox = $("form").find("input[name='paymentType']");
+                                // 渠道
+                                if (rowData.paymentType != null) {
+                                    if (rowData.paymentType == "00") {
+                                        $(paymentCheckbox[00]).attr("checked", true);
+                                    } else if (rowData.paymentType == "01") {
+                                        $(paymentCheckbox[01]).attr("checked", true);
+                                    }
+                                    form.render();
+                                }
+                                var supportCheckbox = $("form").find("input[name='supportBalance']");
+                                // 渠道
+                                if (rowData.supportBalance != null) {
+                                    if (rowData.supportBalance == "00") {
+                                        $(supportCheckbox[00]).attr("checked", true);
+                                    } else if (rowData.supportBalance == "01") {
+                                        $(supportCheckbox[01]).attr("checked", true);
+                                    }
+                                    form.render();
+                                }
+                            }
+                        }
+                    }
+                    form.render();
+                }
+            });
 	   	    layui.each(rowData, function(index, item){
                 if(index=="payment"){
                     initSelect('payment', "PAYMENT_AMT", "payment", item, true);
@@ -166,90 +188,6 @@
                      deleteTabPage('201001-02');
 	      	    	 //parent.layer.close(parent.layer.index);
             });
-            var channelCheckbox = $("form").find("input[name='equType']");
-            // 渠道
-            if (rowData.equType != null) {
-                if (rowData.equType == "00") {
-                    $(channelCheckbox[00]).attr("checked", true);
-                } else if (rowData.equType == "01") {
-                    $(channelCheckbox[01]).attr("checked", true);
-                } else if (rowData.equType == "02"){
-                    $(channelCheckbox[02]).attr("checked", true);
-                }
-                form.render();
-            }
-            var versionCheckbox = $("form").find("input[name='versionType']");
-            if ( rowData.versionType != null){
-                var version = rowData.versionType.split(',')
-                for(var i = 0;i<version.length;i++){
-                    var j = version[i];
-                    if (j == "00"){
-                        $(versionCheckbox[00]).attr("checked", true);
-                    }else if (j == "01"){
-                        $(versionCheckbox[01]).attr("checked", true);
-                    }else if (j == "02"){
-                        $(versionCheckbox[02]).attr("checked", true);
-                    }else if (j == "03"){
-                        $(versionCheckbox[03]).attr("checked", true);
-                    }else if (j == "04"){
-                        $(versionCheckbox[04]).attr("checked", true);
-                    }else if (j == "05"){
-                        $(versionCheckbox[05]).attr("checked", true);
-                    }else if (j == "06"){
-                        $(versionCheckbox[06]).attr("checked", true);
-                    }else {
-                        $(versionCheckbox[07]).attr("checked", true);
-                    }
-                }
-                form.render();
-            }
-
-            var creditCheckbox = $("form").find("input[name='creditChannel']");
-            // 渠道
-            if (rowData.creditChannel != null) {
-                if (rowData.creditChannel == "00") {
-                    $(creditCheckbox[00]).attr("checked", true);
-                } else if (rowData.creditChannel == "01") {
-                    $(creditCheckbox[01]).attr("checked", true);
-                }else if (rowData.creditChannel == "02"){
-                    $(creditCheckbox[02]).attr("checked", true);
-                }
-                form.render();
-            }
-
-            var paymentCheckbox = $("form").find("input[name='paymentType']");
-            // 渠道
-            if (rowData.paymentType != null) {
-                if (rowData.paymentType == "00") {
-                    $(paymentCheckbox[00]).attr("checked", true);
-                } else if (rowData.paymentType == "01") {
-                    $(paymentCheckbox[01]).attr("checked", true);
-                }
-                form.render();
-            }
-            var supportCheckbox = $("form").find("input[name='supportBalance']");
-            // 渠道
-            if (rowData.supportBalance != null) {
-                if (rowData.supportBalance == "00") {
-                    $(supportCheckbox[00]).attr("checked", true);
-                } else if (rowData.supportBalance == "01") {
-                    $(supportCheckbox[01]).attr("checked", true);
-                }
-                form.render();
-            }
-
-            $.request({
-                action : '../../MachineManageAction/queryFunction',
-                data : { branchId: rowData.branchid},
-                success : function(data) {
-                    debugger;
-                    if (data.data.length>0){
-                        $('#huilv').html(data.data[0].html);
-                        $('#exchangeRate').val(rowData.exchangeRate);
-                    }
-                    form.render();
-                }
-            });
         });