9 changed files with 757 additions and 665 deletions
@ -1,336 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>XXX合同详情</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|
||||
<el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> |
|
||||
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class=""> |
|
||||
<div class="titwu">XXX合同</div> |
|
||||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd"> |
|
||||
<el-row class="bordertopline"> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">合同类型</span> |
|
||||
<span>{{ temp.contractType }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">合同编号</span> |
|
||||
<span>{{ temp.contractNo }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">甲方名称</span> |
|
||||
<span>{{ temp.partyA }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">乙方名称</span> |
|
||||
<span>{{ temp.partyB }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">其他方名称</span> |
|
||||
<span>{{ temp.partyC }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">签订日期</span> |
|
||||
<span>{{ temp.createDate }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">签订地点</span> |
|
||||
<span>{{ temp.address }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">合同金额</span> |
|
||||
<span>{{ temp.contractAmount }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">订金</span> |
|
||||
<span>{{ temp.deposit }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :span="12"> |
|
||||
<el-form-item> |
|
||||
<span slot="label">备注</span> |
|
||||
<span>{{ temp.remarks }}</span> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<div class="title">新车买卖合同</div> |
|
||||
<el-row> |
|
||||
|
|
||||
</el-row> |
|
||||
<div class="title">现场签署照片</div> |
|
||||
<el-row> |
|
||||
|
|
||||
</el-row> |
|
||||
<div class="title">证件照片</div> |
|
||||
<el-row> |
|
||||
|
|
||||
</el-row> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
<!-- 选择待办人 的弹出框--> |
|
||||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|
||||
<el-form class="formadd" > |
|
||||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|
||||
<el-col :span="4" class="tleftb"> |
|
||||
<span>当前环节:</span> |
|
||||
</el-col> |
|
||||
<el-col :span="20"> |
|
||||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<el-row :class="{rowClass:!currentLink}"> |
|
||||
<el-col :span="4" class="tleftb"> |
|
||||
<span>意见:</span> |
|
||||
</el-col> |
|
||||
<el-col :span="20"> |
|
||||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item> |
|
||||
</el-col> |
|
||||
</el-row> |
|
||||
<div style="text-align:center;margin-top: 20px;"> |
|
||||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|
||||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|
||||
</div> |
|
||||
</el-form> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { |
|
||||
breakProcess, |
|
||||
complete, |
|
||||
getNextNodesForSubmit, |
|
||||
getOneContract, |
|
||||
getPreviousNodesForReject, |
|
||||
reject |
|
||||
} from '@/api/jichuxinxi/contract' |
|
||||
|
|
||||
export default { |
|
||||
name: 'HeTongDangAnDaiBanInfo', |
|
||||
data() { |
|
||||
return { |
|
||||
temp: {}, |
|
||||
list2: [], |
|
||||
list3: [], |
|
||||
list1: [], |
|
||||
operation: '', // 点击操作按钮 |
|
||||
dialogList: { |
|
||||
comment: '' |
|
||||
}, |
|
||||
current: { |
|
||||
taskDefKey: '', |
|
||||
taskName: '' // 当前环节名称 |
|
||||
}, |
|
||||
nextNode: {}, // 下一环节 |
|
||||
nodeDialogVisible: false, |
|
||||
currentLink: true, |
|
||||
// 环节所需参数 |
|
||||
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.current.taskDefKey = obj.taskDefKey |
|
||||
this.current.taskName = obj.taskName |
|
||||
// 加载表单数据 |
|
||||
this.showInfo(obj.businessSid) |
|
||||
}, |
|
||||
mounted() { |
|
||||
window.parent.postMessage({ |
|
||||
cmd: 'returnHeight', |
|
||||
params: { |
|
||||
// 告诉父级页面,子页面的弹框高度。 |
|
||||
code: 2, |
|
||||
data: 450 + 'px' |
|
||||
} |
|
||||
}, '*') |
|
||||
}, |
|
||||
methods: { |
|
||||
showInfo(sid) { |
|
||||
getOneContract(sid).then((res) => { |
|
||||
if (res.success) { |
|
||||
this.formobj = res.data |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
// 同意 |
|
||||
openAgree(val) { |
|
||||
this.operation = val |
|
||||
this.currentLink = true |
|
||||
this.dialogList.comment = '同意' |
|
||||
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => { |
|
||||
if (resp.success) { |
|
||||
var arr = resp.data |
|
||||
this.nextNode = arr[0] |
|
||||
this.nodeDialogVisible = true |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
// 驳回 |
|
||||
openReject(val) { |
|
||||
this.operation = val |
|
||||
this.currentLink = true |
|
||||
this.dialogList.comment = '' |
|
||||
getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => { |
|
||||
if (resp.success) { |
|
||||
var arr = resp.data |
|
||||
this.nextNode = arr[0] |
|
||||
this.nodeDialogVisible = true |
|
||||
} |
|
||||
this.submitdisabled = false |
|
||||
}) |
|
||||
}, |
|
||||
// 终止 |
|
||||
openStop(val) { |
|
||||
this.operation = val |
|
||||
this.currentLink = false |
|
||||
this.dialogList.comment = '' |
|
||||
this.nodeDialogVisible = true |
|
||||
}, |
|
||||
reject() { |
|
||||
if (this.operation === '同意') { |
|
||||
this.handleAgree() |
|
||||
} else if (this.operation === '驳回') { |
|
||||
if (this.dialogList.comment === '') { |
|
||||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|
||||
} else { |
|
||||
this.handleReject() |
|
||||
} |
|
||||
} else if (this.operation === '终止') { |
|
||||
if (this.dialogList.comment === '') { |
|
||||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|
||||
} else { |
|
||||
this.handleStop() |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
/** 同意任务 */ |
|
||||
handleAgree() { |
|
||||
this.linkByParameter.comment = this.dialogList.comment |
|
||||
complete(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 |
|
||||
} |
|
||||
}, '*') |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
/** 驳回任务 */ |
|
||||
handleReject() { |
|
||||
this.linkByParameter.comment = this.dialogList.comment |
|
||||
reject(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 |
|
||||
} |
|
||||
}, '*') |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
/** 终止任务 */ |
|
||||
handleStop() { |
|
||||
this.linkByParameter.comment = this.dialogList.comment |
|
||||
breakProcess(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> |
|
||||
.imgcontent { |
|
||||
display: inline-block; |
|
||||
} |
|
||||
.titwu { |
|
||||
font-size: 28px; |
|
||||
text-align: center; |
|
||||
padding: 30px 0 20px 0; |
|
||||
} |
|
||||
</style> |
|
@ -1,13 +1,318 @@ |
|||||
<template> |
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleCreate()">保存</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSubmit()">提交</el-button> |
||||
|
<el-button type="primary" size="small">预览</el-button> |
||||
|
<el-button type="primary" size="small">打印</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=""> |
||||
|
<div class="titwu">合同审核</div> |
||||
|
<el-form ref="temp_obj" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="contractNo"> |
||||
|
<span slot="label">合同编号</span> |
||||
|
<el-input v-model="temp.contractNo" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="contractType"> |
||||
|
<span slot="label">合同类型</span> |
||||
|
<el-select v-model="temp.contractType" placeholder="请选择" filterable class="addinputw" @change="typeChange"> |
||||
|
<el-option v-for="item in typeList" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="partyA"> |
||||
|
<span slot="label">甲方名称</span> |
||||
|
<el-input v-model="temp.partyA" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="partyB"> |
||||
|
<span slot="label">乙方名称</span> |
||||
|
<el-input v-model="temp.partyB" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="partyC"> |
||||
|
<span slot="label">其他方名称</span> |
||||
|
<el-input v-model="temp.partyC" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="createDate"> |
||||
|
<span slot="label">签订日期</span> |
||||
|
<el-date-picker v-model="temp.createDate" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable placeholder="选择日期" class="addinputw"/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="address"> |
||||
|
<span slot="label">签订地点</span> |
||||
|
<el-input v-model="temp.address" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="contractAmount"> |
||||
|
<span slot="label">合同金额</span> |
||||
|
<el-input v-model="temp.contractAmount" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item prop="deposit"> |
||||
|
<span slot="label">订金</span> |
||||
|
<el-input v-model="temp.deposit" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<el-form-item> |
||||
|
<span slot="label">备注</span> |
||||
|
<el-input v-model="temp.remarks" placeholder="" class="addinputw" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title">新车买卖合同</div> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<Upload ref="imgUpload" v-model="list1" bucket="map" :upload-data="{type:'0001'}"/> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title">现场签署照片</div> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<Upload ref="imgUpload" v-model="list2" bucket="map" :upload-data="{type:'0001'}"/> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title">证件照片</div> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div v-show="temp.idCardArchives == true"> |
||||
|
<el-image style="width: 178px;height: 178px;" v-for="(item,index) in temp.list3" :key="index" :src="item" :preview-src-list="temp.list3"></el-image> |
||||
|
</div> |
||||
|
<div v-show="temp.idCardArchives !== true"> |
||||
|
<Upload ref="imgUpload" v-model="list3" :limit="1" bucket="map" :upload-data="{type:'0001'}"/> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<!-- <el-dialog style="margin-top: -15vh!important;" width="60%" :append-to-body="true" :visible.sync="contractPdfView" title="合同">--> |
||||
|
<!-- <embed id="plugin" width="100%" height="600" name="plugin" :src="contractPdf" type="application/pdf" internalinstanceid="119">--> |
||||
|
<!-- </el-dialog>--> |
||||
|
</div> |
||||
|
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
|
import { getOneContract, updateContract, submitVehicleApply } from '@/api/jichuxinxi/contract' |
||||
|
import Upload from '@/components/uploadFile/upload.vue' // 上传文件 |
||||
|
import { typeValues } from '@/api/dictcommons/dictcommons' |
||||
|
|
||||
export default { |
export default { |
||||
name: 'HeTongDangAnEdit' |
name: 'HetongdanganEdit', |
||||
|
components: { Upload }, |
||||
|
data() { |
||||
|
return { |
||||
|
submitdisabled: false, // 提交按钮、保存按钮 |
||||
|
viewTitle: '', |
||||
|
// 图片上传 |
||||
|
dialogImageUrl: '', |
||||
|
dialogVisible: false, |
||||
|
typeList: [], |
||||
|
list1: [], |
||||
|
list2: [], |
||||
|
list3: [], |
||||
|
contractPdf: '', |
||||
|
visible: false, |
||||
|
file_list: { |
||||
|
attachType: '0001', |
||||
|
linkSid: '' |
||||
|
}, |
||||
|
contractPdfView: false, |
||||
|
temp: { |
||||
|
sid: '', |
||||
|
address: '', |
||||
|
contractAmount: '', |
||||
|
contractNo: '', |
||||
|
contractSid: '', |
||||
|
contractType: '', |
||||
|
contractTypeKey: '', |
||||
|
createDate: '', |
||||
|
customerKey: '', |
||||
|
customerSid: '', |
||||
|
deposit: '', |
||||
|
idCardArchives: false, |
||||
|
num: '', |
||||
|
oneDeposit: '', |
||||
|
partyA: '', |
||||
|
partyB: '', |
||||
|
partyC: '', |
||||
|
remarks: '', |
||||
|
price: '', |
||||
|
procInsId: '', |
||||
|
taskId: '', |
||||
|
userSid: '', |
||||
|
staffName: '', |
||||
|
contractImages: [], |
||||
|
siteSigImages: [], |
||||
|
idCardImages: [] |
||||
|
}, |
||||
|
rules: { |
||||
|
contractType: [{ required: true, message: '合同类型不能为空', trigger: 'change' }], |
||||
|
contractNo: [{ required: true, message: '合同编号不能为空', trigger: 'blur' }], |
||||
|
address: [{ required: true, message: '签订地点不能为空', trigger: 'blur' }], |
||||
|
contractAmount: [{ required: true, message: '合同金额不能为空', trigger: 'blur' }], |
||||
|
createDate: [{ required: true, message: '签订日期不能为空', trigger: 'blur' }] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
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)) |
||||
|
this.showInfo(obj.businessSid) |
||||
|
}, |
||||
|
mounted() { |
||||
|
window.parent.postMessage({ |
||||
|
cmd: 'returnHeight', |
||||
|
params: { |
||||
|
// 告诉父级页面,子页面的弹框高度。 |
||||
|
code: 2, |
||||
|
data: 450 + 'px' |
||||
|
} |
||||
|
}, '*') |
||||
|
}, |
||||
|
methods: { |
||||
|
// 合同类型 |
||||
|
init() { |
||||
|
typeValues({ type: 'contractType' }).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.typeList = response.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
showInfo(row) { |
||||
|
this.init() |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['temp_obj'].clearValidate() |
||||
|
}) |
||||
|
this.viewTitle = '【编辑】合同审核' |
||||
|
getOneContract(row).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.temp = res.data |
||||
|
if (this.temp.contractImages.length > 0) { |
||||
|
this.temp.contractImages.forEach((e) => { |
||||
|
this.list1.push({ |
||||
|
name: '', |
||||
|
filePath: e, |
||||
|
url: e |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
if (this.temp.siteSigImages.length > 0) { |
||||
|
this.temp.siteSigImages.forEach((e) => { |
||||
|
this.list2.push({ |
||||
|
name: '', |
||||
|
filePath: e, |
||||
|
url: e |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
if (this.temp.idCardImages.length > 0) { |
||||
|
this.temp.idCardImages.forEach((e) => { |
||||
|
this.list3.push({ |
||||
|
name: '', |
||||
|
filePath: e, |
||||
|
url: e |
||||
|
}) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
typeChange(val) { |
||||
|
const choose = this.typeList.filter((item) => item.dictValue === val) |
||||
|
if (choose.length > 0) { |
||||
|
this.temp.contractTypeKey = choose[0].dictKey |
||||
|
} |
||||
|
}, |
||||
|
// 添加数据 |
||||
|
handleCreate() { |
||||
|
this.$refs['temp_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.getUrl() |
||||
|
this.submitdisabled = true |
||||
|
updateContract(this.temp).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 保存并提交、更新 |
||||
|
handleSubmit() { |
||||
|
this.$refs['temp_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.getUrl() |
||||
|
this.submitdisabled = true |
||||
|
submitVehicleApply(this.temp).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getUrl() { |
||||
|
if (this.list1.length > 0) { |
||||
|
const cc = [] |
||||
|
for (var i = 0; i < this.list1.length; i++) { |
||||
|
cc.push(this.list1[i].url) |
||||
|
} |
||||
|
this.temp.contractImages = cc |
||||
|
} |
||||
|
if (this.list2.length > 0) { |
||||
|
const bb = [] |
||||
|
for (var k = 0; k < this.list2.length; k++) { |
||||
|
bb.push(this.list2[k].url) |
||||
|
} |
||||
|
this.temp.siteSigImages = bb |
||||
|
} |
||||
|
if (this.list3.length > 0) { |
||||
|
const aa = [] |
||||
|
for (var p = 0; p < this.list3.length; p++) { |
||||
|
aa.push(this.list3[p].url) |
||||
|
} |
||||
|
this.temp.idCardImages = aa |
||||
|
} |
||||
|
} |
||||
|
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
<style scoped> |
||||
|
|
||||
</style> |
</style> |
||||
|
Loading…
Reference in new issue