From 169720903b00d3caf5514f2e814951fc1f8441f3 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期日, 31 八月 2025 21:59:24 +0800
Subject: [PATCH] 1.多组织切换 2.生产领料组织信息显示

---
 H5/My.aspx   |   27 ++++++++++++-
 H5/Js/My.js  |   64 ++++++++++++++++++++++++++------
 H5/Scll.aspx |    7 +++
 3 files changed, 83 insertions(+), 15 deletions(-)

diff --git a/H5/Js/My.js b/H5/Js/My.js
index 8dd73e0..d4fa6a0 100644
--- a/H5/Js/My.js
+++ b/H5/Js/My.js
@@ -44,7 +44,11 @@
                     img: "../Images/print.png",
                     path: '/H5/Config.aspx'
                 }
-            ]
+            ],
+            actions: [],//鍒楄〃鐨勫��
+            orgName: "",//绾夸綋鍚嶇О
+            orgId: "",//绾夸綋缂栧彿
+            show: false,//鍒楄〃灞曠ず
         }
     },
     mounted() {
@@ -82,20 +86,56 @@
 
             });
         },
-        goOrg() {
+        changeOrg() {
+            this.show = true;
             var that = this;
-            this.$dialog.confirm({
-                title: '鍙嬫儏鎻愮ず',
-                message: '纭畾鍒囨崲褰撳墠缁勭粐锛�',
-                confirmButtonText: '纭畾',
-                cancelButtonText: '鍙栨秷'
-            })
-                .then(() => {
-                    window.location.href = "/UserLogin.aspx";
+            that.actions = [];
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Login/changeOrg', {
+                userName: that.userInfo.loginAccount
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+
+                        if (json.data.tbBillList.length <= 0) {
+                            that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�");
+                            that.$playSound('error');
+                        } else {
+                            that.itemInfo = json.data.tbBillList;
+                            that.actions = json.data.tbBillList.map(item => {
+                                return {
+                                    name: item.orgName,
+                                    orgId: item.orgId,  // 鏂板
+                                    orgNo: item.orgNo  // 鏂板
+                                };
+                            });
+                        }
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                    }
+                    that.isLoading = false;
                 })
-                .catch(() => {
-                    // on cancel
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    console.log(error);
                 });
         },
+
+        onSelect(action) {
+            //this.xtNum = action.lineNo;  // 缁戝畾line_no鍒皒tNum瀛楁
+            //console.log("閫夋嫨鐨勭嚎浣撶紪鍙凤細", this.xtNum);
+            //this.xtName = action.name;  // 缁戝畾name鍒皒tName瀛楁
+            //this.show = false;
+
+            Cookies.set('orgId', action.orgId);
+            Cookies.set('orgNo', action.orgNo);
+            Cookies.set('orgName', action.name);
+            this.show = false;
+        },
     }
 })
\ No newline at end of file
diff --git a/H5/My.aspx b/H5/My.aspx
index c550d06..9c9eff4 100644
--- a/H5/My.aspx
+++ b/H5/My.aspx
@@ -4,6 +4,7 @@
     <style>
     .van-field__control {
             text-align:right !important;
+            color: #0283EF;
         }
     </style>
 </asp:Content>
@@ -39,7 +40,26 @@
    placeholder=""
    @click="goMsg()"
  ></van-field>--%>
-           
+<van-field
+    label="褰撳墠缁勭粐"
+    :value="Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅'"
+    readonly
+    input-align="center"
+    class="org-field bold-center"
+    :style="{
+        fontWeight: '700'
+    }"
+></van-field>
+
+         <van-field
+    readonly
+    is-link
+    v-model="cardType"
+    label="鍒囨崲缁勭粐"
+    placeholder=""
+    @click="changeOrg"
+ ></van-field>
+
   <van-field
     readonly
     is-link
@@ -48,6 +68,9 @@
     placeholder=""
     @click="goOut"
  ></van-field>
+
+
+               <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
 </van-cell-group>
 </asp:Content>
 <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
@@ -55,6 +78,6 @@
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
      <script src="Js/comWebNav.js"></script>
-    <script src="Js/My.js?<%=123452 %>"></script>
+    <script src="Js/My.js?<%=123455 %>"></script>
 </asp:Content>
 
diff --git a/H5/Scll.aspx b/H5/Scll.aspx
index 56c39d7..d9ca1f1 100644
--- a/H5/Scll.aspx
+++ b/H5/Scll.aspx
@@ -4,6 +4,11 @@
        .bg-info {
      background-color: #fff;
     }
+    .org-info {
+        height: 0.5rem;
+        line-height: 0.5rem;
+        padding: 0 0.16rem;
+    }
 </style>
 </asp:Content>
 
@@ -11,7 +16,7 @@
     <van-notice-bar 
     :scrollable="false" 
     :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" 
-    style="height: 0.5rem; line-height: 0.5rem; padding: 0 0.16rem" 
+    class="org-info"
 /></van-notice-bar>
     <div class="content-wrapper">
         <van-nav-bar

--
Gitblit v1.9.3