index.wxml 8.12 KB
<template name="record">
    <van-collapse-item title="{{record.result==1?'处理人':'巡检人'}}:{{record.handlerName}}" value="{{record.createTime}}" name="{{record.id}}">
        <view class="actinfo">
            <view><text>状态:</text><text style="color:{{record.color}}">{{record.text}}</text></view>
            <view wx:if="{{record.remark}}"><text>备注:</text>{{record.remark}}</view>
            <image mode="widthFix" wx:for="{{record.pics}}" src="{{picUrl+item}}" />
        </view>
    </van-collapse-item>
</template>
<view class="container" style="padding-top: {{navHeight}}px">
    <navbar2 bg-color="#fff" navbar-color="#000">
        <view class="navtitle">
            <van-icon bindtap="onGoBack" size="24" name="arrow-left" custom-class="back" />
            <view class="title">记录详情</view>
        </view>
    </navbar2>
    <view class="tour">
        <view class="tview">
            <van-collapse accordion value="{{recordVal2}}" bind:change="changeRecord2">
                <template is="record" data="{{record:newRecord,picUrl}}"></template>
            </van-collapse>
            
        </view>
        
        <view class="mview" wx:if="{{tourObj.type==1||tourObj.type==2}}">
            <view class="title">{{tourObj.type==1?'复查':'处理'}}结果</view>
            <view class="maction">
                <van-collapse accordion value="{{actionVal}}" bind:change="changeAction">
                    <van-collapse-item title="{{tourObj.type==1?('复查人:'+tourObj.createByName):('处理人:'+tourObj.handlerName)}}" name="{{1}}">
                        <view class="upview">
                            <view class="label">{{tourObj.type==1?'复查':'处理'}}完成图:</view>
                            <view class="acea-row action-btns">
                                <van-button type="info" bindtap="playBtn" custom-style="width:300rpx;">播放实时视频</van-button>
                                <van-button type="info" bindtap="captureBtn" custom-style="width:300rpx;">现场截图</van-button>
                            </view>
                            <!-- 视频截图 S -->
                            <view class="capview {{actionVal&&captureUrl?'show':'hide'}}" >
                                <canvas disable-scroll class="cvs" type="2d" bindtouchstart="startDraw" bindtouchmove="drawing"
                                bindtouchend="endDraw" bindtouchcancel="endDraw" style="width:{{cWidth}}px;height: {{cHeight}}px;" id="painter" >
                                </canvas>
                            </view>
                            <!-- 视频截图 E -->
                            <!-- <van-uploader accept="image" capture="camera" custom-class="uploader" max-count="5" slot="input" deletable multiple bind:after-read="readFileSucc" bind:delete="deleteFile" file-list="{{ fileList }}" /> -->
                        </view>
                        <view class="upview">
                            <!-- <view class="label">备注:</view> -->
                            <van-field model:value="{{ remark }}" title-width="0rpx" type="textarea" placeholder="请输入备注信息" autosize show-word-limit maxlength="300" border="{{ true }}" />
                        </view>
                    </van-collapse-item>
                </van-collapse>
            </view>
        </view>
        <view class="title">操作记录</view>
        <view class="actlist">
            <van-collapse accordion value="{{recordVal}}" bind:change="changeRecord">
                <template is="record" wx:for="{{tourObj.handleRecords}}" data="{{record:item,picUrl}}"></template>
                <!-- 巡店记录详情 S-->
                <van-collapse-item title="巡检人:{{tourObj.createByName}}" name="{{tourObj.id}}" value="{{tourObj.createTime}}">    
                    <view class="tinfo">
                        <view class="pictit">巡查图:</view>
                        <view class="piclist">
                            <image mode="widthFix" wx:if="{{tourObj.pic}}" src="{{picUrl+tourObj.pic}}" />
                        </view>
                        <view class="tlist">
                            <view class="titem"><text>门店:</text>{{tourObj.mallName}}</view>
                            <view class="titem"><text>监控点:</text>{{tourObj.gateName}}</view>
                            <view class="titem"><text>工单编号:</text>{{tourObj.sn}}</view>
                            <view class="titem"><text>巡店人:</text>{{tourObj.createByName}}</view>
                            <view class="titem"><text>处理人:</text>{{tourObj.handlerName}}</view>
                            <text class="txt" style="color:{{tourObj.color}}">{{tourObj.text}}</text>
                        </view>
                                <van-row custom-class="score_view aview">
                                    <van-col span="6" custom-class="tcol count">
                                        <view class="tit">得分/总分</view>
                                        <view class="num">{{tourObj.hadScore}}/{{tourObj.totalScore}}</view>
                                        
                                    </van-col>
                                    <van-col span="5" custom-class="tcol all">
                                        <view class="tit">总巡检项</view>
                                        <view class="num">{{tourObj.total}}条</view>
                                        
                                    </van-col>
                                    <van-col span="4" custom-class="tcol yes">
                                        <view class="tit">合格</view>
                                        <view class="num">{{tourObj.qualified}}条</view>
                                    </van-col>
                                    <van-col span="4" custom-class="tcol no">
                                        <view class="tit">不合格</view>
                                        <view class="num">{{tourObj.noQualified}}条</view>
                                        
                                    </van-col>
                                    <van-col span="5" custom-class="tcol none">
                                        <view class="tit">不适用</view>
                                        <view class="num">{{tourObj.noSuit}}条</view>
                                        
                                    </van-col>
                                </van-row>
                                <view class="torlist">
                                    <view class="toritem" wx:for="{{tourObj.sops}}">
                                        <view><text>{{item.sopTypeName}}:</text>{{item.name}}</view>
                                        <view><text>描述:</text>{{item.intro}}</view>
                                        <view><text>分值:</text><text class="blue">{{item.score}}</text></view>
                                        <text class="state" style="color:{{item.color}}">{{item.text}}</text>
                                        <view class="vrank">{{index+1}}</view>
                                    </view>
                                </view>
                                
                                <view class="tbei" wx:if="{{tourObj.remark}}">
                                    <text>备注:</text>{{tourObj.remark}}
                                </view>
                            
                    </view>
                </van-collapse-item> 
                <!-- 巡店记录详情 E-->
            </van-collapse>
        </view>
        <view style="height: 160rpx;"></view>
    </view>
    <view class="acea-row check-btns"  wx:if="{{tourObj.type==1}}">
        <van-button data-value="{{2}}" bindtap="submitBtn" custom-style="width:300rpx;" type="danger">不通过</van-button>
        <van-button data-value="{{3}}" bindtap="submitBtn" custom-style="width:300rpx;" type="primary">通过并完成</van-button>
    </view>
    <view class="acea-row check-btns btns2"  wx:if="{{tourObj.type==2}}">
        <van-button data-value="{{1}}" block  bindtap="submitBtn" type="info" block>已处理</van-button>
    </view>
</view>