Browse Source

问题修改

wulanhaote
庞东旭 3 years ago
parent
commit
6e2f493f16
6 changed files with 1801 additions and 320 deletions
  1. +8
    -0
      src/api/onlineHome/bankAgriculture/paymentApproval.js
  2. +9
    -0
      src/router/index.js
  3. +321
    -163
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue
  4. +12
    -4
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail.vue
  5. +366
    -153
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify.vue
  6. +1085
    -0
      src/views/onlineHome/homestead/homeApproval/approvalForm.vue

+ 8
- 0
src/api/onlineHome/bankAgriculture/paymentApproval.js View File

@@ -108,3 +108,11 @@ export function getAccount(query){
params: query
})
}

// 查询当前账期余额
export function getQmyeFlow(id) {
return request({
url: '/cashier/flow/getQmye/' + id,
method: 'post'
})
}

+ 9
- 0
src/router/index.js View File

@@ -978,6 +978,15 @@ export const constantRoutes = [
},
component: (resolve) => require(['@/views/onlineHome/homestead/supervision/supervisionCloseCase'], resolve)
},
{
path: '/approvalForm',
name: 'approvalForm',
meta: {
title: '宅基地审批',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/homestead/homeApproval/approvalForm'], resolve)
},
{
path: '/approvalList',
name: 'approvalList',


+ 321
- 163
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue View File

@@ -10,131 +10,164 @@
<p style="font-weight: bold;">添加付款申请</p>
</template>
</van-nav-bar>
<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"
/>
<van-popup v-model="showpayer" position="bottom">
<van-picker
show-toolbar
:columns="payerOptions"
@confirm="onConfirmPayer"
@cancel="showpayer = false"
<van-form>
<p class="main_title">基础信息</p>
<div class="main_box">
<van-field
readonly
clickable
required
:rules="[{ required: true }]"
v-model="form.applyDate"
label="申请时间"
placeholder="请选择申请时间"
@click="showlasj = true"
input-align="right"
right-icon="arrow-down"
/>
</van-popup>
<van-field 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"/>
<van-field
readonly
clickable
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"
<van-popup v-model="showlasj" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
@confirm="onConfirmLasj"
/>
</van-popup>
<van-field
readonly
clickable
required
:rules="[{ required: true }]"
label="资金支出类别"
placeholder="请选择"
v-model="capitalExpenditureType"
@click="showcapital = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
/>
</van-popup>
<van-field
readonly
clickable
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 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"
/>
</van-popup>
<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 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>

<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>
<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 }]"
/>
</div>

<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"
/>
<van-popup v-model="showproject" position="bottom">
<van-picker
show-toolbar
:columns="projectListShow"
@confirm="onConfirmProject"
@cancel="showproject = false"
<div class="main_box" style="margin-top: 10px;">
<van-field required :rules="[{ required: true }]" 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"
/>
</van-popup>
<van-field v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
<van-field 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"
/>
<van-popup v-model="showFundType" position="bottom">
<van-picker
show-toolbar
:columns="projectFundTypeOptions"
@confirm="onConfirmFundType"
@cancel="showFundType = false"
<van-popup v-model="showproject" position="bottom">
<van-picker
show-toolbar
:columns="projectListShow"
@confirm="onConfirmProject"
@cancel="showproject = false"
/>
</van-popup>
<van-field v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
<van-field 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"
/>
</van-popup>
<van-field v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
</div>
<van-popup v-model="showFundType" position="bottom">
<van-picker
show-toolbar
:columns="projectFundTypeOptions"
@confirm="onConfirmFundType"
@cancel="showFundType = false"
/>
</van-popup>
<van-field 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 }]"
/>
<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 }]" 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>

<p class="main_title">列表信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></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: 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
@@ -143,42 +176,46 @@
label="收款方"
placeholder="请选择"
v-model="item.payee"
@click="showpayee = true"
@click="item.showPayee = true"
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true }]"
/>
<van-popup v-model="showpayee" position="bottom">
<van-popup v-model="item.showPayee" position="bottom">
<van-picker
show-toolbar
:columns="payeeList"
@confirm="onConfirmPayee"
@cancel="showpayee = false"
@confirm="onConfirmPayee($event,index)"
@cancel="item.showPayee = false"
/>
</van-popup>
<van-field v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
<van-field required :rules="[{ required: true }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
<van-field
readonly
clickable
label="所属银行"
placeholder="请选择"
v-model="item.bankTypeText"
@click="showbankType = true"
@click="item.showbankType = true"
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true }]"
/>
<van-popup v-model="showbankType" position="bottom">
<van-popup v-model="item.showbankType" position="bottom">
<van-picker
show-toolbar
:columns="bankTypeDictionaries"
@confirm="onConfirmBankType"
@cancel="showbankType = false"
@confirm="onConfirmBankType($event,index)"
@cancel="item.showbankType = false"
/>
</van-popup>
</div>
</div>
</van-form>
<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
@@ -194,7 +231,7 @@
</template>

