移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

approvalAdd11.vue 88 KiB

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