Commit 8c9a7863 authored by 和慭琛's avatar 和慭琛

接单列表页 页面搭建 99%

parent 959cc32d
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
@import '@/common/index.scss'; @import '@/common/index.scss';
@import 'uview-ui/index.scss'; @import 'uview-ui/index.scss';
</style> </style>
<script> <script>
export default {
export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log('App Launch')
}, },
......
### TimeSelector 多粒度时间选择器
**简介:**
本组件是一种可多种样式显示时间选择器,可根据你所要指定的区间及时间进行灵活性的选择,组件名:``wing-time-selector``,代码块: timeSelector。
**使用方式:**
在 ``script`` 中引用组件
```javascript
import timeSelector from '@/components/wing-time-selector/wing-time-selector.vue';
export default {
components: {timeSelector}
}
```
在 ``template`` 中使用组件
```html
<timePicker
showType="date"
beginDate="1970-01-01"
endDate="2030-12-31"
beginTime="06:00:00"
endTime="23:59:59"
@btnConfirm="btnConfirm"
@btnCancel="btnCancel"
>
<text>时间选择器</text>
</timePicker>
```
实际效果参考:[https://github.com/749402932/uni-app-compontents/tree/master/uni-wing-time-selector-demo](https://github.com/749402932/uni-app-compontents/tree/master/uni-wing-time-selector-demo)
**TimePicker 属性说明:**
|属性名 |类型 |默认值 |说明 |
|--- |---- |--- |--- |
|showType |String |'dateToTime' |时间选择器的显示模式,默认可以不填 |
|beginDate |String |'1900-01-01' |限制选择器开始日期,默认可以不填 |
|endDate |String |'2500-12-31' |限制选择器结束日期,默认可以不填 |
|beginTime |String |'00:00:00' |限制选择器时间段开始时间,默认可以不填 |
|endTime |String |'23:59:59' |限制选择器时间段结束时间,默认可以不填 |
|isClick |Boolean|false |是否为禁用点击状态,默认可以不填 |
**showType 值说明:**
|值 |类型 |说明 |
|--- |---- |--- |
|year |String |选择器显示年 |
|month |String |选择器显示月份 |
|day |String |选择器显示天 |
|hour |String |选择器显示小时 |
|minute |String |选择器显示分钟 |
|second |String |选择器显示秒 |
|yearToMonth |String |选择器显示年月 |
|monthToDay |String |选择器显示月日 |
|hourToMinute |String |选择器显示时分 |
|minuteToSecond |String |选择器显示分秒 |
|date |String |选择器显示年月日 |
|time |String |选择器显示时分秒 |
|yearToMinute |String |选择器显示年月日时分 |
|dateToTime |String |选择器显示年月日时分秒 |
**事件说明:**
|事件名称 |说明 |
|---|---|
|btnConfirm |时间选择器点击【确定】按钮时时触发的事件,参数为e|
|btnCancel |时间选择器点击【取消】按钮时时触发的事件|
v_1.0.3
**修复BUG说明:**
修复部分问题,持续更新。。。。。。
**感谢:**
不好意思,由于疫情问题,我到现在才上班,再次感谢用户提出的问题!!!
> 在这里如您有更多优化建议和需求,请联系作者。谢谢!
\ No newline at end of file
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
}, },
*/ */
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "接单"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
...@@ -23,7 +30,8 @@ ...@@ -23,7 +30,8 @@
"style": { "style": {
"navigationBarTitleText": "下单" "navigationBarTitleText": "下单"
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
......
<template>
<view class="">
<view class="topView">
<view :class="activeTop == 0 ? 'topItemView activeColor' : 'topItemView' " @click="topClick(0)">
<text class="topItemText">抢单广场</text>
</view>
<view :class="activeTop == 1 ? 'topItemView activeColor' : 'topItemView' " @click="topClick(1)">
<text class="topItemText">全部未完工</text>
</view>
<view :class="activeTop == 2 ? 'topItemView activeColor' : 'topItemView' " @click="topClick(2)">
<text class="topItemText">已完工单</text>
</view>
</view>
<view class="listView">
<view class="itemView" v-for="(item,ikey) in grabList":key="ikey" v-if="activeTop == 0">
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text>
<text class="u-font-24 u-m-r-24">{{item.type}}</text>
</view>
<text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text>
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.product}}</text>
<text class="u-font-24 u-m-r-24">{{item.status}}</text>
</view>
</view>
<view class="itemView" v-for="(item,ikey) in unfinishList":key="ikey" v-if="activeTop == 1">
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.orderType}}</text>
<text class="u-font-24 u-m-r-24">{{item.date}}</text>
</view>
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text>
<text class="u-font-24 u-m-r-24">{{item.type}}</text>
</view>
<text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text>
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.product}}</text>
<text class="u-font-24 underLine" v-if="item.bookDate.length==0" @click="bookClick(item)">(未预约)</text>
<text class="u-font-24" v-if="item.bookDate.length>0">(预约:{{item.bookDate}})</text>
<text class="u-font-24 u-m-r-24">{{item.status}}</text>
</view>
</view>
<view class="itemView" v-for="(item,ikey) in finishList":key="ikey" v-if="activeTop == 2">
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.orderType}}</text>
<text class="u-font-24 u-m-r-24">{{item.date}}</text>
</view>
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text>
<text class="u-font-24 u-m-r-24">{{item.type}}</text>
</view>
<text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text>
<view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.product}}</text>
<text class="u-font-24 u-m-r-24">{{item.status}}</text>
</view>
</view>
</view>
<!--timePicker
showType="date"
beginDate="1970-01-01"
endDate="2030-12-31"
beginTime="06:00:00"
endTime="23:59:59"
@btnConfirm="btnConfirm"
@btnCancel="btnCancel"
>
<text>时间选择器</text>
</timePicker-->
</view>
</template>
<script>
export default {
data() {
return {
activeTop:0,
grabList:[
{
name:'李先生',
phone:'15811112222',
guard:'保内',
type:'维修-调试',
product:'小米 新风机',
address:'广东省深圳市宝安区新安街道庭威产业园10C',
status:'待抢单',
},
{
name:'许三多',
phone:'15811112222',
guard:'保外',
type:'安装-清洗',
product:'TCL 空调',
address:'广西壮族自治区北海市海城区高德街道北海大道东延线5号和苑12幢203号',
status:'已被抢',
},
],
unfinishList:[
{
orderType:'扳手会工单',
date:'10-21 09:32',
name:'张先生',
phone:'15811112222',
guard:'保内',
type:'维修-调试',
product:'小米 新风机',
address:'广东省深圳市宝安区新安街道庭威产业园10C',
status:'待抢单',
bookDate:''
},
{
orderType:'抢单',
date:'10-21 09:32',
name:'张先生',
phone:'15811112222',
guard:'保内',
type:'维修-调试',
product:'小米 新风机',
address:'广东省深圳市宝安区新安街道庭威产业园10C',
status:'待抢单',
bookDate:'10-25 10:00'
}
],
finishList:[
{
orderType:'扳手会工单',
date:'10-21 09:32',
name:'已完工',
phone:'15811112222',
guard:'保内',
type:'维修-调试',
product:'小米 新风机',
address:'广东省深圳市宝安区新安街道庭威产业园10C',
status:'待抢单',
bookDate:''
}
],
}
},
onLoad() {
},
methods: {
topClick: function (active) {
if(this.activeTop!=active){
this.activeTop = active
}
},
bookClick: function (item) {
console.log(item.address)
},
}
}
</script>
<style>
.topView{
display: flex;
flex-direction: row;
}
.topItemView{
background-color: #FFFFFF;
width: 33%;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid #999999;
}
.topItemText{
font-size: 28rpx;
}
.activeColor{
background-color: #999999;
}
.listView{
width: 100%;
display: flex;
flex-direction: column;
}
.itemView{
width: 100%;
display: flex;
flex-direction: column;
border-bottom: 2rpx solid #999999;
}
.nameView{
width: 100%;
height: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.underLine{
text-decoration:underline;
}
</style>
{ {
"pages": [ "pages": [
"pages/take/index",
"pages/index/index", "pages/index/index",
"pages/index/record", "pages/index/record",
"pages/index/success" "pages/index/success"
...@@ -12,5 +13,5 @@ ...@@ -12,5 +13,5 @@
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"usingComponents": {}, "usingComponents": {},
"sitemapLocation": "sitemap0.json" "sitemapLocation": "sitemap29.json"
} }
\ No newline at end of file
...@@ -94,7 +94,9 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default = ...@@ -94,7 +94,9 @@ Object.defineProperty(exports, "__esModule", { value: true });exports.default =
// //
// //
var _default = var _default =
{ {
onLaunch: function onLaunch() { onLaunch: function onLaunch() {
console.log('App Launch'); console.log('App Launch');
}, },
......
...@@ -3347,6 +3347,8 @@ u-dropdown { ...@@ -3347,6 +3347,8 @@ u-dropdown {
......
This diff is collapsed.
{
"navigationBarTitleText": "接单",
"usingComponents": {}
}
\ No newline at end of file
<view><view class="topView"><view data-event-opts="{{[['tap',[['topClick',[0]]]]]}}" class="{{[activeTop==0?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">抢单广场</text></view><view data-event-opts="{{[['tap',[['topClick',[1]]]]]}}" class="{{[activeTop==1?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">全部未完工</text></view><view data-event-opts="{{[['tap',[['topClick',[2]]]]]}}" class="{{[activeTop==2?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">已完工单</text></view></view><view class="listView"><block wx:for="{{grabList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==0}}"><view class="itemView"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block><block wx:for="{{unfinishList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==1}}"><view class="itemView"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.orderType}}</text><text class="u-font-24 u-m-r-24">{{item.date}}</text></view><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><block wx:if="{{item.bookDate.length==0}}"><text data-event-opts="{{[['tap',[['bookClick',['$0'],[[['unfinishList','',ikey]]]]]]]}}" class="u-font-24 underLine" bindtap="__e">(未预约)</text></block><block wx:if="{{item.bookDate.length>0}}"><text class="u-font-24">{{"(预约:"+item.bookDate+")"}}</text></block><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block><block wx:for="{{finishList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==2}}"><view class="itemView"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.orderType}}</text><text class="u-font-24 u-m-r-24">{{item.date}}</text></view><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block></view></view>
\ No newline at end of file
.topView{
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
}
.topItemView{
background-color: #FFFFFF;
width: 33%;
height: 80rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
border: 2rpx solid #999999;
}
.topItemText{
font-size: 28rpx;
}
.activeColor{
background-color: #999999;
}
.listView{
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
}
.itemView{
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
border-bottom: 2rpx solid #999999;
}
.nameView{
width: 100%;
height: 80rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.underLine{
text-decoration:underline;
}
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
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