pending.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <view class="container">
  3. <view class="top_bg" @click="permission = !permission"></view>
  4. <view class="body">
  5. <!-- 每一个订单区域 -->
  6. <view class="body_item" v-for="item in dataList" :key="item.id">
  7. <!-- 工单编号 -->
  8. <view class="item_title">
  9. <img src="../../static/images/repairsImg/order.png" />
  10. <view class="title_info">工单编号:{{ item.order }}</view>
  11. </view>
  12. <!-- 报修时间 -->
  13. <view class="item_time">
  14. <view class="time_msg">
  15. 报修时间:
  16. <text>{{ item.time }}</text>
  17. </view>
  18. <view class="time_type">待接单</view>
  19. </view>
  20. <!-- 报修姓名 -->
  21. <view class="item_box">
  22. <view class="box_key">报修姓名:</view>
  23. <view class="box_value">{{ item.name }}</view>
  24. </view>
  25. <!-- 报修电话 -->
  26. <view class="item_box">
  27. <view class="box_key">报修电话:</view>
  28. <view class="box_value phone">
  29. {{ item.phone }}
  30. <img src="../../static/images/repairsImg/phone.png" />
  31. </view>
  32. </view>
  33. <!-- 报修区域 -->
  34. <view class="item_box">
  35. <view class="box_key">报修区域:</view>
  36. <view class="box_value">{{ item.area }}</view>
  37. </view>
  38. <!-- 详细地址 -->
  39. <view class="item_box">
  40. <view class="box_key">详细地址:</view>
  41. <view class="box_value">{{ item.address }}</view>
  42. </view>
  43. <!-- 报修物品 -->
  44. <view class="item_box">
  45. <view class="box_key">报修物品:</view>
  46. <view class="box_value">{{ item.goods }}</view>
  47. </view>
  48. <!-- 故障描述 -->
  49. <view class="item_box">
  50. <view class="box_key">故障描述:</view>
  51. <view class="box_value">{{ item.description }}</view>
  52. </view>
  53. <!-- 上传图片 -->
  54. <view class="item_img">
  55. <view class="img_key">上传图片:</view>
  56. <view class="img_value"></view>
  57. </view>
  58. <!-- 按钮区域 -->
  59. <view class="item_btn">
  60. <img src="../../static/images/repairsImg/close.png" @click="handleClose" />
  61. <view class="btn_box type" v-if="permission">延时</view>
  62. <view class="btn_box type">接单</view>
  63. <view class="btn_box type2" v-if="permission">派单</view>
  64. </view>
  65. <!-- 关闭按钮弹窗 -->
  66. <uni-popup ref="popup_close" :is-mask-click="false">
  67. <view class="popup_close">
  68. <view :class="{ active: activeIndex === 1 }" class="close_box radius" @click="handleChangeItem(1)">重复报单</view>
  69. <view :class="{ active: activeIndex === 2 }" class="close_box" @click="handleChangeItem(2)">不属于维修范围</view>
  70. <view :class="{ active: activeIndex === 3 }" class="close_box" @click="handleChangeItem(3)">已维修完成</view>
  71. <view class="close_btn">
  72. <view class="btn_box cancel" @click="$refs.popup_close[0].close()">取消</view>
  73. <view class="btn_box confirm" @click="$refs.popup_close[0].close()">确定</view>
  74. </view>
  75. </view>
  76. </uni-popup>
  77. </view>
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. data() {
  84. return {
  85. permission: true,
  86. activeIndex: 1,
  87. dataList: [
  88. {
  89. id: 1,
  90. order: '656262219626262',
  91. overtime: true,
  92. time: '2023.07.05 09:25:26',
  93. type: 1,
  94. name: '张三',
  95. phone: '13659585689',
  96. area: '行政楼',
  97. address: '3楼309',
  98. goods: '电脑',
  99. description: '水龙头坏了',
  100. img: ''
  101. },
  102. {
  103. id: 2,
  104. order: '956262219626262',
  105. overtime: false,
  106. time: '2023.07.05 09:25:26',
  107. type: 2,
  108. name: '李四',
  109. phone: '13659585689',
  110. area: '行政楼',
  111. address: '3楼309',
  112. goods: '电脑',
  113. description: '电脑坏了',
  114. img: '',
  115. workerName: '老张',
  116. workerPhone: '13659585689'
  117. },
  118. {
  119. id: 3,
  120. order: '956262219626262',
  121. overtime: false,
  122. time: '2023.07.05 09:25:26',
  123. type: 3,
  124. name: '李四',
  125. phone: '13659585689',
  126. area: '行政楼',
  127. address: '3楼309',
  128. goods: '电脑',
  129. description: '电脑坏了',
  130. img: '',
  131. workerName: '老张',
  132. workerPhone: '13659585689',
  133. money: 50
  134. }
  135. ]
  136. }
  137. },
  138. methods: {
  139. handleClose() {
  140. this.$refs.popup_close[0].open('center')
  141. },
  142. handleChangeItem(val) {
  143. this.activeIndex = val
  144. }
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. .container {
  150. width: 100vw;
  151. height: calc(100vh - 102rpx);
  152. .top_bg {
  153. height: 165rpx;
  154. background-color: #6fb6b8;
  155. }
  156. .body {
  157. box-sizing: border-box;
  158. margin: auto;
  159. margin-top: -100rpx;
  160. padding: 2rpx;
  161. width: 690rpx;
  162. height: calc(100vh - 170rpx);
  163. border-radius: 11rpx 11rpx 0 0;
  164. background-color: #fff;
  165. overflow-y: auto;
  166. .body_item {
  167. margin-bottom: 20rpx;
  168. border-radius: 11rpx;
  169. box-shadow: 0 0 8rpx #d9d9d9;
  170. .item_title {
  171. display: flex;
  172. align-items: center;
  173. padding: 0 30rpx;
  174. height: 87rpx;
  175. border-bottom: 1rpx solid #e6e6e6;
  176. img {
  177. width: 30rpx;
  178. height: 30rpx;
  179. }
  180. .title_info {
  181. margin: 0 21rpx 0 13rpx;
  182. font-size: 28rpx;
  183. }
  184. }
  185. .item_time {
  186. display: flex;
  187. justify-content: space-between;
  188. align-items: center;
  189. padding: 0 30rpx;
  190. height: 79rpx;
  191. .time_msg {
  192. font-size: 28rpx;
  193. color: #808080;
  194. text {
  195. color: #000000;
  196. }
  197. }
  198. .time_type {
  199. font-size: 32rpx;
  200. color: #ff5733;
  201. }
  202. }
  203. .item_box {
  204. display: flex;
  205. padding: 0 30rpx;
  206. height: 60rpx;
  207. font-size: 28rpx;
  208. .box_key {
  209. color: #808080;
  210. }
  211. .box_value {
  212. display: flex;
  213. img {
  214. margin-top: 5rpx;
  215. margin-left: 10rpx;
  216. width: 28rpx;
  217. height: 28rpx;
  218. }
  219. }
  220. .phone {
  221. color: #6fb6b8;
  222. }
  223. }
  224. .item_img {
  225. display: flex;
  226. align-items: center;
  227. padding: 0 30rpx;
  228. height: 120rpx;
  229. color: #808080;
  230. font-size: 28rpx;
  231. .img_key {
  232. }
  233. .img_value {
  234. width: 120rpx;
  235. height: 120rpx;
  236. border-radius: 14rpx;
  237. background-color: salmon;
  238. }
  239. }
  240. .item_btn {
  241. display: flex;
  242. align-items: center;
  243. justify-content: flex-end;
  244. padding: 0 30rpx;
  245. height: 153rpx;
  246. img {
  247. margin-right: auto;
  248. width: 56rpx;
  249. height: 56rpx;
  250. }
  251. .btn_box {
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. margin-left: 16rpx;
  256. width: 174rpx;
  257. height: 68rpx;
  258. font-size: 28rpx;
  259. border-radius: 11rpx;
  260. }
  261. .type {
  262. color: #fff;
  263. background-color: #6fb6b8;
  264. }
  265. .type2 {
  266. color: #6fb6b8;
  267. background-color: #fff;
  268. border: 1rpx solid #6fb6b8;
  269. }
  270. }
  271. .popup_close {
  272. width: 690rpx;
  273. border-radius: 19rpx;
  274. background-color: #fff;
  275. .close_box {
  276. height: 100rpx;
  277. line-height: 100rpx;
  278. text-align: center;
  279. font-size: 32rpx;
  280. border: 1rpx solid #e6e6e6;
  281. }
  282. .radius {
  283. border-radius: 19rpx 19rpx 0 0;
  284. }
  285. .active {
  286. color: #fff;
  287. background-color: #6fb6b8;
  288. }
  289. .close_btn {
  290. display: flex;
  291. align-items: center;
  292. justify-content: space-evenly;
  293. margin-top: 100rpx;
  294. height: 121rpx;
  295. .btn_box {
  296. display: flex;
  297. justify-content: center;
  298. align-items: center;
  299. width: 203rpx;
  300. height: 72rpx;
  301. border-radius: 9rpx;
  302. font-size: 32rpx;
  303. }
  304. .cancel {
  305. background-color: #e5e5e5;
  306. color: #6fb6b8;
  307. }
  308. .confirm {
  309. background-color: #6fb6b8;
  310. color: #fff;
  311. }
  312. }
  313. }
  314. }
  315. }
  316. }
  317. </style>