From 46b06e0e3cea557bd515c249378fd0ffb56fc512 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期五, 24 十二月 2021 13:31:52 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI

---
 WebTM/views/验收入库/外购入库/Kf_POStockInBill_FastList.html |   97 ++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 76 insertions(+), 21 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html"
index aa03ba0..4d908b4 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html"
@@ -67,6 +67,9 @@
                                     <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">鍒锋柊</button>
                                 </div>
                                 <div class="layui-col-xs2">
+                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRescind">鎾ら攢</button>
+                                </div>
+                                <div class="layui-col-xs2">
                                     <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">閫�鍑�</button>
                                 </div>
                                 <div class="layui-col-xs2">
@@ -155,6 +158,45 @@
         });
 
 
+        //鎾ら攢鍔熻兘
+        form.on('submit(cmdRescind)', function () {
+            var checkStatus = table.checkStatus('yd-table')
+                , data = checkStatus.data;
+            var sInterID = data[0].HInterID
+            var sBillNo = data[0].HBillNo
+            var sBillType = '1201'
+            $.ajax(
+                {
+                    type: "Get",
+                    url: GetWEBURL() + "/Web/Rescind_Json",
+                    async: true,
+                    data: { "sHInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
+                    dataType: "json",
+                    success: function (data) {
+                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                // 寰楀埌frame绱㈠紩
+                                var index = layer.getFrameIndex(window.name);
+                                //鍏抽棴褰撳墠frame
+                                layer.close(index);
+                                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                window.location.reload();
+                            }
+                       else {
+                            layer.msg(data.Message, { icon: 2 });
+                        }
+                    },
+                    error: function (err) {
+                        layer.msg('閿欒' + err, {
+                            icon: 5,
+                            time: 20000
+                        }, function () {
+                            //do something
+                        });
+                    }
+                });
+        });
+
 
         form.on('submit(cmdDelete)', function () {//鍒犻櫎
             var checkStatus = table.checkStatus('dj-table')
@@ -178,26 +220,13 @@
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                           //layer.msg(data.Message, { icon: 1 });
-                           table.render({
-                               elem: '#dj-table'
-                               , url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json'
-                               , cellMinWidth: 80
-                               , toolbar: '#toolbarDemo'
-                               , where: { HBillType: '1201', sWhere: '' }
-                               , cols: [[
-                                   { type: 'radio' }
-                                , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
-                                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
-                                , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
-                                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
-                                , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                                , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 100 }
-                                , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-                               ]]
-                         , height: 500
-                           })
+                           layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                               // 寰楀埌frame绱㈠紩
+                               var index = layer.getFrameIndex(window.name);
+                               //鍏抽棴褰撳墠frame
+                               layer.close(index);
+                               //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                               window.location.reload();
                        }
                        else {
                            layer.msg(data.Message, { icon: 2 });
@@ -237,7 +266,33 @@
                       , done: function () {
                           layer.closeAll("loading");
                       }
-    })
+                })
+
+        //宸蹭笂浼犲垪琛�
+        var
+            table.render({
+                elem: '#yd-table'
+                , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
+                , toolbar: '#toolbarDemo'
+                , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
+                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
+                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 100 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            })
         //鍒锋柊鏄庣粏椤电
         table.render({
             elem: '#mx-table'

--
Gitblit v1.9.1