changeStoreDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <template>
  2. <view class="content">
  3. <view class="topView">
  4. <!-- 待处理 -->
  5. <view class="waitBg" v-if="state>0">
  6. <view class="title">请等待平台处理</view>
  7. <!-- 进度条 -->
  8. <view class="progress">
  9. <image :src="(state>0 ? tongguoUrl : waitUrl)" class="waitImg" :class="{tongguoImg:state>0}">
  10. </image>
  11. <view class="line" :class="{lightLine:state>0}"></view>
  12. <image :src="(state>1 ? tongguoUrl : waitUrl)" class="waitImg" :class="{tongguoImg:state>1}">
  13. </image>
  14. <view class="line" :class="{lightLine:state>1}"></view>
  15. <image :src="(state>2 ? tongguoUrl : waitUrl)" class="waitImg" :class="{tongguoImg:state>2}">
  16. </image>
  17. </view>
  18. <!-- 进度条 文字提示 -->
  19. <view class="progressT">
  20. <view class="progressTitle">提交申请</view>
  21. <view style="width: 9%;"></view>
  22. <view class="progressTitle">平台审核</view>
  23. <view style="width: 9%;"></view>
  24. <view class="progressTitle">平台同意更换</view>
  25. </view>
  26. <view class="progressT">
  27. <view class="time" v-if="state>0">{{detailData.createTime.slice(0,detailData.createTime.length-3)}}</view>
  28. <view style="width: 7%;"></view>
  29. <view class="time" v-if="state>1">{{detailData.handlerTime.slice(0,detailData.handlerTime.length-3)}}</view>
  30. <view style="width: 8%;"></view>
  31. <view class="time" v-if="state>2">{{detailData.handlerTime.slice(0,detailData.handlerTime.length-3)}}</view>
  32. </view>
  33. </view>
  34. <!-- 更换关闭 -->
  35. <view class="waitBg" v-if="state==0" style="height: 100rpx;">
  36. <view class="title">更换关闭</view>
  37. <view class="title3">{{detailData.handlerTime}}</view>
  38. </view>
  39. <!-- 平台拒绝 -->
  40. <view class="waitBg" v-if="state==-1" style="height: 100rpx;">
  41. <view class="title">平台已拒绝</view>
  42. <view class="title3">{{detailData.handlerTime}}</view>
  43. </view>
  44. </view>
  45. <!-- 更换提交 -->
  46. <view class="whiteView" v-if="state==1">
  47. <view class="title1">您已成功发起更换门店申请,请耐心等待平台处理</view>
  48. <view class="title2">平台同意后,系统将自动更新门店信息</view>
  49. <view class="title3">如果平台拒绝,您可以修改更换申请后再次发起,平台会重新处理</view>
  50. </view>
  51. <!-- 更换关闭 -->
  52. <view class="whiteView" v-if="state==0">
  53. <view class="title1">您已撤销本次退款申请,如有问题仍未解决,您可以重新发起申请</view>
  54. </view>
  55. <!-- 平台拒绝 -->
  56. <view class="whiteView" v-if="state==-1">
  57. <view class="title1">平台拒绝原因:这是选择的原因</view>
  58. <view class="title2">您可以修改更换申请后再次发起,平台会重新处理</view>
  59. </view>
  60. <!-- 同意申请 -->
  61. <view class="tongyiView" v-if="state!=1" @click="goSchedule()">
  62. <view class="title1">进度详情</view>
  63. <image src="../../static/img/rightArrow.png" mode="" style="width: 14rpx; height: 23rpx;"></image>
  64. </view>
  65. <view class="whiteView">
  66. <view class="storeTitle">更换前门店信息</view>
  67. <view class="store">
  68. <image src="../../static/img/icon_state_gray.png" mode="" class="leftIcon"></image>
  69. <view class="name">{{detailData.oldShopName}}</view>
  70. </view>
  71. <view class="store">
  72. <image src="../../static/img/icon_coordinate.png" mode="" class="leftIcon2"></image>
  73. <view class="address" v-if="detailData.oldShopAddress">{{detailData.oldShopAddress}}</view>
  74. </view>
  75. </view>
  76. <view class="whiteView">
  77. <view class="storeTitle">更换后门店信息</view>
  78. <view class="store">
  79. <image src="../../static/img/icon_state_gray.png" mode="" class="leftIcon"></image>
  80. <view class="name">{{detailData.newShopName}}</view>
  81. </view>
  82. <view class="store">
  83. <image src="../../static/img/icon_coordinate.png" mode="" class="leftIcon2"></image>
  84. <view class="address" v-if="detailData.newShopAddress">{{detailData.newShopAddress}}</view>
  85. </view>
  86. </view>
  87. <!-- 订单信息 -->
  88. <view class="whiteView">
  89. <view class="informationLine">
  90. <view class="informationTxt">更换原因:</view>
  91. <view class="informationNum">{{detailData.applyReason}}</view>
  92. </view>
  93. <view class="informationLine">
  94. <view class="informationTxt">申请时间:</view>
  95. <view class="informationNum">{{detailData.createTime}}</view>
  96. </view>
  97. <view class="informationLine">
  98. <view class="informationTxt">补充描述:</view>
  99. <view class="informationNum" style="width: 80%;" v-if="detailData.applyReasonComment!=null">
  100. {{detailData.applyReasonComment}}</view>
  101. </view>
  102. <view class="informationLine">
  103. <view class="informationTxt">申请单号:</view>
  104. <view class="informationNum">{{detailData.changeCode}}</view>
  105. <view class="copyBtn" @click="copy(detailData.changeCode)">复制</view>
  106. </view>
  107. <view class="informationLine">
  108. <view class="informationTxt">订单单号:</view>
  109. <view class="informationNum">{{detailData.sheetCode}}</view>
  110. <view class="copyBtn" @click="copy(detailData.sheetCode)">复制</view>
  111. <view style="color: #3F90F7; font-size: 26rpx; margin-left: 50rpx;" @click="goOrderDetail()">详情</view>
  112. </view>
  113. </view>
  114. <!-- 底部按钮 操作 -->
  115. <view style="height: 150rpx;"></view>
  116. <view class="orderBottom" v-if="state==1">
  117. <view class="cancelBtn" @click="cancelBtn">撤销申请</view>
  118. <view class="cancelBtn" @click="editBtn">修改申请</view>
  119. </view>
  120. </view>
  121. </template>
  122. <script>
  123. export default {
  124. data() {
  125. return {
  126. state: -1, // -1 拒绝 0自己撤销关闭 1 提交申请 3 同意申请
  127. tongguoUrl: '../../static/img/icon_tongguo.png',
  128. waitUrl: '../../static/img/icon_yuan.png',
  129. id: '',
  130. detailData: '',
  131. }
  132. },
  133. onLoad(opt) {
  134. this.id = opt.id
  135. this.getData();
  136. },
  137. onShow() {
  138. this.getData();
  139. },
  140. methods: {
  141. goSchedule(){
  142. uni.navigateTo({
  143. url: 'changeSchedule?id=' + this.detailData.id
  144. })
  145. },
  146. goOrderDetail() {
  147. uni.navigateTo({
  148. url: '../order/orderDetail?id=' + this.detailData.sheetID
  149. })
  150. },
  151. getData() {
  152. uni.showLoading({
  153. title: '加载中'
  154. })
  155. let url = '/worldKeepCar/orderChangeShop/changeDetail',
  156. params = {
  157. id: this.id,
  158. }
  159. this.$http(url, params, 'GET').then(res => {
  160. uni.hideLoading();
  161. this.detailData = res.data
  162. // 更换状态
  163. // "changeState": 备注:处理状态1待处理2更换成功3更换关闭
  164. if (this.detailData.changeState == 1) {
  165. // 平台处理
  166. this.state = 1;
  167. } else if (this.detailData.changeState == 2) {
  168. // 平台同意
  169. this.state = 3;
  170. }
  171. if (this.detailData.handlerReasonID != null) {
  172. // 拒绝
  173. this.state = -1;
  174. }
  175. if (this.detailData.cancelType == 1) {
  176. // 关闭
  177. this.state = 0;
  178. }
  179. })
  180. },
  181. copy(txt) {
  182. uni.setClipboardData({
  183. data: txt,
  184. success: function() {
  185. uni.showToast({
  186. title: '复制成功',
  187. icon: 'none',
  188. duration: 2000
  189. });
  190. }
  191. });
  192. },
  193. cancelBtn(){
  194. uni.showLoading({
  195. title: '加载中'
  196. })
  197. let url = 'worldKeepCar/orderChangeShop/cancelApply',
  198. params = {
  199. id: this.detailData.id,
  200. }
  201. this.$http(url, params, 'POST').then(res => {
  202. uni.hideLoading();
  203. if(res.code==0){
  204. uni.showToast({
  205. title: '撤销成功',
  206. icon: 'none',
  207. duration: 2000,
  208. });
  209. setTimeout(function() {
  210. uni.navigateBack({
  211. })
  212. }, 2000);
  213. }
  214. })
  215. },
  216. editBtn(){
  217. uni.navigateTo({
  218. url:'changeStore?edit=true'+'&editId='+this.detailData.id+'&oldShopID='+this.detailData.oldShopID+'&oldStoreName='+this.detailData.oldShopName+'&oldStoreAddress='+this.detailData.oldShopAddress+'&store='+this.detailData.newShopName+'&storeId='+this.detailData.newShopID+'&reasonId='+this.detailData.applyReasonID+'&reason='+this.detailData.applyReason+'&exeContent='+this.detailData.applyReasonComment+'&brand='+this.detailData.brand
  219. })
  220. }
  221. },
  222. onPullDownRefresh() {
  223. this.getData()
  224. setTimeout(function() {
  225. uni.stopPullDownRefresh();
  226. }, 1000);
  227. },
  228. }
  229. </script>
  230. <style>
  231. .content {
  232. background-color: #F4F5F7;
  233. min-height: 100vh;
  234. }
  235. .topView {
  236. background: linear-gradient(315deg, #FD5002 0%, #FE8F00 100%);
  237. padding: 20rpx 24rpx;
  238. }
  239. .waitBg {
  240. background-color: #FFFFFF;
  241. border-radius: 20rpx;
  242. height: 209rpx;
  243. padding: 30rpx;
  244. }
  245. .title {
  246. color: #333333;
  247. font-size: 32rpx;
  248. font-weight: bold;
  249. margin-bottom: 30rpx;
  250. }
  251. .progress {
  252. display: flex;
  253. align-items: center;
  254. padding: 10rpx 70rpx;
  255. }
  256. .waitImg {
  257. width: 20rpx;
  258. height: 20rpx;
  259. }
  260. .tongguoImg {
  261. width: 38rpx;
  262. height: 38rpx;
  263. }
  264. .line {
  265. width: 40%;
  266. margin: 0rpx 5rpx;
  267. height: 2px;
  268. background: #FF2400;
  269. opacity: 0.4;
  270. }
  271. .lightLine {
  272. width: 40%;
  273. margin: 0rpx 5rpx;
  274. height: 2px;
  275. background: #FF2400;
  276. opacity: 1.0;
  277. }
  278. .progressT {
  279. display: flex;
  280. align-items: center;
  281. }
  282. .progressTitle {
  283. color: #333333;
  284. font-size: 22rpx;
  285. text-align: center;
  286. width: 30%;
  287. }
  288. .time {
  289. color: #999999;
  290. font-size: 22rpx;
  291. text-align: center;
  292. }
  293. .whiteView {
  294. background-color: #FFFFFF;
  295. padding: 30rpx 24rpx;
  296. margin: 20rpx 0;
  297. }
  298. .title1 {
  299. color: #3C3C3C;
  300. font-size: 30rpx;
  301. font-weight: bold;
  302. }
  303. .title2 {
  304. color: #999999;
  305. font-size: 24rpx;
  306. padding-top: 16rpx;
  307. padding-bottom: 8rpx;
  308. }
  309. .title3 {
  310. color: #999999;
  311. font-size: 24rpx;
  312. }
  313. .storeTitle {
  314. color: #3C3C3C;
  315. font-size: 30rpx;
  316. font-weight: bold;
  317. border-bottom: 1rpx #EEEEEE solid;
  318. padding-bottom: 22rpx;
  319. }
  320. .store {
  321. display: flex;
  322. padding-top: 20rpx;
  323. align-items: center;
  324. }
  325. .leftIcon {
  326. width: 30rpx;
  327. height: 30rpx;
  328. margin-right: 10rpx;
  329. }
  330. .leftIcon2 {
  331. width: 22rpx;
  332. height: 29rpx;
  333. margin-left: 5rpx;
  334. margin-right: 15rpx;
  335. }
  336. .name {
  337. color: #3C3C3C;
  338. font-size: 26rpx;
  339. }
  340. .address {
  341. color: #999999;
  342. font-size: 26rpx;
  343. }
  344. .informationLine {
  345. display: flex;
  346. font-size: 26rpx;
  347. padding: 20rpx 0;
  348. }
  349. .informationTxt {
  350. color: #666666;
  351. }
  352. .informationNum {
  353. color: #333333;
  354. }
  355. .copyBtn {
  356. width: 86rpx;
  357. height: 40rpx;
  358. background: #F4F5F7;
  359. border-radius: 20rpx;
  360. font-size: 24rpx;
  361. color: #333333;
  362. text-align: center;
  363. line-height: 40rpx;
  364. margin-left: 20rpx;
  365. }
  366. .orderBottom {
  367. width: 750rpx;
  368. height: 98rpx;
  369. background: #FFFFFF;
  370. position: fixed;
  371. left: 0;
  372. bottom: 0;
  373. display: flex;
  374. justify-content: flex-end;
  375. }
  376. .cancelBtn {
  377. width: 150rpx;
  378. height: 56rpx;
  379. border-radius: 36rpx;
  380. border: 2rpx solid #DDDDDD;
  381. text-align: center;
  382. line-height: 56rpx;
  383. font-size: 28rpx;
  384. color: #3C3C3C;
  385. margin-top: 21rpx;
  386. margin-right: 16rpx;
  387. margin-left: 20rpx;
  388. }
  389. .tongyiView {
  390. display: flex;
  391. justify-content: space-between;
  392. align-items: center;
  393. background-color: #FFFFFF;
  394. padding: 30rpx 24rpx;
  395. margin: 20rpx 0;
  396. }
  397. </style>