You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

invoice-step1.vue 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="box">
  3. <view class="from">
  4. <u-form :model="form" ref="uForm">
  5. <u-form-item>
  6. <view class="from_item">
  7. <text><text style="color: red;">*</text>请选择发票抬头:</text>
  8. <view style="display: flex;" @click="toheaderPage">
  9. <text>{{state.params.buyerName?state.params.buyerName:"请选择"}}</text>
  10. <u-icon name="arrow-right" style="margin-left: 10px;"></u-icon>
  11. </view>
  12. </view>
  13. </u-form-item>
  14. <u-form-item>
  15. <view class="from_item">
  16. <text><text style="color: red;">*</text>车辆所有人证件号后6位:</text>
  17. <view style="display: flex;">
  18. <u-input v-model="state.type" class="input" />
  19. </view>
  20. </view>
  21. </u-form-item>
  22. </u-form>
  23. </view>
  24. <button class="submit" @click="submit">提交</button>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import {
  29. reactive
  30. } from "vue";
  31. import { onLoad, onShow } from "@dcloudio/uni-app";
  32. import { navTo } from "@/utils/utils"
  33. import { ETCProductInvoiceApi } from "@/utils/network/api.js";
  34. import { stringToJson } from "@/utils/network/encryption";
  35. import { request } from "@/utils/network/request.js";
  36. const state = reactive({
  37. type: '',
  38. params: "",
  39. })
  40. onShow(() => {
  41. uni.$once('list', (query) => {
  42. console.log("111", query)
  43. state.params = query.item
  44. })
  45. })
  46. onLoad((option) => {
  47. state.type = option.type
  48. })
  49. const toheaderPage = () => {
  50. console.log(1);
  51. navTo('/subpackage/orders/invoiceApply/invoice-header-list?manage=2')
  52. }
  53. const submit = () => {
  54. if (state.type == 1) {
  55. ETCProductInvoiceRequest()
  56. }
  57. }
  58. const ETCProductInvoiceRequest = () => {
  59. const options = {
  60. type: 2,
  61. data: {
  62. orders: state.etcCardNo, //订单号列表
  63. titleId: state.params['id'], //发票抬头编号
  64. subIdentNo: 1, //证件号后6位
  65. userMobile: state.userMobile, //手机号
  66. sellerId: 10, //售方信息编号
  67. },
  68. method: "POST",
  69. showLoading: true,
  70. };
  71. request(ETCProductInvoiceApi, options).then((res) => {
  72. const data = stringToJson(res.bizContent);
  73. console.log(data, "通行");
  74. });
  75. }
  76. </script>
  77. <style>
  78. page {
  79. width: 100%;
  80. height: 100%;
  81. }
  82. </style>
  83. <style lang="scss" scoped>
  84. .box {
  85. width: 100%;
  86. height: 100%;
  87. background-color: #FFF;
  88. border-top: 1rpx solid #DFDFDF;
  89. padding: 0 30rpx;
  90. box-sizing: border-box;
  91. .from {
  92. background-color: #fff;
  93. // margin-top: 20rpx;
  94. ::v-deep .u-form-item {
  95. padding: 0;
  96. line-height: normal;
  97. .u-form-item__message {
  98. margin-bottom: 12rpx
  99. }
  100. }
  101. .from_item {
  102. display: flex;
  103. flex-wrap: nowrap;
  104. justify-content: space-between;
  105. // padding: 0 30rpx;
  106. // border-bottom: #DCDCDC 1px solid;
  107. align-items: center;
  108. height: 80rpx;
  109. text {
  110. font-size: 30rpx;
  111. font-family: Noto Sans S Chinese;
  112. font-weight: 400;
  113. }
  114. ::v-deep .input {
  115. text-align: right;
  116. flex: 1;
  117. background: transparent;
  118. input {
  119. text-align: right;
  120. }
  121. }
  122. }
  123. .from_item1 {
  124. display: flex;
  125. flex-wrap: nowrap;
  126. flex-direction: column;
  127. justify-content: space-between;
  128. padding: 30rpx;
  129. border-bottom: #DCDCDC 1px solid;
  130. input {
  131. text-align: right;
  132. }
  133. .textarea {
  134. background-color: #F1F1F1;
  135. width: 100%;
  136. border-radius: 20rpx;
  137. margin-top: 10rpx;
  138. text-indent: 1rem;
  139. height: 180rpx;
  140. padding: 20rpx;
  141. box-sizing: border-box;
  142. }
  143. }
  144. }
  145. .submit {
  146. width: 670rpx;
  147. height: 80rpx;
  148. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  149. border-radius: 40rpx;
  150. font-size: 32rpx;
  151. font-family: Noto Sans S Chinese;
  152. font-weight: 400;
  153. color: #FFFFFF;
  154. line-height: 80rpx;
  155. position: fixed;
  156. left: 50%;
  157. transform: translate(-50%);
  158. bottom: 100rpx;
  159. }
  160. }
  161. </style>