From 2e121f643a6776e6063796c104c95647faa000a8 Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期三, 16 八月 2023 11:52:32 +0800
Subject: [PATCH] 优化定时更新库存信息
---
igds-web/src/main/resources/static/admin/inout/in-sample.js | 66 +++++++++++++++++++--------------
1 files changed, 38 insertions(+), 28 deletions(-)
diff --git a/igds-web/src/main/resources/static/admin/inout/in-sample.js b/igds-web/src/main/resources/static/admin/inout/in-sample.js
index 6824ee7..f727125 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-sample.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-sample.js
@@ -309,7 +309,8 @@
btnAlign: 'c',
btn: ['鎵撳嵃骞朵繚瀛�', '浠呬繚瀛�', '鍏抽棴鍙栨秷'],
yes: function () {
- printSimpleStart();
+ printBar(curSampleData);
+ submit();
}, btn2: function () {
// 鏇存柊鍒伴〉闈�
var data = form.val("form-detail");
@@ -321,32 +322,6 @@
layer.closeAll();
},
closeBtn: 0
- });
-}
-
-
-//鎵ц鎵撳嵃
-function printSimpleStart() {
- var index = layer.load();
- $.ajax({
- type: "POST",
- url: "../../basic/inout/report/bill-simple",
- dataType: "json",
- contentType: "application/json;charset=UTF-8",
- data: JSON.stringify(curSampleData),
- success: function (result) {
- layer.close(index);
- if (result.code != "0000") {
- alertError(result.msg);
- } else {
- printSimpleBill(result.data);
- submit();
- }
- },
- error: function () {
- layer.close(index);
- alertError("鎵撳嵃鍗曟嵁璋冪敤澶辫触");
- }
});
}
@@ -370,7 +345,7 @@
success: function (result) {
if (result.code != "0000") {
layer.close(index);
- notify(result.msg, result.data);
+ alertError(result.msg);
} else {
layer.closeAll();
curSampleData = null;
@@ -383,4 +358,39 @@
alertError("鎻愪氦澶辫触锛岃閲嶆柊灏濊瘯");
}
});
+}
+
+/**
+ * 寮瑰嚭鎻愰啋妗�
+ * @param msg 鎻愰啋淇℃伅
+ * @param data 鏁版嵁淇℃伅锛屽彲鑳戒负绌�
+ */
+function notify(msg, data) {
+ if (data) {
+ //璧嬪��
+ $("#resultMsg").text(msg);
+ $("#resultUserName").text(data.userName);
+ $("#resultPlateNum").text(data.plateNum);
+ if ("IN" == data.type) {
+ $("#resultType").text("鍏ュ簱-" + INOUT_PROGRESS_MSG(data.progress));
+ } else {
+ $("#resultType").text("鍑哄簱-" + INOUT_PROGRESS_MSG(data.progress));
+ }
+ $("#resultIntelCard").text(data.intelCard);
+
+ layer.open({
+ type: 1,
+ offset: ['150px', '200px'],
+ area: '450px;',
+ shade: 0.8,
+ id: 'dialog_notify_info',
+ btn: ['纭畾'],
+ content: $('#dialog-from-notify'),
+ yes: function (index) {
+ layer.closeAll();
+ }
+ });
+ } else {
+ layer.alert(msg, {offset: ['300px', '300px']});
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3