From 577a4d707c1e888d7b28a6d2a53dd851d48b6cb8 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期二, 15 三月 2022 09:39:40 +0800
Subject: [PATCH] Changes
---
src/main/webapp/views/receiveDetl/receiveDetl.html | 23 ++++++-
src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java | 10 +++
src/main/webapp/static/js/receiveDetl/receiveDetl.js | 100 +++++++++++++++++++++++++++++++++
src/main/java/receiveDetl.sql | 10 +-
src/main/java/zy/cloud/wms/common/CodeBuilder.java | 2
src/main/resources/application.yml | 2
6 files changed, 136 insertions(+), 11 deletions(-)
diff --git a/src/main/java/receiveDetl.sql b/src/main/java/receiveDetl.sql
index a8f219d..9fdc860 100644
--- a/src/main/java/receiveDetl.sql
+++ b/src/main/java/receiveDetl.sql
@@ -11,8 +11,8 @@
-- sqlserver
insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl/receiveDetl.html', N'receiveDetl绠$悊', null, '2', null, '1');
-insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#view', N'鏌ヨ', '30533', '3', '0', '1');
-insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-add', N'鏂板', '30533', '3', '1', '1');
-insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-edit', N'缂栬緫', '30533', '3', '2', '1');
-insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-delete', N'鍒犻櫎', '30533', '3', '3', '1');
-insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-export', N'瀵煎嚭', '30533', '3', '4', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#view', N'鏌ヨ', '30529', '3', '0', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-add', N'鏂板', '30529', '3', '1', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-edit', N'缂栬緫', '30529', '3', '2', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-delete', N'鍒犻櫎', '30529', '3', '3', '1');
+insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'receiveDetl#btn-export', N'瀵煎嚭', '30529', '3', '4', '1');
diff --git a/src/main/java/zy/cloud/wms/common/CodeBuilder.java b/src/main/java/zy/cloud/wms/common/CodeBuilder.java
index 8ae6b79..5800173 100644
--- a/src/main/java/zy/cloud/wms/common/CodeBuilder.java
+++ b/src/main/java/zy/cloud/wms/common/CodeBuilder.java
@@ -20,7 +20,7 @@
// generator.password="xltys1995";
// generator.table="sys_host";
// sqlserver
- generator.url="localhost:1433;databasename=wms_saas";
+ generator.url="192.168.4.15:1433;databasename=wms_saas";
generator.username="sa";
generator.password="sa@123";
generator.table="man_receive_detl";
diff --git a/src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java b/src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java
index 026e6cf..d14fa77 100644
--- a/src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java
+++ b/src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java
@@ -253,6 +253,16 @@
return null;
}
+ public String getState$(){
+ if (this.inQty == 0){
+ return "鏈叆搴�";
+ }
+ if (count - inQty != 0){
+ return "鍏ュ簱涓�";
+ }
+ return "宸插畬鎴�";
+ }
+
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index b0d2ab6..207b003 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -14,7 +14,7 @@
# password: xltys1995
# sql-server
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- url: jdbc:sqlserver://localhost:1433;databasename=wms_saas
+ url: jdbc:sqlserver://192.168.4.15:1433;databasename=wms_saas
username: sa
password: sa@123
mvc:
diff --git a/src/main/webapp/static/js/receiveDetl/receiveDetl.js b/src/main/webapp/static/js/receiveDetl/receiveDetl.js
index 23a1ebc..39bc7ec 100644
--- a/src/main/webapp/static/js/receiveDetl/receiveDetl.js
+++ b/src/main/webapp/static/js/receiveDetl/receiveDetl.js
@@ -1,7 +1,7 @@
var pageCurr;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
-}).use(['table','laydate', 'form', 'admin'], function(){
+}).use(['table','laydate', 'form', 'admin', 'treeTable', 'xmSelect'], function(){
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
@@ -70,6 +70,100 @@
limit();
}
});
+
+ var insTb = layui.treeTable.render({
+ elem: '#node',
+ url: baseUrl+'/node/tree/auth',
+ headers: {token: localStorage.getItem('token')},
+ height: 'full-200',
+ tree: {
+ iconIndex: 2, // 鎶樺彔鍥炬爣鏄剧ず鍦ㄧ鍑犲垪
+ isPidData: true, // 鏄惁鏄痠d銆乸id褰㈠紡鏁版嵁
+ idName: 'id', // id瀛楁鍚嶇О
+ pidName: 'parentId' // pid瀛楁鍚嶇О
+ },
+ cols: [[
+ {type: 'checkbox'}
+ ,{type: 'numbers'}
+ ,{field: 'name', align: 'left',title: '鍚嶇О', minWidth: 150}
+ ,{field: 'type$', align: 'center',title: '绫诲瀷'}
+ ,{field: 'leading', align: 'center',title: '璐熻矗浜�'}
+ ,{field: 'sort', align: 'center',title: '鎺掑簭', hide: true}
+ ,{field: 'status$', align: 'center',title: '鐘舵��'}
+ ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
+ ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+ ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
+ ]],
+ done: function (data) {
+ $('.ew-tree-table-box').css('height', '100%');
+ insTb.expandAll();
+ }
+ });
+ /* 鏄剧ず琛ㄥ崟寮圭獥 */
+ function showNodeSelect() {
+ admin.open({
+ type: 1,
+ area: '400px',
+ title: '閫夋嫨鍏ュ簱璐т綅',
+ content: $('#nodeSelect').html(),
+ success: function (layero, dIndex) {
+ // 琛ㄥ崟鎻愪氦浜嬩欢
+ form.on('submit(pakin)', function (data) {
+ data.field.nodeSel = insXmSel.getValue('valueStr');
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/work/stock/pakin",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify({
+ nodeId: data.field.nodeSel,
+ mats: matCodeData
+ }),
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.close(dIndex);
+ matCodeData = [];
+ tableIns.reload({data: matCodeData});
+ limit();
+ layer.msg(res.msg, {icon: 1});
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ return false;
+ });
+ // 娓叉煋涓嬫媺鏍�
+ var insXmSel = layui.xmSelect.render({
+ el: '#nodeSels',
+ height: '250px',
+ data: insTb.options.data,
+ initValue: [],
+ model: {label: {type: 'text'}},
+ prop: {
+ name: 'name',
+ value: 'id'
+ },
+ radio: true,
+ clickClose: true,
+ tree: {
+ show: true,
+ indent: 15,
+ strict: false,
+ expandedKeys: true
+ }
+ });
+ // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ }
+ });
+ }
// 鐩戝惉鎺掑簭浜嬩欢
table.on('sort(receiveDetl)', function (obj) {
@@ -157,6 +251,9 @@
case "add":
// showEditModel(data);
startIn(data);
+ break;
+ case "chooseLoc":
+ showNodeSelect();
break;
}
});
@@ -296,3 +393,4 @@
page: {curr: pageCurr}
});
}
+
diff --git a/src/main/webapp/views/receiveDetl/receiveDetl.html b/src/main/webapp/views/receiveDetl/receiveDetl.html
index c7ec1fc..1982ca1 100644
--- a/src/main/webapp/views/receiveDetl/receiveDetl.html
+++ b/src/main/webapp/views/receiveDetl/receiveDetl.html
@@ -43,10 +43,26 @@
<script type="text/html" id="operate">
<!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>-->
- <a class="layui-btn layui-btn-xs btn-edit" lay-event="add">寮�濮嬪叆搴�</a>
+ <a class="layui-btn layui-btn-normal layui-btn-xs btn-edit" lay-event="add">涓婃灦</a>
+ <a class="layui-btn layui-btn-xs btn-edit" lay-event="chooseLoc">閫夋嫨搴撲綅</a>
+
<!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a>-->
</script>
+<script type="text/html" id="nodeSelect">
+ <form id="details" lay-filter="detail" class="layui-form">
+ <div class="layui-form-item">
+ <label class="layui-form-label">涓婃灦璐т綅</label>
+ <div class="layui-input-block">
+ <div id="nodeSels" class="ew-xmselect-tree"></div>
+ </div>
+ </div>
+ <div class="layui-form-item text-right">
+ <button class="layui-btn" lay-filter="pakin" lay-submit="">纭鍏ュ簱</button>
+ <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
+ </div>
+ </form>
+</script>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
@@ -112,13 +128,14 @@
鍏ュ簱浣嶇疆:
</label>
<div class="layui-input-block">
- <input type="number" class="layui-input" placeholder="鍙洿鎺ョ偣鍑昏嚜鍔ㄥ叆搴�">
+ <div id="nodeSel" class="ew-xmselect-tree"></div>
+<!-- <input type="number" class="layui-input" placeholder="鍙洿鎺ョ偣鍑昏嚜鍔ㄥ叆搴�">-->
</div>
</div>
</div>
<hr class="layui-bg-gray">
<div class="layui-form-item text-right">
- <button class="layui-btn" lay-filter="recommendIn" lay-submit="">鑷姩鍏ュ簱</button>
+<!-- <button class="layui-btn" lay-filter="recommendIn" lay-submit="">鑷姩鍏ュ簱</button>-->
<button class="layui-btn layui-btn-normal" lay-filter="inLoc" lay-submit="">鍏ュ簱</button>
<button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
</div>
--
Gitblit v1.9.1