ソースを参照

银农支付新增模块。

wulanhaote
yujk 3年前
コミット
9a4ae6e750
20個のファイルの変更1732行の追加814行の削除
  1. +25
    -0
      src/api/onlineHome/bankAgriculture/paymentApproval.js
  2. +9
    -0
      src/router/index.js
  3. +160
    -44
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10.vue
  4. +216
    -126
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11.vue
  5. +12
    -15
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd12.vue
  6. +2
    -2
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd2.vue
  7. +2
    -42
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd4.vue
  8. +200
    -62
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd5.vue
  9. +1
    -1
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail.vue
  10. +12
    -20
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail10.vue
  11. +12
    -17
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail11.vue
  12. +25
    -18
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail12.vue
  13. +8
    -15
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail5.vue
  14. +1
    -1
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalList4.vue
  15. +1
    -1
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalList5.vue
  16. +141
    -53
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify10.vue
  17. +194
    -138
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify11.vue
  18. +236
    -161
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify12.vue
  19. +231
    -98
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify5.vue
  20. +244
    -0
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess2.vue

+ 25
- 0
src/api/onlineHome/bankAgriculture/paymentApproval.js ファイルの表示

@@ -249,3 +249,28 @@ export const attachmentList = (data) => {
params: data
})
}
//删除已上传附件
export function systemAttachment(ids) {
if (ids != undefined) {
return request({
url: '/system/attachment/remove/' + ids,
method: 'get'
})
}
}
// 查询转账账户详情详细
export function getTransferProcess1(id) {
return request({
url: '/yinnong/cash/getProcessSchedule/' + id,
method: 'get'
})
}

// 查询出纳账户设置列表
export function listAccount(query) {
return request({
url: '/cashier/account/list',
method: 'get',
params: query
})
}

+ 9
- 0
src/router/index.js ファイルの表示

@@ -1329,6 +1329,15 @@ export const constantRoutes = [
},
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess'], resolve)
},
{
path: '/onlineHome/approvalProcess2',
name: 'approvalProcess2',
meta: {
title: '付款申请流程',
hidden: true,
},
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess2'], resolve)
},
{
path: '/onlineHome/collectionList',
name: 'collectionList',


+ 160
- 44
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10.vue ファイルの表示

@@ -161,16 +161,6 @@
</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;">
@@ -182,7 +172,7 @@
</div>
<p class="main_title">上传附件</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -210,6 +200,7 @@
commonAttach,
updateCash
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import Dialog from "vant/lib/dialog";
export default {
name: "approvalAdd10",
data() {
@@ -265,7 +256,8 @@
outId:null,
ynType:'2'
},
projectFundType:''
projectFundType:'',
uploadFiles:[],
};
},
created() {
@@ -300,7 +292,7 @@
})
});
this.getDictionaries();
this.getFileList();
this.addChargeItme();
},
methods: {
// 表单重置
@@ -488,7 +480,7 @@
});
this.$set(this.form, "expenditureAmount", total);
},
goAdd(){
/*goAdd(){
if(this.chargeItme.length<1){
this.$notify({ type: 'danger', message: '请添加收款方信息' });
return;
@@ -532,6 +524,99 @@
})
}
});
},*/
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){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
})
.then(() => {
addCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '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{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '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){
@@ -552,29 +637,64 @@
return;
}
}
this.projectForm.outId = this.form.id
addCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
if(this.uploadFiles==null||this.uploadFiles.length==0){
addCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '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{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}
})
})
})
});
});
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '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 = {};
@@ -675,22 +795,19 @@
}
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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",
tableName: "t_yinnong_cash",
bizPath: "upload",
fileType: "0",
}
@@ -698,7 +815,6 @@
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)


+ 216
- 126
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11.vue ファイルの表示

@@ -7,7 +7,7 @@
@click-left="$router.back(-1)"
>
<template #title>
<p style="font-weight: bold;">添加资金使用申请</p>
<p style="font-weight: bold;">添加资金提现申请</p>
</template>
</van-nav-bar>
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
@@ -59,7 +59,7 @@
<van-field
readonly
required
label="使用总金额"
label="提现总金额"
v-model="form.expenditureAmount"
placeholder="根据下方收款金额自动核算"
input-align="right"
@@ -157,39 +157,31 @@
@cancel="showpayer = false"
/>
</van-popup>
<van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="可用余额(元)" v-model="form.payerAccount" placeholder="请输入账户" 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"/>
</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 label="收款方" placeholder="请选择" v-model="item.payee" input-align="right" required :rules="[{ required: true , message:'请选择收款方' }]" />
<van-field required :rules="[{ required: true , message:'联系方式不能为空' }]" v-model="item.phone" label="联系方式" placeholder="请输入联系方式" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'申请使用金额不能为空' }]" v-model="item.incomeAmount" label="申请使用金额(元)" placeholder="请输入申请使用金额" type="number" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" 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 required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" 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="fileList" :after-read="beforeRead" ></van-uploader>
<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>
@@ -200,9 +192,15 @@
</template>

