Forráskód Böngészése

fix(merchant):完善订单

liude 1 éve
szülő
commit
f7661c41d7

+ 19 - 10
src/pages/merchant/mine/openStore/openStoreAppealDetail.vue

@@ -26,12 +26,12 @@
     <view class="content-item2">
       <view class="item2-box">
         <image :src="list.storeImage" mode="" v-if="list.storeImage"></image>
-        <img class="img2" src="@/static/logo.png" alt="" v-else/>
+        <img class="img2" src="@/static/logo.png" alt="" v-else />
         <view class="img-text">店铺门面图(需包含完整牌匾)</view>
       </view>
       <view class="item2-box">
         <image :src="list.storeInnerImage" mode="" v-if="list.storeInnerImage"></image>
-        <img class="img2" src="@/static/logo.png" alt="" v-else/>
+        <img class="img2" src="@/static/logo.png" alt="" v-else />
         <view class="img-text">店内真实环境</view>
       </view>
     </view>
@@ -39,18 +39,27 @@
     <view class="content-item2">
       <view class="item-l">
         <p>法人姓名 : {{ list.legalRepresentativeName || '--' }}</p>
-        <p>性别 : {{ list.legalRepresentativeGender || '--' }}</p>
+        <p>
+          性别 :
+          {{
+            list.legalRepresentativeGender == 1
+              ? '男'
+              : list.legalRepresentativeGender == 2
+              ? '女'
+              : '保密'
+          }}
+        </p>
         <p>证件号码 : {{ list.idCardNumber || '--' }}</p>
-        <p>有效期 : {{ list.idCardExpirationDate || '--' }}</p>
+        <p>有效期 : {{ $u.timeFormat(list.idCardExpirationDate) || '--' }}</p>
       </view>
       <view class="item2-box">
         <image :src="list.idCardFrontPhoto" mode="" v-if="list.idCardFrontPhoto"></image>
-        <img class="img2" src="@/static/logo.png" alt=""  v-else/>
+        <img class="img2" src="@/static/logo.png" alt="" v-else />
         <view class="img-text">证件正面图(国徽图)</view>
       </view>
       <view class="item2-box">
         <image :src="list.idCardBackPhoto" mode="" v-if="list.idCardBackPhoto"></image>
-        <img class="img2" src="@/static/logo.png" alt="" v-else/>
+        <img class="img2" src="@/static/logo.png" alt="" v-else />
         <view class="img-text">证件反面图(人像图)</view>
       </view>
     </view>
@@ -59,11 +68,11 @@
       <view class="item-l">
         <p>证件名称 : 营业执照</p>
         <p>证件编号 : {{ list.businessLicenseId || '--' }}</p>
-        <p>有效期 : {{ list.businessLicenseExpirationDate || '--' }}</p>
+        <p>有效期 : {{ $u.timeFormat(list.businessLicenseExpirationDate) || '--' }}</p>
       </view>
       <view class="item2-box">
         <image :src="list.businessPhoto" mode="" v-if="list.businessPhoto"></image>
-        <img class="img2" src="@/static/logo.png" alt="" v-else/>
+        <img class="img2" src="@/static/logo.png" alt="" v-else />
         <view class="img-text">证件正面图</view>
       </view>
     </view>
@@ -72,11 +81,11 @@
       <view class="item-l">
         <p>证件名称 : 经营许可证</p>
         <p>证件编号 : {{ list.businessLicenseNumberValid || '--' }}</p>
-        <p>有效期 : {{ list.businessLicenseExpirationDateValid || '--' }}</p>
+        <p>有效期 : {{ $u.timeFormat(list.businessLicenseExpirationDateValid) || '--' }}</p>
       </view>
       <view class="item2-box">
         <image :src="list.businessLicensePhoto" mode="" v-if="list.businessLicensePhoto"></image>
-        <img class="img2" src="@/static/logo.png" alt="" v-else/>
+        <img class="img2" src="@/static/logo.png" alt="" v-else />
         <view class="img-text">证件正面图</view>
       </view>
     </view>

+ 21 - 16
src/pages/merchant/order/components/orderItem.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- 一些功能暂定 -->
   <view class="">
     <view class="order__info" v-for="item in list" :key="item.id">
       <view class="order__info--phone">
@@ -7,13 +8,13 @@
             182***4342
             <text class="tipInfo" style="margin-left: 10rpx">(预留手机)</text>
           </view>
-          <view class="tipInfo">近90天第16次下单</view>
+          <!-- <view class="tipInfo">近90天第16次下单</view> -->
         </view>
         <u-icon name="phone" color="#2979ff" size="28" @click="handlerMakePhone"></u-icon>
       </view>
 
       <view class="order__info--pay">
-        <text class="text-22">顾客待付款</text>
+        <!-- <text class="text-22">顾客待付款</text> -->
         <view class="service">
           <view class="orderInfo" v-for="ele in item.goodsInfo" :key="ele.id">
             <image slot="icon" :src="ele.goodsPic" style="width: 150rpx; height: 150rpx" />
@@ -21,33 +22,37 @@
           </view>
         </view>
 
-        <view class="description">
+        <!-- <view class="description">
           <view class="description--title">汽车维修与保养</view>
           <view class="tipInfo">专业维修保界</view>
           <view class="description--text">服务描述……</view>
-        </view>
+        </view> -->
       </view>
 
       <view class="order__info--compute">
-        <view class="computeFlex">
+        <!-- <view class="computeFlex">
           <view>发票信息</view>
           <view class="tipInfo">不需要</view>
-        </view>
-        <view class="computeFlex">
+        </view> -->
+        <!-- <view class="computeFlex">
           <view>技术服务费</view>
           <view class="tipInfo">¥15</view>
