From 43e741c8377b555f4e5ed287bee724e71a11540f Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 22 一月 2024 12:41:01 +0800
Subject: [PATCH] 期初余额报表:查询过滤报错“客户名称无效”问题解决

---
 WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html |  310 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 299 insertions(+), 11 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 dc61b11..e321a93 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"
@@ -156,14 +156,24 @@
                                         <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">
                                             <label class="layui-form-label">閫夊崟鍙�</label>
                                             <div class="layui-input-inline">
-                                                <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
+                                                <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;">
+                                                
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
                                             </div>
+                                            <!--<label class="layui-form-label">閫夊崟鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
+                                            </div>-->
                                         </div>
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">璐熻矗浜�</label>
@@ -249,7 +259,7 @@
                                                 <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-                                        <div class="layui-inline">
+                                        <div class="layui-inline" >
                                             <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
@@ -325,6 +335,8 @@
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             get_LoginIs();
             Organ();//鏄剧ず缁勭粐
+            //鑾峰彇婧愬崟绫诲瀷
+            HSourceBillType();
             //鑾峰彇椤甸潰璺宠浆鍙傛暟
             var params = get_UrlVars();
             var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫
@@ -394,7 +406,8 @@
                 "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "", "HQty": "", "HRemark": "",
                 "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
                 "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
-                "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": ""
+                "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+                "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, 
             }];
             // 鍒濆鍖栫晫
             set_InitGrid();
@@ -408,7 +421,8 @@
                     "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "", "HQty": "", "HRemark": "",
                     "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
                     "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
-                    "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": ""
+                    "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+                    "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
                 };
                 switch (obj.event) {
                     case 'btn-AddLine':
@@ -515,6 +529,112 @@
             //#endregion
 
 
+            //#region 鐩戝惉鍗曞厓鏍肩紪杈�  鍗曞厓鏍肩紪杈戝悗 鍙樻洿
+            table.on('edit(mainTable)', function (obj) {
+                //鏁板�兼牸寮忔牎楠屽伐鍏�
+                var ref = /^\d+(\.\d+)?$/;          //闈炶礋鏁版鍒欒〃杈惧紡
+                var temp = "";
+
+                // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+                var oldText = $(this).prev().text();
+                var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+                    , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+                    , field = obj.field; //寰楀埌瀛楁
+
+                switch (field) {
+                    case "HQty":                                         //鏁伴噺
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp) || temp == 0) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HQty: oldText
+                            });
+                            table.render(option);
+
+                            layer.msg("鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = value * 1;                           //鏁伴噺
+                        var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+
+
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
+                        });
+                        /* table.render(option);*/
+                        break;
+                    case "HPrice":                                         //鍗曚环
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp) || temp == 0) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HPrice: oldText
+                            });
+                            /* table.render(option);*/
+
+                            layer.msg("鍗曚环璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
+                        var HPrice = value * 1;
+                        var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
+                        });
+                        break;
+                    case "HMoney":                                         //閲戦
+                        //鏁版嵁鏍煎紡鏍¢獙
+                        temp = value + "";
+                        if (!ref.test(temp) || temp == 0) {
+                            //鎭㈠鏁版嵁鍒扮紪杈戝墠
+                            obj.update({
+                                HMoney: oldText
+                            });
+                            /* table.render(option);*/
+
+                            layer.msg("閲戦璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
+                            return;
+                        }
+
+                        //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                        var HQty = obj.data.HQty * 1;                   //鏁伴噺
+                        var HMoney = value * 1;
+                        var HPrice = (HMoney / HQty).toFixed(2);       //鍗曚环=閲戦/鏁伴噺
+
+
+                        //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                        obj.update({
+                            HQty: HQty
+                            , HPrice: HPrice
+                            , HMoney: HMoney
+                        });
+                        break;
+                        table.render(option);
+                    default:
+                }
+            });
+            //#endregion
+            //#endregion
+            //#endregion
+
+
             //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
 
             //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -564,7 +684,7 @@
             }
 
 
-
+            //瀛愯〃
 
             function set_InitGrid() {
                 option = {
@@ -576,6 +696,10 @@
                     , cols: [[ //瀛愯〃
                         { type: 'checkbox', totalRowText: '鍚堣琛�' }
                         , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true }
+                        , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
+                        , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
                         , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                         , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
                         , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, }
@@ -599,7 +723,7 @@
                     ]]
                 }
 
-                option.data = rowdata;
+                option.data = [];
                 table.render(option);
             }
 
@@ -637,7 +761,7 @@
                                 , "HManagerID": data.HManagerID
                                 , "HManagerName": data.璐熻矗浜�
                                 , "HExRate": data.姹囩巼
-                                , "Box2": ""
+                                //, "Box2": ""
                                 , "HRemark": data.琛ㄥご澶囨敞
                                 , "HMaker": data.鍒跺崟浜�
                                 , "HChecker": data.瀹℃牳浜�
