pending.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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. <img class="img_value" mode="aspectFill" :src="item.img[0]" @click="handleLookImgs(item.img)" />
  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. 'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
  102. 'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
  103. 'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
  104. ]
  105. },
  106. {
  107. id: 2,
  108. order: '956262219626262',
  109. overtime: false,
  110. time: '2023.07.05 09:25:26',
  111. type: 2,
  112. name: '李四',
  113. phone: '13659585689',
  114. area: '行政楼',
  115. address: '3楼309',
  116. goods: '电脑',
  117. description: '电脑坏了',
  118. img: [
  119. 'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
  120. 'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
  121. 'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
  122. ],
  123. workerName: '老张',
  124. workerPhone: '13659585689'
  125. },
  126. {
  127. id: 3,
  128. order: '956262219626262',
  129. overtime: false,
  130. time: '2023.07.05 09:25:26',
  131. type: 3,
  132. name: '李四',
  133. phone: '13659585689',
  134. area: '行政楼',
  135. address: '3楼309',
  136. goods: '电脑',
  137. description: '电脑坏了',
  138. img: [
  139. 'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
  140. 'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
  141. 'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
  142. ],
  143. workerName: '老张',
  144. workerPhone: '13659585689',
  145. money: 50
  146. }
  147. ]
  148. }
  149. },
  150. methods: {
  151. // 关闭图标点击回调
  152. handleClose() {
  153. this.$refs.popup_close[0].open('center')
  154. },
  155. // 关闭按钮弹窗选中按钮时回调
  156. handleChangeItem(val) {
  157. this.activeIndex = val
  158. },
  159. // 延时按钮回调
  160. handleDelay() {
  161. uni.navigateTo({
  162. url: '/pagesRepairs/delay/delay'
  163. })
  164. },
  165. // 派单按钮回调
  166. handleSendOrder() {
  167. uni.navigateTo({
  168. url: '/pagesRepairs/helpPeople/helpPeople?type=1'
  169. })
  170. },
  171. // 点击电话号码回调
  172. handleCallPhone(phone) {
  173. console.log(phone)
  174. uni.makePhoneCall({
  175. phoneNumber: phone
  176. })
  177. },
  178. // 点击图片回调
  179. handleLookImgs(img) {
  180. // console.log(img)
  181. uni.previewImage({
  182. urls: img
  183. })
  184. }
  185. }
  186. }
  187. </script>
  188. <style lang="scss" scoped>
  189. .container {
  190. width: 100vw;
  191. height: calc(100vh - 152rpx);
  192. overflow-y: auto;
  193. .top_bg {
  194. height: 165rpx;
  195. background-color: #6fb6b8;
  196. }
  197. .body {
  198. box-sizing: border-box;
  199. margin: auto;
  200. margin-top: -100rpx;
  201. padding: 2rpx;
  202. width: 690rpx;
  203. border-radius: 11rpx 11rpx 0 0;
  204. background-color: #fff;
  205. overflow-y: auto;
  206. .body_item {
  207. margin-bottom: 20rpx;
  208. border-radius: 11rpx;
  209. box-shadow: 0 0 8rpx #d9d9d9;
  210. .item_title {
  211. display: flex;
  212. align-items: center;
  213. padding: 0 30rpx;
  214. height: 87rpx;
  215. border-bottom: 1rpx solid #e6e6e6;
  216. img {
  217. width: 30rpx;
  218. height: 30rpx;
  219. }
  220. .title_info {
  221. margin: 0 21rpx 0 13rpx;
  222. font-size: 28rpx;
  223. }
  224. }
  225. .item_time {
  226. display: flex;
  227. justify-content: space-between;
  228. align-items: center;
  229. padding: 0 30rpx;
  230. height: 79rpx;
  231. .time_msg {
  232. font-size: 28rpx;
  233. color: #808080;
  234. text {
  235. color: #000000;
  236. }
  237. }
  238. .time_type {
  239. font-size: 32rpx;
  240. color: #ff5733;
  241. }
  242. }
  243. .item_box {
  244. display: flex;
  245. padding: 0 30rpx;
  246. height: 60rpx;
  247. font-size: 28rpx;
  248. .box_key {
  249. color: #808080;
  250. }
  251. .box_value {
  252. display: flex;
  253. img {
  254. margin-top: 5rpx;
  255. margin-left: 10rpx;
  256. width: 28rpx;
  257. height: 28rpx;
  258. }
  259. }
  260. .phone {
  261. color: #6fb6b8;
  262. }
  263. }
  264. .item_img {
  265. display: flex;
  266. align-items: center;
  267. padding: 0 30rpx;
  268. height: 120rpx;
  269. color: #808080;
  270. font-size: 28rpx;
  271. .img_key {
  272. }
  273. .img_value {
  274. width: 120rpx;
  275. height: 120rpx;
  276. border-radius: 14rpx;
  277. }
  278. }
  279. .item_btn {
  280. display: flex;
  281. align-items: center;
  282. justify-content: flex-end;
  283. padding: 0 30rpx;
  284. height: 153rpx;
  285. img {
  286. margin-right: auto;
  287. width: 56rpx;
  288. height: 56rpx;
  289. }
  290. .btn_box {
  291. display: flex;
  292. justify-content: center;
  293. align-items: center;
  294. margin-left: 16rpx;
  295. width: 174rpx;
  296. height: 68rpx;
  297. font-size: 28rpx;
  298. border-radius: 11rpx;
  299. }
  300. .type {
  301. color: #fff;
  302. background-color: #6fb6b8;
  303. }
  304. .type2 {
  305. color: #6fb6b8;
  306. background-color: #fff;
  307. border: 1rpx solid #6fb6b8;
  308. }
  309. }
  310. .popup_close {
  311. width: 690rpx;
  312. border-radius: 19rpx;
  313. background-color: #fff;
  314. .close_box {
  315. height: 100rpx;
  316. line-height: 100rpx;
  317. text-align: center;
  318. font-size: 32rpx;
  319. border: 1rpx solid #e6e6e6;
  320. }
  321. .radius {
  322. border-radius: 19rpx 19rpx 0 0;
  323. }
  324. .active {
  325. color: #fff;
  326. background-color: #6fb6b8;
  327. }
  328. .close_btn {
  329. display: flex;
  330. align-items: center;
  331. justify-content: space-evenly;
  332. margin-top: 100rpx;
  333. height: 121rpx;
  334. .btn_box {
  335. display: flex;
  336. justify-content: center;
  337. align-items: center;
  338. width: 203rpx;
  339. height: 72rpx;
  340. border-radius: 9rpx;
  341. font-size: 32rpx;
  342. }
  343. .cancel {
  344. background-color: #e5e5e5;
  345. color: #6fb6b8;
  346. }
  347. .confirm {
  348. background-color: #6fb6b8;
  349. color: #fff;
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }
  356. </style>