From 9cbe0c3bb7a4c6ad9bb78babff49c015babc0b13 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 11 三月 2024 16:51:21 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/wrkMastSta/wrkMastSta.js | 51 +++++++++++++++++++++----
src/main/java/com/zy/asrs/controller/WrkMastStaController.java | 25 ++++++++++++
src/main/webapp/views/wrkMastSta/wrkMastSta.html | 4 ++
3 files changed, 71 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/WrkMastStaController.java b/src/main/java/com/zy/asrs/controller/WrkMastStaController.java
index f5277d8..256d5c5 100644
--- a/src/main/java/com/zy/asrs/controller/WrkMastStaController.java
+++ b/src/main/java/com/zy/asrs/controller/WrkMastStaController.java
@@ -66,6 +66,31 @@
return R.ok();
}
+ @RequestMapping(value = "/wrkMastSta/add1/auth")
+ @ManagerAuth
+ public R add1(Integer staNo) {
+ List<WrkMastSta> wrkMastStaList = wrkMastStaService.selectList(new EntityWrapper<WrkMastSta>().eq("wrk_no", (long) (19999 + staNo)));
+ if (wrkMastStaList.size()!=0){
+ return R.error("璇峰嬁閲嶅娣诲姞锛侊紒锛�");
+ }
+ Date now = new Date();
+ WrkMastSta wrkMastSta = new WrkMastSta();
+ wrkMastSta.setWrkNo((long)(19999+staNo));
+ wrkMastSta.setWrkStart(staNo);
+ wrkMastSta.setStaStart(staNo);
+ wrkMastSta.setWrkEnd(staNo);
+ wrkMastSta.setStaEnd(staNo);
+ wrkMastSta.setWrkType(1);
+ wrkMastSta.setWrkSts(0);
+ wrkMastSta.setType(2);
+ wrkMastSta.setBignTime(now);
+ wrkMastSta.setCreateTime(now);
+ wrkMastSta.setLineNumber(0);
+ wrkMastSta.setUpdateTime(now);
+ wrkMastStaService.insert(wrkMastSta);
+ return R.ok();
+ }
+
@RequestMapping(value = "/wrkMastSta/update/auth")
@ManagerAuth
public R update(WrkMastSta wrkMastSta){
diff --git a/src/main/webapp/static/js/wrkMastSta/wrkMastSta.js b/src/main/webapp/static/js/wrkMastSta/wrkMastSta.js
index 5ecf639..9253564 100644
--- a/src/main/webapp/static/js/wrkMastSta/wrkMastSta.js
+++ b/src/main/webapp/static/js/wrkMastSta/wrkMastSta.js
@@ -83,15 +83,31 @@
case 'addData':
showEditModel();
break;
+ case 'addData1':
+ var staNo = 118;
+ showEditModel1(staNo);
+ break;
+ case 'addData2':
+ var staNo = 119;
+ showEditModel1(staNo);
+ break;
+ case 'addData3':
+ var staNo = 120;
+ showEditModel1(staNo);
+ break;
+ case 'addData4':
+ var staNo = 121;
+ showEditModel1(staNo);
+ break;
case 'deleteData':
- if (checkStatus.length === 0) {
- layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
- return;
- }
- del(checkStatus.map(function (d) {
- return d.id;
- }));
- break;
+ if (checkStatus.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+ return;
+ }
+ del(checkStatus.map(function (d) {
+ return d.id;
+ }));
+ break;
case 'exportData':
admin.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
var titles=[];
@@ -147,6 +163,23 @@
});
/* 寮圭獥 - 鏂板銆佷慨鏀� */
+ function showEditModel1(mData) {
+ $.ajax({
+ url: baseUrl+"/wrkMastSta/add1/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ data: {staNo: mData},
+ async: false,
+ success: function (res) {
+ layer.closeAll();
+ if (res.code === 200) {
+ layer.msg(res.msg, {icon: 2})
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ });
+ }
function showEditModel(mData) {
admin.open({
type: 1,
@@ -268,5 +301,5 @@
tableIns.reload({
where: searchData,
page: {curr: pageCurr}
- });
+ });
}
diff --git a/src/main/webapp/views/wrkMastSta/wrkMastSta.html b/src/main/webapp/views/wrkMastSta/wrkMastSta.html
index f16dfe1..ceed6e3 100644
--- a/src/main/webapp/views/wrkMastSta/wrkMastSta.html
+++ b/src/main/webapp/views/wrkMastSta/wrkMastSta.html
@@ -91,6 +91,10 @@
<script type="text/html" id="toolbar">
<div class="layui-btn-container">
<button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>
+ <button class="layui-btn layui-btn-sm" id="btn-add1" lay-event="addData1">118</button>
+ <button class="layui-btn layui-btn-sm" id="btn-add2" lay-event="addData2">119</button>
+ <button class="layui-btn layui-btn-sm" id="btn-add3" lay-event="addData3">120</button>
+ <button class="layui-btn layui-btn-sm" id="btn-add4" lay-event="addData4">121</button>
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>-->
<!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">瀵煎嚭</button>-->
</div>
--
Gitblit v1.9.1