From ea5d32b974dff6e79fe1ab44319682aecedeacbb Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 25 八月 2025 08:09:04 +0800
Subject: [PATCH] 海诚出站汇报单优化更新

---
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html |    5 +++--
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillSync.html |   45 +++++++++++++++++++++++++++++++++++++--------
 2 files changed, 40 insertions(+), 10 deletions(-)

diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
index 902b94e..9f9fcb8 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
@@ -2372,7 +2372,7 @@
                                     layer.close(ajaxLoad);
                                 } else {
                                     layer.close(ajaxLoad);
-                                    layer.alert(get_MessageError(result.Message, sessionStorage["HTranSlate"]), { icon: 5 });
+                                    layer.alert(get_MessageError(result.Message, sessionStorage["HTranSlate"]) + result.Message, { icon: 5 });
                                 }
                             }, error: function () {
                                 layer.close(ajaxLoad);
@@ -2427,7 +2427,8 @@
                                         item[itemobj] = "";
                                     }
                                     if (item[itemobj].length > 0) {  // 鍋囪瀛楁鍚嶄负field
-                                        item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '');  // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+                                        item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, '');  // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+                                        item[itemobj] = item[itemobj].toString().replace(/,/g, '');  // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
                                     }
                                     if (itemobj === '瑙勬牸鍨嬪彿') {
                                         item[itemobj] = item[itemobj].replace(/,/g, '锛�');  // 鏇挎崲鑻辨枃閫楀彿涓轰腑鏂囬�楀彿
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSync.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSync.html"
index 3c04918..cc979cb 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSync.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSync.html"
@@ -38,10 +38,10 @@
                                     <label class="layui-form-label">鍚屾鐘舵��</label>
                                     <div class="layui-input-block" style="margin-left: 125px;width:55%;">
                                         <select name="HRelationQty" lay-filter="aihao" id="HRelationQty">
-                                            <option value="1" selected="selected">鍏ㄩ儴</option>
+                                            <option value="1" >鍏ㄩ儴</option>
                                             <option value="2">宸插悓姝�</option>
                                             <option value="3">鏈悓姝�</option>
-                                            <option value="4">鍚屾澶辫触</option>
+                                            <option value="4" selected="selected">鍚屾澶辫触</option>
                                         </select>
                                     </div>
                                 </div>
@@ -263,7 +263,7 @@
                 $("#HBillNo").val("");
                 $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                 $("#HProcExchBillNo").val("");
-                $("#HRelationQty").val("1");
+                $("#HRelationQty").val("4");
                 $("#ColContent").val("");
                 $("#ColName").val("0");
                 $("#Comparator").val("0");
@@ -327,6 +327,7 @@
                 if (HProcExchBillNo) {
                     sWhere += " and 宸ュ簭娴佽浆鍗″彿 like '%" + HProcExchBillNo + "%'";
                 }
+                sWhere += getDeptIDByUser();//鐢ㄦ埛鍏宠仈閮ㄩ棬杩囨护
                 get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
@@ -408,16 +409,16 @@
                             dataType: "json",
                             success: function (data1) {
                                 if (data1.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                    //layer.msg(data1.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                    //    var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
-                                    //    parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
-                                    //});
+                                    layer.msg(data1.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                        var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+                                        parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
+                                    });
                                 }
                                 else {
                                     let errMessage = [];
                                     errMessage.push(data1.Message);
                                     syncMessage.push(errMessage);
-                                    //layer.alert(data1.Message, { icon: 5 });
+                                    layer.alert(data1.Message, { icon: 5 });
 
                                 }
                             },
@@ -502,6 +503,34 @@
                 Pub_Close(2);
             }
 
+            //#region 鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈閮ㄩ棬鐨勮繃婊ゆ潯浠�
+            function getDeptIDByUser() {
+                var res = "";
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Xt_User/UserDeptlistPlaylist", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HUserID": sessionStorage["Czybm"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            if (result.data.length > 0) {
+                                for (let item of result.data) {
+                                    res += item.HItemID.toString() + ","
+                                }
+                                res = res.slice(0, -1);
+                                res = ` and HDeptID in (${res})`
+                            }
+
+                        }
+                    }, error: function (err) {
+                        res = " and 1 = 0";
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
+                    }
+                });
+                return res;
+            }
+            //#endregion
+
             //浠ヤ笂鏄痩ayui妯″潡
         });
 

--
Gitblit v1.9.1