apply.vue 18 KB

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