From 6b7d54a60f36e89dc87892e67dec41caab070389 Mon Sep 17 00:00:00 2001
From: dytyqx <1342948614@qq.com>
Date: 星期三, 25 三月 2026 16:23:50 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/index/tab1.vue |  584 +++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 418 insertions(+), 166 deletions(-)

diff --git a/pages/index/tab1.vue b/pages/index/tab1.vue
index 3d9975c..a0bcca1 100644
--- a/pages/index/tab1.vue
+++ b/pages/index/tab1.vue
@@ -1,208 +1,430 @@
 <template>
     <view class="content">
+        <view class="header">
+            <view class="switch-button">
+                <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons>
+            </view>
+        </view>
         <view class="mains">
-            <view class="box" v-for="(item,index) in itemData" :key="index" @tap="toUrl(item)">
+            <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData"
+                :key="index" @tap="toUrl(item)">
+                <template v-if="item.corner">
+                    <uni-badge :text="item.cornerCount" type="error" :max-num="99" size="normal" absolute="rightTop"
+                        :offset="[7, 7]">
+                        <image :src="item.img" mode=""></image>
+                    </uni-badge>
+                </template>
+                <template v-else>
+                    <image :src="item.img" mode=""></image>
+                </template>
+                <view class="texts">
+                    {{item.text}}
+                </view>
+            </view>
+            <view :enable-hidden="item.hidden" :hidden="!item.id" v-if="canEdit" class="box edit"
+                v-for="(item,index) in itemData" :key="index" @tap="switchHidden(index)">
+                <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
                 <image :src="item.img" mode=""></image>
                 <view class="texts">
-                    <view class="font1">{{item.text}}</view>
-                    <!-- <view class="font2">{{item.tip}}</view> -->
+                    {{item.text}}
                 </view>
-                <!-- <uni-icons type="forward" color="#888" style="position: absolute;right: 70rpx;" size="18"></uni-icons> -->
             </view>
         </view>
     </view>
 </template>
 
 <script>
