index.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <!-- 退货/退款填写物流信息 -->
  2. <template>
  3. <view class="add-logistics-container">
  4. <JHeader title="填写退货物流" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  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. <tui-icon name="arrowright" :size="24" unit="upx" color="#999999" margin="0 0 0 10upx"></tui-icon>
  12. </view>
  13. </view>
  14. <view class="item item-start">
  15. <view class="l">物流编号:</view>
  16. <view class="r-box r-box2">
  17. <input
  18. v-model="SendReturnQuery.logisticsNum" maxlength="20" type="text" placeholder-class="fs28"
  19. placeholder="请填写" class="r-box-input"
  20. ></input>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="afterSale-select-box mt20">
  25. <view class="item item-start">
  26. <view class="l">退款说明:</view>
  27. <view class="r-box r-box2">
  28. <input
  29. v-model="SendReturnQuery.returnGoodsDesc" maxlength="200" type="text" placeholder-class="fs28"
  30. placeholder="选填" class="r-box-input"
  31. ></input>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="afterSale-select-box mt20">
  36. <view class="upload-title">上传凭证</view>
  37. <view class="mar-left-10 mar-top-10 evaluateImg">
  38. <ATFMoreUpload :imgs="fileList" @upload="handleSaveImg" @delete="handleDeleteImg"></ATFMoreUpload>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="order-confirm-box">
  43. <text class="btn" @click="subimtTap">提交</text>
  44. </view>
  45. <!-- 物流公司 -->
  46. <view>
  47. <tui-picker
  48. :show="logisticsTagShowFalg" :picker-data="companyList" @hide="logisticsTagShowFalg = false"
  49. @change="change"
  50. >
  51. </tui-picker>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import { getExpressSelectShippingCompanyApi, updateSendGoodsReturnExpressApi } from '../../../api/anotherTFInterface'
  57. export default {
  58. name: 'AddLogistics',
  59. data() {
  60. return {
  61. item: {},
  62. shippinglist: [],
  63. shippingCompanyNamelist: [],
  64. shippingCompanyName: '',
  65. shippingitem: '',
  66. SendReturnQuery: {
  67. 'goodsReturnId': 0,
  68. 'logisticsId': 0,
  69. 'logisticsName': '',
  70. 'logisticsNum': '',
  71. 'returnGoodsDesc': '',
  72. 'returnImgs': '',
  73. 'shipperCode': ''
  74. },
  75. commentImgs: '',
  76. fileList: [],
  77. companyList: [],
  78. logisticsTagShowFalg: false
  79. }
  80. },
  81. onLoad(options) {
  82. this.item = {
  83. orderId: options.orderId,
  84. afterId: options.afterId
  85. }
  86. this.getShippingCompany()
  87. },
  88. methods: {
  89. getShippingCompany() {
  90. getExpressSelectShippingCompanyApi({}).then((res) => {
  91. this.shippinglist = res.data
  92. this.shippinglist.forEach((el) => {
  93. this.companyList.push({ text: el.dictName, value: String(el.dictId) })
  94. })
  95. })
  96. },
  97. handleSaveImg(imgUrl) {
  98. this.fileList.push(imgUrl)
  99. this.$forceUpdate()
  100. },
  101. handleDeleteImg(imgUrl) {
  102. this.fileList.splice(this.fileList.findIndex((item) => item === imgUrl), 1)
  103. this.$forceUpdate()
  104. },
  105. subimtTap() {
  106. if (this.fileList.length > 0) {
  107. for (let i = 0; i < this.fileList.length; i++) {
  108. this.commentImgs += this.fileList[i] + ','
  109. }
  110. }
  111. this.getSendReturnGoods()
  112. },
  113. getSendReturnGoods() {
  114. uni.showLoading({
  115. mask: true,
  116. url: '物流信息提交中...'
  117. })
  118. updateSendGoodsReturnExpressApi({
  119. orderId: this.item.orderId,
  120. afterId: this.item.afterId,
  121. express: this.SendReturnQuery.logisticsId,
  122. deliverFormid: this.SendReturnQuery.logisticsNum,
  123. reason: this.SendReturnQuery.returnGoodsDesc,
  124. image: this.commentImgs
  125. }).then((res) => {
  126. uni.hideLoading()
  127. if (res.code == 200) {
  128. uni.showToast({
  129. title: '提交成功',
  130. icon: 'success'
  131. })
  132. uni.navigateTo({
  133. url: `/another-tf/another-serve/afterSale/index`
  134. })
  135. }
  136. })
  137. .catch((e) => {
  138. uni.hideLoading()
  139. })
  140. },
  141. openWaySelect() {
  142. this.logisticsTagShowFalg = true
  143. },
  144. change(e) {
  145. this.SendReturnQuery.logisticsId = this.SendReturnQuery.shipperCode = e.value
  146. this.SendReturnQuery.logisticsName = e.text
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="less" scoped>
  152. .add-logistics-container {
  153. background-color: #F7F7F7;
  154. min-height: 100vh;
  155. box-sizing: border-box;
  156. }
  157. .content {
  158. padding: 0 0 120upx;
  159. box-sizing: border-box;
  160. }
  161. .afterSale-select-box {
  162. width: 100%;
  163. background: #fff;
  164. padding: 0 30upx;
  165. box-sizing: border-box;
  166. }
  167. .afterSale-select-box .item {
  168. height: 100upx;
  169. border-bottom: 1px solid #e5e5e5;
  170. display: flex;
  171. flex-direction: row;
  172. align-items: center;
  173. justify-content: space-between;
  174. font-size: 28upx;
  175. color: #333;
  176. }
  177. .afterSale-select-box .item:last-of-type {
  178. border-bottom: none;
  179. }
  180. .afterSale-select-box .item.item-start {
  181. justify-content: flex-start;
  182. }
  183. .afterSale-select-box .item .l {
  184. display: flex;
  185. flex-direction: row;
  186. align-items: center;
  187. }
  188. .afterSale-select-box .item .r-box {
  189. display: flex;
  190. flex-direction: row;
  191. align-items: center;
  192. color: #999;
  193. }
  194. .afterSale-select-box .item .r-box2 {
  195. width: 100%;
  196. flex: 1;
  197. }
  198. .mt20 {
  199. margin-top: 20upx;
  200. }
  201. .r-box-input {
  202. text-align: left;
  203. flex: 1;
  204. z-index: 0;
  205. }
  206. .upload-title {
  207. font-size: 28upx;
  208. color: #333;
  209. padding: 30upx 0;
  210. }
  211. .order-confirm-box {
  212. position: fixed;
  213. bottom: 0;
  214. left: 0;
  215. width: 100%;
  216. height: 120upx;
  217. background: #fff;
  218. box-shadow: 0px 0px 10px 0px rgba(87, 69, 9, 0.3);
  219. padding: 0 30upx;
  220. box-sizing: border-box;
  221. display: flex;
  222. flex-direction: row;
  223. align-items: center;
  224. justify-content: center;
  225. }
  226. .order-confirm-box .btn {
  227. width: 100%;
  228. height: 80upx;
  229. line-height: 80upx;
  230. background: #333333;
  231. font-size: 28upx;
  232. color: #F5DEB2;
  233. text-align: center;
  234. }
  235. </style>