<script>
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import request from '@/utils/request'
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import {
addCash,
addCashdetail, attachmentList,
commonAttach, listAccount,
updateCash
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import Dialog from "vant/lib/dialog";
export default {
name: "approvalAdd11",
data() {
@@ -256,9 +254,10 @@
projectBillNum:null,
projectFundType:'1',
outId:null,
ynType:'1'
ynType:'2'
},
projectFundType:''
projectFundType:'',
uploadFiles:[],
};
},
created() {
@@ -279,11 +278,13 @@
}
this.projectFundTypeDictionaries = response.data;
});
let params1={
accountType: "102",
let queryParamsOld={
pageNum: 1,
pageSize: 10,
accountType: "101",
status: "N",
}
getAccount(params1).then((response) => {
listAccount(queryParamsOld).then((response) => {
this.payerOptions = response.rows;
response.rows.map((res,index) => {
res['payerFrom'] = '1'
@@ -293,7 +294,7 @@
})
});
this.getDictionaries();
this.getFileList();
this.addChargeItme();
},
methods: {
// 表单重置
@@ -304,7 +305,7 @@
downId: null,
orderId: null,
cashierId: null,
transferType: '1',
cashType: '11',
accountType: '2',
explainSituation: null,
succeedAmount: null,
@@ -330,34 +331,25 @@
projectBillNum:null,
projectFundType:'1',
outId:null,
ynType:'1'
ynType:'2'
}
},
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++) {
for (let 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){
@@ -365,27 +357,23 @@
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: '请输入收款账户!' });
this.$notify({ type: 'danger', message: '请输入提款金额!' });
return;
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){
this.$notify({ type: 'danger', message: '请输入开户银行!' });
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].drawer == ''){
this.$notify({ type: 'danger', message: '请输入提款人!' });
return;
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){
this.$notify({ type: 'danger', message: '请选择所属银行!' });
}else if(this.chargeItme.length>0&&this.chargeItme[index-1].remark == ''){
this.$notify({ type: 'danger', message: '请输入资金用途!' });
return;
}
this.getDicts("bank_type").then(res => {
this.chargeItme.splice(index + 1, 0, {
payeeId: "", //收款方ID
payee: "", //收款方
payee: "", //收款方全称
payeeAccount: "", //收款账户
bankDeposit: "", //开户银行
incomeAmount: "", //收入金额
bankType: "1", //所属银行
bankTypeText:this.selectDictLabel(res.data, 1), //所属银行
drawer: "", //提款人
incomeAmount: "", //提款金额
bankType: "", //资金用途
showPayee:false,
showbankType:false
});
@@ -404,7 +392,7 @@
});
},
payeeDictLabel(datas, value) {
var actions = [];
let actions = [];
Object.keys(datas).some((key) => {
if (datas[key].payeeId == ('' + value)) {
actions.push(datas[key].payee);
@@ -482,17 +470,44 @@
},
// 钱计算
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);
if(this.form.cashType=='11'){
console.log(input)
if(this.form.payerAccount==0){
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' });
this.chargeItme = []
this.addChargeItme();
return false;
}else {
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);
if(this.form.payerAccount<this.form.expenditureAmount){
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' });
this.form.expenditureAmount=""
this.chargeItme = []
this.addChargeItme();
return false;
}
}
}else{
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){
@@ -513,31 +528,79 @@
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);
addTransfer(this.form).then(response => {
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '1');
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)
if(this.uploadFiles==null||this.uploadFiles.length==0){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
})
.then(() => {
addCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
});
})

}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
}else{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
}
});
});
}
},
goUpdate(){
if(this.chargeItme.length<1){
@@ -558,28 +621,64 @@
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
addTransfer(this.form).then((response) => {
this.projectForm.outId = response.data.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)
if(this.uploadFiles==null||this.uploadFiles.length==0){
addCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '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{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
});
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '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 = {};
@@ -638,7 +737,7 @@
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, "payerAccount", obj.balance);
this.$set(this.form, "operatorCode", obj.operatorCode);
this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
this.$set(this.form, "payerFrom", '1');
@@ -669,33 +768,25 @@
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);
}
this.$set(this.form, "payerAccount", obj.balance);

}
}
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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",
tableName: "t_yinnong_cash",
bizPath: "upload",
fileType: "0",
}
@@ -703,7 +794,6 @@
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)


