Browse Source

完善售后认款申请

master
yunuo970428 5 months ago
parent
commit
09807abd91
  1. 62
      anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/subscriptionAfterSale.js
  2. 6
      anrui-buscenter/anrui-finmanage-ui/src/router/modules/codemenu.js
  3. 406
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSale.vue
  4. 640
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSaleAdd.vue
  5. 221
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSaleInfo.vue

62
anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/subscriptionAfterSale.js

@ -0,0 +1,62 @@
import request from '@/utils/request'
export default {
// 查询分页列表 -- 售后认款
listPage: function(data) {
return request({
url: '/fin/fincollectionconfirmation/asListPagess',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 应收未收款项明细分页
asListAll: function(data) {
return request({
url: '/fin/finuncollectedreceivablesdetailed/asListAll',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
saveOrUpdate: function(data) {
return request({
url: '/fin/fincollectionconfirmation/asSave',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
fetchBySid: function(data) {
return request({
url: '/fin/fincollectionconfirmation/asFetchBySid/' + data,
method: 'get'
})
},
// 打印出门证
createPdf: function(data) {
return request({
url: '/fin/fincollectionconfirmation/asCreatePdf',
method: 'post',
params: data
})
},
// 出纳款项管理--确认
asCashierConfirm: function(data) {
return request({
url: '/fin/fincollectionconfirmation/asCashierConfirm',
method: 'post',
params: data,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
},
// 出纳款项管理--驳回
cashierReject: function(data) {
return request({
url: '/fin/fincollectionconfirmation/cashierReject',
method: 'post',
params: data,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
}

6
anrui-buscenter/anrui-finmanage-ui/src/router/modules/codemenu.js

@ -66,6 +66,12 @@ const codemenu = [
name: 'DaiShouKuan',
meta: { title: '代收款申请', noCache: true }
},
{
path: '/subscriptionAfterSale/subscriptionAfterSale',
component: () => import('@/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSale.vue'),
name: 'SubscriptionAfterSale',
meta: { title: '售后认款申请', noCache: true }
},
{
path: '/anruifinmanagement/cashierConfirmation',
component: () => import('@/views/anruifinmanagement/paymentConfirmation/cashierConfirmation.vue'),

406
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSale.vue

@ -0,0 +1,406 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar view-title="售后认款申请" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="付款方:" class="searchlist">
<el-input v-model="listQuery.params.payerName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="收款方式:" class="searchlist">
<el-select v-model="listQuery.params.collectionTypeKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in collectionType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="收款银行:" class="searchlist">
<el-input v-model="listQuery.params.collectionBank" placeholder="" clearable/>
</el-form-item>
<el-form-item label="收款金额:" class="searchlist">
<el-input v-model="listQuery.params.collectionMoney" placeholder="" clearable/>
</el-form-item>
<el-form-item label="收款日期:" class="searchlist">
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.collectionStartDate" clearable style="width: 160px" type="date" placeholder="开始日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.collectionEndDate" clearable style="width: 160px" type="date" placeholder="结束日期"/>
</el-form-item>
<el-form-item label="申请部门:" class="searchlist">
<el-input v-model="listQuery.params.createDept" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请人:" class="searchlist">
<el-input v-model="listQuery.params.createByName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请日期:" class="searchlist">
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.createStartDate" clearable style="width: 160px" type="date" placeholder="开始日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.createEndDate" clearable style="width: 160px" type="date" placeholder="结束日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="handleFilter">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="handReset">重置</el-button>
</div>
</div>
</div>
<div>
<div class="listtop">
<div class="tit">售后认款申请列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button v-show="scope.row.auditState == 3" type="primary" size="mini" @click="handleDownLoad(scope.row)">下载</el-button>
<el-button type="primary" size="mini" @click="handLook(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.auditState == 1 ? '待审核' : scope.row.auditState == 2 ? '已驳回' : scope.row.auditState ==3 ? '已审核' : '其他' }}</span>
</template>
</el-table-column>
<el-table-column label="下载次数" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.downNum }}</span>
</template>
</el-table-column>
<el-table-column label="申请部门" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.createDept }}</span>
</template>
</el-table-column>
<el-table-column label="申请人" align="center" width="80">
<template slot-scope="scope">
<span>{{ scope.row.createByName }}</span>
</template>
</el-table-column>
<el-table-column label="申请日期" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.createDate }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行账号" align="center" width="140">
<template slot-scope="scope">
<span>{{ scope.row.collectionBankNum }}</span>
</template>
</el-table-column>
<el-table-column label="收款账户名称" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.receivingName }}</span>
</template>
</el-table-column>
<el-table-column label="收款银行" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.collectionBank }}</span>
</template>
</el-table-column>
<el-table-column label="收款金额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.collectionMoney }}</span>
</template>
</el-table-column>
<el-table-column label="收款日期" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.collectionDate }}</span>
</template>
</el-table-column>
<el-table-column label="收款方式" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.collectionTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="付款方" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.payerName }}</span>
</template>
</el-table-column>
<el-table-column label="付款账号后4位" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.payAccount }}</span>
</template>
</el-table-column>
<el-table-column label="付款银行" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.payBank }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
<el-dialog center :visible.sync="dialogVisible" width="40%">
<el-form class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="6" class="tleftb">
<span>打印机类型</span>
</el-col>
<el-col :span="18">
<el-form-item>
<el-radio-group v-model="print">
<el-radio label="针孔式打印机">针孔式打印机</el-radio>
<el-radio label="激光打印机">激光打印机</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" :disabled="visibleDisabled" type="primary" @click="handleConfirm">确定</el-button>
<el-button size="small" :disabled="visibleDisabled" @click="dialogVisible = false">取消</el-button>
</span>
</el-dialog>
<subscriptionAfterSaleAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<subscriptionAfterSaleInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import req from '@/api/anruifinmanagement/subscriptionAfterSale'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import pageye from '@/components/pagination/pageye'
import { typeValues } from '@/api/jichuxinxi/dictcommons'
import subscriptionAfterSaleAdd from './subscriptionAfterSaleAdd.vue'
import subscriptionAfterSaleInfo from './subscriptionAfterSaleInfo.vue'
import { getStorage } from '@/utils/auth'
export default {
name: 'SubscriptionAfterSale',
components: {
Pagination,
pageye,
ButtonBar,
subscriptionAfterSaleAdd,
subscriptionAfterSaleInfo
},
data() {
return {
btndisabled: false,
isSearchShow: false,
dialogVisible: false,
visibleDisabled: false,
printSid: '',
print: '',
searchxianshitit: '隐藏查询条件',
viewState: 1,
tableKey: 0,
list: [],
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
receiptBank_list: [],
collectionType_list: [],
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
payerName: '',
createDept: '',
createByName: '',
createStartDate: '',
createEndDate: '',
collectionMoney: '',
collectionStartDate: '',
collectionEndDate: '',
collectionBank: '',
collectionTypeKey: '',
subscriptionState: '',
useOrgSid: '',
userSid: '',
state: '',
orgPath: '',
menuUrl: ''
},
total: 0
}
}
},
created() {
this.getList()
this.DataDictionary()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
DataDictionary() {
typeValues({ type: 'receiptBank' }).then((res) => {
if (res.success) {
this.receiptBank_list = res.data
}
})
typeValues({ type: 'customerPayType' }).then((res) => {
if (res.success) {
this.collectionType_list = res.data
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// ------------------
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
this.listQuery.params.state = 0
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
} else {
this.listQuery.total = 0
this.list = []
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handReset() {
this.listQuery = {
current: 1,
size: 10,
params: {
collectionStartDate: '',
collectionEndDate: '',
collectionBank: '',
collectionTypeKey: '',
subscriptionState: '',
useOrgSid: '',
userSid: '',
state: '',
orgPath: '',
menuUrl: '',
createDept: '',
createByName: '',
createStartDate: '',
createEndDate: '',
collectionMoney: ''
},
total: 0
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
handUpdate(row) {
this.viewState = 2
this.$refs['divAdd'].showEdit(row)
},
handleDownLoad(row) {
this.printSid = row.sid
this.print = ''
this.dialogVisible = true
},
handleConfirm() {
this.visibleDisabled = true
req.createPdf({ skdSid: this.printSid, printerType: this.print }).then((resp) => {
if (resp.success && resp.data.pdfPath !== '') {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data.pdfPath + '&outFileName=' + '售后认款单', true)
xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob'
xhr.onload = function(e) {
//
var blob = this.response
var filename = '售后认款单.pdf'
var a = document.createElement('a')
// blob.type="application/octet-stream";
// url
var url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.click()
// URL
window.URL.revokeObjectURL(url)
}
//
xhr.send()
this.dialogVisible = false
this.printSid = ''
this.visibleDisabled = false
this.getList()
} else {
this.visibleDisabled = false
}
}).catch(() => {
this.visibleDisabled = false
})
},
handLook(row) {
this.viewState = 3
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

640
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSaleAdd.vue

@ -0,0 +1,640 @@
<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="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.createDept }}</span></el-form-item>
</el-col>
<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.createDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>收款方式</div>
<el-form-item prop="collectionTypeValue">
<el-select class="addinputInfo" v-model="formobj.collectionTypeValue" placeholder="请选择" :disabled="forbidden" @change="changeCollectionType" filterable clearable>
<el-option v-for="item in receiptType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>收款金额()</div>
<el-form-item prop="collectionMoney">
<el-input class="addinputInfo addinputw" v-model="formobj.collectionMoney" @keyup.native="formobj.collectionMoney = getNumber(formobj.collectionMoney, 2)" :disabled="forbidden" placeholder="" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>收款日期</div>
<el-form-item prop="collectionDate">
<el-date-picker class="addinputInfo" value-format="yyyy-MM-dd" v-model="formobj.collectionDate" :disabled="forbidden" clearable type="date" style="width: 93%" placeholder="请选择"/>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>收款银行账号</div>
<el-form-item prop="collectionBankNum">
<el-select class="addinputInfo" v-model="formobj.collectionBankNum" placeholder="请选择" :disabled="forbidden" @change="changeCollectionBankNum" filterable clearable>
<el-option v-for="item in collectionBankNum_list" :key="item.accountSid" :label="item.bankAccount" :value="item.bankAccount"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收款账户名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.receivingName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收款银行</div>
<el-form-item><span class="addinputInfo">{{ formobj.collectionBank }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>付款方名称</div>
<el-form-item prop="payerName"><el-input class="addinputInfo addinputw" v-model="formobj.payerName" :disabled="forbidden" placeholder="" clearable/></el-form-item>
</el-col>
<el-col :span="8">
<div v-if="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">
<div class="span-sty"><span class="icon">*</span>付款账号后4位</div>
<el-form-item prop="payAccount"><el-input class="addinputInfo addinputw" v-model="formobj.payAccount" :disabled="forbidden" maxlength="4" placeholder="" clearable/></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-if="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">
<div class="span-sty"><span class="icon">*</span>付款银行</div>
<el-form-item prop="payBank">
<el-input class="addinputInfo addinputw" v-model="formobj.payBank" :disabled="forbidden" maxlength="4" placeholder="" clearable/>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item>
<el-input class="addinputInfo addinputw" v-model="formobj.remarks" :disabled="forbidden" placeholder="" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">打款凭证</div>
<el-form-item>
<Upload class="addinputInfo" v-show="forbidden !== true" ref="remit" @handleSuccess="remitAdd" @handleRemove="remitRemove" />
</el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">汇款确认书</div>
<el-form-item>
<Upload class="addinputInfo" ref="remittance" @handleSuccess="remittanceAdd" @handleRemove="remittanceRemove" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="padding: 0px">
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="维修单号:">
<el-input v-model="listQuery.billNo" size="mini" placeholder="" style="width: 110px" clearable/>
</el-form-item>
<el-form-item label="客户名称:">
<el-input v-model="listQuery.customerName" size="mini" placeholder="" style="width: 100px" clearable/>
</el-form-item>
<el-form-item label="联系电话:">
<el-input v-model="listQuery.customerPhone" size="mini" placeholder="" style="width: 140px" clearable/>
</el-form-item>
<el-form-item label="车架号:">
<el-input v-model="listQuery.vinNo" size="mini" placeholder="" style="width: 140px" clearable/>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center">
<div style="padding-left: 20%">
<el-button type="primary" size="mini" @click="handleFilter">查询</el-button>
<el-button type="primary" size="mini" @click="handReset">重置</el-button>
</div>
<div>
<span >余额:{{ balanceByComputed }}</span>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<div>
<div class="tableTitle">应收未收款款项明细</div>
<el-table border :key="overduereceivableKey" width="100%" :data="overduereceivable_list">
<el-table-column fixed label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="handAdd(scope.row)">添加</el-button>
</template>
</el-table-column>
<el-table-column label="维修单号" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.contractNo }}
</template>
</el-table-column>
<el-table-column label="车架号/车牌号" align="center" width="130">
<template slot-scope="scope">
{{ scope.row.VIN }}/{{ scope.row.vehMark }}
</template>
</el-table-column>
<el-table-column label="客户/电话" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.customerName }} {{ scope.row.customerPhone }}
</template>
</el-table-column>
<el-table-column label="维修单类型" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.billType }}
</template>
</el-table-column>
<el-table-column label="应收金额" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.reveivableMoney }}
</template>
</el-table-column>
<el-table-column label="应收项目" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.receivablesName }}
</template>
</el-table-column>
<el-table-column label="当前应收" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.currentReceivableMoney }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="14">
<div>
<div class="tableTitle">已选款项明细</div>
<el-table border :key="selectedreceivableKey" width="100%" :data="formobj.finSelectedReceivablesDetaileds">
<el-table-column fixed label="操作" align="center" width="70">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handDelete(scope.row)">移除</el-button>
</template>
</el-table-column>
<el-table-column label="维修单号" align="center" width="95">
<template slot-scope="scope">
{{ scope.row.contractNo }}
</template>
</el-table-column>
<el-table-column label="车架号/车牌号" align="center" width="130">
<template slot-scope="scope">
{{ scope.row.VIN }}/{{ scope.row.vehMark }}
</template>
</el-table-column>
<el-table-column label="客户/电话" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.customerName }} {{ scope.row.customerPhone }}
</template>
</el-table-column>
<el-table-column label="维修单类型" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.billType }}
</template>
</el-table-column>
<el-table-column label="应收项目" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.receivablesName }}
</template>
</el-table-column>
<el-table-column label="当前应收" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.currentReceivableMoney }}
</template>
</el-table-column>
<el-table-column label="认款金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.subscriptionMoney" @input="changeMoney(scope.row)" @keyup.native="scope.row.subscriptionMoney = getNumber(scope.row.subscriptionMoney, 2)" placeholder="" clearable/>
</template>
</el-table-column>
<el-table-column label="剩余应收" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.surplusReceivable }}</span>
</template>
</el-table-column>
<el-table-column label="认款申请日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.subscriptionDate }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/anruifinmanagement/subscriptionAfterSale'
import Upload from '@/components/uploadFile/filesUpload' //
import { selAccountByOrgSid, typeValues } from '@/api/jichuxinxi/dictcommons'
export default {
name: 'DaiShouKuanAdd',
components: {
Upload
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
overduereceivableKey: 0,
selectedreceivableKey: 1,
collectionBankNum_list: [],
receiptType_list: [],
overduereceivable_list: [],
forbidden: false,
list1: [],
list2: [],
formobj: {
sid: '',
createDept: '',
createDeptSid: '',
createDate: '',
createByName: '',
staffSid: '',
collectionDate: '',
collectionBank: '',
collectionBankKey: '',
collectionBankNum: '',
collectionBankNumKey: '',
collectionTypeKey: '',
collectionTypeValue: '',
payerName: '',
collectionMoney: '',
paymentVoucherUrl: '',
remittanceConfirmationUrl: '',
useOrgSid: '',
userSid: '',
receivingName: '',
payBank: '',
payAccount: '',
accountSid: '',
orgPath: '',
finSelectedReceivablesDetaileds: [],
paymentVoucherAppendixs: [],
remittanceConfirmationAppendixs: []
},
listQuery: {
billNo: '',
customerName: '',
customerPhone: '',
sids: [],
createBySid: '',
vinNo: '',
orgPath: '',
deptSid: '',
state: ''
},
rules: {
collectionMoney: [{ required: true, message: '收款金额不能为空', trigger: 'blur' }],
collectionDate: [{ required: true, message: '收款日期不能为空', trigger: 'change' }],
collectionTypeValue: [{ required: true, message: '收款方式不能为空', trigger: 'change' }],
payerName: [{ required: true, message: '付款方不能为空', trigger: 'blur' }],
collectionBankNum: [{ required: true, message: '收款银行账号不能为空', trigger: 'change' }],
payAccount: [{ required: true, message: '付款账号后4位不能为空', trigger: 'blur' }],
payBank: [{ required: true, message: '付款银行不能为空', trigger: 'blur' }]
}
}
},
computed: {
// = -
balanceByComputed() {
let balance = ''
if (this.formobj.finSelectedReceivablesDetaileds.length > 0) {
this.formobj.finSelectedReceivablesDetaileds.forEach((e) => {
balance = Math.round((parseFloat(balance !== '' ? balance : 0) + parseFloat(e.subscriptionMoney !== '' ? e.subscriptionMoney : 0)) * 100) / 100
})
balance = Math.round((parseFloat(this.formobj.collectionMoney !== '' ? this.formobj.collectionMoney : 0) - parseFloat(balance)) * 100) / 100
}
return balance
}
},
methods: {
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') //
val = val.replace(/^00/, '0.') // 0
val = val.replace(/^\./g, '0.') // 0.
val = val.replace(/\.{2,}/g, '.') //
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
/^0\d+/.test(val) ? val = val.slice(1) : '' // 0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
//
val = val.replace(reg, '$1')
} else {
//
val = val.replace(reg, '$1.$2')
}
return val
},
DataDictionary() {
typeValues({ type: 'customerPayType' }).then((res) => {
if (res.success) {
this.receiptType_list = res.data
}
})
},
showAdd() {
this.DataDictionary()
this.viewTitle = '【新建】售后认款申请'
this.formobj.createByName = window.sessionStorage.getItem('name')
this.formobj.staffSid = window.sessionStorage.getItem('staffSid')
this.formobj.createDept = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1)
this.formobj.createDeptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1)
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate()
}
this.formobj.createDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
this.formobj.collectionDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
this.getlist()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
changeCollectionBankNum(value) {
const choose = this.collectionBankNum_list.filter((item) => item.bankAccount === value)
if (choose.length > 0 && choose !== null) {
this.formobj.accountSid = choose[0].accountSid
this.formobj.collectionBankNum = choose[0].bankAccount
this.formobj.receivingName = choose[0].accountName
this.formobj.collectionBank = choose[0].depositBank
} else {
this.formobj.accountSid = ''
this.formobj.collectionBankNum = ''
this.formobj.receivingName = ''
this.formobj.collectionBank = ''
}
},
changeCollectionType(value) {
const choose = this.receiptType_list.filter((item) => item.dictKey === value)
if (choose.length > 0 && choose !== null) {
this.formobj.collectionTypeValue = choose[0].dictValue
this.formobj.collectionTypeKey = choose[0].dictKey
if (this.formobj.collectionTypeKey === '03' || this.formobj.collectionTypeKey === '05') {
selAccountByOrgSid({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath'), collectionTypeKey: this.formobj.collectionTypeKey }).then((resp) => {
if (resp.success) {
this.collectionBankNum_list = resp.data
}
})
} else {
this.collectionBankNum_list = []
}
} else {
this.formobj.collectionTypeValue = ''
this.formobj.collectionTypeKey = ''
this.collectionBankNum_list = []
}
},
getlist() {
this.listQuery.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.deptSid = this.formobj.createDeptSid
this.listQuery.state = '1'
req.asListAll(this.listQuery).then((res) => {
if (res.success) {
this.overduereceivable_list = res.data
}
})
},
handleFilter() {
this.getlist()
},
handReset() {
this.listQuery = {
billNo: '',
customerName: '',
customerPhone: '',
sids: [],
createBySid: '',
vinNo: '',
orgPath: '',
state: '',
deptSid: ''
}
this.getlist()
},
handAdd(row) {
if (this.formobj.collectionMoney === '') {
this.$message({ showClose: true, type: 'error', message: '请先填写收款金额' })
} else {
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate()
}
var dayDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
this.formobj.finSelectedReceivablesDetaileds.push({
createByName: window.sessionStorage.getItem('name'),
contractSid: row.contractSid,
contractNo: row.contractNo,
customerSid: row.customerSid,
customerName: row.customerName,
VIN: row.vin,
vehMark: row.vehMark,
useOrgSid: '',
customerPhone: row.customerPhone,
receivablesName: row.receivablesName,
currentReceivableMoney: row.currentReceivableMoney,
lastSubscriptionMoney: '',
subscriptionMoney: '',
surplusReceivable: '',
subscribedOf: row.subscribedOf,
subscriptionDate: dayDate,
collSid: '',
receivablesSid: row.sid,
billType: row.billType,
payTypeKey: row.payTypeKey,
sid: row.sid
})
this.listQuery.sids.push(row.sid)
this.getlist()
}
},
handDelete(row) {
this.formobj.finSelectedReceivablesDetaileds.splice(this.formobj.finSelectedReceivablesDetaileds.indexOf(row), 1)
if (row.subscribedOf == 0) {
this.listQuery.sids.splice(this.listQuery.sids.indexOf(row.sid), 1)
this.getlist()
}
},
// = -
changeMoney(row) {
row.surplusReceivable = Math.round((parseFloat(row.currentReceivableMoney !== '' ? row.currentReceivableMoney : 0) - parseFloat(row.subscriptionMoney !== '' ? row.subscriptionMoney : 0)) * 100) / 100
},
remitAdd(item) {
var arrayList = []
arrayList = item.data
this.formobj.paymentVoucherAppendixs.push({
createBySid: window.sessionStorage.getItem('userSid'),
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
})
},
remitRemove(item) {
this.formobj.paymentVoucherAppendixs.forEach((e, index) => {
if (item.name.indexOf(e.fileName) === 0) {
this.formobj.paymentVoucherAppendixs.splice(index, 1)
}
})
},
remittanceAdd(item) {
var arrayList = []
arrayList = item.data
this.formobj.remittanceConfirmationAppendixs.push({
createBySid: window.sessionStorage.getItem('userSid'),
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
})
},
remittanceRemove(item) {
this.formobj.remittanceConfirmationAppendixs.forEach((e, index) => {
if (item.name.indexOf(e.fileName) === 0) {
this.formobj.remittanceConfirmationAppendixs.splice(index, 1)
}
})
},
submit() {
if (this.formobj.paymentVoucherAppendixs.length > 0) {
var paymentVoucherUrl_list = []
for (var i = 0; i < this.formobj.paymentVoucherAppendixs.length; i++) {
paymentVoucherUrl_list.push(this.formobj.paymentVoucherAppendixs[i].filePath)
}
this.formobj.paymentVoucherUrl = paymentVoucherUrl_list.join(',')
}
if (this.formobj.remittanceConfirmationAppendixs.length > 0) {
var remittanceConfirmationUrl_list = []
for (var b = 0; b < this.formobj.remittanceConfirmationAppendixs.length; b++) {
remittanceConfirmationUrl_list.push(this.formobj.remittanceConfirmationAppendixs[b].filePath)
}
this.formobj.remittanceConfirmationUrl = remittanceConfirmationUrl_list.join(',')
}
this.formobj.userSid = window.sessionStorage.getItem('userSid')
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
createDept: '',
createDeptSid: '',
createDate: '',
createByName: '',
staffSid: '',
collectionDate: '',
collectionBank: '',
collectionBankKey: '',
collectionBankNum: '',
collectionBankNumKey: '',
collectionTypeKey: '',
collectionTypeValue: '',
payerName: '',
collectionMoney: '',
paymentVoucherUrl: '',
remittanceConfirmationUrl: '',
useOrgSid: '',
userSid: '',
receivingName: '',
payBank: '',
payAccount: '',
accountSid: '',
orgPath: '',
finSelectedReceivablesDetaileds: [],
paymentVoucherAppendixs: [],
remittanceConfirmationAppendixs: []
}
this.listQuery = {
billNo: '',
customerName: '',
customerPhone: '',
sids: [],
createBySid: '',
vinNo: '',
orgPath: '',
state: ''
}
this.list1 = []
this.list2 = []
this.forbidden = false
this.$nextTick(() => {
this.$refs['remit'].show(this.list1)
this.$refs['remittance'].show(this.list2)
})
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
</style>

