From 4df27b74053cabd4cf8417c38aa6ece311a70a04 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Wed, 26 Mar 2025 17:50:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=9C=80=E6=B1=82=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=BD=92=E8=BF=98=E6=97=A5=E6=9C=9F=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=94=B9=E4=B8=BA=E9=A2=84=E8=AE=A1=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/aq_demand_plan/child/choose_type_list.js | 4 ++-- js/aq_demand_plan/child/send_out_pro_detail.js | 2 +- js/aq_demand_plan/send_out_list.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/aq_demand_plan/child/choose_type_list.js b/js/aq_demand_plan/child/choose_type_list.js index 3818e42..b5269b5 100644 --- a/js/aq_demand_plan/child/choose_type_list.js +++ b/js/aq_demand_plan/child/choose_type_list.js @@ -425,7 +425,7 @@ function updateTableWithImportedData(data) { const importedItem = data.find((item) => item.id === rowData.id) if (importedItem) { // 更新表格数据 - rowData.needNum = importedItem.needNum + rowData.needNum = Number(importedItem.needNum) rowData.times = importedItem.times rowData.remarks = importedItem.remarks updated = true @@ -433,7 +433,7 @@ function updateTableWithImportedData(data) { // 更新表格中对应单元格的显示 const rowIndex = rowData.LAY_INDEX // 更新需用量单元格 - $(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(importedItem.needNum || "") + $(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(Number(importedItem.needNum) || "") // 更新退还日期单元格 $(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "") // 更新备注单元格 diff --git a/js/aq_demand_plan/child/send_out_pro_detail.js b/js/aq_demand_plan/child/send_out_pro_detail.js index fdc2ab7..ed7410b 100644 --- a/js/aq_demand_plan/child/send_out_pro_detail.js +++ b/js/aq_demand_plan/child/send_out_pro_detail.js @@ -263,7 +263,7 @@ function initTable() { ], ], limits: [10, 15, 20, 25, 50, 100], - limit: 10, + limit: 20, page: true, done: function (res, curr, count) { pageNum = tableIns.config.page.curr; diff --git a/js/aq_demand_plan/send_out_list.js b/js/aq_demand_plan/send_out_list.js index c352ae7..79d7db8 100644 --- a/js/aq_demand_plan/send_out_list.js +++ b/js/aq_demand_plan/send_out_list.js @@ -285,7 +285,7 @@ function initTable() { ], ], limits: [10, 15, 20, 25, 50, 100], - limit: 10, + limit: 20, page: true, done: function (res, curr, count) { pageNum = tableIns.config.page.curr; From 005db7d51143b32eeb0ffad877b4e91bce762c6a Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Fri, 28 Mar 2025 10:40:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=9C=80=E6=B1=82=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=BD=92=E8=BF=98=E6=97=A5=E6=9C=9F=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=94=B9=E4=B8=BA=E9=A2=84=E8=AE=A1=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/aq_demand_plan/child/apply_plan_detail.js | 6 ++-- .../child/apply_plan_edit_form.js | 10 +++--- .../child/choose_crane_type_list.js | 35 +++++++++++++++---- .../child/choose_tool_type_list.js | 35 +++++++++++++++---- js/aq_demand_plan/child/choose_type_list.js | 6 ++-- .../child/apply_plan_edit_form.html | 4 +-- 6 files changed, 69 insertions(+), 27 deletions(-) diff --git a/js/aq_demand_plan/child/apply_plan_detail.js b/js/aq_demand_plan/child/apply_plan_detail.js index 0c6e6a7..021c959 100644 --- a/js/aq_demand_plan/child/apply_plan_detail.js +++ b/js/aq_demand_plan/child/apply_plan_detail.js @@ -184,7 +184,7 @@ function initTable() { { field: "backDate", width: '10%', - title: "退还日期", + title: "预计使用时间", unresize: true, align: "center", sort: true, @@ -277,7 +277,7 @@ function setOperRecordInfo(list, obj) { operData = '完结-审核确认通过,共耗时:' + item.hours + '小时' + minutes + '分钟 原因备注:' + remark + ''; } else if (item.auditStatus === '3') { operData = '驳回-给发起人' + creator + ',共间隔:' + item.hours + '小时' + minutes + '分钟 原因备注:' + remark + ''; - } + } html += '
' + '' + '
' + @@ -400,4 +400,4 @@ function closePage() { let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引 window.parent.queryTable(1); parent.layer.close(index); // 再执行关闭 -} \ No newline at end of file +} diff --git a/js/aq_demand_plan/child/apply_plan_edit_form.js b/js/aq_demand_plan/child/apply_plan_edit_form.js index 194e49c..732cdf9 100644 --- a/js/aq_demand_plan/child/apply_plan_edit_form.js +++ b/js/aq_demand_plan/child/apply_plan_edit_form.js @@ -156,7 +156,7 @@ function submitApply(data) { console.error(detailIdArr2); let delDetailArr = getMinus(detailIdArr2, detailIdArr); console.error(delDetailArr); - + if (delDetailArr && delDetailArr.length > 0) { data.field.delIds = delDetailArr; } @@ -331,9 +331,9 @@ function setFormInput(value, type) { let html = '
'; if (type === 1) { // 需用量 html += ''; - } else if (type === 2) { // 退还日期 + } else if (type === 2) { // 预计使用时间 // html += ''; - html += ''; + html += ''; } else if (type === 3) { // 备注 html += ''; } @@ -392,7 +392,7 @@ function delFitType() { } } } - + if (jjDataArr.length === 0) { $('#no_data_title').removeAttr('style'); $('#search-info').css({ 'display': 'none' }); @@ -472,4 +472,4 @@ function closePage(type) { window.parent.reloadData(); } parent.layer.close(index); // 再执行关闭 -} \ No newline at end of file +} diff --git a/js/aq_demand_plan/child/choose_crane_type_list.js b/js/aq_demand_plan/child/choose_crane_type_list.js index fc22989..f3e5630 100644 --- a/js/aq_demand_plan/child/choose_crane_type_list.js +++ b/js/aq_demand_plan/child/choose_crane_type_list.js @@ -1,5 +1,5 @@ let objParam; -let form, table, element, tableIns, layer, util; +let form, table, element, tableIns, layer, util,laydate; let pageNum = 1; let quanju = new Array();//全局 let huancun = new Array();//缓存 @@ -8,12 +8,13 @@ let cjList = []; let jjDetailArr = []; // 入库配件类型数据 function setParams(obj) { objParam = JSON.parse(obj); - layui.use(["form", "table", 'element', 'layer', 'util'], function () { + layui.use(["form", "table", 'element', 'layer', 'util','laydate'], function () { form = layui.form; table = layui.table; element = layui.element; layer = layui.layer; util = layui.util; + laydate = layui.laydate; $("#saveZipButton").click(function(){ importExcel(); @@ -159,12 +160,17 @@ function initTable() { }, { field: "times", - width: '15%', - title: "退还日期", + width: "15%", + title: "预计使用时间", unresize: true, align: "center", - edit: 'text', - style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;', + templet: (d) => + '
', + style: "outline: 1px solid #e6e6e6;outline-offset: -5px;", }, { field: "remarks", @@ -205,6 +211,21 @@ function initTable() { $('.layui-table th[data-field="0"] input[type="checkbox"]').prop('checked', true);//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名 $('.layui-table th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked');//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名 } + + // 初始化日期选择器 + res.data.forEach((item) => { + laydate.render({ + elem: "#date_" + item.id, + done: (value) => { + // 更新数据 + const data = {} + data.id = item.id + data.times = value + item.times = data.times + updateOrAddObject(item.id, item) + }, + }) + }) }, }); table.on('edit(currentTableId2)', function (obj) { @@ -410,7 +431,7 @@ function updateTableWithImportedData(data) { const rowIndex = rowData.LAY_INDEX // 更新需用量单元格 $(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(importedItem.needNum || "") - // 更新退还日期单元格 + // 更新预计使用时间单元格 $(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "") // 更新备注单元格 $(`tr[data-index="${rowIndex}"] td[data-field="remarks"] .layui-table-cell`).text(importedItem.remarks || "") diff --git a/js/aq_demand_plan/child/choose_tool_type_list.js b/js/aq_demand_plan/child/choose_tool_type_list.js index bfd4923..5d280f2 100644 --- a/js/aq_demand_plan/child/choose_tool_type_list.js +++ b/js/aq_demand_plan/child/choose_tool_type_list.js @@ -1,5 +1,5 @@ let objParam; -let form, table, element, tableIns, layer, util; +let form, table, element, tableIns, layer, util,laydate; let pageNum = 1; let quanju = new Array();//全局 let huancun = new Array();//缓存 @@ -8,12 +8,13 @@ let cjList = []; let jjDetailArr = []; // 入库配件类型数据 function setParams(obj) { objParam = JSON.parse(obj); - layui.use(["form", "table", 'element', 'layer', 'util'], function () { + layui.use(["form", "table", 'element', 'layer', 'util','laydate'], function () { form = layui.form; table = layui.table; element = layui.element; layer = layui.layer; util = layui.util; + laydate = layui.laydate; $("#saveZipButton").click(function(){ importExcel(); @@ -160,12 +161,17 @@ function initTable() { }, { field: "times", - width: '15%', - title: " * 退还日期", + width: "15%", + title: "预计使用时间", unresize: true, align: "center", - edit: 'text', - style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;', + templet: (d) => + '
', + style: "outline: 1px solid #e6e6e6;outline-offset: -5px;", }, { field: "remarks", @@ -206,6 +212,21 @@ function initTable() { $('.layui-table th[data-field="0"] input[type="checkbox"]').prop('checked', true);//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名 $('.layui-table th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked');//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名 } + + // 初始化日期选择器 + res.data.forEach((item) => { + laydate.render({ + elem: "#date_" + item.id, + done: (value) => { + // 更新数据 + const data = {} + data.id = item.id + data.times = value + item.times = data.times + updateOrAddObject(item.id, item) + }, + }) + }) }, }); table.on('edit(currentTableId2)', function (obj) { @@ -411,7 +432,7 @@ function updateTableWithImportedData(data) { const rowIndex = rowData.LAY_INDEX // 更新需用量单元格 $(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(importedItem.needNum || "") - // 更新退还日期单元格 + // 更新预计使用时间单元格 $(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "") // 更新备注单元格 $(`tr[data-index="${rowIndex}"] td[data-field="remarks"] .layui-table-cell`).text(importedItem.remarks || "") diff --git a/js/aq_demand_plan/child/choose_type_list.js b/js/aq_demand_plan/child/choose_type_list.js index b5269b5..95cc41f 100644 --- a/js/aq_demand_plan/child/choose_type_list.js +++ b/js/aq_demand_plan/child/choose_type_list.js @@ -1,5 +1,5 @@ let objParam; -let form, table, element, tableIns, layer, util; +let form, table, element, tableIns, layer, util,laydate; let pageNum = 1; let quanju = new Array();//全局 let huancun = new Array();//缓存 @@ -162,7 +162,7 @@ function initTable() { { field: "times", width: "15%", - title: "退还日期", + title: "预计使用时间", unresize: true, align: "center", templet: (d) => @@ -434,7 +434,7 @@ function updateTableWithImportedData(data) { const rowIndex = rowData.LAY_INDEX // 更新需用量单元格 $(`tr[data-index="${rowIndex}"] td[data-field="needNum"] .layui-table-cell`).text(Number(importedItem.needNum) || "") - // 更新退还日期单元格 + // 更新预计使用时间单元格 $(`tr[data-index="${rowIndex}"] td[data-field="times"] .layui-table-cell`).text(importedItem.times || "") // 更新备注单元格 $(`tr[data-index="${rowIndex}"] td[data-field="remarks"] .layui-table-cell`).text(importedItem.remarks || "") 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..2bba71a 100644 --- a/page/aq_demand_plan/child/apply_plan_edit_form.html +++ b/page/aq_demand_plan/child/apply_plan_edit_form.html @@ -114,7 +114,7 @@ 规格 单位 *需用量 - 退还日期 + 预计使用时间 备注 @@ -134,4 +134,4 @@ - \ No newline at end of file + From e374eed8970a84cae6e1f5ea71864474a4d4e7e3 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Fri, 28 Mar 2025 14:10:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 495 ++++++++++++++++++++++++++------------------------- js/public.js | 19 +- 2 files changed, 257 insertions(+), 257 deletions(-) diff --git a/index.html b/index.html index 1915e7e..ad923cc 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ 黔送固定资产管理系统 + content="layuimini基于layui的轻量级前端后台管理框架,最简洁、易用的后台框架模板,面向所有层次的前后端程序,只需提供一个接口就直接初始化整个框架,无需复杂操作。"> @@ -28,269 +28,270 @@ -
+
-
- +
+ -
- -
-
+
+ +
+
- - + + - - + + +
    + +
  • +
  • -
--> - -
    - -
  • - -
  • -
  • - -
  • -
  • - -
  • - -
  • - -
  • -
-
-
- - -
-
- - -
-
-
- - -
- - -
- -
- -
-
    -
  • -
-
-
  • -
  • -
  • - -
  • -
    -
    -
    -
    -
    - +
  • + +
  • +
  • + +
  • + +
  • + +
  • +
    - - - - - + + + + + /* 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打开数量 + }; + miniAdmin.render(options); */ + + // 百度统计代码,只统计指定域名 + miniTongji.render({ + specific: true, + domains: [ + '99php.cn', + 'layuimini.99php.cn', + 'layuimini-onepage.99php.cn', + ], + }); + + $('.login-out').on("click", function () { + layer.msg('退出登录成功', function () { + window.location = 'page/login-3.html'; + }); + }); + }); + + // 初始化页面 + 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打开数量 + }; + miniAdmin.render(options); + } + + function login(miniAdmin) { + // 登录获取token + let login_url = dataUrl + 'login/userLogin' + const params = { + // "username": 'sa', + // "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', + "username": 'bns', + "password": '1769fb2837e10e9d22c1c25add76355a', + } + /* 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) { + console.log(result); + if (result.code === 200) { + sessionStorage.setItem('gz-token', result.token); + sessionStorage.setItem('us', JSON.stringify(result.user)); + initPage(miniAdmin); + } else if (result.code === 500) { + // layer.msg(result.msg, { icon: 2 }); + } + }, function (xhr, status, error) { + errorFn(xhr, status, error) + }, null); + } + - \ No newline at end of file + diff --git a/js/public.js b/js/public.js index 89fab0b..dcee8f3 100644 --- a/js/public.js +++ b/js/public.js @@ -1,18 +1,17 @@ -const dataUrl = 'http://localhost:21520/'; // 数据请求路径--安全工器具 -const dataUrlDevice = 'http://localhost:21521/'; // 数据请求路径-工器具 -const dataUrlCar = 'http://localhost:21522/'; // 数据请求路径-车辆 +// const dataUrl = 'http://localhost:21520/aqd_screen/'; // 数据请求路径--安全工器具 +// const dataUrlDevice = 'http://localhost:21521/'; // 数据请求路径-工器具 +// const dataUrlCar = 'http://localhost:21522/gz_car/'; // 数据请求路径-车辆 // const dataUrl = 'http://192.168.0.50:21995/'; // 数据请求路径-亮 +// const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 +// const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 +// const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 -const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 +const dataUrl = 'http://192.168.0.16:21520/gz-aqgqj/'; // 数据请求路径 +const fileUrl = 'http://192.168.0.16:21520/gz-aqgqj/statics'; // 文件路径 const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 -/* const dataUrl = 'http://192.168.0.14:21520/'; // 数据请求路径 -const fileUrl = 'http://192.168.0.14:21520/statics'; // 文件路径 -const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 -const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 */ - /* 请求 */ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType) { $.ajax({ @@ -193,7 +192,7 @@ function getUrlParam(key) { // 预览文件 function commonViewFile(params) { let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); - // path = fileUrl + params + // path = fileUrl + params console.log(path); let encodePath = encodeURIComponent(useBase64.encode64(path)); window.open(viewFileUrl + encodePath + '&token=' + generateToken());