+ 12
- 15
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd12.vue ファイルの表示

@@ -217,7 +217,7 @@
</div>
<p class="main_title">上传附件</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -341,7 +341,6 @@
})
});
this.getDictionaries();
this.getFileList();
},
methods: {
// 表单重置
@@ -408,18 +407,16 @@
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.chargeItme.splice(index + 1, 0, {
payeeId: "", //收款方ID
payee: "", //收款方
payeeAccount: "", //收款账户
bankDeposit: "", //开户银行
incomeAmount: "", //收入金额
bankType: "", //所属银行
bankTypeText:"", //所属银行
showPayee:false,
showbankType:false
});
},
getPayeeList() {
@@ -770,7 +767,7 @@
getFileList(){
let oData= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
tableName: "t_yinnong_cash",
bizPath: "upload",
fileType: "0",
}


+ 2
- 2
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd2.vue ファイルの表示

@@ -194,8 +194,8 @@
@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 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" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
<van-field
readonly


+ 2
- 42
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd4.vue ファイルの表示

@@ -325,7 +325,6 @@
})
});
this.getDictionaries();
this.getFileList();
},
methods: {
// 表单重置
@@ -666,53 +665,14 @@
return account.id === select; //筛选出匹配数据
});
console.log(obj)
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, "payer", obj.payee);
this.$set(this.form, "payerAccount", obj.payeeAccount);
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) {
console.log(file)


+ 200
- 62
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd5.vue ファイルの表示

@@ -212,7 +212,7 @@
</div>
<p class="main_title">上传附件</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -240,6 +240,7 @@
listVaccount
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import request from '@/utils/request'
import Dialog from "vant/lib/dialog";
export default {
name: "approvalAdd5",
data() {
@@ -295,7 +296,8 @@
outId:null,
ynType:'1'
},
projectFundType:''
projectFundType:'',
uploadFiles:[],
};
},
created() {
@@ -332,7 +334,6 @@
})
});
this.getDictionaries();
this.getFileList();
},
methods: {
// 表单重置
@@ -393,7 +394,7 @@
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
}
});
this.getPayeeList();
},
getError(e){
console.log(e)
@@ -429,18 +430,25 @@
showbankType:false
});
});
this.getPayeeList();
},
getPayeeList() {
//普通转账
this.queryParams.accountType = this.form.accountType
this.queryParams.status = "0"
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;
})
});
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 = [];
@@ -513,15 +521,22 @@
},
accountTypeChange(e){
this.payeeList = [];
this.chargeItme = [];
this.queryParams.accountType = this.form.accountType
this.queryParams.status = "0"
listPayee(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;
})
});
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) {
@@ -556,31 +571,130 @@
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);
addTransfer(this.form).then(response => {
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '1');
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)
if(this.uploadFiles==null||this.uploadFiles.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){
@@ -605,23 +719,51 @@
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
console.log(this.form)
addTransfer(this.form).then((response) => {
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
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{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
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) {
@@ -723,16 +865,13 @@
}
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
this.uploadFiles.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
}
})
},
getFileList(){
@@ -746,7 +885,6 @@
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)


+ 1
- 1
src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail.vue ファイルの表示

@@ -7,7 +7,7 @@
@click-left="$router.back(-1)"
>
<template #title>
<p style="font-weight: bold;">查看付款申请</p>
<p style="font-weight: bold;">查看常用转账申请</p>
</template>
<template #right>
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/>


+ 12
- 20
src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail10.vue ファイルの表示

@@ -43,11 +43,6 @@
</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" />
@@ -116,9 +111,10 @@
projectBillNum:null,
projectFundType:'1',
outId:null,
ynType:'1'
ynType:'2'
},
projectFundType:''
projectFundType:'',
uploadFiles:[],
};
},
created() {
@@ -144,7 +140,7 @@
},
methods: {
goFlow(){
window.location='approvalProcess?id='+this.$route.query.id;
window.location='approvalProcess2?id='+this.$route.query.id;
},
getDictionaries(){
getCash(this.$route.query.id).then((response) => {
@@ -349,22 +345,19 @@
});
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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",
tableName: "t_yinnong_cash",
bizPath: "upload",
fileType: "0",
}
@@ -372,7 +365,6 @@
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)