<script>
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
export default {
name: "approvalModify",
data() {
@@ -258,7 +295,6 @@
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});
@@ -275,9 +311,13 @@
status: "N",
}
getAccount(params1).then((response) => {
for (var i = 0; i < response.rows.length; i++) {
this.payerOptions.push({text: response.rows[i].accountName, value: response.rows[i].id})
}
this.payerOptions = response.rows;
response.rows.map((res,index) => {
res['payerFrom'] = '1'
console.log(res)
this.payerOptions[index].text = res.accountName;
this.payerOptions[index].value = res.id;
})
});
this.getDictionaries();
},
@@ -288,7 +328,6 @@
id: null,
upId: null,
downId: null,
transferType:"",
orderId: null,
cashierId: null,
transferType: '1',
@@ -337,14 +376,31 @@
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.chargeItme.splice(index + 1, 0, {
payeeId: "", //收款方ID
payee: "", //收款方
payeeAccount: "", //收款账户
bankDeposit: "", //开户银行
incomeAmount: "", //收入金额
bankType: "", //所属银行
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() {
@@ -352,9 +408,11 @@
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});
}
this.payeeList = response.rows;
response.rows.map((res,index) => {
this.payeeList[index].text = res.payee;
this.payeeList[index].value = res.id;
})
});
},
payeeDictLabel(datas, value) {
@@ -368,7 +426,6 @@
return actions.join('');
},
onConfirmCapital(data){
console.log(data)
if (data.value != 2){
this.capitalExpenditureOpen = false;
this.projectForm = [];
@@ -386,50 +443,53 @@
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;
console.log(this.chargeItme.length)
this.chargeItme[this.chargeItme.length-1].payee = data.text;
this.chargeItme[this.chargeItme.length-1].payeeId = data.value;
this.showpayee = false;
onConfirmPayee(data,index){
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.chargeItme[index].showpayee = false;
this.payeeSelectChange(data.value , index)
},
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;
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){
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){
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});
}
this.payeeList = response.rows;
response.rows.map((res,index) => {
this.payeeList[index].text = res.payee;
this.payeeList[index].value = res.id;
})
});
},
// 钱计算
@@ -528,6 +588,104 @@
}
});
},
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);
}
}
}
},
goBack(){
window.history.go(-1)
},


+ 12
- 4
src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail.vue View File

@@ -15,12 +15,9 @@
</van-nav-bar>
<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"/>
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/>
<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.accountType == 1 ? '公户':'私户'" 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;">
@@ -31,6 +28,12 @@
<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"/>
@@ -40,6 +43,11 @@
</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" />


+ 366
- 153
src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify.vue View File

@@ -7,159 +7,215 @@
@click-left="$router.back(-1)"
>
<template #title>
<p style="font-weight: bold;">添加付款申请</p>
<p style="font-weight: bold;">修改付款申请</p>
</template>
</van-nav-bar>
<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 label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field label="支出总金额" v-model="form.expenditureAmount" placeholder="根据下方收款金额自动核算" input-align="right" label-width="auto"/>
<van-field
readonly
clickable
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"
<van-form>
<p class="main_title">基础信息</p>
<div class="main_box">
<van-field
readonly
clickable
required
:rules="[{ required: true }]"
v-model="form.applyDate"
label="申请时间"
placeholder="请选择申请时间"
@click="showlasj = true"
input-align="right"
right-icon="arrow-down"
/>
</van-popup>
<van-field
readonly
clickable
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 v-model="showlasj" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
@confirm="onConfirmLasj"
/>
</van-popup>
<van-field
readonly
clickable
required
:rules="[{ required: true }]"
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"
/>
</van-popup>
<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 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-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/>
</div>
</div>

