index.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787
  1. <template>
  2. <view class="invoice">
  3. <nav-bar title="发票申请"></nav-bar>
  4. <view class="invoice__tabs">
  5. <u-tabs
  6. :list="list"
  7. sticky
  8. :current="current"
  9. @change="change"
  10. active-color="#007AFF"
  11. ></u-tabs>
  12. </view>
  13. <view class="invoice__content">
  14. <view class="open" v-if="current == 0">
  15. <view class="form">
  16. <u-form :model="form" ref="uForm">
  17. <u-form-item
  18. label="发票类型"
  19. label-width="150"
  20. required
  21. prop="type"
  22. >
  23. <u-radio-group v-model="form.type" @change="formTypeChange">
  24. <u-radio
  25. v-for="(item, index) in typeList"
  26. :key="index"
  27. :name="item.value"
  28. >
  29. {{ item.name }}
  30. </u-radio>
  31. </u-radio-group>
  32. </u-form-item>
  33. <!-- 增值税发票 -->
  34. <template v-if="form.type == 2">
  35. <u-form-item
  36. label="申请主体"
  37. label-width="150"
  38. required
  39. prop="subject"
  40. >
  41. <u-radio-group v-model="form.subject">
  42. <u-radio :key="index" name="2"> 企业 </u-radio>
  43. </u-radio-group>
  44. </u-form-item>
  45. <u-form-item
  46. label="发票抬头"
  47. label-width="150"
  48. required
  49. prop="invoiceTitle"
  50. >
  51. <u-input
  52. placeholder="请输入发票抬头"
  53. v-model="form.invoiceTitle"
  54. />
  55. </u-form-item>
  56. <u-form-item label="邮箱" label-width="150" required prop="email">
  57. <u-input placeholder="请输入邮箱" v-model="form.email" />
  58. </u-form-item>
  59. <u-form-item
  60. label="纳税登记号"
  61. label-width="150"
  62. required
  63. prop="taxRegistryNumber"
  64. >
  65. <u-input
  66. placeholder="请输入纳税登记号"
  67. v-model="form.taxRegistryNumber"
  68. />
  69. </u-form-item>
  70. <u-form-item
  71. label="单位地址"
  72. label-width="150"
  73. required
  74. prop="companyAddress"
  75. >
  76. <u-input
  77. placeholder="请输入单位地址"
  78. v-model="form.companyAddress"
  79. />
  80. </u-form-item>
  81. <u-form-item
  82. label="电话号码"
  83. label-width="150"
  84. required
  85. prop="phone"
  86. >
  87. <u-input
  88. placeholder="请输入电话号码"
  89. type="number"
  90. v-model="form.phone"
  91. />
  92. </u-form-item>
  93. <u-form-item
  94. label="开户银行"
  95. label-width="150"
  96. required
  97. prop="bankName"
  98. >
  99. <u-input placeholder="请输入开户银行" v-model="form.bankName" />
  100. </u-form-item>
  101. <u-form-item
  102. label="银行账号"
  103. label-width="150"
  104. required
  105. prop="bankAccount"
  106. >
  107. <u-input
  108. placeholder="请输入银行账号"
  109. type="number"
  110. v-model="form.bankAccount"
  111. />
  112. </u-form-item>
  113. <u-form-item
  114. label="收件地址"
  115. label-width="150"
  116. required
  117. prop="receivingAddress"
  118. >
  119. <u-input
  120. placeholder="请输入收件地址"
  121. v-model="form.receivingAddress"
  122. />
  123. </u-form-item>
  124. <u-form-item
  125. label="收件人"
  126. label-width="150"
  127. required
  128. prop="receivingName"
  129. >
  130. <u-input
  131. placeholder="请输入收件人"
  132. v-model="form.receivingName"
  133. />
  134. </u-form-item>
  135. <u-form-item
  136. label="收件手机"
  137. label-width="150"
  138. required
  139. prop="receivingTel"
  140. >
  141. <u-input
  142. placeholder="请输入收件手机"
  143. v-model="form.receivingTel"
  144. />
  145. </u-form-item>
  146. </template>
  147. <!-- 增值税发票 -->
  148. <!-- 普通发票 -->
  149. <template v-else>
  150. <u-form-item
  151. label="申请主体"
  152. label-width="150"
  153. required
  154. prop="subject"
  155. >
  156. <u-radio-group v-model="form.subject">
  157. <u-radio
  158. v-for="(item, index) in mainList"
  159. :key="index"
  160. :name="item.value"
  161. >
  162. {{ item.name }}
  163. </u-radio>
  164. </u-radio-group>
  165. </u-form-item>
  166. <u-form-item
  167. label="发票抬头"
  168. label-width="150"
  169. required
  170. prop="invoiceTitle"
  171. >
  172. <u-input
  173. placeholder="请输入发票抬头"
  174. v-model="form.invoiceTitle"
  175. />
  176. </u-form-item>
  177. <u-form-item label="邮箱" label-width="150" required prop="email">
  178. <u-input placeholder="请输入邮箱" v-model="form.email" />
  179. </u-form-item>
  180. <u-form-item
  181. v-if="form.subject == '2'"
  182. label="纳税登记号"
  183. label-width="150"
  184. required
  185. prop="taxRegistryNumber"
  186. >
  187. <u-input
  188. placeholder="请输入纳税登记号"
  189. v-model="form.taxRegistryNumber"
  190. />
  191. </u-form-item>
  192. </template>
  193. <!-- 普通发票 -->
  194. <u-form-item
  195. label="选择订单"
  196. label-width="150"
  197. required
  198. prop="orderGoodsIds"
  199. right-icon="arrow-right"
  200. ref="orderGoodsIds"
  201. >
  202. <view class="form-item" @click="selectOrderModal = true">
  203. <u-input
  204. placeholder="请点击选择订单"
  205. disabled
  206. @click="selectOrderModal = true"
  207. />
  208. </view>
  209. </u-form-item>
  210. <view>
  211. <view
  212. class="check-order"
  213. v-for="(item, index) in filterOrderList"
  214. :key="index"
  215. >
  216. <view class="close" @click="deleteOrder(index)">
  217. <u-icon
  218. name="close-circle-fill"
  219. color="#FF2D55"
  220. size="40"
  221. ></u-icon>
  222. </view>
  223. <view class="title">商品名称:{{ item.goodsName }}</view>
  224. <view class="number">订单编号:{{ item.orderSn }}</view>
  225. <view class="price">价格:¥ {{ item.goodsPrice }}</view>
  226. </view>
  227. </view>
  228. </u-form>
  229. </view>
  230. <view class="order-text">
  231. <view class="order-text__label">本次申请开票金额:</view>
  232. <view class="order-text__price">¥ {{ toFixed(invoicePirce) }}</view>
  233. </view>
  234. <view class="submit" @click="formSubmit"> 提交申请 </view>
  235. </view>
  236. <view class="record" v-if="current == 1">
  237. <view class="nodata" v-if="!recordList.length">
  238. 您暂无相关发票记录哦~
  239. </view>
  240. <view class="record__list">
  241. <view
  242. class="record-item"
  243. @click="showDetailModal(record)"
  244. v-for="(record, index) in recordList"
  245. :key="index"
  246. >
  247. <view class="item__time">{{
  248. $method.timestampToTime(record.applyTime, false, false)
  249. }}</view>
  250. <view class="item__content">
  251. <view class="top">
  252. <view
  253. class="state"
  254. :class="{
  255. wait: record.periodStatus == 1,
  256. refuse: record.periodStatus == 2,
  257. agree: record.periodStatus == 3,
  258. }"
  259. >
  260. <text v-if="record.periodStatus == 1">待审核</text>
  261. <text v-if="record.periodStatus == 2">驳回</text>
  262. <text v-if="record.periodStatus == 3">通过</text>
  263. <u-icon
  264. class="arrow"
  265. name="arrow-right"
  266. color="#ffffff"
  267. size="28"
  268. ></u-icon>
  269. </view>
  270. </view>
  271. <view class="bottom">
  272. <view class="flex">
  273. <view class="text">发票类型</view>
  274. <view class="flex__auto">
  275. <text v-if="record.type == 1">普通发票</text>
  276. <text v-if="record.type == 2">增值税专用发票</text>
  277. </view>
  278. </view>
  279. <view class="flex">
  280. <view class="text">申请主体</view>
  281. <view class="flex__auto">
  282. <text v-if="record.subject == 1">个人</text>
  283. <text v-if="record.subject == 2">企业</text>
  284. </view>
  285. </view>
  286. <view class="flex">
  287. <view class="text">发票状态</view>
  288. <view class="flex__auto">
  289. <text class="red" v-if="record.invoiceStatus == 1"
  290. >未开票</text
  291. >
  292. <text class="red" v-if="record.invoiceStatus == 3"
  293. >开票中</text
  294. >
  295. <text class="green" v-if="record.invoiceStatus == 2"
  296. >已开票</text
  297. >
  298. <text class="red" v-if="record.invoiceStatus == -1"
  299. >已退票</text
  300. >
  301. </view>
  302. </view>
  303. <view @click.stop="showOrder(record.checked, index)">
  304. <view class="flex noborder">
  305. <view class="text">开票订单</view>
  306. <view class="flex__auto">
  307. <text style="margin-right: 10rpx">{{
  308. record.orderList.length
  309. }}</text>
  310. <u-icon
  311. v-if="!record.checked"
  312. name="arrow-down"
  313. color="#ccc"
  314. size="28"
  315. ></u-icon>
  316. <u-icon
  317. v-if="record.checked"
  318. name="arrow-up"
  319. color="#ccc"
  320. size="28"
  321. ></u-icon>
  322. </view>
  323. </view>
  324. <view class="order-list" v-if="record.checked">
  325. <view
  326. class="order-item"
  327. :key="orderIndex"
  328. v-for="(orderItem, orderIndex) in record.orderList"
  329. >{{ orderIndex + 1 }}.{{ orderItem.goodsName }}</view
  330. >
  331. </view>
  332. </view>
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. </view>
  338. </view>
  339. <u-popup
  340. class="modal"
  341. v-model="selectOrderModal"
  342. mode="bottom"
  343. border-radius="24"
  344. >
  345. <view class="select-order">
  346. <view class="line"></view>
  347. <view class="title">选择订单</view>
  348. <u-line color="#D6D6DB" />
  349. <view>
  350. <scroll-view scroll-y="true" style="height: 500rpx">
  351. <view v-if="orderList.length">
  352. <u-checkbox-group>
  353. <view v-for="(item, index) in orderList" :key="index">
  354. <view class="order-item">
  355. <view>
  356. <u-checkbox
  357. :disabled="item.disabled"
  358. shape="circle"
  359. :name="item.name"
  360. v-model="item.checked"
  361. >
  362. <view
  363. class="order-item__bg"
  364. :class="item.checked ? 'active' : ''"
  365. >
  366. <view>
  367. <view class="order-title">{{
  368. item.goodsName
  369. }}</view>
  370. <view class="order-number">{{ item.orderSn }}</view>
  371. <view class="order-price"
  372. >¥ {{ item.goodsPrice }}元</view
  373. >
  374. </view>
  375. </view>
  376. </u-checkbox>
  377. </view>
  378. </view>
  379. </view>
  380. </u-checkbox-group>
  381. </view>
  382. <view v-else class="no_data">
  383. <text>暂无可开发票的订单</text>
  384. </view>
  385. </scroll-view>
  386. </view>
  387. <view class="confrim-btn">
  388. <view class="okBtn" @click="okPopup()">确定</view>
  389. </view>
  390. </view>
  391. </u-popup>
  392. <u-popup
  393. class="modal"
  394. v-model="orderDetailModal"
  395. mode="center"
  396. border-radius="40"
  397. >
  398. <view class="order-detail">
  399. <view class="order-detail__content">
  400. <scroll-view scroll-y="true" style="height: 860rpx">
  401. <view class="content">
  402. <view class="header">{{
  403. $method.timestampToTime(invoiceDetail.applyTime, false, false)
  404. }}</view>
  405. <view class="body">
  406. <view class="body__item">
  407. <view class="title">发票申请信息</view>
  408. <view class="content">
  409. <u-cell-item
  410. :border-bottom="false"
  411. hover-class="none"
  412. :arrow="false"
  413. >
  414. <view slot="title">发票类型:</view>
  415. <text v-if="invoiceDetail.type == 1">普通发票</text>
  416. <text v-if="invoiceDetail.type == 2">增值税专用发票</text>
  417. </u-cell-item>
  418. <u-cell-item
  419. :border-bottom="false"
  420. hover-class="none"
  421. :arrow="false"
  422. >
  423. <view slot="title">申请主体:</view>
  424. <text v-if="invoiceDetail.subject == 1">个人</text>
  425. <text v-if="invoiceDetail.subject == 2">企业</text>
  426. </u-cell-item>
  427. <u-cell-item
  428. :border-bottom="false"
  429. hover-class="none"
  430. :arrow="false"
  431. >
  432. <view slot="title">发票抬头:</view>
  433. <text>{{ invoiceDetail.invoiceTitle }}</text>
  434. </u-cell-item>
  435. <template v-if="invoiceDetail.subject == 2">
  436. <u-cell-item
  437. :border-bottom="false"
  438. hover-class="none"
  439. :arrow="false"
  440. >
  441. <view slot="title">纳税登记号:</view>
  442. <text>{{ invoiceDetail.taxRegistryNumber || "" }}</text>
  443. </u-cell-item>
  444. </template>
  445. <template v-if="invoiceDetail.type == 2">
  446. <u-cell-item
  447. :border-bottom="false"
  448. hover-class="none"
  449. :arrow="false"
  450. >
  451. <view slot="title">单位地址:</view>
  452. <text>{{ invoiceDetail.companyAddress || "" }}</text>
  453. </u-cell-item>
  454. <u-cell-item
  455. :border-bottom="false"
  456. hover-class="none"
  457. :arrow="false"
  458. >
  459. <view slot="title">电话号码:</view>
  460. <text>{{ invoiceDetail.phone || "" }}</text>
  461. </u-cell-item>
  462. <u-cell-item
  463. :border-bottom="false"
  464. hover-class="none"
  465. :arrow="false"
  466. >
  467. <view slot="title">开户银行:</view>
  468. <text>{{ invoiceDetail.bankName || "" }}</text>
  469. </u-cell-item>
  470. <u-cell-item
  471. :border-bottom="false"
  472. hover-class="none"
  473. :arrow="false"
  474. >
  475. <view slot="title">银行账号:</view>
  476. <text>{{ invoiceDetail.bankAccount || "" }}</text>
  477. </u-cell-item>
  478. <u-cell-item
  479. :border-bottom="false"
  480. hover-class="none"
  481. :arrow="false"
  482. >
  483. <view slot="title">收件地址:</view>
  484. <text>{{ invoiceDetail.receivingAddress || "" }}</text>
  485. </u-cell-item>
  486. <u-cell-item
  487. :border-bottom="false"
  488. hover-class="none"
  489. :arrow="false"
  490. >
  491. <view slot="title">收件人:</view>
  492. <text>{{ invoiceDetail.receivingName || "" }}</text>
  493. </u-cell-item>
  494. <u-cell-item
  495. :border-bottom="false"
  496. hover-class="none"
  497. :arrow="false"
  498. >
  499. <view slot="title">收件手机:</view>
  500. <text>{{ invoiceDetail.receivingTel || "" }}</text>
  501. </u-cell-item>
  502. <u-cell-item
  503. :border-bottom="false"
  504. hover-class="none"
  505. :arrow="false"
  506. >
  507. <view slot="title">开票订单:</view>
  508. </u-cell-item>
  509. </template>
  510. <view class="order-list">
  511. <view
  512. class="order-item"
  513. :key="orderIndex"
  514. v-for="(
  515. orderItem, orderIndex
  516. ) in invoiceDetail.orderList"
  517. >
  518. <view class="order-title">{{
  519. orderItem.goodsName
  520. }}</view>
  521. <view class="order-number">{{
  522. orderItem.orderSn
  523. }}</view>
  524. <view class="order-price"
  525. >¥ {{ orderItem.goodsRealPrice }}元</view
  526. >
  527. </view>
  528. </view>
  529. <view class="order-text">
  530. <view class="order-text__label">本次申请开票金额:</view>
  531. <view class="order-text__price"
  532. >¥ {{ toFixed(invoiceDetail.amount) }}</view
  533. >
  534. </view>
  535. </view>
  536. </view>
  537. <view class="body__item">
  538. <view class="title">发票申请结果</view>
  539. <view class="content">
  540. <u-cell-item
  541. :border-bottom="false"
  542. hover-class="none"
  543. :arrow="false"
  544. >
  545. <view slot="title">审核结果:</view>
  546. <text
  547. class="text wait"
  548. v-if="invoiceDetail.periodStatus == 1"
  549. >待审核</text
  550. >
  551. <text
  552. class="text agree"
  553. v-if="invoiceDetail.periodStatus == 3"
  554. >通过</text
  555. >
  556. <text
  557. class="text refuse"
  558. v-if="invoiceDetail.periodStatus == 2"
  559. >驳回</text
  560. >
  561. </u-cell-item>
  562. <u-cell-item
  563. :border-bottom="false"
  564. hover-class="none"
  565. :arrow="false"
  566. v-if="invoiceDetail.periodReason"
  567. >
  568. <view slot="title">审核反馈:</view>
  569. <text class="text">{{
  570. invoiceDetail.periodReason || ""
  571. }}</text>
  572. </u-cell-item>
  573. <u-cell-item
  574. :border-bottom="false"
  575. hover-class="none"
  576. :arrow="false"
  577. >
  578. <view slot="title">发票状态:</view>
  579. <text
  580. class="text refuse"
  581. v-if="invoiceDetail.invoiceStatus == 1"
  582. >未开票</text
  583. >
  584. <text class="red" v-if="invoiceDetail.invoiceStatus == 3"
  585. >开票中</text
  586. >
  587. <text
  588. class="text agree"
  589. v-if="invoiceDetail.invoiceStatus == 2"
  590. >已开票</text
  591. >
  592. <text
  593. class="text refuse"
  594. v-if="invoiceDetail.invoiceStatus == -1"
  595. >已退票</text
  596. >
  597. </u-cell-item>
  598. <u-cell-item
  599. :border-bottom="false"
  600. hover-class="none"
  601. :arrow="false"
  602. v-if="
  603. invoiceDetail.periodStatus == 3 &&
  604. (invoiceDetail.invoiceStatus == 2 ||
  605. invoiceDetail.invoiceStatus == -1) &&
  606. invoiceDetail.invoiceImg
  607. "
  608. >
  609. <view slot="title">发票预览:</view>
  610. <view>
  611. <image
  612. class="preview"
  613. @click="previewImg(invoiceDetail)"
  614. :src="$method.splitImgHost(invoiceDetail.invoiceImg)"
  615. ></image>
  616. <view
  617. class="download-btn"
  618. @click="download(invoiceDetail)"
  619. >下载电子发票</view
  620. >
  621. </view>
  622. </u-cell-item>
  623. <u-cell-item
  624. :border-bottom="false"
  625. hover-class="none"
  626. :arrow="false"
  627. v-if="
  628. invoiceDetail.periodStatus == 3 &&
  629. (invoiceDetail.invoiceStatus == 2 ||
  630. invoiceDetail.invoiceStatus == -1) &&
  631. invoiceDetail.type == 2 &&
  632. invoiceDetail.subject == 2
  633. "
  634. >
  635. <view slot="title">机构发票邮寄状态:</view>
  636. <text class="text" v-if="invoiceDetail.sendInvoice == 1"
  637. >是</text
  638. >
  639. <text class="text" v-else>否</text>
  640. </u-cell-item>
  641. <u-cell-item
  642. v-if="
  643. invoiceDetail.periodStatus == 3 &&
  644. (invoiceDetail.invoiceStatus == 2 ||
  645. invoiceDetail.invoiceStatus == -1) &&
  646. invoiceDetail.sendInvoice == 1 &&
  647. invoiceDetail.type == 2 &&
  648. invoiceDetail.subject == 2
  649. "
  650. @click.stop="copy(invoiceDetail.trackingNum)"
  651. :border-bottom="false"
  652. hover-class="none"
  653. :arrow="false"
  654. >
  655. <view slot="title">发票邮寄快递单号:(点击可复制)</view>
  656. <text class="text">{{
  657. invoiceDetail.trackingNum || ""
  658. }}</text>
  659. </u-cell-item>
  660. </view>
  661. </view>
  662. </view>
  663. </view>
  664. </scroll-view>
  665. </view>
  666. <view class="order-detail__btns" v-if="invoiceDetail.periodStatus == 1">
  667. <view class="btn" @click="orderDetailModal = false">知道了</view>
  668. <view class="btn warm" @click="orderCancelModal = true"
  669. >撤销申请</view
  670. >
  671. </view>
  672. <view class="order-detail__btns" v-else>
  673. <view class="btn ok" @click="orderDetailModal = false">知道了</view>
  674. </view>
  675. </view>
  676. </u-popup>
  677. <u-popup
  678. class="modal"
  679. v-model="orderCancelModal"
  680. mode="center"
  681. border-radius="24"
  682. >
  683. <view class="order-cancel">
  684. <view class="header"> 温馨提示 </view>
  685. <view class="body">
  686. <view>撤销申请后,</view>
  687. <view>本次的发票申请内容将不存在。</view>
  688. <view>请慎重考虑。 </view>
  689. <view>您确定要取消本次发票申请吗?</view>
  690. </view>
  691. <view class="footer">
  692. <view class="btn cancel" @click="orderCancelModal = false">取消</view>
  693. <view class="btn ok" @click="orderCancel()">确定</view>
  694. </view>
  695. </view>
  696. </u-popup>
  697. </view>
  698. </template>
  699. <script>
  700. import { mapGetters } from "vuex";
  701. export default {
  702. components: {},
  703. data() {
  704. return {
  705. checkOrderList: [],
  706. recordList: [],
  707. list: [
  708. {
  709. name: "发票申请",
  710. },
  711. {
  712. name: "发票记录",
  713. },
  714. ],
  715. invoiceDetail: {
  716. amount: 0,
  717. },
  718. form: {
  719. type: "1",
  720. subject: "1",
  721. invoiceTitle: "",
  722. orderGoodsIds: "",
  723. taxRegistryNumber: "",
  724. companyAddress: "",
  725. email: "",
  726. phone: "",
  727. bankName: "",
  728. bankAccount: "",
  729. receivingAddress: "",
  730. receivingName: "",
  731. receivingTel: "",
  732. },
  733. rules: {
  734. receivingTel: [
  735. {
  736. required: true,
  737. message: "请输入收件手机",
  738. // 可以单个或者同时写两个触发验证方式
  739. trigger: ["change"],
  740. },
  741. {
  742. validator: (rule, value, callback) => {
  743. // 上面有说,返回true表示校验通过,返回false表示不通过
  744. // this.$u.test.mobile()就是返回true或者false的
  745. console.log(
  746. this.$u.test.mobile(value),
  747. "this.$u.test.mobile(value)"
  748. );
  749. return this.$u.test.mobile(value);
  750. },
  751. message: "手机号码格式不正确",
  752. // 触发器可以同时用blur和change
  753. trigger: ["change"],
  754. },
  755. ],
  756. type: [
  757. {
  758. required: true,
  759. message: "请选择发票类型",
  760. // 可以单个或者同时写两个触发验证方式
  761. trigger: ["change"],
  762. },
  763. ],
  764. subject: [
  765. {
  766. required: true,
  767. message: "请选择申请主体",
  768. // 可以单个或者同时写两个触发验证方式
  769. trigger: ["change"],
  770. },
  771. ],
  772. invoiceTitle: [
  773. {
  774. required: true,
  775. message: "请输入发票抬头",
  776. // 可以单个或者同时写两个触发验证方式
  777. trigger: ["change"],
  778. },
  779. ],
  780. taxRegistryNumber: [
  781. {
  782. required: true,
  783. message: "请输入纳税登记号",
  784. // 可以单个或者同时写两个触发验证方式
  785. trigger: ["change"],
  786. },
  787. {
  788. validator: (rule, value, callback) => {
  789. // 上面有说,返回true表示校验通过,返回false表示不通过
  790. var reg = /(^[0-9A-Z]{15,20}$)/;
  791. return reg.test(value);
  792. },
  793. message: "纳税登记号格式不正确",
  794. // 触发器可以同时用blur和change
  795. trigger: ["change"],
  796. },
  797. ],
  798. email: [
  799. {
  800. required: true,
  801. message: "请输入邮箱",
  802. // 可以单个或者同时写两个触发验证方式
  803. trigger: ["change"],
  804. },
  805. {
  806. validator: (rule, value, callback) => {
  807. // 上面有说,返回true表示校验通过,返回false表示不通过
  808. var reg = /^([a-zA-Z\d][\w-]{2,})@(\w{2,})\.([a-z]{2,})(\.[a-z]{2,})?$/;
  809. return reg.test(value);
  810. },
  811. message: "邮箱格式不正确",
  812. // 触发器可以同时用blur和change
  813. trigger: ["change"],
  814. },
  815. ],
  816. companyAddress: [
  817. {
  818. required: true,
  819. message: "请输入单位地址",
  820. // 可以单个或者同时写两个触发验证方式
  821. trigger: ["change"],
  822. },
  823. ],
  824. phone: [
  825. {
  826. required: true,
  827. message: "请输入电话号码",
  828. // 可以单个或者同时写两个触发验证方式
  829. trigger: ["change"],
  830. },
  831. {
  832. validator: (rule, value, callback) => {
  833. var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
  834. var vartest1 = /^([0-9]{3,4})?[0-9]{7,8}$/;
  835. if (
  836. this.$u.test.mobile(value) ||
  837. vartest.test(value) ||
  838. vartest1.test(value)
  839. ) {
  840. return true;
  841. } else {
  842. return false;
  843. }
  844. },
  845. message: "电话号码不正确",
  846. trigger: ["change", "blur"],
  847. },
  848. ],
  849. bankName: [
  850. {
  851. required: true,
  852. message: "请输入开户银行",
  853. // 可以单个或者同时写两个触发验证方式
  854. trigger: ["change"],
  855. },
  856. {
  857. validator: (rule, value, callback) => {
  858. var reg = /[\u4E00-\u9FA5]+/;
  859. return reg.test(value);
  860. },
  861. message: "开户银行名称不正确",
  862. trigger: ["change", "blur"],
  863. },
  864. ],
  865. bankAccount: [
  866. {
  867. required: true,
  868. message: "请输入银行账号",
  869. // 可以单个或者同时写两个触发验证方式
  870. trigger: ["change"],
  871. },
  872. {
  873. validator: (rule, value, callback) => {
  874. // 上面有说,返回true表示校验通过,返回false表示不通过
  875. var reg = /^[1-9]{1}(\d{15}|\d{18})$/;
  876. return reg.test(value);
  877. },
  878. message: "银行卡号格式不正确",
  879. // 触发器可以同时用blur和change
  880. trigger: ["change"],
  881. },
  882. ],
  883. receivingAddress: [
  884. {
  885. required: true,
  886. message: "请输入收件地址",
  887. // 可以单个或者同时写两个触发验证方式
  888. trigger: ["change"],
  889. },
  890. ],
  891. receivingName: [
  892. {
  893. required: true,
  894. message: "请输入收件人",
  895. // 可以单个或者同时写两个触发验证方式
  896. trigger: ["change"],
  897. },
  898. ],
  899. orderGoodsIds: [
  900. {
  901. required: true,
  902. message: "请选择订单",
  903. // 可以单个或者同时写两个触发验证方式
  904. trigger: ["change"],
  905. },
  906. ],
  907. },
  908. orderValue: "",
  909. orderList: [],
  910. selectOrderModal: false,
  911. orderDetailModal: false,
  912. orderCancelModal: false,
  913. current: 0,
  914. invoicePirce: 0,
  915. order: [],
  916. typeList: [
  917. {
  918. name: "普通发票",
  919. value: "1",
  920. },
  921. {
  922. name: "增值税专用发票",
  923. value: "2",
  924. },
  925. ],
  926. mainList: [
  927. {
  928. name: "个人",
  929. value: "1",
  930. },
  931. {
  932. name: "企业",
  933. value: "2",
  934. },
  935. ],
  936. };
  937. },
  938. // onPullDownRefresh() {},
  939. onLoad(option) {
  940. this.orderInvoiceCanInvoiceList();
  941. },
  942. onReady() {
  943. this.$refs.uForm.setRules(this.rules);
  944. },
  945. methods: {
  946. orderCancel() {
  947. let invoiceDetail = JSON.parse(JSON.stringify(this.invoiceDetail));
  948. invoiceDetail.status = -1;
  949. this.$api.orderInvoiceCancel(invoiceDetail).then((res) => {
  950. if (res.data.code == 200) {
  951. this.orderInvoiceList();
  952. this.orderInvoiceCanInvoiceList();
  953. this.orderDetailModal = false;
  954. this.orderCancelModal = false;
  955. uni.showToast({
  956. title: "撤销成功",
  957. icon: "none",
  958. });
  959. } else {
  960. }
  961. });
  962. },
  963. showDetailModal(item) {
  964. this.orderDetailModal = true;
  965. this.invoiceDetail = item;
  966. },
  967. toFixed(number) {
  968. console.log(number.toFixed(2));
  969. return number.toFixed(2);
  970. },
  971. /**
  972. * 获取可开发票的订单,/order/invoice/canInvoiceList
  973. */
  974. orderInvoiceCanInvoiceList() {
  975. this.$api.orderInvoiceCanInvoiceList().then((res) => {
  976. if (res.data.code == 200) {
  977. res.data.rows.forEach((item) => {
  978. item.checked = false;
  979. });
  980. this.orderList = res.data.rows;
  981. }
  982. });
  983. },
  984. /**
  985. * @param {Object} checkedState 显示状态
  986. * @param {Object} index 索引值
  987. * 修改开票订单列表显示状态
  988. */
  989. showOrder(showState, index) {
  990. this.$set(this.recordList[index], "checked", !showState);
  991. },
  992. /**
  993. * 发票申请提交
  994. */
  995. formSubmit() {
  996. this.$refs.uForm.validate((valid) => {
  997. console.log(valid, "valid");
  998. console.log(this.form, "this.form");
  999. if (valid) {
  1000. if (this.invoicePirce > 10000) {
  1001. uni.showModal({
  1002. title: "提示",
  1003. content:
  1004. "您所选的订单总开票金额,大于10000元,超出单张发票的开票额度,请修改开票订单",
  1005. showCancel: false,
  1006. });
  1007. return;
  1008. }
  1009. let data = JSON.parse(JSON.stringify(this.form));
  1010. data.orderGoodsIds = data.orderGoodsIds.split(",");
  1011. data.amount = this.invoicePirce;
  1012. if (data.subject == "1") {
  1013. data.taxRegistryNumber = "";
  1014. data.companyAddress = "";
  1015. data.phone = "";
  1016. data.bankName = "";
  1017. data.bankAccount = "";
  1018. data.receivingAddress = "";
  1019. data.receivingName = "";
  1020. data.receivingTel = "";
  1021. }
  1022. this.$api.orderInvoice(data).then((res) => {
  1023. if (res.data.code == 200) {
  1024. this.orderInvoiceCanInvoiceList();
  1025. this.form = {
  1026. type: "1",
  1027. subject: "1",
  1028. invoiceTitle: "",
  1029. orderGoodsIds: "",
  1030. taxRegistryNumber: "",
  1031. companyAddress: "",
  1032. phone: "",
  1033. bankName: "",
  1034. bankAccount: "",
  1035. receivingAddress: "",
  1036. receivingName: "",
  1037. receivingTel: "",
  1038. };
  1039. this.invoicePirce = 0;
  1040. uni.showModal({
  1041. title: "操作提示",
  1042. content: `您本次的发票申请已经提交成功!\n请稍后留意邮箱。`,
  1043. showCancel: false,
  1044. confirmText: "知道了",
  1045. });
  1046. } else {
  1047. uni.showToast({
  1048. icon: "none",
  1049. title: res.data.msg,
  1050. });
  1051. }
  1052. });
  1053. }
  1054. });
  1055. },
  1056. /**
  1057. * @param {Object} e value
  1058. * 发票类型修改
  1059. */
  1060. formTypeChange(e) {
  1061. console.log(e);
  1062. if (e == "2") {
  1063. this.$set(this.form, "subject", "2");
  1064. } else {
  1065. }
  1066. },
  1067. /**
  1068. * @param {Object} e
  1069. * tabs 切换
  1070. */
  1071. change(e) {
  1072. console.log(e);
  1073. this.current = e;
  1074. if (this.current == 1) {
  1075. this.orderInvoiceList();
  1076. } else {
  1077. this.$nextTick(() => {
  1078. this.$refs.uForm.setRules(this.rules);
  1079. });
  1080. }
  1081. },
  1082. orderInvoiceList() {
  1083. this.$api.orderInvoiceList().then((res) => {
  1084. if (res.data.code == 200) {
  1085. this.recordList = res.data.rows;
  1086. } else {
  1087. uni.showToast({
  1088. icon: "none",
  1089. title: res.data.msg,
  1090. });
  1091. }
  1092. });
  1093. },
  1094. radioGroupChange(e) {
  1095. console.log(e);
  1096. },
  1097. copy(str) {
  1098. if (!str) {
  1099. uni.showToast({
  1100. icon: "none",
  1101. title: "暂时没有可以复制的快递号",
  1102. });
  1103. return;
  1104. }
  1105. let newStr = String(str);
  1106. uni.setClipboardData({
  1107. data: newStr,
  1108. success: function () {
  1109. console.log("success");
  1110. },
  1111. });
  1112. },
  1113. okPopup() {
  1114. this.selectOrderModal = false;
  1115. let strArr = [];
  1116. this.invoicePirce = 0;
  1117. this.orderList.forEach((item, index) => {
  1118. if (item.checked) {
  1119. this.$set(this.orderList[index], "disabled", true);
  1120. strArr.push(item.orderGoodsId);
  1121. this.invoicePirce += item.goodsPrice;
  1122. }
  1123. });
  1124. this.form.orderGoodsIds = strArr.join(",");
  1125. this.$nextTick(() => {
  1126. this.$refs.orderGoodsIds.onFieldChange();
  1127. });
  1128. console.log(this.$refs.orderGoodsIds);
  1129. },
  1130. deleteOrder(index) {
  1131. this.$set(this.orderList[index], "disabled", false);
  1132. this.$set(this.orderList[index], "checked", false);
  1133. let strArr = [];
  1134. this.invoicePirce = 0;
  1135. this.orderList.forEach((item, index) => {
  1136. if (item.checked) {
  1137. strArr.push(item.orderGoodsId);
  1138. this.invoicePirce += item.goodsPrice;
  1139. }
  1140. });
  1141. this.form.orderGoodsIds = strArr.join(",");
  1142. this.$nextTick(() => {
  1143. this.$refs.orderGoodsIds.onFieldChange();
  1144. });
  1145. },
  1146. previewImg(item) {
  1147. // 预览图片
  1148. uni.previewImage({
  1149. urls: [this.$method.splitImgHost(item.invoiceImg, true, 1000)],
  1150. longPressActions: {
  1151. itemList: ["发送给朋友", "保存图片", "收藏"],
  1152. success: function (data) {
  1153. console.log(
  1154. "选中了第" +
  1155. (data.tapIndex + 1) +
  1156. "个按钮,第" +
  1157. (data.index + 1) +
  1158. "张图片"
  1159. );
  1160. },
  1161. fail: function (err) {
  1162. console.log(err.errMsg);
  1163. },
  1164. },
  1165. });
  1166. },
  1167. download(item) {
  1168. //获取相册授权
  1169. uni.getSetting({
  1170. success: (res) => {
  1171. if (!res.authSetting["scope.writePhotosAlbum"]) {
  1172. uni.authorize({
  1173. scope: "scope.writePhotosAlbum",
  1174. success() {
  1175. //这里是用户同意授权后的回调
  1176. this.saveImgToLocal(item);
  1177. },
  1178. fail() {
  1179. //这里是用户拒绝授权后的回调
  1180. },
  1181. });
  1182. } else {
  1183. //用户已经授权过了
  1184. this.saveImgToLocal(item);
  1185. }
  1186. },
  1187. });
  1188. },
  1189. saveImgToLocal(item) {
  1190. uni.showModal({
  1191. title: "提示",
  1192. content: "确定保存到相册吗",
  1193. success: (res) => {
  1194. if (res.confirm) {
  1195. uni.downloadFile({
  1196. url: this.$method.splitImgHost(item.invoiceImg, true, 1000), //图片地址
  1197. success: (res) => {
  1198. if (res.statusCode === 200) {
  1199. uni.saveImageToPhotosAlbum({
  1200. filePath: res.tempFilePath,
  1201. success: function () {
  1202. uni.showToast({
  1203. title: "保存成功",
  1204. icon: "none",
  1205. });
  1206. },
  1207. fail: function () {
  1208. uni.showToast({
  1209. title: "保存失败",
  1210. icon: "none",
  1211. });
  1212. },
  1213. });
  1214. }
  1215. },
  1216. });
  1217. } else if (res.cancel) {
  1218. }
  1219. },
  1220. });
  1221. },
  1222. },
  1223. computed: {
  1224. ...mapGetters(["userInfo"]),
  1225. filterOrderList() {
  1226. return this.orderList.filter((i) => i.disabled) || [];
  1227. },
  1228. },
  1229. };
  1230. </script>
  1231. <style>
  1232. page {
  1233. background: #eaeef1;
  1234. }
  1235. </style>
  1236. <style scoped lang="scss">
  1237. .invoice {
  1238. &__tabs {
  1239. width: 100%;
  1240. text-align: center;
  1241. position: fixed;
  1242. height: 96rpx;
  1243. z-index: 999;
  1244. }
  1245. &__content {
  1246. padding-top: 96rpx;
  1247. .open {
  1248. padding-bottom: 150rpx;
  1249. margin: 8rpx 24rpx 0;
  1250. .form {
  1251. padding: 24rpx;
  1252. width: 702rpx;
  1253. background: #ffffff;
  1254. border-radius: 24rpx;
  1255. // /deep/ .u-input__input {
  1256. // text-align: right;
  1257. // }
  1258. .form-item {
  1259. height: 78rpx;
  1260. display: flex;
  1261. align-items: center;
  1262. .text {
  1263. font-size: 28rpx;
  1264. width: 120rpx;
  1265. // color: #999999;
  1266. }
  1267. .content {
  1268. flex: 1;
  1269. text-align: left;
  1270. color: #bbb;
  1271. }
  1272. }
  1273. .check-order {
  1274. margin-top: 20rpx;
  1275. width: 654rpx;
  1276. height: 168rpx;
  1277. background: #f5f5f5;
  1278. border: 2px solid #f5f5f5;
  1279. padding: 20rpx;
  1280. position: relative;
  1281. .close {
  1282. position: absolute;
  1283. right: 0;
  1284. top: 0;
  1285. }
  1286. .title,
  1287. .number,
  1288. .price {
  1289. color: #333333;
  1290. margin-top: 10rpx;
  1291. line-height: 30rpx;
  1292. font-size: 30rpx;
  1293. }
  1294. .number {
  1295. color: #999;
  1296. }
  1297. }
  1298. }
  1299. .order-text {
  1300. margin-top: 16rpx;
  1301. padding: 0 30rpx;
  1302. width: 702rpx;
  1303. height: 80rpx;
  1304. background: #ffffff;
  1305. border-radius: 24rpx;
  1306. display: flex;
  1307. align-items: center;
  1308. &__label {
  1309. font-size: 24rpx;
  1310. }
  1311. &__price {
  1312. font-size: 30rpx;
  1313. margin-left: 20rpx;
  1314. color: #ff2d55;
  1315. }
  1316. }
  1317. .submit {
  1318. text-align: center;
  1319. line-height: 80rpx;
  1320. color: #fff;
  1321. font-size: 30rpx;
  1322. width: 526rpx;
  1323. height: 80rpx;
  1324. background: #007aff;
  1325. box-shadow: 0rpx 8rpx 7rpx 1rpx rgba(0, 122, 255, 0.1);
  1326. border-radius: 40rpx;
  1327. position: fixed;
  1328. left: 50%;
  1329. bottom: 40rpx;
  1330. z-index: 999;
  1331. transform: translateX(-50%);
  1332. }
  1333. }
  1334. .record {
  1335. .nodata {
  1336. padding-top: 160rpx;
  1337. font-size: 32rpx;
  1338. text-align: center;
  1339. color: #999999;
  1340. }
  1341. &__list {
  1342. .record-item {
  1343. margin: 0 8rpx 10rpx;
  1344. .item__time {
  1345. padding: 20rpx 0;
  1346. text-align: center;
  1347. font-size: 24rpx;
  1348. color: #999999;
  1349. }
  1350. .item__content {
  1351. background: #fff;
  1352. border-radius: 16rpx;
  1353. .top {
  1354. padding: 12rpx 0;
  1355. border-bottom: 1px solid #eeeeee;
  1356. .state {
  1357. position: relative;
  1358. text-align: center;
  1359. color: #fff;
  1360. font-size: 30rpx;
  1361. margin: 0 auto;
  1362. width: 240rpx;
  1363. height: 56rpx;
  1364. line-height: 56rpx;
  1365. background: #007aff;
  1366. border-radius: 28rpx;
  1367. &.wait {
  1368. background: #007aff;
  1369. }
  1370. &.refuse {
  1371. background: #ff3b30;
  1372. }
  1373. &.agree {
  1374. background: #34c759;
  1375. }
  1376. .arrow {
  1377. position: absolute;
  1378. top: 50%;
  1379. transform: translateY(-50%);
  1380. right: 18rpx;
  1381. }
  1382. }
  1383. }
  1384. .bottom {
  1385. padding: 0 32rpx;
  1386. .flex {
  1387. height: 80rpx;
  1388. display: flex;
  1389. align-items: center;
  1390. border-bottom: 1px solid #eeeeee;
  1391. &.noborder {
  1392. border: 0;
  1393. }
  1394. .text {
  1395. font-size: 24rpx;
  1396. color: #666666;
  1397. }
  1398. &__auto {
  1399. text-align: right;
  1400. flex: 1;
  1401. font-size: 30rpx;
  1402. font-weight: bold;
  1403. color: #666666;
  1404. .red {
  1405. color: #ff3b30;
  1406. }
  1407. .green {
  1408. color: #34c759;
  1409. }
  1410. }
  1411. }
  1412. .order-list {
  1413. padding-bottom: 30rpx;
  1414. .order-item {
  1415. border-radius: 16rpx;
  1416. padding: 14rpx;
  1417. background: #f5f5f5;
  1418. font-size: 30rpx;
  1419. color: #333;
  1420. margin-top: 16rpx;
  1421. }
  1422. }
  1423. }
  1424. }
  1425. }
  1426. }
  1427. }
  1428. }
  1429. .modal {
  1430. .select-order {
  1431. .line {
  1432. width: 80rpx;
  1433. height: 8rpx;
  1434. background: #999999;
  1435. border-radius: 4rpx;
  1436. margin: 8rpx auto 0;
  1437. }
  1438. .title {
  1439. margin: 20rpx 0 15rpx;
  1440. text-align: center;
  1441. font-size: 24rpx;
  1442. color: #999999;
  1443. }
  1444. .order-item {
  1445. display: flex;
  1446. align-items: center;
  1447. padding: 20rpx;
  1448. &__bg {
  1449. width: 654rpx;
  1450. height: 168rpx;
  1451. background: #f5f5f5;
  1452. border: 2px solid #f5f5f5;
  1453. border-radius: 16rpx;
  1454. padding: 20rpx;
  1455. &.active {
  1456. background: #ebf5ff;
  1457. border: 2px solid #007aff;
  1458. }
  1459. .order-title,
  1460. .order-number,
  1461. .order-price {
  1462. color: #333333;
  1463. margin-top: 10rpx;
  1464. line-height: 30rpx;
  1465. font-size: 30rpx;
  1466. }
  1467. .order-number {
  1468. color: #999;
  1469. }
  1470. }
  1471. }
  1472. .confrim-btn {
  1473. width: 750rpx;
  1474. height: 98rpx;
  1475. background: rgba(255, 255, 255, 0.98);
  1476. display: flex;
  1477. align-items: center;
  1478. justify-content: center;
  1479. .okBtn {
  1480. text-align: center;
  1481. line-height: 64rpx;
  1482. color: #fff;
  1483. font-size: 30rpx;
  1484. width: 200rpx;
  1485. height: 64rpx;
  1486. background: linear-gradient(0deg, #015eea, #00c0fa);
  1487. border-radius: 32rpx;
  1488. }
  1489. }
  1490. .no_data {
  1491. text-align: center;
  1492. margin-top: 40rpx;
  1493. }
  1494. }
  1495. .order-detail {
  1496. width: 640rpx;
  1497. height: 1000rpx;
  1498. background: #ffffff;
  1499. display: flex;
  1500. flex-direction: column;
  1501. &__content {
  1502. flex: 1;
  1503. .content {
  1504. padding: 24rpx 24rpx 0;
  1505. /deep/ .u-cell {
  1506. padding: 10rpx;
  1507. &_title {
  1508. color: #999;
  1509. }
  1510. &__value {
  1511. color: #333;
  1512. text-align: left;
  1513. }
  1514. .text {
  1515. &.wait {
  1516. color: #007aff;
  1517. }
  1518. &.agree {
  1519. color: #34c759;
  1520. }
  1521. &.refuse {
  1522. color: #ff3b30;
  1523. }
  1524. }
  1525. .preview {
  1526. width: 240rpx;
  1527. height: 160rpx;
  1528. }
  1529. .download-btn {
  1530. margin: 10rpx 0 0;
  1531. text-align: center;
  1532. line-height: 56rpx;
  1533. color: #fff;
  1534. font-size: 30rpx;
  1535. width: 224rpx;
  1536. height: 56rpx;
  1537. background: #007aff;
  1538. border-radius: 16rpx;
  1539. }
  1540. }
  1541. .header {
  1542. font-size: 30rpx;
  1543. font-weight: bold;
  1544. color: #333333;
  1545. line-height: 48rpx;
  1546. }
  1547. .body {
  1548. &__item {
  1549. border-bottom: 1px solid #eeeeee;
  1550. padding-bottom: 30rpx;
  1551. &:last-child {
  1552. border: 0;
  1553. }
  1554. .title {
  1555. margin-top: 30rpx;
  1556. font-size: 24rpx;
  1557. color: #007aff;
  1558. line-height: 48rpx;
  1559. &::before {
  1560. content: "";
  1561. width: 4rpx;
  1562. height: 24rpx;
  1563. background: #007aff;
  1564. border-radius: 2rpx;
  1565. display: inline-block;
  1566. margin-right: 10rpx;
  1567. }
  1568. }
  1569. .order-list {
  1570. .order-item {
  1571. overflow: hidden;
  1572. border-radius: 16rpx;
  1573. padding: 0 14rpx 14rpx;
  1574. background: #f5f5f5;
  1575. font-size: 30rpx;
  1576. color: #333;
  1577. margin-top: 16rpx;
  1578. .order-title,
  1579. .order-number,
  1580. .order-price {
  1581. color: #333333;
  1582. margin-top: 20rpx;
  1583. line-height: 26rpx;
  1584. font-size: 26rpx;
  1585. }
  1586. .order-number {
  1587. color: #999;
  1588. }
  1589. }
  1590. }
  1591. .order-text {
  1592. margin-top: 16rpx;
  1593. padding: 0 30rpx;
  1594. height: 80rpx;
  1595. background: #f5f5f5;
  1596. border-radius: 16rpx;
  1597. display: flex;
  1598. align-items: center;
  1599. &__label {
  1600. font-size: 24rpx;
  1601. color: #999999;
  1602. }
  1603. &__price {
  1604. font-size: 30rpx;
  1605. margin-left: 20rpx;
  1606. color: #ff2d55;
  1607. }
  1608. }
  1609. }
  1610. }
  1611. }
  1612. }
  1613. &__btns {
  1614. border-top: 1px solid #eeeeee;
  1615. padding: 0 24rpx;
  1616. width: 100%;
  1617. height: 140rpx;
  1618. background: #ffffff;
  1619. display: flex;
  1620. justify-content: center;
  1621. align-items: center;
  1622. .btn {
  1623. text-align: center;
  1624. width: 200rpx;
  1625. height: 80rpx;
  1626. line-height: 80rpx;
  1627. background: #f5f5f5;
  1628. border-radius: 40rpx;
  1629. color: #007aff;
  1630. font-size: 30rpx;
  1631. margin: 0 10rpx;
  1632. &.warm {
  1633. background: #ff3b30;
  1634. color: #fff;
  1635. }
  1636. &.ok {
  1637. color: #fff;
  1638. width: 526rpx;
  1639. height: 80rpx;
  1640. background: #007aff;
  1641. border-radius: 40rpx;
  1642. }
  1643. }
  1644. }
  1645. }
  1646. .order-cancel {
  1647. width: 640rpx;
  1648. height: 439rpx;
  1649. background: #ffffff;
  1650. padding: 40rpx;
  1651. .header {
  1652. text-align: center;
  1653. font-size: 30rpx;
  1654. font-weight: bold;
  1655. color: #333333;
  1656. line-height: 48rpx;
  1657. }
  1658. .body {
  1659. margin-top: 40rpx;
  1660. view {
  1661. font-size: 30rpx;
  1662. color: #666666;
  1663. line-height: 48rpx;
  1664. }
  1665. }
  1666. .footer {
  1667. margin-top: 40rpx;
  1668. display: flex;
  1669. align-items: center;
  1670. justify-content: center;
  1671. .btn {
  1672. text-align: center;
  1673. line-height: 80rpx;
  1674. font-size: 30rpx;
  1675. color: #007aff;
  1676. width: 200rpx;
  1677. height: 80rpx;
  1678. background: #f5f5f5;
  1679. border-radius: 40rpx;
  1680. margin: 0 10rpx;
  1681. &.ok {
  1682. color: #fff;
  1683. background: #007aff;
  1684. }
  1685. }
  1686. }
  1687. }
  1688. }
  1689. }
  1690. </style>