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.
249 lines
9.2 KiB
249 lines
9.2 KiB
<template>
|
|
<div class="app-container">
|
|
<div v-show="viewState == 1">
|
|
<div class="tab-header webtop">
|
|
<div>{{ viewTitle }}</div>
|
|
<div>
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="listconadd">
|
|
<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.dept }}</span></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">申请人</div>
|
|
<el-form-item><span class="addinputInfo">{{ formobj.applyName }}</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>
|
|
<el-select class="addinputInfo" v-model="formobj.payFormKey" clearable placeholder="请选择" filterable @change="payFormChange">
|
|
<el-option v-for="item in payForm_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">打款时需备注内容</div>
|
|
<el-form-item><el-input v-model="formobj.payRemarks" clearable placeholder="" class="addinputInfo addinputw" /></el-form-item>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<div class="span-sty">其他说明</div>
|
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" class="addinputInfo addinputw" /></el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<div class="span-sty">附件</div>
|
|
<el-form-item>
|
|
<upload-img ref="uploadImg" class="addinputInfo" :accept="accept" v-model="formobj.files" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-table :key="tableKey" :data="formobj.records" :index="index" border style="width: 100%">
|
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
|
|
<el-table-column prop="vinNo" label="车架号" align="center" width="100" />
|
|
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="160"/>
|
|
<el-table-column prop="bankName" label="资方" align="center" width="100" />
|
|
<el-table-column prop="bankContractNo" label="资方合同编号" align="center" width="160" />
|
|
<el-table-column prop="customer" label="客户名称" align="center" width="100" />
|
|
<el-table-column prop="borrowerName" label="贷款人" align="center" min-width="100" />
|
|
<el-table-column prop="period" label="期数" align="center" width="80" />
|
|
<el-table-column prop="actualDate" label="实还日期" align="center" width="120" />
|
|
<el-table-column prop="actualMoney" label="实还金额" align="center" width="120" />
|
|
<!-- <el-table-column label="息差" align="center" min-width="130">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <el-input v-model="scope.row.spread" clearable placeholder="" />-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<el-table-column label="转付资方月还" align="center" width="130">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.transferPrincipal" clearable placeholder="" />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="转付资方逾期利息" align="center" width="150">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.defaultInterest" clearable placeholder="" />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="收款账户" align="center" width="250">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.account" clearable placeholder="" />
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="收款账号" align="center" width="250">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.accountNumber" clearable placeholder="" />
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import req from '@/api/agentbusiness/agentbusiness'
|
|
import uploadImg from '@/components/uploadFile/uploadImg'
|
|
import { typeValues } from '@/api/Common/dictcommons'
|
|
|
|
export default {
|
|
name: 'AgentBusinessAdd',
|
|
components: {
|
|
uploadImg
|
|
},
|
|
data() {
|
|
return {
|
|
viewTitle: '',
|
|
viewState: 1,
|
|
submitdisabled: false,
|
|
tableKey: 0,
|
|
index: 0,
|
|
accept: '.jpg,.jpeg,.png',
|
|
payForm_list: [],
|
|
formobj: {
|
|
sid: '',
|
|
userSid: '',
|
|
dept: '',
|
|
deptSid: '',
|
|
applyName: '',
|
|
applyDate: '',
|
|
remarks: '',
|
|
orgPath: '',
|
|
payForm: '',
|
|
payFormKey: '',
|
|
payRemarks: '',
|
|
taskId: '',
|
|
instanceId: '',
|
|
files: [],
|
|
records: []
|
|
},
|
|
rules: {}
|
|
}
|
|
},
|
|
methods: {
|
|
init() {
|
|
typeValues({ type: 'payForm' }).then((resp) => {
|
|
if (resp.success) {
|
|
this.payForm_list = resp.data
|
|
}
|
|
})
|
|
},
|
|
showAdd(sids) {
|
|
this.viewTitle = '【新增】代收代付申请'
|
|
this.$nextTick(() => {
|
|
this.$refs['form_obj'].clearValidate()
|
|
})
|
|
this.init()
|
|
req.init(sids).then((res) => {
|
|
if (res.success) {
|
|
this.formobj = res.data
|
|
this.formobj.applyName = window.sessionStorage.getItem('name')
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid')
|
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
|
this.formobj.dept = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
|
|
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
|
|
}
|
|
})
|
|
},
|
|
showEdit(row) {
|
|
this.viewTitle = '【编辑】代收代付申请'
|
|
this.$nextTick(() => {
|
|
this.$refs['form_obj'].clearValidate()
|
|
})
|
|
this.init()
|
|
req.fetchBySid({ sid: row.sid }).then((res) => {
|
|
if (res.success) {
|
|
this.formobj = res.data
|
|
}
|
|
})
|
|
},
|
|
payFormChange(value) {
|
|
const choose = this.payForm_list.filter((item) => item.dictKey === value)
|
|
if (choose.length > 0 && choose !== null) {
|
|
this.formobj.payForm = choose[0].dictValue
|
|
} else {
|
|
this.formobj.payForm = ''
|
|
}
|
|
},
|
|
saveOrUpdate() {
|
|
this.$refs['form_obj'].validate((valid) => {
|
|
if (valid) {
|
|
this.submitdisabled = true
|
|
req.saveOrUpdate(this.formobj).then((res) => {
|
|
if (res.success) {
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
|
this.handleReturn('true')
|
|
} else {
|
|
this.submitdisabled = false
|
|
}
|
|
}).catch(() => {
|
|
this.submitdisabled = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
submit() {
|
|
this.$refs['form_obj'].validate((valid) => {
|
|
if (valid) {
|
|
this.submitdisabled = true
|
|
req.submit(this.formobj).then((res) => {
|
|
if (res.success) {
|
|
this.$message({ showClose: true, type: 'success', message: '操作成功' })
|
|
this.handleReturn('true')
|
|
} else {
|
|
this.submitdisabled = false
|
|
}
|
|
}).catch(() => {
|
|
this.submitdisabled = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
handleReturn(isreload) {
|
|
if (isreload === 'true') this.$emit('reloadlist')
|
|
this.formobj = {
|
|
sid: '',
|
|
userSid: '',
|
|
dept: '',
|
|
deptSid: '',
|
|
applyName: '',
|
|
applyDate: '',
|
|
remarks: '',
|
|
orgPath: '',
|
|
payForm: '',
|
|
payFormKey: '',
|
|
payRemarks: '',
|
|
taskId: '',
|
|
instanceId: '',
|
|
files: [],
|
|
records: []
|
|
}
|
|
this.submitdisabled = false
|
|
this.$emit('doback')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.span-sty {
|
|
width: 140px !important;
|
|
}
|
|
.addinputInfo {
|
|
margin-left: 130px !important;
|
|
}
|
|
</style>
|
|
|