apply.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <template>
  2. <view class="total-page page-env-160 page-box task-bg">
  3. <Nav :title="title" :genre="4" is_fixed :opacity="scrollTop" :fixedHeight="fixedHeight"
  4. :navsHeight="fixedHeight" :bgHeight="fixedHeight">
  5. <!-- 步鄹条start -->
  6. <view class="task-tabs" :style="{top:`${$tools.topHeight()}px`}">
  7. <view class="row-justify-sb m-tb20 step-content">
  8. <view class="column-c" style="text-align: center;">
  9. <image class="wh-45 m-b16"
  10. :src="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/information/${step === 1?'double':'correct'}.png`"
  11. mode="aspectFill"></image>
  12. <text class="size-24"
  13. :class="step === 1?'color-0FB160 sys-weight-600':'sys-weight-400'">基本信息</text>
  14. </view>
  15. <view class="line"></view>
  16. <view class="column-c justify-center">
  17. <image class="wh-45 m-b16"
  18. :src="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/information/${stepTwo[step-1]}.png`"
  19. mode="aspectFill"></image>
  20. <text class="size-24"
  21. :class="step === 2?'color-0FB160 sys-weight-600':'sys-weight-400'">抵押信息</text>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- 步鄹条end -->
  26. </Nav>
  27. <view class="" :style="[{top:`${$tools.topHeight() + fixedHeight}px`}]">
  28. <!-- 基本信息start -->
  29. <view class="m-t20 m-lr30 text-color-12" v-if="step === 1">
  30. <view class="sys-background-fff r-20 p-lr30 p-t30">
  31. <text class="size-30 sys-weight-600'">基本信息</text>
  32. <view class="m-t20">
  33. <en-input label="贷款额度" v-if="verifyKey('quota')" v-model="appliesInfo.quota" type="digit"
  34. placeholder="请输入贷款金额" rightText="万元"></en-input>
  35. <en-radio name="是否涉农" v-if="verifyKey('is_farming')" v-model="appliesInfo.is_farming"
  36. :list="farmingData"></en-radio>
  37. <en-select label="贷款形式" v-if="verifyKey('loan_form')" v-model="appliesInfo.loan_form"
  38. :local-data="loanFormArr" placeholder="请选择贷款形式"></en-select>
  39. <en-select label="贷款类别" v-if="verifyKey('loan_type')" v-model="appliesInfo.loan_type"
  40. :local-data="loanTypeArr" placeholder="请选择贷款类别"></en-select>
  41. <en-select :valueType="'2'" :map="{ text: 'name', value: 'id'}" label="投向行业"
  42. v-if="verifyKey('loan_industry')" v-model="appliesInfo.loan_industry"
  43. :local-data="loanIndustryArr" placeholder="请选择投向行业"></en-select>
  44. <en-select label="企业类型" v-if="verifyKey('enterprise_type')"
  45. v-model="appliesInfo.enterprise_type" :local-data="enterpriseTypeArr"
  46. placeholder="请选择企业类型"></en-select>
  47. <en-date label="预计用款时间" v-if="verifyKey('use_date')" v-model="appliesInfo.use_date"
  48. placeholder="选择预计用款时间"></en-date>
  49. <en-radio name="材料费" v-if="verifyKey('pay_status')" v-model="appliesInfo.pay_status"
  50. :list="payData" :no-box="true" :is_border="false"></en-radio>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 基本信息end -->
  55. <!-- 抵押信息start -->
  56. <view id="apply-info" class="m-t20 m-lr30 text-color-12" v-if="step === 2">
  57. <view :id="`info${index}`" class="sys-background-fff r-20 p-20 m-b20"
  58. v-for="(applyItem,index) in appliesInfo.apply_data" :key="index">
  59. <view class="sys-from-background-color p-20 r-20 size-26" v-if="editIndex!==index">
  60. <view class="">
  61. <view class="row-justify-sb center">
  62. <text class="size-28 sys-weight-600">抵押信息({{index+1}})</text>
  63. <view class="row-c sys-background-fff r-100 p-lr30 p-tb10">
  64. <image class="wh-30"
  65. src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/information/edit.png"
  66. mode="aspectFill" @click="onEditInfo(index)"></image>
  67. <view class="title-line m-lr20"></view>
  68. <image class="wh-30"
  69. src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/information/delete.png"
  70. mode="aspectFill" @click="onDeleteInfo(index)">
  71. </image>
  72. </view>
  73. </view>
  74. <view class="row-c p-tb30">
  75. <view class="text-color-666"><text></text>申请类型:</view>
  76. <text>{{applyItem.apply_type*1===1?'抵押':'买卖'}}</text>
  77. </view>
  78. <view class="" v-if="applyItem.apply_type*1===2">
  79. <view class="row-c p-tb30" v-if="verifyKey('transaction')">
  80. <view class="text-color-666"><text></text>成交价:</view>
  81. <text>{{applyItem.transaction}}万</text>
  82. </view>
  83. <view class="row-c " v-if="verifyKey('pricing')">
  84. <view class="text-color-666"><text></text>定金:</view>
  85. <text>{{applyItem.pricing}}</text>
  86. </view>
  87. <view class="row-c p-tb30" v-if="verifyKey('supervise')">
  88. <view class="text-color-666"><text></text>资金监管:</view>
  89. <text>{{applyItem.supervise}}</text>
  90. </view>
  91. <view class="row-c p-tb30" v-if="verifyKey('reply_type')">
  92. <view class="text-color-666"><text></text>批复类型:</view>
  93. <text>{{applyItem.reply_type}}</text>
  94. </view>
  95. <view class="row-c p-tb30" v-if="verifyKey('intermediary')">
  96. <view class="text-color-666"><text></text>成交中介:</view>
  97. <text>{{applyItem.intermediary}}</text>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="">
  102. <text class="size-28 sys-weight-600">绑定资产信息</text>
  103. <view class="row-c p-tb30">
  104. <view class="text-color-666"><text></text>绑定资产:</view>
  105. <text>绑定资产</text>
  106. </view>
  107. </view>
  108. <view class="">
  109. <view v-for="(repaymentItem,repaymentIndex) in applyItem.repayment_data">
  110. <text
  111. class="size-28 sys-weight-600">{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</text>
  112. <view class="row-c p-tb30">
  113. <view class="text-color-666"><text></text>还款金额:</view>
  114. <text>{{repaymentItem.money}}万</text>
  115. </view>
  116. <view class="row-c ">
  117. <view class="text-color-666"><text></text>银行卡号:</view>
  118. <text>{{repaymentItem.bank_num}}</text>
  119. </view>
  120. <view class="row-c p-tb30">
  121. <view class="text-color-666"><text></text>所属银行:</view>
  122. <text>{{repaymentItem.bank_name}}</text>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="">
  127. <view v-for="(loanItem,loanIndex) in applyItem.loan_data">
  128. <text class="size-28 sys-weight-600">放款账户信息</text>
  129. <view class="row-c p-tb30">
  130. <view class="text-color-666"><text></text>批复金额:</view>
  131. <text>{{loanItem.money}}万</text>
  132. </view>
  133. <view class="row-c ">
  134. <view class="text-color-666"><text></text>银行卡号:</view>
  135. <text>{{loanItem.bank_num}}</text>
  136. </view>
  137. <view class="row-c p-t30">
  138. <view class="text-color-666"><text></text>所属银行:</view>
  139. <text>{{loanItem.bank_name}}</text>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view v-else>
  145. <view class="">
  146. <text class="size-30 sys-weight-600'">抵押信息{{index+1}}</text>
  147. <en-radio name="申请类型" v-model="applyItem.apply_type" v-if="verifyKey('apply_type')"
  148. :list="applyData"></en-radio>
  149. <view v-if="applyItem.apply_type*1===2">
  150. <en-input label="成交价" v-model="applyItem.transaction" v-if="verifyKey('transaction')"
  151. type="digit" placeholder="请输入成交价" rightText="万元"></en-input>
  152. <en-input label="定金" v-model="applyItem.pricing" v-if="verifyKey('pricing')"
  153. type="digit" placeholder="请输入定金" rightText="万元"></en-input>
  154. <en-input label="资金监管" v-model="applyItem.supervise" v-if="verifyKey('supervise')"
  155. type="digit" placeholder="请输监管金额" rightText="万元"></en-input>
  156. <en-radio label="批复类型" v-model="applyItem.reply_type"
  157. v-if="verifyKey('reply_type')" :list="replyData"></en-radio>
  158. <en-input label="成交中介" v-model="applyItem.intermediary" v-if="verifyKey('intermediary')"
  159. type="text" placeholder="请输入中介公司名称"></en-input>
  160. </view>
  161. </view>
  162. <view class="m-t30">
  163. <text class="size-30 sys-weight-600'">绑定资产信息</text>
  164. <property-select label="选择资产" v-model="applyItem.property_sns"
  165. :propertyList="propertyList"></property-select>
  166. </view>
  167. <view class="m-t30" v-for="(repaymentItem,repaymentIndex) in applyItem.repayment_data">
  168. <text class="size-30 sys-weight-600'">{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</text>
  169. <en-input v-if="applyItem.apply_type*1===1" v-model="repaymentItem.money" label="还款金额"
  170. type="number" placeholder="请输入还款金额" rightText="万元"></en-input>
  171. <add-bank :bank-name.sync="repaymentItem.bank_name"
  172. :bank-num.sync="repaymentItem.bank_num"></add-bank>
  173. </view>
  174. <view class="row">
  175. <button class="size-26 r-10 button-color apply-button bank-button m-t30"
  176. hover-class="is-hover" @click="addBank(index,1)">+{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</button>
  177. <view class="flex"></view>
  178. </view>
  179. <view class="m-t30" v-for="(loanItem,loanIndex) in applyItem.loan_data">
  180. <text class="size-30 sys-weight-600'">放款账户信息</text>
  181. <en-input label="批复金额" type="number" v-model="loanItem.money" placeholder="请输入批复金额"
  182. rightText="万元"></en-input>
  183. <add-bank :bank-name.sync="loanItem.bank_name"
  184. :bank-num.sync="loanItem.bank_num"></add-bank>
  185. </view>
  186. <view class="row">
  187. <button class="size-26 r-10 button-color apply-button bank-button m-t30"
  188. hover-class="is-hover" @click="addBank(index,2)">+添加放款信息</button>
  189. <view class="flex"></view>
  190. </view>
  191. <!-- <view class="row-justify-sb">
  192. <view class="flex"></view>
  193. <view class="row-c m-tb20">
  194. <button class="size-26 r-10 apply-button-delete m-r20" hover-class="is-hover"
  195. @click="onDeleteInfo()">删除</button>
  196. <button class="size-26 r-10 button-color apply-button-save" hover-class="is-hover"
  197. @click="onSaveInfo()">保存</button>
  198. </view>
  199. </view> -->
  200. </view>
  201. </view>
  202. <en-blank message="暂无抵押申请信息~~" v-if="appliesInfo.apply_data.length<=0"></en-blank>
  203. <button class="size-26 r-10 button-color apply-button m-t30" hover-class="is-hover"
  204. @click="addApply">+添加申请信息</button>
  205. </view>
  206. <!-- 抵押信息end -->
  207. </view>
  208. <EnButton v-if="step === 1" :text="'下一步'" @onSubmit="onStep"></EnButton>
  209. <EnButton is_both v-else :leftText="'上一步'" :rightText="'提交'" @onLeftSubmit="onLeftSubmit" @onSubmit="onSubmit">
  210. </EnButton>
  211. </view>
  212. </template>
  213. <!-- correct -->
  214. <script>
  215. import TaskImgTab from "@/common/task/task_ima_tab.vue"
  216. import WhInput from "@/components/en-from/en-input/en-input.vue"
  217. import EnInput from "@/components/en-from/en-input/en-input.vue";
  218. import EnSelect from "@/components/en-from/en-select/en-select.vue";
  219. import EnDate from "@/components/en-from/en-date/en-date.vue";
  220. import PropertySelect from "@/page_task/apply/components/property-select.vue";
  221. import AddBank from "@/page_task/apply/components/add-bank.vue";
  222. import {
  223. getTaskOptions
  224. } from "@/api/task";
  225. import tools from "@/service/tools";
  226. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  227. export default {
  228. components: {
  229. EnBlank,
  230. AddBank,
  231. PropertySelect,
  232. EnDate,
  233. EnSelect,
  234. EnInput,
  235. TaskImgTab,
  236. WhInput
  237. },
  238. data() {
  239. return {
  240. editIndex: 0,
  241. title: '',
  242. step: 1,
  243. fixedHeight: 70,
  244. scrollTop: 0,
  245. stepOne: ['double', 'correct'],
  246. stepTwo: ['two', 'double', 'correct'],
  247. payData: [{
  248. 'value': 1,
  249. 'text': '已缴纳'
  250. }, {
  251. 'value': 0,
  252. 'text': '未缴纳'
  253. }],
  254. applyData: [{
  255. 'value': 1,
  256. 'text': '抵押'
  257. }, {
  258. 'value': 2,
  259. 'text': '买卖'
  260. }],
  261. replyData: [{
  262. 'value': 1,
  263. 'text': '商业'
  264. }, {
  265. 'value': 2,
  266. 'text': '组合'
  267. }],
  268. farmingData: [{
  269. 'value': 1,
  270. 'text': '是'
  271. }, {
  272. 'value': 0,
  273. 'text': '否'
  274. }],
  275. loanFormArr: [], //贷款形式
  276. loanTypeArr: [], //贷款类别
  277. loanIndustryArr: [{
  278. 'id': 1,
  279. 'name': 'no'
  280. }], //投向行业
  281. enterpriseTypeArr: [], //企业类型
  282. bank_name: '',
  283. bank_num: '',
  284. appliesInfo: {
  285. "is_farming": '1',
  286. "loan_form": '',
  287. "loan_type": '',
  288. "loan_industry": [],
  289. "enterprise_type": "",
  290. "use_date": "",
  291. "pay_status": '1',
  292. "quota": "",
  293. "apply_data": []
  294. },
  295. applyItem: {
  296. "apply_type": '1',
  297. "property_sns": [],
  298. "repayment_data": [],
  299. "loan_data": [],
  300. "transaction": "",
  301. "pricing": "",
  302. "supervise": "",
  303. "reply_type": '1',
  304. "intermediary": "",
  305. "is_edit": true,
  306. },
  307. showKeys: [],
  308. propertyList: [],
  309. }
  310. },
  311. onPageScroll(res) {
  312. this.scrollTop = res.scrollTop / 120
  313. },
  314. onLoad(options) {
  315. this.title = options.title
  316. let appliesInfo = uni.getStorageSync('appliesData')
  317. let appliesKey = uni.getStorageSync('appliesKey')
  318. let propertyList = uni.getStorageSync('propertyData')
  319. this.appliesInfo = appliesInfo
  320. this.showKeys = appliesKey
  321. this.propertyList = propertyList
  322. this.getTaskOptions()
  323. },
  324. methods: {
  325. showBankItem(applyType, bankType) {
  326. // applyType*=1
  327. // if(applyType===1){
  328. // if(bankType===1){
  329. // return this.showIds.indexOf(80)>=0;
  330. // }else {
  331. // return this.showIds.indexOf(81)>=0;
  332. // }
  333. // }else {
  334. // if(bankType===1){
  335. // return this.showIds.indexOf(84)>=0;
  336. // }else {
  337. // return this.showIds.indexOf(85)>=0;
  338. // }
  339. // }
  340. },
  341. delApplyItem(applyKey) {
  342. this.appliesInfo.apply_data.splice(applyKey, 1)
  343. },
  344. delBank(applyKey, itemKey, type) {
  345. if (type === 1) {
  346. this.appliesInfo.apply_data[applyKey].repayment_data.splice(itemKey, 1)
  347. } else {
  348. this.appliesInfo.apply_data[applyKey].loan_data.splice(itemKey, 1)
  349. }
  350. },
  351. addBank(applyKey, type) {
  352. if (type === 1) {
  353. this.appliesInfo.apply_data[applyKey].repayment_data.push({
  354. 'money': '',
  355. 'bank_name': '',
  356. 'bank_num': ''
  357. })
  358. } else {
  359. this.appliesInfo.apply_data[applyKey].loan_data.push({
  360. 'money': '',
  361. 'bank_name': '',
  362. 'bank_num': ''
  363. })
  364. }
  365. },
  366. addApply() {
  367. if (!this.appliesInfo.apply_data) {
  368. this.appliesInfo.apply_data = []
  369. }
  370. this.appliesInfo.apply_data.push(JSON.parse(JSON.stringify(this.applyItem)))
  371. this.editIndex=this.appliesInfo.apply_data.length-1
  372. },
  373. verifyKey(field) {
  374. return this.showKeys.indexOf(field) >= 0
  375. },
  376. async getTaskOptions() {
  377. const res = await getTaskOptions()
  378. if (res.code === 1) {
  379. this.enterpriseTypeArr = res.data.enterpriseTypeArr
  380. this.enterpriseTypeArr.map((val) => {
  381. val.text = val.name;
  382. });
  383. this.loanFormArr = res.data.loanFormArr
  384. this.loanFormArr.map((val) => {
  385. val.text = val.name;
  386. });
  387. this.loanIndustryArr = res.data.loanIndustryArr
  388. this.loanIndustryArr.map((val) => {
  389. val.text = val.name;
  390. });
  391. this.loanTypeArr = res.data.loanTypeArr
  392. this.loanTypeArr.map((val) => {
  393. val.text = val.name;
  394. });
  395. }
  396. },
  397. // 身份认证
  398. onAuthentication(item) {
  399. uni.navigateTo({
  400. url: "/page_task/identity_upload/identity_upload"
  401. })
  402. },
  403. // 保存
  404. onLeftSubmit() {
  405. if (this.step === 1) return
  406. this.step--
  407. },
  408. // 下一步
  409. onStep() {
  410. if (this.step === 2) return
  411. this.step++
  412. },
  413. // 完成
  414. onSubmit() {
  415. uni.$emit('putAppliesInfo',this.appliesInfo)
  416. setTimeout(()=>{
  417. tools.leftClick()
  418. },50)
  419. },
  420. // 编辑单个信息
  421. onEditInfo(index) {
  422. this.editIndex = index
  423. },
  424. // 删除信息
  425. onDeleteInfo(index) {
  426. uni.showModal({
  427. title: '提示',
  428. content: '是否删除当前抵押信息?',
  429. success: (res) => {
  430. if (res.confirm) {
  431. this.appliesInfo.apply_data.splice(index, 1)
  432. }
  433. }
  434. })
  435. },
  436. // 保存单个信息
  437. onSaveInfo(item) {
  438. item.is_edit = !item.is_edit
  439. },
  440. onSetFarming(value) {
  441. this.formData.is_farming = value
  442. },
  443. onSetMaterials(value) {
  444. this.formData.is_materials = value
  445. },
  446. }
  447. }
  448. </script>
  449. <style lang="scss" scoped>
  450. .apply-body {
  451. padding-bottom: 100rpx;
  452. }
  453. .step-content {
  454. padding: 0 200rpx;
  455. }
  456. .attestation_content {
  457. width: 100%;
  458. position: absolute;
  459. }
  460. .title-line {
  461. width: 2rpx;
  462. height: 30rpx;
  463. background: #9EABCA;
  464. }
  465. .line {
  466. width: 70rpx;
  467. height: 4rpx;
  468. background: #8EDBDA;
  469. margin-top: 22rpx;
  470. }
  471. button::after {
  472. border: none;
  473. }
  474. .radiu-item {
  475. width: 140rpx;
  476. padding: 6rpx 16rpx;
  477. border-radius: 100rpx;
  478. border: 1rpx solid #CCCCCC;
  479. }
  480. .active-radiu {
  481. color: #0FB160;
  482. border: 1rpx solid #0FB160;
  483. }
  484. .wh-input {
  485. width: 100%;
  486. text-align: right;
  487. direction: rtl;
  488. }
  489. .wh-text {
  490. width: 110rpx;
  491. text-align: justify;
  492. text-align-last: justify;
  493. vertical-align: top;
  494. height: 38rpx;
  495. }
  496. .wh-text:after {
  497. content: '';
  498. width: 110rpx;
  499. height: 0;
  500. display: inline-block;
  501. overflow: hidden;
  502. }
  503. .apply-button {
  504. height: 80rpx;
  505. line-height: 80rpx;
  506. background: #FFFFFF;
  507. border: 2rpx solid #0FB160;
  508. }
  509. .bank-button {
  510. width: 320rpx;
  511. }
  512. .apply-button-save {
  513. width: 140rpx;
  514. background: #FFFFFF;
  515. border: 2rpx solid #0FB160;
  516. }
  517. .apply-button-delete {
  518. color: #E83F37;
  519. width: 140rpx;
  520. background: #FFFFFF;
  521. border: 2rpx solid #E83F37;
  522. }
  523. </style>