repairDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. <template>
  2. <div class="addRepair">
  3. <div class="reportBody">
  4. <ul class="detailUl">
  5. <li class="detailLi">
  6. <span class="liName">当前企业</span>
  7. <span class="liInfo">无锡XXXXX有限公司</span>
  8. </li>
  9. <li class="detailLi">
  10. <span class="liName">
  11. <span style="color: red;margin-right: 10rpx;">*</span>
  12. 您是想
  13. </span>
  14. <span class="liInfo">
  15. <label class="radio" @click.stop="isCheck=true" >
  16. <radio value="报事" :checked="isCheck" color="#0365F9"/>报事
  17. </label>
  18. <label class="radio" @click.stop="isCheck=false" >
  19. <radio value="咨询" :checked="!isCheck" color="#0365F9"/>咨询
  20. </label>
  21. </span>
  22. </li>
  23. <li class="detailLi2">
  24. <span class="liName">
  25. 快捷选择
  26. </span>
  27. <div class="detailLi2Box">
  28. <div class="detailLi2BoxTop">
  29. <div class="checkItem" :class="item.isCheck?'checked':''" v-for="item in checkList" @click="clickCheck(item)">{{item.name}}</div>
  30. </div>
  31. <van-field
  32. :value="form.contant"
  33. autosize
  34. type="textarea"
  35. placeholder="请输入文字进行报事报修描述"
  36. class="myField"
  37. maxlength="800"
  38. show-word-limit
  39. />
  40. </div>
  41. </li>
  42. <li class="detailLi">
  43. <span class="liName">
  44. <span style="color: red;margin-right: 10rpx;">*</span>
  45. 位置
  46. </span>
  47. <span class="liInfo">
  48. <label class="radio" @click.stop="isCheck2=true" >
  49. <radio value="报事" :checked="isCheck2" color="#0365F9"/>室内
  50. </label>
  51. <label class="radio" @click.stop="isCheck2=false" >
  52. <radio value="咨询" :checked="!isCheck2" color="#0365F9"/>公区
  53. </label>
  54. </span>
  55. </li>
  56. <li class="detailLi2">
  57. <span class="liName">
  58. 补充说明
  59. <span style="color: #B3B3B3;font-size: 28rpx">(支持图片/视频上传限20M内,最多6张)</span>
  60. </span>
  61. <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
  62. <van-uploader
  63. :max-count="6"
  64. @delete="deleteRYXXZP"
  65. :file-list="fileList"
  66. @after-read="uploadRYXXZP"
  67. :show-upload="true"
  68. />
  69. </div>
  70. </li>
  71. <li class="detailLi">
  72. <span class="liName">
  73. 报事人
  74. </span>
  75. <span class="liInfo">
  76. 章敏-18915281562 <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon">
  77. </span>
  78. </li>
  79. <li class="detailLi" style="border-bottom: none">
  80. <span class="liName">
  81. 报事时间
  82. </span>
  83. <span class="liInfo">
  84. 2024-05-16 15:30
  85. </span>
  86. </li>
  87. </ul>
  88. </div>
  89. <div class="handleBox">
  90. <div class="handleTitle">处理情况</div>
  91. <div class="imageBox">
  92. <div class="imageItem">
  93. <img src="https://www.idea-co-sf.com/gardenProduct/image/upImage.svg" class="handleImg">
  94. <span>上报</span>
  95. </div>
  96. <img src="https://www.idea-co-sf.com/gardenProduct/image/arrow.png" class="handleArrow">
  97. <div class="imageItem">
  98. <img src="https://www.idea-co-sf.com/gardenProduct/image/acceptance.svg" class="handleImg">
  99. <span>受理</span>
  100. </div>
  101. <img src="https://www.idea-co-sf.com/gardenProduct/image/arrow.png" class="handleArrow">
  102. <div class="imageItem">
  103. <img :src="optionsType==='待受理'?'https://www.idea-co-sf.com/gardenProduct/image/unHandle.svg':'https://www.idea-co-sf.com/gardenProduct/image/handle.svg'" class="handleImg">
  104. <span>处理</span>
  105. </div>
  106. <img src="https://www.idea-co-sf.com/gardenProduct/image/arrow.png" class="handleArrow">
  107. <div class="imageItem">
  108. <img src="https://www.idea-co-sf.com/gardenProduct/image/evaluate.svg" class="handleImg">
  109. <span>评价</span>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="reportBody" v-if="optionsType!=='已处理'">
  114. <ul class="detailUl">
  115. <li class="detailLi">
  116. <span class="liInfo">
  117. <label>
  118. <radio value="报事" :checked="optionsType==='待受理'" color="#0365F9" :disabled="optionsType==='待处理'"/>派单
  119. </label>
  120. <label style="margin-left: 64rpx">
  121. <radio value="咨询" :checked="optionsType==='待处理'" color="#0365F9" :disabled="optionsType==='待受理'"/>处理
  122. </label>
  123. </span>
  124. </li>
  125. <li class="detailLi" v-if="optionsType==='待受理'">
  126. <span class="liName">
  127. 派单给
  128. </span>
  129. <span class="liInfo">
  130. 李开心
  131. </span>
  132. </li>
  133. <li class="detailLi2" v-if="optionsType==='待受理'">
  134. <span class="liName" style="margin-bottom: 16rpx">
  135. 备注
  136. </span>
  137. <van-field
  138. :value="form.contant"
  139. autosize
  140. type="textarea"
  141. placeholder="请输入文字进行报事报修描述"
  142. class="myField2"
  143. maxlength="800"
  144. show-word-limit
  145. />
  146. </li>
  147. <li class="detailLi2" v-if="optionsType==='待处理'">
  148. <span class="liName">
  149. 处理后拍照
  150. <span style="color: #B3B3B3;font-size: 28rpx">(支持图片上传限20M内,最多6张)</span>
  151. </span>
  152. <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
  153. <van-uploader
  154. :max-count="6"
  155. @delete="deleteRYXXZP"
  156. :file-list="fileList"
  157. @after-read="uploadRYXXZP"
  158. :show-upload="true"
  159. />
  160. </div>
  161. </li>
  162. <li class="detailLi" v-if="optionsType==='待处理'">
  163. <span class="liName">
  164. 处理人
  165. </span>
  166. <span class="liInfo">
  167. 李开心
  168. </span>
  169. </li>
  170. <li class="detailLi" v-if="optionsType==='待处理'" style="border-bottom: none">
  171. <span class="liName">
  172. 处理时间
  173. </span>
  174. <span class="liInfo">
  175. {{timeNow}}
  176. </span>
  177. </li>
  178. </ul>
  179. </div>
  180. <div class="reportBody" v-if="optionsType==='已处理'">
  181. <div class="handleTitle">派单信息</div>
  182. <ul class="detailUl">
  183. <li class="detailLi">
  184. <span class="liName">
  185. 派单给
  186. </span>
  187. <span class="liInfo">
  188. 李开心
  189. </span>
  190. </li>
  191. <li class="detailLi2">
  192. <span class="liName" style="margin-bottom: 16rpx">
  193. 备注
  194. </span>
  195. <van-field
  196. :value="form.contant"
  197. autosize
  198. type="textarea"
  199. placeholder="请输入文字进行报事报修描述"
  200. class="myField2"
  201. maxlength="800"
  202. show-word-limit
  203. />
  204. </li>
  205. <li class="detailLi">
  206. <span class="liName">
  207. 派单人
  208. </span>
  209. <span class="liInfo">
  210. 李欣怡
  211. </span>
  212. </li>
  213. <li class="detailLi" style="border-bottom: none">
  214. <span class="liName">
  215. 派单时间
  216. </span>
  217. <span class="liInfo">
  218. 2024-05-18 15:30
  219. </span>
  220. </li>
  221. </ul>
  222. </div>
  223. <div class="reportBody" v-if="optionsType==='已处理'">
  224. <div class="handleTitle">处理信息</div>
  225. <ul class="detailUl">
  226. <li class="detailLi2">
  227. <span class="liName">
  228. 处理后拍照
  229. <span style="color: #B3B3B3;font-size: 28rpx">(支持图片上传限20M内,最多6张)</span>
  230. </span>
  231. <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
  232. <van-uploader
  233. :max-count="6"
  234. @delete="deleteRYXXZP"
  235. :file-list="fileList"
  236. @after-read="uploadRYXXZP"
  237. :show-upload="true"
  238. />
  239. </div>
  240. </li>
  241. <li class="detailLi">
  242. <span class="liName">
  243. 处理人
  244. </span>
  245. <span class="liInfo">
  246. 李开心
  247. </span>
  248. </li>
  249. <li class="detailLi" style="border-bottom: none">
  250. <span class="liName">
  251. 处理时间
  252. </span>
  253. <span class="liInfo">
  254. 2024-05-18 15:30
  255. </span>
  256. </li>
  257. </ul>
  258. </div>
  259. <div class="reportBody" v-if="optionsType==='已处理'">
  260. <div class="evaluationBox" >
  261. <span class="evaName">您对本次服务的评价</span>
  262. <van-rate
  263. :value="value"
  264. :size="24"
  265. gutter="32rpx"
  266. void-color="#eee"
  267. bind:change="onChange"
  268. color="#fd9a63"
  269. />
  270. </div>
  271. </div>
  272. <div class="buttonBox">
  273. <button class="zcBtn" @tap="closePage" :class="optionsType==='已处理'?'btn2':'btn '">关闭</button>
  274. <button class="btn tjBtn" v-if="optionsType==='待受理'">提交派单</button>
  275. <button class="btn tjBtn" v-if="optionsType==='待处理'">处理完成</button>
  276. </div>
  277. </div>
  278. </template>
  279. <script>
  280. export default {
  281. data(){
  282. return{
  283. isCheck:false,
  284. isCheck2:false,
  285. form:{
  286. contant:''
  287. },
  288. checkList:[
  289. {name:'挂件安装',isCheck:true},
  290. {name:'我要投诉',isCheck:false},
  291. {name:'疏通管道',isCheck:false},
  292. {name:'维修线路',isCheck:false},
  293. {name:'更换灯泡',isCheck:false},
  294. {name:'网络维修',isCheck:false},
  295. {name:'保洁服务',isCheck:false},
  296. {name:'其他维修',isCheck:false},
  297. ],
  298. fileList:[],
  299. optionsType:'',
  300. timeNow:'',
  301. value: "5"
  302. }
  303. },
  304. onLoad(options) {
  305. console.log(options);
  306. this.optionsType = options.type
  307. if (options.type==='待处理'){
  308. uni.setNavigationBarTitle({
  309. title: '报修处理',
  310. });
  311. }else if(options.type==='已处理'){
  312. uni.setNavigationBarTitle({
  313. title: '报修详情',
  314. });
  315. }else {
  316. uni.setNavigationBarTitle({
  317. title: '报修派单',
  318. });
  319. }
  320. },
  321. mounted(){
  322. this.getTime()
  323. },
  324. methods:{
  325. // toRecord() {
  326. // uni.navigateTo({
  327. // url:'/pages/subPackages/reportRepair/repairRecord'
  328. // })
  329. // },
  330. getTime(){
  331. let timestamp = new Date().getTime();
  332. let dateStr = new Date().toLocaleDateString();
  333. console.log(dateStr);
  334. let date = new Date();
  335. let year = date.getFullYear();
  336. let month = date.getMonth() + 1;
  337. let day = date.getDate();
  338. let hours = date.getHours();
  339. let minutes = date.getMinutes();
  340. let fullDateStr = `${year}-${month}-${day} ${hours}:${minutes}`;
  341. console.log(fullDateStr);
  342. this.timeNow = fullDateStr
  343. },
  344. closePage() {
  345. uni.navigateTo({
  346. url:'/pages/subPackages/todo/repairAcceptance'
  347. })
  348. },
  349. clickCheck(item){
  350. item.isCheck = !item.isCheck
  351. },
  352. deleteRYXXZP(event) {
  353. this.fileList.splice(event.detail.index, 1);
  354. this.$forceUpdate();
  355. },
  356. uploadRYXXZP(event) {
  357. console.log(event)
  358. let that = this;
  359. const { file } = event.detail;
  360. uni.uploadFile({
  361. url: that.$constant.BASE_URI + "/wx/fileController/upload",
  362. filePath: file.url,
  363. name: "file",
  364. formData: { user: "test" },
  365. success(res) {
  366. // 上传完成需要更新 fileList
  367. let data = JSON.parse(res.data);
  368. that.fileList.push({
  369. imgUrl: "/FileController/download/" + data.data[0],
  370. id: data.data[0],
  371. url:
  372. that.$constant.BASE_URI +
  373. "/FileController/download/" +
  374. data.data[0],
  375. isImage: true,
  376. });
  377. },
  378. fail(res) {},
  379. });
  380. },
  381. }
  382. }
  383. </script>
  384. <style lang="scss">
  385. .addRepair{
  386. .reportBody{
  387. margin-top: 24rpx;
  388. padding: 38rpx 36rpx;
  389. background: white;
  390. //height: 1416rpx;
  391. box-sizing: border-box;
  392. .record {
  393. display: flex;
  394. align-items: center;
  395. justify-content: flex-end;
  396. color: #0365F9;
  397. font-size: 32rpx;
  398. .recordImg{
  399. width: 36rpx;
  400. height: 36rpx;
  401. padding: 5rpx 0 0 10rpx;
  402. }
  403. }
  404. .detailUl{
  405. margin-top: 20rpx;
  406. .liName{
  407. font-size: 32rpx;
  408. color: rgba(51, 51, 51, 1);
  409. white-space: nowrap;
  410. }
  411. .detailLi{
  412. display: flex;
  413. justify-content: space-between;
  414. align-items: center;
  415. padding: 32rpx 0;
  416. border-bottom: 2rpx solid #E6E6E6;
  417. .liInfo{
  418. display: inline-block;
  419. text-align: right;
  420. max-width: 428rpx;
  421. color: rgba(102, 102, 102, 1);
  422. font-size: 32rpx;
  423. line-height: 38rpx;
  424. display: flex;
  425. align-items: center;
  426. .radio{
  427. margin-left: 64rpx;
  428. }
  429. .phoneIcon{
  430. width: 64rpx;
  431. height: 64rpx;
  432. margin-left: 24rpx;
  433. }
  434. }
  435. }
  436. .detailLi2{
  437. display: flex;
  438. flex-direction: column;
  439. padding: 32rpx 0;
  440. border-bottom: 2rpx solid #E6E6E6;
  441. .detailLi2BoxTop{
  442. display: flex;
  443. flex-wrap: wrap;
  444. justify-content: space-between;
  445. margin: 12rpx 0;
  446. .checkItem{
  447. width: 160rpx;
  448. height: 64rpx;
  449. font-size: 28rpx;
  450. color: #666666;
  451. display: flex;
  452. align-items: center;
  453. justify-content: center;
  454. background: #F5F7FA;
  455. border-radius: 8rpx;
  456. margin: 12rpx 0;
  457. }
  458. .checked{
  459. background: #0365F9;
  460. color: white;
  461. }
  462. }
  463. }
  464. }
  465. }
  466. .van-cell {
  467. background: #F5F7FA !important;
  468. border-radius: 8rpx;
  469. font-size: 28rpx;
  470. }
  471. .buttonBox{
  472. display: flex;
  473. justify-content: center;
  474. .btn{
  475. width: 240rpx;
  476. height: 80rpx;
  477. display: flex;
  478. border-radius: 8rpx;
  479. align-items: center;
  480. justify-content: center;
  481. margin: 48rpx 16rpx 150rpx 16rpx;
  482. color: white;
  483. letter-spacing: 2rpx;
  484. text-indent: 2rpx;
  485. }
  486. .btn2{
  487. width: 654rpx;
  488. height: 96rpx;
  489. display: flex;
  490. border-radius: 8rpx;
  491. align-items: center;
  492. justify-content: center;
  493. margin: 48rpx 48rpx 150rpx 48rpx;
  494. color: white;
  495. letter-spacing: 2rpx;
  496. text-indent: 2rpx;
  497. }
  498. .zcBtn{
  499. background: rgba(0, 0, 0, 0.05);
  500. color: rgba(3, 101, 249, 1);
  501. &::after{
  502. border: none;
  503. }
  504. }
  505. .tjBtn{
  506. background: #0365F9;
  507. }
  508. }
  509. .handleBox{
  510. background: white;
  511. padding: 32rpx;
  512. margin: 24rpx 0;
  513. .imageBox{
  514. display: flex;
  515. justify-content: space-evenly;
  516. align-items: center;
  517. margin-top: 48rpx;
  518. .handleImg{
  519. width: 72rpx;
  520. height: 72rpx;
  521. margin-bottom: 8rpx;
  522. }
  523. .handleArrow{
  524. width: 64rpx;
  525. height: 20rpx;
  526. }
  527. }
  528. .imageItem{
  529. display: flex;
  530. flex-direction: column;
  531. align-items: center;
  532. color: rgba(34, 34, 34, 1);
  533. font-size: 28rpx;
  534. }
  535. }
  536. .handleTitle{
  537. color: rgba(34, 34, 34, 1);
  538. font-size: 36rpx;
  539. font-weight: 600;
  540. }
  541. .evaluationBox {
  542. width: 686rpx;
  543. height: 100rpx;
  544. padding: 0 24rpx;
  545. display: flex;
  546. align-items: center;
  547. justify-content: space-between;
  548. background: #f5f7fa;
  549. border-radius: 8rpx;
  550. box-sizing: border-box;
  551. margin-top: 24rpx;
  552. .evaName{
  553. font-size: 32rpx;
  554. color: rgba(51, 51, 51, 1);
  555. }
  556. }
  557. }
  558. </style>