
13 changed files with 2099 additions and 140 deletions
@ -0,0 +1,87 @@ |
|||
<template> |
|||
<div> |
|||
<!-- 此上传模板支持多文件上传--> |
|||
<el-upload action="" :data="datas" :accept="accept" :on-change="handleChange" :on-remove="handleRemove" :file-list="fileList_FuJian" :http-request="uploadSectionFile" :show-file-list="showfile" multiple> |
|||
<el-button size="small" type="primary">选择文件</el-button> |
|||
<div slot="tip" v-show="reminder == true" class="el-upload__tip">单个文件大小不允许超过100M,支持上传文件类型: {{ accept }}</div> |
|||
</el-upload> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { upload } from '@/api/business/beiAn' |
|||
|
|||
export default { |
|||
props: { |
|||
placeholder: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
// 由父组件根据不同需求传参数,设置接受上传的文件类型 |
|||
accept: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
// 设置提示内容能否展示 |
|||
reminder: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
// 设置是否显示已上传文件列表 |
|||
showfile: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
datas: null, |
|||
name: null, |
|||
accessToken: {}, |
|||
fileList_FuJian: [], |
|||
enclosure: '', |
|||
file_add: '', |
|||
idsz: '', |
|||
file_catch: '', |
|||
files_list: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
show(val) { |
|||
this.fileList_FuJian = [] |
|||
this.fileList_FuJian = val |
|||
}, |
|||
handleChange(file, fileList) { |
|||
}, |
|||
handleRemove(file, fileList) { |
|||
this.$emit('handleRemove', file) |
|||
}, |
|||
// 上传文件 FrontPhoto |
|||
uploadSectionFile(params) { |
|||
const file = params.file |
|||
// 根据后台需求数据格式 |
|||
const form = new FormData() |
|||
// 文件对象 |
|||
form.append('file', file) |
|||
// 项目封装的请求方法,下面做简单介绍 |
|||
upload(form).then((res) => { |
|||
// 自行处理各种情况 |
|||
if (res.success) { |
|||
this.$emit('handleSuccess', res) |
|||
} |
|||
if (res.msg === '操作成功') { |
|||
this.$message({ |
|||
message: '上传成功!', |
|||
type: 'success' |
|||
}) |
|||
} |
|||
}).catch((err) => { |
|||
console.log(err) |
|||
// 如果等于备案,就调备案图片上传接口 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped></style> |
@ -0,0 +1,393 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listadd"> |
|||
<div class="wlInfo"><span>公司申请入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top" class="formadd"> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="合同编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.contractNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applyDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="客户名称:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.customerName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">开票信息</div> |
|||
<div> |
|||
<span style="margin-right: 10px">单台开票金额:{{ formobj.oneBillMoney }} </span> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.VIN }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票类型" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.billTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票名称" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.billName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票金额合计"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ formobj.totalBillMoney }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="是否延迟开票"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ formobj.isDelayBill == '1' ? '是' : '否' }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ formobj.remarks }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票状态"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
{{ formobj.billState }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="headline"> |
|||
<div style="margin-left: 5px;font-weight: bold">所附资料附件</div> |
|||
</div> |
|||
<el-table :key="fileKey" :data="finfile_list" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="附件名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi" @click="handlook(scope.row)">{{ scope.row.fileName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传时间" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadTime }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<el-dialog :visible.sync="dialogVisible" width="70%"> |
|||
<el-carousel :interval="4000" type="card"> |
|||
<el-carousel-item v-for="(item, index) in file_list" :key="index"> |
|||
<img style="width: 100%; height: 100%" :src="item.filePath" @click="handImg(item.filePath)"/> |
|||
</el-carousel-item> |
|||
</el-carousel> |
|||
</el-dialog> |
|||
<el-dialog :visible.sync="dialogVisibleFile"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { fetchDetailsBySid, fetchFileBySid } from '@/api/zhengchangkaipiao/openTicket.js' |
|||
export default { |
|||
name: 'zhengchangkaipiaoInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
dialogVisible: false, |
|||
dialogVisibleFile: false, |
|||
dialogImageUrl: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
fileKey: 1, |
|||
file_list: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
staffSid: window.sessionStorage.getItem('staffSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
contractNo: '', |
|||
contractSid: '', |
|||
customerName: '', |
|||
customerSid: '', |
|||
oneBillMoney: '', |
|||
totalBillMoney: '', |
|||
billAppPublicSid: '', |
|||
billState: '', |
|||
procDefId: '', |
|||
nodeSid: '', |
|||
procInstSid: '', |
|||
isDelayBill: '', |
|||
applyDate: '', |
|||
remarks: '', |
|||
finBillVehicles: [], |
|||
khkpsqsApplicationAppendxs: [], // 客户开票申请书附件信息 |
|||
kpxxqrsApplicationAppendxs: [], // 开票信息确认书附件信息 |
|||
cldjhtApplicationAppendxs: [] // 车辆登记合同附件信息 |
|||
}, |
|||
finfile_list: [ |
|||
{ |
|||
fileName: '《客户开票申请书》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
}, |
|||
{ |
|||
fileName: '《开票信息确认书》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
}, |
|||
{ |
|||
fileName: '《车辆登记合同》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
} |
|||
], |
|||
currentDate: '', |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row) { |
|||
this.viewTitle = '公司开票申请' |
|||
fetchFileBySid({ billAppSid: row.sid, fileType: '《客户开票申请书》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.khkpsqsApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchFileBySid({ billAppSid: row.sid, fileType: '《开票信息确认书》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.kpxxqrsApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchFileBySid({ billAppSid: row.sid, fileType: '《车辆登记合同》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.cldjhtApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchDetailsBySid(row.sid).then((resp) => { |
|||
if (resp.success) { |
|||
console.log(resp.data) |
|||
this.formobj.sid = row.sid |
|||
this.formobj.contractNo = resp.data.contractNo |
|||
this.formobj.contractSid = resp.data.contractSid |
|||
this.formobj.customerName = resp.data.customerName |
|||
this.formobj.customerSid = resp.data.customerSid |
|||
this.formobj.oneBillMoney = resp.data.oneBillMoney |
|||
this.formobj.totalBillMoney = resp.data.totalBillMoney |
|||
this.formobj.billAppPublicSid = resp.data.billAppPublicSid |
|||
this.formobj.billState = resp.data.billState |
|||
this.formobj.isDelayBill = resp.data.isDelayBill |
|||
this.formobj.remarks = resp.data.remarks |
|||
if (resp.data.applyDate === '') { |
|||
this.formobj.applyDate = this.currentDate |
|||
} else { |
|||
this.formobj.applyDate = resp.data.applyDate |
|||
} |
|||
this.formobj.finBillVehicles = resp.data.finBillVehicles |
|||
if (resp.data.finBillFileVos.length > 0) { |
|||
for (var i = 0; i < resp.data.finBillFileVos.length; i++) { |
|||
if (resp.data.finBillFileVos[i].fileType === '《客户开票申请书》') { |
|||
this.finfile_list[0].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[0].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} else if (resp.data.finBillFileVos[i].fileType === '《开票信息确认书》') { |
|||
this.finfile_list[1].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[1].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} else if (resp.data.finBillFileVos[i].fileType === '《车辆登记合同》') { |
|||
this.finfile_list[2].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[2].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
handlook(row) { |
|||
this.dialogVisible = true |
|||
this.file_list = [] |
|||
if (row.fileName === '《客户开票申请书》') { |
|||
if (this.formobj.khkpsqsApplicationAppendxs.length > 0) { |
|||
for (var i = 0; i < this.formobj.khkpsqsApplicationAppendxs.length; i++) { |
|||
if (this.formobj.khkpsqsApplicationAppendxs[i].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.khkpsqsApplicationAppendxs[i].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} else if (row.fileName === '《开票信息确认书》') { |
|||
if (this.formobj.kpxxqrsApplicationAppendxs.length > 0) { |
|||
for (var a = 0; a < this.formobj.kpxxqrsApplicationAppendxs.length; a++) { |
|||
if (this.formobj.kpxxqrsApplicationAppendxs[a].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.kpxxqrsApplicationAppendxs[a].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} else { |
|||
if (this.formobj.cldjhtApplicationAppendxs.length > 0) { |
|||
for (var b = 0; b < this.formobj.cldjhtApplicationAppendxs.length; b++) { |
|||
if (this.formobj.cldjhtApplicationAppendxs[b].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.cldjhtApplicationAppendxs[b].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} |
|||
}, |
|||
handImg(val) { |
|||
this.dialogVisibleFile = true |
|||
this.dialogImageUrl = val |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn() { |
|||
this.formobj = { |
|||
sid: '', |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
staffSid: window.sessionStorage.getItem('staffSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
contractNo: '', |
|||
contractSid: '', |
|||
customerName: '', |
|||
customerSid: '', |
|||
oneBillMoney: '', |
|||
totalBillMoney: '', |
|||
billAppPublicSid: '', |
|||
billState: '', |
|||
procDefId: '', |
|||
nodeSid: '', |
|||
procInstSid: '', |
|||
isDelayBill: '', |
|||
applyDate: '', |
|||
remarks: '', |
|||
finBillVehicles: [], |
|||
khkpsqsApplicationAppendxs: [], // 客户开票申请书附件信息 |
|||
kpxxqrsApplicationAppendxs: [], // 开票信息确认书附件信息 |
|||
cldjhtApplicationAppendxs: [] // 车辆登记合同附件信息 |
|||
} |
|||
this.file_list = [] |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.linetwo { |
|||
border-left: 0px; |
|||
border-right: 0px; |
|||
} |
|||
.linetwo .el-col{ |
|||
border: 0; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 45px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.headline{ |
|||
height: 40px; |
|||
padding: 10px; |
|||
font-weight: bold; |
|||
background-color: #0294d7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
} |
|||
.listadd{ |
|||
margin-left: 14px; |
|||
margin-right: 14px; |
|||
} |
|||
</style> |
@ -0,0 +1,583 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submitVehicleApply()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listadd"> |
|||
<div class="wlInfo"><span>公司申请入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top" class="formadd"> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="合同编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.contractNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applyDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="客户名称:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.customerName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">开票信息</div> |
|||
<div style="display: flex;justify-content: flex-start;align-items: center"> |
|||
<span style="width: 150px">单台开票金额: </span> |
|||
<el-input v-show="formobj.oneBillState !=='0'" v-model="formobj.oneBillMoney" readonly @keyup.native="UpNumber" @keydown.native="UpNumber" style="padding: 5px;" placeholder="" clearable></el-input> |
|||
<el-input v-show="formobj.oneBillState =='0'" v-model="formobj.oneBillMoney" @keyup.native="UpNumber" @keydown.native="UpNumber" style="padding: 5px;" placeholder="" clearable></el-input> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.VIN }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票类型" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.billTypeKey" placeholder="请选择" filterable clearable> |
|||
<el-option v-for="item in billType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票名称" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.billName" placeholder="请选择" @change="changeBillName($event, scope.row)" filterable clearable> |
|||
<el-option v-for="item in billName_list" :key="item.sid" :label="item.orgName" :value="item.sid"/> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票金额合计"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
{{ NumberMul() }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="是否延迟开票"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-radio-group v-model="formobj.isDelayBill"> |
|||
<el-radio :label="1">是</el-radio> |
|||
<el-radio :label="0">否</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票状态"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
{{ formobj.billState }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="headline"> |
|||
<div style="margin-left: 5px;font-weight: bold">所附资料附件</div> |
|||
</div> |
|||
<el-table :key="fileKey" :data="finfile_list" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div class="balanceStyle"> |
|||
<upload :accept="accept" ref="divUpload" :reminder="false" :showfile="false" @handleSuccess="filesAdd($event, scope.row)" @handleRemove="filesRemove" /> |
|||
<el-button type="danger" size="small" @click="handDelete(scope.row)">删除</el-button> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="附件名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi" @click="handlook(scope.row)">{{ scope.row.fileName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传时间" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadTime }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<el-dialog :visible.sync="dialogVisible" width="70%"> |
|||
<el-carousel :interval="4000" type="card"> |
|||
<el-carousel-item v-for="(item, index) in file_list" :key="index"> |
|||
<img style="width: 100%; height: 100%" :src="item.filePath" @click="handImg(item.filePath)"/> |
|||
</el-carousel-item> |
|||
</el-carousel> |
|||
</el-dialog> |
|||
<el-dialog :visible.sync="dialogVisibleFile"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { save, dataDictionary, fetchDetailsBySid, submitFinBillApplication, namesDown, fetchFileBySid } from '@/api/zhengchangkaipiao/openTicket.js' |
|||
import upload from '@/components/uploadFile/multifileUpload.vue' |
|||
export default { |
|||
name: 'zhengchangkaipiaoEdit', |
|||
components: { |
|||
upload |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
dialogVisible: false, |
|||
dialogVisibleFile: false, |
|||
dialogImageUrl: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
fileKey: 1, |
|||
file_list: [], |
|||
billType_list: [], |
|||
billName_list: [], |
|||
accept: '.jpg,.jpeg,.png,.JPG,.JPEG,.PNG', |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
staffSid: window.sessionStorage.getItem('staffSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
contractNo: '', |
|||
contractSid: '', |
|||
customerName: '', |
|||
customerSid: '', |
|||
oneBillMoney: '', |
|||
oneBillState: '', |
|||
totalBillMoney: '', |
|||
billAppPublicSid: '', |
|||
billState: '', |
|||
procDefId: '', |
|||
nodeSid: '', |
|||
procInstSid: '', |
|||
isDelayBill: '', |
|||
applyDate: '', |
|||
remarks: '', |
|||
businessSid: '', // 业务sid |
|||
instanceId: '', // 流程id |
|||
taskId: '', // 环节id |
|||
finBillVehicles: [], |
|||
khkpsqsApplicationAppendxs: [], // 客户开票申请书附件信息 |
|||
kpxxqrsApplicationAppendxs: [], // 开票信息确认书附件信息 |
|||
cldjhtApplicationAppendxs: [] // 车辆登记合同附件信息 |
|||
}, |
|||
finfile_list: [ |
|||
{ |
|||
fileName: '《客户开票申请书》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
}, |
|||
{ |
|||
fileName: '《开票信息确认书》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
}, |
|||
{ |
|||
fileName: '《车辆登记合同》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
} |
|||
], |
|||
currentDate: '', |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
this.DataDictionary() |
|||
console.log('url:' + window.location.href) |
|||
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|||
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|||
const info = window.location.href.slice(a, b) |
|||
var sid = info.substr(info.indexOf('=') + 1) |
|||
this.showInfo(sid) |
|||
// ===获取参数 |
|||
var one = window.location.href.lastIndexOf('#') + 1 |
|||
var two = window.location.href.lastIndexOf('}') + 1 |
|||
const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用 |
|||
var tar = data.substr(data.indexOf('=') + 1) |
|||
const obj = JSON.parse(tar) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 同意列表 |
|||
this.formobj.businessSid = sid |
|||
this.formobj.instanceId = obj.instanceId |
|||
this.formobj.taskId = obj.taskId |
|||
}, |
|||
methods: { |
|||
// 数据字典加载 |
|||
DataDictionary() { |
|||
dataDictionary({ type: 'invoiceType' }).then((res) => { |
|||
if (res.success) { |
|||
this.billType_list = res.data |
|||
} |
|||
}) |
|||
namesDown().then((res) => { |
|||
if (res.success) { |
|||
this.billName_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
// 开票金额合计(车辆数乘以单台开票金额) |
|||
NumberMul() { |
|||
var arg1 = parseFloat(this.formobj.finBillVehicles.length) |
|||
var arg2 = parseFloat(this.formobj.oneBillMoney) |
|||
var m = 0 |
|||
var s1 = arg1.toString() |
|||
var s2 = arg2.toString() |
|||
try { |
|||
m += s1.split('.')[1].length |
|||
} catch (e) { |
|||
console.log(e) |
|||
} |
|||
try { |
|||
m += s2.split('.')[1].length |
|||
} catch (e) { |
|||
console.log(e) |
|||
} |
|||
this.formobj.totalBillMoney = Number(s1.replace(',', '')) * Number(s2.replace(',', '')) / Math.pow(10, m) |
|||
return Number(s1.replace(',', '')) * Number(s2.replace(',', '')) / Math.pow(10, m) |
|||
}, |
|||
// 获取制单日期 |
|||
newDate() { |
|||
let date = new Date() |
|||
let year = date.getFullYear() // 年 |
|||
let month = date.getMonth() + 1 // 月 |
|||
let day = date.getDate() // 日 |
|||
if (month < 10) { |
|||
month = '0' + month |
|||
} |
|||
if (day < 10) { |
|||
day = '0' + day |
|||
} |
|||
this.currentDate = year + '-' + month + '-' + day |
|||
}, |
|||
UpNumber(e) { |
|||
e.target.value = e.target.value.replace(/[^0-9.]/g, '') |
|||
}, |
|||
showInfo(sid) { |
|||
this.viewTitle = '【编辑】公司开票申请' |
|||
this.DataDictionary() |
|||
this.newDate() |
|||
fetchFileBySid({ billAppSid: sid, fileType: '《客户开票申请书》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.khkpsqsApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchFileBySid({ billAppSid: sid, fileType: '《开票信息确认书》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.kpxxqrsApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchFileBySid({ billAppSid: sid, fileType: '《车辆登记合同》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.cldjhtApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchDetailsBySid(sid).then((resp) => { |
|||
if (resp.success) { |
|||
console.log(resp.data) |
|||
this.formobj.sid = sid |
|||
this.formobj.contractNo = resp.data.contractNo |
|||
this.formobj.contractSid = resp.data.contractSid |
|||
this.formobj.customerName = resp.data.customerName |
|||
this.formobj.customerSid = resp.data.customerSid |
|||
this.formobj.oneBillMoney = resp.data.oneBillMoney |
|||
this.formobj.totalBillMoney = resp.data.totalBillMoney |
|||
this.formobj.billAppPublicSid = resp.data.billAppPublicSid |
|||
this.formobj.billState = resp.data.billState |
|||
this.formobj.isDelayBill = resp.data.isDelayBill |
|||
this.formobj.remarks = resp.data.remarks |
|||
this.formobj.oneBillState = resp.data.oneBillState |
|||
if (resp.data.applyDate === '') { |
|||
this.formobj.applyDate = this.currentDate |
|||
} else { |
|||
this.formobj.applyDate = resp.data.applyDate |
|||
} |
|||
this.formobj.finBillVehicles = resp.data.finBillVehicles |
|||
if (resp.data.finBillFileVos.length > 0) { |
|||
for (var i = 0; i < resp.data.finBillFileVos.length; i++) { |
|||
if (resp.data.finBillFileVos[i].fileType === '《客户开票申请书》') { |
|||
this.finfile_list[0].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[0].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} else if (resp.data.finBillFileVos[i].fileType === '《开票信息确认书》') { |
|||
this.finfile_list[1].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[1].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} else if (resp.data.finBillFileVos[i].fileType === '《车辆登记合同》') { |
|||
this.finfile_list[2].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[2].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
changeBillName(value, row) { |
|||
var aa = null |
|||
this.billName_list.forEach((e) => { |
|||
if (e.sid === value) { |
|||
aa = { |
|||
sid: e.sid, |
|||
value: e.orgName |
|||
} |
|||
} |
|||
}) |
|||
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|||
if (this.formobj.finBillVehicles[i].VIN === row.VIN) { |
|||
this.formobj.finBillVehicles[i].billName = aa.value |
|||
this.formobj.finBillVehicles[i].billNameSid = aa.sid |
|||
} |
|||
} |
|||
}, |
|||
filesAdd(item, row) { |
|||
var arrayList = [] |
|||
arrayList = item.data |
|||
if (row.fileName === '《客户开票申请书》') { |
|||
this.formobj.khkpsqsApplicationAppendxs.push({ |
|||
createBySid: window.sessionStorage.getItem('staffSid'), |
|||
name: window.sessionStorage.getItem('name'), |
|||
fileName: arrayList.sourceFileName.substr(0, arrayList.sourceFileName.lastIndexOf('.')), |
|||
fileType: arrayList.sourceFileName.substr(arrayList.sourceFileName.lastIndexOf('.')), |
|||
linkSid: '', |
|||
attachType: '', |
|||
fileSize: arrayList.size, |
|||
filePath: arrayList.fullUrl, |
|||
appendixName: row.fileName |
|||
}) |
|||
} else if (row.fileName === '《开票信息确认书》') { |
|||
this.formobj.kpxxqrsApplicationAppendxs.push({ |
|||
createBySid: window.sessionStorage.getItem('staffSid'), |
|||
name: window.sessionStorage.getItem('name'), |
|||
fileName: arrayList.sourceFileName.substr(0, arrayList.sourceFileName.lastIndexOf('.')), |
|||
fileType: arrayList.sourceFileName.substr(arrayList.sourceFileName.lastIndexOf('.')), |
|||
linkSid: '', |
|||
attachType: '', |
|||
fileSize: arrayList.size, |
|||
filePath: arrayList.fullUrl, |
|||
appendixName: row.fileName |
|||
}) |
|||
} else { |
|||
this.formobj.cldjhtApplicationAppendxs.push({ |
|||
createBySid: window.sessionStorage.getItem('staffSid'), |
|||
name: window.sessionStorage.getItem('name'), |
|||
fileName: arrayList.sourceFileName.substr(0, arrayList.sourceFileName.lastIndexOf('.')), |
|||
fileType: arrayList.sourceFileName.substr(arrayList.sourceFileName.lastIndexOf('.')), |
|||
linkSid: '', |
|||
attachType: '', |
|||
fileSize: arrayList.size, |
|||
filePath: arrayList.fullUrl, |
|||
appendixName: row.fileName |
|||
}) |
|||
} |
|||
}, |
|||
filesRemove(item) { |
|||
// console.log(item) |
|||
}, |
|||
handDelete(row) { |
|||
const tip = '请确认是否删除' + row.fileName + ' 中上传的文件?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
if (row.fileName === '《客户开票申请书》') { |
|||
this.formobj.khkpsqsApplicationAppendxs = [] |
|||
} else if (row.fileName === '《开票信息确认书》') { |
|||
this.formobj.kpxxqrsApplicationAppendxs = [] |
|||
} else { |
|||
this.formobj.cldjhtApplicationAppendxs = [] |
|||
} |
|||
}) |
|||
}, |
|||
handlook(row) { |
|||
this.dialogVisible = true |
|||
this.file_list = [] |
|||
console.log(this.formobj.kpxxqrsApplicationAppendxs, this.formobj.khkpsqsApplicationAppendxs, this.formobj.cldjhtApplicationAppendxs) |
|||
if (row.fileName === '《客户开票申请书》') { |
|||
if (this.formobj.khkpsqsApplicationAppendxs.length > 0) { |
|||
for (var i = 0; i < this.formobj.khkpsqsApplicationAppendxs.length; i++) { |
|||
if (this.formobj.khkpsqsApplicationAppendxs[i].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.khkpsqsApplicationAppendxs[i].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} else if (row.fileName === '《开票信息确认书》') { |
|||
if (this.formobj.kpxxqrsApplicationAppendxs.length > 0) { |
|||
for (var a = 0; a < this.formobj.kpxxqrsApplicationAppendxs.length; a++) { |
|||
if (this.formobj.kpxxqrsApplicationAppendxs[a].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.kpxxqrsApplicationAppendxs[a].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} else { |
|||
if (this.formobj.cldjhtApplicationAppendxs.length > 0) { |
|||
for (var b = 0; b < this.formobj.cldjhtApplicationAppendxs.length; b++) { |
|||
if (this.formobj.cldjhtApplicationAppendxs[b].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.cldjhtApplicationAppendxs[b].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} |
|||
}, |
|||
handImg(val) { |
|||
this.dialogVisibleFile = true |
|||
this.dialogImageUrl = val |
|||
}, |
|||
saveEdit() { |
|||
this.submitdisabled = true |
|||
console.log(this.formobj) |
|||
save(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
submitVehicleApply() { |
|||
this.submitdisabled = true |
|||
submitFinBillApplication(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '提交失败' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.linetwo { |
|||
border-left: 0px; |
|||
border-right: 0px; |
|||
} |
|||
.linetwo .el-col{ |
|||
border: 0; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 45px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.balanceStyle { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
.headline{ |
|||
height: 40px; |
|||
padding: 10px; |
|||
font-weight: bold; |
|||
background-color: #0294d7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
} |
|||
</style> |
@ -0,0 +1,594 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button v-show="transactState=='00'" type="primary" @click="openAgree">同 意</el-button> |
|||
<el-button v-show="transactState=='00'" type="danger" @click="openReject">驳 回</el-button> |
|||
<!-- <el-button v-show="transactState=='00'" type="danger" @click="openStop">终 止</el-button>--> |
|||
<el-button v-show="transactState=='01'" type="danger" @click="openRevoke">撤 回 </el-button> |
|||
<el-button type="info" size="small">关 闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listadd"> |
|||
<div class="wlInfo"><span>公司申请入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top" class="formadd"> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="合同编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.contractNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applyDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="客户名称:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.customerName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div v-show="transactState=='00'"> |
|||
<el-form :model="dialogList" :inline="true"> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="审批意见:"> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="dialogList.comment" type="textarea" maxlength="20" placeholder="请输入审批意见" style="width: 400px" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">开票信息</div> |
|||
<div> |
|||
<span style="margin-right: 10px">单台开票金额:{{ formobj.oneBillMoney }} </span> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.VIN }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票类型" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.billTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票名称" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.billName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票金额合计"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ formobj.totalBillMoney }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="是否延迟开票"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ formobj.isDelayBill == '1' ? '是' : '否' }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<span>{{ formobj.remarks }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票状态"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
{{ formobj.billState }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="headline"> |
|||
<div style="margin-left: 5px;font-weight: bold">所附资料附件</div> |
|||
</div> |
|||
<el-table :key="fileKey" :data="finfile_list" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="附件名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi" @click="handlook(scope.row)">{{ scope.row.fileName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="上传时间" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.uploadTime }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<el-dialog :visible.sync="dialogVisible" width="70%"> |
|||
<el-carousel :interval="4000" type="card"> |
|||
<el-carousel-item v-for="(item, index) in file_list" :key="index"> |
|||
<img style="width: 100%; height: 100%" :src="item.filePath" @click="handImg(item.filePath)"/> |
|||
</el-carousel-item> |
|||
</el-carousel> |
|||
</el-dialog> |
|||
<el-dialog :visible.sync="dialogVisibleFile"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { fetchDetailsBySid, fetchFileBySid, businessAgree, rejectTask, breakTask, revokeTask } from '@/api/zhengchangkaipiao/openTicket.js' |
|||
export default { |
|||
name: 'zhengchangkaipiaoguanliInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
dialogVisible: false, |
|||
dialogVisibleFile: false, |
|||
dialogImageUrl: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
fileKey: 1, |
|||
file_list: [], |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
staffSid: window.sessionStorage.getItem('staffSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
contractNo: '', |
|||
contractSid: '', |
|||
customerName: '', |
|||
customerSid: '', |
|||
oneBillMoney: '', |
|||
totalBillMoney: '', |
|||
billAppPublicSid: '', |
|||
billState: '', |
|||
procDefId: '', |
|||
nodeSid: '', |
|||
procInstSid: '', |
|||
isDelayBill: '', |
|||
applyDate: '', |
|||
remarks: '', |
|||
finBillVehicles: [], |
|||
khkpsqsApplicationAppendxs: [], // 客户开票申请书附件信息 |
|||
kpxxqrsApplicationAppendxs: [], // 开票信息确认书附件信息 |
|||
cldjhtApplicationAppendxs: [] // 车辆登记合同附件信息 |
|||
}, |
|||
finfile_list: [ |
|||
{ |
|||
fileName: '《客户开票申请书》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
}, |
|||
{ |
|||
fileName: '《开票信息确认书》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
}, |
|||
{ |
|||
fileName: '《车辆登记合同》', |
|||
uploadName: '', |
|||
uploadTime: '' |
|||
} |
|||
], |
|||
currentDate: '', |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
transactState: '', // 办理状态 |
|||
// 同意办理列表 |
|||
agreeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 驳回列表 |
|||
regectList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 终止列表 |
|||
stopList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 撤回 |
|||
revokeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|||
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|||
const info = window.location.href.slice(a, b) |
|||
var sid = info.substr(info.indexOf('=') + 1) |
|||
this.showInfo(sid) |
|||
// ===获取参数 |
|||
var one = window.location.href.lastIndexOf('#') + 1 |
|||
var two = window.location.href.lastIndexOf('}') + 1 |
|||
const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用 |
|||
var tar = data.substr(data.indexOf('=') + 1) |
|||
const obj = JSON.parse(tar) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 同意列表 |
|||
this.agreeList.businessSid = sid |
|||
this.agreeList.instanceId = obj.instanceId |
|||
this.agreeList.taskId = obj.taskId |
|||
// 驳回列表 |
|||
this.regectList.businessSid = sid |
|||
this.regectList.instanceId = obj.instanceId |
|||
this.regectList.taskId = obj.taskId |
|||
// 终止列表 |
|||
this.stopList.businessSid = sid |
|||
this.stopList.instanceId = obj.instanceId |
|||
this.stopList.taskId = obj.taskId |
|||
// 撤回列表 |
|||
this.revokeList.businessSid = sid |
|||
this.revokeList.instanceId = obj.instanceId |
|||
this.revokeList.taskId = obj.taskId |
|||
// 办理状态 |
|||
this.transactState = obj.transactState |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.viewTitle = '公司开票申请' |
|||
fetchFileBySid({ billAppSid: sid, fileType: '《客户开票申请书》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.khkpsqsApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchFileBySid({ billAppSid: sid, fileType: '《开票信息确认书》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.kpxxqrsApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchFileBySid({ billAppSid: sid, fileType: '《车辆登记合同》' }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.length > 0) { |
|||
this.formobj.cldjhtApplicationAppendxs = resp.data |
|||
} |
|||
} |
|||
}) |
|||
fetchDetailsBySid(sid).then((resp) => { |
|||
if (resp.success) { |
|||
console.log(resp.data) |
|||
this.formobj.sid = sid |
|||
this.formobj.contractNo = resp.data.contractNo |
|||
this.formobj.contractSid = resp.data.contractSid |
|||
this.formobj.customerName = resp.data.customerName |
|||
this.formobj.customerSid = resp.data.customerSid |
|||
this.formobj.oneBillMoney = resp.data.oneBillMoney |
|||
this.formobj.totalBillMoney = resp.data.totalBillMoney |
|||
this.formobj.billAppPublicSid = resp.data.billAppPublicSid |
|||
this.formobj.billState = resp.data.billState |
|||
this.formobj.isDelayBill = resp.data.isDelayBill |
|||
this.formobj.remarks = resp.data.remarks |
|||
if (resp.data.applyDate === '') { |
|||
this.formobj.applyDate = this.currentDate |
|||
} else { |
|||
this.formobj.applyDate = resp.data.applyDate |
|||
} |
|||
this.formobj.finBillVehicles = resp.data.finBillVehicles |
|||
if (resp.data.finBillFileVos.length > 0) { |
|||
for (var i = 0; i < resp.data.finBillFileVos.length; i++) { |
|||
if (resp.data.finBillFileVos[i].fileType === '《客户开票申请书》') { |
|||
this.finfile_list[0].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[0].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} else if (resp.data.finBillFileVos[i].fileType === '《开票信息确认书》') { |
|||
this.finfile_list[1].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[1].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} else if (resp.data.finBillFileVos[i].fileType === '《车辆登记合同》') { |
|||
this.finfile_list[2].uploadTime = resp.data.finBillFileVos[i].createTime |
|||
this.finfile_list[2].uploadName = resp.data.finBillFileVos[i].createByName |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
handlook(row) { |
|||
this.dialogVisible = true |
|||
this.file_list = [] |
|||
if (row.fileName === '《客户开票申请书》') { |
|||
if (this.formobj.khkpsqsApplicationAppendxs.length > 0) { |
|||
for (var i = 0; i < this.formobj.khkpsqsApplicationAppendxs.length; i++) { |
|||
if (this.formobj.khkpsqsApplicationAppendxs[i].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.khkpsqsApplicationAppendxs[i].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} else if (row.fileName === '《开票信息确认书》') { |
|||
if (this.formobj.kpxxqrsApplicationAppendxs.length > 0) { |
|||
for (var a = 0; a < this.formobj.kpxxqrsApplicationAppendxs.length; a++) { |
|||
if (this.formobj.kpxxqrsApplicationAppendxs[a].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.kpxxqrsApplicationAppendxs[a].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} else { |
|||
if (this.formobj.cldjhtApplicationAppendxs.length > 0) { |
|||
for (var b = 0; b < this.formobj.cldjhtApplicationAppendxs.length; b++) { |
|||
if (this.formobj.cldjhtApplicationAppendxs[b].appendixName === row.fileName) { |
|||
this.file_list.push({ |
|||
filePath: this.formobj.cldjhtApplicationAppendxs[b].filePath |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.dialogVisible = false |
|||
} |
|||
} |
|||
}, |
|||
// 同意 |
|||
openAgree() { |
|||
this.$confirm('是否确认执行同意操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleAgree() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消同意' |
|||
}) |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject() { |
|||
this.$confirm('是否确认执行驳回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleReject() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消驳回' |
|||
}) |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop() { |
|||
this.$confirm('是否确认执行终止操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleStop() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消终止' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.agreeList.comment = this.dialogList.comment |
|||
businessAgree(this.agreeList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.refreshIt() |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.stopList.comment = this.dialogList.comment |
|||
breakTask(this.stopList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.regectList.comment = this.dialogList.comment |
|||
rejectTask(this.regectList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
this.revokeList.comment = this.dialogList.comment |
|||
revokeTask(this.revokeList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handImg(val) { |
|||
this.dialogVisibleFile = true |
|||
this.dialogImageUrl = val |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.linetwo { |
|||
border-left: 0px; |
|||
border-right: 0px; |
|||
} |
|||
.linetwo .el-col{ |
|||
border: 0; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
margin-right: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 45px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.headline{ |
|||
height: 40px; |
|||
padding: 10px; |
|||
font-weight: bold; |
|||
background-color: #0294d7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
} |
|||
</style> |
Loading…
Reference in new issue