czj преди 4 години
родител
ревизия
734e16b988

+ 12 - 9
src/components/iphGoodCard.vue

@@ -4,27 +4,24 @@
  * @Author: dream
  * @Date: 2021-03-28 10:12:49
  * @LastEditors: dream
- * @LastEditTime: 2021-04-01 10:50:06
+ * @LastEditTime: 2021-04-01 17:06:08
 -->
 <template>
-	<view class="good-card-main u-flex u-col-top" @click.stop="cardClick">
+	<view class="u-flex good-card-main" @click="cardClick">
     <view class="good-image">
       <image :src="value.img" mode="aspectFill" />
-      <view class="good-tip">{{value.astrict}}</view>
+      <view class="good-tip" v-if="value.astrict">{{value.astrict}}</view>
     </view>
     <view class="good-desc u-flex-1 u-m-l-24">
       <view class="good-name u-line-2">{{value.name}}</view>
       <view class="good-specification u-m-t-8">{{value.spce}}</view>
-      <view class="good-warehouse u-font-24 u-m-t-8">{{value.warehouse}}</view>
-      <view class="u-flex u-m-t-24">
+      <view class="good-warehouse u-font-24 u-m-t-8" v-if="value.warehouse">{{value.warehouse}}</view>
+      <view class="u-flex u-flex-1 u-col-bottom u-m-t-24">
         <view class="good-price">
           <text class="u-font-22">¥</text>
           <text class="u-font-32">{{value.salesPrice}}</text>
         </view>
-        <view
-          class="good-disable-price u-m-l-8 u-font-22 text-through"
-          v-if="value.originalPrice"
-        >¥{{value.originalPrice}}</view>
+        <view class="good-disable-price u-m-l-8 u-font-22 text-through" v-if="value.originalPrice">¥{{value.originalPrice}}</view>
         <view class="u-flex-1 u-flex u-row-right">
           <block v-if="showType === 1">
             <block v-if="!isShowEmpty">
@@ -39,6 +36,9 @@
             <view class="good-num u-p-l-20 u-p-r-20">{{value.num}}</view>
             <view class="iph-icon iph-icon-plus" @click.stop="addNum"></view>
           </block>
+          <block v-if="showType === 3">
+            <text>x{{value.num}}</text>
+          </block>
         </view>
       </view>
     </view>
