移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

approvalAdd.vue 49 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288
  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="goBack"
  8. >
  9. <template #title>
  10. <p style="font-weight: bold;">添加银行卡转账申请</p>
  11. </template>
  12. <template #right>
  13. <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/>
  14. </template>
  15. </van-nav-bar>
  16. <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
  17. <p class="main_title">基础信息</p>
  18. <div class="main_box">
  19. <van-field
  20. readonly
  21. clickable
  22. required
  23. :rules="[{ required: true , message:'请选择申请时间' }]"
  24. v-model="form.applyDate"
  25. label="申请时间"
  26. placeholder="请选择申请时间"
  27. @click="showlasj = true"
  28. input-align="right"
  29. right-icon="arrow-down"
  30. />
  31. <van-popup v-model="showlasj" position="bottom">
  32. <van-datetime-picker
  33. v-model="currentDate"
  34. type="date"
  35. title="选择年月日"
  36. :min-date="minDate"
  37. :max-date="maxDate"
  38. @confirm="onConfirmLasj"
  39. @cancel="showlasj = false"
  40. />
  41. </van-popup>
  42. <van-field
  43. readonly
  44. clickable
  45. required
  46. :rules="[{ required: true , message:'请选择资金支出类别' }]"
  47. label="资金支出类别"
  48. placeholder="请选择"
  49. v-model="capitalExpenditureType"
  50. @click="showcapital = true"
  51. input-align="right"
  52. right-icon="arrow-down"
  53. label-width="auto"
  54. />
  55. <van-popup v-model="showcapital" position="bottom">
  56. <van-picker
  57. show-toolbar
  58. :columns="capitalExpenditureTypeOptions"
  59. @confirm="onConfirmCapital"
  60. @cancel="showcapital = false"
  61. />
  62. </van-popup>
  63. <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required
  64. :rules="[{ required: true , message:'请选择审批模式' }]">
  65. <template #input>
  66. <van-radio-group v-model="form.approvalMode" direction="horizontal">
  67. <van-radio name="1">线上审批</van-radio>
  68. <van-radio name="2">线下审批</van-radio>
  69. </van-radio-group>
  70. </template>
  71. </van-field>
  72. <van-field
  73. v-if="form.approvalMode==1"
  74. readonly
  75. clickable
  76. label="审批流程"
  77. placeholder="请选择"
  78. v-model="form.approvalTemplateName"
  79. @click="showtemplate = true"
  80. input-align="right"
  81. right-icon="arrow-down"
  82. required
  83. :rules="[{ required: true , message:'请选择项目流程' }]"
  84. />
  85. <van-popup v-model="showtemplate" position="bottom">
  86. <van-picker
  87. show-toolbar
  88. value-key="name"
  89. :columns="templateList"
  90. @confirm="onConfirmTemplate"
  91. @cancel="showtemplate = false"
  92. />
  93. </van-popup>
  94. <van-field
  95. readonly
  96. required
  97. label="支出总金额"
  98. v-model="form.expenditureAmount"
  99. placeholder="根据下方收款金额自动核算"
  100. input-align="right"
  101. label-width="auto"
  102. />
  103. </div>
  104. <div class="main_box" style="margin-top: 10px;">
  105. <van-field
  106. label="付款事由"
  107. v-model="form.remark"
  108. type="textarea"
  109. placeholder="请输入付款事由"
  110. input-align="right"
  111. rows="3"
  112. label-width="auto"
  113. required
  114. :rules="[{ required: true , message:'请输入付款事由' }]"
  115. />
  116. </div>
  117. <div class="main_box" style="margin-top: 10px;">
  118. <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/>
  119. </div>
  120. <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p>
  121. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  122. <van-field
  123. readonly
  124. clickable
  125. label="项目名称"
  126. placeholder="请选择"
  127. v-model="projectForm.projectName"
  128. @click="showproject = true"
  129. input-align="right"
  130. right-icon="arrow-down"
  131. required
  132. :rules="[{ required: true , message:'请选择项目名称' }]"
  133. />
  134. <van-popup v-model="showproject" position="bottom">
  135. <van-picker
  136. show-toolbar
  137. :columns="projectList"
  138. @confirm="onConfirmProject"
  139. @cancel="showproject = false"
  140. />
  141. </van-popup>
  142. <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
  143. <van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
  144. <van-field
  145. readonly
  146. clickable
  147. label="工程款类型"
  148. placeholder="请选择"
  149. v-model="projectFundType"
  150. @click="showFundType = true"
  151. input-align="right"
  152. right-icon="arrow-down"
  153. required
  154. :rules="[{ required: true , message:'请选择工程款类型' }]"
  155. />
  156. <van-popup v-model="showFundType" position="bottom">
  157. <van-picker
  158. show-toolbar
  159. :columns="projectFundTypeOptions"
  160. @confirm="onConfirmFundType"
  161. @cancel="showFundType = false"
  162. />
  163. </van-popup>
  164. <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
  165. </div>
  166. <p class="main_title" v-if="contractOpen">关联合同</p>
  167. <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  168. <van-field
  169. readonly
  170. clickable
  171. label="合同"
  172. placeholder="请选择"
  173. v-model="infoForm.name"
  174. @click="showcontract = true"
  175. input-align="right"
  176. right-icon="arrow-down"
  177. required
  178. :rules="[{ required: true , message:'请选择项目名称' }]"
  179. />
  180. <van-popup v-model="showcontract" position="bottom">
  181. <van-picker
  182. show-toolbar
  183. :columns="infoList"
  184. @confirm="onConfirmContract"
  185. @cancel="showcontract = false"
  186. />
  187. </van-popup>
  188. <van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/>
  189. <van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
  190. </div>
  191. <p class="main_title">付款方信息</p>
  192. <div class="main_box">
  193. <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>-->
  194. <van-field
  195. readonly
  196. clickable
  197. label="付款方"
  198. placeholder="请选择付款方"
  199. v-model="form.payer"
  200. @click="showpayer = true"
  201. input-align="right"
  202. right-icon="arrow-down"
  203. label-width="auto"
  204. required
  205. :rules="[{ required: true , message:'请选择付款方' }]"
  206. />
  207. <van-popup v-model="showpayer" position="bottom">
  208. <van-picker
  209. show-toolbar
  210. :columns="payerOptions"
  211. @confirm="onConfirmPayer($event)"
  212. @cancel="showpayer = false"
  213. />
  214. </van-popup>
  215. <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
  216. </div>
  217. <div class="main_title main_title_box">
  218. <p>收款方信息</p>
  219. <router-link v-if="!isModifyOrder" :to="{name:'sunVillageApprovalCollectionAdd', params: {accountType:form.accountType,isPeers:form.isPeers,bankType:form.bankType,option:form}}">添加收款方</router-link>
  220. <van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/>
  221. </div>
  222. <div class="main_box" style="margin-bottom: 15px;" v-if="form.bankType==1||form.bankType==2||form.bankType==3||form.bankType==4">
  223. <van-cell title="收款账户类型" v-if="form.bankType==1">
  224. <template #right-icon>
  225. <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange" >
  226. <van-radio name="1">公户</van-radio>
  227. <van-radio name="2">私户</van-radio>
  228. </van-radio-group>
  229. </template>
  230. </van-cell>
  231. <van-cell title="是否与付款方同行" v-if="form.bankType==2||form.bankType==3||form.bankType==4" >
  232. <template #right-icon>
  233. <van-radio-group direction="horizontal" v-model="form.isPeers" @change="accountTypeChange1">
  234. <van-radio name="Y">是</van-radio>
  235. <van-radio name="N">否</van-radio>
  236. </van-radio-group>
  237. </template>
  238. </van-cell>
  239. </div>
  240. <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  241. <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" />
  242. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  243. <van-field
  244. readonly
  245. clickable
  246. label="收款方"
  247. placeholder="请选择"
  248. v-model="item.payee"
  249. @click="item.showPayee = true"
  250. input-align="right"
  251. right-icon="arrow-down"
  252. required
  253. :rules="[{ required: true , message:'请选择收款方' }]"
  254. />
  255. <van-popup v-model="item.showPayee" position="bottom">
  256. <van-picker
  257. show-toolbar
  258. :columns="payeeList"
  259. @confirm="onConfirmPayee($event,index)"
  260. @cancel="item.showPayee = false"
  261. />
  262. </van-popup>
  263. <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
  264. <van-field required :rules="[{ required: true , message:'请输入开户银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入开户银行银行" input-align="right" label-width="auto"/>
  265. <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
  266. <van-field
  267. readonly
  268. clickable
  269. label="所属银行"
  270. v-model="item.bankTypeText"
  271. input-align="right"
  272. placeholder="请输入所属银行"
  273. required
  274. :rules="[{ required: true , message:'请选择所属银行' }]"
  275. />
  276. <!--<van-popup v-model="item.showbankType" position="bottom">
  277. <van-picker
  278. show-toolbar
  279. :columns="bankTypeDictionaries"
  280. @confirm="onConfirmBankType($event,index)"
  281. @cancel="item.showbankType = false"
  282. />
  283. </van-popup>-->
  284. </div>
  285. </div>
  286. <p class="main_title" v-if="isModifyOrder">上传附件</p>
  287. <div class="main_box" style="padding: 5px 0 0 0;" v-if="isModifyOrder">
  288. <van-cell value="收据" />
  289. <van-uploader v-model="fileList1" :after-read="beforeRead('1')" @delete="deleteFile" style="margin-left:8px;"></van-uploader>
  290. <van-cell title="发票" />
  291. <van-uploader v-model="fileList2" :after-read="beforeRead('2')" @delete="deleteFile" style="margin-left:8px;"></van-uploader>
  292. <van-cell title="其他" />
  293. <van-uploader v-model="fileList3" :after-read="beforeRead('3')" @delete="deleteFile" style="margin-left:8px;"></van-uploader>
  294. </div>
  295. <div style="padding: 16px 0;">
  296. <van-row v-if="!isModifyOrder">
  297. <van-col span="24" align="center">
  298. <van-button type="info" native-type="submit" @click="buttonType='save'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
  299. </van-col>
  300. </van-row>
  301. <van-row v-else>
  302. <van-col span="12" align="center">
  303. <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保存修改</van-button>
  304. </van-col>
  305. <van-col span="12" align="center">
  306. <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>
  307. </van-col>
  308. </van-row>
  309. <div class="clear"></div>
  310. </div>
  311. </van-form>
  312. </div>
  313. </template>
  314. <script>
  315. import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto ,selectApprovalByTemplateId,
  316. customSubmit ,offlineCustomSubmit, getAccount ,getQmyeFlow , attach ,listInfo ,getInfoto ,addInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  317. import request from '@/utils/request'
  318. import {attachmentList, commonAttach,systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  319. import Dialog from "vant/lib/dialog";
  320. export default {
  321. name: "approvalAdd",
  322. data() {
  323. return {
  324. showtemplate:false,
  325. showcontract:false,
  326. showcapital:false,
  327. showpayee:false,
  328. showlasj:false,
  329. showbankType:false,
  330. showproject:false,
  331. showFundType:false,
  332. showpayer:false,
  333. buttonType:'a',
  334. minDate: new Date(2000, 1, 1),
  335. maxDate: new Date(2050, 12, 31),
  336. currentDate: new Date(),
  337. form:{
  338. id: null,
  339. upId: null,
  340. applyDate:this.nowDate,
  341. approvalMode:'1',
  342. downId: null,
  343. orderId: null,
  344. cashierId: null,
  345. transferType: '1',
  346. accountType: null,
  347. isPeers:null,
  348. explainSituation: null,
  349. succeedAmount: null,
  350. payer: null,
  351. payerAccount: null,
  352. operatorCode: null,
  353. enterpriseCode: null,
  354. expenditureAmount: null,
  355. capitalExpenditureType: '1',
  356. remark: null,
  357. transferStatus: "0",
  358. auditStatus: "0",
  359. paymentState: "1",
  360. bankPriority: "0",
  361. clientPriority: "0"
  362. },
  363. fileList1:[],
  364. fileList2:[],
  365. fileList3:[],
  366. capitalExpenditureType:'',
  367. payee:'',
  368. bankType:'',
  369. wfydlxDictionaries:[],
  370. jglxDictionaries:[],
  371. sysDictionaries:[],
  372. capitalExpenditureTypeOptions:[],
  373. bankTypeDictionaries:[],
  374. projectList:[],
  375. projectFundTypeOptions:[],
  376. projectFundTypeDictionaries:[],
  377. infoList:[],
  378. payerOptions:[],
  379. chargeItme:[],
  380. chargeItmeShow:[],
  381. templateList:[],
  382. payeeList:[],
  383. // 查询参数
  384. queryParams: {
  385. transferType:"",
  386. orderByColumn: "id",
  387. isAsc: "desc",
  388. },
  389. capitalExpenditureOpen:false,
  390. contractOpen:false,
  391. projectForm:{
  392. projectId:null,
  393. projectName:null,
  394. projectContractor:null,
  395. projectAmount:null,
  396. projectBillNum:null,
  397. projectFundType:'1',
  398. outId:null,
  399. ynType:'1'
  400. },
  401. infoForm:{
  402. infoId:null,
  403. name:null,
  404. code:null,
  405. totalAmount:null,
  406. contractionId:null,
  407. transferId:null
  408. },
  409. // 合同信息查询参数
  410. queryContractionParams: {
  411. pageNum: 1,
  412. pageSize: 100,
  413. contractionStatus: '1',
  414. orderByColumn: "endTime",
  415. isAsc: "desc",
  416. },
  417. projectFundType:'',
  418. nowDate:"",
  419. isModifyOrder:false, //是已创建订单 false新建订单 true已创建订单
  420. };
  421. },
  422. created() {
  423. this.getNowDate();
  424. this.reset();
  425. this.initProjectInfo();
  426. this.capitalExpenditureOpen = false
  427. this.getDicts("project_fund_type").then((response) => {
  428. for (var i = 0; i < response.data.length; i++) {
  429. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  430. }
  431. this.projectFundTypeDictionaries = response.data;
  432. });
  433. let params1={
  434. accountType: "102",
  435. // "params":{townAccountType:'0'},
  436. status: "N",
  437. }
  438. getAccount(params1).then((response) => {
  439. this.payerOptions = response.rows;
  440. response.rows.map((res,index) => {
  441. res['payerFrom'] = '1'
  442. this.payerOptions[index].text = res.accountName;
  443. this.payerOptions[index].value = res.id;
  444. })
  445. });
  446. this.getDictionaries();
  447. this.getTemplateList();
  448. },
  449. methods: {
  450. goFlow(){
  451. if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){
  452. window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode;
  453. }else{
  454. this.$notify({ type: 'danger', message: '无审批流程!' });
  455. }
  456. },
  457. getTemplateList(){
  458. let templateQueryParams = {
  459. // 分页
  460. pageNum: 1,
  461. pageSize: 999,
  462. type:'1'
  463. };
  464. listTemplate(templateQueryParams).then(response => {
  465. this.templateList = response.rows;
  466. });
  467. },
  468. onConfirmTemplate(data){
  469. selectApprovalByTemplateId(data.id).then(res => {
  470. this.showtemplate = false;
  471. if(res.approvalDetails.length>0){
  472. this.form.approvalTemplateName = data.name
  473. this.form.approvalTemplateId = data.id
  474. }else{
  475. this.form.approvalTemplateName = null
  476. this.form.approvalTemplateId = null
  477. this.$notify({ type: 'danger', message: '此流程无节点,无法选择!' });
  478. }
  479. })
  480. },
  481. getNowDate(){
  482. var _this = this;
  483. let yy = new Date().getFullYear();
  484. let mm = new Date().getMonth()+1;
  485. let dd = new Date().getDate();
  486. _this.nowDate = yy+'-'+mm+'-'+dd
  487. },
  488. initProjectInfo(){
  489. let _this = this
  490. let queryParams={
  491. pageNum: 1,
  492. pageSize: 100,
  493. }
  494. listProject(queryParams).then(response => {
  495. _this.projectList = response.rows;
  496. console.log(response)
  497. for (let i = 0; i < response.rows.length; i++) {
  498. //_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id});
  499. _this.$set(_this.projectList[i],"text",response.rows[i].projectName)
  500. _this.$set(_this.projectList[i],"value",response.rows[i].id)
  501. }
  502. });
  503. listInfo(this.queryContractionParams).then(response => {
  504. console.log(response)
  505. _this.infoList = response.rows;
  506. for (let i = 0; i < response.rows.length; i++) {
  507. //_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code});
  508. _this.$set(_this.infoList[i],"text",response.rows[i].name)
  509. _this.$set(_this.infoList[i],"value",response.rows[i].code)
  510. }
  511. });
  512. },
  513. // 表单重置
  514. reset() {
  515. this.form = {
  516. id: null,
  517. upId: null,
  518. applyDate:this.nowDate,
  519. approvalMode:'1',
  520. downId: null,
  521. orderId: null,
  522. cashierId: null,
  523. transferType: '1',
  524. accountType: null,
  525. isPeers:null,
  526. explainSituation: null,
  527. succeedAmount: null,
  528. payer: null,
  529. payerAccount: null,
  530. operatorCode: null,
  531. enterpriseCode: null,
  532. expenditureAmount: null,
  533. capitalExpenditureType: '1',
  534. remark: null,
  535. transferStatus: "0",
  536. auditStatus: "0",
  537. paymentState: "1",
  538. bankPriority: "0",
  539. clientPriority: "0"
  540. };
  541. this.processList = {}
  542. this.projectForm={
  543. projectId:null,
  544. projectName:null,
  545. projectContractor:null,
  546. projectAmount:null,
  547. projectBillNum:null,
  548. projectFundType:'1',
  549. outId:null,
  550. ynType:'1'
  551. }
  552. },
  553. getChange(){
  554. if(this.buttonType == 'save'){
  555. //保存
  556. this.goSave();
  557. }else if(this.buttonType == 'add'){
  558. //保存并提交
  559. this.goAdd();
  560. }else if(this.buttonType == 'update'){
  561. //修改
  562. this.goUpdate();
  563. }
  564. },
  565. getDictionaries(){
  566. this.getDicts("capital_expenditure_type").then((res) => {
  567. for (var i = 0; i < res.data.length; i++) {
  568. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  569. }
  570. });
  571. this.getDicts("bank_type_all").then(res => {
  572. for (var i = 0; i < res.data.length; i++) {
  573. this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  574. }
  575. });
  576. },
  577. getError(e){
  578. console.log(e)
  579. this.$notify({ type: 'danger', message: e.errors[0].message });
  580. },
  581. addChargeItme(index){
  582. if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){
  583. this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' });
  584. return;
  585. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){
  586. this.$notify({ type: 'danger', message: '请输入收入金额!' });
  587. return;
  588. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){
  589. this.$notify({ type: 'danger', message: '请输入收款账户!' });
  590. return;
  591. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){
  592. this.$notify({ type: 'danger', message: '请输入开户银行!' });
  593. return;
  594. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){
  595. this.$notify({ type: 'danger', message: '请选择所属银行!' });
  596. return;
  597. }
  598. if(this.form.bankType == '2' && this.form.isPeers == 'N' && this.chargeItme.length>0 && this.chargeItme != []){
  599. this.$notify({ type: 'danger', message: '目前农商行仅支持单笔跨行转账,即仅能有一个收款方!' });
  600. }else{
  601. this.getDicts("bank_type").then(res => {
  602. this.chargeItme.splice(index + 1, 0, {
  603. payeeId: "", //收款方ID
  604. payee: "", //收款方
  605. payeeAccount: "", //收款账户
  606. bankDeposit: "", //开户银行
  607. incomeAmount: "", //收入金额
  608. bankType: null, //所属银行
  609. bankTypeText:"", //所属银行
  610. showPayee:false,
  611. showbankType:false
  612. });
  613. });}
  614. },
  615. getPayeeList() {
  616. //普通转账
  617. this.queryParams.status = "0"
  618. listPayee(this.queryParams).then((response) => {
  619. response.rows.map((res,index) => {
  620. if(res.payeeType==1||res.payeeType==2){
  621. res.text = res.payee;
  622. res.value = res.id;
  623. this.payeeList.push(res)
  624. }
  625. })
  626. });
  627. },
  628. payeeDictLabel(datas, value) {
  629. var actions = [];
  630. Object.keys(datas).some((key) => {
  631. if (datas[key].payeeId == ('' + value)) {
  632. actions.push(datas[key].payee);
  633. return true;
  634. }
  635. })
  636. return actions.join('');
  637. },
  638. onConfirmCapital(data){
  639. if (data.value == 2){
  640. this.capitalExpenditureOpen = true;
  641. this.contractOpen = false
  642. this.infoForm = {};
  643. }else if(data.value == 4){
  644. this.capitalExpenditureOpen = false;
  645. this.contractOpen = true
  646. this.projectForm = {};
  647. }else{
  648. this.capitalExpenditureOpen = false;
  649. this.contractOpen = false
  650. this.projectForm = {};
  651. this.infoForm = {};
  652. }
  653. this.capitalExpenditureType = data.text;
  654. this.form.capitalExpenditureType = data.value;
  655. this.showcapital = false;
  656. },
  657. onConfirmFundType(data){
  658. console.log(data)
  659. this.projectForm.projectFundType = data.value;
  660. this.projectFundType = data.text;
  661. this.showFundType = false;
  662. },
  663. onConfirmContract(data){
  664. this.infoList.map(res => {
  665. if(res.name==data.text){
  666. this.infoForm.contractionId = res.id;
  667. this.infoForm.name = res.name;
  668. this.infoForm.code = res.code;
  669. this.infoForm.totalAmount = res.totalAmount;
  670. }
  671. })
  672. this.showcontract = false;
  673. },
  674. onConfirmProject(data){
  675. this.projectList.map(res => {
  676. if(res.projectName==data.text){
  677. this.projectForm.projectId = res.id
  678. this.projectForm.projectName = res.projectName
  679. this.projectForm.projectContractor = res.projectContractor
  680. this.projectForm.projectAmount = res.projectAmount
  681. }
  682. })
  683. this.showproject = false;
  684. },
  685. onConfirmPayee(data,index){
  686. for (var i = 0 ; i < this.chargeItme.length ; i++){
  687. this.chargeItme[i].showPayee = false;
  688. }
  689. this.chargeItme[index].payee = data.text;
  690. this.chargeItme[index].payeeId = data.value;
  691. this.chargeItme[index].showpayee = false;
  692. this.payeeSelectChange(data.value , index)
  693. console.log(data)
  694. },
  695. onConfirmBankType(data,index){
  696. for (var i = 0 ; i < this.chargeItme.length ; i++){
  697. this.chargeItme[i].showbankType = false;
  698. }
  699. this.chargeItme[index].bankTypeText = data.text;
  700. this.chargeItme[index].bankType = data.value;
  701. this.chargeItme[index].showbankType = false;
  702. },
  703. onConfirmPayer(data){
  704. this.form.payer = data.text;
  705. this.form.cashierId = data.value;
  706. this.showpayer = false;
  707. this.selectChange(data.value)
  708. },
  709. onConfirmLasj(data){
  710. this.form.applyDate = this.getNowFormatDate(data).substr(0,10);
  711. this.showlasj = false;
  712. },
  713. accountTypeChange(e){
  714. this.payeeList = [];
  715. this.chargeItme = [];
  716. this.queryParams.isPeers = this.form.isPeers
  717. this.queryParams.accountType = this.form.accountType
  718. this.queryParams.bankType = this.form.bankType
  719. this.queryParams.status = "0"
  720. listPayee(this.queryParams).then((response) => {
  721. response.rows.map((res,index) => {
  722. if(res.payeeType==1||res.payeeType==2){
  723. response.rows[index].text = res.payee;
  724. response.rows[index].value = res.id;
  725. this.payeeList.push(res)
  726. }
  727. })
  728. });
  729. },
  730. accountTypeChange1(e){
  731. this.payeeList = [];
  732. this.chargeItme = [];
  733. this.queryParams.isPeers = this.form.isPeers
  734. this.queryParams.accountType = this.form.accountType
  735. this.queryParams.bankType = this.form.bankType
  736. this.queryParams.status = "0"
  737. listPayee(this.queryParams).then((response) => {
  738. response.rows.map((res,index) => {
  739. if(res.payeeType==1||res.payeeType==2){
  740. response.rows[index].text = res.payee;
  741. response.rows[index].value = res.id;
  742. this.payeeList.push(res)
  743. }
  744. })
  745. });
  746. },
  747. // 钱计算
  748. moneyChange(input) {
  749. console.log(input)
  750. let obj = {};
  751. obj = this.chargeItme.find((account) => {
  752. //model就是上面的数据源
  753. return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据
  754. });
  755. let total = 0;
  756. this.chargeItme.forEach((money) => {
  757. total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2)
  758. });
  759. this.$set(this.form, "expenditureAmount", total);
  760. },
  761. goAdd(){
  762. if(this.chargeItme.length<1){
  763. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  764. return;
  765. }
  766. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  767. this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
  768. return;
  769. }
  770. if(this.form.capitalExpenditureType==2){
  771. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  772. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  773. return;
  774. }
  775. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  776. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  777. return;
  778. }
  779. }
  780. if(this.form.capitalExpenditureType==4){
  781. if(this.infoForm.name==""||this.infoForm.name==null){
  782. this.$notify({ type: 'danger', message: '请选择合同名称!' });
  783. return;
  784. }
  785. if(this.infoForm.code==""||this.infoForm.code==null){
  786. this.$notify({ type: 'danger', message: '请输入合同编码!' });
  787. return;
  788. }
  789. if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){
  790. this.$notify({ type: 'danger', message: '请输入合同价款!' });
  791. return;
  792. }
  793. }
  794. if(this.fileList1.length==0&&this.fileList2.length==0&&this.fileList3.length==0){
  795. Dialog.confirm({
  796. title: '提示',
  797. message: '此申请单中未上传任何附件,是否确认提交?',
  798. })
  799. .then(() => {
  800. this.saveRelease()
  801. })
  802. .catch(() => {
  803. return false;
  804. });
  805. }else{
  806. this.saveRelease()
  807. }
  808. },
  809. saveRelease(){
  810. let _this = this;
  811. this.$set(this.form, "payeeList", this.chargeItme);
  812. this.$set(this.form, "bankTypeList", this.chargeItme);
  813. this.$set(this.form, "accountTypeList", this.chargeItme);
  814. this.$set(this.form, "transferStatusList", this.chargeItme);
  815. updateTransfer(this.form).then(response => {
  816. this.$set(this.projectForm, "ynType", '1');
  817. if(this.form.capitalExpenditureType==2){
  818. addProjectto(this.projectForm).then(res => {
  819. if(_this.form.approvalMode === '1'){
  820. customSubmit(this.form.id).then(res => {
  821. _this.$toast.success('提交成功');
  822. setTimeout(function(){
  823. _this.$router.push('/sunVillage_info/approvalList')
  824. },1500)
  825. })
  826. }else{
  827. offlineCustomSubmit(this.form.id).then(res => {
  828. _this.$toast.success('提交成功');
  829. setTimeout(function(){
  830. _this.$router.push('/sunVillage_info/approvalList')
  831. },1500)
  832. })
  833. }
  834. })
  835. } else if(this.form.capitalExpenditureType==4){
  836. addInfoto(this.infoForm).then(res => {
  837. if(_this.form.approvalMode === '1'){
  838. customSubmit(this.form.id).then(res => {
  839. _this.$toast.success('提交成功');
  840. setTimeout(function(){
  841. _this.$router.push('/sunVillage_info/approvalList')
  842. },1500)
  843. })
  844. }else{
  845. offlineCustomSubmit(this.form.id).then(res => {
  846. _this.$toast.success('提交成功');
  847. setTimeout(function(){
  848. _this.$router.push('/sunVillage_info/approvalList')
  849. },1500)
  850. })
  851. }
  852. })
  853. }else{
  854. if(_this.form.approvalMode === '1'){
  855. customSubmit(this.form.id).then(res => {
  856. _this.$toast.success('提交成功');
  857. setTimeout(function(){
  858. _this.$router.push('/sunVillage_info/approvalList')
  859. },1500)
  860. })
  861. }else{
  862. offlineCustomSubmit(this.form.id).then(res => {
  863. _this.$toast.success('提交成功');
  864. setTimeout(function(){
  865. _this.$router.push('/sunVillage_info/approvalList')
  866. },1500)
  867. })
  868. }
  869. }
  870. })
  871. },
  872. goSave(){
  873. let _this = this
  874. if(this.chargeItme.length<1){
  875. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  876. return;
  877. }
  878. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  879. this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
  880. return;
  881. }
  882. if(this.form.capitalExpenditureType==2){
  883. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  884. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  885. return;
  886. }
  887. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  888. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  889. return;
  890. }
  891. }
  892. if(this.form.capitalExpenditureType==4){
  893. if(this.infoForm.name==""||this.infoForm.name==null){
  894. this.$notify({ type: 'danger', message: '请选择合同名称!' });
  895. return;
  896. }
  897. if(this.infoForm.code==""||this.infoForm.code==null){
  898. this.$notify({ type: 'danger', message: '请输入合同编码!' });
  899. return;
  900. }
  901. if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){
  902. this.$notify({ type: 'danger', message: '请输入合同价款!' });
  903. return;
  904. }
  905. }
  906. this.$set(this.form, "payeeList", this.chargeItme);
  907. this.$set(this.form, "bankTypeList", this.chargeItme);
  908. this.$set(this.form, "accountTypeList", this.chargeItme);
  909. this.$set(this.form, "transferStatusList", this.chargeItme);
  910. addTransfer(this.form).then(response => {
  911. this.projectForm.outId = response.data.id
  912. this.infoForm.transferId = response.data.id
  913. this.$set(this.projectForm, "ynType", '1');
  914. this.form.id = response.data.id;
  915. this.isModifyOrder = true;
  916. if(this.form.capitalExpenditureType==2){
  917. addProjectto(this.projectForm).then(res => {
  918. // this.$toast.success('保存成功');
  919. // setTimeout(function(){
  920. // history.go(-1)
  921. // },2000)
  922. })
  923. } else if(this.form.capitalExpenditureType==4){
  924. addInfoto(this.infoForm).then(res => {
  925. // this.$toast.success('保存成功');
  926. // setTimeout(function(){
  927. // history.go(-1)
  928. // },2000)
  929. })
  930. }else{
  931. // this.$toast.success('保存成功');
  932. // setTimeout(function(){
  933. // history.go(-1)
  934. // },2000)
  935. }
  936. })
  937. },
  938. goUpdate(){
  939. let _this = this
  940. if(this.chargeItme.length<1){
  941. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  942. return;
  943. }
  944. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  945. this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
  946. return;
  947. }
  948. if(this.form.capitalExpenditureType==2){
  949. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  950. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  951. return;
  952. }
  953. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  954. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  955. return;
  956. }
  957. }
  958. if(this.form.capitalExpenditureType==4){
  959. if(this.infoForm.name==""||this.infoForm.name==null){
  960. this.$notify({ type: 'danger', message: '请选择合同名称!' });
  961. return;
  962. }
  963. if(this.infoForm.code==""||this.infoForm.code==null){
  964. this.$notify({ type: 'danger', message: '请输入合同编码!' });
  965. return;
  966. }
  967. if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){
  968. this.$notify({ type: 'danger', message: '请输入合同价款!' });
  969. return;
  970. }
  971. }
  972. this.$set(this.form, "payeeList", this.chargeItme);
  973. this.$set(this.form, "bankTypeList", this.chargeItme);
  974. this.$set(this.form, "accountTypeList", this.chargeItme);
  975. this.$set(this.form, "transferStatusList", this.chargeItme);
  976. updateTransfer(this.form).then(response => {
  977. this.projectForm.outId = this.form.id
  978. this.infoForm.transferId = this.form.id
  979. this.$set(this.projectForm, "ynType", '1');
  980. if(this.form.capitalExpenditureType==2){
  981. addProjectto(this.projectForm).then(res => {
  982. this.$toast.success('保存成功');
  983. setTimeout(function(){
  984. history.go(-1)
  985. },2000)
  986. })
  987. } else if(this.form.capitalExpenditureType==4){
  988. addInfoto(this.infoForm).then(res => {
  989. this.$toast.success('保存成功');
  990. setTimeout(function(){
  991. history.go(-1)
  992. },2000)
  993. })
  994. }else{
  995. this.$toast.success('保存成功');
  996. setTimeout(function(){
  997. history.go(-1)
  998. },2000)
  999. }
  1000. })
  1001. },
  1002. payeeSelectChange(select, i) {
  1003. let obj = {};
  1004. let fuzhitype = 0;
  1005. obj = this.payeeList.find((account) => {
  1006. //model就是上面的数据源
  1007. return account.id === select ; //筛选出匹配数据
  1008. });
  1009. let _this = this
  1010. if(this.chargeItme != [] && this.chargeItme.length>1){
  1011. this.chargeItme.some((value, index) => {
  1012. if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i&&this.form.bankType != 2){
  1013. fuzhitype = 2;
  1014. return true;
  1015. }
  1016. if(_this.form.isPeers!=undefined&&_this.form.isPeers!=null&&_this.form.isPeers=='N'){
  1017. }else{
  1018. if(obj.bankType==1&&value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){
  1019. fuzhitype = 1;
  1020. return true;
  1021. }
  1022. }
  1023. });
  1024. }
  1025. if(fuzhitype == 0){
  1026. this.$set(this.chargeItme[i], "payee",obj.payee)
  1027. this.$set(this.chargeItme[i], "bankType", obj.bankType)
  1028. this.$set(this.chargeItme[i], "payeeId", obj.id);
  1029. this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount);
  1030. this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit);
  1031. this.$set(this.chargeItme[i], "accountType", obj.accountType);
  1032. this.$set(this.chargeItme[i], "payeePaymentLines", obj.payeePaymentLines);
  1033. _this.bankTypeDictionaries.map(rr => {
  1034. if(rr.value==obj.bankType){
  1035. this.$set(this.chargeItme[i], "bankTypeText", rr.text);
  1036. }
  1037. })
  1038. }else if(fuzhitype == 1){
  1039. this.$set(this.chargeItme[i], "payee",'')
  1040. this.$set(this.chargeItme[i], "bankType",'')
  1041. this.$set(this.chargeItme[i], "payeeId", '');
  1042. this.$set(this.chargeItme[i], "payeeAccount", '');
  1043. this.$set(this.chargeItme[i], "bankDeposit", '');
  1044. this.$set(this.chargeItme[i], "accountType", '');
  1045. this.$set(this.chargeItme[i], "payeePaymentLines", '');
  1046. this.$set(this.chargeItme[i], "bankTypeText", '');
  1047. this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' });
  1048. }else if(fuzhitype == 2){
  1049. this.$set(this.chargeItme[i], "payee",'')
  1050. this.$set(this.chargeItme[i], "bankType",'')
  1051. this.$set(this.chargeItme[i], "payeeId", '');
  1052. this.$set(this.chargeItme[i], "payeeAccount", '');
  1053. this.$set(this.chargeItme[i], "bankDeposit", '');
  1054. this.$set(this.chargeItme[i], "accountType", '');
  1055. this.$set(this.chargeItme[i], "payeePaymentLines", '');
  1056. this.$set(this.chargeItme[i], "bankTypeText", '');
  1057. this.$notify({ type: 'danger', message: '收款方已存在!' });
  1058. }
  1059. },
  1060. selectChange(select) {
  1061. let obj = {};
  1062. obj = this.payerOptions.find((account) => {
  1063. //model就是上面的数据源
  1064. return account.id === select; //筛选出匹配数据
  1065. });
  1066. if(obj.accountPassword != null && obj.accountPassword != "" &&
  1067. obj.bankType != null && obj.bankType != ""){
  1068. this.$set(this.form, "bookId", obj.bookId);
  1069. this.$set(this.form, "deptId", obj.deptId);
  1070. this.$set(this.form, "cashierId", obj.id);
  1071. this.$set(this.form, "payer", obj.accountName);
  1072. this.$set(this.form, "payerAccount", obj.bankAccountNumber);
  1073. this.$set(this.form, "operatorCode", obj.operatorCode);
  1074. this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
  1075. this.$set(this.form, "bankType", obj.bankType);
  1076. this.$set(this.form, "bankAccountType", obj.bankAccountType);
  1077. this.$set(this.form, "villageAccountType", obj.villageAccountType);
  1078. this.$set(this.form, "taccountId", obj.taccountId);
  1079. this.$set(this.form, "accountNo", obj.accountNo);
  1080. this.$set(this.form, "cifNo", obj.cifNo);
  1081. this.$set(this.form, "payerFrom", '1');
  1082. if(obj.bankType==1){
  1083. this.form.accountType = "1"
  1084. this.form.isPeers = null
  1085. this.accountTypeChange();
  1086. }else if(obj.bankType==2||obj.bankType==3||obj.bankType==4){
  1087. this.form.accountType = null
  1088. this.form.isPeers = "Y"
  1089. this.accountTypeChange1();
  1090. }else{
  1091. this.payeeList = [];
  1092. this.chargeItme = [];
  1093. this.queryParams.isPeers = null
  1094. this.queryParams.accountType = ""
  1095. this.queryParams.bankType = ""
  1096. this.queryParams.status = "0"
  1097. listPayee(this.queryParams).then((response) => {
  1098. response.rows.map((res,index) => {
  1099. if(res.payeeType==1||res.payeeType==2){
  1100. response.rows[index].text = res.payee;
  1101. response.rows[index].value = res.id;
  1102. this.payeeList.push(res)
  1103. }
  1104. })
  1105. });
  1106. }
  1107. }else{
  1108. if(obj.payerFrom==1){
  1109. this.diglogStatus = false;
  1110. this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" });
  1111. this.$set(this.form,"payer","")
  1112. this.$set(this.form,"payerAccount","")
  1113. }else{
  1114. this.$set(this.form, "payerFrom", obj.parerFrom);
  1115. if(obj.operatorCode!=null&&obj.operatorCode!=''){
  1116. this.$set(this.form, "operatorCode", obj.operatorCode);
  1117. }else{
  1118. this.$set(this.form, "operatorCode", '');
  1119. }
  1120. if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){
  1121. this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
  1122. }else{
  1123. this.$set(this.form, "enterpriseCode", '');
  1124. }
  1125. if(obj.accountPassword!=null&&obj.accountPassword!=''){
  1126. this.$set(this.form, "accountPassword", obj.accountPassword);
  1127. }else{
  1128. this.$set(this.form, "accountPassword", '');
  1129. }
  1130. this.$set(this.form, "bookId",'');
  1131. this.$set(this.form, "deptId", '');
  1132. this.$set(this.form, "cashierId", obj.id);
  1133. this.$set(this.form, "payer", obj.accountName);
  1134. this.$set(this.form, "bankType", obj.bankType);
  1135. if(obj.payerFrom==6){
  1136. getQmyeFlow(obj.bankAccountNumber).then((response) => {
  1137. this.$set(this.form, "payerAccount", response.data);
  1138. });
  1139. }else {
  1140. this.$set(this.form, "payerAccount", obj.bankAccountNumber);
  1141. }
  1142. }
  1143. }
  1144. },
  1145. beforeRead(obj) {
  1146. return (file) =>{
  1147. let params1 = new FormData();
  1148. params1.append("tableId", this.form.id);
  1149. params1.append("tableName", "t_yinnong_transfer");
  1150. params1.append("bizPath", "transfer");
  1151. params1.append("fileType", obj);
  1152. params1.append("file", file.file);
  1153. commonAttach(params1).then((r1) => {
  1154. file.id=r1.id;
  1155. file.fileUrl = r1.fileUrl;
  1156. })
  1157. }
  1158. },
  1159. deleteFile(file){
  1160. systemAttachment(file.id).then((res) => {});
  1161. },
  1162. getFileList(){
  1163. let oData1= {
  1164. tableId: this.$route.query.id,
  1165. tableName: "t_yinnong_transfer",
  1166. bizPath: "transfer",
  1167. fileType: "1",
  1168. }
  1169. attachmentList(oData1).then(res => {
  1170. res.rows.map(r => {
  1171. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  1172. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  1173. })
  1174. })
  1175. let oData2= {
  1176. tableId: this.$route.query.id,
  1177. tableName: "t_yinnong_transfer",
  1178. bizPath: "transfer",
  1179. fileType: "2",
  1180. }
  1181. attachmentList(oData2).then(res => {
  1182. res.rows.map(r => {
  1183. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  1184. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  1185. })
  1186. })
  1187. let oData3= {
  1188. tableId: this.$route.query.id,
  1189. tableName: "t_yinnong_transfer",
  1190. bizPath: "transfer",
  1191. fileType: "3",
  1192. }
  1193. attachmentList(oData3).then(res => {
  1194. res.rows.map(r => {
  1195. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  1196. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  1197. })
  1198. })
  1199. },
  1200. goBack(){
  1201. this.$router.push({path:'/sunVillage_info/approvalList'})
  1202. },
  1203. deleteChargeItme(index){
  1204. this.chargeItme.splice(index,1)
  1205. },
  1206. },
  1207. watch: {
  1208. $route (to, from ) {
  1209. // 监听路由变化, 实现类似 小程序的 onShow 事件
  1210. if (to.path === '/yinnong/approvalAdd') {
  1211. // do anything you want
  1212. console.log("aaa")
  1213. if (this.$route.params.payeeForm){
  1214. this.chargeItme.push(this.$route.params.payeeForm)
  1215. console.log(this.$route.params.payeeForm)
  1216. }
  1217. }
  1218. }
  1219. },
  1220. }
  1221. </script>
  1222. <style scoped lang="scss">
  1223. .app-container {
  1224. padding: 2% 0;
  1225. }
  1226. .main_title_box{
  1227. display: flex;
  1228. justify-content: space-between;
  1229. align-items: center;
  1230. }
  1231. .main_title{
  1232. font-size: 0.4rem;
  1233. color: #1D6FE9;
  1234. margin: 0.2rem 6%;
  1235. position: relative;
  1236. a{
  1237. background: #1989fa;
  1238. color: #ffffff;
  1239. padding: 0.05rem 0.3rem;
  1240. border-radius: 5PX;
  1241. }
  1242. }
  1243. .main_box{
  1244. width: 96%;
  1245. margin: 0 auto;
  1246. border-radius: 6px;
  1247. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  1248. overflow: hidden;
  1249. background-color: #FFF;
  1250. }
  1251. .submitButton{
  1252. width: 80%;
  1253. margin: 0 auto;
  1254. background-color: #1D6FE9;
  1255. }
  1256. .addFamily{
  1257. //position: absolute;
  1258. //top: -2px;
  1259. //right: 0;
  1260. border-radius: 50%;
  1261. }
  1262. .deleteFamily{
  1263. position: absolute;
  1264. top: 0rem;
  1265. right: 6%;
  1266. z-index: 9;
  1267. border-radius: 50%;
  1268. }
  1269. </style>