@@ -657,7 +781,11 @@
                                     {
                                         "HMaterID": subdata[i].HMaterID, "鐗╂枡浠g爜": subdata[i].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": subdata[i].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": subdata[i].瑙勬牸鍨嬪彿, "HAuxPropID": subdata[i].HAuxPropID, "鐗╂枡杈呭姪灞炴��": subdata[i].鐗╂枡杈呭姪灞炴��, "HUnitID": subdata[i].HUnitID, "璁¢噺鍗曚綅": subdata[i].璁¢噺鍗曚綅,
                                         "HQtyMust": subdata[i].搴旀敹鏁伴噺, "HQty": subdata[i].瀹炴敹鏁伴噺, "HRemark": subdata[i].琛ㄤ綋澶囨敞, "HPrice": subdata[i].鍗曚环, "HMoney": subdata[i].閲戦, "HOrderPrice": subdata[i].閲囪喘閲戦, "HWHID": subdata[i].HWHID, "鏀舵枡浠撳簱": subdata[i].鏀舵枡浠撳簱, "HSPID": subdata[i].HSPID, "浠撲綅鍚嶇О": subdata[i].浠撲綅鍚嶇О,
-                                        "HBatchNo": subdata[i].鎵规
+                                        "HBatchNo": subdata[i].鎵规,
+                                        "HSourceBillNo": subdata[i].婧愬崟鍗曞彿,    //婧愬崟鍙�
+                                        "HSourceBillType": subdata[i].婧愬崟绫诲瀷,   //婧愬崟绫诲瀷
+                                        "HSourceInterID": subdata[i].婧愬崟涓诲唴鐮�,   //婧愬崟涓诲唴鐮�
+                                        "HSourceEntryID": subdata[i].婧愬崟瀛愬唴鐮�     //婧愬崟瀛愬唴鐮�
                                     }
                                 )
                             }
@@ -720,6 +848,7 @@
                     return;
                 }
 
+
                 var num = [];
                 for (var i = 0; i < table.cache["mainTable"].length; i++) {
                     if (table.cache["mainTable"][i] != "") {
@@ -727,6 +856,25 @@
                         num.push(table.cache["mainTable"][i])
                     }
                 }
+
+                checkDuplicateData(num);
+                const duplicateRows = checkDuplicateData(num);
+                if (duplicateRows.length > 0) {
+                    let message = '琛ㄦ牸涓瓨鍦ㄩ噸澶嶆暟鎹紝閲嶅琛屾暟涓猴細';
+
+                    for (let i = 0; i < duplicateRows.length; i++) {
+                        const { row1, row2 } = duplicateRows[i];
+                        message += `绗�${row1}琛屼笌绗�${row2}琛岀浉鍚宍;
+
+                        if (i !== duplicateRows.length - 1) {
+                            message += '锛�';
+                        }
+                    }
+
+                    message += '锛岃鍒犻櫎鍏朵腑涓�琛�';
+                    layer.alert(message);
+                } 
+                
 
                 var sMainStr = JSON.stringify(data.field);
                 var sSubStr = JSON.stringify(num);
@@ -953,7 +1101,8 @@
                                                 "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HAuxPropID": 0, "鐗╂枡杈呭姪灞炴��": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQtyMust": "", "HQty": "", "HRemark": "",
                                                 "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
                                                 "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
-                                                "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": ""
+                                                "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+                                                "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
                                             };
 
                                             table.cache["mainTable"].push(NewRow);
@@ -1085,8 +1234,123 @@
                     }
                 })
             }
-                 
 
+            //琛屽唴浜嬩欢
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                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: '' + getSupType().name + '鍒楄〃'  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["90%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: [url, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鎸夐挳涓�  鐨勫洖璋�
+                        var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                        if (checkStatus.data.length == 0) {
+                            return layer.msg("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�!");
+                        }
+                        layer.alert("浣犲凡閫夋嫨" + checkStatus.data.length + "鏉℃暟鎹�");
+                        //鑾峰彇鏀舵枡閫氱煡鍗曚唬鐮�
+                        var ProcessNumber = [];
+                        for (var i = 0; i < checkStatus.data.length; i++) {
+                            ProcessNumber.push(checkStatus.data[i]);
+                        }
+
+                        //鑾峰彇褰撳墠浣嶇疆鎵�鍦ㄨ鏁�
+                        var NowNum = 0;
+                        NowNum = option.data.length;
+
+                        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);//鍏抽棴寮圭獥
+                        }
+                        
+                    }
+                       
+                });
+            });
+            //鍒ゆ柇鎵�閫夌潃涓庤〃鏍兼槸鍚︽湁閲嶅鏁版嵁
+            function checkDuplicateData(data) {
+                const duplicates = [];
+
+                for (let i = 0; i < data.length; i++) {
+                    const currentItem = data[i];
+                    let isDuplicate = false;
+
+                    for (let j = i + 1; j < data.length; j++) {
+                        const compareItem = data[j];
+
+                        if (currentItem.HSourceInterID === compareItem.HSourceInterID && currentItem.HSourceEntryID === compareItem.HSourceEntryID) {
+                            isDuplicate = true;
+                            duplicates.push({ row1: i + 1, row2: j + 1 }); // 璁板綍閲嶅鏁版嵁鎵�鍦ㄨ鏁�
+                        }
+                    }
+                    if (isDuplicate && !duplicates.some(item => item.row1 === i + 1)) {
+                        duplicates.push({ row1: i + 1, row2: -1 }); // 璁板綍閲嶅鏁版嵁鎵�鍦ㄨ鏁帮紝-1 琛ㄧず鏈壘鍒颁笌褰撳墠琛岄噸澶嶇殑琛�
+                    }
+                }
+                return duplicates;
+            }
             //琛屽唴鍒犻櫎
             function set_GridDelete(obj) {
                 var data = obj.data;
@@ -1138,6 +1402,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