| @@ -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) { | |||
| return request({ | |||
| 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) { | |||
| 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) { | |||
| 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) { | |||
| return request({ | |||
| @@ -148,3 +204,81 @@ export function delTransfer(id) { | |||
| method: 'get' | |||
| }) | |||
| } | |||
| // 查询村级账户列表 | |||
| export function listVaccount(query) { | |||
| return request({ | |||
| url: '/yinnong/vaccount/list', | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| // 查询村级账户列表 | |||
| export function listVaccount1(query) { | |||
| return request({ | |||
| url: '/yinnong/vaccount/list1', | |||
| 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 | |||
| }) | |||
| } | |||
| //删除已上传附件 | |||
| export function systemAttachment(ids) { | |||
| if (ids != undefined) { | |||
| return request({ | |||
| url: '/system/attachment/remove/' + ids, | |||
| method: 'get' | |||
| }) | |||
| } | |||
| } | |||
| // 查询转账账户详情详细 | |||
| export function getTransferProcess1(id) { | |||
| return request({ | |||
| url: '/yinnong/cash/getProcessSchedule/' + id, | |||
| method: 'get' | |||
| }) | |||
| } | |||
| // 查询出纳账户设置列表 | |||
| export function listAccount(query) { | |||
| return request({ | |||
| url: '/cashier/account/list', | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| @@ -17,3 +17,22 @@ export function ListDone(query) { | |||
| params: query, | |||
| }) | |||
| } | |||
| //获取区、镇、村地区 | |||
| export function treeselectByUser(query) { | |||
| return request({ | |||
| url: '/system/dept/treeselectByUser', | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| // 切换部门 | |||
| export function changeDept(query) { | |||
| return request({ | |||
| url: '/system/user/changeDept', | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| @@ -1024,160 +1024,223 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/homestead/homeApproval/approvalForm'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList', | |||
| path: '/onlineHome/approvalList', | |||
| name: 'approvalList', | |||
| meta: { | |||
| title: '银农支付付款申请', | |||
| title: '常用转账列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList2', | |||
| path: '/onlineHome/approvalList2', | |||
| name: 'approvalList2', | |||
| meta: { | |||
| title: '信用卡转账', | |||
| title: '信用卡转账列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList2'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList3', | |||
| path: '/onlineHome/approvalList3', | |||
| name: 'approvalList3', | |||
| meta: { | |||
| title: '虚拟挂账', | |||
| title: '虚拟挂账列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList3'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList4', | |||
| path: '/onlineHome/approvalList4', | |||
| name: 'approvalList4', | |||
| meta: { | |||
| title: '虚拟转账', | |||
| title: '虚拟转账列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList4'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList5', | |||
| path: '/onlineHome/approvalList5', | |||
| name: 'approvalList5', | |||
| meta: { | |||
| title: '母子转张', | |||
| title: '母子转账列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList5'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList10', | |||
| path: '/onlineHome/approvalList10', | |||
| name: 'approvalList10', | |||
| meta: { | |||
| title: '资金提现', | |||
| title: '现金提现列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList10'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList11', | |||
| path: '/onlineHome/approvalList11', | |||
| name: 'approvalList11', | |||
| meta: { | |||
| title: '资金使用', | |||
| title: '现金使用列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList11'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalList12', | |||
| path: '/onlineHome/approvalList12', | |||
| name: 'approvalList12', | |||
| meta: { | |||
| title: '汇票支出', | |||
| title: '汇票支出列表', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalList12'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalDetail', | |||
| path: '/onlineHome/approvalDetail', | |||
| name: 'approvalDetail', | |||
| meta: { | |||
| title: '银农支付付款申请', | |||
| title: '银农常用转账申请', | |||
| hidden: true, | |||
| }, | |||
| 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', | |||
| meta: { | |||
| title: '添加常用转账付款申请', | |||
| title: '添加常用转账申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd2', | |||
| path: '/onlineHome/approvalAdd2', | |||
| name: 'approvalAdd2', | |||
| meta: { | |||
| title: '添加信用卡转账付款申请', | |||
| title: '添加信用卡转账申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd2'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd3', | |||
| path: '/onlineHome/approvalAdd3', | |||
| name: 'approvalAdd3', | |||
| meta: { | |||
| title: '添加虚拟挂账付款申请', | |||
| title: '添加虚拟挂账申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd3'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd4', | |||
| path: '/onlineHome/approvalAdd4', | |||
| name: 'approvalAdd4', | |||
| meta: { | |||
| title: '添加虚拟转账付款申请', | |||
| title: '添加虚拟转账申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd4'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd5', | |||
| path: '/onlineHome/approvalAdd5', | |||
| name: 'approvalAdd5', | |||
| meta: { | |||
| title: '添加母子转账付款申请', | |||
| title: '添加母子转账申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd5'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd10', | |||
| path: '/onlineHome/approvalAdd10', | |||
| name: 'approvalAdd10', | |||
| meta: { | |||
| title: '添加资金提现付款申请', | |||
| title: '添加现金提现申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd11', | |||
| path: '/onlineHome/approvalAdd11', | |||
| name: 'approvalAdd11', | |||
| meta: { | |||
| title: '添加资金使用付款申请', | |||
| title: '添加现金使用申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalAdd12', | |||
| path: '/onlineHome/approvalAdd12', | |||
| name: 'approvalAdd12', | |||
| meta: { | |||
| title: '添加汇票支出付款申请', | |||
| title: '添加汇票支出申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd12'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalApproval', | |||
| path: '/onlineHome/approvalApproval', | |||
| name: 'approvalApproval', | |||
| meta: { | |||
| title: '付款审批', | |||
| @@ -1186,16 +1249,106 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval'], resolve) | |||
| }, | |||
| { | |||
| path: '/approvalModify', | |||
| path: '/onlineHome/approvalApproval10', | |||
| name: 'approvalApproval10', | |||
| meta: { | |||
| title: '付款审批', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval10'], resolve) | |||
| },{ | |||
| path: '/onlineHome/approvalApproval11', | |||
| name: 'approvalApproval11', | |||
| meta: { | |||
| title: '付款审批', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval11'], resolve) | |||
| }, | |||
| { | |||
| path: '/onlineHome/approvalApproval12', | |||
| name: 'approvalApproval12', | |||
| meta: { | |||
| title: '付款审批', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval12'], resolve) | |||
| }, | |||
| { | |||
| path: '/onlineHome/approvalModify', | |||
| name: 'approvalModify', | |||
| meta: { | |||
| title: '修改银农支付付款申请', | |||
| title: '修改常用转账申请', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalModify'], resolve) | |||
| }, | |||
| { | |||
| 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', | |||
| meta: { | |||
| title: '付款申请流程', | |||
| @@ -1204,7 +1357,16 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess'], resolve) | |||
| }, | |||
| { | |||
| path: '/collectionList', | |||
| path: '/onlineHome/approvalProcess2', | |||
| name: 'approvalProcess2', | |||
| meta: { | |||
| title: '付款申请流程', | |||
| hidden: true, | |||
| }, | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess2'], resolve) | |||
| }, | |||
| { | |||
| path: '/onlineHome/collectionList', | |||
| name: 'collectionList', | |||
| meta: { | |||
| title: '银农支付收款账户', | |||
| @@ -1213,7 +1375,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionList'], resolve) | |||
| }, | |||
| { | |||
| path: '/collectionAdd', | |||
| path: '/onlineHome/collectionAdd', | |||
| name: 'collectionAdd', | |||
| meta: { | |||
| title: '添加支付收款账户', | |||
| @@ -1222,7 +1384,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionAdd'], resolve) | |||
| }, | |||
| { | |||
| path: '/collectionModify', | |||
| path: '/onlineHome/collectionModify', | |||
| name: 'collectionModify', | |||
| meta: { | |||
| title: '修改支付收款账户', | |||
| @@ -1231,7 +1393,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionModify'], resolve) | |||
| }, | |||
| { | |||
| path: '/collectionDetail', | |||
| path: '/onlineHome/collectionDetail', | |||
| name: 'collectionDetail', | |||
| meta: { | |||
| title: '查看支付收款账户', | |||
| @@ -1240,7 +1402,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/collectionAccount/collectionDetail'], resolve) | |||
| }, | |||
| { | |||
| path: '/paymentAccountList', | |||
| path: '/onlineHome/paymentAccountList', | |||
| name: 'paymentAccountList', | |||
| meta: { | |||
| title: '查看支付收款账户', | |||
| @@ -1249,7 +1411,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountList'], resolve) | |||
| }, | |||
| { | |||
| path: '/paymentAccountAdd', | |||
| path: '/onlineHome/paymentAccountAdd', | |||
| name: 'paymentAccountAdd', | |||
| meta: { | |||
| title: '添加出纳账户设置', | |||
| @@ -1258,7 +1420,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountAdd'], resolve) | |||
| }, | |||
| { | |||
| path: '/paymentAccountModify', | |||
| path: '/onlineHome/paymentAccountModify', | |||
| name: 'paymentAccountModify', | |||
| meta: { | |||
| title: '修改出纳账户设置', | |||
| @@ -1267,7 +1429,7 @@ export const constantRoutes = [ | |||
| component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountModify'], resolve) | |||
| }, | |||
| { | |||
| path: '/paymentAccountDetail', | |||
| path: '/onlineHome/paymentAccountDetail', | |||
| name: 'paymentAccountDetail', | |||
| meta: { | |||
| title: '付款账户详情', | |||
| @@ -24,7 +24,7 @@ | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell center :to="{name:'collectionDetail', query: {id:item.id}}"> | |||
| <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 #label> | |||
| <p>{{item.payeeAccount}}</p> | |||
| @@ -24,7 +24,7 @@ | |||
| <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'}}"> | |||
| <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 #label> | |||
| <p><span><i>¥</i>{{item.balance}}</span></p> | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加常用转账申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -196,7 +197,7 @@ | |||
| </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.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| @@ -219,11 +220,10 @@ | |||
| </van-popup> | |||
| </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;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -243,6 +243,9 @@ | |||
| <script> | |||
| 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 { | |||
| name: "approvalAdd", | |||
| data() { | |||
| @@ -257,8 +260,8 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| @@ -300,15 +303,7 @@ | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| //上传附件 | |||
| uploadAttachmentData: { | |||
| rows: {}, | |||
| visible: false, | |||
| //业务表名 | |||
| tableName: "t_yinnong_transfer", | |||
| //存放目录 默认系统模块 | |||
| bizPath: "upload", | |||
| }, | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -334,6 +329,7 @@ | |||
| status: "N", | |||
| } | |||
| getAccount(params1).then((response) => { | |||
| console.log(response) | |||
| this.payerOptions = response.rows; | |||
| response.rows.map((res,index) => { | |||
| res['payerFrom'] = '1' | |||
| @@ -345,11 +341,6 @@ | |||
| this.getDictionaries(); | |||
| }, | |||
| methods: { | |||
| // 返回布尔值 | |||
| beforeRead(file) { | |||
| console.log(file) | |||
| console.log(this.fileList) | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| @@ -388,28 +379,12 @@ | |||
| } | |||
| }, | |||
| getChange(){ | |||
| console.log(this.buttonType) | |||
| if(this.buttonType == 'update'){ | |||
| console.log('update') | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == 'add'){ | |||
| console.log('add') | |||
| 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(){ | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| @@ -463,10 +438,11 @@ | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| console.log(response) | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| }, | |||
| @@ -537,6 +513,7 @@ | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| @@ -580,31 +557,130 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| } | |||
| }); | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -629,23 +705,51 @@ | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| console.log(this.form) | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| @@ -746,17 +850,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(){ | |||
| window.history.go(-1) | |||
| }, | |||
| deleteChargeItme(index){ | |||
| this.chargeItme.splice(index,1) | |||
| }, | |||
| goUpload(){ | |||
| attach(this.uploadAttachmentData).then((response) => { | |||
| console.log(response) | |||
| }); | |||
| } | |||
| }, | |||
| } | |||
| </script> | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加现金提现申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -59,7 +60,7 @@ | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| label="提现总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| @@ -161,64 +162,19 @@ | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-cell title="收款账户类型"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
| <van-radio name="1">公户</van-radio> | |||
| <van-radio name="2">私户</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="收款方" | |||
| placeholder="请选择" | |||
| v-model="item.payee" | |||
| @click="item.showPayee = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||
| /> | |||
| <van-popup v-model="item.showPayee" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payeeList" | |||
| @confirm="onConfirmPayee($event,index)" | |||
| @cancel="item.showPayee = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| v-model="item.bankTypeText" | |||
| @click="item.showbankType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||
| /> | |||
| <van-popup v-model="item.showbankType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="bankTypeDictionaries" | |||
| @confirm="onConfirmBankType($event,index)" | |||
| @cancel="item.showbankType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" label="提款人" placeholder="请输入提款人" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入提款金额' }]" v-model="item.incomeAmount" type="number" label="提款金额(元)" placeholder="请输入提款金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -238,6 +194,14 @@ | |||
| <script> | |||
| 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"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalAdd10", | |||
| data() { | |||
| @@ -252,11 +216,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -291,9 +255,10 @@ | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| ynType:'2' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -328,6 +293,7 @@ | |||
| }) | |||
| }); | |||
| this.getDictionaries(); | |||
| this.addChargeItme(); | |||
| }, | |||
| methods: { | |||
| // 表单重置 | |||
| @@ -338,7 +304,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| cashType: '10', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -368,30 +334,21 @@ | |||
| } | |||
| }, | |||
| getChange(){ | |||
| console.log(this.buttonType) | |||
| if(this.buttonType == 'update'){ | |||
| console.log('update') | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == 'add'){ | |||
| console.log('add') | |||
| this.goAdd(); | |||
| } | |||
| }, | |||
| getDictionaries(){ | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| for (let i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getPayeeList(); | |||
| }, | |||
| getError(e){ | |||
| console.log(e) | |||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
| }, | |||
| addChargeItme(index){ | |||
| @@ -399,27 +356,23 @@ | |||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
| this.$notify({ type: 'danger', message: '请输入提款金额!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].drawer == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入提款人!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].remark == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入资金用途!' }); | |||
| return; | |||
| } | |||
| this.getDicts("bank_type").then(res => { | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payee: "", //收款方全称 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| drawer: "", //提款人 | |||
| incomeAmount: "", //提款金额 | |||
| bankType: "", //资金用途 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| @@ -438,7 +391,7 @@ | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| let actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| @@ -528,7 +481,7 @@ | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| }, | |||
| goAdd(){ | |||
| /*goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| @@ -551,7 +504,7 @@ | |||
| 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 => { | |||
| addCash(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| @@ -572,6 +525,99 @@ | |||
| }) | |||
| } | |||
| }); | |||
| },*/ | |||
| goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }) | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -592,28 +638,64 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }); | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| @@ -713,6 +795,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_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) | |||
| }, | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加现金使用申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -59,7 +60,7 @@ | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| label="使用总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| @@ -157,76 +158,31 @@ | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field :rules="[{ required: true , message:'可用余额不能为空' }]" required label="可用余额(元)" v-model="form.payerAccount" placeholder="请输入可用余额" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-cell title="收款账户类型"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
| <van-radio name="1">公户</van-radio> | |||
| <van-radio name="2">私户</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field | |||
| 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> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <!-- @click="goUpdate"--> | |||
| <!-- @click="goUpdate"--> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <!-- @click="goAdd"--> | |||
| <!-- @click="goAdd"--> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| @@ -237,7 +193,15 @@ | |||
| </template> | |||
| <script> | |||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import { | |||
| addCash, | |||
| addCashdetail, attachmentList, | |||
| commonAttach, listAccount, | |||
| updateCash | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalAdd11", | |||
| data() { | |||
| @@ -252,11 +216,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -291,9 +255,10 @@ | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| ynType:'2' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -314,11 +279,13 @@ | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| accountType: "102", | |||
| let queryParamsOld={ | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| accountType: "101", | |||
| status: "N", | |||
| } | |||
| getAccount(params1).then((response) => { | |||
| listAccount(queryParamsOld).then((response) => { | |||
| this.payerOptions = response.rows; | |||
| response.rows.map((res,index) => { | |||
| res['payerFrom'] = '1' | |||
| @@ -328,6 +295,7 @@ | |||
| }) | |||
| }); | |||
| this.getDictionaries(); | |||
| this.addChargeItme(); | |||
| }, | |||
| methods: { | |||
| // 表单重置 | |||
| @@ -338,7 +306,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| cashType: '11', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -364,34 +332,25 @@ | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| ynType:'2' | |||
| } | |||
| }, | |||
| getChange(){ | |||
| console.log(this.buttonType) | |||
| if(this.buttonType == 'update'){ | |||
| console.log('update') | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == 'add'){ | |||
| console.log('add') | |||
| this.goAdd(); | |||
| } | |||
| }, | |||
| getDictionaries(){ | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| for (let i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getPayeeList(); | |||
| }, | |||
| getError(e){ | |||
| console.log(e) | |||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
| }, | |||
| addChargeItme(index){ | |||
| @@ -399,27 +358,23 @@ | |||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
| this.$notify({ type: 'danger', message: '请输入提款金额!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].drawer == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入提款人!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].remark == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入资金用途!' }); | |||
| return; | |||
| } | |||
| this.getDicts("bank_type").then(res => { | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payee: "", //收款方全称 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| drawer: "", //提款人 | |||
| incomeAmount: "", //提款金额 | |||
| bankType: "", //资金用途 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| @@ -438,7 +393,7 @@ | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| let actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| @@ -516,17 +471,44 @@ | |||
| }, | |||
| // 钱计算 | |||
| moneyChange(input) { | |||
| console.log(input) | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| if(this.form.cashType=='11'){ | |||
| console.log(input) | |||
| if(this.form.payerAccount==0){ | |||
| this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||
| this.chargeItme = [] | |||
| this.addChargeItme(); | |||
| return false; | |||
| }else { | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| if(parseFloat(this.form.payerAccount)<parseFloat(this.form.expenditureAmount)){ | |||
| this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||
| this.form.expenditureAmount="" | |||
| this.chargeItme = [] | |||
| this.addChargeItme(); | |||
| return false; | |||
| } | |||
| } | |||
| }else{ | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| } | |||
| }, | |||
| goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -547,31 +529,79 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }) | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| } | |||
| }); | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -592,28 +622,64 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }); | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| @@ -672,7 +738,7 @@ | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "payerAccount", obj.balance); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| @@ -703,16 +769,38 @@ | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| this.$set(this.form, "payerAccount", obj.balance); | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加汇票支出申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -56,15 +57,7 @@ | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| @@ -133,21 +126,21 @@ | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <p class="main_title">出票方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| label="出票方" | |||
| placeholder="请选择出票方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| :rules="[{ required: true , message:'请选择出票方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| @@ -157,68 +150,76 @@ | |||
| @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> | |||
| <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> | |||
| <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 | |||
| readonly | |||
| clickable | |||
| label="收款方" | |||
| placeholder="请选择" | |||
| v-model="item.payee" | |||
| @click="item.showPayee = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||
| /> | |||
| <van-popup v-model="item.showPayee" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payeeList" | |||
| @confirm="onConfirmPayee($event,index)" | |||
| @cancel="item.showPayee = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| v-model="item.bankTypeText" | |||
| @click="item.showbankType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||
| /> | |||
| <van-popup v-model="item.showbankType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="bankTypeDictionaries" | |||
| @confirm="onConfirmBankType($event,index)" | |||
| @cancel="item.showbankType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'收款方不能为空' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'联系方式不能为空' }]" v-model="item.phone" label="联系方式" placeholder="请输入联系方式" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'所属单位补鞥你为空' }]" v-model="item.unit" label="所属单位" placeholder="请输入所属单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'负责人全称不能为空' }]" v-model="item.leader" label="负责人全称" placeholder="请输入负责人全称" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -238,6 +239,14 @@ | |||
| <script> | |||
| 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"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalAdd12", | |||
| data() { | |||
| @@ -252,11 +261,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| minDate: new Date(2000, 10, 1), | |||
| maxDate: new Date(2050, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -293,7 +302,9 @@ | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| orderTypeName:'', | |||
| orderTypeOptions:[] | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -314,16 +325,20 @@ | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDicts("order_type").then(response => { | |||
| this.orderTypeOptions = response.data; | |||
| }); | |||
| let params1={ | |||
| accountType: "102", | |||
| status: "N", | |||
| pageNum: 1, | |||
| pageSize: 1000, | |||
| } | |||
| getAccount(params1).then((response) => { | |||
| listMoneyorder(params1).then((response) => { | |||
| console.log(response) | |||
| this.payerOptions = response.rows; | |||
| response.rows.map((res,index) => { | |||
| res['payerFrom'] = '1' | |||
| res['payerFrom'] = '12' | |||
| console.log(res) | |||
| this.payerOptions[index].text = res.accountName; | |||
| this.payerOptions[index].text = res.billReceiveUnit; | |||
| this.payerOptions[index].value = res.id; | |||
| }) | |||
| }); | |||
| @@ -338,7 +353,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| cashType: '12', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -364,7 +379,7 @@ | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| ynType:'3' | |||
| } | |||
| }, | |||
| getChange(){ | |||
| @@ -379,15 +394,10 @@ | |||
| }, | |||
| getDictionaries(){ | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| for (let i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getPayeeList(); | |||
| }, | |||
| getError(e){ | |||
| @@ -398,31 +408,17 @@ | |||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
| return; | |||
| } | |||
| this.getDicts("bank_type").then(res => { | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| bankTypeText:"", //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| @@ -438,7 +434,7 @@ | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| let actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| @@ -492,11 +488,50 @@ | |||
| this.chargeItme[index].bankType = data.value; | |||
| this.chargeItme[index].showbankType = false; | |||
| }, | |||
| onConfirmPayer(data){ | |||
| this.form.payer = data.text; | |||
| this.form.cashierId = data.value; | |||
| onConfirmPayer(select){ | |||
| 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){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| @@ -547,31 +582,79 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }) | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| } | |||
| }); | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -592,28 +675,64 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }); | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| @@ -713,6 +832,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_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) | |||
| }, | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加信用卡转账申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -194,31 +195,26 @@ | |||
| @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 required readonly :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
| <van-field required readonly :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| placeholder="请选择收款方" | |||
| v-model="item.bankTypeText" | |||
| @click="item.showbankType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| 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> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -238,6 +234,9 @@ | |||
| <script> | |||
| 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 { | |||
| name: "approvalAdd2", | |||
| data() { | |||
| @@ -252,11 +251,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -293,7 +292,8 @@ | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -322,7 +322,6 @@ | |||
| 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; | |||
| }) | |||
| @@ -338,7 +337,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| transferType: '2', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -368,12 +367,9 @@ | |||
| } | |||
| }, | |||
| getChange(){ | |||
| console.log(this.buttonType) | |||
| if(this.buttonType == 'update'){ | |||
| console.log('update') | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == 'add'){ | |||
| console.log('add') | |||
| this.goAdd(); | |||
| } | |||
| }, | |||
| @@ -391,7 +387,6 @@ | |||
| this.getPayeeList(); | |||
| }, | |||
| getError(e){ | |||
| console.log(e) | |||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
| }, | |||
| addChargeItme(index){ | |||
| @@ -418,27 +413,30 @@ | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| bankType: "", //所属银行 | |||
| bankTypeText:"", //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| //信用卡转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| console.log(this.queryParams) | |||
| listPayee(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| if(res.payeeType==4){ | |||
| res.text = res.payee | |||
| res.value = res.id | |||
| this.payeeList.push(res) | |||
| } | |||
| }) | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| let actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| @@ -459,7 +457,6 @@ | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| @@ -476,21 +473,24 @@ | |||
| this.showproject = false; | |||
| }, | |||
| 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[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.chargeItme[index].showpayee = false; | |||
| this.payeeSelectChange(data.value , index) | |||
| this.onConfirmBankType(data,index) | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showbankType = false; | |||
| } | |||
| this.chargeItme[index].bankTypeText = data.text; | |||
| this.chargeItme[index].bankType = data.value; | |||
| this.chargeItme[index].showbankType = false; | |||
| console.log(this.bankTypeDictionaries) | |||
| this.bankTypeDictionaries.map(res => { | |||
| if(res.value==data.bankType){ | |||
| this.chargeItme[index].bankTypeText = res.text; | |||
| this.chargeItme[index].bankType = res.value; | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmPayer(data){ | |||
| this.form.payer = data.text; | |||
| @@ -504,19 +504,21 @@ | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| if(res.payeeType==4){ | |||
| res.text = res.payee | |||
| res.value = res.id | |||
| this.payeeList.push(res) | |||
| } | |||
| }) | |||
| }); | |||
| }, | |||
| // 钱计算 | |||
| moneyChange(input) { | |||
| console.log(input) | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| @@ -547,31 +549,130 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| } | |||
| }); | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -596,28 +697,59 @@ | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| console.log(this.form) | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| console.log(this.payeeList) | |||
| console.log(select,i) | |||
| console.log(this.chargeItme) | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| @@ -713,6 +845,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(){ | |||
| window.history.go(-1) | |||
| }, | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加虚拟挂账申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -194,31 +195,25 @@ | |||
| @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 required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| 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" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -238,6 +233,14 @@ | |||
| <script> | |||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import { | |||
| attachmentList, | |||
| commonAttach, | |||
| listTaccount, | |||
| listVaccount | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalAdd3", | |||
| data() { | |||
| @@ -252,11 +255,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -291,9 +294,10 @@ | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| ynType:'2' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -315,16 +319,17 @@ | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| 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) => { | |||
| 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(); | |||
| @@ -338,7 +343,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| transferType: '3', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -418,23 +423,29 @@ | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| bankType: "", //所属银行 | |||
| bankTypeText: "", //所属银行 | |||
| 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; | |||
| }) | |||
| 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) { | |||
| @@ -476,42 +487,55 @@ | |||
| this.showproject = false; | |||
| }, | |||
| 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[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.chargeItme[index].showpayee = false; | |||
| this.payeeSelectChange(data.value , index) | |||
| this.onConfirmBankType(data,index); | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showbankType = false; | |||
| } | |||
| this.chargeItme[index].bankTypeText = data.text; | |||
| this.chargeItme[index].bankType = data.value; | |||
| this.chargeItme[index].showbankType = false; | |||
| this.bankTypeDictionaries.map(res => { | |||
| if(res.value==data.bankType){ | |||
| this.chargeItme[index].bankTypeText = res.text; | |||
| this.chargeItme[index].bankType = res.value; | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmPayer(data){ | |||
| console.log(data) | |||
| this.form.payer = data.text; | |||
| this.form.cashierId = data.value; | |||
| this.form.payerAccount = data.payeeAccount; | |||
| this.showpayer = false; | |||
| this.selectChange(data.value) | |||
| this.accountTypeChange(); | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.chargeItme = []; | |||
| 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, | |||
| taccountId:this.form.cashierId | |||
| } | |||
| listVaccount(params).then(response => { | |||
| console.log(response) | |||
| if(response.rows.length>0){ | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| // 钱计算 | |||
| @@ -547,31 +571,130 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| } | |||
| }); | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -596,23 +719,51 @@ | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| console.log(this.form) | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| @@ -713,6 +864,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(){ | |||
| window.history.go(-1) | |||
| }, | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加虚拟转账申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -196,7 +197,7 @@ | |||
| </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.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| @@ -209,16 +210,12 @@ | |||
| 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" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -238,6 +235,14 @@ | |||
| <script> | |||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| attachmentList, | |||
| commonAttach, | |||
| listVaccount, | |||
| listVaccount1 | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalAdd4", | |||
| data() { | |||
| @@ -252,11 +257,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -293,7 +298,8 @@ | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -315,15 +321,15 @@ | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| accountType: "102", | |||
| status: "N", | |||
| villageAccountType:'1', | |||
| "params":{townAccountType:'1'} | |||
| } | |||
| getAccount(params1).then((response) => { | |||
| listVaccount1(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].text = res.payee; | |||
| this.payerOptions[index].value = res.id; | |||
| }) | |||
| }); | |||
| @@ -338,7 +344,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| transferType: '4', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -418,8 +424,8 @@ | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| bankType: "", //所属银行 | |||
| bankTypeText:'', //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| @@ -476,21 +482,23 @@ | |||
| this.showproject = false; | |||
| }, | |||
| 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[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.chargeItme[index].showpayee = false; | |||
| this.payeeSelectChange(data.value , index) | |||
| this.onConfirmBankType(data,index) | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showbankType = false; | |||
| } | |||
| this.chargeItme[index].bankTypeText = data.text; | |||
| this.chargeItme[index].bankType = data.value; | |||
| this.chargeItme[index].showbankType = false; | |||
| console.log(this.bankTypeDictionaries) | |||
| this.bankTypeDictionaries.map(res => { | |||
| if(res.value==data.bankType){ | |||
| this.chargeItme[index].bankTypeText = res.text; | |||
| this.chargeItme[index].bankType = res.value; | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmPayer(data){ | |||
| this.form.payer = data.text; | |||
| @@ -504,6 +512,7 @@ | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| @@ -547,31 +556,130 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| } | |||
| }); | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -596,23 +704,51 @@ | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| console.log(this.form) | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| @@ -665,53 +801,42 @@ | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| console.log(obj) | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "payer", obj.payee); | |||
| this.$set(this.form, "payerAccount", obj.payeeAccount); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">添加付款申请</p> | |||
| <p style="font-weight: bold;">添加母子转账申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -194,31 +195,26 @@ | |||
| @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 required :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| placeholder="请选择收款方" | |||
| v-model="item.bankTypeText" | |||
| @click="item.showbankType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| 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> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -238,6 +234,14 @@ | |||
| <script> | |||
| import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| attachmentList, | |||
| commonAttach, | |||
| listTaccount, | |||
| listVaccount | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalAdd5", | |||
| data() { | |||
| @@ -252,11 +256,11 @@ | |||
| buttonType:'a', | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -293,7 +297,8 @@ | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -304,27 +309,29 @@ | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| 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.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.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| 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) => { | |||
| 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(); | |||
| @@ -338,7 +345,7 @@ | |||
| downId: null, | |||
| orderId: null, | |||
| cashierId: null, | |||
| transferType: '1', | |||
| transferType: '5', | |||
| accountType: '2', | |||
| explainSituation: null, | |||
| succeedAmount: null, | |||
| @@ -388,7 +395,7 @@ | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| }); | |||
| this.getPayeeList(); | |||
| }, | |||
| getError(e){ | |||
| console.log(e) | |||
| @@ -418,27 +425,34 @@ | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| bankType: "", //所属银行 | |||
| bankTypeText:"", //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| }); | |||
| this.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; | |||
| }) | |||
| }); | |||
| if(this.form.cashierId==null||this.form.cashierId==""){ | |||
| this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
| return; | |||
| }else { | |||
| this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
| listVaccount(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| let actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| @@ -476,27 +490,32 @@ | |||
| this.showproject = false; | |||
| }, | |||
| 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[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.chargeItme[index].showpayee = false; | |||
| this.payeeSelectChange(data.value , index) | |||
| this.onConfirmBankType(data,index); | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showbankType = false; | |||
| } | |||
| this.chargeItme[index].bankTypeText = data.text; | |||
| this.chargeItme[index].bankType = data.value; | |||
| this.chargeItme[index].showbankType = false; | |||
| console.log(this.bankTypeDictionaries) | |||
| this.bankTypeDictionaries.map(res => { | |||
| if(res.value==data.bankType){ | |||
| this.chargeItme[index].bankTypeText = res.text; | |||
| this.chargeItme[index].bankType = res.value; | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmPayer(data){ | |||
| console.log(data) | |||
| this.form.payer = data.text; | |||
| this.form.cashierId = data.value; | |||
| this.form.payerAccount = data.payeeAccount; | |||
| this.showpayer = false; | |||
| this.selectChange(data.value) | |||
| // this.selectChange(data.value) | |||
| this.accountTypeChange(); | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| @@ -504,15 +523,22 @@ | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| if(this.form.cashierId==null||this.form.cashierId==""){ | |||
| this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
| return; | |||
| }else { | |||
| this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
| console.log(this.queryParams) | |||
| listVaccount(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| // 钱计算 | |||
| moneyChange(input) { | |||
| @@ -547,31 +573,130 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| } | |||
| }); | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| addTransfer(this.form).then(response => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(response.data.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -596,23 +721,51 @@ | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| console.log(this.form) | |||
| addTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| @@ -713,6 +866,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(){ | |||
| window.history.go(-1) | |||
| }, | |||
| @@ -4,7 +4,7 @@ | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| @click-left="backDone" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">付款审批</p> | |||
| @@ -57,7 +57,15 @@ | |||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
| <van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
| </div> | |||
| <p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
| <van-cell v-for="(item,index) in fileList" :key="index"> | |||
| <a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
| </van-cell> | |||
| <div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
| <van-row type="flex" justify="space-between" align="center"> | |||
| <van-col span="5">审批<br/>意见</van-col> | |||
| @@ -85,6 +93,8 @@ | |||
| <script> | |||
| import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , approval } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import {attachmentList, systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| export default { | |||
| name: "approvalApproval", | |||
| data() { | |||
| @@ -96,8 +106,8 @@ | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| @@ -137,6 +147,8 @@ | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| // 审核意见默认值 | |||
| pass: "true", | |||
| comment: "同意", | |||
| @@ -161,8 +173,16 @@ | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| backDone(){ | |||
| if(this.$route.query.type != 'done'){ | |||
| this.$router.push({name:'onlineHomeDone',query: {activeName:'1'}}) | |||
| }else{ | |||
| this.$router.push({name:'onlineHomeDone',query: {activeName:'2'}}) | |||
| } | |||
| }, | |||
| goFlow(){ | |||
| window.location='approvalProcess?id='+this.$route.query.id; | |||
| }, | |||
| @@ -212,6 +232,38 @@ | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| const data = { | |||
| @@ -0,0 +1,501 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">现金提现申请审批</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="提现总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息</p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="提款金额(元)" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
| <van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
| </div> | |||
| <p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
| <van-cell v-for="(item,index) in fileList" :key="index"> | |||
| <a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
| </van-cell> | |||
| <div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
| <van-row type="flex" justify="space-between" align="center"> | |||
| <van-col span="5">审批<br/>意见</van-col> | |||
| <van-col span="19"> | |||
| <van-radio-group v-model="pass" direction="horizontal"> | |||
| <van-radio name="true">同意</van-radio> | |||
| <van-radio name="false">驳回</van-radio> | |||
| </van-radio-group> | |||
| <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
| </van-col> | |||
| </van-row> | |||
| </div> | |||
| <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
| <van-row> | |||
| <van-col span="24" align="center"> | |||
| <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getCash , listCashdetailByCashId , listPayee , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import {approval, attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail10", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2050, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'2' | |||
| }, | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| // 审核意见默认值 | |||
| pass: "true", | |||
| comment: "同意", | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess2?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getCash(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| console.log(this.$route.query.id) | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response.data) | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| //删除家庭成员 | |||
| deleteChargeItme(index){ | |||
| this.chargeItme.splice(index,1) | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| const data = { | |||
| taskId: this.$route.query.taskId, | |||
| instanceId: this.form.instanceId, | |||
| variables: JSON.stringify({ | |||
| comment: this.comment, | |||
| pass: this.pass, | |||
| }), | |||
| }; | |||
| console.log(data); | |||
| approval(data).then((response) => { | |||
| if(response.code==200 && response.msg=="操作成功"){ | |||
| this.$toast.success("操作成功"); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } else{ | |||
| this.$toast.success("操作失败"); | |||
| } | |||
| }); | |||
| }, | |||
| },watch: { | |||
| pass: function (val) { | |||
| this.comment = val === "true" ? "同意" : "驳回"; | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| .deleteFamily{ | |||
| position: absolute; | |||
| top: 0rem; | |||
| right: 6%; | |||
| z-index: 9; | |||
| border-radius: 50%; | |||
| } | |||
| .examine_box{ | |||
| background-color: #1D6FE9!important; | |||
| padding: 0.18rem!important; | |||
| padding-left: 0!important; | |||
| border-radius: 0.15rem!important; | |||
| margin-top: 0.3rem!important; | |||
| } | |||
| .examine_box .van-col:first-child{ | |||
| color: #FFF!important; | |||
| font-size: 0.45rem!important; | |||
| text-align: center!important; | |||
| } | |||
| .examine_box .van-col:last-child{ | |||
| background-color: #FFF!important; | |||
| border-radius: 0.15rem!important; | |||
| overflow: hidden!important; | |||
| .van-radio-group--horizontal{ | |||
| padding: 0.2rem 0; | |||
| border-bottom: 1px solid #eee; | |||
| } | |||
| } | |||
| /deep/.van-radio--horizontal{ | |||
| margin-left: 20px; | |||
| margin-right: 0; | |||
| } | |||
| </style> | |||
| @@ -0,0 +1,506 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">现金使用申请审批</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息</p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="提款金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
| <van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
| </div> | |||
| <p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
| <van-cell v-for="(item,index) in fileList" :key="index"> | |||
| <a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
| </van-cell> | |||
| <div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
| <van-row type="flex" justify="space-between" align="center"> | |||
| <van-col span="5">审批<br/>意见</van-col> | |||
| <van-col span="19"> | |||
| <van-radio-group v-model="pass" direction="horizontal"> | |||
| <van-radio name="true">同意</van-radio> | |||
| <van-radio name="false">驳回</van-radio> | |||
| </van-radio-group> | |||
| <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
| </van-col> | |||
| </van-row> | |||
| </div> | |||
| <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
| <van-row> | |||
| <van-col span="24" align="center"> | |||
| <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import { | |||
| approval, | |||
| attachmentList, | |||
| commonAttach, | |||
| getCash, | |||
| listCashdetailByCashId | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail11", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| // 审核意见默认值 | |||
| pass: "true", | |||
| comment: "同意", | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess2?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getCash(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| console.log(this.$route.query.id) | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response) | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| //删除家庭成员 | |||
| deleteChargeItme(index){ | |||
| this.chargeItme.splice(index,1) | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| const data = { | |||
| taskId: this.$route.query.taskId, | |||
| instanceId: this.form.instanceId, | |||
| variables: JSON.stringify({ | |||
| comment: this.comment, | |||
| pass: this.pass, | |||
| }), | |||
| }; | |||
| console.log(data); | |||
| approval(data).then((response) => { | |||
| if(response.code==200 && response.msg=="操作成功"){ | |||
| this.$toast.success("操作成功"); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } else{ | |||
| this.$toast.success("操作失败"); | |||
| } | |||
| }); | |||
| }, | |||
| },watch: { | |||
| pass: function (val) { | |||
| this.comment = val === "true" ? "同意" : "驳回"; | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| .deleteFamily{ | |||
| position: absolute; | |||
| top: 0rem; | |||
| right: 6%; | |||
| z-index: 9; | |||
| border-radius: 50%; | |||
| } | |||
| .examine_box{ | |||
| background-color: #1D6FE9!important; | |||
| padding: 0.18rem!important; | |||
| padding-left: 0!important; | |||
| border-radius: 0.15rem!important; | |||
| margin-top: 0.3rem!important; | |||
| } | |||
| .examine_box .van-col:first-child{ | |||
| color: #FFF!important; | |||
| font-size: 0.45rem!important; | |||
| text-align: center!important; | |||
| } | |||
| .examine_box .van-col:last-child{ | |||
| background-color: #FFF!important; | |||
| border-radius: 0.15rem!important; | |||
| overflow: hidden!important; | |||
| .van-radio-group--horizontal{ | |||
| padding: 0.2rem 0; | |||
| border-bottom: 1px solid #eee; | |||
| } | |||
| } | |||
| /deep/.van-radio--horizontal{ | |||
| margin-left: 20px; | |||
| margin-right: 0; | |||
| } | |||
| </style> | |||
| @@ -0,0 +1,569 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">汇票支出申请审批</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">出票方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| label="出票金额(元)" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'出票金额不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="汇票类型" | |||
| v-model="orderTypeName" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="汇票类型" | |||
| v-model="form.orderType" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| style="display: none" | |||
| required | |||
| :rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="开票日" | |||
| v-model="form.startTime" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'开票日不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="到期日" | |||
| v-model="form.endTime" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'到期日不能为空!' }]" | |||
| /> | |||
| </div> | |||
| <p class="main_title">收票方信息</p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
| <van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
| </div> | |||
| <p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p> | |||
| <van-cell v-for="(item,index) in fileList" :key="index"> | |||
| <a :href="item.url">{{index+1}}.{{item.fileName}}</a> | |||
| </van-cell> | |||
| <div class="main_box examine_box" v-if="this.$route.query.type != 'done'"> | |||
| <van-row type="flex" justify="space-between" align="center"> | |||
| <van-col span="5">审批<br/>意见</van-col> | |||
| <van-col span="19"> | |||
| <van-radio-group v-model="pass" direction="horizontal"> | |||
| <van-radio name="true">同意</van-radio> | |||
| <van-radio name="false">驳回</van-radio> | |||
| </van-radio-group> | |||
| <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/> | |||
| </van-col> | |||
| </van-row> | |||
| </div> | |||
| <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'"> | |||
| <van-row> | |||
| <van-col span="24" align="center"> | |||
| <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import { | |||
| approval, | |||
| attachmentList, | |||
| commonAttach, | |||
| getCash, | |||
| listCashdetailByCashId | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail12", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| orderTypeName:'', | |||
| orderTypeOptions:[], | |||
| // 审核意见默认值 | |||
| pass: "true", | |||
| comment: "同意", | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDicts("order_type").then(response => { | |||
| this.orderTypeOptions = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess2?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getCash(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| this.orderTypeOptions.map(res => { | |||
| console.log(this.orderTypeOptions) | |||
| if(res.dictValue==this.form.orderType){ | |||
| this.orderTypeName = res.dictLabel | |||
| } | |||
| }) | |||
| }); | |||
| console.log(this.$route.query.id) | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response.data) | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| //删除家庭成员 | |||
| deleteChargeItme(index){ | |||
| this.chargeItme.splice(index,1) | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| const data = { | |||
| taskId: this.$route.query.taskId, | |||
| instanceId: this.form.instanceId, | |||
| variables: JSON.stringify({ | |||
| comment: this.comment, | |||
| pass: this.pass, | |||
| }), | |||
| }; | |||
| console.log(data); | |||
| approval(data).then((response) => { | |||
| if(response.code==200 && response.msg=="操作成功"){ | |||
| this.$toast.success("操作成功"); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } else{ | |||
| this.$toast.success("操作失败"); | |||
| } | |||
| }); | |||
| }, | |||
| },watch: { | |||
| pass: function (val) { | |||
| this.comment = val === "true" ? "同意" : "驳回"; | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| .deleteFamily{ | |||
| position: absolute; | |||
| top: 0rem; | |||
| right: 6%; | |||
| z-index: 9; | |||
| border-radius: 50%; | |||
| } | |||
| .examine_box{ | |||
| background-color: #1D6FE9!important; | |||
| padding: 0.18rem!important; | |||
| padding-left: 0!important; | |||
| border-radius: 0.15rem!important; | |||
| margin-top: 0.3rem!important; | |||
| } | |||
| .examine_box .van-col:first-child{ | |||
| color: #FFF!important; | |||
| font-size: 0.45rem!important; | |||
| text-align: center!important; | |||
| } | |||
| .examine_box .van-col:last-child{ | |||
| background-color: #FFF!important; | |||
| border-radius: 0.15rem!important; | |||
| overflow: hidden!important; | |||
| .van-radio-group--horizontal{ | |||
| padding: 0.2rem 0; | |||
| border-bottom: 1px solid #eee; | |||
| } | |||
| } | |||
| /deep/.van-radio--horizontal{ | |||
| margin-left: 20px; | |||
| margin-right: 0; | |||
| } | |||
| </style> | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">查看付款申请</p> | |||
| <p style="font-weight: bold;">查看常用转账申请</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| @@ -42,7 +42,7 @@ | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">列表信息</p> | |||
| <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" /> | |||
| @@ -57,11 +57,22 @@ | |||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
| <van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import { | |||
| attachmentList, | |||
| commonAttach, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail", | |||
| data() { | |||
| @@ -77,7 +88,7 @@ | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| @@ -135,6 +146,7 @@ | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| @@ -348,6 +360,38 @@ | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| @@ -0,0 +1,422 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">查看现金提现申请</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="提现总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息</p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="提款金额(元)" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :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:'2' | |||
| }, | |||
| projectFundType:'', | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess2?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getCash(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| console.log(this.$route.query.id) | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response.data) | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| //删除家庭成员 | |||
| deleteChargeItme(index){ | |||
| this.chargeItme.splice(index,1) | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 80%; | |||
| margin: 0 auto; | |||
| background-color: #1D6FE9; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| .deleteFamily{ | |||
| position: absolute; | |||
| top: 0rem; | |||
| right: 6%; | |||
| z-index: 9; | |||
| border-radius: 50%; | |||
| } | |||
| </style> | |||
| @@ -0,0 +1,426 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">查看现金使用申请</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息</p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="提款金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :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='approvalProcess2?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getCash(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| console.log(this.$route.query.id) | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response) | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
| 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,489 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">查看汇票支出申请</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">出票方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| label="出票金额(元)" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'出票金额不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="汇票类型" | |||
| v-model="orderTypeName" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="汇票类型" | |||
| v-model="form.orderType" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| style="display: none" | |||
| required | |||
| :rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="开票日" | |||
| v-model="form.startTime" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'开票日不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="到期日" | |||
| v-model="form.endTime" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'到期日不能为空!' }]" | |||
| /> | |||
| </div> | |||
| <p class="main_title">收票方信息</p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :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:'', | |||
| orderTypeName:'', | |||
| orderTypeOptions:[] | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDicts("order_type").then(response => { | |||
| this.orderTypeOptions = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess2?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getCash(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| this.orderTypeOptions.map(res => { | |||
| console.log(this.orderTypeOptions) | |||
| if(res.dictValue==this.form.orderType){ | |||
| this.orderTypeName = res.dictLabel | |||
| } | |||
| }) | |||
| }); | |||
| console.log(this.$route.query.id) | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response.data) | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
| 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,442 @@ | |||
| <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, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| 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) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,442 @@ | |||
| <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, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getTransfer(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '1' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
| } | |||
| this.chargeItme = response.rows; | |||
| }); | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,442 @@ | |||
| <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, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getTransfer(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '1' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
| } | |||
| this.chargeItme = response.rows; | |||
| }); | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,430 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">查看母子转账申请</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | |||
| </template> | |||
| </van-nav-bar> | |||
| <p class="main_title">基础信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> | |||
| <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | |||
| <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> | |||
| <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | |||
| <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">列表信息</p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
| <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
| <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request' | |||
| import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalDetail", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| fileList:[], | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| console.log(response) | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| goFlow(){ | |||
| window.location='approvalProcess?id='+this.$route.query.id; | |||
| }, | |||
| getDictionaries(){ | |||
| getTransfer(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '1' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
| } | |||
| this.chargeItme = response.rows; | |||
| }); | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| addChargeItme(index){ | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| console.log(data) | |||
| this.projectList.map(res => { | |||
| console.log(res) | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| console.log(this.projectForm) | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data){ | |||
| // this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payee = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].payeeId = data.value; | |||
| console.log(this.chargeItme) | |||
| this.showpayee = false; | |||
| }, | |||
| onConfirmBankType(data){ | |||
| console.log(this.chargeItme) | |||
| this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||
| this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||
| this.showbankType = false; | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| console.log(e) | |||
| this.payeeList = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| }, | |||
| goAdd(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| goUpdate(){ | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$toast.error("付款事由禁止包含|。"); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$toast.error('请选择项目名称!'); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$toast.error('请输入工程发票号!'); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| //删除家庭成员 | |||
| deleteChargeItme(index){ | |||
| this.chargeItme.splice(index,1) | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 2% 0; | |||
| } | |||
| .main_title{ | |||
| font-size: 0.4rem; | |||
| color: #1D6FE9; | |||
| margin: 0.2rem 6%; | |||
| position: relative; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| } | |||
| .submitButton{ | |||
| width: 80%; | |||
| margin: 0 auto; | |||
| background-color: #1D6FE9; | |||
| } | |||
| .addFamily{ | |||
| position: absolute; | |||
| top: -2px; | |||
| right: 0; | |||
| border-radius: 50%; | |||
| } | |||
| .deleteFamily{ | |||
| position: absolute; | |||
| top: 0rem; | |||
| right: 6%; | |||
| z-index: 9; | |||
| border-radius: 50%; | |||
| } | |||
| </style> | |||
| @@ -19,15 +19,17 @@ | |||
| v-model="loading" | |||
| :finished="finished" | |||
| finished-text="没有更多了" | |||
| @load="getList" | |||
| > | |||
| @load="getList"> | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <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 #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> | |||
| </van-cell> | |||
| <template #right> | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail10', query: {id:item.id}}"> | |||
| <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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-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> | |||
| 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 { | |||
| name: "approvalList10", | |||
| data() { | |||
| @@ -101,7 +101,7 @@ export default { | |||
| .then(() => { | |||
| // on confirm | |||
| this.applicationList.splice(index,1) | |||
| delTransfer(id).then(res => { | |||
| delCash(id).then(res => { | |||
| if(res.code = 200){ | |||
| this.$toast.success('删除成功'); | |||
| } | |||
| @@ -116,7 +116,8 @@ export default { | |||
| message: '您确认提交草稿?', | |||
| }) | |||
| .then(() => { | |||
| customSubmit(id).then(res => { | |||
| console.log(id) | |||
| cashSubmit(id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(0) | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail11', query: {id:item.id}}"> | |||
| <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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-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> | |||
| 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 { | |||
| name: "approvalList11", | |||
| data() { | |||
| @@ -101,7 +101,7 @@ export default { | |||
| .then(() => { | |||
| // on confirm | |||
| this.applicationList.splice(index,1) | |||
| delTransfer(id).then(res => { | |||
| delCash(id).then(res => { | |||
| if(res.code = 200){ | |||
| this.$toast.success('删除成功'); | |||
| } | |||
| @@ -116,7 +116,7 @@ export default { | |||
| message: '您确认提交草稿?', | |||
| }) | |||
| .then(() => { | |||
| customSubmit(id).then(res => { | |||
| cashSubmit(id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(0) | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail12', query: {id:item.id}}"> | |||
| <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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-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> | |||
| 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 { | |||
| name: "approvalList12", | |||
| data() { | |||
| @@ -61,7 +61,7 @@ export default { | |||
| finished: false, | |||
| queryParams:{ | |||
| pageNum:1, | |||
| pageSize:10, | |||
| pageSize:100, | |||
| cashType: '12', | |||
| } | |||
| }; | |||
| @@ -101,7 +101,7 @@ export default { | |||
| .then(() => { | |||
| // on confirm | |||
| this.applicationList.splice(index,1) | |||
| delTransfer(id).then(res => { | |||
| delCash33333333333333(id).then(res => { | |||
| if(res.code = 200){ | |||
| this.$toast.success('删除成功'); | |||
| } | |||
| @@ -116,7 +116,7 @@ export default { | |||
| message: '您确认提交草稿?', | |||
| }) | |||
| .then(() => { | |||
| customSubmit(id).then(res => { | |||
| cashSubmit(id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(0) | |||
| @@ -8,7 +8,7 @@ | |||
| @click-right="goAdd()" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">信用开转账申请列表</p> | |||
| <p style="font-weight: bold;">信用卡转账申请列表</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="add" size="18"/> | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail2', query: {id:item.id}}"> | |||
| <template #icon> | |||
| <van-icon name="../../../static/images/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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail3', query: {id:item.id}}"> | |||
| <template #icon> | |||
| <van-icon name="../../../static/images/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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
| @@ -8,7 +8,7 @@ | |||
| @click-right="goAdd()" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">虚拟专账申请列表</p> | |||
| <p style="font-weight: bold;">虚拟转账申请列表</p> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="add" size="18"/> | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail4', query: {id:item.id}}"> | |||
| <template #icon> | |||
| <van-icon name="../../../static/images/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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
| @@ -22,9 +22,9 @@ | |||
| @load="getList" | |||
| > | |||
| <van-swipe-cell v-for="(item,index) in applicationList" :key="index"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail', query: {id:item.id}}"> | |||
| <van-cell :title="item.payer" :value="item.auditStatus" center :to="{name:'approvalDetail5', query: {id:item.id}}"> | |||
| <template #icon> | |||
| <van-icon name="../../../static/images/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 #label> | |||
| <p><span><i>¥</i>{{item.expenditureAmount}}</span><i style="margin-right: 1rem;"></i>{{item.applyDate}}</p> | |||
| @@ -33,7 +33,7 @@ | |||
| <template #right> | |||
| <van-row> | |||
| <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-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" /> | |||
| @@ -7,7 +7,7 @@ | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">修改付款申请</p> | |||
| <p style="font-weight: bold;">修改常用转账申请</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||
| @@ -33,6 +33,7 @@ | |||
| :min-date="minDate" | |||
| :max-date="maxDate" | |||
| @confirm="onConfirmLasj" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| @@ -219,7 +220,10 @@ | |||
| </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" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| @@ -237,6 +241,13 @@ | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| attachmentList, | |||
| commonAttach, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify", | |||
| data() { | |||
| @@ -249,8 +260,8 @@ | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(), | |||
| maxDate: new Date(2025, 10, 1), | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| @@ -292,7 +303,9 @@ | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'' | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -320,12 +333,12 @@ | |||
| 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(){ | |||
| @@ -493,6 +506,7 @@ | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| @@ -536,34 +550,130 @@ | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| console.log(this.form); | |||
| updateTransfer(this.form).then(response => { | |||
| console.log(response); | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| console.log(this.projectForm) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| } | |||
| }); | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| @@ -588,23 +698,50 @@ | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| this.projectForm.outId = this.form.id | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('修改成功'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }else{ | |||
| this.$toast.success('修改成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| @@ -705,6 +842,38 @@ | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| console.log(r) | |||
| }) | |||
| }) | |||
| }, | |||
| goBack(){ | |||
| window.history.go(-1) | |||
| }, | |||
| @@ -0,0 +1,821 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div :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" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import { | |||
| addCash, | |||
| addCashdetail, attachmentList, cashSubmit, commonAttach, | |||
| getCash, | |||
| listCashdetailByCashId, systemAttachment, updateCash | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify10", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'10', | |||
| outId:null, | |||
| ynType:'2' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| 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(){ | |||
| if(this.buttonType == 'update'){ | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == '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); | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| updateCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }) | |||
| }else { | |||
| updateCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| 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 | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| updateCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }else { | |||
| updateCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_cash", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,850 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" label="提款人" placeholder="请输入提款人" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入提款金额' }]" v-model="item.incomeAmount" type="number" label="提款金额(元)" placeholder="请输入提款金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| addCash, addCashdetail, | |||
| attachmentList, | |||
| commonAttach, getCash, | |||
| listCashdetailByCashId, updateCash | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| import request from '@/utils/request' | |||
| export default { | |||
| name: "approvalModify11", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| 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 (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 => { | |||
| 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; | |||
| }); | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| console.log(response) | |||
| 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) { | |||
| if(this.form.cashType=='11'){ | |||
| console.log(input) | |||
| if(this.form.payerAccount==0){ | |||
| this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||
| this.chargeItme = [] | |||
| this.addChargeItme(); | |||
| return false; | |||
| }else { | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| if(this.form.payerAccount<this.form.expenditureAmount){ | |||
| this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||
| this.form.expenditureAmount="" | |||
| this.chargeItme = [] | |||
| this.addChargeItme(); | |||
| return false; | |||
| } | |||
| } | |||
| }else{ | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| } | |||
| }, | |||
| goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| updateCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }) | |||
| }else{ | |||
| updateCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| updateCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }else{ | |||
| updateCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_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,870 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">出票方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="出票方" | |||
| placeholder="请选择出票方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择出票方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| label="出票金额(元)" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'出票金额不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="汇票类型" | |||
| v-model="orderTypeName" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="汇票类型" | |||
| v-model="form.orderType" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| style="display: none" | |||
| required | |||
| :rules="[{ required: true , message:'汇票类型不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="开票日" | |||
| v-model="form.startTime" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'开票日不能为空!' }]" | |||
| /> | |||
| <van-field | |||
| readonly | |||
| label="到期日" | |||
| v-model="form.endTime" | |||
| placeholder="" | |||
| input-align="right" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'到期日不能为空!' }]" | |||
| /> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div :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.phone" label="联系方式" placeholder="请输入联系方式" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'所属单位补鞥你为空' }]" v-model="item.unit" label="所属单位" placeholder="请输入所属单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'负责人全称不能为空' }]" v-model="item.leader" label="负责人全称" placeholder="请输入负责人全称" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import { | |||
| addCash, addCashdetail, | |||
| attachmentList, cashSubmit, | |||
| commonAttach, getCash, | |||
| listCashdetailByCashId, listMoneyorder, updateCash | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify12", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| orderTypeName:'', | |||
| orderTypeOptions:[] | |||
| }; | |||
| }, | |||
| 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.getDicts("order_type").then(response => { | |||
| this.orderTypeOptions = response.data; | |||
| }); | |||
| let params1={ | |||
| pageNum: 1, | |||
| pageSize: 1000, | |||
| } | |||
| listMoneyorder(params1).then((response) => { | |||
| console.log(response) | |||
| this.payerOptions = response.rows; | |||
| response.rows.map((res,index) => { | |||
| res['payerFrom'] = '12' | |||
| console.log(res) | |||
| this.payerOptions[index].text = res.billReceiveUnit; | |||
| 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 (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 => { | |||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| console.log(res.data) | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| this.orderTypeOptions.map(res => { | |||
| console.log(this.orderTypeOptions) | |||
| if(res.dictValue==this.form.orderType){ | |||
| this.orderTypeName = res.dictLabel | |||
| } | |||
| }) | |||
| }); | |||
| listCashdetailByCashId(this.$route.query.id).then((response) => { | |||
| this.chargeItme = response.data; | |||
| 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; | |||
| } | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| bankTypeText:"", //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| 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; | |||
| } | |||
| } | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| updateCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }) | |||
| }else{ | |||
| updateCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| cashSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| updateCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| }else{ | |||
| updateCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_cash"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| this.chargeItme.map(res => { | |||
| res.cashId = this.form.id | |||
| addCashdetail(res).then(r => { | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }) | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_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,926 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-cell title="收款账户类型"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
| <van-radio name="1">公户</van-radio> | |||
| <van-radio name="2">私户</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="收款方" | |||
| placeholder="请选择" | |||
| v-model="item.payee" | |||
| @click="item.showPayee = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||
| /> | |||
| <van-popup v-model="item.showPayee" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payeeList" | |||
| @confirm="onConfirmPayee($event,index)" | |||
| @cancel="item.showPayee = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" 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" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| attachmentList, | |||
| commonAttach, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify2", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| 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.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| listPayee(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| }, | |||
| // 钱计算 | |||
| moneyChange(input) { | |||
| console.log(input) | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| }, | |||
| goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,933 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-cell title="收款账户类型"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
| <van-radio name="1">公户</van-radio> | |||
| <van-radio name="2">私户</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="收款方" | |||
| placeholder="请选择" | |||
| v-model="item.payee" | |||
| @click="item.showPayee = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||
| /> | |||
| <van-popup v-model="item.showPayee" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payeeList" | |||
| @confirm="onConfirmPayee($event,index)" | |||
| @cancel="item.showPayee = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required readonly :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field required readonly :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| v-model="item.bankTypeText" | |||
| @click="item.showbankType = true" | |||
| input-align="right" | |||
| required | |||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||
| /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| addCash, attachmentList, | |||
| commonAttach, | |||
| listTaccount, | |||
| listVaccount, systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify3", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| townAccountType:'3' | |||
| } | |||
| listTaccount(params1).then((response) => { | |||
| console.log(response) | |||
| response.rows.map((res,index) => { | |||
| if(res.townAccountType=='3'){ | |||
| res['payerFrom'] = '3' | |||
| this.payerOptions.push(res); | |||
| this.payerOptions[index].text = res.payee; | |||
| this.payerOptions[index].value = res.id; | |||
| } | |||
| }) | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| getDictionaries(){ | |||
| getTransfer(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '1' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| console.log(res.data) | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| }); | |||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||
| // response.rows[j].payeeText = response.rows[j].payee; | |||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
| response.rows[j].showPayee = false; | |||
| } | |||
| this.chargeItme = response.rows; | |||
| }); | |||
| this.getPayeeList(); | |||
| }); | |||
| }, | |||
| getChange(){ | |||
| console.log(this.buttonType) | |||
| if(this.buttonType == 'update'){ | |||
| console.log('update') | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == 'add'){ | |||
| console.log('add') | |||
| this.goAdd(); | |||
| } | |||
| }, | |||
| getError(e){ | |||
| console.log(e) | |||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
| }, | |||
| addChargeItme(index){ | |||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
| return; | |||
| } | |||
| this.getDicts("bank_type").then(res => { | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "1", //所属银行 | |||
| bankTypeText:this.selectDictLabel(res.data, 1), //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| let params = { | |||
| villageAccountType : 1, | |||
| status:'0', | |||
| accountType : this.form.accountType | |||
| } | |||
| listVaccount(params).then(response => { | |||
| console.log(response) | |||
| if(response.rows.length>0){ | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| console.log(data) | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| this.projectList.map(res => { | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data,index){ | |||
| console.log(data) | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showPayee = false; | |||
| } | |||
| this.chargeItme[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.payeeSelectChange(data.value , index) | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showbankType = false; | |||
| } | |||
| this.chargeItme[index].bankTypeText = data.text; | |||
| this.chargeItme[index].bankType = data.value; | |||
| this.chargeItme[index].showbankType = false; | |||
| }, | |||
| onConfirmPayer(data){ | |||
| console.log(data) | |||
| this.form.payer = data.text; | |||
| this.form.cashierId = data.value; | |||
| this.form.payerAccount = data.payeeAccount | |||
| this.showpayer = false; | |||
| //this.selectChange(data.value); | |||
| this.accountTypeChange(); | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.chargeItme = []; | |||
| this.payeeList = []; | |||
| let params = { | |||
| villageAccountType : 1, | |||
| status:'0', | |||
| accountType : this.form.accountType, | |||
| taccountId:this.form.cashierId | |||
| } | |||
| listVaccount(params).then(response => { | |||
| console.log(response) | |||
| if(response.rows.length>0){ | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| } | |||
| }); | |||
| }, | |||
| // 钱计算 | |||
| moneyChange(input) { | |||
| console.log(input) | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| }, | |||
| goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,890 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-cell title="收款账户类型"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
| <van-radio name="1">公户</van-radio> | |||
| <van-radio name="2">私户</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="收款方" | |||
| placeholder="请选择" | |||
| v-model="item.payee" | |||
| @click="item.showPayee = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||
| /> | |||
| <van-popup v-model="item.showPayee" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payeeList" | |||
| @confirm="onConfirmPayee($event,index)" | |||
| @cancel="item.showPayee = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" 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" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| attachmentList, | |||
| commonAttach, listVaccount, listVaccount1, | |||
| systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify4", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| villageAccountType:'1', | |||
| "params":{townAccountType:'1'} | |||
| } | |||
| listVaccount1(params1).then((response) => { | |||
| this.payerOptions = response.rows; | |||
| response.rows.map((res,index) => { | |||
| res['payerFrom'] = '1' | |||
| console.log(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() { | |||
| //普通转账 | |||
| 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){ | |||
| for (let i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showPayee = false; | |||
| } | |||
| this.chargeItme[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.chargeItme[index].showpayee = false; | |||
| this.payeeSelectChange(data.value , index) | |||
| this.onConfirmBankType(data,index) | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| console.log(this.bankTypeDictionaries) | |||
| this.bankTypeDictionaries.map(res => { | |||
| if(res.value==data.bankType){ | |||
| this.chargeItme[index].bankTypeText = res.text; | |||
| this.chargeItme[index].bankType = res.value; | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmPayer(data){ | |||
| this.form.payer = data.text; | |||
| this.form.cashierId = data.value; | |||
| this.showpayer = false; | |||
| this.selectChange(data.value) | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| 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; | |||
| } | |||
| } | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| console.log(obj) | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.payee); | |||
| this.$set(this.form, "payerAccount", obj.payeeAccount); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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,928 @@ | |||
| <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" | |||
| @cancel="showlasj = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| required | |||
| :rules="[{ required: true , message:'请选择资金支出类别' }]" | |||
| label="资金支出类别" | |||
| placeholder="请选择" | |||
| v-model="capitalExpenditureType" | |||
| @click="showcapital = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| /> | |||
| <van-popup v-model="showcapital" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="capitalExpenditureTypeOptions" | |||
| @confirm="onConfirmCapital" | |||
| @cancel="showcapital = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field | |||
| readonly | |||
| required | |||
| label="支出总金额" | |||
| v-model="form.expenditureAmount" | |||
| placeholder="根据下方收款金额自动核算" | |||
| input-align="right" | |||
| label-width="auto" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field | |||
| label="付款事由" | |||
| v-model="form.remark" | |||
| type="textarea" | |||
| placeholder="请输入付款事由" | |||
| input-align="right" | |||
| rows="3" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请输入付款事由' }]" | |||
| /> | |||
| </div> | |||
| <div class="main_box" style="margin-top: 10px;"> | |||
| <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p> | |||
| <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="项目名称" | |||
| placeholder="请选择" | |||
| v-model="projectForm.projectName" | |||
| @click="showproject = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择项目名称' }]" | |||
| /> | |||
| <van-popup v-model="showproject" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectListShow" | |||
| @confirm="onConfirmProject" | |||
| @cancel="showproject = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="工程款类型" | |||
| placeholder="请选择" | |||
| v-model="projectFundType" | |||
| @click="showFundType = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择工程款类型' }]" | |||
| /> | |||
| <van-popup v-model="showFundType" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="projectFundTypeOptions" | |||
| @confirm="onConfirmFundType" | |||
| @cancel="showFundType = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">付款方信息</p> | |||
| <div class="main_box"> | |||
| <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>--> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="付款方" | |||
| placeholder="请选择付款方" | |||
| v-model="form.payer" | |||
| @click="showpayer = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| label-width="auto" | |||
| required | |||
| :rules="[{ required: true , message:'请选择付款方' }]" | |||
| /> | |||
| <van-popup v-model="showpayer" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payerOptions" | |||
| @confirm="onConfirmPayer($event)" | |||
| @cancel="showpayer = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| </div> | |||
| <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | |||
| <div class="main_box" style="margin-bottom: 15px;"> | |||
| <van-cell title="收款账户类型"> | |||
| <template #right-icon> | |||
| <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | |||
| <van-radio name="1">公户</van-radio> | |||
| <van-radio name="2">私户</van-radio> | |||
| </van-radio-group> | |||
| </template> | |||
| </van-cell> | |||
| </div> | |||
| <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
| <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | |||
| <div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="收款方" | |||
| placeholder="请选择" | |||
| v-model="item.payee" | |||
| @click="item.showPayee = true" | |||
| input-align="right" | |||
| right-icon="arrow-down" | |||
| required | |||
| :rules="[{ required: true , message:'请选择收款方' }]" | |||
| /> | |||
| <van-popup v-model="item.showPayee" position="bottom"> | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="payeeList" | |||
| @confirm="onConfirmPayee($event,index)" | |||
| @cancel="item.showPayee = false" | |||
| /> | |||
| </van-popup> | |||
| <van-field required readonly :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
| <van-field required readonly :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
| <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
| <van-field | |||
| readonly | |||
| clickable | |||
| label="所属银行" | |||
| placeholder="请选择" | |||
| v-model="item.bankTypeText" | |||
| @click="item.showbankType = true" | |||
| input-align="right" | |||
| required | |||
| :rules="[{ required: true , message:'请选择所属银行' }]" | |||
| /> | |||
| </div> | |||
| </div> | |||
| <p class="main_title">上传附件</p> | |||
| <div class="main_box" style="padding: 5px 0 0 8px;"> | |||
| <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||
| </div> | |||
| <div style="padding: 16px 0;"> | |||
| <van-row> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> | |||
| </van-col> | |||
| <van-col span="12" align="center"> | |||
| <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button> | |||
| </van-col> | |||
| </van-row> | |||
| <div class="clear"></div> | |||
| </div> | |||
| </van-form> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import request from '@/utils/request'; | |||
| import { | |||
| addTransfer, | |||
| attachmentList, | |||
| commonAttach, listTaccount, | |||
| listVaccount, systemAttachment | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import Dialog from "vant/lib/dialog"; | |||
| export default { | |||
| name: "approvalModify5", | |||
| data() { | |||
| return { | |||
| showcapital:false, | |||
| showpayee:false, | |||
| showlasj:false, | |||
| showbankType:false, | |||
| showproject:false, | |||
| showFundType:false, | |||
| showpayer:false, | |||
| minDate: new Date(2000, 1, 1), | |||
| maxDate: new Date(2050, 12, 31), | |||
| currentDate: new Date(), | |||
| form:{}, | |||
| capitalExpenditureType:'', | |||
| payee:'', | |||
| bankType:'', | |||
| buttonType:'a', | |||
| wfydlxDictionaries:[], | |||
| jglxDictionaries:[], | |||
| sysDictionaries:[], | |||
| capitalExpenditureTypeOptions:[], | |||
| bankTypeDictionaries:[], | |||
| projectList:[], | |||
| projectFundTypeOptions:[], | |||
| projectFundTypeDictionaries:[], | |||
| projectListShow:[], | |||
| payerOptions:[], | |||
| chargeItme:[], | |||
| chargeItmeShow:[], | |||
| payeeList:[], | |||
| // 查询参数 | |||
| queryParams: { | |||
| transferType:"", | |||
| orderByColumn: "id", | |||
| isAsc: "desc", | |||
| }, | |||
| capitalExpenditureOpen:false, | |||
| projectForm:{ | |||
| projectId:null, | |||
| projectName:null, | |||
| projectContractor:null, | |||
| projectAmount:null, | |||
| projectBillNum:null, | |||
| projectFundType:'1', | |||
| outId:null, | |||
| ynType:'1' | |||
| }, | |||
| projectFundType:'', | |||
| fileList:[], | |||
| uploadFiles:[], | |||
| }; | |||
| }, | |||
| created() { | |||
| let queryParams={ | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| } | |||
| listProject(queryParams).then(response => { | |||
| this.projectList = response.rows; | |||
| for (var i = 0; i < response.rows.length; i++) { | |||
| this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||
| } | |||
| }); | |||
| this.getDicts("project_fund_type").then((response) => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| } | |||
| this.projectFundTypeDictionaries = response.data; | |||
| }); | |||
| let params1={ | |||
| townAccountType:'2' | |||
| } | |||
| listTaccount(params1).then((response) => { | |||
| response.rows.map((res,index) => { | |||
| if(res.townAccountType=='2'){ | |||
| res['payerFrom'] = '2' | |||
| this.payerOptions.push(res); | |||
| this.payerOptions[index].text = res.payee; | |||
| this.payerOptions[index].value = res.id; | |||
| } | |||
| }) | |||
| }); | |||
| this.getDictionaries(); | |||
| this.getFileList(); | |||
| }, | |||
| methods: { | |||
| getDictionaries(){ | |||
| getTransfer(this.$route.query.id).then((response) => { | |||
| this.getDicts("capital_expenditure_type").then((res) => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); | |||
| }); | |||
| if(response.data.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : response.data.id, | |||
| 'ynType' : '1' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| console.log(this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType)) | |||
| this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | |||
| this.projectForm = res.data | |||
| console.log(res.data) | |||
| }) | |||
| }else{ | |||
| this.showproject = false | |||
| } | |||
| this.form = response.data; | |||
| this.getPayeeList(); | |||
| }); | |||
| queryTransferDetail(this.$route.query.id).then((response) => { | |||
| this.getDicts("bank_type").then(res => { | |||
| for (var i = 0; i < res.data.length; i++) { | |||
| this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); | |||
| } | |||
| for (var j = 0 ; j < response.rows.length ; j++){ | |||
| // response.rows[j].payeeText = response.rows[j].payee; | |||
| response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); | |||
| response.rows[j].showPayee = false; | |||
| } | |||
| this.chargeItme = response.rows; | |||
| }); | |||
| }); | |||
| }, | |||
| getChange(){ | |||
| if(this.buttonType == 'update'){ | |||
| this.goUpdate(); | |||
| }else if(this.buttonType == 'add'){ | |||
| this.goAdd(); | |||
| } | |||
| }, | |||
| getError(e){ | |||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||
| }, | |||
| addChargeItme(index){ | |||
| if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){ | |||
| this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收入金额!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入收款账户!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){ | |||
| this.$notify({ type: 'danger', message: '请输入开户银行!' }); | |||
| return; | |||
| }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){ | |||
| this.$notify({ type: 'danger', message: '请选择所属银行!' }); | |||
| return; | |||
| } | |||
| this.getDicts("bank_type").then(res => { | |||
| this.chargeItme.splice(index + 1, 0, { | |||
| payeeId: "", //收款方ID | |||
| payee: "", //收款方 | |||
| payeeAccount: "", //收款账户 | |||
| bankDeposit: "", //开户银行 | |||
| incomeAmount: "", //收入金额 | |||
| bankType: "", //所属银行 | |||
| bankTypeText: "", //所属银行 | |||
| showPayee:false, | |||
| showbankType:false | |||
| }); | |||
| }); | |||
| }, | |||
| getPayeeList() { | |||
| //普通转账 | |||
| this.queryParams.accountType = this.form.accountType | |||
| this.queryParams.status = "0" | |||
| if(this.form.cashierId==null||this.form.cashierId==""){ | |||
| this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
| return; | |||
| }else { | |||
| this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
| listVaccount(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| payeeDictLabel(datas, value) { | |||
| var actions = []; | |||
| Object.keys(datas).some((key) => { | |||
| if (datas[key].payeeId == ('' + value)) { | |||
| actions.push(datas[key].payee); | |||
| return true; | |||
| } | |||
| }) | |||
| return actions.join(''); | |||
| }, | |||
| onConfirmCapital(data){ | |||
| if (data.value != 2){ | |||
| this.capitalExpenditureOpen = false; | |||
| this.projectForm = []; | |||
| }else{ | |||
| this.capitalExpenditureOpen = true; | |||
| } | |||
| this.capitalExpenditureType = data.text; | |||
| this.form.capitalExpenditureType = data.value; | |||
| this.showcapital = false; | |||
| }, | |||
| onConfirmFundType(data){ | |||
| console.log(data) | |||
| this.projectForm.projectFundType = data.value; | |||
| this.projectFundType = data.text; | |||
| this.showFundType = false; | |||
| }, | |||
| onConfirmProject(data){ | |||
| this.projectList.map(res => { | |||
| if(res.projectName==data.text){ | |||
| this.projectForm.projectId = res.id | |||
| this.projectForm.projectName = res.projectName | |||
| this.projectForm.projectContractor = res.projectContractor | |||
| this.projectForm.projectAmount = res.projectAmount | |||
| } | |||
| }) | |||
| this.showproject = false; | |||
| }, | |||
| onConfirmPayee(data,index){ | |||
| console.log(data) | |||
| for (var i = 0 ; i < this.chargeItme.length ; i++){ | |||
| this.chargeItme[i].showPayee = false; | |||
| } | |||
| this.chargeItme[index].payee = data.text; | |||
| this.chargeItme[index].payeeId = data.value; | |||
| this.payeeSelectChange(data.value , index) | |||
| this.onConfirmBankType(data,index) | |||
| }, | |||
| onConfirmBankType(data,index){ | |||
| console.log(this.bankTypeDictionaries) | |||
| this.bankTypeDictionaries.map(res => { | |||
| if(res.value==data.bankType){ | |||
| this.chargeItme[index].bankTypeText = res.text; | |||
| this.chargeItme[index].bankType = res.value; | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmPayer(data){ | |||
| this.form.payer = data.text; | |||
| this.form.cashierId = data.value; | |||
| this.showpayer = false; | |||
| this.selectChange(data.value) | |||
| }, | |||
| onConfirmLasj(data){ | |||
| this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||
| this.showlasj = false; | |||
| }, | |||
| accountTypeChange(e){ | |||
| this.payeeList = []; | |||
| this.chargeItme = []; | |||
| this.queryParams.accountType = this.form.accountType | |||
| if(this.form.cashierId==null||this.form.cashierId==""){ | |||
| this.$notify({ type: 'danger', message: '请先选择付款方!' }); | |||
| return; | |||
| }else { | |||
| this.queryParams.taccountId = parseInt(this.form.cashierId) | |||
| console.log(this.queryParams) | |||
| listVaccount(this.queryParams).then((response) => { | |||
| this.payeeList = response.rows; | |||
| response.rows.map((res,index) => { | |||
| this.payeeList[index].text = res.payee; | |||
| this.payeeList[index].value = res.id; | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| // 钱计算 | |||
| moneyChange(input) { | |||
| console.log(input) | |||
| let obj = {}; | |||
| obj = this.chargeItme.find((account) => { | |||
| //model就是上面的数据源 | |||
| return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||
| }); | |||
| let total = 0; | |||
| this.chargeItme.forEach((money) => { | |||
| total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||
| }); | |||
| this.$set(this.form, "expenditureAmount", total); | |||
| }, | |||
| goAdd(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| }) | |||
| .then(() => { | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| }) | |||
| .catch(() => { | |||
| return false; | |||
| }); | |||
| }else{ | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then(response => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }) | |||
| }else{ | |||
| customSubmit(this.form.id).then(res => { | |||
| this.$toast.success('提交成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| } | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| goUpdate(){ | |||
| if(this.chargeItme.length<1){ | |||
| this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
| return; | |||
| } | |||
| if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||
| this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||
| return; | |||
| } | |||
| if(this.form.capitalExpenditureType==2){ | |||
| if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||
| this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||
| return; | |||
| } | |||
| if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||
| this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||
| return; | |||
| } | |||
| } | |||
| this.$set(this.form, "payeeList", this.chargeItme); | |||
| this.$set(this.form, "bankTypeList", this.chargeItme); | |||
| this.$set(this.form, "accountTypeList", this.chargeItme); | |||
| this.$set(this.form, "transferStatusList", this.chargeItme); | |||
| updateTransfer(this.form).then((response) => { | |||
| this.projectForm.outId = this.form.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "upload"); | |||
| params.append("fileType", "0"); | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }else{ | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| let fuzhitype = 0; | |||
| obj = this.payeeList.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select ; //筛选出匹配数据 | |||
| }); | |||
| if(this.chargeItme != [] && this.chargeItme.length>1){ | |||
| this.chargeItme.some((value, index) => { | |||
| if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){ | |||
| fuzhitype = 2; | |||
| return true; | |||
| } | |||
| if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){ | |||
| fuzhitype = 1; | |||
| return true; | |||
| } | |||
| }); | |||
| } | |||
| if(fuzhitype == 0){ | |||
| this.$set(this.chargeItme[i], "payee",obj.payee) | |||
| this.$set(this.chargeItme[i], "bankType", obj.bankType) | |||
| this.$set(this.chargeItme[i], "payeeId", obj.id); | |||
| this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount); | |||
| this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit); | |||
| this.$set(this.chargeItme[i], "accountType", obj.accountType); | |||
| }else if(fuzhitype == 1){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' }); | |||
| }else if(fuzhitype == 2){ | |||
| this.$set(this.chargeItme[i], "payee",'') | |||
| this.$set(this.chargeItme[i], "bankType",'') | |||
| this.$set(this.chargeItme[i], "payeeId", ''); | |||
| this.$set(this.chargeItme[i], "payeeAccount", ''); | |||
| this.$set(this.chargeItme[i], "bankDeposit", ''); | |||
| this.$set(this.chargeItme[i], "accountType", ''); | |||
| this.$notify({ type: 'danger', message: '收款方已存在!' }); | |||
| } | |||
| }, | |||
| selectChange(select) { | |||
| let obj = {}; | |||
| obj = this.payerOptions.find((account) => { | |||
| //model就是上面的数据源 | |||
| return account.id === select; //筛选出匹配数据 | |||
| }); | |||
| if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||
| obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||
| obj.accountPassword != null && obj.accountPassword != ""){ | |||
| this.$set(this.form, "bookId", obj.bookId); | |||
| this.$set(this.form, "deptId", obj.deptId); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| this.$set(this.form, "payerFrom", '1'); | |||
| }else{ | |||
| if(obj.payerFrom==1){ | |||
| this.diglogStatus = false; | |||
| this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||
| this.$set(this.form,"payer","") | |||
| this.$set(this.form,"payerAccount","") | |||
| }else{ | |||
| this.$set(this.form, "payerFrom", obj.parerFrom); | |||
| if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||
| this.$set(this.form, "operatorCode", obj.operatorCode); | |||
| }else{ | |||
| this.$set(this.form, "operatorCode", ''); | |||
| } | |||
| if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||
| this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||
| }else{ | |||
| this.$set(this.form, "enterpriseCode", ''); | |||
| } | |||
| if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||
| this.$set(this.form, "accountPassword", obj.accountPassword); | |||
| }else{ | |||
| this.$set(this.form, "accountPassword", ''); | |||
| } | |||
| this.$set(this.form, "bookId",''); | |||
| this.$set(this.form, "deptId", ''); | |||
| this.$set(this.form, "cashierId", obj.id); | |||
| this.$set(this.form, "payer", obj.accountName); | |||
| if(obj.payerFrom==6){ | |||
| getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||
| this.$set(this.form, "payerAccount", response.data); | |||
| }); | |||
| }else { | |||
| this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| beforeRead(file) { | |||
| this.uploadFiles.push(file.file); | |||
| }, | |||
| deleteFile(file){ | |||
| console.log(file) | |||
| this.uploadFiles.map((response,index) => { | |||
| if(file.file == response){ | |||
| this.uploadFiles.splice(index,1) | |||
| } | |||
| }) | |||
| if(file.id){ | |||
| systemAttachment(file.id).then((res) => { | |||
| }); | |||
| } | |||
| }, | |||
| getFileList(){ | |||
| let oData= { | |||
| tableId: this.$route.query.id, | |||
| tableName: "t_yinnong_transfer", | |||
| bizPath: "upload", | |||
| fileType: "0", | |||
| } | |||
| attachmentList(oData).then(res => { | |||
| console.log(res) | |||
| console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||
| res.rows.map(r => { | |||
| let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||
| this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | |||
| 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> | |||
| @@ -62,8 +62,9 @@ | |||
| <p v-show="processList.区县审批==1">区县审批</p> | |||
| <p v-show="processList.区县审批==2" class="textBlue">区县审批</p> | |||
| <p v-show="processList.区县审批==3" class="textRed">区县审批</p> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;"> | |||
| <van-col span="24" style="padding: 0;" v-if="processList.区县审批人!=null&&processList.区县审批人!=''"> | |||
| <p v-show="processList.区县审批==1">审批人:{{processList.区县审批人}}</p> | |||
| <p v-show="processList.区县审批==2" class="textBlue">审批人:{{processList.区县审批人}}</p> | |||
| <p v-show="processList.区县审批==3" class="textRed">审批人:{{processList.区县审批人}}</p> | |||
| @@ -71,7 +72,7 @@ | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;"> | |||
| <van-col span="24" style="padding: 0;" v-if="processList.区县审批时间!=null&&processList.区县审批时间!=''"> | |||
| <p v-show="processList.区县审批==1">审批时间:{{processList.区县审批时间}}</p> | |||
| <p v-show="processList.区县审批==2" class="textBlue">审批时间:{{processList.区县审批时间}}</p> | |||
| <p v-show="processList.区县审批==3" class="textRed">审批时间:{{processList.区县审批时间}}</p> | |||
| @@ -0,0 +1,245 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <van-nav-bar | |||
| left-arrow | |||
| fixed | |||
| placeholder | |||
| @click-left="$router.back(-1)" | |||
| > | |||
| <template #title> | |||
| <p style="font-weight: bold;">付款申请流程</p> | |||
| </template> | |||
| </van-nav-bar> | |||
| <div class="main_box"> | |||
| <van-row v-if="processList.待申请!=2"> | |||
| <van-col span="6" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col> | |||
| <van-col span="18" class="textBlue">草稿</van-col> | |||
| </van-row> | |||
| <van-row v-if="processList.待申请==2"> | |||
| <van-col span="6" align="right"><p class="icon_jian blue"><van-icon name="success" size="14" /></p></van-col> | |||
| <van-col span="18" class="textBlue">已申请 | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">申请人:{{processList.申请人}}</van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;" class="textBlue" v-show="processList.待申请==2">申请时间:{{processList.申请时间}}</van-col> | |||
| </van-row> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="6" align="right"> | |||
| <p class="icon_jian" v-show="processList.乡镇审批==1"><van-icon name="minus" size="14" /></p> | |||
| <p class="icon_jian blue" v-show="processList.乡镇审批==2"><van-icon name="success" size="14" /></p> | |||
| <p class="icon_jian red" v-show="processList.乡镇审批==3"><van-icon name="cross" size="14" /></p> | |||
| </van-col> | |||
| <van-col span="18"> | |||
| <p v-show="processList.乡镇审批==1">乡镇审批</p> | |||
| <p v-show="processList.乡镇审批==2" class="textBlue">乡镇审批</p> | |||
| <p v-show="processList.乡镇审批==3" class="textRed">乡镇审批</p> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;" v-if="processList.乡镇审批人!=null&&processList.乡镇审批人!=''"> | |||
| <p v-show="processList.乡镇审批==1">审批人:{{processList.乡镇审批人}}</p> | |||
| <p v-show="processList.乡镇审批==2" class="textBlue">审批人:{{processList.乡镇审批人}}</p> | |||
| <p v-show="processList.乡镇审批==3" class="textRed">审批人:{{processList.乡镇审批人}}</p> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;" v-if="processList.乡镇审批时间!=null&&processList.乡镇审批时间!=''"> | |||
| <p v-show="processList.乡镇审批==1">审批时间:{{processList.乡镇审批时间}}</p> | |||
| <p v-show="processList.乡镇审批==2" class="textBlue">审批时间:{{processList.乡镇审批时间}}</p> | |||
| <p v-show="processList.乡镇审批==3" class="textRed">审批时间:{{processList.乡镇审批时间}}</p> | |||
| </van-col> | |||
| </van-row> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row v-if="form.approveLevel==2"> | |||
| <van-col span="6" align="right"> | |||
| <p class="icon_jian" v-show="processList.区县审批==1"><van-icon name="minus" size="14" /></p> | |||
| <p class="icon_jian blue" v-show="processList.区县审批==2"><van-icon name="success" size="14" /></p> | |||
| <p class="icon_jian red" v-show="processList.区县审批==3"><van-icon name="cross" size="14" /></p> | |||
| </van-col> | |||
| <van-col span="18"> | |||
| <p v-show="processList.区县审批==1">区县审批</p> | |||
| <p v-show="processList.区县审批==2" class="textBlue">区县审批</p> | |||
| <p v-show="processList.区县审批==3" class="textRed">区县审批</p> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;" v-if="processList.区县审批人!=null&&processList.区县审批人!=''"> | |||
| <p v-show="processList.区县审批==1">审批人:{{processList.区县审批人}}</p> | |||
| <p v-show="processList.区县审批==2" class="textBlue">审批人:{{processList.区县审批人}}</p> | |||
| <p v-show="processList.区县审批==3" class="textRed">审批人:{{processList.区县审批人}}</p> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;" v-if="processList.区县审批时间!=null&&processList.区县审批时间!=''"> | |||
| <p v-show="processList.区县审批==1">审批时间:{{processList.区县审批时间}}</p> | |||
| <p v-show="processList.区县审批==2" class="textBlue">审批时间:{{processList.区县审批时间}}</p> | |||
| <p v-show="processList.区县审批==3" class="textRed">审批时间:{{processList.区县审批时间}}</p> | |||
| </van-col> | |||
| </van-row> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row v-show="form.transferType==1||form.transferType=='常用转账'"> | |||
| <van-col span="6" align="right"> | |||
| <p class="icon_jian" v-show="processList.支付状态==1"><van-icon name="minus" size="14" /></p> | |||
| <p class="icon_jian blue" v-show="processList.支付状态==2"><van-icon name="success" size="14" /></p> | |||
| <p class="icon_jian red" v-show="processList.支付状态==3"><van-icon name="cross" size="14" /></p> | |||
| </van-col> | |||
| <van-col span="18"> | |||
| <p v-show="processList.支付状态==1">待支付</p> | |||
| <p v-show="processList.支付状态==2" class="textBlue">支付成功</p> | |||
| <p v-show="processList.支付状态==3" class="textRed">支付异常</p> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;"> | |||
| <p v-show="processList.支付状态==2||processList.支付状态==3">支付时间:{{processList.支付时间}}</p> | |||
| </van-col> | |||
| </van-row> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row v-show="form.transferType==1||form.transferType=='常用转账'"> | |||
| <van-col span="6" align="right"> | |||
| <p class="icon_jian" v-show="processList.入账状态==1"><van-icon name="minus" size="14" /></p> | |||
| <p class="icon_jian blue" v-show="processList.入账状态==2"><van-icon name="success" size="14" /></p> | |||
| <p class="icon_jian red" v-show="processList.入账状态==3"><van-icon name="cross" size="14" /></p> | |||
| </van-col> | |||
| <van-col span="18"> | |||
| <p v-show="processList.入账状态==1">未入账</p> | |||
| <p v-show="processList.入账状态==2" class="textBlue">入账成功</p> | |||
| <p v-show="processList.入账状态==3" class="textRed">入账异常</p> | |||
| <van-row> | |||
| <van-col span="24" style="padding: 0;"> | |||
| <p v-show="processList.入账状态==2||processList.入账状态==3">入账时间:{{processList.入账时间}}</p> | |||
| </van-col> | |||
| </van-row> | |||
| </van-col> | |||
| </van-row> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { | |||
| getTransferProcess, | |||
| getTransfer, | |||
| getProjectto, | |||
| queryTransferDetail | |||
| } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
| import { | |||
| getCash, | |||
| getTransferProcess1, | |||
| listCashdetailByCashId | |||
| } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||
| export default { | |||
| name: "approvalProcess", | |||
| data() { | |||
| return { | |||
| processList:{}, | |||
| form:{} | |||
| }; | |||
| }, | |||
| created() { | |||
| this.handleUpdate(this.$route.query.id); | |||
| }, | |||
| methods: { | |||
| //查询审批进程 | |||
| getTransferProcess1(id){ | |||
| getTransferProcess1(id).then(res => { | |||
| this.processList = res.data.processSchedule | |||
| console.log(res.data.processSchedule) | |||
| this.processList.乡镇审批时间 = this.processList.乡镇审批时间?this.format(this.processList.乡镇审批时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
| this.processList.区县审批时间 = this.processList.区县审批时间?this.format(this.processList.区县审批时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
| this.processList.支付状态时间 = this.processList.支付状态时间?this.format(this.processList.支付状态时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
| this.processList.入账状态时间 = this.processList.入账状态时间?this.format(this.processList.入账状态时间, "yyyy-MM-dd HH:mm:ss"):"" | |||
| }) | |||
| }, | |||
| handleUpdate(id) { | |||
| getCash(id).then((response) => { | |||
| this.form = response.data; | |||
| this.processList = {} | |||
| this.getTransferProcess1(this.$route.query.id); | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.capitalExpenditureOpen = true | |||
| let param={ | |||
| 'outId' : this.form.id, | |||
| 'ynType' : '2' | |||
| } | |||
| getProjectto(param).then(res => { | |||
| this.projectForm = res.data | |||
| this.projectForm.projectFundType+="" | |||
| listCashdetailByCashId(id).then((r) => { | |||
| this.chargeItme = r.rows; | |||
| this.length = this.chargeItme.length; | |||
| this.detailTotal = r.total; | |||
| this.loading = false; | |||
| }); | |||
| }) | |||
| }else{ | |||
| this.capitalExpenditureOpen = false | |||
| listCashdetailByCashId(id).then((r) => { | |||
| this.chargeItme = r.rows; | |||
| this.length = this.chargeItme.length; | |||
| this.detailTotal = r.total; | |||
| this.loading = false; | |||
| }); | |||
| } | |||
| }); | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .app-container { | |||
| padding: 0.2rem 0; | |||
| } | |||
| .main_box{ | |||
| width: 96%; | |||
| margin: 0 auto; | |||
| border-radius: 6px; | |||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||
| overflow: hidden; | |||
| background-color: #FFF; | |||
| padding: 20Px 0; | |||
| } | |||
| .icon_jian{ | |||
| background-color: #C9C9C9; | |||
| display: inline-block; | |||
| width: 20Px; | |||
| height: 20Px; | |||
| line-height: 24Px; | |||
| text-align: center; | |||
| border-radius: 50%; | |||
| color: #FFF; | |||
| } | |||
| .blue{ | |||
| background-color: #1D6FE9; | |||
| } | |||
| .red{ | |||
| background-color: rgb(245, 108, 108); | |||
| } | |||
| .textBlue{ | |||
| color: #1D6FE9!important; | |||
| } | |||
| .textRed{ | |||
| color: rgb(245, 108, 108)!important; | |||
| } | |||
| .van-col{ | |||
| padding: 20Px 10Px; | |||
| } | |||
| .van-col:nth-child(2){ | |||
| font-size: 16Px; | |||
| color: #878787; | |||
| line-height: 22Px; | |||
| } | |||
| .van-row{ | |||
| .van-row{ | |||
| .van-col{ | |||
| padding: 5Px 0 0 0!important; | |||
| color: #878787; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @@ -3,7 +3,7 @@ | |||
| <van-nav-bar | |||
| title="我的事项" | |||
| left-arrow | |||
| @click-left="$router.back(-1)" | |||
| @click-left="goOnlineHomeIndex" | |||
| /> | |||
| <van-tabs v-model="activeName" title-active-color="#1D6FE9" color="#1D6FE9" line-width="20px" swipeable @click="getList"> | |||
| <van-tab title="待办" name="1" > | |||
| @@ -58,7 +58,7 @@ | |||
| data(){ | |||
| return{ | |||
| taskList:[], | |||
| activeName:'1', | |||
| activeName:this.$route.query.activeName?this.$route.query.activeName:'1', | |||
| total:0, | |||
| queryParams: { | |||
| pageNum: 1, | |||
| @@ -70,16 +70,23 @@ | |||
| created() { | |||
| this.getDicts("activity_business_type").then((response) => { | |||
| this.activityBusinessTypeOptions = response.data; | |||
| if(this.$route.query.activeName){ | |||
| this.activeName = this.$route.query.activeName | |||
| } | |||
| this.getList(); | |||
| }); | |||
| }, | |||
| methods: { | |||
| goOnlineHomeIndex(){ | |||
| this.$router.push({name:'onlineHomeWorkbench'}) | |||
| }, | |||
| getList() { | |||
| this.taskList = [] | |||
| this.$set(this.queryParams, "systemType", ''); | |||
| this.$set(this.queryParams, "systemType", '4'); | |||
| if(this.activeName=='1'){ | |||
| ListTodo(this.queryParams).then((response) => { | |||
| console.log(response) | |||
| response.rows.map(res => { | |||
| if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||
| res.tableName = '来自农村宅基地管理系统' | |||
| @@ -100,6 +107,7 @@ | |||
| }) | |||
| }else{ | |||
| ListDone(this.queryParams).then((response) => { | |||
| console.log(response) | |||
| response.rows.map(res => { | |||
| if(res.tableName?res.tableName.indexOf('house')>0:""){ | |||
| res.tableName = '来自农村宅基地管理系统' | |||
| @@ -122,7 +130,7 @@ | |||
| }, | |||
| goDetail(item){ | |||
| console.log(item) | |||
| var type = item.formData.processKey; | |||
| let type = item.formData.processKey; | |||
| switch (type) { | |||
| case 'baseApply': | |||
| case 'landscope': | |||
| @@ -132,6 +140,19 @@ | |||
| case 'yinnong_transfer': | |||
| this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
| break; | |||
| case 'yinnong_cash': | |||
| if(item.formData.cashType == '10'){ | |||
| this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
| break; | |||
| } | |||
| if(item.formData.cashType == '11'){ | |||
| this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
| break; | |||
| } | |||
| if(item.formData.cashType == '12'){ | |||
| this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}}) | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| @@ -18,7 +18,7 @@ | |||
| <p style="display:inline-block;background: #EC4B2C;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p><p style="font-weight: bold;font-size: 18px;">{{item}}</p> | |||
| </template> | |||
| <template #label> | |||
| <p style="font-size: 16px">内容</p> | |||
| <p style="font-size: 16px"></p> | |||
| </template> | |||
| </van-cell> | |||
| </van-list> | |||
| @@ -45,15 +45,15 @@ | |||
| // 异步更新数据 | |||
| // setTimeout 仅做示例,真实场景中一般为 ajax 请求 | |||
| setTimeout(() => { | |||
| for (let i = 0; i < 10; i++) { | |||
| this.list.push(this.list.length + 1+"标题"); | |||
| for (let i = 0; i < 1; i++) { | |||
| this.list.push("暂无公示公告"); | |||
| } | |||
| // 加载状态结束 | |||
| this.loading = false; | |||
| // 数据全部加载完成 | |||
| if (this.list.length >= 40) { | |||
| if (this.list.length >= 1) { | |||
| this.finished = true; | |||
| } | |||
| }, 1000); | |||
| @@ -6,7 +6,18 @@ | |||
| > | |||
| <template #left> | |||
| <van-icon name="location" color="3A80FB" size="16"/> | |||
| <p style="color: #878787;margin-left: 5px">{{deptName}}</p> | |||
| <p style="color: #878787;margin-left: 5px" @click="selectDept">{{deptName}}</p> | |||
| <van-popup v-model="villageVisbile" round position="bottom"> | |||
| <van-cascader | |||
| v-model="villageValue" | |||
| title="请选择所在村" | |||
| :options="hcAreaInfoOption" | |||
| @close="hcAreaInfoClose" | |||
| @finish="hcAreaInfoFinish" | |||
| active-color="#1989fa" | |||
| :field-names="hcAreaInfoFieldName" | |||
| /> | |||
| </van-popup> | |||
| </template> | |||
| <template #right> | |||
| <van-icon name="wap-nav" color="#000" size="18"/> | |||
| @@ -31,7 +42,7 @@ | |||
| </template> | |||
| </van-cell> | |||
| </van-row> | |||
| <van-row style="margin:2%;width:96%;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| <!--<van-row style="margin:2%;width:96%;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| <van-cell style="border-radius: 6px;"> | |||
| <template #title> | |||
| <p style="display:inline-block;background: #FFA63E;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p> | |||
| @@ -243,8 +254,8 @@ | |||
| <p style="margin-top: 5px;color: #666666;">盘活利用</p> | |||
| </van-grid-item> | |||
| </van-grid> | |||
| </van-row> | |||
| <van-row style="margin:2%;width:96%;padding:20px 0;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| </van-row>--> | |||
| <!-- <van-row style="margin:2%;width:96%;padding:20px 0;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| <van-cell style="border-radius: 6px;"> | |||
| <template #title> | |||
| <p style="font-weight: bold;font-size: 18px;display: inline-block">农村产权制度改革管理</p> | |||
| @@ -282,7 +293,7 @@ | |||
| <p style="margin-top: 5px;color: #666666;">股权管理</p> | |||
| </van-grid-item> | |||
| </van-grid> | |||
| </van-row> | |||
| </van-row>--> | |||
| <van-row style="margin:2%;width:96%;padding:20px 0;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| <van-cell style="border-radius: 6px;"> | |||
| <template #title> | |||
| @@ -292,67 +303,67 @@ | |||
| <van-grid :border="false"> | |||
| <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" > | |||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||
| <img src="../../../static/images/onlineHome/yinnongIcon1.png" style="width: 25px;" alt /> | |||
| </div> | |||
| <p style="margin-top: 5px;color: #666666;">常用转账</p> | |||
| </van-grid-item> | |||
| <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> | |||
| <p style="margin-top: 5px;color: #666666;">信用卡转账</p> | |||
| </van-grid-item> | |||
| <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> | |||
| <p style="margin-top: 5px;color: #666666;">虚拟挂账</p> | |||
| </van-grid-item> | |||
| <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> | |||
| <p style="margin-top: 5px;color: #666666;">虚拟转账</p> | |||
| </van-grid-item> | |||
| <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> | |||
| <p style="margin-top: 5px;color: #666666;">母子转账</p> | |||
| </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> | |||
| <p style="margin-top: 5px;color: #666666;">资金提现</p> | |||
| <p style="margin-top: 5px;color: #666666;">现金提现</p> | |||
| </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> | |||
| <p style="margin-top: 5px;color: #666666;">资金使用</p> | |||
| <p style="margin-top: 5px;color: #666666;">现金使用</p> | |||
| </van-grid-item> | |||
| <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> | |||
| <p style="margin-top: 5px;color: #666666;">汇票支出</p> | |||
| </van-grid-item> | |||
| <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> | |||
| <p style="margin-top: 5px;color: #666666;">收款账户</p> | |||
| </van-grid-item> | |||
| <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" > | |||
| <img src="../../../static/images/onlineHome/icon6.png" style="width: 25px;" alt /> | |||
| </div> | |||
| <p style="margin-top: 5px;color: #666666;">付款账户</p> | |||
| </van-grid-item> | |||
| <!-- <van-grid-item text="收款账户" :to="{name:'collectionList'}" >--> | |||
| <!-- <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>--> | |||
| <!-- <p style="margin-top: 5px;color: #666666;">收款账户</p>--> | |||
| <!-- </van-grid-item>--> | |||
| <!-- <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" >--> | |||
| <!-- <img src="../../../static/images/onlineHome/yinnongIcon2.png" style="width: 25px;" alt />--> | |||
| <!-- </div>--> | |||
| <!-- <p style="margin-top: 5px;color: #666666;">付款账户</p>--> | |||
| <!-- </van-grid-item>--> | |||
| </van-grid> | |||
| </van-row> | |||
| <van-row style="margin:2%;width:96%;padding:20px 0;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| <!--<van-row style="margin:2%;width:96%;padding:20px 0;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);background: #fff"> | |||
| <van-cell style="border-radius: 6px;"> | |||
| <template #title> | |||
| <p style="font-weight: bold;font-size: 18px;display: inline-block">农村宅基地审批管理</p> | |||
| @@ -454,7 +465,7 @@ | |||
| <p style="margin-top: 5px;color: #666666;">违法监管</p> | |||
| </van-grid-item> | |||
| </van-grid> | |||
| </van-row> | |||
| </van-row>--> | |||
| <onlineHomeIndex></onlineHomeIndex> | |||
| </div> | |||
| </template> | |||
| @@ -462,7 +473,8 @@ | |||
| <script> | |||
| import onlineHomeIndex from "../onlineHomeIndex"; | |||
| import {getInfo} from "../../api/login"; | |||
| import {ListTodo} from "../../api/onlineHome/done"; | |||
| import {changeDept, ListTodo} from "../../api/onlineHome/done"; | |||
| import {treeselectByUser} from "../../api/homestead"; | |||
| export default { | |||
| components: { | |||
| onlineHomeIndex | |||
| @@ -472,24 +484,63 @@ | |||
| return { | |||
| list1: [], | |||
| images:['../../../static/images/onlineHome/tab.jpg'], | |||
| deptName:"", | |||
| deptName:this.$store.state.user.deptName, | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 100, | |||
| }, | |||
| taskList:[], | |||
| //省市区区级list | |||
| hcAreaInfoOption: [], | |||
| //省市区区级显示 | |||
| villageVisbile: false, | |||
| //选中的值 | |||
| villageValue: "", | |||
| //选中村相关信息 | |||
| villageDataObj: { | |||
| deptName: " ", //村名 | |||
| }, | |||
| hcAreaInfoFieldName: { | |||
| text: "label", | |||
| value: "value", | |||
| children: "children", | |||
| }, | |||
| }; | |||
| }, | |||
| created() { | |||
| getInfo().then(response => { | |||
| console.log(response) | |||
| this.deptName = response.user.deptName | |||
| }); | |||
| treeselectByUser().then((res) => { | |||
| if (res.code == 200) { | |||
| let content = res.data; | |||
| this.hcAreaInfoOption = content; | |||
| } | |||
| }), | |||
| ListTodo(this.queryParams).then((response) => { | |||
| this.taskList = response.rows | |||
| }) | |||
| }, | |||
| methods:{ | |||
| selectDept(){ | |||
| this.villageVisbile = true; | |||
| }, | |||
| //关闭选择地址弹窗 | |||
| hcAreaInfoClose() { | |||
| this.villageVisbile = false; | |||
| }, | |||
| hcAreaInfoFinish({ value, selectedOptions, tabIndex }) { | |||
| // 切换部门 | |||
| let Depquery={"loginDeptID":value} | |||
| changeDept(Depquery).then((response) => { | |||
| console.log(response) | |||
| if (response.code === 200) { | |||
| this.$store.dispatch("GetInfo").then(() => { | |||
| // this.$router.go(0); | |||
| window.location.href = "/onlineHome/workbench"; | |||
| }); | |||
| } | |||
| }); | |||
| this.villageVisbile = false; | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||