From e85f0e74d21e49b9c68474bc4d19f5eceacf1a46 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 20 十月 2025 08:40:04 +0800
Subject: [PATCH] 对接
---
src/main/webapp/static/js/docType/docType.js | 32 +++++++++++++++++++++++++++-----
1 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/src/main/webapp/static/js/docType/docType.js b/src/main/webapp/static/js/docType/docType.js
index 39e1cc0..ff52b86 100644
--- a/src/main/webapp/static/js/docType/docType.js
+++ b/src/main/webapp/static/js/docType/docType.js
@@ -1,4 +1,5 @@
var pageCurr;
+var tableData;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin'], function(){
@@ -15,8 +16,8 @@
headers: {token: localStorage.getItem('token')},
url: baseUrl+'/docType/list/auth',
page: true,
- limit: 15,
- limits: [15, 30, 50, 100, 200, 500],
+ limit: 100,
+ limits: [ 100, 200, 500],
toolbar: '#toolbar',
cellMinWidth: 50,
height: 'full-120',
@@ -24,12 +25,14 @@
{type: 'checkbox'}
,{field: 'docId', align: 'center',title: '绫诲瀷缂栧彿'}
,{field: 'docName', align: 'center',title: '绫诲瀷鍚嶇О'}
+ ,{field: 'pakin', align: 'center',title: '鍏ュ簱', templet: '#pakinTpl', width: 120, unresize: true}
+ ,{field: 'pakout', align: 'center',title: '鍑哄簱', templet: '#pakoutTpl', width: 120, unresize: true}
,{field: 'status$', align: 'center',title: '鐘舵��'}
- ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'}
- ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
+ // ,{field: 'createBy$', align: 'center',title: '娣诲姞浜哄憳'}
+ // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳'}
,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
- ,{field: 'memo', align: 'center',title: '澶囨敞'}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120}
]],
@@ -52,6 +55,7 @@
if (res.code === 403) {
top.location.href = baseUrl+"/";
}
+ tableData = table.cache.docType;
pageCurr=curr;
limit();
}
@@ -71,6 +75,24 @@
});
});
+ form.on('switch(pakinSwitch)', function (obj) {
+ let index = obj.othis.parents('tr').attr("data-index");
+ let data = tableData[index];
+ data[this.name] = obj.elem.checked?1:0;
+ http.post(baseUrl+"/docType/update/auth", {docId: data.docId, pakin: data[this.name]}, function (res) {
+ layer.msg(res.msg, {icon: 1});
+ })
+ })
+
+ form.on('switch(pakoutSwitch)', function (obj) {
+ let index = obj.othis.parents('tr').attr("data-index");
+ let data = tableData[index];
+ data[this.name] = obj.elem.checked?1:0;
+ http.post(baseUrl+"/docType/update/auth", {docId: data.docId, pakout: data[this.name]}, function (res) {
+ layer.msg(res.msg, {icon: 1});
+ })
+ })
+
// 鐩戝惉澶村伐鍏锋爮浜嬩欢
table.on('toolbar(docType)', function (obj) {
var checkStatus = table.checkStatus(obj.config.id).data;
--
Gitblit v1.9.1