From 22dd2114a29cae87609aeb2b3dba4cf596b306f2 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期五, 15 九月 2023 16:29:30 +0800 Subject: [PATCH] #pda物料页面 --- pages/home/home.vue | 75 ++++++++++++++++++++++++++++--------- 1 files changed, 57 insertions(+), 18 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index 8640219..720897a 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -21,21 +21,44 @@ return { baseUrl: '', token: '', + icon: '', elements: [], - elements2: [{ - title: '缁勬墭鍏ュ簱', - name: 'pakin', + elements2: [ + // { + // 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/pakin' + url: '/pakin/putOn' }, - { - title: '璁㈠崟鍏ュ簱', - name: 'orderPakin', - color: 'blue', - cuIcon: 'pullup', - url: '/order/orderPakin' - }, + // { + // 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', @@ -70,6 +93,13 @@ color: 'red', cuIcon: 'post', url: '/stock/stockCheck' + }, + { + title: '搴撲綅杞Щ', + name: 'locMove', + color: 'olive', + cuIcon: 'order', + url: '/loc/locMove' }, { title: '鍟嗗搧鎵撳嵃', @@ -136,11 +166,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 +179,8 @@ title: '閫�鍑虹櫥褰�', name: 'logOut', color: 'grey', - cuIcon: 'exit' + cuIcon: 'exit', + url: '/login/logOut' }) } else if (res.code === 403) { uni.showToast({ @@ -162,11 +194,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 +213,12 @@ } }) }, + getIcon(e) { + const ways = ['pakin','orderPakin','orderPutOn'] + if (ways.includes(e)) { + this.icon = 'pullup' + } + } } } </script> -- Gitblit v1.9.1