From 76d2a4631972bd86172aac77eec24cdfba6b0f4a Mon Sep 17 00:00:00 2001
From: zhangsiqi <2825463979@qq.com>
Date: Tue, 11 Jun 2024 19:51:44 +0800
Subject: [PATCH] =?UTF-8?q?[feat]=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9E=E6=88=90=E5=93=81SOP=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E6=8C=89=E9=92=AE=E4=B8=8E=E8=AF=A6=E6=83=85=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../system/controller/SysSopController.java | 14 +-
.../templates/system/sop/detail.html | 296 ++++++++++++++++
.../resources/templates/system/sop/edit.html | 21 +-
.../resources/templates/system/sop/sop.html | 333 +++++++-----------
4 files changed, 441 insertions(+), 223 deletions(-)
create mode 100644 ruoyi-admin/src/main/resources/templates/system/sop/detail.html
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSopController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSopController.java
index fa6ef1a5..d2326e76 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSopController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSopController.java
@@ -104,14 +104,22 @@ public class SysSopController extends BaseController
/**
* 修改SOP
*/
- @GetMapping("/edit/{sopId}")
- public String edit(@PathVariable("sopId") Long sopId, ModelMap mmap)
+ @GetMapping("/edit/{id}")
+ public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
- SysSop sysSop = sysSopService.selectSysSopById(sopId);
+ SysSop sysSop = sysSopService.selectSysSopById(id);
mmap.put("sysSop", sysSop);
return prefix + "/edit";
}
+ @GetMapping("/detail/{id}")
+ public String detail(@PathVariable("id") Long id, ModelMap mmap)
+ {
+ SysSop sysSop = sysSopService.selectSysSopById(id);
+ mmap.put("sysSop", sysSop);
+ return prefix + "/detail";
+ }
+
/**
* 修改保存SOP
*/
diff --git a/ruoyi-admin/src/main/resources/templates/system/sop/detail.html b/ruoyi-admin/src/main/resources/templates/system/sop/detail.html
new file mode 100644
index 00000000..87910b23
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/system/sop/detail.html
@@ -0,0 +1,296 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/system/sop/edit.html b/ruoyi-admin/src/main/resources/templates/system/sop/edit.html
index 129b528d..a7291391 100644
--- a/ruoyi-admin/src/main/resources/templates/system/sop/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/sop/edit.html
@@ -245,29 +245,18 @@
function getCustomerList() {
$.ajax({
method:"post",
- url : ctx + "system/customer/list",
- success:function(data){
- // console.log(data)
- var customerData = data.rows
- // console.log(customerData)
- for(i=0;i" + customerData[i].enterpriseCode + "");
}
$("#form-sop-edit select[name='customerCode']").val(getData.customerCode).trigger("change")
- $("#form-sop-edit select[name='customerCode']").change(function () {
- var code = $(this).val();
- for (let i=0;i
添加
-
- 修改
-
-
- 删除
-
+
+
+
+
+
+
@@ -86,222 +86,147 @@
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
+ detailUrl: prefix + "/detail/{id}",
+ sortName: "createTime",
+ sortOrder: "desc",
+ showExport: true,
clickToSelect: true,
modalName: "SOP",
- columns: [{
- checkbox: true
- },
- {
- title: '主键ID',
- field: 'id',
- visible: false
- },
- {
- field: 'sopId',
- title: 'SOPID'
- },
- {
- field: 'sopNum',
- title: 'SOP编号'
- },
- {
- field: 'productName',
- title: '品名'
- },
- {
- field: 'equipModel',
- title: '设备型号'
- },
- {
- field: 'describe',
- title: '描述'
- },
- {
- field: 'sopCode',
- title: '成品代码'
- },
- {
- field: 'sopName',
- title: '成品名称'
- },
- {
- field: 'sopModel',
- title: '规格型号'
- },
- {
- field: 'typeOfMachine',
- title: '机种'
- },
- {
- field: 'sopUnit',
- title: '单位',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(sopUnitDatas, value);
- }
- },
- {
- field: 'drawingFile',
- title: '图纸文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ pageList: [10, 25, 50],
+ pageSize: 10,
+ showColumns: false,
+ fixedColumns: true, // 启用冻结列
+ fixedRightNumber: 1, // 冻结右列个数
+ height: $(window).height() - 100,
+ columns: [
+ {checkbox: true},
+ {title: '主键ID',field: 'id',visible: false},
+ {field: 'sopId',title: 'SOPID'},
+ {field: 'sopNum',title: 'SOP编号'},
+ {field: 'productName',title: '品名'},
+ {field: 'equipModel',title: '设备型号'},
+ {field: 'describe',title: '描述'},
+ {field: 'sopCode',title: '成品代码'},
+ {field: 'sopName',title: '成品名称'},
+ {field: 'sopModel',title: '规格型号'},
+ {field: 'typeOfMachine',title: '机种'},
+ {field: 'sopUnit',title: '单位',formatter: function(value, row, index) {
+ return $.table.selectDictLabel(sopUnitDatas, value);
}
- return actions.join('');
- }
- },
- {
- field: 'workhourFile',
- title: '工时文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'drawingFile',title: '图纸文件',
+ formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'sopFile',
- title: 'SOP文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'workhourFile',title: '工时文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'sipFile',
- title: 'SIP文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'sopFile',title: 'SOP文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'sppFile',
- title: 'SPP文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'sipFile',title: 'SIP文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'bomFile',
- title: 'BOM文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'sppFile', title: 'SPP文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'customerFile',
- title: '客户文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'bomFile',title: 'BOM文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'otherFile',
- title: '其他文件',
- formatter: function(value, row, index) {
- var actions = [];
- if (value !== null) {
- var filepath = value.substring(value.lastIndexOf("/")+1)
- actions.push(''+filepath+' ');
+ },
+ {field: 'customerFile',title: '客户文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- return actions.join('');
- }
- },
- {
- field: 'customerCode',
- title: '客户编号'
- },
- {
- field: 'customerName',
- title: '客户名称'
- },
- {
- field: 'dateOfRegistration',
- title: '登记日期'
- },
- {
- field: 'sopRegistrant',
- title: '登记人'
- },
- {
- field: 'sopRemark',
- title: '备注说明'
- },
- {
- field: 'currentVersion',
- title: '是否当前版本',
- formatter: function (value, row, index) {
- return $.table.selectDictLabel(currentVersionDatas, value);
- }
- },
- {
- field: 'createTime',
- title: '录入时间',
- formatter: function (value, row, index) {
- if (value == null) {
- return " ";
- } else {
- return value;
+ },
+ {field: 'otherFile',title: '其他文件',formatter: function(value, row, index) {
+ var actions = [];
+ if (value !== null) {
+ var filepath = value.substring(value.lastIndexOf("/")+1)
+ actions.push(''+filepath+' ');
+ }
+ return actions.join('');
}
- }
- },
- {
- field: 'updateTime',
- title: '上次修改时间',
- formatter: function (value, row, index) {
- if (value == null) {
- return " ";
- } else {
- var vArr = value.split(',')
- return vArr[0];
+ },
+ {field: 'customerCode',title: '客户编号'},
+ {field: 'customerName',title: '客户名称'},
+ {field: 'dateOfRegistration',title: '登记日期'},
+ {field: 'sopRegistrant',title: '登记人'},
+ {field: 'sopRemark',title: '备注说明'},
+ {field: 'currentVersion',title: '是否当前版本',formatter: function (value, row, index) {
+ return $.table.selectDictLabel(currentVersionDatas, value);
}
- }
- }
+ },
+ {field: 'createTime',title: '录入时间',formatter: function (value, row, index) {
+ if (value == null) {
+ return " ";
+ } else {
+ return value;
+ }
+ }
+ },
+ {field: 'updateTime',title: '上次修改时间',formatter: function (value, row, index) {
+ if (value == null) {
+ return " ";
+ } else {
+ var vArr = value.split(',')
+ return vArr[0];
+ }
+ }
+ },
+ {title: '操作',align: 'center',formatter: function(value, row, index) {
+ var actions = [];
+ actions.push('编辑 ');
+ actions.push('详情');
+ actions.push('删除');
- // {
- // title: '操作',
- // align: 'center',
- // formatter: function(value, row, index) {
- // var actions = [];
- // actions.push('编辑 ');
- // actions.push('删除');
- // return actions.join('');
- // }
- // }
+ return actions.join('');
+ }
+ }
]
};
$.table.init(options);
});
-
$(function () {
getCustomerList();
});