From 320ed3f4782f9662f79ecfe14d2cf3f34dd288c5 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 01 八月 2023 19:52:36 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/itemReport/itemReport.js | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/static/js/itemReport/itemReport.js b/src/main/webapp/static/js/itemReport/itemReport.js index c08290e..8333c1f 100644 --- a/src/main/webapp/static/js/itemReport/itemReport.js +++ b/src/main/webapp/static/js/itemReport/itemReport.js @@ -26,6 +26,7 @@ ,{field: 'qualityReason$', align: 'center',title: '璐ㄩ噺闂鍘熷洜'} ,{field: 'designReason$', align: 'center',title: '璁捐闂鍘熷洜'} ,{field: 'installReason$', align: 'center',title: '瀹夎闂鍘熷洜'} + ,{field: 'issue$', align: 'center',title: '寮傚父鎻忚堪'} ,{field: 'conclusion', align: 'center',title: '鎬荤粨'} ,{field: 'updateBy', align: 'center',title: '', hide:true} ,{field: 'updateTime$', align: 'center',title: '', hide:true} @@ -134,19 +135,47 @@ // 鐩戝惉琛屽伐鍏蜂簨浠� table.on('tool(itemReport)', function(obj){ var data = obj.data; + + switch (obj.event) { case 'edit': showEditModel(data); break; case "del": - var ids = [data.id]; - del(ids); + var id = data.id; + del(id); + break; + case "makeReport": + console.log(obj); + var ids = [data.itemId]; + makeReport(ids); break; } }); - + function makeReport(id) { + location.href = 'http://localhost:8080/pms/itemReport/makeReport/auth?id=' + id; + // layer.confirm('纭畾瑕佺敓鎴愰�変腑鏁版嵁鐨勬姤鍛婂悧锛�', { + // skin: 'layui-layer-admin', + // shade: .1 + // }, function (i) { + // layer.close(i); + // var loadIndex = layer.load(2); + // $.ajax({ + // url: baseUrl+"/itemReport/makeReport/auth", + // headers: {'token': localStorage.getItem('token')}, + // data: {ids: ids}, + // method: 'POST', + // success: function (res) { + // layer.close(loadIndex); + // + // } + // }) + // } + // ) + }; /* 寮圭獥 - 鏂板銆佷慨鏀� */ function showEditModel(mData) { + mData.itemId$ = mData.itemName; admin.open({ type: 1, area: '600px', @@ -156,6 +185,7 @@ layDateRender(); form.val('detail', mData); form.on('submit(editSubmit)', function (data) { + console.log(data); var loadIndex = layer.load(2); $.ajax({ url: baseUrl+"/itemReport/"+(mData?'update':'add')+"/auth", -- Gitblit v1.9.1