pending.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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" @click="handleCallPhone('13820846714')">
  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" @click="handleDelay">延时</view>
  62. <view class="btn_box type">接单</view>
  63. <view class="btn_box type2" v-if="permission" @click="handleSendOrder">派单</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. // 关闭图标点击回调
  140. handleClose() {
  141. this.$refs.popup_close[0].open('center')
  142. },
  143. // 关闭按钮弹窗选中按钮时回调
  144. handleChangeItem(val) {
  145. this.activeIndex = val
  146. },
  147. // 延时按钮回调
  148. handleDelay() {
  149. uni.navigateTo({
  150. url: '/pagesRepairs/delay/delay'
  151. })
  152. },
  153. // 派单按钮回调
  154. handleSendOrder() {
  155. uni.navigateTo({
  156. url: '/pagesRepairs/helpPeople/helpPeople?type=1'
  157. })
  158. },
  159. // 点击电话号码回调
  160. handleCallPhone(phone) {
  161. console.log(phone)
  162. uni.makePhoneCall({
  163. phoneNumber: phone
  164. })
  165. }
  166. }
  167. }
  168. </script>
  169. <style lang="scss" scoped>
  170. .container {
  171. width: 100vw;
  172. height: calc(100vh - 102rpx);
  173. overflow-y: auto;
  174. .top_bg {
  175. height: 165rpx;
  176. background-color: #6fb6b8;
  177. }
  178. .body {
  179. box-sizing: border-box;
  180. margin: auto;
  181. margin-top: -100rpx;
  182. padding: 2rpx;
  183. width: 690rpx;
  184. border-radius: 11rpx 11rpx 0 0;
  185. background-color: #fff;
  186. overflow-y: auto;
  187. .body_item {
  188. margin-bottom: 20rpx;
  189. border-radius: 11rpx;
  190. box-shadow: 0 0 8rpx #d9d9d9;
  191. .item_title {
  192. display: flex;
  193. align-items: center;
  194. padding: 0 30rpx;
  195. height: 87rpx;
  196. border-bottom: 1rpx solid #e6e6e6;
  197. img {
  198. width: 30rpx;
  199. height: 30rpx;
  200. }
  201. .title_info {
  202. margin: 0 21rpx 0 13rpx;
  203. font-size: 28rpx;
  204. }
  205. }
  206. .item_time {
  207. display: flex;
  208. justify-content: space-between;
  209. align-items: center;
  210. padding: 0 30rpx;
  211. height: 79rpx;
  212. .time_msg {
  213. font-size: 28rpx;
  214. color: #808080;
  215. text {
  216. color: #000000;
  217. }
  218. }
  219. .time_type {
  220. font-size: 32rpx;
  221. color: #ff5733;
  222. }
  223. }
  224. .item_box {
  225. display: flex;
  226. padding: 0 30rpx;
  227. height: 60rpx;
  228. font-size: 28rpx;
  229. .box_key {
  230. color: #808080;
  231. }
  232. .box_value {
  233. display: flex;
  234. img {
  235. margin-top: 5rpx;
  236. margin-left: 10rpx;
  237. width: 28rpx;
  238. height: 28rpx;
  239. }
  240. }
  241. .phone {
  242. color: #6fb6b8;
  243. }
  244. }
  245. .item_img {
  246. display: flex;
  247. align-items: center;
  248. padding: 0 30rpx;
  249. height: 120rpx;
  250. color: #808080;
  251. font-size: 28rpx;
  252. .img_key {
  253. }
  254. .img_value {
  255. width: 120rpx;
  256. height: 120rpx;
  257. border-radius: 14rpx;
  258. background-color: salmon;
  259. }
  260. }
  261. .item_btn {
  262. display: flex;
  263. align-items: center;
  264. justify-content: flex-end;
  265. padding: 0 30rpx;
  266. height: 153rpx;
  267. img {
  268. margin-right: auto;
  269. width: 56rpx;
  270. height: 56rpx;
  271. }
  272. .btn_box {
  273. display: flex;
  274. justify-content: center;
  275. align-items: center;
  276. margin-left: 16rpx;
  277. width: 174rpx;
  278. height: 68rpx;
  279. font-size: 28rpx;
  280. border-radius: 11rpx;
  281. }
  282. .type {
  283. color: #fff;
  284. background-color: #6fb6b8;
  285. }
  286. .type2 {
  287. color: #6fb6b8;
  288. background-color: #fff;
  289. border: 1rpx solid #6fb6b8;
  290. }
  291. }
  292. .popup_close {
  293. width: 690rpx;
  294. border-radius: 19rpx;
  295. background-color: #fff;
  296. .close_box {
  297. height: 100rpx;
  298. line-height: 100rpx;
  299. text-align: center;
  300. font-size: 32rpx;
  301. border: 1rpx solid #e6e6e6;
  302. }
  303. .radius {
  304. border-radius: 19rpx 19rpx 0 0;
  305. }
  306. .active {
  307. color: #fff;
  308. background-color: #6fb6b8;
  309. }
  310. .close_btn {
  311. display: flex;
  312. align-items: center;
  313. justify-content: space-evenly;
  314. margin-top: 100rpx;
  315. height: 121rpx;
  316. .btn_box {
  317. display: flex;
  318. justify-content: center;
  319. align-items: center;
  320. width: 203rpx;
  321. height: 72rpx;
  322. border-radius: 9rpx;
  323. font-size: 32rpx;
  324. }
  325. .cancel {
  326. background-color: #e5e5e5;
  327. color: #6fb6b8;
  328. }
  329. .confirm {
  330. background-color: #6fb6b8;
  331. color: #fff;
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. </style>