+ 12
- 17
src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail11.vue ファイルの表示

@@ -47,10 +47,9 @@
<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" />
<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>
@@ -145,7 +144,7 @@
},
methods: {
goFlow(){
window.location='approvalProcess?id='+this.$route.query.id;
window.location='approvalProcess2?id='+this.$route.query.id;
},
getDictionaries(){
getCash(this.$route.query.id).then((response) => {
@@ -350,22 +349,19 @@
});
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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",
tableName: "t_yinnong_cash",
bizPath: "upload",
fileType: "0",
}
@@ -373,7 +369,6 @@
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)


+ 25
- 18
src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail12.vue ファイルの表示

@@ -97,10 +97,10 @@
<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" />
<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>
@@ -170,7 +170,9 @@
outId:null,
ynType:'1'
},
projectFundType:''
projectFundType:'',
orderTypeName:'',
orderTypeOptions:[]
};
},
created() {
@@ -191,12 +193,15 @@
}
this.projectFundTypeDictionaries = response.data;
});
this.getDicts("order_type").then(response => {
this.orderTypeOptions = response.data;
});
this.getDictionaries();
this.getFileList();
},
methods: {
goFlow(){
window.location='approvalProcess?id='+this.$route.query.id;
window.location='approvalProcess2?id='+this.$route.query.id;
},
getDictionaries(){
getCash(this.$route.query.id).then((response) => {
@@ -220,6 +225,12 @@
this.showproject = false
}
this.form = response.data;
this.orderTypeOptions.map(res => {
console.log(this.orderTypeOptions)
if(res.dictValue==this.form.orderType){
this.orderTypeName = res.dictLabel
}
})
});
console.log(this.$route.query.id)
listCashdetailByCashId(this.$route.query.id).then((response) => {
@@ -401,22 +412,19 @@
});
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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",
tableName: "t_yinnong_cash",
bizPath: "upload",
fileType: "0",
}
@@ -424,7 +432,6 @@
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)


+ 8
- 15
src/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail5.vue ファイルの表示

@@ -7,7 +7,7 @@
@click-left="$router.back(-1)"
>
<template #title>
<p style="font-weight: bold;">查看付款申请</p>
<p style="font-weight: bold;">查看母子转站申请</p>
</template>
<template #right>
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/>
@@ -292,12 +292,9 @@
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 => {
@@ -356,16 +353,13 @@
});
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
this.uploadFiles.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
}
})
},
getFileList(){
@@ -379,7 +373,6 @@
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)


+ 1
- 1
src/views/onlineHome/bankAgriculture/paymentApproval/approvalList4.vue ファイルの表示

@@ -8,7 +8,7 @@
@click-right="goAdd()"
>
<template #title>
<p style="font-weight: bold;">虚拟账申请列表</p>
<p style="font-weight: bold;">虚拟账申请列表</p>
</template>
<template #right>
<van-icon name="add" size="18"/>


+ 1
- 1
src/views/onlineHome/bankAgriculture/paymentApproval/approvalList5.vue ファイルの表示

@@ -22,7 +22,7 @@
@load="getList"
>
<van-swipe-cell v-for="(item,index) in applicationList" :key="index">
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}">
<van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail5', query: {id:item.id}}">
<template #icon>
<van-icon name="../../../../../static/images/onlineHome/yinnongList4.png" size="22" color="#539FFD" style="margin-right: 10px;" />
</template>


+ 141
- 53
src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify10.vue ファイルの表示

