|
|
|
|
@ -1,75 +1,55 @@ |
|
|
|
|
<template> |
|
|
|
|
<basic-container style="max-height: 800px; overflow: hidden"> |
|
|
|
|
<avue-crud |
|
|
|
|
:option="option" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
:page.sync="page" |
|
|
|
|
ref="crud" |
|
|
|
|
v-model="form" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
:before-close="beforeClose" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
> |
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form" |
|
|
|
|
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" |
|
|
|
|
@selection-change="selectionChange" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
|
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
<template slot-scope="{ row }" slot="repairStatus"> |
|
|
|
|
<el-tag size="small" :type="row.repairStatus == 0 ? 'info' |
|
|
|
|
: row.approvePoint != '' && (row.approvePoint == '客户审核维修方案' || row.approvePoint == '主管审核维修方案') && row.repairStatus == 1 ? 'danger' |
|
|
|
|
: row.repairStatus == 1 ? '' |
|
|
|
|
: (row.repairStatus == 2 || row.repairStatus == 3 ) ? '' |
|
|
|
|
: (row.repairStatus == 2 || row.repairStatus == 3) ? '' |
|
|
|
|
: row.repairStatus == 4 ? 'warning' |
|
|
|
|
: (row.repairStatus == 5 || row.repairStatus == 6) ? 'success' : '' " |
|
|
|
|
> |
|
|
|
|
: (row.repairStatus == 5 || row.repairStatus == 6) ? 'success' : ''"> |
|
|
|
|
{{ row.repairStatus == 0 ? "无需维修" |
|
|
|
|
: row.approvePoint != '' && (row.approvePoint == '客户审核维修方案' || row.approvePoint == '主管审核维修方案') && row.repairStatus == 1 ? '已驳回' |
|
|
|
|
: row.approvePoint != '' && (row.approvePoint == '客户审核维修方案' || row.approvePoint == '主管审核维修方案') && |
|
|
|
|
row.repairStatus == 1 ? '已驳回' |
|
|
|
|
: row.repairStatus == 1 ? "待提交" |
|
|
|
|
: row.repairStatus == 2 ? "待审批" |
|
|
|
|
: row.repairStatus == 3 ? '待确认' |
|
|
|
|
: row.repairStatus == 4 ? '维修中' |
|
|
|
|
: row.repairStatus == 5 ? '维修完成' |
|
|
|
|
: "" |
|
|
|
|
: row.repairStatus == 6 ? '待付款' : row.repairStatus == 7 ? '待开发票' : row.repairStatus == 8 ? '已开发票' : "" |
|
|
|
|
}} |
|
|
|
|
</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="scope" slot="menuLeft"> |
|
|
|
|
<el-button |
|
|
|
|
size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="handleAdd" |
|
|
|
|
>确认</el-button |
|
|
|
|
> |
|
|
|
|
<el-button size="small" type="primary" @click="handleAdd">确认</el-button> |
|
|
|
|
<el-button size="small" @click="clickInvoice">开具发票</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
|
<el-button @click="handleView(row)">查看</el-button> |
|
|
|
|
<el-button @click="handleSubmit(row)" v-show="row.repairStatus == 1">提交</el-button> |
|
|
|
|
<el-button @click="handleCheck(row)" v-show="row.repairStatus == 2">审核</el-button> |
|
|
|
|
<el-button v-show="row.repairStatus == 3" @click="handleAccept(row)">确认</el-button> |
|
|
|
|
<el-button v-show="row.repairStatus == 4" @click="handleFinish(row)">维修完成</el-button> |
|
|
|
|
<el-button @click="handleView(row)" v-show="permission.repairDetails">查看</el-button> |
|
|
|
|
<el-button @click="handleSubmit(row)" v-show="permission.repairsubmit && row.repairStatus == 1">提交</el-button> |
|
|
|
|
<el-button @click="handleCheck(row)" v-show="permission.repairapprove && row.repairStatus == 2">审核</el-button> |
|
|
|
|
<el-button v-show="permission.repairconfirm && row.repairStatus == 3" @click="handleAccept(row)">确认</el-button> |
|
|
|
|
<el-button v-show="permission.repaircomplete && row.repairStatus == 4" |
|
|
|
|
@click="handleFinish(row)">维修完成</el-button> |
|
|
|
|
<el-button v-show="permission.repairevaluate && row.repairStatus == 5" |
|
|
|
|
@click="handleEvaluate(row)">评价</el-button> |
|
|
|
|
<el-button v-show="permission.confirmpayment && row.repairStatus == 6" |
|
|
|
|
@click="paymentFinish(row)">确认付款</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog |
|
|
|
|
title="巡检异常维修" |
|
|
|
|
:visible.sync="dialogerror" |
|
|
|
|
:append-to-body="true" |
|
|
|
|
width="70%" |
|
|
|
|
> |
|
|
|
|
<el-dialog title="巡检异常维修" :visible.sync="dialogerror" :append-to-body="true" width="70%"> |
|
|
|
|
<div style="height: 500px; overflow: auto"> |
|
|
|
|
<el-form ref="errorForm" :model="errorForm" :rules="addRules" label-width="120px" label-position="left"> |
|
|
|
|
<div> |
|
|
|
|
<div |
|
|
|
|
style=" |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
"> |
|
|
|
|
基本信息 |
|
|
|
|
</div> |
|
|
|
|
<el-form-item label="单位名称" prop="deptName"> |
|
|
|
|
@ -77,14 +57,12 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<div |
|
|
|
|
style=" |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
"> |
|
|
|
|
巡检异常清单 |
|
|
|
|
</div> |
|
|
|
|
<el-form-item label="异常清单"> |
|
|
|
|
@ -108,7 +86,7 @@ |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-radio-group v-model="scope.row.isRepair" fill="red"> |
|
|
|
|
<el-radio :disabled="viewType == 'view'" :label="1">是</el-radio> |
|
|
|
|
<el-radio :disabled="viewType == 'view'" class="error_radio" :label="0" >否</el-radio> |
|
|
|
|
<el-radio :disabled="viewType == 'view'" class="error_radio" :label="0">否</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
@ -116,14 +94,12 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div v-show="errorForm.repairStatus == 2"> |
|
|
|
|
<div |
|
|
|
|
style=" |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
"> |
|
|
|
|
主管审核 |
|
|
|
|
</div> |
|
|
|
|
<el-form-item label="审核结果"> |
|
|
|
|
@ -137,14 +113,12 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div v-show="errorForm.repairStatus == 3"> |
|
|
|
|
<div |
|
|
|
|
style=" |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
"> |
|
|
|
|
客户确认 |
|
|
|
|
</div> |
|
|
|
|
<el-form-item label="审核结果"> |
|
|
|
|
@ -157,6 +131,134 @@ |
|
|
|
|
<el-input type="textarea" v-model="errorForm.approveRemark" style="width: 98%;"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div v-show="errorForm.repairStatus == 5"> |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
"> |
|
|
|
|
维修效果确认 |
|
|
|
|
</div> |
|
|
|
|
<el-form-item label="是否维修完成"> |
|
|
|
|
<el-select placeholder="请确认是否维修完成" style="width: 98%;" v-model="errorForm.approveResult1" |
|
|
|
|
@change="changeResult"> |
|
|
|
|
<el-option label="是" :value="1"></el-option> |
|
|
|
|
<el-option label="否" :value="0"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="维修未完成原因" v-show="rowStatus == 5 && errorForm.approveResult1 == 0"> |
|
|
|
|
<el-input type="textarea" v-model="errorForm.approveRemark" placeholder="请输入维修未完成原因" |
|
|
|
|
style="width: 98%;"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<div v-show="(rowStatus == 5 || isEvalute) && errorForm.approveResult1 == 1"> |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
"> |
|
|
|
|
评价 |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<p>1.您对本次维修的质量方面满意吗?</p> |
|
|
|
|
<div style="display:flex;"> |
|
|
|
|
<div style="width: 150px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
height: 30px; |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin-right: 20px; |
|
|
|
|
cursor:pointer;" |
|
|
|
|
:style="{ background: errorForm.isOkQuality == '1' ? '#3a62d733' : 'rgb(239, 239, 239)', color: errorForm.isOkQuality == '1' ? '#3a62d7' : '#4f4f4f' }" |
|
|
|
|
@click="clickQualityYes">满意</div> |
|
|
|
|
<div style="width: 150px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
height: 30px; |
|
|
|
|
background: rgb(239, 239, 239); |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin-right: 20px;cursor:pointer;" |
|
|
|
|
:style="{ background: errorForm.isOkQuality == '0' ? '#3a62d733' : 'rgb(239, 239, 239)', color: errorForm.isOkQuality == '0' ? '#3a62d7' : '#4f4f4f' }" |
|
|
|
|
@click="clickQualityNo">不满意</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<p>2.您对本次维修的安全方面满意吗?</p> |
|
|
|
|
<div style="display:flex;"> |
|
|
|
|
<div style="width: 150px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
height: 30px; |
|
|
|
|
background: rgb(239, 239, 239); |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin-right: 20px;cursor:pointer;" |
|
|
|
|
:style="{ background: errorForm.isOkSecure == '1' ? '#3a62d733' : 'rgb(239, 239, 239)', color: errorForm.isOkSecure == '1' ? '#3a62d7' : '#4f4f4f' }" |
|
|
|
|
@click="clickSafeYes">满意</div> |
|
|
|
|
<div style="width: 150px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
height: 30px; |
|
|
|
|
background: rgb(239, 239, 239); |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin-right: 20px;cursor:pointer;" |
|
|
|
|
:style="{ background: errorForm.isOkSecure == '0' ? '#3a62d733' : 'rgb(239, 239, 239)', color: errorForm.isOkSecure == '0' ? '#3a62d7' : '#4f4f4f' }" |
|
|
|
|
@click="clickSafeNo">不满意</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<p>3.您对本次维修的时效方面满意吗?</p> |
|
|
|
|
<div style="display:flex;margin-bottom:30px;"> |
|
|
|
|
<div style="width: 150px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
height: 30px; |
|
|
|
|
background: rgb(239, 239, 239); |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin-right: 20px;cursor:pointer;" |
|
|
|
|
:style="{ background: errorForm.isOkValidity == '1' ? '#3a62d733' : 'rgb(239, 239, 239)', color: errorForm.isOkValidity == '1' ? '#3a62d7' : '#4f4f4f' }" |
|
|
|
|
@click="clickTimeYes">满意</div> |
|
|
|
|
<div style="width: 150px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
height: 30px; |
|
|
|
|
background: rgb(239, 239, 239); |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin-right: 20px;cursor:pointer;" |
|
|
|
|
:style="{ background: errorForm.isOkValidity == '0' ? '#3a62d733' : 'rgb(239, 239, 239)', color: errorForm.isOkValidity == '0' ? '#3a62d7' : '#4f4f4f' }" |
|
|
|
|
@click="clickTimeNo">不满意</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-show="(rowStatus == 5 || isEvalute) && errorForm.approveResult1 == 1"> |
|
|
|
|
<div style=" |
|
|
|
|
color: #101010; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 550; |
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
"> |
|
|
|
|
签名 |
|
|
|
|
</div> |
|
|
|
|
<div v-show="isEvalute"> |
|
|
|
|
<avue-sign ref="sign"></avue-sign> |
|
|
|
|
<el-button @click="clearName">清空</el-button> |
|
|
|
|
<el-button @click="confirmName">确定</el-button> |
|
|
|
|
</div> |
|
|
|
|
<div v-show="!isEvalute"> |
|
|
|
|
<img :src="errorForm.signatureUrl" alt=""> |
|
|
|
|
</div> |
|
|
|
|
<el-form-item label="签名人" prop="signaturePerson"> |
|
|
|
|
<el-input :readonly="!isEvalute" placeholder="请输入签名人" v-model="errorForm.signaturePerson"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="签名时间" prop="signatureTime"> |
|
|
|
|
<el-date-picker :disabled="viewType == 'view'" v-model="errorForm.signatureTime" type="datetime" |
|
|
|
|
style="width:98%;" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
placeholder="请选择签名时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
@ -169,11 +271,12 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import {getRepairPage,solutionSave,solutionSubmit,supervisorConfirm,supervisorRefuse,customerConfirm,customerRefuse,servicemanSubmit} from '@/api/labManagement/repair' |
|
|
|
|
import {getDetail} from '@/api/labManagement/task' |
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
import { getRepairPage, solutionSave, solutionSubmit, supervisorConfirm, supervisorRefuse, customerConfirm, customerRefuse, servicemanSubmit, repairServiceConfirm, customerConfirmFinish, customerRefuseFinish, repairConfirmConfirm } from '@/api/labManagement/repair' |
|
|
|
|
import { addFile } from '@/api/operation/hand' |
|
|
|
|
import { getDetail } from '@/api/labManagement/task' |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
export default { |
|
|
|
|
data(){ |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
option: { |
|
|
|
|
selection: true, |
|
|
|
|
@ -240,23 +343,27 @@ export default { |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
data:[], |
|
|
|
|
errorForm:{}, |
|
|
|
|
dialogerror:false, |
|
|
|
|
data: [], |
|
|
|
|
errorForm: {}, |
|
|
|
|
dialogerror: false, |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
selectedList:[], |
|
|
|
|
viewType:'' |
|
|
|
|
selectedList: [], |
|
|
|
|
viewType: '', |
|
|
|
|
|
|
|
|
|
isEvalute: false, |
|
|
|
|
rowStatus: '', |
|
|
|
|
nameImg: '', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed:{ |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(["userInfo", "permission"]), |
|
|
|
|
}, |
|
|
|
|
created(){}, |
|
|
|
|
methods:{ |
|
|
|
|
created() { }, |
|
|
|
|
methods: { |
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
@ -274,17 +381,17 @@ export default { |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
selectionChange(list){ |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectedList = list |
|
|
|
|
}, |
|
|
|
|
// 点击确认按钮 |
|
|
|
|
handleAdd(){ |
|
|
|
|
if(this.selectedList.length != 1){ |
|
|
|
|
handleAdd() { |
|
|
|
|
if (this.selectedList.length != 1) { |
|
|
|
|
this.$message.warning('只能选择一条数据') |
|
|
|
|
}else{ |
|
|
|
|
if(this.selectedList[0].status == 1){ |
|
|
|
|
} else { |
|
|
|
|
if (this.selectedList[0].status == 1) { |
|
|
|
|
this.$message.warning('请选择状态为待确认的数据') |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.errorForm = this.selectedList[0] |
|
|
|
|
this.dialogerror = true |
|
|
|
|
} |
|
|
|
|
@ -292,10 +399,10 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 点击查看按钮 |
|
|
|
|
handleView(row){ |
|
|
|
|
handleView(row) { |
|
|
|
|
this.viewType = 'view' |
|
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.errorForm = res.data.data |
|
|
|
|
this.dialogerror = true |
|
|
|
|
let data = this.checkDeepData(res.data.data.details) |
|
|
|
|
@ -305,27 +412,86 @@ export default { |
|
|
|
|
// this.errorForm = row |
|
|
|
|
// this.dialogerror = true |
|
|
|
|
}, |
|
|
|
|
// 点击行内的评价并签字按钮 |
|
|
|
|
handleEvaluate(row) { |
|
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
|
this.rowStatus = res.data.data.repairStatus |
|
|
|
|
this.viewType = 'evaluate' |
|
|
|
|
this.errorForm = res.data.data |
|
|
|
|
this.dialogerror = true |
|
|
|
|
|
|
|
|
|
this.isEvalute = true |
|
|
|
|
this.errorForm.isOkValidity = '' |
|
|
|
|
this.errorForm.isOkQuality = '' |
|
|
|
|
this.errorForm.isOkSecure = '' |
|
|
|
|
let data = this.checkDeepData(res.data.data.details) |
|
|
|
|
this.errorForm.tableData = data |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 客户选择是否维修完成 |
|
|
|
|
changeResult(val) { |
|
|
|
|
this.isFinish = val |
|
|
|
|
console.log(this.isFinish) |
|
|
|
|
}, |
|
|
|
|
clickQualityYes() { |
|
|
|
|
if (this.viewType == 'evaluate') { |
|
|
|
|
this.errorForm.isOkQuality = 1 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
clickQualityNo() { |
|
|
|
|
if (this.viewType == 'evaluate') { |
|
|
|
|
this.errorForm.isOkQuality = 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
clickSafeYes() { |
|
|
|
|
if (this.viewType == 'evaluate') { |
|
|
|
|
this.errorForm.isOkSecure = 1 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
clickSafeNo() { |
|
|
|
|
if (this.viewType == 'evaluate') { |
|
|
|
|
this.errorForm.isOkSecure = 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
clickTimeYes() { |
|
|
|
|
if (this.viewType == 'evaluate') { |
|
|
|
|
this.errorForm.isOkValidity = 1 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
clickTimeNo() { |
|
|
|
|
if (this.viewType == 'evaluate') { |
|
|
|
|
this.errorForm.isOkValidity = 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
clearName() { |
|
|
|
|
this.$refs.sign.clear() |
|
|
|
|
this.nameImg = '' |
|
|
|
|
}, |
|
|
|
|
confirmName() { |
|
|
|
|
this.nameImg = this.$refs.sign.submit(80, 50); |
|
|
|
|
}, |
|
|
|
|
//维修人员提交方案 |
|
|
|
|
handleSubmit(row){ |
|
|
|
|
handleSubmit(row) { |
|
|
|
|
this.viewType = 'submit' |
|
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.errorForm = res.data.data |
|
|
|
|
this.dialogerror = true |
|
|
|
|
let data = this.checkDeepData(res.data.data.details) |
|
|
|
|
this.errorForm.tableData = data |
|
|
|
|
this.errorForm.tableData.map(item =>{ |
|
|
|
|
this.errorForm.tableData.map(item => { |
|
|
|
|
item.price = item.price == -1 ? '' : item.price |
|
|
|
|
}) |
|
|
|
|
console.log('data==========>',data) |
|
|
|
|
console.log('data==========>', data) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 主管审批 |
|
|
|
|
handleCheck(row){ |
|
|
|
|
handleCheck(row) { |
|
|
|
|
this.viewType = 'check' |
|
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.errorForm = res.data.data |
|
|
|
|
this.dialogerror = true |
|
|
|
|
let data = this.checkDeepData(res.data.data.details) |
|
|
|
|
@ -336,15 +502,15 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 客户确认 |
|
|
|
|
handleAccept(row){ |
|
|
|
|
handleAccept(row) { |
|
|
|
|
this.viewType = 'confirm' |
|
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.errorForm = res.data.data |
|
|
|
|
this.dialogerror = true |
|
|
|
|
let data = this.checkDeepData(res.data.data.details) |
|
|
|
|
this.errorForm.tableData = data |
|
|
|
|
this.errorForm.tableData.map(item =>{ |
|
|
|
|
this.errorForm.tableData.map(item => { |
|
|
|
|
item.isRepair = 1 |
|
|
|
|
}) |
|
|
|
|
this.errorForm.approveResult = '' |
|
|
|
|
@ -354,14 +520,98 @@ export default { |
|
|
|
|
// this.errorForm = row |
|
|
|
|
// this.dialogerror = true |
|
|
|
|
}, |
|
|
|
|
handleFinish(row){ |
|
|
|
|
// 评价并签字提交 |
|
|
|
|
handleConfirm() { |
|
|
|
|
console.log('this.detailForm.approveResult1', this.errorForm.approveResult1) |
|
|
|
|
if (this.errorForm.approveResult1 == 0) {//否 |
|
|
|
|
let query = { |
|
|
|
|
id: this.errorForm.id, |
|
|
|
|
approveResult: this.errorForm.approveResult1, |
|
|
|
|
approvePerson: this.userInfo.user_id, |
|
|
|
|
approveTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
|
approveRemark: this.errorForm.approveRemark |
|
|
|
|
} |
|
|
|
|
customerRefuseFinish(query).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('提交成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else {//是 |
|
|
|
|
if (this.nameImg != '') { |
|
|
|
|
const formData = new FormData(); |
|
|
|
|
formData.append('file', this.base64toFile(this.nameImg)); |
|
|
|
|
addFile(formData).then(res => { |
|
|
|
|
console.log('res----------->', res) |
|
|
|
|
let query = { |
|
|
|
|
id: this.errorForm.id, |
|
|
|
|
isOkValidity: this.errorForm.isOkValidity, |
|
|
|
|
isOkQuality: this.errorForm.isOkQuality, |
|
|
|
|
isOkSecure: this.errorForm.isOkSecure, |
|
|
|
|
signatureUrl: res.data.data.link, |
|
|
|
|
signaturePerson: this.errorForm.signaturePerson, |
|
|
|
|
signatureTime: this.errorForm.signatureTime, |
|
|
|
|
} |
|
|
|
|
customerConfirmFinish(query).then(res => { |
|
|
|
|
console.log('res ========>', res) |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('评价成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.$message.warning("请进行手写签名并点击确定按钮") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleFinish(row) { |
|
|
|
|
this.$confirm('请确认是否维修完成?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
servicemanSubmit({id:row.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
servicemanSubmit({ id: row.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('维修完成') |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
base64toFile(dataurl, filename = 'file') { |
|
|
|
|
let arr = dataurl.split(',') |
|
|
|
|
let mime = arr[0].match(/:(.*?);/)[1] |
|
|
|
|
let suffix = mime.split('/')[1] |
|
|
|
|
let bstr = atob(arr[1]) |
|
|
|
|
let n = bstr.length |
|
|
|
|
let u8arr = new Uint8Array(n) |
|
|
|
|
|
|
|
|
|
while (n--) { |
|
|
|
|
u8arr[n] = bstr.charCodeAt(n) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let file = new File([u8arr], `${filename}.${suffix}`, { |
|
|
|
|
type: mime |
|
|
|
|
}) |
|
|
|
|
console.log(file) |
|
|
|
|
return file |
|
|
|
|
}, |
|
|
|
|
// 确认付款是否完成 |
|
|
|
|
paymentFinish(row) { |
|
|
|
|
this.$confirm('请确认付款是否完成?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
repairServiceConfirm({ id: row.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('维修完成') |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
@ -369,7 +619,7 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//用于回调的函数 |
|
|
|
|
checkData(data, list){ |
|
|
|
|
checkData(data, list) { |
|
|
|
|
data.forEach((item) => { |
|
|
|
|
if (item.details && item.details.length > 0) { |
|
|
|
|
this.checkData(item.details, list); |
|
|
|
|
@ -380,18 +630,18 @@ export default { |
|
|
|
|
return list; |
|
|
|
|
}, |
|
|
|
|
//调用此函数 返回的就是最底层的数据 |
|
|
|
|
checkDeepData(data){ |
|
|
|
|
checkDeepData(data) { |
|
|
|
|
const list = []; |
|
|
|
|
return this.checkData(data, list); |
|
|
|
|
}, |
|
|
|
|
handleClose(){ |
|
|
|
|
handleClose() { |
|
|
|
|
this.viewType = '' |
|
|
|
|
this.dialogerror = false |
|
|
|
|
}, |
|
|
|
|
// 巡检维修单保存按钮 |
|
|
|
|
handleSaveError(){ |
|
|
|
|
handleSaveError() { |
|
|
|
|
this.$refs['errorForm'].validate((valid) => { |
|
|
|
|
if(valid){ |
|
|
|
|
if (valid) { |
|
|
|
|
this.$confirm('请确认是否保存当前数据?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
@ -405,44 +655,44 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 巡检维修单确定按钮 |
|
|
|
|
handleConfirmError(){ |
|
|
|
|
handleConfirmError() { |
|
|
|
|
this.$refs['errorForm'].validate((valid) => { |
|
|
|
|
if(valid){ |
|
|
|
|
if(this.viewType == 'submit'){ |
|
|
|
|
if(this.errorForm.tableData.find(item => item.price === '')){ |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.viewType == 'submit') { |
|
|
|
|
if (this.errorForm.tableData.find(item => item.price === '')) { |
|
|
|
|
this.$message.error("请对异常的数据填写价格") |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
let query = [] |
|
|
|
|
this.errorForm.tableData.map(item =>{ |
|
|
|
|
this.errorForm.tableData.map(item => { |
|
|
|
|
query.push({ |
|
|
|
|
id:item.id, // 明细id |
|
|
|
|
status:item.status, //状态,0:正常,1:异常 |
|
|
|
|
taskId:this.errorForm.id, // 任务ID |
|
|
|
|
floorName:item.floorName, //楼层 |
|
|
|
|
deptId:item.deptId, //房间 |
|
|
|
|
majorName:item.majorName, //专业名称 |
|
|
|
|
checkContent:item.checkContent, //巡检内容 |
|
|
|
|
craft:item.craft, //工艺要求 |
|
|
|
|
period:item.period, //巡检周期 1:月, 2:季, 3:半年 |
|
|
|
|
picUrl:item.picUrl, //现场图片地址 |
|
|
|
|
signUrl:item.signUrl, //签字图片地址 |
|
|
|
|
remark:item.remark, //备注 |
|
|
|
|
price:item.price, //价格 |
|
|
|
|
id: item.id, // 明细id |
|
|
|
|
status: item.status, //状态,0:正常,1:异常 |
|
|
|
|
taskId: this.errorForm.id, // 任务ID |
|
|
|
|
floorName: item.floorName, //楼层 |
|
|
|
|
deptId: item.deptId, //房间 |
|
|
|
|
majorName: item.majorName, //专业名称 |
|
|
|
|
checkContent: item.checkContent, //巡检内容 |
|
|
|
|
craft: item.craft, //工艺要求 |
|
|
|
|
period: item.period, //巡检周期 1:月, 2:季, 3:半年 |
|
|
|
|
picUrl: item.picUrl, //现场图片地址 |
|
|
|
|
signUrl: item.signUrl, //签字图片地址 |
|
|
|
|
remark: item.remark, //备注 |
|
|
|
|
price: item.price, //价格 |
|
|
|
|
// isRepair 客户确认是否维修, 0:不维修, 1维修 |
|
|
|
|
startTime:item.startTime, //计划开始时间 |
|
|
|
|
startTime: item.startTime, //计划开始时间 |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
let params = { |
|
|
|
|
task:{ |
|
|
|
|
id:this.errorForm.id, |
|
|
|
|
task: { |
|
|
|
|
id: this.errorForm.id, |
|
|
|
|
}, |
|
|
|
|
detailList:query |
|
|
|
|
detailList: query |
|
|
|
|
} |
|
|
|
|
console.log('params==========>',params) |
|
|
|
|
solutionSave(params).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
solutionSubmit({id:this.errorForm.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
console.log('params==========>', params) |
|
|
|
|
solutionSave(params).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
solutionSubmit({ id: this.errorForm.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('提交成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
@ -452,80 +702,82 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}else if(this.viewType == 'check'){ |
|
|
|
|
if(this.errorForm.approveResult == 1){ |
|
|
|
|
supervisorConfirm({id:this.errorForm.id}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
} else if (this.viewType == 'check') { |
|
|
|
|
if (this.errorForm.approveResult == 1) { |
|
|
|
|
supervisorConfirm({ id: this.errorForm.id }).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('提交成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
let query = { |
|
|
|
|
id:this.errorForm.id, //任务id |
|
|
|
|
approvePerson:this.userInfo.user_id, //审核人 |
|
|
|
|
approveResult:this.errorForm.approveResult, //审核结果 |
|
|
|
|
approveRemark:this.errorForm.approveRemark //备注 |
|
|
|
|
id: this.errorForm.id, //任务id |
|
|
|
|
approvePerson: this.userInfo.user_id, //审核人 |
|
|
|
|
approveResult: this.errorForm.approveResult, //审核结果 |
|
|
|
|
approveRemark: this.errorForm.approveRemark //备注 |
|
|
|
|
} |
|
|
|
|
supervisorRefuse(query).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
supervisorRefuse(query).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('提交成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}else if(this.viewType == 'confirm'){ |
|
|
|
|
if(this.errorForm.approveResult == 1){ |
|
|
|
|
} else if (this.viewType == 'confirm') { |
|
|
|
|
if (this.errorForm.approveResult == 1) { |
|
|
|
|
let query = [] |
|
|
|
|
this.errorForm.tableData.map(item =>{ |
|
|
|
|
this.errorForm.tableData.map(item => { |
|
|
|
|
query.push({ |
|
|
|
|
id:item.id, // 明细id |
|
|
|
|
status:item.status, //状态,0:正常,1:异常 |
|
|
|
|
taskId:this.errorForm.id, // 任务ID |
|
|
|
|
floorName:item.floorName, //楼层 |
|
|
|
|
deptId:item.deptId, //房间 |
|
|
|
|
majorName:item.majorName, //专业名称 |
|
|
|
|
checkContent:item.checkContent, //巡检内容 |
|
|
|
|
craft:item.craft, //工艺要求 |
|
|
|
|
period:item.period, //巡检周期 1:月, 2:季, 3:半年 |
|
|
|
|
picUrl:item.picUrl, //现场图片地址 |
|
|
|
|
signUrl:item.signUrl, //签字图片地址 |
|
|
|
|
remark:item.remark, //备注 |
|
|
|
|
price:item.price, //价格 |
|
|
|
|
isRepair:item.isRepair, //客户确认是否维修, 0:不维修, 1维修 |
|
|
|
|
startTime:item.startTime, //计划开始时间 |
|
|
|
|
id: item.id, // 明细id |
|
|
|
|
status: item.status, //状态,0:正常,1:异常 |
|
|
|
|
taskId: this.errorForm.id, // 任务ID |
|
|
|
|
floorName: item.floorName, //楼层 |
|
|
|
|
deptId: item.deptId, //房间 |
|
|
|
|
majorName: item.majorName, //专业名称 |
|
|
|
|
checkContent: item.checkContent, //巡检内容 |
|
|
|
|
craft: item.craft, //工艺要求 |
|
|
|
|
period: item.period, //巡检周期 1:月, 2:季, 3:半年 |
|
|
|
|
picUrl: item.picUrl, //现场图片地址 |
|
|
|
|
signUrl: item.signUrl, //签字图片地址 |
|
|
|
|
remark: item.remark, //备注 |
|
|
|
|
price: item.price, //价格 |
|
|
|
|
isRepair: item.isRepair, //客户确认是否维修, 0:不维修, 1维修 |
|
|
|
|
startTime: item.startTime, //计划开始时间 |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
let params = { |
|
|
|
|
task:{ |
|
|
|
|
id:this.errorForm.id, |
|
|
|
|
task: { |
|
|
|
|
id: this.errorForm.id, |
|
|
|
|
}, |
|
|
|
|
detailList:query //维修明细列表 |
|
|
|
|
detailList: query //维修明细列表 |
|
|
|
|
} |
|
|
|
|
customerConfirm(params).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
customerConfirm(params).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('提交成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
let query = { |
|
|
|
|
id:this.errorForm.id, //任务id |
|
|
|
|
approvePerson:this.userInfo.user_id, //审核人 |
|
|
|
|
approveResult:this.errorForm.approveResult, //审核结果 |
|
|
|
|
approveRemark:this.errorForm.approveRemark //备注 |
|
|
|
|
id: this.errorForm.id, //任务id |
|
|
|
|
approvePerson: this.userInfo.user_id, //审核人 |
|
|
|
|
approveResult: this.errorForm.approveResult, //审核结果 |
|
|
|
|
approveRemark: this.errorForm.approveRemark //备注 |
|
|
|
|
} |
|
|
|
|
customerRefuse(query).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
customerRefuse(query).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('提交成功') |
|
|
|
|
this.dialogerror = false |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} else if (this.viewType == 'evaluate') { |
|
|
|
|
this.handleConfirm() |
|
|
|
|
} |
|
|
|
|
// console.log('errorForm--------------->',this.errorForm) |
|
|
|
|
// this.$confirm('请确认提交保存当前数据?', '提示', { |
|
|
|
|
@ -540,7 +792,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
onLoad(page, params = {}){ |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
// this.data = [ |
|
|
|
|
// { |
|
|
|
|
// taskNo:'WX-20240820-01', |
|
|
|
|
@ -567,15 +819,44 @@ export default { |
|
|
|
|
// ] |
|
|
|
|
// } |
|
|
|
|
// ] |
|
|
|
|
getRepairPage({current:this.page.currentPage,size:this.page.pageSize}).then(res =>{ |
|
|
|
|
getRepairPage({ current: this.page.currentPage, size: this.page.pageSize }).then(res => { |
|
|
|
|
this.data = res.data.data.records |
|
|
|
|
this.page.total = res.data.data.total |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 开具发票 |
|
|
|
|
clickInvoice() { |
|
|
|
|
if (this.selectedList.length == 0) { |
|
|
|
|
this.$message.warning('请至少选择一条数据') |
|
|
|
|
} else { |
|
|
|
|
let tmp = this.selectedList.find(item => item.repairStatus != 7) |
|
|
|
|
if (tmp) { |
|
|
|
|
this.$message.warning('请选择状态为待开发票的数据') |
|
|
|
|
} else { |
|
|
|
|
this.$confirm('请确认是否为已选择数据开具发票?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
|
|
let queryData = [] |
|
|
|
|
this.selectedList.forEach(item => { |
|
|
|
|
queryData.push({ |
|
|
|
|
id: item.id |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
repairConfirmConfirm(queryData).then(res => { |
|
|
|
|
this.$message.success('发票开具成功') |
|
|
|
|
this.onLoad() |
|
|
|
|
}) |
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|
<style></style> |
|
|
|
|
|