Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

choice-product.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. <template>
  2. <navBar title="产品选择" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <navBgCar :activeNum='1'></navBgCar>
  4. <view class="content-value">
  5. <view class="con">
  6. <view class="con-item bgImgs" v-for="(item, index) in state.dataArray" :key="index"
  7. :style="{'--bgimg':`url(${$imgUrl}issuance/chanping-bg.png)`}" @click="toEquity(item)">
  8. <view class="item-header ">
  9. <view class="l-txt">
  10. {{ item.productName }}
  11. </view>
  12. <view class="r-tip bgImgs" :style="{'--bgimg':`url(${$imgUrl}issuance/r-tip.png)`}">
  13. {{ item['cardTypeArr'] }}
  14. </view>
  15. </view>
  16. <view class="b-txt">
  17. <view class="l-money">
  18. <text>¥</text> <text class="fee">{{ item.amount * 0.01 }}</text>
  19. </view>
  20. <view class="c-line" v-if='item.remarks'>
  21. </view>
  22. <view class="r-desc">
  23. {{item.remarks}}
  24. <!-- 产品权益专用,2%加息10天 -->
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="bottomTip" v-if='state.dataArray.length===0'> 暂无产品,敬请期待! </view>
  30. </view>
  31. <!-- <uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt"
  32. v-if="ordersList.length > 0" /> -->
  33. <u-popup mode="center" v-model="state.choiceCardShow">
  34. <view class="squire">
  35. <view class="mask-close">
  36. <image :src="fileURL + 'image/index/icon-close.png'" class="icon-closed" @click="closeMask"></image>
  37. </view>
  38. <view class="mask-title" :style="{ '--color': color }">选择办理卡类型</view>
  39. <view class="as-layout-horizontal">
  40. <view v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name"
  41. @click="radioChange(item.name)"
  42. style="width: 100%;display: flex;align-items: center;margin-bottom: 30rpx;">
  43. <view class="as-layout-vertical as-gravity-center">
  44. <image style="width: 140rpx; height: 100rpx; border-radius: 20rpx;margin-right: 20rpx;"
  45. :src="`${$imgUrl}card2.png`" mode="aspectFill"></image>
  46. <view style="margin-top: 20rpx;text-align: center;">
  47. {{item.name}}
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </u-popup>
  54. </template>
  55. <script setup lang="ts">
  56. import { onLoad, onPageScroll, onShow, onReachBottom, onPullDownRefresh, } from "@dcloudio/uni-app";
  57. import { reactive, ref } from "vue";
  58. import { pageQuery } from "@/utils/network/api.js";
  59. import { requestNew } from "@/utils/network/request.js";
  60. import { fileURL } from "@/datas/fileURL.js";
  61. import navBgCar from "./components/nav-bg-car1";
  62. import navBar from "@/components/nav-bar/nav-bar2.vue";
  63. import { setItem } from "@/utils/storage.ts";
  64. import { agentId } from "@/utils/network/difference";
  65. import { msg, navTo } from "@/utils/utils";
  66. const imgURL = `${fileURL}image/`;
  67. let bgc = ""
  68. // #ifdef MP-ALIPAY
  69. bgc = "#FFFFFF"
  70. // #endif
  71. // #ifdef MP-WEIXIN
  72. bgc = "#F4F6FA"
  73. // #endif
  74. const scrollTop = ref(0); //滚动距离
  75. // /* 刷新列表 */
  76. // const refreshList = (isLoading) => {
  77. // console.log("========", isLoading)
  78. // params.pageNum = 1;
  79. // params.total = 0;
  80. // params.status = 'more';
  81. // params.reload = false;
  82. // getList();
  83. // }
  84. // const config = {
  85. // emptyHint: {
  86. // hint: '~ 暂无订单数据 ~',
  87. // icon: '',
  88. // mode: 'order'
  89. // },
  90. // contentTxt: {
  91. // contentdown: '~上拉加载更多~',
  92. // contentrefresh: '努力加载中...',
  93. // contentnomore: '-- 我是有底线的 --'
  94. // }
  95. // }
  96. // /* 加载更多 */
  97. // const loadMore = () => {
  98. // if (params.total > ordersList.value.length) {
  99. // params.status = 'loading';
  100. // params.pageNum++;
  101. // getList();
  102. // } else {
  103. // params.status = 'noMore';
  104. // }
  105. // }
  106. // onReachBottom(() => {
  107. // loadMore();
  108. // });
  109. // 单选默认数据
  110. // 单选
  111. // 单选
  112. const radioChange = (n) => {
  113. console.log('radioChange', n);
  114. if (n == '记账卡') {
  115. state.isValueCard = 2
  116. state.cardType = 1
  117. } else if (n == '储值卡') {
  118. state.isValueCard = 1
  119. state.cardType = 2
  120. } else {
  121. state.isValueCard = 2
  122. state.cardType = 3
  123. }
  124. setItem("isValueCard", state.isValueCard);
  125. navTo(`/subpackage/orders/interestsList?userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&cardType=${state.cardType}&fee=${Number(state.fee)}&equityId=${state.equityId}&fee=${state.fee}&signAgencyId=${state.signAgencyId}`)
  126. }
  127. const toEquity = (itemData) => {
  128. if (itemData['cardTypeArr'].split(",").length == 1) {
  129. if (itemData['cardTypeArr'] == "记账卡") {
  130. state.isValueCard = 2
  131. state.cardType = 1
  132. } else if (itemData['cardTypeArr'] == '储值卡') {
  133. state.isValueCard = 1
  134. state.cardType = 2
  135. } else {
  136. state.isValueCard = 2
  137. state.cardType = 3
  138. }
  139. }
  140. console.log("state.isValueCard", state.isValueCard)
  141. setItem("isValueCard", state.isValueCard);
  142. setItem("currentProductList", itemData);
  143. navTo(`/subpackage/orders/equity/equityList?userType=${state.userType}&vanType=${state.vanType}&cardType=${state.cardType}&isValueCard=${state.isValueCard}&amount=${itemData.amount}`)
  144. }
  145. const savaHandle = (val, idx) => {
  146. console.log("vAL", val)
  147. // 1不能点击 0可以点击 权益置灰 弹出提示
  148. if (val.equityList[0]['isClick'] == 1) {
  149. msg(val.equityList[0]['noClickCase'])
  150. return;
  151. }
  152. setItem("clientFee", val.clientFee);
  153. state.isSign = val.isSign;
  154. state.signAgencyId = val['deviceType'];
  155. state.equityId = val.equityList[idx].equityId;
  156. // 产品金额+权益金额
  157. state.fee = Number(val.fee) + Number(val.equityList[idx].discountPrice);
  158. // 判断是几张卡
  159. if (val['cardTypeArr'].split(",").length == 1) {
  160. if (val['cardTypeArr'].split(",")[0] == "记账卡") {
  161. state.isValueCard = 2
  162. state.cardType = 1
  163. } else if (val['cardTypeArr'].split(",")[0] == '储值卡') {
  164. state.isValueCard = 1
  165. state.cardType = 2
  166. } else {
  167. state.isValueCard = 2
  168. state.cardType = 3
  169. }
  170. console.log("state.isValueCard", state.isValueCard)
  171. setItem("isValueCard", state.isValueCard);
  172. navTo(`/subpackage/orders/interestsList?equityId=${val.equityList[idx].equityId}&userType=${state.userType}&vanType=${state.vanType}&cardType=${state.cardType}&isValueCard=${state.isValueCard}&fee=${state.fee}&signAgencyId=${val['deviceType']}&productId=${val['productId']}`)
  173. } else {
  174. state.radiolist1 = [];
  175. // 处理卡的数据
  176. for (var i = 0; i < val['cardTypeArr'].split(",").length; i++) {
  177. const obj = {};
  178. obj["name"] = val['cardTypeArr'].split(",")[i];
  179. obj["disabled"] = false;
  180. state.radiolist1.push(obj)
  181. }
  182. state.choiceCardShow = true;
  183. console.log("state.radiolist1", state.radiolist1)
  184. }
  185. };
  186. onLoad((option : any) => {
  187. // #ifdef MP-ALIPAY
  188. state.sysType = 'ALI';
  189. // #endif
  190. // #ifdef MP-WEIXIN
  191. state.sysType = 'WECHAT';
  192. // #endif
  193. state.userType = Number(option.userType);
  194. state.vanType = Number(option.vanType);
  195. productList();
  196. console.log("option选择产品列表", option)
  197. });
  198. // 产品列表
  199. const productList = () => {
  200. var data = {
  201. userType: state.userType,
  202. // agencyId: agentId,
  203. vanType: state.vanType,
  204. "customerId": "",
  205. "pageNo": 1,
  206. "pageSize": 10,
  207. "staffId": "",
  208. };
  209. console.log("data", data)
  210. const options = {
  211. data: data,
  212. method: "POST",
  213. showLoading: true,
  214. };
  215. console.log("输出内容", options);
  216. requestNew(pageQuery, options).then((res) => {
  217. console.log("产品列表", res);
  218. const data = res;
  219. if (data.result && data.result.length > 0) {
  220. state.dataArray = data.result ? data.result : [];
  221. console.log("state.dataArray", state.dataArray);
  222. for (var i = 0; i < state.dataArray.length; i++) {
  223. let cardTypeArr = "";
  224. if (state.dataArray[i].cardType == 'STORED_VALUE_CARD') {
  225. cardTypeArr = ('储值卡')
  226. } else if (state.dataArray[i].cardType == 'CHARGE_CARD') {
  227. cardTypeArr = ('记账卡')
  228. } else if (state.dataArray[i].cardType == 'PRE_CHARGE_CARD') {
  229. cardTypeArr = ('预存卡')
  230. }
  231. state.dataArray[i]['cardTypeArr'] = cardTypeArr;
  232. }
  233. } else {
  234. uni.showModal({
  235. title: '提示',
  236. content: '尊敬的用户:感谢您的关注!我们正紧锣密鼓地为您准备一款全新的产品。虽然目前尚未上线,但请您耐心等待,我们将以更好的姿态与更丰富的功能,为您呈现一份超出期待的产品。',
  237. showCancel: false,
  238. success: function (res) {
  239. if (res.confirm) {
  240. uni.switchTab({
  241. url: '/pages/index/index'
  242. })
  243. console.log('用户点击确定');
  244. } else if (res.cancel) {
  245. console.log('用户点击取消');
  246. }
  247. }
  248. });
  249. }
  250. console.log("state.dataArray", state.dataArray)
  251. });
  252. }
  253. //监听页面滚动
  254. onPageScroll((e) => {
  255. scrollTop.value = e.scrollTop;
  256. });
  257. const state = reactive({
  258. isValueCard: 1, //卡的类型
  259. radiolist1: [], //选择卡的数据列表
  260. choiceCardShow: false, //选择卡的弹出框
  261. isSign: '',
  262. sysType: "",
  263. orderId: "",
  264. userType: 1, //1 个人 2单位
  265. vanType: 0, //0 客车 1货车
  266. vehiclePlateColor: "",
  267. data: {
  268. show: false,
  269. src: imgURL + "applyCard/edit.png",
  270. },
  271. dataArray: [],
  272. list: [
  273. {
  274. bg: imgURL + "applyCard/product-bg.png",
  275. icon: imgURL + "applyCard/wechat.png",
  276. title: "【货车】微信车主服务",
  277. tip: "绑定微信支付,无需绑定银行卡",
  278. },
  279. ],
  280. fee: 0, //产品金额
  281. equityId: "",
  282. signAgencyId: "",//渠道标识
  283. cardType: ""
  284. });
  285. const params = {
  286. userType: state.userType,
  287. // agencyId: agentId,
  288. vanType: state.vanType,
  289. "customerId": "",
  290. "pageNo": 1,
  291. "pageSize": 10,
  292. "staffId": "",
  293. };
  294. const closeMask = () => {
  295. state.choiceCardShow = false;
  296. };
  297. </script>
  298. <style lang="scss" scoped>
  299. ::v-deep .u-radio {
  300. display: flex !important;
  301. align-items: center !important;
  302. float: none !important;
  303. }
  304. ::v-deep .u-icon__icon {
  305. top: -4px !important;
  306. }
  307. .bottomTip {
  308. padding: 30rpx 0 0;
  309. text-align: center;
  310. font-size: 28rpx;
  311. font-family: Microsoft YaHei;
  312. font-weight: 400;
  313. color: #b3b3b3;
  314. }
  315. .content-value {
  316. position: absolute;
  317. top: 370rpx;
  318. // height: calc(100% - 390rpx);
  319. background-color: #fff;
  320. border-radius: 12rpx;
  321. padding: 20rpx 0 50rpx;
  322. margin: 0 30rpx;
  323. width: 690rpx;
  324. .img-pos {
  325. position: absolute;
  326. left: 500rpx;
  327. top: -38rpx;
  328. right: 50rpx;
  329. .img-flex {
  330. display: flex;
  331. justify-content: space-between;
  332. align-items: center;
  333. .car-img {
  334. width: 86rpx;
  335. height: 42rpx;
  336. }
  337. .flag-img {
  338. width: 30rpx;
  339. height: 35rpx;
  340. }
  341. }
  342. }
  343. }
  344. .flex {
  345. display: flex;
  346. align-items: center;
  347. }
  348. .action {
  349. margin-top: 30rpx;
  350. padding-left: 20rpx;
  351. padding-right: 20rpx;
  352. padding-bottom: 30rpx;
  353. .button {
  354. height: 80rpx;
  355. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  356. border-radius: 40rpx;
  357. font-size: 32rpx;
  358. font-weight: 400;
  359. color: #ffffff;
  360. line-height: 80rpx;
  361. }
  362. }
  363. .action-btn {
  364. margin-left: 45rpx;
  365. width: 121rpx;
  366. height: 61rpx;
  367. border: 1px solid rgba(255, 255, 255, 1);
  368. border-radius: 30rpx;
  369. background: rgba(255, 255, 255, 0.2);
  370. text-align: center;
  371. font-size: 30rpx;
  372. font-family: Microsoft YaHei;
  373. font-weight: 400;
  374. color: #ffffff;
  375. line-height: 61rpx;
  376. }
  377. .tag1 {
  378. padding: 5rpx;
  379. background: rgba(0, 179, 139, 0.5);
  380. border-radius: 6rpx;
  381. font-size: 22rpx;
  382. font-family: Microsoft YaHei;
  383. font-weight: 400;
  384. color: #ffffff;
  385. }
  386. .tag3 {
  387. padding: 5rpx;
  388. background: rgba(139, 112, 228, 0.5);
  389. border-radius: 6rpx;
  390. font-size: 22rpx;
  391. font-family: Microsoft YaHei;
  392. font-weight: 400;
  393. color: #ffffff;
  394. }
  395. .tag2 {
  396. padding: 5rpx;
  397. background: rgba(249, 97, 60, 0.5);
  398. border-radius: 6rpx;
  399. font-size: 22rpx;
  400. font-family: Microsoft YaHei;
  401. font-weight: 400;
  402. color: #ffffff;
  403. }
  404. .ul-item-hui {
  405. padding: 5px 20rpx;
  406. display: flex;
  407. align-items: center;
  408. color: #c1c1cc;
  409. .item-value {
  410. padding: 20rpx;
  411. position: absolute;
  412. display: flex;
  413. align-items: center;
  414. width: 80%;
  415. .content {
  416. width: 51%;
  417. .title {
  418. font-size: 32rpx;
  419. font-family: Microsoft YaHei;
  420. font-weight: 400;
  421. }
  422. .tip {
  423. font-size: 24rpx;
  424. font-family: Microsoft YaHei;
  425. font-weight: 400;
  426. }
  427. }
  428. }
  429. .icon-tip {
  430. width: 100rpx;
  431. height: 100rpx;
  432. }
  433. .content {
  434. margin-left: 40rpx;
  435. }
  436. }
  437. .ul-item {
  438. padding: 5px 20rpx;
  439. display: flex;
  440. align-items: center;
  441. color: white;
  442. .item-value {
  443. padding: 20rpx;
  444. position: absolute;
  445. display: flex;
  446. align-items: center;
  447. width: 80%;
  448. .content {
  449. width: 51%;
  450. .title {
  451. font-size: 32rpx;
  452. font-family: Microsoft YaHei;
  453. font-weight: 400;
  454. }
  455. .tip {
  456. font-size: 24rpx;
  457. font-family: Microsoft YaHei;
  458. font-weight: 400;
  459. }
  460. }
  461. }
  462. .icon-tip {
  463. width: 100rpx;
  464. height: 100rpx;
  465. }
  466. .content {
  467. margin-left: 40rpx;
  468. }
  469. }
  470. ::v-deep .u-mode-center-box {
  471. border-radius: 10rpx;
  472. }
  473. .squire {
  474. padding: 30rpx 30rpx 50rpx 50rpx;
  475. }
  476. .mask-close {
  477. text-align: right;
  478. }
  479. .icon-closed {
  480. width: 48rpx;
  481. height: 48rpx;
  482. }
  483. .mask-title {
  484. text-align: center;
  485. font-size: 32rpx;
  486. color: $uni-text-color-black;
  487. margin-bottom: 50rpx;
  488. }
  489. .icon-closed {
  490. width: 40rpx;
  491. height: 40rpx;
  492. }
  493. .bgImgs {
  494. background-image: var(--bgimg);
  495. background-repeat: no-repeat;
  496. background-size: 100% 100%;
  497. }
  498. .con {
  499. .con-item {
  500. padding: 20rpx 0;
  501. box-sizing: border-box;
  502. width: 630rpx;
  503. // height: 198rpx;
  504. margin: 30rpx auto 0;
  505. }
  506. .item-header {
  507. display: flex;
  508. align-items: center;
  509. justify-content: space-between;
  510. .l-txt {
  511. margin-left: 30rpx;
  512. font-family: SourceHanSansCN, SourceHanSansCN;
  513. font-weight: bold;
  514. font-size: 26rpx;
  515. color: #FFF9EE;
  516. }
  517. .r-tip {
  518. width: 150rpx;
  519. height: 50rpx;
  520. font-family: SourceHanSansCN, SourceHanSansCN;
  521. font-size: 22rpx;
  522. color: #BF6229;
  523. text-align: center;
  524. line-height: 46rpx;
  525. position: relative;
  526. left: 10rpx;
  527. }
  528. }
  529. .b-txt {
  530. margin-top: 10rpx;
  531. display: flex;
  532. align-items: center;
  533. padding: 0 20rpx;
  534. .l-money {
  535. font-family: MicrosoftYaHei;
  536. font-size: 28rpx;
  537. color: #FFFFFF;
  538. .fee {
  539. margin-left: 5rpx;
  540. font-size: 92rpx;
  541. }
  542. }
  543. .c-line {
  544. margin: 0 18rpx 0 30rpx;
  545. background: #FFF9EE;
  546. height: 70rpx;
  547. width: 1rpx;
  548. }
  549. .r-desc {
  550. font-family: SourceHanSansCN, SourceHanSansCN;
  551. font-size: 26rpx;
  552. color: #FFF0D0;
  553. }
  554. }
  555. }
  556. </style>