|
@@ -1,56 +1,68 @@
|
|
|
<template>
|
|
|
- <view class="listbox">
|
|
|
- <u-tabs :list="tabforData" @click="tbafun"></u-tabs>
|
|
|
- <!-- <view class="tbasflex">
|
|
|
- <view class="tabforBox" :class="page.status == item.id?'Selected':''" v-for="item in tabforData" :key="item.id" @click="tbafun(item.id)">
|
|
|
- <text>{{item.name}}</text>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
-
|
|
|
- <view class="cardBox" v-for="(item,index) in Datalist" :key="index" @click="cardBoxClick(item)">
|
|
|
- <view class="cardBox_top">
|
|
|
- <!-- <u-icon name="bookmark-fill" size="24"></u-icon> -->
|
|
|
+ <view>
|
|
|
+ <view class="searchforBox">
|
|
|
+ <u-search v-model="page.corpName" :showAction="true" actionText="搜索"
|
|
|
+ clearabled :animation="false"
|
|
|
+ @search="searchfun" @custom="searchfun" @clear="clearfun"></u-search>
|
|
|
+ </view>
|
|
|
+ <view class="listbox">
|
|
|
+ <u-tabs :list="tabforData" @click="tbafun"></u-tabs>
|
|
|
+ <!-- <view class="tbasflex">
|
|
|
+ <view class="tabforBox" :class="page.status == item.id?'Selected':''" v-for="item in tabforData" :key="item.id" @click="tbafun(item.id)">
|
|
|
+ <text>{{item.name}}</text>
|
|
|
+ </view>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view class="cardBox" v-for="(item,index) in Datalist" :key="index" @click="cardBoxClick(item)">
|
|
|
<view class="cardBox_top">
|
|
|
- <view style="width: 10rpx;height: 35rpx;background-color: #fd4b09; margin-right: 8rpx;"></view>
|
|
|
- <view class="text">{{item.sysNo}}</view>
|
|
|
+ <!-- <u-icon name="bookmark-fill" size="24"></u-icon> -->
|
|
|
+ <view class="cardBox_top">
|
|
|
+ <view style="width: 10rpx;height: 35rpx;background-color: #fd4b09; margin-right: 8rpx;"></view>
|
|
|
+ <view class="text">{{item.sysNo}}</view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text v-if="item.status == 1" style="color: #3c9cff; font-size: 28rpx">待派工</text>
|
|
|
+ <!-- <text v-if="item.status == 2" style="color: #fd4b09; font-size: 28rpx">待接单</text> -->
|
|
|
+ <text v-if="item.status == 3" style="color: rgba(222, 36, 18, 1); font-size: 28rpx">待维修</text>
|
|
|
+ <text v-if="item.status == 4" style="color: rgba(233, 157, 66, 1); font-size: 28rpx">待结算</text>
|
|
|
+ <text v-if="item.status == 5" style="color: rgba(129, 179, 55, 1); font-size: 28rpx">已完工</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view>
|
|
|
- <text v-if="item.status == 1" style="color: #3c9cff; font-size: 28rpx">待派工</text>
|
|
|
- <!-- <text v-if="item.status == 2" style="color: #fd4b09; font-size: 28rpx">待接单</text> -->
|
|
|
- <text v-if="item.status == 3" style="color: rgba(222, 36, 18, 1); font-size: 28rpx">待维修</text>
|
|
|
- <text v-if="item.status == 4" style="color: rgba(233, 157, 66, 1); font-size: 28rpx">待结算</text>
|
|
|
- <text v-if="item.status == 5" style="color: rgba(129, 179, 55, 1); font-size: 28rpx">已完工</text>
|
|
|
+ <view class="title">{{item.deviceName}}</view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text_left">客户名称:</view>
|
|
|
+ <view>{{item.corpName}}</view>
|
|
|
</view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text_left">客户电话:</view>
|
|
|
+ <view>{{item.corpTel}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text_left">地 址:</view>
|
|
|
+ <view>{{item.deviceAddress}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text_left">维修人员:</view>
|
|
|
+ <view>{{item.maintenanceWorkerName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text_left">维修电话:</view>
|
|
|
+ <view>{{item.maintenanceWorkerTel}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="positioningButton">
|
|
|
+ <!-- <view class="Buttonjd" v-if="item.status == 1 && userInfoRoleName.indexOf('admin') != -1" @click="Jumpfun(item.id,'PG')">派工</view>
|
|
|
+ <view class="Buttonjd" v-if="item.status == 2 && userInfoRoleName.indexOf('admin') != -1" @click="Jumpfun(item.id,'QXPG')">撤销派工</view>
|
|
|
+ <view class="Buttonjd" v-if="item.status == 2 && userInfoRoleName.indexOf('维修工') != -1" @click="Jumpfun(item.id,'JD')">接单</view>
|
|
|
+ <view class="Buttonjd" v-if="item.status == 3 && userInfoRoleName.indexOf('admin') == -1" @click="Jumpfun(item.id,'FY')">提交费用</view>
|
|
|
+ <view class="Buttonjd" v-if="item.status == 4 && userInfoRoleName.indexOf('admin') == -1" @click="Jumpfun(item.id,'FY')">确认结算</view> -->
|
|
|
+ <!-- <view class="Buttonxq" @click="Jumpfun(item.id,'XQ')">详情</view> -->
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
- <view class="title">{{item.deviceName}}</view>
|
|
|
- <view class="text">
|
|
|
- <view class="text_left">客户电话:</view>
|
|
|
- <view>{{item.corpTel}}</view>
|
|
|
- </view>
|
|
|
- <view class="text">
|
|
|
- <view class="text_left">设备地址:</view>
|
|
|
- <view>{{item.deviceAddress}}</view>
|
|
|
- </view>
|
|
|
- <view class="text">
|
|
|
- <view class="text_left">维修工:</view>
|
|
|
- <view>{{item.maintenanceWorkerName}}</view>
|
|
|
- </view>
|
|
|
- <view class="text">
|
|
|
- <view class="text_left">维修电话:</view>
|
|
|
- <view>{{item.maintenanceWorkerTel}}</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="positioningButton">
|
|
|
- <!-- <view class="Buttonjd" v-if="item.status == 1 && userInfoRoleName.indexOf('admin') != -1" @click="Jumpfun(item.id,'PG')">派工</view>
|
|
|
- <view class="Buttonjd" v-if="item.status == 2 && userInfoRoleName.indexOf('admin') != -1" @click="Jumpfun(item.id,'QXPG')">撤销派工</view>
|
|
|
- <view class="Buttonjd" v-if="item.status == 2 && userInfoRoleName.indexOf('维修工') != -1" @click="Jumpfun(item.id,'JD')">接单</view>
|
|
|
- <view class="Buttonjd" v-if="item.status == 3 && userInfoRoleName.indexOf('admin') == -1" @click="Jumpfun(item.id,'FY')">提交费用</view>
|
|
|
- <view class="Buttonjd" v-if="item.status == 4 && userInfoRoleName.indexOf('admin') == -1" @click="Jumpfun(item.id,'FY')">确认结算</view> -->
|
|
|
- <!-- <view class="Buttonxq" @click="Jumpfun(item.id,'XQ')">详情</view> -->
|
|
|
- </view>
|
|
|
-
|
|
|
+ <u-loadmore v-if="total !== 0" :status="status" />
|
|
|
+ <u-loading-page style="z-index: 999;" bgColor="rgba(0,0,0,.5)" :loading="loading"></u-loading-page>
|
|
|
</view>
|
|
|
- <u-loadmore v-if="total !== 0" :status="status" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -84,12 +96,13 @@
|
|
|
page:{
|
|
|
status:null,
|
|
|
current: 1,
|
|
|
- size: 5,
|
|
|
+ size: 10,
|
|
|
},
|
|
|
Datalist:[],
|
|
|
total:0,
|
|
|
status: 'loadmore',
|
|
|
- userInfoRoleName:[]
|
|
|
+ userInfoRoleName:[],
|
|
|
+ loading:false
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -115,6 +128,22 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 搜索
|
|
|
+ searchfun(value) {
|
|
|
+ this.Datalist = []
|
|
|
+ this.page.current = 1
|
|
|
+ this.page.size = 10
|
|
|
+ this.page.corpName = value
|
|
|
+ this.maintenanceListfun()
|
|
|
+ },
|
|
|
+ // 搜索清空
|
|
|
+ clearfun(){
|
|
|
+ this.Datalist = []
|
|
|
+ this.page.current = 1
|
|
|
+ this.page.size = 10
|
|
|
+ this.page.corpName = ''
|
|
|
+ this.maintenanceListfun()
|
|
|
+ },
|
|
|
cardBoxClick(item) {
|
|
|
if (item.status == 1 && this.userInfoRoleName.indexOf('admin') != -1) {
|
|
|
this.Jumpfun(item.id,'PG');
|
|
@@ -143,10 +172,12 @@
|
|
|
},
|
|
|
// 获取待接单状态的维修数据
|
|
|
maintenanceListfun(){
|
|
|
+ this.loading = true
|
|
|
maintenanceList(this.page).then(res=>{
|
|
|
const arr = res.data.records
|
|
|
this.Datalist = [...this.Datalist,...arr]
|
|
|
this.total = res.data.total
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -154,6 +185,12 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .searchforBox {
|
|
|
+ width: 100%;
|
|
|
+ background: #fff;
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
.listbox{
|
|
|
padding: 20rpx;
|
|
|
box-sizing: border-box;
|