From e6353524bed0f4b50284ca49c133d52c615fb361 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 15 八月 2023 18:57:05 +0800
Subject: [PATCH] 设备管理优化
---
igds-web/src/main/resources/static/admin/inout/in-weight.js | 169 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 167 insertions(+), 2 deletions(-)
diff --git a/igds-web/src/main/resources/static/admin/inout/in-weight.js b/igds-web/src/main/resources/static/admin/inout/in-weight.js
index 4577e0a..93b01f3 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-weight.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-weight.js
@@ -7,6 +7,7 @@
var timerWeight;
var paramIntelCard;//璁惧璇嗗埆缁撴灉
var paramIdCard;//璁惧璇嗗埆缁撴灉
+var curCheckItems = null;// 褰撳墠鏁版嵁鐨勬鏌ラ」淇℃伅
var step = 1;
$(function () {
@@ -114,6 +115,7 @@
deptId: deptId,
progress: recordData.progress,
bizType: bizType,
+ bizId: recordData.id,
plateNum: recordData.plateNum,
id1: snapDto1.id,
id2: snapDto2.id,
@@ -144,7 +146,6 @@
alertError("鍚庡彴璋冪敤鎴浘澶辫触锛岃閲嶆柊灏濊瘯");
}
});
-
//濡傛灉鏄浜屾绉伴噸锛岄粯璁ゆ墽琛岃嚜鍔ㄨ绠�
if (InoutProgress.WEIGHT_EMPTY == recordData.progress) {
deAutoByIn("emptyWeight");
@@ -491,5 +492,169 @@
//鏄剧ず璐ㄦ淇℃伅
function showCheck() {
- alertError("璋冩暣");
+ if (!recordData) {
+ alertError("娌℃湁涓氬姟鏁版嵁淇℃伅锛屾墽琛岃鎷掔粷");
+ return;
+ }
+
+ // 鑾峰彇鍖栭獙椤逛俊鎭�
+ flushCheckItem();
+
+ layer.open({
+ type: 1,
+ title: "璐ㄦ璇︾粏",
+ offset: ['120px', '100px'],
+ area: ['1000px', '520px'],
+ shade: 0,
+ content: $('#checkDetail'),
+ btnAlign: 'c',
+ btn: ['鍙栨秷'],
+ yes: function () {
+ layer.closeAll();
+ },
+ closeBtn: 0
+ });
+}
+
+/**
+ * 鍒锋柊鍖栭獙缁撴灉椤�
+ */
+function flushCheckItem() {
+
+ curCheckItems = null;
+ $.ajax({
+ type: "POST",
+ url: "../../basic/inout/get-check-item",
+ dataType: "json",
+ contentType: "application/json;charset=UTF-8",
+ data: JSON.stringify(recordData),
+ success: function (result) {
+ if (result.code != "0000") {
+ layer.msg(result.msg);
+ } else {
+ curCheckItems = result.data;
+
+ // 椤甸潰娓叉煋妫�娴嬮」
+ renderTableCheckItem();
+ }
+ },
+ error: function () {
+ layer.msg("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒");
+ }
+ });
+}
+
+/**
+ * 寮瑰嚭鎻愰啋妗�
+ * @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']});
+ }
+}
+
+/**
+ * 娓叉煋琛ㄦ牸
+ */
+function renderTableCheckItem() {
+ // 娓呯┖鏁版嵁
+ $("#tableCheckItem").empty();
+ table.render({
+ elem: '#tableCheckItem',
+ data: curCheckItems,
+ page: false,
+ even: true,
+ cols: [[{
+ field: 'standardName',
+ title: '妫�楠岄」鐩�',
+ align: 'center',
+ width: '13%'
+ }, {
+ field: 'value',
+ title: '妫�楠屽��',
+ align: 'center',
+ width: '9%'
+ }, {
+ field: 'operaSymbolValue',
+ title: '鏍囧噯鍊�',
+ align: 'center',
+ width: '10%'
+ }, {
+ field: 'unit',
+ title: '鍗曚綅',
+ align: 'center',
+ width: '10%'
+ }, {
+ field: 'deNum',
+ title: '鎵i噸',
+ align: 'center',
+ width: '9%'
+ }, {
+ field: 'addNum',
+ title: '澧為噸',
+ align: 'center',
+ width: '9%'
+ }, {
+ field: 'dePrice',
+ title: '鎵d环',
+ align: 'center',
+ width: '9%'
+ }, {
+ field: 'addPrice',
+ title: '澧炰环',
+ align: 'center',
+ width: '9%'
+ }, {
+ field: 'result',
+ title: '妫�楠岀粨鏋�',
+ align: 'center',
+ width: '10%',
+ templet: function (item) {
+ if (item.result == null) {
+ return "";
+ }
+ if (item.result == '0') {
+ return "涓嶅悎鏍�";
+ }
+ if (item.result == '1') {
+ return "鍚堟牸";
+ }
+ }
+ }, {
+ field: 'remarks',
+ title: '澶囨敞璇存槑',
+ align: 'center'
+ }]]
+ });
+
+ $("thead tr").css({
+ "border-bottom": "2px solid #53adce",
+ "background": "#eff4f6"
+ });
}
\ No newline at end of file
--
Gitblit v1.9.3