Commit 4b3d990f authored by Facius's avatar Facius

feat: 详情

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