afterSalesDetailExpress.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <view class="mp-iphonex-bottom content">
  3. <u-form :model="form" ref="uForm">
  4. <view class="after-sales-goods-detail-view">
  5. <view class="header">
  6. <view>
  7. 本次售后服务将由
  8. <text class="seller-name">{{ sku.storeName }}</text>
  9. 为您提供
  10. </view>
  11. </view>
  12. <view>
  13. <view class="goods-item-view" @click="gotoGoodsDetail(sku.skuId)">
  14. <view class="goods-img">
  15. <u-image border-radius="6" width="131rpx" height="131rpx" :src="sku.image"></u-image>
  16. </view>
  17. <view class="goods-info">
  18. <view class="goods-title u-line-2">{{ sku.name }}</view>
  19. <view class="goods-price">
  20. <span>¥{{ sku.price | unitPrice }}</span>
  21. <span class="num">购买数量: {{ sku.num }} </span>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <scroll-view scroll-y>
  28. <!-- 上传凭证 -->
  29. <view class="opt-view">
  30. <view class="img-title" style="font-size: 30rpx">填写物流信息</view>
  31. <u-form-item label="返回方式" :label-width="150">
  32. <u-input type="text" input-align="right" value="快递至第三方卖家" />
  33. </u-form-item>
  34. <u-form-item label="快递公司" :label-width="150">
  35. <u-input v-model="form.courierCompany" type="select" input-align="right" :select-open="companySelectShow" @click="companySelectShow = true" placeholder="请选择快递公司" />
  36. </u-form-item>
  37. <u-form-item label="快递单号" :label-width="150">
  38. <u-input input-align="right" v-model="form.logisticsNo" placeholder="请输入快递单号" />
  39. </u-form-item>
  40. <u-form-item label="发货时间" :label-width="150">
  41. <u-input input-align="right" type="selects" disabled v-model="form.mDeliverTime" @click="timeshow = true" placeholder="请选择发货时间" />
  42. </u-form-item>
  43. </view>
  44. </scroll-view>
  45. <view class="submit-view">
  46. <u-button ripple :customStyle="{'background':$lightColor,'color':'#fff' }" shape="circle" @click="onSubmit">提交申请</u-button>
  47. </view>
  48. </u-form>
  49. <u-select mode="single-column" :list="companyList" v-model="companySelectShow" @confirm="companySelectConfirm"></u-select>
  50. <u-calendar v-model="timeshow" :mode="'date'" @change="onTimeChange"></u-calendar>
  51. <u-toast ref="uToast" />
  52. </view>
  53. </template>
  54. <script>
  55. import { getLogistics } from "@/api/address.js";
  56. import { fillShipInfo } from "@/api/after-sale.js";
  57. export default {
  58. data() {
  59. return {
  60. //快递公司 弹出框
  61. companySelectShow: false,
  62. companyList: [], //快递公司集合
  63. timeshow: false, //发货时间
  64. form: {
  65. courierCompany: "", //快递公司
  66. logisticsId: "", //快递公司ID
  67. logisticsNo: "", //快递单号
  68. mDeliverTime: "", //发货时间
  69. },
  70. serviceDetail: {}, //服务详情
  71. sku: {}, //sku信息
  72. };
  73. },
  74. onLoad(options) {
  75. this.sku = JSON.parse(decodeURIComponent(options.sku));
  76. let navTitle = "服务单详情";
  77. uni.setNavigationBarTitle({
  78. title: navTitle, //此处写页面的title
  79. });
  80. this.serviceDetail.sn = options.serviceSn;
  81. this.Logistics();
  82. },
  83. methods: {
  84. /**
  85. * 确认快递公司
  86. */
  87. companySelectConfirm(e) {
  88. this.form.logisticsId = e[0].value;
  89. this.form.courierCompany = e[0].label;
  90. },
  91. /**
  92. * 获取快递公司
  93. */
  94. Logistics() {
  95. getLogistics().then((res) => {
  96. if (res.data.success) {
  97. res.data.result.forEach((item, index) => {
  98. this.companyList[index] = {
  99. value: item.id,
  100. label: item.name,
  101. };
  102. });
  103. }
  104. });
  105. },
  106. /**
  107. * 更改时间
  108. */
  109. onTimeChange(e) {
  110. this.form.mDeliverTime = e.result;
  111. },
  112. /**
  113. * 点击提交
  114. */
  115. onSubmit() {
  116. uni.showLoading({
  117. title: "加载中",
  118. mask: true,
  119. });
  120. delete this.form.courierCompany;
  121. fillShipInfo(this.serviceDetail.sn, this.form).then((res) => {
  122. uni.hideLoading();
  123. if (res.statusCode === 200) {
  124. this.$refs.uToast.show({
  125. title: "提交成功",
  126. type: "success",
  127. back: true,
  128. url: "/pages/order/afterSales/afterSales",
  129. });
  130. }
  131. });
  132. },
  133. },
  134. };
  135. </script>
  136. <style lang="scss" scoped>
  137. page,
  138. .content {
  139. background: $page-color-base;
  140. height: 100%;
  141. }
  142. .mp-iphonex-bottom {
  143. overflow: hidden;
  144. }
  145. .after-sales-goods-detail-view {
  146. background-color: #fff;
  147. padding: 10rpx 0rpx;
  148. .header {
  149. background-color: #f7f7f7;
  150. color: #999999;
  151. font-size: 22rpx;
  152. display: flex;
  153. flex-direction: row;
  154. align-items: center;
  155. justify-content: center;
  156. line-height: 70rpx;
  157. .header-text {
  158. background-color: #999999;
  159. padding: 10rpx 30rpx;
  160. border-radius: 50rpx;
  161. }
  162. .seller-name {
  163. color: $main-color;
  164. }
  165. }
  166. .goods-item-view {
  167. display: flex;
  168. flex-direction: row;
  169. padding: 20rpx 30rpx;
  170. background-color: #eef1f2;
  171. .goods-info {
  172. padding-left: 30rpx;
  173. flex: 1;
  174. .goods-title {
  175. margin-bottom: 10rpx;
  176. color: $font-color-dark;
  177. }
  178. .goods-specs {
  179. font-size: 24rpx;
  180. margin-bottom: 10rpx;
  181. color: #cccccc;
  182. }
  183. .goods-price {
  184. display: flex;
  185. flex-direction: row;
  186. justify-content: space-between;
  187. font-size: 28rpx;
  188. margin-bottom: 10rpx;
  189. color: $light-color;
  190. .num {
  191. font-size: 24rpx;
  192. color: #999999;
  193. }
  194. }
  195. }
  196. .goods-num {
  197. width: 60rpx;
  198. color: $main-color;
  199. }
  200. }
  201. }
  202. .opt-view {
  203. background-color: #fff;
  204. padding: 40rpx 30rpx 0rpx 30rpx;
  205. font-size: 26rpx;
  206. .how-view {
  207. display: flex;
  208. flex-direction: row;
  209. align-items: center;
  210. justify-content: space-between;
  211. height: 80rpx;
  212. border-bottom: 1px solid $page-color-base;
  213. }
  214. .explain-view {
  215. display: flex;
  216. flex-direction: row;
  217. align-items: center;
  218. height: 150rpx;
  219. }
  220. .img-title {
  221. height: 80rpx;
  222. display: flex;
  223. flex-direction: row;
  224. align-items: center;
  225. }
  226. .images-view {
  227. padding: 20rpx;
  228. display: flex;
  229. flex-direction: row;
  230. align-items: center;
  231. flex-wrap: wrap;
  232. }
  233. }
  234. .submit-view {
  235. position: fixed;
  236. z-index: 999;
  237. bottom: 10px;
  238. left: 0px;
  239. margin-top: 100rpx;
  240. height: 100rpx;
  241. width: 750rpx;
  242. align-items: center;
  243. padding: 0rpx 20rpx;
  244. color: #fff;
  245. }
  246. </style>