From 674aef62d298f9fbce41b9b1725c71d056dfd55b Mon Sep 17 00:00:00 2001 From: LSH Date: 星期三, 03 四月 2024 10:26:32 +0800 Subject: [PATCH] #周计划 --- src/main/webapp/static/js/cstmr/cstmr2.js | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 105 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/js/cstmr/cstmr2.js b/src/main/webapp/static/js/cstmr/cstmr2.js index fe89e10..63f2fa3 100644 --- a/src/main/webapp/static/js/cstmr/cstmr2.js +++ b/src/main/webapp/static/js/cstmr/cstmr2.js @@ -59,7 +59,7 @@ case 1: // 妯℃澘涓嬭浇 layer.load(1, {shade: [0.1,'#fff']}); - location.href = baseUrl + "/mould/鐢叉柟鍗曚綅瀵煎叆妯℃澘.xls"; + location.href = baseUrl + "/mould/瀹㈡埛淇℃伅瀵煎叆妯℃澘.xls"; layer.closeAll('loading'); break case 2: @@ -146,10 +146,11 @@ ,{field: 'uuid', align: 'left',title: '瀹㈡埛浠e彿', hide: false} ,{field: 'addr', align: 'left',title: '璇︾粏鍦板潃', hide: false, templet:function(d){return emptyShow(d.addr)}} ,{field: 'tel', align: 'left',title: '鐢佃瘽', hide: false, templet:function(d){return emptyShow(d.tel)}} + ,{field: 'weeklyDailyReality', align: 'center',title: '琛岀▼',hide : false, toolbar: '#tbLookReality'} ,{field: 'remarks', align: 'left',title: '澶囨敞', hide: false, templet:function(d){return emptyShow(d.remarks)}} ,{field: 'cstmrType$', align: 'left',title: '瀹㈡埛绫诲埆', hide: false} ,{field: 'industry', align: 'left',title: '瀹㈡埛琛屼笟', hide: false} - ,{field: 'productCategory', align: 'left',title: '浜у搧绫诲埆', hide: false} + ,{field: 'productCategory', align: 'left',title: '浜у搧绫诲瀷', hide: false} ,{field: 'userId$', align: 'left',title: '娣诲姞浜哄憳', hide: true} ,{field: 'createTime$', align: 'left',title: '娣诲姞鏃堕棿', hide: false} ,{field: 'deptId$', align: 'left',title: '鎵�灞為儴闂�', hide: true} @@ -193,6 +194,19 @@ pageCount = count; limit(); } + }); + + // 娣诲姞 + $("#cstmrAddBtn1").click(function () { + form.verify({ + account: function(value, item){ + var min = item.getAttribute('lay-min'); + if(value.length < min){ + return '瀹㈡埛鍚嶇О涓嶈兘灏忎簬'+min+'涓瓧绗︾殑闀垮害'; + } + } + }); + showEditModel2(); }); // 娣诲姞 @@ -256,6 +270,69 @@ case "del": del([data.id]); break; + case "lookReality": + var $a = $(obj.tr).find('a[lay-event="lookReality"]'); + var offset = $a.offset(); + var top2 = offset.top; + var left = offset.left; + layer.open({ + type: 1, + title: false, + area: '1100px', + offset: [top2 + 'px', (left - 830 + $a.outerWidth()) + 'px'], + shade: .01, + shadeClose: true, + fixed: false, + content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', + success: function (layero) { + table.render({ + elem: '#lookSSXMTable', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/weeklyDailyReality/list/auth', + where: { + cstmr_id: data.id + }, + page: true, + cellMinWidth: 100, + cols: [[ + {type: 'numbers'} + // ,{field: 'weeklyDay$', align: 'center',title: '鏄熸湡'} + ,{field: 'dailyTime$',width : 120, align: 'center',title: '鏃ユ湡'} + ,{field: 'workContent', align: 'center', title: '宸ヤ綔鍐呭', edit:false} + ,{field: 'workPurpose', title: '宸ヤ綔鐩殑', edit:false} + ,{field: 'comment', title: '璇勮', edit:false} + ,{field: 'weeklyMatter', title: '闇�鍗忓姪浜嬮」', edit:false} + // ,{field: 'dailyTime$', align: 'center',title: '鏃ユ姤鏃ユ湡'} + // ,{field: 'settleMsg', align: 'center',title: '瀹℃牳杩涘害'} + ,{field: 'director$', align: 'center',title: '璐熻矗浜�'} + // ,{field: 'settleSize', align: 'center',title: '娴佺▼闀垮害'} + // ,{field: 'settleCurrent', align: 'center',title: '褰撳墠杩涘害'} + // ,{field: 'cstmrId', align: 'center',title: '鐢叉柟鍗曚綅ID'}//, templet: function () { return htmlCstme;} + ,{field: 'memo', align: 'center',title: '澶囨敞', edit:false} + ]], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function () { + $(layero).find('.layui-table-view').css('margin', '0'); + }, + size: '' + }); + } + }); + break; } }); @@ -273,7 +350,7 @@ admin.open({ type: 1, area: '1500px', - title: (mData ? '淇敼' : '娣诲姞') + '鐢叉柟鍗曚綅', + title: (mData ? '淇敼' : '娣诲姞') + '瀹㈡埛淇℃伅', content: $('#editDialog').html(), success: function (layero, dIndex) { let loadNameXml = loadNameXmlSel() @@ -349,7 +426,7 @@ admin.open({ type: 1, area: '1500px', - title: (mData ? '淇敼' : '娣诲姞') + '鐢叉柟鍗曚綅', + title: (mData ? '淇敼' : '娣诲姞') + '瀹㈡埛淇℃伅', content: $('#editDialog2').html(), success: function (layero, dIndex) { let loadNameXml = loadNameXmlSel2() @@ -395,7 +472,7 @@ } var loadIndex = layer.load(2); $.ajax({ - url: baseUrl+"/cstmr/"+(mData?'update':'add')+"/auth", + url: baseUrl+"/cstmr/"+(mData?'update':'add2')+"/auth", headers: {'token': localStorage.getItem('token')}, data: data.field, method: 'POST', @@ -552,7 +629,7 @@ radio: true, remoteMethod: function (val, cb, show) { $.ajax({ - url: baseUrl + "/cstmr2/all/get/kv", + url: baseUrl + "/cstmrSearch/auth", headers: {'token': localStorage.getItem('token')}, data: { condition: val @@ -568,6 +645,28 @@ } }); }, + on: function (data) { + console.log(data) + let arr = data.arr + let change = data.change; + if (arr.length > 0 && change.length>0) { + let name = arr[0].name; + $.ajax({ + url: baseUrl + "/cstmr/name/check/auth", + headers: {'token': localStorage.getItem('token')}, + data: { + name: name + }, + method: 'POST', + success: function (res) { + if (res.code === 200) { + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }); + } + } }); } -- Gitblit v1.9.1