From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 04 三月 2024 10:11:21 +0800 Subject: [PATCH] 合并代码 --- cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js | 77 ++++++++++++++++++++++++++++++++------ 1 files changed, 65 insertions(+), 12 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js b/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js index 1897c1c..be97dd6 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tShop/tShopOtherOne.js @@ -15,10 +15,18 @@ TCompetition.initColumn = function () { return [ {field: 'selectItem', radio: true}, - {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle', - }, - {title: '图片', field: 'url', visible: role==1?true:false, align: 'center', valign: 'middle', - }, + {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, + { + title: '图片', + field: 'url', + visible: role == 1 ? true : false, + align: 'center', + valign: 'middle', + formatter: function(value, row, index) { + return '<img src="' + value + '" alt="图片" style="width: 100px; height: 100px;">'; + } + } + , {title: '跳转模块', field: 'name', visible: role==1?true:false, align: 'center', valign: 'middle', }, {title: '跳转页面', field: 'page', visible: role==1?true:false, align: 'center', valign: 'middle', @@ -27,7 +35,10 @@ }, {title: '操作', visible: role==1?true:false, align: 'center', valign: 'middle', formatter:function (value,row) { - return '<a href="javascript:void(0);" style="color: blue" onclick="TCompetition.delete1(' + row.id +')">删除 </a> <a href="javascript:void(0);" style="color: blue" onclick="TCompetition.openTCompetitionDetail(' + row.id +')">编辑</a>' + return '<a href="javascript:void(0);" style="color: blue" ' + + 'onclick="TCompetition.delete1(' + row.id +')">删除 </a> ' + + '<a href="javascript:void(0);" style="color: blue" ' + + 'onclick="TCompetition.openTCompetitionDetail(' + row.id +')">编辑</a>' } }, ]; @@ -68,7 +79,7 @@ TCompetition.delete1= function (e) { console.log(e) - var ajax = new $ax(Feng.ctxPath + "/tShop/deleteOne", function (data) { + var ajax = new $ax(Feng.ctxPath + "/tShop/deleteTwo", function (data) { Feng.success("删除成功!"); TCompetition.table.refresh(); }, function (data) { @@ -101,7 +112,7 @@ area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, - content: Feng.ctxPath + '/tShop/tShop_add_two?id='+$("#id").val() + content: Feng.ctxPath + '/tShop/tShop_add_two1?id='+$("#id").val() }); this.layerIndex = index; }; @@ -589,6 +600,12 @@ Feng.info("请选择跳转模块") return; } + + if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { + Feng.info("请选择跳转类型") + return; + } + let page = $("#page").val() if(page=='' && name !='不跳转'){ Feng.info("请选择跳转页面") @@ -598,12 +615,26 @@ if(type=='' && name !='不跳转'){ } + + + let turnId = $("#turnId").val() - if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ - Feng.info("请输入跳转ID") - return; + // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ + // Feng.info("请输入跳转ID") + // return; + // } + console.log("看看跳转类型") + console.log($('#type option:selected').text()) + if ($('#type option:selected').text() == "详情" || $('#type option:selected').text() == "指定商品"||$('#type option:selected').text() == "指定折扣") { + + if ($("#turnId").val() == '') { + Feng.info("请输入跳转ID") + return; + } } + + let sort = $("#sort").val() if(sort==''){ @@ -639,6 +670,11 @@ if(url==''){ } + if ($("#type").val() == ''&&$("#page").val()!=2&&$("#page").val()!=25&&$("#page").val()!=27&&$("#page").val()!=37&&$("#page").val()!=28) { + Feng.info("请选择跳转类型") + return; + } + let name = $("#name").val() console.log(name) @@ -657,12 +693,20 @@ } let turnId = $("#turnId").val() - if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ - if(turnId==""){ + + if ($('#type option:selected').text() == "详情"||$('#type option:selected').text() == "指定商品"||$('#type option:selected').text() == "指定折扣") { + if ($("#turnId").val() == '') { Feng.info("请输入跳转ID") return; } } + + // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ + // if(turnId==""){ + // Feng.info("请输入跳转ID") + // return; + // } + // } let sort = $("#sort").val() if(sort==''){ @@ -696,9 +740,14 @@ let name = $("#name").val() + let sort = $("#sort").val() if(name=='' || name ==null){ Feng.info("请填写板块名称") + return; + } + if(sort=='' || sort ==null){ + Feng.info("请填写排序") return; } @@ -717,8 +766,12 @@ }); ajax.set("name",name); ajax.set("id",$("#id").val()); + ajax.set("sort",$("#sort").val()); ajax.start(); } + + + TCompetition.close = function() { parent.layer.close(window.parent.TCompetition.layerIndex); } \ No newline at end of file -- Gitblit v1.7.1