apply.vue 17 KB

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