processcheckorderlistview.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. <!-- <view v-if="orderClose==0" class="view-flex-inline-center">
  19. <view style="width: 90%;margin-top: 20px;margin-bottom: 20px;">
  20. <button type="warn" @click="toCancelOrder()">取消工单</button>
  21. </view>
  22. </view> -->
  23. <view v-if="orderClose==1">
  24. <uni-card title="工单评分">
  25. <uni-rate :value="orderRate" color="#bbb" active-color="coral" />
  26. </uni-card>
  27. </view>
  28. <uni-list style="width: 100%;">
  29. <uni-list-item v-for="(item,index) in list" :key="item.id" direction="column">
  30. <template v-slot:body>
  31. <view class="point">
  32. <view class="dot">
  33. {{index+1}}
  34. </view>
  35. <view class="time-title">{{item.createTime}}【{{item.orderStatusName}}】</view>
  36. </view>
  37. <view class="time-info">
  38. <view class="time-line">
  39. <!-- 新工单 -->
  40. <view v-if="item.orderStatusCode ==1" class="list-item-block">
  41. <view class="line" style="padding-left:12px">
  42. <view class="text" style="color: gray;width: 90%;">
  43. 创建人:<span
  44. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  45. </view>
  46. </view>
  47. <uni-card title="问题描述">
  48. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  49. </view>
  50. </uni-card>
  51. <uni-card title="照片">
  52. <view class="view-flex-rs-flex-wrap">
  53. <view v-for="(path, index) in item.failureProcessPhotoList" :key="index"
  54. class="view-flex-cc" style="width: 80px;">
  55. <view class="img-container">
  56. <view class="note-image-box">
  57. <view class="note-image-item">
  58. <view class="image-box">
  59. <image :src="toOss(path)" mode="widthFix"
  60. @click="openPhoto(path)">
  61. </image>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </uni-card>
  69. <uni-card title="视频">
  70. <view class="view-flex-inline">
  71. <image v-for="(path, index) in item.failureProcessVideoList" :key="index"
  72. mode="widthFix" style="width: 80px;" :src="videoImg"
  73. @click="openVideo(path)">
  74. </image>
  75. </view>
  76. </uni-card>
  77. </view>
  78. <!-- 工单下发 -->
  79. <view v-if="item.orderStatusCode ==2" class="list-item-block">
  80. <view class="line" style="padding-left:12px">
  81. <view class="text" style="color: gray;width: 90%;">
  82. 处理人:<span
  83. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  84. </view>
  85. </view>
  86. </view>
  87. <!-- 工单处理中 -->
  88. <view v-else-if="item.orderStatusCode ==3" class="list-item-block">
  89. <view class="line" style="padding-left:12px">
  90. <view class="text" style="width: 90%;color: gray;">
  91. 工单处理人:<span
  92. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  93. </view>
  94. </view>
  95. <uni-card v-if="orderType==1" title="故障现象描述">
  96. <view class="text" style="color: cornflowerblue;">{{item.failureCheckDesc}}
  97. </view>
  98. </uni-card>
  99. <uni-card v-else-if="orderType==2" title="服务内容描述">
  100. <view class="text" style="color: cornflowerblue;">{{item.failureCheckDesc}}
  101. </view>
  102. </uni-card>
  103. <uni-card title="解决措施说明">
  104. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  105. </view>
  106. </uni-card>
  107. <uni-card v-if="orderType==1 && item.costsReport==2" title="费用说明">
  108. <view class="text" style="color: cornflowerblue;">{{item.costsReportDesc}}
  109. </view>
  110. </uni-card>
  111. <uni-card title="照片">
  112. <view class="view-flex-rs-flex-wrap">
  113. <view v-for="(path, index) in item.failureProcessPhotoList" :key="index"
  114. class="view-flex-cc" style="width: 80px;">
  115. <view class="img-container">
  116. <view class="note-image-box">
  117. <view class="note-image-item">
  118. <view class="image-box">
  119. <image :src="toOss(path)" mode="widthFix"
  120. @click="openPhoto(path)">
  121. </image>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. <!-- <view class="view-flex-block-center">
  129. <image v-for="(path, index) in item.failureProcessPhotoList" :key="index"
  130. mode="widthFix" style="width: 80%;margin-top: 10px;" :src="toOss(path)">
  131. </image>
  132. </view> -->
  133. </uni-card>
  134. </view>
  135. <!-- 关闭审批 -->
  136. <view v-else-if="item.orderStatusCode ==7" class="list-item-block">
  137. <view class="line" style="padding-left:12px">
  138. <view class="text" style="width: 90%;color: gray;">
  139. 审批人:<span
  140. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  141. </view>
  142. </view>
  143. <uni-card title="审批意见">
  144. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  145. </view>
  146. </uni-card>
  147. </view>
  148. <!-- 取消 -->
  149. <!-- <view v-else-if="item.orderStatusCode ==8" class="list-item-block">
  150. <view class="line" style="padding-left:12px">
  151. <view class="text" style="width: 90%;color: gray;">
  152. 处理人:<span
  153. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  154. </view>
  155. </view>
  156. <uni-card title="取消说明">
  157. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  158. </view>
  159. </uni-card>
  160. </view> -->
  161. </view>
  162. </view>
  163. </template>
  164. </uni-list-item>
  165. </uni-list>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. import {
  171. role
  172. } from "@/api/role.js";
  173. import http from '@/http/api.js';
  174. import {
  175. oss,
  176. devUrl,
  177. prodUrl
  178. } from '@/common/setting';
  179. export default {
  180. components: {},
  181. data() {
  182. return {
  183. title: '工单处理记录详情',
  184. permission: {
  185. 'admin': false,
  186. 'orgAdmin': false,
  187. 'companyAdmin': false,
  188. 'companyServciePerson': false,
  189. },
  190. pageSize: 10,
  191. pageCurrent: 1,
  192. total: 0,
  193. list: [],
  194. query: {},
  195. orderId: '',
  196. orderType: 1,
  197. orderRate: 0,
  198. baseURL: '',
  199. baseOSS: '',
  200. videoImg: '/static/images/video.png',
  201. orderClose: 0,
  202. }
  203. },
  204. computed: {},
  205. onLoad(option) {
  206. this.permission.admin = false;
  207. this.permission.orgAdmin = false;
  208. this.permission.companyAdmin = false;
  209. this.permission.companyServciePerson = false;
  210. if (this.userInfo.role_name === role.admin) {
  211. this.permission.admin = true;
  212. } else if (this.userInfo.role_name === role.orgAdmin) {
  213. this.permission.orgAdmin = true;
  214. } else if (this.userInfo.role_name === role.companyAdmin) {
  215. this.permission.companyAdmin = true;
  216. } else if (this.userInfo.role_name === role.companyServciePerson) {
  217. this.permission.companyServciePerson = true;
  218. if (this.userInfo.post_id == '1706859505948098562') {
  219. this.postName = "engineer";
  220. } else if (this.userInfo.post_id == '1730535542909140993') {
  221. this.postName = "servicePerson";
  222. }
  223. }
  224. this.orderClose = option.orderClose;
  225. this.orderId = option.orderId;
  226. this.orderType = option.orderType;
  227. if (this.orderClose == 1) {
  228. this.orderRate = option.orderRate;
  229. }
  230. this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  231. this.baseOSS = oss;
  232. this.query = {};
  233. this.query['orderId'] = this.orderId;
  234. this.pageCurrent = 1;
  235. this.getPage()
  236. },
  237. onShow() {},
  238. methods: {
  239. toOss(path) {
  240. return this.baseOSS + path;
  241. },
  242. toBack() {
  243. uni.navigateBack({
  244. delta: 1
  245. })
  246. },
  247. onBackPress() {
  248. // #ifdef APP-PLUS
  249. plus.key.hideSoftKeybord();
  250. // #endif
  251. },
  252. pageChange(e) {
  253. this.pageCurrent = e.current;
  254. this.getPage()
  255. },
  256. toCancelOrder() {
  257. uni.navigateTo({
  258. url: '/pages/check-order/ordercancel?id=' + this.orderId
  259. })
  260. },
  261. openPhoto(file) {
  262. let url = '/pages/check-order/photoView?url=' + file;
  263. uni.navigateTo({
  264. url: url
  265. })
  266. },
  267. openVideo(file) {
  268. let url = '/pages/check-order/videoView?url=' + file;
  269. uni.navigateTo({
  270. url: url
  271. })
  272. },
  273. getPage(params = {}) {
  274. let postData = Object.assign(params, this.query);
  275. let that = this;
  276. http.request({
  277. url: '/galaxy-business/order/process/list',
  278. method: 'GET',
  279. data: postData,
  280. }).then(res => {
  281. if (res.data != null) {
  282. console.log(JSON.stringify(res.data))
  283. that.list = res.data;
  284. }
  285. }).catch(err => {
  286. console.log(err)
  287. })
  288. },
  289. }
  290. }
  291. </script>
  292. <style lang="scss" scoped>
  293. .point {
  294. display: flex;
  295. flex-direction: row;
  296. align-items: center;
  297. margin: 15rpx 0;
  298. }
  299. .dot {
  300. //margin-left: -22rpx;
  301. background-color: #19be6b;
  302. box-shadow: 0 0 5rpx 5rpx #71d5a1;
  303. color: white;
  304. width: 50rpx;
  305. height: 50rpx;
  306. padding: 5rpx;
  307. font-size: 28rpx;
  308. text-align: center;
  309. border-radius: 50rpx;
  310. }
  311. .time-title {
  312. font-size: 30rpx;
  313. margin-left: 15rpx;
  314. background-color: whitesmoke;
  315. padding: 12rpx 25rpx;
  316. border-radius: 50rpx;
  317. color: orangered;
  318. }
  319. .time-info {
  320. padding: 0rpx 0rpx 0rpx 25rpx;
  321. }
  322. .time-line {
  323. border-left: 3rpx solid #71d5a1;
  324. padding: 10rpx 10rpx 30rpx 20rpx;
  325. }
  326. </style>