warrantydetail.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <uni-nav-bar title="报修详情" left-icon="left" @clickLeft="getBackFn" color="#FFFFFF" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  5. </uni-nav-bar>
  6. </view>
  7. <image :src="mbg" class="navbg"></image>
  8. <view class="wymain">
  9. <view class="wytop flexc">
  10. <image :src="typeimg" class="flex0"></image>
  11. <view class="flex1" v-if="finshtype==0">
  12. <view class="tit">未派工</view>
  13. <view class="txt">请尽快指派人员进行处理</view>
  14. </view>
  15. <view class="flex1" v-if="finshtype>0&&finshtype<3">
  16. <view class="tit">已派工</view>
  17. <view class="txt">已指派人员进行处理</view>
  18. </view>
  19. <view class="flex1" v-if="finshtype==3">
  20. <view class="tit">已完成</view>
  21. <view class="txt">报修订单已完成</view>
  22. </view>
  23. </view>
  24. <view class="wabox peobox">
  25. <image :src="head" class="head"></image>
  26. <view class="flex1">
  27. <view class="peotit mb6">王师傅</view>
  28. <view class="peotxt">15802340788</view>
  29. </view>
  30. <image :src="phone" class="phone" @click="getPhoneFn"></image>
  31. </view>
  32. <view class="wabox">
  33. <view class="chtop flexc">
  34. <image :src="line"></image>
  35. <view>巡更详情</view>
  36. <view class="flex1"></view>
  37. </view>
  38. <view class="walist">
  39. <view class="tit">二号楼1单元904厨房油烟机损坏</view>
  40. <view class="txt">二号楼1单元904厨房油烟机无法吸烟,请尽快派人上门 维修,谢谢!</view>
  41. <view class="imgs">
  42. <image :src="line" class="img"></image>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="wabox">
  47. <view class="chtop flexc">
  48. <image :src="line"></image>
  49. <view>基础信息</view>
  50. <view class="flex1"></view>
  51. </view>
  52. <view class="walist watxt"><view class="wtit">小区名称</view><view class="wtxt">幸福小区</view></view>
  53. <view class="walist watxt"><view class="wtit">报修门户</view><view class="wtxt">二号楼1单元904</view></view>
  54. <view class="walist watxt"><view class="wtit">报修时间</view><view class="wtxt">2024-11-12 13:27:36</view></view>
  55. <view class="walist watxt"><view class="wtit">联系方式</view><view class="wtxt">13805680028</view></view>
  56. </view>
  57. <view class="wabox" v-if="finshtype>1">
  58. <view class="chtop flexc">
  59. <image :src="line"></image>
  60. <view>上门信息</view>
  61. <view class="flex1"></view>
  62. </view>
  63. <view class="walist watxt"><view class="wtit">上门时间</view><view class="wtxt">2024-11-12 14:54:21</view></view>
  64. <view class="walist watxt flexc"><view class="wtit">上门拍照</view>
  65. <view class="waimgs"><image :src="head" @click="getPreviewImage"></image></view>
  66. </view>
  67. <block v-if="finshtype>2">
  68. <view class="walist watxt"><view class="wtit">结束时间</view><view class="wtxt">2024-11-12 13:27:36</view></view>
  69. <view class="walist watxt"><view class="wtit">结束拍照</view><view class="waimgs"><image :src="head" @click="getPreviewImage"></image></view></view>
  70. </block>
  71. </view>
  72. </view>
  73. <view class="rfbtn" @click="getAssignFn" v-if="finshtype==0">去指派</view>
  74. <view class="rfbtn rfbga" @click="getCheckFn(1)" v-if="finshtype==1">我已上门</view>
  75. <view class="rfbtn rfbga" @click="getCheckFn(2)" v-if="finshtype==2">我已完成</view>
  76. <pop-up :type="type" @getClose='getClose' :finshtype='finshtype' @getSure="getSure"></pop-up>
  77. <loading></loading>
  78. </view>
  79. </template>
  80. <script>
  81. import config from '@/config'
  82. const baseUrl = config.baseUrl
  83. import popUp from "@/work/components/popup/popup.vue"
  84. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  85. export default{
  86. components:{popUp},
  87. data(){
  88. return{
  89. line:require('@/work/static/car/line.png'),
  90. mbg:require('@/work/static/service/bxbg.png'),
  91. typeimg:require('@/work/static/service/type.png'),
  92. head:require('@/work/static/service/head.png'),
  93. phone:require('@/work/static/service/phone.png'),
  94. nvaHeight:44,
  95. backgroundColor: "transparent",
  96. baseUrl:config.baseUrl,
  97. type:'',
  98. finshtype:3,
  99. }
  100. },
  101. onLoad: function() {
  102. uni.getSystemInfo({
  103. success: (e) => {
  104. this.nvaHeight = Number(e.statusBarHeight)+44;
  105. }
  106. })
  107. },
  108. onPageScroll(e) {
  109. var scrollTop = Number(e.scrollTop);
  110. if (scrollTop > 0) {
  111. this.backgroundColor = '#0256FD'
  112. } else {
  113. this.backgroundColor = 'transparent'
  114. }
  115. },
  116. methods:{
  117. checkPermi, checkRole,
  118. getAssignFn(){
  119. this.type='assign'
  120. },
  121. getCheckFn(){
  122. this.type='assigncheck'
  123. },
  124. getOpenFn(){
  125. },
  126. getBackFn(){
  127. uni.navigateBack({
  128. delta:1
  129. })
  130. },
  131. getClose(){
  132. this.type='';
  133. },
  134. getSure(){
  135. this.type='';
  136. },
  137. getPhoneFn(){
  138. uni.makePhoneCall({
  139. phoneNumber: '114' //仅为示例
  140. });
  141. },
  142. getPreviewImage(arr,idx){
  143. var newArr=[];
  144. arr.forEach(ite=>{
  145. var ds=this.baseUrl+ite
  146. newArr.push(ds)
  147. })
  148. uni.previewImage({
  149. urls: newArr,
  150. current:idx,
  151. success: function(data) {
  152. },
  153. fail: function(err) {
  154. }
  155. });
  156. },
  157. }
  158. }
  159. </script>
  160. <style>
  161. page{background: #F3F3F0;}
  162. </style>
  163. <style lang="scss" scoped>
  164. .rfbga{background: #2ACA8E !important;}
  165. .navbg{width: 100%;height: 722rpx;z-index: 0;}
  166. .wymain{z-index: 2;position: relative;padding: 28rpx 18rpx 110rpx;}
  167. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  168. .wytop{padding: 0 38rpx;margin-bottom: 40rpx;
  169. image{width: 88rpx;height: 88rpx;margin-right: 22rpx;}
  170. .tit{font-size: 28rpx;color: #FFFFFF;font-weight: bold;margin-bottom: 10rpx;}
  171. .txt{font-size: 24rpx;color: #FFFFFF;font-weight: 500;}
  172. }
  173. .wabox{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding-top:32rpx;padding-bottom: 4rpx;
  174. .walist{padding: 0 36rpx;
  175. .tit{font-weight: bold;font-size: 30rpx;color: #272727;margin-bottom: 18rpx;}
  176. .txt{font-weight: 500;font-size: 26rpx;line-height: 36rpx;color: #666666;margin-bottom: 28rpx;}
  177. .waimgs{display: flex;flex-wrap: wrap;justify-content: flex-end;flex: 1;
  178. image{width: 142rpx;height: 142rpx;border-radius: 20rpx;margin-left: 20rpx;margin-bottom: 10rpx;}
  179. }
  180. }
  181. .watxt{display: flex;margin-bottom: 22rpx;
  182. .wtit{font-weight: 500;font-size: 26rpx;color: #272727;flex: 0 0 auto;margin-right: 12rpx;}
  183. .wtxt{font-weight: 500;font-size: 26rpx;color: #666666;flex: 1;text-align: right;}
  184. }
  185. .imgs{display: flex;flex-wrap: wrap;
  186. .img{width: 142rpx;height: 142rpx;margin: 0 24rpx 24rpx 0;display: block;
  187. &:nth-of-type(4n){margin-right: 0;}
  188. }
  189. }
  190. }
  191. .peobox{padding: 30rpx 36rpx 24rpx;display: flex;align-items: center;
  192. .head{width: 88rpx;height: 88rpx;margin-right: 24rpx;flex: 0 0 auto;}
  193. .peotit{font-weight: bold;font-size: 26rpx;color: #272727;}
  194. .peotxt{font-weight: 500;font-size: 26rpx;color: #AAAAAA;}
  195. .phone{width: 60rpx;height: 60rpx;flex: 0 0 auto;margin-left: 12rpx;}
  196. }
  197. .chtop{margin-bottom: 24rpx;padding-right: 48rpx;
  198. image{width: 14rpx;height: 48rpx;margin-right: 20rpx;}
  199. view{font-weight: bold;font-size: 28rpx;color: #272727;}
  200. .num{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  201. }
  202. </style>