123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <template>
- <view class="page">
- <view class="search-container">
- <view class="input-con">
- <view class="input">
- <image src="/static/images/search.png" mode=""></image>
- <input
- v-model="keyword"
- @confirm="searchList"
- confirm-type="search"
- class="f28_302"
- type="text"
- placeholder="输入工单编号或者用户名称进行搜索"
- />
- </view>
- </view>
- </view>
- <view class="list-container">
- <view class="item" v-for="(item, index) in dataList" :key="index" @tap.stop="toDetail(item.id)">
- <view class="main">
- <view class="row">
- <text class="label number">工单单号</text>
- <text class="value number">{{ item.dispatchOrderNo }}</text>
- </view>
- <view class="row">
- <text class="label">预约时间</text>
- <text class="value">{{ item.reportDate }}</text>
- </view>
- <view class="row">
- <text class="label">完工时间</text>
- <text class="value">{{ item.repairDate }}</text>
- </view>
- <view class="row">
- <text class="label">用户姓名</text>
- <text class="value">{{ item.userName }}</text>
- </view>
- <view class="row">
- <text class="label">总费用</text>
- <text class="value">{{ item.totalFee }}</text>
- </view>
- </view>
- </view>
- </view>
- <view v-if="dataList.length <= 0" class="no-text">
- <image src="/static/images/no-data.png"></image>
- <view class="texts">暂无数据</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- salaryNo: null,
- summaryBatchNo: null,
- type: null,
- keyword: '',
- dataList: []
- }
- },
- // 下拉刷新
- onPullDownRefresh() {
- this.getList()
- },
- onLoad({ salaryNo, summaryBatchNo, type }) {
- this.salaryNo = salaryNo
- this.summaryBatchNo = summaryBatchNo
- this.type = type
- // const { websit_number, number } = this.$store.state.userInfo.websit_worker
- // this.websitNumber = websit_number
- // this.workerNumber = number
- this.getList()
- },
- methods: {
- // 获取列表
- getList() {
- let url = ''
- let params = {}
- if (this.type == 1) {
- url = '/daily/mywallet/repair/detail'
- params = {
- // workerNumber: this.workerNumber,
- salaryNo: this.salaryNo || '',
- summaryBatchNo: this.summaryBatchNo || '',
- q: this.keyword
- }
- } else if (this.type == 2) {
- url = '/daily/mywallet/repair/month/detail'
- params = {
- // workerNumber: this.workerNumber,
- salaryNo: this.salaryNo || '',
- summaryBatchNo: this.summaryBatchNo || '',
- q: this.keyword
- }
- } else {
- url = '/daily/mywallet/not/issue/list'
- params = {
- // workerNumber: this.workerNumber,
- salaryNo: this.salaryNo || '',
- summaryBatchNo: this.summaryBatchNo || '',
- q: this.keyword,
- install: false
- }
- }
- this.$axios({
- url,
- method: 'get',
- params,
- isLoading: 1
- })
- .then(res => {
- this.dataList = res.data
- })
- .finally(() => {
- uni.stopPullDownRefresh()
- })
- },
- searchList() {
- this.getList()
- },
- toDetail(id) {
- uni.navigateTo({
- url:
- '/packageMine/pages/repairSettle/detail?salaryNo=' +
- (this.salaryNo || '') +
- '&summaryBatchNo=' +
- (this.summaryBatchNo || '') +
- '&id=' +
- id +
- '&type=' +
- this.type
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- }
- .search-container {
- background-color: #ffffff;
- width: 100%;
- border-bottom: 2rpx solid #e5e5e5;
- padding: 0 30rpx;
- .input-con {
- @include flex_ac;
- height: 88rpx;
- width: 100%;
- .input {
- @include flex_ac;
- flex: 1;
- padding: 0 24rpx;
- height: 64rpx;
- background: #f7f7f7;
- border-radius: 32rpx;
- input {
- flex: 1;
- }
- image {
- width: 28rpx;
- height: 28rpx;
- margin-right: 16rpx;
- }
- }
- }
- }
- .list-container {
- padding: 30rpx 30rpx 0;
- .item {
- margin-bottom: 20rpx;
- &:last-child {
- margin-bottom: 0;
- }
- .date {
- font-size: 30rpx;
- color: #666666;
- margin-bottom: 10rpx;
- }
- .main {
- color: #666666;
- background: #ffffff;
- padding: 15rpx 30rpx;
- border-radius: 20rpx;
- .row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 60rpx;
- .label {
- font-size: 28rpx;
- color: #666666;
- }
- .value {
- font-size: 28rpx;
- color: #333333;
- &.orange {
- color: #e95505;
- }
- }
- .number {
- color: #333333;
- }
- }
- }
- }
- }
- .no-text {
- height: 100%;
- width: 100%;
- margin-top: 50rpx;
- text-align: center;
- image {
- width: 450rpx;
- height: 250rpx;
- margin-bottom: 40rpx;
- }
- .texts {
- color: #cccccc;
- font-size: 28rpx;
- }
- }
- </style>
|