多租户商城-商户小程序端

571 lines
11 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <!-- 退货/退款填写物流信息 -->
  2. <template>
  3. <view>
  4. <global-loading />
  5. <view class="content">
  6. <view class="afterSale-select-box mt20">
  7. <view class="item" @click="openWaySelect">
  8. <view class="l">物流公司</view>
  9. <view class="r-box">
  10. <text>{{SendReturnQuery.logisticsName}}</text>
  11. <image src="http://36.138.125.206:8081/ceres-local-file/static/images/arrowRight.png" class="r"></image>
  12. </view>
  13. </view>
  14. <view class="item item-start">
  15. <view class="l">物流编号</view>
  16. <view class="r-box r-box2">
  17. <input v-model="SendReturnQuery.logisticsNum" maxlength="20" type="text" placeholder-class="fs28" placeholder="请填写" class="r-box-input"></input>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="afterSale-select-box mt20">
  22. <view class="item item-start">
  23. <view class="l">退款说明</view>
  24. <view class="r-box r-box2">
  25. <input v-model="SendReturnQuery.returnGoodsDesc" maxlength="200" type="text" placeholder-class="fs28" placeholder="选填" class="r-box-input"></input>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="afterSale-select-box mt20">
  30. <view class="upload-title">上传凭证</view>
  31. <view class="mar-left-10 mar-top-10 evaluateImg">
  32. <u-upload :limitType="['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']" :action="action" ref="uUpload" :header="headerToken" :form-data="formData"></u-upload>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="order-confirm-box">
  37. <text class="btn" @click="subimtTap">提交</text>
  38. </view>
  39. <!-- 物流公司 -->
  40. <view >
  41. <lb-picker @confirm='change' ref="picker" :list="companyList">
  42. </lb-picker>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. const NET = require('../../utils/request')
  48. const API = require('../../config/api')
  49. import LbPicker from '@/components/lb-picker'
  50. export default {
  51. components:{
  52. LbPicker
  53. },
  54. data() {
  55. return {
  56. item: {},
  57. shippinglist: [],
  58. shippingCompanyNamelist:[],
  59. shippingCompanyName:'',
  60. shippingitem:'',
  61. SendReturnQuery: {
  62. "goodsReturnId": 0,
  63. "logisticsId": 0,
  64. "logisticsName": "",
  65. "logisticsNum": "",
  66. "returnGoodsDesc": "",
  67. "returnImgs": "",
  68. "shipperCode": ""
  69. },
  70. commentImgsFlag:false,
  71. commentImgs:'',
  72. action:API.UploadUrl,
  73. formData:{'folderId': -1},
  74. headerToken:{Authorization:''},
  75. fileList:[],
  76. companyList:[]
  77. }
  78. },
  79. onLoad(options) {
  80. this.item = uni.getStorageSync('itemLogistics')
  81. const res = uni.getStorageSync('storage_key');
  82. this.headerToken.Authorization = res.token
  83. this.getShippingCompany()
  84. uni.removeStorageSync('itemLogistics')
  85. },
  86. onReady() {
  87. this.fileList = this.$refs.uUpload.lists
  88. },
  89. methods: {
  90. getShippingCompany() {
  91. NET.request(API.ShippingCompany,{},"GET").then(res => {
  92. this.shippinglist = res.data
  93. this.shippinglist.forEach(el => {
  94. this.companyList.push({label:el.dictName,value:el.dictId,id:el.dictId})
  95. })
  96. })
  97. },
  98. subimtTap() {
  99. if(this.fileList.length>0){
  100. this.commentImgsFlag = true
  101. for(let i=0;i<this.fileList.length;i++){
  102. this.commentImgs += this.fileList[i].response.data.url+','
  103. }
  104. }
  105. this.getSendReturnGoods()
  106. },
  107. getSendReturnGoods() {
  108. // uni.showLoading({
  109. // mask: true,
  110. // url:'物流信息提交中...'
  111. // })
  112. NET.request(API.SendReturnGoods, {
  113. orderId: this.item.orderId,
  114. afterId: this.item.afterId,
  115. express: this.SendReturnQuery.logisticsId,
  116. deliverFormid: this.SendReturnQuery.logisticsNum,
  117. reason: this.SendReturnQuery.returnGoodsDesc,
  118. image:this.commentImgs
  119. }, 'POST').then(res => {
  120. uni.hideLoading()
  121. if(res.code == 200){
  122. uni.showToast({
  123. title:'提交成功',
  124. icon:'success'
  125. })
  126. uni.navigateTo({
  127. url:'../../pages_category_page2/orderModule/afterSale'
  128. })
  129. }
  130. }).catch(res => {
  131. uni.hideLoading()
  132. })
  133. },
  134. openWaySelect() {
  135. this.$refs.picker.show()
  136. },
  137. change(e){
  138. this.SendReturnQuery.logisticsId = e.item.id
  139. this.SendReturnQuery.logisticsName = e.item.label
  140. this.SendReturnQuery.shipperCode = e.item.value
  141. }
  142. }
  143. }
  144. </script>
  145. <style>
  146. page {
  147. background-color: #F7F7F7;
  148. }
  149. .content {
  150. padding: 0 0 120upx;
  151. box-sizing: border-box;
  152. }
  153. .order-list-box {
  154. padding: 20upx 30upx;
  155. box-sizing: border-box;
  156. }
  157. .order-list-box .item {
  158. /* margin-bottom: 20upx; */
  159. background: #fff;
  160. border-radius: 10upx;
  161. }
  162. .order-list-top {
  163. height: 96upx;
  164. padding: 0 30upx;
  165. box-sizing: border-box;
  166. display: flex;
  167. flex-direction: row;
  168. align-items: center;
  169. justify-content: space-between;
  170. border-bottom: 1px solid #eee;
  171. }
  172. .top-l {
  173. display: flex;
  174. flex-direction: row;
  175. align-items: center;
  176. }
  177. .shop-img {
  178. width: 36upx;
  179. height: 36upx;
  180. margin-right: 10upx;
  181. }
  182. .shop-name {
  183. font-size: 30upx;
  184. color: #333;
  185. font-weight: bold;
  186. }
  187. .arrow-img {
  188. margin-left: 15upx;
  189. width: 24upx;
  190. height: 24upx;
  191. }
  192. .order-status {
  193. font-size: 28upx;
  194. color: #ff7911;
  195. font-weight: 500;
  196. }
  197. .order-info-box {
  198. padding: 0 30upx;
  199. box-sizing: border-box;
  200. }
  201. .order-info {
  202. /* border-bottom: 1px solid #eee; */
  203. }
  204. .order-info-item {
  205. display: flex;
  206. flex-direction: row;
  207. padding: 20upx 0;
  208. border-bottom: solid 1px #eee;
  209. }
  210. .order-info-item:last-child {
  211. border-bottom: none;
  212. }
  213. .product-img {
  214. width: 180upx;
  215. height: 180upx;
  216. border-radius: 10upx;
  217. margin-right: 30upx;
  218. }
  219. .info-box {
  220. flex: 1;
  221. display: flex;
  222. flex-direction: column;
  223. }
  224. .product-name {
  225. font-size: 26upx;
  226. color: #333;
  227. height: 68upx;
  228. line-height: 34upx;
  229. display: -webkit-box;
  230. overflow: hidden;
  231. text-overflow: ellipsis;
  232. word-break: break-all;
  233. -webkit-box-orient: vertical;
  234. -webkit-line-clamp: 2;
  235. }
  236. .price-sku-box {
  237. display: flex;
  238. flex-direction: row;
  239. justify-content: space-between;
  240. }
  241. .product-sku {
  242. font-size: 24upx;
  243. color: #999;
  244. margin-top: 30upx;
  245. }
  246. .product-price {
  247. font-size: 28upx;
  248. color: #333;
  249. font-weight: 400;
  250. }
  251. .product-price .fuhao {
  252. font-size: 28upx;
  253. }
  254. .product-num {
  255. font-size: 28upx;
  256. color: #999;
  257. }
  258. .afterSale-select-box {
  259. width: 100%;
  260. background: #fff;
  261. padding: 0 30upx;
  262. box-sizing: border-box;
  263. }
  264. .afterSale-select-box .item {
  265. height: 100upx;
  266. border-bottom: 1px solid #e5e5e5;
  267. display: flex;
  268. flex-direction: row;
  269. align-items: center;
  270. justify-content: space-between;
  271. font-size: 28upx;
  272. color: #333;
  273. }
  274. .afterSale-select-box .item:last-of-type {
  275. border-bottom: none;
  276. }
  277. .afterSale-select-box .item.item-start {
  278. justify-content: flex-start;
  279. }
  280. .afterSale-select-box .item .l {
  281. display: flex;
  282. flex-direction: row;
  283. align-items: center;
  284. }
  285. .afterSale-select-box .item .afterSale-img {
  286. width: 26upx;
  287. height: 26upx;
  288. margin-right: 20upx;
  289. }
  290. .afterSale-select-box .item .r-box {
  291. display: flex;
  292. flex-direction: row;
  293. align-items: center;
  294. color: #999;
  295. }
  296. .afterSale-select-box .item .r-box2 {
  297. width: 100%;
  298. flex: 1;
  299. }
  300. .afterSale-select-box .item .r {
  301. width: 24upx;
  302. height: 24upx;
  303. margin-left: 10upx;
  304. }
  305. .afterSale-select-box .line {
  306. border-bottom: 1px solid #e5e5e5;
  307. }
  308. .mt20 {
  309. margin-top: 20upx;
  310. }
  311. .r-box-input {
  312. text-align: left;
  313. flex: 1;
  314. z-index: 0;
  315. }
  316. .upload-title {
  317. font-size: 28upx;
  318. color: #333;
  319. padding: 30upx 0;
  320. }
  321. .upload-img-box {
  322. display: flex;
  323. flex-direction: row;
  324. flex-wrap: wrap;
  325. padding: 0 0 30upx;
  326. align-items: flex-start;
  327. }
  328. .upload-img-box .single {
  329. display: flex;
  330. flex-direction: row;
  331. align-items: flex-end;
  332. }
  333. .upload-img-box .upload-img-item-box {
  334. position: relative;
  335. }
  336. .upload-img-box .upload-img-item {
  337. width: 150upx;
  338. height: 150upx;
  339. border-radius: 8upx;
  340. margin: 0 50upx 30upx 0;
  341. }
  342. .upload-img-box .upload-img-item:nth-of-type(3n) {
  343. margin-right: 0;
  344. }
  345. .upload-img-box .afterSale-close-img {
  346. position: absolute;
  347. top: -20upx;
  348. left: 110upx;
  349. width: 50upx;
  350. height: 50upx;
  351. border: 5upx solid #fff;
  352. border-radius: 50%;
  353. }
  354. .upload-img-box .single .jiahao {
  355. font-size: 70upx;
  356. color: #999;
  357. font-weight: 100;
  358. }
  359. .upload-img-box .single .upload-word {
  360. font-size: 24upx;
  361. color: #999;
  362. }
  363. .upload-img-box .single-kuang {
  364. width: 150upx;
  365. height: 150upx;
  366. background: #f5f5f5;
  367. border-radius: 8upx;
  368. display: flex;
  369. flex-direction: column;
  370. align-items: center;
  371. }
  372. .upload-img-box .single-num {
  373. margin-left: 10upx;
  374. font-size: 24upx;
  375. color: #999;
  376. }
  377. .order-flow-box {
  378. display: flex;
  379. flex-direction: column;
  380. padding: 30upx;
  381. box-sizing: border-box;
  382. }
  383. .flow-word {
  384. font-size: 24upx;
  385. color: #999;
  386. display: flex;
  387. flex-direction: column;
  388. }
  389. .mt25 {
  390. margin-top: 20upx;
  391. }
  392. .mt50 {
  393. margin-top: 30upx;
  394. margin-bottom: 20upx;
  395. }
  396. .order-confirm-box {
  397. position: fixed;
  398. bottom: 0;
  399. left: 0;
  400. width: 100%;
  401. height: 120upx;
  402. background: #fff;
  403. box-shadow: 0px 0px 10px 0px rgba(87, 69, 9, 0.3);
  404. padding: 0 30upx;
  405. box-sizing: border-box;
  406. display: flex;
  407. flex-direction: row;
  408. align-items: center;
  409. justify-content: center;
  410. }
  411. .order-confirm-box .btn {
  412. width: 100%;
  413. height: 80upx;
  414. line-height: 80upx;
  415. background: #333333;
  416. font-size: 28upx;
  417. color: #F5DEB2;
  418. text-align: center;
  419. }
  420. .alert-box {
  421. width: 100%;
  422. height: 100%;
  423. background: rgba(0, 0, 0, 0.5);
  424. position: fixed;
  425. top: 0;
  426. left: 0;
  427. }
  428. .afterSale-status-box {
  429. width: 100%;
  430. background: #fff;
  431. border-radius: 15upx 15upx 0 0;
  432. position: fixed;
  433. bottom: 0;
  434. left: 0;
  435. }
  436. .status-title {
  437. width: 100%;
  438. height: 140upx;
  439. background: #fff;
  440. border-radius: 15upx 15upx 0 0;
  441. font-size: 34upx;
  442. color: #333;
  443. text-align: center;
  444. line-height: 140upx;
  445. position: fixed;
  446. left: 0;
  447. }
  448. .afterSale-status-box .item {
  449. display: flex;
  450. flex-direction: row;
  451. align-items: center;
  452. justify-content: space-between;
  453. border-bottom: 1px solid #e5e5e5;
  454. }
  455. .afterSale-status-box .item:last-of-type {
  456. border-bottom: none;
  457. }
  458. .afterSale-status-box .item-box {
  459. padding: 140upx 0;
  460. }
  461. .afterSale-status-box .status-select-title {
  462. padding: 0 0 0 30upx;
  463. box-sizing: border-box;
  464. font-size: 28upx;
  465. color: #333;
  466. }
  467. .afterSale-status-box .status-select-img {
  468. width: 104upx;
  469. height: 100upx;
  470. padding: 28upx 30upx;
  471. box-sizing: border-box;
  472. }
  473. .afterSale-status-box .status-btn {
  474. width: 100%;
  475. height: 100upx;
  476. line-height: 100upx;
  477. background: #ff7911;
  478. font-size: 28upx;
  479. color: #fff;
  480. text-align: center;
  481. position: fixed;
  482. bottom: 0;
  483. left: 0;
  484. }
  485. </style>
  486. <style scoped>
  487. .evaluateImg /deep/ .u-upload .u-list-item {
  488. background: none;
  489. border: 2rpx solid #E4E5E6;
  490. border-radius: 0;
  491. margin-bottom: 20rpx;
  492. }
  493. .evaluateImg /deep/ .u-upload .u-list-item .uicon-plus:before {
  494. content: '';
  495. height: 71rpx;
  496. width: 71rpx;
  497. background: url("http://36.138.125.206:8081/ceres-local-file/static/images/addImg.png") no-repeat center center;
  498. display: block;
  499. background-size: contain;
  500. }
  501. </style>