order-close-approve.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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-forms ref="baseForm" :model="formData">
  19. <uni-section title="审批意见" ftitleFontSize="0.8rem" style="width: 100%;">
  20. <template v-slot:decoration>
  21. <view class="decoration"></view>
  22. </template>
  23. <view style="padding-top: 10px;padding-bottom: 0px;padding-left: 15px;padding-right: 15px;">
  24. <uni-forms-item>
  25. <uni-easyinput :styles="styles" type="textarea" v-model="formData.processDesc"
  26. placeholder="请录入工单完结审批意见" />
  27. </uni-forms-item>
  28. </view>
  29. </uni-section>
  30. <uni-card title="评分">
  31. <uni-rate v-model="formData.orderRate" />
  32. </uni-card>
  33. <!-- <uni-section title="评分" ftitleFontSize="0.8rem" style="width: 100%;">
  34. <template v-slot:decoration>
  35. <view class="decoration"></view>
  36. </template>
  37. <uni-rate v-model="formData.orderRate" />
  38. </uni-section> -->
  39. </uni-forms>
  40. <view class="view-btn">
  41. <button style="background-color: lightcoral;" type="default"
  42. @click="toOrderCloseConfirm()">工单关闭</button>
  43. </view>
  44. <uni-section title="工单处理详情" type="line">
  45. <uni-list>
  46. <uni-list-item v-for="(item,index) in orderProcessList" :key="item.id" direction="column">
  47. <template v-slot:body>
  48. <view class="point">
  49. <view class="dot">
  50. {{index+1}}
  51. </view>
  52. <view class="time-title">{{item.createTime}}【{{item.orderStatusName}}】</view>
  53. </view>
  54. <view class="time-info">
  55. <view class="time-line">
  56. <view v-if="item.orderStatusCode ==1" class="list-item-block">
  57. <view class="line" style="padding-left:12px">
  58. <view class="text" style="width: 90%;color: gray;">
  59. 工单创建人:<span
  60. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  61. </view>
  62. </view>
  63. <view class="line" style="padding-left:12px">
  64. <view class="text" style="width: 90%;color: gray;">
  65. 创建时间:<span
  66. style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
  67. </view>
  68. </view>
  69. <uni-card title="问题描述">
  70. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  71. </view>
  72. </uni-card>
  73. <uni-card title="处理照片">
  74. <view class="view-flex-rs-flex-wrap">
  75. <view v-for="(path, index) in item.failureProcessPhotoList" :key="index"
  76. class="view-flex-cc" style="width: 80px;">
  77. <view class="img-container">
  78. <view class="note-image-box">
  79. <view class="note-image-item">
  80. <view class="image-box">
  81. <image :src="toOss(path)" mode="widthFix"
  82. @click="openPhoto(path)">
  83. </image>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </uni-card>
  91. <uni-card title="处理视频">
  92. <view class="view-flex-inline">
  93. <image v-for="(path, index) in item.failureProcessVideoList"
  94. :key="index" mode="widthFix" style="width: 80px;" :src="videoImg"
  95. @click="openVideo(path)">
  96. </image>
  97. </view>
  98. </uni-card>
  99. </view>
  100. <view v-else-if="item.orderStatusCode ==2" class="list-item-block">
  101. <!-- <view class="line" style="padding-left:12px">
  102. <view v-if="orderType==1" class="text" style="color: gray;">工单类型:<span
  103. style="margin-left: 5px;color: cornflowerblue;">维修工单</span></view>
  104. <view v-else-if="orderType==2" class="text" style="color: gray;">工单类型:<span
  105. style="margin-left: 5px;color: cornflowerblue;">服务工单</span></view>
  106. <view v-else></view>
  107. </view> -->
  108. <view class="line" style="padding-left:12px">
  109. <view class="text" style="width: 90%;color: gray;">
  110. 处理人:<span
  111. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  112. </view>
  113. </view>
  114. <view class="line" style="padding-left:12px">
  115. <view class="text" style="width: 90%;color: gray;">
  116. 接单时间:<span
  117. style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
  118. </view>
  119. </view>
  120. <!-- <uni-card title="问题描述">
  121. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  122. </view>
  123. </uni-card>
  124. <uni-card title="处理照片">
  125. <view class="view-flex-rs-flex-wrap">
  126. <view v-for="(path, index) in item.failureProcessPhotoList" :key="index"
  127. class="view-flex-cc" style="width: 80px;">
  128. <view class="img-container">
  129. <view class="note-image-box">
  130. <view class="note-image-item">
  131. <view class="image-box">
  132. <image :src="toOss(path)" mode="widthFix"
  133. @click="openPhoto(path)">
  134. </image>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </uni-card> -->
  142. <!-- <uni-card title="处理视频">
  143. <view class="view-flex-inline">
  144. <image v-for="(path, index) in item.failureProcessVideoList"
  145. :key="index" mode="widthFix" style="width: 80px;" :src="videoImg"
  146. @click="openVideo(path)">
  147. </image>
  148. </view>
  149. </uni-card> -->
  150. </view>
  151. <view v-else-if="item.orderStatusCode ==3" class="list-item-block">
  152. <view class="line" style="padding-left:12px">
  153. <view class="text" style="width: 90%;color: gray;">
  154. 工单处理人:<span
  155. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  156. </view>
  157. </view>
  158. <view class="line" style="padding-left:12px">
  159. <view class="text" style="width: 90%;color: gray;">
  160. 处理时间:<span
  161. style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
  162. </view>
  163. </view>
  164. <uni-card v-if="orderType==1" title="故障现象描述">
  165. <view class="text" style="color: cornflowerblue;">{{item.failureCheckDesc}}
  166. </view>
  167. </uni-card>
  168. <uni-card v-else-if="orderType==2" title="服务内容描述">
  169. <view class="text" style="color: cornflowerblue;">{{item.failureCheckDesc}}
  170. </view>
  171. </uni-card>
  172. <view v-else></view>
  173. <uni-card title="解决措施说明">
  174. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  175. </view>
  176. </uni-card>
  177. <uni-card v-if="orderType==1 && item.costsReport==2" title="费用说明">
  178. <view class="text" style="color: cornflowerblue;">{{item.costsReportDesc}}
  179. </view>
  180. </uni-card>
  181. <uni-card title="处理照片">
  182. <view class="view-flex-rs-flex-wrap">
  183. <view v-for="(path, index) in item.failureProcessPhotoList" :key="index"
  184. class="view-flex-cc" style="width: 80px;">
  185. <view class="img-container">
  186. <view class="note-image-box">
  187. <view class="note-image-item">
  188. <view class="image-box">
  189. <image :src="toOss(path)" mode="widthFix"
  190. @click="openPhoto(path)">
  191. </image>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. </uni-card>
  199. </view>
  200. <view v-else-if="item.orderStatusCode ==5" class="list-item-block">
  201. <view class="line" style="padding-left:12px">
  202. <view class="text" style="width: 90%;color: gray;">
  203. 费用审批人:<span
  204. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  205. </view>
  206. </view>
  207. <uni-card title="审批意见">
  208. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  209. </view>
  210. </uni-card>
  211. </view>
  212. <view v-else-if="item.orderStatusCode ==7" class="list-item-block">
  213. <view class="line" style="padding-left:12px">
  214. <view class="text" style="width: 90%;color: gray;">
  215. 工单完结审批人:<span
  216. style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessUserName}}</span>
  217. </view>
  218. </view>
  219. <uni-card title="审批意见">
  220. <view class="text" style="color: cornflowerblue;">{{item.processDesc}}
  221. </view>
  222. </uni-card>
  223. </view>
  224. </view>
  225. </view>
  226. </template>
  227. </uni-list-item>
  228. </uni-list>
  229. </uni-section>
  230. <view style="margin-top: 5px;margin-bottom: 10px;padding-left: 10px;padding-right: 10px;">
  231. <button style="background-color: lightcoral;" type="default" @click="toTopClick()">返回顶部</button>
  232. </view>
  233. </view>
  234. </view>
  235. </template>
  236. <script>
  237. import http from '@/http/api.js';
  238. import {
  239. oss,
  240. devUrl,
  241. prodUrl
  242. } from '@/common/setting';
  243. export default {
  244. components: {
  245. },
  246. data() {
  247. return {
  248. title: '工单完结审批',
  249. orderId: '',
  250. orderType: 1,
  251. orderProcessList: [],
  252. formData: {
  253. processDesc: '',
  254. orderRate: 5,
  255. },
  256. orderInfo: {
  257. 'id': 0,
  258. 'updateTime': '',
  259. 'orderDesc': '',
  260. 'orderConfirm': 0,
  261. },
  262. styles: {
  263. color: '#333',
  264. borderColor: '#e5e5e5',
  265. disableColor: '#FFFFFF'
  266. },
  267. baseURL: '',
  268. baseOSS: '',
  269. videoImg: '/static/images/video.png',
  270. }
  271. },
  272. computed: {},
  273. onLoad(option) {
  274. this.orderId = option.orderId;
  275. this.orderType = option.orderType;
  276. this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  277. this.baseOSS = oss;
  278. this.getDetail();
  279. },
  280. onShow() {},
  281. methods: {
  282. toOss(path) {
  283. let url = this.baseOSS + path;
  284. //console.log("tooss " + url)
  285. return url;
  286. },
  287. toBack() {
  288. uni.navigateBack({
  289. delta: 1
  290. })
  291. },
  292. toTopClick() {
  293. uni.pageScrollTo({
  294. scrollTop: 0,
  295. duration: 100,
  296. });
  297. },
  298. openPhoto(file) {
  299. let url = '/pages/check-order/photoView?url=' + file;
  300. uni.navigateTo({
  301. url: url
  302. })
  303. },
  304. openVideo(file) {
  305. let url = '/pages/check-order/videoView?url=' + file;
  306. uni.navigateTo({
  307. url: url
  308. })
  309. },
  310. getDetail() {
  311. let that = this;
  312. let postData = {};
  313. postData['orderId'] = this.orderId;
  314. http.request({
  315. url: '/galaxy-business/order/process/list',
  316. method: 'GET',
  317. data: postData,
  318. }).then(res => {
  319. if (res.data != null) {
  320. console.log(JSON.stringify(res.data))
  321. that.orderProcessList = res.data;
  322. }
  323. }).catch(err => {
  324. console.log(JOSN.stringify(err))
  325. })
  326. },
  327. toOrderCloseConfirm() {
  328. let that = this;
  329. uni.showModal({
  330. content: '确定关闭该工单?',
  331. showCancel: true,
  332. success(res) {
  333. if (res.confirm) {
  334. that.formData['orderId'] = that.orderId;
  335. http.request({
  336. url: '/galaxy-business/order/process/closeapprove',
  337. method: 'POST',
  338. params: that.formData
  339. }).then(res => {
  340. console.log(res)
  341. if (res.success) {
  342. that.toBack();
  343. }
  344. }).catch(err => {
  345. console.log(err)
  346. })
  347. }
  348. }
  349. });
  350. },
  351. toOrderProcessReport() {
  352. var url = '/pages/check-order/orderprocessreport?orderId=' + this.id + '&skipPage=2';
  353. uni.navigateTo({
  354. url: url
  355. })
  356. },
  357. }
  358. }
  359. </script>
  360. <style>
  361. /* page {
  362. background-color: rgb(240, 242, 244);
  363. } */
  364. </style>
  365. <style lang="scss" scoped>
  366. .view-btn {
  367. margin-top: 20px;
  368. margin-bottom: 20px;
  369. padding-left: 10px;
  370. padding-right: 10px;
  371. }
  372. .line-space {
  373. margin-top: 4px;
  374. }
  375. .point {
  376. display: flex;
  377. flex-direction: row;
  378. align-items: center;
  379. margin: 15rpx 0;
  380. }
  381. .dot {
  382. //margin-left: -22rpx;
  383. background-color: #19be6b;
  384. box-shadow: 0 0 5rpx 5rpx #71d5a1;
  385. color: white;
  386. width: 50rpx;
  387. height: 50rpx;
  388. padding: 5rpx;
  389. font-size: 28rpx;
  390. text-align: center;
  391. border-radius: 50rpx;
  392. }
  393. .time-title {
  394. font-size: 30rpx;
  395. margin-left: 15rpx;
  396. background-color: whitesmoke;
  397. padding: 12rpx 25rpx;
  398. border-radius: 50rpx;
  399. color: orangered;
  400. }
  401. .time-info {
  402. padding: 0rpx 0rpx 0rpx 25rpx;
  403. }
  404. .time-line {
  405. border-left: 3rpx solid #71d5a1;
  406. padding: 10rpx 10rpx 30rpx 20rpx;
  407. }
  408. </style>