detail.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. <template>
  2. <view class="warpbox">
  3. <view class="itembox">
  4. <view class="item_title">{{i18n['客户信息']}}</view>
  5. <view class="serwarp">
  6. <view class="label">{{i18n['联系人']}}</view>
  7. <view class="seright">{{info.linkman?info.linkman:''}}</view>
  8. </view>
  9. <view class="serwarp">
  10. <view class="label">{{i18n['手机号']}}</view>
  11. <view class="seright">{{info.linkfun?info.linkfun:''}}</view>
  12. </view>
  13. </view>
  14. <view class="itembox">
  15. <view class="item_title">{{i18n['服务信息']}}</view>
  16. <view class="serwarp">
  17. <view class="label">{{i18n['情况描述']}}</view>
  18. <view class="seright">{{info.desc}}</view>
  19. </view>
  20. <view class="serwarp">
  21. <view class="label">{{i18n['预约时间']}}</view>
  22. <view class="seright">{{info.createtime}}</view>
  23. </view>
  24. <view class="serwarp">
  25. <view class="label">{{i18n['图片']}}</view>
  26. <view class="imglist" v-if="info.file && info.file.length != 0">
  27. <view class="imgbox_con" v-for="(item,index) in info.file" :key="index" @click="toPreveimg(info.file,index)">
  28. <image :src="item.file_path" class="selfimg" mode=""></image>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="itembox" v-if="commList.length != 0">
  34. <view class="item_title" style="margin-bottom:24rpx;">{{i18n['评论内容']}}</view>
  35. <view class="comli" v-for="(item,index) in commList" :key="index">
  36. <view class="comcon">{{item.content}}</view>
  37. <view class="comtime">{{info.createtime}}</view>
  38. </view>
  39. </view>
  40. <view v-if="type == 1">
  41. <view class="itembox">
  42. <view class="item_title">{{i18n['评价内容']}}</view>
  43. <view class="serwarp">
  44. <view class="label">{{i18n['是否解决问题']}}</view>
  45. <view class="seright">
  46. <view class="form_right">
  47. <radio-group class="radiowarp">
  48. <view class="radiobox" v-for="(item, index) in typeList" :key="index">
  49. <radio disabled :value="item.id" color="#0287FF" :checked="item.id == info.is_resolved" />
  50. <view>{{item.name}}</view>
  51. </view>
  52. </radio-group>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="serwarp">
  57. <view class="label">{{i18n['手机号']}}</view>
  58. <view class="seright">{{info.linkfun}}</view>
  59. </view>
  60. <view class="serwarp">
  61. <view class="label key">{{i18n['评分']}}</view>
  62. <view class="form_right" v-if="info">
  63. <uni-rate :value="info.comment_score" readonly />
  64. </view>
  65. </view>
  66. <view class="serwarp" style="margin-top:0;">
  67. <view class="label">{{i18n['附件']}}:</view>
  68. <view class="form_right">
  69. <view class="righttext"></view>
  70. <view class="iconfont icon-arrows_right"></view>
  71. </view>
  72. </view>
  73. <view class="imglist" v-if="info.comment_files && info.comment_files.length != 0">
  74. <view class="imgbox_con" v-for="(item,index) in info.comment_files" :key="index" @click="toEvalPreveimg(info.comment_files,index)">
  75. <image :src="item" class="selfimg" mode=""></image>
  76. </view>
  77. </view>
  78. <view class="fllow_area">
  79. <view class="area_head key">{{i18n['情况说明']}}</view>
  80. <textarea v-model="info.comment_content" disabled class="textself" :placeholder="i18n['情况说明']" placeholder-style="color:#999" />
  81. </view>
  82. </view>
  83. </view>
  84. <view class="button" v-if="type != 1 && !info.is_resolved" @click="toComment">{{i18n['评价服务']}}</view>
  85. </view>
  86. </template>
  87. <script>
  88. import { netOrderDetail, netCommentList } from '@/api/api.js'
  89. export default{
  90. data(){
  91. return{
  92. showReply:false,
  93. id:'',
  94. info:{},
  95. commList:[],
  96. typeList:[],
  97. typeIndex:0,
  98. type:1, //1已评价 2未评价
  99. }
  100. },
  101. computed:{
  102. i18n() {
  103. return this.$t("progress")
  104. }
  105. },
  106. onLoad(options) {
  107. this.id = options.id
  108. this.type = options.type
  109. },
  110. onShow() {
  111. this.typeList = this.i18n['type']
  112. this.getDetail()
  113. uni.setNavigationBarTitle({
  114. title: this.i18n['工单详情']
  115. })
  116. },
  117. methods:{
  118. getDetail() {
  119. netOrderDetail({id:this.id}).then(res=>{
  120. this.info = res.data
  121. })
  122. },
  123. getComment() {
  124. netCommentList({id:this.id}).then(res=>{
  125. this.commList = res.data
  126. })
  127. },
  128. toPreveimg(arr,index) {
  129. let data = []
  130. arr.forEach(ele=>{
  131. data.push(ele.file_path)
  132. })
  133. uni.previewImage({
  134. current:index,
  135. urls:data
  136. })
  137. },
  138. toEvalPreveimg(arr,index) {
  139. uni.previewImage({
  140. current:index,
  141. urls:arr
  142. })
  143. },
  144. toComment() {
  145. uni.navigateTo({
  146. url:'/pages/evaluate/to_evaluate?id='+this.info.id
  147. })
  148. }
  149. }
  150. }
  151. </script>
  152. <style lang="scss" scoped>
  153. .warpbox{
  154. background: linear-gradient(180deg, #DFF0FF 0%, #F4F4F4 20%);
  155. .itembox{
  156. width:690rpx;
  157. margin:0 auto 24rpx;
  158. background:#fff;
  159. border-radius: 20rpx;
  160. padding:24rpx;
  161. .item_title{
  162. padding-left:35rpx;
  163. padding-bottom:24rpx;
  164. border-bottom:1rpx solid #EDEDED;
  165. font-size:26rpx;
  166. color:#666666;
  167. position: relative;
  168. &::before{
  169. content:'';
  170. width:14rpx;
  171. height:35rpx;
  172. border-radius: 8rpx;
  173. background:#65ABF6;
  174. position: absolute;
  175. left:0;
  176. top:3rpx;
  177. }
  178. }
  179. .comli{
  180. margin-bottom:35rpx;
  181. border-bottom:1rpx solid #EDEDED;
  182. padding-bottom:15rpx;
  183. .comcon{
  184. font-size:24rpx;
  185. color:#999999;
  186. line-height: 35rpx;
  187. }
  188. .comtime{
  189. text-align: right;
  190. font-size:24rpx;
  191. color:#999;
  192. margin-top:24rpx;
  193. }
  194. }
  195. .serwarp{
  196. display: flex;
  197. justify-content: space-between;
  198. align-items: center;
  199. padding:24rpx;
  200. font-size:24rpx;
  201. color:#666;
  202. .label{
  203. flex-shrink: 0;
  204. margin-right:15rpx;
  205. }
  206. .seright{
  207. text-align: right;
  208. }
  209. .imglist{
  210. display: flex;
  211. justify-content: flex-end;
  212. .imgbox_con{
  213. width:80rpx;
  214. height:80rpx;
  215. margin-left:15rpx;
  216. .selfimg{
  217. width:80rpx;
  218. height:80rpx;
  219. }
  220. }
  221. }
  222. }
  223. }
  224. }
  225. .imglist {
  226. padding: 24rpx 34rpx;
  227. background: #fff;
  228. border-bottom: 1rpx solid #EAEAEA;
  229. display: flex;
  230. justify-content: flex-start;
  231. align-items: center;
  232. flex-wrap: wrap;
  233. .imgbox_con {
  234. width: 160rpx;
  235. height: 160rpx;
  236. margin-right: 14rpx;
  237. position: relative;
  238. margin-bottom: 24rpx;
  239. border: 1rpx solid #EAEAEA;
  240. &:nth-child(4n){
  241. margin-right:0;
  242. }
  243. .selfimg {
  244. width: 160rpx;
  245. height: 160rpx;
  246. }
  247. }
  248. }
  249. .form_right{
  250. display: flex;
  251. justify-content: flex-end;
  252. align-items: center;
  253. color: #999;
  254. min-width:430rpx;
  255. text-align: right;
  256. .righttext{
  257. font-size:26rpx;
  258. }
  259. }
  260. .tipwarp{
  261. font-size:30rpx;
  262. color:#000;
  263. padding:15rpx 30rpx;
  264. width:750rpx;
  265. background:#f5f5f5;
  266. }
  267. .infowarp{
  268. width:750rpx;
  269. background:#fff;
  270. .info_li{
  271. padding:30rpx;
  272. margin-bottom:24rpx;
  273. .info_con{
  274. font-size:28rpx;
  275. color:#000;
  276. padding-left:45rpx;
  277. margin-bottom:10rpx;
  278. position: relative;
  279. &::before{
  280. content:'';
  281. width:20rpx;
  282. height:20rpx;
  283. border-radius: 50%;
  284. border:5rpx solid #4CD964;
  285. position: absolute;
  286. left:0;
  287. top:0;
  288. }
  289. }
  290. .info_time{
  291. font-size:26rpx;
  292. color:#666;
  293. padding-left:30rpx;
  294. }
  295. }
  296. }
  297. .serwarp{
  298. display: flex;
  299. justify-content: space-between;
  300. padding:24rpx 30rpx;
  301. border-bottom:1rpx solid #f5f5f5;
  302. .label{
  303. max-width: 300rpx;
  304. font-size:28rpx;
  305. color:#666;
  306. flex-shrink: 0;
  307. margin-right:24rpx;
  308. }
  309. .seright{
  310. font-size: 28rpx;
  311. color:#333;
  312. }
  313. }
  314. .imgbox{
  315. padding:24rpx 30rpx;
  316. .imglabel{
  317. font-size:28rpx;
  318. color:#333;
  319. padding-bottom:24rpx;
  320. border-bottom:1rpx solid #f5f5f5;
  321. }
  322. }
  323. .de_bot_warp{
  324. position: fixed;
  325. left:0;
  326. bottom:0;
  327. width:750rpx;
  328. height:90rpx;
  329. display: flex;
  330. justify-content: center;
  331. align-items: center;
  332. border-top:1rpx solid #f5f5f5;
  333. .bot_btn{
  334. width:300rpx;
  335. height:76rpx;
  336. border-radius: 38rpx;
  337. text-align: center;
  338. line-height: 76rpx;
  339. font-size:26rpx;
  340. color:#fff;
  341. background:#0287FF;
  342. }
  343. .bot_btn_remove{
  344. margin-left:15rpx;
  345. background:#999999;
  346. }
  347. }
  348. .fllow_area {
  349. background-color: #fff;
  350. padding:24rpx;
  351. margin-bottom: 30rpx;
  352. .area_head {
  353. height: 100rpx;
  354. font-size:26rpx;
  355. line-height: 100rpx;
  356. }
  357. .textself {
  358. width:560rpx;
  359. height: 230rpx;
  360. background:rgba(202, 202, 202, 0.2);
  361. box-sizing: border-box;
  362. padding:24rpx;
  363. font-size:26rpx;
  364. margin: 0 auto;
  365. border-radius: 20rpx;
  366. }
  367. }
  368. .radiowarp{
  369. display: flex;
  370. justify-content: flex-end;
  371. align-items: center;
  372. .radiobox{
  373. display: flex;
  374. justify-content: center;
  375. align-items: center;
  376. radio{
  377. transform: scale(0.7);
  378. }
  379. }
  380. }
  381. .fllow_form {
  382. display: flex;
  383. justify-content: space-between;
  384. background-color: #fff;
  385. border-bottom: 1rpx solid #EAEAEA;
  386. padding:24rpx 45rpx 24rpx 50rpx;
  387. .label{
  388. font-size:26rpx;
  389. text{
  390. color:red;
  391. }
  392. }
  393. }
  394. .inp_warp {
  395. padding:24rpx 45rpx 24rpx 50rpx;
  396. background: #fff;
  397. display: flex;
  398. justify-content: space-between;
  399. align-items: center;
  400. border-bottom: 1rpx solid #f5f5f5;
  401. .inp_title {
  402. font-size: 26rpx;
  403. color: #000;
  404. }
  405. .add_in{
  406. display: flex;
  407. justify-content: flex-end;
  408. align-items: center;
  409. font-size:26rpx;
  410. color:#14C2C1;
  411. .icon-jiahaocu{
  412. font-size:28rpx;
  413. color:#14c2c1;
  414. margin-right:5rpx;
  415. }
  416. }
  417. }
  418. </style>