@@ -172,7 +172,7 @@
</div>
<p class="main_title">上传附件</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -194,10 +194,11 @@
import request from '@/utils/request';
import {
addCash,
addCashdetail, attachmentList, commonAttach,
addCashdetail, attachmentList, cashSubmit, commonAttach,
getCash,
listCashdetailByCashId, updateCash
listCashdetailByCashId, systemAttachment, updateCash
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import Dialog from "vant/lib/dialog";
export default {
name: "approvalModify10",
data() {
@@ -211,7 +212,7 @@
showpayer:false,

minDate: new Date(),
maxDate: new Date(2025, 10, 1),
maxDate: new Date(2050, 10, 1),
currentDate: new Date(),
form:{},

@@ -255,6 +256,7 @@
},
projectFundType:'',
fileList:[],
uploadFiles:[],
};
},
created() {
@@ -320,12 +322,9 @@
});
},
getChange(){
console.log(this.buttonType)
if(this.buttonType == 'update'){
console.log('update')
this.goUpdate();
}else if(this.buttonType == 'add'){
console.log('add')
this.goAdd();
}
},
@@ -487,27 +486,78 @@
this.$set(this.form, "bankTypeList", this.chargeItme);
this.$set(this.form, "accountTypeList", this.chargeItme);
this.$set(this.form, "transferStatusList", this.chargeItme);
addCash(this.form).then(response => {
this.projectForm.outId = response.data.id
this.$set(this.projectForm, "ynType", '2');
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)
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
})
.then(() => {
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
});
})
}else {
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
}else{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
}
});
});
}
},
goUpdate(){
if(this.chargeItme.length<1){
@@ -529,28 +579,65 @@
}
}
this.projectForm.outId = this.form.id
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
if(this.uploadFiles==null||this.uploadFiles.length==0){
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '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{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}
})
})
})
});
});
}else {
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '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 = {};
@@ -651,17 +738,19 @@
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
},
deleteFile(file){
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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= {
@@ -674,9 +763,8 @@
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,{})})
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
})
})


+ 194
- 138
src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify11.vue ファイルの表示

@@ -161,67 +161,20 @@

<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" 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 , message:'请选择所属银行' }]"
/>
<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 class="main_box" style="margin-bottom: 10px;position:relative;">
<van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" 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 required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" />
</div>
</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" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -239,8 +192,15 @@
</template>

<script>
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import {
addCash, addCashdetail,
attachmentList,
commonAttach, getCash,
listCashdetailByCashId, updateCash
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import Dialog from "vant/lib/dialog";
import request from '@/utils/request'
export default {
name: "approvalModify11",
data() {
@@ -298,6 +258,7 @@
},
projectFundType:'',
fileList:[],
uploadFiles:[],
};
},
created() {
@@ -335,7 +296,7 @@
},
methods: {
getDictionaries(){
getTransfer(this.$route.query.id).then((response) => {
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});
@@ -346,7 +307,7 @@
this.capitalExpenditureOpen = true
let param={
'outId' : response.data.id,
'ynType' : '1'
'ynType' : '2'
}
getProjectto(param).then(res => {
console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType))
@@ -359,18 +320,9 @@
}
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;
});
listCashdetailByCashId(this.$route.query.id).then((response) => {
this.chargeItme = response.data;
console.log(response)
this.getPayeeList();
});
},
@@ -511,17 +463,44 @@
},
// 钱计算
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);
if(this.form.cashType=='11'){
console.log(input)
if(this.form.payerAccount==0){
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' });
this.chargeItme = []
this.addChargeItme();
return false;
}else {
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);
if(this.form.payerAccount<this.form.expenditureAmount){
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' });
this.form.expenditureAmount=""
this.chargeItme = []
this.addChargeItme();
return false;
}
}
}else{
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){
@@ -542,34 +521,79 @@
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)
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
})
.then(() => {
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
});
})

}else{
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
}else{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
}
});
});
}
},
goUpdate(){
if(this.chargeItme.length<1){
@@ -590,28 +614,64 @@
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)
if(this.uploadFiles==null||this.uploadFiles.length==0){
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '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{
this.$toast.success('修改成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
});
}else{
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '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 = {};
@@ -712,16 +772,13 @@
}
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
this.uploadFiles.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
}
})
},
getFileList(){
@@ -735,7 +792,6 @@
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)


+ 236
- 161
src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify12.vue ファイルの表示

