移动端
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

approvalAdd.vue 51 KiB

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