From b8c1da262aa8576932427b0a5b461da759730be3 Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期六, 19 六月 2021 14:09:17 +0800
Subject: [PATCH] 1.平仓调整库存与erp进行通讯 2.修改库存数量进行优化

---
 src/main/webapp/static/js/locNormal/locNormal.js |   44 ++++++++++++++++++++++++++++----------------
 1 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/src/main/webapp/static/js/locNormal/locNormal.js b/src/main/webapp/static/js/locNormal/locNormal.js
index c331026..b018ea7 100644
--- a/src/main/webapp/static/js/locNormal/locNormal.js
+++ b/src/main/webapp/static/js/locNormal/locNormal.js
@@ -9,7 +9,7 @@
     )
     cols.push.apply(cols, locNormalCols);
     cols.push(
-        {field: 'warehouse', align: 'center', title: '搴撳尯'}
+        {field: 'warehouse$', align: 'center', title: '搴撳尯'}
         , {field: 'state', align: 'center', title: '鍑哄叆搴撶姸鎬�', templet: '#locNormalState'}
         , {field: 'modiUser$', align: 'center', title: '淇敼浜哄憳', hide: true}
         , {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿', hide: true}
@@ -21,7 +21,7 @@
 
 // 鑾峰彇浠撳簱涓嬫媺
 $.ajax({
-    url: baseUrl+"/locArea/queryAll/auth",
+    url: baseUrl + "/locArea/queryAll/auth",
     headers: {'token': localStorage.getItem('token')},
     // data: top.reObject(data),
     method: 'POST',
@@ -143,7 +143,7 @@
             records.map(function (item) {
                 locArea.map(function (d) {
                     if (d.uuid == item.warehouse) {
-                        item.warehouse = d.name;
+                        item.warehouse$ = d.name;
                     }
                 })
             });
@@ -223,14 +223,26 @@
             matnr: matnr,
             anfme: count,
             id: id,
+            warehouse: obj.data.warehouse,
+            supplier: obj.data.supplier,
+            mnemonic: obj.data.mnemonic,
         }
-        $.ajax({
-            url: baseUrl + "/locNormal/update/auth",
-            headers: {'token': localStorage.getItem('token')},
-            data: top.reObject(param),
-            method: 'POST',
-            success: function (res) {
-            },
+        layer.confirm("纭畾淇敼" + obj.data.maktx + "鐨勬暟閲忓悧", {
+            btn: ['纭畾', '鍙栨秷']
+        }, function () {
+            // 鎸夐挳1鐨勪簨浠�
+            $.ajax({
+                url: baseUrl + "/locNormal/update/auth",
+                headers: {'token': localStorage.getItem('token')},
+                data: top.reObject(param),
+                method: 'POST',
+                success: function (res) {
+                    layer.msg("")
+                },
+            });
+        }, function () {
+            // 鎸夐挳2鐨勪簨浠�
+            tableIns.reload();
         });
     });
 
@@ -256,9 +268,9 @@
         }
         switch (obj.event) {
             case 'outLocNormal':
-                layer.confirm('纭畾瑕佸嚭搴揫'+data.matnr+']鍚楋紵', {
+                layer.confirm('纭畾瑕佸嚭搴揫' + data.matnr + ']鍚楋紵', {
                     btn: ['纭畾', '鍙栨秷'] //鍙互鏃犻檺涓寜閽�
-                }, function(index, layero){
+                }, function (index, layero) {
                     //纭畾鍥炶皟-鍑哄簱
                     $.ajax({
                         url: baseUrl + "/locNormal/outLoc/auth",
@@ -271,15 +283,15 @@
                             layer.msg("鍑哄簱鎴愬姛");
                         },
                     });
-                }, function(index){
+                }, function (index) {
                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                 });
                 break;
             case 'removeLocNormal':
                 // 绉婚櫎
-                layer.confirm('纭畾瑕佺Щ闄'+data.matnr+']鍚楋紵', {
+                layer.confirm('纭畾瑕佺Щ闄' + data.matnr + ']鍚楋紵', {
                     btn: ['纭畾', '鍙栨秷'] //鍙互鏃犻檺涓寜閽�
-                }, function(index, layero){
+                }, function (index, layero) {
                     //纭畾鍥炶皟-绉婚櫎
                     $.ajax({
                         url: baseUrl + "/locNormal/removeLoc/auth",
@@ -292,7 +304,7 @@
                             layer.msg("绉婚櫎鎴愬姛");
                         },
                     });
-                }, function(index){
+                }, function (index) {
                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                 });
                 break;

--
Gitblit v1.9.1