@@ -132,21 +132,21 @@
</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>
<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="请选择付款方"
label="出票方"
placeholder="请选择出票方"
v-model="form.payer"
@click="showpayer = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
required
:rules="[{ required: true , message:'请选择付款方' }]"
:rules="[{ required: true , message:'请选择出票方' }]"
/>
<van-popup v-model="showpayer" position="bottom">
<van-picker
@@ -156,72 +156,75 @@
@cancel="showpayer = false"
/>
</van-popup>
<van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" 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">收款方信息<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" 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 , message:'请选择所属银行' }]"
/>
<van-popup v-model="item.showbankType" position="bottom">
<van-picker
show-toolbar
:columns="bankTypeDictionaries"
@confirm="onConfirmBankType($event,index)"
@cancel="item.showbankType = false"
/>
</van-popup>
<van-field required :rules="[{ required: true , message:'收款方不能为空' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'联系方式不能为空' }]" v-model="item.phone" label="联系方式" placeholder="请输入联系方式" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'所属单位补鞥你为空' }]" v-model="item.unit" label="所属单位" placeholder="请输入所属单位" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'负责人全称不能为空' }]" v-model="item.leader" label="负责人全称" placeholder="请输入负责人全称" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" 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="fileList" :after-read="beforeRead" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -241,7 +244,13 @@
<script>
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import request from '@/utils/request';
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import {
addCash, addCashdetail,
attachmentList, cashSubmit,
commonAttach, getCash,
listCashdetailByCashId, listMoneyorder, updateCash
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import Dialog from "vant/lib/dialog";
export default {
name: "approvalModify12",
data() {
@@ -299,6 +308,9 @@
},
projectFundType:'',
fileList:[],
uploadFiles:[],
orderTypeName:'',
orderTypeOptions:[]
};
},
created() {
@@ -318,16 +330,20 @@
}
this.projectFundTypeDictionaries = response.data;
});
this.getDicts("order_type").then(response => {
this.orderTypeOptions = response.data;
});
let params1={
accountType: "102",
status: "N",
pageNum: 1,
pageSize: 1000,
}
getAccount(params1).then((response) => {
listMoneyorder(params1).then((response) => {
console.log(response)
this.payerOptions = response.rows;
response.rows.map((res,index) => {
res['payerFrom'] = '1'
res['payerFrom'] = '12'
console.log(res)
this.payerOptions[index].text = res.accountName;
this.payerOptions[index].text = res.billReceiveUnit;
this.payerOptions[index].value = res.id;
})
});
@@ -336,7 +352,7 @@
},
methods: {
getDictionaries(){
getTransfer(this.$route.query.id).then((response) => {
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});
@@ -347,7 +363,7 @@
this.capitalExpenditureOpen = true
let param={
'outId' : response.data.id,
'ynType' : '1'
'ynType' : '2'
}
getProjectto(param).then(res => {
console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType))
@@ -359,19 +375,15 @@
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.orderTypeOptions.map(res => {
console.log(this.orderTypeOptions)
if(res.dictValue==this.form.orderType){
this.orderTypeName = res.dictLabel
}
this.chargeItme = response.rows;
});
})
});
listCashdetailByCashId(this.$route.query.id).then((response) => {
this.chargeItme = response.data;
this.getPayeeList();
});
},
@@ -393,31 +405,17 @@
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
});
this.chargeItme.splice(index + 1, 0, {
payeeId: "", //收款方ID
payee: "", //收款方
payeeAccount: "", //收款账户
bankDeposit: "", //开户银行
incomeAmount: "", //收入金额
bankType: "", //所属银行
bankTypeText:"", //所属银行
showPayee:false,
showbankType:false
});
},
getPayeeList() {
@@ -543,34 +541,79 @@
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)
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
})
.then(() => {
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
});
})

}else{
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
}else{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
})
}else{
cashSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
})
})
}
});
});
}
},
goUpdate(){
if(this.chargeItme.length<1){
@@ -591,28 +634,64 @@
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)
if(this.uploadFiles==null||this.uploadFiles.length==0){
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '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{
this.$toast.success('修改成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
});
}else{
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '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 = {};
@@ -713,16 +792,13 @@
}
},
beforeRead(file) {
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
this.uploadFiles.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
}
})
},
getFileList(){
@@ -736,7 +812,6 @@
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)


+ 231
- 98
src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify5.vue ファイルの表示

