From 904a7c349b4d6dbdcbd2a95d0a66582ee43e81fa Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 07 七月 2022 15:44:21 +0800
Subject: [PATCH] 所有扫码模决单据内码获取方式用最新的

---
 WebTM/views/验收入库/其他入库/Kf_OtherInBill_FastList.html |  230 ++++++++++++++++++++++++++++-----------------------------
 1 files changed, 112 insertions(+), 118 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_FastList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_FastList.html"
index e6a9def..2c59f83 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_FastList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_FastList.html"
@@ -123,19 +123,69 @@
         , element = layui.element;
         //娓呯┖鐣岄潰  new
 
-        var sBillType = '1203'
+        var sBillType = '1203';
+        var col = [];
         //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
 
         //鍔犺浇婧愬崟绫诲瀷
+        set_ClearBill();
+        //鍒濆鍖栫晫闈�
+        function set_ClearBill() {
+            get_Display();
+            //宸蹭笂浼犲垪琛�
+            table.render({
+                elem: '#yd-table'
+                , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
+                , toolbar: '#toolbarDemo'
+                , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+                , page: true  // 寮�鍚垎椤�
+                , limits: [20, 40, 80, 100]
+                , limit: 20
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            })
+            //宸蹭笂浼犳煡璇�
+            table.render({
+                elem: '#sy-table'
+                , toolbar: '#toolbarDemo'
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                ]]
+                , height: 500
+            })
+        }
 
-        //璇诲彇鍗曟嵁鍒楄〃
-        //
-
+        //閫�鍑�
         form.on('submit(Cancel)', function () {
             parent.location.href = "../../../views/index.html"
             //window.close();//鍏抽棴褰撳墠椤�
         })
-
+        //缂栬緫
         form.on('submit(cmdModify)', function () {
             var checkStatus = table.checkStatus('dj-table')
                      , data = checkStatus.data;
@@ -156,30 +206,10 @@
             })
         });
 
-
-        form.on('submit(cmdRefresh)', function () {//鍒锋柊
+        //鍒锋柊
+        form.on('submit(cmdRefresh)', function () {
+            get_Display();
             table.render({
-                elem: '#dj-table'
-                , url: GetWEBURL() + '/Web/chanpinruk'
-                , toolbar: '#toolbarDemo'
-                , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
-                , cols: [[
-                    { type: 'radio' }
-                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
-                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
-                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
-                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                    , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
-                    , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-                ]]
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            }),
-                table.render({
                     elem: '#yd-table'
                     , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
                     , toolbar: '#toolbarDemo'
@@ -206,8 +236,7 @@
                     }
                 })
         });
-
-
+        
         //鎾ら攢鍔熻兘
         form.on('submit(cmdRescind)', function () {
             var checkStatus = table.checkStatus('yd-table')
@@ -267,26 +296,7 @@
                             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: '1203', 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
-                                    })
+                                    get_Display();
                                 }
                                 else {
                                     layer.msg(data.Message, { icon: 2 });
@@ -333,77 +343,61 @@
         });
         
        
-        
-        table.render({
-            elem: '#dj-table'
-            , url: GetWEBURL() + '/Web/chanpinruk'
-            , toolbar: '#toolbarDemo'
-            , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
-            , cols: [[
-                { type: 'radio' }
-                , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
-                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
-                , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
-                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
-                , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
-                , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-            ]]
-            , height: 500
-            , done: function () {
-                layer.closeAll("loading");
-            }
-        })
+        //鍔犺浇缂撳瓨鍒楄〃鏁版嵁
+        function get_Display() {
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/Web/GetOtherInBillMain_TempList_New',
+                type: "GET",
+                data: { "HBillType": sBillType, "sHMaker": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"]},
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        var data = [];
+                        //缁欑┖鐨勬暟缁勮祴鍊�
+                        for (var key in data1.list) {
+                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                        }
 
+                        for (var i = 0; i < data.length; i++) {
+                            if (data[i].name == '鍗曟嵁鍐呯爜' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            else {
+                                switch (data[i].Type) {
+                                    //int
+                                    case 'DateTime':
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                }
+                            }
+                        }
 
-        //宸蹭笂浼犲垪琛�
-        table.render({
-            elem: '#yd-table'
-            , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
-            , toolbar: '#toolbarDemo'
-            , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
-            , page: true  // 寮�鍚垎椤�
-            , limits: [20, 40, 80, 100]
-            , limit: 20
-            , cols: [[
-                { type: 'radio' }
-                , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
-                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
-                , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
-                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
-                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                , { field: 'HOrgID', title: '缁勭粐', width: 120 }
-            ]]
-            , height: 500
-            , done: function () {
-                layer.closeAll("loading");
-            }
-        })
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        table.render({
+                            elem: '#dj-table'
+                            , cols: [col]
+                            , data: data1.data
+                            , height: 550
+                            , page: true
+                            , cellMinWidth: 90
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                        });
 
-        //宸蹭笂浼犳煡璇�
-        table.render({
-            elem: '#sy-table'
-            , toolbar: '#toolbarDemo'
-            , cols: [[
-                { type: 'radio' }
-                , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
-                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
-                , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
-                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
-                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                , { field: 'HOrgID', title: '缁勭粐', width: 120 }
-            ]]
-            , height: 500
-        })
+                        layer.close(ajaxLoad);
+                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
 
         //鍒锋柊鏄庣粏椤电
         table.render({

--
Gitblit v1.9.1