orderDetail.vue 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900
  1. <template>
  2. <view class="all-container">
  3. <view class="bg"></view>
  4. <zj-page-layout
  5. :isScroll="true"
  6. :hasFooter="true"
  7. :refresherTriggered="refresherTriggered"
  8. @refresherrefresh="refresherrefresh"
  9. >
  10. <!-- 状态 -->
  11. <view class="status-container">
  12. <view class="status" @tap="openFeedback"
  13. >{{ detail ? detail.orderStatusText : '' }}<text class="iconfont icon-jinru"></text
  14. ></view>
  15. <view class="time" v-if="detail && detail.appointmentTime"
  16. >已预约 {{ detail.appointmentTime.slice(0, 10) }}</view
  17. >
  18. </view>
  19. <!-- tab栏 -->
  20. <view class="tab-container">
  21. <u-tabs :scrollable="true" :list="tabList" :current="curTab - 1" @click="changeTab" itemStyle="height: 36px;">
  22. </u-tabs>
  23. </view>
  24. <view class="content-container" v-if="detail">
  25. <!-- 基本信息 -->
  26. <block v-if="~[1].indexOf(curTab)">
  27. <view class="user-container card">
  28. <view class="top">
  29. <view class="type">
  30. <view class="left">{{ detail.orderSmallTypeText ? detail.orderSmallTypeText.slice(0, 2) : '' }}</view>
  31. <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="copyData()">复制</view>
  32. </view>
  33. <view class="user">{{ detail.userName }} {{ detail.userMobile }}</view>
  34. <view class="address">
  35. <view class="text"
  36. >{{ detail.province }}{{ detail.city }}{{ detail.area }}{{ detail.street
  37. }}{{ detail.address || detail.gpsAddress }}
  38. </view>
  39. <view
  40. v-if="detail && orderStatus_v !== 'DQD'"
  41. class="ctrl"
  42. @tap.stop="
  43. $openLocation({
  44. lat: detail.lat,
  45. lng: detail.lng,
  46. address: detail.address || detail.gpsAddress
  47. })
  48. "
  49. ><text class="iconfont icon-daohang"></text>导航</view
  50. >
  51. </view>
  52. </view>
  53. <view class="bottom" v-if="detail && orderStatus_v !== 'DQD'">
  54. <view class="it" @tap="$callPhone(detail.userMobile)"
  55. ><text class="iconfont icon-call"></text>联系电话1</view
  56. >
  57. <view class="it" @tap="$callPhone(detail.userMobile2 || detail.userMobile)"
  58. ><text class="iconfont icon-call"></text>联系电话2</view
  59. >
  60. </view>
  61. </view>
  62. <!-- 商品信息 -->
  63. <view class="goods-container card mt30">
  64. <view class="common-title">商品信息</view>
  65. <view class="item" v-for="(item, index) in detail.pgOrderProducts" :key="index">
  66. <view class="main">
  67. <image :src="item.imgUrl ? item.imgUrl : require('@/static/images/logo.png')" mode="aspectFill"></image>
  68. <view class="info">
  69. <view class="name">
  70. <view class="left" v-if="detail.isZl">{{ item.mainName || '' }}</view>
  71. <view class="left" v-else>{{ item.smallName || '' }} {{ item.productName || '' }}</view>
  72. <view class="right">x{{ item.num }}</view>
  73. </view>
  74. <view class="tags" v-if="!detail.isZl">
  75. <view class="it">{{ item.brandName }}</view>
  76. <!-- <view class="it">家用空调</view> -->
  77. </view>
  78. </view>
  79. </view>
  80. <!-- <view class="images" v-if="isOpenGoods">
  81. <view class="it" v-if="item.insideImg">
  82. <image :src="imageUrl + item.insideImg" mode="aspectFill"
  83. @tap="prevImg(item.insideImg)"></image>
  84. <view class="text">内机</view>
  85. </view>
  86. <view class="it" v-if="item.outImg">
  87. <image :src="imageUrl + item.outImg" mode="aspectFill" @tap="prevImg(item.outImg)">
  88. </image>
  89. <view class="text">外机</view>
  90. </view>
  91. <block v-if="item.partImgs">
  92. <view class="it" v-for="(it, idx) in item.partImgs.split(',')" :key="idx">
  93. <image :src="imageUrl + it" mode="aspectFill" @tap="() => prevImg(it)"></image>
  94. <view class="text">配件</view>
  95. </view>
  96. </block>
  97. </view> -->
  98. </view>
  99. <!-- <view class="ctrl" @tap="isOpenGoods = !isOpenGoods">
  100. <text>{{ isOpenGoods ? '收起' : '查看更多' }}</text>
  101. <text class="iconfont icon-left" :class="isOpenGoods ? 'is' : ''"></text>
  102. </view> -->
  103. </view>
  104. <!-- 订单信息 -->
  105. <view class="info-container card mt30" v-if="detail.saleOrderId && !detail.pgIncreId">
  106. <view class="common-title">订单信息</view>
  107. <view>
  108. <view class="row">
  109. <view class="label">订单编号</view>
  110. <view class="value">{{ detail.saleOrderId }}</view>
  111. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(detail.saleOrderId)">复制</view>
  112. </view>
  113. <view class="row">
  114. <view class="label">下单时间</view>
  115. <view class="value">{{ detail.saleCreateTime || '' }}</view>
  116. </view>
  117. <view class="row">
  118. <view class="label">订单金额</view>
  119. <view class="value">¥{{ detail.saleTotalAmount | priceFilter }}</view>
  120. </view>
  121. <view class="row">
  122. <view class="label">订单备注</view>
  123. <view class="value">{{ detail.saleRemark || '' }}</view>
  124. </view>
  125. </view>
  126. </view>
  127. <view class="info-container card mt30" v-if="detail.pgIncreId && increDetail">
  128. <view class="common-title">产品信息</view>
  129. <view class="row">
  130. <view class="label">服务类型</view>
  131. <view class="value">延保</view>
  132. </view>
  133. <view class="row">
  134. <view class="label">产品品牌</view>
  135. <view class="value">{{ increDetail.brandName }}</view>
  136. </view>
  137. <view class="row">
  138. <view class="label">产品大类</view>
  139. <view class="value">{{ increDetail.mainName }}</view>
  140. </view>
  141. <view class="row">
  142. <view class="label">服务内容</view>
  143. <view class="value">{{ increDetail.increContent }}</view>
  144. </view>
  145. </view>
  146. <view class="info-container card mt30" v-if="detail.pgIncreId && increDetail">
  147. <view class="common-title">产品凭证</view>
  148. <view class="row">
  149. <view class="label">内机条码</view>
  150. <view class="value">{{ increDetail.insideCode }}</view>
  151. </view>
  152. <view class="imgs">
  153. <!-- 内机条码 -->
  154. <view class="it">
  155. <block>
  156. <image mode="aspectFill" :src="increDetail.insideCodeImg" @tap="prevImg(increDetail.insideCodeImg)">
  157. </image>
  158. </block>
  159. <view class="name">内机条码</view>
  160. </view>
  161. <!-- 机器铭牌 -->
  162. <view class="it">
  163. <block>
  164. <image mode="aspectFill" :src="increDetail.machineImg" @tap="prevImg(increDetail.machineImg)">
  165. </image>
  166. </block>
  167. <view class="name">机器铭牌<br />(含出厂日期)</view>
  168. </view>
  169. <!-- 购机凭证 -->
  170. <view class="it">
  171. <block>
  172. <image mode="aspectFill" :src="increDetail.buyCertImg" @tap="prevImg(increDetail.buyCertImg)">
  173. </image>
  174. </block>
  175. <view class="name">购机凭证</view>
  176. </view>
  177. </view>
  178. </view>
  179. <!-- 延保订单信息 -->
  180. <view class="info-container card mt30" v-if="detail.pgIncreId && increDetail">
  181. <view class="common-title">订单信息</view>
  182. <view>
  183. <view class="row">
  184. <view class="label">订单编号</view>
  185. <view class="value">{{ increDetail.id }}</view>
  186. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(increDetail.id)">复制</view>
  187. </view>
  188. <view class="row">
  189. <view class="label">下单时间</view>
  190. <view class="value">{{ increDetail.createTime || '' }}</view>
  191. </view>
  192. <view class="row">
  193. <view class="label">订单金额</view>
  194. <view class="value">¥{{ increDetail.amount }}</view>
  195. </view>
  196. <view class="row">
  197. <view class="label">订单备注</view>
  198. <view class="value">{{ detail.remark || '' }}</view>
  199. </view>
  200. </view>
  201. </view>
  202. <!-- 服务信息 -->
  203. <view class="info-container card mt30">
  204. <view class="common-title">服务信息</view>
  205. <view>
  206. <view class="row">
  207. <view class="label">工单编号</view>
  208. <view class="value">{{ detail.id }}</view>
  209. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(detail.id)">复制</view>
  210. </view>
  211. <view class="row">
  212. <view class="label">下单时间</view>
  213. <view class="value">{{ detail.createTime }}</view>
  214. </view>
  215. <view class="row">
  216. <view class="label">接单时间</view>
  217. <view class="value">{{ detail.workerReceTime || '' }}</view>
  218. </view>
  219. <view class="row">
  220. <view class="label">主工程师</view>
  221. <view class="value">{{ detail.workerName }} {{ detail.workerMobile }}</view>
  222. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$callPhone(detail.workerMobile)"
  223. ><text class="iconfont icon-call"></text
  224. ></view>
  225. </view>
  226. <view class="row" v-for="(item, index) in detail.pgOrderWorkers.filter(o => !o.isMaster)" :key="index">
  227. <view class="label">辅工程师</view>
  228. <view class="value">{{ item.workerName }} {{ item.workerMobile }}</view>
  229. <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$callPhone(item.workerMobile)"
  230. ><text class="iconfont icon-call"></text
  231. ></view>
  232. </view>
  233. <view class="row">
  234. <view class="label">下单渠道</view>
  235. <view class="value">{{ detail.orderChannelText || '' }}</view>
  236. </view>
  237. <view class="row">
  238. <view class="label">订单备注</view>
  239. <view class="value">{{ detail.remark || '' }}</view>
  240. </view>
  241. </view>
  242. </view>
  243. <!-- 建单信息 -->
  244. <view class="info-container card mt30">
  245. <view class="common-title">建单信息</view>
  246. <view>
  247. <view class="row">
  248. <view class="label">建单人名</view>
  249. <view class="value">{{ detail.createBy || '' }}</view>
  250. </view>
  251. <view class="row">
  252. <view class="label">下单网点</view>
  253. <view class="value">{{ detail.websitName || '' }}</view>
  254. </view>
  255. </view>
  256. </view>
  257. </block>
  258. <!-- 服务信息 -->
  259. <block v-if="~[2].indexOf(curTab)">
  260. <!-- 过程反馈 -->
  261. <view class="feedback-container card">
  262. <view class="common-title2">
  263. <view class="title">过程反馈</view>
  264. <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="toFeedbackList"
  265. >查看全部<text class="iconfont icon-jinru"></text>
  266. </view>
  267. </view>
  268. <view class="list" v-if="detail.lastOperator">
  269. <view class="item">
  270. <u-avatar
  271. :text="detail.lastOperatorWebsit ? detail.lastOperatorWebsit.slice(0, 1) : 'A'"
  272. fontSize="18"
  273. randomBgColor
  274. ></u-avatar>
  275. <view class="main">
  276. <view class="name">{{ detail.lastOperatorWebsit || '' }}</view>
  277. <view class="time">{{ detail.lastOperatorTime || '' }}</view>
  278. <view class="content">{{ detail.lastOperator || '' }}</view>
  279. </view>
  280. </view>
  281. </view>
  282. <Loading :type="3" :loadStatus="2" :isLoadAnimation="false" v-else />
  283. </view>
  284. <!-- 预约信息 -->
  285. <view class="info-container card mt30" v-if="detail && detail.appointmentTime">
  286. <view class="common-title">预约信息</view>
  287. <view>
  288. <view class="row">
  289. <view class="label">预约时间</view>
  290. <view class="value">{{ detail.appointmentTime.slice(0, 10) }}</view>
  291. </view>
  292. <view class="row">
  293. <view class="label">预约备注</view>
  294. <view class="value">{{ detail.changeRemark || detail.appointmentRemark }}</view>
  295. </view>
  296. </view>
  297. </view>
  298. <!-- 完工信息 -->
  299. <view class="info-container card mt30" v-if="detail && (orderStatus_v == 'YWG' || orderStatus_v == 'YJS')">
  300. <view class="common-title2">
  301. <view class="title">完工信息</view>
  302. <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="toOverDetail"
  303. >查看更多<text class="iconfont icon-jinru"></text
  304. ></view>
  305. </view>
  306. <view>
  307. <view class="row">
  308. <view class="label">完工时间</view>
  309. <view class="value">{{ detail.overTime || detail.websitOverTime || '' }}</view>
  310. </view>
  311. <view class="row">
  312. <view class="label">完工地点</view>
  313. <view class="value"
  314. >{{ detail.province }}{{ detail.city }}{{ detail.area }}{{ detail.street }}{{ detail.address }}
  315. </view>
  316. </view>
  317. </view>
  318. </view>
  319. </block>
  320. <!-- 电子支付 -->
  321. <block v-if="~[3].indexOf(curTab)">
  322. <block v-if="detail.rpProjectRepairId">
  323. <view class="product-container card" v-for="(item, index) in payList" :key="index">
  324. <view class="row">
  325. <view class="label">支付单号</view>
  326. <view class="value">{{ item.orderId }}</view>
  327. </view>
  328. <view class="row">
  329. <view class="label">支付状态</view>
  330. <view class="value" style="color: red">{{ item.examineStatus | examineStatusFilter }}</view>
  331. </view>
  332. <view class="common-title mt30">产品信息</view>
  333. <view class="product">
  334. <view
  335. class="it"
  336. v-for="(it, idx) in item.rpMaterialOrderItems.filter(
  337. o => o.chargeType == 'ACC' || o.chargeType == 'MCC'
  338. )"
  339. :key="idx"
  340. >
  341. <view class="name"
  342. >{{ it.goodsName }}<text>×{{ it.num }}</text></view
  343. >
  344. <view class="price">¥{{ it.totalAmount }}</view>
  345. </view>
  346. <view class="total">
  347. <view class="text">合计:</view>
  348. <view class="price"
  349. >¥{{
  350. [
  351. 0,
  352. 0,
  353. 0,
  354. ...item.rpMaterialOrderItems
  355. .filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')
  356. .map(val => val.totalAmount)
  357. ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
  358. }}</view
  359. >
  360. </view>
  361. </view>
  362. <view class="common-title mt30">服务费用</view>
  363. <view class="product">
  364. <view
  365. class="it"
  366. v-for="(it, idx) in item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV')"
  367. :key="idx"
  368. >
  369. <view class="name">{{ it.amountName }}</view>
  370. <view class="price">¥{{ it.normAmount }}</view>
  371. </view>
  372. <view class="total">
  373. <view class="text">合计:</view>
  374. <view class="price"
  375. >¥{{
  376. [
  377. 0,
  378. 0,
  379. 0,
  380. ...item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV').map(val => val.normAmount)
  381. ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
  382. }}</view
  383. >
  384. </view>
  385. </view>
  386. <view class="bottom">
  387. <view class="left">订单总金额</view>
  388. <view class="right">
  389. <view class="text">合计:</view>
  390. <view class="price"
  391. >¥{{
  392. [
  393. 0,
  394. 0,
  395. 0,
  396. ...item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV').map(val => val.normAmount),
  397. ...item.rpMaterialOrderItems
  398. .filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')
  399. .map(val => val.totalAmount)
  400. ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
  401. }}</view
  402. >
  403. </view>
  404. </view>
  405. <view class="row mt30">
  406. <view class="label">操作人员</view>
  407. <view class="value">{{ item.createBy }}</view>
  408. </view>
  409. <view class="row mt20">
  410. <view class="label">订单备注</view>
  411. <view class="value">{{ item.remark }}</view>
  412. </view>
  413. </view>
  414. </block>
  415. <block v-else>
  416. <view class="product-container card" v-for="(item, index) in payList" :key="index">
  417. <view class="common-title mt30">支付费用{{ index + 1 }}</view>
  418. <view class="row">
  419. <view class="label">支付单号</view>
  420. <view class="value">{{ item.orderId }}</view>
  421. </view>
  422. <view class="row">
  423. <view class="label">支付状态</view>
  424. <view
  425. class="value"
  426. :style="{ color: item.payStatus == 'WAIT' ? 'red' : item.payStatus == 'PAID' ? 'blue' : '' }"
  427. >{{ item.payStatus | payStatusFilter }}</view
  428. >
  429. </view>
  430. <view class="common-title mt30">产品信息</view>
  431. <view class="product">
  432. <view
  433. class="it"
  434. v-for="(it, idx) in item.workerOrderItems.filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')"
  435. :key="idx"
  436. >
  437. <view class="name"
  438. >{{ it.goodsName }}<text>×{{ it.num }}</text></view
  439. >
  440. <view class="price">¥{{ it.totalAmount }}</view>
  441. </view>
  442. <view class="total">
  443. <view class="text">合计:</view>
  444. <view class="price"
  445. >¥{{
  446. [
  447. 0,
  448. 0,
  449. 0,
  450. ...item.workerOrderItems
  451. .filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')
  452. .map(val => val.totalAmount)
  453. ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
  454. }}</view
  455. >
  456. </view>
  457. </view>
  458. <view class="common-title mt30">服务费用</view>
  459. <view class="product">
  460. <view
  461. class="it"
  462. v-for="(it, idx) in item.workerOrderItems.filter(o => o.chargeType == 'SERV')"
  463. :key="idx"
  464. >
  465. <view class="name">{{ it.amountName }}</view>
  466. <view class="price">¥{{ it.normAmount }}</view>
  467. </view>
  468. <view class="total">
  469. <view class="text">合计:</view>
  470. <view class="price"
  471. >¥{{
  472. [
  473. 0,
  474. 0,
  475. 0,
  476. ...item.workerOrderItems.filter(o => o.chargeType == 'SERV').map(val => val.normAmount)
  477. ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
  478. }}</view
  479. >
  480. </view>
  481. </view>
  482. <view class="bottom">
  483. <view class="left">订单总金额</view>
  484. <view class="right">
  485. <view class="text">合计:</view>
  486. <view class="price"
  487. >¥{{
  488. [
  489. 0,
  490. 0,
  491. 0,
  492. ...item.workerOrderItems.filter(o => o.chargeType == 'SERV').map(val => val.normAmount),
  493. ...item.workerOrderItems
  494. .filter(o => o.chargeType == 'ACC' || o.chargeType == 'MCC')
  495. .map(val => val.totalAmount)
  496. ].reduce((a, b) => (a * 100 + b * 100) / 100, 0)
  497. }}</view
  498. >
  499. </view>
  500. </view>
  501. <view class="row mt30">
  502. <view class="label">操作人员</view>
  503. <view class="value">{{ item.createBy }}</view>
  504. </view>
  505. <view class="row mt20">
  506. <view class="label">订单备注</view>
  507. <view class="value">{{ item.remark }}</view>
  508. </view>
  509. <view style="height: 20rpx"></view>
  510. <view v-if="item.payStatus == 'WAIT'">
  511. <u-button type="success" text="扫码支付" @click="scanCode(item)">扫码支付</u-button>
  512. </view>
  513. </view>
  514. </block>
  515. <block v-if="payList.length < 1">
  516. <Loading :type="3" :loadStatus="2" showText="暂无电子支付信息" :isLoadAnimation="false" />
  517. </block>
  518. </block>
  519. <!-- 费用结算 -->
  520. <block v-if="~[4].indexOf(curTab)">
  521. <!-- 服务费用 -->
  522. <view class="info-container card mt30" v-for="(item, index) in settleList" :key="index">
  523. <block v-if="item.settleNormType !== 'OTHER'">
  524. <view class="common-title2">
  525. <view class="title">服务费用{{ index + 1 }}</view>
  526. <view class="right">{{ orderStatus_v == 'YJS' ? '已结算' : '结算中' }}</view>
  527. </view>
  528. <view>
  529. <view class="row">
  530. <view class="label">产品大类</view>
  531. <view class="value">{{ item.mainName || '' }}</view>
  532. </view>
  533. <view class="row">
  534. <view class="label">产品小类</view>
  535. <view class="value">{{ item.smallName || '' }}</view>
  536. </view>
  537. <view class="row">
  538. <view class="label">机型名称</view>
  539. <view class="value">{{ item.goodsName || '' }}</view>
  540. </view>
  541. <!-- <view class="row">
  542. <view class="label">收费标准</view>
  543. <view class="value">¥{{ item.normAmount | priceFilter }}</view>
  544. </view> -->
  545. <view class="row">
  546. <view class="label">数&emsp;&emsp;量</view>
  547. <view class="value">{{ item.settleNum || '' }}</view>
  548. </view>
  549. <view class="row">
  550. <view class="label">结算金额</view>
  551. <view class="value" v-if="orderStatus_v == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
  552. <view class="value" v-else>-</view>
  553. </view>
  554. </view>
  555. </block>
  556. <block v-else>
  557. <view class="common-title2">
  558. <view class="title">其他费用</view>
  559. <view class="right">{{ orderStatus_v == 'YJS' ? '已结算' : '结算中' }}</view>
  560. </view>
  561. <view>
  562. <view class="row">
  563. <view class="label">类&emsp;&emsp;型</view>
  564. <view class="value">{{ item.typeName || '' }}</view>
  565. </view>
  566. <view class="row">
  567. <view class="label">规&emsp;&emsp;格</view>
  568. <view class="value">{{ item.label || '' }}</view>
  569. </view>
  570. <!-- <view class="row">
  571. <view class="label">单&emsp;&emsp;价</view>
  572. <view class="value">¥{{ item.normAmount | priceFilter }}</view>
  573. </view> -->
  574. <view class="row">
  575. <view class="label">数&emsp;&emsp;量</view>
  576. <view class="value">{{ item.settleNum || '' }}</view>
  577. </view>
  578. <view class="row">
  579. <view class="label">结算金额</view>
  580. <view class="value" v-if="orderStatus_v == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
  581. <view class="value" v-else>-</view>
  582. </view>
  583. </view>
  584. </block>
  585. </view>
  586. <block v-if="settleList.length < 1">
  587. <Loading :type="3" :loadStatus="2" showText="暂无员工结算信息" :isLoadAnimation="false" />
  588. </block>
  589. </block>
  590. </view>
  591. <Loading :type="3" :loadStatus="loadStatus" :isLoadAnimation="false" />
  592. <template slot="footer">
  593. <view class="bottom-container" v-if="detail">
  594. <!-- 接单 -->
  595. <u-button
  596. v-if="
  597. // ---------------
  598. (detail.isImportExcel &&
  599. !detail.isMeet &&
  600. detail.attr == 'SELF' &&
  601. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true)) ||
  602. // ---------------
  603. (detail.isImportExcel && !detail.isMeet && detail.attr != 'SELF') ||
  604. // ---------------
  605. (!detail.isImportExcel &&
  606. detail.attr == 'SELF' &&
  607. ['DYY', 'DJD'].includes(detail.orderStatus) &&
  608. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true)) ||
  609. // ---------------
  610. (!detail.isImportExcel &&
  611. detail.attr != 'SELF' &&
  612. (['DYY'].includes(detail.orderStatus) ||
  613. (['DJD'].includes(detail.orderStatus)
  614. ? detail.orderType == 'INSTALL'
  615. ? !!userInfo.workerNumber
  616. : true
  617. : false)))
  618. "
  619. type="primary"
  620. text="接单"
  621. @tap="actionReceive()"
  622. ></u-button>
  623. <!-- 待抢单 -->
  624. <u-button
  625. v-if="
  626. (!detail.isImportExcel &&
  627. detail.attr == 'SELF' &&
  628. ['DQD'].includes(detail.orderStatus) &&
  629. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true)) ||
  630. (!detail.isImportExcel && detail.attr != 'SELF' && ['DQD'].includes(detail.orderStatus))
  631. "
  632. type="primary"
  633. text="抢单"
  634. @tap="qdOrder(detail)"
  635. ></u-button>
  636. <!-- 配件申请 -->
  637. <u-button
  638. v-if="
  639. // ---------------
  640. ((detail.isImportExcel &&
  641. detail.orderType != 'INSTALL' &&
  642. (['DYY', 'FWZ'].includes(detail.orderStatus) ||
  643. (['DQD', 'DJD', 'DSHPG', 'DWDPG'].includes(detail.orderStatus) && !userInfo.workerNumber))) ||
  644. // ---------------
  645. (detail.isImportExcel &&
  646. detail.orderType != 'INSTALL' &&
  647. ['YWG'].includes(detail.orderStatus) &&
  648. isTodayOrYesterday(detail.overTime)) ||
  649. // ---------------
  650. (!detail.isImportExcel && ['DYY', 'FWZ'].includes(detail.orderStatus))) &&
  651. (detail.isImportExcel ? detail.isMeet : true)
  652. "
  653. plain
  654. type="primary"
  655. text="配件申请"
  656. @tap="toPartsApply()"
  657. ></u-button>
  658. <!-- 变更小工 -->
  659. <u-button
  660. v-if="
  661. // ---------------
  662. ((detail.isImportExcel &&
  663. ['DYY', 'FWZ', 'YWG'].includes(detail.orderStatus) &&
  664. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true)) ||
  665. // ---------------
  666. (detail.isImportExcel &&
  667. ['DQD', 'DJD', 'DSHPG', 'DWDPG'].includes(detail.orderStatus) &&
  668. detail.orderType != 'INSTALL' &&
  669. !userInfo.workerNumber) ||
  670. // ---------------
  671. (!detail.isImportExcel &&
  672. ['DYY', 'FWZ', 'YWG'].includes(detail.orderStatus) &&
  673. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true))) &&
  674. (detail.isImportExcel ? detail.isMeet : true)
  675. "
  676. plain
  677. type="primary"
  678. text="变更小工"
  679. @tap="biangengxiaogong()"
  680. ></u-button>
  681. <!-- 辅材收费 ok-->
  682. <u-button
  683. plain
  684. type="primary"
  685. text="辅材收费"
  686. @tap="toCharge('M')"
  687. v-if="
  688. ((detail.isImportExcel &&
  689. ['DYY', 'FWZ'].includes(detail.orderStatus) &&
  690. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true)) ||
  691. //----------
  692. (detail.isImportExcel &&
  693. ['DQD', 'DJD', 'DSHPG', 'DWDPG'].includes(detail.orderStatus) &&
  694. detail.orderType != 'INSTALL' &&
  695. !userInfo.workerNumber) ||
  696. //----------
  697. (!detail.isImportExcel && ['DYY', 'FWZ'].includes(detail.orderStatus) && !!userInfo.workerNumber) ||
  698. //----------
  699. (((detail.isImportExcel &&
  700. ['YWG'].includes(detail.orderStatus) &&
  701. (detail.orderType == 'INSTALL' ? !!userInfo.workerNumber : true)) ||
  702. (!detail.isImportExcel && ['YWG'].includes(detail.orderStatus) && !!userInfo.workerNumber)) &&
  703. isTodayOrYesterday(detail.overTime))) &&
  704. (detail.isImportExcel ? detail.isMeet : true)
  705. "
  706. ></u-button>
  707. <!-- 配件收费 ok-->
  708. <u-button
  709. plain
  710. type="primary"
  711. text="配件收费"
  712. @tap="toCharge('P')"
  713. v-if="
  714. ((detail.isImportExcel &&
  715. detail.orderType != 'INSTALL' &&
  716. (['DYY', 'FWZ'].includes(detail.orderStatus) ||
  717. (['DQD', 'DJD', 'DSHPG', 'DWDPG'].includes(detail.orderStatus) && !userInfo.workerNumber))) ||
  718. //----------
  719. (!detail.isImportExcel &&
  720. detail.orderType != 'INSTALL' &&
  721. ['DYY', 'FWZ'].includes(detail.orderStatus) &&
  722. !!userInfo.workerNumber) ||
  723. //----------
  724. (((detail.isImportExcel && detail.orderType != 'INSTALL' && ['YWG'].includes(detail.orderStatus)) ||
  725. (!detail.isImportExcel &&
  726. detail.orderType != 'INSTALL' &&
  727. ['YWG'].includes(detail.orderStatus) &&
  728. !!userInfo.workerNumber)) &&
  729. isTodayOrYesterday(detail.overTime))) &&
  730. (detail.isImportExcel ? detail.isMeet : true)
  731. "
  732. ></u-button>
  733. <!-- 过程反馈 ok-->
  734. <u-button
  735. v-if="
  736. (['DYY', 'FWZ'].includes(detail.orderStatus) ||
  737. (detail.isImportExcel &&
  738. detail.orderType != 'INSTALL' &&
  739. !userInfo.workerNumber &&
  740. ['DQD', 'DJD', 'DSHPG', 'DWDPG'].includes(detail.orderStatus))) &&
  741. (detail.isImportExcel ? detail.isMeet : true)
  742. "
  743. type="primary"
  744. text="过程反馈"
  745. @tap="toFeedback()"
  746. ></u-button>
  747. <!-- <block v-if="orderStatus_v == 'DJD'">
  748. <u-button
  749. plain
  750. type="primary"
  751. text="取消加急"
  752. @tap="actionUrgent(false)"
  753. v-if="detail.pgOrderFlags && detail.pgOrderFlags.some(o => o.tag == 'JIA_JI')"
  754. ></u-button>
  755. <u-button plain type="primary" text="加急" @tap="actionUrgent(true)" v-else></u-button>
  756. </block> -->
  757. </view>
  758. </template>
  759. </zj-page-layout>
  760. <selectionWorkers
  761. v-if="item"
  762. :title="title"
  763. :detail="item"
  764. :type="selectionWorkersType"
  765. :callback="callback"
  766. @close="
  767. () => {
  768. item = null
  769. selectionWorkersType = null
  770. callback = null
  771. }
  772. "
  773. />
  774. <u-popup :show="isShowFeedback" @close="isShowFeedback = false" closeable round="10">
  775. <view class="feedback-dialog">
  776. <view class="title">服务路由</view>
  777. <view class="content">
  778. <logistics :logisticsData="feedbackList"></logistics>
  779. </view>
  780. </view>
  781. </u-popup>
  782. <zhifutanchuan
  783. v-if="state > 0"
  784. :detail="detail_zf"
  785. :orderId="orderId_zf"
  786. :state="state"
  787. @scan="scan"
  788. @back="back"
  789. @offTiming="offTiming"
  790. />
  791. </view>
  792. </template>
  793. <script>
  794. import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
  795. import Logistics from '@/components/logistics2/common-logistics.vue'
  796. import selectionWorkers from '@/components/selectionWorkers.vue'
  797. import zhifutanchuan from '@/components/zhifutanchuan.vue'
  798. import { wxScanCode } from '@/common/utils/util.js'
  799. import { getStorage } from '@/common/utils/storage.js'
  800. export default {
  801. components: {
  802. zjDialogPicker,
  803. Logistics,
  804. selectionWorkers,
  805. zhifutanchuan
  806. },
  807. filters: {
  808. payStatusFilter(val) {
  809. const MAP = {
  810. CANCEL: '已取消',
  811. WAIT: '待支付',
  812. PAID: '已支付'
  813. }
  814. return MAP[val]
  815. },
  816. examineStatusFilter(val) {
  817. const MAP = {
  818. WAIT: '待审批',
  819. OK: '审批通过',
  820. FAIL: '审批驳回',
  821. NO: '已取消',
  822. PAID: '已现场支付',
  823. NO_PAID: '未支付'
  824. }
  825. return MAP[val]
  826. }
  827. },
  828. data() {
  829. return {
  830. id: null,
  831. imageUrl: this.$imageUrl,
  832. detail: null,
  833. increDetail: null,
  834. loadStatus: 1,
  835. errorText: '',
  836. refresherTriggered: false,
  837. curTab: 1,
  838. tabList: [
  839. { name: '基本信息', value: 1 },
  840. { name: '服务信息', value: 2 },
  841. { name: '电子支付', value: 3 },
  842. { name: '员工结算', value: 4 }
  843. ],
  844. isOpenGoods: false,
  845. payList: [], // 支付信息列表
  846. settleList: [], // 结算列表
  847. isShowFeedback: false,
  848. feedbackList: [],
  849. behavior: '',
  850. selectionWorkersType: '',
  851. item: null,
  852. callback: null,
  853. title: '',
  854. state: 0,
  855. detail_zf: null,
  856. orderId_zf: null
  857. }
  858. },
  859. computed: {
  860. userInfo() {
  861. return getStorage('user')
  862. },
  863. orderStatus_v() {
  864. if (['DYY'].includes(this?.detail?.orderStatus)) {
  865. // 待预约
  866. return 'DYY'
  867. } else if (['DQD'].includes(this?.detail?.orderStatus)) {
  868. // 待抢单
  869. return 'DQD'
  870. } else if (
  871. [
  872. 'DSHPG',
  873. 'CJ',
  874. 'YPD',
  875. 'DXSPD',
  876. 'DZBPG',
  877. 'DWDSPGP',
  878. 'DXSSPGP',
  879. 'DTJXSSPGP',
  880. 'DZBSPGP',
  881. 'DFZXPD',
  882. 'DFZXSPGP',
  883. 'XSBH',
  884. 'TJXSBH',
  885. 'ZBBH',
  886. 'FZXBH',
  887. 'FL'
  888. ].includes(this?.detail?.orderStatus)
  889. ) {
  890. // 待商户派工
  891. return 'DSHPG'
  892. } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(this?.detail?.orderStatus)) {
  893. // 待网点派工
  894. return 'DWDPG'
  895. } else if (['DJD', 'DSM', 'YZP'].includes(this?.detail?.orderStatus)) {
  896. // 待接单
  897. return 'DJD'
  898. } else if (['FWZ', 'GCSZT', 'BFWG'].includes(this?.detail?.orderStatus)) {
  899. // 服务中
  900. return 'FWZ'
  901. } else if (['YCD'].includes(this?.detail?.orderStatus)) {
  902. // 异常单
  903. return 'YCD'
  904. } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(this?.detail?.orderStatus)) {
  905. // 已完工待结算
  906. return 'YWG'
  907. } else if (['YJS', 'LRCD'].includes(this?.detail?.orderStatus)) {
  908. // 已结算
  909. return 'YJS'
  910. } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(this?.detail?.orderStatus)) {
  911. // 已取消
  912. return 'YQX'
  913. }
  914. return ''
  915. }
  916. },
  917. async onLoad({ id, behavior }) {
  918. this.id = id
  919. this.behavior = behavior
  920. await this.refreshData()
  921. this.crossPage.$on('refreshWorkorderDetail', async () => {
  922. await this.refreshData()
  923. })
  924. },
  925. onUnload() {
  926. this.crossPage.$off('refreshWorkorderDetail')
  927. },
  928. methods: {
  929. scan() {
  930. if (this.timeout) {
  931. clearTimeout(this.timeout)
  932. }
  933. this.scanCode()
  934. },
  935. back() {
  936. if (this.timeout) {
  937. clearTimeout(this.timeout)
  938. }
  939. this.$navToPage(
  940. {
  941. url: `/packageMaterial/pages/index?type=M`
  942. },
  943. 'reLaunch'
  944. )
  945. },
  946. offTiming() {
  947. if (this.timeout) {
  948. clearTimeout(this.timeout)
  949. }
  950. },
  951. // 扫码
  952. async scanCode(item) {
  953. this.detail_zf = { ...item }
  954. this.orderId_zf = item.orderId
  955. var codeVal = await wxScanCode(['qrCode'])
  956. this.submitData(codeVal)
  957. },
  958. // 下单
  959. submitData(code) {
  960. this.$api
  961. .post('/pay/paid', {
  962. authCode: code,
  963. orderId: this.orderId_zf,
  964. payType: 'WECHAT'
  965. })
  966. .then(res => {
  967. if (res.data) {
  968. // 支付成功
  969. this.getPayList(() => {
  970. this.state = 2
  971. })
  972. } else {
  973. // 支付失败
  974. this.getPayList(() => {
  975. this.state = 4
  976. })
  977. }
  978. })
  979. .catch(res => {
  980. // 等待支付
  981. if (res.message === 'USERPAYING') {
  982. if (this.state == 0) {
  983. this.state = 1
  984. }
  985. this.getDetail__()
  986. } else {
  987. this.$tips(res.message)
  988. }
  989. })
  990. },
  991. getDetail__(cb) {
  992. this.$api
  993. .post('/pay/getOrder', {
  994. orderId: this.orderId_zf
  995. })
  996. .then(res => {
  997. this.detail_zf = res.data
  998. if (res.data.payStatus == 'PAID') {
  999. this.state = 2
  1000. } else {
  1001. this.timeout = setTimeout(() => {
  1002. this.getDetail__(cb)
  1003. }, 1000)
  1004. }
  1005. cb?.()
  1006. })
  1007. .catch(res => {})
  1008. .finally(res => {})
  1009. },
  1010. // 触发下拉刷新
  1011. async refresherrefresh(e) {
  1012. this.refresherTriggered = true
  1013. await this.refreshData()
  1014. },
  1015. async changeTab(e) {
  1016. this.curTab = e.value
  1017. this.loadStatus = 1
  1018. await this.refreshData()
  1019. },
  1020. async refreshData() {
  1021. try {
  1022. await this.getDetail()
  1023. await this.getSettleList()
  1024. if (this.curTab === 1) {
  1025. // await this.getDetail();
  1026. } else if (this.curTab === 2) {
  1027. } else if (this.curTab === 3) {
  1028. await this.getPayList()
  1029. } else if (this.curTab === 4) {
  1030. await this.getSettleList()
  1031. }
  1032. this.refresherTriggered = false
  1033. this.loadStatus = 0
  1034. } catch (e) {
  1035. this.loadStatus = 2
  1036. }
  1037. },
  1038. // 获取详情
  1039. getDetail() {
  1040. return new Promise((resolve, reject) => {
  1041. this.$api
  1042. .post('/pg/order/base/detail', {
  1043. orderBaseId: this.id
  1044. })
  1045. .then(res => {
  1046. this.detail = res.data
  1047. if (
  1048. this.behavior === 'lqdd' &&
  1049. !['DQD'].includes(res.data.orderStatus) &&
  1050. res.data.workerId !== this.$store.state.user.userId
  1051. ) {
  1052. this.$modal({
  1053. title: '提示',
  1054. content: '来晚啦,工单已经被抢走了~',
  1055. confirmText: '知道啦',
  1056. showCancel: false
  1057. })
  1058. .then(() => {
  1059. uni.switchTab({
  1060. url: '/pages/index/index'
  1061. })
  1062. })
  1063. .catch(() => {
  1064. uni.switchTab({
  1065. url: '/pages/index/index'
  1066. })
  1067. })
  1068. }
  1069. if (res.data.pgIncreOrderId) {
  1070. this.getIncreDetail(res.data.pgIncreOrderId)
  1071. }
  1072. resolve(1)
  1073. })
  1074. .catch(res => {
  1075. reject(0)
  1076. })
  1077. })
  1078. },
  1079. getIncreDetail(id) {
  1080. this.$api
  1081. .post('/increConfig/detailIncre', {
  1082. id
  1083. })
  1084. .then(res => {
  1085. this.increDetail = res.data
  1086. })
  1087. },
  1088. copyData() {
  1089. let name = this.detail.userName
  1090. let phone = this.detail.userMobile
  1091. let address = `${this.detail.gpsAddress ? this.detail.gpsAddress + this.detail.address : this.detail.address}`
  1092. this.$copy(`${name},${phone},${address}`)
  1093. },
  1094. async openFeedback() {
  1095. await this.getFeedbackList()
  1096. this.isShowFeedback = true
  1097. },
  1098. getFeedbackList() {
  1099. return new Promise((resolve, reject) => {
  1100. this.$api
  1101. .post('/pg/order/base/operator/list', {
  1102. orderBaseId: this.id
  1103. })
  1104. .then(res => {
  1105. let data = res.data.map(item => {
  1106. return {
  1107. title: item.type,
  1108. time: item.createTime,
  1109. content: item.content,
  1110. imgSrc: item.imgSrc
  1111. }
  1112. })
  1113. this.feedbackList = data
  1114. })
  1115. .finally(res => {
  1116. resolve(1)
  1117. })
  1118. })
  1119. },
  1120. // 获取支付信息
  1121. getPayList(cb) {
  1122. return new Promise((resolve, reject) => {
  1123. let url = ''
  1124. if (this.detail.rpProjectRepairId) {
  1125. url = '/engin/material/detailWorker'
  1126. } else {
  1127. url = '/changeOrder/getOrderList'
  1128. }
  1129. this.$api
  1130. .post(url, {
  1131. workerOrderId: this.id
  1132. })
  1133. .then(async res => {
  1134. this.payList = res.data.map(item => {
  1135. var gengduo = [
  1136. {
  1137. chargeType: 'SERV',
  1138. amountName: '服务费用',
  1139. normAmount: item.servicePrice || 0
  1140. },
  1141. {
  1142. chargeType: 'SERV',
  1143. amountName: '其他费用',
  1144. normAmount: item.otherPrice || 0
  1145. }
  1146. ]
  1147. if (this.detail.rpProjectRepairId) {
  1148. if (!item.rpMaterialOrderItems) {
  1149. item.rpMaterialOrderItems = []
  1150. }
  1151. item.rpMaterialOrderItems.push(...gengduo)
  1152. } else {
  1153. if (!item.workerOrderItems) {
  1154. item.workerOrderItems = []
  1155. }
  1156. item.workerOrderItems.push(...gengduo)
  1157. }
  1158. return { ...item }
  1159. })
  1160. cb?.()
  1161. resolve(1)
  1162. })
  1163. .catch(res => {
  1164. cb?.()
  1165. reject(0)
  1166. })
  1167. })
  1168. },
  1169. // 获取安装结算
  1170. getSettleList() {
  1171. return new Promise((resolve, reject) => {
  1172. this.$api
  1173. .post('/order/settle/norm/detail', {
  1174. orderId: this.id
  1175. })
  1176. .then(res => {
  1177. this.settleList = res.data
  1178. if (this.settleList.length > 0 && this.orderStatus_v == 'YJS') {
  1179. this.tabList[3].name = `员工结算(${this.settleList.reduce(
  1180. (total, obj) => total + obj.workerSettleAmount,
  1181. 0
  1182. )})`
  1183. } else {
  1184. this.tabList[3].name = `员工结算`
  1185. }
  1186. resolve(1)
  1187. })
  1188. .catch(res => {
  1189. reject(0)
  1190. })
  1191. })
  1192. },
  1193. // 预览图片
  1194. prevImg(url) {
  1195. uni.previewImage({
  1196. current: this.imageUrl + url,
  1197. urls: [this.imageUrl + url]
  1198. })
  1199. },
  1200. // 加急
  1201. actionUrgent(flag) {
  1202. this.$modal({
  1203. title: '加急操作',
  1204. content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
  1205. })
  1206. .then(() => {
  1207. this.$api
  1208. .post('/pg/order/base/flag', {
  1209. orderBaseId: this.id,
  1210. orderFlagEnum: 'JIA_JI',
  1211. flag: flag
  1212. })
  1213. .then(res => {
  1214. this.$successToast()
  1215. this.getDetail()
  1216. this.crossPage.$emit('refreshWorkorderList', '')
  1217. })
  1218. })
  1219. .catch(() => {})
  1220. },
  1221. // 变更小工
  1222. biangengxiaogong() {
  1223. this.title = '更换小工'
  1224. this.selectionWorkersType = 3
  1225. this.item = { ...this.detail }
  1226. this.callback = () => {
  1227. this.$successToast()
  1228. this.getDetail()
  1229. this.crossPage.$emit('refreshWorkorderList', '')
  1230. this.$nextTick(() => {
  1231. this.item = null
  1232. this.selectionWorkersType = null
  1233. this.callback = null
  1234. this.title = null
  1235. })
  1236. }
  1237. },
  1238. // 接单
  1239. actionReceive() {
  1240. this.title = '接收确认'
  1241. this.selectionWorkersType = 1
  1242. this.item = { ...this.detail }
  1243. this.callback = () => {
  1244. this.$successToast()
  1245. this.getDetail()
  1246. this.crossPage.$emit('refreshWorkorderList', '')
  1247. this.$nextTick(() => {
  1248. this.item = null
  1249. this.selectionWorkersType = null
  1250. this.callback = null
  1251. this.title = null
  1252. })
  1253. }
  1254. // this.$modal({
  1255. // title: '接单确认',
  1256. // content: '确认接单?'
  1257. // })
  1258. // .then(() => {
  1259. // this.$api
  1260. // .post('/pg/order/base/rece', {
  1261. // orderBaseId: this.id
  1262. // })
  1263. // .then(res => {
  1264. // this.$successToast()
  1265. // this.getDetail()
  1266. // this.crossPage.$emit('refreshWorkorderList', '')
  1267. // })
  1268. // })
  1269. // .catch(() => {})
  1270. },
  1271. qdOrder(item) {
  1272. // this.title = '接收确认'
  1273. // this.selectionWorkersType = 2
  1274. // this.item = { ...item }
  1275. // this.callback = () => {
  1276. // this.$successToast()
  1277. // this.getDetail()
  1278. // this.crossPage.$emit('refreshWorkorderList', '')
  1279. // this.$nextTick(() => {
  1280. // this.item = null
  1281. // this.selectionWorkersType = null
  1282. // this.callback = null
  1283. // })
  1284. // }
  1285. this.$modal({
  1286. title: '抢单确认',
  1287. content: '确认抢单?'
  1288. })
  1289. .then(() => {
  1290. this.$api
  1291. .post('/pg/order/base/qd', {
  1292. orderBaseId: item.id
  1293. })
  1294. .then(res => {
  1295. this.$successToast()
  1296. this.getDetail()
  1297. this.crossPage.$emit('refreshWorkorderList', '')
  1298. })
  1299. })
  1300. .catch(() => {})
  1301. },
  1302. // 去收费
  1303. toCharge(type) {
  1304. if (type == 'M') {
  1305. this.$navToPage({
  1306. url: `/packageMaterial/pages/sale/orderList?type=${type}&oid=${this.id}`
  1307. })
  1308. } else if (type == 'P') {
  1309. this.$navToPage({
  1310. url: `/packageMaterial/pages/newSale/orderList?type=${type}&oid=${this.id}`
  1311. })
  1312. }
  1313. },
  1314. // 去配件申请
  1315. toPartsApply() {
  1316. this.$navToPage({
  1317. url: `/packageMaterial/pages/partsApply/form?id=${this.id}`
  1318. })
  1319. },
  1320. // 去过程反馈
  1321. toFeedback() {
  1322. this.$navToPage({
  1323. url: `/packageWorkorder/pages/processFeedback?id=${this.id}`
  1324. })
  1325. },
  1326. // 去过程反馈列表
  1327. toFeedbackList() {
  1328. this.$navToPage({
  1329. url: `/packageWorkorder/pages/feedbackList?id=${this.id}`
  1330. })
  1331. },
  1332. // 去完工明细
  1333. toOverDetail() {
  1334. this.$navToPage({
  1335. url: `/packageWorkorder/pages/overDetail?id=${this.id}`
  1336. })
  1337. },
  1338. isTodayOrYesterday(timeString) {
  1339. const date = new Date(timeString)
  1340. const now = new Date()
  1341. // 获取今天和昨天的日期
  1342. const today = new Date(now.getFullYear(), now.getMonth(), now.getDate())
  1343. const yesterday = new Date(today)
  1344. yesterday.setDate(today.getDate() - 1)
  1345. // 判断给定时间是否在今天或昨天
  1346. return date >= yesterday && date < today
  1347. }
  1348. }
  1349. }
  1350. </script>
  1351. <style lang="scss" scoped>
  1352. .all-container {
  1353. position: relative;
  1354. }
  1355. .bg {
  1356. position: absolute;
  1357. top: 0;
  1358. left: 0;
  1359. width: 100%;
  1360. height: 300rpx;
  1361. background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
  1362. }
  1363. .status-container {
  1364. padding: 30rpx;
  1365. .status {
  1366. font-size: 36rpx;
  1367. font-weight: 500;
  1368. text {
  1369. margin-left: 12rpx;
  1370. }
  1371. }
  1372. .time {
  1373. font-size: 24rpx;
  1374. color: $sec-font;
  1375. margin-top: 12rpx;
  1376. }
  1377. }
  1378. .tab-container {
  1379. margin-bottom: 30rpx;
  1380. }
  1381. .card {
  1382. @include zj-card;
  1383. }
  1384. .common-title {
  1385. font-size: 36rpx;
  1386. font-weight: 600;
  1387. padding-bottom: 20rpx;
  1388. }
  1389. .common-title2 {
  1390. padding-bottom: 20rpx;
  1391. display: flex;
  1392. align-items: center;
  1393. justify-content: space-between;
  1394. .title {
  1395. font-size: 36rpx;
  1396. font-weight: 600;
  1397. }
  1398. .right {
  1399. font-size: 28rpx;
  1400. color: $theme-color;
  1401. display: flex;
  1402. align-items: center;
  1403. flex-wrap: wrap;
  1404. ::v-deep .u-button {
  1405. width: 175rpx;
  1406. margin: 0;
  1407. margin-left: 10rpx;
  1408. }
  1409. text {
  1410. font-size: 28rpx;
  1411. opacity: 0.5;
  1412. }
  1413. }
  1414. }
  1415. .content-container {
  1416. padding: 0 30rpx 30rpx;
  1417. }
  1418. .user-container {
  1419. .top {
  1420. padding: 30rpx;
  1421. .type {
  1422. display: flex;
  1423. align-items: center;
  1424. justify-content: space-between;
  1425. .left {
  1426. font-size: 36rpx;
  1427. color: $theme-color;
  1428. font-weight: 500;
  1429. }
  1430. .right {
  1431. font-size: 28rpx;
  1432. color: $theme-color;
  1433. }
  1434. }
  1435. .user {
  1436. font-weight: 500;
  1437. margin-top: 20rpx;
  1438. }
  1439. .address {
  1440. display: flex;
  1441. justify-content: space-between;
  1442. margin-top: 20rpx;
  1443. .text {
  1444. font-size: 28rpx;
  1445. flex: 1;
  1446. margin-right: 20rpx;
  1447. }
  1448. .ctrl {
  1449. font-size: 28rpx;
  1450. color: $theme-color;
  1451. .iconfont {
  1452. font-size: 28rpx;
  1453. margin-right: 4rpx;
  1454. }
  1455. }
  1456. }
  1457. }
  1458. .bottom {
  1459. border-top: 1px solid #eaeaea;
  1460. display: flex;
  1461. height: 80rpx;
  1462. .it {
  1463. flex: 1;
  1464. display: flex;
  1465. align-items: center;
  1466. justify-content: center;
  1467. font-size: 28rpx;
  1468. color: $theme-color;
  1469. &:last-child {
  1470. border-left: 1px solid #eaeaea;
  1471. }
  1472. .iconfont {
  1473. font-size: 36rpx;
  1474. margin-right: 8rpx;
  1475. }
  1476. }
  1477. }
  1478. }
  1479. .goods-container {
  1480. padding: 30rpx;
  1481. .item {
  1482. border-bottom: 1px solid #d6e0f2;
  1483. padding: 20rpx 0;
  1484. &:last-child {
  1485. border: none;
  1486. }
  1487. .main {
  1488. display: flex;
  1489. image {
  1490. width: 140rpx;
  1491. height: 140rpx;
  1492. flex-shrink: 0;
  1493. }
  1494. .info {
  1495. flex: 1;
  1496. margin-left: 20rpx;
  1497. .name {
  1498. display: flex;
  1499. justify-content: space-between;
  1500. .left {
  1501. font-weight: 500;
  1502. }
  1503. .right {
  1504. margin-left: 30rpx;
  1505. color: $sec-font;
  1506. }
  1507. }
  1508. .tags {
  1509. display: flex;
  1510. flex-wrap: wrap;
  1511. .it {
  1512. height: 42rpx;
  1513. padding: 0 16rpx;
  1514. background: #f4f5f9;
  1515. border-radius: 8rpx;
  1516. font-size: 24rpx;
  1517. display: flex;
  1518. align-items: center;
  1519. justify-content: center;
  1520. margin-top: 12rpx;
  1521. margin-right: 8rpx;
  1522. &:last-child {
  1523. margin-right: 0;
  1524. }
  1525. }
  1526. }
  1527. }
  1528. }
  1529. .images {
  1530. display: flex;
  1531. flex-wrap: wrap;
  1532. margin-top: 24rpx;
  1533. .it {
  1534. margin-right: 30rpx;
  1535. image {
  1536. width: 116rpx;
  1537. height: 116rpx;
  1538. }
  1539. .text {
  1540. text-align: center;
  1541. color: $sec-font;
  1542. margin-top: 8rpx;
  1543. }
  1544. }
  1545. }
  1546. }
  1547. .ctrl {
  1548. display: flex;
  1549. align-items: center;
  1550. justify-content: center;
  1551. margin-top: 10rpx;
  1552. text {
  1553. color: $sec-font;
  1554. }
  1555. .iconfont {
  1556. font-size: 24rpx;
  1557. transform: rotate(-90deg);
  1558. margin-left: 10rpx;
  1559. &.is {
  1560. transform: rotate(90deg);
  1561. }
  1562. }
  1563. }
  1564. }
  1565. .info-container {
  1566. padding: 30rpx;
  1567. .row {
  1568. display: flex;
  1569. margin-top: 20rpx;
  1570. &:first-child {
  1571. margin-top: 0;
  1572. }
  1573. .label {
  1574. font-size: 28rpx;
  1575. color: $sec-font;
  1576. margin-right: 20rpx;
  1577. flex-shrink: 0;
  1578. }
  1579. .value {
  1580. font-size: 28rpx;
  1581. }
  1582. .ctrl {
  1583. font-size: 28rpx;
  1584. color: $theme-color;
  1585. margin-left: 20rpx;
  1586. }
  1587. }
  1588. }
  1589. .product-container {
  1590. padding: 30rpx;
  1591. margin-bottom: 30rpx;
  1592. .row {
  1593. display: flex;
  1594. .label {
  1595. font-size: 28rpx;
  1596. color: $sec-font;
  1597. margin-right: 20rpx;
  1598. flex-shrink: 0;
  1599. }
  1600. .value {
  1601. font-size: 28rpx;
  1602. flex: 1;
  1603. }
  1604. }
  1605. .product {
  1606. background: #f5f5f5;
  1607. border-radius: 12rpx;
  1608. padding: 20rpx;
  1609. .it {
  1610. display: flex;
  1611. align-items: flex-end;
  1612. margin-bottom: 20rpx;
  1613. .name {
  1614. flex: 1;
  1615. font-size: 28rpx;
  1616. font-weight: 500;
  1617. text {
  1618. color: $sec-font;
  1619. margin-left: 12rpx;
  1620. font-weight: normal;
  1621. }
  1622. }
  1623. .price {
  1624. margin-left: 30rpx;
  1625. font-size: 28rpx;
  1626. font-weight: 500;
  1627. }
  1628. }
  1629. .total {
  1630. display: flex;
  1631. align-items: center;
  1632. justify-content: flex-end;
  1633. margin-top: 30rpx;
  1634. .text {
  1635. font-size: 28rpx;
  1636. color: $sec-font;
  1637. }
  1638. .price {
  1639. font-size: 28rpx;
  1640. color: $minor-color;
  1641. font-weight: 500;
  1642. }
  1643. }
  1644. }
  1645. .bottom {
  1646. margin-top: 20rpx;
  1647. display: flex;
  1648. align-items: center;
  1649. justify-content: space-between;
  1650. .left {
  1651. font-size: 28rpx;
  1652. font-weight: 500;
  1653. }
  1654. .right {
  1655. display: flex;
  1656. align-items: center;
  1657. .text {
  1658. font-size: 28rpx;
  1659. color: $sec-font;
  1660. }
  1661. .price {
  1662. font-size: 28rpx;
  1663. color: $minor-color;
  1664. font-weight: 500;
  1665. }
  1666. }
  1667. }
  1668. }
  1669. .feedback-container {
  1670. padding: 30rpx;
  1671. .list {
  1672. .item {
  1673. display: flex;
  1674. padding: 10rpx 0;
  1675. .main {
  1676. margin-left: 20rpx;
  1677. .name {
  1678. font-weight: 500;
  1679. line-height: 32rpx;
  1680. }
  1681. .time {
  1682. font-size: 28rpx;
  1683. margin-top: 12rpx;
  1684. color: $sec-font;
  1685. line-height: 32rpx;
  1686. }
  1687. .content {
  1688. font-size: 28rpx;
  1689. margin-top: 12rpx;
  1690. line-height: 32rpx;
  1691. }
  1692. }
  1693. }
  1694. }
  1695. }
  1696. .bottom-container {
  1697. box-sizing: border-box;
  1698. display: flex;
  1699. align-items: center;
  1700. justify-content: flex-end;
  1701. flex-wrap: wrap;
  1702. padding: 20rpx 20rpx 20rpx 0;
  1703. ::v-deep .u-button {
  1704. width: 175rpx;
  1705. box-sizing: border-box;
  1706. padding: 10rpx;
  1707. margin: 0;
  1708. margin-left: 10rpx;
  1709. margin-bottom: 10rpx;
  1710. }
  1711. }
  1712. .feedback-dialog {
  1713. padding: 30rpx 30rpx 0;
  1714. .title {
  1715. margin-bottom: 30rpx;
  1716. text-align: center;
  1717. font-weight: 600;
  1718. font-size: 36rpx;
  1719. }
  1720. .content {
  1721. padding-bottom: 30rpx;
  1722. max-height: 800rpx;
  1723. overflow-y: scroll;
  1724. }
  1725. }
  1726. .imgs {
  1727. display: flex;
  1728. flex-wrap: wrap;
  1729. .it {
  1730. display: flex;
  1731. flex-direction: column;
  1732. align-items: center;
  1733. position: relative;
  1734. margin-top: 30rpx;
  1735. margin-right: 30rpx;
  1736. &:nth-child(3n) {
  1737. margin-right: 0;
  1738. }
  1739. image {
  1740. width: 190rpx;
  1741. height: 190rpx;
  1742. background: #f4f4f7;
  1743. border-radius: 20rpx;
  1744. overflow: hidden;
  1745. }
  1746. .name {
  1747. margin-top: 24rpx;
  1748. color: $sec-font;
  1749. text {
  1750. color: $minor-color;
  1751. }
  1752. }
  1753. }
  1754. }
  1755. </style>