@@ -7,7 +7,7 @@
@click-left="$router.back(-1)"
>
<template #title>
<p style="font-weight: bold;">修改付款申请</p>
<p style="font-weight: bold;">修改母子转账申请</p>
</template>
</van-nav-bar>
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
@@ -194,8 +194,8 @@
@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 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
@@ -205,23 +205,14 @@
v-model="item.bankTypeText"
@click="item.showbankType = true"
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true , message:'请选择所属银行' }]"
/>
<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>
<p class="main_title">上传附件</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader>
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -241,7 +232,13 @@
<script>
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import request from '@/utils/request';
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import {
addTransfer,
attachmentList,
commonAttach, listTaccount,
listVaccount, systemAttachment
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
import Dialog from "vant/lib/dialog";
export default {
name: "approvalModify5",
data() {
@@ -299,6 +296,7 @@
},
projectFundType:'',
fileList:[],
uploadFiles:[],
};
},
created() {
@@ -319,16 +317,16 @@
this.projectFundTypeDictionaries = response.data;
});
let params1={
accountType: "102",
status: "N",
townAccountType:'2'
}
getAccount(params1).then((response) => {
this.payerOptions = response.rows;
listTaccount(params1).then((response) => {
response.rows.map((res,index) => {
res['payerFrom'] = '1'
console.log(res)
this.payerOptions[index].text = res.accountName;
this.payerOptions[index].value = res.id;
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();
@@ -359,6 +357,7 @@
this.showproject = false
}
this.form = response.data;
this.getPayeeList();
});
queryTransferDetail(this.$route.query.id).then((response) => {
this.getDicts("bank_type").then(res => {
@@ -372,21 +371,16 @@
}
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){
@@ -413,8 +407,8 @@
payeeAccount: "", //收款账户
bankDeposit: "", //开户银行
incomeAmount: "", //收入金额
bankType: "1", //所属银行
bankTypeText:this.selectDictLabel(res.data, 1), //所属银行
bankType: "", //所属银行
bankTypeText: "", //所属银行
showPayee:false,
showbankType:false
});
@@ -424,13 +418,19 @@
//普通转账
this.queryParams.accountType = this.form.accountType
this.queryParams.status = "0"
listPayee(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;
})
});
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 = [];
@@ -443,7 +443,6 @@
return actions.join('');
},
onConfirmCapital(data){
console.log(data)
if (data.value != 2){
this.capitalExpenditureOpen = false;
this.projectForm = [];
@@ -479,14 +478,17 @@
this.chargeItme[index].payee = data.text;
this.chargeItme[index].payeeId = data.value;
this.payeeSelectChange(data.value , index)
this.onConfirmBankType(data,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;
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;
@@ -500,15 +502,22 @@
},
accountTypeChange(e){
this.payeeList = [];
this.chargeItme = [];
this.queryParams.accountType = this.form.accountType
this.queryParams.status = "0"
listPayee(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;
})
});
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) {
@@ -543,34 +552,130 @@
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)
if(this.uploadFiles==null||this.uploadFiles.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", "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);
updateTransfer(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){
@@ -595,23 +700,50 @@
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('修改成功');
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", "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{
this.$toast.success('修改成功');
setTimeout(function(){
history.go(-1)
},2000)
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) {
@@ -713,17 +845,19 @@
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
},
deleteFile(file){
console.log(file)
console.log(this.fileList)
const params = new FormData();
params.append("tableId", this.$route.query.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", file.file);
commonAttach(params).then((response) => {
console.log(response)
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= {
@@ -736,9 +870,8 @@
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,{})})
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
})
})


+ 244
- 0
src/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess2.vue ファイルの表示

@@ -0,0 +1,244 @@
<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="6" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col>
<van-col span="18" class="textBlue">草稿</van-col>
</van-row>
<van-row v-if="processList.待申请==2">
<van-col span="6" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col>
<van-col span="18" class="textBlue">已申请
<van-row>
<van-col span="24" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">申请人:{{processList.申请人}}</van-col>
</van-row>
<van-row>
<van-col span="24" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">申请时间:{{processList.申请时间}}</van-col>
</van-row>
</van-col>
</van-row>
<van-row>
<van-col span="6" align="right">
<p class="icon_jian" v-show="processList.乡镇审批==1"><van-icon name="minus" size="14" /></p>
<p class="icon_jian blue" v-show="processList.乡镇审批==2"><van-icon name="success" size="14" /></p>
<p class="icon_jian red" v-show="processList.乡镇审批==3"><van-icon name="cross" size="14" /></p>
</van-col>
<van-col span="18">
<p v-show="processList.乡镇审批==1">乡镇审批</p>
<p v-show="processList.乡镇审批==2" class="textBlue">乡镇审批</p>
<p v-show="processList.乡镇审批==3" class="textRed">乡镇审批</p>
<van-row>
<van-col span="24" style="padding: 0;" v-if="processList.乡镇审批人!=null&&processList.乡镇审批人!=''">
<p v-show="processList.乡镇审批==1">审批人:{{processList.乡镇审批人}}</p>
<p v-show="processList.乡镇审批==2" class="textBlue">审批人:{{processList.乡镇审批人}}</p>
<p v-show="processList.乡镇审批==3" class="textRed">审批人:{{processList.乡镇审批人}}</p>
</van-col>
</van-row>
<van-row>
<van-col span="24" style="padding: 0;" v-if="processList.乡镇审批时间!=null&&processList.乡镇审批时间!=''">
<p v-show="processList.乡镇审批==1">审批时间:{{processList.乡镇审批时间}}</p>
<p v-show="processList.乡镇审批==2" class="textBlue">审批时间:{{processList.乡镇审批时间}}</p>
<p v-show="processList.乡镇审批==3" class="textRed">审批时间:{{processList.乡镇审批时间}}</p>
</van-col>
</van-row>
</van-col>
</van-row>
<van-row v-if="form.approveLevel==2">
<van-col span="6" align="right">
<p class="icon_jian" v-show="processList.区县审批==1"><van-icon name="minus" size="14" /></p>
<p class="icon_jian blue" v-show="processList.区县审批==2"><van-icon name="success" size="14" /></p>
<p class="icon_jian red" v-show="processList.区县审批==3"><van-icon name="cross" size="14" /></p>
</van-col>
<van-col span="18">
<p v-show="processList.区县审批==1">区县审批</p>
<p v-show="processList.区县审批==2" class="textBlue">区县审批</p>
<p v-show="processList.区县审批==3" class="textRed">区县审批</p>
<van-row>
<van-col span="24" style="padding: 0;">
<p v-show="processList.区县审批==1">审批人:{{processList.区县审批人}}</p>
<p v-show="processList.区县审批==2" class="textBlue">审批人:{{processList.区县审批人}}</p>
<p v-show="processList.区县审批==3" class="textRed">审批人:{{processList.区县审批人}}</p>
</van-col>
</van-row>
<van-row>

