status2.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <view class="content">
  3. <view class="shopContent flex">
  4. <view class="shoplogo">
  5. <image class="logo" :src="reportDeatil.store.image" mode="scaleToFill"></image>
  6. </view>
  7. <view class="shopDetail">
  8. <view class="shopName clamp">
  9. {{reportDeatil.store.name}}
  10. </view>
  11. <view class="shopDetailText clamp2" v-if="reportDeatil.processor_uid==0">
  12. {{reportDeatil.store.detailed_address}}
  13. </view>
  14. <view class="shopDetailText" v-if="reportDeatil.processor_uid!=0">
  15. <view>
  16. 已安排:{{reportDeatil.processor_user.staff_name}}
  17. </view>
  18. <!-- <view>
  19. 预计{{detail.time}}小时到达维修地点
  20. </view> -->
  21. </view>
  22. </view>
  23. <view class="buttomShop" @click="payShopPhonw">
  24. 联系商家
  25. </view>
  26. </view>
  27. <view class="listBox">
  28. <view class="list">
  29. <view class="flex listItem">
  30. <view class="flex titleBox">
  31. <text class="title">当前车辆</text>
  32. </view>
  33. <view class="right flex">
  34. {{cartInfo.car_name}}
  35. </view>
  36. </view>
  37. <view class="flex listItem">
  38. <view class="flex titleBox">
  39. <text class="title">维修单号</text>
  40. </view>
  41. <view class="right flex">
  42. {{reportDeatil.order_id}}
  43. </view>
  44. </view>
  45. <view class="flex listItem">
  46. <view class="flex titleBox">
  47. <text class="title">维修地点</text>
  48. </view>
  49. <view class="right flex">
  50. {{reportDeatil.address}}
  51. </view>
  52. </view>
  53. <!-- <view class="flex listItem">
  54. <view class="flex titleBox">
  55. <text class="title">联系电话</text>
  56. </view>
  57. <view class="right flex" @click="edit">
  58. <text class="margin-r-10">
  59. {{reportDeatil.phone}}
  60. </text>
  61. <image class="img" src="../../../static/icon/addressIcon1.png" mode="widthFix"></image>
  62. </view>
  63. </view> -->
  64. <view class="flex listItem">
  65. <view class="flex titleBox">
  66. <text class="title">申报时间</text>
  67. </view>
  68. <view class="right flex">
  69. {{reportDeatil.add_time}}
  70. </view>
  71. </view>
  72. <view class="flex listItem">
  73. <view class="flex titleBox">
  74. <text class="title">故障简述</text>
  75. </view>
  76. <view class="right flex">
  77. {{reportDeatil.content}}
  78. </view>
  79. </view>
  80. <view class="listItem" v-if="imglist.length>0">
  81. <view class="flex titleBox">
  82. <text class="title">已传图片</text>
  83. </view>
  84. <view class="right flex imgList">
  85. <view v-if="" class="position-relative margin-r-20" v-for="(item,index) in imglist">
  86. <image class="upImg" :src="item" mode="scaleToFill"></image>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="base-buttom" @click="outBxiu">
  93. 撤销报修
  94. </view>
  95. <uni-popup ref="popup" type="dialog">
  96. <uni-popup-dialog mode="input" title="请输入修改手机号" @confirm="editPhone">
  97. </uni-popup-dialog>
  98. </uni-popup>
  99. </view>
  100. </template>
  101. <script>
  102. import {
  103. cancel_question
  104. } from '@/api/user.js';
  105. export default {
  106. props: {
  107. cartInfo: {
  108. type: Object,
  109. default: function() {
  110. return {}
  111. }
  112. },
  113. reportDeatil: {
  114. type: Object,
  115. default: function() {
  116. return {}
  117. }
  118. }
  119. },
  120. computed: {
  121. imglist() {
  122. return this.reportDeatil.images.split(',')
  123. }
  124. },
  125. data() {
  126. return {};
  127. },
  128. created() {
  129. // console.log('调用方法2');
  130. },
  131. methods: {
  132. // 撤销报修
  133. outBxiu() {
  134. uni.showModal({
  135. title: '提示',
  136. content: '是否撤销报修?',
  137. success: res => {
  138. if (res.confirm) {
  139. uni.showLoading({
  140. title: '提交中...',
  141. mask: true
  142. });
  143. cancel_question({
  144. id: this.reportDeatil.id
  145. }).then((e) => {
  146. uni.hideLoading()
  147. uni.showModal({
  148. title: '提示',
  149. content: '撤销成功',
  150. showCancel: false,
  151. success: res => {
  152. uni.navigateBack()
  153. },
  154. });
  155. }).catch((e) => {
  156. uni.hideLoading()
  157. })
  158. }
  159. },
  160. });
  161. },
  162. // 打开修改弹窗
  163. edit() {
  164. this.$refs.popup.open();
  165. },
  166. editPhone(e) {
  167. console.log(e, '修改手机号');
  168. },
  169. payShopPhonw() {
  170. uni.makePhoneCall({
  171. phoneNumber: this.reportDeatil.store.phone //仅为示例
  172. });
  173. }
  174. }
  175. }
  176. </script>
  177. <style lang="scss">
  178. .content{
  179. padding-bottom: 30rpx;
  180. }
  181. .base-buttom{
  182. margin-top: 30rpx;
  183. }
  184. .base-buttom {
  185. color: $color-red;
  186. border: 1px solid $color-red;
  187. background-color: $page-color-base;
  188. }
  189. .shopContent {
  190. background-color: #FFFFFF;
  191. border-radius: 20rpx;
  192. height: 160rpx;
  193. padding: 20rpx;
  194. margin: 0 $page-row-spacing;
  195. margin-bottom: 20rpx;
  196. .buttomShop {
  197. border-radius: 99rpx;
  198. border: 1px solid $color-green;
  199. color: $color-green;
  200. font-size: 24rpx;
  201. padding: 20rpx 50rpx;
  202. line-height: 1;
  203. flex-shrink: 0;
  204. }
  205. .shoplogo {
  206. flex-shrink: 0;
  207. background-color: $font-color-white;
  208. width: 120rpx;
  209. height: 120rpx;
  210. border-radius: 20rpx;
  211. .logo {
  212. height: 100%;
  213. width: 100%;
  214. border-radius: 20rpx;
  215. }
  216. }
  217. .shopDetail {
  218. padding-left: 30rpx;
  219. flex-grow: 1;
  220. .shopName {
  221. line-height: 1;
  222. margin-bottom: 15rpx;
  223. font-size: 28rpx;
  224. color: $font-base;
  225. }
  226. .shopDetailText {
  227. font-size: 22rpx;
  228. color: $font-color-light;
  229. }
  230. }
  231. }
  232. .listBox {
  233. margin: $page-row-spacing;
  234. margin-top: 30rpx;
  235. border-radius: 20rpx;
  236. overflow: hidden;
  237. background-color: #FFFFFF;
  238. }
  239. .list {
  240. .input {
  241. text-align: right;
  242. font-size: $font-base;
  243. color: $color-gray;
  244. width: 100%;
  245. }
  246. .listItem {
  247. padding: 35rpx 40rpx;
  248. border-bottom: 1px solid $page-color-light;
  249. .imgList {
  250. margin-top: 30rpx;
  251. justify-content: flex-start;
  252. .topExit {
  253. width: 30rpx;
  254. height: 30rpx;
  255. position: absolute;
  256. top: -10rpx;
  257. right: -10rpx;
  258. }
  259. }
  260. }
  261. .listIconImg {
  262. width: 36rpx;
  263. }
  264. .right {
  265. color: $font-color-light;
  266. font-size: $font-base;
  267. justify-content: flex-end;
  268. position: relative;
  269. padding-left: 10rpx;
  270. .img {
  271. width: 26rpx;
  272. }
  273. .upImg {
  274. width: 120rpx;
  275. height: 120rpx;
  276. border-radius: 20rpx;
  277. background-color: $font-color-disabled;
  278. }
  279. .textarea_text {
  280. background-color: $page-color-base;
  281. width: 100%;
  282. margin-top: 30rpx;
  283. border-radius: 20rpx;
  284. padding: 30rpx;
  285. }
  286. .maxShow {
  287. position: absolute;
  288. bottom: 10rpx;
  289. right: 20rpx;
  290. font-size: 24rpx;
  291. }
  292. }
  293. .titleBox {
  294. flex-shrink: 0;
  295. .title {
  296. color: $font-color-base;
  297. font-size: $font-base;
  298. }
  299. }
  300. }
  301. </style>