management.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. <template>
  2. <scroll-view class="container" :scroll-y="scrollY" @scrolltolower="scrolltolower">
  3. <view class="top_bg"></view>
  4. <!-- 状态统计区域 管理者端 -->
  5. <view class="top_types2" v-if="btns.includes('工单管理分段器')">
  6. <view class="top">
  7. <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#6FB6B8"></uni-segmented-control>
  8. </view>
  9. <view class="bottom">
  10. <view class="bottom_box" :class="{ active: state === 1 }" @click="handleFilter(1)">
  11. <view class="box_num">{{ receivingCount }}</view>
  12. <view class="box_info">待接单</view>
  13. </view>
  14. <view class="bottom_box" :class="{ active: state === 2 }" @click="handleFilter(2)">
  15. <view class="box_num">{{ maintenanceCount }}</view>
  16. <view class="box_info">维修中</view>
  17. </view>
  18. <view class="bottom_box" :class="{ active: state === 3 }" @click="handleFilter(3)">
  19. <view class="box_num">{{ timeoutCount }}</view>
  20. <view class="box_info">已超时</view>
  21. </view>
  22. <view class="bottom_box" :class="{ active: state === 4 }" @click="handleFilter(4)">
  23. <view class="box_num">{{ examineCount }}</view>
  24. <view class="box_info">待审核</view>
  25. </view>
  26. <view class="bottom_box" :class="{ active: state === 5 }" v-if="current === 0" @click="handleFilter(5)">
  27. <view class="box_num">{{ finishedCount }}</view>
  28. <view class="box_info">已完成</view>
  29. </view>
  30. <view class="bottom_box" :class="{ active: state === 7 }" v-if="current === 0" @click="handleFilter(7)">
  31. <view class="box_num">{{ closedCount }}</view>
  32. <view class="box_info">已关单</view>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 状态统计区域 维修师傅 后勤端 -->
  37. <view class="top_types" v-else>
  38. <view class="types_box" :class="{ active: state === 1 }" @click="handleFilter(1)">
  39. <view class="box_num">{{ receivingCount }}</view>
  40. <view class="box_info">待接单</view>
  41. </view>
  42. <view class="types_box" :class="{ active: state === 2 }" @click="handleFilter(2)">
  43. <view class="box_num">{{ maintenanceCount }}</view>
  44. <view class="box_info">维修中</view>
  45. </view>
  46. <view class="types_box" :class="{ active: state === 3 }" @click="handleFilter(3)">
  47. <view class="box_num">{{ timeoutCount }}</view>
  48. <view class="box_info">已超时</view>
  49. </view>
  50. <view class="types_box" :class="{ active: state === 4 }" @click="handleFilter(4)">
  51. <view class="box_num">{{ examineCount }}</view>
  52. <view class="box_info">待审核</view>
  53. </view>
  54. <view class="types_box" v-if="btns.includes('分段器按钮')" :class="{ active: state === 6 }" @click="handleFilter(6)">
  55. <view class="box_num">{{ logisticsCount }}</view>
  56. <view class="box_info">待处理</view>
  57. </view>
  58. <view class="types_box" v-if="btns.includes('分段器按钮')" :class="{ active: state === 5 }" @click="handleFilter(5)">
  59. <view class="box_num">{{ finishedCount }}</view>
  60. <view class="box_info">已完成</view>
  61. </view>
  62. <view class="types_box" v-if="btns.includes('分段器按钮')" :class="{ active: state === 7 }" @click="handleFilter(7)">
  63. <view class="box_num">{{ closedCount }}</view>
  64. <view class="box_info">已关单</view>
  65. </view>
  66. </view>
  67. <!-- 订单列表区域 -->
  68. <view class="body">
  69. <!-- 每一个订单区域 -->
  70. <view class="body_item" v-for="item in dataList" :key="item.id" @click="handleGoDetail(item)">
  71. <!-- 工单编号 -->
  72. <view class="item_title">
  73. <img src="../../static/images/repairsImg/order.png" />
  74. <view class="title_info">工单编号:{{ item.recordNo }}</view>
  75. </view>
  76. <!-- 报修时间 -->
  77. <view class="item_time">
  78. <view class="time_msg">
  79. 报修时间:
  80. <text>{{ item.reportTime }}</text>
  81. </view>
  82. <view class="time_type" v-if="item.state === '待接单'">待接单</view>
  83. <view class="time_type color_type" v-if="item.state === '维修中'">维修中</view>
  84. <view class="time_type color_type" v-if="item.state === '协作待审核'">协作待审核</view>
  85. <view class="time_type color_type" v-if="item.state === '转单待审核'">转单待审核</view>
  86. <view class="time_type color_type2" v-if="item.state === '待审核'">待审核</view>
  87. <view class="time_type color_type3" v-if="item.state === '已完成'">已完成</view>
  88. <view class="time_type" v-if="item.state === '待确认'">待确认</view>
  89. <view class="time_type color_type4" v-if="item.state === '已关单'">已关单</view>
  90. </view>
  91. <!-- 报修姓名 -->
  92. <view class="item_box">
  93. <view class="box_key">报修姓名:</view>
  94. <view class="box_value">{{ item.userName }}</view>
  95. <view class="box_type" v-if="item.timeoutStr">超时未接</view>
  96. <view class="box_type" v-if="item.maintenanceTimeout">维修超时</view>
  97. </view>
  98. <!-- 报修电话 -->
  99. <view class="item_box">
  100. <view class="box_key">报修电话:</view>
  101. <view class="box_value phone" @click.stop="handleCallPhone(item.userPhone)">
  102. {{ item.userPhone }}
  103. <img src="../../static/images/repairsImg/phone.png" />
  104. </view>
  105. </view>
  106. <!-- 报修区域 -->
  107. <view class="item_box">
  108. <view class="box_key">报修区域:</view>
  109. <view class="box_value">{{ item.areaName }}</view>
  110. </view>
  111. <!-- 详细地址 -->
  112. <view class="item_box">
  113. <view class="box_key">详细地址:</view>
  114. <view class="box_value">{{ item.address }}</view>
  115. </view>
  116. <!-- 报修物品 -->
  117. <view class="item_box">
  118. <view class="box_key">报修物品:</view>
  119. <view class="box_value">{{ item.articleName }}</view>
  120. </view>
  121. <!-- 故障描述 -->
  122. <view class="item_box" v-if="item.description">
  123. <view class="box_key">故障描述:</view>
  124. <view class="box_value">{{ item.description }}</view>
  125. </view>
  126. <!-- 报修录音 -->
  127. <view class="item_box" v-if="item.voice">
  128. <view class="box_key">报修录音:</view>
  129. <view class="box_value">
  130. <view class="recording" @click.stop="handlePlayRecording(item)">
  131. <img class="voiceImg" :src="item.status ? '../../static/images/repairsImg/play_active.png' : '../../static/images/repairsImg/play.png'" />
  132. {{ item.voiceLength }}″
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 上传图片 -->
  137. <view class="item_img">
  138. <view class="img_key">上传图片:</view>
  139. <img class="img_value" mode="aspectFill" :src="item.images[0]" @click.stop="handleLookImgs(item.images)" />
  140. </view>
  141. <!-- 维修师傅 -->
  142. <view class="item_time" v-if="item.state !== '待接单' && item.state !== '待确认' && item.maintenancerName">
  143. <view class="time_msg">
  144. 维修师傅:
  145. <text>{{ item.maintenancerName }}</text>
  146. </view>
  147. </view>
  148. <!-- 师傅电话 -->
  149. <view class="item_box" v-if="item.state !== '待接单' && item.state !== '待确认' && item.maintenancerPhone">
  150. <view class="box_key">师傅电话:</view>
  151. <view class="box_value phone" @click.stop="handleCallPhone(item.maintenancerPhone)">
  152. {{ item.maintenancerPhone }}
  153. <img src="../../static/images/repairsImg/phone.png" />
  154. </view>
  155. </view>
  156. <!-- 维修费用 -->
  157. <view class="item_box" v-if="item.price">
  158. <view class="box_key">维修费用:</view>
  159. <view class="box_value2 phone" @click.stop="checkFeeDetail(item)">
  160. {{ item.price }}元
  161. <img src="../../static/images/repairsImg/eye.png" />
  162. </view>
  163. </view>
  164. <!-- 按钮区域 -->
  165. <view class="item_btn">
  166. <!-- 关闭按钮 -->
  167. <img v-if="item.state === '待接单'" src="../../static/images/repairsImg/close.png" @click.stop="handleClose(item)" />
  168. <!-- 协作按钮 -->
  169. <img class="img" src="../../static/images/repairsImg/help.png" v-if="item.state === '待接单' && btns.includes('协作')" @click.stop="handleHelp(item)" />
  170. <!-- 延时按钮 -->
  171. <view class="btn_box type" v-if="(item.state === '待接单' || item.state === '维修中') && btns.includes('延时')" @click.stop="handleDelay(item)">延时</view>
  172. <!-- 接单按钮 -->
  173. <!-- <view class="btn_box type" v-if="item.state === '待接单' && btns.includes('接单')" @click.stop="handleOrderReceiving(item)">接单</view> -->
  174. <!-- 转单按钮 -->
  175. <view class="btn_box type2" v-if="item.state === '待接单' && btns.includes('转单')" @click.stop="handleTransferOrder(item)">转单</view>
  176. <!-- 派单按钮 -->
  177. <!-- <view class="btn_box type2" v-if="item.state === '待接单' && btns.includes('派单')" @click.stop="handleSendOrder(item)">派单</view> -->
  178. <!-- 报价按钮 -->
  179. <view class="btn_box type" v-if="!item.price && item.state === '维修中' && btns.includes('报价')" @click.stop="handleOffer(item)">报价</view>
  180. <!-- 维修完成按钮 -->
  181. <view class="btn_box type2" v-if="item.state === '维修中' && btns.includes('维修完成')" @click.stop="handleFinish(item)">维修完成</view>
  182. <!-- 审核按钮 -->
  183. <view class="btn_box type" v-if="(item.state === '协作审核' || item.state === '转单审核') && btns.includes('审核')" @click.stop="handleAudit(item)">审核</view>
  184. <!-- 改价按钮 -->
  185. <view class="btn_box type" v-if="item.state === '待确认'" @click.stop="handleChangeOffer(item)">改价</view>
  186. <!-- 留言按钮 -->
  187. <view class="btn_box type2" v-if="item.state === '待确认'" @click.stop="handleLeaveWords">留言</view>
  188. </view>
  189. </view>
  190. <!-- 关闭按钮弹窗 -->
  191. <uni-popup ref="popup_close" :is-mask-click="false">
  192. <view class="popup_close">
  193. <view
  194. :class="[{ active: activeIndex === index }, { radius: index === 0 }]"
  195. class="close_box"
  196. v-for="(ele, index) in closeList"
  197. :key="ele.id"
  198. @click="handleChangeItem(index)"
  199. >
  200. {{ ele.name }}
  201. </view>
  202. <view class="close_btn">
  203. <view class="btn_box cancel" @click="$refs.popup_close.close()">取消</view>
  204. <view class="btn_box confirm" @click="handleCloseConfirm">确定</view>
  205. </view>
  206. </view>
  207. </uni-popup>
  208. <!-- 留言弹窗 -->
  209. <uni-popup ref="popup_leaveWords" :is-mask-click="false">
  210. <view class="pop_leaveWords">
  211. <view class="leaveWords_title">留言</view>
  212. <view class="leaveWords_body">
  213. <textarea placeholder-style="color:#CCCCCC" placeholder="请输入您宝贵的留言" v-model="leaveWords"></textarea>
  214. </view>
  215. <view class="leaveWords_btn">
  216. <view class="btn_box cancel" @click="$refs.popup_leaveWords.close()">取消</view>
  217. <view class="btn_box confirm" @click="handleLeaveWordsConfirm">确定</view>
  218. </view>
  219. </view>
  220. </uni-popup>
  221. <!-- 维修费用弹窗 -->
  222. <uni-popup :is-mask-click="false" ref="popup_fee">
  223. <view class="pop_fee">
  224. <view class="fee_title">
  225. 维修费用
  226. <text @click="$refs.popup_fee.close()">×</text>
  227. </view>
  228. <view class="fee_content">
  229. <view class="fee_item" v-for="(element, index2) in goodsList" :key="index2">
  230. <view class="fee_box">
  231. 耗材:
  232. <text>{{ element.name }}</text>
  233. </view>
  234. <view class="fee_box">
  235. 耗材单价:
  236. <text>{{ element.price }}元</text>
  237. </view>
  238. <view class="fee_box">
  239. 耗材数量:
  240. <text>{{ element.num }}</text>
  241. </view>
  242. <view class="fee_box">
  243. 耗材费用:
  244. <text>{{ element.count }}元</text>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. </uni-popup>
  250. </view>
  251. <!-- 没有数据时展示的图片 -->
  252. <view class="no_data" v-if="dataList.length === 0">
  253. <img src="../../pagesClockIn/static/imgs/nodata.png" />
  254. <view>暂无数据</view>
  255. </view>
  256. </scroll-view>
  257. </template>
  258. <script>
  259. const innerAudioContext = uni.createInnerAudioContext()
  260. export default {
  261. data() {
  262. return {
  263. scrollY: true,
  264. // 按钮权限
  265. btns: [],
  266. // 留言弹窗输入框绑定数据
  267. leaveWords: '',
  268. // 顶部分段器数组
  269. items: ['团队工单', '个人工单'],
  270. // 顶部分段器数组当前索引
  271. current: 0,
  272. // 关闭按钮弹窗当前索引
  273. activeIndex: 0,
  274. // 关闭按钮弹窗选项数组
  275. closeList: [],
  276. // 订单列表
  277. dataList: [],
  278. // 维修费用弹窗数组
  279. goodsList: [],
  280. // 校区id
  281. schoolId: '',
  282. // 用户ID
  283. userId: '',
  284. // 待处理
  285. logisticsCount: '',
  286. // 待审核
  287. examineCount: '',
  288. // 待接单
  289. receivingCount: '',
  290. // 维修中
  291. maintenanceCount: '',
  292. // 已完成
  293. finishedCount: '',
  294. // 已超时
  295. timeoutCount: '',
  296. // 已关单
  297. closedCount: '',
  298. // 当前页
  299. currentPage: 1,
  300. // 每页多少条
  301. pageCount: 2,
  302. // 总条数 团队
  303. total: null,
  304. // 总条数 个人
  305. total2: null,
  306. // 订单状态参数
  307. state: 1,
  308. // 订单id
  309. orderId: ''
  310. }
  311. },
  312. mounted() {
  313. const repairsUserInfo = uni.getStorageSync('repairsUserInfo')
  314. this.schoolId = repairsUserInfo.schoolId
  315. this.userId = repairsUserInfo.userId
  316. this.btns = repairsUserInfo.btns
  317. if (this.btns.includes('工单管理分段器') || this.btns.includes('分段器按钮')) {
  318. // 管理员身份或者后勤
  319. this.getTeamCount()
  320. this.getTeamData()
  321. } else {
  322. // 维修师傅
  323. this.getCount()
  324. this.getData()
  325. }
  326. this.getCloseList()
  327. },
  328. methods: {
  329. // 滚动到底部触发回调
  330. scrolltolower() {
  331. if ((this.btns.includes('工单管理分段器') || this.btns.includes('分段器按钮')) && this.current === 0) {
  332. // 团队工单
  333. if (this.total > this.dataList.length) {
  334. this.currentPage++
  335. this.getTeamData()
  336. } else {
  337. uni.showToast({
  338. title: '没有更多数据了',
  339. icon: 'none'
  340. })
  341. }
  342. } else {
  343. // 个人工单
  344. if (this.total2 > this.dataList.length) {
  345. this.currentPage++
  346. this.getData()
  347. } else {
  348. uni.showToast({
  349. title: '没有更多数据了',
  350. icon: 'none'
  351. })
  352. }
  353. }
  354. },
  355. async getCloseList() {
  356. const res = await this.$myRequest_repairs({
  357. url: '/repairClose/queryRepairCloses'
  358. })
  359. // console.log(res)
  360. if (res.code === '200') {
  361. this.closeList = res.data
  362. }
  363. },
  364. handleFilter(state) {
  365. this.state = state
  366. this.dataList = []
  367. this.currentPage = 1
  368. this.handleResetData()
  369. },
  370. async getCount() {
  371. const res = await this.$myRequest_repairs({
  372. url: '/repairRecord/getTechnicianCountByUserId',
  373. data: {
  374. userId: this.userId
  375. }
  376. })
  377. // console.log(res)
  378. if (res.code === '200') {
  379. this.examineCount = res.data.examineCount
  380. this.maintenanceCount = res.data.maintenanceCount
  381. this.receivingCount = res.data.receivingCount
  382. this.timeoutCount = res.data.timeoutCount
  383. }
  384. },
  385. // 获取个人订单数据
  386. async getData() {
  387. const res = await this.$myRequest_repairs({
  388. url: '/repairRecord/getTechniciansByUserId',
  389. data: {
  390. currentPage: this.currentPage,
  391. pageCount: this.pageCount,
  392. state: this.state,
  393. userId: this.userId
  394. }
  395. })
  396. // console.log(res)
  397. if (res.code === '200') {
  398. this.total2 = res.data.totalCount
  399. res.data.list.forEach((ele) => {
  400. return (ele.status = false)
  401. })
  402. this.dataList = [...this.dataList, ...res.data.list]
  403. }
  404. },
  405. async getTeamCount() {
  406. const res = await this.$myRequest_repairs({
  407. url: '/repairRecord/queryTeamWorkCount',
  408. data: {
  409. schoolId: this.schoolId
  410. }
  411. })
  412. // console.log(res)
  413. if (res.code === '200') {
  414. this.examineCount = res.data.examineCount
  415. this.receivingCount = res.data.receivingCount
  416. this.maintenanceCount = res.data.maintenanceCount
  417. this.finishedCount = res.data.finishedCount
  418. this.timeoutCount = res.data.timeoutCount
  419. this.closedCount = res.data.closedCount
  420. this.logisticsCount = res.data.logisticsCount
  421. }
  422. },
  423. // 获取团队订单数据
  424. async getTeamData() {
  425. const res = await this.$myRequest_repairs({
  426. url: '/repairRecord/queryTeamWorkPage',
  427. data: {
  428. currentPage: this.currentPage,
  429. pageCount: this.pageCount,
  430. state: this.state,
  431. schoolId: this.schoolId
  432. }
  433. })
  434. // console.log(res)
  435. if (res.code === '200') {
  436. this.total = res.data.totalCount
  437. res.data.list.forEach((ele) => {
  438. return (ele.status = false)
  439. })
  440. this.dataList = [...this.dataList, ...res.data.list]
  441. }
  442. },
  443. // 留言弹窗确定按钮回调
  444. handleLeaveWordsConfirm() {
  445. if (this.leaveWords) {
  446. uni.showToast({
  447. title: '留言成功',
  448. icon: 'success',
  449. mask: true
  450. })
  451. this.$refs.popup_leaveWords.close()
  452. } else {
  453. uni.showToast({
  454. title: '请输入留言内容',
  455. icon: 'none',
  456. mask: true
  457. })
  458. }
  459. },
  460. // 关闭弹窗确定按钮回调
  461. handleCloseConfirm() {
  462. uni.showModal({
  463. title: '提示',
  464. content: '确定关闭订单吗?',
  465. success: async (res) => {
  466. if (res.confirm) {
  467. const res = await this.$myRequest_repairs({
  468. url: '/repairRecord/closeOrder',
  469. data: {
  470. recordId: this.orderId,
  471. userId: this.userId,
  472. reason: this.closeList[this.activeIndex].name
  473. }
  474. })
  475. // console.log(res)
  476. if (res.code === '200') {
  477. uni.showToast({
  478. title: '关单成功',
  479. icon: 'success',
  480. mask: true
  481. })
  482. this.$refs.popup_close.close()
  483. setTimeout(() => {
  484. this.handleResetData()
  485. }, 1500)
  486. }
  487. }
  488. }
  489. })
  490. },
  491. // 重置当前页面获取最新数据
  492. handleResetData() {
  493. this.dataList = []
  494. this.currentPage = 1
  495. if ((this.btns.includes('工单管理分段器') || this.btns.includes('分段器按钮')) && this.current === 0) {
  496. // 管理员身份或者后勤
  497. this.getTeamCount()
  498. this.getTeamData()
  499. } else {
  500. // 维修师傅
  501. this.getCount()
  502. this.getData()
  503. }
  504. },
  505. // 接单按钮回调
  506. handleOrderReceiving(item) {
  507. uni.showModal({
  508. content: '确定接单吗?',
  509. title: '提示',
  510. success: async (res) => {
  511. if (res.confirm) {
  512. const res = await this.$myRequest_repairs({
  513. url: '/repairRecord/receiveOwnOrders',
  514. data: {
  515. recordId: item.id,
  516. userId: this.userId
  517. }
  518. })
  519. // console.log(res)
  520. if (res.code === '200') {
  521. uni.showToast({
  522. title: '接单成功',
  523. icon: 'success',
  524. mask: true
  525. })
  526. setTimeout(() => {
  527. this.handleResetData()
  528. }, 1500)
  529. }
  530. }
  531. }
  532. })
  533. },
  534. // 关闭图标点击回调
  535. handleClose(item) {
  536. this.orderId = item.id
  537. this.activeIndex = 0
  538. this.$refs.popup_close.open('center')
  539. },
  540. // 关闭按钮弹窗选中按钮时回调
  541. handleChangeItem(val) {
  542. this.activeIndex = val
  543. },
  544. // 报价按钮回调
  545. handleOffer(item) {
  546. let info = encodeURIComponent(JSON.stringify(item))
  547. uni.navigateTo({
  548. url: `/pagesRepairs/offer/offer?info=${info}`
  549. })
  550. },
  551. // 改价按钮回调
  552. handleChangeOffer(item) {
  553. let info = encodeURIComponent(JSON.stringify(item))
  554. uni.navigateTo({
  555. url: `/pagesRepairs/offer/offer?info=${info}&type=1`
  556. })
  557. },
  558. // 维修完成按钮回调
  559. handleFinish(item) {
  560. const info = JSON.stringify(item)
  561. uni.navigateTo({
  562. url: `/pagesRepairs/repairRecord/repairRecord?info=${info}`
  563. })
  564. },
  565. // 转单按钮回调
  566. handleTransferOrder(item) {
  567. uni.navigateTo({
  568. url: `/pagesRepairs/transferOrder/transferOrder?id=${item.id}`
  569. })
  570. },
  571. // 协作图标点击回调
  572. handleHelp(item) {
  573. uni.navigateTo({
  574. url: `/pagesRepairs/help/help?id=${item.id}`
  575. })
  576. },
  577. // 分段器切换回调
  578. onClickItem(e) {
  579. if (this.current != e.currentIndex) {
  580. this.current = e.currentIndex
  581. console.log(this.current)
  582. this.state = 1
  583. this.dataList = []
  584. this.currentPage = 1
  585. if (this.current === 0) {
  586. // 团队工单
  587. this.getTeamCount()
  588. this.getTeamData()
  589. } else {
  590. // 个人工单
  591. this.getCount()
  592. this.getData()
  593. }
  594. }
  595. },
  596. // 留言按钮回调
  597. handleLeaveWords() {
  598. this.$refs.popup_leaveWords.open('center')
  599. },
  600. // 延时按钮回调
  601. handleDelay(item) {
  602. uni.navigateTo({
  603. url: `/pagesRepairs/delay/delay?id=${item.id}`
  604. })
  605. },
  606. // 派单按钮回调
  607. handleSendOrder(item) {
  608. uni.navigateTo({
  609. url: `/pagesRepairs/helpPeople/helpPeople?type=1&id=${item.id}`
  610. })
  611. },
  612. // 审核按钮回调
  613. handleAudit(item) {
  614. if (item.state === '转单审核') {
  615. uni.navigateTo({
  616. url: `/pagesRepairs/transferOrder/transferOrder?type=1&id=${item.id}`
  617. })
  618. } else if (item.state === '协作审核') {
  619. uni.navigateTo({
  620. url: `/pagesRepairs/help/help?type=1&id=${item.id}`
  621. })
  622. }
  623. },
  624. // 查看维修费用回调
  625. checkFeeDetail(item) {
  626. // console.log(item)
  627. this.goodsList = item.goodsList
  628. this.$refs.popup_fee.open('center')
  629. },
  630. // 点击电话号码回调
  631. handleCallPhone(phone) {
  632. uni.makePhoneCall({
  633. phoneNumber: phone
  634. })
  635. },
  636. // 点击图片回调
  637. handleLookImgs(img) {
  638. // console.log(img)
  639. uni.previewImage({
  640. urls: img
  641. })
  642. },
  643. // 点击录音播放回调
  644. handlePlayRecording(item) {
  645. this.dataList.forEach((ele) => {
  646. if (ele.id !== item.id) {
  647. ele.status = false
  648. }
  649. })
  650. innerAudioContext.src = item.voice
  651. if (!item.status) {
  652. item.status = true
  653. innerAudioContext.play()
  654. //播放结束
  655. innerAudioContext.onEnded(() => {
  656. item.status = false
  657. })
  658. } else {
  659. item.status = false
  660. innerAudioContext.stop()
  661. }
  662. },
  663. handleGoDetail(item) {
  664. uni.navigateTo({
  665. url: `/pagesRepairs/repairDetails/repairDetails?id=${item.id}`
  666. })
  667. }
  668. }
  669. }
  670. </script>
  671. <style lang="scss" scoped>
  672. .container {
  673. width: 100vw;
  674. height: calc(100vh - 152rpx);
  675. font-size: 32rpx;
  676. overflow-y: auto;
  677. .top_bg {
  678. height: 165rpx;
  679. background-color: #6fb6b8;
  680. }
  681. .top_types {
  682. display: flex;
  683. flex-wrap: wrap;
  684. justify-content: space-evenly;
  685. margin: auto;
  686. margin-top: -100rpx;
  687. width: 690rpx;
  688. border-radius: 10rpx;
  689. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  690. background-color: #fff;
  691. .types_box {
  692. width: 25%;
  693. height: 188rpx;
  694. display: flex;
  695. flex-direction: column;
  696. justify-content: center;
  697. align-items: center;
  698. .box_num {
  699. font-size: 46rpx;
  700. color: #ff5733;
  701. }
  702. .box_info {
  703. margin-top: 10rpx;
  704. font-size: 34rpx;
  705. }
  706. }
  707. .active {
  708. color: #fff;
  709. background-color: #6fb6b8;
  710. }
  711. }
  712. .top_types2 {
  713. box-sizing: border-box;
  714. margin: auto;
  715. margin-top: -100rpx;
  716. padding: 0 30rpx;
  717. width: 690rpx;
  718. // height: 402rpx;
  719. border-radius: 10rpx;
  720. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  721. background-color: #fff;
  722. .top {
  723. height: 112rpx;
  724. border-bottom: 1rpx solid #e6e6e6;
  725. }
  726. .bottom {
  727. display: flex;
  728. flex-wrap: wrap;
  729. justify-content: space-evenly;
  730. .bottom_box {
  731. width: 25%;
  732. height: 145rpx;
  733. display: flex;
  734. flex-direction: column;
  735. justify-content: center;
  736. align-items: center;
  737. .box_num {
  738. font-size: 46rpx;
  739. color: #ff5733;
  740. }
  741. .box_info {
  742. // margin-top: 10rpx;
  743. font-size: 34rpx;
  744. }
  745. }
  746. .active {
  747. color: #fff;
  748. background-color: #6fb6b8;
  749. }
  750. }
  751. }
  752. .body {
  753. box-sizing: border-box;
  754. padding: 0 30rpx 30rpx 30rpx;
  755. .body_item {
  756. margin-top: 20rpx;
  757. padding-bottom: 35rpx;
  758. border-radius: 11rpx;
  759. box-shadow: 0 0 8rpx #d9d9d9;
  760. .item_title {
  761. display: flex;
  762. align-items: center;
  763. padding: 0 30rpx;
  764. height: 87rpx;
  765. border-bottom: 1rpx solid #e6e6e6;
  766. img {
  767. width: 30rpx;
  768. height: 30rpx;
  769. }
  770. .title_info {
  771. margin-left: 16rpx;
  772. font-size: 32rpx;
  773. }
  774. }
  775. .item_time {
  776. display: flex;
  777. justify-content: space-between;
  778. align-items: center;
  779. padding: 0 30rpx;
  780. height: 79rpx;
  781. .time_msg {
  782. color: #808080;
  783. text {
  784. color: #000000;
  785. }
  786. }
  787. .time_type {
  788. font-size: 32rpx;
  789. color: #ff5733;
  790. }
  791. .color_type {
  792. color: #1e7dfb;
  793. }
  794. .color_type2 {
  795. color: #d43030;
  796. }
  797. .color_type3 {
  798. color: #6fb6b8;
  799. }
  800. .color_type4 {
  801. color: #a6a6a6;
  802. }
  803. }
  804. .item_box {
  805. display: flex;
  806. align-items: center;
  807. padding: 0 30rpx;
  808. line-height: 60rpx;
  809. .box_key {
  810. width: 160rpx;
  811. color: #808080;
  812. }
  813. .box_value {
  814. display: flex;
  815. align-items: center;
  816. margin-right: auto;
  817. min-width: calc(100% - width: 160rpx;);
  818. img {
  819. margin-left: 10rpx;
  820. width: 45rpx;
  821. height: 45rpx;
  822. }
  823. .recording {
  824. display: flex;
  825. align-items: center;
  826. margin: 15rpx 0;
  827. width: 130rpx;
  828. height: 40rpx;
  829. color: #000;
  830. border-radius: 100rpx;
  831. border: 1rpx solid #cccccc;
  832. .voiceImg {
  833. margin: 0 12rpx;
  834. width: 30rpx;
  835. height: 30rpx;
  836. }
  837. }
  838. }
  839. .box_type {
  840. margin-left: 10rpx;
  841. width: 137rpx;
  842. height: 47rpx;
  843. line-height: 47rpx;
  844. text-align: center;
  845. border-radius: 136rpx;
  846. color: #ff5733;
  847. font-size: 24rpx;
  848. border: 1rpx solid #ff5733;
  849. }
  850. .box_value2 {
  851. display: flex;
  852. align-items: center;
  853. img {
  854. margin-top: -2rpx;
  855. margin-left: 14rpx;
  856. width: 46rpx;
  857. height: 46rpx;
  858. }
  859. }
  860. .phone {
  861. color: #6fb6b8;
  862. }
  863. }
  864. .item_img {
  865. display: flex;
  866. align-items: center;
  867. padding: 0 30rpx;
  868. height: 120rpx;
  869. color: #808080;
  870. .img_key {
  871. }
  872. .img_value {
  873. width: 120rpx;
  874. height: 120rpx;
  875. border-radius: 14rpx;
  876. }
  877. }
  878. .item_btn {
  879. display: flex;
  880. align-items: center;
  881. justify-content: flex-end;
  882. padding: 0 30rpx;
  883. line-height: 153rpx;
  884. img {
  885. margin-right: auto;
  886. margin-top: 45rpx;
  887. width: 56rpx;
  888. height: 56rpx;
  889. }
  890. .img {
  891. margin-right: auto;
  892. margin-left: -55rpx;
  893. margin-top: 45rpx;
  894. width: 62rpx;
  895. height: 62rpx;
  896. }
  897. .btn_box {
  898. display: flex;
  899. justify-content: center;
  900. align-items: center;
  901. margin-left: 16rpx;
  902. margin-top: 45rpx;
  903. width: 174rpx;
  904. height: 68rpx;
  905. border-radius: 11rpx;
  906. }
  907. .type {
  908. color: #fff;
  909. background-color: #6fb6b8;
  910. }
  911. .type2 {
  912. color: #6fb6b8;
  913. background-color: #fff;
  914. border: 1rpx solid #6fb6b8;
  915. }
  916. }
  917. }
  918. .popup_close {
  919. width: 690rpx;
  920. border-radius: 19rpx;
  921. background-color: #fff;
  922. .close_box {
  923. height: 100rpx;
  924. line-height: 100rpx;
  925. text-align: center;
  926. font-size: 32rpx;
  927. border: 1rpx solid #e6e6e6;
  928. }
  929. .radius {
  930. border-radius: 19rpx 19rpx 0 0;
  931. }
  932. .active {
  933. color: #fff;
  934. background-color: #6fb6b8;
  935. }
  936. .close_btn {
  937. display: flex;
  938. align-items: center;
  939. justify-content: space-evenly;
  940. margin-top: 100rpx;
  941. height: 121rpx;
  942. .btn_box {
  943. display: flex;
  944. justify-content: center;
  945. align-items: center;
  946. width: 203rpx;
  947. height: 72rpx;
  948. border-radius: 9rpx;
  949. font-size: 32rpx;
  950. }
  951. .cancel {
  952. background-color: #e5e5e5;
  953. color: #6fb6b8;
  954. }
  955. .confirm {
  956. background-color: #6fb6b8;
  957. color: #fff;
  958. }
  959. }
  960. }
  961. .pop_leaveWords {
  962. border-radius: 19rpx;
  963. background-color: #fff;
  964. .leaveWords_title {
  965. display: flex;
  966. justify-content: center;
  967. align-items: center;
  968. width: 690rpx;
  969. height: 110rpx;
  970. font-size: 32rpx;
  971. font-weight: bold;
  972. border-radius: 19rpx 19rpx 0 0;
  973. border-bottom: 1rpx solid #e6e6e6;
  974. }
  975. .leaveWords_body {
  976. height: 320rpx;
  977. textarea {
  978. box-sizing: border-box;
  979. margin: 35rpx 40rpx;
  980. padding: 20rpx;
  981. width: 610rpx;
  982. height: 312rpx;
  983. // font-size: 28rpx;
  984. border-radius: 14rpx;
  985. border: 1rpx solid #e6e6e6;
  986. }
  987. }
  988. .leaveWords_btn {
  989. display: flex;
  990. align-items: center;
  991. justify-content: space-evenly;
  992. height: 121rpx;
  993. .btn_box {
  994. display: flex;
  995. justify-content: center;
  996. align-items: center;
  997. width: 203rpx;
  998. height: 72rpx;
  999. border-radius: 9rpx;
  1000. font-size: 32rpx;
  1001. }
  1002. .cancel {
  1003. background-color: #e5e5e5;
  1004. color: #6fb6b8;
  1005. }
  1006. .confirm {
  1007. background-color: #6fb6b8;
  1008. color: #fff;
  1009. }
  1010. }
  1011. }
  1012. .pop_fee {
  1013. padding-bottom: 50rpx;
  1014. border-radius: 19rpx;
  1015. background-color: #fff;
  1016. .fee_title {
  1017. display: flex;
  1018. justify-content: space-between;
  1019. align-items: center;
  1020. box-sizing: border-box;
  1021. padding: 0 31rpx 0 42rpx;
  1022. width: 690rpx;
  1023. height: 110rpx;
  1024. font-size: 32rpx;
  1025. font-weight: bold;
  1026. border-radius: 19rpx 19rpx 0 0;
  1027. border-bottom: 1rpx solid #e6e6e6;
  1028. text {
  1029. font-size: 45rpx;
  1030. font-weight: 400;
  1031. color: #808080;
  1032. }
  1033. }
  1034. .fee_content {
  1035. max-height: 50vh;
  1036. overflow-y: auto;
  1037. .fee_item {
  1038. border-bottom: 1rpx solid #e6e6e6;
  1039. .fee_box {
  1040. display: flex;
  1041. align-items: center;
  1042. padding-left: 42rpx;
  1043. height: 80rpx;
  1044. // font-size: 28rpx;
  1045. color: #808080;
  1046. text {
  1047. color: #000000;
  1048. }
  1049. }
  1050. }
  1051. }
  1052. }
  1053. }
  1054. .no_data {
  1055. text-align: center;
  1056. color: #b3b3b3;
  1057. font-size: 24rpx;
  1058. img {
  1059. margin: 42rpx auto 0;
  1060. width: 432rpx;
  1061. height: 456rpx;
  1062. }
  1063. }
  1064. }
  1065. </style>