| @@ -31,6 +31,21 @@ export function queryTransferDetail(transferId){ | |||||
| }) | }) | ||||
| } | } | ||||
| // 查询银行转账详细 | |||||
| export function getCash(id) { | |||||
| return request({ | |||||
| url: '/yinnong/cash/get/' + id, | |||||
| method: 'get' | |||||
| }) | |||||
| } | |||||
| // 查询其他申请详情列表 | |||||
| export function listCashdetailByCashId(id) { | |||||
| return request({ | |||||
| url: '/yinnong/cashdetail/listCashdetailByCashId/'+id, | |||||
| method: 'get' | |||||
| }) | |||||
| } | |||||
| export function listPayee(query) { | export function listPayee(query) { | ||||
| return request({ | return request({ | ||||
| url: '/yinnong/payee/selectlist', | url: '/yinnong/payee/selectlist', | ||||
| @@ -48,6 +63,15 @@ export function updateTransfer(data) { | |||||
| }) | }) | ||||
| } | } | ||||
| // 修改现金提现申请 | |||||
| export function updateCash(data) { | |||||
| return request({ | |||||
| url: '/yinnong/cash/edit', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 查询工程项目关联关系详细 | // 查询工程项目关联关系详细 | ||||
| export function getProjectto(query) { | export function getProjectto(query) { | ||||
| return request({ | return request({ | ||||
| @@ -83,6 +107,20 @@ export function customSubmit(id) { | |||||
| }) | }) | ||||
| } | } | ||||
| // 现金提交审批 | |||||
| export function cashSubmit(id) { | |||||
| return request({ | |||||
| url: '/yinnong/cash/customSubmit/' + id, | |||||
| method: 'post' | |||||
| }) | |||||
| } | |||||
| // 删除现金提现申请 | |||||
| export function delCash(id) { | |||||
| return request({ | |||||
| url: '/yinnong/cash/remove/' + id, | |||||
| method: 'get' | |||||
| }) | |||||
| } | |||||
| // 新增银行转账 | // 新增银行转账 | ||||
| export function addTransfer(data) { | export function addTransfer(data) { | ||||
| return request({ | return request({ | ||||
| @@ -92,6 +130,24 @@ export function addTransfer(data) { | |||||
| }) | }) | ||||
| } | } | ||||
| // 新增现金提现申请 | |||||
| export function addCash(data) { | |||||
| return request({ | |||||
| url: '/yinnong/cash/add', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 新增其他申请详情 | |||||
| export function addCashdetail(data) { | |||||
| return request({ | |||||
| url: '/yinnong/cashdetail/add', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 查询转账账户详情详细 | // 查询转账账户详情详细 | ||||
| export function getTransferProcess(id) { | export function getTransferProcess(id) { | ||||
| return request({ | return request({ | ||||
| @@ -148,3 +204,48 @@ export function delTransfer(id) { | |||||
| method: 'get' | method: 'get' | ||||
| }) | }) | ||||
| } | } | ||||
| // 查询村级账户列表 | |||||
| export function listVaccount(query) { | |||||
| return request({ | |||||
| url: '/yinnong/vaccount/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| // 查询乡镇账户列表 | |||||
| export function listTaccount(query) { | |||||
| return request({ | |||||
| url: '/yinnong/taccount/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| // 查询银行汇票列表 | |||||
| export function listMoneyorder(query) { | |||||
| return request({ | |||||
| url: '/yinnong/moneyorder/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| //上传全局方法附件 | |||||
| export function commonAttach(data) { | |||||
| return request({ | |||||
| url: '/common/attach', | |||||
| method: 'post', | |||||
| header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| //查询已上传附件 | |||||
| export const attachmentList = (data) => { | |||||
| return request({ | |||||
| url: '/system/attachment/query', | |||||
| method: 'get', | |||||
| params: data | |||||
| }) | |||||
| } | |||||
| @@ -1024,7 +1024,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/homestead/homeApproval/approvalForm'], resolve) | component: (resolve) => require(['@/views/onlineHome/homestead/homeApproval/approvalForm'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList', | |||||
| path: '/onlineHome/approvalList', | |||||
| name: 'approvalList', | name: 'approvalList', | ||||
| meta: { | meta: { | ||||
| title: '银农支付付款申请', | title: '银农支付付款申请', | ||||
| @@ -1033,7 +1033,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList2', | |||||
| path: '/onlineHome/approvalList2', | |||||
| name: 'approvalList2', | name: 'approvalList2', | ||||
| meta: { | meta: { | ||||
| title: '信用卡转账', | title: '信用卡转账', | ||||
| @@ -1042,7 +1042,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList2'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList2'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList3', | |||||
| path: '/onlineHome/approvalList3', | |||||
| name: 'approvalList3', | name: 'approvalList3', | ||||
| meta: { | meta: { | ||||
| title: '虚拟挂账', | title: '虚拟挂账', | ||||
| @@ -1051,7 +1051,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList3'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList3'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList4', | |||||
| path: '/onlineHome/approvalList4', | |||||
| name: 'approvalList4', | name: 'approvalList4', | ||||
| meta: { | meta: { | ||||
| title: '虚拟转账', | title: '虚拟转账', | ||||
| @@ -1060,7 +1060,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList4'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList4'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList5', | |||||
| path: '/onlineHome/approvalList5', | |||||
| name: 'approvalList5', | name: 'approvalList5', | ||||
| meta: { | meta: { | ||||
| title: '母子转张', | title: '母子转张', | ||||
| @@ -1069,7 +1069,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList5'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList5'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList10', | |||||
| path: '/onlineHome/approvalList10', | |||||
| name: 'approvalList10', | name: 'approvalList10', | ||||
| meta: { | meta: { | ||||
| title: '资金提现', | title: '资金提现', | ||||
| @@ -1078,7 +1078,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList10'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList10'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList11', | |||||
| path: '/onlineHome/approvalList11', | |||||
| name: 'approvalList11', | name: 'approvalList11', | ||||
| meta: { | meta: { | ||||
| title: '资金使用', | title: '资金使用', | ||||
| @@ -1087,7 +1087,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList11'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList11'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalList12', | |||||
| path: '/onlineHome/approvalList12', | |||||
| name: 'approvalList12', | name: 'approvalList12', | ||||
| meta: { | meta: { | ||||
| title: '汇票支出', | title: '汇票支出', | ||||
| @@ -1096,7 +1096,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList12'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList12'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalDetail', | |||||
| path: '/onlineHome/approvalDetail', | |||||
| name: 'approvalDetail', | name: 'approvalDetail', | ||||
| meta: { | meta: { | ||||
| title: '银农支付付款申请', | title: '银农支付付款申请', | ||||
| @@ -1105,7 +1105,70 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd', | |||||
| path: '/onlineHome/approvalDetail2', | |||||
| name: 'approvalDetail2', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail2'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalDetail3', | |||||
| name: 'approvalDetail3', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail3'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalDetail4', | |||||
| name: 'approvalDetail4', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail4'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalDetail5', | |||||
| name: 'approvalDetail5', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail5'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalDetail10', | |||||
| name: 'approvalDetail10', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail10'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalDetail11', | |||||
| name: 'approvalDetail11', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail11'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalDetail12', | |||||
| name: 'approvalDetail12', | |||||
| meta: { | |||||
| title: '银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalDetail12'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalAdd', | |||||
| name: 'approvalAdd', | name: 'approvalAdd', | ||||
| meta: { | meta: { | ||||
| title: '添加常用转账付款申请', | title: '添加常用转账付款申请', | ||||
| @@ -1114,7 +1177,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd2', | |||||
| path: '/onlineHome/approvalAdd2', | |||||
| name: 'approvalAdd2', | name: 'approvalAdd2', | ||||
| meta: { | meta: { | ||||
| title: '添加信用卡转账付款申请', | title: '添加信用卡转账付款申请', | ||||
| @@ -1123,7 +1186,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd2'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd2'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd3', | |||||
| path: '/onlineHome/approvalAdd3', | |||||
| name: 'approvalAdd3', | name: 'approvalAdd3', | ||||
| meta: { | meta: { | ||||
| title: '添加虚拟挂账付款申请', | title: '添加虚拟挂账付款申请', | ||||
| @@ -1132,7 +1195,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd3'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd3'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd4', | |||||
| path: '/onlineHome/approvalAdd4', | |||||
| name: 'approvalAdd4', | name: 'approvalAdd4', | ||||
| meta: { | meta: { | ||||
| title: '添加虚拟转账付款申请', | title: '添加虚拟转账付款申请', | ||||
| @@ -1141,7 +1204,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd4'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd4'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd5', | |||||
| path: '/onlineHome/approvalAdd5', | |||||
| name: 'approvalAdd5', | name: 'approvalAdd5', | ||||
| meta: { | meta: { | ||||
| title: '添加母子转账付款申请', | title: '添加母子转账付款申请', | ||||
| @@ -1150,7 +1213,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd5'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd5'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd10', | |||||
| path: '/onlineHome/approvalAdd10', | |||||
| name: 'approvalAdd10', | name: 'approvalAdd10', | ||||
| meta: { | meta: { | ||||
| title: '添加资金提现付款申请', | title: '添加资金提现付款申请', | ||||
| @@ -1159,7 +1222,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd11', | |||||
| path: '/onlineHome/approvalAdd11', | |||||
| name: 'approvalAdd11', | name: 'approvalAdd11', | ||||
| meta: { | meta: { | ||||
| title: '添加资金使用付款申请', | title: '添加资金使用付款申请', | ||||
| @@ -1168,7 +1231,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalAdd12', | |||||
| path: '/onlineHome/approvalAdd12', | |||||
| name: 'approvalAdd12', | name: 'approvalAdd12', | ||||
| meta: { | meta: { | ||||
| title: '添加汇票支出付款申请', | title: '添加汇票支出付款申请', | ||||
| @@ -1177,7 +1240,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd12'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd12'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalApproval', | |||||
| path: '/onlineHome/approvalApproval', | |||||
| name: 'approvalApproval', | name: 'approvalApproval', | ||||
| meta: { | meta: { | ||||
| title: '付款审批', | title: '付款审批', | ||||
| @@ -1186,7 +1249,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalModify', | |||||
| path: '/onlineHome/approvalModify', | |||||
| name: 'approvalModify', | name: 'approvalModify', | ||||
| meta: { | meta: { | ||||
| title: '修改银农支付付款申请', | title: '修改银农支付付款申请', | ||||
| @@ -1195,7 +1258,70 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/approvalProcess', | |||||
| path: '/onlineHome/approvalModify2', | |||||
| name: 'approvalModify2', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify2'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalModify3', | |||||
| name: 'approvalModify3', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify3'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalModify4', | |||||
| name: 'approvalModify4', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify4'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalModify5', | |||||
| name: 'approvalModify5', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify5'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalModify10', | |||||
| name: 'approvalModify10', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify10'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalModify11', | |||||
| name: 'approvalModify11', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify11'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalModify12', | |||||
| name: 'approvalModify12', | |||||
| meta: { | |||||
| title: '修改银农支付付款申请', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify12'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/onlineHome/approvalProcess', | |||||
| name: 'approvalProcess', | name: 'approvalProcess', | ||||
| meta: { | meta: { | ||||
| title: '付款申请流程', | title: '付款申请流程', | ||||
| @@ -1204,7 +1330,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/collectionList', | |||||
| path: '/onlineHome/collectionList', | |||||
| name: 'collectionList', | name: 'collectionList', | ||||
| meta: { | meta: { | ||||
| title: '银农支付收款账户', | title: '银农支付收款账户', | ||||
| @@ -1213,7 +1339,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionList'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionList'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/collectionAdd', | |||||
| path: '/onlineHome/collectionAdd', | |||||
| name: 'collectionAdd', | name: 'collectionAdd', | ||||
| meta: { | meta: { | ||||
| title: '添加支付收款账户', | title: '添加支付收款账户', | ||||
| @@ -1222,7 +1348,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionAdd'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionAdd'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/collectionModify', | |||||
| path: '/onlineHome/collectionModify', | |||||
| name: 'collectionModify', | name: 'collectionModify', | ||||
| meta: { | meta: { | ||||
| title: '修改支付收款账户', | title: '修改支付收款账户', | ||||
| @@ -1231,7 +1357,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionModify'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionModify'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/collectionDetail', | |||||
| path: '/onlineHome/collectionDetail', | |||||
| name: 'collectionDetail', | name: 'collectionDetail', | ||||
| meta: { | meta: { | ||||
| title: '查看支付收款账户', | title: '查看支付收款账户', | ||||
| @@ -1240,7 +1366,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionDetail'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionDetail'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/paymentAccountList', | |||||
| path: '/onlineHome/paymentAccountList', | |||||
| name: 'paymentAccountList', | name: 'paymentAccountList', | ||||
| meta: { | meta: { | ||||
| title: '查看支付收款账户', | title: '查看支付收款账户', | ||||
| @@ -1249,7 +1375,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountList'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountList'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/paymentAccountAdd', | |||||
| path: '/onlineHome/paymentAccountAdd', | |||||
| name: 'paymentAccountAdd', | name: 'paymentAccountAdd', | ||||
| meta: { | meta: { | ||||
| title: '添加出纳账户设置', | title: '添加出纳账户设置', | ||||
| @@ -1258,7 +1384,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/paymentAccountModify', | |||||
| path: '/onlineHome/paymentAccountModify', | |||||
| name: 'paymentAccountModify', | name: 'paymentAccountModify', | ||||
| meta: { | meta: { | ||||
| title: '修改出纳账户设置', | title: '修改出纳账户设置', | ||||
| @@ -1267,7 +1393,7 @@ export const constantRoutes = [ | |||||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountModify'], resolve) | component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountModify'], resolve) | ||||
| }, | }, | ||||
| { | { | ||||
| path: '/paymentAccountDetail', | |||||
| path: '/onlineHome/paymentAccountDetail', | |||||
| name: 'paymentAccountDetail', | name: 'paymentAccountDetail', | ||||
| meta: { | meta: { | ||||
| title: '付款账户详情', | title: '付款账户详情', | ||||
| @@ -24,7 +24,7 @@ | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | ||||
| <van-cell center :to="{name:'collectionDetail', query: {id:item.id}}"> | <van-cell center :to="{name:'collectionDetail', query: {id:item.id}}"> | ||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList5.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p>{{item.payeeAccount}}</p> | <p>{{item.payeeAccount}}</p> | ||||
| @@ -24,7 +24,7 @@ | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | ||||
| <van-cell :title="item.accountType" center :to="{name:'paymentAccountDetail', query: {id:item.id,type:'modify'}}"> | <van-cell :title="item.accountType" center :to="{name:'paymentAccountDetail', query: {id:item.id,type:'modify'}}"> | ||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList2.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.balance}}</span></p> | <p><span><i>¥</i>{{item.balance}}</span></p> | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加常用转账申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -196,7 +196,7 @@ | |||||
| </van-popup> | </van-popup> | ||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | ||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | ||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| clickable | clickable | ||||
| @@ -219,11 +219,10 @@ | |||||
| </van-popup> | </van-popup> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <!-- <p class="main_title">上传附件</p>--> | |||||
| <!-- <div class="main_box" style="padding: 10px 0 0 10px">--> | |||||
| <!-- <van-uploader v-model="fileList" :after-read="beforeRead"></van-uploader>--> | |||||
| <!-- <van-button type="button">上传</van-button>--> | |||||
| <!-- </div>--> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -243,6 +242,9 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow , attach} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow , attach} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import Dialog from "vant/lib/dialog"; | |||||
| export default { | export default { | ||||
| name: "approvalAdd", | name: "approvalAdd", | ||||
| data() { | data() { | ||||
| @@ -300,15 +302,7 @@ | |||||
| ynType:'1' | ynType:'1' | ||||
| }, | }, | ||||
| projectFundType:'', | projectFundType:'', | ||||
| //上传附件 | |||||
| uploadAttachmentData: { | |||||
| rows: {}, | |||||
| visible: false, | |||||
| //业务表名 | |||||
| tableName: "t_yinnong_transfer", | |||||
| //存放目录 默认系统模块 | |||||
| bizPath: "upload", | |||||
| }, | |||||
| uploadFiles:[], | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -345,11 +339,6 @@ | |||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| // 返回布尔值 | |||||
| beforeRead(file) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| }, | |||||
| // 表单重置 | // 表单重置 | ||||
| reset() { | reset() { | ||||
| this.form = { | this.form = { | ||||
| @@ -388,28 +377,12 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| getChange(){ | getChange(){ | ||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | if(this.buttonType == 'update'){ | ||||
| console.log('update') | |||||
| this.goUpdate(); | this.goUpdate(); | ||||
| }else if(this.buttonType == 'add'){ | }else if(this.buttonType == 'add'){ | ||||
| console.log('add') | |||||
| this.goAdd(); | this.goAdd(); | ||||
| } | } | ||||
| }, | }, | ||||
| //更新文件回显 | |||||
| afterRead(file) { | |||||
| this.$forceUpdate(); | |||||
| }, | |||||
| //删除图片 | |||||
| deleteFile(elIndex){ | |||||
| this.$forceUpdate(); | |||||
| return (file, name) => { | |||||
| let fileIndex = name.index | |||||
| this.fileList[elIndex].splice(fileIndex, 1) | |||||
| this.upLoadList[elIndex].splice(fileIndex, 1) | |||||
| } | |||||
| }, | |||||
| getDictionaries(){ | getDictionaries(){ | ||||
| this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
| for (var i = 0; i < res.data.length; i++) { | for (var i = 0; i < res.data.length; i++) { | ||||
| @@ -465,8 +438,10 @@ | |||||
| listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
| this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| if(res.payeeType==1||res.payeeType==2){ | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| } | |||||
| }) | }) | ||||
| }); | }); | ||||
| }, | }, | ||||
| @@ -580,31 +555,130 @@ | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
| Dialog.confirm({ | |||||
| title: '提示', | |||||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||||
| }) | |||||
| .then(() => { | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||||
| this.uploadFiles.map(rr => { | |||||
| const params = new FormData(); | |||||
| params.append("tableId", response.data.id); | |||||
| params.append("tableName", "t_yinnong_transfer"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", rr); | |||||
| commonAttach(params).then((r) => { | |||||
| }) | |||||
| }) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| }) | }) | ||||
| } | |||||
| }); | |||||
| .catch(() => { | |||||
| return false; | |||||
| }); | |||||
| }else{ | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||||
| this.uploadFiles.map(rr => { | |||||
| const params = new FormData(); | |||||
| params.append("tableId", response.data.id); | |||||
| params.append("tableName", "t_yinnong_transfer"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", rr); | |||||
| commonAttach(params).then((r) => { | |||||
| }) | |||||
| }) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| } | |||||
| }, | }, | ||||
| goUpdate(){ | goUpdate(){ | ||||
| if(this.chargeItme.length<1){ | if(this.chargeItme.length<1){ | ||||
| @@ -629,23 +703,51 @@ | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
| this.projectForm.outId = this.form.id | |||||
| console.log(this.form) | |||||
| addTransfer(this.form).then((response) => { | addTransfer(this.form).then((response) => { | ||||
| this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
| this.$set(this.projectForm, "ynType", '1'); | 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('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| },2000) | },2000) | ||||
| }) | |||||
| } | |||||
| }else{ | }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) { | payeeSelectChange(select, i) { | ||||
| @@ -746,17 +848,39 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| beforeRead(file) { | |||||
| this.uploadFiles.push(file.file); | |||||
| }, | |||||
| deleteFile(file){ | |||||
| this.uploadFiles.map((response,index) => { | |||||
| if(file.file == response){ | |||||
| this.uploadFiles.splice(index,1) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| deleteChargeItme(index){ | deleteChargeItme(index){ | ||||
| this.chargeItme.splice(index,1) | this.chargeItme.splice(index,1) | ||||
| }, | }, | ||||
| goUpload(){ | |||||
| attach(this.uploadAttachmentData).then((response) => { | |||||
| console.log(response) | |||||
| }); | |||||
| } | |||||
| }, | }, | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加资金提现申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -59,7 +59,7 @@ | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| required | required | ||||
| label="支出总金额" | |||||
| label="提现总金额" | |||||
| v-model="form.expenditureAmount" | v-model="form.expenditureAmount" | ||||
| placeholder="根据下方收款金额自动核算" | placeholder="根据下方收款金额自动核算" | ||||
| input-align="right" | input-align="right" | ||||
| @@ -174,51 +174,16 @@ | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | ||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" label="提款人" placeholder="请输入提款人" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入提款金额' }]" v-model="item.incomeAmount" type="number" label="提款金额(元)" placeholder="请输入提款金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | |||||
| </div> | </div> | ||||
| </div> | </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> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -238,6 +203,13 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import { | |||||
| addCash, | |||||
| addCashdetail, attachmentList, | |||||
| commonAttach, | |||||
| updateCash | |||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalAdd10", | name: "approvalAdd10", | ||||
| data() { | data() { | ||||
| @@ -256,7 +228,7 @@ | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -291,7 +263,7 @@ | |||||
| projectBillNum:null, | projectBillNum:null, | ||||
| projectFundType:'1', | projectFundType:'1', | ||||
| outId:null, | outId:null, | ||||
| ynType:'1' | |||||
| ynType:'2' | |||||
| }, | }, | ||||
| projectFundType:'' | projectFundType:'' | ||||
| }; | }; | ||||
| @@ -328,6 +300,7 @@ | |||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| // 表单重置 | // 表单重置 | ||||
| @@ -338,7 +311,7 @@ | |||||
| downId: null, | downId: null, | ||||
| orderId: null, | orderId: null, | ||||
| cashierId: null, | cashierId: null, | ||||
| transferType: '1', | |||||
| cashType: '10', | |||||
| accountType: '2', | accountType: '2', | ||||
| explainSituation: null, | explainSituation: null, | ||||
| succeedAmount: null, | succeedAmount: null, | ||||
| @@ -368,30 +341,21 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| getChange(){ | getChange(){ | ||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | if(this.buttonType == 'update'){ | ||||
| console.log('update') | |||||
| this.goUpdate(); | this.goUpdate(); | ||||
| }else if(this.buttonType == 'add'){ | }else if(this.buttonType == 'add'){ | ||||
| console.log('add') | |||||
| this.goAdd(); | this.goAdd(); | ||||
| } | } | ||||
| }, | }, | ||||
| getDictionaries(){ | getDictionaries(){ | ||||
| this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| for (let i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | ||||
| } | } | ||||
| }); | }); | ||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| }); | |||||
| this.getPayeeList(); | this.getPayeeList(); | ||||
| }, | }, | ||||
| getError(e){ | getError(e){ | ||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | this.$notify({ type: 'danger', message: e.errors[0].message }); | ||||
| }, | }, | ||||
| addChargeItme(index){ | addChargeItme(index){ | ||||
| @@ -399,27 +363,23 @@ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | ||||
| return; | return; | ||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | ||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| this.$notify({ type: 'danger', message: '请输入提款金额!' }); | |||||
| return; | return; | ||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].drawer == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入提款人!' }); | |||||
| return; | return; | ||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].remark == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入资金用途!' }); | |||||
| return; | return; | ||||
| } | } | ||||
| this.getDicts("bank_type").then(res => { | this.getDicts("bank_type").then(res => { | ||||
| this.chargeItme.splice(index + 1, 0, { | this.chargeItme.splice(index + 1, 0, { | ||||
| payeeId: "", //收款方ID | payeeId: "", //收款方ID | ||||
| payee: "", //收款方 | |||||
| payee: "", //收款方全称 | |||||
| payeeAccount: "", //收款账户 | payeeAccount: "", //收款账户 | ||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| drawer: "", //提款人 | |||||
| incomeAmount: "", //提款金额 | |||||
| bankType: "", //资金用途 | |||||
| showPayee:false, | showPayee:false, | ||||
| showbankType:false | showbankType:false | ||||
| }); | }); | ||||
| @@ -438,7 +398,7 @@ | |||||
| }); | }); | ||||
| }, | }, | ||||
| payeeDictLabel(datas, value) { | payeeDictLabel(datas, value) { | ||||
| var actions = []; | |||||
| let actions = []; | |||||
| Object.keys(datas).some((key) => { | Object.keys(datas).some((key) => { | ||||
| if (datas[key].payeeId == ('' + value)) { | if (datas[key].payeeId == ('' + value)) { | ||||
| actions.push(datas[key].payee); | actions.push(datas[key].payee); | ||||
| @@ -551,7 +511,7 @@ | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
| addTransfer(this.form).then(response => { | |||||
| addCash(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
| this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
| if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
| @@ -592,27 +552,28 @@ | |||||
| return; | 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 | this.projectForm.outId = this.form.id | ||||
| addTransfer(this.form).then((response) => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| this.$toast.success('保存成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| 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) | |||||
| } | |||||
| }) | |||||
| }); | }); | ||||
| }, | }, | ||||
| payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
| @@ -713,6 +674,37 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| beforeRead(file) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加资金使用申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -59,7 +59,7 @@ | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| required | required | ||||
| label="支出总金额" | |||||
| label="使用总金额" | |||||
| v-model="form.expenditureAmount" | v-model="form.expenditureAmount" | ||||
| placeholder="根据下方收款金额自动核算" | placeholder="根据下方收款金额自动核算" | ||||
| input-align="right" | input-align="right" | ||||
| @@ -157,7 +157,7 @@ | |||||
| @cancel="showpayer = false" | @cancel="showpayer = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="可用余额(元)" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | </div> | ||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | ||||
| @@ -174,59 +174,22 @@ | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | ||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field label="收款方" placeholder="请选择" v-model="item.payee" input-align="right" required :rules="[{ required: true , message:'请选择收款方' }]" /> | |||||
| <van-field required :rules="[{ required: true , message:'联系方式不能为空' }]" v-model="item.phone" label="联系方式" placeholder="请输入联系方式" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'申请使用金额不能为空' }]" v-model="item.incomeAmount" label="申请使用金额(元)" placeholder="请输入申请使用金额" type="number" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| <!-- @click="goUpdate"--> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | ||||
| </van-col> | </van-col> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| <!-- @click="goAdd"--> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | ||||
| </van-col> | </van-col> | ||||
| </van-row> | </van-row> | ||||
| @@ -238,6 +201,8 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalAdd11", | name: "approvalAdd11", | ||||
| data() { | data() { | ||||
| @@ -256,7 +221,7 @@ | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -328,6 +293,7 @@ | |||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| // 表单重置 | // 表单重置 | ||||
| @@ -713,6 +679,37 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加汇票支出申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -56,15 +56,7 @@ | |||||
| @cancel="showcapital = false" | @cancel="showcapital = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | </div> | ||||
| @@ -133,21 +125,21 @@ | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | ||||
| </div> | </div> | ||||
| <p class="main_title">付款方信息</p> | |||||
| <p class="main_title">出票方信息</p> | |||||
| <div class="main_box"> | <div class="main_box"> | ||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | ||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| clickable | clickable | ||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| label="出票方" | |||||
| placeholder="请选择出票方" | |||||
| v-model="form.payer" | v-model="form.payer" | ||||
| @click="showpayer = true" | @click="showpayer = true" | ||||
| input-align="right" | input-align="right" | ||||
| right-icon="arrow-down" | right-icon="arrow-down" | ||||
| label-width="auto" | label-width="auto" | ||||
| required | required | ||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| :rules="[{ required: true , message:'请选择出票方' }]" | |||||
| /> | /> | ||||
| <van-popup v-model="showpayer" position="bottom"> | <van-popup v-model="showpayer" position="bottom"> | ||||
| <van-picker | <van-picker | ||||
| @@ -157,68 +149,76 @@ | |||||
| @cancel="showpayer = false" | @cancel="showpayer = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <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:'汇票类型不能为空!' }]" | |||||
| /> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| <van-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> | </div> | ||||
| <p class="main_title">收票方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | ||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'收款方不能为空' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'联系方式不能为空' }]" v-model="item.phone" label="联系方式" placeholder="请输入联系方式" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'所属单位补鞥你为空' }]" v-model="item.unit" label="所属单位" placeholder="请输入所属单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'负责人全称不能为空' }]" v-model="item.leader" label="负责人全称" placeholder="请输入负责人全称" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -238,6 +238,13 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import { | |||||
| addCash, | |||||
| addCashdetail, attachmentList, commonAttach, | |||||
| listMoneyorder, | |||||
| updateCash | |||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalAdd12", | name: "approvalAdd12", | ||||
| data() { | data() { | ||||
| @@ -252,11 +259,11 @@ | |||||
| buttonType:'a', | buttonType:'a', | ||||
| minDate: new Date(), | |||||
| minDate: new Date(2000, 10, 1), | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -293,7 +300,9 @@ | |||||
| outId:null, | outId:null, | ||||
| ynType:'1' | ynType:'1' | ||||
| }, | }, | ||||
| projectFundType:'' | |||||
| projectFundType:'', | |||||
| orderTypeName:'', | |||||
| orderTypeOptions:[] | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -314,20 +323,25 @@ | |||||
| } | } | ||||
| this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
| }); | }); | ||||
| this.getDicts("order_type").then(response => { | |||||
| this.orderTypeOptions = response.data; | |||||
| }); | |||||
| let params1={ | let params1={ | ||||
| accountType: "102", | |||||
| status: "N", | |||||
| pageNum: 1, | |||||
| pageSize: 1000, | |||||
| } | } | ||||
| getAccount(params1).then((response) => { | |||||
| listMoneyorder(params1).then((response) => { | |||||
| console.log(response) | |||||
| this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| res['payerFrom'] = '1' | |||||
| res['payerFrom'] = '12' | |||||
| console.log(res) | console.log(res) | ||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].text = res.billReceiveUnit; | |||||
| this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| // 表单重置 | // 表单重置 | ||||
| @@ -338,7 +352,7 @@ | |||||
| downId: null, | downId: null, | ||||
| orderId: null, | orderId: null, | ||||
| cashierId: null, | cashierId: null, | ||||
| transferType: '1', | |||||
| cashType: '12', | |||||
| accountType: '2', | accountType: '2', | ||||
| explainSituation: null, | explainSituation: null, | ||||
| succeedAmount: null, | succeedAmount: null, | ||||
| @@ -364,7 +378,7 @@ | |||||
| projectBillNum:null, | projectBillNum:null, | ||||
| projectFundType:'1', | projectFundType:'1', | ||||
| outId:null, | outId:null, | ||||
| ynType:'1' | |||||
| ynType:'3' | |||||
| } | } | ||||
| }, | }, | ||||
| getChange(){ | getChange(){ | ||||
| @@ -379,15 +393,10 @@ | |||||
| }, | }, | ||||
| getDictionaries(){ | getDictionaries(){ | ||||
| this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| for (let i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | ||||
| } | } | ||||
| }); | }); | ||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| }); | |||||
| this.getPayeeList(); | this.getPayeeList(); | ||||
| }, | }, | ||||
| getError(e){ | getError(e){ | ||||
| @@ -398,18 +407,6 @@ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | ||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | ||||
| return; | return; | ||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | } | ||||
| this.getDicts("bank_type").then(res => { | this.getDicts("bank_type").then(res => { | ||||
| this.chargeItme.splice(index + 1, 0, { | this.chargeItme.splice(index + 1, 0, { | ||||
| @@ -418,8 +415,8 @@ | |||||
| payeeAccount: "", //收款账户 | payeeAccount: "", //收款账户 | ||||
| bankDeposit: "", //开户银行 | bankDeposit: "", //开户银行 | ||||
| incomeAmount: "", //收入金额 | incomeAmount: "", //收入金额 | ||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| bankType: "", //所属银行 | |||||
| bankTypeText:"", //所属银行 | |||||
| showPayee:false, | showPayee:false, | ||||
| showbankType:false | showbankType:false | ||||
| }); | }); | ||||
| @@ -438,7 +435,7 @@ | |||||
| }); | }); | ||||
| }, | }, | ||||
| payeeDictLabel(datas, value) { | payeeDictLabel(datas, value) { | ||||
| var actions = []; | |||||
| let actions = []; | |||||
| Object.keys(datas).some((key) => { | Object.keys(datas).some((key) => { | ||||
| if (datas[key].payeeId == ('' + value)) { | if (datas[key].payeeId == ('' + value)) { | ||||
| actions.push(datas[key].payee); | actions.push(datas[key].payee); | ||||
| @@ -492,11 +489,50 @@ | |||||
| this.chargeItme[index].bankType = data.value; | this.chargeItme[index].bankType = data.value; | ||||
| this.chargeItme[index].showbankType = false; | this.chargeItme[index].showbankType = false; | ||||
| }, | }, | ||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| onConfirmPayer(select){ | |||||
| this.showpayer = false; | this.showpayer = false; | ||||
| this.selectChange(data.value) | |||||
| console.log(this.form,select) | |||||
| if(this.form.applyDate==""||this.form.applyDate==null){ | |||||
| this.$set(this.form, "payer", "") | |||||
| this.$notify({ type: 'danger', message: "请先选择申请时间!"}); | |||||
| this.orderTypeName = '' | |||||
| }else{ | |||||
| if(this.form.applyDate>select.endTime){ | |||||
| this.$notify({ type: 'danger', message: "当前申请时间大于汇票的到期日为"+select.endTime+",无法使用!"}); | |||||
| this.$set(this.form, "payer", "") | |||||
| this.form.payerAccount = "" | |||||
| this.form.startTime = "" | |||||
| this.form.endTime = "" | |||||
| this.form.orderType = "" | |||||
| this.form.expenditureAmount = "" | |||||
| this.$set(this.form, "cashierId", "") | |||||
| this.orderTypeName = '' | |||||
| }else if(this.form.applyDate<select.startTime){ | |||||
| this.$notify({ type: 'danger', message: "当前申请时间小于汇票的开票日为"+select.startTime+",无法使用!" }); | |||||
| this.$set(this.form, "payer", "") | |||||
| this.form.payerAccount = "" | |||||
| this.form.startTime = "" | |||||
| this.form.endTime = "" | |||||
| this.form.orderType = "" | |||||
| this.form.expenditureAmount = "" | |||||
| this.$set(this.form, "cashierId", "") | |||||
| this.orderTypeName = '' | |||||
| }else{ | |||||
| this.form.payerAccount = select.orderNum | |||||
| this.form.startTime = select.startTime | |||||
| this.form.endTime = select.endTime | |||||
| this.form.orderType = select.orderType | |||||
| this.form.expenditureAmount = select.orderAmount | |||||
| this.$set(this.form, "cashierId", select.id) | |||||
| this.$set(this.form, "payer", select.billReceiveUnit) | |||||
| this.orderTypeOptions.map(res => { | |||||
| console.log(this.orderTypeOptions) | |||||
| if(res.dictValue==this.form.orderType){ | |||||
| this.orderTypeName = res.dictLabel | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | }, | ||||
| onConfirmLasj(data){ | onConfirmLasj(data){ | ||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | ||||
| @@ -551,26 +587,31 @@ | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
| this.$set(this.form, "transferStatusList", 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) | |||||
| 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 => { | |||||
| 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(){ | goUpdate(){ | ||||
| @@ -592,27 +633,27 @@ | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| this.projectForm.outId = this.form.id | |||||
| addTransfer(this.form).then((response) => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| this.$toast.success('保存成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| 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 => { | |||||
| 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) | |||||
| } | |||||
| }) | |||||
| }); | }); | ||||
| }, | }, | ||||
| payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
| @@ -713,6 +754,37 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加信用卡转账申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -194,31 +194,26 @@ | |||||
| @cancel="item.showPayee = false" | @cancel="item.showPayee = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| clickable | clickable | ||||
| label="所属银行" | label="所属银行" | ||||
| placeholder="请选择" | |||||
| placeholder="请选择收款方" | |||||
| v-model="item.bankTypeText" | v-model="item.bankTypeText" | ||||
| @click="item.showbankType = true" | @click="item.showbankType = true" | ||||
| input-align="right" | input-align="right" | ||||
| right-icon="arrow-down" | |||||
| required | required | ||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| :rules="[{ required: true , message:'所属银行不能为空' }]" | |||||
| /> | /> | ||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -238,6 +233,9 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import Dialog from "vant/lib/dialog"; | |||||
| export default { | export default { | ||||
| name: "approvalAdd2", | name: "approvalAdd2", | ||||
| data() { | data() { | ||||
| @@ -256,7 +254,7 @@ | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -293,7 +291,8 @@ | |||||
| outId:null, | outId:null, | ||||
| ynType:'1' | ynType:'1' | ||||
| }, | }, | ||||
| projectFundType:'' | |||||
| projectFundType:'', | |||||
| uploadFiles:[], | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -322,7 +321,6 @@ | |||||
| this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| res['payerFrom'] = '1' | res['payerFrom'] = '1' | ||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | this.payerOptions[index].text = res.accountName; | ||||
| this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
| }) | }) | ||||
| @@ -338,7 +336,7 @@ | |||||
| downId: null, | downId: null, | ||||
| orderId: null, | orderId: null, | ||||
| cashierId: null, | cashierId: null, | ||||
| transferType: '1', | |||||
| transferType: '2', | |||||
| accountType: '2', | accountType: '2', | ||||
| explainSituation: null, | explainSituation: null, | ||||
| succeedAmount: null, | succeedAmount: null, | ||||
| @@ -368,12 +366,9 @@ | |||||
| } | } | ||||
| }, | }, | ||||
| getChange(){ | getChange(){ | ||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | if(this.buttonType == 'update'){ | ||||
| console.log('update') | |||||
| this.goUpdate(); | this.goUpdate(); | ||||
| }else if(this.buttonType == 'add'){ | }else if(this.buttonType == 'add'){ | ||||
| console.log('add') | |||||
| this.goAdd(); | this.goAdd(); | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -391,7 +386,6 @@ | |||||
| this.getPayeeList(); | this.getPayeeList(); | ||||
| }, | }, | ||||
| getError(e){ | getError(e){ | ||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | this.$notify({ type: 'danger', message: e.errors[0].message }); | ||||
| }, | }, | ||||
| addChargeItme(index){ | addChargeItme(index){ | ||||
| @@ -418,27 +412,30 @@ | |||||
| payeeAccount: "", //收款账户 | payeeAccount: "", //收款账户 | ||||
| bankDeposit: "", //开户银行 | bankDeposit: "", //开户银行 | ||||
| incomeAmount: "", //收入金额 | incomeAmount: "", //收入金额 | ||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| bankType: "", //所属银行 | |||||
| bankTypeText:"", //所属银行 | |||||
| showPayee:false, | showPayee:false, | ||||
| showbankType:false | showbankType:false | ||||
| }); | }); | ||||
| }); | }); | ||||
| }, | }, | ||||
| getPayeeList() { | getPayeeList() { | ||||
| //普通转账 | |||||
| //信用卡转账 | |||||
| this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
| this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
| console.log(this.queryParams) | |||||
| listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| if(res.payeeType==4){ | |||||
| res.text = res.payee | |||||
| res.value = res.id | |||||
| this.payeeList.push(res) | |||||
| } | |||||
| }) | }) | ||||
| }); | }); | ||||
| }, | }, | ||||
| payeeDictLabel(datas, value) { | payeeDictLabel(datas, value) { | ||||
| var actions = []; | |||||
| let actions = []; | |||||
| Object.keys(datas).some((key) => { | Object.keys(datas).some((key) => { | ||||
| if (datas[key].payeeId == ('' + value)) { | if (datas[key].payeeId == ('' + value)) { | ||||
| actions.push(datas[key].payee); | actions.push(datas[key].payee); | ||||
| @@ -459,7 +456,6 @@ | |||||
| this.showcapital = false; | this.showcapital = false; | ||||
| }, | }, | ||||
| onConfirmFundType(data){ | onConfirmFundType(data){ | ||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | this.projectForm.projectFundType = data.value; | ||||
| this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
| this.showFundType = false; | this.showFundType = false; | ||||
| @@ -476,21 +472,24 @@ | |||||
| this.showproject = false; | this.showproject = false; | ||||
| }, | }, | ||||
| onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
| 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[i].showPayee = false; | ||||
| } | } | ||||
| this.chargeItme[index].payee = data.text; | this.chargeItme[index].payee = data.text; | ||||
| this.chargeItme[index].payeeId = data.value; | this.chargeItme[index].payeeId = data.value; | ||||
| this.chargeItme[index].showpayee = false; | this.chargeItme[index].showpayee = false; | ||||
| this.payeeSelectChange(data.value , index) | this.payeeSelectChange(data.value , index) | ||||
| this.onConfirmBankType(data,index) | |||||
| }, | }, | ||||
| 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){ | onConfirmPayer(data){ | ||||
| this.form.payer = data.text; | this.form.payer = data.text; | ||||
| @@ -504,19 +503,21 @@ | |||||
| }, | }, | ||||
| accountTypeChange(e){ | accountTypeChange(e){ | ||||
| this.payeeList = []; | this.payeeList = []; | ||||
| this.chargeItme = []; | |||||
| this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
| this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
| listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| if(res.payeeType==4){ | |||||
| res.text = res.payee | |||||
| res.value = res.id | |||||
| this.payeeList.push(res) | |||||
| } | |||||
| }) | }) | ||||
| }); | }); | ||||
| }, | }, | ||||
| // 钱计算 | // 钱计算 | ||||
| moneyChange(input) { | moneyChange(input) { | ||||
| console.log(input) | |||||
| let obj = {}; | let obj = {}; | ||||
| obj = this.chargeItme.find((account) => { | obj = this.chargeItme.find((account) => { | ||||
| //model就是上面的数据源 | //model就是上面的数据源 | ||||
| @@ -547,31 +548,130 @@ | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
| Dialog.confirm({ | |||||
| title: '提示', | |||||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||||
| }) | |||||
| .then(() => { | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||||
| this.uploadFiles.map(rr => { | |||||
| const params = new FormData(); | |||||
| params.append("tableId", response.data.id); | |||||
| params.append("tableName", "t_yinnong_transfer"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", rr); | |||||
| commonAttach(params).then((r) => { | |||||
| }) | |||||
| }) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| }) | }) | ||||
| } | |||||
| }); | |||||
| .catch(() => { | |||||
| return false; | |||||
| }); | |||||
| }else{ | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||||
| this.uploadFiles.map(rr => { | |||||
| const params = new FormData(); | |||||
| params.append("tableId", response.data.id); | |||||
| params.append("tableName", "t_yinnong_transfer"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", rr); | |||||
| commonAttach(params).then((r) => { | |||||
| }) | |||||
| }) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| } | |||||
| }, | }, | ||||
| goUpdate(){ | goUpdate(){ | ||||
| if(this.chargeItme.length<1){ | if(this.chargeItme.length<1){ | ||||
| @@ -596,28 +696,59 @@ | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
| this.projectForm.outId = this.form.id | |||||
| console.log(this.form) | |||||
| addTransfer(this.form).then((response) => { | addTransfer(this.form).then((response) => { | ||||
| this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
| this.$set(this.projectForm, "ynType", '1'); | 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('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| },2000) | },2000) | ||||
| }) | |||||
| } | |||||
| }else{ | }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) { | payeeSelectChange(select, i) { | ||||
| let obj = {}; | let obj = {}; | ||||
| let fuzhitype = 0; | let fuzhitype = 0; | ||||
| console.log(this.payeeList) | |||||
| console.log(select,i) | |||||
| console.log(this.chargeItme) | |||||
| obj = this.payeeList.find((account) => { | obj = this.payeeList.find((account) => { | ||||
| //model就是上面的数据源 | //model就是上面的数据源 | ||||
| return account.id === select ; //筛选出匹配数据 | return account.id === select ; //筛选出匹配数据 | ||||
| @@ -713,6 +844,33 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| beforeRead(file) { | |||||
| this.uploadFiles.push(file.file); | |||||
| }, | |||||
| deleteFile(file){ | |||||
| this.uploadFiles.map((response,index) => { | |||||
| if(file.file == response){ | |||||
| this.uploadFiles.splice(index,1) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加虚拟挂账申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -194,31 +194,25 @@ | |||||
| @cancel="item.showPayee = false" | @cancel="item.showPayee = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| clickable | |||||
| label="所属银行" | label="所属银行" | ||||
| placeholder="请选择" | |||||
| placeholder="请选择收款方" | |||||
| v-model="item.bankTypeText" | v-model="item.bankTypeText" | ||||
| @click="item.showbankType = true" | @click="item.showbankType = true" | ||||
| input-align="right" | input-align="right" | ||||
| right-icon="arrow-down" | |||||
| required | required | ||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | :rules="[{ required: true , message:'请选择所属银行' }]" | ||||
| /> | /> | ||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -238,6 +232,14 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import { | |||||
| attachmentList, | |||||
| commonAttach, | |||||
| listTaccount, | |||||
| listVaccount | |||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import Dialog from "vant/lib/dialog"; | |||||
| export default { | export default { | ||||
| name: "approvalAdd3", | name: "approvalAdd3", | ||||
| data() { | data() { | ||||
| @@ -256,7 +258,7 @@ | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -291,9 +293,10 @@ | |||||
| projectBillNum:null, | projectBillNum:null, | ||||
| projectFundType:'1', | projectFundType:'1', | ||||
| outId:null, | outId:null, | ||||
| ynType:'1' | |||||
| ynType:'2' | |||||
| }, | }, | ||||
| projectFundType:'' | |||||
| projectFundType:'', | |||||
| uploadFiles:[], | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -315,16 +318,17 @@ | |||||
| this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
| }); | }); | ||||
| let params1={ | let params1={ | ||||
| accountType: "102", | |||||
| status: "N", | |||||
| townAccountType:'3' | |||||
| } | } | ||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| listTaccount(params1).then((response) => { | |||||
| console.log(response) | |||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| if(res.townAccountType=='3'){ | |||||
| res['payerFrom'] = '3' | |||||
| this.payerOptions.push(res); | |||||
| this.payerOptions[index].text = res.payee; | |||||
| this.payerOptions[index].value = res.id; | |||||
| } | |||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| @@ -338,7 +342,7 @@ | |||||
| downId: null, | downId: null, | ||||
| orderId: null, | orderId: null, | ||||
| cashierId: null, | cashierId: null, | ||||
| transferType: '1', | |||||
| transferType: '3', | |||||
| accountType: '2', | accountType: '2', | ||||
| explainSituation: null, | explainSituation: null, | ||||
| succeedAmount: null, | succeedAmount: null, | ||||
| @@ -418,23 +422,29 @@ | |||||
| payeeAccount: "", //收款账户 | payeeAccount: "", //收款账户 | ||||
| bankDeposit: "", //开户银行 | bankDeposit: "", //开户银行 | ||||
| incomeAmount: "", //收入金额 | incomeAmount: "", //收入金额 | ||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| bankType: "", //所属银行 | |||||
| bankTypeText: "", //所属银行 | |||||
| showPayee:false, | showPayee:false, | ||||
| showbankType:false | showbankType:false | ||||
| }); | }); | ||||
| }); | }); | ||||
| }, | }, | ||||
| getPayeeList() { | getPayeeList() { | ||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| let params = { | |||||
| villageAccountType : 1, | |||||
| status:'0', | |||||
| accountType : this.form.accountType | |||||
| } | |||||
| console.log(params) | |||||
| listVaccount(params).then(response => { | |||||
| console.log(response) | |||||
| if(response.rows.length>0){ | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| } | |||||
| }); | }); | ||||
| }, | }, | ||||
| payeeDictLabel(datas, value) { | payeeDictLabel(datas, value) { | ||||
| @@ -476,42 +486,53 @@ | |||||
| this.showproject = false; | this.showproject = false; | ||||
| }, | }, | ||||
| onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| console.log(data,index) | |||||
| for (let i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | this.chargeItme[i].showPayee = false; | ||||
| } | } | ||||
| this.chargeItme[index].payee = data.text; | this.chargeItme[index].payee = data.text; | ||||
| this.chargeItme[index].payeeId = data.value; | this.chargeItme[index].payeeId = data.value; | ||||
| this.chargeItme[index].showpayee = false; | this.chargeItme[index].showpayee = false; | ||||
| this.payeeSelectChange(data.value , index) | this.payeeSelectChange(data.value , index) | ||||
| this.onConfirmBankType(data,index); | |||||
| }, | }, | ||||
| 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; | |||||
| this.bankTypeDictionaries.map(res => { | |||||
| if(res.value==data.bankType){ | |||||
| this.chargeItme[index].bankTypeText = res.text; | |||||
| this.chargeItme[index].bankType = res.value; | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| onConfirmPayer(data){ | onConfirmPayer(data){ | ||||
| console.log(data) | |||||
| this.form.payer = data.text; | this.form.payer = data.text; | ||||
| this.form.cashierId = data.value; | this.form.cashierId = data.value; | ||||
| this.form.payerAccount = data.payeeAccount; | |||||
| this.showpayer = false; | this.showpayer = false; | ||||
| this.selectChange(data.value) | |||||
| }, | }, | ||||
| onConfirmLasj(data){ | onConfirmLasj(data){ | ||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | ||||
| this.showlasj = false; | this.showlasj = false; | ||||
| }, | }, | ||||
| accountTypeChange(e){ | accountTypeChange(e){ | ||||
| this.chargeItme = []; | |||||
| this.payeeList = []; | this.payeeList = []; | ||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| let params = { | |||||
| villageAccountType : 1, | |||||
| status:'0', | |||||
| accountType : this.form.accountType | |||||
| } | |||||
| listVaccount(params).then(response => { | |||||
| console.log(response) | |||||
| if(response.rows.length>0){ | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| } | |||||
| }); | }); | ||||
| }, | }, | ||||
| // 钱计算 | // 钱计算 | ||||
| @@ -547,31 +568,130 @@ | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
| Dialog.confirm({ | |||||
| title: '提示', | |||||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||||
| }) | |||||
| .then(() => { | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||||
| this.uploadFiles.map(rr => { | |||||
| const params = new FormData(); | |||||
| params.append("tableId", response.data.id); | |||||
| params.append("tableName", "t_yinnong_transfer"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", rr); | |||||
| commonAttach(params).then((r) => { | |||||
| }) | |||||
| }) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| }) | }) | ||||
| } | |||||
| }); | |||||
| .catch(() => { | |||||
| return false; | |||||
| }); | |||||
| }else{ | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| addTransfer(this.form).then(response => { | |||||
| this.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||||
| this.uploadFiles.map(rr => { | |||||
| const params = new FormData(); | |||||
| params.append("tableId", response.data.id); | |||||
| params.append("tableName", "t_yinnong_transfer"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", rr); | |||||
| commonAttach(params).then((r) => { | |||||
| }) | |||||
| }) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| } | |||||
| }); | |||||
| } | |||||
| }, | }, | ||||
| goUpdate(){ | goUpdate(){ | ||||
| if(this.chargeItme.length<1){ | if(this.chargeItme.length<1){ | ||||
| @@ -596,23 +716,51 @@ | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
| this.projectForm.outId = this.form.id | |||||
| console.log(this.form) | |||||
| addTransfer(this.form).then((response) => { | addTransfer(this.form).then((response) => { | ||||
| this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
| this.$set(this.projectForm, "ynType", '1'); | 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('保存成功'); | this.$toast.success('保存成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(-1) | history.go(-1) | ||||
| },2000) | },2000) | ||||
| }) | |||||
| } | |||||
| }else{ | }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) { | payeeSelectChange(select, i) { | ||||
| @@ -713,6 +861,33 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| beforeRead(file) { | |||||
| this.uploadFiles.push(file.file); | |||||
| }, | |||||
| deleteFile(file){ | |||||
| this.uploadFiles.map((response,index) => { | |||||
| if(file.file == response){ | |||||
| this.uploadFiles.splice(index,1) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加虚拟转账申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -196,7 +196,7 @@ | |||||
| </van-popup> | </van-popup> | ||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | ||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | ||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| clickable | clickable | ||||
| @@ -209,16 +209,12 @@ | |||||
| required | required | ||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | :rules="[{ required: true , message:'请选择所属银行' }]" | ||||
| /> | /> | ||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -238,6 +234,8 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | 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' | |||||
| export default { | export default { | ||||
| name: "approvalAdd4", | name: "approvalAdd4", | ||||
| data() { | data() { | ||||
| @@ -256,7 +254,7 @@ | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -315,19 +313,19 @@ | |||||
| this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
| }); | }); | ||||
| let params1={ | let params1={ | ||||
| accountType: "102", | |||||
| status: "N", | |||||
| villageAccountType:'1' | |||||
| } | } | ||||
| getAccount(params1).then((response) => { | |||||
| listVaccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| res['payerFrom'] = '1' | res['payerFrom'] = '1' | ||||
| console.log(res) | console.log(res) | ||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].text = res.payee; | |||||
| this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| // 表单重置 | // 表单重置 | ||||
| @@ -338,7 +336,7 @@ | |||||
| downId: null, | downId: null, | ||||
| orderId: null, | orderId: null, | ||||
| cashierId: null, | cashierId: null, | ||||
| transferType: '1', | |||||
| transferType: '4', | |||||
| accountType: '2', | accountType: '2', | ||||
| explainSituation: null, | explainSituation: null, | ||||
| succeedAmount: null, | succeedAmount: null, | ||||
| @@ -418,8 +416,8 @@ | |||||
| payeeAccount: "", //收款账户 | payeeAccount: "", //收款账户 | ||||
| bankDeposit: "", //开户银行 | bankDeposit: "", //开户银行 | ||||
| incomeAmount: "", //收入金额 | incomeAmount: "", //收入金额 | ||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| bankType: "", //所属银行 | |||||
| bankTypeText:'', //所属银行 | |||||
| showPayee:false, | showPayee:false, | ||||
| showbankType:false | showbankType:false | ||||
| }); | }); | ||||
| @@ -476,21 +474,23 @@ | |||||
| this.showproject = false; | this.showproject = false; | ||||
| }, | }, | ||||
| onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
| 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[i].showPayee = false; | ||||
| } | } | ||||
| this.chargeItme[index].payee = data.text; | this.chargeItme[index].payee = data.text; | ||||
| this.chargeItme[index].payeeId = data.value; | this.chargeItme[index].payeeId = data.value; | ||||
| this.chargeItme[index].showpayee = false; | this.chargeItme[index].showpayee = false; | ||||
| this.payeeSelectChange(data.value , index) | this.payeeSelectChange(data.value , index) | ||||
| this.onConfirmBankType(data,index) | |||||
| }, | }, | ||||
| 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){ | onConfirmPayer(data){ | ||||
| this.form.payer = data.text; | this.form.payer = data.text; | ||||
| @@ -665,6 +665,7 @@ | |||||
| //model就是上面的数据源 | //model就是上面的数据源 | ||||
| return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
| }); | }); | ||||
| console.log(obj) | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | ||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | obj.enterpriseCode != null && obj.enterpriseCode != "" && | ||||
| obj.accountPassword != null && obj.accountPassword != ""){ | obj.accountPassword != null && obj.accountPassword != ""){ | ||||
| @@ -679,7 +680,7 @@ | |||||
| }else{ | }else{ | ||||
| if(obj.payerFrom==1){ | if(obj.payerFrom==1){ | ||||
| this.diglogStatus = false; | this.diglogStatus = false; | ||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | this.$set(this.form,"payer","") | ||||
| this.$set(this.form,"payerAccount","") | this.$set(this.form,"payerAccount","") | ||||
| }else{ | }else{ | ||||
| @@ -713,6 +714,37 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -7,7 +7,7 @@ | |||||
| @click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
| > | > | ||||
| <template #title> | <template #title> | ||||
| <p style="font-weight: bold;">添加付款申请</p> | |||||
| <p style="font-weight: bold;">添加母子转账申请</p> | |||||
| </template> | </template> | ||||
| </van-nav-bar> | </van-nav-bar> | ||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
| @@ -194,31 +194,26 @@ | |||||
| @cancel="item.showPayee = false" | @cancel="item.showPayee = false" | ||||
| /> | /> | ||||
| </van-popup> | </van-popup> | ||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | <van-field | ||||
| readonly | readonly | ||||
| clickable | clickable | ||||
| label="所属银行" | label="所属银行" | ||||
| placeholder="请选择" | |||||
| placeholder="请选择收款方" | |||||
| v-model="item.bankTypeText" | v-model="item.bankTypeText" | ||||
| @click="item.showbankType = true" | @click="item.showbankType = true" | ||||
| input-align="right" | input-align="right" | ||||
| right-icon="arrow-down" | |||||
| required | required | ||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| :rules="[{ required: true , message:'所属银行不能为空 ' }]" | |||||
| /> | /> | ||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -238,6 +233,13 @@ | |||||
| <script> | <script> | ||||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import { | |||||
| attachmentList, | |||||
| commonAttach, | |||||
| listTaccount, | |||||
| listVaccount | |||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| export default { | export default { | ||||
| name: "approvalAdd5", | name: "approvalAdd5", | ||||
| data() { | data() { | ||||
| @@ -256,7 +258,7 @@ | |||||
| maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -304,30 +306,33 @@ | |||||
| } | } | ||||
| listProject(queryParams).then(response => { | listProject(queryParams).then(response => { | ||||
| this.projectList = response.rows; | this.projectList = response.rows; | ||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| for (let i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | ||||
| } | } | ||||
| }); | }); | ||||
| this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| for (let i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
| } | } | ||||
| this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
| }); | }); | ||||
| let params1={ | let params1={ | ||||
| accountType: "102", | |||||
| status: "N", | |||||
| townAccountType:'2' | |||||
| } | } | ||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| listTaccount(params1).then((response) => { | |||||
| console.log(response) | |||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| if(res.townAccountType=='2'){ | |||||
| res['payerFrom'] = '2' | |||||
| this.payerOptions.push(res); | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.payee; | |||||
| this.payerOptions[index].value = res.id; | |||||
| } | |||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| // 表单重置 | // 表单重置 | ||||
| @@ -338,7 +343,7 @@ | |||||
| downId: null, | downId: null, | ||||
| orderId: null, | orderId: null, | ||||
| cashierId: null, | cashierId: null, | ||||
| transferType: '1', | |||||
| transferType: '5', | |||||
| accountType: '2', | accountType: '2', | ||||
| explainSituation: null, | explainSituation: null, | ||||
| succeedAmount: null, | succeedAmount: null, | ||||
| @@ -418,8 +423,8 @@ | |||||
| payeeAccount: "", //收款账户 | payeeAccount: "", //收款账户 | ||||
| bankDeposit: "", //开户银行 | bankDeposit: "", //开户银行 | ||||
| incomeAmount: "", //收入金额 | incomeAmount: "", //收入金额 | ||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| bankType: "", //所属银行 | |||||
| bankTypeText:"", //所属银行 | |||||
| showPayee:false, | showPayee:false, | ||||
| showbankType:false | showbankType:false | ||||
| }); | }); | ||||
| @@ -429,7 +434,7 @@ | |||||
| //普通转账 | //普通转账 | ||||
| this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
| this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
| listPayee(this.queryParams).then((response) => { | |||||
| listVaccount(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| this.payeeList[index].text = res.payee; | this.payeeList[index].text = res.payee; | ||||
| @@ -438,7 +443,7 @@ | |||||
| }); | }); | ||||
| }, | }, | ||||
| payeeDictLabel(datas, value) { | payeeDictLabel(datas, value) { | ||||
| var actions = []; | |||||
| let actions = []; | |||||
| Object.keys(datas).some((key) => { | Object.keys(datas).some((key) => { | ||||
| if (datas[key].payeeId == ('' + value)) { | if (datas[key].payeeId == ('' + value)) { | ||||
| actions.push(datas[key].payee); | actions.push(datas[key].payee); | ||||
| @@ -476,27 +481,31 @@ | |||||
| this.showproject = false; | this.showproject = false; | ||||
| }, | }, | ||||
| onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
| 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[i].showPayee = false; | ||||
| } | } | ||||
| this.chargeItme[index].payee = data.text; | this.chargeItme[index].payee = data.text; | ||||
| this.chargeItme[index].payeeId = data.value; | this.chargeItme[index].payeeId = data.value; | ||||
| this.chargeItme[index].showpayee = false; | this.chargeItme[index].showpayee = false; | ||||
| this.payeeSelectChange(data.value , index) | this.payeeSelectChange(data.value , index) | ||||
| this.onConfirmBankType(data,index); | |||||
| }, | }, | ||||
| 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){ | onConfirmPayer(data){ | ||||
| console.log(data) | |||||
| this.form.payer = data.text; | this.form.payer = data.text; | ||||
| this.form.cashierId = data.value; | this.form.cashierId = data.value; | ||||
| this.form.payerAccount = data.payeeAccount; | |||||
| this.showpayer = false; | this.showpayer = false; | ||||
| this.selectChange(data.value) | |||||
| // this.selectChange(data.value) | |||||
| }, | }, | ||||
| onConfirmLasj(data){ | onConfirmLasj(data){ | ||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | ||||
| @@ -506,7 +515,7 @@ | |||||
| this.payeeList = []; | this.payeeList = []; | ||||
| this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
| this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
| listPayee(this.queryParams).then((response) => { | |||||
| listPayee(this.queryParams).then((response ) => { | |||||
| this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| this.payeeList[index].text = res.payee; | this.payeeList[index].text = res.payee; | ||||
| @@ -713,6 +722,37 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -42,7 +42,7 @@ | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
| </div> | </div> | ||||
| <p class="main_title">列表信息</p> | |||||
| <p class="main_title">收款方信息</p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | <div class="main_box" style="margin-bottom: 15px;"> | ||||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | ||||
| @@ -57,11 +57,18 @@ | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | ||||
| </div> | </div> | ||||
| </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> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalDetail", | name: "approvalDetail", | ||||
| data() { | data() { | ||||
| @@ -77,7 +84,7 @@ | |||||
| maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
| currentDate: new Date(), | currentDate: new Date(), | ||||
| form:{}, | form:{}, | ||||
| fileList:[], | |||||
| capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
| payee:'', | payee:'', | ||||
| bankType:'', | bankType:'', | ||||
| @@ -135,6 +142,7 @@ | |||||
| this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| goFlow(){ | goFlow(){ | ||||
| @@ -348,6 +356,37 @@ | |||||
| } | } | ||||
| }); | }); | ||||
| }, | }, | ||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -0,0 +1,430 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">查看现金提现申请详情</p> | |||||
| </template> | |||||
| <template #right> | |||||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="提现总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息</p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||||
| <van-field readonly label="提款人" v-model="item.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" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getCash , listCashdetailByCashId , listPayee , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "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:'1' | |||||
| }, | |||||
| projectFundType:'' | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| console.log(response) | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| 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) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,431 @@ | |||||
| <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.payeeAccount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import { | |||||
| attachmentList, | |||||
| commonAttach, | |||||
| 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:'' | |||||
| }; | |||||
| }, | |||||
| 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='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| getCash(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '2' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| }) | |||||
| }else{ | |||||
| 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) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,482 @@ | |||||
| <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.payeeAccount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import { | |||||
| attachmentList, | |||||
| commonAttach, | |||||
| 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:'' | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| console.log(response) | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| 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) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,437 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">查看付款申请</p> | |||||
| </template> | |||||
| <template #right> | |||||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">列表信息</p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||||
| <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalDetail", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| fileList:[], | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'' | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| console.log(response) | |||||
| this.projectList = response.rows; | |||||
| for (let i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (let i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "", //所属银行 | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| console.log(data) | |||||
| this.projectList.map(res => { | |||||
| console.log(res) | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| console.log(this.projectForm) | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data){ | |||||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||||
| console.log(this.chargeItme) | |||||
| this.showpayee = false; | |||||
| }, | |||||
| onConfirmBankType(data){ | |||||
| console.log(this.chargeItme) | |||||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
| this.showbankType = false; | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| console.log(e) | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$toast.error("付款事由禁止包含|。"); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$toast.error('请选择项目名称!'); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$toast.error('请输入工程发票号!'); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| console.log(this.form); | |||||
| updateTransfer(this.form).then(response => { | |||||
| console.log(response); | |||||
| this.projectForm.outId = this.form.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| console.log(this.projectForm) | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(this.form.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(this.form.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goUpdate(){ | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$toast.error("付款事由禁止包含|。"); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$toast.error('请选择项目名称!'); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$toast.error('请输入工程发票号!'); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| this.projectForm.outId = this.form.id | |||||
| updateTransfer(this.form).then((response) => { | |||||
| this.projectForm.outId = this.form.id | |||||
| this.$set(this.projectForm, "ynType", '1'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| this.$toast.success('修改成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }else{ | |||||
| this.$toast.success('修改成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| beforeRead(file) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,437 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">查看付款申请</p> | |||||
| </template> | |||||
| <template #right> | |||||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">列表信息</p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||||
| <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalDetail", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| fileList:[], | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'' | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| console.log(response) | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "", //所属银行 | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| console.log(data) | |||||
| this.projectList.map(res => { | |||||
| console.log(res) | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| console.log(this.projectForm) | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data){ | |||||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||||
| console.log(this.chargeItme) | |||||
| this.showpayee = false; | |||||
| }, | |||||
| onConfirmBankType(data){ | |||||
| console.log(this.chargeItme) | |||||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
| this.showbankType = false; | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| console.log(e) | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$toast.error("付款事由禁止包含|。"); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$toast.error('请选择项目名称!'); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$toast.error('请输入工程发票号!'); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,437 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">查看付款申请</p> | |||||
| </template> | |||||
| <template #right> | |||||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">列表信息</p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||||
| <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalDetail", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| fileList:[], | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'' | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| console.log(response) | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "", //所属银行 | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| console.log(data) | |||||
| this.projectList.map(res => { | |||||
| console.log(res) | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| console.log(this.projectForm) | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data){ | |||||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||||
| console.log(this.chargeItme) | |||||
| this.showpayee = false; | |||||
| }, | |||||
| onConfirmBankType(data){ | |||||
| console.log(this.chargeItme) | |||||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
| this.showbankType = false; | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| console.log(e) | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$toast.error("付款事由禁止包含|。"); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$toast.error('请选择项目名称!'); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$toast.error('请输入工程发票号!'); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,437 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">查看付款申请</p> | |||||
| </template> | |||||
| <template #right> | |||||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">列表信息</p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||||
| <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request' | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalDetail", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| fileList:[], | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'' | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| console.log(response) | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| goFlow(){ | |||||
| window.location='approvalProcess?id='+this.$route.query.id; | |||||
| }, | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "", //所属银行 | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| console.log(data) | |||||
| this.projectList.map(res => { | |||||
| console.log(res) | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| console.log(this.projectForm) | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data){ | |||||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||||
| console.log(this.chargeItme) | |||||
| this.showpayee = false; | |||||
| }, | |||||
| onConfirmBankType(data){ | |||||
| console.log(this.chargeItme) | |||||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
| this.showbankType = false; | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| console.log(e) | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$toast.error("付款事由禁止包含|。"); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$toast.error('请选择项目名称!'); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$toast.error('请输入工程发票号!'); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -19,15 +19,17 @@ | |||||
| v-model="loading" | v-model="loading" | ||||
| :finished="finished" | :finished="finished" | ||||
| finished-text="没有更多了" | finished-text="没有更多了" | ||||
| @load="getList" | |||||
| > | |||||
| @load="getList"> | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList1.png" size="22" color="#FF4646" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 30px;"></i>{{item.applyDate}}</p> | |||||
| </template> | |||||
| <template #default> | |||||
| <p style="width: 80px;display: inline-block">{{item.auditStatus}}</p> | |||||
| </template> | </template> | ||||
| </van-cell> | </van-cell> | ||||
| <template #right> | <template #right> | ||||
| @@ -22,9 +22,9 @@ | |||||
| @load="getList" | @load="getList" | ||||
| > | > | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail10', query: {id:item.id}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList7.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify10', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -50,7 +50,7 @@ | |||||
| <script> | <script> | ||||
| import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import {listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import {cashSubmit, delCash, listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalList10", | name: "approvalList10", | ||||
| data() { | data() { | ||||
| @@ -101,7 +101,7 @@ export default { | |||||
| .then(() => { | .then(() => { | ||||
| // on confirm | // on confirm | ||||
| this.applicationList.splice(index,1) | this.applicationList.splice(index,1) | ||||
| delTransfer(id).then(res => { | |||||
| delCash(id).then(res => { | |||||
| if(res.code = 200){ | if(res.code = 200){ | ||||
| this.$toast.success('删除成功'); | this.$toast.success('删除成功'); | ||||
| } | } | ||||
| @@ -116,7 +116,8 @@ export default { | |||||
| message: '您确认提交草稿?', | message: '您确认提交草稿?', | ||||
| }) | }) | ||||
| .then(() => { | .then(() => { | ||||
| customSubmit(id).then(res => { | |||||
| console.log(id) | |||||
| cashSubmit(id).then(res => { | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(0) | history.go(0) | ||||
| @@ -22,9 +22,9 @@ | |||||
| @load="getList" | @load="getList" | ||||
| > | > | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail11', query: {id:item.id}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList6.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify11', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -50,7 +50,7 @@ | |||||
| <script> | <script> | ||||
| import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import {listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import {cashSubmit, delCash, listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalList11", | name: "approvalList11", | ||||
| data() { | data() { | ||||
| @@ -101,7 +101,7 @@ export default { | |||||
| .then(() => { | .then(() => { | ||||
| // on confirm | // on confirm | ||||
| this.applicationList.splice(index,1) | this.applicationList.splice(index,1) | ||||
| delTransfer(id).then(res => { | |||||
| delCash(id).then(res => { | |||||
| if(res.code = 200){ | if(res.code = 200){ | ||||
| this.$toast.success('删除成功'); | this.$toast.success('删除成功'); | ||||
| } | } | ||||
| @@ -116,7 +116,7 @@ export default { | |||||
| message: '您确认提交草稿?', | message: '您确认提交草稿?', | ||||
| }) | }) | ||||
| .then(() => { | .then(() => { | ||||
| customSubmit(id).then(res => { | |||||
| cashSubmit(id).then(res => { | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(0) | history.go(0) | ||||
| @@ -22,9 +22,9 @@ | |||||
| @load="getList" | @load="getList" | ||||
| > | > | ||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail12', query: {id:item.id}}"> | |||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList3.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify12', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -50,7 +50,7 @@ | |||||
| <script> | <script> | ||||
| import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | ||||
| import {listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import {cashSubmit, delCash, listCash} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | export default { | ||||
| name: "approvalList12", | name: "approvalList12", | ||||
| data() { | data() { | ||||
| @@ -61,7 +61,7 @@ export default { | |||||
| finished: false, | finished: false, | ||||
| queryParams:{ | queryParams:{ | ||||
| pageNum:1, | pageNum:1, | ||||
| pageSize:10, | |||||
| pageSize:100, | |||||
| cashType: '12', | cashType: '12', | ||||
| } | } | ||||
| }; | }; | ||||
| @@ -101,7 +101,7 @@ export default { | |||||
| .then(() => { | .then(() => { | ||||
| // on confirm | // on confirm | ||||
| this.applicationList.splice(index,1) | this.applicationList.splice(index,1) | ||||
| delTransfer(id).then(res => { | |||||
| delCash33333333333333(id).then(res => { | |||||
| if(res.code = 200){ | if(res.code = 200){ | ||||
| this.$toast.success('删除成功'); | this.$toast.success('删除成功'); | ||||
| } | } | ||||
| @@ -116,7 +116,7 @@ export default { | |||||
| message: '您确认提交草稿?', | message: '您确认提交草稿?', | ||||
| }) | }) | ||||
| .then(() => { | .then(() => { | ||||
| customSubmit(id).then(res => { | |||||
| cashSubmit(id).then(res => { | |||||
| this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| history.go(0) | history.go(0) | ||||
| @@ -24,7 +24,7 @@ | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail', query: {id:item.id}}"> | ||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList8.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify2', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -24,7 +24,7 @@ | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail', query: {id:item.id}}"> | ||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList9.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify3', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -24,7 +24,7 @@ | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail', query: {id:item.id}}"> | ||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList10.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify4', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -24,7 +24,7 @@ | |||||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | <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:'approvalDetail', query: {id:item.id}}"> | ||||
| <template #icon> | <template #icon> | ||||
| <van-icon name="../../../static/images/icon/icon_yl.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| <van-icon name="../../../../../static/images/onlineHome/yinnongList4.png" size="22" color="#539FFD" style="margin-right: 10px;" /> | |||||
| </template> | </template> | ||||
| <template #label> | <template #label> | ||||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | ||||
| @@ -33,7 +33,7 @@ | |||||
| <template #right> | <template #right> | ||||
| <van-row> | <van-row> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" /> | |||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify5', query: {id:item.id}}" class="delete-button" /> | |||||
| </van-col> | </van-col> | ||||
| <van-col> | <van-col> | ||||
| <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | <van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | ||||
| @@ -219,7 +219,10 @@ | |||||
| </van-popup> | </van-popup> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
| <van-row> | <van-row> | ||||
| <van-col span="12" align="center"> | <van-col span="12" align="center"> | ||||
| @@ -237,6 +240,8 @@ | |||||
| <script> | <script> | ||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | 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 request from '@/utils/request'; | |||||
| export default { | export default { | ||||
| name: "approvalModify", | name: "approvalModify", | ||||
| data() { | data() { | ||||
| @@ -292,7 +297,8 @@ | |||||
| outId:null, | outId:null, | ||||
| ynType:'1' | ynType:'1' | ||||
| }, | }, | ||||
| projectFundType:'' | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -320,12 +326,12 @@ | |||||
| this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
| response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
| res['payerFrom'] = '1' | res['payerFrom'] = '1' | ||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | this.payerOptions[index].text = res.accountName; | ||||
| this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
| }) | }) | ||||
| }); | }); | ||||
| this.getDictionaries(); | this.getDictionaries(); | ||||
| this.getFileList(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| getDictionaries(){ | getDictionaries(){ | ||||
| @@ -705,6 +711,37 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | goBack(){ | ||||
| window.history.go(-1) | window.history.go(-1) | ||||
| }, | }, | ||||
| @@ -0,0 +1,732 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改现金提现申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" label="提款人" placeholder="请输入提款人" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入提款金额' }]" v-model="item.incomeAmount" label="提款金额(元)" placeholder="请输入提款金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request'; | |||||
| import { | |||||
| addCash, | |||||
| addCashdetail, attachmentList, commonAttach, | |||||
| getCash, | |||||
| listCashdetailByCashId, updateCash | |||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalModify10", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'10', | |||||
| outId:null, | |||||
| ynType:'2' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (let i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (let i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| accountType: "102", | |||||
| status: "N", | |||||
| } | |||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getCash(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (let 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.form) | |||||
| }); | |||||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||||
| this.chargeItme = response.data; | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入提款金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].drawer == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入提款人!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].remark == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入资金用途!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方全称 | |||||
| payeeAccount: "", //收款账户 | |||||
| drawer: "", //提款人 | |||||
| incomeAmount: "", //提款金额 | |||||
| bankType: "", //资金用途 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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.projectForm.outId = response.data.id | |||||
| this.$set(this.projectForm, "ynType", '2'); | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }) | |||||
| }else{ | |||||
| customSubmit(response.data.id).then(res => { | |||||
| this.$toast.success('提交成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goUpdate(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.projectForm.outId = this.form.id | |||||
| updateCash(this.form).then((response) => { | |||||
| this.chargeItme.map(res => { | |||||
| res.cashId = this.form.id | |||||
| addCashdetail(res).then(r => { | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| this.projectForm.outId = this.form.id | |||||
| this.$set(this.projectForm, "ynType", '2'); | |||||
| addProjectto(this.projectForm).then(res => { | |||||
| this.$toast.success('保存成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| }) | |||||
| }else{ | |||||
| this.$toast.success('保存成功'); | |||||
| setTimeout(function(){ | |||||
| history.go(-1) | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| 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,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,793 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改付款申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | |||||
| </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> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalModify11", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| accountType: "102", | |||||
| status: "N", | |||||
| } | |||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| console.log(res.data) | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| // response.rows[j].payeeText = response.rows[j].payee; | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| response.rows[j].showPayee = false; | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| 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,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,794 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改付款申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | |||||
| </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> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request'; | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalModify12", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| accountType: "102", | |||||
| status: "N", | |||||
| } | |||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| console.log(res.data) | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| // response.rows[j].payeeText = response.rows[j].payee; | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| response.rows[j].showPayee = false; | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| console.log(file) | |||||
| console.log(this.fileList) | |||||
| const params = new FormData(); | |||||
| params.append("tableId", this.$route.query.id); | |||||
| params.append("tableName", "t_yinnong_cash"); | |||||
| params.append("bizPath", "upload"); | |||||
| params.append("fileType", "0"); | |||||
| params.append("file", file.file); | |||||
| commonAttach(params).then((response) => { | |||||
| console.log(response) | |||||
| }) | |||||
| }, | |||||
| 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,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,794 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改付款申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | |||||
| </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> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request'; | |||||
| export default { | |||||
| name: "approvalModify2", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| accountType: "102", | |||||
| status: "N", | |||||
| } | |||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| console.log(res.data) | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| // response.rows[j].payeeText = response.rows[j].payee; | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| response.rows[j].showPayee = false; | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,800 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改付款申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required readonly :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required readonly :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| <p class="main_title">上传附件</p> | |||||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
| <van-uploader v-model="fileList" :after-read="beforeRead" ></van-uploader> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import { | |||||
| addCash, attachmentList, | |||||
| commonAttach, | |||||
| listTaccount, | |||||
| listVaccount | |||||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request'; | |||||
| export default { | |||||
| name: "approvalModify3", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| townAccountType:'3' | |||||
| } | |||||
| listTaccount(params1).then((response) => { | |||||
| console.log(response) | |||||
| response.rows.map((res,index) => { | |||||
| if(res.townAccountType=='3'){ | |||||
| res['payerFrom'] = '3' | |||||
| this.payerOptions.push(res); | |||||
| this.payerOptions[index].text = res.payee; | |||||
| this.payerOptions[index].value = res.id; | |||||
| } | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| console.log(res.data) | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| // response.rows[j].payeeText = response.rows[j].payee; | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| response.rows[j].showPayee = false; | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| let params = { | |||||
| villageAccountType : 1, | |||||
| status:'0', | |||||
| accountType : this.form.accountType | |||||
| } | |||||
| listVaccount(params).then(response => { | |||||
| console.log(response) | |||||
| if(response.rows.length>0){ | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.chargeItme = []; | |||||
| this.payeeList = []; | |||||
| let params = { | |||||
| villageAccountType : 1, | |||||
| status:'0', | |||||
| accountType : this.form.accountType | |||||
| } | |||||
| listVaccount(params).then(response => { | |||||
| console.log(response) | |||||
| if(response.rows.length>0){ | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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) | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| goUpdate(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,794 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改付款申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | |||||
| </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> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request'; | |||||
| export default { | |||||
| name: "approvalModify4", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| accountType: "102", | |||||
| status: "N", | |||||
| } | |||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| console.log(res.data) | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| // response.rows[j].payeeText = response.rows[j].payee; | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| response.rows[j].showPayee = false; | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,794 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <van-nav-bar | |||||
| left-arrow | |||||
| fixed | |||||
| placeholder | |||||
| @click-left="$router.back(-1)" | |||||
| > | |||||
| <template #title> | |||||
| <p style="font-weight: bold;">修改付款申请</p> | |||||
| </template> | |||||
| </van-nav-bar> | |||||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <p class="main_title">基础信息</p> | |||||
| <div class="main_box"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择申请时间' }]" | |||||
| v-model="form.applyDate" | |||||
| label="申请时间" | |||||
| placeholder="请选择申请时间" | |||||
| @click="showlasj = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| /> | |||||
| <van-popup v-model="showlasj" position="bottom"> | |||||
| <van-datetime-picker | |||||
| v-model="currentDate" | |||||
| type="date" | |||||
| title="选择年月日" | |||||
| :min-date="minDate" | |||||
| :max-date="maxDate" | |||||
| @confirm="onConfirmLasj" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||||
| label="资金支出类别" | |||||
| placeholder="请选择" | |||||
| v-model="capitalExpenditureType" | |||||
| @click="showcapital = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| /> | |||||
| <van-popup v-model="showcapital" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="capitalExpenditureTypeOptions" | |||||
| @confirm="onConfirmCapital" | |||||
| @cancel="showcapital = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field | |||||
| readonly | |||||
| required | |||||
| label="支出总金额" | |||||
| v-model="form.expenditureAmount" | |||||
| placeholder="根据下方收款金额自动核算" | |||||
| input-align="right" | |||||
| label-width="auto" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field | |||||
| label="付款事由" | |||||
| v-model="form.remark" | |||||
| type="textarea" | |||||
| placeholder="请输入付款事由" | |||||
| input-align="right" | |||||
| rows="3" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||||
| /> | |||||
| </div> | |||||
| <div class="main_box" style="margin-top: 10px;"> | |||||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="项目名称" | |||||
| placeholder="请选择" | |||||
| v-model="projectForm.projectName" | |||||
| @click="showproject = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||||
| /> | |||||
| <van-popup v-model="showproject" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectListShow" | |||||
| @confirm="onConfirmProject" | |||||
| @cancel="showproject = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="工程款类型" | |||||
| placeholder="请选择" | |||||
| v-model="projectFundType" | |||||
| @click="showFundType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||||
| /> | |||||
| <van-popup v-model="showFundType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="projectFundTypeOptions" | |||||
| @confirm="onConfirmFundType" | |||||
| @cancel="showFundType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">付款方信息</p> | |||||
| <div class="main_box"> | |||||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="付款方" | |||||
| placeholder="请选择付款方" | |||||
| v-model="form.payer" | |||||
| @click="showpayer = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| label-width="auto" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||||
| /> | |||||
| <van-popup v-model="showpayer" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payerOptions" | |||||
| @confirm="onConfirmPayer($event)" | |||||
| @cancel="showpayer = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| </div> | |||||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||||
| <div class="main_box" style="margin-bottom: 15px;"> | |||||
| <van-cell title="收款账户类型"> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||||
| <van-radio name="1">公户</van-radio> | |||||
| <van-radio name="2">私户</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| </div> | |||||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="收款方" | |||||
| placeholder="请选择" | |||||
| v-model="item.payee" | |||||
| @click="item.showPayee = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showPayee" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="payeeList" | |||||
| @confirm="onConfirmPayee($event,index)" | |||||
| @cancel="item.showPayee = false" | |||||
| /> | |||||
| </van-popup> | |||||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||||
| <van-field | |||||
| readonly | |||||
| clickable | |||||
| label="所属银行" | |||||
| placeholder="请选择" | |||||
| v-model="item.bankTypeText" | |||||
| @click="item.showbankType = true" | |||||
| input-align="right" | |||||
| right-icon="arrow-down" | |||||
| required | |||||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||||
| /> | |||||
| <van-popup v-model="item.showbankType" position="bottom"> | |||||
| <van-picker | |||||
| show-toolbar | |||||
| :columns="bankTypeDictionaries" | |||||
| @confirm="onConfirmBankType($event,index)" | |||||
| @cancel="item.showbankType = false" | |||||
| /> | |||||
| </van-popup> | |||||
| </div> | |||||
| </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> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| <van-col span="12" align="center"> | |||||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| import request from '@/utils/request'; | |||||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
| export default { | |||||
| name: "approvalModify5", | |||||
| data() { | |||||
| return { | |||||
| showcapital:false, | |||||
| showpayee:false, | |||||
| showlasj:false, | |||||
| showbankType:false, | |||||
| showproject:false, | |||||
| showFundType:false, | |||||
| showpayer:false, | |||||
| minDate: new Date(), | |||||
| maxDate: new Date(2025, 10, 1), | |||||
| currentDate: new Date(), | |||||
| form:{}, | |||||
| capitalExpenditureType:'', | |||||
| payee:'', | |||||
| bankType:'', | |||||
| buttonType:'a', | |||||
| wfydlxDictionaries:[], | |||||
| jglxDictionaries:[], | |||||
| sysDictionaries:[], | |||||
| capitalExpenditureTypeOptions:[], | |||||
| bankTypeDictionaries:[], | |||||
| projectList:[], | |||||
| projectFundTypeOptions:[], | |||||
| projectFundTypeDictionaries:[], | |||||
| projectListShow:[], | |||||
| payerOptions:[], | |||||
| chargeItme:[], | |||||
| chargeItmeShow:[], | |||||
| payeeList:[], | |||||
| // 查询参数 | |||||
| queryParams: { | |||||
| transferType:"", | |||||
| orderByColumn: "id", | |||||
| isAsc: "desc", | |||||
| }, | |||||
| capitalExpenditureOpen:false, | |||||
| projectForm:{ | |||||
| projectId:null, | |||||
| projectName:null, | |||||
| projectContractor:null, | |||||
| projectAmount:null, | |||||
| projectBillNum:null, | |||||
| projectFundType:'1', | |||||
| outId:null, | |||||
| ynType:'1' | |||||
| }, | |||||
| projectFundType:'', | |||||
| fileList:[], | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| let queryParams={ | |||||
| pageNum: 1, | |||||
| pageSize: 100, | |||||
| } | |||||
| listProject(queryParams).then(response => { | |||||
| this.projectList = response.rows; | |||||
| for (var i = 0; i < response.rows.length; i++) { | |||||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
| } | |||||
| }); | |||||
| this.getDicts("project_fund_type").then((response) => { | |||||
| for (var i = 0; i < response.data.length; i++) { | |||||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
| } | |||||
| this.projectFundTypeDictionaries = response.data; | |||||
| }); | |||||
| let params1={ | |||||
| accountType: "102", | |||||
| status: "N", | |||||
| } | |||||
| getAccount(params1).then((response) => { | |||||
| this.payerOptions = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| res['payerFrom'] = '1' | |||||
| console.log(res) | |||||
| this.payerOptions[index].text = res.accountName; | |||||
| this.payerOptions[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| this.getDictionaries(); | |||||
| this.getFileList(); | |||||
| }, | |||||
| methods: { | |||||
| getDictionaries(){ | |||||
| getTransfer(this.$route.query.id).then((response) => { | |||||
| this.getDicts("capital_expenditure_type").then((res) => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||||
| }); | |||||
| if(response.data.capitalExpenditureType==2){ | |||||
| this.capitalExpenditureOpen = true | |||||
| let param={ | |||||
| 'outId' : response.data.id, | |||||
| 'ynType' : '1' | |||||
| } | |||||
| getProjectto(param).then(res => { | |||||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||||
| this.projectForm = res.data | |||||
| console.log(res.data) | |||||
| }) | |||||
| }else{ | |||||
| this.showproject = false | |||||
| } | |||||
| this.form = response.data; | |||||
| }); | |||||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||||
| this.getDicts("bank_type").then(res => { | |||||
| for (var i = 0; i < res.data.length; i++) { | |||||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||||
| } | |||||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||||
| // response.rows[j].payeeText = response.rows[j].payee; | |||||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||||
| response.rows[j].showPayee = false; | |||||
| } | |||||
| this.chargeItme = response.rows; | |||||
| }); | |||||
| this.getPayeeList(); | |||||
| }); | |||||
| }, | |||||
| getChange(){ | |||||
| console.log(this.buttonType) | |||||
| if(this.buttonType == 'update'){ | |||||
| console.log('update') | |||||
| this.goUpdate(); | |||||
| }else if(this.buttonType == 'add'){ | |||||
| console.log('add') | |||||
| this.goAdd(); | |||||
| } | |||||
| }, | |||||
| getError(e){ | |||||
| console.log(e) | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| addChargeItme(index){ | |||||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||||
| return; | |||||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||||
| return; | |||||
| } | |||||
| this.getDicts("bank_type").then(res => { | |||||
| this.chargeItme.splice(index + 1, 0, { | |||||
| payeeId: "", //收款方ID | |||||
| payee: "", //收款方 | |||||
| payeeAccount: "", //收款账户 | |||||
| bankDeposit: "", //开户银行 | |||||
| incomeAmount: "", //收入金额 | |||||
| bankType: "1", //所属银行 | |||||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||||
| showPayee:false, | |||||
| showbankType:false | |||||
| }); | |||||
| }); | |||||
| }, | |||||
| getPayeeList() { | |||||
| //普通转账 | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| payeeDictLabel(datas, value) { | |||||
| var actions = []; | |||||
| Object.keys(datas).some((key) => { | |||||
| if (datas[key].payeeId == ('' + value)) { | |||||
| actions.push(datas[key].payee); | |||||
| return true; | |||||
| } | |||||
| }) | |||||
| return actions.join(''); | |||||
| }, | |||||
| onConfirmCapital(data){ | |||||
| console.log(data) | |||||
| if (data.value != 2){ | |||||
| this.capitalExpenditureOpen = false; | |||||
| this.projectForm = []; | |||||
| }else{ | |||||
| this.capitalExpenditureOpen = true; | |||||
| } | |||||
| this.capitalExpenditureType = data.text; | |||||
| this.form.capitalExpenditureType = data.value; | |||||
| this.showcapital = false; | |||||
| }, | |||||
| onConfirmFundType(data){ | |||||
| console.log(data) | |||||
| this.projectForm.projectFundType = data.value; | |||||
| this.projectFundType = data.text; | |||||
| this.showFundType = false; | |||||
| }, | |||||
| onConfirmProject(data){ | |||||
| this.projectList.map(res => { | |||||
| if(res.projectName==data.text){ | |||||
| this.projectForm.projectId = res.id | |||||
| this.projectForm.projectName = res.projectName | |||||
| this.projectForm.projectContractor = res.projectContractor | |||||
| this.projectForm.projectAmount = res.projectAmount | |||||
| } | |||||
| }) | |||||
| this.showproject = false; | |||||
| }, | |||||
| onConfirmPayee(data,index){ | |||||
| console.log(data) | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showPayee = false; | |||||
| } | |||||
| this.chargeItme[index].payee = data.text; | |||||
| this.chargeItme[index].payeeId = data.value; | |||||
| this.payeeSelectChange(data.value , index) | |||||
| }, | |||||
| onConfirmBankType(data,index){ | |||||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||||
| this.chargeItme[i].showbankType = false; | |||||
| } | |||||
| this.chargeItme[index].bankTypeText = data.text; | |||||
| this.chargeItme[index].bankType = data.value; | |||||
| this.chargeItme[index].showbankType = false; | |||||
| }, | |||||
| onConfirmPayer(data){ | |||||
| this.form.payer = data.text; | |||||
| this.form.cashierId = data.value; | |||||
| this.showpayer = false; | |||||
| this.selectChange(data.value) | |||||
| }, | |||||
| onConfirmLasj(data){ | |||||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
| this.showlasj = false; | |||||
| }, | |||||
| accountTypeChange(e){ | |||||
| this.payeeList = []; | |||||
| this.queryParams.accountType = this.form.accountType | |||||
| this.queryParams.status = "0" | |||||
| listPayee(this.queryParams).then((response) => { | |||||
| this.payeeList = response.rows; | |||||
| response.rows.map((res,index) => { | |||||
| this.payeeList[index].text = res.payee; | |||||
| this.payeeList[index].value = res.id; | |||||
| }) | |||||
| }); | |||||
| }, | |||||
| // 钱计算 | |||||
| moneyChange(input) { | |||||
| console.log(input) | |||||
| let obj = {}; | |||||
| obj = this.chargeItme.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
| }); | |||||
| let total = 0; | |||||
| this.chargeItme.forEach((money) => { | |||||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
| }); | |||||
| this.$set(this.form, "expenditureAmount", total); | |||||
| }, | |||||
| goAdd(){ | |||||
| if(this.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| 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.chargeItme.length<1){ | |||||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
| return; | |||||
| } | |||||
| if(this.form.capitalExpenditureType==2){ | |||||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
| return; | |||||
| } | |||||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
| return; | |||||
| } | |||||
| } | |||||
| this.$set(this.form, "payeeList", this.chargeItme); | |||||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
| 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) | |||||
| } | |||||
| }); | |||||
| }, | |||||
| payeeSelectChange(select, i) { | |||||
| let obj = {}; | |||||
| let fuzhitype = 0; | |||||
| obj = this.payeeList.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select ; //筛选出匹配数据 | |||||
| }); | |||||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||||
| this.chargeItme.some((value, index) => { | |||||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||||
| fuzhitype = 2; | |||||
| return true; | |||||
| } | |||||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||||
| fuzhitype = 1; | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| } | |||||
| if(fuzhitype == 0){ | |||||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||||
| }else if(fuzhitype == 1){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||||
| }else if(fuzhitype == 2){ | |||||
| this.$set(this.chargeItme[i], "payee",'') | |||||
| this.$set(this.chargeItme[i], "bankType",'') | |||||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||||
| this.$set(this.chargeItme[i], "accountType", ''); | |||||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||||
| } | |||||
| }, | |||||
| selectChange(select) { | |||||
| let obj = {}; | |||||
| obj = this.payerOptions.find((account) => { | |||||
| //model就是上面的数据源 | |||||
| return account.id === select; //筛选出匹配数据 | |||||
| }); | |||||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||||
| this.$set(this.form, "bookId", obj.bookId); | |||||
| this.$set(this.form, "deptId", obj.deptId); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| this.$set(this.form, "payerFrom", '1'); | |||||
| }else{ | |||||
| if(obj.payerFrom==1){ | |||||
| this.diglogStatus = false; | |||||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
| this.$set(this.form,"payer","") | |||||
| this.$set(this.form,"payerAccount","") | |||||
| }else{ | |||||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
| }else{ | |||||
| this.$set(this.form, "operatorCode", ''); | |||||
| } | |||||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
| }else{ | |||||
| this.$set(this.form, "enterpriseCode", ''); | |||||
| } | |||||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
| }else{ | |||||
| this.$set(this.form, "accountPassword", ''); | |||||
| } | |||||
| this.$set(this.form, "bookId",''); | |||||
| this.$set(this.form, "deptId", ''); | |||||
| this.$set(this.form, "cashierId", obj.id); | |||||
| this.$set(this.form, "payer", obj.accountName); | |||||
| if(obj.payerFrom==6){ | |||||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
| this.$set(this.form, "payerAccount", response.data); | |||||
| }); | |||||
| }else { | |||||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
| } | |||||
| } | |||||
| } | |||||
| }, | |||||
| beforeRead(file) { | |||||
| 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) | |||||
| }) | |||||
| }, | |||||
| getFileList(){ | |||||
| let oData= { | |||||
| tableId: this.$route.query.id, | |||||
| tableName: "t_yinnong_transfer", | |||||
| bizPath: "upload", | |||||
| fileType: "0", | |||||
| } | |||||
| attachmentList(oData).then(res => { | |||||
| console.log(res) | |||||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
| res.rows.map(r => { | |||||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||||
| console.log(r) | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| //删除家庭成员 | |||||
| deleteChargeItme(index){ | |||||
| this.chargeItme.splice(index,1) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding: 2% 0; | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| .deleteFamily{ | |||||
| position: absolute; | |||||
| top: 0rem; | |||||
| right: 6%; | |||||
| z-index: 9; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||
| @@ -292,61 +292,61 @@ | |||||
| <van-grid :border="false"> | <van-grid :border="false"> | ||||
| <van-grid-item text="常用转账" :to="{name:'approvalList'}" > | <van-grid-item text="常用转账" :to="{name:'approvalList'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | ||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon1.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">常用转账</p> | <p style="margin-top: 5px;color: #666666;">常用转账</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="信用卡转账" :to="{name:'approvalList2'}" > | <van-grid-item text="信用卡转账" :to="{name:'approvalList2'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <div slot="default" style="background:#3ac2db;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon8.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">信用卡转账</p> | <p style="margin-top: 5px;color: #666666;">信用卡转账</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="虚拟挂账" :to="{name:'approvalList3'}" > | <van-grid-item text="虚拟挂账" :to="{name:'approvalList3'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <div slot="default" style="background:#FFA63E;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon9.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">虚拟挂账</p> | <p style="margin-top: 5px;color: #666666;">虚拟挂账</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="虚拟转账" :to="{name:'approvalList4'}" > | <van-grid-item text="虚拟转账" :to="{name:'approvalList4'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <div slot="default" style="background:#c568f5;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon10.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">虚拟转账</p> | <p style="margin-top: 5px;color: #666666;">虚拟转账</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="母子转账" :to="{name:'approvalList5'}" > | <van-grid-item text="母子转账" :to="{name:'approvalList5'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <div slot="default" style="background:#1D6FE9;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon4.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">母子转账</p> | <p style="margin-top: 5px;color: #666666;">母子转账</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="资金提现" :to="{name:'approvalList10'}" > | |||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <van-grid-item text="现金提现" :to="{name:'approvalList10'}" > | |||||
| <div slot="default" style="background:#FF6464;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon7.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">资金提现</p> | |||||
| <p style="margin-top: 5px;color: #666666;">现金提现</p> | |||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="资金使用" :to="{name:'approvalList11'}" > | |||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <van-grid-item text="现金使用" :to="{name:'approvalList11'}" > | |||||
| <div slot="default" style="background:#7790FE;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon6.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">资金使用</p> | |||||
| <p style="margin-top: 5px;color: #666666;">现金使用</p> | |||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="汇票支出" :to="{name:'approvalList12'}" > | <van-grid-item text="汇票支出" :to="{name:'approvalList12'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <div slot="default" style="background:#539ffd;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon3.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">汇票支出</p> | <p style="margin-top: 5px;color: #666666;">汇票支出</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="收款账户" :to="{name:'collectionList'}" > | <van-grid-item text="收款账户" :to="{name:'collectionList'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <div slot="default" style="background:#7dda4f;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon5.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">收款账户</p> | <p style="margin-top: 5px;color: #666666;">收款账户</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||
| <van-grid-item text="付款账户" :to="{name:'paymentAccountList'}" > | <van-grid-item text="付款账户" :to="{name:'paymentAccountList'}" > | ||||
| <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | <div slot="default" style="background:#FF4646;padding: 10px;text-align:center;border-radius: 10px;box-sizing: border-box;width: 44px;height: 44px" > | ||||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||||
| <img src="../../../static/images/onlineHome/yinnongIcon2.png" style="width: 25px;" alt /> | |||||
| </div> | </div> | ||||
| <p style="margin-top: 5px;color: #666666;">付款账户</p> | <p style="margin-top: 5px;color: #666666;">付款账户</p> | ||||
| </van-grid-item> | </van-grid-item> | ||||