From e353bc2ea9b511432e96036b100b124c775e5cad Mon Sep 17 00:00:00 2001 From: liaoxujun@qq.com <liaoxujun@qq.com> Date: 星期三, 03 四月 2024 16:27:39 +0800 Subject: [PATCH] 修改地推显示 --- CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/index.html | 57 ++++++++++++++ CoreCms.Net.Web.Admin/wwwroot/views/temp.html | 3 CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/edit.html | 83 +++++++++++++++++++- CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/create.html | 45 +++++++++-- CoreCms.Net.Web.Admin/wwwroot/views/bloggersinfo/edit.html | 26 ------ CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/details.html | 14 ++- 6 files changed, 184 insertions(+), 44 deletions(-) diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/create.html index 228662f..1b600ed 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/create.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/create.html @@ -120,15 +120,23 @@ <div class="layui-inline"> <label class="layui-form-label" for="storeLogoUrl">搴楁嫑</label> <div class="layui-input-inline layui-inline-6"> - <input name="storeLogoUrl" id="storeLogoUrl" size="15" autocomplete="off" class="layui-input" lay-reqText="璇疯緭鍏ャ�愮缉鐣ュ浘銆�" /> + <input name="storeLogoUrl1" id="storeLogoUrlc1" size="15" autocomplete="off" class="layui-input" lay-reqText="璇疯緭鍏ャ�愮缉鐣ュ浘銆�" /> + <input name="storeLogoUrl2" id="storeLogoUrlc2" size="15" autocomplete="off" class="layui-input" lay-reqText="璇疯緭鍏ャ�愮缉鐣ュ浘銆�" /> </div> <div class="layui-input-inline"> - <button type="button" class="layui-btn" id="upBtnOriginalCreat">涓婁紶鍥惧儚</button> + <button type="button" class="layui-btn" id="upBtnOriginalCreat1">涓婁紶鍥惧儚</button> <div class="layui-input-inline"> - <img class="layui-upload-img" id="viewImgBox" src="{{ layui.setter.noImagePicUrl }}"> - <p id="viewTextBox"></p> + <img class="layui-upload-img" id="viewImgBox1" src="{{ layui.setter.noImagePicUrl }}"> + <p id="viewTextBox1"></p> </div> </div> + <div class="layui-input-inline"> + <button type="button" class="layui-btn" id="upBtnOriginalCreat2">涓婁紶鍥惧儚</button> + <div class="layui-input-inline"> + <img class="layui-upload-img" id="viewImgBox2" src="{{ layui.setter.noImagePicUrl }}"> + <p id="viewTextBox2"></p> + </div> + </div> </div> </div> @@ -170,20 +178,41 @@ formatUserSelInPut(coreHelper, form, "CreatOfflinedisSelUserID"); //鏅�氬浘鐗囦笂浼� upload.render({ - elem: '#upBtnOriginalCreat' + elem: '#upBtnOriginalCreat1' , url: layui.setter.apiUrl + 'Api/Tools/UploadFiles' , before: function (obj) { obj.preview(function (index, file, result) { - $('#viewImgBox').attr('src', result); + $('#viewImgBox1').attr('src', result); }); } , done: function (res) { if (res.code > 0) { return layer.msg('涓婁紶澶辫触'); } layer.msg('涓婁紶鎴愬姛'); - $("#storeLogoUrl").val(res.data.fileUrl); + $("#storeLogoUrlc1").val(res.data.fileUrl); } , error: function () { - var viewTextBox = $('#viewTextBox'); + var viewTextBox = $('#viewTextBox1'); + viewTextBox.html('<span style="color: #FF5722;">涓婁紶澶辫触</span> <a class="layui-btn layui-btn-xs demo-reload">閲嶈瘯</a>'); + viewTextBox.find('.demo-reload').on('click', function () { + uploadInst.upload(); + }); + } + }); + upload.render({ + elem: '#upBtnOriginalCreat2' + , url: layui.setter.apiUrl + 'Api/Tools/UploadFiles' + , before: function (obj) { + obj.preview(function (index, file, result) { + $('#viewImgBox2').attr('src', result); + }); + } + , done: function (res) { + if (res.code > 0) { return layer.msg('涓婁紶澶辫触'); } + layer.msg('涓婁紶鎴愬姛'); + $("#storeLogoUrlc2").val(res.data.fileUrl); + } + , error: function () { + var viewTextBox = $('#viewTextBox2'); viewTextBox.html('<span style="color: #FF5722;">涓婁紶澶辫触</span> <a class="layui-btn layui-btn-xs demo-reload">閲嶈瘯</a>'); viewTextBox.find('.demo-reload').on('click', function () { uploadInst.upload(); diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/details.html index fc4b220..7490676 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/details.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/details.html @@ -198,14 +198,20 @@ </div> <div class="layui-input-inline"> - <div class="layui-input-inline" style="padding-left: 100px;" > + <div style="display: flex;" > + {{# layui.each(d.params.data.storeLogoUrl.split(','), function(index, item){ }} + <img class="layui-upload-img" - id="viewImgBoxEdit" - src="{{ d.params.data.storeLogoUrl || layui.setter.noImagePicUrl ||''}}" + style=" margin-left: 5px;" + src="{{ item || layui.setter.noImagePicUrl ||''}}" /> - + + + {{#})}} </div> + + </div> </div> diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/edit.html index 3e78756..b90ec0a 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/edit.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/edit.html @@ -198,26 +198,53 @@ <label for="StoreLogoUrl" class="layui-form-label ">搴楁嫑</label> <div class="layui-input-inline" style="width: 300px;"> <input - name="storeLogoUrl" + name="storeLogoUrl1" lay-verType="tips" class="layui-input" placeholder="璇疯緭鍏ュ簵鎷涘浘鐗囧湴鍧�" lay-reqText="璇疯緭鍏ュ簵鎷涘浘鐗囧湴鍧�" value="{{d.params.data.storeLogoUrl || '' }}" + id="viewTextBoxEdittext" + type="hidden" /> + <input + name="storeLogoUrl2" + lay-verType="tips" + class="layui-input" + placeholder="璇疯緭鍏ュ簵鎷涘浘鐗囧湴鍧�" + lay-reqText="璇疯緭鍏ュ簵鎷涘浘鐗囧湴鍧�" + value="{{d.params.data.storeLogoUrl || '' }}" + id="viewTextBoxEdittext2" + type="hidden" + /> </div> <div class="layui-input-inline"> <button type="button" class="layui-btn" id="upBtnOriginalEdit"> - 涓婁紶鍥惧儚 + 淇敼鍥剧墖 </button> <div class="layui-input-inline"> <img class="layui-upload-img" id="viewImgBoxEdit" - src="{{ d.params.data.storeLogoUrl || layui.setter.noImagePicUrl ||''}}" + src="{{ d.params.data.storeLogoUrl1 || layui.setter.noImagePicUrl ||''}}" /> <div class="layui-input-inline"> <div id="viewTextBoxEdit"></div> + </div> + </div> + </div> + <div class="layui-input-inline"> + <button type="button" class="layui-btn" id="upBtnOriginalEdit2"> + 淇敼鍥剧墖 + </button> + <div class="layui-input-inline"> + <img + class="layui-upload-img" + id="viewImgBoxEdit2" + src="{{ d.params.data.storeLogoUrl2 || layui.setter.noImagePicUrl ||''}}" + /> + <div class="layui-input-inline"> + <div id="viewTextBoxEdit2"></div> </div> </div> </div> @@ -334,7 +361,27 @@ dropdown = layui.dropdown, table = layui.table, coreHelper = layui.coreHelper; - + + if( d.params.data.storeLogoUrl!=null&&d.params.data.storeLogoUrl!=undefined&&d.params.data.storeLogoUrl!="") + { + + // 鎷嗗垎storeLogoUrl + var storeLogoUrl=d.params.data.storeLogoUrl.split(","); + for (let index = 0; index < storeLogoUrl.length; index++) { + if(index>1) + break; + if(index==0) + {d.params.data.storeLogoUrl1 = storeLogoUrl[index]; + $("#viewImgBoxEdit").attr("src", d.params.data.storeLogoUrl1); + } + else + { d.params.data.storeLogoUrl2 = storeLogoUrl[index]; + $("#viewImgBoxEdit2").attr("src", d.params.data.storeLogoUrl2); + } + + + } + } formatAreaInPut( coreHelper, "editOfflinedisRegion", @@ -360,7 +407,7 @@ return layer.msg("涓婁紶澶辫触"); } layer.msg("涓婁紶鎴愬姛"); - $("#upBtnOriginalEdit").val(res.data.fileUrl); + $("#viewTextBoxEdittext").val(res.data.fileUrl); }, error: function () { var viewTextBox = $("#viewTextBoxEdit"); @@ -372,6 +419,32 @@ }); }, }); + //鏅�氬浘鐗囦笂浼� + upload.render({ + elem: "#upBtnOriginalEdit2", + url: layui.setter.apiUrl + "Api/Tools/UploadFiles", + before: function (obj) { + obj.preview(function (index, file, result) { + $("#viewImgBoxEdit2").attr("src", result); + }); + }, + done: function (res) { + if (res.code > 0) { + return layer.msg("涓婁紶澶辫触"); + } + layer.msg("涓婁紶鎴愬姛"); + $("#viewTextBoxEdittext2").val(res.data.fileUrl); + }, + error: function () { + var viewTextBox = $("#viewTextBoxEdit2"); + viewTextBox.html( + '<span style="color: #FF5722;">涓婁紶澶辫触</span> <a class="layui-btn layui-btn-xs demo-reload">閲嶈瘯</a>' + ); + viewTextBox.find(".demo-reload").on("click", function () { + uploadInst.upload(); + }); + }, + }); dropdown.render({ elem: "#EditCooperationIntent", data: [ diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/index.html index 98d8d61..62a24b9 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/offlinedistributor/index.html @@ -251,14 +251,35 @@ sort: false, width: 105, }, + { field: "school", title: "瀛︽牎鍚嶇О", sort: false, width: 105 }, { field: "dealerName", title: "缁忛攢鍟嗗悕绉�", sort: false ,width: 105}, + { + field: 'storeLogoUrl', title: '搴楁嫑', width: 120, sort: false, + templet: function (d) { + if (d.storeLogoUrl) { + + var listimg= d.storeLogoUrl.split(",") + var str=""; + listimg.forEach((value,index)=> + { + str+= '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + value + '")><image style="max-width:30px;max-height:30px; margin-left: 5px;" src="' + value + '" /></a>' + + }) + + return str; + } else { + return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + setter.noImagePicUrl + '")><image style="max-width:30px;max-height:30px; margin-left: 5px;" src="' + setter.noImagePicUrl + '" /></a>'; + } + } + }, { field: "contactPerson", title: "鑱旂郴浜哄鍚�", sort: false, width: 105, }, + { field: "phoneNumber", title: "鑱旂郴鐢佃瘽", @@ -279,6 +300,7 @@ width: 105, templet: "#OffdismeetingCountTmp", }, + { field: "money", title: "璁㈣揣璁板綍", @@ -414,8 +436,23 @@ "submit(LAY-app-OfflineDistributor-createForm-submit)", function (data) { var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� - + field.storeLogoUrl=""; field.isdelete = field.isdelete == "on"; + if((!!field.storeLogoUrl1)&&(!!field.storeLogoUrl2)) + { + field.storeLogoUrl=field.storeLogoUrl1+","+field.storeLogoUrl2; + } + else + if(!!field.storeLogoUrl1) + { + field.storeLogoUrl=field.storeLogoUrl1; + } + else if(!!field.storeLogoUrl2) + { + field.storeLogoUrl=field.storeLogoUrl2; + }; + + field.region = GetAreaCodeFormFileid( field, "CreatofflinedisRegion" @@ -488,6 +525,24 @@ function (data) { var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� + field.storeLogoUrl=""; + if((!!field.storeLogoUrl1)&&(!!field.storeLogoUrl2)) + { + field.storeLogoUrl=field.storeLogoUrl1+","+field.storeLogoUrl2; + } + else + if(!!field.storeLogoUrl1) + { + field.storeLogoUrl=field.storeLogoUrl1; + } + else if(!!field.storeLogoUrl2) + { + field.storeLogoUrl=field.storeLogoUrl2; + }; + + + + field.isdelete = field.isdelete == "on"; field.region = GetAreaCodeFormFileid( field, diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/bloggersinfo/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/bloggersinfo/edit.html index 4092ece..9c76b43 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/bloggersinfo/edit.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/bloggersinfo/edit.html @@ -550,29 +550,5 @@ ); }; - Date.prototype.Format = function (fmt) { - //author: meizz - var o = { - "M+": this.getMonth() + 1, //鏈堜唤 - "d+": this.getDate(), //鏃� - "h+": this.getHours(), //灏忔椂 - "m+": this.getMinutes(), //鍒� - "s+": this.getSeconds(), //绉� - "q+": Math.floor((this.getMonth() + 3) / 3), //瀛e害 - }; - if (/(y+)/.test(fmt)) - fmt = fmt.replace( - RegExp.$1, - (this.getFullYear() + "").substr(4 - RegExp.$1.length) - ); - for (var k in o) - if (new RegExp("(" + k + ")").test(fmt)) - fmt = fmt.replace( - RegExp.$1, - RegExp.$1.length == 1 - ? o[k] - : ("00" + o[k]).substr(("" + o[k]).length) - ); - return fmt; - }; + </script> diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/temp.html b/CoreCms.Net.Web.Admin/wwwroot/views/temp.html index 7e56c73..91840a1 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/temp.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/temp.html @@ -57,4 +57,5 @@ //}); }); -</script> \ No newline at end of file +</script> + -- Gitblit v1.9.1