@@ -4000,6 +4000,494 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/newBusinessEntity/map'], resolve) | |||
}, | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
//<----------------------------------财务公开_银农路由----------------------------------> | |||
{ | |||
path: '/sunVillage_info/approvalList', | |||
name: 'sunVillageApprovalList', | |||
meta: { | |||
title: '银行卡转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList2', | |||
name: 'sunVillageApprovalList2', | |||
meta: { | |||
title: '信用卡还款列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList2'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList3', | |||
name: 'sunVillageApprovalList3', | |||
meta: { | |||
title: '虚拟挂账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList3'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList4', | |||
name: 'sunVillageApprovalList4', | |||
meta: { | |||
title: '代管转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList4'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList5', | |||
name: 'sunVillageApprovalList5', | |||
meta: { | |||
title: '母子转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList5'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList10', | |||
name: 'sunVillageApprovalList10', | |||
meta: { | |||
title: '现金提现列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList10'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList11', | |||
name: 'sunVillageApprovalList11', | |||
meta: { | |||
title: '备付金支出列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList11'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalList12', | |||
name: 'sunVillageApprovalList12', | |||
meta: { | |||
title: '汇票支出列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalList12'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail', | |||
name: 'sunVillageApprovalDetail', | |||
meta: { | |||
title: '银农银行卡转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail2', | |||
name: 'sunVillageApprovalDetail2', | |||
meta: { | |||
title: '银农信用卡还款申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail2'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail3', | |||
name: 'sunVillageApprovalDetail3', | |||
meta: { | |||
title: '银农虚拟挂账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail3'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail4', | |||
name: 'sunVillageApprovalDetail4', | |||
meta: { | |||
title: '银农代管转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail4'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail5', | |||
name: 'sunVillageApprovalDetail5', | |||
meta: { | |||
title: '银农母子转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail5'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail10', | |||
name: 'sunVillageApprovalDetail10', | |||
meta: { | |||
title: '银农现金提现申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail10'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail11', | |||
name: 'sunVillageApprovalDetail11', | |||
meta: { | |||
title: '银农备付金支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail11'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalDetail12', | |||
name: 'sunVillageApprovalDetail12', | |||
meta: { | |||
title: '银农汇票支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalDetail12'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd', | |||
name: 'sunVillageApprovalAdd', | |||
meta: { | |||
title: '添加银行卡转账申请', | |||
hidden: true, | |||
keepAlive: true | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd2', | |||
name: 'sunVillageApprovalAdd2', | |||
meta: { | |||
title: '添加信用卡还款申请', | |||
hidden: true, | |||
keepAlive: true | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd2'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd3', | |||
name: 'sunVillageApprovalAdd3', | |||
meta: { | |||
title: '添加虚拟挂账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd3'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd4', | |||
name: 'sunVillageApprovalAdd4', | |||
meta: { | |||
title: '添加代管转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd4'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd5', | |||
name: 'sunVillageApprovalAdd5', | |||
meta: { | |||
title: '添加母子转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd5'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd10', | |||
name: 'sunVillageApprovalAdd10', | |||
meta: { | |||
title: '添加现金提现申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd10'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd11', | |||
name: 'sunVillageApprovalAdd11', | |||
meta: { | |||
title: '添加备付金支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd11'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalAdd12', | |||
name: 'sunVillageApprovalAdd12', | |||
meta: { | |||
title: '添加汇票支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalAdd12'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approval/collectionAdd', | |||
name: 'sunVillageApprovalCollectionAdd', | |||
meta: { | |||
title: '添加收款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/collectionAdd'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approval/collectionAdd2', | |||
name: 'sunVillageApprovalCollectionAdd2', | |||
meta: { | |||
title: '添加收款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/collectionAdd2'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approval/collectionApprovalAdd', | |||
name: 'sunVillageCollectionApprovalAdd', | |||
meta: { | |||
title: '添加收款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/collectionApprovalAdd'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalApproval', | |||
name: 'sunVillageApprovalApproval', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalApproval'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalApproval10', | |||
name: 'sunVillageApprovalApproval10', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalApproval10'], resolve) | |||
}, { | |||
path: '/sunVillage_info/approvalApproval11', | |||
name: 'sunVillageApprovalApproval11', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalApproval11'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalApproval12', | |||
name: 'sunVillageApprovalApproval12', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalApproval12'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify', | |||
name: 'sunVillageApprovalModify', | |||
meta: { | |||
title: '修改银行卡转账申请', | |||
hidden: true, | |||
keepAlive: true | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify2', | |||
name: 'sunVillageApprovalModify2', | |||
meta: { | |||
title: '修改信用卡还款申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify2'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify3', | |||
name: 'sunVillageApprovalModify3', | |||
meta: { | |||
title: '修改虚拟挂账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify3'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify4', | |||
name: 'sunVillageApprovalModify4', | |||
meta: { | |||
title: '修改代管转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify4'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify5', | |||
name: 'sunVillageApprovalModify5', | |||
meta: { | |||
title: '修改母子转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify5'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify10', | |||
name: 'sunVillageApprovalModify10', | |||
meta: { | |||
title: '修改现金提现申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify10'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify11', | |||
name: 'sunVillageApprovalModify11', | |||
meta: { | |||
title: '修改备付金支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify11'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalModify12', | |||
name: 'sunVillageApprovalModify12', | |||
meta: { | |||
title: '修改汇票支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalModify12'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalProcess', | |||
name: 'sunVillageApprovalProcess', | |||
meta: { | |||
title: '付款申请流程', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalProcess'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalProcess2', | |||
name: 'sunVillageApprovalProcess2', | |||
meta: { | |||
title: '付款申请流程', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalProcess2'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/approvalProcess3', | |||
name: 'sunVillageApprovalProcess3', | |||
meta: { | |||
title: '审批流程', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentApproval/approvalProcess3'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/collectionList', | |||
name: 'sunVillageCollectionList', | |||
meta: { | |||
title: '银农收款账户列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/collectionAccount/collectionList'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/collectionAdd', | |||
name: 'sunVillageCollectionAdd', | |||
meta: { | |||
title: '添加收款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/collectionAccount/collectionAdd'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/collectionModify', | |||
name: 'sunVillageCollectionModify', | |||
meta: { | |||
title: '修改收款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/collectionAccount/collectionModify'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/collectionDetail', | |||
name: 'sunVillageCollectionDetail', | |||
meta: { | |||
title: '查看收款账户详情', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/collectionAccount/collectionDetail'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/paymentAccountList', | |||
name: 'sunVillagePaymentAccountList', | |||
meta: { | |||
title: '查看付款账户列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentAccount/paymentAccountList'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/paymentAccountAdd', | |||
name: 'sunVillagePaymentAccountAdd', | |||
meta: { | |||
title: '添加付款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentAccount/paymentAccountAdd'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/paymentAccountModify', | |||
name: 'sunVillagePaymentAccountModify', | |||
meta: { | |||
title: '修改付款账户信息', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentAccount/paymentAccountModify'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/paymentAccountDetail', | |||
name: 'sunVillagePaymentAccountDetail', | |||
meta: { | |||
title: '查看付款账户详情', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/paymentAccount/paymentAccountDetail'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/bankOfDepositList', | |||
name: 'sunVillageBankOfDepositList', | |||
meta: { | |||
title: '开户行', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/bankOfDeposit/bankOfDepositList'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/bankOfDepositAdd', | |||
name: 'sunVillageBankOfDepositAdd', | |||
meta: { | |||
title: '添加开户行', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/bankOfDeposit/bankOfDepositAdd'], resolve) | |||
}, | |||
{ | |||
path: '/sunVillage_info/bankOfDepositModify', | |||
name: 'sunVillageBankOfDepositModify', | |||
meta: { | |||
title: '修改开户行', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/sunVillage_info/bankAgriculture/bankOfDeposit/bankOfDepositModify'], resolve) | |||
}, | |||
]; | |||
@@ -0,0 +1,147 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加开户行</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goModify" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<div class="main_box"> | |||
<van-field label="省" required :rules="[{ required: true , message:'请输入省' }]" v-model="form.sheng" placeholder="请输入省" input-align="right" label-width="auto"/> | |||
<van-field label="市" required :rules="[{ required: true , message:'请输入市' }]" v-model="form.shi" placeholder="请输入市" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户行" required :rules="[{ required: true , message:'请输入开户行' }]" v-model="form.bankDeposit" placeholder="请输入开户行" input-align="right" label-width="auto"/> | |||
<van-field label="联行号" required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" placeholder="请输入联行号" input-align="right" label-width="auto"/> | |||
<van-field label="机构号" v-model="form.institutionNumber" placeholder="请输入机构号" input-align="right" label-width="auto"/> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addDeposit } from "@/api/onlineHome/bankAgriculture/bankOfDeposit"; | |||
export default { | |||
name: "paymentAccountAdd", | |||
data() { | |||
return { | |||
showBankType:false, | |||
bankType:'', | |||
// 所属银行字典 | |||
bankTypeOptions: [], | |||
form:{ | |||
sheng: "", //省 必填 | |||
shi: "", //市 必填 | |||
bankType: "", //所属银行 必填 | |||
bankDeposit: "", //开户行 必填 | |||
payeePaymentLines: "", //联行号 //必填 | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
validator(val){ | |||
return /^\d{6,}$/.test(val); | |||
}, | |||
getDetail(){ | |||
// 所属银行 | |||
this.getDicts("bank_type_all").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(val){ | |||
this.showBankType = false | |||
this.bankType = val.text | |||
this.$set(this.form, "bankType", val.value); | |||
}, | |||
goModify(){ | |||
console.log(this.form) | |||
this.form.balance = this.form.initialBalance; | |||
addDeposit(this.form).then((response) => { | |||
this.$toast.success('添加成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,175 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">开户行列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<!-- :to="{name:'paymentAccountDetail', query: {id:item.id,type:'modify'}}"--> | |||
<van-cell :title="item.bankDeposit" center > | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn6.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span>{{item.bankType}}</span></p> | |||
<p style="display: flex;justify-content: space-between;width: 55%;"> | |||
<span style="color: #878787;font-weight: normal;font-size: 12px;width: 60%;text-align:left;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: break-all;overflow: hidden;">{{item.sheng+item.shi}}</span> | |||
<span style="color: #878787;font-weight: normal;font-size: 12px;">{{item.payeePaymentLines}}</span> | |||
</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button square text="修改" type="info" :to="{name:'sunVillageBankOfDepositModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { getList , delDeposit } from "@/api/onlineHome/bankAgriculture/bankOfDeposit"; | |||
export default { | |||
name: "bankOfDepositList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
houseApplyStatus:[], | |||
// 账户类型 字典字典 | |||
accountTypeOptions: [], | |||
// 是否停用 字典 sys_yes_no字典 | |||
statusOptions: [], | |||
// 查询类型字典 | |||
selectTypeOptions: [], | |||
// 来往账标识字典 | |||
directionOptions: [], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum: 1, | |||
pageSize: 10, | |||
}, | |||
statusColor:'#1D6FE9' | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("bank_type").then((response) => { | |||
this.bankTypeOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
this.$router.push({name:'sunVillageBankOfDepositAdd'}) | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
getList(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].bankType = this.selectDictLabel(this.bankTypeOptions, response.rows[i].bankType); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除开户行?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delDeposit(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 1; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__label{ | |||
/*font-size: 14Px;*/ | |||
/*font-weight: bold;*/ | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.6; | |||
color: #333333; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,151 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">修改开户行</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goModify" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<div class="main_box"> | |||
<van-field label="省" required :rules="[{ required: true , message:'请输入省' }]" v-model="form.sheng" placeholder="请输入省" input-align="right" label-width="auto"/> | |||
<van-field label="市" required :rules="[{ required: true , message:'请输入市' }]" v-model="form.shi" placeholder="请输入市" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户行" required :rules="[{ required: true , message:'请输入开户行' }]" v-model="form.bankDeposit" placeholder="请输入开户行" input-align="right" label-width="auto"/> | |||
<van-field label="联行号" required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" placeholder="请输入联行号" input-align="right" label-width="auto"/> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { editDeposit , getDeposit } from "@/api/onlineHome/bankAgriculture/bankOfDeposit"; | |||
export default { | |||
name: "paymentAccountAdd", | |||
data() { | |||
return { | |||
showBankType:false, | |||
bankType:'', | |||
// 所属银行字典 | |||
bankTypeOptions: [], | |||
form:{ | |||
sheng: "", //省 必填 | |||
shi: "", //市 必填 | |||
bankType: "", //所属银行 必填 | |||
bankDeposit: "", //开户行 必填 | |||
payeePaymentLines: "", //联行号 //必填 | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDetail(); | |||
this.form.id = this.$route.query.id; | |||
}, | |||
methods: { | |||
validator(val){ | |||
return /^\d{6,}$/.test(val); | |||
}, | |||
getDetail(){ | |||
getDeposit(this.$route.query.id).then(response => { | |||
console.log(response) | |||
this.houseGetDicts("bank_type_all").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.bankType = this.selectDictLabel(res.data, response.data.bankType); | |||
}); | |||
this.form = response.data; | |||
}); | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(val){ | |||
this.showBankType = false | |||
this.bankType = val.text | |||
this.$set(this.form, "bankType", val.value); | |||
}, | |||
goModify(){ | |||
console.log(this.form) | |||
this.form.balance = this.form.initialBalance; | |||
editDeposit(this.form).then((response) => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,276 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加收款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<div class="main_box" style="margin-bottom: 10px;"> | |||
<van-field v-model="value" placeholder="粘贴信息,自动拆分收款方、收款账号" @input="changeInform" /> | |||
</div> | |||
<van-form @submit="goAdd" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" required :rules="[{ required: true , message:'请输入收款方' }]" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" required :rules="[{ required: true , message:'请输入收款账户' }]" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
@click="showBankDeposit = true" | |||
v-model="bankDeposit" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositOptions" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" readonly required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择账户类型' }]" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
@click="showPayeeType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择收款人类型' }]" | |||
/> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择数据状态' }]" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<van-radio name="1">停用</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addPayee,listDeposit } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionAdd", | |||
data() { | |||
return { | |||
showBankType:false, | |||
showBankDeposit:false, | |||
showPayeeType:false, | |||
form:{ | |||
accountType:'1', | |||
status:'0' | |||
}, | |||
bankType:'', | |||
payeeType:'', | |||
bankDeposit:'', | |||
bankTypeOptions:[], | |||
statusOptions:[], | |||
accountTypeOptions:[], | |||
payeeTypeOptions:[], | |||
bankDepositOptions:[], | |||
value:'' | |||
}; | |||
}, | |||
created() { | |||
this.getDictionaries(); | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("sys_normal_disable").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.statusOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("bank_account_type").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.accountTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
changeInform(val){ | |||
console.log(val) | |||
var that = this; | |||
var str = val; | |||
var numArr = str.match(/\d+/g) | |||
var nameArr = str.match(/[\u4e00-\u9fa5]/g).join("") | |||
console.log(numArr) | |||
console.log(nameArr) | |||
if (numArr) { | |||
numArr.map(rr=>{ | |||
if (rr.length>16) { | |||
const carId = this.isBankCard(rr); | |||
if (carId) { | |||
that.form.payee = nameArr; | |||
that.form.payeeAccount = rr | |||
} | |||
} | |||
}) | |||
} | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(data){ | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.bankDeposit = "" | |||
this.form.payeePaymentLines = "" | |||
this.showBankType = false; | |||
let queryParams={ | |||
"bankType":this.form.bankType, | |||
"status": "0", | |||
} | |||
listDeposit(queryParams).then(response => { | |||
this.bankDepositOptions = [] | |||
for(var i = 0 ; i < response.rows.length ; i++){ | |||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id, | |||
"payeePaymentLines":response.rows[i].payeePaymentLines,"institutionNumber":response.rows[i].institutionNumber}); | |||
} | |||
}); | |||
}, | |||
onConfirmBankDeposit(data){ | |||
this.bankDeposit = data.text | |||
this.form.bankDeposit = data.text | |||
this.form.payeePaymentLines = data.payeePaymentLines | |||
this.form.alternateField10 = data.institutionNumber | |||
this.showBankDeposit = false; | |||
}, | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
addPayee(this.form).then(response => { | |||
this.$toast.success('新增成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,138 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看收款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="收款方" v-model="form.payee" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收款账户" v-model="form.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="bankType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="开户银行" v-model="form.bankDeposit" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="备注" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型"> | |||
<template #right-icon> | |||
{{form.accountType == '1' ? '公户' : '私户' }} | |||
</template> | |||
</van-cell> | |||
<van-field readonly label="收款人类型" v-model="payeeType" input-align="right" label-width="auto" /> | |||
<van-cell title="数据状态"> | |||
<template #right-icon> | |||
{{form.accountType == '0' ? '正常' : '停用' }} | |||
</template> | |||
</van-cell> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getPayee , updatePayee } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionModify", | |||
data() { | |||
return { | |||
showBankType:false, | |||
showPayeeType:false, | |||
form:{}, | |||
bankType:'', | |||
payeeType:'', | |||
bankTypeOptions:[], | |||
payeeTypeOptions:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDictionaries(); | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
getPayee(this.$route.query.id).then((response) => { | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.bankType = this.selectDictLabel(res.data, response.data.bankType); | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.payeeType = this.selectDictLabel(res.data, response.data.payeeType); | |||
}); | |||
this.form = response.data; | |||
}); | |||
}, | |||
onConfirmBankType(data){ | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.showBankType = false; | |||
}, | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
console.log(this.form) | |||
updatePayee(this.form).then(response => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,177 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">银农收款账户列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell center :to="{name:'sunVillageCollectionDetail', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn9.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p>{{item.payeeAccount}}</p> | |||
</template> | |||
<template #title> | |||
<p class="van-ellipsis">{{item.payee}}</p> | |||
</template> | |||
<template #default> | |||
<p>{{item.accountType}}</p> | |||
<p style="font-size: 12px;font-weight: normal;color: #878787;">{{item.bankType}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button square text="修改" type="info" :to="{name:'sunVillageCollectionModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listPayee , delPayee } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("bank_type").then(response => { | |||
this.bankTypeOptions = response.data; | |||
}); | |||
this.getDicts("sys_normal_disable").then(response => { | |||
this.statusOptions = response.data; | |||
}); | |||
this.getDicts("bank_account_type").then(response => { | |||
this.accountTypeOptions = response.data; | |||
}); | |||
this.getDicts("payee_type").then(response => { | |||
this.payeeTypeOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
window.location = 'collectionAdd'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listPayee(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].accountType = this.selectDictLabel(this.accountTypeOptions, response.rows[i].accountType); | |||
response.rows[i].bankType = this.selectDictLabel(this.bankTypeOptions, response.rows[i].bankType); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除收款账户?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delPayee(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
width: 70%; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
.van-cell__label{ | |||
color: #333333; | |||
font-size: 14Px; | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,261 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">修改收款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goAdd" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" required :rules="[{ required: true , message:'请输入收款方' }]" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" required :rules="[{ required: true , message:'请输入收款账户' }]" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
@click="showBankDeposit = true" | |||
v-model="bankDeposit" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositOptions" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" readonly required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择账户类型' }]" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
@click="showPayeeType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择收款人类型' }]" | |||
/> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择数据状态' }]" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<van-radio name="1">停用</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getPayee , updatePayee,listDeposit } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionModify", | |||
data() { | |||
return { | |||
showBankType:false, | |||
showBankDeposit:false, | |||
showPayeeType:false, | |||
form:{ | |||
accountType:'1', | |||
status:'0' | |||
}, | |||
bankType:'', | |||
payeeType:'', | |||
bankDeposit:'', | |||
bankTypeOptions:[], | |||
statusOptions:[], | |||
accountTypeOptions:[], | |||
payeeTypeOptions:[], | |||
bankDepositOptions:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDictionaries(); | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
getPayee(this.$route.query.id).then((response) => { | |||
let _this = this | |||
this.form = response.data; | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
_this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.bankType = this.selectDictLabel(res.data, response.data.bankType); | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
_this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
this.payeeType = this.selectDictLabel(res.data, response.data.payeeType); | |||
}); | |||
let queryParams={ | |||
"bankType":response.data.bankType, | |||
"status": "0", | |||
} | |||
listDeposit(queryParams).then(rr => { | |||
this.bankDepositOptions = [] | |||
for(var i = 0 ; i < rr.rows.length ; i++){ | |||
if(_this.form.bankDeposit==rr.rows[i].id){ | |||
_this.bankDeposit = rr.rows[i].bankDeposit | |||
} | |||
_this.bankDepositOptions.push({"text":rr.rows[i].bankDeposit,"value":rr.rows[i].id, | |||
"payeePaymentLines":rr.rows[i].payeePaymentLines,"institutionNumber":rr.rows[i].institutionNumber}); | |||
} | |||
}); | |||
}); | |||
}, | |||
getError(e){ | |||
console.log(e) | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(data){ | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.bankDeposit = "" | |||
this.form.payeePaymentLines = "" | |||
this.showBankType = false; | |||
let queryParams={ | |||
"bankType":this.form.bankType, | |||
"status": "0", | |||
} | |||
listDeposit(queryParams).then(response => { | |||
this.bankDepositOptions = [] | |||
for(var i = 0 ; i < response.rows.length ; i++){ | |||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id, | |||
"payeePaymentLines":response.rows[i].payeePaymentLines,"institutionNumber":response.rows[i].institutionNumber}); | |||
} | |||
}); | |||
}, | |||
onConfirmBankDeposit(data){ | |||
this.bankDeposit = data.text | |||
this.form.bankDeposit = data.value | |||
this.form.payeePaymentLines = data.payeePaymentLines | |||
this.form.alternateField10 = data.institutionNumber | |||
this.showBankDeposit = false; | |||
}, | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
console.log(this.form) | |||
updatePayee(this.form).then(response => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,514 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加付款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goModify" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="账户类型" | |||
placeholder="请选择" | |||
v-model="accountType" | |||
@click="showAccountType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
/> | |||
<van-popup v-model="showAccountType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="typeDictionaries" | |||
@confirm="onConfirmType" | |||
@cancel="showAccountType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="账户分类" | |||
placeholder="请选择" | |||
v-model="villageAccountType" | |||
@click="showVillageAccountType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择账户分类' }]" | |||
v-if="accountType=='银行存款'&&(form.bankType==1||form.bankType==2)" | |||
/> | |||
<van-popup v-model="showVillageAccountType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="villageAccountTypeOptions" | |||
@confirm="onConfirmVillageAccountType" | |||
@cancel="showVillageAccountType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属镇账户" | |||
placeholder="请选择" | |||
v-model="taccountId" | |||
@click="showTaccountId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属镇账户' }]" | |||
v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=2" | |||
/> | |||
<van-popup v-model="showTaccountId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="taccountIdOptions" | |||
@confirm="onConfirmTaccountId" | |||
@cancel="showTaccountId = false" | |||
/> | |||
</van-popup> | |||
<van-field label="客户编号" v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')" required :rules="[{ required: true , message:'请输入客户编号' }]" v-model="form.cifNo" placeholder="请输入客户编号" input-align="right" label-width="auto"/> | |||
<van-field label="账簿号" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'" required :rules="[{ required: true , message:'请输入账簿号' }]" v-model="form.accountNo" placeholder="请输入账簿号" input-align="right" label-width="auto"/> | |||
<van-field label="管控类型" v-if="accountType=='银行存款'&&form.bankType==2&&villageAccountType=='多级账簿'"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.managementControlType" @change="onConfirmManagementControlType" required :rules="[{ required: true , message:'请选择管控类型' }]"> | |||
<van-radio name="1">账簿余额</van-radio> | |||
<van-radio name="2">中心账簿</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
readonly | |||
clickable | |||
label="中心账套" | |||
placeholder="请选择" | |||
v-model="centralBookId" | |||
@click="showCentralBookId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择中心账套' }]" | |||
v-if="accountType=='银行存款'&&form.managementControlType=='2'" | |||
/> | |||
<van-popup v-model="showCentralBookId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="centralBookIdList" | |||
@confirm="onConfirmCentralBookId" | |||
@cancel="showCentralBookId = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="会计科目" | |||
placeholder="请选择" | |||
v-model="centralSubjectId" | |||
@click="showCentralSubjectId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择会计科目' }]" | |||
v-if="accountType=='银行存款'&&form.managementControlType=='2'" | |||
/> | |||
<van-popup v-model="showCentralSubjectId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="centralSubjectIdList" | |||
@confirm="onConfirmCentralSubjectId" | |||
@cancel="showCentralSubjectId = false" | |||
/> | |||
</van-popup> | |||
<van-field label="账户名称" required :rules="[{ required: true , message:'请输入账户名称' }]" v-model="form.accountName" placeholder="请输入账户名称" input-align="right" label-width="auto"/> | |||
<van-field label="银行账户" v-if="accountType=='银行存款'" :rules="[{ required: true , message:'请输入银行账户' }]" v-model="form.bankAccountNumber" placeholder="请输入银行账户" input-align="right" label-width="auto" required/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
v-model="form.bankName" | |||
@click="showBankDeposit = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
v-if="accountType=='银行存款'" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositList" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" v-if="accountType=='银行存款'" :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.paymentLines" placeholder="请输入联行号" input-align="right" label-width="auto" required/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="关联科目" | |||
placeholder="请选择" | |||
v-model="subjectDeatil" | |||
@click="showSubjectId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择关联科目' }]" | |||
/> | |||
<van-popup v-model="showSubjectId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="subjectDictionaries" | |||
@confirm="onConfirmSubject" | |||
@cancel="showSubjectId = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户银行地址" v-if="accountType=='银行存款'" :rules="[{ required: true , message:'请输入开户银行地址' }]" v-model="form.site" placeholder="请输入开户银行地址" input-align="right" label-width="auto" required/> | |||
<van-field label="支付口令" v-if="accountType=='银行存款'" name="validator" :rules="[{ validator , message:'支付口令:请输入六位以上数字' }]" v-model="form.accountPassword" placeholder="请输入支付口令" input-align="right" label-width="auto" required/> | |||
<van-field label="账户类型" v-if="accountType=='银行存款'" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.bankAccountType" required :rules="[{ required: true , message:'请选择账户类型' }]"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field label="初始余额" v-model="form.initialBalance" required :rules="[{ required: true , message:'请输入初始余额' }]" placeholder="请输入初始余额" input-align="right" label-width="auto"/> | |||
<van-field label="内部账号" v-if="accountType=='银行存款'&&form.bankType=='3'" v-model="form.alternateField1" required :rules="[{ required: true , message:'请输入内部账号' }]" placeholder="请输入内部账号" input-align="right" label-width="auto"/> | |||
<van-field label="内部户名" v-if="accountType=='银行存款'&&form.bankType=='3'" v-model="form.alternateField2" required :rules="[{ required: true , message:'请输入内部户名' }]" placeholder="请输入内部户名" input-align="right" label-width="auto"/> | |||
<van-field label="账簿号" v-if="accountType=='银行存款'&&form.bankType=='3'" v-model="form.alternateField3" required :rules="[{ required: true , message:'请输入账簿号' }]" placeholder="请输入账簿号" input-align="right" label-width="auto"/> | |||
<van-field label="手机号码" v-if="accountType=='银行存款'&&form.bankType=='4'" v-model="form.alternateField1" required :rules="[{ required: true , message:'请输入手机号' }]" placeholder="请输入手机号" input-align="right" label-width="auto"/> | |||
<van-field label="是否停用" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.status" required :rules="[{ required: true , message:'请选择是否停用' }]"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
</div> | |||
<p class="main_title" v-if="villageAccountType=='多级账簿'">账簿信息</p> | |||
<div class="main_box" v-if="villageAccountType=='多级账簿'"> | |||
<van-field label="账簿是否限额" disabled> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.alternateField1" :disabled="true"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field label="单笔交易限额" v-model="form.alternateField2" placeholder="0.00" input-align="right" label-width="auto" :disabled="true"/> | |||
<van-field label="账簿是否透支" disabled> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.alternateField3" :disabled="true"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field label="透支类型" v-model="form.alternateField4" placeholder="无" input-align="right" label-width="auto" :disabled="true"/> | |||
<van-field label="透支额度(元)" v-model="form.alternateField5" placeholder="0.00" input-align="right" label-width="auto" :disabled="true"/> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getSubjectDetail , addAccount,listDeposit,queryTaccount,getCentralBooks } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
import {getCentralSubjects} from "../../../../api/onlineHome/bankAgriculture/paymentAccount"; | |||
export default { | |||
name: "paymentAccountAdd", | |||
data() { | |||
return { | |||
showCentralSubjectId:false, | |||
showCentralBookId:false, | |||
showManagementControlType:false, | |||
showTaccountId:false, | |||
showVillageAccountType:false, | |||
villageAccountType:null, | |||
showAccountType:false, | |||
showSubjectId:false, | |||
showBankType:false, | |||
minDate: new Date(), | |||
showBankDeposit:false, | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
jgList:{}, | |||
managementControlType:'', | |||
taccountId:'', | |||
accountType:'', | |||
bankType:'', | |||
centralBookId:'', | |||
centralSubjectId:'', | |||
jglx:'', | |||
wfydlx:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
subjectDictionaries:[], | |||
typeDictionaries:[], | |||
villageAccountTypeOptions:[], | |||
taccountIdOptions:[], | |||
centralBookIdList:[], | |||
centralSubjectIdList:[], | |||
// 管控类型 == 中心账套时选择中心账套 | |||
centralBooks: [], | |||
// 管控类型字典 | |||
managementControlTypeOptions: [], | |||
bankDepositList:[], | |||
// 所属银行字典 | |||
bankTypeOptions: [], | |||
subjectDeatil:'', | |||
bankDepositQueryParams: { | |||
bookId: null, | |||
deptId: null, | |||
payee: null, | |||
payeeAccount: null, | |||
bankDeposit: null, | |||
payeeType:null, | |||
bankType:null, | |||
status: "0", | |||
}, | |||
form:{ | |||
accountType: "102", | |||
bankUseType:"1", | |||
bankAccountType: "1", | |||
villageAccountType: "2", | |||
status: "N", | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getTaList(); | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
validator(val){ | |||
return /^\d{6,}$/.test(val); | |||
}, | |||
getDetail(){ | |||
// 账户类型 | |||
this.houseGetDicts("account_type_cashier").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.typeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
this.getDicts("cashier_account_management_control_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.managementControlTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
this.getDicts("village_account_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.villageAccountTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
getSubjectDetail().then((res) => { | |||
for (var i = 0; i < res.rows.length; i++) { | |||
this.subjectDictionaries.push({text: res.rows[i].subjectNameAll, value: res.rows[i].subjectId}); | |||
} | |||
}); | |||
}, | |||
getTaList(){ | |||
let params= { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 100, | |||
bankType:this.form.bankType, | |||
} | |||
// this.getCentralBookOptions(); | |||
queryTaccount(params).then(res => { | |||
this.taccountIdOptions = res.rows; | |||
for (var i = 0; i < res.rows.length; i++) { | |||
this.$set(this.taccountIdOptions[i], "text",res.rows[i].payee); | |||
this.$set(this.taccountIdOptions[i], "value",res.rows[i].id); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmCentralBookId(val){ | |||
this.showCentralBookId = false | |||
this.$set(this.form, "centralBookId",val.value); | |||
this.centralBookId = val.text | |||
getCentralSubjects({bookId: val.id}).then((res) => { | |||
this.centralSubjectIdList = res.data; | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.$set(this.centralSubjectIdList[i], "text",res.data[i].subjectName); | |||
this.$set(this.centralSubjectIdList[i], "value",res.data[i].subjectId); | |||
} | |||
}) | |||
}, | |||
onConfirmCentralSubjectId(val){ | |||
this.showCentralSubjectId = false | |||
this.$set(this.form, "centralSubjectId",val.value); | |||
this.centralSubjectId = val.text | |||
}, | |||
onConfirmManagementControlType(val){ | |||
if(val==2){ | |||
getCentralBooks({yinnongTaccountId: this.form.taccountId}).then((res) => { | |||
this.centralBookIdList = res.data; | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.$set(this.centralBookIdList[i], "text",res.data[i].bookName); | |||
this.$set(this.centralBookIdList[i], "value",res.data[i].id); | |||
} | |||
}); | |||
} | |||
}, | |||
onConfirmBankDeposit(val){ | |||
this.showBankDeposit = false | |||
this.$set(this.form, "bankName", val.bankDeposit); | |||
this.$set(this.form, "paymentLines", val.payeePaymentLines); | |||
this.$set(this.form, "alternateField10", val.institutionNumber); | |||
}, | |||
onConfirmTaccountId(val){ | |||
this.showTaccountId = false | |||
this.taccountId = val.text | |||
console.log(val) | |||
this.$set(this.form, "taccountId", val.value); | |||
this.$set(this.form, "cifNo", val.cifNo); | |||
this.$set(this.form, "accountName", val.payee); | |||
this.$set(this.form, "managementControlType", val.managementControlType); | |||
this.$set(this.form, "accountPassword", val.accountPassword); | |||
this.$set(this.form, "centralBookId", val.centralBookId); | |||
this.taccountIdOptions.map(res => { | |||
if(res.id==val.value){ | |||
if(this.form.villageAccountType === '3'){ | |||
this.$set(this.form, "bankAccountNumber", res.payeeAccount); | |||
} | |||
//this.form.bankName = res.bankDeposit; | |||
this.$set(this.form, "bankName", res.bankDeposit); | |||
this.$set(this.form, "paymentLines", res.payeePaymentLines); | |||
} | |||
}) | |||
}, | |||
onConfirmBankType(val){ | |||
this.showBankType = false | |||
this.bankType = val.text | |||
this.$set(this.form, "bankType", val.value); | |||
this.getTaList(); | |||
this.$set(this.form, "bankName", ''); | |||
this.$set(this.form, "paymentLines", ''); | |||
this.bankDepositQueryParams.bankType = val.value; | |||
listDeposit(this.bankDepositQueryParams).then(response => { | |||
this.bankDepositList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.$set(this.bankDepositList[i], "text",response.rows[i].bankDeposit); | |||
this.$set(this.bankDepositList[i], "value",response.rows[i].bankDeposit); | |||
} | |||
}) | |||
}, | |||
onConfirmVillageAccountType(val){ | |||
this.showVillageAccountType = false | |||
this.villageAccountType = val.text | |||
this.$set(this.form, "villageAccountType", val.value); | |||
}, | |||
onConfirmSubject(data){ | |||
this.subjectDeatil = data.text; | |||
this.form.subjectId = data.value; | |||
this.form.subjectNameAll = data.text; | |||
this.showSubjectId = false; | |||
}, | |||
onConfirmType(data){ | |||
this.accountType = data.text; | |||
this.form.accountType = data.value; | |||
this.showAccountType = false; | |||
}, | |||
goModify(){ | |||
console.log(this.form) | |||
this.form.balance = this.form.initialBalance; | |||
addAccount(this.form).then((response) => { | |||
this.$toast.success('添加成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,172 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看付款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box" v-if="form"> | |||
<van-field readonly label="账户类型" v-model="accountType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="所属银行" v-model="bankType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="账户分类" v-if="accountType=='银行存款'&&(bankType=='中国银行'||bankType=='山东省农村信用社(农商行)')" v-model="villageAccountType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="所属镇账户" v-if="accountType=='银行存款'&&villageAccountType!='村实体账户'" v-model="taccountId" input-align="right" label-width="auto" /> | |||
<van-field readonly label="账簿号" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'" v-model="accountNo" input-align="right" label-width="auto" /> | |||
<van-cell title="管控类型" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'&&bankType=='山东省农村信用社(农商行)'" > | |||
<template #right-icon> | |||
{{form.managementControlType == '1' ? '账簿余额':'中心账簿'}} | |||
</template> | |||
</van-cell> | |||
<van-field readonly label="中心账套" v-if="accountType=='银行存款'&&form.managementControlType=='2'" v-model="centralBookId" input-align="right" label-width="auto" /> | |||
<van-field readonly label="会计科目" v-if="accountType=='银行存款'&&form.managementControlType=='2'" v-model="centralSubjectId" input-align="right" label-width="auto" /> | |||
<van-field readonly label="账户名称" v-model="form.accountName" input-align="right" label-width="auto"/> | |||
<van-field readonly label="银行账户" v-if="accountType=='银行存款'" v-model="form.bankAccountNumber" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-if="accountType=='银行存款'" v-model="form.bankName" input-align="right" label-width="auto"/> | |||
<van-field readonly label="联行号" v-if="accountType=='银行存款'" v-model="form.paymentLines" input-align="right" label-width="auto"/> | |||
<van-field readonly label="关联科目" v-model="subjectValue" input-align="right" label-width="auto" /> | |||
<van-field readonly label="科目名称" v-if="accountType=='银行存款'" v-model="form.subjectNameAll" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支付口令" v-if="accountType=='银行存款'" v-model="form.site" input-align="right" label-width="auto"/> | |||
<van-field readonly label="手机号" v-if="accountType=='银行存款'&&bankType=='建设银行'" v-model="form.alternateField1" input-align="right" label-width="auto"/> | |||
<van-field readonly label="账户类别" v-model="bankAccountType" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行地址" v-if="accountType=='银行存款'" v-model="form.site" input-align="right" label-width="auto"/> | |||
<van-field readonly label="账户密码" v-if="accountType=='银行存款'" v-model="form.accountPassword" input-align="right" label-width="auto"/> | |||
<van-field readonly label="初始余额" v-model="form.initialBalance" input-align="right" label-width="auto"/> | |||
<van-field readonly label="内部账号" v-if="accountType=='银行存款'&&bankType=='农业银行'" v-model="alternateField1" input-align="right" label-width="auto"/> | |||
<van-field readonly label="内部户名" v-if="accountType=='银行存款'&&bankType=='农业银行'" v-model="alternateField2" input-align="right" label-width="auto"/> | |||
<van-field readonly label="账簿号" v-if="accountType=='银行存款'&&bankType=='农业银行'" v-model="alternateField3" input-align="right" label-width="auto"/> | |||
<van-cell title="是否停用" v-if="accountType=='银行存款'" > | |||
<template #right-icon> | |||
{{form.status == 'Y' ? '是':'否'}} | |||
</template> | |||
</van-cell> | |||
</div> | |||
<p class="main_title" v-if="accountType=='银行存款'" >账簿信息</p> | |||
<div class="main_box" v-if="accountType=='银行存款'" > | |||
<van-cell title="账簿是否限额"> | |||
<template #right-icon> | |||
{{form.status == 'Y' ? '是':'否'}} | |||
</template> | |||
</van-cell> | |||
<van-field readonly label="单笔交易限额" v-model="form.initialBalance" input-align="right" label-width="auto"/> | |||
<van-cell title="账簿是否透支"> | |||
<template #right-icon> | |||
{{form.status == 'Y' ? '是':'否'}} | |||
</template> | |||
</van-cell> | |||
<van-field readonly label="投掷类型" v-model="form.initialBalance" input-align="right" label-width="auto"/> | |||
<van-field readonly label="透支额度(元)" v-model="form.initialBalance" input-align="right" label-width="auto"/> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getAccount , getSubjectDetail } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
export default { | |||
name: "paymentAccountDetail", | |||
data() { | |||
return { | |||
showAccountType:false, | |||
showSubjectId:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
jgList:{}, | |||
accountType:'', | |||
bankType:'', | |||
villageAccountType:'', | |||
taccountId:'', | |||
accountNo:'', | |||
managementControlType:'', | |||
centralBookId:'', | |||
centralSubjectId:'', | |||
bankAccountType:'', | |||
alternateField1:'', | |||
alternateField2:'', | |||
alternateField3:'', | |||
subjectValue:'', | |||
wfydlx:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
subjectDictionaries:[], | |||
typeDictionaries:[], | |||
subjectDeatil:[], | |||
form:{} | |||
}; | |||
}, | |||
created() { | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
getDetail(){ | |||
getAccount(this.$route.query.id).then((response) => { | |||
// 账户类型 | |||
this.houseGetDicts("account_type_cashier").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.typeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.accountType = this.selectDictLabel(res.data, response.data.accountType); | |||
}); | |||
getSubjectDetail().then((res) => { | |||
for (var i = 0; i < res.rows.length; i++) { | |||
this.subjectDictionaries.push({text: res.rows[i].subjectNameAll, value: res.rows[i].subjectId}); | |||
} | |||
this.subjectValue = this.selectSubject(res.rows , response.data.subjectId); | |||
}); | |||
this.form = response.data; | |||
}); | |||
}, | |||
selectSubject(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].subjectId == ('' + value)) { | |||
actions.push(datas[key].subjectNameAll); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,185 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">银农付款账户列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<!-- :to="{name:'paymentAccountDetail', query: {id:item.id,type:'modify'}}"--> | |||
<van-cell :title="item.accountType" center > | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn10.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{item.balance}}</span></p> | |||
</template> | |||
<template #default> | |||
<p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: break-all;overflow: hidden;">{{item.bankAccountNumber == null || item.bankAccountNumber == '' ? ' ':item.bankAccountNumber}}</p> | |||
<p style="font-size: 12px;font-weight: normal;color: #878787;display: flex;justify-content: space-between;"> | |||
<span style="width: 60%;text-align:left;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;word-break: break-all;overflow: hidden;">{{item.accountName}}</span> | |||
<span :style="{color: item.status == '否' ? '#1D6FE9' : '#FF4646'}">{{item.status == '否' ? '未' : '已'}}停用</span> | |||
</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button square text="修改" type="info" :to="{name:'sunVillagePaymentAccountModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { getList , delAccount } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
export default { | |||
name: "paymentAccountList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
houseApplyStatus:[], | |||
// 账户类型 字典字典 | |||
accountTypeOptions: [], | |||
// 是否停用 字典 sys_yes_no字典 | |||
statusOptions: [], | |||
// 查询类型字典 | |||
selectTypeOptions: [], | |||
// 来往账标识字典 | |||
directionOptions: [], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum: 1, | |||
pageSize: 10, | |||
}, | |||
statusColor:'#1D6FE9' | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("account_type_cashier").then((response) => { | |||
this.accountTypeOptions = response.data; | |||
}); | |||
this.getDicts("sys_yes_no").then((response) => { | |||
this.statusOptions = response.data; | |||
}); | |||
this.getDicts("select_type").then((response) => { | |||
this.selectTypeOptions = response.data; | |||
}); | |||
this.getDicts("direction").then(response => { | |||
this.directionOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
window.location = 'sunVillagePaymentAccountAdd'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
getList(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].accountType = this.selectDictLabel(this.accountTypeOptions, response.rows[i].accountType); | |||
response.rows[i].status = this.selectDictLabel(this.statusOptions, response.rows[i].status); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除账户信息?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delAccount(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.4; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
.van-cell__label{ | |||
font-size: 14Px; | |||
font-weight: bold; | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.6; | |||
color: #333333; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,570 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">修改付款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goModify" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="账户类型" | |||
placeholder="请选择" | |||
v-model="accountType" | |||
@click="showAccountType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
/> | |||
<van-popup v-model="showAccountType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="typeDictionaries" | |||
@confirm="onConfirmType" | |||
@cancel="showAccountType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="showBankType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="账户分类" | |||
placeholder="请选择" | |||
v-model="villageAccountType" | |||
@click="showVillageAccountType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择账户分类' }]" | |||
v-if="accountType=='银行存款'&&(form.bankType==1||form.bankType==2)" | |||
/> | |||
<van-popup v-model="showVillageAccountType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="villageAccountTypeOptions" | |||
@confirm="onConfirmVillageAccountType" | |||
@cancel="showVillageAccountType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属镇账户" | |||
placeholder="请选择" | |||
v-model="taccountId" | |||
@click="showTaccountId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属镇账户' }]" | |||
v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=2" | |||
/> | |||
<van-popup v-model="showTaccountId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="taccountIdOptions" | |||
@confirm="onConfirmTaccountId" | |||
@cancel="showTaccountId = false" | |||
/> | |||
</van-popup> | |||
<van-field label="客户编号" v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')" required :rules="[{ required: true , message:'请输入客户编号' }]" v-model="form.cifNo" placeholder="请输入客户编号" input-align="right" label-width="auto"/> | |||
<van-field label="账簿号" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'" required :rules="[{ required: true , message:'请输入账簿号' }]" v-model="form.accountNo" placeholder="请输入账簿号" input-align="right" label-width="auto"/> | |||
<van-field label="管控类型" v-if="accountType=='银行存款'&&form.bankType==2&&villageAccountType=='多级账簿'"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.managementControlType" @change="onConfirmManagementControlType" required :rules="[{ required: true , message:'请选择管控类型' }]"> | |||
<van-radio name="1">账簿余额</van-radio> | |||
<van-radio name="2">中心账簿</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
readonly | |||
clickable | |||
label="中心账套" | |||
placeholder="请选择" | |||
v-model="centralBookId" | |||
@click="showCentralBookId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
v-if="accountType=='银行存款'&&form.managementControlType=='2'" | |||
/> | |||
<van-popup v-model="showCentralBookId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="centralBookIdList" | |||
@confirm="onConfirmCentralBookId" | |||
@cancel="showCentralBookId = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="会计科目" | |||
placeholder="请选择" | |||
v-model="centralSubjectId" | |||
@click="showCentralSubjectId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择会计科目' }]" | |||
v-if="accountType=='银行存款'&&form.managementControlType=='2'" | |||
/> | |||
<van-popup v-model="showCentralSubjectId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="centralSubjectIdList" | |||
@confirm="onConfirmCentralSubjectId" | |||
@cancel="showCentralSubjectId = false" | |||
/> | |||
</van-popup> | |||
<van-field label="账户名称" required :rules="[{ required: true , message:'请输入账户名称' }]" v-model="form.accountName" placeholder="请输入账户名称" input-align="right" label-width="auto"/> | |||
<van-field label="银行账户" v-if="accountType=='银行存款'" :rules="[{ required: true , message:'请输入银行账户' }]" v-model="form.bankAccountNumber" placeholder="请输入银行账户" input-align="right" label-width="auto" required/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
v-model="form.bankName" | |||
@click="showBankDeposit = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
v-if="accountType=='银行存款'" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositList" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" v-if="accountType=='银行存款'" :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.paymentLines" placeholder="请输入联行号" input-align="right" label-width="auto" required/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="关联科目" | |||
placeholder="请选择" | |||
v-model="subjectDeatil" | |||
@click="showSubjectId = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择关联科目' }]" | |||
/> | |||
<van-popup v-model="showSubjectId" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="subjectDictionaries" | |||
@confirm="onConfirmSubject" | |||
@cancel="showSubjectId = false" | |||
/> | |||
</van-popup> | |||
<van-field label="开户银行地址" v-if="accountType=='银行存款'" :rules="[{ required: true , message:'请输入开户银行地址' }]" v-model="form.site" placeholder="请输入开户银行地址" input-align="right" label-width="auto" required/> | |||
<van-field label="支付口令" v-if="accountType=='银行存款'" name="validator" :rules="[{ validator , message:'支付口令:请输入六位以上数字' }]" v-model="form.accountPassword" placeholder="请输入支付口令" input-align="right" label-width="auto" required/> | |||
<van-field label="账户类型" v-if="accountType=='银行存款'" required > | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.bankAccountType" required :rules="[{ required: true , message:'请选择账户类型' }]"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field label="初始余额" v-model="form.initialBalance" required :rules="[{ required: true , message:'请输入初始余额' }]" placeholder="请输入初始余额" input-align="right" label-width="auto"/> | |||
<van-field label="内部账号" v-if="accountType=='银行存款'&&form.bankType=='3'" v-model="form.alternateField1" required :rules="[{ required: true , message:'请输入内部账号' }]" placeholder="请输入内部账号" input-align="right" label-width="auto"/> | |||
<van-field label="内部户名" v-if="accountType=='银行存款'&&form.bankType=='3'" v-model="form.alternateField2" required :rules="[{ required: true , message:'请输入内部户名' }]" placeholder="请输入内部户名" input-align="right" label-width="auto"/> | |||
<van-field label="账簿号" v-if="accountType=='银行存款'&&form.bankType=='3'" v-model="form.alternateField3" required :rules="[{ required: true , message:'请输入账簿号' }]" placeholder="请输入账簿号" input-align="right" label-width="auto"/> | |||
<van-field label="手机号码" v-if="accountType=='银行存款'&&form.bankType=='4'" v-model="form.alternateField1" required :rules="[{ required: true , message:'请输入手机号' }]" placeholder="请输入手机号" input-align="right" label-width="auto"/> | |||
<van-field label="是否停用" required > | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.status" required :rules="[{ required: true , message:'请选择是否停用' }]"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
</div> | |||
<p class="main_title" v-if="villageAccountType=='多级账簿'">账簿信息</p> | |||
<div class="main_box" v-if="villageAccountType=='多级账簿'"> | |||
<van-field label="账簿是否限额" disabled> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.alternateField1" :disabled="true"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field label="单笔交易限额" v-model="form.alternateField2" placeholder="0.00" input-align="right" label-width="auto" :disabled="true"/> | |||
<van-field label="账簿是否透支" disabled> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.alternateField3" :disabled="true"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field label="透支类型" v-model="form.alternateField4" placeholder="无" input-align="right" label-width="auto" :disabled="true"/> | |||
<van-field label="透支额度(元)" v-model="form.alternateField5" placeholder="0.00" input-align="right" label-width="auto" :disabled="true"/> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getAccount , getSubjectDetail , updateAccount,listDeposit,queryTaccount,getCentralBooks } from "@/api/onlineHome/bankAgriculture/paymentAccount"; | |||
import {getCentralSubjects} from "../../../../api/onlineHome/bankAgriculture/paymentAccount"; | |||
export default { | |||
name: "paymentAccountModify", | |||
data() { | |||
return { | |||
showCentralSubjectId:false, | |||
showCentralBookId:false, | |||
showManagementControlType:false, | |||
showTaccountId:false, | |||
showVillageAccountType:false, | |||
villageAccountType:null, | |||
showAccountType:false, | |||
showSubjectId:false, | |||
showBankType:false, | |||
minDate: new Date(), | |||
showBankDeposit:false, | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
jgList:{}, | |||
managementControlType:'', | |||
taccountId:'', | |||
accountType:'', | |||
bankType:'', | |||
centralBookId:'', | |||
centralSubjectId:'', | |||
jglx:'', | |||
wfydlx:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
subjectDictionaries:[], | |||
typeDictionaries:[], | |||
villageAccountTypeOptions:[], | |||
taccountIdOptions:[], | |||
centralBookIdList:[], | |||
centralSubjectIdList:[], | |||
// 管控类型 == 中心账套时选择中心账套 | |||
centralBooks: [], | |||
// 管控类型字典 | |||
managementControlTypeOptions: [], | |||
bankDepositList:[], | |||
// 所属银行字典 | |||
bankTypeOptions: [], | |||
subjectDeatil:'', | |||
bankDepositQueryParams: { | |||
bookId: null, | |||
deptId: null, | |||
payee: null, | |||
payeeAccount: null, | |||
bankDeposit: null, | |||
payeeType:null, | |||
bankType:null, | |||
status: "0", | |||
}, | |||
form:{ | |||
accountType: "102", | |||
bankUseType:"1", | |||
bankAccountType: "1", | |||
villageAccountType: "2", | |||
status: "N", | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getTaList(); | |||
this.getDetail(); | |||
}, | |||
methods: { | |||
validator(val){ | |||
return /^\d{6,}$/.test(val); | |||
}, | |||
getDetail(){ | |||
getAccount(this.$route.query.id).then((response) => { | |||
// 账户类型 | |||
this.houseGetDicts("account_type_cashier").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.typeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.accountType = this.selectDictLabel(res.data, response.data.accountType); | |||
}); | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
this.bankType = this.selectDictLabel(res.data, response.data.bankType); | |||
} | |||
}); | |||
this.getDicts("village_account_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.villageAccountTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
this.villageAccountType = this.selectDictLabel(res.data, response.data.villageAccountType); | |||
} | |||
}); | |||
getSubjectDetail().then((res) => { | |||
for (var i = 0; i < res.rows.length; i++) { | |||
this.subjectDictionaries.push({text: res.rows[i].subjectNameAll, value: res.rows[i].subjectId}); | |||
} | |||
this.subjectDeatil = this.selectSubject(res.rows , response.data.subjectId); | |||
}); | |||
queryTaccount({ | |||
bankType:response.data.bankType | |||
}).then(res => { | |||
this.taccountIdOptions = res.rows; | |||
for (var i = 0; i < res.rows.length; i++) { | |||
this.$set(this.taccountIdOptions[i], "text",res.rows[i].payee); | |||
this.$set(this.taccountIdOptions[i], "value",res.rows[i].id); | |||
if(response.data.taccountId==res.rows[i].id){ | |||
this.taccountId= res.rows[i].payee | |||
} | |||
} | |||
}); | |||
if(response.data.centralBookId!=null&&response.data.centralBookId!=""&&response.data.managementControlType=="2"){ | |||
getCentralBooks({yinnongTaccountId: response.data.taccountId}).then((res) => { | |||
this.centralBookIdList = res.data; | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.$set(this.centralBookIdList[i], "text",res.data[i].bookName); | |||
this.$set(this.centralBookIdList[i], "value",res.data[i].id); | |||
} | |||
this.centralBookId = this.selectSubject(res.data , response.data.centralBookId); | |||
}); | |||
if(response.data.centralSubjectId!=null&&response.data.centralSubjectId!=""){ | |||
getCentralSubjects({bookId: response.data.centralBookId}).then((res) => { | |||
this.centralSubjectIdList = res.data; | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.$set(this.centralSubjectIdList[i], "text",res.data[i].subjectName); | |||
this.$set(this.centralSubjectIdList[i], "value",res.data[i].subjectId); | |||
} | |||
this.centralSubjectId = this.selectSubject(res.data , response.data.centralSubjectId); | |||
}) | |||
} | |||
if(response.data.bankDeposit!=null&&response.data.bankDeposit!=""){ | |||
this.bankDepositQueryParams.bankType = response.data.bankType; | |||
listDeposit(this.bankDepositQueryParams).then(response => { | |||
this.bankDepositList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.$set(this.bankDepositList[i], "text",response.rows[i].bankDeposit); | |||
this.$set(this.bankDepositList[i], "value",response.rows[i].bankDeposit); | |||
} | |||
this.bankDeposit = this.selectSubject(response.rows , response.data.bankDeposit); | |||
}) | |||
} | |||
} | |||
this.form = response.data; | |||
}); | |||
}, | |||
getTaList(){ | |||
let params= { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 100, | |||
bankType:this.form.bankType, | |||
} | |||
// this.getCentralBookOptions(); | |||
queryTaccount(params).then(res => { | |||
this.taccountIdOptions = res.rows; | |||
for (var i = 0; i < res.rows.length; i++) { | |||
this.$set(this.taccountIdOptions[i], "text",res.rows[i].payee); | |||
this.$set(this.taccountIdOptions[i], "value",res.rows[i].id); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
console.log(e) | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
selectSubject(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].subjectId == ('' + value)) { | |||
actions.push(datas[key].subjectNameAll); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCentralBookId(val){ | |||
this.showCentralBookId = false | |||
this.$set(this.form, "centralBookId",val.value); | |||
this.centralBookId = val.text | |||
getCentralSubjects({bookId: val.id}).then((res) => { | |||
this.centralSubjectIdList = res.data; | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.$set(this.centralSubjectIdList[i], "text",res.data[i].subjectName); | |||
this.$set(this.centralSubjectIdList[i], "value",res.data[i].subjectId); | |||
} | |||
}) | |||
}, | |||
onConfirmCentralSubjectId(val){ | |||
this.showCentralSubjectId = false | |||
this.$set(this.form, "centralSubjectId",val.value); | |||
this.centralSubjectId = val.text | |||
}, | |||
onConfirmManagementControlType(val){ | |||
if(val==2){ | |||
getCentralBooks({yinnongTaccountId: this.form.taccountId}).then((res) => { | |||
this.centralBookIdList = res.data; | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.$set(this.centralBookIdList[i], "text",res.data[i].bookName); | |||
this.$set(this.centralBookIdList[i], "value",res.data[i].id); | |||
} | |||
}); | |||
} | |||
}, | |||
onConfirmBankDeposit(val){ | |||
this.showBankDeposit = false | |||
this.$set(this.form, "bankName", val.bankDeposit); | |||
this.$set(this.form, "paymentLines", val.payeePaymentLines); | |||
this.$set(this.form, "alternateField10", val.institutionNumber); | |||
}, | |||
onConfirmTaccountId(val){ | |||
this.showTaccountId = false | |||
this.taccountId = val.text | |||
console.log(val) | |||
this.$set(this.form, "taccountId", val.value); | |||
this.$set(this.form, "cifNo", val.cifNo); | |||
this.$set(this.form, "accountName", val.payee); | |||
this.$set(this.form, "managementControlType", val.managementControlType); | |||
this.$set(this.form, "accountPassword", val.accountPassword); | |||
this.$set(this.form, "centralBookId", val.centralBookId); | |||
this.taccountIdOptions.map(res => { | |||
if(res.id==val.value){ | |||
if(this.form.villageAccountType === '3'){ | |||
this.$set(this.form, "bankAccountNumber", res.payeeAccount); | |||
} | |||
//this.form.bankName = res.bankDeposit; | |||
this.$set(this.form, "bankName", res.bankDeposit); | |||
this.$set(this.form, "paymentLines", res.payeePaymentLines); | |||
} | |||
}) | |||
}, | |||
onConfirmBankType(val){ | |||
this.showBankType = false | |||
this.bankType = val.text | |||
this.$set(this.form, "bankType", val.value); | |||
this.getTaList(); | |||
this.$set(this.form, "bankName", ''); | |||
this.$set(this.form, "paymentLines", ''); | |||
this.bankDepositQueryParams.bankType = val.value; | |||
listDeposit(this.bankDepositQueryParams).then(response => { | |||
this.bankDepositList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.$set(this.bankDepositList[i], "text",response.rows[i].bankDeposit); | |||
this.$set(this.bankDepositList[i], "value",response.rows[i].bankDeposit); | |||
} | |||
}) | |||
}, | |||
onConfirmVillageAccountType(val){ | |||
this.showVillageAccountType = false | |||
this.villageAccountType = val.text | |||
this.$set(this.form, "villageAccountType", val.value); | |||
}, | |||
onConfirmSubject(data){ | |||
this.subjectDeatil = data.text; | |||
this.form.subjectId = data.value; | |||
this.form.subjectNameAll = data.text; | |||
this.showSubjectId = false; | |||
}, | |||
onConfirmType(data){ | |||
this.accountType = data.text; | |||
this.form.accountType = data.value; | |||
this.showAccountType = false; | |||
}, | |||
goModify(){ | |||
console.log(this.form) | |||
this.form.balance = this.form.initialBalance; | |||
updateAccount(this.form).then((response) => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,952 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加虚拟挂账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择申请时间' }]" | |||
v-model="form.applyDate" | |||
label="申请时间" | |||
placeholder="请选择申请时间" | |||
@click="showlasj = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
/> | |||
<van-popup v-model="showlasj" position="bottom"> | |||
<van-datetime-picker | |||
v-model="currentDate" | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
label="资金支出类别" | |||
placeholder="请选择" | |||
v-model="capitalExpenditureType" | |||
@click="showcapital = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showcapital" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="capitalExpenditureTypeOptions" | |||
@confirm="onConfirmCapital" | |||
@cancel="showcapital = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
required | |||
label="支出总金额" | |||
v-model="form.expenditureAmount" | |||
placeholder="根据下方收款金额自动核算" | |||
input-align="right" | |||
label-width="auto" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field | |||
label="付款事由" | |||
v-model="form.remark" | |||
type="textarea" | |||
placeholder="请输入付款事由" | |||
input-align="right" | |||
rows="3" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请输入付款事由' }]" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="项目名称" | |||
placeholder="请选择" | |||
v-model="projectForm.projectName" | |||
@click="showproject = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||
/> | |||
<van-popup v-model="showproject" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectListShow" | |||
@confirm="onConfirmProject" | |||
@cancel="showproject = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="工程款类型" | |||
placeholder="请选择" | |||
v-model="projectFundType" | |||
@click="showFundType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择工程款类型' }]" | |||
/> | |||
<van-popup v-model="showFundType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectFundTypeOptions" | |||
@confirm="onConfirmFundType" | |||
@cancel="showFundType = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
<van-field | |||
readonly | |||
clickable | |||
label="付款方" | |||
placeholder="请选择付款方" | |||
v-model="form.payer" | |||
@click="showpayer = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择付款方' }]" | |||
/> | |||
<van-popup v-model="showpayer" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payerOptions" | |||
@confirm="onConfirmPayer($event)" | |||
@cancel="showpayer = false" | |||
/> | |||
</van-popup> | |||
<van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-cell title="收款账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款方" | |||
placeholder="请选择" | |||
v-model="item.payee" | |||
@click="item.showPayee = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择收款方' }]" | |||
/> | |||
<van-popup v-model="item.showPayee" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeList" | |||
@confirm="onConfirmPayee($event,index)" | |||
@cancel="item.showPayee = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
<van-field | |||
readonly | |||
label="所属银行" | |||
placeholder="请选择收款方" | |||
v-model="item.bankTypeText" | |||
@click="item.showbankType = true" | |||
input-align="right" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="12" align="center"> | |||
<!-- @click="goUpdate"--> | |||
<van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
<van-col span="12" align="center"> | |||
<!-- @click="goAdd"--> | |||
<van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
listTaccount, | |||
listVaccount | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalAdd3", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showpayer:false, | |||
buttonType:'a', | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
payerOptions:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'2' | |||
}, | |||
projectFundType:'', | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
this.reset(); | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
let params1={ | |||
townAccountType:'3' | |||
} | |||
listTaccount(params1).then((response) => { | |||
console.log(response) | |||
response.rows.map((res,index) => { | |||
if(res.townAccountType=='3'){ | |||
res['payerFrom'] = '3' | |||
this.payerOptions.push(res); | |||
this.payerOptions[index].text = res.payee; | |||
this.payerOptions[index].value = res.id; | |||
} | |||
}) | |||
}); | |||
this.getDictionaries(); | |||
}, | |||
methods: { | |||
// 表单重置 | |||
reset() { | |||
this.form = { | |||
id: null, | |||
upId: null, | |||
downId: null, | |||
orderId: null, | |||
cashierId: null, | |||
transferType: '3', | |||
accountType: '2', | |||
explainSituation: null, | |||
succeedAmount: null, | |||
payer: null, | |||
payerAccount: null, | |||
operatorCode: null, | |||
enterpriseCode: null, | |||
expenditureAmount: null, | |||
capitalExpenditureType: '1', | |||
remark: null, | |||
transferStatus: "0", | |||
auditStatus: "0", | |||
paymentState: "1", | |||
bankPriority: "0", | |||
clientPriority: "0" | |||
}; | |||
this.processList = {} | |||
this.projectForm={ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
} | |||
}, | |||
goFlow(){ | |||
if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){ | |||
window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode; | |||
}else{ | |||
this.$notify({ type: 'danger', message: '无审批流程!' }); | |||
} | |||
}, | |||
getChange(){ | |||
console.log(this.buttonType) | |||
if(this.buttonType == 'update'){ | |||
console.log('update') | |||
this.goUpdate(); | |||
}else if(this.buttonType == 'add'){ | |||
console.log('add') | |||
this.goAdd(); | |||
} | |||
}, | |||
getDictionaries(){ | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
this.getPayeeList(); | |||
}, | |||
getError(e){ | |||
console.log(e) | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
addChargeItme(index){ | |||
if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
return; | |||
} | |||
this.getDicts("bank_type").then(res => { | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
bankTypeText: "", //所属银行 | |||
showPayee:false, | |||
showbankType:false | |||
}); | |||
}); | |||
}, | |||
getPayeeList() { | |||
let params = { | |||
villageAccountType : 1, | |||
status:'0', | |||
accountType : this.form.accountType | |||
} | |||
console.log(params) | |||
listVaccount(params).then(response => { | |||
console.log(response) | |||
if(response.rows.length>0){ | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
this.projectList.map(res => { | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data,index){ | |||
console.log(data,index) | |||
for (let i = 0 ; i < this.chargeItme.length ; i++){ | |||
this.chargeItme[i].showPayee = false; | |||
} | |||
this.chargeItme[index].payee = data.text; | |||
this.chargeItme[index].payeeId = data.value; | |||
this.chargeItme[index].showpayee = false; | |||
this.payeeSelectChange(data.value , index) | |||
this.onConfirmBankType(data,index); | |||
}, | |||
onConfirmBankType(data,index){ | |||
this.bankTypeDictionaries.map(res => { | |||
if(res.value==data.bankType){ | |||
this.chargeItme[index].bankTypeText = res.text; | |||
this.chargeItme[index].bankType = res.value; | |||
} | |||
}) | |||
}, | |||
onConfirmPayer(data){ | |||
console.log(data) | |||
this.form.payer = data.text; | |||
this.form.cashierId = data.value; | |||
this.form.payerAccount = data.payeeAccount; | |||
this.showpayer = false; | |||
this.accountTypeChange(); | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
this.chargeItme = []; | |||
this.payeeList = []; | |||
let params = { | |||
villageAccountType : 1, | |||
status:'0', | |||
accountType : this.form.accountType, | |||
taccountId:this.form.cashierId | |||
} | |||
listVaccount(params).then(response => { | |||
console.log(response) | |||
if(response.rows.length>0){ | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
} | |||
}); | |||
}, | |||
// 钱计算 | |||
moneyChange(input) { | |||
console.log(input) | |||
let obj = {}; | |||
obj = this.chargeItme.find((account) => { | |||
//model就是上面的数据源 | |||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
}); | |||
let total = 0; | |||
this.chargeItme.forEach((money) => { | |||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
}); | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
console.log(this.form) | |||
addTransfer(this.form).then((response) => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
console.log(this.uploadFiles) | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
let obj = {}; | |||
let fuzhitype = 0; | |||
obj = this.payeeList.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select ; //筛选出匹配数据 | |||
}); | |||
if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
this.chargeItme.some((value, index) => { | |||
if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
fuzhitype = 2; | |||
return true; | |||
} | |||
if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
fuzhitype = 1; | |||
return true; | |||
} | |||
}); | |||
} | |||
if(fuzhitype == 0){ | |||
this.$set(this.chargeItme[i], "payee",obj.payee) | |||
this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
}else if(fuzhitype == 1){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
}else if(fuzhitype == 2){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
} | |||
}, | |||
selectChange(select) { | |||
let obj = {}; | |||
obj = this.payerOptions.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select; //筛选出匹配数据 | |||
}); | |||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
obj.accountPassword != null && obj.accountPassword != ""){ | |||
this.$set(this.form, "bookId", obj.bookId); | |||
this.$set(this.form, "deptId", obj.deptId); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
this.$set(this.form, "payerFrom", '1'); | |||
}else{ | |||
if(obj.payerFrom==1){ | |||
this.diglogStatus = false; | |||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
this.$set(this.form,"payer","") | |||
this.$set(this.form,"payerAccount","") | |||
}else{ | |||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
}else{ | |||
this.$set(this.form, "operatorCode", ''); | |||
} | |||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
}else{ | |||
this.$set(this.form, "enterpriseCode", ''); | |||
} | |||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||
}else{ | |||
this.$set(this.form, "accountPassword", ''); | |||
} | |||
this.$set(this.form, "bookId",''); | |||
this.$set(this.form, "deptId", ''); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
if(obj.payerFrom==6){ | |||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
this.$set(this.form, "payerAccount", response.data); | |||
}); | |||
}else { | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
} | |||
} | |||
} | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,954 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加母子转账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择申请时间' }]" | |||
v-model="form.applyDate" | |||
label="申请时间" | |||
placeholder="请选择申请时间" | |||
@click="showlasj = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
/> | |||
<van-popup v-model="showlasj" position="bottom"> | |||
<van-datetime-picker | |||
v-model="currentDate" | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
label="资金支出类别" | |||
placeholder="请选择" | |||
v-model="capitalExpenditureType" | |||
@click="showcapital = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showcapital" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="capitalExpenditureTypeOptions" | |||
@confirm="onConfirmCapital" | |||
@cancel="showcapital = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
required | |||
label="支出总金额" | |||
v-model="form.expenditureAmount" | |||
placeholder="根据下方收款金额自动核算" | |||
input-align="right" | |||
label-width="auto" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field | |||
label="付款事由" | |||
v-model="form.remark" | |||
type="textarea" | |||
placeholder="请输入付款事由" | |||
input-align="right" | |||
rows="3" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请输入付款事由' }]" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="项目名称" | |||
placeholder="请选择" | |||
v-model="projectForm.projectName" | |||
@click="showproject = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||
/> | |||
<van-popup v-model="showproject" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectListShow" | |||
@confirm="onConfirmProject" | |||
@cancel="showproject = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="工程款类型" | |||
placeholder="请选择" | |||
v-model="projectFundType" | |||
@click="showFundType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择工程款类型' }]" | |||
/> | |||
<van-popup v-model="showFundType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectFundTypeOptions" | |||
@confirm="onConfirmFundType" | |||
@cancel="showFundType = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
<van-field | |||
readonly | |||
clickable | |||
label="付款方" | |||
placeholder="请选择付款方" | |||
v-model="form.payer" | |||
@click="showpayer = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择付款方' }]" | |||
/> | |||
<van-popup v-model="showpayer" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payerOptions" | |||
@confirm="onConfirmPayer($event)" | |||
@cancel="showpayer = false" | |||
/> | |||
</van-popup> | |||
<van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-cell title="收款账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款方" | |||
placeholder="请选择" | |||
v-model="item.payee" | |||
@click="item.showPayee = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择收款方' }]" | |||
/> | |||
<van-popup v-model="item.showPayee" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeList" | |||
@confirm="onConfirmPayee($event,index)" | |||
@cancel="item.showPayee = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择收款方" | |||
v-model="item.bankTypeText" | |||
@click="item.showbankType = true" | |||
input-align="right" | |||
required | |||
:rules="[{ required: true , message:'所属银行不能为空 ' }]" | |||
/> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="12" align="center"> | |||
<!-- @click="goUpdate"--> | |||
<van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
<van-col span="12" align="center"> | |||
<!-- @click="goAdd"--> | |||
<van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
listTaccount, | |||
listVaccount | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalAdd5", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showpayer:false, | |||
buttonType:'a', | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
payerOptions:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'', | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
this.reset(); | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
this.projectList = response.rows; | |||
for (let i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (let i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
let params1={ | |||
townAccountType:'2' | |||
} | |||
listTaccount(params1).then((response) => { | |||
console.log(response) | |||
response.rows.map((res,index) => { | |||
if(res.townAccountType=='2'){ | |||
res['payerFrom'] = '2' | |||
this.payerOptions.push(res); | |||
console.log(res) | |||
this.payerOptions[index].text = res.payee; | |||
this.payerOptions[index].value = res.id; | |||
} | |||
}) | |||
}); | |||
this.getDictionaries(); | |||
}, | |||
methods: { | |||
// 表单重置 | |||
reset() { | |||
this.form = { | |||
id: null, | |||
upId: null, | |||
downId: null, | |||
orderId: null, | |||
cashierId: null, | |||
transferType: '5', | |||
accountType: '2', | |||
explainSituation: null, | |||
succeedAmount: null, | |||
payer: null, | |||
payerAccount: null, | |||
operatorCode: null, | |||
enterpriseCode: null, | |||
expenditureAmount: null, | |||
capitalExpenditureType: '1', | |||
remark: null, | |||
transferStatus: "0", | |||
auditStatus: "0", | |||
paymentState: "1", | |||
bankPriority: "0", | |||
clientPriority: "0" | |||
}; | |||
this.processList = {} | |||
this.projectForm={ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
} | |||
}, | |||
goFlow(){ | |||
if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){ | |||
window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode; | |||
}else{ | |||
this.$notify({ type: 'danger', message: '无审批流程!' }); | |||
} | |||
}, | |||
getChange(){ | |||
console.log(this.buttonType) | |||
if(this.buttonType == 'update'){ | |||
console.log('update') | |||
this.goUpdate(); | |||
}else if(this.buttonType == 'add'){ | |||
console.log('add') | |||
this.goAdd(); | |||
} | |||
}, | |||
getDictionaries(){ | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
console.log(e) | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
addChargeItme(index){ | |||
if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
return; | |||
} | |||
this.getDicts("bank_type").then(res => { | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
bankTypeText:"", //所属银行 | |||
showPayee:false, | |||
showbankType:false | |||
}); | |||
}); | |||
this.getPayeeList(); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
if(this.form.cashierId==null||this.form.cashierId==""){ | |||
this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
return; | |||
}else { | |||
this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
listVaccount(this.queryParams).then((response) => { | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
}); | |||
} | |||
}, | |||
payeeDictLabel(datas, value) { | |||
let actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
this.projectList.map(res => { | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data,index){ | |||
for (let i = 0 ; i < this.chargeItme.length ; i++){ | |||
this.chargeItme[i].showPayee = false; | |||
} | |||
this.chargeItme[index].payee = data.text; | |||
this.chargeItme[index].payeeId = data.value; | |||
this.chargeItme[index].showpayee = false; | |||
this.payeeSelectChange(data.value , index) | |||
this.onConfirmBankType(data,index); | |||
}, | |||
onConfirmBankType(data,index){ | |||
console.log(this.bankTypeDictionaries) | |||
this.bankTypeDictionaries.map(res => { | |||
if(res.value==data.bankType){ | |||
this.chargeItme[index].bankTypeText = res.text; | |||
this.chargeItme[index].bankType = res.value; | |||
} | |||
}) | |||
}, | |||
onConfirmPayer(data){ | |||
console.log(data) | |||
this.form.payer = data.text; | |||
this.form.cashierId = data.value; | |||
this.form.payerAccount = data.payeeAccount; | |||
this.showpayer = false; | |||
// this.selectChange(data.value) | |||
this.accountTypeChange(); | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
if(this.form.cashierId==null||this.form.cashierId==""){ | |||
this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
return; | |||
}else { | |||
this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
console.log(this.queryParams) | |||
listVaccount(this.queryParams).then((response) => { | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
}); | |||
} | |||
}, | |||
// 钱计算 | |||
moneyChange(input) { | |||
console.log(input) | |||
let obj = {}; | |||
obj = this.chargeItme.find((account) => { | |||
//model就是上面的数据源 | |||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
}); | |||
let total = 0; | |||
this.chargeItme.forEach((money) => { | |||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
}); | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
console.log(this.form) | |||
addTransfer(this.form).then((response) => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
console.log(this.uploadFiles) | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
let obj = {}; | |||
let fuzhitype = 0; | |||
obj = this.payeeList.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select ; //筛选出匹配数据 | |||
}); | |||
if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
this.chargeItme.some((value, index) => { | |||
if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
fuzhitype = 2; | |||
return true; | |||
} | |||
if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
fuzhitype = 1; | |||
return true; | |||
} | |||
}); | |||
} | |||
if(fuzhitype == 0){ | |||
this.$set(this.chargeItme[i], "payee",obj.payee) | |||
this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
}else if(fuzhitype == 1){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
}else if(fuzhitype == 2){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
} | |||
}, | |||
selectChange(select) { | |||
let obj = {}; | |||
obj = this.payerOptions.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select; //筛选出匹配数据 | |||
}); | |||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
obj.accountPassword != null && obj.accountPassword != ""){ | |||
this.$set(this.form, "bookId", obj.bookId); | |||
this.$set(this.form, "deptId", obj.deptId); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
this.$set(this.form, "payerFrom", '1'); | |||
}else{ | |||
if(obj.payerFrom==1){ | |||
this.diglogStatus = false; | |||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
this.$set(this.form,"payer","") | |||
this.$set(this.form,"payerAccount","") | |||
}else{ | |||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
}else{ | |||
this.$set(this.form, "operatorCode", ''); | |||
} | |||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
}else{ | |||
this.$set(this.form, "enterpriseCode", ''); | |||
} | |||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||
}else{ | |||
this.$set(this.form, "accountPassword", ''); | |||
} | |||
this.$set(this.form, "bookId",''); | |||
this.$set(this.form, "deptId", ''); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
if(obj.payerFrom==6){ | |||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
this.$set(this.form, "payerAccount", response.data); | |||
}); | |||
}else { | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
} | |||
} | |||
} | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,426 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="backDone" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">转账/还款审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
<van-field readonly label="是否与付款方同行" v-if="form.bankType==2||form.bankType==3||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" /> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件(收据)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList1" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(发票)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList2" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(其他)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList3" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="请输入审批意见"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , approval ,listTemplate } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {attachmentList, systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "approvalApproval", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
contractOpen:false, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
uploadFiles:[], | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
backDone(){ | |||
if(this.$route.query.type != 'done'){ | |||
this.$router.push({name:'yinnongDone',query: {activeName:'1'}}) | |||
}else{ | |||
this.$router.push({name:'yinnongDone',query: {activeName:'2'}}) | |||
} | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4) { | |||
this.contractOpen = true | |||
let param = { | |||
'transferId': response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type_all").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -0,0 +1,422 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">现金提现申请审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="提现总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="提款金额(元)" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件(收据)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList1" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(发票)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList2" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(其他)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList3" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getCash , listCashdetailByCashId , listPayee , getProjectto , listProject , addProjectto , customSubmit ,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {approval, attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail10", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'2' | |||
}, | |||
contractOpen:false, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
uploadFiles:[], | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
console.log(response) | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList() | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess2?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
console.log(data); | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -0,0 +1,444 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">备付金支出审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="提款金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件(收据)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList1" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(发票)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList2" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(其他)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList3" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
approval, | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail11", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess2?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4){ | |||
this.contractOpen = true | |||
let param={ | |||
'transferId' : response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
console.log(data); | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -0,0 +1,508 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">汇票支出审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">出票方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
label="出票金额(元)" | |||
v-model="form.expenditureAmount" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'出票金额不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="汇票类型" | |||
v-model="orderTypeName" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="汇票类型" | |||
v-model="form.orderType" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
style="display: none" | |||
required | |||
:rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="开票日" | |||
v-model="form.startTime" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'开票日不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="到期日" | |||
v-model="form.endTime" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'到期日不能为空!' }]" | |||
/> | |||
</div> | |||
<p class="main_title">收票方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件(收据)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList1" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(发票)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList2" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<p class="main_title">上传附件(其他)</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList3" :key="index"> | |||
<a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
approval, | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail12", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
orderTypeName:'', | |||
orderTypeOptions:[], | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
console.log(response) | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDicts("order_type").then(response => { | |||
this.orderTypeOptions = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess2?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4){ | |||
this.contractOpen = true | |||
let param={ | |||
'transferId' : response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
this.orderTypeOptions.map(res => { | |||
if(res.dictValue==this.form.orderType){ | |||
this.orderTypeName = res.dictLabel | |||
} | |||
}) | |||
}); | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
console.log(response.data) | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
console.log(data); | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -0,0 +1,357 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看银行卡转账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
<van-field readonly label="是否与付款方同行" v-if="form.bankType==2||form.bankType==3||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" /> | |||
</div> | |||
<div style="position:relative;" > | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
<p class="main_more" v-if="showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||
<p class="main_more" v-if="!showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showbtn:true, | |||
listLength:1, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectList:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
console.log(res.name) | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4) { | |||
this.contractOpen = true | |||
let param = { | |||
'transferId': response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type_all").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_more{ | |||
width: 96%; | |||
margin: 0 auto; | |||
margin-top: 10px; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
text-align: center; | |||
padding: 10PX 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,323 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看现金提现申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="提现总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="提款金额(元)" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , addProjectto , customSubmit ,getInfoto ,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail10", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:10, | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'2' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
uploadFiles:[], | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4){ | |||
this.contractOpen = true | |||
let param={ | |||
'transferId' : response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,353 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看备付金支出申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div style="position:relative;"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/> | |||
<van-field readonly label="申请使用金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_more" v-if="showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||
<p class="main_more" v-if="!showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , | |||
listProject , addProjectto , customSubmit,getInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail11", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showbtn:true, | |||
listLength:1, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:11, | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4){ | |||
this.contractOpen = true | |||
let param={ | |||
'transferId' : response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
console.log(response) | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_more{ | |||
width: 96%; | |||
margin: 0 auto; | |||
margin-top: 10px; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
text-align: center; | |||
padding: 10PX 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,416 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看汇票支出申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">出票方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
label="出票金额(元)" | |||
v-model="form.expenditureAmount" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'出票金额不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="汇票类型" | |||
v-model="orderTypeName" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="汇票类型" | |||
v-model="form.orderType" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
style="display: none" | |||
required | |||
:rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="开票日" | |||
v-model="form.startTime" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'开票日不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="到期日" | |||
v-model="form.endTime" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'到期日不能为空!' }]" | |||
/> | |||
</div> | |||
<p class="main_title">收票方信息</p> | |||
<div style="position:relative;"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||
<van-field readonly label="收票方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
</div> | |||
<p class="main_more" v-if="showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||
<p class="main_more" v-if="!showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject | |||
, addProjectto , customSubmit, getInfoto ,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail12", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showbtn:true, | |||
listLength:1, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:12, | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
orderTypeName:'', | |||
orderTypeOptions:[], | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDicts("order_type").then(response => { | |||
this.orderTypeOptions = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4){ | |||
this.contractOpen = true | |||
let param={ | |||
'transferId' : response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
this.orderTypeOptions.map(res => { | |||
if(res.dictValue==this.form.orderType){ | |||
this.orderTypeName = res.dictLabel | |||
} | |||
}) | |||
}); | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
console.log(response.data) | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_cash", | |||
bizPath: "yinnong", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_more{ | |||
width: 96%; | |||
margin: 0 auto; | |||
margin-top: 10px; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
text-align: center; | |||
padding: 10PX 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,354 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看信用卡还款申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">列表信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
</div> | |||
<div style="position:relative;" > | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
<p class="main_more" v-if="showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||
<p class="main_more" v-if="!showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto,listTemplate } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showbtn:true, | |||
listLength:1, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
contractOpen:false, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'', | |||
templateList:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (let i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
this.getTemplateList(); | |||
}, | |||
methods: { | |||
getTemplateList(){ | |||
let templateQueryParams = { | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
}; | |||
listTemplate(templateQueryParams).then(response => { | |||
this.templateList = response.rows; | |||
}); | |||
}, | |||
tempalteFormat(id){ | |||
let name = "" | |||
this.templateList.map(res => { | |||
if(res.id==id){ | |||
console.log(res.name) | |||
name = res.name | |||
} | |||
}) | |||
return name | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4) { | |||
this.contractOpen = true | |||
let param = { | |||
'transferId': response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type_all").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_more{ | |||
width: 96%; | |||
margin: 0 auto; | |||
margin-top: 10px; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
text-align: center; | |||
padding: 10PX 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,459 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看虚拟挂账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">列表信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
</div> | |||
<div style="position:relative;" > | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
<p class="main_more" v-if="showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> | |||
<p class="main_more" v-if="!showbtn" @click="listLength = 1,showbtn=true">收起列表</p> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showbtn:true, | |||
listLength:1, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'' | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
console.log(response) | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
console.log(data) | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
console.log(data) | |||
this.projectList.map(res => { | |||
console.log(res) | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
console.log(this.projectForm) | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data){ | |||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
console.log(this.chargeItme) | |||
this.showpayee = false; | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(this.chargeItme) | |||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
this.showbankType = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
console.log(e) | |||
this.payeeList = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
goAdd(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
console.log(this.form); | |||
updateTransfer(this.form).then(response => { | |||
console.log(response); | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
console.log(this.projectForm) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}); | |||
}, | |||
goUpdate(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
this.projectForm.outId = this.form.id | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
console.log(file) | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
if(file.id){ | |||
systemAttachment(file.id).then((res) => { | |||
}); | |||
} | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_more{ | |||
width: 96%; | |||
margin: 0 auto; | |||
margin-top: 10px; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
text-align: center; | |||
padding: 10PX 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,316 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看代管转账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | |||
<template #input> | |||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||
<van-radio name="1">线上审批</van-radio> | |||
<van-radio name="2">线下审批</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> | |||
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">列表信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
<van-field readonly label="是否与付款方同行" v-if="form.bankType==2||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" /> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 0;"> | |||
<van-cell value="收据" /> | |||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="发票" /> | |||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader> | |||
<van-cell value="其他" /> | |||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> | |||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList1:[], | |||
fileList2:[], | |||
fileList3:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
contractOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
infoForm:{ | |||
infoId:null, | |||
name:null, | |||
code:null, | |||
totalAmount:null, | |||
contractionId:null, | |||
transferId:null | |||
}, | |||
projectFundType:'' | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else if(response.data.capitalExpenditureType==4) { | |||
this.contractOpen = true | |||
let param = { | |||
'transferId': response.data.id | |||
} | |||
getInfoto(param).then(res => { | |||
this.infoForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
getFileList(){ | |||
let oData1= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "1", | |||
} | |||
attachmentList(oData1).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData2= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "2", | |||
} | |||
attachmentList(oData2).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
let oData3= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "3", | |||
} | |||
attachmentList(oData3).then(res => { | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,430 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">查看母子转账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">列表信息</p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'' | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
console.log(response) | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
console.log(data) | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
console.log(data) | |||
this.projectList.map(res => { | |||
console.log(res) | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
console.log(this.projectForm) | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data){ | |||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
console.log(this.chargeItme) | |||
this.showpayee = false; | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(this.chargeItme) | |||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
this.showbankType = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
console.log(e) | |||
this.payeeList = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
goAdd(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}); | |||
}, | |||
goUpdate(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
this.projectForm.outId = this.form.id | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,219 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="goBack()" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">银行卡转账申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList"> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" center :to="{name:'sunVillageApprovalDetail', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn1.png" size="30" color="#FF4646" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | |||
</template> | |||
<template #default> | |||
<p style="width: 80px;display: inline-block">{{item.auditStatus}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer , updateTYinnongTransferFoStatus } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
transferType:"1", | |||
}, | |||
form:{} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
//金额千分符 会在整数后添加两个0 | |||
stateFormat(cellValue) { | |||
if (cellValue) { | |||
return Number(cellValue) | |||
.toFixed(2) | |||
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||
return $1 + ","; | |||
}) | |||
.replace(/\.$/, "") + "元"; | |||
} | |||
}, | |||
goAdd(){ | |||
window.location = 'approvalAdd'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delTransfer(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
customSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
goBack(){ | |||
this.$router.push({path:'/yinnong/workbench'}) | |||
}, | |||
cancelApply(row) { | |||
console.log(row) | |||
const instanceId = row.instanceId; | |||
this.form.id = row.id; | |||
this.form.auditStatus = "0"; | |||
this.form.applyUserId = ""; | |||
this.form.applyUserName = ""; | |||
this.form.applyTime = ""; | |||
this.form.instanceId = ""; | |||
this.form.processKey = ""; | |||
let that = this; | |||
this.$dialog.confirm({ | |||
message: '您确认撤回待审数据?', | |||
}) | |||
.then(function () { | |||
return updateTYinnongTransferFoStatus(that.form).then(response => { | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
that.$toast.success('撤回成功'); | |||
}); | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,178 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">现金提现申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail10', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn6.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify10', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {cashSubmit, delCash, listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList10", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
cashType: '10', | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
window.location = 'approvalAdd10'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listCash(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delCash(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
console.log(id) | |||
cashSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,215 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">备付金支出申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail11', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn7.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify11', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {cashSubmit, delCash, listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList11", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
cashType: '11', | |||
}, | |||
form:{} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
//金额千分符 会在整数后添加两个0 | |||
stateFormat(cellValue) { | |||
if (cellValue) { | |||
return Number(cellValue) | |||
.toFixed(2) | |||
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||
return $1 + ","; | |||
}) | |||
.replace(/\.$/, "") + "元"; | |||
} | |||
}, | |||
goAdd(){ | |||
window.location = 'approvalAdd11'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listCash(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delCash(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
cashSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
cancelApply(row) { | |||
console.log(row) | |||
const instanceId = row.instanceId; | |||
this.form.id = row.id; | |||
this.form.auditStatus = "0"; | |||
this.form.applyUserId = ""; | |||
this.form.applyUserName = ""; | |||
this.form.applyTime = ""; | |||
this.form.instanceId = ""; | |||
this.form.processKey = ""; | |||
let that = this; | |||
this.$dialog.confirm({ | |||
message: '您确认撤回待审数据?', | |||
}) | |||
.then(function () { | |||
return updateTYinnongTransferFoStatus(that.form).then(response => { | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
that.$toast.success('撤回成功'); | |||
}); | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,214 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">汇票支出申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail12', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn8.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify12', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {cashSubmit, delCash, listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList12", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:100, | |||
cashType: '12', | |||
}, | |||
form:{} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
//金额千分符 会在整数后添加两个0 | |||
stateFormat(cellValue) { | |||
if (cellValue) { | |||
return Number(cellValue) | |||
.toFixed(2) | |||
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||
return $1 + ","; | |||
}) | |||
.replace(/\.$/, "") + "元"; | |||
} | |||
}, | |||
goAdd(){ | |||
window.location = 'approvalAdd12'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listCash(this.queryParams).then(response => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delCash(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
cashSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
cancelApply(row) { | |||
console.log(row) | |||
const instanceId = row.instanceId; | |||
this.form.id = row.id; | |||
this.form.auditStatus = "0"; | |||
this.form.applyUserId = ""; | |||
this.form.applyUserName = ""; | |||
this.form.applyTime = ""; | |||
this.form.instanceId = ""; | |||
this.form.processKey = ""; | |||
let that = this; | |||
this.$dialog.confirm({ | |||
message: '您确认撤回待审数据?', | |||
}) | |||
.then(function () { | |||
return updateTYinnongTransferFoStatus(that.form).then(response => { | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
that.$toast.success('撤回成功'); | |||
}); | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,217 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="goBack" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">信用卡还款申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail2', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn2.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{stateFormat(item.expenditureAmount)}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify2', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='待审'" square text="撤回" type="danger" @click="cancelApply(item)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer , updateTYinnongTransferFoStatus } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList2", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
transferType:"2", | |||
}, | |||
form:{} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
//金额千分符 会在整数后添加两个0 | |||
stateFormat(cellValue) { | |||
if (cellValue) { | |||
return Number(cellValue) | |||
.toFixed(2) | |||
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { | |||
return $1 + ","; | |||
}) | |||
.replace(/\.$/, "") + "元"; | |||
} | |||
}, | |||
goAdd(){ | |||
window.location = 'approvalAdd2'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delTransfer(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
customSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
goBack(){ | |||
this.$router.push({path:'/yinnong/workbench'}) | |||
}, | |||
cancelApply(row) { | |||
console.log(row) | |||
const instanceId = row.instanceId; | |||
this.form.id = row.id; | |||
this.form.auditStatus = "0"; | |||
this.form.applyUserId = ""; | |||
this.form.applyUserName = ""; | |||
this.form.applyTime = ""; | |||
this.form.instanceId = ""; | |||
this.form.processKey = ""; | |||
let that = this; | |||
this.$dialog.confirm({ | |||
message: '您确认撤回待审数据?', | |||
}) | |||
.then(function () { | |||
return updateTYinnongTransferFoStatus(that.form).then(response => { | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
that.$toast.success('撤回成功'); | |||
}); | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,176 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">虚拟挂账申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail3', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn3.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify3', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList3", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
transferType:"3", | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
window.location = 'approvalAdd3'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delTransfer(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
customSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,176 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">代管转账申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail4', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn4.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify4', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList4", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
transferType:"4", | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
window.location = 'approvalAdd4'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delTransfer(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
customSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,176 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-right="goAdd()" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">母子转账申请列表</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="add" size="18"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-list | |||
v-model="loading" | |||
:finished="finished" | |||
finished-text="没有更多了" | |||
@load="getList" | |||
> | |||
<van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'sunVillageApprovalDetail5', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/icon_yn5.png" size="30" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
<template #label> | |||
<p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
</template> | |||
</van-cell> | |||
<template #right> | |||
<van-row> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'sunVillageApprovalModify5', query: {id:item.id}}" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
</van-col> | |||
<van-col> | |||
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" /> | |||
</van-col> | |||
</van-row> | |||
</template> | |||
</van-swipe-cell> | |||
</van-list> | |||
</div> | |||
</template> | |||
<script> | |||
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalList5", | |||
data() { | |||
return { | |||
applicationList:[], | |||
auditStatusOptions:[], | |||
loading: false, | |||
finished: false, | |||
queryParams:{ | |||
pageNum:1, | |||
pageSize:10, | |||
transferType:"5", | |||
} | |||
}; | |||
}, | |||
created() { | |||
this.getDicts("audit_status").then((response) => { | |||
this.auditStatusOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
goAdd(){ | |||
window.location = 'approvalAdd5'; | |||
}, | |||
getList(){ | |||
setTimeout(() => { | |||
listTransfer(this.queryParams).then(response => { | |||
console.log(response) | |||
for (var i = 0; i < response.rows.length; i++) { | |||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | |||
this.applicationList.push(response.rows[i]); | |||
} | |||
console.log(this.applicationList.length >= response.total) | |||
if(this.applicationList.length >= response.total){ | |||
this.finished = true; | |||
return; | |||
}else{ | |||
this.loading = false; | |||
this.queryParams.pageNum += 1 ; | |||
} | |||
}); | |||
}, 1000); | |||
}, | |||
deleteList(id,index){ | |||
this.$dialog.confirm({ | |||
message: '您确认删除草稿?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.applicationList.splice(index,1) | |||
delTransfer(id).then(res => { | |||
if(res.code = 200){ | |||
this.$toast.success('删除成功'); | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}, | |||
onSubmit(id){ | |||
this.$dialog.confirm({ | |||
message: '您确认提交草稿?', | |||
}) | |||
.then(() => { | |||
customSubmit(id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(0) | |||
},2000) | |||
}) | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 3%; | |||
} | |||
/deep/.van-cell__title{ | |||
flex: 0.7; | |||
} | |||
/deep/.van-cell__title span{ | |||
font-family: Arial; | |||
font-size: 0.4rem; | |||
font-weight: normal; | |||
} | |||
/deep/.van-cell__label span{ | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
i{ | |||
font-size: 0.2rem; | |||
} | |||
} | |||
/deep/.van-cell__value{ | |||
flex: 0.3; | |||
color: #1D6FE9; | |||
font-weight: bold; | |||
} | |||
/deep/.van-swipe-cell{ | |||
margin-bottom: 0.2rem; | |||
border-radius: 0.2rem; | |||
overflow: hidden; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
} | |||
/deep/van-ellipsis{ | |||
font-weight: bold; | |||
} | |||
.van-row{ | |||
height: 100%; | |||
} | |||
.van-col{ | |||
height: 100%; | |||
} | |||
.delete-button { | |||
height: 100%; | |||
} | |||
</style> |
@@ -0,0 +1,943 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">修改虚拟挂账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择申请时间' }]" | |||
v-model="form.applyDate" | |||
label="申请时间" | |||
placeholder="请选择申请时间" | |||
@click="showlasj = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
/> | |||
<van-popup v-model="showlasj" position="bottom"> | |||
<van-datetime-picker | |||
v-model="currentDate" | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
label="资金支出类别" | |||
placeholder="请选择" | |||
v-model="capitalExpenditureType" | |||
@click="showcapital = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showcapital" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="capitalExpenditureTypeOptions" | |||
@confirm="onConfirmCapital" | |||
@cancel="showcapital = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
required | |||
label="支出总金额" | |||
v-model="form.expenditureAmount" | |||
placeholder="根据下方收款金额自动核算" | |||
input-align="right" | |||
label-width="auto" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field | |||
label="付款事由" | |||
v-model="form.remark" | |||
type="textarea" | |||
placeholder="请输入付款事由" | |||
input-align="right" | |||
rows="3" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请输入付款事由' }]" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="项目名称" | |||
placeholder="请选择" | |||
v-model="projectForm.projectName" | |||
@click="showproject = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||
/> | |||
<van-popup v-model="showproject" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectListShow" | |||
@confirm="onConfirmProject" | |||
@cancel="showproject = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="工程款类型" | |||
placeholder="请选择" | |||
v-model="projectFundType" | |||
@click="showFundType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择工程款类型' }]" | |||
/> | |||
<van-popup v-model="showFundType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectFundTypeOptions" | |||
@confirm="onConfirmFundType" | |||
@cancel="showFundType = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
<van-field | |||
readonly | |||
clickable | |||
label="付款方" | |||
placeholder="请选择付款方" | |||
v-model="form.payer" | |||
@click="showpayer = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择付款方' }]" | |||
/> | |||
<van-popup v-model="showpayer" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payerOptions" | |||
@confirm="onConfirmPayer($event)" | |||
@cancel="showpayer = false" | |||
/> | |||
</van-popup> | |||
<van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-cell title="收款账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款方" | |||
placeholder="请选择" | |||
v-model="item.payee" | |||
@click="item.showPayee = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择收款方' }]" | |||
/> | |||
<van-popup v-model="item.showPayee" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeList" | |||
@confirm="onConfirmPayee($event,index)" | |||
@cancel="item.showPayee = false" | |||
/> | |||
</van-popup> | |||
<van-field required readonly :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
<van-field required readonly :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
<van-field | |||
readonly | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="item.bankTypeText" | |||
@click="item.showbankType = true" | |||
input-align="right" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="12" align="center"> | |||
<van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
<van-col span="12" align="center"> | |||
<van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
addCash, attachmentList, | |||
commonAttach, | |||
listTaccount, | |||
listVaccount, systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request'; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalModify3", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
buttonType:'a', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
payerOptions:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
let params1={ | |||
townAccountType:'3' | |||
} | |||
listTaccount(params1).then((response) => { | |||
console.log(response) | |||
response.rows.map((res,index) => { | |||
if(res.townAccountType=='3'){ | |||
res['payerFrom'] = '3' | |||
this.payerOptions.push(res); | |||
this.payerOptions[index].text = res.payee; | |||
this.payerOptions[index].value = res.id; | |||
} | |||
}) | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){ | |||
window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode; | |||
}else{ | |||
this.$notify({ type: 'danger', message: '无审批流程!' }); | |||
} | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
console.log(res.data) | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
// response.rows[j].payeeText = response.rows[j].payee; | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
response.rows[j].showPayee = false; | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
getChange(){ | |||
console.log(this.buttonType) | |||
if(this.buttonType == 'update'){ | |||
console.log('update') | |||
this.goUpdate(); | |||
}else if(this.buttonType == 'add'){ | |||
console.log('add') | |||
this.goAdd(); | |||
} | |||
}, | |||
getError(e){ | |||
console.log(e) | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
addChargeItme(index){ | |||
if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
return; | |||
} | |||
this.getDicts("bank_type").then(res => { | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "1", //所属银行 | |||
bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
showPayee:false, | |||
showbankType:false | |||
}); | |||
}); | |||
}, | |||
getPayeeList() { | |||
let params = { | |||
villageAccountType : 1, | |||
status:'0', | |||
accountType : this.form.accountType | |||
} | |||
listVaccount(params).then(response => { | |||
console.log(response) | |||
if(response.rows.length>0){ | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
console.log(data) | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
this.projectList.map(res => { | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data,index){ | |||
console.log(data) | |||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
this.chargeItme[i].showPayee = false; | |||
} | |||
this.chargeItme[index].payee = data.text; | |||
this.chargeItme[index].payeeId = data.value; | |||
this.payeeSelectChange(data.value , index) | |||
}, | |||
onConfirmBankType(data,index){ | |||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
this.chargeItme[i].showbankType = false; | |||
} | |||
this.chargeItme[index].bankTypeText = data.text; | |||
this.chargeItme[index].bankType = data.value; | |||
this.chargeItme[index].showbankType = false; | |||
}, | |||
onConfirmPayer(data){ | |||
console.log(data) | |||
this.form.payer = data.text; | |||
this.form.cashierId = data.value; | |||
this.form.payerAccount = data.payeeAccount | |||
this.showpayer = false; | |||
//this.selectChange(data.value); | |||
this.accountTypeChange(); | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
this.chargeItme = []; | |||
this.payeeList = []; | |||
let params = { | |||
villageAccountType : 1, | |||
status:'0', | |||
accountType : this.form.accountType, | |||
taccountId:this.form.cashierId | |||
} | |||
listVaccount(params).then(response => { | |||
console.log(response) | |||
if(response.rows.length>0){ | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
} | |||
}); | |||
}, | |||
// 钱计算 | |||
moneyChange(input) { | |||
console.log(input) | |||
let obj = {}; | |||
obj = this.chargeItme.find((account) => { | |||
//model就是上面的数据源 | |||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
}); | |||
let total = 0; | |||
this.chargeItme.forEach((money) => { | |||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
}); | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
console.log(this.uploadFiles) | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
let obj = {}; | |||
let fuzhitype = 0; | |||
obj = this.payeeList.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select ; //筛选出匹配数据 | |||
}); | |||
if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
this.chargeItme.some((value, index) => { | |||
if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
fuzhitype = 2; | |||
return true; | |||
} | |||
if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
fuzhitype = 1; | |||
return true; | |||
} | |||
}); | |||
} | |||
if(fuzhitype == 0){ | |||
this.$set(this.chargeItme[i], "payee",obj.payee) | |||
this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
}else if(fuzhitype == 1){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
}else if(fuzhitype == 2){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
} | |||
}, | |||
selectChange(select) { | |||
let obj = {}; | |||
obj = this.payerOptions.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select; //筛选出匹配数据 | |||
}); | |||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
obj.accountPassword != null && obj.accountPassword != ""){ | |||
this.$set(this.form, "bookId", obj.bookId); | |||
this.$set(this.form, "deptId", obj.deptId); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
this.$set(this.form, "payerFrom", '1'); | |||
}else{ | |||
if(obj.payerFrom==1){ | |||
this.diglogStatus = false; | |||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
this.$set(this.form,"payer","") | |||
this.$set(this.form,"payerAccount","") | |||
}else{ | |||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
}else{ | |||
this.$set(this.form, "operatorCode", ''); | |||
} | |||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
}else{ | |||
this.$set(this.form, "enterpriseCode", ''); | |||
} | |||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||
}else{ | |||
this.$set(this.form, "accountPassword", ''); | |||
} | |||
this.$set(this.form, "bookId",''); | |||
this.$set(this.form, "deptId", ''); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
if(obj.payerFrom==6){ | |||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
this.$set(this.form, "payerAccount", response.data); | |||
}); | |||
}else { | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
} | |||
} | |||
} | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
console.log(file) | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
if(file.id){ | |||
systemAttachment(file.id).then((res) => { | |||
}); | |||
} | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,948 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">修改母子转账申请</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择申请时间' }]" | |||
v-model="form.applyDate" | |||
label="申请时间" | |||
placeholder="请选择申请时间" | |||
@click="showlasj = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
/> | |||
<van-popup v-model="showlasj" position="bottom"> | |||
<van-datetime-picker | |||
v-model="currentDate" | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
required | |||
:rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
label="资金支出类别" | |||
placeholder="请选择" | |||
v-model="capitalExpenditureType" | |||
@click="showcapital = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
/> | |||
<van-popup v-model="showcapital" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="capitalExpenditureTypeOptions" | |||
@confirm="onConfirmCapital" | |||
@cancel="showcapital = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
required | |||
label="支出总金额" | |||
v-model="form.expenditureAmount" | |||
placeholder="根据下方收款金额自动核算" | |||
input-align="right" | |||
label-width="auto" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field | |||
label="付款事由" | |||
v-model="form.remark" | |||
type="textarea" | |||
placeholder="请输入付款事由" | |||
input-align="right" | |||
rows="3" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请输入付款事由' }]" | |||
/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="项目名称" | |||
placeholder="请选择" | |||
v-model="projectForm.projectName" | |||
@click="showproject = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||
/> | |||
<van-popup v-model="showproject" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectListShow" | |||
@confirm="onConfirmProject" | |||
@cancel="showproject = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="工程款类型" | |||
placeholder="请选择" | |||
v-model="projectFundType" | |||
@click="showFundType = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择工程款类型' }]" | |||
/> | |||
<van-popup v-model="showFundType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="projectFundTypeOptions" | |||
@confirm="onConfirmFundType" | |||
@cancel="showFundType = false" | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
<van-field | |||
readonly | |||
clickable | |||
label="付款方" | |||
placeholder="请选择付款方" | |||
v-model="form.payer" | |||
@click="showpayer = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择付款方' }]" | |||
/> | |||
<van-popup v-model="showpayer" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payerOptions" | |||
@confirm="onConfirmPayer($event)" | |||
@cancel="showpayer = false" | |||
/> | |||
</van-popup> | |||
<van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
<div class="main_box" style="margin-bottom: 15px;"> | |||
<van-cell title="收款账户类型"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-cell title="是否与付款方同行" v-if="form.bankType==2||form.bankType==4"> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" v-model="form.isPeers"> | |||
<van-radio name="Y">是</van-radio> | |||
<van-radio name="N">否</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款方" | |||
placeholder="请选择" | |||
v-model="item.payee" | |||
@click="item.showPayee = true" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
required | |||
:rules="[{ required: true , message:'请选择收款方' }]" | |||
/> | |||
<van-popup v-model="item.showPayee" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeList" | |||
@confirm="onConfirmPayee($event,index)" | |||
@cancel="item.showPayee = false" | |||
/> | |||
</van-popup> | |||
<van-field required readonly :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
<van-field required readonly :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="item.bankTypeText" | |||
input-align="right" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="12" align="center"> | |||
<van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
<van-col span="12" align="center"> | |||
<van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request'; | |||
import { | |||
addTransfer, | |||
attachmentList, | |||
commonAttach, listTaccount, | |||
listVaccount, systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalModify5", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
buttonType:'a', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
payerOptions:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
let params1={ | |||
townAccountType:'2' | |||
} | |||
listTaccount(params1).then((response) => { | |||
response.rows.map((res,index) => { | |||
if(res.townAccountType=='2'){ | |||
res['payerFrom'] = '2' | |||
this.payerOptions.push(res); | |||
this.payerOptions[index].text = res.payee; | |||
this.payerOptions[index].value = res.id; | |||
} | |||
}) | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){ | |||
window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode; | |||
}else{ | |||
this.$notify({ type: 'danger', message: '无审批流程!' }); | |||
} | |||
}, | |||
getDictionaries(){ | |||
getTransfer(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
console.log(res.data) | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
this.getPayeeList(); | |||
}); | |||
queryTransferDetail(this.$route.query.id).then((response) => { | |||
this.getDicts("bank_type").then(res => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
for (var j = 0 ; j < response.rows.length ; j++){ | |||
// response.rows[j].payeeText = response.rows[j].payee; | |||
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
response.rows[j].showPayee = false; | |||
} | |||
this.chargeItme = response.rows; | |||
}); | |||
}); | |||
}, | |||
getChange(){ | |||
if(this.buttonType == 'update'){ | |||
this.goUpdate(); | |||
}else if(this.buttonType == 'add'){ | |||
this.goAdd(); | |||
} | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
addChargeItme(index){ | |||
if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
return; | |||
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
return; | |||
} | |||
this.getDicts("bank_type").then(res => { | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
bankTypeText: "", //所属银行 | |||
showPayee:false, | |||
showbankType:false | |||
}); | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
if(this.form.cashierId==null||this.form.cashierId==""){ | |||
this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
return; | |||
}else { | |||
this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
listVaccount(this.queryParams).then((response) => { | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
}); | |||
} | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
this.projectList.map(res => { | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data,index){ | |||
console.log(data) | |||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
this.chargeItme[i].showPayee = false; | |||
} | |||
this.chargeItme[index].payee = data.text; | |||
this.chargeItme[index].payeeId = data.value; | |||
this.payeeSelectChange(data.value , index) | |||
this.onConfirmBankType(data,index) | |||
}, | |||
onConfirmBankType(data,index){ | |||
console.log(this.bankTypeDictionaries) | |||
this.bankTypeDictionaries.map(res => { | |||
if(res.value==data.bankType){ | |||
this.chargeItme[index].bankTypeText = res.text; | |||
this.chargeItme[index].bankType = res.value; | |||
} | |||
}) | |||
}, | |||
onConfirmPayer(data){ | |||
this.form.payer = data.text; | |||
this.form.cashierId = data.value; | |||
this.showpayer = false; | |||
this.selectChange(data.value) | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
if(this.form.cashierId==null||this.form.cashierId==""){ | |||
this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
return; | |||
}else { | |||
this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
console.log(this.queryParams) | |||
listVaccount(this.queryParams).then((response) => { | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
}) | |||
}); | |||
} | |||
}, | |||
// 钱计算 | |||
moneyChange(input) { | |||
console.log(input) | |||
let obj = {}; | |||
obj = this.chargeItme.find((account) => { | |||
//model就是上面的数据源 | |||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
}); | |||
let total = 0; | |||
this.chargeItme.forEach((money) => { | |||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
}); | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
} | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
console.log(this.uploadFiles) | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
let obj = {}; | |||
let fuzhitype = 0; | |||
obj = this.payeeList.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select ; //筛选出匹配数据 | |||
}); | |||
if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
this.chargeItme.some((value, index) => { | |||
if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
fuzhitype = 2; | |||
return true; | |||
} | |||
if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
fuzhitype = 1; | |||
return true; | |||
} | |||
}); | |||
} | |||
if(fuzhitype == 0){ | |||
this.$set(this.chargeItme[i], "payee",obj.payee) | |||
this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
this.$set(this.chargeItme[i], "payeePaymentLines", obj.payeePaymentLines); | |||
}else if(fuzhitype == 1){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$set(this.chargeItme[i], "payeePaymentLines", ''); | |||
this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
}else if(fuzhitype == 2){ | |||
this.$set(this.chargeItme[i], "payee",'') | |||
this.$set(this.chargeItme[i], "bankType",'') | |||
this.$set(this.chargeItme[i], "payeeId", ''); | |||
this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
this.$set(this.chargeItme[i], "accountType", ''); | |||
this.$set(this.chargeItme[i], "payeePaymentLines", ''); | |||
this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
} | |||
}, | |||
selectChange(select) { | |||
let obj = {}; | |||
obj = this.payerOptions.find((account) => { | |||
//model就是上面的数据源 | |||
return account.id === select; //筛选出匹配数据 | |||
}); | |||
if(obj.accountPassword != null && obj.accountPassword != "" && | |||
obj.bankType != null && obj.bankType != ""){ | |||
this.$set(this.form, "bookId", obj.bookId); | |||
this.$set(this.form, "deptId", obj.deptId); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
this.$set(this.form, "bankType", obj.bankType); | |||
this.$set(this.form, "payerFrom", '1'); | |||
}else{ | |||
if(obj.payerFrom==1){ | |||
this.diglogStatus = false; | |||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
this.$set(this.form,"payer","") | |||
this.$set(this.form,"payerAccount","") | |||
}else{ | |||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
}else{ | |||
this.$set(this.form, "operatorCode", ''); | |||
} | |||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
}else{ | |||
this.$set(this.form, "enterpriseCode", ''); | |||
} | |||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||
}else{ | |||
this.$set(this.form, "accountPassword", ''); | |||
} | |||
this.$set(this.form, "bookId",''); | |||
this.$set(this.form, "deptId", ''); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
if(obj.payerFrom==6){ | |||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
this.$set(this.form, "payerAccount", response.data); | |||
}); | |||
}else { | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
} | |||
} | |||
} | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
console.log(file) | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
if(file.id){ | |||
systemAttachment(file.id).then((res) => { | |||
}); | |||
} | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "transfer", | |||
fileType: "", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,223 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">付款申请流程</p> | |||
</template> | |||
</van-nav-bar> | |||
<div class="main_box"> | |||
<van-row v-if="processList.待申请!=2"> | |||
<van-col span="4" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col> | |||
<van-col span="20" class="textBlue">草稿</van-col> | |||
</van-row> | |||
<van-row v-if="processList.待申请==2"> | |||
<van-col span="4" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col> | |||
<van-col span="20" class="textBlue">已申请 | |||
<van-row> | |||
<van-col span="8" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">{{processList.申请人}}</van-col> | |||
<van-col span="16" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">{{processList.申请时间}}</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
<van-row v-if="processList.status==2" v-for="(item1,index,i) in processList.审批事项" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" v-show="item1.approverStatus==1"><van-icon name="minus" size="14" /></p> | |||
<p class="icon_jian blue" v-show="item1.approverStatus==2"><van-icon name="success" size="14" /></p> | |||
<p class="icon_jian red" v-show="item1.approverStatus==3"><van-icon name="cross" size="14" /></p> | |||
</van-col> | |||
<van-col span="20"> | |||
<van-row> | |||
<van-col span="8" style="padding: 0;"> | |||
<p v-show="item1.approverStatus == 1">{{item1.deptLabel}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.deptLabel}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.deptLabel}}</p> | |||
</van-col> | |||
<van-col span="16" style="padding: 0;" > | |||
<p v-show="item1.approverStatus == 1">{{item1.time}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.time}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.time}}</p> | |||
</van-col> | |||
</van-row> | |||
<van-row> | |||
<van-col span="16" style="padding: 0;" > | |||
<p v-show="item1.approverStatus == 1">{{item1.assigneeName}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.assigneeName}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.assigneeName}}</p> | |||
</van-col> | |||
<van-col span="8" style="padding: 0;"> | |||
<p v-show="item1.approverStatus == 1">{{item1.comment}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.comment}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.comment}}</p> | |||
</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
<van-divider content-position="center" v-if="approvalTemplateDetailList.length>0"><h4>审批流程</h4></van-divider> | |||
<van-row v-if="approvalTemplateDetailList.length>0" v-for="(item1,index,i) in approvalTemplateDetailList" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" ><van-icon name="minus" size="14" /></p> | |||
</van-col> | |||
<van-col span="20"> | |||
<van-row> | |||
<van-col span="12" style="padding: 0;"> | |||
<p>{{item1.name}}</p> | |||
</van-col> | |||
<van-col span="12" style="padding: 0;"> | |||
<p v-show="item1.approvalLevel == 1">组级审批</p> | |||
<p v-show="item1.approvalLevel == 2">村级审批</p> | |||
<p v-show="item1.approvalLevel == 3">镇级审批</p> | |||
<p v-show="item1.approvalLevel == 4">区县审批</p> | |||
</van-col> | |||
</van-row> | |||
<van-row> | |||
<van-col span="24" style="padding: 0;"> | |||
<p>{{item1.nickName}}<span v-if="item1.feeLimit != 0 && item1.nickName != null">({{item1.feeLimit}}元)</span></p> | |||
</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { | |||
getTransferProcess, | |||
getTransfer, | |||
getProjectto, | |||
queryTransferDetail, | |||
selectApprovalByTemplateId | |||
} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalProcess", | |||
data() { | |||
return { | |||
processList:{}, | |||
form:{}, | |||
approvalTemplateDeptList:[], | |||
approvalTemplateDetailList:[] | |||
}; | |||
}, | |||
created() { | |||
this.handleUpdate(this.$route.query.id); | |||
}, | |||
methods: { | |||
//查询审批进程 | |||
getTransferProcess(id){ | |||
getTransferProcess(id).then(res => { | |||
this.processList = res.data.processSchedule | |||
this.processList.乡镇审批时间 = this.processList.乡镇审批时间?this.format(this.processList.乡镇审批时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
this.processList.区县审批时间 = this.processList.区县审批时间?this.format(this.processList.区县审批时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
this.processList.支付状态时间 = this.processList.支付状态时间?this.format(this.processList.支付状态时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
this.processList.入账状态时间 = this.processList.入账状态时间?this.format(this.processList.入账状态时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
}) | |||
}, | |||
handleUpdate(id) { | |||
getTransfer(id).then((response) => { | |||
this.form = response.data; | |||
this.processList = {} | |||
if(this.form.auditStatus != 0){ | |||
this.getTransferProcess(this.$route.query.id); | |||
} | |||
if(this.form.approvalMode == 1){ | |||
selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | |||
this.approvalTemplateDeptList = rs.approvalDepts; | |||
this.approvalTemplateDetailList = rs.approvalDetails; | |||
console.log("this.approvalTemplateDetailList:"+this.approvalTemplateDetailList); | |||
if(this.form.approveLevel === "1"){ | |||
this.approvalTemplateDetailList.push({"approvalLevel":"3"}); | |||
}else if(this.form.approveLevel === "2"){ | |||
this.approvalTemplateDetailList.push({"approvalLevel":"4"}); | |||
} | |||
}) | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : this.form.id, | |||
'ynType' : '1' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectForm = res.data | |||
this.projectForm.projectFundType+="" | |||
queryTransferDetail(id).then((r) => { | |||
this.chargeItme = r.rows; | |||
this.length = this.chargeItme.length; | |||
this.detailTotal = r.total; | |||
this.loading = false; | |||
}); | |||
}) | |||
}else{ | |||
this.capitalExpenditureOpen = false | |||
queryTransferDetail(id).then((r) => { | |||
this.chargeItme = r.rows; | |||
this.length = this.chargeItme.length; | |||
this.detailTotal = r.total; | |||
this.loading = false; | |||
}); | |||
} | |||
}); | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 0; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
padding: 20Px 0; | |||
} | |||
.icon_jian{ | |||
background-color: #C9C9C9; | |||
display: inline-block; | |||
width: 20Px; | |||
height: 20Px; | |||
line-height: 24Px; | |||
text-align: center; | |||
border-radius: 50%; | |||
color: #FFF; | |||
} | |||
.blue{ | |||
background-color: #1D6FE9; | |||
} | |||
.red{ | |||
background-color: rgb(245, 108, 108); | |||
} | |||
.textBlue{ | |||
color: #1D6FE9!important; | |||
} | |||
.textRed{ | |||
color: rgb(245, 108, 108)!important; | |||
} | |||
.van-col{ | |||
padding: 10Px 10Px; | |||
} | |||
.van-col:nth-child(2){ | |||
font-size: 16Px; | |||
color: #878787; | |||
line-height: 22Px; | |||
} | |||
.van-row{ | |||
.van-row{ | |||
.van-col{ | |||
padding: 5Px 0 0 0!important; | |||
color: #878787; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,228 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">付款申请流程</p> | |||
</template> | |||
</van-nav-bar> | |||
<div class="main_box"> | |||
<van-row v-if="processList.待申请!=2"> | |||
<van-col span="4" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col> | |||
<van-col span="20" class="textBlue">草稿</van-col> | |||
</van-row> | |||
<van-row v-if="processList.待申请==2"> | |||
<van-col span="4" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col> | |||
<van-col span="20" class="textBlue">已申请 | |||
<van-row> | |||
<van-col span="8" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">{{processList.申请人}}</van-col> | |||
<van-col span="16" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">{{processList.申请时间}}</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
<van-row v-if="processList.status==2" v-for="(item1,index,i) in processList.审批事项" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" v-show="item1.approverStatus==1"><van-icon name="minus" size="14" /></p> | |||
<p class="icon_jian blue" v-show="item1.approverStatus==2"><van-icon name="success" size="14" /></p> | |||
<p class="icon_jian red" v-show="item1.approverStatus==3"><van-icon name="cross" size="14" /></p> | |||
</van-col> | |||
<van-col span="20"> | |||
<van-row> | |||
<van-col span="8" style="padding: 0;"> | |||
<p v-show="item1.approverStatus == 1">{{item1.deptLabel}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.deptLabel}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.deptLabel}}</p> | |||
</van-col> | |||
<van-col span="16" style="padding: 0;" > | |||
<p v-show="item1.approverStatus == 1">{{item1.time}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.time}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.time}}</p> | |||
</van-col> | |||
</van-row> | |||
<van-row> | |||
<van-col span="16" style="padding: 0;" > | |||
<p v-show="item1.approverStatus == 1">{{item1.assigneeName}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.assigneeName}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.assigneeName}}</p> | |||
</van-col> | |||
<van-col span="8" style="padding: 0;"> | |||
<p v-show="item1.approverStatus == 1">{{item1.comment}}</p> | |||
<p v-show="item1.approverStatus == 2" class="textBlue">{{item1.comment}}</p> | |||
<p v-show="item1.approverStatus == 3" class="textRed">{{item1.comment}}</p> | |||
</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
<van-divider content-position="center" v-if="approvalTemplateDetailList.length>0"><h4>审批流程</h4></van-divider> | |||
<van-row v-if="approvalTemplateDetailList.length>0" v-for="(item1,index,i) in approvalTemplateDetailList" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" ><van-icon name="minus" size="14" /></p> | |||
</van-col> | |||
<van-col span="20"> | |||
<van-row> | |||
<van-col span="12" style="padding: 0;"> | |||
<p>{{item1.name}}</p> | |||
</van-col> | |||
<van-col span="12" style="padding: 0;"> | |||
<p v-show="item1.approvalLevel == 1">组级审批</p> | |||
<p v-show="item1.approvalLevel == 2">村级审批</p> | |||
<p v-show="item1.approvalLevel == 3">镇级审批</p> | |||
<p v-show="item1.approvalLevel == 4">区县审批</p> | |||
</van-col> | |||
</van-row> | |||
<van-row> | |||
<van-col span="24" style="padding: 0;"> | |||
<p>{{item1.nickName}}<span v-if="item1.feeLimit != 0 && item1.nickName != null">({{item1.feeLimit}}元)</span></p> | |||
</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { | |||
getTransferProcess, | |||
getTransfer, | |||
getProjectto, | |||
queryTransferDetail, | |||
selectApprovalByTemplateId | |||
} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
getCash, | |||
getTransferProcess1, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalProcess", | |||
data() { | |||
return { | |||
processList:{}, | |||
form:{}, | |||
approvalTemplateDeptList:[], | |||
approvalTemplateDetailList:[] | |||
}; | |||
}, | |||
created() { | |||
this.handleUpdate(this.$route.query.id); | |||
}, | |||
methods: { | |||
//查询审批进程 | |||
getTransferProcess1(id){ | |||
getTransferProcess(id).then(res => { | |||
this.processList = res.data.processSchedule | |||
this.processList.乡镇审批时间 = this.processList.乡镇审批时间?this.format(this.processList.乡镇审批时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
this.processList.区县审批时间 = this.processList.区县审批时间?this.format(this.processList.区县审批时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
this.processList.支付状态时间 = this.processList.支付状态时间?this.format(this.processList.支付状态时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
this.processList.入账状态时间 = this.processList.入账状态时间?this.format(this.processList.入账状态时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
}) | |||
}, | |||
handleUpdate(id) { | |||
getCash(id).then((response) => { | |||
this.form = response.data; | |||
this.processList = {} | |||
if(this.form.auditStatus != 0){ | |||
this.getTransferProcess1(this.$route.query.id); | |||
} | |||
if(this.form.approvalMode == 1){ | |||
selectApprovalByTemplateId(this.form.approvalTemplateId).then(rs => { | |||
this.approvalTemplateDeptList = rs.approvalDepts; | |||
this.approvalTemplateDetailList = rs.approvalDetails; | |||
console.log("this.approvalTemplateDetailList:"+this.approvalTemplateDetailList); | |||
if(this.form.approveLevel === "1"){ | |||
this.approvalTemplateDetailList.push({"approvalLevel":"3"}); | |||
}else if(this.form.approveLevel === "2"){ | |||
this.approvalTemplateDetailList.push({"approvalLevel":"4"}); | |||
} | |||
}) | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : this.form.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectForm = res.data | |||
this.projectForm.projectFundType+="" | |||
listCashdetailByCashId(id).then((r) => { | |||
this.chargeItme = r.data; | |||
this.length = this.chargeItme.length; | |||
this.detailTotal = r.total; | |||
this.loading = false; | |||
}); | |||
}) | |||
}else{ | |||
this.capitalExpenditureOpen = false | |||
listCashdetailByCashId(id).then((r) => { | |||
this.chargeItme = r.data; | |||
this.length = this.chargeItme.length; | |||
this.detailTotal = r.total; | |||
this.loading = false; | |||
}); | |||
} | |||
}); | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 0; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
padding: 20Px 0; | |||
} | |||
.icon_jian{ | |||
background-color: #C9C9C9; | |||
display: inline-block; | |||
width: 20Px; | |||
height: 20Px; | |||
line-height: 24Px; | |||
text-align: center; | |||
border-radius: 50%; | |||
color: #FFF; | |||
} | |||
.blue{ | |||
background-color: #1D6FE9; | |||
} | |||
.red{ | |||
background-color: rgb(245, 108, 108); | |||
} | |||
.textBlue{ | |||
color: #1D6FE9!important; | |||
} | |||
.textRed{ | |||
color: rgb(245, 108, 108)!important; | |||
} | |||
.van-col{ | |||
padding: 10Px 10Px; | |||
} | |||
.van-col:nth-child(2){ | |||
font-size: 16Px; | |||
color: #878787; | |||
line-height: 22Px; | |||
} | |||
.van-row{ | |||
.van-row{ | |||
.van-col{ | |||
padding: 5Px 0 0 0!important; | |||
color: #878787; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,128 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">审批流程</p> | |||
</template> | |||
</van-nav-bar> | |||
<div class="main_box"> | |||
<van-row v-if="approvalTemplateDetailList.length>0" v-for="(item1,index,i) in approvalTemplateDetailList" :key="i"> | |||
<van-col span="4" align="right"> | |||
<p class="icon_jian" ><van-icon name="minus" size="14" /></p> | |||
</van-col> | |||
<van-col span="20"> | |||
<van-row> | |||
<van-col span="12" style="padding: 0;"> | |||
<p>{{item1.name}}</p> | |||
</van-col> | |||
<van-col span="12" style="padding: 0;"> | |||
<p v-show="item1.approvalLevel == 1">组级审批</p> | |||
<p v-show="item1.approvalLevel == 2">村级审批</p> | |||
<p v-show="item1.approvalLevel == 3">镇级审批</p> | |||
<p v-show="item1.approvalLevel == 4">区县审批</p> | |||
</van-col> | |||
</van-row> | |||
<van-row> | |||
<van-col span="24" style="padding: 0;"> | |||
<p>{{item1.nickName}}<span v-if="item1.feeLimit != 0 && item1.nickName != null">({{item1.feeLimit}}元)</span></p> | |||
</van-col> | |||
</van-row> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { | |||
getTransferProcess, | |||
getTransfer, | |||
getProjectto, | |||
queryTransferDetail, | |||
selectApprovalByTemplateId | |||
} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalProcess", | |||
data() { | |||
return { | |||
processList:{}, | |||
form:{}, | |||
approvalTemplateDeptList:[], | |||
approvalTemplateDetailList:[] | |||
}; | |||
}, | |||
created() { | |||
this.handleUpdate(this.$route.query.approvalTemplateId); | |||
}, | |||
methods: { | |||
handleUpdate(approvalTemplateId) { | |||
console.log("approvalTemplateId:"+approvalTemplateId); | |||
console.log("this.$route.query.approvalMode:"+this.$route.query.approvalMode); | |||
if(this.$route.query.approvalMode == '1' && approvalTemplateId != undefined && approvalTemplateId != "undefined"){ | |||
selectApprovalByTemplateId(approvalTemplateId).then(rs => { | |||
this.approvalTemplateDeptList = rs.approvalDepts; | |||
this.approvalTemplateDetailList = rs.approvalDetails; | |||
}) | |||
} | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 0.2rem 0; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
padding: 20Px 0; | |||
} | |||
.icon_jian{ | |||
background-color: #C9C9C9; | |||
display: inline-block; | |||
width: 20Px; | |||
height: 20Px; | |||
line-height: 24Px; | |||
text-align: center; | |||
border-radius: 50%; | |||
color: #FFF; | |||
} | |||
.blue{ | |||
background-color: #1D6FE9; | |||
} | |||
.red{ | |||
background-color: rgb(245, 108, 108); | |||
} | |||
.textBlue{ | |||
color: #1D6FE9!important; | |||
} | |||
.textRed{ | |||
color: rgb(245, 108, 108)!important; | |||
} | |||
.van-col{ | |||
padding: 10Px 10Px; | |||
} | |||
.van-col:nth-child(2){ | |||
font-size: 16Px; | |||
color: #878787; | |||
line-height: 22Px; | |||
} | |||
.van-row{ | |||
.van-row{ | |||
.van-col{ | |||
padding: 5Px 0 0 0!important; | |||
color: #878787; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,274 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="goBack" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加收款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goAdd" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" required :rules="[{ required: true , message:'请输入收款方' }]" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" required :rules="[{ required: true , message:'请输入收款账户' }]" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="isPeersRead ? showBankType = true : ''" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
@click="showBankDeposit = true" | |||
v-model="bankDeposit" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositOptions" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" readonly required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择账户类型' }]" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择收款人类型' }]" | |||
/> | |||
<!-- @click="showPayeeType = true"--> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择数据状态' }]" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<!-- <van-radio name="1">停用</van-radio>--> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addPayee,listDeposit } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionAdd", | |||
data() { | |||
return { | |||
isPeersRead:true, | |||
showBankType:false, | |||
showBankDeposit:false, | |||
showPayeeType:false, | |||
form:{ | |||
accountType:'1', | |||
status:'0', | |||
payeeType:'1' | |||
}, | |||
bankType:'', | |||
payeeType:'收款方', | |||
bankDeposit:'', | |||
bankTypeOptions:[], | |||
statusOptions:[], | |||
accountTypeOptions:[], | |||
payeeTypeOptions:[], | |||
bankDepositOptions:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDictionaries(); | |||
const accountType = this.$route.params.accountType; | |||
const isPeers = this.$route.params.isPeers; | |||
const bankType = this.$route.params.bankType; | |||
console.log(this.$route.params.option) | |||
if (accountType){this.form.accountType = accountType;} | |||
if (isPeers){ | |||
this.form.isPeers = isPeers; | |||
if (isPeers == 'Y'){ | |||
this.isPeersRead = false; | |||
this.getDicts("bank_type").then((res) => { | |||
let bankText = this.selectDictLabel(res.data,bankType); | |||
let data = { | |||
text : bankText, | |||
value : bankType | |||
} | |||
this.onConfirmBankType(data); | |||
}); | |||
} | |||
} | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("sys_normal_disable").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.statusOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("bank_account_type").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.accountTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(data) | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.bankDeposit = "" | |||
this.form.payeePaymentLines = "" | |||
this.showBankType = false; | |||
let queryParams={ | |||
"bankType":this.form.bankType, | |||
"status": "0", | |||
} | |||
listDeposit(queryParams).then(response => { | |||
this.bankDepositOptions = [] | |||
for(var i = 0 ; i < response.rows.length ; i++){ | |||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id, | |||
"payeePaymentLines":response.rows[i].payeePaymentLines,"institutionNumber":response.rows[i].institutionNumber}); | |||
} | |||
}); | |||
}, | |||
onConfirmBankDeposit(data){ | |||
this.bankDeposit = data.text | |||
this.form.bankDeposit = data.text | |||
this.form.payeePaymentLines = data.payeePaymentLines | |||
this.form.alternateField10 = data.institutionNumber | |||
this.showBankDeposit = false; | |||
}, | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
var that = this; | |||
addPayee(this.form).then(response => { | |||
this.$toast.success('新增成功'); | |||
setTimeout(function(){ | |||
that.form.bankTypeText = that.bankType; | |||
that.$router.push({name: 'approvalAdd', params: { payeeForm: that.form }}); | |||
// history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,274 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="goBack" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加收款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goAdd" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" required :rules="[{ required: true , message:'请输入收款方' }]" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" required :rules="[{ required: true , message:'请输入收款账户' }]" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="isPeersRead ? showBankType = true : ''" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
@click="showBankDeposit = true" | |||
v-model="bankDeposit" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositOptions" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" readonly required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择账户类型' }]" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择收款人类型' }]" | |||
/> | |||
<!-- @click="showPayeeType = true"--> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择数据状态' }]" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<!-- <van-radio name="1">停用</van-radio>--> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addPayee,listDeposit } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionAdd", | |||
data() { | |||
return { | |||
isPeersRead:true, | |||
showBankType:false, | |||
showBankDeposit:false, | |||
showPayeeType:false, | |||
form:{ | |||
accountType:'1', | |||
status:'0', | |||
payeeType:'4' | |||
}, | |||
bankType:'', | |||
payeeType:'公务卡', | |||
bankDeposit:'', | |||
bankTypeOptions:[], | |||
statusOptions:[], | |||
accountTypeOptions:[], | |||
payeeTypeOptions:[], | |||
bankDepositOptions:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDictionaries(); | |||
const accountType = this.$route.params.accountType; | |||
const isPeers = this.$route.params.isPeers; | |||
const bankType = this.$route.params.bankType; | |||
console.log(this.$route.params.option) | |||
if (accountType){this.form.accountType = accountType;} | |||
if (isPeers){ | |||
this.form.isPeers = isPeers; | |||
if (isPeers == 'Y'){ | |||
this.isPeersRead = false; | |||
this.getDicts("bank_type").then((res) => { | |||
let bankText = this.selectDictLabel(res.data,bankType); | |||
let data = { | |||
text : bankText, | |||
value : bankType | |||
} | |||
this.onConfirmBankType(data); | |||
}); | |||
} | |||
} | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("sys_normal_disable").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.statusOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("bank_account_type").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.accountTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(data) | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.bankDeposit = "" | |||
this.form.payeePaymentLines = "" | |||
this.showBankType = false; | |||
let queryParams={ | |||
"bankType":this.form.bankType, | |||
"status": "0", | |||
} | |||
listDeposit(queryParams).then(response => { | |||
this.bankDepositOptions = [] | |||
for(var i = 0 ; i < response.rows.length ; i++){ | |||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id, | |||
"payeePaymentLines":response.rows[i].payeePaymentLines,"institutionNumber":response.rows[i].institutionNumber}); | |||
} | |||
}); | |||
}, | |||
onConfirmBankDeposit(data){ | |||
this.bankDeposit = data.text | |||
this.form.bankDeposit = data.text | |||
this.form.payeePaymentLines = data.payeePaymentLines | |||
this.form.alternateField10 = data.institutionNumber | |||
this.showBankDeposit = false; | |||
}, | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
var that = this; | |||
addPayee(this.form).then(response => { | |||
this.$toast.success('新增成功'); | |||
setTimeout(function(){ | |||
that.form.bankTypeText = that.bankType; | |||
that.$router.push({name: 'approvalAdd2', params: { payeeForm: that.form }}); | |||
// history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -0,0 +1,276 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="goBack" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">添加收款账户信息</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-form @submit="goAdd" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field label="收款方" required :rules="[{ required: true , message:'请输入收款方' }]" v-model="form.payee" placeholder="请输入收款方" input-align="right" label-width="auto"/> | |||
<van-field label="收款账户" required :rules="[{ required: true , message:'请输入收款账户' }]" v-model="form.payeeAccount" placeholder="请输入收款账户" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
clickable | |||
label="所属银行" | |||
placeholder="请选择" | |||
v-model="bankType" | |||
@click="isPeersRead ? showBankType = true : ''" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
<van-popup v-model="showBankType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankTypeOptions" | |||
@confirm="onConfirmBankType" | |||
@cancel="showBankType = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
readonly | |||
clickable | |||
label="开户银行" | |||
placeholder="请选择" | |||
@click="showBankDeposit = true" | |||
v-model="bankDeposit" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择开户银行' }]" | |||
/> | |||
<van-popup v-model="showBankDeposit" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="bankDepositOptions" | |||
@confirm="onConfirmBankDeposit" | |||
@cancel="showBankDeposit = false" | |||
/> | |||
</van-popup> | |||
<van-field label="联行号" readonly required :rules="[{ required: true , message:'请输入联行号' }]" v-model="form.payeePaymentLines" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-cell title="账户类型" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择账户类型' }]" v-model="form.accountType"> | |||
<van-radio name="1">公户</van-radio> | |||
<van-radio name="2">私户</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
<van-field | |||
readonly | |||
clickable | |||
label="收款人类型" | |||
placeholder="请选择" | |||
v-model="payeeType" | |||
input-align="right" | |||
right-icon="arrow-down" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'请选择收款人类型' }]" | |||
/> | |||
<!-- @click="showPayeeType = true"--> | |||
<van-popup v-model="showPayeeType" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="payeeTypeOptions" | |||
@confirm="onConfirmPayeeType" | |||
@cancel="showPayeeType = false" | |||
/> | |||
</van-popup> | |||
<van-cell title="数据状态" required> | |||
<template #right-icon> | |||
<van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择数据状态' }]" v-model="form.status"> | |||
<van-radio name="0">正常</van-radio> | |||
<!-- <van-radio name="1">停用</van-radio>--> | |||
</van-radio-group> | |||
</template> | |||
</van-cell> | |||
</div> | |||
<div style="padding: 16px 0;"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { addPayee,listDeposit } from "@/api/onlineHome/bankAgriculture/collectionAccount"; | |||
export default { | |||
name: "collectionAdd", | |||
data() { | |||
return { | |||
id:'', | |||
isPeersRead:true, | |||
showBankType:false, | |||
showBankDeposit:false, | |||
showPayeeType:false, | |||
form:{ | |||
accountType:'1', | |||
status:'0', | |||
payeeType:'1' | |||
}, | |||
bankType:'', | |||
payeeType:'收款方', | |||
bankDeposit:'', | |||
bankTypeOptions:[], | |||
statusOptions:[], | |||
accountTypeOptions:[], | |||
payeeTypeOptions:[], | |||
bankDepositOptions:[], | |||
}; | |||
}, | |||
created() { | |||
this.getDictionaries(); | |||
const accountType = this.$route.params.accountType; | |||
const isPeers = this.$route.params.isPeers; | |||
const bankType = this.$route.params.bankType; | |||
this.id = this.$route.params.id; | |||
console.log(isPeers) | |||
if (accountType){this.form.accountType = accountType;} | |||
if (isPeers){ | |||
this.form.isPeers = isPeers; | |||
if (isPeers == 'Y'){ | |||
this.isPeersRead = false; | |||
this.getDicts("bank_type").then((res) => { | |||
let bankText = this.selectDictLabel(res.data,bankType); | |||
let data = { | |||
text : bankText, | |||
value : bankType | |||
} | |||
this.onConfirmBankType(data); | |||
}); | |||
} | |||
} | |||
}, | |||
methods: { | |||
getDictionaries(){ | |||
this.houseGetDicts("bank_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.bankTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("sys_normal_disable").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.statusOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("bank_account_type").then((res) => { | |||
console.log(res) | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.accountTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
this.houseGetDicts("payee_type").then((res) => { | |||
for(var i = 0 ; i < res.data.length ; i++){ | |||
this.payeeTypeOptions.push({text:res.data[i].dictLabel,value:res.data[i].dictValue}); | |||
} | |||
}); | |||
}, | |||
getError(e){ | |||
this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(data) | |||
this.bankType = data.text; | |||
this.form.bankType = data.value; | |||
this.bankDeposit = "" | |||
this.form.payeePaymentLines = "" | |||
this.showBankType = false; | |||
let queryParams={ | |||
"bankType":this.form.bankType, | |||
"status": "0", | |||
} | |||
listDeposit(queryParams).then(response => { | |||
this.bankDepositOptions = [] | |||
for(var i = 0 ; i < response.rows.length ; i++){ | |||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id, | |||
"payeePaymentLines":response.rows[i].payeePaymentLines,"institutionNumber":response.rows[i].institutionNumber}); | |||
} | |||
}); | |||
}, | |||
onConfirmBankDeposit(data){ | |||
this.bankDeposit = data.text | |||
this.form.bankDeposit = data.text | |||
this.form.payeePaymentLines = data.payeePaymentLines | |||
this.form.alternateField10 = data.institutionNumber | |||
this.showBankDeposit = false; | |||
}, | |||
onConfirmPayeeType(data){ | |||
this.payeeType = data.text; | |||
this.form.payeeType = data.value; | |||
this.showPayeeType = false; | |||
}, | |||
goAdd(){ | |||
var that = this; | |||
addPayee(this.form).then(response => { | |||
this.$toast.success('新增成功'); | |||
setTimeout(function(){ | |||
that.form.bankTypeText = that.bankType; | |||
that.$router.push({name: 'approvalModify', params: { payeeForm: that.form , id : that.id}}); | |||
// history.go(-1) | |||
},2000) | |||
}); | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
margin-top: 0; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 80%; | |||
margin: 0 auto; | |||
background-color: #1D6FE9; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
</style> |
@@ -70,7 +70,7 @@ | |||
</template> | |||
</van-cell> | |||
<van-grid :border="false"> | |||
<van-grid-item text="银行卡转账" :to="{name:'approvalList'}" > | |||
<van-grid-item text="银行卡转账" :to="{name:'sunVillageApprovalList'}" > | |||
<div class="icon" slot="default" style="background:#FF4646;" > | |||
<img src="../../../static/images/onlineHome/icon_Y1.png" alt /> | |||
</div> | |||
@@ -82,7 +82,7 @@ | |||
<!-- </div>--> | |||
<!-- <p style="margin-top: 5px;color: #666666;">代管转账</p>--> | |||
<!-- </van-grid-item>--> | |||
<van-grid-item text="信用卡还款" :to="{name:'approvalList2'}" > | |||
<van-grid-item text="信用卡还款" :to="{name:'sunVillageApprovalList2'}" > | |||
<div class="icon" slot="default" style="background:#3ac2db;" > | |||
<img src="../../../static/images/onlineHome/icon_Y2.png" alt /> | |||
</div> | |||
@@ -94,31 +94,31 @@ | |||
<!-- </div>--> | |||
<!-- <p style="margin-top: 5px;color: #666666;">现金提现</p>--> | |||
<!-- </van-grid-item>--> | |||
<van-grid-item text="备付金支出" :to="{name:'approvalList11'}" > | |||
<van-grid-item text="备付金支出" :to="{name:'sunVillageApprovalList11'}" > | |||
<div class="icon" slot="default" style="background:#7790FE;" > | |||
<img src="../../../static/images/onlineHome/icon_Y7.png" alt /> | |||
</div> | |||
<p style="margin-top: 5px;color: #666666;">备付金支出</p> | |||
</van-grid-item> | |||
<van-grid-item text="汇票支出" :to="{name:'approvalList12'}" > | |||
<van-grid-item text="汇票支出" :to="{name:'sunVillageApprovalList12'}" > | |||
<div class="icon" slot="default" style="background:#539ffd;" > | |||
<img src="../../../static/images/onlineHome/icon_Y8.png" alt /> | |||
</div> | |||
<p style="margin-top: 5px;color: #666666;">汇票支出</p> | |||
</van-grid-item> | |||
<van-grid-item text="收款账户" :to="{name:'collectionList'}" > | |||
<van-grid-item text="收款账户" :to="{name:'sunVillageCollectionList'}" > | |||
<div class="icon" slot="default" style="background:#7dda4f;" > | |||
<img src="../../../static/images/onlineHome/icon_Y9.png" alt /> | |||
</div> | |||
<p style="margin-top: 5px;color: #666666;">收款账户</p> | |||
</van-grid-item> | |||
<van-grid-item text="付款账户" :to="{name:'paymentAccountList'}" > | |||
<van-grid-item text="付款账户" :to="{name:'sunVillagePaymentAccountList'}" > | |||
<div class="icon" slot="default" style="background:#FF4646;" > | |||
<img src="../../../static/images/onlineHome/icon_Y10.png" alt /> | |||
</div> | |||
<p style="margin-top: 5px;color: #666666;">付款账户</p> | |||
</van-grid-item> | |||
<van-grid-item text="开户行" :to="{name:'yinnongBankOfDepositList'}" > | |||
<van-grid-item text="开户行" :to="{name:'sunVillageBankOfDepositList'}" > | |||
<div class="icon" slot="default" style="background:#FF6464;" > | |||
<img src="../../../static/images/onlineHome/icon_Y6.png" alt /> | |||
</div> | |||
@@ -5,7 +5,7 @@ | |||
margin: 0 auto;" src="../../static/images/onlineHome/yinnongLogo.jpg" alt=""> | |||
</div> | |||
<van-tabs v-model="active" :swipeable="true" style="margin-top:0.5rem;padding:0 10px;"> | |||
<van-tab title="登录" name="1"> | |||
<van-tab title="密码登录" name="1"> | |||
<van-form style="margin:50px 0;" v-if="!showMessage"> | |||
<van-field | |||
v-model="formData.username" | |||
@@ -39,7 +39,7 @@ | |||
</div> | |||
</van-form> | |||
</van-tab> | |||
<van-tab title="短信验证码登录" name="2"> | |||
<van-tab title="短信登录" name="2"> | |||
<van-form style="margin:50px 0;"> | |||
<van-field | |||
v-model="formData.mobile" | |||