From 1ec5d4cac10c700df9998da7b42d986ba6387028 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期二, 10 十月 2023 15:41:08 +0800
Subject: [PATCH] #优化
---
src/main/webapp/static/js/contract/contract.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 52 insertions(+), 1 deletions(-)
diff --git a/src/main/webapp/static/js/contract/contract.js b/src/main/webapp/static/js/contract/contract.js
index dec90b0..6b25d76 100644
--- a/src/main/webapp/static/js/contract/contract.js
+++ b/src/main/webapp/static/js/contract/contract.js
@@ -88,11 +88,12 @@
, {field: 'status$', align: 'center', title: '鐘舵��'}
, {field: 'userId$', align: 'center', title: '娣诲姞浜哄憳'}
, {field: 'createTime$', align: 'center', title: '娣诲姞鏃堕棿'}
+ , {field: 'settle$', align: 'center',title: '杩涘害', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false}
, {field: 'updateBy$', align: 'center', title: '淇敼浜哄憳'}
, {field: 'updateTime$', align: 'center', title: '淇敼鏃堕棿'}
, {field: 'memo', align: 'center', title: '澶囨敞'}
- , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 400}
+ , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 500}
]],
request: {
pageName: 'curr',
@@ -193,6 +194,29 @@
table.on('tool(contract)', function (obj) {
var data = obj.data;
switch (obj.event) {
+ case 'approval':
+ layer.confirm('瀹℃壒閫氳繃锛�', {
+ skin: 'layui-layer-admin',
+ shade: .1,
+ offset: '200px',
+ title: data.name
+ }, function (i) {
+ layer.close(i);
+ approval(data.id);
+ });
+ break;
+ case 'more':
+ top.contractByMore = data.id;
+ admin.popupRight({
+ type: 1,
+ window: "top",
+ area: "1250px",
+ url: "contract_more.html",
+ end: function () {
+ // $(".layui-laypage-btn")[0].click();
+ }
+ })
+ break;
case 'edit':
showEditModel(data);
break;
@@ -472,6 +496,33 @@
layDateRender();
+ function approval(contractId, plannerId, dIdx) {
+ let loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/contract/approval/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ contractId: contractId,
+ plannerId: plannerId
+ },
+ method: 'POST',
+ success: function (res) {
+ if (dIdx) {
+ layer.close(dIdx);
+ }
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1});
+ tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ }
+
});
// 鍏抽棴鍔ㄤ綔
--
Gitblit v1.9.1