apply.vue 18 KB

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