فهرست منبع

订单详情优化

shish 4 سال پیش
والد
کامیت
e2ba5e38c3

+ 1 - 1
hdApp/src/admin/home/components/order-item.vue

@@ -19,7 +19,7 @@
 </template>
 </template>
 <script>
 <script>
 export default {
 export default {
-	name: 'listModule',
+	name: 'orderItem',
 	props: {
 	props: {
 		info: {
 		info: {
 			type: Object,
 			type: Object,

+ 3 - 3
hdApp/src/admin/home/order.vue

@@ -9,7 +9,7 @@
             <view :class="['app-price',{'app-green':item.status==5}]">{{ item.status | constantfilter('ORDER_STATUS') }}</view>
             <view :class="['app-price',{'app-green':item.status==5}]">{{ item.status | constantfilter('ORDER_STATUS') }}</view>
           </view>
           </view>
           <view class="list-blo">
           <view class="list-blo">
-              <listModule :info="item"></listModule>
+              <orderItem :info="item"></orderItem>
           </view>
           </view>
           <view class="list-bottom" style="padding-top:0upx;">
           <view class="list-bottom" style="padding-top:0upx;">
             <view style="border-bottom:1upx solid #EEEEEE;padding-bottom:8upx;">
             <view style="border-bottom:1upx solid #EEEEEE;padding-bottom:8upx;">
@@ -33,7 +33,7 @@
 </template>
 </template>
 <script>
 <script>
 import AppTabs from "@/components/plugin/tabs";
 import AppTabs from "@/components/plugin/tabs";
-import listModule from "./components/order-item";
+import orderItem from "./components/order-item";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
 import ModalModule from "@/components/plugin/modal";
 import { getCategory, getUsage } from '@/utils/config'
 import { getCategory, getUsage } from '@/utils/config'
@@ -45,7 +45,7 @@ import NotLogin from "@/components/not-login";
 export default {
 export default {
   name: "order-list",
   name: "order-list",
   components: {
   components: {
-    listModule,
+    orderItem,
     AppTabs,
     AppTabs,
     AppWrapperEmpty,
     AppWrapperEmpty,
     ModalModule,
     ModalModule,

+ 1 - 4
hdApp/src/components/module/app-order-list.vue → hdApp/src/admin/order/components/detail-goods.vue

@@ -7,9 +7,6 @@
 				</view>
 				</view>
 				<view class="list-msg">
 				<view class="list-msg">
 					<view class="title">{{ info.name || info.title }}</view>
 					<view class="title">{{ info.name || info.title }}</view>
-					<block v-if="(info.goodsStyle && info.goodsStyle != '0') || (info.goodsStyleName  && info.goodsStyleName != '0')">
-						<view class="desc">{{ info.goodsStyle || info.goodsStyleName }}</view>
-					</block>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="list-right">
 			<view class="list-right">
@@ -21,7 +18,7 @@
 </template>
 </template>
 <script>
 <script>
 export default {
 export default {
-	name: 'list-module',
+	name: 'detailGoods',
 	props: {
 	props: {
 		info: {
 		info: {
 			type: Object,
 			type: Object,

+ 13 - 48
hdApp/src/admin/order/detail.vue

@@ -5,26 +5,18 @@
         <img :src="`${constant.imgUrl}/retail/order/bg.png`" mode="widthFix" />
         <img :src="`${constant.imgUrl}/retail/order/bg.png`" mode="widthFix" />
       </view>
       </view>
       <view class="page-top-det">
       <view class="page-top-det">
-        <view>
-          <view class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</view>
-        </view>
-        <view class="page-status-img">
-          <img :src="data.status == 0 ? waitPayImg : waitDeliveryImg" mode="widthFix" />
-        </view>
+        <view> <view class="page-status">{{ data.status | constantfilter('ORDER_STATUS') }}</view> </view>
       </view>
       </view>
     </view>
     </view>
-    <!-- 订单详情 -->
     <view class="page-det">
     <view class="page-det">
-      <!-- 商品信息 -->
       <view class="module-com">
       <view class="module-com">
         <view class="module-tit">商品信息</view>
         <view class="module-tit">商品信息</view>
         <view class="module-det">
         <view class="module-det">
           <block v-if="!$util.isEmpty(data.goodsInfoList)">
           <block v-if="!$util.isEmpty(data.goodsInfoList)">
-            <list-module v-for="(items, subIndex) in data.goodsInfoList" :key="subIndex" :info="items"></list-module>
+            <detailGoods v-for="(items, subIndex) in data.goodsInfoList" :key="subIndex" :info="items"></detailGoods>
           </block>
           </block>
         </view>
         </view>
       </view>
       </view>
-      <!-- 订单信息 -->
       <view class="module-com order-msg">
       <view class="module-com order-msg">
         <view class="module-tit">订单信息</view>
         <view class="module-tit">订单信息</view>
         <view class="module-det">
         <view class="module-det">
@@ -57,47 +49,34 @@
               <view class="value">{{ data.cardInfo || '-' }}</view>
               <view class="value">{{ data.cardInfo || '-' }}</view>
             </view>
             </view>
           </view>
           </view>
-          <view class="order-msg-blo" v-if="1 ==2">
-            <view class="msg-list">
-              <view class="label">客户评分</view>
-              <view class="value">
-                <rate-module :current="Number(data.totalFlow) || 0" :disabled="true"></rate-module>
-              </view>
-            </view>
-            <view class="msg-list">
-              <view class="label">客户留言</view>
-              <view class="value">{{ data.evaluate || '-' }}</view>
-            </view>
-          </view>
           <view class="order-msg-blo">
           <view class="order-msg-blo">
             <view class="msg-list">
             <view class="msg-list">
               <view class="label">订单号</view>
               <view class="label">订单号</view>
-              <view class="value">{{ data.orderSn }}</view>
+              <view class="value">{{ data.orderSn||'' }}</view>
             </view>
             </view>
             <view class="msg-list">
             <view class="msg-list">
-              <view class="label">生成时间</view>
-              <view class="value">{{ data.addTime}}</view>
+              <view class="label">创建时间</view>
+              <view class="value">{{ data.addTime||''}}</view>
             </view>
             </view>
             <view class="msg-list">
             <view class="msg-list">
               <view class="label">运费</view>
               <view class="label">运费</view>
-              <view class="value">¥{{ data.sendCost }}</view>
+              <view class="value">¥{{ data.sendCost ? parseFloat(data.sendCost) : 0 }}</view>
             </view>
             </view>
             <view class="msg-list">
             <view class="msg-list">
               <view class="label">总金额</view>
               <view class="label">总金额</view>
-              <view class="value">¥{{ data.prePrice }}</view>
+              <view class="value">¥{{ parseFloat(data.prePrice) ? data.prePrice : 0 }}</view>
             </view>
             </view>
             <view v-if="data.discountAmount > 0" class="msg-list">
             <view v-if="data.discountAmount > 0" class="msg-list">
               <view class="label">优惠</view>
               <view class="label">优惠</view>
-              <view class="value">¥{{ data.discountAmount }}</view>
+              <view class="value">¥{{ data.discountAmount ? parseFloat(data.discountAmount) : 0 }}</view>
             </view>
             </view>
             <view class="msg-list">
             <view class="msg-list">
               <view class="label">实付款</view>
               <view class="label">实付款</view>
-              <view class="value">¥{{ data.realPrice }}</view>
+              <view class="value">¥{{ data.realPrice ? parseFloat(data.realPrice) : 0 }}</view>
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>
-      <!-- 优惠信息 -->
       <view class="module-com coupon-wrap" v-if="data.discountAmount && data.discountAmount != '0.00' && 1==2" >
       <view class="module-com coupon-wrap" v-if="data.discountAmount && data.discountAmount != '0.00' && 1==2" >
         <view class="module-det flex-center-between">
         <view class="module-det flex-center-between">
           <view class="app-color-3" >
           <view class="app-color-3" >
@@ -118,40 +97,29 @@
         <span v-else>已付款</span>
         <span v-else>已付款</span>
         <span class="app-price">
         <span class="app-price">
           <span>¥</span>
           <span>¥</span>
-          <span class="app-size-40">{{ data.actPrice }}</span>
+          <span class="app-size-40">{{ data.actPrice ? parseFloat(data.actPrice) : 0 }}</span>
         </span>
         </span>
       </view>
       </view>
       <template>
       <template>
       </template>
       </template>
       <template>
       <template>
         <view class="operate-btn-wrap">
         <view class="operate-btn-wrap">
-          <block v-if="data.status == 0">
             <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">自取</button>
             <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">自取</button>
             <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">发货</button>
             <button class="admin-button-com middle" style="color: #666666;border-color: #dddddd;">发货</button>
-          </block>
-          <block v-else-if="data.status == 4"></block>
-          <block v-else-if="data.status == 6"></block>
-          <block v-else-if="data.status == 5">
-            <button v-if="data.sendType != 1" class="admin-button-com default" @click="seeSendFn" >配送详情</button>
-          </block>
-          <block v-else>
-            <button v-if="data.currentFlow == 1" class="admin-button-com middle" @click.stop="freeShippingFn">自取</button>
-            <button class="admin-button-com middle" @click.stop="pageTo({ url: '/admin/order/ship', query: { id: data.id, pageStatus: 0 } })" >发货</button>
-          </block>
         </view>
         </view>
       </template>
       </template>
     </view>
     </view>
   </view>
   </view>
 </template>
 </template>
 <script>
 <script>
-import ListModule from "@/components/module/app-order-list";
+import detailGoods from "./components/detail-goods.vue";
 import AppCoupon from "@/components/app-coupon-sel";
 import AppCoupon from "@/components/app-coupon-sel";
 import ModalModule from "@/components/plugin/modal";
 import ModalModule from "@/components/plugin/modal";
 import RateModule from "@/components/plugin/rate";
 import RateModule from "@/components/plugin/rate";
 import { getDetB, freeShipping, orderUpdatePrice } from "@/api/order";
 import { getDetB, freeShipping, orderUpdatePrice } from "@/api/order";
 export default {
 export default {
   name: "detail",
   name: "detail",
-  components: { ListModule, AppCoupon, ModalModule, RateModule },
+  components: { detailGoods, AppCoupon, ModalModule, RateModule },
   data() {
   data() {
     return {
     return {
       constant: this.$constant,
       constant: this.$constant,
@@ -246,7 +214,7 @@ export default {
     .page-status {
     .page-status {
       font-size: 36upx;
       font-size: 36upx;
       font-weight: bold;
       font-weight: bold;
-      margin-bottom: 16upx;
+      margin-top:50upx;
     }
     }
     .page-prompt {
     .page-prompt {
       color: #ffdede;
       color: #ffdede;
@@ -285,9 +253,7 @@ export default {
     }
     }
   }
   }
 }
 }
-// 底部按钮
 .page-btn {
 .page-btn {
-  //width: calc(100% - 20upx);
   @include disFlex(center, space-between);
   @include disFlex(center, space-between);
   padding: 0 30upx;
   padding: 0 30upx;
   .app-price {
   .app-price {
@@ -307,7 +273,6 @@ export default {
     }
     }
   }
   }
 }
 }
-// 公共模块
 .module-com {
 .module-com {
   border-radius: 10upx;
   border-radius: 10upx;
   background-color: #fff;
   background-color: #fff;