| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- <template>
- <view class="container">
- <view class="title">工单信息</view>
- <view class="box">
- <view class="box_key">工单编号:</view>
- <view class="box_value">{{ detailInfo.recordNo }}</view>
- </view>
- <view class="box_time">
- <view class="time_msg">
- 报修时间:
- <text>{{ detailInfo.reportTime }}</text>
- </view>
- <view class="time_type" v-if="detailInfo.state === '待接单'">待接单</view>
- <view class="time_type color_type" v-if="detailInfo.state === '维修中'">维修中</view>
- <view class="time_type" v-if="detailInfo.state === '待确认'">待确认</view>
- <view class="time_type color_type2" v-if="detailInfo.state === '已完成'">已完成</view>
- <view class="time_type" v-if="detailInfo.state === '已取消'">已取消</view>
- <view class="time_type color_type3" v-if="detailInfo.state === '已关单'">已关单</view>
- <view class="time_type color_type" v-if="detailInfo.state === '转单待审核'">转单待审核</view>
- <view class="time_type color_type" v-if="detailInfo.state === '协作待审核'">协作待审核</view>
- </view>
- <view class="box">
- <view class="box_key">报修姓名:</view>
- <view class="box_value">{{ detailInfo.userName }}</view>
- </view>
- <view class="box">
- <view class="box_key">报修电话:</view>
- <view class="box_value phone" @click="handleCallPhone(detailInfo.userPhone)">
- {{ detailInfo.userPhone }}
- <img src="../../static/images/repairsImg/phone.png" />
- </view>
- </view>
- <view class="box">
- <view class="box_key">报修区域:</view>
- <view class="box_value">{{ detailInfo.areaName }}</view>
- </view>
- <view class="box">
- <view class="box_key">详细地址:</view>
- <view class="box_value">{{ detailInfo.address }}</view>
- </view>
- <view class="box">
- <view class="box_key">报修物品:</view>
- <view class="box_value">{{ detailInfo.articleName }}</view>
- </view>
- <view class="box" v-if="detailInfo.description">
- <view class="box_key">故障描述:</view>
- <view class="box_value">{{ detailInfo.description }}</view>
- </view>
- <view class="box_img">
- <view class="img_key">上传图片:</view>
- <img class="img_value" mode="aspectFill" :src="detailInfo.images[0]" @click="handleLookImgs(detailInfo.images)" />
- </view>
- <view class="box top" v-if="detailInfo.maintenancerName">
- <view class="box_key">维修师傅:</view>
- <view class="box_value">{{ detailInfo.maintenancerName }}</view>
- </view>
- <view class="box" v-if="detailInfo.maintenancerPhone">
- <view class="box_key">师傅电话:</view>
- <view class="box_value phone" @click="handleCallPhone(detailInfo.maintenancerPhone)">
- {{ detailInfo.maintenancerPhone }}
- <img src="../../static/images/repairsImg/phone.png" />
- </view>
- </view>
- <view class="box" v-if="detailInfo.price">
- <view class="box_key">维修费用:</view>
- <view class="box_value2 phone" @click="checkFeeDetail(detailInfo)">
- {{ detailInfo.price }}元
- <img src="../../static/images/repairsImg/eye.png" />
- </view>
- </view>
- <view class="title top" v-if="detailInfo.tracks">报修跟踪</view>
- <!-- 步骤条区域 -->
- <!-- activeIcon="checkmark-circle-fill" -->
- <uv-steps activeColor="#6FB6B8" direction="column" v-if="detailInfo.tracks" :current="detailInfo.tracks.length">
- <uv-steps-item :customStyle="customStyle" v-for="item in detailInfo.tracks" :key="item.id">
- <template v-slot:title>
- <view class="steps_title" :class="{ active: true }">{{ item.state }}</view>
- </template>
- <template v-slot:desc>
- <!-- <view class="steps_desc" v-for="(element, index) in item.desc" :key="index">{{ element }}</view> -->
- <view class="steps_desc">{{ item.createTime }}</view>
- <view class="steps_desc" v-if="item.content">{{ item.content }}</view>
- </template>
- </uv-steps-item>
- </uv-steps>
- <view class="gap"></view>
- <!-- 维修费用弹窗 -->
- <uni-popup :is-mask-click="false" ref="popup_fee">
- <view class="pop_fee">
- <view class="fee_title">
- 维修费用
- <text @click="$refs.popup_fee.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>
- </template>
- <script>
- export default {
- data() {
- return {
- // 报修详情信息
- detailInfo: {},
- // 步骤条样式
- customStyle: {
- marginBottom: '5px'
- },
- // 步骤条数据
- stepsList: [
- {
- id: 1,
- title: '提交订单',
- type: true,
- desc: ['2023-07-05 08:25:25']
- },
- {
- id: 2,
- title: '已接单',
- type: true,
- desc: ['2023-07-05 08:25:25']
- },
- {
- id: 3,
- title: '待确认',
- type: true,
- desc: ['2023-07-05 08:25:25', '张发财转后勤:太贵了', '系统管理员改价:耗材为螺丝刀,价格50元', '系统管理员改价:耗材为螺丝刀,价格50元']
- },
- {
- id: 4,
- title: '待确认',
- type: false,
- desc: ['2023-07-05 08:25:25']
- },
- {
- id: 5,
- title: '已完成',
- type: false,
- desc: ['2023-07-05 08:25:25']
- }
- ],
- // 订单id
- recordId: '',
- // 维修费用耗材明细列表
- consumables: []
- }
- },
- onLoad(options) {
- this.recordId = options.id
- this.getData()
- },
- methods: {
- // 获取报修详情信息
- async getData() {
- const res = await this.$myRequest_repairs({
- url: '/repairRecord/details',
- data: {
- recordId: this.recordId
- }
- })
- // console.log(res)
- if (res.code === '200') {
- this.detailInfo = res.data
- }
- },
- // 查看维修费用回调
- checkFeeDetail(item) {
- this.$refs.popup_fee.open('center')
- this.consumables = item.consumables
- },
- // 点击电话号码回调
- handleCallPhone(phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- })
- },
- // 点击图片回调
- handleLookImgs(img) {
- uni.previewImage({
- urls: img
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- padding: 0 30rpx;
- height: 100vh;
- overflow-y: auto;
- .title {
- height: 90rpx;
- line-height: 90rpx;
- font-size: 32rpx;
- font-weight: bold;
- }
- .top {
- margin-top: 20rpx;
- }
- .box {
- display: flex;
- height: 60rpx;
- font-size: 28rpx;
- .box_key {
- color: #808080;
- }
- .box_value {
- display: flex;
- img {
- margin-top: 5rpx;
- margin-left: 10rpx;
- width: 28rpx;
- height: 28rpx;
- }
- }
- .box_value2 {
- display: flex;
- img {
- margin-top: -2rpx;
- margin-left: 14rpx;
- width: 46rpx;
- height: 46rpx;
- }
- }
- .phone {
- color: #6fb6b8;
- }
- }
- .box_time {
- display: flex;
- height: 60rpx;
- .time_msg {
- font-size: 28rpx;
- color: #808080;
- text {
- color: #000000;
- }
- }
- .time_type {
- margin-left: 123rpx;
- margin-top: -5rpx;
- font-size: 32rpx;
- color: #ff5733;
- }
- .color_type {
- color: #1e7dfb;
- }
- .color_type2 {
- color: #6fb6b8;
- }
- .color_type3 {
- color: #cccccc;
- }
- }
- .box_img {
- display: flex;
- align-items: center;
- height: 120rpx;
- color: #808080;
- font-size: 28rpx;
- .img_key {
- }
- .img_value {
- width: 120rpx;
- height: 120rpx;
- border-radius: 14rpx;
- }
- }
- .steps_title {
- color: #969799;
- font-size: 28rpx;
- }
- .active {
- color: #6fb6b8;
- }
- .steps_desc {
- line-height: 45rpx;
- font-size: 24rpx;
- }
- .gap {
- height: 20rpx;
- }
- .pop_fee {
- padding-bottom: 50rpx;
- 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;
- 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;
- .fee_box {
- display: flex;
- align-items: center;
- padding-left: 42rpx;
- height: 80rpx;
- font-size: 28rpx;
- color: #808080;
- text {
- color: #000000;
- }
- }
- }
- }
- }
- }
- </style>
|