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

approvalAdd2.vue 83 KiB

2 年之前
2 年之前
2 年之前
2 年之前
1 年之前
1 年之前
2 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971
  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. <div class="header_main">
  17. 添加信用卡还款申请
  18. <div class="return_btn" @click="onClickLeft"></div>
  19. <div class="add_btn" @click="goFlow"></div>
  20. </div>
  21. <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
  22. <p class="main_title">基础信息</p>
  23. <div class="main_box">
  24. <van-field
  25. readonly
  26. clickable
  27. required
  28. :rules="[{ required: true , message:'请选择申请时间' }]"
  29. v-model="form.applyDate"
  30. label="申请时间"
  31. placeholder="请选择申请时间"
  32. @click="showlasj = true"
  33. input-align="right"
  34. right-icon="arrow-down"
  35. />
  36. <van-popup v-model="showlasj" position="bottom">
  37. <van-datetime-picker
  38. v-model="currentDate"
  39. type="date"
  40. title="选择年月日"
  41. :min-date="minDate"
  42. :max-date="maxDate"
  43. @confirm="onConfirmLasj"
  44. @cancel="showlasj = false"
  45. />
  46. </van-popup>
  47. <van-field
  48. readonly
  49. clickable
  50. required
  51. :rules="[{ required: true , message:'请选择资金支出类别' }]"
  52. label="资金支出类别"
  53. placeholder="请选择"
  54. v-model="capitalExpenditureType"
  55. @click="showcapital = true"
  56. input-align="right"
  57. right-icon="arrow-down"
  58. label-width="auto"
  59. />
  60. <van-popup v-model="showcapital" position="bottom">
  61. <van-picker
  62. show-toolbar
  63. :columns="capitalExpenditureTypeOptions"
  64. @confirm="onConfirmCapital"
  65. @cancel="showcapital = false"
  66. />
  67. </van-popup>
  68. <van-field
  69. readonly
  70. required
  71. label="支出总金额"
  72. v-model="form.expenditureAmount"
  73. placeholder="根据下方收款金额自动核算"
  74. input-align="right"
  75. label-width="auto"
  76. />
  77. <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required
  78. :rules="[{ required: true , message:'请选择审批模式' }]">
  79. <template #input>
  80. <van-radio-group v-model="form.approvalMode" direction="horizontal">
  81. <van-radio name="1">线上审批</van-radio>
  82. <van-radio name="2">线下审批</van-radio>
  83. </van-radio-group>
  84. </template>
  85. </van-field>
  86. <van-field
  87. v-if="form.approvalMode==1"
  88. readonly
  89. clickable
  90. label="审批流程"
  91. placeholder="请选择"
  92. v-model="form.approvalTemplateName"
  93. @click="showtemplate = true"
  94. input-align="right"
  95. right-icon="arrow-down"
  96. required
  97. :rules="[{ required: true , message:'请选择项目流程' }]"
  98. />
  99. <van-popup v-model="showtemplate" position="bottom">
  100. <van-picker
  101. show-toolbar
  102. value-key="name"
  103. :columns="templateList"
  104. @confirm="onConfirmTemplate"
  105. @cancel="showtemplate = false"
  106. />
  107. </van-popup>
  108. </div>
  109. <div class="main_box" style="margin-top: 10px;">
  110. <van-field
  111. label="转账附言"
  112. v-model="form.remark"
  113. type="textarea"
  114. placeholder="请输入转账附言"
  115. input-align="right"
  116. rows="3"
  117. label-width="auto"
  118. required
  119. :rules="[{ required: true , message:'请输入转账附言' }]"
  120. />
  121. </div>
  122. <div class="main_box" style="margin-top: 10px;">
  123. <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/>
  124. </div>
  125. <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p>
  126. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  127. <van-field
  128. readonly
  129. clickable
  130. label="项目名称"
  131. placeholder="请选择"
  132. v-model="projectForm.projectName"
  133. @click="showproject = true"
  134. input-align="right"
  135. right-icon="arrow-down"
  136. required
  137. :rules="[{ required: true , message:'请选择项目名称' }]"
  138. />
  139. <van-popup v-model="showproject" position="bottom">
  140. <van-picker
  141. show-toolbar
  142. :columns="projectList"
  143. @confirm="onConfirmProject"
  144. @cancel="showproject = false"
  145. />
  146. </van-popup>
  147. <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
  148. <van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
  149. <van-field
  150. readonly
  151. clickable
  152. label="工程款类型"
  153. placeholder="请选择"
  154. v-model="projectFundType"
  155. @click="showFundType = true"
  156. input-align="right"
  157. right-icon="arrow-down"
  158. required
  159. :rules="[{ required: true , message:'请选择工程款类型' }]"
  160. />
  161. <van-popup v-model="showFundType" position="bottom">
  162. <van-picker
  163. show-toolbar
  164. :columns="projectFundTypeOptions"
  165. @confirm="onConfirmFundType"
  166. @cancel="showFundType = false"
  167. />
  168. </van-popup>
  169. <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
  170. </div>
  171. <p class="main_title" v-if="contractOpen">关联合同</p>
  172. <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  173. <van-field
  174. readonly
  175. clickable
  176. label="合同"
  177. placeholder="请选择"
  178. v-model="infoForm.name"
  179. @click="showcontract = true"
  180. input-align="right"
  181. right-icon="arrow-down"
  182. required
  183. :rules="[{ required: true , message:'请选择项目名称' }]"
  184. />
  185. <van-popup v-model="showcontract" position="bottom">
  186. <van-picker
  187. show-toolbar
  188. :columns="infoList"
  189. @confirm="onConfirmContract"
  190. @cancel="showcontract = false"
  191. />
  192. </van-popup>
  193. <van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/>
  194. <van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
  195. </div>
  196. <p class="main_title">付款方信息</p>
  197. <div class="main_box">
  198. <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>-->
  199. <van-field
  200. readonly
  201. clickable
  202. label="付款方"
  203. placeholder="请选择付款方"
  204. v-model="form.payer"
  205. @click="showpayer = true"
  206. input-align="right"
  207. right-icon="arrow-down"
  208. label-width="auto"
  209. required
  210. :rules="[{ required: true , message:'请选择付款方' }]"
  211. />
  212. <van-popup v-model="showpayer" position="bottom">
  213. <van-picker
  214. show-toolbar
  215. :columns="payerOptions"
  216. @confirm="onConfirmPayer($event)"
  217. @cancel="showpayer = false"
  218. />
  219. </van-popup>
  220. <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
  221. </div>
  222. <div class="main_title main_title_box">
  223. <p>收款方信息</p>
  224. <router-link :to="{name:'sunVillageApprovalCollectionAdd2', params: {accountType:form.accountType,isPeers:form.isPeers,bankType:form.bankType,option:form}}">添加收款方</router-link>
  225. <van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/>
  226. </div>
  227. <div class="main_box" style="margin-bottom: 15px;">
  228. <van-cell title="收款账户类型" v-if="form.bankType==1">
  229. <template #right-icon>
  230. <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange">
  231. <van-radio name="1">公户</van-radio>
  232. <van-radio name="2">私户</van-radio>
  233. </van-radio-group>
  234. </template>
  235. </van-cell>
  236. <van-cell title="行内转账" v-if="form.bankType==2||form.bankType==3||form.bankType==4" >
  237. <template #right-icon>
  238. <van-radio-group direction="horizontal" v-model="form.isPeers" @change="accountTypeChange1">
  239. <van-radio name="Y">是</van-radio>
  240. <van-radio name="N">否</van-radio>
  241. </van-radio-group>
  242. </template>
  243. </van-cell>
  244. </div>
  245. <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  246. <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" />
  247. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  248. <van-field
  249. readonly
  250. clickable
  251. label="收款方"
  252. placeholder="请选择"
  253. v-model="item.payee"
  254. @click="item.showPayee = true"
  255. input-align="right"
  256. right-icon="arrow-down"
  257. required
  258. :rules="[{ required: true , message:'请选择收款方' }]"
  259. />
  260. <van-popup v-model="item.showPayee" position="bottom">
  261. <van-picker
  262. show-toolbar
  263. :columns="payeeList"
  264. @confirm="onConfirmPayee($event,index)"
  265. @cancel="item.showPayee = false"
  266. />
  267. </van-popup>
  268. <van-field required readonly :rules="[{ required: true , message:'收款账户不能为空' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请选择收款方" input-align="right" label-width="auto"/>
  269. <van-field required readonly :rules="[{ required: true , message:'开户银行不能为空' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请选择收款方" input-align="right" label-width="auto"/>
  270. <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
  271. <van-field
  272. readonly
  273. clickable
  274. label="所属银行"
  275. placeholder="请选择收款方"
  276. v-model="item.bankTypeText"
  277. @click="item.showbankType = true"
  278. input-align="right"
  279. required
  280. :rules="[{ required: true , message:'所属银行不能为空' }]"
  281. />
  282. </div>
  283. </div>
  284. <p class="main_title">上传附件</p>
  285. <div class="main_box" style="padding: 5px 0 0 0;">
  286. <van-cell value="收据" />
  287. <van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1" style="margin-left:8px;"></van-uploader>
  288. <van-cell title="发票" />
  289. <van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2" style="margin-left:8px;"></van-uploader>
  290. <van-cell title="其他" />
  291. <van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3" style="margin-left:8px;"></van-uploader>
  292. </div>
  293. <div style="padding: 16px 0;">
  294. <van-row>
  295. <van-col span="12" align="center">
  296. <!-- @click="goUpdate"-->
  297. <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
  298. </van-col>
  299. <van-col span="12" align="center">
  300. <!-- @click="goAdd"-->
  301. <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>
  302. </van-col>
  303. </van-row>
  304. <div class="clear"></div>
  305. </div>
  306. </van-form>
  307. </div>
  308. </template>
  309. <script>
  310. import { addTransfer , listPayee , updateTransfer ,selectApprovalByTemplateId,
  311. getProjectto , listProject , addProjectto , customSubmit ,offlineCustomSubmit,
  312. getAccount ,getQmyeFlow,listInfo ,getInfoto ,addInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  313. import request from '@/utils/request'
  314. import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  315. import Dialog from "vant/lib/dialog";
  316. import moment from "moment";
  317. export default {
  318. name: "approvalAdd2",
  319. data() {
  320. return {
  321. showtemplate:false,
  322. showcontract:false,
  323. showcapital:false,
  324. showpayee:false,
  325. showlasj:false,
  326. showbankType:false,
  327. showproject:false,
  328. showFundType:false,
  329. showpayer:false,
  330. buttonType:'a',
  331. minDate: new Date(2000, 1, 1),
  332. maxDate: new Date(2050, 12, 31),
  333. currentDate: new Date(),
  334. form:{
  335. },
  336. fileList1:[],
  337. fileList2:[],
  338. fileList3:[],
  339. capitalExpenditureType:'',
  340. payee:'',
  341. bankType:'',
  342. wfydlxDictionaries:[],
  343. jglxDictionaries:[],
  344. sysDictionaries:[],
  345. capitalExpenditureTypeOptions:[],
  346. bankTypeDictionaries:[],
  347. projectList:[],
  348. projectFundTypeOptions:[],
  349. projectFundTypeDictionaries:[],
  350. infoList:[],
  351. payerOptions:[],
  352. chargeItme:[],
  353. chargeItmeShow:[],
  354. payeeList:[],
  355. // 查询参数
  356. queryParams: {
  357. transferType:"",
  358. orderByColumn: "id",
  359. isAsc: "desc",
  360. isPeers : null,
  361. accountType : null,
  362. bankType : null,
  363. status : "0"
  364. },
  365. capitalExpenditureOpen:false,
  366. contractOpen:false,
  367. projectForm:{
  368. projectId:null,
  369. projectName:null,
  370. projectContractor:null,
  371. projectAmount:null,
  372. projectBillNum:null,
  373. projectFundType:'1',
  374. outId:null,
  375. ynType:'1'
  376. },
  377. infoForm:{
  378. infoId:null,
  379. name:null,
  380. code:null,
  381. totalAmount:null,
  382. contractionId:null,
  383. transferId:null
  384. },
  385. // 合同信息查询参数
  386. queryContractionParams: {
  387. pageNum: 1,
  388. pageSize: 100,
  389. contractionStatus: '1',
  390. orderByColumn: "endTime",
  391. isAsc: "desc",
  392. },
  393. projectFundType:'',
  394. uploadFiles1:[],
  395. uploadFiles2:[],
  396. uploadFiles3:[],
  397. nowDate:"",
  398. templateList:[],
  399. };
  400. },
  401. created() {
  402. this.getNowDate();
  403. this.reset();
  404. this.initProjectInfo();
  405. this.getDicts("project_fund_type").then((response) => {
  406. for (var i = 0; i < response.data.length; i++) {
  407. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  408. }
  409. this.projectFundTypeDictionaries = response.data;
  410. });
  411. let params1={
  412. accountType: "102",
  413. status: "N",
  414. }
  415. getAccount(params1).then((response) => {
  416. this.payerOptions = response.rows;
  417. response.rows.map((res,index) => {
  418. res['payerFrom'] = '1'
  419. this.payerOptions[index].text = res.accountName;
  420. this.payerOptions[index].value = res.id;
  421. })
  422. });
  423. this.getDictionaries();
  424. this.getTemplateList();
  425. },
  426. methods: {
  427. goFlow(){
  428. if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){
  429. window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode;
  430. }else{
  431. this.$notify({ type: 'danger', message: '无审批流程!' });
  432. }
  433. },
  434. getTemplateList(){
  435. let templateQueryParams = {
  436. // 分页
  437. pageNum: 1,
  438. pageSize: 999,
  439. type:'2'
  440. };
  441. listTemplate(templateQueryParams).then(response => {
  442. this.templateList = response.rows;
  443. });
  444. },
  445. onConfirmTemplate(data){
  446. selectApprovalByTemplateId(data.id).then(res => {
  447. this.showtemplate = false;
  448. if(res.approvalDetails.length>0){
  449. this.form.approvalTemplateName = data.name
  450. this.form.approvalTemplateId = data.id
  451. }else{
  452. this.form.approvalTemplateName = null
  453. this.form.approvalTemplateId = null
  454. this.$notify({ type: 'danger', message: '此流程无节点,无法选择!' });
  455. }
  456. })
  457. },
  458. getNowDate(){
  459. var _this = this;
  460. let yy = new Date().getFullYear();
  461. let mm = new Date().getMonth()+1;
  462. let dd = new Date().getDate();
  463. _this.nowDate = moment(new Date()).format("YYYY-MM-DD");
  464. },
  465. initProjectInfo(){
  466. let _this = this
  467. let queryParams={
  468. pageNum: 1,
  469. pageSize: 100,
  470. }
  471. listProject(queryParams).then(response => {
  472. _this.projectList = response.rows;
  473. console.log(response)
  474. for (let i = 0; i < response.rows.length; i++) {
  475. //_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id});
  476. _this.$set(_this.projectList[i],"text",response.rows[i].projectName)
  477. _this.$set(_this.projectList[i],"value",response.rows[i].id)
  478. }
  479. });
  480. listInfo(this.queryContractionParams).then(response => {
  481. _this.infoList = response.rows;
  482. for (let i = 0; i < response.rows.length; i++) {
  483. //_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code});
  484. _this.$set(_this.infoList[i],"text",response.rows[i].name)
  485. _this.$set(_this.infoList[i],"value",response.rows[i].code)
  486. }
  487. });
  488. },
  489. // 表单重置
  490. reset() {
  491. this.form = {
  492. id: null,
  493. applyDate:this.nowDate,
  494. approvalMode:'1',
  495. upId: null,
  496. downId: null,
  497. orderId: null,
  498. cashierId: null,
  499. transferType: '2',
  500. accountType: '2',
  501. explainSituation: null,
  502. succeedAmount: null,
  503. payer: null,
  504. payerAccount: null,
  505. operatorCode: null,
  506. enterpriseCode: null,
  507. expenditureAmount: null,
  508. capitalExpenditureType: '1',
  509. remark: null,
  510. transferStatus: "0",
  511. auditStatus: "0",
  512. paymentState: "1",
  513. bankPriority: "0",
  514. clientPriority: "0",
  515. isPeers:"N"
  516. };
  517. this.processList = {}
  518. this.projectForm={
  519. projectId:null,
  520. projectName:null,
  521. projectContractor:null,
  522. projectAmount:null,
  523. projectBillNum:null,
  524. projectFundType:'1',
  525. outId:null,
  526. ynType:'1'
  527. }
  528. },
  529. getChange(){
  530. if(this.buttonType == 'update'){
  531. this.goUpdate();
  532. }else if(this.buttonType == 'add'){
  533. this.goAdd();
  534. }
  535. },
  536. getDictionaries(){
  537. this.getDicts("capital_expenditure_type").then((res) => {
  538. for (var i = 0; i < res.data.length; i++) {
  539. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  540. }
  541. });
  542. this.getDicts("bank_type").then(res => {
  543. for (var i = 0; i < res.data.length; i++) {
  544. this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  545. }
  546. });
  547. this.getPayeeList();
  548. },
  549. getError(e){
  550. this.$notify({ type: 'danger', message: e.errors[0].message });
  551. },
  552. addChargeItme(index){
  553. if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){
  554. this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' });
  555. return;
  556. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){
  557. this.$notify({ type: 'danger', message: '请输入收入金额!' });
  558. return;
  559. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){
  560. this.$notify({ type: 'danger', message: '请输入收款账户!' });
  561. return;
  562. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){
  563. this.$notify({ type: 'danger', message: '请输入开户银行!' });
  564. return;
  565. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){
  566. this.$notify({ type: 'danger', message: '请选择所属银行!' });
  567. return;
  568. }
  569. this.getDicts("bank_type").then(res => {
  570. this.chargeItme.splice(index + 1, 0, {
  571. payeeId: "", //收款方ID
  572. payee: "", //收款方
  573. payeeAccount: "", //收款账户
  574. bankDeposit: "", //开户银行
  575. incomeAmount: "", //收入金额
  576. bankType: "", //所属银行
  577. bankTypeText:"", //所属银行
  578. showPayee:false,
  579. showbankType:false
  580. });
  581. });
  582. },
  583. getPayeeList() {
  584. //信用卡转账
  585. this.queryParams.isPeers = this.form.isPeers?this.form.isPeers:null
  586. this.queryParams.accountType = this.form.accountType?this.form.accountType:null
  587. this.queryParams.bankType = this.form.bankType
  588. this.queryParams.status = "0"
  589. listPayee(this.queryParams).then((response) => {
  590. response.rows.map((res,index) => {
  591. if(res.payeeType==4||res.payeeType==3){
  592. res.text = res.payee
  593. res.value = res.id
  594. this.payeeList.push(res)
  595. }
  596. })
  597. });
  598. },
  599. payeeDictLabel(datas, value) {
  600. let actions = [];
  601. Object.keys(datas).some((key) => {
  602. if (datas[key].payeeId == ('' + value)) {
  603. actions.push(datas[key].payee);
  604. return true;
  605. }
  606. })
  607. return actions.join('');
  608. },
  609. onConfirmCapital(data){
  610. if (data.value == 2){
  611. this.capitalExpenditureOpen = true;
  612. this.contractOpen = false
  613. this.infoForm = {};
  614. }else if(data.value == 4){
  615. this.capitalExpenditureOpen = false;
  616. this.contractOpen = true
  617. this.projectForm = {};
  618. }else{
  619. this.capitalExpenditureOpen = false;
  620. this.contractOpen = false
  621. this.projectForm = {};
  622. this.infoForm = {};
  623. }
  624. this.capitalExpenditureType = data.text;
  625. this.form.capitalExpenditureType = data.value;
  626. this.showcapital = false;
  627. },
  628. onConfirmFundType(data){
  629. this.projectForm.projectFundType = data.value;
  630. this.projectFundType = data.text;
  631. this.showFundType = false;
  632. },
  633. onConfirmContract(data){
  634. this.infoList.map(res => {
  635. if(res.name==data.text){
  636. this.infoForm.contractionId = res.id;
  637. this.infoForm.name = res.name;
  638. this.infoForm.code = res.code;
  639. this.infoForm.totalAmount = res.totalAmount;
  640. }
  641. })
  642. this.showcontract = false;
  643. },
  644. onConfirmProject(data){
  645. this.projectList.map(res => {
  646. if(res.projectName==data.text){
  647. this.projectForm.projectId = res.id
  648. this.projectForm.projectName = res.projectName
  649. this.projectForm.projectContractor = res.projectContractor
  650. this.projectForm.projectAmount = res.projectAmount
  651. }
  652. })
  653. this.showproject = false;
  654. },
  655. onConfirmPayee(data,index){
  656. for (let i = 0 ; i < this.chargeItme.length ; i++){
  657. this.chargeItme[i].showPayee = false;
  658. }
  659. this.chargeItme[index].payee = data.text;
  660. this.chargeItme[index].payeeId = data.value;
  661. this.chargeItme[index].showpayee = false;
  662. this.payeeSelectChange(data.value , index)
  663. this.onConfirmBankType(data,index)
  664. },
  665. onConfirmBankType(data,index){
  666. console.log(this.bankTypeDictionaries)
  667. this.bankTypeDictionaries.map(res => {
  668. if(res.value==data.bankType){
  669. this.chargeItme[index].bankTypeText = res.text;
  670. this.chargeItme[index].bankType = res.value;
  671. }
  672. })
  673. },
  674. onConfirmPayer(data){
  675. this.form.payer = data.text;
  676. this.form.cashierId = data.value;
  677. this.showpayer = false;
  678. this.selectChange(data.value)
  679. },
  680. onConfirmLasj(data){
  681. this.form.applyDate = this.getNowFormatDate(data).substr(0,10);
  682. this.showlasj = false;
  683. },
  684. accountTypeChange(e){
  685. this.payeeList = [];
  686. this.chargeItme = [];
  687. this.queryParams.accountType = this.form.accountType?this.form.accountType:null
  688. this.queryParams.bankType = this.form.bankType
  689. this.queryParams.status = "0"
  690. listPayee(this.queryParams).then((response) => {
  691. response.rows.map((res,index) => {
  692. if(res.payeeType==4||res.payeeType==3){
  693. res.text = res.payee
  694. res.value = res.id
  695. this.payeeList.push(res)
  696. }
  697. })
  698. });
  699. },
  700. accountTypeChange1(e){
  701. this.payeeList = [];
  702. this.chargeItme = [];
  703. this.queryParams.isPeers = this.form.isPeers?this.form.isPeers:null
  704. this.queryParams.bankType = this.form.bankType?this.form.bankType:null
  705. this.queryParams.status = "0"
  706. listPayee(this.queryParams).then((response) => {
  707. response.rows.map((res,index) => {
  708. if(res.payeeType==4||res.payeeType==3){
  709. res.text = res.payee
  710. res.value = res.id
  711. this.payeeList.push(res)
  712. }
  713. })
  714. });
  715. },
  716. // 钱计算
  717. moneyChange(input) {
  718. let obj = {};
  719. obj = this.chargeItme.find((account) => {
  720. //model就是上面的数据源
  721. return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据
  722. });
  723. let total = 0;
  724. this.chargeItme.forEach((money) => {
  725. total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2)
  726. });
  727. this.$set(this.form, "expenditureAmount", total);
  728. },
  729. goAdd(){
  730. let _this = this
  731. if(this.chargeItme.length<1){
  732. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  733. return;
  734. }
  735. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  736. this.$notify({ type: 'danger', message: '转账附言禁止包含!' });
  737. return;
  738. }
  739. if(this.form.capitalExpenditureType==2){
  740. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  741. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  742. return;
  743. }
  744. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  745. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  746. return;
  747. }
  748. }
  749. if(this.form.capitalExpenditureType==4){
  750. if(this.infoForm.name==""||this.infoForm.name==null){
  751. this.$notify({ type: 'danger', message: '请选择合同名称!' });
  752. return;
  753. }
  754. if(this.infoForm.code==""||this.infoForm.code==null){
  755. this.$notify({ type: 'danger', message: '请输入合同编码!' });
  756. return;
  757. }
  758. if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){
  759. this.$notify({ type: 'danger', message: '请输入合同价款!' });
  760. return;
  761. }
  762. }
  763. if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
  764. Dialog.confirm({
  765. title: '提示',
  766. message: '此申请单中未上传任何附件,是否确认提交?',
  767. })
  768. .then(() => {
  769. this.$set(this.form, "payeeList", this.chargeItme);
  770. this.$set(this.form, "bankTypeList", this.chargeItme);
  771. this.$set(this.form, "accountTypeList", this.chargeItme);
  772. this.$set(this.form, "transferStatusList", this.chargeItme);
  773. addTransfer(this.form).then(response => {
  774. this.projectForm.outId = response.data.id
  775. this.infoForm.transferId = response.data.id
  776. this.$set(this.projectForm, "ynType", '1');
  777. if(this.form.capitalExpenditureType==2){
  778. addProjectto(this.projectForm).then(res => {
  779. if(this.form.approvalMode === '1'){
  780. customSubmit(response.data.id).then(res => {
  781. this.$toast.success('提交成功');
  782. setTimeout(function(){
  783. history.go(-1)
  784. },2000)
  785. })
  786. }else{
  787. offlineCustomSubmit(response.data.id).then(res => {
  788. this.$toast.success('提交成功');
  789. setTimeout(function(){
  790. history.go(-1)
  791. },2000)
  792. })
  793. }
  794. })
  795. }else if(this.form.capitalExpenditureType==4){
  796. addInfoto(this.infoForm).then(res => {
  797. if(this.form.approvalMode === '1'){
  798. customSubmit(response.data.id).then(res => {
  799. this.$toast.success('提交成功');
  800. setTimeout(function(){
  801. history.go(-1)
  802. },2000)
  803. })
  804. }else{
  805. offlineCustomSubmit(response.data.id).then(res => {
  806. this.$toast.success('提交成功');
  807. setTimeout(function(){
  808. history.go(-1)
  809. },2000)
  810. })
  811. }
  812. })
  813. }else{
  814. if(this.form.approvalMode === '1'){
  815. customSubmit(response.data.id).then(res => {
  816. this.$toast.success('提交成功');
  817. setTimeout(function(){
  818. history.go(-1)
  819. },2000)
  820. })
  821. }else{
  822. offlineCustomSubmit(response.data.id).then(res => {
  823. this.$toast.success('提交成功');
  824. setTimeout(function(){
  825. history.go(-1)
  826. },2000)
  827. })
  828. }
  829. }
  830. });
  831. })
  832. .catch(() => {
  833. return false;
  834. });
  835. }else{
  836. this.$set(this.form, "payeeList", this.chargeItme);
  837. this.$set(this.form, "bankTypeList", this.chargeItme);
  838. this.$set(this.form, "accountTypeList", this.chargeItme);
  839. this.$set(this.form, "transferStatusList", this.chargeItme);
  840. addTransfer(this.form).then(response => {
  841. this.projectForm.outId = response.data.id
  842. this.infoForm.transferId = response.data.id
  843. this.$set(this.projectForm, "ynType", '1');
  844. if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
  845. this.uploadFiles1.map((rr1,idx1) => {
  846. let params1 = new FormData();
  847. params1.append("tableId", response.data.id);
  848. params1.append("tableName", "t_yinnong_transfer");
  849. params1.append("bizPath", "transfer");
  850. params1.append("fileType", "1");
  851. params1.append("file", rr1);
  852. commonAttach(params1).then((r1) => {
  853. if(idx1 == (_this.uploadFiles1.length-1)){
  854. if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){
  855. _this.uploadFiles2.map((rr2,idx2) => {
  856. let params2 = new FormData();
  857. params2.append("tableId", response.data.id);
  858. params2.append("tableName", "t_yinnong_transfer");
  859. params2.append("bizPath", "transfer");
  860. params2.append("fileType", "2");
  861. params2.append("file", rr2);
  862. commonAttach(params2).then((r2) => {
  863. if(idx2 == (_this.uploadFiles2.length-1)){
  864. if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){
  865. _this.uploadFiles3.map((rr3,idx3) => {
  866. let params3 = new FormData();
  867. params3.append("tableId", response.data.id);
  868. params3.append("tableName", "t_yinnong_transfer");
  869. params3.append("bizPath", "transfer");
  870. params3.append("fileType", "3");
  871. params3.append("file", rr3);
  872. commonAttach(params3).then((r3) => {
  873. if(idx3 == (_this.uploadFiles3.length-1)){
  874. if(_this.form.capitalExpenditureType==2){
  875. addProjectto(_this.projectForm).then(res => {
  876. if(_this.form.approvalMode === '1'){
  877. customSubmit(response.data.id).then(res => {
  878. _this.$toast.success('提交成功');
  879. setTimeout(function(){
  880. history.go(-1)
  881. },2000)
  882. })
  883. }else{
  884. offlineCustomSubmit(response.data.id).then(res => {
  885. _this.$toast.success('提交成功');
  886. setTimeout(function(){
  887. history.go(-1)
  888. },2000)
  889. })
  890. }
  891. })
  892. } else if(_this.form.capitalExpenditureType==4){
  893. addInfoto(_this.infoForm).then(res => {
  894. if(_this.form.approvalMode === '1'){
  895. customSubmit(response.data.id).then(res => {
  896. _this.$toast.success('提交成功');
  897. setTimeout(function(){
  898. history.go(-1)
  899. },2000)
  900. })
  901. }else{
  902. offlineCustomSubmit(response.data.id).then(res => {
  903. _this.$toast.success('提交成功');
  904. setTimeout(function(){
  905. history.go(-1)
  906. },2000)
  907. })
  908. }
  909. })
  910. }else{
  911. if(_this.form.approvalMode === '1'){
  912. customSubmit(response.data.id).then(res => {
  913. _this.$toast.success('提交成功');
  914. setTimeout(function(){
  915. history.go(-1)
  916. },2000)
  917. })
  918. }else{
  919. offlineCustomSubmit(response.data.id).then(res => {
  920. _this.$toast.success('提交成功');
  921. setTimeout(function(){
  922. history.go(-1)
  923. },2000)
  924. })
  925. }
  926. }
  927. }
  928. })
  929. })
  930. }else{
  931. if(_this.form.capitalExpenditureType==2){
  932. addProjectto(_this.projectForm).then(res => {
  933. if(_this.form.approvalMode === '1'){
  934. customSubmit(response.data.id).then(res => {
  935. _this.$toast.success('提交成功');
  936. setTimeout(function(){
  937. history.go(-1)
  938. },2000)
  939. })
  940. }else{
  941. offlineCustomSubmit(response.data.id).then(res => {
  942. _this.$toast.success('提交成功');
  943. setTimeout(function(){
  944. history.go(-1)
  945. },2000)
  946. })
  947. }
  948. })
  949. } else if(_this.form.capitalExpenditureType==4){
  950. addInfoto(_this.infoForm).then(res => {
  951. if(_this.form.approvalMode === '1'){
  952. customSubmit(response.data.id).then(res => {
  953. _this.$toast.success('提交成功');
  954. setTimeout(function(){
  955. history.go(-1)
  956. },2000)
  957. })
  958. }else{
  959. offlineCustomSubmit(response.data.id).then(res => {
  960. _this.$toast.success('提交成功');
  961. setTimeout(function(){
  962. history.go(-1)
  963. },2000)
  964. })
  965. }
  966. })
  967. }else{
  968. if(_this.form.approvalMode === '1'){
  969. customSubmit(response.data.id).then(res => {
  970. _this.$toast.success('提交成功');
  971. setTimeout(function(){
  972. history.go(-1)
  973. },2000)
  974. })
  975. }else{
  976. offlineCustomSubmit(response.data.id).then(res => {
  977. _this.$toast.success('提交成功');
  978. setTimeout(function(){
  979. history.go(-1)
  980. },2000)
  981. })
  982. }
  983. }
  984. }
  985. }
  986. })
  987. })
  988. }else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){
  989. _this.uploadFiles3.map((rr3,idx3) => {
  990. let params3 = new FormData();
  991. params3.append("tableId", response.data.id);
  992. params3.append("tableName", "t_yinnong_transfer");
  993. params3.append("bizPath", "transfer");
  994. params3.append("fileType", "3");
  995. params3.append("file", rr3);
  996. commonAttach(params3).then((r3) => {
  997. if(idx3 ==(_this.uploadFiles3.length-1)){
  998. if(_this.form.capitalExpenditureType==2){
  999. addProjectto(_this.projectForm).then(res => {
  1000. if(_this.form.approvalMode === '1'){
  1001. customSubmit(response.data.id).then(res => {
  1002. _this.$toast.success('提交成功');
  1003. setTimeout(function(){
  1004. history.go(-1)
  1005. },2000)
  1006. })
  1007. }else{
  1008. offlineCustomSubmit(response.data.id).then(res => {
  1009. _this.$toast.success('提交成功');
  1010. setTimeout(function(){
  1011. history.go(-1)
  1012. },2000)
  1013. })
  1014. }
  1015. })
  1016. } else if(_this.form.capitalExpenditureType==4){
  1017. addInfoto(_this.infoForm).then(res => {
  1018. if(_this.form.approvalMode === '1'){
  1019. customSubmit(response.data.id).then(res => {
  1020. _this.$toast.success('提交成功');
  1021. setTimeout(function(){
  1022. history.go(-1)
  1023. },2000)
  1024. })
  1025. }else{
  1026. offlineCustomSubmit(response.data.id).then(res => {
  1027. _this.$toast.success('提交成功');
  1028. setTimeout(function(){
  1029. history.go(-1)
  1030. },2000)
  1031. })
  1032. }
  1033. })
  1034. }else{
  1035. if(_this.form.approvalMode === '1'){
  1036. customSubmit(response.data.id).then(res => {
  1037. _this.$toast.success('提交成功');
  1038. setTimeout(function(){
  1039. history.go(-1)
  1040. },2000)
  1041. })
  1042. }else{
  1043. offlineCustomSubmit(response.data.id).then(res => {
  1044. _this.$toast.success('提交成功');
  1045. setTimeout(function(){
  1046. history.go(-1)
  1047. },2000)
  1048. })
  1049. }
  1050. }
  1051. }
  1052. })
  1053. })
  1054. }else{
  1055. if(_this.form.capitalExpenditureType==2){
  1056. addProjectto(_this.projectForm).then(res => {
  1057. if(_this.form.approvalMode === '1'){
  1058. customSubmit(response.data.id).then(res => {
  1059. _this.$toast.success('提交成功');
  1060. setTimeout(function(){
  1061. history.go(-1)
  1062. },2000)
  1063. })
  1064. }else{
  1065. offlineCustomSubmit(response.data.id).then(res => {
  1066. _this.$toast.success('提交成功');
  1067. setTimeout(function(){
  1068. history.go(-1)
  1069. },2000)
  1070. })
  1071. }
  1072. })
  1073. } else if(_this.form.capitalExpenditureType==4){
  1074. addInfoto(_this.infoForm).then(res => {
  1075. if(_this.form.approvalMode === '1'){
  1076. customSubmit(response.data.id).then(res => {
  1077. _this.$toast.success('提交成功');
  1078. setTimeout(function(){
  1079. history.go(-1)
  1080. },2000)
  1081. })
  1082. }else{
  1083. offlineCustomSubmit(response.data.id).then(res => {
  1084. _this.$toast.success('提交成功');
  1085. setTimeout(function(){
  1086. history.go(-1)
  1087. },2000)
  1088. })
  1089. }
  1090. })
  1091. }else{
  1092. if(_this.form.approvalMode === '1'){
  1093. customSubmit(response.data.id).then(res => {
  1094. _this.$toast.success('提交成功');
  1095. setTimeout(function(){
  1096. history.go(-1)
  1097. },2000)
  1098. })
  1099. }else{
  1100. offlineCustomSubmit(response.data.id).then(res => {
  1101. _this.$toast.success('提交成功');
  1102. setTimeout(function(){
  1103. history.go(-1)
  1104. },2000)
  1105. })
  1106. }
  1107. }
  1108. }
  1109. }
  1110. })
  1111. })
  1112. }else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
  1113. this.uploadFiles2.map((rr2,idx2) => {
  1114. let params = new FormData();
  1115. params.append("tableId", response.data.id);
  1116. params.append("tableName", "t_yinnong_transfer");
  1117. params.append("bizPath", "transfer");
  1118. params.append("fileType", "2");
  1119. params.append("file", rr2);
  1120. commonAttach(params).then((r2) => {
  1121. if(idx2 == (_this.uploadFiles2.length-1)){
  1122. if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){
  1123. _this.uploadFiles3.map((rr3,idx3) => {
  1124. let params3 = new FormData();
  1125. params3.append("tableId", response.data.id);
  1126. params3.append("tableName", "t_yinnong_transfer");
  1127. params3.append("bizPath", "transfer");
  1128. params3.append("fileType", "3");
  1129. params3.append("file", rr3);
  1130. commonAttach(params).then((r3) => {
  1131. if(idx3 == (_this.uploadFiles3.length-1)){
  1132. if(_this.form.capitalExpenditureType==2){
  1133. addProjectto(_this.projectForm).then(res => {
  1134. if(_this.form.approvalMode === '1'){
  1135. customSubmit(response.data.id).then(res => {
  1136. _this.$toast.success('提交成功');
  1137. setTimeout(function(){
  1138. history.go(-1)
  1139. },2000)
  1140. })
  1141. }else{
  1142. offlineCustomSubmit(response.data.id).then(res => {
  1143. _this.$toast.success('提交成功');
  1144. setTimeout(function(){
  1145. history.go(-1)
  1146. },2000)
  1147. })
  1148. }
  1149. })
  1150. } else if(_this.form.capitalExpenditureType==4){
  1151. addInfoto(_this.infoForm).then(res => {
  1152. if(_this.form.approvalMode === '1'){
  1153. customSubmit(response.data.id).then(res => {
  1154. _this.$toast.success('提交成功');
  1155. setTimeout(function(){
  1156. history.go(-1)
  1157. },2000)
  1158. })
  1159. }else{
  1160. offlineCustomSubmit(response.data.id).then(res => {
  1161. _this.$toast.success('提交成功');
  1162. setTimeout(function(){
  1163. history.go(-1)
  1164. },2000)
  1165. })
  1166. }
  1167. })
  1168. }else{
  1169. if(_this.form.approvalMode === '1'){
  1170. customSubmit(response.data.id).then(res => {
  1171. _this.$toast.success('提交成功');
  1172. setTimeout(function(){
  1173. history.go(-1)
  1174. },2000)
  1175. })
  1176. }else{
  1177. offlineCustomSubmit(response.data.id).then(res => {
  1178. _this.$toast.success('提交成功');
  1179. setTimeout(function(){
  1180. history.go(-1)
  1181. },2000)
  1182. })
  1183. }
  1184. }
  1185. }
  1186. })
  1187. })
  1188. }else{
  1189. if(_this.form.capitalExpenditureType==2){
  1190. addProjectto(_this.projectForm).then(res => {
  1191. if(_this.form.approvalMode === '1'){
  1192. customSubmit(response.data.id).then(res => {
  1193. _this.$toast.success('提交成功');
  1194. setTimeout(function(){
  1195. history.go(-1)
  1196. },2000)
  1197. })
  1198. }else{
  1199. offlineCustomSubmit(response.data.id).then(res => {
  1200. _this.$toast.success('提交成功');
  1201. setTimeout(function(){
  1202. history.go(-1)
  1203. },2000)
  1204. })
  1205. }
  1206. })
  1207. } else if(_this.form.capitalExpenditureType==4){
  1208. addInfoto(_this.infoForm).then(res => {
  1209. if(_this.form.approvalMode === '1'){
  1210. customSubmit(response.data.id).then(res => {
  1211. _this.$toast.success('提交成功');
  1212. setTimeout(function(){
  1213. history.go(-1)
  1214. },2000)
  1215. })
  1216. }else{
  1217. offlineCustomSubmit(response.data.id).then(res => {
  1218. _this.$toast.success('提交成功');
  1219. setTimeout(function(){
  1220. history.go(-1)
  1221. },2000)
  1222. })
  1223. }
  1224. })
  1225. }else{
  1226. if(_this.form.approvalMode === '1'){
  1227. customSubmit(response.data.id).then(res => {
  1228. _this.$toast.success('提交成功');
  1229. setTimeout(function(){
  1230. history.go(-1)
  1231. },2000)
  1232. })
  1233. }else{
  1234. offlineCustomSubmit(response.data.id).then(res => {
  1235. _this.$toast.success('提交成功');
  1236. setTimeout(function(){
  1237. history.go(-1)
  1238. },2000)
  1239. })
  1240. }
  1241. }
  1242. }
  1243. }
  1244. })
  1245. })
  1246. }else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
  1247. this.uploadFiles3.map((rr3,idx3) => {
  1248. let params = new FormData();
  1249. params.append("tableId", response.data.id);
  1250. params.append("tableName", "t_yinnong_transfer");
  1251. params.append("bizPath", "transfer");
  1252. params.append("fileType", "3");
  1253. params.append("file", rr3);
  1254. commonAttach(params).then((r) => {
  1255. if(idx3 == (_this.uploadFiles3.length-1)){
  1256. if(_this.form.capitalExpenditureType==2){
  1257. addProjectto(_this.projectForm).then(res => {
  1258. if(_this.form.approvalMode === '1'){
  1259. customSubmit(response.data.id).then(res => {
  1260. _this.$toast.success('提交成功');
  1261. setTimeout(function(){
  1262. history.go(-1)
  1263. },2000)
  1264. })
  1265. }else{
  1266. offlineCustomSubmit(response.data.id).then(res => {
  1267. _this.$toast.success('提交成功');
  1268. setTimeout(function(){
  1269. history.go(-1)
  1270. },2000)
  1271. })
  1272. }
  1273. })
  1274. } else if(_this.form.capitalExpenditureType==4){
  1275. addInfoto(_this.infoForm).then(res => {
  1276. if(_this.form.approvalMode === '1'){
  1277. customSubmit(response.data.id).then(res => {
  1278. _this.$toast.success('提交成功');
  1279. setTimeout(function(){
  1280. history.go(-1)
  1281. },2000)
  1282. })
  1283. }else{
  1284. offlineCustomSubmit(response.data.id).then(res => {
  1285. _this.$toast.success('提交成功');
  1286. setTimeout(function(){
  1287. history.go(-1)
  1288. },2000)
  1289. })
  1290. }
  1291. })
  1292. }else{
  1293. if(_this.form.approvalMode === '1'){
  1294. customSubmit(response.data.id).then(res => {
  1295. _this.$toast.success('提交成功');
  1296. setTimeout(function(){
  1297. history.go(-1)
  1298. },2000)
  1299. })
  1300. }else{
  1301. offlineCustomSubmit(response.data.id).then(res => {
  1302. _this.$toast.success('提交成功');
  1303. setTimeout(function(){
  1304. history.go(-1)
  1305. },2000)
  1306. })
  1307. }
  1308. }
  1309. }
  1310. })
  1311. })
  1312. }else{
  1313. if(this.form.capitalExpenditureType==2){
  1314. addProjectto(this.projectForm).then(res => {
  1315. if(_this.form.approvalMode === '1'){
  1316. customSubmit(response.data.id).then(res => {
  1317. _this.$toast.success('提交成功');
  1318. setTimeout(function(){
  1319. history.go(-1)
  1320. },2000)
  1321. })
  1322. }else{
  1323. offlineCustomSubmit(response.data.id).then(res => {
  1324. _this.$toast.success('提交成功');
  1325. setTimeout(function(){
  1326. history.go(-1)
  1327. },2000)
  1328. })
  1329. }
  1330. })
  1331. } else if(this.form.capitalExpenditureType==4){
  1332. addInfoto(this.infoForm).then(res => {
  1333. if(_this.form.approvalMode === '1'){
  1334. customSubmit(response.data.id).then(res => {
  1335. _this.$toast.success('提交成功');
  1336. setTimeout(function(){
  1337. history.go(-1)
  1338. },2000)
  1339. })
  1340. }else{
  1341. offlineCustomSubmit(response.data.id).then(res => {
  1342. _this.$toast.success('提交成功');
  1343. setTimeout(function(){
  1344. history.go(-1)
  1345. },2000)
  1346. })
  1347. }
  1348. })
  1349. }else{
  1350. if(_this.form.approvalMode === '1'){
  1351. customSubmit(response.data.id).then(res => {
  1352. _this.$toast.success('提交成功');
  1353. setTimeout(function(){
  1354. history.go(-1)
  1355. },2000)
  1356. })
  1357. }else{
  1358. offlineCustomSubmit(response.data.id).then(res => {
  1359. _this.$toast.success('提交成功');
  1360. setTimeout(function(){
  1361. history.go(-1)
  1362. },2000)
  1363. })
  1364. }
  1365. }
  1366. }
  1367. });
  1368. }
  1369. },
  1370. goUpdate(){
  1371. let _this = this
  1372. if(this.chargeItme.length<1){
  1373. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  1374. return;
  1375. }
  1376. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  1377. this.$notify({ type: 'danger', message: '转账附言禁止包含!' });
  1378. return;
  1379. }
  1380. if(this.form.capitalExpenditureType==2){
  1381. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  1382. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  1383. return;
  1384. }
  1385. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  1386. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  1387. return;
  1388. }
  1389. }
  1390. if(this.form.capitalExpenditureType==4){
  1391. if(this.infoForm.name==""||this.infoForm.name==null){
  1392. this.$notify({ type: 'danger', message: '请选择合同名称!' });
  1393. return;
  1394. }
  1395. if(this.infoForm.code==""||this.infoForm.code==null){
  1396. this.$notify({ type: 'danger', message: '请输入合同编码!' });
  1397. return;
  1398. }
  1399. if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){
  1400. this.$notify({ type: 'danger', message: '请输入合同价款!' });
  1401. return;
  1402. }
  1403. }
  1404. this.$set(this.form, "payeeList", this.chargeItme);
  1405. this.$set(this.form, "bankTypeList", this.chargeItme);
  1406. this.$set(this.form, "accountTypeList", this.chargeItme);
  1407. this.$set(this.form, "transferStatusList", this.chargeItme);
  1408. addTransfer(this.form).then(response => {
  1409. this.projectForm.outId = response.data.id
  1410. this.infoForm.transferId = response.data.id
  1411. this.$set(this.projectForm, "ynType", '1');
  1412. if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
  1413. this.uploadFiles1.map((rr1,idx1) => {
  1414. let params1 = new FormData();
  1415. params1.append("tableId", response.data.id);
  1416. params1.append("tableName", "t_yinnong_transfer");
  1417. params1.append("bizPath", "transfer");
  1418. params1.append("fileType", "1");
  1419. params1.append("file", rr1);
  1420. commonAttach(params1).then((r1) => {
  1421. if(idx1 == (_this.uploadFiles1.length-1)){
  1422. if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){
  1423. _this.uploadFiles2.map((rr2,idx2) => {
  1424. let params2 = new FormData();
  1425. params2.append("tableId", response.data.id);
  1426. params2.append("tableName", "t_yinnong_transfer");
  1427. params2.append("bizPath", "transfer");
  1428. params2.append("fileType", "2");
  1429. params2.append("file", rr2);
  1430. commonAttach(params2).then((r2) => {
  1431. if(idx2 == (_this.uploadFiles2.length-1)){
  1432. if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){
  1433. _this.uploadFiles3.map((rr3,idx3) => {
  1434. let params3 = new FormData();
  1435. params3.append("tableId", response.data.id);
  1436. params3.append("tableName", "t_yinnong_transfer");
  1437. params3.append("bizPath", "transfer");
  1438. params3.append("fileType", "3");
  1439. params3.append("file", rr3);
  1440. commonAttach(params3).then((r3) => {
  1441. if(idx3 == (_this.uploadFiles3.length-1)){
  1442. if(_this.form.capitalExpenditureType==2){
  1443. addProjectto(_this.projectForm).then(res => {
  1444. _this.$toast.success('保存成功');
  1445. setTimeout(function(){
  1446. history.go(-1)
  1447. },2000)
  1448. })
  1449. } else if(_this.form.capitalExpenditureType==4){
  1450. addInfoto(_this.infoForm).then(res => {
  1451. _this.$toast.success('保存成功');
  1452. setTimeout(function(){
  1453. history.go(-1)
  1454. },2000)
  1455. })
  1456. }else{
  1457. _this.$toast.success('保存成功');
  1458. setTimeout(function(){
  1459. history.go(-1)
  1460. },2000)
  1461. }
  1462. }
  1463. })
  1464. })
  1465. }else{
  1466. if(_this.form.capitalExpenditureType==2){
  1467. addProjectto(_this.projectForm).then(res => {
  1468. _this.$toast.success('保存成功');
  1469. setTimeout(function(){
  1470. history.go(-1)
  1471. },2000)
  1472. })
  1473. } else if(_this.form.capitalExpenditureType==4){
  1474. addInfoto(_this.infoForm).then(res => {
  1475. _this.$toast.success('保存成功');
  1476. setTimeout(function(){
  1477. history.go(-1)
  1478. },2000)
  1479. })
  1480. }else{
  1481. _this.$toast.success('保存成功');
  1482. setTimeout(function(){
  1483. history.go(-1)
  1484. },2000)
  1485. }
  1486. }
  1487. }
  1488. })
  1489. })
  1490. }else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){
  1491. _this.uploadFiles3.map((rr3,idx3) => {
  1492. let params3 = new FormData();
  1493. params3.append("tableId", response.data.id);
  1494. params3.append("tableName", "t_yinnong_transfer");
  1495. params3.append("bizPath", "transfer");
  1496. params3.append("fileType", "3");
  1497. params3.append("file", rr3);
  1498. commonAttach(params3).then((r3) => {
  1499. if(idx3 ==(_this.uploadFiles3.length-1)){
  1500. if(_this.form.capitalExpenditureType==2){
  1501. addProjectto(_this.projectForm).then(res => {
  1502. _this.$toast.success('保存成功');
  1503. setTimeout(function(){
  1504. history.go(-1)
  1505. },2000)
  1506. })
  1507. } else if(_this.form.capitalExpenditureType==4){
  1508. addInfoto(_this.infoForm).then(res => {
  1509. _this.$toast.success('保存成功');
  1510. setTimeout(function(){
  1511. history.go(-1)
  1512. },2000)
  1513. })
  1514. }else{
  1515. _this.$toast.success('保存成功');
  1516. setTimeout(function(){
  1517. history.go(-1)
  1518. },2000)
  1519. }
  1520. }
  1521. })
  1522. })
  1523. }else{
  1524. if(_this.form.capitalExpenditureType==2){
  1525. addProjectto(_this.projectForm).then(res => {
  1526. _this.$toast.success('保存成功');
  1527. setTimeout(function(){
  1528. history.go(-1)
  1529. },2000)
  1530. })
  1531. } else if(_this.form.capitalExpenditureType==4){
  1532. addInfoto(_this.infoForm).then(res => {
  1533. _this.$toast.success('保存成功');
  1534. setTimeout(function(){
  1535. history.go(-1)
  1536. },2000)
  1537. })
  1538. }else{
  1539. _this.$toast.success('保存成功');
  1540. setTimeout(function(){
  1541. history.go(-1)
  1542. },2000)
  1543. }
  1544. }
  1545. }
  1546. })
  1547. })
  1548. }else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
  1549. this.uploadFiles2.map((rr2,idx2) => {
  1550. let params = new FormData();
  1551. params.append("tableId", response.data.id);
  1552. params.append("tableName", "t_yinnong_transfer");
  1553. params.append("bizPath", "transfer");
  1554. params.append("fileType", "2");
  1555. params.append("file", rr2);
  1556. commonAttach(params).then((r2) => {
  1557. if(idx2 == (_this.uploadFiles2.length-1)){
  1558. if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){
  1559. _this.uploadFiles3.map((rr3,idx3) => {
  1560. let params3 = new FormData();
  1561. params3.append("tableId", response.data.id);
  1562. params3.append("tableName", "t_yinnong_transfer");
  1563. params3.append("bizPath", "transfer");
  1564. params3.append("fileType", "3");
  1565. params3.append("file", rr3);
  1566. commonAttach(params).then((r3) => {
  1567. if(idx3 == (_this.uploadFiles3.length-1)){
  1568. if(_this.form.capitalExpenditureType==2){
  1569. addProjectto(_this.projectForm).then(res => {
  1570. _this.$toast.success('保存成功');
  1571. setTimeout(function(){
  1572. history.go(-1)
  1573. },2000)
  1574. })
  1575. } else if(_this.form.capitalExpenditureType==4){
  1576. addInfoto(_this.infoForm).then(res => {
  1577. _this.$toast.success('保存成功');
  1578. setTimeout(function(){
  1579. history.go(-1)
  1580. },2000)
  1581. })
  1582. }else{
  1583. _this.$toast.success('保存成功');
  1584. setTimeout(function(){
  1585. history.go(-1)
  1586. },2000)
  1587. }
  1588. }
  1589. })
  1590. })
  1591. }else{
  1592. if(_this.form.capitalExpenditureType==2){
  1593. addProjectto(_this.projectForm).then(res => {
  1594. _this.$toast.success('保存成功');
  1595. setTimeout(function(){
  1596. history.go(-1)
  1597. },2000)
  1598. })
  1599. } else if(_this.form.capitalExpenditureType==4){
  1600. addInfoto(_this.infoForm).then(res => {
  1601. _this.$toast.success('保存成功');
  1602. setTimeout(function(){
  1603. history.go(-1)
  1604. },2000)
  1605. })
  1606. }else{
  1607. _this.$toast.success('保存成功');
  1608. setTimeout(function(){
  1609. history.go(-1)
  1610. },2000)
  1611. }
  1612. }
  1613. }
  1614. })
  1615. })
  1616. }else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
  1617. this.uploadFiles3.map((rr3,idx3) => {
  1618. let params = new FormData();
  1619. params.append("tableId", response.data.id);
  1620. params.append("tableName", "t_yinnong_transfer");
  1621. params.append("bizPath", "transfer");
  1622. params.append("fileType", "3");
  1623. params.append("file", rr3);
  1624. commonAttach(params).then((r) => {
  1625. if(idx3 == (_this.uploadFiles3.length-1)){
  1626. if(_this.form.capitalExpenditureType==2){
  1627. addProjectto(_this.projectForm).then(res => {
  1628. _this.$toast.success('保存成功');
  1629. setTimeout(function(){
  1630. history.go(-1)
  1631. },2000)
  1632. })
  1633. } else if(_this.form.capitalExpenditureType==4){
  1634. addInfoto(_this.infoForm).then(res => {
  1635. _this.$toast.success('保存成功');
  1636. setTimeout(function(){
  1637. history.go(-1)
  1638. },2000)
  1639. })
  1640. }else{
  1641. _this.$toast.success('保存成功');
  1642. setTimeout(function(){
  1643. history.go(-1)
  1644. },2000)
  1645. }
  1646. }
  1647. })
  1648. })
  1649. }else{
  1650. if(this.form.capitalExpenditureType==2){
  1651. addProjectto(this.projectForm).then(res => {
  1652. this.$toast.success('保存成功');
  1653. setTimeout(function(){
  1654. history.go(-1)
  1655. },2000)
  1656. })
  1657. } else if(this.form.capitalExpenditureType==4){
  1658. addInfoto(this.infoForm).then(res => {
  1659. this.$toast.success('保存成功');
  1660. setTimeout(function(){
  1661. history.go(-1)
  1662. },2000)
  1663. })
  1664. }else{
  1665. this.$toast.success('保存成功');
  1666. setTimeout(function(){
  1667. history.go(-1)
  1668. },2000)
  1669. }
  1670. }
  1671. });
  1672. },
  1673. payeeSelectChange(select, i) {
  1674. let obj = {};
  1675. let fuzhitype = 0;
  1676. obj = this.payeeList.find((account) => {
  1677. //model就是上面的数据源
  1678. return account.id === select ; //筛选出匹配数据
  1679. });
  1680. if(this.chargeItme != [] && this.chargeItme.length>1){
  1681. this.chargeItme.some((value, index) => {
  1682. if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){
  1683. fuzhitype = 2;
  1684. return true;
  1685. }
  1686. if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){
  1687. fuzhitype = 1;
  1688. return true;
  1689. }
  1690. });
  1691. }
  1692. if(fuzhitype == 0){
  1693. this.$set(this.chargeItme[i], "payee",obj.payee)
  1694. this.$set(this.chargeItme[i], "bankType", obj.bankType)
  1695. this.$set(this.chargeItme[i], "payeeId", obj.id);
  1696. this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount);
  1697. this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit);
  1698. this.$set(this.chargeItme[i], "accountType", obj.accountType);
  1699. }else if(fuzhitype == 1){
  1700. this.$set(this.chargeItme[i], "payee",'')
  1701. this.$set(this.chargeItme[i], "bankType",'')
  1702. this.$set(this.chargeItme[i], "payeeId", '');
  1703. this.$set(this.chargeItme[i], "payeeAccount", '');
  1704. this.$set(this.chargeItme[i], "bankDeposit", '');
  1705. this.$set(this.chargeItme[i], "accountType", '');
  1706. this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' });
  1707. }else if(fuzhitype == 2){
  1708. this.$set(this.chargeItme[i], "payee",'')
  1709. this.$set(this.chargeItme[i], "bankType",'')
  1710. this.$set(this.chargeItme[i], "payeeId", '');
  1711. this.$set(this.chargeItme[i], "payeeAccount", '');
  1712. this.$set(this.chargeItme[i], "bankDeposit", '');
  1713. this.$set(this.chargeItme[i], "accountType", '');
  1714. this.$notify({ type: 'danger', message: '收款方已存在!' });
  1715. }
  1716. },
  1717. selectChange(select) {
  1718. let obj = {};
  1719. obj = this.payerOptions.find((account) => {
  1720. //model就是上面的数据源
  1721. return account.id === select; //筛选出匹配数据
  1722. });
  1723. if(obj.accountPassword != null && obj.accountPassword != "" &&
  1724. obj.bankType != null && obj.bankType != ""){
  1725. this.$set(this.form, "bookId", obj.bookId);
  1726. this.$set(this.form, "deptId", obj.deptId);
  1727. this.$set(this.form, "cashierId", obj.id);
  1728. this.$set(this.form, "payer", obj.accountName);
  1729. this.$set(this.form, "payerAccount", obj.bankAccountNumber);
  1730. this.$set(this.form, "operatorCode", obj.operatorCode);
  1731. this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
  1732. this.$set(this.form, "bankType", obj.bankType);
  1733. this.$set(this.form, "bankAccountType", obj.bankAccountType);
  1734. this.$set(this.form, "villageAccountType", obj.villageAccountType);
  1735. this.$set(this.form, "taccountId", obj.taccountId);
  1736. this.$set(this.form, "accountNo", obj.accountNo);
  1737. this.$set(this.form, "cifNo", obj.cifNo);
  1738. this.$set(this.form, "payerFrom", '1');
  1739. if(obj.bankType==1){
  1740. this.form.accountType = "1"
  1741. this.form.isPeers = null
  1742. this.accountTypeChange();
  1743. }else if(obj.bankType==2||obj.bankType==3||obj.bankType==4){
  1744. console.log(obj.bankType)
  1745. this.form.accountType = null
  1746. this.form.isPeers = "Y"
  1747. this.accountTypeChange1();
  1748. }
  1749. }else{
  1750. if(obj.payerFrom==1){
  1751. this.diglogStatus = false;
  1752. this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" });
  1753. this.$set(this.form,"payer","")
  1754. this.$set(this.form,"payerAccount","")
  1755. }else{
  1756. this.$set(this.form, "payerFrom", obj.parerFrom);
  1757. if(obj.operatorCode!=null&&obj.operatorCode!=''){
  1758. this.$set(this.form, "operatorCode", obj.operatorCode);
  1759. }else{
  1760. this.$set(this.form, "operatorCode", '');
  1761. }
  1762. if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){
  1763. this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
  1764. }else{
  1765. this.$set(this.form, "enterpriseCode", '');
  1766. }
  1767. if(obj.accountPassword!=null&&obj.accountPassword!=''){
  1768. this.$set(this.form, "accountPassword", obj.accountPassword);
  1769. }else{
  1770. this.$set(this.form, "accountPassword", '');
  1771. }
  1772. this.$set(this.form, "bookId",'');
  1773. this.$set(this.form, "deptId", '');
  1774. this.$set(this.form, "cashierId", obj.id);
  1775. this.$set(this.form, "payer", obj.accountName);
  1776. this.$set(this.form, "bankType", obj.bankType);
  1777. if(obj.payerFrom==6){
  1778. getQmyeFlow(obj.bankAccountNumber).then((response) => {
  1779. this.$set(this.form, "payerAccount", response.data);
  1780. });
  1781. }else {
  1782. this.$set(this.form, "payerAccount", obj.bankAccountNumber);
  1783. }
  1784. }
  1785. }
  1786. },
  1787. beforeRead1(file) {
  1788. this.uploadFiles1.push(file.file);
  1789. },
  1790. deleteFile1(file){
  1791. this.uploadFiles1.map((response,index) => {
  1792. if(file.file == response){
  1793. this.uploadFiles1.splice(index,1)
  1794. }
  1795. })
  1796. },
  1797. beforeRead2(file) {
  1798. this.uploadFiles2.push(file.file);
  1799. },
  1800. deleteFile2(file){
  1801. this.uploadFiles2.map((response,index) => {
  1802. if(file.file == response){
  1803. this.uploadFiles2.splice(index,1)
  1804. }
  1805. })
  1806. },
  1807. beforeRead3(file) {
  1808. this.uploadFiles3.push(file.file);
  1809. },
  1810. deleteFile3(file){
  1811. this.uploadFiles3.map((response,index) => {
  1812. if(file.file == response){
  1813. this.uploadFiles3.splice(index,1)
  1814. }
  1815. })
  1816. },
  1817. getFileList(){
  1818. let oData1= {
  1819. tableId: this.$route.query.id,
  1820. tableName: "t_yinnong_transfer",
  1821. bizPath: "transfer",
  1822. fileType: "1",
  1823. }
  1824. attachmentList(oData1).then(res => {
  1825. res.rows.map(r => {
  1826. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  1827. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  1828. })
  1829. })
  1830. let oData2= {
  1831. tableId: this.$route.query.id,
  1832. tableName: "t_yinnong_transfer",
  1833. bizPath: "transfer",
  1834. fileType: "2",
  1835. }
  1836. attachmentList(oData2).then(res => {
  1837. res.rows.map(r => {
  1838. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  1839. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  1840. })
  1841. })
  1842. let oData3= {
  1843. tableId: this.$route.query.id,
  1844. tableName: "t_yinnong_transfer",
  1845. bizPath: "transfer",
  1846. fileType: "3",
  1847. }
  1848. attachmentList(oData3).then(res => {
  1849. res.rows.map(r => {
  1850. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  1851. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  1852. })
  1853. })
  1854. },
  1855. goBack(){
  1856. this.$router.push({path:'/sunVillage_info/approvalList2'})
  1857. },
  1858. //删除家庭成员
  1859. deleteChargeItme(index){
  1860. this.chargeItme.splice(index,1)
  1861. },
  1862. },
  1863. watch: {
  1864. $route (to, from ) {
  1865. // 监听路由变化, 实现类似 小程序的 onShow 事件
  1866. if (to.path === '/yinnong/approvalAdd2') {
  1867. // do anything you want
  1868. console.log("aaa")
  1869. if (this.$route.params.payeeForm){
  1870. this.chargeItme.push(this.$route.params.payeeForm)
  1871. console.log(this.$route.params.payeeForm)
  1872. }
  1873. }
  1874. }
  1875. },
  1876. }
  1877. </script>
  1878. <style scoped lang="scss">
  1879. .app-container {
  1880. padding-bottom: 2%;
  1881. .header_main{
  1882. height: 116px;
  1883. background: url('../../../../assets/images/sunVillage_info/list_head.png') no-repeat;
  1884. background-size: 100% 100%;
  1885. position: fixed;
  1886. top: 0;
  1887. left: 0;
  1888. width: 100%;
  1889. font-size: 36px;
  1890. line-height: 116px;
  1891. text-align: center;
  1892. color: #fff;
  1893. position: relative;
  1894. .return_btn{
  1895. width: 24px;
  1896. height: 43.2px;
  1897. background: url('../../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  1898. background-size: 20px 36px;
  1899. position: absolute;
  1900. left: 38px;
  1901. top: 36px;
  1902. }
  1903. .add_btn{
  1904. width: 20PX;
  1905. height: 20PX;
  1906. background: url('../../../../../static/images/icon/icon_flow.png') center center no-repeat;
  1907. background-size: 20PX 20PX;
  1908. position: absolute;
  1909. right: 38px;
  1910. top: 36px;
  1911. }
  1912. }
  1913. }
  1914. .main_title_box{
  1915. display: flex;
  1916. justify-content: space-between;
  1917. align-items: center;
  1918. }
  1919. .main_title{
  1920. font-size: 0.4rem;
  1921. color: #1D6FE9;
  1922. margin: 0.2rem 6%;
  1923. position: relative;
  1924. a{
  1925. background: #1989fa;
  1926. color: #ffffff;
  1927. padding: 0.05rem 0.3rem;
  1928. border-radius: 5PX;
  1929. }
  1930. }
  1931. .main_box{
  1932. width: 96%;
  1933. margin: 0 auto;
  1934. border-radius: 6px;
  1935. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  1936. overflow: hidden;
  1937. background-color: #FFF;
  1938. }
  1939. .submitButton{
  1940. width: 80%;
  1941. margin: 0 auto;
  1942. background-color: #1D6FE9;
  1943. }
  1944. .addFamily{
  1945. //position: absolute;
  1946. //top: -2px;
  1947. //right: 0;
  1948. border-radius: 50%;
  1949. }
  1950. .deleteFamily{
  1951. position: absolute;
  1952. top: 0rem;
  1953. right: 6%;
  1954. z-index: 9;
  1955. border-radius: 50%;
  1956. }
  1957. </style>