changeStoreDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  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="$noMultipleClicks(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. noClick:true,
  132. }
  133. },
  134. onLoad(opt) {
  135. this.id = opt.id
  136. this.getData();
  137. },
  138. onShow() {
  139. this.getData();
  140. },
  141. methods: {
  142. goSchedule(){
  143. uni.navigateTo({
  144. url: 'changeSchedule?id=' + this.detailData.id
  145. })
  146. },
  147. goOrderDetail() {
  148. uni.navigateTo({
  149. url: '../order/orderDetail?id=' + this.detailData.sheetID
  150. })
  151. },
  152. getData() {
  153. uni.showLoading({
  154. title: '加载中'
  155. })
  156. let url = '/worldKeepCar/orderChangeShop/changeDetail',
  157. params = {
  158. id: this.id,
  159. }
  160. this.$http(url, params, 'GET').then(res => {
  161. uni.hideLoading();
  162. this.detailData = res.data
  163. // 更换状态
  164. // "changeState": 备注:处理状态1待处理2更换成功3更换关闭
  165. if (this.detailData.changeState == 1) {
  166. // 平台处理
  167. this.state = 1;
  168. } else if (this.detailData.changeState == 2) {
  169. // 平台同意
  170. this.state = 3;
  171. }
  172. if (this.detailData.handlerReasonID != null) {
  173. // 拒绝
  174. this.state = -1;
  175. }
  176. if (this.detailData.cancelType == 1) {
  177. // 关闭
  178. this.state = 0;
  179. }
  180. })
  181. },
  182. copy(txt) {
  183. uni.setClipboardData({
  184. data: txt,
  185. success: function() {
  186. uni.showToast({
  187. title: '复制成功',
  188. icon: 'none',
  189. duration: 2000
  190. });
  191. }
  192. });
  193. },
  194. cancelBtn(){
  195. var that = this
  196. uni.showLoading({
  197. title: '加载中'
  198. })
  199. let url = 'worldKeepCar/orderChangeShop/cancelApply',
  200. params = {
  201. id: this.detailData.id,
  202. }
  203. this.$http(url, params, 'POST').then(res => {
  204. uni.hideLoading();
  205. if(res.code==0){
  206. that.getData()
  207. uni.showToast({
  208. title: '撤销成功',
  209. icon: 'none',
  210. duration: 2000,
  211. });
  212. }
  213. })
  214. },
  215. editBtn(){
  216. uni.navigateTo({
  217. 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
  218. })
  219. }
  220. },
  221. onPullDownRefresh() {
  222. this.getData()
  223. setTimeout(function() {
  224. uni.stopPullDownRefresh();
  225. }, 1000);
  226. },
  227. }
  228. </script>
  229. <style>
  230. .content {
  231. background-color: #F4F5F7;
  232. min-height: 100vh;
  233. }
  234. .topView {
  235. background: linear-gradient(315deg, #FD5002 0%, #FE8F00 100%);
  236. padding: 20rpx 24rpx;
  237. }
  238. .waitBg {
  239. background-color: #FFFFFF;
  240. border-radius: 20rpx;
  241. height: 209rpx;
  242. padding: 30rpx;
  243. }
  244. .title {
  245. color: #333333;
  246. font-size: 32rpx;
  247. font-weight: bold;
  248. margin-bottom: 30rpx;
  249. }
  250. .progress {
  251. display: flex;
  252. align-items: center;
  253. padding: 10rpx 70rpx;
  254. }
  255. .waitImg {
  256. width: 20rpx;
  257. height: 20rpx;
  258. }
  259. .tongguoImg {
  260. width: 38rpx;
  261. height: 38rpx;
  262. }
  263. .line {
  264. width: 40%;
  265. margin: 0rpx 5rpx;
  266. height: 2px;
  267. background: #FF2400;
  268. opacity: 0.4;
  269. }
  270. .lightLine {
  271. width: 40%;
  272. margin: 0rpx 5rpx;
  273. height: 2px;
  274. background: #FF2400;
  275. opacity: 1.0;
  276. }
  277. .progressT {
  278. display: flex;
  279. align-items: center;
  280. }
  281. .progressTitle {
  282. color: #333333;
  283. font-size: 22rpx;
  284. text-align: center;
  285. width: 30%;
  286. }
  287. .time {
  288. color: #999999;
  289. font-size: 22rpx;
  290. text-align: center;
  291. }
  292. .whiteView {
  293. background-color: #FFFFFF;
  294. padding: 30rpx 24rpx;
  295. margin: 20rpx 0;
  296. }
  297. .title1 {
  298. color: #3C3C3C;
  299. font-size: 30rpx;
  300. font-weight: bold;
  301. }
  302. .title2 {
  303. color: #999999;
  304. font-size: 24rpx;
  305. padding-top: 16rpx;
  306. padding-bottom: 8rpx;
  307. }
  308. .title3 {
  309. color: #999999;
  310. font-size: 24rpx;
  311. }
  312. .storeTitle {
  313. color: #3C3C3C;
  314. font-size: 30rpx;
  315. font-weight: bold;
  316. border-bottom: 1rpx #EEEEEE solid;
  317. padding-bottom: 22rpx;
  318. }
  319. .store {
  320. display: flex;
  321. padding-top: 20rpx;
  322. align-items: center;
  323. }
  324. .leftIcon {
  325. width: 30rpx;
  326. height: 30rpx;
  327. margin-right: 10rpx;
  328. }
  329. .leftIcon2 {
  330. width: 22rpx;
  331. height: 29rpx;
  332. margin-left: 5rpx;
  333. margin-right: 15rpx;
  334. }
  335. .name {
  336. color: #3C3C3C;
  337. font-size: 26rpx;
  338. }
  339. .address {
  340. color: #999999;
  341. font-size: 26rpx;
  342. }
  343. .informationLine {
  344. display: flex;
  345. font-size: 26rpx;
  346. padding: 20rpx 0;
  347. }
  348. .informationTxt {
  349. color: #666666;
  350. }
  351. .informationNum {
  352. color: #333333;
  353. }
  354. .copyBtn {
  355. width: 86rpx;
  356. height: 40rpx;
  357. background: #F4F5F7;
  358. border-radius: 20rpx;
  359. font-size: 24rpx;
  360. color: #333333;
  361. text-align: center;
  362. line-height: 40rpx;
  363. margin-left: 20rpx;
  364. }
  365. .orderBottom {
  366. width: 750rpx;
  367. height: 98rpx;
  368. background: #FFFFFF;
  369. position: fixed;
  370. left: 0;
  371. bottom: 0;
  372. display: flex;
  373. justify-content: flex-end;
  374. }
  375. .cancelBtn {
  376. width: 150rpx;
  377. height: 56rpx;
  378. border-radius: 36rpx;
  379. border: 2rpx solid #DDDDDD;
  380. text-align: center;
  381. line-height: 56rpx;
  382. font-size: 28rpx;
  383. color: #3C3C3C;
  384. margin-top: 21rpx;
  385. margin-right: 16rpx;
  386. margin-left: 20rpx;
  387. }
  388. .tongyiView {
  389. display: flex;
  390. justify-content: space-between;
  391. align-items: center;
  392. background-color: #FFFFFF;
  393. padding: 30rpx 24rpx;
  394. margin: 20rpx 0;
  395. }
  396. </style>