+    import {
+        CommonUtils
+    } from '../../utils/common'
+    import {
+        setMenuList,
+        getMenuList
+    } from '../../utils/menuListApp'
+    import {
+        getUserInfo
+    } from '../../utils/auth'
     export default {
         data() {
             return {
+                bindingData: {
+                    UnReadCount: 0,
+                },
+                initFinished: false,
+                updateCount: 0,
+                menuListName: 'tab1',
+                canEdit: false,
                 serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                 itemData: [{
                         img: '../../static/icon/icon9.png',
                         text: '宸ュ簭杩涚珯鎺ユ敹鍗曟柊澧�',
                         tip: '绔嬪嵆鏂板',
-                        url: '/pages/gongxuIn/form',
+                        url: '/pages/gongxuIn/Cj_StationInBill',
                         id: 1,
-                    }, {
-                        img: '../../static/icon/icon9.png',
-                        text: '宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛�',
-                        tip: '鏌ョ湅鍒楄〃',
-                        url: '/pages/gongxuIn/table',
-                        id: 2,
-                    }, {
+                        hidden: false,
+                    },
+
+                    {
                         img: '../../static/icon/icon10.png',
                         text: '宸ュ簭鍑虹珯姹囨姤鍗曟柊澧�',
                         tip: '绔嬪嵆鏂板',
-                        url: '/pages/gongxuOut/form',
-                        id: 3,
-                    }, {
-                        img: '../../static/icon/icon10.png',
-                        text: '宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�',
-                        tip: '鏌ョ湅鍒楄〃',
-                        url: '/pages/gongxuOut/table',
-                        id: 4,
-                    }, {
+                        url: '/pages/gongxuOut/Cj_StationOutBill',
+                        id: 2,
+                        hidden: false,
+                    },
+					
+                    {
                         img: '../../static/icon/icon11.png',
                         text: '宸ュ簭濮斿鍙戝嚭鍗曟柊澧�',
                         tip: '绔嬪嵆鏂板',
-                        url: '/pages/weiwaigxIn/form',
-                        id: 5,
-                    }, {
-                        img: '../../static/icon/icon11.png',
-                        text: '宸ュ簭濮斿鍙戝嚭鍗曞垪琛�',
-                        tip: '鏌ョ湅鍒楄〃',
-                        url: '/pages/weiwaigxIn/table',
-                        id: 6,
-                    }, {
+                        url: '/pages/weiwaigxIn/Cj_StationEntrustInBill',
+                        id: 3,
+                        hidden: false,
+                    },
+
+                    {
                         img: '../../static/icon/icon12.png',
                         text: '宸ュ簭濮斿鎺ユ敹鍗曟柊澧�',
                         tip: '绔嬪嵆鏂板',
-                        url: '/pages/weiwaigxOut/form',
-                        id: 7,
-                    }, {
+                        url: '/pages/weiwaigxOut/Cj_StationEntrustOutBill',
+                        id: 4,
+                        hidden: false,
+                    },
+
+                    {
+                        img: '../../static/icon/icon14.png',
+                        text: '鎴戠殑鎶ュ伐骞冲彴',
+                        tip: '鐐瑰嚮杩涘叆',
+                        url: '/pages/baogong/IpadIndex',
+                        id: 5,
+                        hidden: false,
+                    },
+                    {
+                        img: '../../static/icon/icon10.png',
+                        text: '鎴戠殑浠诲姟',
+                        tip: '绔嬪嵆鏂板',
+                        url: '/pages/gongxuOutSendWork/gongxuOutSendWorkBill',
+                        id: 6,
+                        hidden: false,
+                    },
+                    {
                         img: '../../static/icon/icon12.png',
-                        text: '宸ュ簭濮斿鎺ユ敹鍗曞垪琛�',
-                        tip: '鏌ョ湅鍒楄〃',
-                        url: '/pages/weiwaigxOut/table',
-                        id: 8,
-                    }
-                    // , {
-                    // 	img: '../../static/icon/icon1.png',
-                    // 	text: '璁惧妗f鏌ヨ',
-                    // 	tip: '鏌ョ湅璇︽儏',
-                    // 	url: '/pages/shebeidangan/table',
-                    // 	id: 9,
-                    // }, {
-                    // 	img: '../../static/icon/icon8.png',
-                    // 	text: '璁惧灞ュ巻鏌ヨ',
-                    // 	tip: '鏌ョ湅璇︽儏',
-                    // 	url: '/pages/shebeilvli/table',
-                    // 	id: 10,
-                    // }, {
-                    // 	img: '../../static/icon/icon14.png',
-                    // 	text: '鎴戠殑鎶ュ伐骞冲彴',
-                    // 	tip: '鐐瑰嚮杩涘叆',
-                    // 	url: '/pages/baogong/table',
-                    // 	id: 11,
-                    // }, {
-                    // 	img: '../../static/icon/icon13.png',
-                    // 	text: '涓婃ā鍗�',
-                    // 	tip: '鏌ョ湅璇︽儏',
-                    // 	url: '/pages/MJGL/shangmudan/table',
-                    // 	id: 12,
-                    // }, {
-                    // 	img: '../../static/icon/icon13.png',
-                    // 	text: '涓嬫ā鍗�',
-                    // 	tip: '鏌ョ湅璇︽儏',
-                    // 	url: '',
-                    // 	id: 13,
-                    // }, {
-                    // 	img: '../../static/icon/icon32.png',
-                    // 	text: '璁惧杩愯鐘舵��',
-                    // 	tip: '鏌ョ湅璇︽儏',
-                    // 	url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai',
-                    // 	id: 14,
-                    // }, {
-                    // 	img: '../../static/icon/icon6.png',
-                    // 	text: '妯″叿鐘舵�佸垎鏋�',
-                    // 	tip: '鏌ョ湅璇︽儏',
-                    // 	url: '/pages/mujvzhuangtai/mujvzhuangtai',
-                    // 	id: 15,
+                        text: '鍛樺伐绛惧埌璁板綍鍗�',
+                        tip: '绔嬪嵆鏂板',
+                        url: '/pages/EmployeeRecords/EmployeeRecordsBill',
+                        id: 7,
+                        hidden: false,
+                    },
+                    {
+                        "img": "../../static/icon/icon15.png",
+                        "text": "宸ヤ綔鑱旂郴鍗曟煡璇�",
+                        "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery?OperationType=1",
+                        "id": 8,
+                        "hidden": false,
+                    },
+                    {
+                        "img": "../../static/icon/icon16.png",
+                        "text": "寮傚父鍙嶉寰呭鐞嗗垪琛�",
+                        "url": "/pages/ZLGL/AanDengHujiao/OA_MyErrMsgBanck/OA_ErrMsgBackMyList",
+                        "id": 9,
+                        "hidden": false
+                    },
+                    {
+                        "img": "../../static/icon/icon8.png",
+                        "text": "璁惧鏁呴殰鐧昏鍗�",
+                        "url": "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill?operationType=1",
+                        "id": 10,
+                        "hidden": false
+                    },
+                    {
+                        "img": "../../static/icon/icon13.png",
+                        "text": "妯″叿鏁呴殰鐧昏鍗�",
+                        "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?operationType=1",
+                        "id": 11,
+                        "hidden": false
+                    },
+                    {
+                        img: '../../static/icon/icon8.png',
+                        text: '涓婃ā鍗�',
+                        url: `/pages/MJGL/shangmudan/MouldUpperBill`,
+                        id: 12,
+                        hidden: false,
+                    },
+                    {
+                        img: '../../static/icon/icon8.png',
+                        text: '涓嬫ā鍗�',
+                        url: `/pages/MJGL/xiamodan/MouldLowerBill`,
+                        id: 13,
+                        hidden: false,
+                    },
+                    {
+                        "img": "../../static/icon/icon15.png",
+                        "text": "鍙栨牱鍗�",
+                        "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=0",
+                        "id": 14,
+                        "hidden": false
+                    },
+                    {
+                        "img": "../../static/icon/icon8.png",
+                        "text": "璁惧鐐规璁板綍鍗�",
+                        "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill",
+                        "id": 15,
+                        "hidden": false
+                    },
+
+                    // 杞﹂棿鐩稿叧鍗曟嵁鍒楄〃
+                    {
+                        "img": "../../static/icon/icon6.png",
+                        "text": "璁惧鏁呴殰鐧昏鍒楄〃",
+                        "url": "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList",
+                        "id": 16,
+                        "hidden": false
+                    },
+                    {
+                        "img": "../../static/icon/icon13.png",
+                        "text": "妯″叿鏁呴殰鐧昏鍒楄〃",
+                        "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList",
+                        "id": 17,
+                        "hidden": false
+                    },
+					{
+					    img: '../../static/icon/icon10.png',
+					    text: '宸ュ簭鍑虹珯姹囨姤鍗曪紙鏍囧噯锛夋柊澧�',
+					    tip: '绔嬪嵆鏂板',
+					    url: '/pages/gongxuOut/Cj_StationOutBill_Standard',
+					    id: 2,
+					    hidden: false,
+					},
+                    
+                    // 璐ㄩ噺鎶ヨ〃
+                    {
+                        img: '../../static/icon/icon0.png',
+                        text: '绾垮埆寮傚父鐘舵��',
+                        tip: '绾垮埆寮傚父鐘舵��',
+                        url: '/pages/ZLGL/QualityReport/QC_ErrManagerLedgerReport_Source',
+                        id: 18,
+                        hidden: false,
+                    },
+                    {
+                        img: '../../static/icon/icon0.png',
+                        text: '寮傚父绫诲瀷缁熻',
+                        tip: '寮傚父绫诲瀷缁熻',
+                        url: '/pages/ZLGL/QualityReport/QC_ErrManagerLedgerReport_Issue',
+                        id: 19,
+                        hidden: false,
+                    },
+                    {
+                        img: '../../static/icon/icon0.png',
+                        text: '妯″叿缁翠慨缁熻琛�',
+                        tip: '妯″叿缁翠慨缁熻琛�',
+                        url: '/pages/ZLGL/QualityReport/Sc_MouldRepairWorkBillReport',
+                        id: 20,
+                        hidden: false,
+                    },
+                    {
+                        img: '../../static/icon/icon0.png',
+                        text: '璁惧缁翠慨缁熻琛�',
+                        tip: '璁惧缁翠慨缁熻琛�',
+                        url: '/pages/ZLGL/QualityReport/Sb_EquipRepairWorkBillReport',
+                        id: 21,
+                        hidden: false,
+                    },
+                    // {
+                    //     img: '../../static/icon/icon0.png',
+                    //     text: '鍣ㄥ叿淇濆吇缁熻琛�',
+                    //     tip: '鍣ㄥ叿淇濆吇缁熻琛�',
+                    //     url: '/pages/ZLGL/QualityReport/Sc_MouldMaintainBillMainReport',
+                    //     id: 22,
+                    //     hidden: false,
+                    // },
+                    // {
+                    //     img: '../../static/icon/icon0.png',
+                    //     text: '璁惧淇濆吇缁熻琛�',
+                    //     tip: '璁惧淇濆吇缁熻琛�',
+                    //     url: '/pages/ZLGL/QualityReport/Sb_EquipMaintainBillReport',
+                    //     id: 23,
+                    //     hidden: false,
+                    // },
+                    // {
+                    //     img: '../../static/icon/icon0.png',
+                    //     text: '璁惧鐐规缁熻琛�',
+                    //     tip: '璁惧鐐规缁熻琛�',
+                    //     url: '/pages/ZLGL/QualityReport/Sb_EquipDotCheckBillReport',
+                    //     id: 24,
+                    //     hidden: false,
                     // },
                 ]
-                // itemData: [{
-                // 	//  img:'../../static/icon0.png',
-                // 	//  text:'鎶ヨ〃涓績',
-                // 	//  url:'/pages/shebeilvli/table',
-                // 	//  id:0
-                // 	// },{
-                // 	img: '../../static/icon/icon_a1.png',
-                // 	text: '璁惧妗f',
-                // 	url: '/pages/shebeidangan/table',
-                // 	id: 1
-                // }, {
-                // 	img: '../../static/icon/icon_a2.png',
-                // 	text: '璁惧淇濆吇璁″垝鍗�',
-                // 	url: '/pages/baoyangjihua/table',
-                // 	id: 2
-                // }, {
-                // 	img: '../../static/icon/icon_a3.png',
-                // 	text: '璁惧淇濆吇璁板綍鍗�',
-                // 	url: '/pages/baoyangjilu/table',
-                // 	id: 3
-                // 	// },{
-                // 	//  img:'../../static/icon/icon_a4.png',
-                // 	//  text:'璁惧鐐规璁″垝鍗�',
-                // 	//  url:'',
-                // 	//  id:4
-                // 	// },{
-                // 	//  img:'../../static/icon/icon_a5.png',
-                // 	//  text:'璁惧鐐规璁板綍鍗�',
-                // 	//  url:'',
-                // 	//  id:5,
-                // }, {
-                // 	img: '../../static/icon/icon_a6.png',
-                // 	text: '璁惧鏁呴殰鐧昏琛�',
-                // 	url: '/pages/guzhangdengji/table',
-                // 	id: 6
-                // }, {
-                // 	img: '../../static/icon/icon_a7.png',
-                // 	text: '璁惧缁翠慨璁板綍鍗�',
-                // 	url: '/pages/shebeiweixiu/table',
-                // 	id: 7,
-                // }, {
-                // 	img: '../../static/icon/icon_a8.png',
-                // 	text: '璁惧灞ュ巻',
-                // 	url: '/pages/shebeilvli/table',
-                // 	id: 8,
-                // }, {
-                // 	img: '../../static/icon/icon_a9.png',
-                // 	text: '宸ュ簭杩涚珯鎺ユ敹鍗�',
-                // 	url: '/pages/gongxuIn/table',
-                // 	id: 9,
-                // }, {
-                // 	img: '../../static/icon/icon_a10.png',
-                // 	text: '宸ュ簭鍑虹珯姹囨姤鍗�',
-                // 	url: '/pages/gongxuOut/table',
-                // 	id: 10,
-                // }, {
-                // 	img: '../../static/icon/icon_a11.png',
-                // 	text: '宸ュ簭濮斿鍙戝嚭鍗�',
-                // 	url: '/pages/weiwaigxIn/table',
-                // 	id: 11,
-                // }, {
-                // 	img: '../../static/icon/icon_a12.png',
-                // 	text: '宸ュ簭濮斿鎺ユ敹鍗�',
-                // 	url: '/pages/weiwaigxOut/table',
-                // 	id: 12,
-                // // }, {
-                // // 	img: '../../static/icon/icon_a13.png',
-                // // 	text: '璁惧绠$悊',
-                // // 	url: '',
-                // // 	id: 13,
-                // }, {
-                // 	img: '../../static/icon/icon_a14.png',
-                // 	text: '鎶ュ伐骞冲彴',
-                // 	url: '/pages/baogong/table',
-                // 	id: 14,
-                // }, {
-                // 	img: '../../static/icon/icon_a15.png',
-                // 	text: '寮傚父鍙嶉鍗�',
-                // 	url: '/pages/yichang/table',
-                // 	id: 15,
-                // }, {
-                // 	img: '../../static/icon/icon_a16.png',
-                // 	text: '寮傚父鍙嶉澶勭悊鍗�',
-                // 	url: '/pages/yichang/list',
-                // 	id: 16,
-                // }]
             }
         },
         onLoad() {
+            this.getHiddenItem()
+        },
+        async onShow() {
+            if (this.initFinished) {
+                let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName)
+                if (MessageIdentifier.code == 0) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: MessageIdentifier.msg
+                    })
 
