From 96bde00068fd7d84d6dd70fa9075214e634a2a9a Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 16 一月 2026 14:18:32 +0800
Subject: [PATCH] 基础档案优化
---
src/main/webapp/static/js/mat/mat.js | 10 +++++-----
src/main/webapp/views/mat/mat.html | 4 ++--
src/main/java/com/zy/asrs/entity/Mat.java | 2 +-
src/main/webapp/static/js/common.js | 18 +++++++++++++++---
4 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/Mat.java b/src/main/java/com/zy/asrs/entity/Mat.java
index 3f9f07c..b3abbfd 100644
--- a/src/main/java/com/zy/asrs/entity/Mat.java
+++ b/src/main/java/com/zy/asrs/entity/Mat.java
@@ -177,7 +177,7 @@
* 瀹夊叏搴撳瓨閲�
*/
@ApiModelProperty(value= "瀹夊叏搴撳瓨閲�")
- @ExcelProperty(value = "褰掗浂闃�鍊�")
+ @ExcelProperty(value = "褰掗浂闃堝��")
@TableField("safe_qty")
private Double safeQty;
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 2344abf..6afd506 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -212,7 +212,7 @@
}
}
, {
- field: 'safeQty', align: 'center', title: '褰掗浂闃�鍊�', templet: function (d) {
+ field: 'safeQty', align: 'center', title: '褰掗浂闃堝��', templet: function (d) {
var raw = d.safeQty;
if (raw === null || raw === undefined) return '';
if (typeof raw === 'string' && raw.trim() === '') return '';
@@ -279,6 +279,8 @@
, {
field: 'realQty', align: 'center', title: '瀹為檯鏁伴噺', hide: false, templet: function (d) {
var raw = d.realQty;
+ // var ioType = d.ioType;
+ // console.log(ioType)
if (raw === null || raw === undefined) return '';
if (typeof raw === 'string' && raw.trim() === '') return '';
var num = Number(raw);
@@ -286,11 +288,21 @@
return num.toFixed(2);
}
}
- , {field: 'weight', align: 'center', title: '瀹為檯閲嶉噺锛堝叕鏂わ級', hide: false, width: 120}
+ , {
+ field: 'stockQty', align: 'center', title: '搴撳瓨鏁伴噺', hide: false, templet: function (d) {
+ var raw = d.stockQty;
+ if (raw === null || raw === undefined) return '';
+ if (typeof raw === 'string' && raw.trim() === '') return '';
+ var num = Number(raw);
+ if (!isFinite(num)) return '';
+ return num.toFixed(2);
+ }
+ }
+ , {field: 'weight', align: 'center', title: '閲嶉噺锛堝叕鏂わ級', hide: false, width: 120}
, {field: 'zpallet', align: 'center', title: 'SN', hide: false}
, {field: 'specs', align: 'center', title: '瑙勬牸', hide: false}
, {
- field: 'safeQty', align: 'center', title: '褰掗浂闃�鍊�', hide: true, templet: function (d) {
+ field: 'safeQty', align: 'center', title: '褰掗浂闃堝��', hide: true, templet: function (d) {
var raw = d.safeQty;
if (raw === null || raw === undefined) return '';
if (typeof raw === 'string' && raw.trim() === '') return '';
diff --git a/src/main/webapp/static/js/mat/mat.js b/src/main/webapp/static/js/mat/mat.js
index 777cab7..1e753ff 100644
--- a/src/main/webapp/static/js/mat/mat.js
+++ b/src/main/webapp/static/js/mat/mat.js
@@ -301,11 +301,11 @@
// 鍥炴樉琛ㄥ崟鏁版嵁
form.val('detail', mData);
// 鏂板鑷姩鐢熸垚鍟嗗搧缂栧彿
- if (!mData) {
- http.get(baseUrl + "/mat/auto/matnr/auth", null, function (res) {
- $('#matnr').val(res.data);
- })
- }
+ // if (!mData) {
+ // http.get(baseUrl + "/mat/auto/matnr/auth", null, function (res) {
+ // $('#matnr').val(res.data);
+ // })
+ // }
// 琛ㄥ崟鎻愪氦浜嬩欢
form.on('submit(editSubmit)', function (data) {
data.field.tagId = insXmSel.getValue('valueStr');
diff --git a/src/main/webapp/views/mat/mat.html b/src/main/webapp/views/mat/mat.html
index 87d20c3..6c13cf7 100644
--- a/src/main/webapp/views/mat/mat.html
+++ b/src/main/webapp/views/mat/mat.html
@@ -228,9 +228,9 @@
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label layui-form-required">褰掗浂闃�鍊�</label>
+ <label class="layui-form-label layui-form-required">褰掗浂闃堝��</label>
<div class="layui-input-block">
- <input id="safeQty" name="safeQty" placeholder="璇疯緭鍏ラ榾鍊�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
+ <input id="safeQty" name="safeQty" placeholder="璇疯緭鍏ラ槇鍊�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
</div>
</div>
<div class="layui-form-item">
--
Gitblit v1.9.1