|
|
@@ -8,9 +8,9 @@
|
|
|
<!-- 主体内容区域 -->
|
|
|
<view class="body">
|
|
|
<!-- 每一个记录区域 -->
|
|
|
- <view class="body_item" v-for="item in list" :key="item.id">
|
|
|
+ <view class="body_item" :class="{ body_events: isClick }" v-for="item in list" :key="item.id" @click="handleLookDetail(item)">
|
|
|
<!-- 工单编号 -->
|
|
|
- <view class="item_title" @click="handleLookDetail(item)">
|
|
|
+ <view class="item_title">
|
|
|
<img src="../../static/images/repairsImg/order.png" />
|
|
|
<view class="title_info">工单编号:{{ item.recordNo }}</view>
|
|
|
<view class="title_type" v-if="item.timeoutStr">{{ item.timeoutStr }}</view>
|
|
|
@@ -24,9 +24,12 @@
|
|
|
</view>
|
|
|
<view class="time_type" v-if="item.state === '待接单'">待接单</view>
|
|
|
<view class="time_type color_type" v-if="item.state === '维修中'">维修中</view>
|
|
|
+ <view class="time_type color_type" v-if="item.state === '转单待审核'">转单待审核</view>
|
|
|
+ <view class="time_type color_type" v-if="item.state === '协作待审核'">协作待审核</view>
|
|
|
<view class="time_type" v-if="item.state === '待确认'">待确认</view>
|
|
|
<view class="time_type color_type2" v-if="item.state === '已完成'">已完成</view>
|
|
|
<view class="time_type" v-if="item.state === '已取消'">已取消</view>
|
|
|
+ <view class="time_type color_type3" v-if="item.state === '已关单'">已关单</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 报修姓名 -->
|
|
|
@@ -38,7 +41,7 @@
|
|
|
<!-- 报修电话 -->
|
|
|
<view class="item_box">
|
|
|
<view class="box_key">报修电话:</view>
|
|
|
- <view class="box_value phone" @click="handleCallPhone(item.userPhone)">
|
|
|
+ <view class="box_value phone" @click.stop="handleCallPhone(item.userPhone)">
|
|
|
{{ item.userPhone }}
|
|
|
<img src="../../static/images/repairsImg/phone.png" />
|
|
|
</view>
|
|
|
@@ -63,7 +66,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 故障描述 -->
|
|
|
- <view class="item_box">
|
|
|
+ <view class="item_box" v-if="item.descript">
|
|
|
<view class="box_key">故障描述:</view>
|
|
|
<view class="box_value">{{ item.descript }}</view>
|
|
|
</view>
|
|
|
@@ -71,7 +74,7 @@
|
|
|
<!-- 上传图片 -->
|
|
|
<view class="item_img">
|
|
|
<view class="img_key">上传图片:</view>
|
|
|
- <img class="img_value" mode="aspectFill" :src="item.images[0]" @click="handleLookImgs(item.images)" />
|
|
|
+ <img class="img_value" mode="aspectFill" :src="item.images[0]" @click.stop="handleLookImgs(item.images)" />
|
|
|
</view>
|
|
|
|
|
|
<!-- 维修师傅 -->
|
|
|
@@ -85,83 +88,103 @@
|
|
|
<!-- 师傅电话 -->
|
|
|
<view class="item_box" v-if="item.maintenancerPhone">
|
|
|
<view class="box_key">师傅电话:</view>
|
|
|
- <view class="box_value phone" @click="handleCallPhone(item.maintenancerPhone)">
|
|
|
+ <view class="box_value phone" @click.stop="handleCallPhone(item.maintenancerPhone)">
|
|
|
{{ item.maintenancerPhone }}
|
|
|
<img src="../../static/images/repairsImg/phone.png" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 维修费用 -->
|
|
|
- <view class="item_box" v-if="item.money">
|
|
|
+ <view class="item_box" v-if="item.price">
|
|
|
<view class="box_key">维修费用:</view>
|
|
|
- <view class="box_value2 phone" @click="checkFeeDetail(item)">
|
|
|
+ <view class="box_value2 phone" @click.stop="checkFeeDetail(item)">
|
|
|
{{ item.price }}元
|
|
|
<img src="../../static/images/repairsImg/eye.png" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 维修费用弹窗 -->
|
|
|
- <uni-popup :is-mask-click="false" ref="popup_fee">
|
|
|
- <view class="pop_fee">
|
|
|
- <view class="fee_title">
|
|
|
- 维修费用
|
|
|
- <text @click="$refs.popup_fee[0].close()">×</text>
|
|
|
- </view>
|
|
|
- <view class="fee_list">
|
|
|
- <view class="fee_item" v-for="ele in consumables" :key="ele.id">
|
|
|
- <view class="fee_box">
|
|
|
- 耗材:
|
|
|
- <text>{{ ele.consumeName }}</text>
|
|
|
- </view>
|
|
|
- <view class="fee_box">
|
|
|
- 耗材单价:
|
|
|
- <text>{{ ele.price }}元</text>
|
|
|
- </view>
|
|
|
- <view class="fee_box">
|
|
|
- 耗材数量:
|
|
|
- <text>{{ ele.number }}</text>
|
|
|
- </view>
|
|
|
- <view class="fee_box">
|
|
|
- 耗材费用:
|
|
|
- <text>{{ ele.totalPrice }}元</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </uni-popup>
|
|
|
-
|
|
|
<!-- 按钮 -->
|
|
|
- <view class="item_btn" v-if="item.state !== '已取消'">
|
|
|
- <view class="btn_box type" v-if="item.state === '待接单' || item.state === '维修中'" @click="handleExpedite(item.id)">催单</view>
|
|
|
- <view class="btn_box type" v-if="item.state === '待确认'" @click="handleBackOffice(item)">转后勤</view>
|
|
|
- <view class="btn_box type" v-if="item.state === '待确认'" @click="handlePay(item)">支付</view>
|
|
|
- <view class="btn_box type2" v-if="item.state === '待接单' || item.state === '维修中' || item.state === '待确认'" @click="handleRepeal(item.id)">撤销</view>
|
|
|
- <view class="btn_box type" v-if="item.state === '已完成'" @click="handleEvaluate(item)">去评价</view>
|
|
|
+ <view class="item_btn" v-if="item.state !== '已取消' && item.state !== '已关单'">
|
|
|
+ <view
|
|
|
+ class="btn_box type"
|
|
|
+ v-if="item.state === '待接单' || item.state === '维修中' || item.state === '转单待审核' || item.state === '协作待审核'"
|
|
|
+ @click.stop="handleExpedite(item.id)"
|
|
|
+ >
|
|
|
+ 催单
|
|
|
+ </view>
|
|
|
+ <view class="btn_box type" v-if="item.state === '待确认'" @click.stop="handleBackOffice(item)">转后勤</view>
|
|
|
+ <view class="btn_box type" v-if="item.state === '待确认'" @click.stop="handlePay(item)">支付</view>
|
|
|
+ <view class="btn_box type2" v-if="item.state === '待接单' || item.state === '待确认'" @click.stop="handleRepeal(item.id)">撤销</view>
|
|
|
+ <view class="btn_box type" v-if="item.state === '已完成' && item.evaluate === 1" @click.stop="handleEvaluate(item)">去评价</view>
|
|
|
+ <view class="btn_box type3" v-if="item.state === '已完成' && item.evaluate === 0" @click.stop="">已评价</view>
|
|
|
</view>
|
|
|
<view class="item_btn2" v-else></view>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 转后勤弹窗 -->
|
|
|
- <uni-popup ref="popup_logistics" :is-mask-click="false">
|
|
|
- <view class="pop_logistics">
|
|
|
- <view class="logistics_title">转后勤</view>
|
|
|
- <view class="logistics_body">
|
|
|
- <textarea placeholder-style="color:#CCCCCC" placeholder="请输入您宝贵的留言" v-model="logisticsValue"></textarea>
|
|
|
+ <!-- 维修费用弹窗 -->
|
|
|
+ <uni-popup :is-mask-click="false" ref="popup_fee">
|
|
|
+ <view class="pop_fee" @click.stop="">
|
|
|
+ <view class="fee_title">
|
|
|
+ 维修费用
|
|
|
+ <text
|
|
|
+ @click="
|
|
|
+ $refs.popup_fee.close()
|
|
|
+ isClick = false
|
|
|
+ "
|
|
|
+ >
|
|
|
+ ×
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="fee_list">
|
|
|
+ <view class="fee_item" v-for="ele in consumables" :key="ele.id">
|
|
|
+ <view class="fee_box">
|
|
|
+ 耗材:
|
|
|
+ <text>{{ ele.consumeName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="fee_box">
|
|
|
+ 耗材单价:
|
|
|
+ <text>{{ ele.price }}元</text>
|
|
|
+ </view>
|
|
|
+ <view class="fee_box">
|
|
|
+ 耗材数量:
|
|
|
+ <text>{{ ele.number }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="fee_box">
|
|
|
+ 耗材费用:
|
|
|
+ <text>{{ ele.totalPrice }}元</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="logistics_btn">
|
|
|
- <view class="btn_box cancel" @click="$refs.popup_logistics[0].close()">取消</view>
|
|
|
- <view class="btn_box confirm" @click="handleLogisticsConfirm">确定</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <!-- 转后勤弹窗 -->
|
|
|
+ <uni-popup ref="popup_logistics" :is-mask-click="false">
|
|
|
+ <view class="pop_logistics" @click.stop="">
|
|
|
+ <view class="logistics_title">转后勤</view>
|
|
|
+ <view class="logistics_body">
|
|
|
+ <textarea placeholder-style="color:#CCCCCC" placeholder="请输入您宝贵的留言" v-model="logisticsValue"></textarea>
|
|
|
+ </view>
|
|
|
+ <view class="logistics_btn">
|
|
|
+ <view
|
|
|
+ class="btn_box cancel"
|
|
|
+ @click="
|
|
|
+ $refs.popup_logistics.close()
|
|
|
+ isClick = false
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 取消
|
|
|
</view>
|
|
|
+ <view class="btn_box confirm" @click="handleLogisticsConfirm">确定</view>
|
|
|
</view>
|
|
|
- </uni-popup>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
|
|
|
<!-- 没有数据时展示的图片 -->
|
|
|
<view class="body_no_data" v-if="list.length === 0">
|
|
|
<img src="../../pagesClockIn/static/imgs/nodata.png" />
|
|
|
<view>暂无数据</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="body_text" v-if="list.length && showBottomText">---我是有底线的---</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</template>
|
|
|
@@ -170,6 +193,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 每一个订单点击时是否触发事件 true 不触发 false 触发
|
|
|
+ isClick: false,
|
|
|
// 后勤弹窗输入框绑定数据
|
|
|
logisticsValue: '',
|
|
|
// 顶部分段器数组
|
|
|
@@ -180,8 +205,6 @@ export default {
|
|
|
list: [],
|
|
|
// 是否可以Y轴滚动
|
|
|
scrollY: true,
|
|
|
- // 是否显示底部文字
|
|
|
- showBottomText: false,
|
|
|
// 用户id,请求接口时的参数
|
|
|
userId: '',
|
|
|
// 当前页
|
|
|
@@ -246,13 +269,14 @@ export default {
|
|
|
|
|
|
// 滚动到底部触发回调
|
|
|
scrolltolower() {
|
|
|
- console.log('页面触底了')
|
|
|
if (this.total > this.list.length) {
|
|
|
this.currentPage++
|
|
|
this.getRepairList()
|
|
|
} else {
|
|
|
- console.log('没有更多数据了')
|
|
|
- this.showBottomText = true
|
|
|
+ uni.showToast({
|
|
|
+ title: '没有更多数据了',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -293,7 +317,8 @@ export default {
|
|
|
title: '转后勤成功',
|
|
|
icon: 'success'
|
|
|
})
|
|
|
- this.$refs.popup_logistics[0].close()
|
|
|
+ this.$refs.popup_logistics.close()
|
|
|
+ this.isClick = false
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.message,
|
|
|
@@ -359,13 +384,15 @@ export default {
|
|
|
|
|
|
// 查看维修费用回调
|
|
|
checkFeeDetail(item) {
|
|
|
- this.$refs.popup_fee[0].open('center')
|
|
|
+ this.$refs.popup_fee.open('center')
|
|
|
this.consumables = item.consumables
|
|
|
+ this.isClick = true
|
|
|
},
|
|
|
// 转后勤按钮回调
|
|
|
handleBackOffice(item) {
|
|
|
this.recordId = item.id
|
|
|
- this.$refs.popup_logistics[0].open('center')
|
|
|
+ this.isClick = true
|
|
|
+ this.$refs.popup_logistics.open('center')
|
|
|
},
|
|
|
// 去评价按钮回调
|
|
|
handleEvaluate(item) {
|
|
|
@@ -376,10 +403,8 @@ export default {
|
|
|
},
|
|
|
// 点击工单编号区域回调
|
|
|
handleLookDetail(item) {
|
|
|
- const detailInfo = encodeURIComponent(JSON.stringify(item))
|
|
|
- // console.log(detailInfo)
|
|
|
uni.navigateTo({
|
|
|
- url: `/pagesRepairs/repairDetails/repairDetails?detailInfo=${detailInfo}`
|
|
|
+ url: `/pagesRepairs/repairDetails/repairDetails?id=${item.id}`
|
|
|
})
|
|
|
},
|
|
|
// 点击电话号码回调
|
|
|
@@ -521,6 +546,9 @@ export default {
|
|
|
.color_type2 {
|
|
|
color: #6fb6b8;
|
|
|
}
|
|
|
+ .color_type3 {
|
|
|
+ color: #cccccc;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.item_box {
|
|
|
@@ -606,121 +634,130 @@ export default {
|
|
|
background-color: #fff;
|
|
|
border: 1rpx solid #6fb6b8;
|
|
|
}
|
|
|
+
|
|
|
+ .type3 {
|
|
|
+ color: #6fb6b8;
|
|
|
+ background-color: #eee;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.item_btn2 {
|
|
|
height: 50rpx;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .pop_fee {
|
|
|
- padding-bottom: 50rpx;
|
|
|
- border-radius: 19rpx;
|
|
|
- background-color: #fff;
|
|
|
+ .pop_fee {
|
|
|
+ padding-bottom: 10rpx;
|
|
|
+ border-radius: 19rpx;
|
|
|
+ background-color: #fff;
|
|
|
|
|
|
- .fee_title {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 0 31rpx 0 42rpx;
|
|
|
- width: 690rpx;
|
|
|
- height: 110rpx;
|
|
|
- font-size: 32rpx;
|
|
|
- font-weight: bold;
|
|
|
- border-radius: 19rpx 19rpx 0 0;
|
|
|
+ .fee_title {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 31rpx 0 42rpx;
|
|
|
+ width: 690rpx;
|
|
|
+ height: 110rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 19rpx 19rpx 0 0;
|
|
|
+ border-bottom: 1rpx solid #e6e6e6;
|
|
|
+
|
|
|
+ text {
|
|
|
+ font-size: 45rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #808080;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .fee_list {
|
|
|
+ max-height: 50vh;
|
|
|
+ overflow-y: auto;
|
|
|
+
|
|
|
+ .fee_item {
|
|
|
border-bottom: 1rpx solid #e6e6e6;
|
|
|
|
|
|
- text {
|
|
|
- font-size: 45rpx;
|
|
|
- font-weight: 400;
|
|
|
+ .fee_box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding-left: 42rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
color: #808080;
|
|
|
+
|
|
|
+ text {
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .fee_list {
|
|
|
- height: 40vh;
|
|
|
- overflow-y: auto;
|
|
|
+ .pop_logistics {
|
|
|
+ border-radius: 19rpx;
|
|
|
+ background-color: #fff;
|
|
|
|
|
|
- .fee_item {
|
|
|
- border-bottom: 1rpx solid #e6e6e6;
|
|
|
+ .logistics_title {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 690rpx;
|
|
|
+ height: 110rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 19rpx 19rpx 0 0;
|
|
|
+ border-bottom: 1rpx solid #e6e6e6;
|
|
|
+ }
|
|
|
|
|
|
- .fee_box {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding-left: 42rpx;
|
|
|
- height: 80rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #808080;
|
|
|
+ .logistics_body {
|
|
|
+ height: 440rpx;
|
|
|
+ border-bottom: 1rpx solid #e6e6e6;
|
|
|
|
|
|
- text {
|
|
|
- color: #000000;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ textarea {
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin: 35rpx 40rpx;
|
|
|
+ padding: 20rpx;
|
|
|
+ width: 610rpx;
|
|
|
+ height: 370rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ border-radius: 14rpx;
|
|
|
+ border: 1rpx solid #e6e6e6;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .pop_logistics {
|
|
|
- border-radius: 19rpx;
|
|
|
- background-color: #fff;
|
|
|
+ .logistics_btn {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-evenly;
|
|
|
+ height: 121rpx;
|
|
|
|
|
|
- .logistics_title {
|
|
|
+ .btn_box {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- width: 690rpx;
|
|
|
- height: 110rpx;
|
|
|
+ width: 203rpx;
|
|
|
+ height: 72rpx;
|
|
|
+ border-radius: 9rpx;
|
|
|
font-size: 32rpx;
|
|
|
- font-weight: bold;
|
|
|
- border-radius: 19rpx 19rpx 0 0;
|
|
|
- border-bottom: 1rpx solid #e6e6e6;
|
|
|
}
|
|
|
|
|
|
- .logistics_body {
|
|
|
- height: 440rpx;
|
|
|
- border-bottom: 1rpx solid #e6e6e6;
|
|
|
-
|
|
|
- textarea {
|
|
|
- box-sizing: border-box;
|
|
|
- margin: 35rpx 40rpx;
|
|
|
- padding: 20rpx;
|
|
|
- width: 610rpx;
|
|
|
- height: 370rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- border-radius: 14rpx;
|
|
|
- border: 1rpx solid #e6e6e6;
|
|
|
- }
|
|
|
+ .cancel {
|
|
|
+ background-color: #e5e5e5;
|
|
|
+ color: #6fb6b8;
|
|
|
}
|
|
|
|
|
|
- .logistics_btn {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-evenly;
|
|
|
- height: 121rpx;
|
|
|
-
|
|
|
- .btn_box {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- width: 203rpx;
|
|
|
- height: 72rpx;
|
|
|
- border-radius: 9rpx;
|
|
|
- font-size: 32rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .cancel {
|
|
|
- background-color: #e5e5e5;
|
|
|
- color: #6fb6b8;
|
|
|
- }
|
|
|
-
|
|
|
- .confirm {
|
|
|
- background-color: #6fb6b8;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
+ .confirm {
|
|
|
+ background-color: #6fb6b8;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .body_events {
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+
|
|
|
.body_no_data {
|
|
|
text-align: center;
|
|
|
color: #b3b3b3;
|
|
|
@@ -732,12 +769,6 @@ export default {
|
|
|
height: 508rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .body_text {
|
|
|
- text-align: center;
|
|
|
- color: #b3b3b3;
|
|
|
- font-size: 24rpx;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</style>
|