management.vue 28 KB

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