myInvoice.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. <template>
  2. <view class="container">
  3. <view class="gap"></view>
  4. <view class="is_need_invoice">{{$L('是否开具发票')}}</view>
  5. <view class="select_invoice">
  6. <view class="not_need_wrap" @click="selectInvoice">
  7. <text :class="{item_check:true, iconfont:true, iconziyuan33:not_need}" v-if="not_need == true"></text>
  8. <text :class="{iconfont:true, iconziyuan43:!not_need}" v-if="not_need == false"></text>
  9. <text :style="{color:not_need == true?'#333':'#666'}">{{$L('不需要')}}</text>
  10. </view>
  11. <view class="is_need_wrap" @click="selectInvoice">
  12. <text :class="{iconfont:true, iconziyuan43:!is_need}" v-if="is_need == false"></text>
  13. <text :class="{item_check:true, iconfont:true, iconziyuan33:is_need}" v-if="is_need == true"></text>
  14. <text :style="{color:not_need == true?'#666':'#333'}">{{$L('需要')}}</text>
  15. </view>
  16. </view>
  17. <view v-if="is_need == true">
  18. <view class="gap"></view>
  19. <view class="is_need_invoice">{{$L('发票内容')}}</view>
  20. <view class="select_invoice">
  21. <view class="not_need_wrap" @click="selectInvoiceContent">
  22. <text :class="{item_check:true, iconfont:true, iconziyuan33:goods_detail == true}" v-if="goods_detail == true"></text>
  23. <text :class="{iconfont:true, iconziyuan43:!goods_detail}" v-if="goods_detail == false"></text>
  24. <text :style="{color:goods_detail == true?'#333':'#666'}">{{$L('商品明细')}}</text>
  25. </view>
  26. <view class="is_need_wrap" @click="selectInvoiceContent">
  27. <text :class="{iconfont:true, iconziyuan43:!goods_type}" v-if="goods_type == false"></text>
  28. <text :class="{item_check:true, iconfont:true, iconziyuan33:goods_type}" v-if="goods_type == true"></text>
  29. <text :style="{color:goods_type == true?'#666':'#333'}">{{$L('商品类别')}}</text>
  30. </view>
  31. </view>
  32. <view class="invoice_content_tip">{{goods_detail == true?$L('发票内容将显示商品详情名称与价格信息,发票金额为实际支付金额,不含优惠等扣减金额。'):$L('发票内容将显示本单商品所属类别及价格信息,发票金额为实际支付金额,不含优惠等扣减金额。')}}</view>
  33. <!-- 有发票记录 -->
  34. <view class="invoice_history" v-if="invoice_list.length>0">
  35. <view class="is_need_invoice">{{$L('历史记录')}}</view>
  36. <view class="history_item_wrap">
  37. <view class="history_item" v-for="(item,index) in invoice_list" :key="index" @click="changeInvoice(index)" @touchstart="touchStart" @touchmove="touchMove($event,item.invoiceId)" :style="{left:is_show_btn && invoiceId == item.invoiceId?'-160rpx':'0'}">
  38. <text :class="{item_check:true, iconfont:true, iconziyuan33:index == current}" :style="{display:index == current?'inline-block':'none'}"></text>
  39. <text :class="{iconfont:true, iconziyuan43:index != current}" :style="{display:index == current?'none':'inline-block'}"></text>
  40. <text>{{item.invoiceTitle?item.invoiceTitle:item.companyName}}</text>
  41. <view class="delete_btn hide_del" @click="deleteHistory(item.invoiceId,index)" v-if="invoiceId == item.invoiceId">{{$L('删除')}}</view>
  42. </view>
  43. </view>
  44. <view class="gap"></view>
  45. </view>
  46. <view class="is_need_wrap goods_type" @click="createContent">
  47. <text :class="{iconfont:true, iconziyuan43:!invoice_content}" v-if="invoice_content == false"></text>
  48. <text :class="{item_check:true, iconfont:true, iconziyuan33:invoice_content == true}" :style="{display:invoice_content == true?'inline-block':'none'}"></text>
  49. <text :style="{color:invoice_content == true?'#666':'#333'}">{{$L('新增发票内容')}}</text>
  50. </view>
  51. </view>
  52. <view class="invoice_content_wrap" v-if="invoice_content == true && is_need == true">
  53. <view class="invoice_content_title">
  54. <view :class="is_personal == true?'selected_content content_title_item':'content_title_item'" @click="invoiceContent(true)">{{$L('个人')}}</view>
  55. <view :class="is_personal == false?'selected_content content_title_item':'content_title_item'" @click="invoiceContent(false)">{{$L('企业')}}</view>
  56. </view>
  57. <!-- 个人发票 -->
  58. <view v-if="is_personal == true">
  59. <view class="invoice_content_item">
  60. <view class="">{{$L('发票抬头')}}</view>
  61. <input type="text" v-model="invoice_title" maxlength="30" placeholder-class="invoice_item_right" :placeholder="$L('请填写正确的发票抬头')"/>
  62. </view>
  63. <view class="invoice_content_item">
  64. <view class="">{{$L('收票邮箱')}}</view>
  65. <input type="text" v-model="invoice_email" placeholder-class="invoice_item_right" :placeholder="$L('请输入收票邮箱')" @blur="$checkEmail(invoice_email)"/>
  66. </view>
  67. </view>
  68. <!-- 企业发票 -->
  69. <view v-if="is_personal == false">
  70. <view class="invoice_content_item">
  71. <view class="">{{$L('发票类型')}}</view>
  72. <view class="select_invoice">
  73. <view :class="{not_need_wrap:true,margin:isVatInvoice,noMargin:!isVatInvoice}" @click="invoiceType" >
  74. <text :class="{item_check:true, iconfont:true, iconziyuan33:plain_invoice}" v-if="plain_invoice == true"></text>
  75. <text :class="{iconfont:true, iconziyuan43:!plain_invoice}" v-if="plain_invoice == false"></text>
  76. <text :style="{color:plain_invoice == true?'#333':'#999'}">{{$L('普通发票')}}</text>
  77. </view>
  78. <view class="is_need_wrap" v-if="isVatInvoice" @click="invoiceType">
  79. <text :class="{iconfont:true, iconziyuan43:!special_invoice}" v-if="special_invoice == false"></text>
  80. <text :class="{item_check:true, iconfont:true, iconziyuan33:special_invoice}" v-if="special_invoice == true"></text>
  81. <text :style="{color:special_invoice == true?'#333':'#999'}">{{$L('增值税专用发票')}}</text>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="invoice_content_item">
  86. <view class="">{{$L('单位名称')}}</view>
  87. <input type="text" v-model="company_name" maxlength="30" placeholder-class="invoice_item_right" :placeholder="$L('请输入单位名称')"/>
  88. </view>
  89. <view class="invoice_content_item">
  90. <view class="">{{$L('税号')}}</view>
  91. <input type="text" v-model="duty_paragraph" maxlength="20" placeholder-class="invoice_item_right" :placeholder="$L('请输入纳税人识别号')" @blur="checkTaxId"/>
  92. </view>
  93. <view v-if="special_invoice == true">
  94. <view class="invoice_content_item">
  95. <view class="">{{$L('注册地址')}}</view>
  96. <input type="text" v-model="registered_address" maxlength="100" placeholder-class="invoice_item_right" :placeholder="$L('请输入注册地址')"/>
  97. </view>
  98. <view class="invoice_content_item">
  99. <view class="">{{$L('注册电话')}}</view>
  100. <input type="number" v-model="registered_phone" maxlength="11" placeholder-class="invoice_item_right" :placeholder="$L('请输入注册电话')"/>
  101. </view>
  102. <view class="invoice_content_item">
  103. <view class="">{{$L('开户银行')}}</view>
  104. <input type="text" v-model="deposit_bank" maxlength="30" placeholder-class="invoice_item_right" :placeholder="$L('请输入开户银行')"/>
  105. </view>
  106. <view class="invoice_content_item">
  107. <view class="">{{$L('银行账户')}}</view>
  108. <input type="number" v-model="bank_account" maxlength="50" placeholder-class="invoice_item_right" :placeholder="$L('请输入银行账户')"/>
  109. </view>
  110. <view class="invoice_content_item">
  111. <view class="">{{$L('收票人')}}</view>
  112. <input type="text" v-model="check_taker" maxlength="5" placeholder-class="invoice_item_right" :placeholder="$L('请输入收票人')"/>
  113. </view>
  114. <view class="invoice_content_item">
  115. <view class="">{{$L('收票人电话')}}</view>
  116. <input type="number" v-model="bill_to_phone" maxlength="11" placeholder-class="invoice_item_right" :placeholder="$L('请输入收票人电话')"/>
  117. </view>
  118. <view class="invoice_content_item">
  119. <view class="">{{$L('收票地址')}}</view>
  120. <input type="text" v-model="bill_to_address" maxlength="100" placeholder-class="invoice_item_right" :placeholder="$L('请输入收票地址')"/>
  121. </view>
  122. </view>
  123. <view class="invoice_content_item" v-if="plain_invoice == true">
  124. <view class="">{{$L('收票邮箱')}}</view>
  125. <input type="text" v-model="bill_to_email" placeholder-class="invoice_item_right" :placeholder="$L('请输入收票邮箱')" @blur="$checkEmail(bill_to_email)"/>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="is_need_wrap default_invoice" @click="isSetDefault" v-if="invoice_content == true && is_need == true">
  130. <text :class="{iconfont:true, iconziyuan43:!is_default}" v-if="is_default == false"></text>
  131. <text :class="{item_check:true, iconfont:true, iconziyuan33:is_default}" v-if="is_default == true"></text>
  132. <text :style="{color:invoice_content == true?'#666':'#333'}">{{$L('设为默认发票')}}</text>
  133. </view>
  134. <!-- 底部确定按钮 -->
  135. <view class="confirm_btn_wrap">
  136. <view class="confirm_btn" @click="invoiceSubmit">{{$L('确定')}}</view>
  137. </view>
  138. </view>
  139. </template>
  140. <script>
  141. import { mapState } from 'vuex';
  142. export default {
  143. data(){
  144. return {
  145. not_need:true, //是否开具发票,暂不需要
  146. is_need:false, //是否开具发票,需要
  147. goods_detail:true, //商品明细
  148. goods_type:false, //商品类别
  149. invoice_content:false, //新增发票内容
  150. is_personal:true, //个人还是企业
  151. is_default:false, //是否设为默认发票
  152. plain_invoice:true, //普通发票
  153. special_invoice:false, //增值专用发票
  154. invoice_title:'', //发票抬头
  155. invoice_email:'' ,//收票邮箱
  156. company_name:'' ,//单位名称
  157. duty_paragraph:'', //税号
  158. registered_address:'' ,//注册地址
  159. registered_phone:'', //注册电话
  160. deposit_bank:'' ,//开户银行
  161. bank_account:'', //银行账户
  162. check_taker:'', //收票人
  163. bill_to_phone:'' ,//收票电话
  164. bill_to_address:'' ,//收票地址
  165. bill_to_email:'', //收票邮箱
  166. invoice_list:[],//发票历史记录
  167. current:0,
  168. startX:'',
  169. startY:'',
  170. is_show_btn:false, //是否展示删除按钮
  171. slideClass:false, //样式切换
  172. invoiceId:'', //发票id
  173. isVatInvoice:true
  174. }
  175. },
  176. computed: {
  177. ...mapState(['userInfo'])
  178. },
  179. onLoad(options){
  180. this.isVatInvoice=options.isVatInvoice
  181. uni.removeStorage({
  182. key: 'invoice_info',
  183. });
  184. uni.removeStorage({
  185. key: 'is_need_invoice',
  186. });
  187. this.getInvoiceHistory()
  188. },
  189. methods:{
  190. touchStart(e){
  191. this.startX = e.touches[0].clientX;
  192. this.startY = e.touches[0].clientY;
  193. },
  194. touchMove(e,invoiceId){
  195. // 获得当前坐标
  196. this.invoiceId = invoiceId
  197. this.currentX = e.touches[0].clientX;
  198. this.currentY = e.touches[0].clientY;
  199. const x = this.startX - this.currentX; //横向移动距离
  200. const y = Math.abs(this.startY - this.currentY); //纵向移动距离,若向左移动有点倾斜也可以接受
  201. if (x > 0) {
  202. //向左滑显示
  203. this.is_show_btn = true
  204. } else if (x < 0) {
  205. //向右滑隐藏
  206. this.is_show_btn = false
  207. }
  208. },
  209. selectInvoice(){
  210. this.not_need = this.not_need == true?false:true
  211. this.is_need = this.is_need == true?false:true
  212. },
  213. selectInvoiceContent(){
  214. this.goods_detail = this.goods_detail == true?false:true
  215. this.goods_type = this.goods_type == true?false:true
  216. },
  217. createContent(){
  218. this.current = 100
  219. this.invoice_content = this.invoice_content == true?false:true
  220. },
  221. // 发票内容选择公司或个人
  222. invoiceContent(val){
  223. this.is_personal = val
  224. },
  225. // 是否设为默认发票
  226. isSetDefault(){
  227. this.is_default = this.is_default == true?false:true
  228. },
  229. // 选择发票类型
  230. invoiceType(){
  231. if(!this.isVatInvoice){
  232. return
  233. }
  234. this.plain_invoice = this.plain_invoice == true?false:true
  235. this.special_invoice = this.special_invoice == true?false:true
  236. },
  237. // 检查税号格式是否正确
  238. checkTaxId(){
  239. let regExp = /[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}/
  240. if(regExp.test(this.duty_paragraph) == false){
  241. uni.showToast({
  242. title:'请填写正确的税号!',
  243. icon:'none'
  244. })
  245. this.duty_paragraph = ''
  246. }
  247. },
  248. // 保存发票
  249. invoiceSubmit(){
  250. if(!this.invoice_list.length&&this.is_need&&!this.invoice_content){
  251. uni.showToast({
  252. title:'请选择发票!',
  253. icon:'none'
  254. })
  255. return false
  256. }
  257. if(this.is_need){//需要发票
  258. if(this.invoice_content == true){ //无历史记录
  259. if(this.is_personal == true){ //个人
  260. if(this.invoice_title == ''){
  261. uni.showToast({
  262. title:'请填写发票抬头!',
  263. icon:'none'
  264. })
  265. return
  266. }
  267. if(this.invoice_email == ''){
  268. uni.showToast({
  269. title:'请填写收票邮箱!',
  270. icon:'none'
  271. })
  272. return
  273. }
  274. }else{ //企业
  275. if(this.company_name == ''){
  276. uni.showToast({
  277. title:'请填写单位名称!',
  278. icon:'none'
  279. })
  280. return
  281. }
  282. if(this.duty_paragraph == ''){
  283. uni.showToast({
  284. title:'请填写税号!',
  285. icon:'none'
  286. })
  287. return
  288. }
  289. this.checkTaxId()
  290. if(this.plain_invoice == true){ //普通发票
  291. if(this.bill_to_email == ''){
  292. uni.showToast({
  293. title:'请填写收票邮箱!',
  294. icon:'none'
  295. })
  296. return
  297. }
  298. }else{ //专用发票
  299. if(this.registered_address == ''){
  300. uni.showToast({
  301. title:'请填写注册地址!',
  302. icon:'none'
  303. })
  304. return
  305. }
  306. if(this.registered_phone == ''){
  307. uni.showToast({
  308. title:'请填写注册电话!',
  309. icon:'none'
  310. })
  311. return
  312. }
  313. if(this.deposit_bank == ''){
  314. uni.showToast({
  315. title:'请填写开户银行!',
  316. icon:'none'
  317. })
  318. return
  319. }
  320. if(this.bank_account == ''){
  321. uni.showToast({
  322. title:'请填写银行账户!',
  323. icon:'none'
  324. })
  325. return
  326. }
  327. if(this.check_taker == ''){
  328. uni.showToast({
  329. title:'请填写收票人!',
  330. icon:'none'
  331. })
  332. return
  333. }
  334. if(this.bill_to_phone == ''){
  335. uni.showToast({
  336. title:'请填写收票电话!',
  337. icon:'none'
  338. })
  339. return
  340. }
  341. if(this.bill_to_address == ''){
  342. uni.showToast({
  343. title:'请填写收票地址!',
  344. icon:'none'
  345. })
  346. return
  347. }
  348. }
  349. }
  350. let param = {}
  351. param.url = 'v3/member/front/memberInvoice/add'
  352. param.method = 'POST'
  353. param.data = {}
  354. param.data.isDefault = this.is_default == true?1:0 //是否为默认发票
  355. param.data.invoiceContent = this.goods_detail == true?1:2
  356. param.data.invoiceType = this.is_personal == true?1:2 //发票类型
  357. if(this.is_personal == true){ //个人发票
  358. param.data.invoiceTitle = this.invoice_title
  359. param.data.receiverEmail = this.invoice_email
  360. }else{ //企业发票
  361. param.data.invoiceType = this.plain_invoice == true?1:2
  362. param.data.invoiceTitle = this.company_name
  363. param.data.taxCode = this.duty_paragraph
  364. if(this.plain_invoice == true){ //普通发票
  365. param.data.receiverEmail = this.bill_to_email
  366. }else{ //增值税发票
  367. param.data.registerAddr = this.registered_address
  368. param.data.registerPhone = this.registered_phone
  369. param.data.bankName = this.deposit_bank
  370. param.data.bankAccount = this.bank_account
  371. param.data.receiverName = this.check_taker
  372. param.data.receiverMobile = this.bill_to_phone
  373. param.data.receiverAddress = this.bill_to_address
  374. }
  375. }
  376. this.$request(param).then(res=>{
  377. if(res.state == 200){
  378. this.invoiceId = res.data
  379. let invoice_info = {}
  380. if(this.is_personal == true){ // 个人
  381. invoice_info = {
  382. invoice_title:this.invoice_title,
  383. invoice_content:this.goods_detail == true?'商品明细':'商品类别',
  384. invoiceId:this.invoiceId
  385. }
  386. }else{ // 企业
  387. invoice_info = {
  388. company_name:this.company_name,
  389. invoice_content:this.goods_detail == true?'商品明细':'商品类别',
  390. invoiceId:this.invoiceId
  391. }
  392. }
  393. uni.showToast({
  394. title:'新增发票成功!'
  395. })
  396. uni.setStorageSync('invoice_info', invoice_info);
  397. setTimeout(()=>{
  398. uni.navigateBack()
  399. },1500)
  400. }
  401. })
  402. }else{//有历史记录
  403. let invoice_info = {}
  404. this.invoice_list.map(item=>{
  405. if(item.is_check == true){
  406. if(item.companyName == null){ //个人
  407. invoice_info = {
  408. invoice_title:item.invoiceTitle,
  409. invoice_content:item.invoiceContent == 1?'商品明细':'商品类别',
  410. invoiceId:this.invoiceId
  411. }
  412. }else{ //企业
  413. invoice_info = {
  414. company_name:item.companyName,
  415. invoice_content:item.invoiceContent == 1?'商品明细':'商品类别',
  416. invoiceId:this.invoiceId
  417. }
  418. }
  419. }
  420. })
  421. uni.setStorageSync('invoice_info', invoice_info);
  422. uni.navigateBack({
  423. delta:1
  424. })
  425. }
  426. }else{//不需要发票
  427. uni.setStorageSync('is_need_invoice', this.is_need);
  428. uni.navigateBack()
  429. }
  430. },
  431. // 获取历史发票列表
  432. getInvoiceHistory(){
  433. let param = {}
  434. param.url = 'v3/member/front/memberInvoice/list'
  435. this.$request(param).then(res=>{
  436. this.invoice_list = res.data.list
  437. if(this.invoice_list.length>0){
  438. this.invoice_list.map(item=>{
  439. item.is_check = false
  440. })
  441. this.invoice_list[0].is_check = true
  442. this.invoiceId = this.invoice_list[0].invoiceId
  443. }
  444. })
  445. },
  446. changeInvoice(index){
  447. this.invoice_content = false
  448. this.current = index
  449. this.invoice_list.map(item=>{
  450. item.is_check = false
  451. })
  452. this.invoice_list[index].is_check = true
  453. },
  454. // 删除发票
  455. deleteHistory(invoiceId,index){
  456. let param = {}
  457. param.url = 'v3/member/front/memberInvoice/del'
  458. param.method = 'POST'
  459. param.data = {
  460. invoiceIds:invoiceId
  461. }
  462. this.$request(param).then(res=>{
  463. if(res.state == 200){
  464. uni.showToast({
  465. title:'删除成功!'
  466. })
  467. this.invoice_list.splice(index,1)
  468. }
  469. })
  470. }
  471. }
  472. }
  473. </script>
  474. <style lang="scss">
  475. .container{
  476. overflow-y: scroll;
  477. padding-bottom:168rpx;
  478. width: 750rpx;
  479. margin: 0 auto;
  480. box-sizing: border-box;
  481. overflow-x: hidden;
  482. }
  483. .gap{
  484. width:750rpx;
  485. height:20rpx;
  486. background-color: #F8F8F8;
  487. }
  488. .is_need_invoice{
  489. padding-left:20rpx;
  490. height:100rpx;
  491. line-height: 100rpx;
  492. font-size: 30rpx;
  493. font-weight: 600;
  494. color: #999;
  495. border-bottom: 1rpx solid rgba(0,0,0,0.1);
  496. }
  497. .select_invoice{
  498. display: flex;
  499. height:100rpx;
  500. align-items: center;
  501. padding-left:20rpx;
  502. font-size:28rpx;
  503. .not_need_wrap{
  504. margin-right:163rpx;
  505. &.margin{
  506. margin-right: 48rpx;
  507. }
  508. &.noMargin{
  509. margin-right: 0rpx;
  510. }
  511. }
  512. }
  513. .iconfont {
  514. font-size: 32rpx;
  515. color: #BBBBBB;
  516. margin-right: 20rpx;
  517. &.item_check{
  518. color: $main-color !important;
  519. }
  520. }
  521. .confirm_btn_wrap{
  522. width:750rpx;
  523. height:168rpx;
  524. position: fixed;
  525. bottom:0;
  526. left:0;
  527. right: 0;
  528. margin: 0 auto;
  529. display:flex;
  530. align-items:center;
  531. justify-content:center;
  532. background-color: #fff;
  533. z-index:99;
  534. .confirm_btn{
  535. width: 668rpx;
  536. height: 88rpx;
  537. text-align: center;
  538. line-height: 88rpx;
  539. font-size:36rpx;
  540. letter-spacing: 4rpx;
  541. color:#fefefe;
  542. background: linear-gradient(-90deg, #FC1D1C 0%, #FF7A18 100%);
  543. box-shadow: 0px 10px 20px 0px rgba(252, 31, 28, 0.2);
  544. border-radius: 44px;
  545. }
  546. }
  547. .invoice_content_tip{
  548. height:100rpx;
  549. font-size:24rpx;
  550. color:#999;
  551. padding:20rpx;
  552. box-sizing: border-box;
  553. background: #F8F8F8;;
  554. }
  555. .goods_type{
  556. height:100rpx;
  557. display: flex;
  558. padding-left:20rpx;
  559. box-sizing: border-box;
  560. align-items: center;
  561. font-size:28rpx;
  562. border-bottom:1rpx solid rgba(0,0,0,0.1);
  563. }
  564. .invoice_content_wrap{
  565. margin:20rpx;
  566. // height:298rpx;
  567. font-size:28rpx;
  568. border:1rpx solid rgba(0,0,0,0.1);
  569. border-radius:6rpx;
  570. box-sizing: border-box;
  571. .invoice_content_title{
  572. height:95rpx;
  573. display: flex;
  574. .content_title_item{
  575. flex:1;
  576. color:#666;
  577. display: flex;
  578. justify-content: center;
  579. align-items: center;
  580. }
  581. }
  582. .invoice_content_item{
  583. display: flex;
  584. height: 101rpx;
  585. justify-content: space-between;
  586. align-items: center;
  587. padding:0 20rpx;
  588. color:#333;
  589. border-top:1rpx solid rgba(0,0,0,0.1);
  590. box-sizing: border-box;
  591. .invoice_item_right{
  592. color:#999;
  593. font-size:26rpx;
  594. text-align: right;
  595. }
  596. }
  597. }
  598. .selected_content{
  599. background:#F8F8F8;
  600. }
  601. .invoice_content_item /deep/ .uni-input-wrapper /deep/ .uni-input-input{
  602. width:500rpx;
  603. }
  604. /* #ifdef MP */
  605. .invoice_content_item input{
  606. width:500rpx;
  607. }
  608. /* #endif */
  609. .default_invoice{
  610. display: flex;
  611. align-items: center;
  612. justify-content: flex-end;
  613. color:#333;
  614. font-size:28rpx;
  615. padding-right:20rpx;
  616. }
  617. .history_item{
  618. height: 100rpx;
  619. font-size:32rpx;
  620. color: #333;
  621. padding-left:20rpx;
  622. display: flex;
  623. align-items: center;
  624. box-sizing: border-box;
  625. border-bottom:1rpx solid rgba(0,0,0,0.1);
  626. position: relative;
  627. transition: all 0.3s;
  628. .delete_btn{
  629. width:160rpx;
  630. height:100rpx;
  631. background-color: #FC1C1C;
  632. color:#fff;
  633. font-size:28rpx;
  634. font-weight: 600;
  635. display: flex;
  636. justify-content: center;
  637. align-items: center;
  638. position: absolute;
  639. top:0;
  640. right:-160rpx;
  641. transition: all 0.3s;
  642. box-sizing: border-box;
  643. }
  644. }
  645. .history_item_wrap>view:nth-last-child(1){
  646. border-bottom: none;
  647. }
  648. .show_del{
  649. display: flex;
  650. }
  651. .hide_del{
  652. display: none;
  653. }
  654. </style>