From 2c4e339508f78a215518a8a12af34ca0b1564d44 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 31 十月 2025 13:07:03 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/验收入库/其他入库/Kf_OtherInBill_FastList.html |  205 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 140 insertions(+), 65 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 2c59f83..da77443 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"
@@ -125,6 +125,7 @@
 
         var sBillType = '1203';
         var col = [];
+        var option = {}
         //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
 
         //鍔犺浇婧愬崟绫诲瀷
@@ -132,6 +133,49 @@
         //鍒濆鍖栫晫闈�
         function set_ClearBill() {
             get_Display();
+            //#region 鐐瑰嚮琛岄�変腑楂樹寒
+            table.on('row(mainTable)', function (obj) {
+                //閫変腑琛屾敼鍙橀鑹�
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            })
+            //#endregion
+
+            table.render({
+                elem: '#dj-table'
+                , url: GetWEBURL() + '/Web/chanpinruk'
+                , toolbar: '#toolbarDemo'
+                , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: '鍗曟嵁鍐呯爜', title: '鍗曟嵁鍐呯爜', width: 80 }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 80 }
+                    , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 100 }
+                    , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 100 }
+                    , { field: '鏁伴噺', title: '鏁伴噺', width: 100, totalRow: true}
+                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
+                    , { field: '绾㈣摑瀛�', title: '绾㈣摑瀛�', width: 100 }
+                    , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 100 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            })
+            table.render(option);
             //宸蹭笂浼犲垪琛�
             table.render({
                 elem: '#yd-table'
@@ -150,7 +194,7 @@
                     , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
                     , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100, totalRow: true}
                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
                     , { field: 'HOrgID', title: '缁勭粐', width: 120 }
                 ]]
@@ -172,7 +216,7 @@
                     , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
                     , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100, totalRow: true }
                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
                     , { field: 'HOrgID', title: '缁勭粐', width: 120 }
                 ]]
@@ -181,8 +225,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();//鍏抽棴褰撳墠椤�
         })
         //缂栬緫
@@ -208,47 +254,32 @@
 
         //鍒锋柊
         form.on('submit(cmdRefresh)', function () {
-            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");
-                    }
-                })
+            location.reload();
         });
         
         //鎾ら攢鍔熻兘
         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 checkStatus = table.checkStatus('yd-table');
