companycheckorderlist.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <!--
  2. * @Title:
  3. * @Description: 当前维修任务列表
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="wrap">
  11. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view class="nav-title">
  14. <text>{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <view class="container">
  18. <uni-list>
  19. <uni-list-item v-for="item in list" :key="item.id" showArrow clickable
  20. @click="onOrderReportItemClick(item.id)">
  21. <template v-slot:body>
  22. <view class="list-item-block">
  23. <view class="items-line">
  24. <image class="item-title-run-status-icon" style="box-shadow:0 0 2px 2px lightblue"
  25. src="/static/images/list/order_item.png" mode="widthFix">
  26. </image>
  27. <text class="item-title-rtu-name">{{item.rtuName}}</text>
  28. <text class="item-title-rtu-code">[{{item.rtuCode}}]</text>
  29. </view>
  30. <view class="items-line">
  31. <uni-icons class="input-uni-icon" type="list" size="18" color="lightblue" />
  32. <text class="item-text-lable">维修状态:</text>
  33. <text v-if="item.orderStatus==1" class="item-text-content"
  34. style="color: red;">等待确认</text>
  35. <text v-if="item.orderStatus==2" class="item-text-content"
  36. style="color: orange;">处理中</text>
  37. <text v-if="item.orderStatus==3" class="item-text-content"
  38. style="color: blue;">已处理</text>
  39. <text v-if="item.orderStatus==4" class="item-text-content"
  40. style="color: green;">已完成</text>
  41. </view>
  42. <view v-if="item.orderStatus==1" class="items-line">
  43. <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
  44. <text class="item-text-lable">创建时长:</text>
  45. <text class="item-text-content" style="color: red;">{{item.taskCreateDuration}}</text>
  46. </view>
  47. <view v-else class="items-line">
  48. <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
  49. <text class="item-text-lable">维修时长:</text>
  50. <text class="item-text-content" style="color: red;">{{item.taskProcessDuration}}</text>
  51. </view>
  52. <view class="items-line">
  53. <uni-icons class="input-uni-icon" type="location" size="18" color="lightblue" />
  54. <text class="item-text-lable">行政区划:</text>
  55. <text class="item-text-content">{{item.areaName}}</text>
  56. </view>
  57. <view v-if="item.orderStatus==1" class="items-line">
  58. <uni-icons class="input-uni-icon" type="person" size="18" color="lightblue" />
  59. <text class="item-text-lable">运维公司管理员:</text>
  60. <text class="item-text-content">{{item.manageCompanyAdminName}}</text>
  61. </view>
  62. <view v-else class="items-line">
  63. <uni-icons class="input-uni-icon" type="person" size="18" color="lightblue" />
  64. <text class="item-text-lable">处理人:</text>
  65. <text class="item-text-content">{{item.contactUserName}}</text>
  66. </view>
  67. <view v-if="item.orderStatus==1" class="items-line">
  68. <uni-icons class="input-uni-icon" type="phone" size="18" color="lightblue" />
  69. <text class="item-text-lable">联系电话:</text>
  70. <view v-if="item.manageCompanyAdminPhone != null" @click="call(item.manageCompanyAdminPhone)">
  71. <text class="item-text-content-phone">{{item.manageCompanyAdminPhone}}</text>
  72. </view>
  73. </view>
  74. <view v-else class="items-line">
  75. <uni-icons class="input-uni-icon" type="phone" size="18" color="lightblue" />
  76. <text class="item-text-lable">联系电话:</text>
  77. <view v-if="item.contactPhone != null"
  78. @click="call(item.contactPhone)">
  79. <text class="item-text-content-phone">{{item.contactPhone}}</text>
  80. </view>
  81. </view>
  82. <view v-if="item.orderStatus==3" class="item-button-group">
  83. <view class="item-button" style="background-color:lightblue"
  84. @click="onOrderReportItemClick(item.id)">
  85. <view class="items-line">
  86. <uni-icons class="input-uni-icon" type="info" size="18" color="coral" />
  87. <text class="button-text">维修详情</text>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. </template>
  93. </uni-list-item>
  94. </uni-list>
  95. <uni-group>
  96. <view class="pagination-block">
  97. <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
  98. @change="pageChange" />
  99. </view>
  100. </uni-group>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. import {
  106. role
  107. } from "@/api/role.js";
  108. import http from '@/http/api.js';
  109. export default {
  110. components: {},
  111. onLoad(option) {
  112. if (this.userInfo.role_name === role['admin']) {
  113. this.permission.admin = true;
  114. } else if (this.userInfo.role_name === role['orgAdmin']) {
  115. this.permission.orgAdmin = true;
  116. } else if (this.userInfo.role_name === role['companyAdmin']) {
  117. this.permission.companyAdmin = true;
  118. } else if (this.userInfo.role_name === role['companyServciePerson']) {
  119. this.permission.companyServciePerson = true;
  120. }
  121. this.type = option.type;
  122. if (this.type == '1') {
  123. this.query['orderClose'] = 0;
  124. this.title = "全部维修任务信息";
  125. } else if (this.type == '2') {
  126. this.query['orderStatus'] = 1;
  127. this.query['orderClose'] = 0;
  128. this.title = "未确认维修任务信息";
  129. } else if (this.type == '3') {
  130. this.query['orderStatus'] = 2;
  131. this.query['orderClose'] = 0;
  132. this.title = "处理中维修任务信息";
  133. } else if (this.type == '4') {
  134. this.query['orderStatus'] = 3;
  135. this.query['orderClose'] = 0;
  136. this.title = "已处理维修任务信息";
  137. }
  138. let deptId = option.deptId;
  139. if (null != deptId) {
  140. this.query['deptId'] = deptId;
  141. }
  142. this.pageCurrent = 1;
  143. this.getPage()
  144. },
  145. data() {
  146. return {
  147. title: '维修任务信息',
  148. permission: {
  149. 'admin': false,
  150. 'orgAdmin': false,
  151. 'companyAdmin': false,
  152. 'companyServciePerson': false,
  153. },
  154. type: '',
  155. pageSize: 10,
  156. pageCurrent: 1,
  157. total: 0,
  158. list: [],
  159. query: {},
  160. inputStyles: {
  161. color: '#808080',
  162. borderColor: '#d3d3d3'
  163. }
  164. }
  165. },
  166. computed: {
  167. },
  168. onShow() {
  169. },
  170. methods: {
  171. //返回上一页
  172. toBack() {
  173. uni.navigateBack({
  174. delta: 1
  175. })
  176. },
  177. onBackPress() {
  178. // #ifdef APP-PLUS
  179. plus.key.hideSoftKeybord();
  180. // #endif
  181. },
  182. // 分页触发
  183. pageChange(e) {
  184. this.pageCurrent = e.current;
  185. this.getPage()
  186. },
  187. call(phone) {
  188. console.log(phone)
  189. uni.showModal({
  190. content: '是否需要拨打[' + phone + ']?',
  191. showCancel: true,
  192. success(res) {
  193. if (res.confirm) {
  194. uni.makePhoneCall({
  195. phoneNumber: phone
  196. });
  197. }
  198. }
  199. });
  200. },
  201. onDetailViewClick(id) {
  202. let url = '/pages/check-order/orderprocessreportdetail?orderId=' + id;
  203. uni.navigateTo({
  204. url: url
  205. })
  206. },
  207. onLocationClick(item) {
  208. let lat = item.lat;
  209. let lng = item.lng;
  210. let name = item.rtuName;
  211. let add = item.locationDesc;
  212. uni.openLocation({
  213. latitude: Number(lat),
  214. longitude: Number(lng),
  215. name: name,
  216. address: "",
  217. success() {}
  218. })
  219. },
  220. onOrderReportItemClick(id) {
  221. console.log("opne record ", id)
  222. var url = '/pages/check-order/orderprocessreportdetail?orderId=' + id;
  223. uni.navigateTo({
  224. url: url
  225. })
  226. },
  227. onManuallyCloseOrderClick(id) {
  228. uni.navigateTo({
  229. url: '/pages/check-order/manuallyclosecheckorder?id=' + id
  230. })
  231. },
  232. onComfireCheckOrderClick(id) {
  233. let url =
  234. '/pages/check-order/orderconfirm?id=' + id;
  235. uni.navigateTo({
  236. url: url
  237. })
  238. },
  239. getPage(params = {}) {
  240. const current = this.pageCurrent;
  241. const size = this.pageSize;
  242. let postData = Object.assign(params, this.query);
  243. let that = this;
  244. http.request({
  245. url: '/galaxy-business/rtu/check/order/page',
  246. method: 'GET',
  247. params: {
  248. current,
  249. size,
  250. },
  251. data: postData,
  252. }).then(res => {
  253. if (res.data.records != null) {
  254. that.list = res.data.records;
  255. }
  256. this.total = res.data.total;
  257. }).catch(err => {
  258. console.log(err)
  259. })
  260. },
  261. }
  262. }
  263. </script>
  264. <style lang="scss" scoped>
  265. .nav-title {
  266. width: 100%;
  267. display: flex;
  268. flex-direction: row;
  269. justify-content: center;
  270. align-items: center;
  271. text {
  272. color: white;
  273. font-size: 1rem;
  274. }
  275. }
  276. .container {
  277. padding: 0 0 100rpx;
  278. }
  279. </style>