+                    return
+                }
+
+                this.itemData.forEach((e, index) => {
+                    if (MessageIdentifier.data[e.text] != undefined) {
+                        this.itemData[index]["corner"] = true
+                        this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text]
+                    }
+                })
+
+                this.$forceUpdate()
+            }
+        },
+        async onReady() {
+            let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName)
+            if (MessageIdentifier.code == 0) {
+                CommonUtils.showTips({
+                    title: "娓╅Θ鎻愮ず",
+                    message: MessageIdentifier.msg
+                })
+
+                return
+            }
+
+            this.itemData.forEach((e, index) => {
+                if (MessageIdentifier.data[e.text] != undefined) {
+                    this.itemData[index]["corner"] = true
+                    this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text]
+                }
+            })
+
+            this.$forceUpdate()
         },
         methods: {
+            async getWorkLinkList() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList',
+                        data: {
+                            sWhere: ` and (鎺ユ敹浜� = '${getUserInfo()['HEmpName']}' or 鎶勯�佹帴鏀朵汉 = '${getUserInfo()['HEmpName']}') and 闃呰鐘舵�� = '鏈槄'`,
+                            user: getUserInfo()["Czymc"]
+                        }
+                    })
+
+                    let {
+                        count,
+                        data,
+                        Message,
+                        list
+                    } = res.data
+                    if (count == 1) {
+                        this.bindingData.UnReadCount = data.length
+                    } else {
+                        CommonUtils.showTips({
+                            title: '娓╅Θ鎻愮ず',
+                            message: `鑾峰彇宸ヤ綔鑱旂郴鍗曞紓甯�: ${Message}`
+                        })
+                    }
+
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: `鑾峰彇宸ヤ綔鑱旂郴鍗曞紓甯�: ${err}`
+                    })
+                }
+            },
+            // 鏍规嵁妯″潡鑾峰彇鏈鐞嗘秷鎭潯鏁�
+            async getMessageIdentifierCount(menuListName) {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Web/getMessageIdentified',
+                        data: {
+                            user: getUserInfo()["HEmpName"],
+                            moduleName: menuListName
+                        }
+                    })
+                    let {
+                        data,
+                        count,
+                        Message
+                    } = res.data
+                    if (count == 1) {
+                        let retVal = Array.from(data).reduce((acc, item) => {
+                            acc[item['moduleName']] = item.count
+                            return acc
+                        }, {})
+
+                        return {
+                            code: 1,
+                            msg: Message,
+                            data: retVal
+                        }
+                    } else {
+                        return {
+                            code: 0,
+                            msg: Message,
+                            data: []
+                        }
+                    }
+                } catch (err) {
+
+                }
+            },
+            async getHiddenItem() {
+                let data = await getMenuList({
+                    menuName: this.menuListName
+                })
+
+                Array.from(data).forEach((e, index) => {
+                    if (index < this.itemData.length) {
+                        this.itemData[e["HIndex"]]["hidden"] = !CommonUtils.stringToBoolean(e[
+                            "HShowMode"] || false)
+                        this.itemData[e["HIndex"]].id = e["HEntryID"]; //id涓�0寮哄埗闅愯棌
+                    }
+                })
+
+                let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName)
+                if (MessageIdentifier.code == 0) {
+                    CommonUtils.showTips({
+                        title: "娓╅Θ鎻愮ず",
+                        message: MessageIdentifier.msg
+                    })
+
+                    return
+                }
+
+                Array.from(data).forEach((e, index) => {
+                    if (index < this.itemData.length) {
+                        if (MessageIdentifier.data[this.itemData[e["HIndex"]].text]) {
+                            this.$set(this.itemData[e["HIndex"]], "corner", true)
+                            this.$set(this.itemData[e["HIndex"]], "cornerCount", MessageIdentifier.data[this
+                                .itemData[e["HIndex"]].text])
+                        }
+                    }
+                })
+                this.initFinished = true
+                this.$forceUpdate()
+            },
+            switchHidden(index) {
+                this.updateCount++;
+                this.itemData[index].hidden = !this.itemData[index].hidden
+            },
+            switchIconsModeHandler() {
+                this.canEdit = !this.canEdit
+                if (this.canEdit == false && this.updateCount > 0) {
+                    this.$nextTick(() => {
+                        // uni.setStorageSync("HIndexItemData", this.itemData)
+                        setMenuList({
+                            menuName: this.menuListName,
+                            payload: this.itemData
+                        })
+
+                        this.updateCount = 0
+                    })
+                }
+                this.$forceUpdate()
+            },
             toUrl(item) {
                 if (item.url) {
                     uni.navigateTo({
@@ -220,6 +442,18 @@
 </script>
 
 <style lang="scss" scoped>
+    .header {
+        width: 100%;
+        height: 2em;
+        position: relative;
+
+        .switch-button {
+            position: absolute;
+            right: 10rpx;
+            bottom: 0;
+        }
+    }
+
     page {
         width: 100vw;
         min-height: 100vh;
@@ -252,6 +486,24 @@
                 margin-top: .2vh;
             }
         }
+
+        .edit {
+            position: relative;
+        }
+
+        .edit-mark {
+            position: absolute;
+            top: 0;
+            right: 0;
+        }
+
+        view[enable-hidden] {
+            opacity: .4 !important;
+        }
+
+        view[hidden] {
+            display: none;
+        }
     }
 
     // .mains {

--
Gitblit v1.9.1