+            var checkStatus2 = table.checkStatus('sy-table');
+            var checkStatus3 = table.checkStatus('dj-table'); 
+            var data = "";
+            if (checkStatus.data.length != 0) {
+                data = checkStatus.data;
+            } else if (checkStatus2.data.length != 0) {
+                data = checkStatus2.data;
+            } else if (checkStatus3.data.length != 0) {
+                data = checkStatus3.data;
+            }else {
+                return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+            }
+            var sInterID = data[0].HInterID == 'undefined' ? data[0].鍗曟嵁鍐呯爜 : data[0].HInterID;
+            var sBillNo = data[0].HBillNo == 'undefined' ? data[0].鍗曟嵁鍙� : data[0].HBillNo;
             var sBillType = '1203'
             $.ajax(
                 {
                     type: "Get",
                     url: GetWEBURL() + "/Web/Rescind_Json",
-                    async: true,
+                    async: false,
                     data: { "sHInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
                     dataType: "json",
                     success: function (data) {
@@ -269,7 +300,7 @@
                     error: function (err) {
                         layer.msg('閿欒' + err, {
                             icon: 5,
-                            time: 20000
+                            time: 2000
                         }, function () {
                             //do something
                         });
@@ -284,14 +315,14 @@
             var checkStatus = table.checkStatus('dj-table')
                 , data = checkStatus.data;
             if (checkStatus.data.length === 1) {
-                var sInterID = data[0].HInterID
+                var sInterID = data[0].HInterID == 'undefined' ? data[0].鍗曟嵁鍐呯爜 : data[0].HInterID;
             //閫昏緫鍒犻櫎鏂规硶
                 layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
                     $.ajax(
                         {
                             type: "Get",
                             url: GetWEBURL() + "/Web/Delete_Json",
-                            async: true,
+                            async: false,
                             data: { "sHInterID": sInterID },
                             dataType: "json",
                             success: function (data) {
@@ -318,37 +349,70 @@
             }
         });
         //鏌ヨ
+        //form.on('submit(cmdQuery)', function () {
+        //    var HBillNo = $("#HBillNo").val();
+        //    var HSourceBillNo = $("#HSourceBillNo").val();
+        //    //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+        //    $.ajax({
+        //        url: GetWEBURL() + '/Gy_Mould/list1',
+        //        type: "GET",
+        //        data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo},
+        //        success: function (data1) {
+        //            if (data1.count == 1) {
+        //                option.data = data1.data;
+        //                table.render(option);
+        //                layer.close(index);
+        //            } else {
+        //                layer.close(index);
+        //                layer.alert(data1.code + data1.Message, { icon: 5 });
+        //            }
+        //        }, error: function () {
+        //            layer.close(index);
+        //            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+        //        }
+        //    });
+        //});
+        
+
         form.on('submit(cmdQuery)', function () {
             var HBillNo = $("#HBillNo").val();
-            var HSourceBillNo = $("#HSourceBillNo").val();
-            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            $.ajax({
-                url: GetWEBURL() + '/Gy_Mould/list1',
-                type: "GET",
-                data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo},
-                success: function (data1) {
-                    if (data1.count == 1) {
-                        option.data = data1.data;
-                        table.render(option);
-                        layer.close(index);
-                    } else {
-                        layer.close(index);
-                        layer.alert(data1.code + data1.Message, { icon: 5 });
-                    }
-                }, error: function () {
-                    layer.close(index);
-                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+            var HSourceBillNo = $("#HSourceBillNo").val();;
+
+
+            table.render({
+                elem: '#sy-table'
+                , url: GetWEBURL() + '/ProductInBillList/list1'
+                , toolbar: '#toolbarDemo'
+                , defaultToolbar: []
+                , where: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo }
+                , 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, totalRow: true }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
                 }
-            });
-        });
-        
-       
+            })
+          });
+
+
         //鍔犺浇缂撳瓨鍒楄〃鏁版嵁
         function get_Display() {
             var ajaxLoad = layer.load();
             $.ajax({
                 url: GetWEBURL() + '/Web/GetOtherInBillMain_TempList_New',
                 type: "GET",
+                async:false,
                 data: { "HBillType": sBillType, "sHMaker": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"]},
                 success: function (data1) {
                     if (data1.count == 1) {
@@ -358,6 +422,7 @@
                             data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                         }
 
+                        col.push({ type: 'radio' });
                         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鍒�
@@ -368,23 +433,33 @@
                                     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;
+                                    case 'long':
+                                    case 'Int32':
+                                    case 'Int64':
+                                    case 'double':
+                                    case 'Decimal':
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true });
+                                        break;
                                     default:
                                         col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                 }
                             }
                         }
 
-                        //鍔ㄦ�佹樉绀哄垪鍚�
-                        table.render({
+                        option = {
                             elem: '#dj-table'
                             , cols: [col]
                             , data: data1.data
                             , height: 550
                             , page: true
+                            , totalRow: true
                             , cellMinWidth: 90
                             , limit: 50
                             , limits: [50, 500, 5000, 20000]
-                        });
+                        };
+
+                        //鍔ㄦ�佹樉绀哄垪鍚�
+                        table.render(option);
 
                         layer.close(ajaxLoad);
                         //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
@@ -398,7 +473,7 @@
                 }
             });
         }
-
+        
         //鍒锋柊鏄庣粏椤电
         table.render({
             elem: '#mx-table'

--
Gitblit v1.9.1