1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<template>
    <view class="p30">
        <view class="title p30 bg-white f30 lh200 radius8">
            <view>姓名:{{ detail.real_name }}</view>
            <view>电话:{{ detail.mobile }}</view>
            <view>服务地址:{{ detail.detail }}</view>
            <view>服务项目:
              <text class="mr10" v-for="(item,index) in detail.project">[{{ item.project_name }}x{{ item.total_num }}]</text>
            </view>
            <view>支付费用:¥{{ detail.pay_price }}</view>
            <view>预约服务时间:{{ detail.booking_time }}
               <view class="ml20 red" style="float: right;" v-if="detail.is_settled == 0">
                   <picker mode="date" @change="bindDateChange">修改时间</picker>
               </view>
            </view>
            <view v-if="detail.settle_time">服务完成时间:{{ detail.settle_time }}</view>
            <view>服务完成图片:</view>
            <view v-for="(item, index) in img_list2" :key="index">
                 <image :src="item.file_path" mode="aspectFit"></image>
            </view>
            <view class="d-s-c" v-if="detail.repair_user_id == 0">单号:
               <input class="ml20 border-b" v-model="odd_num" type="text" placeholder="请输入单号" />
               <button style="background: none; border: 0; color: red;" @click="editChange()">确定修改</button>
            </view>
            <view class="d-s-c" v-if="detail.repair_user_id == 0">产品:
               <input class="ml20 border-b" v-model="goods_name" type="text" placeholder="请输入产品" />
               <button style="background: none; border: 0;color: red;" @click="editChange()">确定修改</button>
            </view>
            <view v-if="detail.repair_user_id > 0">单号:<text v-if="detail.odd_num != null">{{ detail.odd_num }}</text></view>
            <view v-if="detail.repair_user_id > 0">产品:<text v-if="detail.goods_name != null">{{ detail.goods_name }}</text></view>
            <view>师傅留言:<text v-if="detail.remark!= null">{{ detail.remark }}</text></view>
            <view>买家图片:</view> 
            <view v-for="(item, index) in img_list" :key="index">
                 <image :src="item.file_path" mode="aspectFit"></image>
            </view>
            <view>买家留言:<text v-if="detail.content!= null">{{ detail.content }}</text></view>
            <view>备注:<text v-if="detail.message!= null">{{ detail.message }}</text></view>
              <view v-if="detail.Repairuser && detail.is_receive == 1">
                  售后师傅:{{ detail.Repairuser.real_name }} {{ detail.Repairuser.mobile }}
                  <view>温馨提示:尊敬的顾客,您好!我们已安排好师傅上门为您服务,如有需求可以致电师傅。如您对我们的服务不满意,可以和我们客服联系。</view>
              </view>
 
        </view>
    
        </view>
    </view>
</template>
 
<script>
    import utils from '@/common/utils.js';
    export default {
        data() {
            return {
                detail: '',
                img_list:[],
                img_list2:[],
                odd_num:'',
                goods_name:'',
            }
        },
        onLoad(e) {
            /*id*/
            this.id = e.id;
        },
        mounted(){
            uni.showLoading({
                title: '加载中'
            });
            this.getData();
        },
        methods: {
            getData(){
                let self = this;
                let id = self.id;
                self._get('plus.repair.order/detail', {id: id}, function (res)
                {
                    self.detail= res.data.detail;
                    self.img_list= res.data.detail.image;
                    self.img_list2= res.data.detail.image2;
                    self.odd_num = res.data.detail.odd_num;
                    self.goods_name = res.data.detail.goods_name;
                    uni.hideLoading();
                });
            },
            bindDateChange(e){
                let self = this;
                var booking_time = e.detail.value;
                uni.showLoading({
                    title: '加载中'
                });
                self._post(
                    'plus.repair.order/updateTime', {
                        booking_time: booking_time,
                        id: self.id,
                    },
                    function(res) {
                        uni.hideLoading();
                        self.showSuccess(res.msg,function(){
                            self.getData();
                        });
                    }
                );
            },
            editChange(e){
                let self = this;
                uni.showLoading({
                    title: '加载中'
                });
                self._post(
                    'plus.repair.order/editGoods', {
                        odd_num: self.odd_num,
                        goods_name: self.goods_name,
                        id: self.id,
                    },
                    function(res) {
                        uni.hideLoading();
                        self.showSuccess(res.msg,function(){
                            self.getData();
                        });
                    }
                );
            },
        }
    }
</script>
 
<style>
 
</style>