@@ -81,6 +81,7 @@ export default {
 
 <style lang="scss" scoped>
 .good-card-main {
+  align-items: stretch;
   background-color: $iph-standby-bg;
   .good-image {
     position: relative;
@@ -102,6 +103,8 @@ export default {
     }
   }
   .good-desc {
+    display: flex;
+    flex-direction: column;
     .good-name {
       line-height: 36px;
       font-size: 30px;

+ 4 - 4
src/pageSubs/deliveryOrder/components/iphDeliveryOrderCard.vue

@@ -4,10 +4,10 @@
  * @Author: dream
  * @Date: 2021-03-31 18:33:43
  * @LastEditors: dream
- * @LastEditTime: 2021-04-01 10:49:58
+ * @LastEditTime: 2021-04-01 17:31:50
 -->
 <template>
-	<view class="delivery-order-card-main iph-bg-fff" @click.stop="cardClick">
+	<view class="delivery-order-card-main iph-bg-fff" @click.stop="cardClick" :style="{ paddingBottom: `${pagePaddingBottom}px`}">
     <view class="u-flex">
       <view class="icon-warehouse iph-icon-warehouse"></view>
       <view class="u-flex-1 u-m-l-8 u-font-24 u-line-34">{{detail.warehouse}}</view>
@@ -71,9 +71,9 @@ export default {
       const nowYear = dayjs().year()
       const valYear = dayjs(val).year()
       if (nowYear === valYear) {
-        return dayjs(val).format('MM/DD HH:mm')
+        return dayjs(val).format('MM-DD HH:mm')
       } else {
-        return dayjs(val).format('YYYY/MM/DD HH:mm')
+        return dayjs(val).format('YYYY-MM-DD HH:mm')
       }
     }
   }

+ 134 - 7
src/pageSubs/deliveryOrder/detail.vue

@@ -4,27 +4,119 @@
  * @Author: dream
  * @Date: 2021-03-31 18:03:25
  * @LastEditors: dream
- * @LastEditTime: 2021-04-01 11:28:40
+ * @LastEditTime: 2021-04-01 18:37:35
 -->
 <template>
-	<view class="delivery-order-detail-main">
-    <view class="head-area"><text class="status-title">待发货</text></view>
+	<view class="delivery-order-detail-main" :style="{ paddingBottom: `${pagePaddingBottom}px`}">
+    <u-navbar title="发货单详情" is-back :is-fixed="false" :border-bottom="false" title-color="#ffffff" back-icon-color="#ffffff" :background="{ background: '#1677FF' }" />
+    <view class="head-area"><text class="status-title">{{detail.status | statusFilter}}</text></view>
+    <view class="warehouse-info iph-bg-fff">
+      <view class="u-flex u-border-bottom u-p-b-32">
+        <view class="u-flex-1 u-font-30 u-line-42 text-weight-500">仓库:{{detail.warehouse}}</view>
+        <view class="u-flex" @click="callPhone">
+          <view class="phone-icon iph-icon-phone u-m-r-4"></view>
+          <view class="primary-color u-font-24 u-line-34">联系我们</view>
+        </view>
+      </view>
+      <view class="u-flex u-p-t-24">
+        <view class="u-font-22 u-line-32 u-flex-1">发货单号:{{detail.invoiceId}}</view>
+        <view class="order-time u-font-22 u-line-32">{{detail.invoiceTime | timeFilter}}</view>
+      </view>
+    </view>
+    <view class="good-list iph-bg-fff">
+      <block v-for="(item, index) in goodList" :key="index">
+        <view class="u-p-t-32 u-p-b-32 good-card u-border-bottom">
+          <iph-good-card :value="item" :showType="3" />
+        </view>
+      </block>
+    </view>
+    <iph-fixed-bottom @getHeight="getFooterHeight">
+      <view class="footer iph-bg-fff">
+        <button class="confirm-receipt-btn">确认收货</button>
+      </view>
+    </iph-fixed-bottom>
   </view>
 </template>
 
 <script>
+import dayjs from 'dayjs'
+import iphGoodCard from '../../components/iphGoodCard.vue'
+import IphFixedBottom from '../../components/iphFixedBottom.vue'
 export default {
+  components: { iphGoodCard, IphFixedBottom },
   name: 'deliveryOrderDetail',
   data () {
     return {
-
+      pagePaddingBottom: 0,
+      detail: {
+        invoiceId: '123132434234243',
+        invoiceTime: '2021-04-01 00:00:00',
+        status: 1,
+        warehouse: '浙江仓库',
+        phone: '15988117467'
+      },
+      goodList: [{
+        img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
+        name: '华硕天选',
+        spce: '一件',
+        salesPrice: 468,
+        originalPrice: 480,
+        num: 1
+      }, {
+        img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
+        name: '两行文案两行文案两行文案两行文案两行文案两行文案',
+        spce: '1件/1000套',
+        salesPrice: 468,
+        originalPrice: 480,
+        num: 1
+      }, {
+        img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
+        name: '华硕天选',
+        spce: '一件',
+        salesPrice: 468,
+        originalPrice: 480,
+        num: 1
+      }, {
+        img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
+        name: '两行文案两行文案两行文案两行文案两行文案两行文案',
+        spce: '1件/1000套',
+        salesPrice: 468,
+        originalPrice: 480,
+        num: 1
+      }]
     }
   },
   onLoad () {
 
   },
   methods: {
-
+    getFooterHeight (val) {
+      this.pagePaddingBottom = val + 8
+    },
+    callPhone () {
+      uni.makePhoneCall({
+        phoneNumber: this.detail.phone
+      })
+    }
+  },
+  filters: {
+    statusFilter (val) {
+      const statusText = {
+        1: '待发货',
+        2: '待收货',
+        3: '已收货'
+      }
+      return statusText[val]
+    },
+    timeFilter (val) {
+      const nowYear = dayjs().year()
+      const valYear = dayjs(val).year()
+      if (nowYear === valYear) {
+        return dayjs(val).format('MM-DD HH:mm')
+      } else {
+        return dayjs(val).format('YYYY-MM-DD HH:mm')
+      }
+    }
   }
 }
 </script>
@@ -32,9 +124,9 @@ export default {
 <style lang="scss" scoped>
 .delivery-order-detail-main {
   .head-area {
-    padding: 24px 24px 0;
+    padding: 0 24px;
     height: 282px;
-    background: linear-gradient(180deg, #1677FF 0%, #7CB1FB 55%, #F5F5F5 100%);
+    background: linear-gradient(180deg, $u-type-primary 0%, $iph-type-light 55%, $iph-base-bg 100%);
     .status-title {
       font-size: 56px;
       font-weight: 500;
@@ -42,5 +134,40 @@ export default {
       color: $iph-standby-text;
     }
   }
+  .warehouse-info {
+    margin: -186px 24px 0;
+    padding: 32px 32px 24px;
+    border-radius: 12px;
+    .phone-icon {
+      width: 34px;
+      height: 34px;
+    }
+    .order-time {
+      color: $iph-desc-text;
+    }
+  }
+  .good-list {
+    margin: 16px 24px 0;
+    padding: 0 32px;
+    border-radius: 12px;
+    .good-card {
+      &:last-child {
+        &::after {
+          border-bottom-width: 0;
+        }
+      }
+    }
+  }
+  .footer {
+    padding: 24px;
+    .confirm-receipt-btn {
+      padding: 22px;
+      font-size: 32px;
+      line-height: 44px;
+      color: $iph-standby-text;
+      background-color: $u-type-primary;
+      border-radius: 8px;
+    }
+  }
 }
 </style>

+ 10 - 6
src/pageSubs/orders/components/iphOrderGoodCard.vue

@@ -4,7 +4,7 @@
  * @Author: dream
  * @Date: 2021-03-31 09:42:58
  * @LastEditors: dream
- * @LastEditTime: 2021-03-31 10:33:58
+ * @LastEditTime: 2021-04-01 17:12:03
 -->
 <template>
   <view class="order-good-card iph-bg-fff">
@@ -15,12 +15,12 @@
     <view class="good-card u-border-bottom u-flex">
       <image class="good-image" :src="detail.img" mode="aspectFill" />
       <view class="good-info u-m-l-16 u-flex-1">
-        <view class="u-line-2">趣包筷子四件套</view>
-        <view class="good-info-spce u-m-t-8 u-font-24 u-line-34">1件/1000套</view>
+        <view class="u-line-2">{{detail.name}}</view>
+        <view class="good-info-spce u-m-t-8 u-font-24 u-line-34">{{detail.spce}}</view>
         <view class="u-flex-1 u-flex u-col-bottom">
           <text class="u-m-b-2 u-font-22 u-line-32 bold price-color">¥</text>
-          <text class="u-m-l-2 u-font-30 u-line-42 bold price-color">469</text>
-          <text class="u-flex-1 u-text-right">x1</text>
+          <text class="u-m-l-2 u-font-30 u-line-42 bold price-color">{{detail.salesPrice}}</text>
+          <text class="u-flex-1 u-text-right">x{{detail.num}}</text>
         </view>
       </view>
     </view>
@@ -41,7 +41,11 @@ export default {
   data () {
     return {
       detail: {
-        img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg'
+        img: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=288400877,2749955263&fm=26&gp=0.jpg',
+        name: '华硕天选',
+        spce: '一件',
+        salesPrice: 468,
+        num: 1
       }
     }
   },

+ 3 - 3
src/pageSubs/orders/submit.vue

@@ -4,7 +4,7 @@
  * @Author: dream
  * @Date: 2021-03-26 13:59:15
  * @LastEditors: dream
- * @LastEditTime: 2021-03-31 10:52:20
+ * @LastEditTime: 2021-04-01 17:31:12
 -->
 <template>
 	<view class="submit-order-main" :style="{ paddingBottom: `${pagePaddingBottom}px`}">
@@ -46,7 +46,7 @@
         <view>¥200</view>
       </view>
     </view>
-    <iph-fixed-bottom  @getHeight="getFooterHeight">
+    <iph-fixed-bottom @getHeight="getFooterHeight">
       <view class="footer u-flex iph-bg-fff">
         <view class="u-flex-1">
           <text class="u-m-b-8 u-font-32 u-line-44 text-weight-500 price-color">¥</text>
@@ -59,7 +59,7 @@
 </template>
 
 <script>
-import IphFixedBottom from '../../components/iphFixedBottom.vue'
+import IphFixedBottom from '@/components/iphFixedBottom.vue'
 import iphOrderGoodCard from './components/iphOrderGoodCard.vue'
 export default {
   components: { iphOrderGoodCard, IphFixedBottom },

+ 4 - 3
src/pages.json

@@ -42,9 +42,10 @@
     }, {
       "path": "detail",
       "style": {
-        "navigationBarBackgroundColor": "#1677FF",
-        "navigationBarTextStyle": "white",
-        "navigationBarTitleText": "发货单详情"
+        "navigationStyle": "custom"
+        // "navigationBarBackgroundColor": "#1677FF",
+        // "navigationBarTextStyle": "white",
+        // "navigationBarTitleText": "发货单详情"
 			}
     }]
   }, {

BIN
src/static/common/icon_phone.png


+ 7 - 0
src/uni.scss

@@ -2,6 +2,8 @@
 
 $u-type-primary: #1677FF;
 
+$iph-type-light: #7CB1FB;
+
 $iph-base-text: #212121;
 $iph-standby-text: #ffffff;
 $iph-prompt-text: #333333;
@@ -129,3 +131,8 @@ $iph-btn-disabel-bg: #999999;
   background: url('~@/static/common/icon_dp.png') no-repeat center center;
   background-size: contain;
 }
+
+.iph-icon-phone {
+  background: url('~@/static/common/icon_phone.png') no-repeat center center;
+  background-size: contain;
+}