parent
1c059abf6e
commit
39d12797ca
10 changed files with 769 additions and 180 deletions
@ -0,0 +1,326 @@ |
||||
<template> |
||||
<view class="page-css"> |
||||
<view class="page-search-top"> |
||||
<betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单单号' icon="search" |
||||
style="margin-bottom: 32rpx" @changevalue="searchData()" /> |
||||
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab" |
||||
bg-color="rgba(248, 248, 248, 1)"></u-tabs> |
||||
</view> |
||||
<view class="order-box"> |
||||
<view class="order-item" v-for="(item, index) in orderData" :key="index" @click="goPage(item, 'details')"> |
||||
<view class="item-top"> |
||||
|
||||
<view class="item-left"> |
||||
<text class="item-orderNo">{{ item.unitName }}</text> |
||||
<text class="item-time"> 单号:{{ item.taskNo }}</text> |
||||
</view> |
||||
<view class="item-right"> |
||||
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" |
||||
:bg-color="tagColor[statusName(item.status)]" /> |
||||
</view> |
||||
</view> |
||||
<view class="item-con"> |
||||
<view class="con-left"> |
||||
<image src="@/static/images/pic-default.png" alt="" /> |
||||
</view> |
||||
<view class="con-right"> |
||||
<text class="con-title">提报类型:{{ item.faultType }}</text> |
||||
<view class="con-content"> |
||||
<text>{{ item.faultDescribe }}</text> |
||||
</view> |
||||
<view class="con-btn"> |
||||
|
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<betone-loading ref="BetLoading" /> |
||||
|
||||
|
||||
|
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
props: { |
||||
|
||||
}, |
||||
data() { |
||||
return { |
||||
searchInfo: { |
||||
requirementCode: "", |
||||
type: '',//状态 |
||||
}, |
||||
tabList: [ |
||||
{ |
||||
name: "全部", |
||||
key: "9999", |
||||
}, |
||||
{ |
||||
name: "待提报", |
||||
key: "-1", |
||||
}, |
||||
{ |
||||
name: "维修中", |
||||
key: "1,2,3", |
||||
}, |
||||
{ |
||||
name: "已完成", |
||||
key: "4,5,6", |
||||
}, |
||||
], |
||||
tagColor: { |
||||
维修中: "#3A62D7", |
||||
待确认: "#81B337", |
||||
待维修: "#3A62D7", |
||||
待提报: "#81B337", |
||||
已完成: "#CECECE", |
||||
待维修: '#E99D42' |
||||
}, |
||||
|
||||
current: 0, |
||||
|
||||
orderData: [], |
||||
|
||||
|
||||
}; |
||||
}, |
||||
computed: { |
||||
|
||||
dataTypes() { |
||||
return this.$store.state.dataType |
||||
}, |
||||
}, |
||||
|
||||
mounted() { |
||||
this.$nextTick(() => { |
||||
this.getRecordsList() |
||||
|
||||
}); |
||||
}, |
||||
methods: { |
||||
// 获取列表 |
||||
getRecordsList() { |
||||
this.$refs.BetLoading.show(); |
||||
|
||||
this.$u.api.getDictionaryList().then(res => { |
||||
if (res.code == 200) { |
||||
|
||||
|
||||
this.orderData = res.data; |
||||
|
||||
this.$refs.BetLoading.hide(); |
||||
} |
||||
}).catch(err => { |
||||
|
||||
}) |
||||
}, |
||||
// 搜索 单号 |
||||
searchData() { |
||||
if (this.dataTypes != 1) { |
||||
// 非管理员和客户 不传提报单位 |
||||
this.searchInfo.reportUnit = this.searchInfo.requirementCode |
||||
} else { |
||||
this.searchInfo.reportUnit = '' |
||||
} |
||||
this.isNomore = false |
||||
this.page.currentPage = 1; |
||||
this.getRecordsList() |
||||
}, |
||||
// tab切换 |
||||
changeTab(index) { |
||||
this.current = index; |
||||
this.searchInfo.type = this.tabList[index].key == '9999' ? '' : this.tabList[index].key |
||||
this.isNomore = false |
||||
this.page.currentPage = 1; |
||||
this.getRecordsList() |
||||
}, |
||||
// 获取状态信息 |
||||
statusName(item) { |
||||
if (item == -1) { |
||||
return '待提报' |
||||
} |
||||
if (item == 0) { |
||||
return '待接单' |
||||
} |
||||
if (item == 1 || item == 2 || item == 3) { |
||||
return '待维修' |
||||
} |
||||
if (item == 4 || item == 5 || item == 6) { |
||||
return '已完成' |
||||
} |
||||
}, |
||||
|
||||
|
||||
|
||||
|
||||
// 跳转详情 |
||||
goPage(item, type) { |
||||
if (type == 'details') { |
||||
uni.navigateTo({ |
||||
url: "/pages/submission/recordsdetails?id=" + item.id, |
||||
}); |
||||
} |
||||
|
||||
if (type == 'breakdownView') { |
||||
let param = { |
||||
id: item.id, |
||||
type: type |
||||
} |
||||
uni.navigateTo({ |
||||
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, |
||||
}); |
||||
} |
||||
if (type == 'breakdownUpdate') { |
||||
let param = { |
||||
id: item.id, |
||||
type: type |
||||
} |
||||
uni.navigateTo({ |
||||
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, |
||||
}); |
||||
} |
||||
if (type == 'evaluate') { |
||||
let param = { |
||||
id: item.id, |
||||
} |
||||
uni.navigateTo({ |
||||
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`, |
||||
}); |
||||
} |
||||
}, |
||||
|
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.page-css { |
||||
padding: 0; |
||||
|
||||
.page-search-top { |
||||
height: 210rpx; |
||||
background-color: rgba(248, 248, 248, 1); |
||||
padding: 0 40rpx 0; |
||||
} |
||||
|
||||
.order-box { |
||||
margin-top: 20rpx; |
||||
|
||||
.order-item { |
||||
height: 414rpx; |
||||
margin: 0 24rpx 20rpx; |
||||
border-radius: 20rpx; |
||||
background: #fff; |
||||
display: flex; |
||||
flex-direction: column; |
||||
|
||||
.item-top { |
||||
height: 114rpx; |
||||
border-bottom: 1px solid rgba(239, 239, 239, 1); |
||||
display: flex; |
||||
flex-direction: row; |
||||
width: 100%; |
||||
|
||||
.item-left { |
||||
flex: 1; |
||||
|
||||
text { |
||||
display: block; |
||||
} |
||||
|
||||
.item-orderNo { |
||||
color: rgba(51, 51, 51, 1); |
||||
font-size: 28rpx; |
||||
padding: 12rpx 0 0 26rpx; |
||||
} |
||||
|
||||
.item-time { |
||||
color: rgba(190, 190, 190, 1); |
||||
font-size: 24rpx; |
||||
padding: 12rpx 0 0 26rpx; |
||||
} |
||||
} |
||||
|
||||
.item-right { |
||||
width: 132rpx; |
||||
height: 48rpx; |
||||
margin: 36rpx 24rpx 0 0; |
||||
} |
||||
} |
||||
|
||||
.item-con { |
||||
flex: 1; |
||||
display: flex; |
||||
flex-direction: row; |
||||
|
||||
.con-left { |
||||
width: 150rpx; |
||||
height: 150rpx; |
||||
margin: 24rpx 28rpx 0 28rpx; |
||||
|
||||
image { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
} |
||||
|
||||
.con-right { |
||||
flex: 1; |
||||
margin-right: 24rpx; |
||||
display: flex; |
||||
flex-direction: column; |
||||
|
||||
text { |
||||
display: block; |
||||
} |
||||
|
||||
.con-title { |
||||
margin-top: 12rpx; |
||||
line-height: 60rpx; |
||||
color: rgba(0, 0, 0, 1); |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.con-content { |
||||
|
||||
color: rgba(108, 108, 108, 1); |
||||
font-size: 24rpx; |
||||
// line-height: 36rpx; |
||||
margin-top: 14rpx; |
||||
flex: 1; |
||||
|
||||
text { |
||||
display: -webkit-box; |
||||
-webkit-box-orient: vertical; |
||||
-webkit-line-clamp: 2; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
line-height: 1.5em; |
||||
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */ |
||||
max-height: 3em; |
||||
/* 3行的高度 */ |
||||
width: 100%; |
||||
/* 根据需要设置宽度 */ |
||||
word-wrap: break-word; |
||||
/* 允许在单词内换行 */ |
||||
word-break: break-all; |
||||
/* 允许在任意字符处换行 */ |
||||
} |
||||
} |
||||
|
||||
.con-btn { |
||||
margin-top: 56rpx; |
||||
margin-bottom: 32rpx; |
||||
display: inline-block; |
||||
text-align: right; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
@ -1,78 +0,0 @@ |
||||
<template> |
||||
<view class="page-css"> |
||||
<view class="search-box"> |
||||
<betone-new-input v-model="searchInfo.name" placeholder="搜索物品名称" icon="search" style="margin-bottom: 32rpx" |
||||
@changevalue="searchData()" /> |
||||
</view> |
||||
<view class="material-box"> |
||||
|
||||
</view> |
||||
<view class="evaluate_box"> |
||||
<!-- <view class="evaluate_btn"> |
||||
确定 |
||||
</view> --> |
||||
<u-button class="evaluate_btn" size="medium" type="primary">确定</u-button> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
searchInfo: { |
||||
name: '', |
||||
} |
||||
} |
||||
}, |
||||
methods: { |
||||
searchData() { |
||||
// 搜索物品名称 |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.page-css { |
||||
padding: 0; |
||||
display: flex; |
||||
flex-direction: column; |
||||
.search-box { |
||||
background: rgba(248, 248, 248, 1); |
||||
height: 140rpx; |
||||
padding: 0 32rpx 0; |
||||
} |
||||
.material-box{ |
||||
flex: 1; |
||||
background: #fff; |
||||
margin: 24rpx 24rpx 178rpx 24rpx; |
||||
border-radius: 20rpx; |
||||
overflow: auto; |
||||
} |
||||
.evaluate_box { |
||||
width: 100%; |
||||
height: 154rpx; |
||||
bottom: 0; |
||||
position: fixed; |
||||
background: #fff; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: flex-end; |
||||
|
||||
.evaluate_btn { |
||||
width: 160rpx; |
||||
height: 60rpx; |
||||
border-radius: 8rpx; |
||||
background-color: rgba(255, 255, 255, 1); |
||||
color: rgba(58, 98, 215, 1); |
||||
font-size: 24rpx; |
||||
text-align: center; |
||||
font-family: PingFangSC-regular; |
||||
border: 2rpx solid rgba(58, 98, 215, 1); |
||||
margin-right: 26rpx; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
|
After Width: | Height: | Size: 445 B |
Loading…
Reference in new issue