You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

254 lines
9.1 KiB

<template>
<div class="app-container">
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<div class="titwu">交车确认</div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="8">
<div class="span-sty"><span>合同编号</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty"><span>客户名称</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span>接收人</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.recipient }}</span></el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty"><span>身份证号</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.idNo }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span>交付日期</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.deliverDate }}</span></el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty"><span>交付地点</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.deliverAddress }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty"><span>备注</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty"><span>车型</span></div>
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
交付车辆信息
</div>
<el-table :key="tableKey" :data="formobj.carList" :index="index" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="交车照片" align="center">
<template slot-scope="scope">
<span class="bluezi" v-show="scope.row.deliveryImages.length > 0" @click="handleLook(scope.row.deliveryImages)">查看</span>
</template>
</el-table-column>
<el-table-column label="保单" align="center">
<template slot-scope="scope">
<span class="bluezi" v-show="scope.row.policyImages.length > 0" @click="handleLook(scope.row.policyImages)">查看</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>接收车辆确认书</span></div>
<el-form-item>
<el-image class="addinputInfo" style="height: 178px;width: 178px" v-for="(item, index) in formobj.receiveCarImages" :key="index" :src="item" :preview-src-list="formobj.receiveCarImages"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>委托提车授权书及委托人身份证</span></div>
<el-form-item>
<el-image class="addinputInfo" style="height: 178px;width: 178px" v-for="(item, index) in formobj.entrustImages" :key="index" :src="item" :preview-src-list="formobj.receiveCarImages"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>交车资料确认单</span></div>
<el-form-item>
<el-image class="addinputInfo" style="height: 178px;width: 178px" v-for="(item, index) in formobj.entrustConfirmImages" :key="index" :src="item" :preview-src-list="formobj.receiveCarImages"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>出门证照片</span></div>
<el-form-item>
<el-image class="addinputInfo" style="height: 178px;width: 178px" v-for="(item, index) in formobj.exitTicketImages" :key="index" :src="item" :preview-src-list="formobj.receiveCarImages"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 交车照片、保单上传 -->
<el-dialog :visible.sync="dialogVisible">
<el-image v-for="(item, index) in image_list" :key="index" :src="item" :preview-src-list="image_list"/>
</el-dialog>
</div>
</template>
<script>
import { fetchDetailsBySid, revokeProcess } from '@/api/jiaochebanli/cardelivery'
export default {
name: 'DeliveryconfirmationYiBanInfo',
data() {
return {
viewTitle: '',
dialogVisible: false,
tableKey: 0,
index: 0,
image_list: [],
formobj: {
sid: '',
contractNo: '',
deliverDate: '',
modelName: '',
customerName: '',
idNo: '',
deliverAddress: '',
recipient: '',
remarks: '',
carList: [],
receiveCarImages: [],
entrustImages: [],
entrustConfirmImages: [],
exitTicketImages: [],
userSid: '',
orgSidPath: '',
procInsId: '',
taskId: ''
},
rules: {},
// 环节所需参数
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
// 点击(同意、终止、驳回、驳回)操作时所需的参数
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
// 加载表单数据
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
// 告诉父级页面,子页面的弹框高度。
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
fetchDetailsBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
handleLook(row) {
this.dialogVisible = true
this.image_list = row
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
// 子页面向父级页面传递值
window.parent.postMessage({
cmd: 'returnHeight',
params: {
// 操作成功,告诉父级页面关闭弹框
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.span-sty {
width: 150px !important;
}
.addinputInfo {
margin-left: 140px !important;
}
</style>