Commit 4b3d990f authored by Facius's avatar Facius

feat: 详情

parent 41630a6a
Pipeline #2777 canceled with stages
......@@ -160,6 +160,7 @@ export default {
height: 28rpx;
margin-right: 16rpx;
flex-shrink: 0;
margin-top: 4rpx;
}
}
.time-view {
......
......@@ -11,7 +11,7 @@
hover-class="u-hover-class"
@click="$u.throttle(handleClickRight, 500)"
>
<view v-if="image" class="image-view"><image :src="image"></image></iamge></view>
<view v-if="image" class="image-view" :style="'width:' + imageWidth + 'rpx'"><image mode="widthFix" :src="image"></image></view>
<view>{{ text }}</view>
</view>
</u-navbar>
......@@ -32,6 +32,10 @@ export default {
type: String,
default: '',
},
imageWidth: {
type: [String,Number],
default: '24',
},
background: {
type: Object,
default() {
......@@ -62,7 +66,8 @@ export default {
display: flex;
align-items: center;
justify-content: center;
width: 160rpx;
// width: 160rpx;
padding: 0 18rpx;
height: 48rpx;
border-radius: 24rpx;
background-color: #ffffff;
......
......@@ -17,7 +17,7 @@ export default {
props: {
customStyle: {
type: String,
default: 'background-color: transparent',
default: '',
},
imageName: {
// 图片
......@@ -26,7 +26,7 @@ export default {
},
imageWidth: {
type: [Number, String],
default: '',
default: '374',
},
text: {
// 提示文字
......@@ -58,7 +58,7 @@ export default {
border-radius: 12rpx;
min-height: 460rpx;
margin-top: 50rpx;
background-color: transparent;
.no-data-image {
width: 240rpx;
height: 240rpx;
......
......@@ -11,7 +11,8 @@
<view class="pop-normal-view">
<view class="title-view">{{ title }}</view>
<view class="content-view">
<slot />
<view v-if="content">{{ content }}</view>
<slot v-else />
</view>
<view class="buttons-view">
<view class="left-view">
......@@ -37,12 +38,30 @@
</u-button>
</view>
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickConfirm">
<u-button
:custom-style="customConFirm"
@click="handleClickConfirm"
>
<view class="confirm-view">{{ confirmText }}</view>
</u-button>
</view>
</view>
<view class="bottom-tip">{{ bottomTip }}</view>
<view
v-if="bottomTip"
:class="['bottom-tip', { select: select }]"
:hover-class="isSelect ? 'u-hover-class' : ''"
@click="$u.throttle(handleSelect, 500)"
>
<view :class="['icon-view', { select: select }]">
<u-icon
name="checkbox-mark"
v-if="select"
color="#02a074"
size="24"
></u-icon>
</view>
<view class="tip-view">{{ bottomTip }}</view>
</view>
</view>
</u-popup>
</template>
......@@ -68,21 +87,37 @@ export default {
},
bottomTip: {
type: String,
default: '※ 体验会员,仅非会员用户领取,每个ID限领1次',
default: '',
},
isShare: {
type: Boolean,
default: false,
},
content: {
type: String,
default: '',
},
isError: {
type: Boolean,
default: false,
},
isSelect: {
type: Boolean,
default: false,
},
},
data() {
return {
show: false,
select: false,
}
},
watch: {
visible(val) {
this.show = val
if (val) {
this.select = false
}
},
},
computed: {
......@@ -101,7 +136,7 @@ export default {
customConFirm() {
return {
color: 'transparent',
'background-color': '#02A074',
'background-color': this.isError ? '#FC524D' : '#02A074',
height: '96rpx',
width: '264rpx',
}
......@@ -114,14 +149,17 @@ export default {
},
handleClickConfirm() {
this.changeVisibleValue(false)
this.$emit('confirm', this.type)
this.$emit('confirm', this.selecte)
},
handleClose() {
this.changeVisibleValue(false)
},
handleClickCancel() {
this.changeVisibleValue(false)
this.$emit('cancel', this.type)
this.$emit('cancel', this.selecte)
},
handleSelect() {
this.select = !this.select
},
},
}
......@@ -143,7 +181,7 @@ export default {
padding: 20rpx 32rpx;
color: #191c27;
font-size: 32rpx;
min-height: 240rpx;
min-height: 220rpx;
line-height: 54rpx;
}
.buttons-view {
......@@ -184,9 +222,30 @@ export default {
}
}
.bottom-tip {
text-align: left;
color: #8d8d8d;
font-size: 24rpx;
display: flex;
align-items: center;
font-size: 28rpx;
&.select {
margin-top: 16rpx;
}
.icon-view {
width: 32rpx;
height: 32rpx;
border-radius: 8rpx;
border: 2rpx solid #333333;
margin-right: 16rpx;
display: flex;
align-items: center;
justify-content: center;
&.select {
border: 2rpx solid #02a074;
}
}
.tip-view {
text-align: left;
color: #8d8d8d;
font-size: 24rpx;
}
}
}
</style>
......@@ -145,6 +145,15 @@
"enablePullDownRefresh": false,
"disableScroll": true
}
},{
"path": "detail",
"name": "maintain-bill",
"style": {
"navigationBarTitleText": "详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": true
}
}]
}],
"globalStyle": {
......
......@@ -127,6 +127,7 @@
v-model="showDatePicker"
:params="params"
@confirm="handleComfirmDate"
bottomTip="※ 体验会员,仅非会员用户领取,每个ID限领1次"
></u-picker>
<PopNormal :visible.sync="visible" :isShare="true">
<view
......
This diff is collapsed.
......@@ -3,6 +3,7 @@
<NavbarRight
title="维修记账"
text="导出账单"
imageWidth="20"
:image="outImage"
@click="handlClickOut"
/>
......@@ -69,12 +70,14 @@
}}</view>
</DateRangePicker>
<view class="list-view">
<view class="list-view" v-if="lists && lists.length > 0">
<view v-for="(item, index) in lists" :key="index">
<CellMaintainBill :info="item" @select="handleSelect" />
<CellMaintainBill :info="item" @select="handleSelectCell" />
</view>
</view>
<NoData v-else-if="!loading" customStyle="margin-top:100rpx" :image="currentNoData.image" :text="currentNoData.text"/>
</view>
<PopNormal title="操作提醒" :visible.sync="visible" @confirm="handleClickConfirm" cancelText="取消" confirmText="导出" content="确认导出账单吗?"/>
</view>
</template>
......@@ -82,12 +85,16 @@
import NavbarRight from '@/components/navbar-right'
import DateRangePicker from '@/components/date-range-picker/uni-datetime-picker.vue'
import CellMaintainBill from '@/components/cell-maintain-bill'
import NoData from '@/components/no-data'
import PopNormal from '@/components/pop-normal'
export default {
components: {
NavbarRight,
DateRangePicker,
CellMaintainBill,
NoData,
PopNormal
},
data() {
return {
......@@ -96,6 +103,8 @@ export default {
showPicker: false,
filter: false,
lists: [],
loading: true,
visible: false,
}
},
computed: {
......@@ -108,6 +117,15 @@ export default {
searchImage() {
return this.baseUrl + 'sousuo@3x.png'
},
currentNoData() {
return this.keyword ? {
image: this.baseUrl + 'wusousuojieguo@3x.png',
text: '当前暂无搜索结果'
} : {
image: this.baseUrl + 'wuweixiuzhangdan@3x.png',
text: '当前暂无维修账单信息'
}
},
dateString() {
return this.daterange.length > 0
? `${this.daterange[0]} - ${this.daterange[1]}`
......@@ -135,6 +153,7 @@ export default {
})
},
init() {
this.loading = false
this.lists = [
{
id: '766766777878',
......@@ -159,7 +178,9 @@ export default {
}
}
},
handleClickOut() {},
handleClickOut() {
this.visible = true
},
handleSelectFilter() {
this.filter = !this.filter
},
......@@ -169,16 +190,23 @@ export default {
handleSelectReset() {
this.daterange = []
},
handleSelectCell(id) {},
handlClickOut() {},
search() {
handleSelectCell(id) {
this.$u.route({
url: 'pages/maintain-bill/search',
url: 'pages/maintain-bill/detail',
params: {
keyword: this.keyword,
billId: id,
},
})
},
handlClickOut() {
this.visible = true
},
search() {
},
handleClickConfirm() {
}
},
}
</script>
......
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