@@ -1027,7 +1027,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList', | |||
name: 'approvalList', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '常用转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList'], resolve) | |||
@@ -1036,7 +1036,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList2', | |||
name: 'approvalList2', | |||
meta: { | |||
title: '信用卡转账', | |||
title: '信用卡转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList2'], resolve) | |||
@@ -1045,7 +1045,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList3', | |||
name: 'approvalList3', | |||
meta: { | |||
title: '虚拟挂账', | |||
title: '虚拟挂账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList3'], resolve) | |||
@@ -1054,7 +1054,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList4', | |||
name: 'approvalList4', | |||
meta: { | |||
title: '虚拟转账', | |||
title: '虚拟转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList4'], resolve) | |||
@@ -1063,7 +1063,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList5', | |||
name: 'approvalList5', | |||
meta: { | |||
title: '母子转张', | |||
title: '母子转账列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList5'], resolve) | |||
@@ -1072,7 +1072,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList10', | |||
name: 'approvalList10', | |||
meta: { | |||
title: '资金提现', | |||
title: '现金提现列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList10'], resolve) | |||
@@ -1081,7 +1081,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList11', | |||
name: 'approvalList11', | |||
meta: { | |||
title: '资金使用', | |||
title: '现金使用列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList11'], resolve) | |||
@@ -1090,7 +1090,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalList12', | |||
name: 'approvalList12', | |||
meta: { | |||
title: '汇票支出', | |||
title: '汇票支出列表', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList12'], resolve) | |||
@@ -1099,7 +1099,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail', | |||
name: 'approvalDetail', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农常用转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail'], resolve) | |||
@@ -1108,7 +1108,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail2', | |||
name: 'approvalDetail2', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农信用卡转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail2'], resolve) | |||
@@ -1117,7 +1117,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail3', | |||
name: 'approvalDetail3', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农虚拟挂账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail3'], resolve) | |||
@@ -1126,7 +1126,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail4', | |||
name: 'approvalDetail4', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农虚拟转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail4'], resolve) | |||
@@ -1135,7 +1135,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail5', | |||
name: 'approvalDetail5', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农母子转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail5'], resolve) | |||
@@ -1144,7 +1144,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail10', | |||
name: 'approvalDetail10', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农现金提现申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail10'], resolve) | |||
@@ -1153,7 +1153,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail11', | |||
name: 'approvalDetail11', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农现金使用申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail11'], resolve) | |||
@@ -1162,7 +1162,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalDetail12', | |||
name: 'approvalDetail12', | |||
meta: { | |||
title: '银农支付付款申请', | |||
title: '银农汇票支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail12'], resolve) | |||
@@ -1171,7 +1171,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd', | |||
name: 'approvalAdd', | |||
meta: { | |||
title: '添加常用转账付款申请', | |||
title: '添加常用转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd'], resolve) | |||
@@ -1180,7 +1180,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd2', | |||
name: 'approvalAdd2', | |||
meta: { | |||
title: '添加信用卡转账付款申请', | |||
title: '添加信用卡转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd2'], resolve) | |||
@@ -1189,7 +1189,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd3', | |||
name: 'approvalAdd3', | |||
meta: { | |||
title: '添加虚拟挂账付款申请', | |||
title: '添加虚拟挂账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd3'], resolve) | |||
@@ -1198,7 +1198,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd4', | |||
name: 'approvalAdd4', | |||
meta: { | |||
title: '添加虚拟转账付款申请', | |||
title: '添加虚拟转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd4'], resolve) | |||
@@ -1207,7 +1207,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd5', | |||
name: 'approvalAdd5', | |||
meta: { | |||
title: '添加母子转账付款申请', | |||
title: '添加母子转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd5'], resolve) | |||
@@ -1216,7 +1216,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd10', | |||
name: 'approvalAdd10', | |||
meta: { | |||
title: '添加资金提现付款申请', | |||
title: '添加现金提现申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10'], resolve) | |||
@@ -1225,7 +1225,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd11', | |||
name: 'approvalAdd11', | |||
meta: { | |||
title: '添加资金使用付款申请', | |||
title: '添加现金使用申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11'], resolve) | |||
@@ -1234,7 +1234,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalAdd12', | |||
name: 'approvalAdd12', | |||
meta: { | |||
title: '添加汇票支出付款申请', | |||
title: '添加汇票支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd12'], resolve) | |||
@@ -1248,11 +1248,38 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval'], resolve) | |||
}, | |||
{ | |||
path: '/onlineHome/approvalApproval10', | |||
name: 'approvalApproval10', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval10'], resolve) | |||
},{ | |||
path: '/onlineHome/approvalApproval11', | |||
name: 'approvalApproval11', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval11'], resolve) | |||
}, | |||
{ | |||
path: '/onlineHome/approvalApproval12', | |||
name: 'approvalApproval12', | |||
meta: { | |||
title: '付款审批', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval12'], resolve) | |||
}, | |||
{ | |||
path: '/onlineHome/approvalModify', | |||
name: 'approvalModify', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改常用转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify'], resolve) | |||
@@ -1261,7 +1288,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify2', | |||
name: 'approvalModify2', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改信用卡转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify2'], resolve) | |||
@@ -1270,7 +1297,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify3', | |||
name: 'approvalModify3', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改虚拟挂账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify3'], resolve) | |||
@@ -1279,7 +1306,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify4', | |||
name: 'approvalModify4', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改虚拟转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify4'], resolve) | |||
@@ -1288,7 +1315,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify5', | |||
name: 'approvalModify5', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改母子转账申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify5'], resolve) | |||
@@ -1297,7 +1324,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify10', | |||
name: 'approvalModify10', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改现金提现申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify10'], resolve) | |||
@@ -1306,7 +1333,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify11', | |||
name: 'approvalModify11', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改现金使用申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify11'], resolve) | |||
@@ -1315,7 +1342,7 @@ export const constantRoutes = [ | |||
path: '/onlineHome/approvalModify12', | |||
name: 'approvalModify12', | |||
meta: { | |||
title: '修改银农支付付款申请', | |||
title: '修改汇票支出申请', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify12'], resolve) | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -259,8 +260,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -328,6 +329,7 @@ | |||
status: "N", | |||
} | |||
getAccount(params1).then((response) => { | |||
console.log(response) | |||
this.payerOptions = response.rows; | |||
response.rows.map((res,index) => { | |||
res['payerFrom'] = '1' | |||
@@ -436,12 +438,11 @@ | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
console.log(response) | |||
this.payeeList = response.rows; | |||
response.rows.map((res,index) => { | |||
if(res.payeeType==1||res.payeeType==2){ | |||
this.payeeList[index].text = res.payee; | |||
this.payeeList[index].value = res.id; | |||
} | |||
}) | |||
}); | |||
}, | |||
@@ -512,6 +513,7 @@ | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
@@ -555,7 +557,7 @@ | |||
return; | |||
} | |||
} | |||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -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> | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -215,8 +216,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -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> | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -59,7 +60,7 @@ | |||
<van-field | |||
readonly | |||
required | |||
label="提现总金额" | |||
label="使用总金额" | |||
v-model="form.expenditureAmount" | |||
placeholder="根据下方收款金额自动核算" | |||
input-align="right" | |||
@@ -215,8 +216,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -488,7 +489,7 @@ | |||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
}); | |||
this.$set(this.form, "expenditureAmount", total); | |||
if(this.form.payerAccount<this.form.expenditureAmount){ | |||
if(parseFloat(this.form.payerAccount)<parseFloat(this.form.expenditureAmount)){ | |||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||
this.form.expenditureAmount="" | |||
this.chargeItme = [] | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -245,6 +246,7 @@ | |||
listMoneyorder, | |||
updateCash | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalAdd12", | |||
data() { | |||
@@ -580,36 +582,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); | |||
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", '3'); | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
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) => { | |||
}) | |||
}) | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}) | |||
}); | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
@@ -630,28 +675,64 @@ | |||
return; | |||
} | |||
} | |||
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", '3'); | |||
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 = {}; | |||
@@ -752,16 +833,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(){ | |||
@@ -775,7 +853,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) | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -250,8 +251,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -548,7 +549,7 @@ | |||
return; | |||
} | |||
} | |||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -254,8 +255,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -511,6 +512,7 @@ | |||
this.form.cashierId = data.value; | |||
this.form.payerAccount = data.payeeAccount; | |||
this.showpayer = false; | |||
this.accountTypeChange(); | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
@@ -522,7 +524,8 @@ | |||
let params = { | |||
villageAccountType : 1, | |||
status:'0', | |||
accountType : this.form.accountType | |||
accountType : this.form.accountType, | |||
taccountId:this.form.cashierId | |||
} | |||
listVaccount(params).then(response => { | |||
console.log(response) | |||
@@ -568,7 +571,7 @@ | |||
return; | |||
} | |||
} | |||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -213,7 +214,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> | |||
@@ -236,6 +237,7 @@ | |||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {attachmentList, commonAttach, listVaccount} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalAdd4", | |||
data() { | |||
@@ -250,8 +252,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -291,7 +293,8 @@ | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'' | |||
projectFundType:'', | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
@@ -503,6 +506,7 @@ | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
@@ -546,31 +550,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)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
} | |||
}); | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", response.data.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
@@ -595,23 +698,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) { | |||
@@ -675,16 +806,13 @@ | |||
this.$set(this.form, "payerFrom", '1'); | |||
}, | |||
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(){ | |||
@@ -698,7 +826,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) | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -255,8 +256,8 @@ | |||
buttonType:'a', | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
@@ -514,6 +515,7 @@ | |||
this.form.payerAccount = data.payeeAccount; | |||
this.showpayer = false; | |||
// this.selectChange(data.value) | |||
this.accountTypeChange(); | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
@@ -571,7 +573,7 @@ | |||
return; | |||
} | |||
} | |||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -4,7 +4,7 @@ | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
@click-left="backDone" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">付款审批</p> | |||
@@ -57,7 +57,15 @@ | |||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList" :key="index"> | |||
<a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
@@ -85,6 +93,8 @@ | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , approval } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {attachmentList, systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
export default { | |||
name: "approvalApproval", | |||
data() { | |||
@@ -96,8 +106,8 @@ | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -137,6 +147,8 @@ | |||
ynType:'1' | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
@@ -161,8 +173,16 @@ | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
backDone(){ | |||
if(this.$route.query.type != 'done'){ | |||
this.$router.push({name:'onlineHomeDone',query: {activeName:'1'}}) | |||
}else{ | |||
this.$router.push({name:'onlineHomeDone',query: {activeName:'2'}}) | |||
} | |||
}, | |||
goFlow(){ | |||
window.location='approvalProcess?id='+this.$route.query.id; | |||
}, | |||
@@ -212,6 +232,38 @@ | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
console.log(file) | |||
this.uploadFiles.map((response,index) => { | |||
if(file.file == response){ | |||
this.uploadFiles.splice(index,1) | |||
} | |||
}) | |||
if(file.id){ | |||
systemAttachment(file.id).then((res) => { | |||
}); | |||
} | |||
}, | |||
getFileList(){ | |||
let oData= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
@@ -0,0 +1,501 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">现金提现申请审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="提现总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="提款金额(元)" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList" :key="index"> | |||
<a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getCash , listCashdetailByCashId , listPayee , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {approval, attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail10", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'2' | |||
}, | |||
projectFundType:'', | |||
uploadFiles:[], | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
console.log(response) | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
window.location='approvalProcess2?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
console.log(this.$route.query.id) | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
console.log(response.data) | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
console.log(data) | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
console.log(data) | |||
this.projectList.map(res => { | |||
console.log(res) | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
console.log(this.projectForm) | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data){ | |||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
console.log(this.chargeItme) | |||
this.showpayee = false; | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(this.chargeItme) | |||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
this.showbankType = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
console.log(e) | |||
this.payeeList = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
goAdd(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
console.log(this.form); | |||
updateTransfer(this.form).then(response => { | |||
console.log(response); | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
console.log(this.projectForm) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}); | |||
}, | |||
goUpdate(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
this.projectForm.outId = this.form.id | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
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_cash", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
console.log(data); | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -0,0 +1,506 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">现金使用申请审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<p class="main_title">付款方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">收款方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="提款金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList" :key="index"> | |||
<a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
approval, | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail11", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'', | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
window.location='approvalProcess2?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
}); | |||
console.log(this.$route.query.id) | |||
listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
this.chargeItme = response.data; | |||
console.log(response) | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
console.log(data) | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
console.log(data) | |||
this.projectList.map(res => { | |||
console.log(res) | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
console.log(this.projectForm) | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data){ | |||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
console.log(this.chargeItme) | |||
this.showpayee = false; | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(this.chargeItme) | |||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
this.showbankType = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
console.log(e) | |||
this.payeeList = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
goAdd(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
console.log(this.form); | |||
updateTransfer(this.form).then(response => { | |||
console.log(response); | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
console.log(this.projectForm) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}); | |||
}, | |||
goUpdate(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
this.projectForm.outId = this.form.id | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
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_cash", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
console.log(data); | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -0,0 +1,569 @@ | |||
<template> | |||
<div class="app-container"> | |||
<van-nav-bar | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="$router.back(-1)" | |||
> | |||
<template #title> | |||
<p style="font-weight: bold;">汇票支出申请审批</p> | |||
</template> | |||
<template #right> | |||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
</template> | |||
</van-nav-bar> | |||
<p class="main_title">基础信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" style="margin-top: 10px;"> | |||
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
</div> | |||
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
</div> | |||
<p class="main_title">出票方信息</p> | |||
<div class="main_box"> | |||
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
<van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/> | |||
<van-field | |||
readonly | |||
label="出票金额(元)" | |||
v-model="form.expenditureAmount" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'出票金额不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="汇票类型" | |||
v-model="orderTypeName" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="汇票类型" | |||
v-model="form.orderType" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
style="display: none" | |||
required | |||
:rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="开票日" | |||
v-model="form.startTime" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'开票日不能为空!' }]" | |||
/> | |||
<van-field | |||
readonly | |||
label="到期日" | |||
v-model="form.endTime" | |||
placeholder="" | |||
input-align="right" | |||
label-width="auto" | |||
required | |||
:rules="[{ required: true , message:'到期日不能为空!' }]" | |||
/> | |||
</div> | |||
<p class="main_title">收票方信息</p> | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/> | |||
<van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/> | |||
<van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
</div> | |||
</div> | |||
<p class="main_title">上传附件</p> | |||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||
<van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
<van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
</div> | |||
<p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
<van-cell v-for="(item,index) in fileList" :key="index"> | |||
<a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
</van-cell> | |||
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="5">审批<br/>意见</van-col> | |||
<van-col span="19"> | |||
<van-radio-group v-model="pass" direction="horizontal"> | |||
<van-radio name="true">同意</van-radio> | |||
<van-radio name="false">驳回</van-radio> | |||
</van-radio-group> | |||
<van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
<van-row> | |||
<van-col span="24" align="center"> | |||
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
</van-col> | |||
</van-row> | |||
<div class="clear"></div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import { | |||
approval, | |||
attachmentList, | |||
commonAttach, | |||
getCash, | |||
listCashdetailByCashId | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail12", | |||
data() { | |||
return { | |||
showcapital:false, | |||
showpayee:false, | |||
showlasj:false, | |||
showbankType:false, | |||
showproject:false, | |||
showFundType:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
currentDate: new Date(), | |||
form:{}, | |||
fileList:[], | |||
capitalExpenditureType:'', | |||
payee:'', | |||
bankType:'', | |||
wfydlxDictionaries:[], | |||
jglxDictionaries:[], | |||
sysDictionaries:[], | |||
capitalExpenditureTypeOptions:[], | |||
bankTypeDictionaries:[], | |||
projectList:[], | |||
projectFundTypeOptions:[], | |||
projectFundTypeDictionaries:[], | |||
projectListShow:[], | |||
chargeItme:[], | |||
chargeItmeShow:[], | |||
payeeList:[], | |||
// 查询参数 | |||
queryParams: { | |||
transferType:"", | |||
orderByColumn: "id", | |||
isAsc: "desc", | |||
}, | |||
capitalExpenditureOpen:false, | |||
projectForm:{ | |||
projectId:null, | |||
projectName:null, | |||
projectContractor:null, | |||
projectAmount:null, | |||
projectBillNum:null, | |||
projectFundType:'1', | |||
outId:null, | |||
ynType:'1' | |||
}, | |||
projectFundType:'', | |||
orderTypeName:'', | |||
orderTypeOptions:[], | |||
// 审核意见默认值 | |||
pass: "true", | |||
comment: "同意", | |||
}; | |||
}, | |||
created() { | |||
let queryParams={ | |||
pageNum: 1, | |||
pageSize: 100, | |||
} | |||
listProject(queryParams).then(response => { | |||
console.log(response) | |||
this.projectList = response.rows; | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
} | |||
}); | |||
this.getDicts("project_fund_type").then((response) => { | |||
for (var i = 0; i < response.data.length; i++) { | |||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
} | |||
this.projectFundTypeDictionaries = response.data; | |||
}); | |||
this.getDicts("order_type").then(response => { | |||
this.orderTypeOptions = response.data; | |||
}); | |||
this.getDictionaries(); | |||
this.getFileList(); | |||
}, | |||
methods: { | |||
goFlow(){ | |||
window.location='approvalProcess2?id='+this.$route.query.id; | |||
}, | |||
getDictionaries(){ | |||
getCash(this.$route.query.id).then((response) => { | |||
this.getDicts("capital_expenditure_type").then((res) => { | |||
for (var i = 0; i < res.data.length; i++) { | |||
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
} | |||
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
}); | |||
if(response.data.capitalExpenditureType==2){ | |||
this.capitalExpenditureOpen = true | |||
let param={ | |||
'outId' : response.data.id, | |||
'ynType' : '2' | |||
} | |||
getProjectto(param).then(res => { | |||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
this.projectForm = res.data | |||
}) | |||
}else{ | |||
this.showproject = false | |||
} | |||
this.form = response.data; | |||
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) => { | |||
this.chargeItme = response.data; | |||
console.log(response.data) | |||
this.getPayeeList(); | |||
}); | |||
}, | |||
addChargeItme(index){ | |||
this.chargeItme.splice(index + 1, 0, { | |||
payeeId: "", //收款方ID | |||
payee: "", //收款方 | |||
payeeAccount: "", //收款账户 | |||
bankDeposit: "", //开户银行 | |||
incomeAmount: "", //收入金额 | |||
bankType: "", //所属银行 | |||
}); | |||
}, | |||
getPayeeList() { | |||
//普通转账 | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
payeeDictLabel(datas, value) { | |||
var actions = []; | |||
Object.keys(datas).some((key) => { | |||
if (datas[key].payeeId == ('' + value)) { | |||
actions.push(datas[key].payee); | |||
return true; | |||
} | |||
}) | |||
return actions.join(''); | |||
}, | |||
onConfirmCapital(data){ | |||
console.log(data) | |||
if (data.value != 2){ | |||
this.capitalExpenditureOpen = false; | |||
this.projectForm = []; | |||
}else{ | |||
this.capitalExpenditureOpen = true; | |||
} | |||
this.capitalExpenditureType = data.text; | |||
this.form.capitalExpenditureType = data.value; | |||
this.showcapital = false; | |||
}, | |||
onConfirmFundType(data){ | |||
console.log(data) | |||
this.projectForm.projectFundType = data.value; | |||
this.projectFundType = data.text; | |||
this.showFundType = false; | |||
}, | |||
onConfirmProject(data){ | |||
console.log(data) | |||
this.projectList.map(res => { | |||
console.log(res) | |||
if(res.projectName==data.text){ | |||
this.projectForm.projectId = res.id | |||
this.projectForm.projectName = res.projectName | |||
this.projectForm.projectContractor = res.projectContractor | |||
this.projectForm.projectAmount = res.projectAmount | |||
console.log(this.projectForm) | |||
} | |||
}) | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data){ | |||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
console.log(this.chargeItme) | |||
this.showpayee = false; | |||
}, | |||
onConfirmBankType(data){ | |||
console.log(this.chargeItme) | |||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
this.showbankType = false; | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
this.showlasj = false; | |||
}, | |||
accountTypeChange(e){ | |||
console.log(e) | |||
this.payeeList = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
for (var i = 0; i < response.rows.length; i++) { | |||
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
} | |||
}); | |||
}, | |||
goAdd(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
console.log(this.form); | |||
updateTransfer(this.form).then(response => { | |||
console.log(response); | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
console.log(this.projectForm) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}); | |||
}, | |||
goUpdate(){ | |||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
this.$toast.error("付款事由禁止包含|。"); | |||
return; | |||
} | |||
if(this.form.capitalExpenditureType==2){ | |||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
this.$toast.error('请选择项目名称!'); | |||
return; | |||
} | |||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
this.$toast.error('请输入工程发票号!'); | |||
return; | |||
} | |||
} | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
this.projectForm.outId = this.form.id | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('修改成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
}); | |||
}, | |||
beforeRead(file) { | |||
this.uploadFiles.push(file.file); | |||
}, | |||
deleteFile(file){ | |||
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_cash", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
console.log(r) | |||
}) | |||
}) | |||
}, | |||
goBack(){ | |||
window.history.go(-1) | |||
}, | |||
//删除家庭成员 | |||
deleteChargeItme(index){ | |||
this.chargeItme.splice(index,1) | |||
}, | |||
/** 提交按钮 */ | |||
submitForm() { | |||
const data = { | |||
taskId: this.$route.query.taskId, | |||
instanceId: this.form.instanceId, | |||
variables: JSON.stringify({ | |||
comment: this.comment, | |||
pass: this.pass, | |||
}), | |||
}; | |||
console.log(data); | |||
approval(data).then((response) => { | |||
if(response.code==200 && response.msg=="操作成功"){ | |||
this.$toast.success("操作成功"); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} else{ | |||
this.$toast.success("操作失败"); | |||
} | |||
}); | |||
}, | |||
},watch: { | |||
pass: function (val) { | |||
this.comment = val === "true" ? "同意" : "驳回"; | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
padding: 2% 0; | |||
} | |||
.main_title{ | |||
font-size: 0.4rem; | |||
color: #1D6FE9; | |||
margin: 0.2rem 6%; | |||
position: relative; | |||
} | |||
.main_box{ | |||
width: 96%; | |||
margin: 0 auto; | |||
border-radius: 6px; | |||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
overflow: hidden; | |||
background-color: #FFF; | |||
} | |||
.submitButton{ | |||
width: 96%; | |||
margin: 0 auto; | |||
} | |||
.addFamily{ | |||
position: absolute; | |||
top: -2px; | |||
right: 0; | |||
border-radius: 50%; | |||
} | |||
.deleteFamily{ | |||
position: absolute; | |||
top: 0rem; | |||
right: 6%; | |||
z-index: 9; | |||
border-radius: 50%; | |||
} | |||
.examine_box{ | |||
background-color: #1D6FE9!important; | |||
padding: 0.18rem!important; | |||
padding-left: 0!important; | |||
border-radius: 0.15rem!important; | |||
margin-top: 0.3rem!important; | |||
} | |||
.examine_box .van-col:first-child{ | |||
color: #FFF!important; | |||
font-size: 0.45rem!important; | |||
text-align: center!important; | |||
} | |||
.examine_box .van-col:last-child{ | |||
background-color: #FFF!important; | |||
border-radius: 0.15rem!important; | |||
overflow: hidden!important; | |||
.van-radio-group--horizontal{ | |||
padding: 0.2rem 0; | |||
border-bottom: 1px solid #eee; | |||
} | |||
} | |||
/deep/.van-radio--horizontal{ | |||
margin-left: 20px; | |||
margin-right: 0; | |||
} | |||
</style> |
@@ -68,7 +68,11 @@ | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
@@ -357,17 +361,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= { | |||
@@ -380,9 +386,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) | |||
}) | |||
}) | |||
@@ -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"/> | |||
@@ -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"/> | |||
@@ -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"/> | |||
@@ -67,7 +67,11 @@ | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
@@ -356,17 +360,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= { | |||
@@ -379,9 +385,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) | |||
}) | |||
}) | |||
@@ -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"/> | |||
@@ -67,7 +67,11 @@ | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
@@ -356,17 +360,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= { | |||
@@ -379,9 +385,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) | |||
}) | |||
}) | |||
@@ -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"/> | |||
@@ -67,7 +67,11 @@ | |||
<script> | |||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request' | |||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
export default { | |||
name: "approvalDetail", | |||
data() { | |||
@@ -356,17 +360,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= { | |||
@@ -379,9 +385,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) | |||
}) | |||
}) | |||
@@ -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"/> | |||
@@ -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"/> | |||
@@ -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:'approvalDetail2', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/yinnongList8.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
@@ -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:'approvalDetail3', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/yinnongList9.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
@@ -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:'approvalDetail4', query: {id:item.id}}"> | |||
<template #icon> | |||
<van-icon name="../../../../../static/images/onlineHome/yinnongList10.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||
</template> | |||
@@ -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> | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -221,7 +222,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,8 +241,13 @@ | |||
<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 { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request'; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalModify", | |||
data() { | |||
@@ -254,8 +260,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -299,6 +305,7 @@ | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
@@ -499,6 +506,7 @@ | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
@@ -542,34 +550,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)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
} | |||
}); | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
@@ -594,23 +698,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) { | |||
@@ -712,32 +843,33 @@ | |||
} | |||
}, | |||
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= { | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "upload", | |||
fileType: "0", | |||
tableId: this.$route.query.id, | |||
tableName: "t_yinnong_transfer", | |||
bizPath: "upload", | |||
fileType: "0", | |||
} | |||
attachmentList(oData).then(res => { | |||
console.log(res) | |||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
res.rows.map(r => { | |||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
console.log(r) | |||
}) | |||
}) | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -211,8 +212,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2050, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -213,8 +214,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -263,8 +264,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -221,7 +222,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,8 +241,13 @@ | |||
<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 { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request'; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalModify2", | |||
data() { | |||
@@ -254,8 +260,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -299,6 +305,7 @@ | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
@@ -500,6 +507,7 @@ | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
@@ -543,34 +551,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)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
} | |||
}); | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
@@ -595,23 +699,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 +844,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 +869,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) | |||
}) | |||
}) | |||
@@ -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> | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -211,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> | |||
@@ -234,9 +235,10 @@ | |||
addCash, attachmentList, | |||
commonAttach, | |||
listTaccount, | |||
listVaccount | |||
listVaccount, systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request'; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalModify3", | |||
data() { | |||
@@ -249,8 +251,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -294,6 +296,7 @@ | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
@@ -490,10 +493,13 @@ | |||
this.chargeItme[index].showbankType = false; | |||
}, | |||
onConfirmPayer(data){ | |||
console.log(data) | |||
this.form.payer = data.text; | |||
this.form.cashierId = data.value; | |||
this.form.payerAccount = data.payeeAccount | |||
this.showpayer = false; | |||
this.selectChange(data.value) | |||
//this.selectChange(data.value); | |||
this.accountTypeChange(); | |||
}, | |||
onConfirmLasj(data){ | |||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
@@ -505,7 +511,8 @@ | |||
let params = { | |||
villageAccountType : 1, | |||
status:'0', | |||
accountType : this.form.accountType | |||
accountType : this.form.accountType, | |||
taccountId:this.form.cashierId | |||
} | |||
listVaccount(params).then(response => { | |||
console.log(response) | |||
@@ -551,32 +558,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); | |||
addCash(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.$set(this.projectForm, "ynType", '3'); | |||
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)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
} | |||
}); | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
@@ -601,23 +706,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) { | |||
@@ -719,17 +851,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= { | |||
@@ -742,9 +876,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) | |||
}) | |||
}) | |||
@@ -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> | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -221,7 +222,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,8 +241,13 @@ | |||
<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 { | |||
attachmentList, | |||
commonAttach, | |||
systemAttachment | |||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
import request from '@/utils/request'; | |||
import Dialog from "vant/lib/dialog"; | |||
export default { | |||
name: "approvalModify4", | |||
data() { | |||
@@ -254,8 +260,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -299,6 +305,7 @@ | |||
}, | |||
projectFundType:'', | |||
fileList:[], | |||
uploadFiles:[], | |||
}; | |||
}, | |||
created() { | |||
@@ -472,21 +479,23 @@ | |||
this.showproject = false; | |||
}, | |||
onConfirmPayee(data,index){ | |||
console.log(data) | |||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
for (let i = 0 ; i < this.chargeItme.length ; i++){ | |||
this.chargeItme[i].showPayee = false; | |||
} | |||
this.chargeItme[index].payee = data.text; | |||
this.chargeItme[index].payeeId = data.value; | |||
this.chargeItme[index].showpayee = false; | |||
this.payeeSelectChange(data.value , index) | |||
this.onConfirmBankType(data,index) | |||
}, | |||
onConfirmBankType(data,index){ | |||
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,6 +509,7 @@ | |||
}, | |||
accountTypeChange(e){ | |||
this.payeeList = []; | |||
this.chargeItme = []; | |||
this.queryParams.accountType = this.form.accountType | |||
this.queryParams.status = "0" | |||
listPayee(this.queryParams).then((response) => { | |||
@@ -543,34 +553,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)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
}) | |||
.then(() => { | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
}) | |||
} | |||
}); | |||
.catch(() => { | |||
return false; | |||
}); | |||
}else{ | |||
this.$set(this.form, "payeeList", this.chargeItme); | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
this.uploadFiles.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
}) | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
if(this.chargeItme.length<1){ | |||
@@ -595,23 +701,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) { | |||
@@ -664,66 +797,30 @@ | |||
//model就是上面的数据源 | |||
return account.id === select; //筛选出匹配数据 | |||
}); | |||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
obj.accountPassword != null && obj.accountPassword != ""){ | |||
this.$set(this.form, "bookId", obj.bookId); | |||
this.$set(this.form, "deptId", obj.deptId); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
this.$set(this.form, "payerFrom", '1'); | |||
}else{ | |||
if(obj.payerFrom==1){ | |||
this.diglogStatus = false; | |||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
this.$set(this.form,"payer","") | |||
this.$set(this.form,"payerAccount","") | |||
}else{ | |||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||
}else{ | |||
this.$set(this.form, "operatorCode", ''); | |||
} | |||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
}else{ | |||
this.$set(this.form, "enterpriseCode", ''); | |||
} | |||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||
}else{ | |||
this.$set(this.form, "accountPassword", ''); | |||
} | |||
this.$set(this.form, "bookId",''); | |||
this.$set(this.form, "deptId", ''); | |||
this.$set(this.form, "cashierId", obj.id); | |||
this.$set(this.form, "payer", obj.accountName); | |||
if(obj.payerFrom==6){ | |||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
this.$set(this.form, "payerAccount", response.data); | |||
}); | |||
}else { | |||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
} | |||
} | |||
} | |||
console.log(obj) | |||
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.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'); | |||
}, | |||
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 +833,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) | |||
}) | |||
}) | |||
@@ -33,6 +33,7 @@ | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmLasj" | |||
@cancel="showlasj = false" | |||
/> | |||
</van-popup> | |||
<van-field | |||
@@ -251,8 +252,8 @@ | |||
showFundType:false, | |||
showpayer:false, | |||
minDate: new Date(), | |||
maxDate: new Date(2025, 10, 1), | |||
minDate: new Date(2000, 1, 1), | |||
maxDate: new Date(2050, 12, 31), | |||
currentDate: new Date(), | |||
form:{}, | |||
@@ -552,7 +553,7 @@ | |||
return; | |||
} | |||
} | |||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -578,7 +579,7 @@ | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -586,7 +587,7 @@ | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -596,7 +597,7 @@ | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -604,7 +605,7 @@ | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -623,12 +624,12 @@ | |||
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.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", response.data.id); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "0"); | |||
@@ -638,7 +639,7 @@ | |||
}) | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -646,7 +647,7 @@ | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -656,7 +657,7 @@ | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -664,7 +665,7 @@ | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -62,8 +62,9 @@ | |||
<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;"> | |||
<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> | |||
@@ -71,7 +72,7 @@ | |||
</van-row> | |||
<van-row> | |||
<van-col span="24" style="padding: 0;"> | |||
<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> | |||
@@ -62,8 +62,9 @@ | |||
<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;"> | |||
<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> | |||
@@ -71,7 +72,7 @@ | |||
</van-row> | |||
<van-row> | |||
<van-col span="24" style="padding: 0;"> | |||
<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> | |||
@@ -3,7 +3,7 @@ | |||
<van-nav-bar | |||
title="我的事项" | |||
left-arrow | |||
@click-left="$router.back(-1)" | |||
@click-left="goOnlineHomeIndex" | |||
/> | |||
<van-tabs v-model="activeName" title-active-color="#1D6FE9" color="#1D6FE9" line-width="20px" swipeable @click="getList"> | |||
<van-tab title="待办" name="1" > | |||
@@ -58,7 +58,7 @@ | |||
data(){ | |||
return{ | |||
taskList:[], | |||
activeName:'1', | |||
activeName:this.$route.query.activeName?this.$route.query.activeName:'1', | |||
total:0, | |||
queryParams: { | |||
pageNum: 1, | |||
@@ -70,16 +70,23 @@ | |||
created() { | |||
this.getDicts("activity_business_type").then((response) => { | |||
this.activityBusinessTypeOptions = response.data; | |||
if(this.$route.query.activeName){ | |||
this.activeName = this.$route.query.activeName | |||
} | |||
this.getList(); | |||
}); | |||
}, | |||
methods: { | |||
goOnlineHomeIndex(){ | |||
this.$router.push({name:'onlineHomeWorkbench'}) | |||
}, | |||
getList() { | |||
this.taskList = [] | |||
this.$set(this.queryParams, "systemType", ''); | |||
this.$set(this.queryParams, "systemType", '4'); | |||
if(this.activeName=='1'){ | |||
ListTodo(this.queryParams).then((response) => { | |||
console.log(response) | |||
response.rows.map(res => { | |||
if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||
res.tableName = '来自农村宅基地管理系统' | |||
@@ -100,6 +107,7 @@ | |||
}) | |||
}else{ | |||
ListDone(this.queryParams).then((response) => { | |||
console.log(response) | |||
response.rows.map(res => { | |||
if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||
res.tableName = '来自农村宅基地管理系统' | |||
@@ -122,7 +130,7 @@ | |||
}, | |||
goDetail(item){ | |||
console.log(item) | |||
var type = item.formData.processKey; | |||
let type = item.formData.processKey; | |||
switch (type) { | |||
case 'baseApply': | |||
case 'landscope': | |||
@@ -132,6 +140,19 @@ | |||
case 'yinnong_transfer': | |||
this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
case 'yinnong_cash': | |||
if(item.formData.cashType == '10'){ | |||
this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.cashType == '11'){ | |||
this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
if(item.formData.cashType == '12'){ | |||
this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
break; | |||
} | |||
} | |||
} | |||
}, | |||