Quellcode durchsuchen

修改开票界面显示

hejie vor 3 Jahren
Ursprung
Commit
d315a049b6
2 geänderte Dateien mit 68 neuen und 36 gelöschten Zeilen
  1. 26 9
      src/pagesB/invoice/editinvoice.vue
  2. 42 27
      src/pagesB/my/assistant.vue

+ 26 - 9
src/pagesB/invoice/editinvoice.vue

@@ -1,5 +1,8 @@
 <template>
   <div class="editinvoice">
+    <div class="top">
+        <span>本次共选择{{list.length}}个订单,合计¥{{money}}</span>
+    </div>
     <div class="tit">发票详情</div>
     <div class="formBar">
         <div class="form-item flex_r flex_jb">
@@ -9,13 +12,13 @@
         <div class="form-item flex_r flex_jb">
             <div class="label">抬头类型</div>
             <div class="input">
-                <div class="option-i" @click="formDa.type = 1">
-                    <img src="@/static/img/xuanzhong_icon.png" v-if="formDa.type == 1" class="ico" alt="">
+                <div class="option-i" @click="type = 1">
+                    <img src="@/static/img/xuanzhong_icon.png" v-if="type == 1" class="ico" alt="">
                     <img src="@/static/img/weixuanzhong_icon.png" v-else class="ico" alt="">
                     <span class="txt">个人或事业单位</span>
                 </div>
-                <div class="option-i" @click="formDa.type = 2">
-                    <img src="@/static/img/xuanzhong_icon.png" v-if="formDa.type == 2" class="ico" alt="">
+                <div class="option-i" @click="type = 2">
+                    <img src="@/static/img/xuanzhong_icon.png" v-if="type == 2" class="ico" alt="">
                     <img src="@/static/img/weixuanzhong_icon.png" v-else class="ico" alt="">
                     <span class="txt">企业</span>
                 </div>
@@ -38,7 +41,7 @@
         </div>
         <div class="form-item flex_r flex_jb">
             <div class="label">手机号码:</div>
-            <input class="input" placeholder="请填写手机号码"/>
+            <input class="input" placeholder="请填写手机号码" :value="userinfo.mobile" disabled/>
         </div>
     </div>
     <div class="submitBtn">提交</div>
@@ -50,12 +53,18 @@ export default {
   name: "editinvoice",
   data() {
     return {
-        formDa: {
-            type: 1
-        },
+            type: 1,
+            list:[],
+            money:0,
+            listString:undefined,
+            userinfo:undefined
     };
   },
-  onLoad(option) {},
+  onLoad(option) {
+    this.list = option.icheckList.split(",")
+    this.money = option.money
+    this.userinfo = uni.getStorageSync("userinfo");
+  },
   onLaunch() {},
   onShow() {},
   onHide() {},
@@ -68,6 +77,14 @@ export default {
 page {
 	background-color: #F6F6F6;
 }
+.top{
+    padding:20rpx 36rpx;
+    background: #fff;
+    margin-bottom: 20rpx;
+    span{
+        font-size: 32rpx;
+    }
+}
 .editinvoice{
     padding: 36rpx;
     .tit{

+ 42 - 27
src/pagesB/my/assistant.vue

@@ -1,11 +1,11 @@
 <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_box" v-for="(item, index) of list" :key="index">
         <div class="list_item flex_r flex_jb">
           <checkbox-group
             class="list_item_l flex_c flex_jc"
-            @change="checkboxChange($event,item)"
+            @change="checkboxChange($event, item)"
           >
             <label class="option_box mar_t30">
               <checkbox
@@ -39,13 +39,13 @@
     <div class="bottom">
       <div class="left">
         <span>共</span>
-        <span class="green">{{total}}</span>
+        <span class="green">{{ trueTotal }}</span>
         <span>笔订单,合计</span>
-        <span class="green">¥{{money}}</span>
+        <span class="green">¥{{ money }}</span>
         <span>元</span>
       </div>
       <div class="right">
-        <div class="button">
+        <div class="button" @click="toEditinvoice">
           <span>下一步</span>
         </div>
       </div>
@@ -67,8 +67,8 @@ export default {
       selectedId: [],
       selectedLi: [],
       height: undefined,
-      total:0,
-      money:0
+      trueTotal: 0,
+      money: 0,
     };
   },
   onLoad(option) {
@@ -105,28 +105,43 @@ export default {
           this.total = res.data.total;
           if (Math.ceil(this.total / this.rows) <= this.page) {
             this.page = -1;
-            // setTimeout(() => {
-            //   appEv.errTips("暂无更多");
-            // }, 1000);
           }
         }
       });
     },
-    checkboxChange(e,item) {
-      this.total = 0
-      this.money = 0
-      if(item.isclick == true){
+    checkboxChange(e, item) {
+      this.trueTotal = 0;
+      this.money = 0;
+      if (item.isclick == true) {
         this.$set(item, "isclick", false);
-      }else{
+      } else {
         this.$set(item, "isclick", true);
       }
-      for(let i of this.list){
-        if(i.isclick){
-          this.total++
-          this.money = this.money + i.total_amount * 1
+      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: {},
@@ -142,7 +157,7 @@ export default {
     .log_title {
       line-height: 40rpx;
       margin-bottom: 20rpx;
-     
+
       .tit {
         font-size: 36rpx;
         font-weight: bold;
@@ -228,23 +243,23 @@ export default {
     justify-content: space-between;
     align-items: center;
     padding: 0 32rpx;
-    .left{
+    .left {
       display: flex;
       flex-direction: row;
-      .green{
-        color: #2DB389;
+      .green {
+        color: #2db389;
         margin: 0 6rpx;
       }
     }
-    .right{
+    .right {
       display: flex;
       justify-content: center;
       align-items: center;
-      .button{
+      .button {
         padding: 10rpx 20rpx;
-        background-color: #2DB389;
+        background-color: #2db389;
         border-radius: 10rpx;
-        span{
+        span {
           color: #fff;
         }
       }