From ccd2eb19f83850b4d2b042d35b40e928ffa6d228 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 10 一月 2025 16:08:04 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/验收入库/委外入库/Kf_EntrustInBill_FastList.html |  214 +++++++++++++++++++++++++++++++++++------------------
 1 files changed, 142 insertions(+), 72 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_FastList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_FastList.html"
index 5d9699b..eca6199 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_FastList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_FastList.html"
@@ -120,7 +120,8 @@
         , layer = layui.layer
         , table = layui.table
         , form = layui.form
-        , element = layui.element;
+            , element = layui.element;
+        var option = {};
         //娓呯┖鐣岄潰  new
         var sBillType = '1210'
         //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
@@ -132,8 +133,10 @@
 
 
         //閫�鍑�
-        form.on('submit(Cancel)', function () {
-            parent.location.href = "../../../views/index.html"
+        form.on('submit(cmdCancel)', function () {
+            layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+                parent.location.href = "../../../views/index_Mobile.html"
+            });
             //window.close();//鍏抽棴褰撳墠椤�
         })
         //缂栬緫
@@ -158,44 +161,27 @@
         });
          //鍒锋柊
         form.on('submit(cmdRefresh)', function () {//
-            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: 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
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            }),
+            table.render(option);
                 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: 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: '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: 100 }
-                        , { field: 'HOrgID', title: '缁勭粐', width: 100 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                        , { field: 'HOrgID', title: '缁勭粐', width: 150 }
                     ]]
                     , height: 500
                     , done: function () {
@@ -291,9 +277,10 @@
         form.on('submit(cmdQuery)', function () {
             var HBillNo = $("#HBillNo").val();
             var HSourceBillNo = $("#HSourceBillNo").val();
+            var index = layer.load();//閬僵
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
             $.ajax({
-                url: GetWEBURL() + '/Gy_Mould/list1',
+                url: GetWEBURL() + '/Web/QueryBillUpdateLoad_Json',
                 type: "GET",
                 data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo },
                 success: function (data1) {
@@ -316,27 +303,107 @@
 
 
         
-        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: 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
-            , done: function () {
-                layer.closeAll("loading");
+        //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");
+        //    }
+        //})
+
+
+
+        //鍔ㄦ�佸垪
+        $.ajax({
+            url: GetWEBURL() + "/Web/chanpinruk1",
+            type: "GET",
+            async: false,
+            data: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] },
+            //async: false,
+            success: function (data1) {
+
+                if (data1.count == 1) {
+
+                    var data = [];
+                    var col = [];
+                    //缁欑┖鐨勬暟缁勮祴鍊�
+                    for (var key in data1.list) {
+                        data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                    }
+                    //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                    col.push({ type: 'radio', fixed: 'left' });
+                    for (var i = 0; i < data.length; i++) {
+                        if ($.inArray(data[i].name, "") > -1) {
+                            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 HH:mm:ss')}}</div>", width: 200 });
+                                    break;
+                                default:
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                            }
+                        }
+                    }
+
+                    option = {
+                        elem: '#dj-table'
+                        , toolbar: '#toolbarDemo'
+                        , height: 500
+                        , page: true //寮�鍚垎椤�
+                        , limit: 50
+                        , limits: [50, 500, 5000, 20000]
+                        , cols: [col]
+                        , data: data1.data
+                    };
+                    table.render(option);
+                } else {
+                    option = {
+                        elem: '#dj-table'
+                        , toolbar: '#toolbarDemo'
+                        , height: 500
+                        , page: true //寮�鍚垎椤�
+                        , limit: 50
+                        , limits: [50, 500, 5000, 20000]
+                        , cols: [[
+                            { type: 'radio' }
+                            , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                            , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                            , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                        ]]
+                        , data: []
+                    };
+                    table.render(option);
+                }
+            },
+            error: function (err) {
+                layer.msg('閿欒' + err, {
+                    icon: 5,
+                    time: 20000
+                }, function () {
+                    //do something
+                });
             }
         })
+
+
 
 
         //宸蹭笂浼犲垪琛�
@@ -345,18 +412,21 @@
             , 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: 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: '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: 100 }
-                , { field: 'HOrgID', title: '缁勭粐', width: 100 }
+                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                , { field: 'HOrgID', title: '缁勭粐', width: 150 }
             ]]
             , height: 500
             , done: function () {
@@ -370,16 +440,16 @@
             , toolbar: '#toolbarDemo'
             , 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: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 15 }
+                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
                 , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                , { field: 'HOrgID', title: '缁勭粐', width: 100 }
+                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                , { field: 'HOrgID', title: '缁勭粐', width: 150 }
             ]]
             , height: 500
         })
@@ -391,7 +461,7 @@
             //, toolbar: '#toolbarDemo'
             // , where: { sMsg: linterid, sMsg2: lentryid }
          , cols: [[
-           , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+           , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
          ]]
          , page: true
          , height: 500

--
Gitblit v1.9.1