移动端
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.

approvalModify.vue 45 KiB

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