From 2667d6931e0f85f3dda26238330d9c45385025cf Mon Sep 17 00:00:00 2001 From: wzp <2880584989@qq.com> Date: 星期一, 21 二月 2022 17:51:57 +0800 Subject: [PATCH] 最新版本 --- assetMgtH5/pages/apply/apply.vue | 81 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/assetMgtH5/pages/apply/apply.vue b/assetMgtH5/pages/apply/apply.vue index 8183fd0..95923ca 100644 --- a/assetMgtH5/pages/apply/apply.vue +++ b/assetMgtH5/pages/apply/apply.vue @@ -1,6 +1,52 @@ <template> <view> + <view class=""> + <cu-custom bgColor="bg-gradual-blue" > + <!-- <block slot="backText">杩斿洖</block> --> + <block slot="content">鎴戠殑鐢宠</block> + </cu-custom> + </view> + <view class=""> + <u-subsection + :list="curlist" + mode="button" + :current="current" + @change="changeCurrent" + ></u-subsection> + </view> + + <view class=""> + <view class="cu-list menu-avatar"> + <view class="cu-item" v-for="(item,index) in assetsList" :key="index" @click="navTo(item.id)"> + <view class="cu-avatar radius lg bg-white" + style="background-image:url(../../static/device.png);"> + </view> + <view class="content"> + <view> + <view class="text-cut text-bold text-xl">{{item.approvalAssets[0].assets.name}}</view> + <view class="cu-tag radius bg-orange sm">鏁伴噺锛歿{item.approvalAssets[0].quantity}}</view> + </view> + <view class="text-gray text-sm flex"> + <view class="text-cut">鐢宠鏃堕棿:{{item.createTime}}</view> + </view> + + </view> + <view class="action"> + <view class="text-grey text-xs">鐢宠鐘舵��</view> + <view class="cu-tag round bg-red sm">{{current+1===1?'寰呭鎵�':current+1===2?'閫氳繃':"鏈�氳繃"}}</view> + </view> + </view> + </view> + + <view class="" v-if="assetsList.length===0"> + <u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"> + </u-empty> + </view> + </view> + + + </view> </template> @@ -8,11 +54,46 @@ export default { data() { return { + assetsList:[], + current: 0, + status:0, + curlist: ['寰呭鎵�', '宸插畬鎴�', '鏈�氳繃'], } }, + onShow() { + this.getAssetList(); + }, methods: { + changeCurrent(index) { + this.current = index + this.getAssetList(); + }, + //璇锋眰 + getAssetList() { + this.$http.get('/assets/approval/myApply',{params:{ + "pageNum":1, + "pageSize":100, + "type":this.current+1 + }}) + .then(res => { + // debugger; + if(res.data.code===0){ + this.assetsList =res.data.data; + // if(this.assetsList) + // console.log(JSON.stringify(res.data.data[0])) + } + }).catch(err => { + console.log(err.data) + }) + }, + + navTo(id) { + uni.navigateTo({ + url: `./applyInfo?id=${id}&type=${this.current+1}` + }) + } } } </script> -- Gitblit v1.9.1