浏览代码

Merge branch 'main' of https://gitlab.com/tea28/client

hejie 3 年之前
父节点
当前提交
6ee7134351
共有 4 个文件被更改,包括 388 次插入0 次删除
  1. 12 0
      src/pages.json
  2. 137 0
      src/pagesB/invoice/Billingresult.vue
  3. 239 0
      src/pagesB/invoice/invoiceList.vue
  4. 二进制
      src/static/img/invoice.png

+ 12 - 0
src/pages.json

@@ -293,6 +293,18 @@
 				"style": {
 					"navigationBarTitleText": "填写发票信息"
 				}
+			},
+			{
+				"path": "invoice/invoiceList",
+				"style": {
+					"navigationBarTitleText": "已开票"
+				}
+			},
+			{
+				"path": "invoice/Billingresult",
+				"style": {
+					"navigationBarTitleText": "开票结果"
+				}
 			}
 		 ]
 	}],

+ 137 - 0
src/pagesB/invoice/Billingresult.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class='Billing-result'>
+    <div class="head-box">
+        <div class="state">开具中</div>
+    </div>
+    <div class="content-i">
+        <div class="info-box">
+            <div class="tit">增值税电子普通发票</div>
+            <img src="@/static/img/invoice.png" class="invoice_ico" alt="">
+            <div class="info-item flex_r flex_jb">
+                <div class="label">发票抬头</div>
+                <div class="input">增值税电子普通发票</div>
+            </div>
+            <div class="info-item flex_r flex_jb">
+                <div class="label">税号</div>
+                <div class="input">增值税电子普通发票</div>
+            </div>
+            <div class="info-item flex_r flex_jb">
+                <div class="label">价税合计</div>
+                <div class="input">增值税电子普通发票</div>
+            </div>
+            <div class="info-item flex_r flex_jb">
+                <div class="label">电子邮箱</div>
+                <div class="input">增值税电子普通发票</div>
+            </div>
+            <div class="info-item flex_r flex_jb">
+                <div class="label">手机号码</div>
+                <div class="input">增值税电子普通发票</div>
+            </div>
+        </div>
+        <div class="check-btn">预览发票</div>
+    </div>
+  </div>
+</template>
+<script>
+import { get, post } from '@/request/api.js';
+export default {
+  name: 'Billing-result',
+  data () {
+    return {}
+  },
+  onLoad (option) {},
+  onLaunch () {},
+  onShow () {},
+  onHide () {},
+  methods: {},
+  computed: {},
+  watch: {}
+}
+</script>
+<style scoped lang='scss'>
+page {
+	background-color: #F6F6F6;
+}
+.Billing-result{
+
+    .head-box{
+        height: 230rpx;
+        background: linear-gradient(90deg, #0ee6a2 0%, #18bb88 100%);
+        padding-top: 70rpx;
+        position: relative;
+        .state{
+            text-align: center;
+            // color: rgba($color: #000000, $alpha: 0.5);
+            color: #fff;
+            font-weight: bold;
+        }
+        // &::before{
+        //     content: '';
+        //     width: calc(100% - 72rpx);
+        //     height: 40rpx;
+        //     background: #fff;
+        //     position: absolute;
+        //     left: 36rpx;
+        //     bottom: 0;
+        //     border-radius: 12rpx 12rpx 0 0;
+        // }
+    }
+    .content-i{
+        padding: 0 36rpx;
+        position: relative;
+    }
+    .info-box{
+        padding: 60rpx 36rpx 40rpx;
+        background: #fff;
+        border-radius: 12rpx;
+        box-shadow: 0 6rpx 16rpx 0 rgba(0,0,0,0.2);
+        width: calc(100% - 72rpx);
+        position: absolute;
+        top: -40rpx;
+        left: 36rpx;
+        .tit{
+            color: #f00;
+            font-size: 30rpx;
+            text-align: center;
+            margin-bottom: 60rpx;
+        }
+        .invoice_ico{
+            width: 186rpx;
+            height: 110rpx;
+            position: absolute;
+            top: 14px;
+            left: calc(50% - 93rpx);
+        }
+        .info-item{
+            margin-bottom: 26rpx;
+            font-size: 30rpx;
+            &:last-child{
+                margin-bottom: 0;
+            }
+            .label{
+                width: 140rpx;
+                color: #333;
+                text-align: justify;
+                text-align-last: justify;
+            }
+            .input{
+                width: calc(100% - 140rpx);
+                text-align: right;
+                color: #666;
+            }
+        }
+    }
+    .check-btn{
+        position: absolute;
+        top: 700rpx;
+        left: 36rpx;
+        width: calc(100% - 72rpx);
+        height: 80rpx;
+        line-height: 80rpx;
+        border-radius: 40rpx;
+        text-align: center;
+        background: #18bb88;
+        color: #fff;
+    }
+}
+</style>

+ 239 - 0
src/pagesB/invoice/invoiceList.vue

@@ -0,0 +1,239 @@
+<template>
+  <div class="iApp">
+    <div class="log_list" :style="{ height: height }">
+      <div class="list_box" v-for="(item, index) of list" :key="index">
+        <div class="list_item">
+            <div class="p1 flex_r flex_jb c05">
+              <span>订单号:{{ item.order_sn }}</span>
+              <span>{{ $day(item.add_time * 1000).format("YYYY-MM-DD") }}</span>
+            </div>
+            <div class="p2 flex_r flex_jb">
+              <img :src="item.original_img" class="odr_img" alt />
+              <div class="odr_info flex_c flex_jb">
+                <div class="tit ellipsis1">{{ item.goods_name }}</div>
+                <div class="num">数量 x{{ item.goods_num }}</div>
+                <div class="money flex_r flex_jb">
+                  <span>金额{{ item.total_amount }}</span>
+                </div>
+              </div>
+            </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { get, post } from "@/request/api.js";
+var app = getApp();
+var appEv = app.$vm.$options;
+export default {
+  name: "iApp",
+  components: {},
+  data() {
+    return {
+      list: [],
+      page: 1,
+      rows: 10,
+      selectedId: [],
+      selectedLi: [],
+      height: undefined,
+      trueTotal: 0,
+      money: 0,
+    };
+  },
+  onLoad(option) {
+    let that = this;
+    uni.getSystemInfo({
+      success: function (res) {
+        that.height = res.windowHeight * 2 - 150 + "rpx";
+        that.getList();
+      },
+    });
+  },
+  onLaunch() {},
+  onShow() {},
+  onHide() {},
+  //页面上拉触底事件的处理函数
+  onReachBottom() {
+    if (this.page != -1) {
+      var that = this;
+      setTimeout(function () {
+        that.page++;
+        that.getList();
+      }, 800);
+    }
+  },
+  methods: {
+    getList() {
+      let data = {
+        page: this.page,
+        rows: this.rows,
+      };
+      post("invoice/orderList", data).then((res) => {
+        if (res.code == 0) {
+          this.list = this.list.concat(res.data.data);
+          this.total = res.data.total;
+          if (Math.ceil(this.total / this.rows) <= this.page) {
+            this.page = -1;
+          }
+        }
+      });
+    },
+    checkboxChange(e, item) {
+      this.trueTotal = 0;
+      this.money = 0;
+      if (item.isclick == true) {
+        this.$set(item, "isclick", false);
+      } else {
+        this.$set(item, "isclick", true);
+      }
+      for (let i of this.list) {
+        if (i.isclick) {
+          this.trueTotal++;
+          this.money = this.money + i.total_amount * 1;
+        }
+      }
+    },
+    toEditinvoice() {
+      if (this.trueTotal == 0) {
+        appEv.errTips("请先选择订单");
+        return;
+      }
+      let list = []
+      ;
+      for (let i of this.list) {
+        if (i.isclick == true) {
+          list.push(i.order_sn);
+        }
+      }
+      console.log(list,"qqqq");
+      uni.navigateTo({
+        url: "/pagesB/invoice/editinvoice?icheckList="+ list.toString() + '&money=' + this.money,
+      });
+      // this.goto("/pagesB/invoice/editinvoice",{checkList : list.toString(),money:this.money});
+    },
+  },
+  computed: {},
+  watch: {},
+};
+</script>
+<style scoped lang='scss'>
+.iApp {
+  width: 100%;
+  height: 100%;
+  .log_list {
+    padding: 32rpx 32rpx;
+    overflow: scroll;
+    .log_title {
+      line-height: 40rpx;
+      margin-bottom: 20rpx;
+
+      .tit {
+        font-size: 36rpx;
+        font-weight: bold;
+
+        .log_num {
+          font-size: 28rpx;
+          margin-left: 10rpx;
+        }
+
+        .active {
+          border-bottom: 4rpx solid #3a88ff;
+        }
+      }
+
+      .mor {
+        font-size: 24rpx;
+        color: rgba($color: #000, $alpha: 0.5);
+
+        .icofont {
+          font-size: 22rpx;
+        }
+      }
+    }
+
+    .list_box {
+      margin-top: 20rpx;
+      .list_item {
+        background: #fff;
+        padding: 32rpx;
+        border-radius: 16rpx;
+        margin-bottom: 20rpx;
+        border: 1px solid #ddd;
+        .list_item_l {
+          width: 68rpx;
+          // text-align: center;
+          .iconfont {
+            font-size: 36rpx;
+          }
+        }
+        .list_item_r {
+          width: calc(100% - 68rpx);
+        }
+
+        &:last-child {
+          margin-bottom: 0;
+        }
+      }
+
+      .p1 {
+        font-size: 25rpx;
+        margin-bottom: 20rpx;
+      }
+
+      .p2 {
+        .odr_img {
+          object-fit: cover;
+          width: 120rpx;
+          height: 112rpx;
+        }
+
+        .odr_info {
+          width: calc(100% - 120rpx - 20rpx);
+          font-size: 24rpx;
+          color: rgba($color: #000, $alpha: 0.5);
+
+          .tit {
+            color: rgba($color: #000, $alpha: 0.9);
+          }
+        }
+      }
+    }
+  }
+
+  .bottom {
+    flex: 0 0 100rpx;
+    // background-color: red;
+    border-top: 1px solid #ddd;
+    height: 100rpx;
+    width: 100%;
+    z-index: 999;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 32rpx;
+    .left {
+      display: flex;
+      flex-direction: row;
+      .green {
+        color: #2db389;
+        margin: 0 6rpx;
+      }
+    }
+    .right {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .button {
+        padding: 10rpx 20rpx;
+        background-color: #2db389;
+        border-radius: 10rpx;
+        span {
+          color: #fff;
+        }
+      }
+    }
+  }
+}
+</style>

二进制
src/static/img/invoice.png