From 4392a1a7c0e6a3ff6672f9b4edfa3f3a1fd8a28a Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Mon, 24 Mar 2025 15:45:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/initPlan.json | 47 +++++++++ index.html | 98 +++++++------------ js/aq_demand_plan/apply_plan_list.js | 22 ++--- js/aq_demand_plan/child/choose_type_list.js | 2 +- js/aq_demand_plan/send_out_list.js | 4 +- .../child/apply_plan_edit_form.html | 14 +-- .../aq_demand_plan/child/apply_plan_form.html | 20 ++-- 7 files changed, 115 insertions(+), 92 deletions(-) create mode 100644 api/initPlan.json diff --git a/api/initPlan.json b/api/initPlan.json new file mode 100644 index 0000000..bf46b9c --- /dev/null +++ b/api/initPlan.json @@ -0,0 +1,47 @@ +{ + "homeInfo": { + "title": "首页", + "href": "page/welcome-1.html?t=1" + }, + "logoInfo": { + "title": "需求计划管理", + "image": "images/logo.png", + "href": "" + }, + "menuInfo": [ + { + "title": "常规管理", + "icon": "fa fa-address-book", + "href": "", + "target": "_self", + "child": [ + { + "title": "需求计划管理", + "href": "", + "icon": "fa fa-book", + "target": "_self", + "child": [ + { + "title": "需求计划申请", + "href": "page/aq_demand_plan/apply_plan_list.html", + "icon": "fa fa-navicon", + "target": "_self" + }, + { + "title": "需求计划审核", + "href": "page/aq_demand_plan/apply_plan_audit_list.html", + "icon": "fa fa-shield", + "target": "_self" + }, + { + "title": "采购发货", + "href": "page/aq_demand_plan/send_out_list.html", + "icon": "fa fa-shield", + "target": "_self" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/index.html b/index.html index 1915e7e..0342460 100644 --- a/index.html +++ b/index.html @@ -141,6 +141,7 @@ miniAdmin = layui.miniAdmin, miniTongji = layui.miniTongji; let token = getUrlParam('token'); + let isPlanAdd = getUrlParam('isPlanAdd'); if (!token) { let gz_token = sessionStorage.getItem("gz-token"); if (gz_token) { @@ -162,7 +163,7 @@ url = url.replace(/(\?|#)[^'"]*/, ''); //去除参数 window.history.pushState({}, 0, url); } - initPage(miniAdmin); + initPage(miniAdmin,isPlanAdd); sessionStorage.setItem('us', JSON.stringify(result.data)); } else if (result.code === 401) { closeWindowOpen(); @@ -173,7 +174,7 @@ } else { console.log('走的自己登录'); window.location = 'page/401.html'; - // login(miniAdmin); + // login(miniAdmin,isPlanAdd); // window.location = 'page/welcome-1.html'; } /* var options = { @@ -206,23 +207,42 @@ }); }); + // 初始化页面 - function initPage(miniAdmin){ - var options = { - iniUrl: "api/init.json", // 初始化接口 - clearUrl: "api/clear.json", // 缓存清理接口 - urlHashLocation: true, // 是否打开hash定位 - bgColorDefault: false, // 主题默认配置 - multiModule: true, // 是否开启多模块 - menuChildOpen: false, // 是否默认展开菜单 - loadingTime: 0, // 初始化加载时间 - pageAnim: true, // iframe窗口动画 - maxTabNum: 20, // 最大的tab打开数量 - }; + function initPage(miniAdmin,isPlanAdd){ + console.log("进入initPage方法,isPlanAdd的值为:" + isPlanAdd); + let options; + if (isPlanAdd != null && isPlanAdd === "1") { + console.log("加载initPlanJSON"); + options = { + iniUrl: "api/initPlan.json", // 初始化接口 + clearUrl: "api/clear.json", // 缓存清理接口 + urlHashLocation: true, // 是否打开hash定位 + bgColorDefault: false, // 主题默认配置 + multiModule: true, // 是否开启多模块 + menuChildOpen: false, // 是否默认展开菜单 + loadingTime: 0, // 初始化加载时间 + pageAnim: true, // iframe窗口动画 + maxTabNum: 20, // 最大的tab打开数量 + }; + } else { + console.log("加载initJSON"); + options = { + iniUrl: "api/init.json", // 初始化接口 + clearUrl: "api/clear.json", // 缓存清理接口 + urlHashLocation: true, // 是否打开hash定位 + bgColorDefault: false, // 主题默认配置 + multiModule: true, // 是否开启多模块 + menuChildOpen: false, // 是否默认展开菜单 + loadingTime: 0, // 初始化加载时间 + pageAnim: true, // iframe窗口动画 + maxTabNum: 20, // 最大的tab打开数量 + }; + } miniAdmin.render(options); } - function login(miniAdmin) { + function login(miniAdmin,isPlanAdd) { // 登录获取token let login_url = dataUrl + 'login/userLogin' const params = { @@ -230,51 +250,7 @@ // "password": '3NBzZK7qxhMhrmvi63FnuQ==', "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', } - /* const params = { - "username": 'fgs-check-001', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'fgs-check-002', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'fgs-check-003', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'xgzx-check-001', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'xgzx-check-002', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'xgzx-check-003', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'jj-check-001', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'jj-check-002', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ - /* const params = { - "username": 'jj-check-003', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": '1769fb2837e10e9d22c1c25add76355a', - } */ + // alert(params.username); ajaxRequest(login_url, "POST", params, true, function () { }, function (result) { @@ -282,7 +258,7 @@ if (result.code === 200) { sessionStorage.setItem('gz-token', result.token); sessionStorage.setItem('us', JSON.stringify(result.user)); - initPage(miniAdmin); + initPage(miniAdmin,isPlanAdd); } else if (result.code === 500) { // layer.msg(result.msg, { icon: 2 }); } diff --git a/js/aq_demand_plan/apply_plan_list.js b/js/aq_demand_plan/apply_plan_list.js index ec70789..1988c19 100644 --- a/js/aq_demand_plan/apply_plan_list.js +++ b/js/aq_demand_plan/apply_plan_list.js @@ -39,16 +39,16 @@ function reloadData() { // 重载表格 function reloadTable(pageNum) { table.reload("currentTableId", { - page: { - curr: pageNum ? pageNum : 1, + page: { + curr: pageNum ? pageNum : 1, + }, + where: { + encryptedData: JSON.stringify({ + 'keyWord': $('#keyWord').val(), + 'status': $('#status').val(), + }), + }, }, - where: { - encryptedData: JSON.stringify({ - 'keyWord': $('#keyWord').val(), - 'status': $('#status').val(), - }), - }, - }, ); } @@ -205,7 +205,7 @@ function exportExcel() { function getCheckStatus(statusType, status) { var company = ""; if(statusType === '0' && status === '0'){ - return "已撤回"; + return "已撤回"; } if (statusType === '1') { return "审核通过"; @@ -232,7 +232,7 @@ function showProcess() { } // 申请 function applyPlan(obj) { - openIframeByParamObj("apply_plan", "安全工器具需求计划申请", "./child/apply_plan_form.html", "92%", "95%", obj); + openIframeByParamObj("apply_plan", "需求计划申请(工器具、安全工器具、车辆)", "./child/apply_plan_form.html", "92%", "95%", obj); } // 申请修改 diff --git a/js/aq_demand_plan/child/choose_type_list.js b/js/aq_demand_plan/child/choose_type_list.js index 3818e42..9b6461b 100644 --- a/js/aq_demand_plan/child/choose_type_list.js +++ b/js/aq_demand_plan/child/choose_type_list.js @@ -162,7 +162,7 @@ function initTable() { { field: "times", width: "15%", - title: "退还日期", + title: "预计使用时间", unresize: true, align: "center", templet: (d) => diff --git a/js/aq_demand_plan/send_out_list.js b/js/aq_demand_plan/send_out_list.js index c352ae7..d9c1536 100644 --- a/js/aq_demand_plan/send_out_list.js +++ b/js/aq_demand_plan/send_out_list.js @@ -284,8 +284,8 @@ function initTable() { }, ], ], - limits: [10, 15, 20, 25, 50, 100], - limit: 10, + limits: [20, 15, 20, 25, 50, 100], + limit: 20, page: true, done: function (res, curr, count) { pageNum = tableIns.config.page.curr; diff --git a/page/aq_demand_plan/child/apply_plan_edit_form.html b/page/aq_demand_plan/child/apply_plan_edit_form.html index 922ecb0..252b47f 100644 --- a/page/aq_demand_plan/child/apply_plan_edit_form.html +++ b/page/aq_demand_plan/child/apply_plan_edit_form.html @@ -43,13 +43,13 @@ lay-verify="required" maxlength="50" lay-affix="clear"> -
- -
- -
-
+ + + + + + +
diff --git a/page/aq_demand_plan/child/apply_plan_form.html b/page/aq_demand_plan/child/apply_plan_form.html index 0984489..c30435a 100644 --- a/page/aq_demand_plan/child/apply_plan_form.html +++ b/page/aq_demand_plan/child/apply_plan_form.html @@ -43,13 +43,13 @@ lay-verify="required" maxlength="50" lay-affix="clear">
-
- -
- -
-
+ + + + + + +
@@ -127,7 +127,7 @@ 规格 单位 *需用量 - *需用天数 + *退还日期 备注 @@ -253,7 +253,7 @@ 规格 单位 *需用量 - *需用天数 + *退还日期 备注 @@ -390,7 +390,7 @@ 规格 单位 *需用量 - *需用天数 + *退还日期 备注