orderDetail.vue 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862
  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}`
  1269. })
  1270. } else if (type == 'P') {
  1271. this.$navToPage({
  1272. url: `/packageMaterial/pages/newSale/orderList?type=${type}&oid=${this.id}`
  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. isTodayOrYesterday(timeString) {
  1301. const date = new Date(timeString)
  1302. const now = new Date()
  1303. // 获取今天和昨天的日期
  1304. const today = new Date(now.getFullYear(), now.getMonth(), now.getDate())
  1305. const yesterday = new Date(today)
  1306. yesterday.setDate(today.getDate() - 1)
  1307. // 判断给定时间是否在今天或昨天
  1308. return date >= yesterday && date < today
  1309. }
  1310. }
  1311. }
  1312. </script>
  1313. <style lang="scss" scoped>
  1314. .all-container {
  1315. position: relative;
  1316. }
  1317. .bg {
  1318. position: absolute;
  1319. top: 0;
  1320. left: 0;
  1321. width: 100%;
  1322. height: 300rpx;
  1323. background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
  1324. }
  1325. .status-container {
  1326. padding: 30rpx;
  1327. .status {
  1328. font-size: 36rpx;
  1329. font-weight: 500;
  1330. text {
  1331. margin-left: 12rpx;
  1332. }
  1333. }
  1334. .time {
  1335. font-size: 24rpx;
  1336. color: $sec-font;
  1337. margin-top: 12rpx;
  1338. }
  1339. }
  1340. .tab-container {
  1341. margin-bottom: 30rpx;
  1342. }
  1343. .card {
  1344. @include zj-card;
  1345. }
  1346. .common-title {
  1347. font-size: 36rpx;
  1348. font-weight: 600;
  1349. padding-bottom: 20rpx;
  1350. }
  1351. .common-title2 {
  1352. padding-bottom: 20rpx;
  1353. display: flex;
  1354. align-items: center;
  1355. justify-content: space-between;
  1356. .title {
  1357. font-size: 36rpx;
  1358. font-weight: 600;
  1359. }
  1360. .right {
  1361. font-size: 28rpx;
  1362. color: $theme-color;
  1363. display: flex;
  1364. align-items: center;
  1365. flex-wrap: wrap;
  1366. ::v-deep .u-button {
  1367. width: 175rpx;
  1368. margin: 0;
  1369. margin-left: 10rpx;
  1370. }
  1371. text {
  1372. font-size: 28rpx;
  1373. opacity: 0.5;
  1374. }
  1375. }
  1376. }
  1377. .content-container {
  1378. padding: 0 30rpx 30rpx;
  1379. }
  1380. .user-container {
  1381. .top {
  1382. padding: 30rpx;
  1383. .type {
  1384. display: flex;
  1385. align-items: center;
  1386. justify-content: space-between;
  1387. .left {
  1388. font-size: 36rpx;
  1389. color: $theme-color;
  1390. font-weight: 500;
  1391. }
  1392. .right {
  1393. font-size: 28rpx;
  1394. color: $theme-color;
  1395. }
  1396. }
  1397. .user {
  1398. font-weight: 500;
  1399. margin-top: 20rpx;
  1400. }
  1401. .address {
  1402. display: flex;
  1403. justify-content: space-between;
  1404. margin-top: 20rpx;
  1405. .text {
  1406. font-size: 28rpx;
  1407. flex: 1;
  1408. margin-right: 20rpx;
  1409. }
  1410. .ctrl {
  1411. font-size: 28rpx;
  1412. color: $theme-color;
  1413. .iconfont {
  1414. font-size: 28rpx;
  1415. margin-right: 4rpx;
  1416. }
  1417. }
  1418. }
  1419. }
  1420. .bottom {
  1421. border-top: 1px solid #eaeaea;
  1422. display: flex;
  1423. height: 80rpx;
  1424. .it {
  1425. flex: 1;
  1426. display: flex;
  1427. align-items: center;
  1428. justify-content: center;
  1429. font-size: 28rpx;
  1430. color: $theme-color;
  1431. &:last-child {
  1432. border-left: 1px solid #eaeaea;
  1433. }
  1434. .iconfont {
  1435. font-size: 36rpx;
  1436. margin-right: 8rpx;
  1437. }
  1438. }
  1439. }
  1440. }
  1441. .goods-container {
  1442. padding: 30rpx;
  1443. .item {
  1444. border-bottom: 1px solid #d6e0f2;
  1445. padding: 20rpx 0;
  1446. &:last-child {
  1447. border: none;
  1448. }
  1449. .main {
  1450. display: flex;
  1451. image {
  1452. width: 140rpx;
  1453. height: 140rpx;
  1454. flex-shrink: 0;
  1455. }
  1456. .info {
  1457. flex: 1;
  1458. margin-left: 20rpx;
  1459. .name {
  1460. display: flex;
  1461. justify-content: space-between;
  1462. .left {
  1463. font-weight: 500;
  1464. }
  1465. .right {
  1466. margin-left: 30rpx;
  1467. color: $sec-font;
  1468. }
  1469. }
  1470. .tags {
  1471. display: flex;
  1472. flex-wrap: wrap;
  1473. .it {
  1474. height: 42rpx;
  1475. padding: 0 16rpx;
  1476. background: #f4f5f9;
  1477. border-radius: 8rpx;
  1478. font-size: 24rpx;
  1479. display: flex;
  1480. align-items: center;
  1481. justify-content: center;
  1482. margin-top: 12rpx;
  1483. margin-right: 8rpx;
  1484. &:last-child {
  1485. margin-right: 0;
  1486. }
  1487. }
  1488. }
  1489. }
  1490. }
  1491. .images {
  1492. display: flex;
  1493. flex-wrap: wrap;
  1494. margin-top: 24rpx;
  1495. .it {
  1496. margin-right: 30rpx;
  1497. image {
  1498. width: 116rpx;
  1499. height: 116rpx;
  1500. }
  1501. .text {
  1502. text-align: center;
  1503. color: $sec-font;
  1504. margin-top: 8rpx;
  1505. }
  1506. }
  1507. }
  1508. }
  1509. .ctrl {
  1510. display: flex;
  1511. align-items: center;
  1512. justify-content: center;
  1513. margin-top: 10rpx;
  1514. text {
  1515. color: $sec-font;
  1516. }
  1517. .iconfont {
  1518. font-size: 24rpx;
  1519. transform: rotate(-90deg);
  1520. margin-left: 10rpx;
  1521. &.is {
  1522. transform: rotate(90deg);
  1523. }
  1524. }
  1525. }
  1526. }
  1527. .info-container {
  1528. padding: 30rpx;
  1529. .row {
  1530. display: flex;
  1531. margin-top: 20rpx;
  1532. &:first-child {
  1533. margin-top: 0;
  1534. }
  1535. .label {
  1536. font-size: 28rpx;
  1537. color: $sec-font;
  1538. margin-right: 20rpx;
  1539. flex-shrink: 0;
  1540. }
  1541. .value {
  1542. font-size: 28rpx;
  1543. }
  1544. .ctrl {
  1545. font-size: 28rpx;
  1546. color: $theme-color;
  1547. margin-left: 20rpx;
  1548. }
  1549. }
  1550. }
  1551. .product-container {
  1552. padding: 30rpx;
  1553. margin-bottom: 30rpx;
  1554. .row {
  1555. display: flex;
  1556. .label {
  1557. font-size: 28rpx;
  1558. color: $sec-font;
  1559. margin-right: 20rpx;
  1560. flex-shrink: 0;
  1561. }
  1562. .value {
  1563. font-size: 28rpx;
  1564. flex: 1;
  1565. }
  1566. }
  1567. .product {
  1568. background: #f5f5f5;
  1569. border-radius: 12rpx;
  1570. padding: 20rpx;
  1571. .it {
  1572. display: flex;
  1573. align-items: flex-end;
  1574. margin-bottom: 20rpx;
  1575. .name {
  1576. flex: 1;
  1577. font-size: 28rpx;
  1578. font-weight: 500;
  1579. text {
  1580. color: $sec-font;
  1581. margin-left: 12rpx;
  1582. font-weight: normal;
  1583. }
  1584. }
  1585. .price {
  1586. margin-left: 30rpx;
  1587. font-size: 28rpx;
  1588. font-weight: 500;
  1589. }
  1590. }
  1591. .total {
  1592. display: flex;
  1593. align-items: center;
  1594. justify-content: flex-end;
  1595. margin-top: 30rpx;
  1596. .text {
  1597. font-size: 28rpx;
  1598. color: $sec-font;
  1599. }
  1600. .price {
  1601. font-size: 28rpx;
  1602. color: $minor-color;
  1603. font-weight: 500;
  1604. }
  1605. }
  1606. }
  1607. .bottom {
  1608. margin-top: 20rpx;
  1609. display: flex;
  1610. align-items: center;
  1611. justify-content: space-between;
  1612. .left {
  1613. font-size: 28rpx;
  1614. font-weight: 500;
  1615. }
  1616. .right {
  1617. display: flex;
  1618. align-items: center;
  1619. .text {
  1620. font-size: 28rpx;
  1621. color: $sec-font;
  1622. }
  1623. .price {
  1624. font-size: 28rpx;
  1625. color: $minor-color;
  1626. font-weight: 500;
  1627. }
  1628. }
  1629. }
  1630. }
  1631. .feedback-container {
  1632. padding: 30rpx;
  1633. .list {
  1634. .item {
  1635. display: flex;
  1636. padding: 10rpx 0;
  1637. .main {
  1638. margin-left: 20rpx;
  1639. .name {
  1640. font-weight: 500;
  1641. line-height: 32rpx;
  1642. }
  1643. .time {
  1644. font-size: 28rpx;
  1645. margin-top: 12rpx;
  1646. color: $sec-font;
  1647. line-height: 32rpx;
  1648. }
  1649. .content {
  1650. font-size: 28rpx;
  1651. margin-top: 12rpx;
  1652. line-height: 32rpx;
  1653. }
  1654. }
  1655. }
  1656. }
  1657. }
  1658. .bottom-container {
  1659. box-sizing: border-box;
  1660. display: flex;
  1661. align-items: center;
  1662. justify-content: flex-end;
  1663. flex-wrap: wrap;
  1664. padding: 20rpx 20rpx 20rpx 0;
  1665. ::v-deep .u-button {
  1666. width: 175rpx;
  1667. box-sizing: border-box;
  1668. padding: 10rpx;
  1669. margin: 0;
  1670. margin-left: 10rpx;
  1671. margin-bottom: 10rpx;
  1672. }
  1673. }
  1674. .feedback-dialog {
  1675. padding: 30rpx 30rpx 0;
  1676. .title {
  1677. margin-bottom: 30rpx;
  1678. text-align: center;
  1679. font-weight: 600;
  1680. font-size: 36rpx;
  1681. }
  1682. .content {
  1683. padding-bottom: 30rpx;
  1684. max-height: 800rpx;
  1685. overflow-y: scroll;
  1686. }
  1687. }
  1688. .imgs {
  1689. display: flex;
  1690. flex-wrap: wrap;
  1691. .it {
  1692. display: flex;
  1693. flex-direction: column;
  1694. align-items: center;
  1695. position: relative;
  1696. margin-top: 30rpx;
  1697. margin-right: 30rpx;
  1698. &:nth-child(3n) {
  1699. margin-right: 0;
  1700. }
  1701. image {
  1702. width: 190rpx;
  1703. height: 190rpx;
  1704. background: #f4f4f7;
  1705. border-radius: 20rpx;
  1706. overflow: hidden;
  1707. }
  1708. .name {
  1709. margin-top: 24rpx;
  1710. color: $sec-font;
  1711. text {
  1712. color: $minor-color;
  1713. }
  1714. }
  1715. }
  1716. }
  1717. </style>