From 69a6a1318765ae537c243d7c543b8c7ed8cfdcd0 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 17 二月 2025 14:39:26 +0800 Subject: [PATCH] # --- pages/home/orderManage.vue | 131 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 112 insertions(+), 19 deletions(-) diff --git a/pages/home/orderManage.vue b/pages/home/orderManage.vue index f061fb2..a7a74ce 100644 --- a/pages/home/orderManage.vue +++ b/pages/home/orderManage.vue @@ -2,16 +2,18 @@ <view> <scroll-view scroll-y class="page"> <view class="nav-list"> - <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo + <!-- :url="'/pages' + item.url + '?param=' + item.param" navigateTo--> + <view hover-class='none' class="nav-li" @click="toOrder(item)" :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index"> <view class="nav-title">{{item.title}}</view> <view class="nav-name">{{item.name}}</view> <text :class="'cuIcon-' + item.cuIcon"></text> - </navigator> + </view> </view> <view class="cu-tabbar-height"></view> </scroll-view> + <view style="height: 50rpx;"></view> </view> </template> @@ -26,8 +28,20 @@ project: 'tzsk', elements2: [ { + title: '寰呭寘瑁呭叆搴撳崟', + name: 'pakinOrder', + color: 'blue', + url: `/phyz/waitOrder/waitOrderIn` + }, + { + title: '寰呭寘瑁呭嚭搴撳崟', + name: 'pakinOrder', + color: 'blue', + url: `/phyz/waitOrder/waitOrderOut` + }, + { title: '閲囪喘鍏ュ簱鍗�', - name: 'outPakin', + name: 'pakinOrder', color: 'blue', // cuIcon: 'pullup', url: `/phyz/order/pakinOrderSelect` @@ -47,7 +61,7 @@ // url: `/phyz/order/purchaseOrder` // }, { - title: '璁㈠崟鍑哄簱', + title: '閲囪喘鍑哄簱', name: 'outOrder', color: 'blue', // cuIcon: 'pullup', @@ -59,6 +73,13 @@ color: 'blue', // cuIcon: 'pullup', url: `/phyz/bcp/bcpOrder` + }, + { + title: '鍗婃垚鍝佸叆搴撳崟_鍚稿', + name: 'bcpOrder', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/bcp/bcpOrder_xs` }, { title: '鍗婃垚鍝佽皟鎷ㄥ崟', @@ -74,16 +95,61 @@ // cuIcon: 'pullup', url: `/phyz/orderOut/bcpOrderOutSelect` }, + { + title: '鍗婃垚鍝佸嚭搴撳崟_浜屽巶', + name: 'bcpOutOrder', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/orderOut/bcpOrderOutSelect_2`, + param: {orderType: [1,2,3]} + }, + { + title: '鍗婃垚鍝佸姞宸ュ崟', + name: 'processOrder', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/processOrder/processOrder` + }, + { + title: '鍗婃垚鍝佸洖娴佸崟', + name: 'backStock', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/backStock/backStocksOrder` + }, + { + title: '鍏ュ簱鍗�', + name: 'orderIn', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/comOrder/orderIn` + }, + { + title: '鍑哄簱鍗�', + name: 'orderOut', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/comOrder/orderOut` + }, ], + menu: [], colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ] }; }, - onShow() { + // onShow() { + // this.baseUrl = uni.getStorageSync('baseUrl'); + // this.token = uni.getStorageSync('token'); + // this.project = uni.getStorageSync('project') + // // this.getAuth() + // this.backGroundRepeat() + // }, + onLoad(option) { this.baseUrl = uni.getStorageSync('baseUrl'); this.token = uni.getStorageSync('token'); - this.project = uni.getStorageSync('project') - this.getAuth() + this.project = uni.getStorageSync('project'); + this.menu = uni.getStorageSync('menu'); + this.getAuth2(option.id) this.backGroundRepeat() }, methods: { @@ -98,11 +164,42 @@ i++ } }, - getAuth() { + toOrder(item) { + console.log(item); + uni.navigateTo({ + url: `/pages${item.url}`, + success(res) { + res.eventChannel.emit('param', { + param: item.param + }) + } + }) + }, + getAuth2(id) { + let secMenu = [] + for (let k of this.menu) { + if (id == k.id) { + secMenu = k.children + } + } + for (let i in secMenu) { + this.getIcon(secMenu[i].title) + this.elements.unshift({ + title: secMenu[i].name, + name: secMenu[i].title, + color: this.colorList[i], + cuIcon: this.icon, + id: secMenu[i].id, + param: secMenu[i].param, + url: `${secMenu[i].code}` + }) + } + }, + getAuth(id) { let that = this uni.request({ url: that.baseUrl + '/menu/pda/auth', - data: {}, + data: {level:2 ,id: id}, header: { 'token': uni.getStorageSync('token') }, method: 'POST', success(res) { @@ -115,8 +212,11 @@ that.elements = [] if (res.code === 200) { if (res.data == undefined || res.data == null || res.data == "") { - that.elements = that.elements2 - return + if (res.data.length == 0) { + return + } else { + that.elements = that.elements2 + } } for (var i = 0; i < res.data.length; i++) { if (res.data.length < 0) { @@ -128,16 +228,9 @@ name: res.data[i].title, color: that.colorList[i], cuIcon: that.icon, - url: `/${that.project}${res.data[i].action}` + url: `${res.data[i].code}` }) } - that.elements.push({ - title: '閫�鍑虹櫥褰�', - name: 'logOut', - color: 'grey', - cuIcon: 'exit', - url: '/login/logOut' - }) } else if (res.code === 403) { uni.showToast({ title: res.msg, -- Gitblit v1.9.1