
29 changed files with 1557 additions and 278 deletions
@ -0,0 +1,25 @@ |
|||
package com.yxt.anrui.portal.api.sysmapping; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class SysMappingInfoQuery implements Query { |
|||
private static final long serialVersionUID = 5179141159925489016L; |
|||
|
|||
@ApiModelProperty("映射来源,如CWXT等") |
|||
private String map_sourceKey; // 映射来源,如CWXT等
|
|||
|
|||
@ApiModelProperty("映射实体,如付款单") |
|||
private String map_object; // 映射实体,如付款单
|
|||
|
|||
@ApiModelProperty("映射项目类别,如应付类别") |
|||
private String map_item; // 映射项目类别,如应付类别
|
|||
|
|||
@ApiModelProperty("数据字典类别编码") |
|||
private String dictTypeCode; // 数据字典类别编码
|
|||
|
|||
@ApiModelProperty("数据key") |
|||
private String dictKey; // 数据key
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.portal.api.sysmapping; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class SysMappingInfoVo implements Vo { |
|||
|
|||
|
|||
private static final long serialVersionUID = -4909774998558087805L; |
|||
|
|||
@ApiModelProperty("数据字典sid") |
|||
private String dictSid; // 数据字典sid
|
|||
@ApiModelProperty("映射来源,如CWXT等") |
|||
private String map_sourceKey; // 映射来源,如CWXT等
|
|||
@ApiModelProperty("映射来源,如财务系统等") |
|||
private String map_sourceValue; // 映射来源,如财务系统等
|
|||
@ApiModelProperty("映射实体,如付款单") |
|||
private String map_object; // 映射实体,如付款单
|
|||
@ApiModelProperty("映射项目类别,如应付类别") |
|||
private String map_item; // 映射项目类别,如应付类别
|
|||
@ApiModelProperty("项目key,如002") |
|||
private String map_itemKey; // 项目key,如002
|
|||
@ApiModelProperty("项目value,如外采") |
|||
private String map_itemValue; // 项目value,如外采
|
|||
} |
@ -0,0 +1,285 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" v-show="formobj.carConditionValue == '问题未解决'" @click="handleSave()">提交</el-button> |
|||
<el-button type="success" size="small" v-show="formobj.carConditionValue == '正常'" @click="handlePass()">通过</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>车架号</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item><span>{{ formobj.vinNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>车型</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item><span>{{ formobj.model }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>车况</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-radio v-model="formobj.carConditionValue" label="正常">正常</el-radio> |
|||
<el-radio v-model="formobj.carConditionValue" label="问题未解决">存在问题</el-radio> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>巡检情况说明</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.situationExplain" style="width: 80%" type="textarea" resize="none" placeholder="对车辆外观、车辆状态、电瓶情况、箱内燃油情况等进行说明" :autosize="{ minRows: 2, maxRows: 10}" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="formobj.carConditionValue === '问题未解决'"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>存在问题</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.problems" style="width: 80%" type="textarea" resize="none" placeholder="" :autosize="{ minRows: 2, maxRows: 10}" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="formobj.carConditionValue === '问题未解决'"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>相关责任人</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<span>{{ formobj.liableName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>相关照片</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" v-model="list1" :limit="20" @change="backData" @fileChange="deleteData" bucket="map" :accept="accept" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/kucunguanli/polling' |
|||
import { fetchBySid } from '@/api/cheliang/dictcommons' |
|||
import upload from '../../../../components/uploadFile/upload_morebypicture' |
|||
|
|||
export default { |
|||
name: 'daixunjian', |
|||
components: { |
|||
upload |
|||
}, |
|||
data() { |
|||
return { |
|||
accept: '.jpg,.jpeg,.png,.JPG,.JPEG', |
|||
viewTitle: '巡检单-办理待巡检', |
|||
listLoading: false, |
|||
index: 0, |
|||
tableKey: 0, |
|||
list1: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
vinNo: '', |
|||
mainSid: '', |
|||
modelSid: '', |
|||
model: '', |
|||
situationExplain: '', |
|||
problems: '', |
|||
results: '', |
|||
carConditionValue: '', |
|||
carConditionKey: '', |
|||
warehouseSid: '', |
|||
warehouse: '', |
|||
liableName: '', |
|||
liableSid: '', |
|||
userSid: '', |
|||
userName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
newAdd: '', |
|||
images: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showEdit(row, createOrgSid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.formobj.vinNo = row.vinNo |
|||
this.formobj.mainSid = row.sid |
|||
this.formobj.model = row.model |
|||
this.formobj.warehouseSid = row.locationSid |
|||
this.formobj.warehouse = row.location |
|||
this.formobj.liableName = row.liableName |
|||
this.formobj.liableSid = row.liableSid |
|||
this.formobj.userName = window.sessionStorage.getItem('name') |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
this.formobj.createOrgSid = createOrgSid |
|||
this.formobj.newAdd = false |
|||
fetchBySid(createOrgSid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.useOrgName = resp.data.name |
|||
} |
|||
}) |
|||
console.log('编辑回显', row.sid) |
|||
}, |
|||
backData(val) { |
|||
const aa = [] |
|||
if (val.length > 0) { |
|||
for (var i = 0; i < val.length; i++) { |
|||
aa.push(val[i].url) |
|||
} |
|||
} |
|||
this.formobj.images = aa |
|||
}, |
|||
deleteData(val) { |
|||
const aa = [] |
|||
console.log(val) |
|||
if (val.length === 0) { |
|||
this.formobj.images = [] |
|||
this.list1 = [] |
|||
} else { |
|||
for (var i = 0; i < val.length; i++) { |
|||
aa.push(val[i].url) |
|||
} |
|||
this.formobj.images = aa |
|||
this.list1 = aa |
|||
} |
|||
}, |
|||
handleSave() { |
|||
// if (this.formobj.situationExplain === '') { |
|||
// this.$message({ showClose: true, type: 'error', message: '请填写巡检情况说明' }) |
|||
// return |
|||
// } |
|||
if (this.formobj.carConditionValue === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择车况' }) |
|||
return |
|||
} else if (this.formobj.carConditionValue === '问题未解决') { |
|||
this.formobj.carConditionKey = '001' |
|||
if (this.formobj.problems === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写存在问题' }) |
|||
return |
|||
} |
|||
if (this.formobj.images.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请上传相关照片' }) |
|||
return |
|||
} |
|||
} else { |
|||
this.formobj.carConditionKey = '003' |
|||
} |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
console.log(this.formobj) |
|||
req.saveInspection(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
handlePass() { |
|||
// if (this.formobj.situationExplain === '') { |
|||
// this.$message({ showClose: true, type: 'error', message: '请填写巡检情况说明' }) |
|||
// return |
|||
// } |
|||
console.log(this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.submitInspection(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
vinNo: '', |
|||
mainSid: '', |
|||
modelSid: '', |
|||
model: '', |
|||
situationExplain: '', |
|||
problems: '', |
|||
results: '', |
|||
carConditionValue: '', |
|||
carConditionKey: '', |
|||
warehouseSid: '', |
|||
warehouse: '', |
|||
liableName: '', |
|||
liableSid: '', |
|||
userSid: '', |
|||
userName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
newAdd: '', |
|||
images: [] |
|||
} |
|||
this.list1 = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,145 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>生成日常巡检报告</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handleSave()">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>车辆日常巡检报告</span></div> |
|||
<el-form ref="form_obj" :model="formobj" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>选择接收人</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="recipientList" filterable placeholder="请选择" multiple @change="changeUser"> |
|||
<el-option v-for="item in user_list" :key="item.userSid" :label="item.userName" :value="item.userSid"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item> |
|||
<span>本月应巡检{{ formobj.totalNumber }}台,实际巡检{{ formobj.actualNumber }}台</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item> |
|||
<span>其中存在的问题:{{ formobj.question }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getGressionUserList } from '@/api/cheliang/dictcommons' |
|||
import req from '@/api/kucunguanli/polling' |
|||
|
|||
export default { |
|||
name: 'xunjianbaogaoAdd', |
|||
data() { |
|||
return { |
|||
recipientList: [], |
|||
user_list: [], |
|||
formobj: { |
|||
actualNumber: '', |
|||
date: '', |
|||
question: '', |
|||
recipient: '', |
|||
totalNumber: '', |
|||
mainSid: '', |
|||
userSid: '', |
|||
list: [] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
init() { |
|||
getGressionUserList(window.sessionStorage.getItem('userSid')).then((resp) => { |
|||
if (resp.success) { |
|||
this.user_list = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
showAdd(row) { |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.formobj.mainSid = row.sid |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
req.getCarInspectionReport(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.totalNumber = resp.data.totalNumber |
|||
this.formobj.actualNumber = resp.data.actualNumber |
|||
this.formobj.question = resp.data.question |
|||
} |
|||
}) |
|||
}, |
|||
changeUser(value) { |
|||
this.recipientList = value |
|||
}, |
|||
handleSave() { |
|||
if (this.recipientList.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '选择接收人不能为空' }) |
|||
return |
|||
} else { |
|||
const aa = [] |
|||
for (var i = 0; i < this.recipientList.length; i++) { |
|||
for (var k = 0; k < this.user_list.length; k++) { |
|||
if (this.recipientList[i] === this.user_list[k].userSid) { |
|||
aa.push({ |
|||
liableName: this.user_list[k].userName, |
|||
liableSid: this.user_list[k].userSid |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
this.formobj.list = aa |
|||
} |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
req.sendReport(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
actualNumber: '', |
|||
date: '', |
|||
question: '', |
|||
recipient: '', |
|||
totalNumber: '', |
|||
mainSid: '', |
|||
userSid: '', |
|||
list: [] |
|||
} |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,81 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>查看日常巡检报告</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>车辆日常巡检报告</span></div> |
|||
<el-form ref="form_obj" :model="formobj" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>接收人</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ formobj.recipient }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>发送时间</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<span>{{ formobj.date }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item> |
|||
<span>本月应巡检{{ formobj.totalNumber }}台,实际巡检{{ formobj.actualNumber }}台</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item> |
|||
<span>其中存在的问题:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/kucunguanli/polling' |
|||
|
|||
export default { |
|||
name: 'xunjianbaogaoInfo', |
|||
data() { |
|||
return { |
|||
formobj: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.getCarInspectionReport(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn() { |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,245 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- Start 列表页面 --> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="日常巡检报告" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header" label-width="110px"> |
|||
<el-form-item label="生成日期"> |
|||
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="生成人"> |
|||
<el-input v-model="listQuery.params.createByName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">日常巡检报告列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed width="100" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" v-show="scope.row.showReportBtn" size="mini" @click="handleAdd(scope.row)">生成报告</el-button> |
|||
<el-button type="primary" v-show="!scope.row.showReportBtn" size="mini" @click="handleLook(scope.row)">查看报告</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="编号" width="120" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.billNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="生成日期" align="center" width="130"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createTime }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="生成人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.createByName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="应巡检(台次)" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.totalNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实巡检(台次)" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.actualNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="存在问题未处理(台次)" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.unHandledNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="存在问题已处理(台次)" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.processedNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="未巡检(台次)" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.notHandledNumber }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<xunjianbaogaoAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
|||
<xunjianbaogaoInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/kucunguanli/polling' |
|||
import xunjianbaogaoAdd from './xunjianbaogaoAdd' |
|||
import xunjianbaogaoInfo from './xunjianbaogaoInfo' |
|||
import { getPathSidByUserSid } from '@/api/cheliang/dictcommons' |
|||
|
|||
export default { |
|||
name: 'xunjianbaogoaguanli', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar, |
|||
xunjianbaogaoAdd, |
|||
xunjianbaogaoInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, |
|||
// 查询条件 ----------- |
|||
tableKey: 0, |
|||
list: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
listQuery: { |
|||
params: { |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
createByName: '', |
|||
createOrgSid: '' |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 加载列表 |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
init() { |
|||
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|||
if (res.success) { |
|||
this.listQuery.params.createOrgSid = res.data |
|||
this.getList() |
|||
} |
|||
}) |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.baogao(this.listQuery).then((response) => { |
|||
console.log('列表查询结果:', response) |
|||
this.listLoading = false |
|||
if (response.success && response.data && response.data.total > 0) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
handleReset() { |
|||
this.listQuery = { |
|||
params: { |
|||
createStartTime: '', |
|||
createEndTime: '', |
|||
createByName: '', |
|||
createOrgSid: '' |
|||
}, |
|||
current: 1, |
|||
size: 5, |
|||
total: 0 |
|||
} |
|||
this.init() |
|||
}, |
|||
handleAdd(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showAdd(row) |
|||
}, |
|||
handleLook(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
</style> |
@ -0,0 +1,252 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handlePass()">已解决</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>车架号</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item><span>{{ formobj.vinNo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>车型</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item><span>{{ formobj.model }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>巡检情况说明</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<span>{{ formobj.situationExplain }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>存在问题</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<span>{{ formobj.problems }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>处理结果</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.results" style="width: 80%" placeholder="" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>相关责任人</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<span>{{ formobj.liableName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>相关照片</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" v-model="list1" :limit="20" @change="backData" @fileChange="deleteData" bucket="map" :accept="accept" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/kucunguanli/polling' |
|||
import upload from '../../../../components/uploadFile/upload_morebypicture' |
|||
import { fetchBySid } from '@/api/cheliang/dictcommons' |
|||
|
|||
export default { |
|||
name: 'xunjianResovled', |
|||
components: { |
|||
upload |
|||
}, |
|||
data() { |
|||
return { |
|||
accept: '.jpg,.jpeg,.png,.JPG,.JPEG', |
|||
viewTitle: '巡检单-办理问题未解决', |
|||
listLoading: false, |
|||
index: 0, |
|||
tableKey: 0, |
|||
list1: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
vinNo: '', |
|||
mainSid: '', |
|||
modelSid: '', |
|||
model: '', |
|||
situationExplain: '', |
|||
problems: '', |
|||
results: '', |
|||
carConditionValue: '', |
|||
carConditionKey: '', |
|||
warehouseSid: '', |
|||
warehouse: '', |
|||
liableName: '', |
|||
liableSid: '', |
|||
userSid: '', |
|||
userName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
newAdd: '', |
|||
images: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showEdit(row, createOrgSid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.formobj.vinNo = row.vinNo |
|||
this.formobj.mainSid = row.sid |
|||
this.formobj.model = row.model |
|||
this.formobj.warehouseSid = row.locationSid |
|||
this.formobj.warehouse = row.location |
|||
this.formobj.liableName = row.liableName |
|||
this.formobj.liableSid = row.liableSid |
|||
this.formobj.situationExplain = row.situationExplain |
|||
this.formobj.problems = row.problems |
|||
this.formobj.userName = window.sessionStorage.getItem('name') |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
this.formobj.createOrgSid = createOrgSid |
|||
this.formobj.newAdd = false |
|||
if (row.images.length > 0) { |
|||
row.images.forEach((e) => { |
|||
this.list1.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
fetchBySid(createOrgSid).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.useOrgName = resp.data.name |
|||
} |
|||
}) |
|||
console.log('编辑回显', this.list1) |
|||
}, |
|||
backData(val) { |
|||
const aa = [] |
|||
if (val.length > 0) { |
|||
for (var i = 0; i < val.length; i++) { |
|||
aa.push(val[i].url) |
|||
} |
|||
} |
|||
this.formobj.images = aa |
|||
}, |
|||
deleteData(val) { |
|||
const aa = [] |
|||
console.log(val) |
|||
if (val.length === 0) { |
|||
this.formobj.images = [] |
|||
this.list1 = [] |
|||
} else { |
|||
for (var i = 0; i < val.length; i++) { |
|||
aa.push(val[i].url) |
|||
} |
|||
this.formobj.images = aa |
|||
this.list1 = aa |
|||
} |
|||
}, |
|||
handlePass() { |
|||
// if (this.formobj.situationExplain === '') { |
|||
// this.$message({ showClose: true, type: 'error', message: '请填写巡检情况说明' }) |
|||
// return |
|||
// } |
|||
console.log(this.formobj) |
|||
this.formobj.carConditionValue = '问题已解决' |
|||
this.formobj.carConditionKey = '002' |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.submitInspection(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
// 表单数据 |
|||
this.formobj = { |
|||
vinNo: '', |
|||
mainSid: '', |
|||
modelSid: '', |
|||
model: '', |
|||
situationExplain: '', |
|||
problems: '', |
|||
results: '', |
|||
carConditionValue: '', |
|||
carConditionKey: '', |
|||
warehouseSid: '', |
|||
warehouse: '', |
|||
liableName: '', |
|||
liableSid: '', |
|||
userSid: '', |
|||
userName: '', |
|||
createOrgSid: '', |
|||
useOrgName: '', |
|||
newAdd: '', |
|||
images: [] |
|||
} |
|||
this.list1 = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
|||
|
Loading…
Reference in new issue