shenjj 7 gadi atpakaļ
vecāks
revīzija
6ef2d38570
2 mainītis faili ar 60 papildinājumiem un 25 dzēšanām
  1. 16 11
      pages/mobile/order/details.vue
  2. 44 14
      pages/mobile/order/index.vue

+ 16 - 11
pages/mobile/order/details.vue

@@ -1,10 +1,5 @@
 <template>
   <div class="order-wrapper">
-    <div class="com-mobile-header">
-      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
-      <p>订单详情
-      </p>
-    </div>
     <div class="order-details-wrap">
       <div class="order-details-top">
         <div class="clearfix top-t-wrap">
@@ -48,7 +43,7 @@
               <template v-if="orderList.buyentername">
                 <span class="labelInfo_ForItem" v-if="orderList.storeid === '33069557578d44e69bd91ad12d28a8d4'">寄售</span>
               </template>
-              {{orderList.buyername}}&nbsp;|&nbsp;{{orderList.buyentername || '个人账户'}}
+              {{orderList.buyername}}&nbsp;|&nbsp;{{orderList.buyentername || '(个人账户)'}}
             </div>
             <div class="pull-left" v-else @click="toShopdetails(orderList)">
               <span class="labelInfo_ForItem" v-if="orderList.storeid === '33069557578d44e69bd91ad12d28a8d4'">寄售</span>
@@ -67,8 +62,8 @@
                 <span class="red" v-if="orderList.status === 502 || orderList.status === 406">买家已付款</span>
                 <!--<span class="red">待发货</span>-->
                 <span class="red" v-else-if="orderList.status === 602 || orderList.status === 603 || orderList.status === 315 || orderList.status === 604 || orderList.status === 605 || orderList.status === 606">订单已取消</span>
-                <span class="red" v-else-if="orderList.status === 501 || orderList.status === 524">待买家付款</span>
-                <span class="red" v-else-if="orderList.status === 404 || orderList.status === 520 || orderList.status === 405 || orderList.status === 503 || orderList.status === 514">待买家收货</span>
+                <span class="red" v-else-if="orderList.status === 501 || orderList.status === 524 ">待买家付款</span>
+                <span class="red" v-else-if="orderList.status === 404">待买家收货</span>
                 <span class="red" v-else-if="orderList.status === 405 || orderList.status === 514 || orderList.status === 503 || orderList.status === 506">待商城付款</span>
                 <span class="red" v-else-if="orderList.status === 606">交易关闭</span>
                 <span class="red" v-else-if="orderList.status === 520">交易完成</span>
@@ -563,7 +558,7 @@
             })
           } else {
             this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-              this._id = EncryptionFilter(res.data.inid)
+              this._id = EncryptionFilter(res.data.inId)
               this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
                 this.sendGoodsInfo = res.data[0]
                 this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
@@ -745,7 +740,8 @@
             }
             this.$http.put(`/trade/order/simpleinfo/ones/${this.$CancenOrderId}/release`, reason).then(res => {
               this.onMind('取消订单成功,等待买家确认')
-              this.$Orderreason = ''
+              this.$Orderreason = '我不想买了'
+              this.OrderCancelIndex = 0
               location.reload()
               this.showBuyerAlert = false
             })
