apply.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  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===1?'商业':'组合'}}</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>{{getPropertyName(applyItem.property_sns)}}</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" v-if="applyItem.apply_type*1===1">
  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. getPropertyName(property_sns){
  349. let propertyNum=0
  350. // let propertyName=''
  351. for (const propertyNameKey in this.propertyList) {
  352. if(property_sns.indexOf(this.propertyList[propertyNameKey].property_sn)>=0){
  353. ++propertyNum
  354. }
  355. }
  356. return '资产数量('+propertyNum+')'
  357. },
  358. showBankItem(applyType, bankType) {
  359. // applyType*=1
  360. // if(applyType===1){
  361. // if(bankType===1){
  362. // return this.showIds.indexOf(80)>=0;
  363. // }else {
  364. // return this.showIds.indexOf(81)>=0;
  365. // }
  366. // }else {
  367. // if(bankType===1){
  368. // return this.showIds.indexOf(84)>=0;
  369. // }else {
  370. // return this.showIds.indexOf(85)>=0;
  371. // }
  372. // }
  373. },
  374. delApplyItem(applyKey) {
  375. this.appliesInfo.apply_data.splice(applyKey, 1)
  376. },
  377. delBank(applyKey, itemKey, type) {
  378. if (type === 1) {
  379. this.appliesInfo.apply_data[applyKey].repayment_data.splice(itemKey, 1)
  380. } else {
  381. this.appliesInfo.apply_data[applyKey].loan_data.splice(itemKey, 1)
  382. }
  383. },
  384. addBank(applyKey, type) {
  385. if (type === 1) {
  386. this.appliesInfo.apply_data[applyKey].repayment_data.push({
  387. 'money': '',
  388. 'bank_name': '',
  389. 'bank_num': ''
  390. })
  391. } else {
  392. this.appliesInfo.apply_data[applyKey].loan_data.push({
  393. 'money': '',
  394. 'bank_name': '',
  395. 'bank_num': ''
  396. })
  397. }
  398. },
  399. addApply() {
  400. if (!this.appliesInfo.apply_data) {
  401. this.appliesInfo.apply_data = []
  402. }
  403. this.appliesInfo.apply_data.push(JSON.parse(JSON.stringify(this.applyItem)))
  404. this.editIndex = this.appliesInfo.apply_data.length - 1
  405. },
  406. verifyKey(field) {
  407. return this.showKeys.indexOf(field) >= 0
  408. },
  409. async getTaskOptions() {
  410. const res = await getTaskOptions()
  411. if (res.code === 1) {
  412. this.enterpriseTypeArr = res.data.enterpriseTypeArr
  413. this.enterpriseTypeArr.map((val) => {
  414. val.text = val.name;
  415. });
  416. this.loanFormArr = res.data.loanFormArr
  417. this.loanFormArr.map((val) => {
  418. val.text = val.name;
  419. });
  420. this.loanIndustryArr = res.data.loanIndustryArr
  421. this.loanIndustryArr.map((val) => {
  422. val.text = val.name;
  423. });
  424. this.loanTypeArr = res.data.loanTypeArr
  425. this.loanTypeArr.map((val) => {
  426. val.text = val.name;
  427. });
  428. }
  429. },
  430. // 身份认证
  431. onAuthentication(item) {
  432. uni.navigateTo({
  433. url: "/page_task/identity_upload/identity_upload"
  434. })
  435. },
  436. // 保存
  437. onLeftSubmit() {
  438. if (this.step === 1) return
  439. this.step--
  440. },
  441. // 下一步
  442. onStep() {
  443. if (this.step === 2) return
  444. this.step++
  445. },
  446. // 完成
  447. onSubmit() {
  448. uni.$emit('putAppliesInfo', this.appliesInfo)
  449. setTimeout(() => {
  450. tools.leftClick()
  451. }, 50)
  452. },
  453. // 编辑单个信息
  454. onEditInfo(index) {
  455. this.editIndex = index
  456. },
  457. // 删除信息
  458. onDeleteInfo(index) {
  459. uni.showModal({
  460. title: '提示',
  461. content: '是否删除当前抵押信息?',
  462. success: (res) => {
  463. if (res.confirm) {
  464. this.appliesInfo.apply_data.splice(index, 1)
  465. }
  466. }
  467. })
  468. },
  469. // 保存单个信息
  470. onSaveInfo(item) {
  471. item.is_edit = !item.is_edit
  472. },
  473. onSetFarming(value) {
  474. this.formData.is_farming = value
  475. },
  476. onSetMaterials(value) {
  477. this.formData.is_materials = value
  478. },
  479. }
  480. }
  481. </script>
  482. <style lang="scss" scoped>
  483. .apply-body {
  484. padding-bottom: 100rpx;
  485. }
  486. .step-content {
  487. padding: 0 200rpx;
  488. }
  489. .attestation_content {
  490. width: 100%;
  491. position: absolute;
  492. }
  493. .title-line {
  494. width: 2rpx;
  495. height: 30rpx;
  496. background: #9EABCA;
  497. }
  498. .line {
  499. width: 70rpx;
  500. height: 4rpx;
  501. background: #8EDBDA;
  502. margin-top: 22rpx;
  503. }
  504. button::after {
  505. border: none;
  506. }
  507. .radiu-item {
  508. width: 140rpx;
  509. padding: 6rpx 16rpx;
  510. border-radius: 100rpx;
  511. border: 1rpx solid #CCCCCC;
  512. }
  513. .active-radiu {
  514. color: #0FB160;
  515. border: 1rpx solid #0FB160;
  516. }
  517. .wh-input {
  518. width: 100%;
  519. text-align: right;
  520. direction: rtl;
  521. }
  522. .wh-text {
  523. width: 110rpx;
  524. text-align: justify;
  525. text-align-last: justify;
  526. vertical-align: top;
  527. height: 38rpx;
  528. }
  529. .wh-text:after {
  530. content: '';
  531. width: 110rpx;
  532. height: 0;
  533. display: inline-block;
  534. overflow: hidden;
  535. }
  536. .apply-button {
  537. height: 80rpx;
  538. line-height: 80rpx;
  539. background: #FFFFFF;
  540. border: 2rpx solid #0FB160;
  541. }
  542. .bank-button {
  543. width: 320rpx;
  544. }
  545. .apply-button-save {
  546. width: 140rpx;
  547. background: #FFFFFF;
  548. border: 2rpx solid #0FB160;
  549. }
  550. .apply-button-delete {
  551. color: #E83F37;
  552. width: 140rpx;
  553. background: #FFFFFF;
  554. border: 2rpx solid #E83F37;
  555. }
  556. </style>