From 7df042662e1929abdd667cfd7b037f4e10e8c2ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 三月 2024 11:27:56 +0800
Subject: [PATCH] 其他应付单 增加子表保存,目录放到采购管理,其他入库单编辑模块 并完善 其他出库单 列表功能;( 常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式)

---
 WebTM/views/验收入库/其他入库/Kf_OtherInBill_FastList.html |   59 ++++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 38 insertions(+), 21 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 574380f..ee18b10 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
 
         //鍔犺浇婧愬崟绫诲瀷
@@ -141,20 +142,21 @@
                 , 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 }
+                    , { 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'
@@ -173,7 +175,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 }
                 ]]
@@ -195,7 +197,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 }
                 ]]
@@ -205,7 +207,9 @@
 
         //閫�鍑�
         form.on('submit(cmdCancel)', function () {
-            parent.location.href = "../../../views/index.html"
+            layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+                parent.location.href = "../../../views/index_Mobile.html"
+            });
             //window.close();//鍏抽棴褰撳墠椤�
         })
         //缂栬緫
@@ -238,16 +242,19 @@
         form.on('submit(cmdRescind)', function () {
             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 {
+            } else if (checkStatus3.data.length != 0) {
+                data = checkStatus3.data;
+            }else {
                 return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
             }
-            var sInterID = data[0].HInterID
-            var sBillNo = data[0].HBillNo
+            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(
                 {
@@ -274,7 +281,7 @@
                     error: function (err) {
                         layer.msg('閿欒' + err, {
                             icon: 5,
-                            time: 20000
+                            time: 2000
                         }, function () {
                             //do something
                         });
@@ -289,7 +296,7 @@
             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(
@@ -368,7 +375,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 }
                 ]]
@@ -406,23 +413,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 });
@@ -436,7 +453,7 @@
                 }
             });
         }
-
+        
         //鍒锋柊鏄庣粏椤电
         table.render({
             elem: '#mx-table'

--
Gitblit v1.9.1