<van-col span="24" style="padding: 0;">
<p v-show="processList.区县审批==1">审批时间:{{processList.区县审批时间}}</p>
<p v-show="processList.区县审批==2" class="textBlue">审批时间:{{processList.区县审批时间}}</p>
<p v-show="processList.区县审批==3" class="textRed">审批时间:{{processList.区县审批时间}}</p>
</van-col>
</van-row>
</van-col>
</van-row>
<van-row v-show="form.transferType==1||form.transferType=='常用转账'">
<van-col span="6" align="right">
<p class="icon_jian" v-show="processList.支付状态==1"><van-icon name="minus" size="14" /></p>
<p class="icon_jian blue" v-show="processList.支付状态==2"><van-icon name="success" size="14" /></p>
<p class="icon_jian red" v-show="processList.支付状态==3"><van-icon name="cross" size="14" /></p>
</van-col>
<van-col span="18">
<p v-show="processList.支付状态==1">待支付</p>
<p v-show="processList.支付状态==2" class="textBlue">支付成功</p>
<p v-show="processList.支付状态==3" class="textRed">支付异常</p>
<van-row>
<van-col span="24" style="padding: 0;">
<p v-show="processList.支付状态==2||processList.支付状态==3">支付时间:{{processList.支付时间}}</p>
</van-col>
</van-row>
</van-col>
</van-row>
<van-row v-show="form.transferType==1||form.transferType=='常用转账'">
<van-col span="6" align="right">
<p class="icon_jian" v-show="processList.入账状态==1"><van-icon name="minus" size="14" /></p>
<p class="icon_jian blue" v-show="processList.入账状态==2"><van-icon name="success" size="14" /></p>
<p class="icon_jian red" v-show="processList.入账状态==3"><van-icon name="cross" size="14" /></p>
</van-col>
<van-col span="18">
<p v-show="processList.入账状态==1">未入账</p>
<p v-show="processList.入账状态==2" class="textBlue">入账成功</p>
<p v-show="processList.入账状态==3" class="textRed">入账异常</p>
<van-row>
<van-col span="24" style="padding: 0;">
<p v-show="processList.入账状态==2||processList.入账状态==3">入账时间:{{processList.入账时间}}</p>
</van-col>
</van-row>
</van-col>
</van-row>
</div>
</div>
</template>

<script>
import {
getTransferProcess,
getTransfer,
getProjectto,
queryTransferDetail
} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import {
getCash,
getTransferProcess1,
listCashdetailByCashId
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
export default {
name: "approvalProcess",
data() {
return {
processList:{},
form:{}
};
},
created() {
this.handleUpdate(this.$route.query.id);
},
methods: {
//查询审批进程
getTransferProcess1(id){
getTransferProcess1(id).then(res => {
this.processList = res.data.processSchedule
console.log(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 = {}
this.getTransferProcess1(this.$route.query.id);
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.rows;
this.length = this.chargeItme.length;
this.detailTotal = r.total;
this.loading = false;
});
})
}else{
this.capitalExpenditureOpen = false
listCashdetailByCashId(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: 20Px 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>

読み込み中…
キャンセル
保存