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

approvalModify2.vue 81 KiB

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