From 344b98ac2c25c3a027f059503ee5db60e434d408 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 21 三月 2025 13:52:30 +0800
Subject: [PATCH] 当客户为乔一时,且物料属性为外购或委外,判断是否设置采购计量单位

---
 WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_Material.html |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html"
index d681d27..3b2ea02 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_Material.html"
@@ -1194,6 +1194,18 @@
                     layer.msg("璇烽�夋嫨涓昏閲忓崟浣嶏紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
                 }
+
+                if (defaintOperationByCompanyName()) {
+                    var temp = $("#HPOUnitID").val();
+                    var temp1 = $("#HMaterClsID").val();
+                    if (temp1 == "1" || temp1 == "3") {
+                        if (typeof (temp) == "undefined" || temp == "" || temp == "0") {
+                            layer.msg("褰撳墠鐗╂枡灞炴�т负[澶栬喘]鎴朳濮斿],璇烽�夋嫨閲囪喘璁¢噺鍗曚綅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return;
+                        }
+                    }
+                }
+
                 var HWeight = $('#HWeight').val();
                 if (HWeight.substring(HWeight.length - 1, HWeight.length) == ".") {
                     layer.msg("鍏嬮噸鐨勭粨灏句笉鑳芥槸.锛�");
@@ -1955,6 +1967,27 @@
             }
             //#endregion
 
+            //#region 鑾峰彇鍏徃鍚嶏紝鏍规嵁鍏徃杩涜瀹氬埗鍖栧紑鍙�
+            function defaintOperationByCompanyName() {
+                var result = false;
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_getInfo/getCompanyName',
+                    async: false,
+                    type: "GET",
+                    data: {},
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            if (data1.data == "涔斾竴") {
+                                result = true;
+                            }
+                        }
+                    }, error: function (e) {
+                    }
+                });
+                return result;
+            }
+            //#endregion
+
             //#region 缂栬緫鏃�,鑾峰彇宸蹭笂浼犵殑鏂囦欢鍒楄〃
             function getFile() {
                 var ProImgByList = $('#ProImgByList')

--
Gitblit v1.9.1