<view class="page-view" wx:if="{{recordimgs.length>0}}">
    <view class="top-title">
        <text class="top-title-b">维修保养记录报告</text>
        <text class="top-title-l">查询时间：{{cardata.time}}</text>
    </view>
    <view class="top-boxb">
        <view class="box-text">
            <view style="width: 130%;">
                <text class="brand-text" style="display: inline;">{{cardata.car}}</text>
                <text class="order-text" style="display: inline;font-size: 24rpx">{{cardata.cars}}</text>
            </view>
            <text class="order-text">VIN：{{cardata.vin}}</text>
        </view>
        <view class="box-img">
            <image class="logo-img" mode="widthFix" src="{{cardata.logo}}"></image>
        </view>
    </view>
    <view class="content-view">
        <view class="content-desc">
            <text class="content-title">维保记录</text>
            <text class="content-shuo">* 数据来自第三方，仅作参考</text>
        </view>
        <view class="tui-upload-box" wx:if="{{recordimgs.length>0}}">
            <view class="tui-upload-item" wx:for="{{recordimgs}}" wx:key="{{index}}">
                <image bindtap="imgPreview" class="grace-time-line-image grace-border-radius-small" data-src="{{item}}" mode="widthFix" src="{{item}}" style="width: 100%;"></image>
            </view>
        </view>
    </view>
</view>
<view wx:if="{{cardata.cbsurl}}">
    <view class="page-section page-section-gap">
        <web-view src="{{cardata.cbsurl}}"></web-view>
    </view>