@@ -996,7 +992,16 @@
           .list-item {
             font-size: 0.28rem;
             color: #333;
-            line-height: 0.5rem;
+            margin-top: 0.18rem;
+            &:nth-child(1) {
+              margin-top: 0px;
+            }
+            &:nth-child(2) {
+              margin-top: 0.21rem;
+            }
+            &:nth-child(3) {
+              margin-top: 0.1rem;
+            }
             .list-wrap-content-brand {
               @include overFlowHidden();
               .spec {

+ 44 - 14
pages/mobile/order/index.vue

@@ -1,10 +1,5 @@
 <template>
   <div class="order-wrapper" id="order-wrapper">
-    <div class="com-mobile-header">
-      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
-      <p>订单管理
-      </p>
-    </div>
     <div class="order-nav">
       <div :class="activeType === '' ? 'active': ''" @click="ChangeList('')"><span>全部</span></div>
       <div :class="activeType === 'tobeconfirmed' ? 'active' : ''" @click="ChangeList('tobeconfirmed')"><span>待付款</span></div>
@@ -16,7 +11,8 @@
         <div class="list-wrap-title clearfix">
           <div class="pull-left" v-if="vendorType !== 'buyer'" @click="toShopdetails(item)">
             <span class="labelInfo_ForItem" v-if="item.storeid === '33069557578d44e69bd91ad12d28a8d4'">寄售</span>
-            {{item.buyername}}&nbsp;|&nbsp;{{item.buyentername}}</div>
+            {{item.buyername}}&nbsp;|&nbsp;{{item.buyentername || '(个人账户)'}}
+          </div>
           <div class="pull-left" v-else @click="toShopdetails(item)">
             <span class="labelInfo_ForItem" v-if="item.storeid === '33069557578d44e69bd91ad12d28a8d4'">寄售</span>
             {{item.sellername}}</div>
@@ -35,7 +31,7 @@
               <!--<span class="red">待发货</span>-->
               <span class="red" v-else-if="item.status === 602 || item.status === 603 || item.status === 315 || item.status === 604 || item.status === 605 || item.status === 606">订单已取消</span>
               <span class="red" v-else-if="item.status === 501 || item.status === 524">待买家付款</span>
-              <span class="red" v-else-if="item.status === 404 || item.status === 520 || item.status === 405 || item.status === 503 || item.status === 514">待买家收货</span>
+              <span class="red" v-else-if="item.status === 404 || item.status === 503">待买家收货</span>
               <span class="red" v-else-if="item.status === 405 || item.status === 514 || item.status === 503 || item.status === 506">待商城付款</span>
               <span class="red" v-else-if="item.status === 606">交易关闭</span>
               <span class="red" v-else-if="item.status === 520">交易完成</span>
@@ -50,9 +46,9 @@
               <div class="name pull-left">品牌:</div>
               <div class="pull-left spec">{{details.brName || '-'}}</div>
             </div>
-            <div class="pull-right lab">
-              {{details.goodsnumber || '-'}}
-            </div>
+            <!--<div class="pull-right lab">-->
+              <!--{{details.goodsnumber || '-'}}-->
+            <!--</div>-->
           </div>
           <div class="list-item clearfix">
             <div class="list-wrap-content-brand clearfix pull-left">
@@ -80,6 +76,10 @@
           </div>
         </div>
         <div class="list-all-info clearfix">
+          <div class="orderNumber clearfix">
+            <div class="pull-left">{{item.createtime || item.creattime | time}}</div>
+            <div class="pull-right">订单号:{{item.orderid}}</div>
+          </div>
           <div>共<span>{{item.batchQty}}</span>件商品&nbsp;&nbsp;合计:
             <span class="pri"><a class="red">¥</a>{{item.ensurePrice }}</span>
             <span class="lab">(含运费:<a class="red">¥</a><a class="red">{{item.fare | priceFiter}}</a>)</span></div>
@@ -310,6 +310,7 @@
         return this.$route.query.type
       },
       getOrderList() {
+        this.orderList = []
         this.orderList = this._initSetParams(this.$store.state.order.order.orderList.data.content)
         return this.$store.state.order.order.orderList
       },
@@ -455,7 +456,7 @@
           })
         } else {
           this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-            this._id = EncryptionFilter(res.data.inid)
+            this._id = EncryptionFilter(res.data.inId)
             this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
               this.sendGoodsInfo = res.data[0]
               this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
@@ -637,7 +638,8 @@
           }
           this.$http.put(`/trade/order/simpleinfo/ones/${this.$CancenOrderId}/release`, reason).then(res => {
             this.onMind('取消订单成功,等待买家确认')
-            this.$Orderreason = ''
+            this.$Orderreason = '我不想买了'
+            this.OrderCancelIndex = 0
             this.ChangeList(this.activeType)
             this.showBuyerAlert = false
           })
@@ -791,6 +793,19 @@
       priceFiter(val) {
         if (!val) return '0.00'
         return val.toFixed(2)
+      },
+      time: function (time) {
+        if (typeof time === 'number') {
+          if (!time) {
+            return '无'
+          } else {
+            let d = new Date(time)
+            let year = d.getFullYear()
+            let month = d.getMonth() + 1
+            let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
+            return year + '-' + month + '-' + day
+          }
+        }
       }
     },
     components: {
@@ -861,7 +876,17 @@
       .list-item {
         font-size: 0.28rem;
         color: #333;
-        line-height: 0.5rem;
+        /*line-height: 0.5rem;*/
+        margin-top: 0.18rem;
+        &:nth-child(1) {
+          margin-top: 0px;
+        }
+        &:nth-child(2) {
+          margin-top: 0.21rem;
+        }
+        &:nth-child(3) {
+          margin-top: 0.1rem;
+        }
         .list-wrap-content-brand {
           @include overFlowHidden();
           .spec {
@@ -897,10 +922,15 @@
       background: #fff;
       padding: 0 0.2rem;
       @include overFlowHidden();
-      @include lineHeight(0.66rem);
+      line-height: 0.66rem;
       font-size: 0.26rem;
       color: #333;
       border-bottom: 1px solid #e4e4e4;
+      .orderNumber {
+        font-size: 0.24rem;
+        color: #999;
+        border-bottom: 1px solid #e4e4e4;
+      }
       .pri {
         font-size: 0.32rem;
         color: #f43938;