
26 changed files with 2146 additions and 645 deletions
@ -0,0 +1,58 @@ |
|||||
|
package com.yxt.anrui.buscenter.api.common; |
||||
|
|
||||
|
import lombok.Getter; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2023/2/8 8:52 |
||||
|
* @Description 销售订单常量等相关参数 |
||||
|
*/ |
||||
|
public class BusSalesOrderConstantUtils { |
||||
|
/** |
||||
|
* 销售部经理角色sid |
||||
|
*/ |
||||
|
public static String SALES_MANAGER_ROLESID = "f07e98d3-d179-48ee-a5ff-5928addead3f"; |
||||
|
/** |
||||
|
* 总经理角色sid |
||||
|
*/ |
||||
|
public static String GENERAL_MANAGER_ROLESID = "135b4829-2928-4124-a5b3-7d4b1101a863"; |
||||
|
|
||||
|
/** |
||||
|
* 车辆临时状态 |
||||
|
*/ |
||||
|
@Getter |
||||
|
public static enum TypeEnum { |
||||
|
/** |
||||
|
* 现车 |
||||
|
*/ |
||||
|
EXISTING_CAR("1", "现车"), |
||||
|
/** |
||||
|
* 采购订单 |
||||
|
*/ |
||||
|
PURCHASE_ORDER("2", "采购订单"), |
||||
|
/** |
||||
|
* 需采购 |
||||
|
*/ |
||||
|
PRODUCTION_SCHEDULING("3", "排产"); |
||||
|
|
||||
|
/** |
||||
|
* code值 |
||||
|
*/ |
||||
|
private final String code; |
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private final String remarks; |
||||
|
|
||||
|
/** |
||||
|
* 构造器 |
||||
|
* |
||||
|
* @param code code值 |
||||
|
* @param remarks 备注 |
||||
|
*/ |
||||
|
private TypeEnum(String code, String remarks) { |
||||
|
this.code = code; |
||||
|
this.remarks = remarks; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,304 @@ |
|||||
|
<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-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> |
||||
|
<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="80"> |
||||
|
<template slot-scope="scope"> |
||||
|
<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.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> |
||||
|
<agencyfundAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
||||
|
<agencyfundInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listPage } from '@/api/anruifinmanagement/paymentConfirmation.js' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import { typeValues } from '@/api/jichuxinxi/dictcommons' |
||||
|
import agencyfundAdd from './agencyfundAdd.vue' |
||||
|
import agencyfundInfo from './agencyfundInfo.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DaiShouKuan', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar, |
||||
|
agencyfundAdd, |
||||
|
agencyfundInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
isSearchShow: false, |
||||
|
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: '', |
||||
|
collectionStartDate: '', |
||||
|
collectionEndDate: '', |
||||
|
collectionBank: '', |
||||
|
collectionTypeKey: '', |
||||
|
subscriptionState: '', |
||||
|
useOrgSid: '', |
||||
|
createBySid: '', |
||||
|
state: '', |
||||
|
orgPath: '' |
||||
|
}, |
||||
|
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.createBySid = window.sessionStorage.getItem('userSid') |
||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
this.listQuery.params.state = 0 |
||||
|
listPage(this.listQuery).then((response) => { |
||||
|
this.listLoading = false |
||||
|
if (response.code === '200') { |
||||
|
this.listQuery.total = response.data.total |
||||
|
this.list = response.data.records |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 查询按钮 |
||||
|
handleFilter() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
handReset() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
params: { |
||||
|
collectionStartDate: '', |
||||
|
collectionEndDate: '', |
||||
|
collectionBank: '', |
||||
|
collectionTypeKey: '', |
||||
|
subscriptionState: '', |
||||
|
useOrgSid: '', |
||||
|
createBySid: '', |
||||
|
state: '', |
||||
|
orgPath: '' |
||||
|
}, |
||||
|
total: 0 |
||||
|
} |
||||
|
this.getList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showAdd() |
||||
|
}, |
||||
|
handUpdate(row) { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showEdit(row) |
||||
|
}, |
||||
|
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> |
@ -0,0 +1,881 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<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" label-position="top" class="formadd"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>申请部门</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.createDept }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>申请人</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.createByName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>申请日期</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.createDate }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>销售部门</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item prop="staffDeptName"> |
||||
|
<el-select v-model="formobj.staffDeptName" placeholder="请选择" :disabled="forbidden" @change="changeStaffDept" filterable> |
||||
|
<el-option v-for="item in staffDept_list" :key="item.orgDeptSid" :label="item.orgDeptName" :value="item.orgDeptName"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>销售专员</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item prop="staffName"> |
||||
|
<el-select v-model="formobj.staffName" placeholder="请选择" :disabled="forbidden" @change="changeStaff" filterable> |
||||
|
<el-option v-for="item in staff_list" :key="item.staffSid" :label="item.staffName" :value="item.staffName"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>采购系统</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item prop="purchaseSystemName"> |
||||
|
<el-select v-model="formobj.purchaseSystemName" placeholder="请选择" :disabled="forbidden" @change="changePurchase" filterable clearable> |
||||
|
<el-option v-for="item in purchase_list" :key="item.deptSid" :label="item.purchaseSystemName" :value="item.purchaseSystemName"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>收款方式</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item prop="collectionTypeValue"> |
||||
|
<el-select 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="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>收款金额(元)</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item prop="collectionMoney"> |
||||
|
<el-input v-model="formobj.collectionMoney" @keyup.native="UpNumber" @keydown.native="UpNumber" :disabled="forbidden" @change="changeCollectionMoney" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>收款日期</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item prop="collectionDate"> |
||||
|
<el-date-picker 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-show="formobj.collectionTypeKey === '03'"> |
||||
|
<el-col :span="4" class="tleftb balanceStyle"> |
||||
|
<span><span class="icon">*</span>收款银行账号</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tlineheightb"> |
||||
|
<el-form-item> |
||||
|
<el-select 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="4" class="tleftb balanceStyle"> |
||||
|
<span>收款银行名称</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tlineheightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.receivingName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb balanceStyle"> |
||||
|
<span>收款银行</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tlineheightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionBank }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span><span class="icon">*</span>付款方名称</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item prop="payerName"> |
||||
|
<el-input v-model="formobj.payerName" :disabled="forbidden" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span v-show="formobj.collectionTypeKey === '03'"><span class="icon">*</span>付款账号后4位</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<el-input v-model="formobj.payAccount" v-show="formobj.collectionTypeKey === '03'" :disabled="forbidden" maxlength="4" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span v-show="formobj.collectionTypeKey === '03'">付款银行</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<el-input v-model="formobj.payBank" v-show="formobj.collectionTypeKey === '03'" :disabled="forbidden" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>备注</span> |
||||
|
</el-col> |
||||
|
<el-col :span="20" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<el-input v-model="formobj.remarks" :disabled="forbidden" style="width: 70%" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>打款凭证</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<Upload v-show="forbidden !== true" style="float:left;" ref="remit" @handleSuccess="remitAdd" @handleRemove="remitRemove" /> |
||||
|
<span v-show="forbidden == true" v-for="(item, index) in list1" :key="index">{{ item.name }} |
||||
|
</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>汇款确认书</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<Upload style="float:left;" 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.contractNo" 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 >余额:</span><el-input v-model="balance" placeholder="" style="width: 120px" readonly/> |
||||
|
</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="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.VIN }} |
||||
|
</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="70"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.payType }} |
||||
|
</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="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.VIN }} |
||||
|
</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="70"> |
||||
|
<template slot-scope="scope"> |
||||
|
{{ scope.row.payType }} |
||||
|
</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)" @change="changeSubscriptionMoney" 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> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { save, listAll, fetchDetailBySid } from '@/api/anruifinmanagement/paymentConfirmation.js' |
||||
|
import Upload from '@/components/uploadFile/filesUpload' // 上传文件 |
||||
|
import { selAccountByOrgSid, typeValues, fetchDetailsByUseOrgSid, getOrgSidByPath, selectOrgList } from '@/api/jichuxinxi/dictcommons' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DaiShouKuanAdd', |
||||
|
components: { |
||||
|
Upload |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
dialogStatus: '', |
||||
|
overduereceivableKey: 0, |
||||
|
selectedreceivableKey: 1, |
||||
|
staffDept_list: [], |
||||
|
staff_list: [], |
||||
|
receiptBank_list: [], |
||||
|
collectionBankNum_list: [], |
||||
|
receiptType_list: [], |
||||
|
overduereceivable_list: [], |
||||
|
purchase_list: [], |
||||
|
forbidden: false, |
||||
|
list1: [], |
||||
|
list2: [], |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
createDept: '', |
||||
|
createDeptSid: '', |
||||
|
createDate: '', |
||||
|
createByName: '', |
||||
|
staffSid: '', |
||||
|
collectionDate: '', |
||||
|
collectionBank: '', |
||||
|
collectionBankKey: '', |
||||
|
collectionBankNum: '', |
||||
|
collectionBankNumKey: '', |
||||
|
collectionTypeKey: '', |
||||
|
collectionTypeValue: '', |
||||
|
payerName: '', |
||||
|
collectionMoney: '', |
||||
|
paymentVoucherUrl: '', |
||||
|
remittanceConfirmationUrl: '', |
||||
|
balance: '', |
||||
|
useOrgSid: '', |
||||
|
userSid: '', |
||||
|
receivingName: '', |
||||
|
payBank: '', |
||||
|
payAccount: '', |
||||
|
accountSid: '', |
||||
|
purchaseSystemName: '', |
||||
|
purchaseSystemSid: '', |
||||
|
orgPath: '', |
||||
|
staffName: '', |
||||
|
staffUserSid: '', |
||||
|
staffDeptName: '', |
||||
|
staffDeptSid: '', |
||||
|
finSelectedReceivablesDetaileds: [], |
||||
|
paymentVoucherAppendixs: [], |
||||
|
remittanceConfirmationAppendixs: [] |
||||
|
}, |
||||
|
listQuery: { |
||||
|
contractNo: '', |
||||
|
customerName: '', |
||||
|
customerPhone: '', |
||||
|
sids: [], |
||||
|
createBySid: '', |
||||
|
vinNo: '', |
||||
|
orgPath: '', |
||||
|
purchaseSystemSid: '', |
||||
|
}, |
||||
|
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' }], |
||||
|
purchaseSystemName: [{ required: true, message: '采购系统不能为空', trigger: 'change' }], |
||||
|
staffDeptName: [{ required: true, message: '销售部门不能为空', trigger: 'change' }], |
||||
|
staffName: [{ required: true, message: '销售专员不能为空', trigger: 'change' }] |
||||
|
}, |
||||
|
submitdisabled: false, |
||||
|
balance: '', // 余额 |
||||
|
balanceCopy: '' // 计算余额时使用(针对已选应收款项明细表中认款金额多次输入导致余额计算错误) |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取制单日期 |
||||
|
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.formobj.createDate = year + '-' + month + '-' + day |
||||
|
this.formobj.collectionDate = year + '-' + month + '-' + day |
||||
|
}, |
||||
|
UpNumber(e) { |
||||
|
e.target.value = e.target.value.replace(/[^\d]/g, '') // 清除“数字”和“.”"-"以外的字符 |
||||
|
e.target.value = e.target.value.replace(/^00/, '0') // 开头不能有两个0 |
||||
|
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { |
||||
|
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 |
||||
|
console.log(e.target.value) |
||||
|
e.target.value = parseFloat(e.target.value) |
||||
|
} |
||||
|
}, |
||||
|
DataDictionary() { |
||||
|
typeValues({ type: 'receiptBank' }).then((res) => { |
||||
|
if (res.code === '200') { |
||||
|
this.receiptBank_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
typeValues({ type: 'customerPayType' }).then((res) => { |
||||
|
if (res.code === '200') { |
||||
|
this.receiptType_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
||||
|
if (res.success) { |
||||
|
fetchDetailsByUseOrgSid(res.data).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.purchase_list = resp.data |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
selAccountByOrgSid({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.collectionBankNum_list = resp.data |
||||
|
} |
||||
|
}) |
||||
|
selectOrgList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.staffDept_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
changeStaffDept(value) { |
||||
|
const choose = this.staffDept_list.filter((item) => item.orgDeptName === value) |
||||
|
this.formobj.staffDeptSid = choose[0].orgDeptSid |
||||
|
this.staff_list = choose[0].staffinfoVoList |
||||
|
}, |
||||
|
changeStaff(value) { |
||||
|
const choose = this.staff_list.filter((item) => item.staffName === value) |
||||
|
this.formobj.staffUserSid = choose[0].staffSid |
||||
|
this.listQuery.createBySid = choose[0].userSid |
||||
|
}, |
||||
|
changeCollectionBankNum(value) { |
||||
|
let aa = null |
||||
|
this.collectionBankNum_list.forEach((e) => { |
||||
|
if (e.bankAccount === value) { |
||||
|
aa = { |
||||
|
accountSid: e.accountSid, |
||||
|
accountName: e.accountName, |
||||
|
depositBank: e.depositBank, |
||||
|
bankAccount: e.bankAccount |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
this.formobj.accountSid = aa.accountSid |
||||
|
this.formobj.collectionBankNum = aa.bankAccount |
||||
|
this.formobj.receivingName = aa.accountName |
||||
|
this.formobj.collectionBank = aa.depositBank |
||||
|
}, |
||||
|
changePurchase(value) { |
||||
|
if (this.formobj.staffName === '') { |
||||
|
this.formobj.purchaseSystemName = '' |
||||
|
this.$message({ showClose: true, type: 'error', message: '请先选择销售专员' }) |
||||
|
return |
||||
|
} |
||||
|
const choose = this.purchase_list.filter((item) => item.purchaseSystemName === value) |
||||
|
this.formobj.purchaseSystemSid = choose[0].deptSid |
||||
|
this.getlist() |
||||
|
}, |
||||
|
changeCollectionType(value) { |
||||
|
let aa = null |
||||
|
this.receiptType_list.forEach((e) => { |
||||
|
if (e.dictKey === value) { |
||||
|
aa = { |
||||
|
name: e.dictValue, |
||||
|
value: e.dictKey |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
this.formobj.collectionTypeValue = aa.name |
||||
|
this.formobj.collectionTypeKey = aa.value |
||||
|
}, |
||||
|
changeCollectionMoney() { |
||||
|
if (this.dialogStatus === '') { |
||||
|
this.balance = this.formobj.collectionMoney |
||||
|
this.balanceCopy = this.formobj.collectionMoney |
||||
|
} |
||||
|
}, |
||||
|
changeMoney(row) { |
||||
|
if (row.subscriptionMoney !== '') { |
||||
|
row.surplusReceivable = parseFloat(row.currentReceivableMoney) - parseFloat(row.subscriptionMoney) |
||||
|
} else { |
||||
|
row.surplusReceivable = '' |
||||
|
} |
||||
|
}, |
||||
|
changeSubscriptionMoney() { |
||||
|
let subscriptionMoney = '0' |
||||
|
for (var i = 0; i < this.formobj.finSelectedReceivablesDetaileds.length; i++) { |
||||
|
if (this.formobj.finSelectedReceivablesDetaileds[i].subscriptionMoney === '') { |
||||
|
subscriptionMoney = '1' |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
if (subscriptionMoney === '0') { |
||||
|
this.calculateBalance() |
||||
|
} |
||||
|
}, |
||||
|
// 计算余额 |
||||
|
calculateBalance() { |
||||
|
var list = [] |
||||
|
for (var b = 0; b < this.formobj.finSelectedReceivablesDetaileds.length; b++) { |
||||
|
list.push(this.formobj.finSelectedReceivablesDetaileds[b].subscriptionMoney) |
||||
|
} |
||||
|
var sumNum = 0 |
||||
|
for (var i = 0; i < list.length; i++) { |
||||
|
// 替换掉字符串中的千分位分隔符并相加 |
||||
|
sumNum += Number(list[i].replace(/,/g, '')) |
||||
|
} |
||||
|
// 将总数四舍五入 |
||||
|
var f1 = Math.round(sumNum * 100) / 100 |
||||
|
// 转化为字符串 |
||||
|
var strNum = f1.toString() |
||||
|
// 将整数和小数点分割 |
||||
|
var rs = strNum.indexOf('.') |
||||
|
if (rs < 0) { |
||||
|
rs = strNum.length |
||||
|
strNum += '.' |
||||
|
} |
||||
|
while (strNum.length <= rs + 2) { |
||||
|
strNum += '0' |
||||
|
} |
||||
|
var resNum = strNum.replace(/\d+/, function(n) { |
||||
|
return n.replace(/(\d)(?=(\d{3})+$)/g, function(u) { |
||||
|
return u |
||||
|
}) |
||||
|
}) |
||||
|
this.balance = parseInt(this.balanceCopy) - parseInt(resNum) |
||||
|
}, |
||||
|
getlist() { |
||||
|
if (this.formobj.purchaseSystemName === '') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择采购系统' }) |
||||
|
return |
||||
|
} |
||||
|
this.listQuery.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
this.listQuery.purchaseSystemSid = this.formobj.purchaseSystemSid |
||||
|
listAll(this.listQuery).then((res) => { |
||||
|
if (res.code === '200') { |
||||
|
this.overduereceivable_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleFilter() { |
||||
|
this.getlist() |
||||
|
}, |
||||
|
handReset() { |
||||
|
this.listQuery = { |
||||
|
contractNo: '', |
||||
|
customerName: '', |
||||
|
customerPhone: '', |
||||
|
sids: [], |
||||
|
createBySid: '', |
||||
|
vinNo: '', |
||||
|
orgPath: '', |
||||
|
purchaseSystemSid: '' |
||||
|
} |
||||
|
this.getlist() |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.DataDictionary() |
||||
|
this.newDate() |
||||
|
this.viewTitle = '【新建】收款申请' |
||||
|
this.formobj.createByName = window.sessionStorage.getItem('name') |
||||
|
this.formobj.staffSid = window.sessionStorage.getItem('staffSid') |
||||
|
this.formobj.createDept = window.sessionStorage.getItem('departmentName') |
||||
|
this.formobj.createDeptSid = window.sessionStorage.getItem('departmentSid') |
||||
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.DataDictionary() |
||||
|
this.viewTitle = '【编辑】收款申请' |
||||
|
this.dialogStatus = 'edit' |
||||
|
fetchDetailBySid(row.sid).then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
this.balance = this.formobj.balance |
||||
|
this.balanceCopy = this.formobj.balance |
||||
|
this.getlist() |
||||
|
this.forbidden = true |
||||
|
if (this.formobj.paymentVoucherAppendixs.length > 0) { |
||||
|
for (var i = 0; i < this.formobj.paymentVoucherAppendixs.length; i++) { |
||||
|
this.list1.push({ |
||||
|
name: this.formobj.paymentVoucherAppendixs[i].fileName |
||||
|
} |
||||
|
) |
||||
|
} |
||||
|
} |
||||
|
if (this.formobj.remittanceConfirmationAppendixs.length > 0) { |
||||
|
for (var b = 0; b < this.formobj.remittanceConfirmationAppendixs.length; b++) { |
||||
|
this.list2.push({ |
||||
|
name: this.formobj.remittanceConfirmationAppendixs[b].fileName |
||||
|
} |
||||
|
) |
||||
|
} |
||||
|
} |
||||
|
this.formobj.finSelectedReceivablesDetaileds = [] |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['remit'].show(this.list1) |
||||
|
this.$refs['remittance'].show(this.list2) |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
this.formobj = row |
||||
|
}) |
||||
|
}, |
||||
|
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) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
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, |
||||
|
useOrgSid: '', |
||||
|
customerPhone: row.customerPhone, |
||||
|
receivablesName: row.receivablesName, |
||||
|
currentReceivableMoney: row.currentReceivableMoney, |
||||
|
lastSubscriptionMoney: '', |
||||
|
subscriptionMoney: '', |
||||
|
surplusReceivable: '', |
||||
|
subscriptionDate: dayDate, |
||||
|
collSid: '', |
||||
|
receivablesSid: row.sid, |
||||
|
payType: row.payType, |
||||
|
payTypeKey: row.payTypeKey, |
||||
|
sid: row.sid |
||||
|
}) |
||||
|
this.listQuery.sids.push(row.sid) |
||||
|
this.getlist() |
||||
|
} |
||||
|
}, |
||||
|
handDelete(row) { |
||||
|
this.listQuery.sids.splice(this.listQuery.sids.indexOf(row.sid), 1) |
||||
|
this.formobj.finSelectedReceivablesDetaileds.splice(this.formobj.finSelectedReceivablesDetaileds.indexOf(row), 1) |
||||
|
this.calculateBalance() |
||||
|
this.getlist() |
||||
|
}, |
||||
|
submit() { |
||||
|
if (this.formobj.collectionTypeKey === '03' && this.formobj.collectionBankNum === '') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '收款银行账号不能为空' }) |
||||
|
return |
||||
|
} |
||||
|
if (this.formobj.collectionTypeKey === '03' && this.formobj.collectionBankNum === '付款账号后4位不能为空') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '' }) |
||||
|
return |
||||
|
} |
||||
|
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(',') |
||||
|
} else { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请上传打款凭证' }) |
||||
|
return |
||||
|
} |
||||
|
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(',') |
||||
|
} else { |
||||
|
for (var k = 0; k < this.formobj.finSelectedReceivablesDetaileds.length; k++) { |
||||
|
if (this.formobj.finSelectedReceivablesDetaileds[k].customerName !== this.formobj.payerName) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请上传汇款确认书' }) |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
save(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: '', |
||||
|
balance: '', |
||||
|
useOrgSid: '', |
||||
|
userSid: '', |
||||
|
receivingName: '', |
||||
|
payBank: '', |
||||
|
payAccount: '', |
||||
|
accountSid: '', |
||||
|
purchaseSystemName: '', |
||||
|
purchaseSystemSid: '', |
||||
|
orgPath: '', |
||||
|
staffName: '', |
||||
|
staffUserSid: '', |
||||
|
staffDeptName: '', |
||||
|
staffDeptSid: '', |
||||
|
finSelectedReceivablesDetaileds: [], |
||||
|
paymentVoucherAppendixs: [], |
||||
|
remittanceConfirmationAppendixs: [] |
||||
|
} |
||||
|
this.listQuery = { |
||||
|
contractNo: '', |
||||
|
customerName: '', |
||||
|
customerPhone: '', |
||||
|
sids: [], |
||||
|
createBySid: '' |
||||
|
} |
||||
|
this.list1 = [] |
||||
|
this.list2 = [] |
||||
|
this.forbidden = false |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['remit'].show(this.list1) |
||||
|
this.$refs['remittance'].show(this.list2) |
||||
|
}) |
||||
|
this.balance = '' |
||||
|
this.balanceCopy = '' |
||||
|
this.dialogStatus = '' |
||||
|
this.submitdisabled = false |
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.titwu { |
||||
|
padding: 0; |
||||
|
} |
||||
|
.tableTitle{ |
||||
|
border: 1px solid #e0e3eb; |
||||
|
line-height: 42px; |
||||
|
text-align: center; |
||||
|
font-weight: bold; |
||||
|
font-size: 18px; |
||||
|
} |
||||
|
.balanceStyle { |
||||
|
line-height: 15px !important; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.tlineheightb { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: flex-start; |
||||
|
align-items: center; |
||||
|
} |
||||
|
/deep/ .tlineheightb .el-form-item .el-form-item__content { |
||||
|
line-height: 15px !important; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: flex-start; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,333 @@ |
|||||
|
<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" label-position="top" class="formadd"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>申请部门</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.createDept }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>申请人</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.createByName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>申请日期</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.createDate }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>销售部门</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.staffDeptName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>销售专员</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.staffName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>采购系统</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.purchaseSystemName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>收款方式</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionTypeValue }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>收款金额(元)</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionMoney }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>收款日期</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionDate }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row v-show="formobj.collectionTypeKey === '03'"> |
||||
|
<el-col :span="4" class="tleftb balanceStyle"> |
||||
|
<span>收款银行账号</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tlineheightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionBankNum }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb balanceStyle"> |
||||
|
<span>收款银行名称</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tlineheightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.receivingName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb balanceStyle"> |
||||
|
<span>收款银行</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tlineheightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionBank }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>付款方名称</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.payerName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span v-show="formobj.collectionTypeKey === '03'">付款账号后4位</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span v-show="formobj.collectionTypeKey === '03'">{{ formobj.payAccount }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span v-show="formobj.collectionTypeKey === '03'">付款银行</span> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span v-show="formobj.collectionTypeKey === '03'">{{ formobj.payBank }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>备注</span> |
||||
|
</el-col> |
||||
|
<el-col :span="20" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.remarks }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<el-form-item><span>打款凭证</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="20" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span v-for="(item, index) in list1" :key="index"> |
||||
|
<el-link :underline="false" :href="item.path" target="_blank">{{ item.name }}</el-link> |
||||
|
</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<el-form-item><span>汇款确认书</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="20" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span v-for="(item, index) in list2" :key="index"> |
||||
|
<el-link :underline="false" :href="item.path" target="_blank">{{ item.name }}</el-link> |
||||
|
</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="6" class="tleftb"> |
||||
|
<el-form-item><span>收款金额</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.collectionMoney }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="tleftb"> |
||||
|
<el-form-item><span>余额</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.balance }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row v-show="formobj.reason !== ''"> |
||||
|
<el-col :span="6" class="tleftb"> |
||||
|
<el-form-item><span>审核状态</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="18" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ 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 }} |
||||
|
</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.payType }} |
||||
|
</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 { fetchDetailBySid } from '@/api/anruifinmanagement/paymentConfirmation.js' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DaiShouKuanInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
selectedreceivableKey: 0, |
||||
|
formobj: {}, |
||||
|
rules: {}, |
||||
|
list1: [], |
||||
|
list2: [] |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '认款详情' |
||||
|
fetchDetailBySid(row.sid).then(resp => { |
||||
|
if (resp.code === '200') { |
||||
|
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> |
||||
|
.balanceStyle { |
||||
|
line-height: 15px !important; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.tlineheightb { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: flex-start; |
||||
|
align-items: center; |
||||
|
} |
||||
|
/deep/ .tlineheightb .el-form-item .el-form-item__content { |
||||
|
line-height: 15px !important; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: flex-start; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue