Commit 2b0d218f authored by Facius's avatar Facius

详情页面弹窗

parent abb9f771
<template> <template>
<u-popup v-model="show" mode="center" safe-area-inset-bottom width="690rpx" :mask-close-able="flase" close-icon-color="#FFFFFF" height="80%"> <u-popup v-model="show" mode="center" safe-area-inset-bottom width="690rpx" :mask-close-able="flase"
close-icon-color="#FFFFFF" height="80%">
<!-- 申请列表 --> <!-- 申请列表 -->
<view class="apply-list-view"> <view class="apply-list-view">
<view class="colse-view"> <view class="content-view">
<view class="right-view" @click.throttle="handleClose"> <view class="list-content">
<u-icon name="close"></u-icon> <view v-for="(item, index) in list" :key="index">
</view> <AppliedCell @operate="handleOperate" :info="item"></AppliedCell>
</view>
</view>
<view class="bottom-view">
<view class="bottom-warehouse">
<view class="bottom-title">
<text>备件订单</text>
<view class="order-file-right" @click="$u.throttle(handleClick, 500)">
<text>点击查看</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="bottom-content">
<view v-for="(item, index) in bottomItems" :key="index" class="bottom-content-item"
@click="handleClick(item.index)">
<view class="bottom-image">
<image :src="item.icon" :style="item.imageStyle"></image>
</view>
<view>{{item.title}}</view>
</view>
</view>
</view>
<view class="line-view"></view>
<view class="apply-button" @click="$u.throttle(handleApply, 500)">
<text :custom-style="applyStyle" type="primary">继续申请</text>
</view>
</view>
</view> </view>
<view class="list-content"> <view class="colse-view">
<view v-for="(item, index) in list" :key="index"> <image class="image-view" :src="closeImage" @click.throttle="$u.throttle(handleClose, 500)"></image>
<AppliedCell @operate="handleOperate" :info="item"></AppliedCell>
</view>
</view>
<view class="bottom-view">
<u-button :custom-style="applyStyle" shape="circle" @click="handleApply" type="primary">申请配件</u-button>
</view> </view>
</view> </view>
</u-popup> </u-popup>
...@@ -42,57 +64,155 @@ ...@@ -42,57 +64,155 @@
return { return {
} }
}, },
computed: { computed: {
applyStyle() { closeImage() {
return { return process.uniEnv.qn_base_url + 'dianjiquxiao.png'
'height': '104rpx', },
'width': '100%', bottomItems() {
} // index: 跳转到我的订单页面之后第几个tab,
} return [{
index: 3,
title: '代签收',
icon: process.uniEnv.qn_base_url + 'daiqianshou.png',
imageStyle: 'width:48rpx;height:48rpx'
},
{
index: 2,
title: '待发货',
icon: process.uniEnv.qn_base_url + 'daifahuo.png',
imageStyle: 'width:48rpx;height:48rpx'
},
{
index: 1,
title: '待审核',
icon: process.uniEnv.qn_base_url + 'daishenhe.png',
imageStyle: 'width:44rpx;height:54rpx'
},
{
index: 4,
title: '已签收',
icon: process.uniEnv.qn_base_url + 'qianshou.png',
imageStyle: 'width:48rpx;height:48rpx'
},
]
}
}, },
methods: { methods: {
handleClose() { handleClose() {
this.$emit('update:show', false) this.$emit('update:show', false)
}, },
handleOperate(type) { handleOperate(type) {
// 调接口 // 调接口
// 刷新页面 // 刷新页面
// 告诉父级做了操作 // 告诉父级做了操作
this.$emit('operate', type) this.$emit('operate', type)
}, },
handleApply() { handleApply() {
this.$emit('apply') this.$emit('apply')
}, },
handleClick(index = 0) {
uni.navigateTo({
url: 'pages/mine/warehouse/index?index=' + index
})
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.apply-list-view { .apply-list-view {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.colse-view {
height: 80rpx; .content-view {
display: flex; border-radius: 12rpx;
align-items: center; background-color: #FFFFFF;
justify-content: flex-end; height: 100%;
.right-view { display: flex;
width: 80rpx; flex-direction: column;
height: 80rpx;
display: flex; .list-content {
align-items: center; height: 100%;
justify-content: center; }
color: #FF0000;
} .bottom-view {
} .bottom-warehouse {
.list-content { background-color: #FFFFFF;
height: 100%; border-radius: 12rpx;
overflow: auto;
} .bottom-title {
.bottom-view { color: #333333;
font-weight: bold;
} font-size: 32rpx;
margin: 0rpx 30rpx 40rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.order-file-right {
font-weight: 400;
color: #2272FF;
font-size: 26rpx;
}
}
.bottom-content {
display: flex;
justify-content: space-around;
align-items: center;
.bottom-content-item {
color: #333333;
font-size: 26rpx;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
.bottom-image {
width: 60rpx;
height: 60rpx;
margin-bottom: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-top: 24rpx;
}
.apply-button {
width: 100%;
color: #2272FF;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
height: 112rpx;
}
}
}
.colse-view {
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
margin-top: 30rpx;
.image-view {
width: 60rpx;
height: 60rpx;
}
}
} }
</style> </style>
...@@ -61,12 +61,13 @@ ...@@ -61,12 +61,13 @@
default () { default () {
return '确定' return '确定'
} }
} },
}, customStyle: {
customStyle: { type: String,
type: String, default: 'background-color: #FFFFFF;padding: 0 30rpx;'
default: 'background-color: #FFFFFF;padding: 0 30rpx;' },
}, },
data() { data() {
return { return {
checked: false checked: false
......
...@@ -123,8 +123,11 @@ ...@@ -123,8 +123,11 @@
} }
}, },
}, },
onLoad(e) { onLoad(option) {
getApp().trackPage('我的配件页') getApp().trackPage('我的配件页')
if (option && option.index) {
this.currentIndex = option.index
}
this.reloadPartsList() this.reloadPartsList()
this._freshing = false; this._freshing = false;
}, },
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
</view> </view>
</view> </view>
<view>
<u-toast ref="uToast" />
</view>
</view> </view>
</template> </template>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
@submit="$u.throttle(handleSubmit, 500)" /> @submit="$u.throttle(handleSubmit, 500)" />
</view> </view>
</template> </template>
<view class="fixed-button"> <view class="fixed-button" v-if="!showBounce">
<ApplyButton :type="buttonType" @click="handleClickApply"/> <ApplyButton :type="buttonType" @click="handleClickApply"/>
</view> </view>
</view> </view>
......
...@@ -931,6 +931,9 @@ ...@@ -931,6 +931,9 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.order-wrap { .order-wrap {
/deep/ .u-mode-center-box {
background-color: transparent !important;
}
width: 750rpx; width: 750rpx;
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment