index.vue 53 KB

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