detail.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='工单详情'></cus-header>
  4. <div class="otitle">报修信息</div>
  5. <div class="form">
  6. <div class="item">
  7. <div class="left">报修时间</div>
  8. <div class="right">{{order.time}}</div>
  9. </div>
  10. <div class="item">
  11. <div class="left">报修位置</div>
  12. <div class="right">{{order.place}}</div>
  13. </div>
  14. <div class="item">
  15. <div class="left">报修区域</div>
  16. <div class="right">{{'公告区域'}}</div>
  17. </div>
  18. <div class="item">
  19. <div class="left">报修类型</div>
  20. <div class="right">{{order.typename}}</div>
  21. </div>
  22. <div class="item">
  23. <div class="left">联系人</div>
  24. <div class="right">{{'张浩'}}</div>
  25. </div>
  26. <div class="item">
  27. <div class="left">联系电话</div>
  28. <div class="right">{{'18799876098'}}</div>
  29. </div>
  30. <div class="pre">
  31. <div class="title">故障描述</div>
  32. <div class="desc">{{'水龙头一直滴水关不上,请尽快处理!谢谢~'}}</div>
  33. </div>
  34. </div>
  35. <div class="photos">
  36. <div class="title">照片</div>
  37. <div class="list">
  38. <div class="item" v-for="(item,index) in [1,2,3]" :key="index"></div>
  39. </div>
  40. </div>
  41. <div class="otitle" v-if="order.status!==1">维修信息</div>
  42. <div class="form" v-if="order.status!==1">
  43. <div class="item">
  44. <div class="left">紧急程度</div>
  45. <div class="right">{{'非常紧急'}}</div>
  46. </div>
  47. <div class="item">
  48. <div class="left">维修人员</div>
  49. <div class="right">{{'张浩'}}</div>
  50. </div>
  51. <div class="item">
  52. <div class="left">联系电话</div>
  53. <div class="right">{{'18799876098'}}</div>
  54. </div>
  55. <div class="item" v-if="order.status==3">
  56. <div class="left">维修完成时间</div>
  57. <div class="right">{{'2024-01-08 15:13:45'}}</div>
  58. </div>
  59. </div>
  60. <div class="bottom">
  61. <div class="btn" v-if="order.status==1" @tap="show = true">指派维修人员</div>
  62. <div class="btn" v-else @tap="back">返回</div>
  63. </div>
  64. <u-popup :show="show" @close="close">
  65. <div class="popupbox">
  66. <div class="title">
  67. 指派
  68. <div class="close"><u-icon name="close" color="#B9C0C8" size="42"></u-icon></div>
  69. </div>
  70. <div class="pform">
  71. <div class="pitem">
  72. <div class="left">维修人员</div>
  73. <div class="right" @tap="userShow = true">
  74. <text v-if="order.repairPerson">{{order.repairPerson}} ></text>
  75. <div class="tip" v-else>请选择 <u-icon name="arrow-right" color="#B9C0C8" size="26"></u-icon></div>
  76. </div>
  77. </div>
  78. <div class="pitem">
  79. <div class="left">紧急程度</div>
  80. <div class="right" @tap="engreShow = true">
  81. <text v-if="order.engreLevel">{{order.engreLevel}} ></text>
  82. <div class="tip" v-else>请选择 <u-icon name="arrow-right" color="#B9C0C8" size="26"></u-icon></div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="btn" @tap="submit">提交</div>
  87. </div>
  88. </u-popup>
  89. <u-picker :show="userShow" :columns="userColumns" @cancel="userShow=false" @confirm="e=>orderConfirm(e,'repairPerson')"></u-picker>
  90. <u-picker :show="engreShow" :columns="engreColumns" @cancel="engreShow=false" @confirm="e=>orderConfirm(e,'engreLevel')"></u-picker>
  91. </view>
  92. </template>
  93. <script>
  94. export default {
  95. data(){
  96. return {
  97. order:{},
  98. show:false,
  99. userShow:false,
  100. userColumns:[
  101. ['张三','李四','王五']
  102. ],
  103. engreShow:false,
  104. engreColumns:[
  105. ['普通','紧急','非常紧急']
  106. ],
  107. }
  108. },
  109. onLoad(option) {
  110. this.order = JSON.parse(option.order);
  111. },
  112. methods:{
  113. close(){
  114. this.show = false;
  115. },
  116. back(){
  117. uni.navigateBack();
  118. },
  119. orderConfirm(e,type){
  120. this.order[type] = e.value[0];
  121. this.userShow = this.engreShow = false;
  122. },
  123. submit(){
  124. this.$showToast('提交成功');
  125. setTimeout(()=>{
  126. uni.redirectTo({
  127. url:'/pagesInspection/waitOrder/index?status=2'
  128. })
  129. },1500)
  130. }
  131. }
  132. }
  133. </script>
  134. <style scoped lang="less">
  135. ::v-deep .u-popup__content{
  136. border-radius: 40rpx 40rpx 0 0 !important;
  137. }
  138. .page{
  139. padding-bottom: 168rpx;
  140. background: #F4F8FB;
  141. box-sizing: border-box;
  142. .otitle{
  143. font-family: PingFang-SC, PingFang-SC;
  144. font-weight: bold;
  145. font-size: 32rpx;
  146. color: #1D2129;
  147. line-height: 36rpx;
  148. margin-top: 40rpx;
  149. padding-left: 24rpx;
  150. }
  151. .form{
  152. width: 100%;
  153. background: #FFFFFF;
  154. margin-top: 24rpx;
  155. .item{
  156. height: 98rpx;
  157. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EDF4FF;
  158. padding: 0 30rpx;
  159. display: flex;
  160. align-items: center;
  161. justify-content: space-between;
  162. .left{
  163. font-family: PingFangSC, PingFang SC;
  164. font-weight: 400;
  165. font-size: 30rpx;
  166. color: #1D2129;
  167. line-height: 42rpx;
  168. }
  169. .right{
  170. font-family: PingFangSC, PingFang SC;
  171. font-weight: 400;
  172. font-size: 30rpx;
  173. color: #4E5969;
  174. line-height: 42rpx;
  175. text-align: right;
  176. }
  177. }
  178. .pre{
  179. padding: 28rpx 24rpx 56rpx;
  180. .title{
  181. font-family: PingFangSC, PingFang SC;
  182. font-weight: 400;
  183. font-size: 30rpx;
  184. color: #1D2129;
  185. line-height: 42rpx;
  186. }
  187. .desc{
  188. font-family: PingFangSC, PingFang SC;
  189. font-weight: 400;
  190. font-size: 30rpx;
  191. color: #4E5969;
  192. line-height: 42rpx;
  193. margin-top: 28rpx;
  194. }
  195. }
  196. }
  197. .photos{
  198. width: 100%;
  199. padding: 28rpx 30rpx 36rpx;
  200. box-sizing: border-box;
  201. margin-top: 20rpx;
  202. background: #FFFFFF;
  203. .title{
  204. font-family: PingFangSC, PingFang SC;
  205. font-weight: 400;
  206. font-size: 30rpx;
  207. color: #1D2129;
  208. line-height: 42rpx;
  209. }
  210. .list{
  211. display: flex;
  212. flex-wrap: wrap;
  213. justify-content: space-between;
  214. .item{
  215. width: calc(100% / 3 - 30rpx);
  216. height: 220rpx;
  217. margin-top: 24rpx;
  218. background: #D8D8D8;
  219. }
  220. }
  221. }
  222. .bottom{
  223. width: 100%;
  224. height: 148rpx;
  225. background: #FFFFFF;
  226. padding: 20rpx 48rpx 0;
  227. box-sizing: border-box;
  228. position: fixed;
  229. left: 0;
  230. bottom: 0;
  231. .btn{
  232. width: 100%;
  233. height: 88rpx;
  234. background: #198CFF;
  235. border-radius: 16rpx;
  236. font-family: PingFang-SC, PingFang-SC;
  237. font-weight: bold;
  238. font-size: 32rpx;
  239. color: #FFFFFF;
  240. line-height: 88rpx;
  241. text-align: center;
  242. letter-spacing: 2rpx;
  243. }
  244. }
  245. .popupbox{
  246. width: 100%;
  247. border-radius: 40rpx 40rpx 0 0;
  248. padding: 42rpx 24rpx 94rpx;
  249. box-sizing: border-box;
  250. background: #FFFFFF;
  251. .title{
  252. font-family: PingFang-SC, PingFang-SC;
  253. font-weight: bold;
  254. font-size: 32rpx;
  255. color: #1D2129;
  256. line-height: 36rpx;
  257. text-align: center;
  258. position: relative;
  259. .close{
  260. position: absolute;
  261. right: 0;
  262. top: 0;
  263. }
  264. }
  265. .pform{
  266. margin-top: 40rpx;
  267. .pitem{
  268. height: 90rpx;
  269. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
  270. display: flex;
  271. align-items: center;
  272. justify-content: space-between;
  273. .left{
  274. font-family: PingFangSC, PingFang SC;
  275. font-weight: 400;
  276. font-size: 30rpx;
  277. color: #1D2129;
  278. line-height: 42rpx;
  279. }
  280. .right{
  281. font-family: PingFangSC, PingFang SC;
  282. font-weight: 400;
  283. font-size: 28rpx;
  284. color: #1D2129;
  285. line-height: 40rpx;
  286. text-align: right;
  287. .tip{
  288. color: #B9C0C8;
  289. display: flex;
  290. align-items: center;
  291. }
  292. }
  293. }
  294. }
  295. .btn{
  296. width: calc(100% - 48rpx);
  297. height: 88rpx;
  298. background: #198CFF;
  299. border-radius: 16rpx;
  300. margin: 80rpx 24rpx 0;
  301. font-family: PingFang-SC, PingFang-SC;
  302. font-weight: bold;
  303. font-size: 32rpx;
  304. color: #FFFFFF;
  305. line-height: 88rpx;
  306. text-align: center;
  307. letter-spacing: 2rpx;
  308. }
  309. }
  310. }
  311. </style>