</view>
<view wx:if="{{cardata.record}}">
    <view class="page-view" wx:if="{{cardata.vin}}">
        <view class="top-title">
            <text class="top-title-b">维保记录查询</text>
            <text class="top-title-l">查询时间：{{cardata.time}}</text>
        </view>
        <view class="top-box">
            <view class="box-text">
                <view style="width: 130%;">
                    <text class="brand-text" style="display: inline;">{{cardata.car}}</text>
                    <text class="records-text" style="display: inline;font-size: 24rpx">{{cardata.cars}}</text>
                </view>
                <text class="records-text">VIN:{{cardata.vin}}</text>
                <text class="kilm-text">维修记录：{{records.content.length}}条</text>
                <text class="type-text">最后公里数：{{records.last_kilometer}}公里</text>
                <text class="type-text" style="color: #ff6412;" wx:if="{{records.structure_is_repair==1}}">本车结构件已经维修</text>
                <text class="type-text" wx:if="{{records.structure_is_repair==2}}">本车结构件正常</text>
            </view>
            <view class="box-img">
                <image class="logo-img" mode="widthFix" src="{{cardata.logo}}"></image>
            </view>
            <view class="lineView"></view>
            <view class="carpars-status">
                <view class="single-pars">
                    <text class="pars-desc status-true" wx:if="{{records.car_is_fire==0}}">正常</text>
                    <text class="pars-desc status-false" wx:if="{{records.car_is_fire==1}}">异常</text>
                    <text class="pars-desc status-true" wx:if="{{records.car_is_fire==2}}">正常</text>
                    <text class="pars-title">是否火烧</text>
                </view>
                <view class="single-pars">
                    <text class="pars-desc status-true" wx:if="{{records.car_is_water==0}}">正常</text>
                    <text class="pars-desc status-false" wx:if="{{records.car_is_water==1}}">异常</text>
                    <text class="pars-desc status-true" wx:if="{{records.car_is_water==2}}">异常</text>
                    <text class="pars-title">是否泡水</text>
                </view>
                <view class="single-pars">
                    <text class="pars-desc status-true" wx:if="{{records.kilomete_is_normal==0}}">正常</text>
                    <text class="pars-desc status-false" wx:if="{{records.kilomete_is_normal==1}}">异常</text>
                    <text class="pars-desc status-true" wx:if="{{records.kilomete_is_normal==2}}">正常</text>
                    <text class="pars-title">里程数</text>
                </view>
                <view class="single-pars">
                    <text class="pars-desc status-true" wx:if="{{records.important_parts_is_repair==0}}">正常</text>
                    <text class="pars-desc status-false" wx:if="{{records.important_parts_is_repair==1}}">异常</text>
                    <text class="pars-desc status-true" wx:if="{{records.important_parts_is_repair==2}}">正常</text>
                    <text class="pars-title">重要部件</text>
                </view>
            </view>
        </view>
        <view class="content-view">
            <view class="content-desc">
                <text class="content-title">维修历史</text>
                <text class="content-shuo">* 数据来自第三方，仅作参考</text>
            </view>
            <view data-index="{{index}}" wx:if="{{records.content.length>0}}" wx:for="{{records.content}}" wx:key="index">
                <view class="content-detail-single">
                    <view class="content-right">
                        <view class="veibao-title">
                            <text class="{{index==0?'yuandian first-dian':'yuandian no-dian'}}"></text>
                            <text class="veibao-time">{{filters.formaTime(item.maintain_dateline)}}</text>
                            <text class="{{item.maintain_type=='事故维修'?'veibao-remark  remark-shi':item.maintain_type=='机油保养'?'veibao-remark  remark-yang':'veibao-remark remark-xiu'}}">{{item.maintain_type}}</text>
                        </view>
                        <view class="veibao-text">
                            <view class="veibao-xiangmu">
                                <text class="xiangmu-title">维保详情</text>
                                <text class="xiangmu-detail">{{item.content}}</text>
                            </view>
                            <view class="veibao-xiangmu">
                                <text class="xiangmu-title">使用材料</text>
                                <text class="xiangmu-detail">{{item.meterial}}</text>
                            </view>
                            <view class="veibao-xiangmu">
                                <text class="xiangmu-title">公里数</text>
                                <text class="xiangmu-detail">{{item.kilomete}}公里</text>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
    <view class="page-view" wx:else>
        <view class="top-title">
            <text class="top-title-b">维保记录查询</text>
            <text class="top-title-l">查询时间：2020-12-23 15:36</text>
        </view>
        <view class="top-box">
            <view class="box-text">
                <view style="width: 130%;">
                    <text class="brand-text" style="display: inline;">进口凯迪拉克</text>
                    <text class="records-text" style="display: inline;font-size: 24rpx"> CT6 2020款 28T 豪华运动型</text>
                </view>
                <text class="records-text">VIN：TRUDD28J3820983930</text>
                <text class="kilm-text">32000公里</text>
            </view>
            <view class="box-img">
                <image class="logo-img" mode="widthFix" src="https://file.bigfishfarming.com/file/car_icon/C10000191.jpg"></image>
            </view>
            <view class="lineView"></view>
            <view class="carpars-status">
                <view class="single-pars">
                    <text class="pars-desc status-true">正常</text>
                    <text class="pars-title">结构部件</text>
                </view>
                <view class="single-pars">
                    <text class="pars-desc status-true">正常</text>
                    <text class="pars-title">发动机</text>
                </view>
                <view class="single-pars">
                    <text class="pars-desc status-false">异常</text>
                    <text class="pars-title">里程数</text>
                </view>
                <view class="single-pars">
                    <text class="pars-desc status-true">正常</text>
                    <text class="pars-title">安全气囊</text>
                </view>
            </view>
        </view>
        <view class="content-view">
            <view class="content-desc">
                <text class="content-title">维修历史</text>
                <text class="content-shuo">* 数据来自第三方，仅作参考</text>
            </view>
            <view class="content-detail-single">
                <view class="content-right">
                    <view class="veibao-title">
                        <text class="yuandian first-dian"></text>
                        <text class="veibao-time">2020-09-11</text>
                        <text class="veibao-remark remark-yang">保养</text>
                    </view>
                    <view class="veibao-text">
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">维保详情</text>
                            <text class="xiangmu-detail">车辆前后检查，包括更换机油 ,空气滤清器滤芯 拆卸和安装,后消音</text>
                        </view>
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">使用材料</text>
                            <text class="xiangmu-detail">后消音器拆卸和安装</text>
                        </view>
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">公里数</text>
                            <text class="xiangmu-detail">32000公里</text>
                        </view>
                    </view>
                </view>
            </view>
            <view class="content-detail-single">
                <view class="content-right">
                    <view class="veibao-title">
                        <text class="yuandian no-dian"></text>
                        <text class="veibao-time">2009-12-05</text>
                        <text class="veibao-remark remark-xiu">小修</text>
                    </view>
                    <view class="veibao-text">
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">维保详情</text>
                            <text class="xiangmu-detail">车辆前后检查，包括更换机油 ,空气滤清器滤芯 拆卸和安装,后消音</text>
                        </view>
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">使用材料</text>
                            <text class="xiangmu-detail">后消音器拆卸和安装</text>
                        </view>
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">公里数</text>
                            <text class="xiangmu-detail">38000公里</text>
                        </view>
                    </view>
                </view>
            </view>
            <view class="content-detail-single">
                <view class="content-right">
                    <view class="veibao-title">
                        <text class="yuandian no-dian"></text>
                        <text class="veibao-time">2009-12-05</text>
                        <text class="veibao-remark remark-shi">事故</text>
                    </view>
                    <view class="veibao-text">
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">维保详情</text>
                            <text class="xiangmu-detail">车辆前后检查，包括更换机油 ,空气滤清器滤芯 拆卸和安装,后消音</text>
                        </view>
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">使用材料</text>
                            <text class="xiangmu-detail">后消音器拆卸和安装</text>
                        </view>
                        <view class="veibao-xiangmu">
                            <text class="xiangmu-title">公里数</text>
                            <text class="xiangmu-detail tiaobiao">15000公里</text>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</view>
<wxs module="filters" src="../../utils/filter.wxs" />