apply.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  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 propertyData="批复类型" 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">
  168. <text class="size-30 sys-weight-600'">{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</text>
  169. <en-input label="还款金额" type="number" placeholder="请输入还款金额" rightText="万元"></en-input>
  170. <add-bank></add-bank>
  171. </view>
  172. <view class="m-t30" v-for="(repaymentItem,repaymentIndex) in applyItem.repayment_data">
  173. <text class="size-30 sys-weight-600'">{{applyItem.apply_type*1===1?'还款信息':'监管银行卡信息'}}</text>
  174. <en-input v-if="applyItem.apply_type*1===1" v-model="repaymentItem.money" label="还款金额"
  175. type="number" placeholder="请输入还款金额" rightText="万元"></en-input>
  176. <add-bank :bank-name.sync="repaymentItem.bank_name"
  177. :bank-num.sync="repaymentItem.bank_num"></add-bank>
  178. </view>
  179. <view class="row">
  180. <button class="size-26 r-10 button-color apply-button bank-button m-t30"
  181. hover-class="is-hover" @click="addApply">+添加监管银行信息</button>
  182. <view class="flex"></view>
  183. </view>
  184. <view class="m-t30" v-for="(loanItem,loanIndex) in applyItem.loan_data">
  185. <text class="size-30 sys-weight-600'">放款账户信息</text>
  186. <en-input label="批复金额" type="number" v-model="loanItem.money" placeholder="请输入批复金额"
  187. rightText="万元"></en-input>
  188. <add-bank :bank-name.sync="loanItem.bank_name"
  189. :bank-num.sync="loanItem.bank_num"></add-bank>
  190. </view>
  191. <view class="row">
  192. <button class="size-26 r-10 button-color apply-button bank-button m-t30"
  193. hover-class="is-hover" @click="addApply">+添加放款信息</button>
  194. <view class="flex"></view>
  195. </view>
  196. <!-- <view class="row-justify-sb">
  197. <view class="flex"></view>
  198. <view class="row-c m-tb20">
  199. <button class="size-26 r-10 apply-button-delete m-r20" hover-class="is-hover"
  200. @click="onDeleteInfo()">删除</button>
  201. <button class="size-26 r-10 button-color apply-button-save" hover-class="is-hover"
  202. @click="onSaveInfo()">保存</button>
  203. </view>
  204. </view> -->
  205. </view>
  206. </view>
  207. <button class="size-26 r-10 button-color apply-button m-t30" hover-class="is-hover"
  208. @click="addApply">+添加申请信息</button>
  209. </view>
  210. <!-- 抵押信息end -->
  211. </view>
  212. <EnButton is_both :leftText="'保存'" :rightText="step === 2?'提交':'下一步'" @onLeftSubmit="onLeftSubmit"
  213. @onSubmit="onStep">
  214. </EnButton>
  215. </view>
  216. </template>
  217. <!-- correct -->
  218. <script>
  219. import TaskImgTab from "@/common/task/task_ima_tab.vue"
  220. import WhInput from "@/components/en-from/en-input/en-input.vue"
  221. import EnInput from "@/components/en-from/en-input/en-input.vue";
  222. import EnSelect from "@/components/en-from/en-select/en-select.vue";
  223. import EnDate from "@/components/en-from/en-date/en-date.vue";
  224. import PropertySelect from "@/page_task/apply/components/property-select.vue";
  225. import AddBank from "@/page_task/apply/components/add-bank.vue";
  226. import {
  227. getTaskOptions
  228. } from "@/api/task";
  229. import tools from "@/service/tools";
  230. export default {
  231. components: {
  232. AddBank,
  233. PropertySelect,
  234. EnDate,
  235. EnSelect,
  236. EnInput,
  237. TaskImgTab,
  238. WhInput
  239. },
  240. data() {
  241. return {
  242. editIndex: 0,
  243. title: '',
  244. step: 1,
  245. fixedHeight: 70,
  246. scrollTop: 0,
  247. stepOne: ['double', 'correct'],
  248. stepTwo: ['two', 'double', 'correct'],
  249. payData: [{
  250. 'value': 1,
  251. 'text': '已缴纳'
  252. }, {
  253. 'value': 0,
  254. 'text': '未缴纳'
  255. }],
  256. applyData: [{
  257. 'value': 1,
  258. 'text': '抵押'
  259. }, {
  260. 'value': 2,
  261. 'text': '买卖'
  262. }],
  263. replyData: [{
  264. 'value': 1,
  265. 'text': '商业'
  266. }, {
  267. 'value': 2,
  268. 'text': '组合'
  269. }],
  270. farmingData: [{
  271. 'value': 1,
  272. 'text': '是'
  273. }, {
  274. 'value': 0,
  275. 'text': '否'
  276. }],
  277. loanFormArr: [], //贷款形式
  278. loanTypeArr: [], //贷款类别
  279. loanIndustryArr: [{
  280. 'id': 1,
  281. 'name': 'no'
  282. }], //投向行业
  283. enterpriseTypeArr: [], //企业类型
  284. bank_name: '',
  285. bank_num: '',
  286. appliesInfo: {
  287. "is_farming": '1',
  288. "loan_form": '',
  289. "loan_type": '',
  290. "loan_industry": [],
  291. "enterprise_type": "",
  292. "use_date": "",
  293. "pay_status": '1',
  294. "quota": "",
  295. "apply_data": []
  296. },
  297. applyItem: {
  298. "apply_type": '1',
  299. "property_sns": [],
  300. "repayment_data": [],
  301. "loan_data": [],
  302. "transaction": "",
  303. "pricing": "",
  304. "supervise": "",
  305. "reply_type": '1',
  306. "intermediary": "",
  307. "is_edit": true,
  308. },
  309. showKeys: [],
  310. propertyList: [],
  311. }
  312. },
  313. onPageScroll(res) {
  314. this.scrollTop = res.scrollTop / 120
  315. },
  316. onLoad(options) {
  317. this.title = options.title
  318. let appliesInfo = uni.getStorageSync('appliesData')
  319. let appliesKey = uni.getStorageSync('appliesKey')
  320. let propertyList = uni.getStorageSync('propertyData')
  321. this.appliesInfo = appliesInfo
  322. this.showKeys = appliesKey
  323. this.propertyList = propertyList
  324. this.getTaskOptions()
  325. },
  326. methods: {
  327. showBankItem(applyType, bankType) {
  328. // applyType*=1
  329. // if(applyType===1){
  330. // if(bankType===1){
  331. // return this.showIds.indexOf(80)>=0;
  332. // }else {
  333. // return this.showIds.indexOf(81)>=0;
  334. // }
  335. // }else {
  336. // if(bankType===1){
  337. // return this.showIds.indexOf(84)>=0;
  338. // }else {
  339. // return this.showIds.indexOf(85)>=0;
  340. // }
  341. // }
  342. },
  343. delApplyItem(applyKey) {
  344. this.appliesInfo.apply_data.splice(applyKey, 1)
  345. },
  346. delBank(applyKey, itemKey, type) {
  347. if (type === 1) {
  348. this.appliesInfo.apply_data[applyKey].repayment_data.splice(itemKey, 1)
  349. } else {
  350. this.appliesInfo.apply_data[applyKey].loan_data.splice(itemKey, 1)
  351. }
  352. },
  353. addBank(applyKey, type) {
  354. if (type === 1) {
  355. this.appliesInfo.apply_data[applyKey].repayment_data.push({
  356. 'money': '',
  357. 'bank_name': '',
  358. 'bank_num': ''
  359. })
  360. } else {
  361. this.appliesInfo.apply_data[applyKey].loan_data.push({
  362. 'money': '',
  363. 'bank_name': '',
  364. 'bank_num': ''
  365. })
  366. }
  367. },
  368. addApply() {
  369. tools.success('aaaaaaaaaaaaa')
  370. if (!this.appliesInfo.apply_data) {
  371. this.appliesInfo.apply_data = []
  372. }
  373. this.appliesInfo.apply_data.push(this.applyItem)
  374. },
  375. verifyKey(field) {
  376. return this.showKeys.indexOf(field) >= 0
  377. },
  378. async getTaskOptions() {
  379. const res = await getTaskOptions()
  380. if (res.code === 1) {
  381. this.enterpriseTypeArr = res.data.enterpriseTypeArr
  382. this.enterpriseTypeArr.map((val) => {
  383. val.text = val.name;
  384. });
  385. this.loanFormArr = res.data.loanFormArr
  386. this.loanFormArr.map((val) => {
  387. val.text = val.name;
  388. });
  389. this.loanIndustryArr = res.data.loanIndustryArr
  390. this.loanIndustryArr.map((val) => {
  391. val.text = val.name;
  392. });
  393. this.loanTypeArr = res.data.loanTypeArr
  394. this.loanTypeArr.map((val) => {
  395. val.text = val.name;
  396. });
  397. }
  398. },
  399. // 身份认证
  400. onAuthentication(item) {
  401. uni.navigateTo({
  402. url: "/page_task/identity_upload/identity_upload"
  403. })
  404. },
  405. // 保存
  406. onLeftSubmit() {
  407. console.log(this.formData);
  408. console.log('保存');
  409. this.applyList.map(item => {
  410. item.is_edit = true
  411. })
  412. if (this.step === 1) return
  413. this.step--
  414. },
  415. // 下一步
  416. onStep() {
  417. if (this.step === 2) return
  418. this.step++
  419. },
  420. // 完成
  421. onSubmit() {
  422. this.step = 4
  423. },
  424. // 添加信息
  425. onAddInfo() {
  426. this.applyList.push({
  427. is_edit: false
  428. })
  429. },
  430. // 编辑单个信息
  431. onEditInfo(index) {
  432. this.editIndex = index
  433. },
  434. // 删除信息
  435. onDeleteInfo(index) {
  436. uni.showModal({
  437. title: '提示',
  438. content: '确定删除?',
  439. success: (res) => {
  440. if (res.confirm) {
  441. this.applyList.splice(index, 1)
  442. }
  443. }
  444. })
  445. },
  446. // 保存单个信息
  447. onSaveInfo(item) {
  448. item.is_edit = !item.is_edit
  449. },
  450. onSetFarming(value) {
  451. this.formData.is_farming = value
  452. },
  453. onSetMaterials(value) {
  454. this.formData.is_materials = value
  455. },
  456. }
  457. }
  458. </script>
  459. <style lang="scss" scoped>
  460. .apply-body {
  461. padding-bottom: 100rpx;
  462. }
  463. .step-content {
  464. padding: 0 200rpx;
  465. }
  466. .attestation_content {
  467. width: 100%;
  468. position: absolute;
  469. }
  470. .title-line {
  471. width: 2rpx;
  472. height: 30rpx;
  473. background: #9EABCA;
  474. }
  475. .line {
  476. width: 70rpx;
  477. height: 4rpx;
  478. background: #8EDBDA;
  479. margin-top: 22rpx;
  480. }
  481. button::after {
  482. border: none;
  483. }
  484. .radiu-item {
  485. width: 140rpx;
  486. padding: 6rpx 16rpx;
  487. border-radius: 100rpx;
  488. border: 1rpx solid #CCCCCC;
  489. }
  490. .active-radiu {
  491. color: #0FB160;
  492. border: 1rpx solid #0FB160;
  493. }
  494. .wh-input {
  495. width: 100%;
  496. text-align: right;
  497. direction: rtl;
  498. }
  499. .wh-text {
  500. width: 110rpx;
  501. text-align: justify;
  502. text-align-last: justify;
  503. vertical-align: top;
  504. height: 38rpx;
  505. }
  506. .wh-text:after {
  507. content: '';
  508. width: 110rpx;
  509. height: 0;
  510. display: inline-block;
  511. overflow: hidden;
  512. }
  513. .apply-button {
  514. height: 80rpx;
  515. line-height: 80rpx;
  516. background: #FFFFFF;
  517. border: 2rpx solid #0FB160;
  518. }
  519. .bank-button {
  520. width: 320rpx;
  521. }
  522. .apply-button-save {
  523. width: 140rpx;
  524. background: #FFFFFF;
  525. border: 2rpx solid #0FB160;
  526. }
  527. .apply-button-delete {
  528. color: #E83F37;
  529. width: 140rpx;
  530. background: #FFFFFF;
  531. border: 2rpx solid #E83F37;
  532. }
  533. </style>