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.

mailing_information.vue 14KB

vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 1 Jahr
vor 2 Jahren
vor 1 Jahr
vor 2 Jahren
vor 1 Jahr
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 1 Jahr
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
vor 1 Jahr
vor 2 Jahren
vor 2 Jahren
vor 2 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <template>
  2. <!-- <navBar title="补办ETC卡"></navBar>
  3. -->
  4. <view class="oderPage">
  5. <view class="addr-box">
  6. <view class="addr-box-left">
  7. <view class="text-image">{{form.customerName.charAt(0)}} </view>
  8. <view class="content">
  9. <view class="">
  10. <text class="item1">{{form.customerName}}</text>
  11. <text class="item2">{{form.customerTel}}</text>
  12. <text class="item3" v-if="form.defaultAddress ==1">默认</text>
  13. </view>
  14. <view class=""> {{form.area +form.address}}</view>
  15. </view>
  16. </view>
  17. <view class="edit" @click="address.show = true">
  18. <image :src="`${$imgUrl}applyCard/edit.png`" mode=""></image>
  19. </view>
  20. </view>
  21. <u-form ref="myForm">
  22. <view class="from">
  23. <u-form-item prop="cardState">
  24. <view class="from_item">
  25. <text><text style="color: red">*</text>是否寄回设备:</text>
  26. <radio-group @change="sendChange" class="radios">
  27. <block v-for="(item, index) in radiolist1" :key="item.val">
  28. <view class="radio-box">
  29. <radio :value="item.val" :checked="form.sendStatus == item.val" color="#13e7c1"
  30. style="transform:scale(0.75)" />
  31. <view>{{item.name}}</view>
  32. </view>
  33. </block>
  34. </radio-group>
  35. </view>
  36. </u-form-item>
  37. <view class="from_item" v-if="form.sendStatusName == '寄回'" @click="showPicker">
  38. <text style="font-size: 28rpx;"><text style="color: red">*</text>退货物流公司:</text>
  39. <view style="display: flex;align-items: center;font-size: 28rpx;">
  40. <u-input v-model="form.courierCompany" class="input" @click="showPicker"
  41. :placeholder="form.courierCompany?form.courierCompany:'请选择'" style="text-align: right;"
  42. disabled />
  43. <u-icon name="arrow-right" style="margin-left: 10px"></u-icon>
  44. </view>
  45. </view>
  46. <!-- </u-form-item> -->
  47. <u-form-item prop="returnNum" v-if="form.sendStatusName == '寄回'">
  48. <view class="from_item">
  49. <text><text style="color: red"></text>退货单号:</text>
  50. <u-input v-model="form.courierOrderId" class="input" />
  51. </view>
  52. </u-form-item>
  53. <u-form-item prop="cardState">
  54. <view class="from_item">
  55. <text><text style="color: red">*</text>收货方式:</text>
  56. <radio-group @change="receiveChange" class="radios">
  57. <block v-for="(item, index) in radiolist2" :key="item.val">
  58. <view class="radio-box">
  59. <radio :value="item.val" :checked="form.receiveMethod == item.val" color="#13e7c1"
  60. style="transform:scale(0.75)" />
  61. <view>{{item.name}}</view>
  62. </view>
  63. </block>
  64. </radio-group>
  65. </view>
  66. </u-form-item>
  67. </view>
  68. </u-form>
  69. <!-- 物流弹窗 -->
  70. <view>
  71. <!-- 物流 -->
  72. <u-select v-model="show" mode="single-column" :list="list" @confirm="confirm"></u-select>
  73. </view>
  74. <button class="submit" @click="submit">下一步</button>
  75. </view>
  76. <!-- 地址弹窗 -->
  77. <u-popup mode="bottom" v-model="address.show">
  78. <view class="address-line">
  79. <view v-if="address.list" v-for="(item, index) in address.list" :key="index" @click="addressSelected(item)"
  80. style="margin-bottom: 40rpx" class="flex-bettwen">
  81. <view class="flex">
  82. <view class="xing">
  83. {{ item.consignee.charAt(0) }}
  84. </view>
  85. <view class="content">
  86. <view class="flex">
  87. <view class="name">
  88. {{ item.consignee }}
  89. </view>
  90. <view class="phone">
  91. {{ item.consigneeTel }}
  92. </view>
  93. </view>
  94. <view class="address">
  95. {{ item.region + item.address }}
  96. </view>
  97. </view>
  98. </view>
  99. <view @click.stop="editAddress(item)" style="margin-left: 80rpx" class="picture">
  100. <image :showLoading="true" :src="`${$imgUrl}applyCard/edit.png`"
  101. style="width: 48rpx; height: 48rpx"></image>
  102. </view>
  103. </view>
  104. <view :style="address.list ? 'margin-top: 60rpx;' : ''" class="action-bottom">
  105. <button type="default" class="button" @click="goToAddAddress()">
  106. 添加收货地址
  107. </button>
  108. </view>
  109. </view>
  110. </u-popup>
  111. </template>
  112. <script setup lang="ts">
  113. // import navBar from "../ETCcancellation/components/nav-bar.vue";
  114. import {
  115. reactive,
  116. ref
  117. } from "vue";
  118. import {
  119. onLoad,
  120. onShow,
  121. onReady
  122. } from "@dcloudio/uni-app";
  123. import {
  124. navTo,
  125. checkStr, msg
  126. } from "@/utils/utils";
  127. import {
  128. request
  129. } from "@/utils/network/request.js";
  130. import {
  131. getLogistics,
  132. addressQuery,
  133. cckChangejzCardInfo
  134. } from "@/utils/network/api.js";
  135. import {
  136. stringToJson
  137. } from "@/utils/network/encryption.js";
  138. import {
  139. getItem,
  140. StorageKeys
  141. } from "@/utils/storage";
  142. import {
  143. wechatPayConfigId,
  144. } from "@/utils/network/api";
  145. const list = reactive([]); //物流数据
  146. const address = reactive({
  147. list: [],
  148. show: false
  149. }); //地址list
  150. const form = reactive({
  151. customerName: '',
  152. customerTel: '',
  153. address: '',
  154. area: '',
  155. sendStatusName: '寄回',
  156. sendStatus: '1', //0 --- 不邮寄 1 --- 邮寄
  157. courierCompany: '',
  158. courierOrderId: '',
  159. receiveMethod: '1',
  160. postCode: '',
  161. receiveMethodName: '邮寄',//0 --- 不邮寄 1 --- 邮寄
  162. defaultAddress: 2
  163. });
  164. //入参
  165. const params = reactive({
  166. orderId: '',
  167. applyId: '',
  168. productId: "",
  169. equityId: "",
  170. totalAmount: ""
  171. });
  172. // 单选数据列表
  173. const radiolist1 = reactive([{
  174. name: "寄回",
  175. val: "1",
  176. },
  177. // {
  178. // name: "不寄回",
  179. // val: "0",
  180. // },
  181. ]);
  182. const radiolist2 = reactive([{
  183. name: "邮寄",
  184. val: "1",
  185. },
  186. // {
  187. // name: "不邮寄",
  188. // val: "0",
  189. // },
  190. ]);
  191. let show = ref(false);
  192. const goToAddAddress = () => {
  193. uni.navigateTo({
  194. url: "/subpackage/orders/addAddress",
  195. });
  196. };
  197. const editAddress = (val) => {
  198. uni.navigateTo({
  199. url: `/subpackage/orders/editAddress?content=` + JSON.stringify(val),
  200. });
  201. };
  202. const addressSelected = (val : any) => {
  203. console.log(val);
  204. form.customerName = val.consignee
  205. form.customerTel = val.consigneeTel
  206. form.address = val.address
  207. form.area = val.region
  208. form.postCode = val.postalCode
  209. form.defaultAddress = val.defaultAddress
  210. address.show = false
  211. };
  212. // 寄回单选
  213. const sendChange = (e : any) => {
  214. console.log(e);
  215. form.sendStatus = e.detail.value
  216. };
  217. // 邮寄单选
  218. const receiveChange = (e : any) => {
  219. console.log(e);
  220. form.receiveMethod = e.detail.value
  221. };
  222. // 打开物流先择器
  223. const showPicker = function () {
  224. show.value = true;
  225. };
  226. const confirm = (e) => {
  227. form.courierCompany = e[0].value;
  228. console.log(e[0].value);
  229. };
  230. onLoad((option) => {
  231. console.log("option", option)
  232. params.orderId = option.orderId
  233. params.applyId = option.applyId
  234. params.productId = option.productId
  235. params.totalAmount = option.totalAmount
  236. params.equityId = option.equityId
  237. });
  238. onShow(() => {
  239. getAddressList();
  240. getexpresslist();
  241. })
  242. const getexpresslist = () => {
  243. //参数说明
  244. let options = {
  245. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  246. data: {
  247. // opId: getItem("openId"),
  248. // source: "WECHAT",
  249. // tabIndex: "0",
  250. }, //请求参数
  251. method: "POST", //提交方式(默认POST)
  252. showLoading: true, //是否显示加载中(默认显示)
  253. };
  254. //调用方式
  255. request(getLogistics, options)
  256. .then((res) => {
  257. stringToJson(res.bizContent).forEach((item) => {
  258. list.push({
  259. value: item,
  260. label: item,
  261. });
  262. });
  263. })
  264. .catch((err) => {
  265. console.log(err);
  266. });
  267. };
  268. const getAddressList = () => {
  269. var data = {
  270. openId: getItem(StorageKeys.OpenId),
  271. };
  272. const options = {
  273. type: 2,
  274. data: data,
  275. method: "POST",
  276. showLoading: true,
  277. };
  278. request(addressQuery, options).then((res) => {
  279. const data = stringToJson(res.bizContent);
  280. address.list = data.data;
  281. if (address.list.length > 0) {
  282. var defaultAddress = address.list[0]
  283. form.customerName = defaultAddress.consignee
  284. form.customerTel = defaultAddress.consigneeTel
  285. form.address = defaultAddress.address
  286. form.area = defaultAddress.region
  287. form.postCode = defaultAddress.postalCode
  288. form.defaultAddress = defaultAddress.defaultAddress
  289. }
  290. });
  291. };
  292. const submit = () => {
  293. queryCckChangejzCardInfo().then(val => {
  294. console.log(val)
  295. navTo(
  296. `/subpackage/after-sale/to-bookkeeping-card/result`
  297. )
  298. })
  299. };
  300. const queryCckChangejzCardInfo = () => {
  301. if (!form.address) {
  302. msg("请编辑收货详细地址");
  303. return;
  304. }
  305. var data = {
  306. applyId: params.applyId,
  307. orderId: params.orderId,
  308. productId: params.productId,
  309. sendStatus: form.sendStatus,
  310. configId: wechatPayConfigId,
  311. courierCompany: form.courierCompany,
  312. courierOrderId: form.courierOrderId,
  313. receiveMethod: form.receiveMethod,
  314. customerName: form.customerName,
  315. customerTel: form.customerTel,
  316. address: form.address,
  317. area: form.area,
  318. postCode: form.postCode,
  319. totalAmount: params.totalAmount,
  320. equityId: params.equityId
  321. };
  322. const options = {
  323. type: 2,
  324. data: data,
  325. method: "POST",
  326. showLoading: true,
  327. };
  328. return new Promise(async (resolve, reject) => {
  329. const res = await request(cckChangejzCardInfo, options);
  330. const data = stringToJson(res.bizContent);
  331. resolve(data);
  332. }).catch((error) => {
  333. reject(error);
  334. });
  335. }
  336. </script>
  337. <style>
  338. page {
  339. width: 100%;
  340. height: 100%;
  341. display: flex;
  342. flex-direction: column;
  343. background-color: #f3f3f3;
  344. }
  345. </style>
  346. <style lang="scss" scoped>
  347. .radios {
  348. display: flex;
  349. }
  350. .radio-box {
  351. display: flex;
  352. align-items: center;
  353. padding-left: 20rpx;
  354. }
  355. .oderPage {
  356. flex: 1;
  357. width: 100%;
  358. .addr-box {
  359. margin-top: 20rpx;
  360. display: flex;
  361. background: #fff;
  362. padding: 30rpx;
  363. justify-content: space-between;
  364. align-items: center;
  365. .addr-box-left {
  366. display: flex;
  367. .text-image {
  368. width: 68rpx;
  369. height: 68rpx;
  370. background: #00b38b;
  371. border-radius: 50%;
  372. text-align: center;
  373. font-size: 26rpx;
  374. font-family: Microsoft YaHei;
  375. font-weight: 400;
  376. color: #ffffff;
  377. line-height: 68rpx;
  378. margin-right: 30rpx;
  379. }
  380. .content {
  381. view {
  382. font-size: 26rpx;
  383. font-family: Microsoft YaHei;
  384. font-weight: 400;
  385. color: #333333;
  386. .item1 {
  387. font-size: 30rpx;
  388. font-family: Microsoft YaHei;
  389. font-weight: 400;
  390. color: #333333;
  391. }
  392. .item2 {
  393. font-size: 24rpx;
  394. font-family: Microsoft YaHei;
  395. font-weight: 400;
  396. color: #999999;
  397. margin-left: 10rpx;
  398. }
  399. .item3 {
  400. width: 71rpx;
  401. height: 37rpx;
  402. background: #ffffff;
  403. border: 1px solid #ff8000;
  404. border-radius: 6rpx;
  405. font-size: 22rpx;
  406. font-family: Microsoft YaHei;
  407. font-weight: 400;
  408. color: #ff8000;
  409. padding: 3rpx 6rpx;
  410. margin-left: 10rpx;
  411. }
  412. }
  413. }
  414. }
  415. .edit {
  416. image {
  417. width: 50rpx;
  418. height: 50rpx;
  419. }
  420. }
  421. }
  422. .from {
  423. background-color: #fff;
  424. margin-top: 30rpx;
  425. padding: 0 30rpx;
  426. ::v-deep .u-form-item {
  427. padding: 0;
  428. line-height: normal;
  429. .u-form-item__message {
  430. margin-bottom: 12rpx;
  431. }
  432. }
  433. .from_item {
  434. display: flex;
  435. flex-wrap: nowrap;
  436. justify-content: space-between;
  437. align-items: center;
  438. height: 80rpx;
  439. border-bottom: 1rpx solid #dcdcdc;
  440. .btn {
  441. font-size: 24rpx;
  442. font-family: Microsoft YaHei;
  443. font-weight: 400;
  444. color: #ffffff;
  445. background: #00b38b;
  446. border-radius: 10rpx;
  447. padding: 10rpx 15rpx;
  448. }
  449. ::v-deep .input {
  450. text-align: right;
  451. flex: 1;
  452. input {
  453. text-align: right;
  454. }
  455. }
  456. }
  457. .from_item1 {
  458. display: flex;
  459. flex-wrap: nowrap;
  460. flex-direction: column;
  461. justify-content: space-between;
  462. padding: 30rpx 0;
  463. border-bottom: #dcdcdc 1px solid;
  464. input {
  465. text-align: right;
  466. }
  467. .textarea {
  468. background-color: #f1f1f1;
  469. width: 100%;
  470. border-radius: 20rpx;
  471. margin-top: 10rpx;
  472. text-indent: 1rem;
  473. height: 180rpx;
  474. padding: 20rpx;
  475. box-sizing: border-box;
  476. }
  477. }
  478. }
  479. }
  480. .address-line {
  481. padding: 20px;
  482. .flex-bettwen {
  483. display: flex;
  484. align-items: center;
  485. justify-content: space-between;
  486. }
  487. .xing {
  488. width: 68rpx;
  489. height: 68rpx;
  490. background: rgba(0, 179, 139, 0.2);
  491. border-radius: 50%;
  492. font-size: 26rpx;
  493. font-weight: 400;
  494. color: #00b38b;
  495. line-height: 68rpx;
  496. text-align: center;
  497. }
  498. .content {
  499. margin-left: 20px;
  500. .name {
  501. font-size: 30rpx;
  502. font-family: Microsoft YaHei;
  503. font-weight: 500;
  504. color: #333333;
  505. }
  506. .phone {
  507. margin-left: 10rpx;
  508. font-size: 24rpx;
  509. font-family: Microsoft YaHei;
  510. font-weight: 400;
  511. color: #999999;
  512. line-height: 36rpx;
  513. }
  514. .address {
  515. margin-top: 10rpx;
  516. font-size: 26rpx;
  517. font-family: Microsoft YaHei;
  518. font-weight: 400;
  519. color: #333333;
  520. line-height: 36rpx;
  521. }
  522. .picture {
  523. width: 48rpx;
  524. height: 48rpx;
  525. }
  526. .editIcon {
  527. width: 48rpx;
  528. height: 48rpx;
  529. }
  530. }
  531. }
  532. .action {
  533. padding-bottom: 100rpx;
  534. .button {
  535. height: 80rpx;
  536. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  537. border-radius: 40rpx;
  538. font-size: 32rpx;
  539. font-weight: 400;
  540. color: #ffffff;
  541. line-height: 80rpx;
  542. }
  543. }
  544. .action-bottom {
  545. padding-bottom: 30rpx;
  546. .button {
  547. height: 80rpx;
  548. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  549. border-radius: 40rpx;
  550. font-size: 32rpx;
  551. font-weight: 400;
  552. color: #ffffff;
  553. line-height: 80rpx;
  554. }
  555. }
  556. .flex {
  557. display: flex;
  558. align-items: center;
  559. }
  560. .submit {
  561. width: 670rpx;
  562. height: 80rpx;
  563. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  564. box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
  565. border-radius: 40rpx;
  566. font-size: 32rpx;
  567. font-family: Microsoft YaHei;
  568. font-weight: 400;
  569. color: #ffffff;
  570. line-height: 80rpx;
  571. margin-top: 60rpx;
  572. }
  573. </style>