index.wxml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <view class="receipt">
  2. <view class="title">
  3. <t-cell class="receipt-cell" title="发票" bordered="{{false}}" t-class-left="cell-left">
  4. <view slot="right-icon" class="btn-wrap">
  5. <view
  6. bindtap="onLabels"
  7. data-item="{{item}}"
  8. class="btn {{receiptIndex === index ? 'active-btn' : ''}}"
  9. wx:for="{{receipts}}"
  10. wx:for-item="item"
  11. wx:key="index"
  12. >
  13. {{item.title}}
  14. </view>
  15. </view>
  16. </t-cell>
  17. </view>
  18. <block wx:if="{{receiptIndex === 1}}">
  19. <t-cell class="receipt-cell" title="发票抬头" t-class-left="cell-left">
  20. <view class="btn-wrap" slot="right-icon">
  21. <view
  22. class="btn {{addressTagsIndex === index ? 'active-btn':'' }}"
  23. bindtap="onLabels"
  24. data-item="{{tag}}"
  25. wx:for="{{addressTags}}"
  26. wx:for-item="tag"
  27. wx:key="index"
  28. >
  29. {{tag.title}}
  30. </view>
  31. </view>
  32. </t-cell>
  33. <t-cell
  34. class="receipt-cell"
  35. title="{{addressTagsIndex === 0 ? '姓名':'公司名称'}}"
  36. t-class-left="cell-left"
  37. t-class-right="cell-right"
  38. >
  39. <t-input
  40. slot="right-icon"
  41. borderless
  42. t-class="input-com"
  43. value="{{addressTagsIndex === 0 ? name:componentName}}"
  44. bindchange="onInput"
  45. data-item="name"
  46. type=""
  47. placeholder="{{addressTagsIndex === 0 ? '请输入您的姓名':'请输入公司名称'}}"
  48. />
  49. </t-cell>
  50. <t-cell
  51. class="receipt-cell"
  52. title="{{addressTagsIndex === 0 ? '手机号':'识别号'}}"
  53. t-class-left="cell-left"
  54. t-class-right="cell-right"
  55. >
  56. <view class="addressTagsIndex-cell" slot="right-icon">
  57. <t-input
  58. t-class="input-com"
  59. borderless
  60. value="{{addressTagsIndex === 0 ? phone:code}}"
  61. bindchange="onInput"
  62. data-item="code"
  63. type=""
  64. placeholder="{{addressTagsIndex === 0 ? '请输入您的手机号':'请输入纳税人识别号'}}"
  65. />
  66. <t-icon wx:if="{{addressTagsIndex === 1}}" name="help-circle" size="30rpx" bindtap="onKnowCode" />
  67. </view>
  68. </t-cell>
  69. <t-cell
  70. class="receipt-cell"
  71. title="电子邮箱"
  72. bordered="{{false}}"
  73. t-class-left="cell-left"
  74. t-class-right="cell-right"
  75. >
  76. <t-input
  77. slot="right-icon"
  78. t-class="input-com"
  79. borderless
  80. value="{{email}}"
  81. bindchange="onInput"
  82. data-item="email"
  83. type=""
  84. placeholder="请输入邮箱用于接收电子发票"
  85. />
  86. </t-cell>
  87. <view class="receipt-info">
  88. <t-cell class="receipt-cell" title="发票内容" bordered="{{false}}" t-class-left="cell-left">
  89. <view class="btn-wrap" slot="right-icon">
  90. <view
  91. class="btn {{goodsClassesIndex ===index ? 'active-btn':''}}"
  92. bindtap="onLabels"
  93. data-item="{{good}}"
  94. wx:for="{{goodsClasses}}"
  95. wx:for-item="good"
  96. wx:key="index"
  97. >
  98. {{good.title}}
  99. </view>
  100. </view>
  101. </t-cell>
  102. <view class="title">发票内容将显示详细商品名称与价格信息,发票金额为实际支付金额,不包含优惠等扣减金额</view>
  103. </view>
  104. <view class="receipt-know" bindtap="onDialogTap">
  105. 发票须知
  106. <t-icon name="help-circle" size="30rpx" />
  107. </view>
  108. <t-dialog
  109. title="{{codeShow ? '纳税人识别号说明':'发票须知'}}"
  110. bindconfirm="onDialogTap"
  111. class="dialog-receipt"
  112. visible="{{dialogShow}}"
  113. confirm-btn="我知道了"
  114. >
  115. <view class="srcoll-view-wrap" slot="content">
  116. <scroll-view class="dialog-info" scroll-x="{{false}}" scroll-y="{{true}}">
  117. <view class="info-wrap">
  118. <view class="info" wx:if="{{!codeShow}}">
  119. <view class="title" wx:for="{{invoiceInfo.info}}" wx:key="index" wx:for-item="item"> {{item}} </view>
  120. </view>
  121. <view class="info" wx:else>
  122. <view class="title" wx:for="{{invoiceInfo.codeTitle}}" wx:key="index" wx:for-item="item"> {{item}} </view>
  123. </view>
  124. </view>
  125. </scroll-view>
  126. </view>
  127. </t-dialog>
  128. </block>
  129. <view wx:else></view>
  130. <view class="safe-area-bottom receipt-btn">
  131. <t-button t-class="receipt-btn-con" bindtap="onSure">确定</t-button>
  132. </view>
  133. </view>
  134. <t-toast id="t-toast" />
  135. <t-dialog id="t-dialog" />