221
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/subscriptionAfterSale/subscriptionAfterSaleInfo.vue

@ -0,0 +1,221 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<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.createDept }}</span></el-form-item>
</el-col>
<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.createDate }}</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.collectionTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收款金额()</div>
<el-form-item><span class="addinputInfo">{{ formobj.collectionMoney }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收款日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.collectionDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">
<el-col :span="8">
<div class="span-sty">收款银行账号</div>
<el-form-item><span class="addinputInfo">{{ formobj.collectionBankNum }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收款账户名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.receivingName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收款银行</div>
<el-form-item><span class="addinputInfo">{{ formobj.collectionBank }}</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.payerName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">
<div class="span-sty">付款账号后4位</div>
<el-form-item><span class="addinputInfo">{{ formobj.payAccount }}</span></el-form-item>
</div>
</el-col>
<el-col :span="8">
<div v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">
<div class="span-sty">付款银行</div>
<el-form-item><span class="addinputInfo">{{ formobj.payBank }}</span></el-form-item>
</div>
</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="12">
<div class="span-sty">打款凭证</div>
<el-form-item>
<div class="addinputInfo">
<span v-for="(item, index) in list1" :key="index">
<el-link :underline="false" :href="item.path" target="_blank">{{ item.name }}</el-link>
</span>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">汇款确认书</div>
<el-form-item>
<div class="addinputInfo">
<span v-for="(item, index) in list2" :key="index">
<el-link :underline="false" :href="item.path" target="_blank">{{ item.name }}</el-link>
</span>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="formobj.reason !== ''">
<el-col :span="24">
<div class="span-sty">审核状态</div>
<el-form-item><span class="addinputInfo">{{ formobj.reason }}</span></el-form-item>
</el-col>
</el-row>
<el-table border :key="selectedreceivableKey" style="width: 100%" :data="formobj.finSelectedReceivablesDetaileds">
<el-table-column label="维修单号" align="center">
<template slot-scope="scope">
{{ scope.row.contractNo }}
</template>
</el-table-column>
<el-table-column label="车架号/车牌号" align="center">
<template slot-scope="scope">
{{ scope.row.VIN }}/{{ scope.row.vehMark }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center">
<template slot-scope="scope">
{{ scope.row.customerName }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
{{ scope.row.customerPhone }}
</template>
</el-table-column>
<el-table-column label="维修单类型" align="center">
<template slot-scope="scope">
{{ scope.row.billType }}
</template>
</el-table-column>
<el-table-column label="应收项目" align="center">
<template slot-scope="scope">
{{ scope.row.receivablesName }}
</template>
</el-table-column>
<el-table-column label="当前应收" align="center">
<template slot-scope="scope">
{{ scope.row.currentReceivableMoney }}
</template>
</el-table-column>
<el-table-column label="认款金额" align="center">
<template slot-scope="scope">
{{ scope.row.subscriptionMoney }}
</template>
</el-table-column>
<el-table-column label="认款申请日期" align="center">
<template slot-scope="scope">
{{ scope.row.subscriptionDate }}
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
{{ scope.row.auditState == 1 ? '待审核' : scope.row.auditState == 2 ? '已驳回' : scope.row.auditState == 3 ? '已审核' : '其他' }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/anruifinmanagement/subscriptionAfterSale'
export default {
name: 'DaiShouKuanInfo',
data() {
return {
viewTitle: '',
selectedreceivableKey: 0,
formobj: {},
rules: {},
list1: [],
list2: []
}
},
methods: {
showInfo(row) {
this.viewTitle = '认款详情'
req.fetchBySid(row.sid).then((resp) => {
if (resp.success) {
this.formobj = resp.data
if (this.formobj.paymentVoucherAppendixs.length > 0) {
this.formobj.paymentVoucherAppendixs.forEach((e) => {
this.list1.push({
name: e.fileName,
path: e.filePath
})
})
}
if (this.formobj.remittanceConfirmationAppendixs.length > 0) {
this.formobj.remittanceConfirmationAppendixs.forEach((e) => {
this.list2.push({
name: e.fileName,
path: e.filePath
})
})
}
}
}).catch(e => {
this.formobj = row
})
},
handleReturn() {
this.formobj = {}
this.list1 = []
this.list2 = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>
Loading…
Cancel
Save