orderDetail.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849
  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 v-if="JIEDAN(detail, userInfo)" type="primary" text="接单" @tap="actionReceive()"></u-button>
  596. <!-- 待抢单 -->
  597. <u-button v-if="QIANGDAN(detail, userInfo)" type="primary" text="抢单" @tap="qdOrder(detail)"></u-button>
  598. <!-- 配件申请 -->
  599. <u-button
  600. v-if="PEIJIANSHENQING(detail, userInfo)"
  601. plain
  602. type="primary"
  603. text="配件申请"
  604. @tap="toPartsApply()"
  605. ></u-button>
  606. <!-- 变更小工 -->
  607. <u-button
  608. v-if="BIANGENGXIAOGONG(detail, userInfo)"
  609. plain
  610. type="primary"
  611. text="变更小工"
  612. @tap="biangengxiaogong()"
  613. ></u-button>
  614. <!-- 辅材收费 ok-->
  615. <u-button
  616. plain
  617. type="primary"
  618. text="辅材收费"
  619. @tap="toCharge('M')"
  620. v-if="FUCAISHOUFEI(detail, userInfo)"
  621. ></u-button>
  622. <!-- 配件收费 ok-->
  623. <u-button
  624. plain
  625. type="primary"
  626. text="配件收费"
  627. @tap="toCharge('P')"
  628. v-if="PEIJIANSHOUFEI(detail, userInfo)"
  629. ></u-button>
  630. <!-- 过程反馈 ok-->
  631. <u-button
  632. v-if="GUOCHENFANKUI(detail, userInfo)"
  633. type="primary"
  634. text="过程反馈"
  635. @tap="toFeedback()"
  636. ></u-button>
  637. <!-- <block v-if="orderStatus_v == 'DJD'">
  638. <u-button
  639. plain
  640. type="primary"
  641. text="取消加急"
  642. @tap="actionUrgent(false)"
  643. v-if="detail.pgOrderFlags && detail.pgOrderFlags.some(o => o.tag == 'JIA_JI')"
  644. ></u-button>
  645. <u-button plain type="primary" text="加急" @tap="actionUrgent(true)" v-else></u-button>
  646. </block> -->
  647. </view>
  648. </template>
  649. </zj-page-layout>
  650. <selectionWorkers
  651. v-if="item"
  652. :title="title"
  653. :detail="item"
  654. :type="selectionWorkersType"
  655. :callback="callback"
  656. @close="
  657. () => {
  658. item = null
  659. selectionWorkersType = null
  660. callback = null
  661. }
  662. "
  663. />
  664. <u-popup :show="isShowFeedback" @close="isShowFeedback = false" closeable round="10">
  665. <view class="feedback-dialog">
  666. <view class="title">服务路由</view>
  667. <view class="content">
  668. <logistics :logisticsData="feedbackList"></logistics>
  669. </view>
  670. </view>
  671. </u-popup>
  672. <zhifutanchuan
  673. v-if="state > 0"
  674. :detail="detail_zf"
  675. :orderId="orderId_zf"
  676. :state="state"
  677. @scan="scan"
  678. @back="back"
  679. @offTiming="offTiming"
  680. />
  681. </view>
  682. </template>
  683. <script>
  684. import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
  685. import Logistics from '@/components/logistics2/common-logistics.vue'
  686. import selectionWorkers from '@/components/selectionWorkers.vue'
  687. import zhifutanchuan from '@/components/zhifutanchuan.vue'
  688. import { wxScanCode } from '@/common/utils/util.js'
  689. import { getStorage } from '@/common/utils/storage.js'
  690. import orderBtnsShow from './mixins/orderBtnsShow.js'
  691. export default {
  692. mixins: [orderBtnsShow],
  693. components: {
  694. zjDialogPicker,
  695. Logistics,
  696. selectionWorkers,
  697. zhifutanchuan
  698. },
  699. filters: {
  700. payStatusFilter(val) {
  701. const MAP = {
  702. CANCEL: '已取消',
  703. WAIT: '待支付',
  704. PAID: '已支付'
  705. }
  706. return MAP[val]
  707. },
  708. examineStatusFilter(val) {
  709. const MAP = {
  710. WAIT: '待审批',
  711. OK: '审批通过',
  712. FAIL: '审批驳回',
  713. NO: '已取消',
  714. PAID: '已现场支付',
  715. NO_PAID: '未支付'
  716. }
  717. return MAP[val]
  718. }
  719. },
  720. data() {
  721. return {
  722. id: null,
  723. imageUrl: this.$imageUrl,
  724. detail: null,
  725. increDetail: null,
  726. loadStatus: 1,
  727. errorText: '',
  728. refresherTriggered: false,
  729. curTab: 1,
  730. tabList: [
  731. { name: '基本信息', value: 1 },
  732. { name: '服务信息', value: 2 },
  733. { name: '电子支付', value: 3 },
  734. { name: '员工结算', value: 4 }
  735. ],
  736. isOpenGoods: false,
  737. payList: [], // 支付信息列表
  738. settleList: [], // 结算列表
  739. isShowFeedback: false,
  740. feedbackList: [],
  741. behavior: '',
  742. selectionWorkersType: '',
  743. item: null,
  744. callback: null,
  745. title: '',
  746. state: 0,
  747. detail_zf: null,
  748. orderId_zf: null
  749. }
  750. },
  751. computed: {
  752. userInfo() {
  753. return getStorage('user')
  754. },
  755. orderStatus_v() {
  756. if (this?.detail?.isImportExcel && this?.detail?.isMeet === false) {
  757. return 'DJD'
  758. }
  759. if (['DYY'].includes(this?.detail?.orderStatus)) {
  760. // 待预约
  761. return 'DYY'
  762. } else if (['DQD'].includes(this?.detail?.orderStatus)) {
  763. // 待抢单
  764. return 'DQD'
  765. } else if (
  766. [
  767. 'DSHPG',
  768. 'CJ',
  769. 'YPD',
  770. 'DXSPD',
  771. 'DZBPG',
  772. 'DWDSPGP',
  773. 'DXSSPGP',
  774. 'DTJXSSPGP',
  775. 'DZBSPGP',
  776. 'DFZXPD',
  777. 'DFZXSPGP',
  778. 'XSBH',
  779. 'TJXSBH',
  780. 'ZBBH',
  781. 'FZXBH',
  782. 'FL'
  783. ].includes(this?.detail?.orderStatus)
  784. ) {
  785. // 待商户派工
  786. return 'DSHPG'
  787. } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(this?.detail?.orderStatus)) {
  788. // 待网点派工
  789. return 'DWDPG'
  790. } else if (['DJD'].includes(this?.detail?.orderStatus)) {
  791. // 待接单
  792. return 'DJD'
  793. } else if (['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP'].includes(this?.detail?.orderStatus)) {
  794. // 服务中
  795. return 'FWZ'
  796. } else if (['YCD'].includes(this?.detail?.orderStatus)) {
  797. // 异常单
  798. return 'YCD'
  799. } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(this?.detail?.orderStatus)) {
  800. // 已完工待结算
  801. return 'YWG'
  802. } else if (['YJS', 'LRCD'].includes(this?.detail?.orderStatus)) {
  803. // 已结算
  804. return 'YJS'
  805. } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(this?.detail?.orderStatus)) {
  806. // 已取消
  807. return 'YQX'
  808. }
  809. return ''
  810. }
  811. },
  812. async onLoad({ id, behavior }) {
  813. this.id = id
  814. this.behavior = behavior
  815. await this.refreshData()
  816. this.crossPage.$on('refreshWorkorderDetail', async () => {
  817. await this.refreshData()
  818. })
  819. },
  820. onUnload() {
  821. this.crossPage.$off('refreshWorkorderDetail')
  822. },
  823. methods: {
  824. scan() {
  825. if (this.timeout) {
  826. clearTimeout(this.timeout)
  827. }
  828. this.scanCode()
  829. },
  830. back() {
  831. if (this.timeout) {
  832. clearTimeout(this.timeout)
  833. }
  834. this.$navToPage(
  835. {
  836. url: `/packageMaterial/pages/index?type=M`
  837. },
  838. 'reLaunch'
  839. )
  840. },
  841. offTiming() {
  842. if (this.timeout) {
  843. clearTimeout(this.timeout)
  844. }
  845. },
  846. // 扫码
  847. async scanCode(item) {
  848. this.detail_zf = { ...item }
  849. this.orderId_zf = item.orderId
  850. var codeVal = await wxScanCode(['qrCode'])
  851. this.submitData(codeVal)
  852. },
  853. // 下单
  854. submitData(code) {
  855. this.$api
  856. .post('/pay/paid', {
  857. authCode: code,
  858. orderId: this.orderId_zf,
  859. payType: 'WECHAT'
  860. })
  861. .then(res => {
  862. if (res.data) {
  863. // 支付成功
  864. this.getPayList(() => {
  865. this.state = 2
  866. })
  867. } else {
  868. // 支付失败
  869. this.getPayList(() => {
  870. this.state = 4
  871. })
  872. }
  873. })
  874. .catch(res => {
  875. // 等待支付
  876. if (res.message === 'USERPAYING') {
  877. if (this.state == 0) {
  878. this.state = 1
  879. }
  880. this.getDetail__()
  881. } else {
  882. this.$tips(res.message)
  883. }
  884. })
  885. },
  886. getDetail__(cb) {
  887. this.$api
  888. .post('/pay/getOrder', {
  889. orderId: this.orderId_zf
  890. })
  891. .then(res => {
  892. this.detail_zf = res.data
  893. if (res.data.payStatus == 'PAID') {
  894. this.state = 2
  895. } else {
  896. this.timeout = setTimeout(() => {
  897. this.getDetail__(cb)
  898. }, 1000)
  899. }
  900. cb?.()
  901. })
  902. .catch(res => {})
  903. .finally(res => {})
  904. },
  905. // 触发下拉刷新
  906. async refresherrefresh(e) {
  907. this.refresherTriggered = true
  908. await this.refreshData()
  909. },
  910. async changeTab(e) {
  911. this.curTab = e.value
  912. this.loadStatus = 1
  913. await this.refreshData()
  914. },
  915. async refreshData() {
  916. try {
  917. await this.getDetail()
  918. await this.getSettleList()
  919. if (this.curTab === 1) {
  920. // await this.getDetail();
  921. } else if (this.curTab === 2) {
  922. } else if (this.curTab === 3) {
  923. await this.getPayList()
  924. } else if (this.curTab === 4) {
  925. await this.getSettleList()
  926. }
  927. this.refresherTriggered = false
  928. this.loadStatus = 0
  929. } catch (e) {
  930. this.loadStatus = 2
  931. }
  932. },
  933. // 获取详情
  934. getDetail() {
  935. return new Promise((resolve, reject) => {
  936. this.$api
  937. .post('/pg/order/base/detail', {
  938. orderBaseId: this.id
  939. })
  940. .then(res => {
  941. this.detail = res.data
  942. console.log(res.data)
  943. console.log(
  944. `
  945. 完工时间: ${res.data.overTime}
  946. 工程师编号号: ${this.userInfo.workerNumber}
  947. 网点属性(attr): ${res.data.attr}
  948. 工单类型(orderType): ${res.data.orderType}
  949. 是否4.0(isImportExcel): ${res.data.isImportExcel}
  950. 4.0是否已经接单(isMeet): ${res.data.isMeet}
  951. 原工单状态(orderStatus): ${res.data.orderStatus} ==> 复合状态对应:${(orderStatus => {
  952. if (res.data?.isImportExcel && res.data?.isMeet === false) {
  953. return 'DJD'
  954. }
  955. if (['DYY'].includes(orderStatus)) {
  956. // 待预约
  957. return 'DYY'
  958. } else if (['DQD'].includes(orderStatus)) {
  959. // 待抢单
  960. return 'DQD'
  961. } else if (
  962. [
  963. 'DSHPG',
  964. 'CJ',
  965. 'YPD',
  966. 'DXSPD',
  967. 'DZBPG',
  968. 'DWDSPGP',
  969. 'DXSSPGP',
  970. 'DTJXSSPGP',
  971. 'DZBSPGP',
  972. 'DFZXPD',
  973. 'DFZXSPGP',
  974. 'XSBH',
  975. 'TJXSBH',
  976. 'ZBBH',
  977. 'FZXBH',
  978. 'FL'
  979. ].includes(orderStatus)
  980. ) {
  981. // 待商户派工
  982. return 'DSHPG'
  983. } else if (['DWDPG', 'DWDPD', 'WDBH'].includes(orderStatus)) {
  984. // 待网点派工
  985. return 'DWDPG'
  986. } else if (['DJD'].includes(orderStatus)) {
  987. // 待接单
  988. return 'DJD'
  989. } else if (['FWZ', 'GCSZT', 'BFWG', 'DSM', 'YZP'].includes(orderStatus)) {
  990. // 服务中
  991. return 'FWZ'
  992. } else if (['YCD'].includes(orderStatus)) {
  993. // 异常单
  994. return 'YCD'
  995. } else if (['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus)) {
  996. // 已完工待结算
  997. return 'YWG'
  998. } else if (['YJS', 'LRCD'].includes(orderStatus)) {
  999. // 已结算
  1000. return 'YJS'
  1001. } else if (['YQX', 'FWZT', 'YCGB', 'FWQX'].includes(orderStatus)) {
  1002. // 已取消
  1003. return 'YQX'
  1004. }
  1005. return ''
  1006. })(res.data.orderStatus)}
  1007. `
  1008. )
  1009. if (
  1010. this.behavior === 'lqdd' &&
  1011. !['DQD'].includes(res.data.orderStatus) &&
  1012. res.data.workerId !== this.$store.state.user.userId
  1013. ) {
  1014. this.$modal({
  1015. title: '提示',
  1016. content: '来晚啦,工单已经被抢走了~',
  1017. confirmText: '知道啦',
  1018. showCancel: false
  1019. })
  1020. .then(() => {
  1021. uni.switchTab({
  1022. url: '/pages/index/index'
  1023. })
  1024. })
  1025. .catch(() => {
  1026. uni.switchTab({
  1027. url: '/pages/index/index'
  1028. })
  1029. })
  1030. }
  1031. if (res.data.pgIncreOrderId) {
  1032. this.getIncreDetail(res.data.pgIncreOrderId)
  1033. }
  1034. resolve(1)
  1035. })
  1036. .catch(res => {
  1037. reject(0)
  1038. })
  1039. })
  1040. },
  1041. getIncreDetail(id) {
  1042. this.$api
  1043. .post('/increConfig/detailIncre', {
  1044. id
  1045. })
  1046. .then(res => {
  1047. this.increDetail = res.data
  1048. })
  1049. },
  1050. copyData() {
  1051. let name = this.detail.userName
  1052. let phone = this.detail.userMobile
  1053. let address = `${this.detail.gpsAddress ? this.detail.gpsAddress + this.detail.address : this.detail.address}`
  1054. this.$copy(`${name},${phone},${address}`)
  1055. },
  1056. async openFeedback() {
  1057. await this.getFeedbackList()
  1058. this.isShowFeedback = true
  1059. },
  1060. getFeedbackList() {
  1061. return new Promise((resolve, reject) => {
  1062. this.$api
  1063. .post('/pg/order/base/operator/list', {
  1064. orderBaseId: this.id
  1065. })
  1066. .then(res => {
  1067. let data = res.data.map(item => {
  1068. return {
  1069. title: item.type,
  1070. time: item.createTime,
  1071. content: item.content,
  1072. imgSrc: item.imgSrc
  1073. }
  1074. })
  1075. this.feedbackList = data
  1076. })
  1077. .finally(res => {
  1078. resolve(1)
  1079. })
  1080. })
  1081. },
  1082. // 获取支付信息
  1083. getPayList(cb) {
  1084. return new Promise((resolve, reject) => {
  1085. let url = ''
  1086. if (this.detail.rpProjectRepairId) {
  1087. url = '/engin/material/detailWorker'
  1088. } else {
  1089. url = '/changeOrder/getOrderList'
  1090. }
  1091. this.$api
  1092. .post(url, {
  1093. workerOrderId: this.id
  1094. })
  1095. .then(async res => {
  1096. this.payList = res.data.map(item => {
  1097. var gengduo = [
  1098. {
  1099. chargeType: 'SERV',
  1100. amountName: '服务费用',
  1101. normAmount: item.servicePrice || 0
  1102. },
  1103. {
  1104. chargeType: 'SERV',
  1105. amountName: '其他费用',
  1106. normAmount: item.otherPrice || 0
  1107. }
  1108. ]
  1109. if (this.detail.rpProjectRepairId) {
  1110. if (!item.rpMaterialOrderItems) {
  1111. item.rpMaterialOrderItems = []
  1112. }
  1113. item.rpMaterialOrderItems.push(...gengduo)
  1114. } else {
  1115. if (!item.workerOrderItems) {
  1116. item.workerOrderItems = []
  1117. }
  1118. item.workerOrderItems.push(...gengduo)
  1119. }
  1120. return { ...item }
  1121. })
  1122. cb?.()
  1123. resolve(1)
  1124. })
  1125. .catch(res => {
  1126. cb?.()
  1127. reject(0)
  1128. })
  1129. })
  1130. },
  1131. // 获取安装结算
  1132. getSettleList() {
  1133. return new Promise((resolve, reject) => {
  1134. this.$api
  1135. .post('/order/settle/norm/detail', {
  1136. orderId: this.id
  1137. })
  1138. .then(res => {
  1139. this.settleList = res.data
  1140. if (this.settleList.length > 0 && this.orderStatus_v == 'YJS') {
  1141. this.tabList[3].name = `员工结算(${this.settleList.reduce(
  1142. (total, obj) => total + obj.workerSettleAmount,
  1143. 0
  1144. )})`
  1145. } else {
  1146. this.tabList[3].name = `员工结算`
  1147. }
  1148. resolve(1)
  1149. })
  1150. .catch(res => {
  1151. reject(0)
  1152. })
  1153. })
  1154. },
  1155. // 预览图片
  1156. prevImg(url) {
  1157. uni.previewImage({
  1158. current: this.imageUrl + url,
  1159. urls: [this.imageUrl + url]
  1160. })
  1161. },
  1162. // 加急
  1163. actionUrgent(flag) {
  1164. this.$modal({
  1165. title: '加急操作',
  1166. content: '加急操作,会消息通知所有订单相关人员,请谨慎操作。'
  1167. })
  1168. .then(() => {
  1169. this.$api
  1170. .post('/pg/order/base/flag', {
  1171. orderBaseId: this.id,
  1172. orderFlagEnum: 'JIA_JI',
  1173. flag: flag
  1174. })
  1175. .then(res => {
  1176. this.$successToast()
  1177. this.getDetail()
  1178. this.crossPage.$emit('refreshWorkorderList', '')
  1179. })
  1180. })
  1181. .catch(() => {})
  1182. },
  1183. // 变更小工
  1184. biangengxiaogong() {
  1185. this.title = '更换小工'
  1186. this.selectionWorkersType = 3
  1187. this.item = { ...this.detail }
  1188. this.callback = () => {
  1189. this.$successToast()
  1190. this.getDetail()
  1191. this.crossPage.$emit('refreshWorkorderList', '')
  1192. this.$nextTick(() => {
  1193. this.item = null
  1194. this.selectionWorkersType = null
  1195. this.callback = null
  1196. this.title = null
  1197. })
  1198. }
  1199. },
  1200. // 接单
  1201. actionReceive() {
  1202. this.title = '接收确认'
  1203. this.selectionWorkersType = 1
  1204. this.item = { ...this.detail }
  1205. this.callback = () => {
  1206. this.$successToast()
  1207. this.getDetail()
  1208. this.crossPage.$emit('refreshWorkorderList', '')
  1209. this.$nextTick(() => {
  1210. this.item = null
  1211. this.selectionWorkersType = null
  1212. this.callback = null
  1213. this.title = null
  1214. })
  1215. }
  1216. // this.$modal({
  1217. // title: '接单确认',
  1218. // content: '确认接单?'
  1219. // })
  1220. // .then(() => {
  1221. // this.$api
  1222. // .post('/pg/order/base/rece', {
  1223. // orderBaseId: this.id
  1224. // })
  1225. // .then(res => {
  1226. // this.$successToast()
  1227. // this.getDetail()
  1228. // this.crossPage.$emit('refreshWorkorderList', '')
  1229. // })
  1230. // })
  1231. // .catch(() => {})
  1232. },
  1233. qdOrder(item) {
  1234. // this.title = '接收确认'
  1235. // this.selectionWorkersType = 2
  1236. // this.item = { ...item }
  1237. // this.callback = () => {
  1238. // this.$successToast()
  1239. // this.getDetail()
  1240. // this.crossPage.$emit('refreshWorkorderList', '')
  1241. // this.$nextTick(() => {
  1242. // this.item = null
  1243. // this.selectionWorkersType = null
  1244. // this.callback = null
  1245. // })
  1246. // }
  1247. this.$modal({
  1248. title: '抢单确认',
  1249. content: '确认抢单?'
  1250. })
  1251. .then(() => {
  1252. this.$api
  1253. .post('/pg/order/base/qd', {
  1254. orderBaseId: item.id
  1255. })
  1256. .then(res => {
  1257. this.$successToast()
  1258. this.getDetail()
  1259. this.crossPage.$emit('refreshWorkorderList', '')
  1260. })
  1261. })
  1262. .catch(() => {})
  1263. },
  1264. // 去收费
  1265. toCharge(type) {
  1266. if (type == 'M') {
  1267. this.$navToPage({
  1268. url: `/packageMaterial/pages/sale/orderList?type=${type}&oid=${this.id}&tabCurrent=1`
  1269. })
  1270. } else if (type == 'P') {
  1271. this.$navToPage({
  1272. url: `/packageMaterial/pages/newSale/orderList?type=${type}&oid=${this.id}&tabCurrent=1`
  1273. })
  1274. }
  1275. },
  1276. // 去配件申请
  1277. toPartsApply() {
  1278. this.$navToPage({
  1279. url: `/packageMaterial/pages/partsApply/form?id=${this.id}`
  1280. })
  1281. },
  1282. // 去过程反馈
  1283. toFeedback() {
  1284. this.$navToPage({
  1285. url: `/packageWorkorder/pages/processFeedback?id=${this.id}`
  1286. })
  1287. },
  1288. // 去过程反馈列表
  1289. toFeedbackList() {
  1290. this.$navToPage({
  1291. url: `/packageWorkorder/pages/feedbackList?id=${this.id}`
  1292. })
  1293. },
  1294. // 去完工明细
  1295. toOverDetail() {
  1296. this.$navToPage({
  1297. url: `/packageWorkorder/pages/overDetail?id=${this.id}`
  1298. })
  1299. }
  1300. }
  1301. }
  1302. </script>
  1303. <style lang="scss" scoped>
  1304. .all-container {
  1305. position: relative;
  1306. }
  1307. .bg {
  1308. position: absolute;
  1309. top: 0;
  1310. left: 0;
  1311. width: 100%;
  1312. height: 300rpx;
  1313. background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
  1314. }
  1315. .status-container {
  1316. padding: 30rpx;
  1317. .status {
  1318. font-size: 36rpx;
  1319. font-weight: 500;
  1320. text {
  1321. margin-left: 12rpx;
  1322. }
  1323. }
  1324. .time {
  1325. font-size: 24rpx;
  1326. color: $sec-font;
  1327. margin-top: 12rpx;
  1328. }
  1329. }
  1330. .tab-container {
  1331. margin-bottom: 30rpx;
  1332. }
  1333. .card {
  1334. @include zj-card;
  1335. }
  1336. .common-title {
  1337. font-size: 36rpx;
  1338. font-weight: 600;
  1339. padding-bottom: 20rpx;
  1340. }
  1341. .common-title2 {
  1342. padding-bottom: 20rpx;
  1343. display: flex;
  1344. align-items: center;
  1345. justify-content: space-between;
  1346. .title {
  1347. font-size: 36rpx;
  1348. font-weight: 600;
  1349. }
  1350. .right {
  1351. font-size: 28rpx;
  1352. color: $theme-color;
  1353. display: flex;
  1354. align-items: center;
  1355. flex-wrap: wrap;
  1356. ::v-deep .u-button {
  1357. width: 175rpx;
  1358. margin: 0;
  1359. margin-left: 10rpx;
  1360. }
  1361. text {
  1362. font-size: 28rpx;
  1363. opacity: 0.5;
  1364. }
  1365. }
  1366. }
  1367. .content-container {
  1368. padding: 0 30rpx 30rpx;
  1369. }
  1370. .user-container {
  1371. .top {
  1372. padding: 30rpx;
  1373. .type {
  1374. display: flex;
  1375. align-items: center;
  1376. justify-content: space-between;
  1377. .left {
  1378. font-size: 36rpx;
  1379. color: $theme-color;
  1380. font-weight: 500;
  1381. }
  1382. .right {
  1383. font-size: 28rpx;
  1384. color: $theme-color;
  1385. }
  1386. }
  1387. .user {
  1388. font-weight: 500;
  1389. margin-top: 20rpx;
  1390. }
  1391. .address {
  1392. display: flex;
  1393. justify-content: space-between;
  1394. margin-top: 20rpx;
  1395. .text {
  1396. font-size: 28rpx;
  1397. flex: 1;
  1398. margin-right: 20rpx;
  1399. }
  1400. .ctrl {
  1401. font-size: 28rpx;
  1402. color: $theme-color;
  1403. .iconfont {
  1404. font-size: 28rpx;
  1405. margin-right: 4rpx;
  1406. }
  1407. }
  1408. }
  1409. }
  1410. .bottom {
  1411. border-top: 1px solid #eaeaea;
  1412. display: flex;
  1413. height: 80rpx;
  1414. .it {
  1415. flex: 1;
  1416. display: flex;
  1417. align-items: center;
  1418. justify-content: center;
  1419. font-size: 28rpx;
  1420. color: $theme-color;
  1421. &:last-child {
  1422. border-left: 1px solid #eaeaea;
  1423. }
  1424. .iconfont {
  1425. font-size: 36rpx;
  1426. margin-right: 8rpx;
  1427. }
  1428. }
  1429. }
  1430. }
  1431. .goods-container {
  1432. padding: 30rpx;
  1433. .item {
  1434. border-bottom: 1px solid #d6e0f2;
  1435. padding: 20rpx 0;
  1436. &:last-child {
  1437. border: none;
  1438. }
  1439. .main {
  1440. display: flex;
  1441. image {
  1442. width: 140rpx;
  1443. height: 140rpx;
  1444. flex-shrink: 0;
  1445. }
  1446. .info {
  1447. flex: 1;
  1448. margin-left: 20rpx;
  1449. .name {
  1450. display: flex;
  1451. justify-content: space-between;
  1452. .left {
  1453. font-weight: 500;
  1454. }
  1455. .right {
  1456. margin-left: 30rpx;
  1457. color: $sec-font;
  1458. }
  1459. }
  1460. .tags {
  1461. display: flex;
  1462. flex-wrap: wrap;
  1463. .it {
  1464. height: 42rpx;
  1465. padding: 0 16rpx;
  1466. background: #f4f5f9;
  1467. border-radius: 8rpx;
  1468. font-size: 24rpx;
  1469. display: flex;
  1470. align-items: center;
  1471. justify-content: center;
  1472. margin-top: 12rpx;
  1473. margin-right: 8rpx;
  1474. &:last-child {
  1475. margin-right: 0;
  1476. }
  1477. }
  1478. }
  1479. }
  1480. }
  1481. .images {
  1482. display: flex;
  1483. flex-wrap: wrap;
  1484. margin-top: 24rpx;
  1485. .it {
  1486. margin-right: 30rpx;
  1487. image {
  1488. width: 116rpx;
  1489. height: 116rpx;
  1490. }
  1491. .text {
  1492. text-align: center;
  1493. color: $sec-font;
  1494. margin-top: 8rpx;
  1495. }
  1496. }
  1497. }
  1498. }
  1499. .ctrl {
  1500. display: flex;
  1501. align-items: center;
  1502. justify-content: center;
  1503. margin-top: 10rpx;
  1504. text {
  1505. color: $sec-font;
  1506. }
  1507. .iconfont {
  1508. font-size: 24rpx;
  1509. transform: rotate(-90deg);
  1510. margin-left: 10rpx;
  1511. &.is {
  1512. transform: rotate(90deg);
  1513. }
  1514. }
  1515. }
  1516. }
  1517. .info-container {
  1518. padding: 30rpx;
  1519. .row {
  1520. display: flex;
  1521. margin-top: 20rpx;
  1522. &:first-child {
  1523. margin-top: 0;
  1524. }
  1525. .label {
  1526. font-size: 28rpx;
  1527. color: $sec-font;
  1528. margin-right: 20rpx;
  1529. flex-shrink: 0;
  1530. }
  1531. .value {
  1532. font-size: 28rpx;
  1533. }
  1534. .ctrl {
  1535. font-size: 28rpx;
  1536. color: $theme-color;
  1537. margin-left: 20rpx;
  1538. }
  1539. }
  1540. }
  1541. .product-container {
  1542. padding: 30rpx;
  1543. margin-bottom: 30rpx;
  1544. .row {
  1545. display: flex;
  1546. .label {
  1547. font-size: 28rpx;
  1548. color: $sec-font;
  1549. margin-right: 20rpx;
  1550. flex-shrink: 0;
  1551. }
  1552. .value {
  1553. font-size: 28rpx;
  1554. flex: 1;
  1555. }
  1556. }
  1557. .product {
  1558. background: #f5f5f5;
  1559. border-radius: 12rpx;
  1560. padding: 20rpx;
  1561. .it {
  1562. display: flex;
  1563. align-items: flex-end;
  1564. margin-bottom: 20rpx;
  1565. .name {
  1566. flex: 1;
  1567. font-size: 28rpx;
  1568. font-weight: 500;
  1569. text {
  1570. color: $sec-font;
  1571. margin-left: 12rpx;
  1572. font-weight: normal;
  1573. }
  1574. }
  1575. .price {
  1576. margin-left: 30rpx;
  1577. font-size: 28rpx;
  1578. font-weight: 500;
  1579. }
  1580. }
  1581. .total {
  1582. display: flex;
  1583. align-items: center;
  1584. justify-content: flex-end;
  1585. margin-top: 30rpx;
  1586. .text {
  1587. font-size: 28rpx;
  1588. color: $sec-font;
  1589. }
  1590. .price {
  1591. font-size: 28rpx;
  1592. color: $minor-color;
  1593. font-weight: 500;
  1594. }
  1595. }
  1596. }
  1597. .bottom {
  1598. margin-top: 20rpx;
  1599. display: flex;
  1600. align-items: center;
  1601. justify-content: space-between;
  1602. .left {
  1603. font-size: 28rpx;
  1604. font-weight: 500;
  1605. }
  1606. .right {
  1607. display: flex;
  1608. align-items: center;
  1609. .text {
  1610. font-size: 28rpx;
  1611. color: $sec-font;
  1612. }
  1613. .price {
  1614. font-size: 28rpx;
  1615. color: $minor-color;
  1616. font-weight: 500;
  1617. }
  1618. }
  1619. }
  1620. }
  1621. .feedback-container {
  1622. padding: 30rpx;
  1623. .list {
  1624. .item {
  1625. display: flex;
  1626. padding: 10rpx 0;
  1627. .main {
  1628. margin-left: 20rpx;
  1629. .name {
  1630. font-weight: 500;
  1631. line-height: 32rpx;
  1632. }
  1633. .time {
  1634. font-size: 28rpx;
  1635. margin-top: 12rpx;
  1636. color: $sec-font;
  1637. line-height: 32rpx;
  1638. }
  1639. .content {
  1640. font-size: 28rpx;
  1641. margin-top: 12rpx;
  1642. line-height: 32rpx;
  1643. }
  1644. }
  1645. }
  1646. }
  1647. }
  1648. .bottom-container {
  1649. box-sizing: border-box;
  1650. display: flex;
  1651. align-items: center;
  1652. justify-content: flex-end;
  1653. flex-wrap: wrap;
  1654. padding: 20rpx 20rpx 20rpx 0;
  1655. ::v-deep .u-button {
  1656. width: 175rpx;
  1657. box-sizing: border-box;
  1658. padding: 10rpx;
  1659. margin: 0;
  1660. margin-left: 10rpx;
  1661. margin-bottom: 10rpx;
  1662. }
  1663. }
  1664. .feedback-dialog {
  1665. padding: 30rpx 30rpx 0;
  1666. .title {
  1667. margin-bottom: 30rpx;
  1668. text-align: center;
  1669. font-weight: 600;
  1670. font-size: 36rpx;
  1671. }
  1672. .content {
  1673. padding-bottom: 30rpx;
  1674. max-height: 800rpx;
  1675. overflow-y: scroll;
  1676. }
  1677. }
  1678. .imgs {
  1679. display: flex;
  1680. flex-wrap: wrap;
  1681. .it {
  1682. display: flex;
  1683. flex-direction: column;
  1684. align-items: center;
  1685. position: relative;
  1686. margin-top: 30rpx;
  1687. margin-right: 30rpx;
  1688. &:nth-child(3n) {
  1689. margin-right: 0;
  1690. }
  1691. image {
  1692. width: 190rpx;
  1693. height: 190rpx;
  1694. background: #f4f4f7;
  1695. border-radius: 20rpx;
  1696. overflow: hidden;
  1697. }
  1698. .name {
  1699. margin-top: 24rpx;
  1700. color: $sec-font;
  1701. text {
  1702. color: $minor-color;
  1703. }
  1704. }
  1705. }
  1706. }
  1707. </style>