#
whycq
2023-12-15 f74228390342087bbca347a5ddf1c989842f0ed6
pages/home/home.vue
@@ -21,21 +21,65 @@
         return {
            baseUrl: '',
            token: '',
            icon: '',
            elements: [],
            elements2: [{
                  title: '组托入库',
                  name: 'pakin',
            elements2: [
               {
                  title: '平库上架',
                  name: 'GoodsUp',
                  color: 'cyan',
                  cuIcon: 'pullup',
                  url: '/pakin/pakin'
                  url: '/pakin/goodsUp'
               },
               {
                  title: '订单入库',
                  name: 'orderPakin',
                  color: 'blue',
                  title: '条码上架',
                  name: 'GoodsUp',
                  color: 'cyan',
                  cuIcon: 'pullup',
                  url: '/order/orderPakin'
                  url: '/pakin/goodsUp2'
               },
               {
                  title: '平库下架',
                  name: 'GoodsDown',
                  color: 'cyan',
                  cuIcon: 'pullup',
                  url: '/pakin/goodsDown2'
               },
               // {
               //    title: '组托入库',
               //    name: 'pakin',
               //    color: 'orange',
               //    cuIcon: 'pullup',
               //    url: '/pakin/pakin'
               // },
               // {
               //    title: '订单组托',
               //    name: 'orderPakin',
               //    color: 'blue',
               //    cuIcon: 'pullup',
               //    url: '/order/orderPakin'
               // },
               // {
               //    title: '组托上架',
               //    name: 'putOn',
               //    color: 'cyan',
               //    cuIcon: 'pullup',
               //    url: '/pakin/putOn'
               // },
               // {
               //    title: '订单组托2',
               //    name: 'putOn',
               //    color: 'cyan',
               //    cuIcon: 'pullup',
               //    url: '/order/orderPutOn2'
               // },
               // {
               //    title: '订单组托3',
               //    name: 'putOn',
               //    color: 'cyan',
               //    cuIcon: 'pullup',
               //    url: '/order/orderPutOn3'
               // },
               // {
               //    title: '打印',
               //    name: 'print',
@@ -72,33 +116,40 @@
                  url: '/stock/stockCheck'
               },
               {
                  title: '商品打印',
                  name: 'matList',
                  color: 'orange',
                  cuIcon: 'post',
                  url: '/mat/matList'
               },
               {
                  title: '补货',
                  name: 'restock',
                  color: 'yellow',
                  cuIcon: 'punch',
                  url: '/stock/restock'
               },
               {
                  title: '转全板',
                  name: 'piking',
                  title: '库位转移',
                  name: 'locMove',
                  color: 'olive',
                  cuIcon: 'order',
                  url: '/pakin/piking'
                  url: '/loc/locMove'
               },
               {
                  title: '换板绑定',
                  name: 'changePallet',
                  color: 'green',
                  cuIcon: 'order',
                  url: '/stock/changePallet'
               },
               // {
               //    title: '商品打印',
               //    name: 'matList',
               //    color: 'orange',
               //    cuIcon: 'post',
               //    url: '/mat/matList'
               // },
               // {
               //    title: '补货',
               //    name: 'restock',
               //    color: 'yellow',
               //    cuIcon: 'punch',
               //    url: '/stock/restock'
               // },
               // {
               //    title: '转全板',
               //    name: 'piking',
               //    color: 'olive',
               //    cuIcon: 'order',
               //    url: '/pakin/piking'
               // },
               // {
               //    title: '换板绑定',
               //    name: 'changePallet',
               //    color: 'green',
               //    cuIcon: 'order',
               //    url: '/stock/changePallet'
               // },
               {
                  title: '退出登录',
                  name: 'logOut',
@@ -136,11 +187,12 @@
                        if (res.data.length < 0) {
                           break;
                        }
                        that.getIcon(res.data[i].title)
                        that.elements.unshift({
                           title: res.data[i].name,
                           name: res.data[i].title,
                           color: that.colorList[i],
                           cuIcon: 'safe',
                           cuIcon: that.icon,
                           url: res.data[i].action
                        })
                     }
@@ -148,7 +200,8 @@
                        title: '退出登录',
                        name: 'logOut',
                        color: 'grey',
                        cuIcon: 'exit'
                        cuIcon: 'exit',
                        url: '/login/logOut'
                     })
                  } else if (res.code === 403) {
                     uni.showToast({
@@ -162,11 +215,12 @@
                        });
                     }, 1000);
                  } else if(res.status === 404) {
                     uni.showToast({
                        title: '404',
                        icon: "none",
                        position: 'top'
                     })
                     that.elements = that.elements2
                     // uni.showToast({
                     //    title: '默认主页',
                     //    icon: "none",
                     //    position: 'top'
                     // })
                  } else {
                     uni.showToast({
                        title: res.msg,
@@ -180,6 +234,12 @@
               }
            })
         },
         getIcon(e) {
            const ways = ['pakin','orderPakin','orderPutOn']
            if (ways.includes(e)) {
               this.icon = 'pullup'
            }
         }
      }
   }
</script>