orderDetail.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355
  1. <template>
  2. <view class="all-container">
  3. <view class="bg"></view>
  4. <zj-page-layout :isScroll="true" :hasFooter="true" :refresherTriggered="refresherTriggered"
  5. @refresherrefresh="refresherrefresh">
  6. <!-- 状态 -->
  7. <view class="status-container">
  8. <view class="status" @tap="openFeedback">{{ detail ? detail.orderStatusText : '' }}<text class="iconfont icon-jinru"></text></view>
  9. <view class="time" v-if="detail && detail.appointmentTime">已预约 {{ detail.appointmentTime.slice(0, 10) }}</view>
  10. </view>
  11. <!-- tab栏 -->
  12. <view class="tab-container">
  13. <u-tabs :scrollable="true" :list="tabList" :current="curTab - 1" @click="changeTab"
  14. itemStyle="height: 36px;">
  15. </u-tabs>
  16. </view>
  17. <view class="content-container" v-if="detail">
  18. <!-- 基本信息 -->
  19. <block v-if="~[1].indexOf(curTab)">
  20. <view class="user-container card">
  21. <view class="top">
  22. <view class="type">
  23. <view class="left">{{ detail.orderSmallTypeText ? detail.orderSmallTypeText.slice(0, 2) : '' }}</view>
  24. <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="copyData()">复制</view>
  25. </view>
  26. <view class="user">{{ detail.userName }} {{ detail.userMobile }}</view>
  27. <view class="address">
  28. <view class="text">{{ detail.province }}{{ detail.city }}{{ detail.area }}{{ detail.street }}{{ detail.address || detail.gpsAddress }}
  29. </view>
  30. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap.stop="
  31. $openLocation({
  32. lat: detail.lat,
  33. lng: detail.lng,
  34. address: detail.address || detail.gpsAddress,
  35. })
  36. "><text class="iconfont icon-daohang"></text>导航</view>
  37. </view>
  38. </view>
  39. <view class="bottom" v-if="detail && orderStatus_v !== 'DQD'">
  40. <view class="it" @tap="$callPhone(detail.userMobile)"><text class="iconfont icon-call"></text>联系电话1</view>
  41. <view class="it" @tap="$callPhone(detail.userMobile)"><text class="iconfont icon-call"></text>联系电话2</view>
  42. </view>
  43. </view>
  44. <!-- 商品信息 -->
  45. <view class="goods-container card mt30">
  46. <view class="common-title">商品信息</view>
  47. <view class="item" v-for="(item, index) in detail.pgOrderProducts" :key="index">
  48. <view class="main">
  49. <image :src="item.imgUrl ? item.imgUrl : require('@/static/images/logo.png')" mode="aspectFill"></image>
  50. <view class="info">
  51. <view class="name">
  52. <view class="left" v-if="detail.isZl">{{ item.mainName || '' }}</view>
  53. <view class="left" v-else>{{ item.smallName || '' }} {{ item.productName || '' }}</view>
  54. <view class="right">x{{ item.num }}</view>
  55. </view>
  56. <view class="tags" v-if="!detail.isZl">
  57. <view class="it">{{ item.brandName }}</view>
  58. <!-- <view class="it">家用空调</view> -->
  59. </view>
  60. </view>
  61. </view>
  62. <!-- <view class="images" v-if="isOpenGoods">
  63. <view class="it" v-if="item.insideImg">
  64. <image :src="imageUrl + item.insideImg" mode="aspectFill"
  65. @tap="prevImg(item.insideImg)"></image>
  66. <view class="text">内机</view>
  67. </view>
  68. <view class="it" v-if="item.outImg">
  69. <image :src="imageUrl + item.outImg" mode="aspectFill" @tap="prevImg(item.outImg)">
  70. </image>
  71. <view class="text">外机</view>
  72. </view>
  73. <block v-if="item.partImgs">
  74. <view class="it" v-for="(it, idx) in item.partImgs.split(',')" :key="idx">
  75. <image :src="imageUrl + it" mode="aspectFill" @tap="() => prevImg(it)"></image>
  76. <view class="text">配件</view>
  77. </view>
  78. </block>
  79. </view> -->
  80. </view>
  81. <!-- <view class="ctrl" @tap="isOpenGoods = !isOpenGoods">
  82. <text>{{ isOpenGoods ? '收起' : '查看更多' }}</text>
  83. <text class="iconfont icon-left" :class="isOpenGoods ? 'is' : ''"></text>
  84. </view> -->
  85. </view>
  86. <!-- 订单信息 -->
  87. <view class="info-container card mt30" v-if="detail.saleOrderId && !detail.pgIncreId">
  88. <view class="common-title">订单信息</view>
  89. <view>
  90. <view class="row">
  91. <view class="label">订单编号</view>
  92. <view class="value">{{ detail.saleOrderId }}</view>
  93. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(detail.saleOrderId)">复制</view>
  94. </view>
  95. <view class="row">
  96. <view class="label">下单时间</view>
  97. <view class="value">{{ detail.saleCreateTime || '' }}</view>
  98. </view>
  99. <view class="row">
  100. <view class="label">订单金额</view>
  101. <view class="value">¥{{ detail.saleTotalAmount | priceFilter }}</view>
  102. </view>
  103. <view class="row">
  104. <view class="label">订单备注</view>
  105. <view class="value">{{ detail.saleRemark || '' }}</view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="info-container card mt30" v-if="detail.pgIncreId && increDetail">
  110. <view class="common-title">产品信息</view>
  111. <view class="row">
  112. <view class="label">服务类型</view>
  113. <view class="value">延保</view>
  114. </view>
  115. <view class="row">
  116. <view class="label">产品品牌</view>
  117. <view class="value">{{increDetail.brandName}}</view>
  118. </view>
  119. <view class="row">
  120. <view class="label">产品大类</view>
  121. <view class="value">{{increDetail.mainName}}</view>
  122. </view>
  123. <view class="row">
  124. <view class="label">服务内容</view>
  125. <view class="value">{{increDetail.increContent}}</view>
  126. </view>
  127. </view>
  128. <view class="info-container card mt30" v-if="detail.pgIncreId && increDetail">
  129. <view class="common-title">产品凭证</view>
  130. <view class="row">
  131. <view class="label">内机条码</view>
  132. <view class="value">{{increDetail.insideCode}}</view>
  133. </view>
  134. <view class="imgs">
  135. <!-- 内机条码 -->
  136. <view class="it">
  137. <block>
  138. <image mode="aspectFill" :src="increDetail.insideCodeImg" @tap="prevImg(increDetail.insideCodeImg)">
  139. </image>
  140. </block>
  141. <view class="name">内机条码</view>
  142. </view>
  143. <!-- 机器铭牌 -->
  144. <view class="it">
  145. <block>
  146. <image mode="aspectFill" :src="increDetail.machineImg" @tap="prevImg(increDetail.machineImg)">
  147. </image>
  148. </block>
  149. <view class="name">机器铭牌<br/>(含出厂日期)</view>
  150. </view>
  151. <!-- 购机凭证 -->
  152. <view class="it">
  153. <block>
  154. <image mode="aspectFill" :src="increDetail.buyCertImg" @tap="prevImg(increDetail.buyCertImg)">
  155. </image>
  156. </block>
  157. <view class="name">购机凭证</view>
  158. </view>
  159. </view>
  160. </view>
  161. <!-- 延保订单信息 -->
  162. <view class="info-container card mt30" v-if="detail.pgIncreId && increDetail">
  163. <view class="common-title">订单信息</view>
  164. <view>
  165. <view class="row">
  166. <view class="label">订单编号</view>
  167. <view class="value">{{ increDetail.id }}</view>
  168. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(increDetail.id)">复制</view>
  169. </view>
  170. <view class="row">
  171. <view class="label">下单时间</view>
  172. <view class="value">{{ increDetail.createTime || '' }}</view>
  173. </view>
  174. <view class="row">
  175. <view class="label">订单金额</view>
  176. <view class="value">¥{{ increDetail.amount }}</view>
  177. </view>
  178. <view class="row">
  179. <view class="label">订单备注</view>
  180. <view class="value">{{ detail.remark || '' }}</view>
  181. </view>
  182. </view>
  183. </view>
  184. <!-- 服务信息 -->
  185. <view class="info-container card mt30">
  186. <view class="common-title">服务信息</view>
  187. <view>
  188. <view class="row">
  189. <view class="label">工单编号</view>
  190. <view class="value">{{ detail.id }}</view>
  191. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(detail.id)">复制</view>
  192. </view>
  193. <view class="row">
  194. <view class="label">下单时间</view>
  195. <view class="value">{{ detail.createTime }}</view>
  196. </view>
  197. <view class="row">
  198. <view class="label">接单时间</view>
  199. <view class="value">{{ detail.workerReceTime || '' }}</view>
  200. </view>
  201. <view class="row">
  202. <view class="label">主工程师</view>
  203. <view class="value">{{ detail.workerName }} {{ detail.workerMobile }}</view>
  204. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$callPhone(detail.workerMobile)"><text class="iconfont icon-call"></text></view>
  205. </view>
  206. <view class="row" v-for="(item, index) in detail.pgOrderWorkers.filter(o => !o.isMaster)" :key="index">
  207. <view class="label">辅工程师</view>
  208. <view class="value">{{ item.workerName }} {{ item.workerMobile }}</view>
  209. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$callPhone(item.workerMobile)"><text class="iconfont icon-call"></text></view>
  210. </view>
  211. <view class="row">
  212. <view class="label">下单渠道</view>
  213. <view class="value">{{ detail.orderChannelText || '' }}</view>
  214. </view>
  215. <view class="row">
  216. <view class="label">订单备注</view>
  217. <view class="value">{{ detail.remark || '' }}</view>
  218. </view>
  219. </view>
  220. </view>
  221. <!-- 建单信息 -->
  222. <view class="info-container card mt30">
  223. <view class="common-title">建单信息</view>
  224. <view>
  225. <view class="row">
  226. <view class="label">建单人名</view>
  227. <view class="value">{{ detail.createBy || '' }}</view>
  228. </view>
  229. <view class="row">
  230. <view class="label">下单网点</view>
  231. <view class="value">{{ detail.websitName || '' }}</view>
  232. </view>
  233. </view>
  234. </view>
  235. </block>
  236. <!-- 服务信息 -->
  237. <block v-if="~[2].indexOf(curTab)">
  238. <!-- 过程反馈 -->
  239. <view class="feedback-container card">
  240. <view class="common-title2">
  241. <view class="title">过程反馈</view>
  242. <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="toFeedbackList">查看全部<text class="iconfont icon-jinru"></text>
  243. </view>
  244. </view>
  245. <view class="list" v-if="detail.lastOperator">
  246. <view class="item">
  247. <u-avatar :text="detail.lastOperatorWebsit ? detail.lastOperatorWebsit.slice(0, 1) : 'A'" fontSize="18" randomBgColor></u-avatar>
  248. <view class="main">
  249. <view class="name">{{ detail.lastOperatorWebsit || '' }}</view>
  250. <view class="time">{{ detail.lastOperatorTime || '' }}</view>
  251. <view class="content">{{ detail.lastOperator || '' }}</view>
  252. </view>
  253. </view>
  254. </view>
  255. <Loading :type="3" :loadStatus="2" :isLoadAnimation="false" v-else />
  256. </view>
  257. <!-- 预约信息 -->
  258. <view class="info-container card mt30" v-if="detail && detail.appointmentTime">
  259. <view class="common-title">预约信息</view>
  260. <view>
  261. <view class="row">
  262. <view class="label">预约时间</view>
  263. <view class="value">{{ detail.appointmentTime.slice(0, 10) }}</view>
  264. </view>
  265. <view class="row">
  266. <view class="label">预约备注</view>
  267. <view class="value">{{ detail.appointmentRemark || '' }}</view>
  268. </view>
  269. </view>
  270. </view>
  271. <!-- 完工信息 -->
  272. <view class="info-container card mt30" v-if="detail && (orderStatus_v == 'YWG' || orderStatus_v == 'YJS')">
  273. <view class="common-title2">
  274. <view class="title">完工信息</view>
  275. <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="toOverDetail">查看更多<text class="iconfont icon-jinru"></text></view>
  276. </view>
  277. <view>
  278. <view class="row">
  279. <view class="label">完工时间</view>
  280. <view class="value">{{ detail.overTime || detail.websitOverTime || '' }}</view>
  281. </view>
  282. <view class="row">
  283. <view class="label">完工地点</view>
  284. <view class="value">{{ detail.province }}{{ detail.city }}{{ detail.area }}{{ detail.street }}{{
  285. detail.address }}
  286. </view>
  287. </view>
  288. </view>
  289. </view>
  290. </block>
  291. <!-- 电子支付 -->
  292. <block v-if="~[3].indexOf(curTab)">
  293. <block v-if="detail.rpProjectRepairId">
  294. <view class="product-container card" v-for="(item, index) in payList" :key="index">
  295. <view class="row">
  296. <view class="label">支付单号</view>
  297. <view class="value">{{ item.orderId }}</view>
  298. <view class="status">{{ item.examineStatus | examineStatusFilter }}</view>
  299. </view>
  300. <view class="common-title mt30">产品信息</view>
  301. <view class="product">
  302. <view class="it" v-for="(it, idx) in item.rpMaterialOrderItems.filter(o => (o.chargeType == 'ACC' || o.chargeType == 'MCC'))" :key="idx">
  303. <view class="name">{{ it.goodsName }}<text>×{{ it.num }}</text></view>
  304. <view class="price">¥{{ it.totalAmount }}</view>
  305. </view>
  306. <view class="total">
  307. <view class="text">合计:</view>
  308. <view class="price">¥{{ [0, 0, 0, ...item.rpMaterialOrderItems.filter(o => (o.chargeType == 'ACC' || o.chargeType == 'MCC')).map(val =>
  309. val.totalAmount)].reduce((a, b) => (((a * 100) + (b * 100)) / 100), 0) }}</view>
  310. </view>
  311. </view>
  312. <view class="common-title mt30">服务费用</view>
  313. <view class="product">
  314. <view class="it" v-for="(it, idx) in item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV')" :key="idx">
  315. <view class="name">服务费</view>
  316. <view class="price">¥{{ it.normAmount }}</view>
  317. </view>
  318. <view class="total">
  319. <view class="text">合计:</view>
  320. <view class="price">¥{{ [0, 0, 0, ...item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV').map(val =>
  321. val.normAmount)].reduce((a, b) => (((a * 100) + (b * 100)) / 100), 0) }}</view>
  322. </view>
  323. </view>
  324. <view class="bottom">
  325. <view class="left">订单总金额</view>
  326. <view class="right">
  327. <view class="text">合计:</view>
  328. <view class="price">¥{{ item.totalAmount }}</view>
  329. </view>
  330. </view>
  331. <view class="row mt30">
  332. <view class="label">操作人员</view>
  333. <view class="value">{{ item.createBy }}</view>
  334. </view>
  335. <view class="row mt20">
  336. <view class="label">订单备注</view>
  337. <view class="value">{{ item.remark }}</view>
  338. </view>
  339. </view>
  340. </block>
  341. <block v-else>
  342. <view class="product-container card" v-for="(item, index) in payList" :key="index">
  343. <view class="row">
  344. <view class="label">支付单号</view>
  345. <view class="value">{{ item.orderId }}</view>
  346. <view class="status">{{ item.payStatus | payStatusFilter }}</view>
  347. </view>
  348. <view class="common-title mt30">产品信息</view>
  349. <view class="product">
  350. <view class="it" v-for="(it, idx) in item.workerOrderItems.filter(o => (o.chargeType == 'ACC' || o.chargeType == 'MCC'))" :key="idx">
  351. <view class="name">{{ it.goodsName }}<text>×{{ it.num }}</text></view>
  352. <view class="price">¥{{ it.totalAmount }}</view>
  353. </view>
  354. <view class="total">
  355. <view class="text">合计:</view>
  356. <view class="price">¥{{ [0, 0, 0, ...item.workerOrderItems.filter(o => (o.chargeType == 'ACC' || o.chargeType == 'MCC')).map(val =>
  357. val.totalAmount)].reduce((a, b) => (((a * 100) + (b * 100)) / 100), 0) }}</view>
  358. </view>
  359. </view>
  360. <view class="common-title mt30">服务费用</view>
  361. <view class="product">
  362. <view class="it" v-for="(it, idx) in item.workerOrderItems.filter(o => o.chargeType == 'SERV')" :key="idx">
  363. <view class="name">服务费</view>
  364. <view class="price">¥{{ it.normAmount }}</view>
  365. </view>
  366. <view class="total">
  367. <view class="text">合计:</view>
  368. <view class="price">¥{{ [0, 0, 0, ...item.workerOrderItems.filter(o => o.chargeType == 'SERV').map(val =>
  369. val.normAmount)].reduce((a, b) => (((a * 100) + (b * 100)) / 100), 0) }}</view>
  370. </view>
  371. </view>
  372. <view class="bottom">
  373. <view class="left">订单总金额</view>
  374. <view class="right">
  375. <view class="text">合计:</view>
  376. <view class="price">¥{{ item.totalAmount }}</view>
  377. </view>
  378. </view>
  379. <view class="row mt30">
  380. <view class="label">操作人员</view>
  381. <view class="value">{{ item.createBy }}</view>
  382. </view>
  383. <view class="row mt20">
  384. <view class="label">订单备注</view>
  385. <view class="value">{{ item.remark }}</view>
  386. </view>
  387. </view>
  388. </block>
  389. <block v-if="payList.length < 1">
  390. <Loading :type="3" :loadStatus="2" showText="暂无电子支付信息" :isLoadAnimation="false" />
  391. </block>
  392. </block>
  393. <!-- 费用结算 -->
  394. <block v-if="~[4].indexOf(curTab)">
  395. <!-- 服务费用 -->
  396. <view class="info-container card mt30" v-for="(item, index) in settleList" :key="index">
  397. <block v-if="item.settleNormType !== 'OTHER'">
  398. <view class="common-title2">
  399. <view class="title">服务费用{{ index + 1 }}</view>
  400. <view class="right">{{orderStatus_v == 'YJS' ? '已结算' : '结算中'}}</view>
  401. </view>
  402. <view>
  403. <view class="row">
  404. <view class="label">产品大类</view>
  405. <view class="value">{{ item.mainName || '' }}</view>
  406. </view>
  407. <view class="row">
  408. <view class="label">产品小类</view>
  409. <view class="value">{{ item.smallName || '' }}</view>
  410. </view>
  411. <view class="row">
  412. <view class="label">机型名称</view>
  413. <view class="value">{{ item.goodsName || '' }}</view>
  414. </view>
  415. <!-- <view class="row">
  416. <view class="label">收费标准</view>
  417. <view class="value">¥{{ item.normAmount | priceFilter }}</view>
  418. </view> -->
  419. <view class="row">
  420. <view class="label">数&emsp;&emsp;量</view>
  421. <view class="value">{{ item.settleNum || '' }}</view>
  422. </view>
  423. <view class="row">
  424. <view class="label">结算金额</view>
  425. <view class="value" v-if="orderStatus_v == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
  426. <view class="value" v-else>-</view>
  427. </view>
  428. </view>
  429. </block>
  430. <block v-else>
  431. <view class="common-title2">
  432. <view class="title">其他费用</view>
  433. <view class="right">{{orderStatus_v == 'YJS' ? '已结算' : '结算中'}}</view>
  434. </view>
  435. <view>
  436. <view class="row">
  437. <view class="label">类&emsp;&emsp;型</view>
  438. <view class="value">{{ item.typeName || '' }}</view>
  439. </view>
  440. <view class="row">
  441. <view class="label">规&emsp;&emsp;格</view>
  442. <view class="value">{{ item.label || '' }}</view>
  443. </view>
  444. <!-- <view class="row">
  445. <view class="label">单&emsp;&emsp;价</view>
  446. <view class="value">¥{{ item.normAmount | priceFilter }}</view>
  447. </view> -->
  448. <view class="row">
  449. <view class="label">数&emsp;&emsp;量</view>
  450. <view class="value">{{ item.settleNum || '' }}</view>
  451. </view>
  452. <view class="row">
  453. <view class="label">结算金额</view>
  454. <view class="value" v-if="orderStatus_v == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
  455. <view class="value" v-else>-</view>
  456. </view>
  457. </view>
  458. </block>
  459. </view>
  460. <block v-if="settleList.length < 1">
  461. <Loading :type="3" :loadStatus="2" showText="暂无员工结算信息" :isLoadAnimation="false" />
  462. </block>
  463. </block>
  464. </view>
  465. <Loading :type="3" :loadStatus="loadStatus" :isLoadAnimation="false" />
  466. <template slot="footer">
  467. <view class="bottom-container">
  468. <view class="left" style="width:100%" v-if="detail">
  469. <!-- 待抢单 -->
  470. <block v-if="orderStatus_v == 'DQD'">
  471. <u-button type="primary" text="抢单" @tap="qdOrder(detail)"></u-button>
  472. </block>
  473. </view>
  474. <view class="right" v-if="detail">
  475. <!-- 待接单 -->
  476. <block v-if="orderStatus_v == 'DJD'">
  477. <u-button plain type="primary" text="配件申请" v-if="detail.orderType != 'INSTALL'" @tap="toPartsApply()"></u-button>
  478. <u-button plain type="primary" text="取消加急" @tap="actionUrgent(false)"
  479. v-if="detail.pgOrderFlags && detail.pgOrderFlags.some((o) => o.tag == 'JIA_JI')"></u-button>
  480. <u-button plain type="primary" text="加急" @tap="actionUrgent(true)" v-else></u-button>
  481. <u-button type="primary" text="接单" @tap="actionReceive()"></u-button>
  482. </block>
  483. <!-- 服务中 -->
  484. <block v-if="orderStatus_v == 'FWZ' || orderStatus_v == 'YCD'">
  485. <u-button plain type="primary" text="配件申请" v-if="detail.orderType != 'INSTALL'" @tap="toPartsApply()"></u-button>
  486. <u-button plain type="primary" text="辅材收费" @tap="toCharge('M')"
  487. v-if="detail.orderType == 'INSTALL'"></u-button>
  488. <u-button plain type="primary" text="配件收费" @tap="toCharge('P')" v-else></u-button>
  489. <u-button type="primary" text="过程反馈" @tap="toFeedback()"></u-button>
  490. </block>
  491. </view>
  492. </view>
  493. </template>
  494. </zj-page-layout>
  495. <u-popup :show="isShowFeedback" @close="isShowFeedback = false" closeable round="10">
  496. <view class="feedback-dialog">
  497. <view class="title">服务路由</view>
  498. <view class="content">
  499. <logistics :logisticsData="feedbackList"></logistics>
  500. </view>
  501. </view>
  502. </u-popup>
  503. </view>
  504. </template>
  505. <script>
  506. import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
  507. import Logistics from '@/components/logistics2/common-logistics.vue';
  508. export default {
  509. components: {
  510. zjDialogPicker,
  511. Logistics
  512. },
  513. filters: {
  514. payStatusFilter(val) {
  515. const MAP = {
  516. CANCEL: '已取消',
  517. WAIT: '待支付',
  518. PAID: '已支付',
  519. };
  520. return MAP[val];
  521. },
  522. examineStatusFilter(val) {
  523. const MAP = {
  524. WAIT: '待审批',
  525. OK: '审批通过',
  526. FAIL: '审批驳回',
  527. NO: '已取消',
  528. PAID: '已现场支付',
  529. NO_PAID: '未支付',
  530. }
  531. return MAP[val];
  532. },
  533. },
  534. data() {
  535. return {
  536. id: null,
  537. imageUrl: this.$imageUrl,
  538. detail: null,
  539. increDetail: null,
  540. loadStatus: 1,
  541. errorText: '',
  542. refresherTriggered: false,
  543. curTab: 1,
  544. tabList: [
  545. { name: '基本信息', value: 1 },
  546. { name: '服务信息', value: 2 },
  547. { name: '电子支付', value: 3 },
  548. { name: '员工结算', value: 4 },
  549. ],
  550. isOpenGoods: false,
  551. payList: [], // 支付信息列表
  552. settleList: [], // 结算列表
  553. isShowFeedback: false,
  554. feedbackList: [],
  555. behavior: ""
  556. };
  557. },
  558. computed:{
  559. orderStatus_v(){
  560. if (["DYY"].includes(this?.detail?.orderStatus)) {
  561. // 待预约
  562. return "DYY"
  563. } else if (["DQD"].includes(this?.detail?.orderStatus)) {
  564. // 待抢单
  565. return "DQD"
  566. } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(this?.detail?.orderStatus)) {
  567. // 待商户派工
  568. return "DSHPG"
  569. } else if (["DWDPG", "DWDPD", "WDBH"].includes(this?.detail?.orderStatus)) {
  570. // 待网点派工
  571. return "DWDPG"
  572. } else if (["DJD", "DSM", "YZP"].includes(this?.detail?.orderStatus)) {
  573. // 待接单
  574. return "DJD"
  575. } else if (["FWZ", "GCSZT", "BFWG"].includes(this?.detail?.orderStatus)) {
  576. // 服务中
  577. return "FWZ"
  578. } else if (["YCD"].includes(this?.detail?.orderStatus)) {
  579. // 异常单
  580. return "YCD"
  581. } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(this?.detail?.orderStatus)) {
  582. // 已完工待结算
  583. return "YWG"
  584. } else if (["YJS", "LRCD"].includes(this?.detail?.orderStatus)) {
  585. // 已结算
  586. return "YJS"
  587. } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(this?.detail?.orderStatus)) {
  588. // 已取消
  589. return "YQX"
  590. }
  591. return ""
  592. }
  593. },
  594. async onLoad({ id, behavior }) {
  595. this.id = id;
  596. this.behavior = behavior
  597. await this.refreshData();
  598. this.crossPage.$on('refreshWorkorderDetail', async () => {
  599. await this.refreshData();
  600. })
  601. },
  602. onUnload() {
  603. this.crossPage.$off('refreshWorkorderDetail');
  604. },
  605. methods: {
  606. // 触发下拉刷新
  607. async refresherrefresh(e) {
  608. this.refresherTriggered = true;
  609. await this.refreshData();
  610. },
  611. async changeTab(e) {
  612. this.curTab = e.value;
  613. this.loadStatus = 1;
  614. await this.refreshData();
  615. },
  616. async refreshData() {
  617. try {
  618. await this.getDetail();
  619. await this.getSettleList();
  620. if (this.curTab === 1) {
  621. // await this.getDetail();
  622. } else if (this.curTab === 2) {
  623. } else if (this.curTab === 3) {
  624. await this.getPayList();
  625. } else if (this.curTab === 4) {
  626. await this.getSettleList();
  627. }
  628. this.refresherTriggered = false;
  629. this.loadStatus = 0;
  630. } catch (e) {
  631. this.loadStatus = 2;
  632. }
  633. },
  634. // 获取详情
  635. getDetail() {
  636. return new Promise((resolve, reject) => {
  637. this.$api.post('/pg/order/base/detail', {
  638. orderBaseId: this.id,
  639. }).then((res) => {
  640. this.detail = res.data;
  641. if(this.behavior === "lqdd" && !["DQD"].includes(res.data.orderStatus) && res.data.workerId !== this.$store.state.user.userId){
  642. this.$modal({
  643. title: '提示',
  644. content: '来晚啦,工单已经被抢走了~',
  645. confirmText: "知道啦",
  646. showCancel: false,
  647. }).then(() => {
  648. uni.switchTab({
  649. url: '/pages/index/index'
  650. });
  651. }).catch(() => {
  652. uni.switchTab({
  653. url: '/pages/index/index'
  654. });
  655. })
  656. }
  657. if(res.data.pgIncreOrderId){
  658. this.getIncreDetail(res.data.pgIncreOrderId)
  659. }
  660. resolve(1);
  661. })
  662. .catch((res) => {
  663. reject(0);
  664. });
  665. });
  666. },
  667. getIncreDetail(id){
  668. this.$api.post('/increConfig/detailIncre', {
  669. id
  670. }).then((res) => {
  671. this.increDetail = res.data;
  672. })
  673. },
  674. copyData() {
  675. let name = this.detail.userName;
  676. let phone = this.detail.userMobile;
  677. let address = `${this.detail.gpsAddress ? this.detail.gpsAddress + this.detail.address : this.detail.address}`;
  678. this.$copy(`${name},${phone},${address}`);
  679. },
  680. async openFeedback() {
  681. await this.getFeedbackList();
  682. this.isShowFeedback = true;
  683. },
  684. getFeedbackList() {
  685. return new Promise((resolve, reject) => {
  686. this.$api.post('/pg/order/base/operator/list', {
  687. orderBaseId: this.id,
  688. }).then(res => {
  689. let data = res.data.map(item => {
  690. return {
  691. title: item.type,
  692. time: item.createTime,
  693. content: item.content
  694. }
  695. })
  696. this.feedbackList = data;
  697. }).finally(res => {
  698. resolve(1);
  699. })
  700. })
  701. },
  702. // 获取支付信息
  703. getPayList() {
  704. return new Promise((resolve, reject) => {
  705. let url = '';
  706. if(this.detail.rpProjectRepairId) {
  707. url = '/engin/material/detailWorker'
  708. }else {
  709. url = '/changeOrder/getOrderList'
  710. }
  711. this.$api.post(url, {
  712. workerOrderId: this.id,
  713. }).then(async (res) => {
  714. this.payList = res.data;
  715. resolve(1);
  716. }).catch((res) => {
  717. reject(0);
  718. });
  719. });
  720. },
  721. // 获取安装结算
  722. getSettleList() {
  723. return new Promise((resolve, reject) => {
  724. this.$api.post('/order/settle/norm/detail', {
  725. orderId: this.id,
  726. }).then(res => {
  727. this.settleList = res.data;
  728. if(this.settleList.length > 0 && this.orderStatus_v == 'YJS') {
  729. this.tabList[3].name = `员工结算(${this.settleList.reduce((total, obj) => total + obj.workerSettleAmount, 0)})`
  730. }else {
  731. this.tabList[3].name = `员工结算`
  732. }
  733. resolve(1);
  734. })
  735. .catch((res) => {
  736. reject(0);
  737. });
  738. });
  739. },
  740. // 预览图片
  741. prevImg(url) {
  742. uni.previewImage({
  743. current: this.imageUrl + url,
  744. urls: [this.imageUrl + url],
  745. });
  746. },
  747. // 加急
  748. actionUrgent(flag) {
  749. this.$modal({
  750. title: '加急操作',
  751. content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
  752. }).then(() => {
  753. this.$api.post('/pg/order/base/flag', {
  754. orderBaseId: this.id,
  755. orderFlagEnum: 'JIA_JI',
  756. flag: flag,
  757. }).then(res => {
  758. this.$successToast();
  759. this.getDetail();
  760. this.crossPage.$emit('refreshWorkorderList', '');
  761. })
  762. }).catch(() => { })
  763. },
  764. // 接单
  765. actionReceive() {
  766. this.$modal({
  767. title: '接单确认',
  768. content: '确认接单?'
  769. }).then(() => {
  770. this.$api.post('/pg/order/base/rece', {
  771. orderBaseId: this.id,
  772. }).then(res => {
  773. this.$successToast();
  774. this.getDetail();
  775. this.crossPage.$emit('refreshWorkorderList', '');
  776. })
  777. }).catch(() => { })
  778. },
  779. // 去收费
  780. toCharge(type) {
  781. this.$navToPage({
  782. url: `/packageMaterial/pages/sale/index?type=${type}&oid=${this.id}`
  783. })
  784. },
  785. // 去配件申请
  786. toPartsApply() {
  787. this.$navToPage({
  788. url: `/packageMaterial/pages/partsApply/form?id=${this.id}`
  789. })
  790. },
  791. // 去过程反馈
  792. toFeedback() {
  793. this.$navToPage({
  794. url: `/packageWorkorder/pages/processFeedback?id=${this.id}`
  795. })
  796. },
  797. // 去过程反馈列表
  798. toFeedbackList() {
  799. this.$navToPage({
  800. url: `/packageWorkorder/pages/feedbackList?id=${this.id}`,
  801. })
  802. },
  803. // 去完工明细
  804. toOverDetail() {
  805. this.$navToPage({
  806. url: `/packageWorkorder/pages/overDetail?id=${this.id}`,
  807. })
  808. },
  809. qdOrder(item){
  810. this.$modal({
  811. title: '抢单确认',
  812. content: '确认抢单?'
  813. }).then(() => {
  814. this.$api.post('/pg/order/base/qd', {
  815. orderBaseId: item.id,
  816. }).then(res => {
  817. this.$successToast();
  818. this.getDetail();
  819. this.crossPage.$emit('refreshWorkorderList', '');
  820. })
  821. }).catch(() => { })
  822. }
  823. },
  824. };
  825. </script>
  826. <style lang="scss" scoped>
  827. .all-container {
  828. position: relative;
  829. }
  830. .bg {
  831. position: absolute;
  832. top: 0;
  833. left: 0;
  834. width: 100%;
  835. height: 300rpx;
  836. background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
  837. }
  838. .status-container {
  839. padding: 30rpx;
  840. .status {
  841. font-size: 36rpx;
  842. font-weight: 500;
  843. text {
  844. margin-left: 12rpx;
  845. }
  846. }
  847. .time {
  848. font-size: 24rpx;
  849. color: $sec-font;
  850. margin-top: 12rpx;
  851. }
  852. }
  853. .tab-container {
  854. margin-bottom: 30rpx;
  855. }
  856. .card {
  857. @include zj-card;
  858. }
  859. .common-title {
  860. font-size: 36rpx;
  861. font-weight: 600;
  862. padding-bottom: 20rpx;
  863. }
  864. .common-title2 {
  865. padding-bottom: 20rpx;
  866. display: flex;
  867. align-items: center;
  868. justify-content: space-between;
  869. .title {
  870. font-size: 36rpx;
  871. font-weight: 600;
  872. }
  873. .right {
  874. font-size: 28rpx;
  875. color: $theme-color;
  876. display: flex;
  877. align-items: center;
  878. text {
  879. font-size: 28rpx;
  880. opacity: .5;
  881. }
  882. }
  883. }
  884. .content-container {
  885. padding: 0 30rpx 30rpx;
  886. }
  887. .user-container {
  888. .top {
  889. padding: 30rpx;
  890. .type {
  891. display: flex;
  892. align-items: center;
  893. justify-content: space-between;
  894. .left {
  895. font-size: 36rpx;
  896. color: $theme-color;
  897. font-weight: 500;
  898. }
  899. .right {
  900. font-size: 28rpx;
  901. color: $theme-color;
  902. }
  903. }
  904. .user {
  905. font-weight: 500;
  906. margin-top: 20rpx;
  907. }
  908. .address {
  909. display: flex;
  910. justify-content: space-between;
  911. margin-top: 20rpx;
  912. .text {
  913. font-size: 28rpx;
  914. flex: 1;
  915. margin-right: 20rpx;
  916. }
  917. .ctrl {
  918. font-size: 28rpx;
  919. color: $theme-color;
  920. .iconfont {
  921. font-size: 28rpx;
  922. margin-right: 4rpx;
  923. }
  924. }
  925. }
  926. }
  927. .bottom {
  928. border-top: 1px solid #eaeaea;
  929. display: flex;
  930. height: 80rpx;
  931. .it {
  932. flex: 1;
  933. display: flex;
  934. align-items: center;
  935. justify-content: center;
  936. font-size: 28rpx;
  937. color: $theme-color;
  938. &:last-child {
  939. border-left: 1px solid #eaeaea;
  940. }
  941. .iconfont {
  942. font-size: 36rpx;
  943. margin-right: 8rpx;
  944. }
  945. }
  946. }
  947. }
  948. .goods-container {
  949. padding: 30rpx;
  950. .item {
  951. border-bottom: 1px solid #d6e0f2;
  952. padding: 20rpx 0;
  953. &:last-child {
  954. border: none;
  955. }
  956. .main {
  957. display: flex;
  958. image {
  959. width: 140rpx;
  960. height: 140rpx;
  961. flex-shrink: 0;
  962. }
  963. .info {
  964. flex: 1;
  965. margin-left: 20rpx;
  966. .name {
  967. display: flex;
  968. justify-content: space-between;
  969. .left {
  970. font-weight: 500;
  971. }
  972. .right {
  973. margin-left: 30rpx;
  974. color: $sec-font;
  975. }
  976. }
  977. .tags {
  978. display: flex;
  979. flex-wrap: wrap;
  980. .it {
  981. height: 42rpx;
  982. padding: 0 16rpx;
  983. background: #f4f5f9;
  984. border-radius: 8rpx;
  985. font-size: 24rpx;
  986. display: flex;
  987. align-items: center;
  988. justify-content: center;
  989. margin-top: 12rpx;
  990. margin-right: 8rpx;
  991. &:last-child {
  992. margin-right: 0;
  993. }
  994. }
  995. }
  996. }
  997. }
  998. .images {
  999. display: flex;
  1000. flex-wrap: wrap;
  1001. margin-top: 24rpx;
  1002. .it {
  1003. margin-right: 30rpx;
  1004. image {
  1005. width: 116rpx;
  1006. height: 116rpx;
  1007. }
  1008. .text {
  1009. text-align: center;
  1010. color: $sec-font;
  1011. margin-top: 8rpx;
  1012. }
  1013. }
  1014. }
  1015. }
  1016. .ctrl {
  1017. display: flex;
  1018. align-items: center;
  1019. justify-content: center;
  1020. margin-top: 10rpx;
  1021. text {
  1022. color: $sec-font;
  1023. }
  1024. .iconfont {
  1025. font-size: 24rpx;
  1026. transform: rotate(-90deg);
  1027. margin-left: 10rpx;
  1028. &.is {
  1029. transform: rotate(90deg);
  1030. }
  1031. }
  1032. }
  1033. }
  1034. .info-container {
  1035. padding: 30rpx;
  1036. .row {
  1037. display: flex;
  1038. margin-top: 20rpx;
  1039. &:first-child {
  1040. margin-top: 0;
  1041. }
  1042. .label {
  1043. font-size: 28rpx;
  1044. color: $sec-font;
  1045. margin-right: 20rpx;
  1046. flex-shrink: 0;
  1047. }
  1048. .value {
  1049. font-size: 28rpx;
  1050. }
  1051. .ctrl {
  1052. font-size: 28rpx;
  1053. color: $theme-color;
  1054. margin-left: 20rpx;
  1055. }
  1056. }
  1057. }
  1058. .product-container {
  1059. padding: 30rpx;
  1060. margin-bottom: 30rpx;
  1061. .row {
  1062. display: flex;
  1063. .label {
  1064. font-size: 28rpx;
  1065. color: $sec-font;
  1066. margin-right: 20rpx;
  1067. flex-shrink: 0;
  1068. }
  1069. .value {
  1070. font-size: 28rpx;
  1071. flex: 1;
  1072. }
  1073. }
  1074. .product {
  1075. background: #f5f5f5;
  1076. border-radius: 12rpx;
  1077. padding: 20rpx;
  1078. .it {
  1079. display: flex;
  1080. align-items: flex-end;
  1081. margin-bottom: 20rpx;
  1082. .name {
  1083. flex: 1;
  1084. font-size: 28rpx;
  1085. font-weight: 500;
  1086. text {
  1087. color: $sec-font;
  1088. margin-left: 12rpx;
  1089. font-weight: normal;
  1090. }
  1091. }
  1092. .price {
  1093. margin-left: 30rpx;
  1094. font-size: 28rpx;
  1095. font-weight: 500;
  1096. }
  1097. }
  1098. .total {
  1099. display: flex;
  1100. align-items: center;
  1101. justify-content: flex-end;
  1102. margin-top: 30rpx;
  1103. .text {
  1104. font-size: 28rpx;
  1105. color: $sec-font;
  1106. }
  1107. .price {
  1108. font-size: 28rpx;
  1109. color: $minor-color;
  1110. font-weight: 500;
  1111. }
  1112. }
  1113. }
  1114. .bottom {
  1115. margin-top: 20rpx;
  1116. display: flex;
  1117. align-items: center;
  1118. justify-content: space-between;
  1119. .left {
  1120. font-size: 28rpx;
  1121. font-weight: 500;
  1122. }
  1123. .right {
  1124. display: flex;
  1125. align-items: center;
  1126. .text {
  1127. font-size: 28rpx;
  1128. color: $sec-font;
  1129. }
  1130. .price {
  1131. font-size: 28rpx;
  1132. color: $minor-color;
  1133. font-weight: 500;
  1134. }
  1135. }
  1136. }
  1137. }
  1138. .feedback-container {
  1139. padding: 30rpx;
  1140. .list {
  1141. .item {
  1142. display: flex;
  1143. padding: 10rpx 0;
  1144. .main {
  1145. margin-left: 20rpx;
  1146. .name {
  1147. font-weight: 500;
  1148. line-height: 32rpx;
  1149. }
  1150. .time {
  1151. font-size: 28rpx;
  1152. margin-top: 12rpx;
  1153. color: $sec-font;
  1154. line-height: 32rpx;
  1155. }
  1156. .content {
  1157. font-size: 28rpx;
  1158. margin-top: 12rpx;
  1159. line-height: 32rpx;
  1160. }
  1161. }
  1162. }
  1163. }
  1164. }
  1165. .bottom-container {
  1166. padding: 20rpx;
  1167. display: flex;
  1168. justify-content: space-between;
  1169. .right {
  1170. display: flex;
  1171. ::v-deep .u-button {
  1172. width: 160rpx;
  1173. margin-left: 20rpx;
  1174. }
  1175. }
  1176. }
  1177. .feedback-dialog {
  1178. padding: 30rpx 30rpx 0;
  1179. .title {
  1180. margin-bottom: 30rpx;
  1181. text-align: center;
  1182. font-weight: 600;
  1183. font-size: 36rpx;
  1184. }
  1185. .content {
  1186. padding-bottom: 30rpx;
  1187. max-height: 800rpx;
  1188. overflow-y: scroll;
  1189. }
  1190. }
  1191. .imgs {
  1192. display: flex;
  1193. flex-wrap: wrap;
  1194. .it {
  1195. display: flex;
  1196. flex-direction: column;
  1197. align-items: center;
  1198. position: relative;
  1199. margin-top: 30rpx;
  1200. margin-right: 30rpx;
  1201. &:nth-child(3n) {
  1202. margin-right: 0;
  1203. }
  1204. image {
  1205. width: 190rpx;
  1206. height: 190rpx;
  1207. background: #f4f4f7;
  1208. border-radius: 20rpx;
  1209. overflow: hidden;
  1210. }
  1211. .name {
  1212. margin-top: 24rpx;
  1213. color: $sec-font;
  1214. text {
  1215. color: $minor-color;
  1216. }
  1217. }
  1218. }
  1219. }
  1220. </style>