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/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html |  120 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 97 insertions(+), 23 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/Add_Edit_Kf_POStockInBillList.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/Add_Edit_Kf_POStockInBillList.html"
index 98fe529..b63fddf 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/Add_Edit_Kf_POStockInBillList.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/Add_Edit_Kf_POStockInBillList.html"
@@ -15,6 +15,7 @@
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
     <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
     <style type="text/css">
         /*begin 姝ゆ牱寮忕敤浜庢秷闄よ鍏冪礌涓竷灞�瀹藉害涓嶅鐨勯棶棰�*/
         .layui-form-item .layui-inline {
@@ -156,7 +157,9 @@
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">婧愬崟绫诲瀷</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="HSourceBillType" id="HSourceBillType" value="0">
+                                                <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType">
+                                                    <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
+                                                </select>
                                             </div>
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
@@ -332,7 +335,17 @@
 
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             get_LoginIs();
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "1201";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+            $("h1").html('<b>' + HPageTitle + '</b>');
+            //#endregion
+
             Organ();//鏄剧ず缁勭粐
+            //鑾峰彇婧愬崟绫诲瀷
+            HSourceBillType();
             //鑾峰彇椤甸潰璺宠浆鍙傛暟
             var params = get_UrlVars();
             var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫
@@ -689,9 +702,10 @@
                     , limit: 500
                     , height: 500
                     , loading: false
+                    , totalRow: true
                     , cols: [[ //瀛愯〃
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
-                        , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true }
+                        , { type: 'numbers', title: '搴忓彿', width: 100 }
                         , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
                         , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
                         , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
@@ -704,11 +718,11 @@
                         , { field: '鐗╂枡杈呭姪灞炴��', title: '鐗╂枡杈呭姪灞炴��', width: 150, edit: 'text'}//f7
                         , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true }
                         , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
-                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, edit: 'text'}
-                        , { field: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text'}
+                        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
+                        , { field: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
                         , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text' }
-                        , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text' }
-                        , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, edit: 'text' }
+                        , { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
+                        , { field: 'HOrderPrice', title: '閲囪喘閲戦', width: 100, edit: 'text', totalRow: true}
                         , { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true }
                         , { field: '鏀舵枡浠撳簱', title: '鏀舵枡浠撳簱', width: 100, edit: 'text', event: "HWHID" }//f7
                         , { field: 'HSPID', title: 'HSPID', width: 100, hide: true }
@@ -718,7 +732,7 @@
                         , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
                     ]]
                 }
-
+             
                 option.data = [];
                 table.render(option);
             }
@@ -1237,19 +1251,39 @@
                 set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
 
             });
+
+            //鍔ㄦ�佸脊鍑洪〉闈�
+            function getSupType() {
+                var type = $("#HSourceBillType").val();
+                switch (type) {
+                    case '1102':
+                        return { url: "../../閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html", name: "閲囪喘璁㈠崟" };
+                        break;
+                    case '1103':
+                        return { url: "../../閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html", name: "鏀舵枡閫氱煡鍗�" };
+                        break;
+                }
+            }
+
             //琛ㄥご淇℃伅閫夋嫨鍗曟嵁寮圭獥
             form.on('submit(XDHList)', function () {
+
+                if ($("#HSourceBillType").val() == 0 || $("#HSourceBillType").val() == null) {
+                    return layer.msg('璇烽�夋嫨鍗曟嵁绫诲瀷');
+                }
+                var url = getSupType().url;
+                url = encodeURI(url);
 
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
                     type: 2
                     , skin: "layui-layer-rim" //鍔犱笂杈规
-                    , title: "鏀舵枡閫氱煡鍗曞垪琛�"  //鏍囬
+                    , title: '' + getSupType().name + '鍒楄〃'  //鏍囬
                     , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
                     , shift: 2 //寮瑰嚭鍔ㄧ敾
                     , area: ["90%", "90%"] //绐椾綋澶у皬
                     , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
-                    , content: ["../../閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBillList.html", "yes"]
+                    , content: [url, "yes"]
                     , btn: ["纭畾", "鍙栨秷"]
                     , btn1: function (index, laero) {
                         //鎸夐挳涓�  鐨勫洖璋�
@@ -1270,21 +1304,37 @@
                         var NowNum = 0;
                         NowNum = option.data.length;
 
-                        
-                        var j = 0;
-                        for (var i = 0; i < ProcessNumber.length; i++) {
-                            option.data.push({
-                                "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
-                                "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅, "HQtyMust": "", "HQty": checkStatus.data[j].鏁伴噺, "HRemark": "",
-                                "HPrice": checkStatus.data[j].鍗曚环, "HMoney": checkStatus.data[j].閲戦, "HOrderPrice": "0", "HWHID": checkStatus.data[j].HWHID, "鏀舵枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱,
-                                "HSPID": checkStatus.data[j].HSPID, "浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
-                                "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
-                                "HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
-                            })
-                            j++;
+                        if (getSupType().name == "閲囪喘璁㈠崟") {
+                            var j = 0;
+                            for (var i = 0; i < checkStatus.data.length; i++) {
+                                option.data.push({
+                                    "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
+                                    "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅,
+                                    "HQty": checkStatus.data[j].鏁伴噺, "HPrice": checkStatus.data[j].鍗曚环,
+                                    "HMoney": checkStatus.data[j].閲戦,
+                                    "HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
+                                })
+                                j++;
+                            }
+                            table.render(option);
+                            layer.close(index);
+                        } else if (getSupType().name =="鏀舵枡閫氱煡鍗�") {
+                            var j = 0;
+                            for (var i = 0; i < ProcessNumber.length; i++) {
+                                option.data.push({
+                                    "HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
+                                    "   ": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅, "HQtyMust": "", "HQty": checkStatus.data[j].鏁伴噺, "HRemark": "",
+                                    "HPrice": checkStatus.data[j].鍗曚环, "HMoney": checkStatus.data[j].閲戦, "HOrderPrice": "0", "HWHID": checkStatus.data[j].HWHID, "鏀舵枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱,
+                                    "HSPID": checkStatus.data[j].HSPID, "浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
+                                    "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+                                    "HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
+                                })
+                                j++;
+                            }
+                            table.render(option);
+                            layer.close(index);//鍏抽棴寮圭獥
                         }
-                        table.render(option);
-                        layer.close(index);//鍏抽棴寮圭獥
+                        
                     }
                        
                 });
@@ -1362,6 +1412,30 @@
             }
             //#endregion
 
+            //#region 鑾峰彇婧愬崟绫诲瀷
+            function HSourceBillType() {
+                var HName = '閲囪喘鍏ュ簱鍗�';
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                $.ajax({
+                    type: "get",
+                    async: false,
+                    data: { "HName": HName },
+                    url: GetWEBURL() + "/Web/GetHSourceBillType",
+                    success: function (result) {
+                        var HSourceBillTypes = "";
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                HSourceBillTypes += '<option  style="color:blue;" value="' + data[i].HSourceBillType + '">' + data[i].HSourceBillTypeName + '</option>';
+                            }
+                            $("#HSourceBillType").append(HSourceBillTypes);
+                            form.render('select');
+                        }
+                    }
+                })
+            }
+            //#endregion
+
             //#endregion
 
 

--
Gitblit v1.9.1