ordercloseapprove.vue 14 KB

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