<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"
/>
<van-popup v-model="showproject" position="bottom">
<van-picker
show-toolbar
:columns="projectListShow"
@confirm="onConfirmProject"
@cancel="showproject = false"
/>
</van-popup>
<van-field v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
<van-field 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"
/>
<van-popup v-model="showFundType" position="bottom">
<van-picker
show-toolbar
:columns="projectFundTypeOptions"
@confirm="onConfirmFundType"
@cancel="showFundType = false"
<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 }]"
/>
</van-popup>
<van-field v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
</div>
</div>

<p class="main_title">列表信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p>
<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;">
<div class="main_box" style="margin-top: 10px;">
<van-field required :rules="[{ required: true }]" 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="收款方"
label="项目名称"
placeholder="请选择"
v-model="item.payee"
@click="showpayee = true"
v-model="projectForm.projectName"
@click="showproject = true"
input-align="right"
right-icon="arrow-down"
/>
<van-popup v-model="showpayee" position="bottom">
<van-popup v-model="showproject" position="bottom">
<van-picker
show-toolbar
:columns="payeeList"
@confirm="onConfirmPayee"
@cancel="showpayee = false"
:columns="projectListShow"
@confirm="onConfirmProject"
@cancel="showproject = false"
/>
</van-popup>
<van-field v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto"/>
<van-field v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
<van-field v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
<van-field
readonly
clickable
label="所属银行"
label="工程款类型"
placeholder="请选择"
v-model="item.bankTypeText"
@click="showbankType = true"
v-model="projectFundType"
@click="showFundType = true"
input-align="right"
right-icon="arrow-down"
/>
<van-popup v-model="showbankType" position="bottom">
<van-popup v-model="showFundType" position="bottom">
<van-picker
show-toolbar
:columns="bankTypeDictionaries"
@confirm="onConfirmBankType"
@cancel="showbankType = false"
:columns="projectFundTypeOptions"
@confirm="onConfirmFundType"
@cancel="showFundType = false"
/>
</van-popup>
<van-field 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 }]"
/>
<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 }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
</div>
</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 }]"
/>
<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 }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true }]" v-model="item.incomeAmount" 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"
right-icon="arrow-down"
required
:rules="[{ required: true }]"
/>
<van-popup v-model="item.showbankType" position="bottom">
<van-picker
show-toolbar
:columns="bankTypeDictionaries"
@confirm="onConfirmBankType($event,index)"
@cancel="item.showbankType = false"
/>
</van-popup>
</div>
</div>
</van-form>
<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
@@ -175,7 +231,7 @@
</template>

<script>
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
export default {
name: "approvalModify",
data() {
@@ -186,6 +242,7 @@
showbankType:false,
showproject:false,
showFundType:false,
showpayer:false,

minDate: new Date(),
maxDate: new Date(2025, 10, 1),
@@ -205,6 +262,7 @@
projectFundTypeOptions:[],
projectFundTypeDictionaries:[],
projectListShow:[],
payerOptions:[],

chargeItme:[],
chargeItmeShow:[],
@@ -236,7 +294,6 @@
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});
@@ -248,6 +305,19 @@
}
this.projectFundTypeDictionaries = response.data;
});
let params1={
accountType: "102",
status: "N",
}
getAccount(params1).then((response) => {
this.payerOptions = response.rows;
response.rows.map((res,index) => {
res['payerFrom'] = '1'
console.log(res)
this.payerOptions[index].text = res.accountName;
this.payerOptions[index].value = res.id;
})
});
this.getDictionaries();
},
methods: {
@@ -284,21 +354,42 @@
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.chargeItme = response.rows;
console.log(response.rows)
this.getPayeeList();
});
},
addChargeItme(index){
this.chargeItme.splice(index + 1, 0, {
payeeId: "", //收款方ID
payee: "", //收款方
payeeAccount: "", //收款账户
bankDeposit: "", //开户银行
incomeAmount: "", //收入金额
bankType: "", //所属银行
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() {
@@ -306,9 +397,11 @@
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});
}
this.payeeList = response.rows;
response.rows.map((res,index) => {
this.payeeList[index].text = res.payee;
this.payeeList[index].value = res.id;
})
});
},
payeeDictLabel(datas, value) {
@@ -340,46 +433,68 @@
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;
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;
},
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;
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){
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});
}
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.form.remark != null && this.form.remark.indexOf("|")!=-1){
@@ -463,6 +578,104 @@
}
});
},
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);
}
}
}
},
goBack(){
window.history.go(-1)
},


+ 1085
- 0
src/views/onlineHome/homestead/homeApproval/approvalForm.vue
File diff suppressed because it is too large
View File


Loading…
Cancel
Save