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.
 
 
 
 
 
 

642 lines
23 KiB

<template>
<div class="app-container">
<!--标题按钮部分开始-->
<div v-show="viewState == 1">
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 新增修改按钮-->
<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>
<!--end 添加修改按钮-->
</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">发起人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">发起部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">发起日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.applyDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">销售专员</div>
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">销售部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.saleDeptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">销售类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.saleTypeValue }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">合同编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">开票单位</div>
<el-form-item><span class="addinputInfo">{{ formobj.openTickUnitName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">客户名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>主车开票信息</div>
<div><el-button type="primary" size="mini" class="btntopblueline" @click="handleLookByDingDan()">查看销售订单</el-button></div>
</div>
<el-row>
<el-col :span="8">
<div class="span-sty">单台开票金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.oneBillMoney }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">开票类型默认</div>
<el-form-item><span class="addinputInfo">{{ formobj.openTickTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">开票名称默认</div>
<el-form-item><span class="addinputInfo">{{ formobj.openTickName }}</span></el-form-item>
</el-col>
</el-row>
<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" width="100">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="合格证状态" align="center" width="110">
<template slot-scope="scope">
<span class="bluezi" @click="handleLook(scope.row.certificatePhoto)">{{ scope.row.certificateStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票类型" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.billTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票名称" align="center" width="160">
<template slot-scope="scope">
<span>{{ scope.row.openTickName }}</span>
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="200">
<template slot-scope="scope">
<span>{{ scope.row.openTickRemarks }}</span>
</template>
</el-table-column>
<el-table-column label="开票金额" align="center" width="120">
<template>
<span>{{ formobj.oneBillMoney }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">
<div class="span-sty">开票金额合计</div>
<el-form-item><span class="addinputInfo">{{ formobj.totalBillMoney }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</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">开票状态</div>
<el-form-item><span class="addinputInfo">{{ formobj.billStateValue }}</span></el-form-item>
</el-col>
</el-row>
<div v-if="formobj.finBillTrailers !== null">
<div class="title">挂车开票信息(挂车的开票类型、开票名称与主车相同)</div>
<el-table :key="billingKey" :data="formobj.finBillTrailers" :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" width="110">
<template slot-scope="scope">
<span>{{ scope.row.gcVinNo }}</span>
</template>
</el-table-column>
<el-table-column label="主车车架号" align="center" width="110">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="开票名称" align="center" width="160">
<template slot-scope="scope">
<span>{{ scope.row.openTickName }}</span>
</template>
</el-table-column>
<el-table-column label="开票信息" align="center">
<template slot-scope="scope">
<span>{{ scope.row.invoiceInfo }}</span>
</template>
</el-table-column>
<el-table-column label="开票金额" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.oneBillMoney }}</span>
</template>
</el-table-column>
<el-table-column label="合格证" align="center" width="100">
<template slot-scope="scope">
<span class="bluezi" @click="handleLook(scope.row.hgzImageUrl)">查看</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="title"><span class="icon">*</span>证件(营业执照或身份证)</div>
<el-row>
<el-col :span="24">
<upload ref="uploadImg" v-model="image_list1" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-col>
</el-row>
<div class="title"><span class="icon">*</span>客户开票申请书</div>
<el-row>
<el-col :span="24">
<upload ref="uploadImg" v-model="image_list2" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-col>
</el-row>
<div class="title">款项确认书(贷款业务上传)</div>
<el-row>
<el-col :span="24">
<upload ref="uploadImg" v-model="image_list3" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-col>
</el-row>
<div class="title">车辆登记合同(开票名称与客户名称不一致时上传)</div>
<el-row>
<el-col :span="24">
<el-form-item>
<upload ref="uploadImg" v-model="image_list4" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<el-dialog :visible.sync="dialogVisible" :append-to-body="true">
<el-image style="width: 178px;height: 178px;padding-left: 5px" v-for="(item,index) in srcList" :key="index" :src="item" :preview-src-list="srcList"></el-image>
</el-dialog>
<!-- 选择待办人 的弹出框-->
<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>
<!-- 查看销售订单详情 -->
<xiaoshoudingdanInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import { fetchDetailsBySid, completeByKP, reject, breakProcess, getPreviousNodesForReject, getNextNodesForSubmit } from '@/api/anruifinmanagement/finwaitinvoiceapply'
import upload from '@/components/uploadFile/upload'
import xiaoshoudingdanInfo from './relation/xiaoshoudingdanInfo'
export default {
name: 'finginvoiceapplyByFileDaiBanInfo',
components: {
upload,
xiaoshoudingdanInfo
},
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 0,
billingKey: 1,
index: 0,
dialogVisible: false,
srcList: [],
image_list1: [],
image_list2: [],
image_list3: [],
image_list4: [],
formobj: {
applyDate: '',
arrearsMoney: '',
arrearsOpenYYKey: '',
arrearsOpenYYValue: '',
billNo: '',
billStateKey: '',
billStateValue: '',
cldjhtApplicationAppendxs: [],
contractNo: '',
contractSid: '',
createByName: '',
customerName: '',
customerSid: '',
deptName: '',
deptSid: '',
finBillTrailers: [],
finBillVehicles: [],
isDelayBill: '',
isHighAndLowOpen: '',
isLQOrigInvoice: '',
khkpsqsApplicationAppendxs: [],
kpxxqrsApplicationAppendxs: [],
modelName: '',
modelSid: '',
nodeSid: '',
nodeState: '',
oneBillMoney: '',
openTickName: '',
openTickSid: '',
openTickTypeKey: '',
openTickTypeValue: '',
openTickUnitName: '',
openTickUnitSid: '',
orgSidPath: '',
procDefId: '',
procInstSid: '',
remarks: '',
returnedMoneyDate: '',
saleDeptName: '',
saleDeptSid: '',
saleTypeKey: '',
saleTypeValue: '',
sid: '',
staffName: '',
staffSid: '',
totalBillMoney: '',
useOrgSid: '',
createBySid: '',
zjApplicationAppendxs: []
},
rules: {},
operation: '', // 点击操作按钮
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' // 当前环节名称
},
nextNode: {}, // 下一环节
nodeDialogVisible: false,
currentLink: true,
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: '',
cldjhtApplicationAppendxs: [],
khkpsqsApplicationAppendxs: [],
kpxxqrsApplicationAppendxs: [],
zjApplicationAppendxs: []
}
}
},
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) {
this.viewTitle = '公司开票详情'
fetchDetailsBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.zjApplicationAppendxs.length > 0) {
this.formobj.zjApplicationAppendxs.forEach((e) => {
this.image_list1.push({
name: e.fileName,
url: e.fileUrl
})
})
}
if (this.formobj.khkpsqsApplicationAppendxs.length > 0) {
this.formobj.khkpsqsApplicationAppendxs.forEach((e) => {
this.image_list2.push({
name: e.fileName,
url: e.fileUrl
})
})
}
if (this.formobj.kpxxqrsApplicationAppendxs.length > 0) {
this.formobj.kpxxqrsApplicationAppendxs.forEach((e) => {
this.image_list3.push({
name: e.fileName,
url: e.fileUrl
})
})
}
if (this.formobj.cldjhtApplicationAppendxs.length > 0) {
this.formobj.cldjhtApplicationAppendxs.forEach((e) => {
this.image_list4.push({
name: e.fileName,
url: e.fileUrl
})
})
}
}
})
},
handleLook(row) {
this.srcList = []
this.dialogVisible = true
this.srcList = row
},
handleLookByDingDan() {
this.viewState = 2
this.$refs['divInfo'].showInfo(this.formobj.busSalesOrderSid)
},
resetState() {
this.viewState = 1
},
getUrl() {
if (this.image_list1.length > 0) {
const aa = []
for (var i = 0; i < this.image_list1.length; i++) {
aa.push({
attachType: '',
billAppSid: '',
createByName: window.sessionStorage.getItem('name'),
fileSid: '',
fileName: this.image_list1[i].name,
fileType: this.image_list1[i].name.substr(this.image_list1[i].name.lastIndexOf('.')),
fileUrl: this.image_list1[i].url,
sid: ''
})
}
this.linkByParameter.zjApplicationAppendxs = aa
} else {
this.linkByParameter.zjApplicationAppendxs = []
}
if (this.image_list2.length > 0) {
const bb = []
for (var k = 0; k < this.image_list2.length; k++) {
bb.push({
attachType: '',
billAppSid: '',
createByName: window.sessionStorage.getItem('name'),
fileSid: '',
fileName: this.image_list2[k].name,
fileType: this.image_list2[k].name.substr(this.image_list2[k].name.lastIndexOf('.')),
fileUrl: this.image_list2[k].url,
sid: ''
})
}
this.linkByParameter.khkpsqsApplicationAppendxs = bb
} else {
this.linkByParameter.khkpsqsApplicationAppendxs = []
}
if (this.image_list3.length > 0) {
const cc = []
for (var m = 0; m < this.image_list3.length; m++) {
cc.push({
attachType: '',
billAppSid: '',
createByName: window.sessionStorage.getItem('name'),
fileSid: '',
fileName: this.image_list3[m].name,
fileType: this.image_list3[m].name.substr(this.image_list3[m].name.lastIndexOf('.')),
fileUrl: this.image_list3[m].url,
sid: ''
})
}
this.linkByParameter.kpxxqrsApplicationAppendxs = cc
} else {
this.linkByParameter.kpxxqrsApplicationAppendxs = []
}
if (this.image_list4.length > 0) {
const cc = []
for (var n = 0; n < this.image_list3.length; n++) {
cc.push({
attachType: '',
billAppSid: '',
createByName: window.sessionStorage.getItem('name'),
fileSid: '',
fileName: this.image_list3[n].name,
fileType: this.image_list3[n].name.substr(this.image_list3[n].name.lastIndexOf('.')),
fileUrl: this.image_list3[n].url,
sid: ''
})
}
this.linkByParameter.cldjhtApplicationAppendxs = cc
} else {
this.linkByParameter.cldjhtApplicationAppendxs = []
}
},
// 同意
openAgree(val) {
this.getUrl()
if (this.linkByParameter.zjApplicationAppendxs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请上传证件(营业执照或身份证)' })
return
}
if (this.linkByParameter.khkpsqsApplicationAppendxs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请上传客户开票申请书' })
return
}
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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, businessSid: this.linkByParameter.businessSid }).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
completeByKP(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>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.span-sty {
width: 100px !important;
}
.addinputInfo {
margin-left: 90px !important;
}
</style>