+        </view> -->
+        <view class="computeFlex">
+          <view>支付金额</view>
+          <view class="tipInfo" style="color: #df5f5f">{{ `¥${item.totalAmount}` || '--' }}</view>
         </view>
         <view class="computeFlex">
-          <view>本单预计收入</view>
-          <view class="tipInfo" style="color: #df5f5f">¥723.7</view>
+          <view>优惠金额</view>
+          <view class="tipInfo" style="color: #df5f5f">{{ `¥${item.couponAmount}` || '--' }}</view>
         </view>
       </view>
 
       <view class="order__info--tip">
         <view class="tip-l">
-          <view class="tipInfo"> 订单编号:12232964103521日</view>
-          <view class="tipInfo"> 交易快照:发生争议时,可作为判断依据</view>
-          <view class="tipInfo"> 下单时间:12-0318:03</view>
+          <view class="tipInfo"> 订单编号:{{ item.orderSn }}</view>
+          <!-- <view class="tipInfo"> 交易快照:发生争议时,可作为判断依据</view> -->
+          <view class="tipInfo"> 下单时间:{{ $u.timeFormat(item.createTime) }}</view>
         </view>
         <view class="tip-r">
           <view class="r-btn" v-if="typeStyle == 1" @click="handlerCloseOrder"> 关闭交易 </view>
@@ -120,17 +125,17 @@ export default {
       .service {
         display: flex;
         width: 100%;
-        overflow-x: auto; 
-        white-space: nowrap; 
+        overflow-x: auto;
+        white-space: nowrap;
 
         .orderInfo {
           height: 200rpx;
           widows: 150rpx;
           padding: 10rpx;
           text-align: center;
-          white-space: nowrap; 
+          white-space: nowrap;
           overflow: hidden;
-          text-overflow: ellipsis; 
+          text-overflow: ellipsis;
           font-size: 26rpx;
         }
       }

+ 31 - 31
src/pages/merchant/order/index.vue

@@ -24,16 +24,15 @@
         ></u-tabs>
       </view>
 
-      <orderItem :typeStyle.sync='typeStyle' :list="orderList"></orderItem>
-
+      <orderItem :list="orderList" :typeStyle.sync="typeStyle"></orderItem>
     </view>
-	<tabbar currentTab="merchantOrder" />
+    <tabbar currentTab="merchantOrder"  />
   </view>
 </template>
 
 <script>
-  import orderItem from "@/pages/merchant/order/components/orderItem.vue"
-  import {getOrderListApi } from "@/api/merchant/order"
+import orderItem from '@/pages/merchant/order/components/orderItem.vue';
+import { getOrderListApi } from '@/api/merchant/order';
 export default {
   data() {
     return {
@@ -43,44 +42,45 @@ export default {
         { id: '2', name: '已核销' },
         { id: '3', name: '退款' },
       ],
-      typeStyle:0,
       orderList: [],
       params: {
         pageNum: 1,
         pageSize: 10,
       },
-      status:"1"
+      typeStyle: 0,
+      status: '0',
     };
   },
-  components:{orderItem},
-  methods:{
+  components: { orderItem },
+  methods: {
     // 点击切换顶部导航栏
-    handlerChangeItem(item){
-      this.typeStyle = item.index
+    handlerChangeItem(item) {
+      this.typeStyle = item.index;
+      this.getOrderList(item.id);
     },
-    async getOrderList(){
-      let result = Object.assign({}, {
-        paging: `${this.params.pageNum},${this.params.pageSize}`,
-        status:this.status
-      })
-      let res = await getOrderListApi({...result})
-
-      if(res.code === 200){
-        this.orderList = res.data.records
+    async getOrderList(status) {
+      let result = Object.assign(
+        {},
+        {
+          paging: `${this.params.pageNum},${this.params.pageSize}`,
+          status: status || 0,
+        },
+      );
+      let res = await getOrderListApi({ ...result });
+      if (res.code === 200) {
+        this.orderList = res.data.records;
       }
-      console.log(res);
-      console.log(this.orderList);
-    }
+    },
+  },
+  onShow() {
+    this.getOrderList();
   },
-  mounted() {
-    this.getOrderList()
-  }
 };
 </script>
 <style lang="scss" scoped>
-  .order {
-    min-height: calc(100vh - 80rpx);
-    background-color: $uni-bg-color-page;
-	padding-top: 80rpx;
-  }
+.order {
+  min-height: calc(100vh - 80rpx);
+  background-color: $uni-bg-color-page;
+  padding-top: 80rpx;
+}
 </style>

+ 4 - 4
src/pages/merchant/store/index.vue

@@ -4,18 +4,17 @@
     <view class="shop__data">
       <view class="shop__data--left">
         <view class="text-title">店铺分</view>
-        <view class="text-num">90</view>
+        <view class="text-num">{{ store.score || '--' }}</view>
       </view>
       <view class="shop__data--right">
         <view>
           <view class="text-title">今日收入(元)</view>
-          <view class="text-num">500</view>
+          <view class="text-num">{{ store.amount || '0' }}</view>
         </view>
         <view class="line"></view>
         <view>
           <view class="text-title">今日订单(单)</view>
-          <!-- <view class="text-num">{{ orderCount }}</view> -->
-          <view class="text-num">{{ store.score }}</view>
+          <view class="text-num">{{ store.orderCount || "0"}}</view>
         </view>
       </view>
     </view>
@@ -169,6 +168,7 @@ export default {
       if (res.code === 200) {
         // this.orderCount = res.data.orderCount;
         this.store = Object.assign({}, { ...this.store }, { ...res.data });
+        console.log(this.store, 'this.store');
       }
     },
   },