Prechádzať zdrojové kódy

修改信息订单列表

YY 2 rokov pred
rodič
commit
c03d29d936

+ 1 - 1
src/views/selfShop/message/index.vue

@@ -60,7 +60,7 @@
         </el-col>
       </template>
     </e-dialog>
-    <el-drawer title="最近购买订单列表" :visible.sync="drawer" :direction="direction" :before-close="toClose">
+    <el-drawer title="最近三月购买订单列表" :visible.sync="drawer" :direction="direction" :before-close="toClose">
       <order-1 :customer="customer" :shop="shop" @onSubmit="onSubmit"></order-1>
     </el-drawer>
   </div>

+ 4 - 1
src/views/selfShop/message/parts/order-1.vue

@@ -127,6 +127,7 @@
 </template>
 
 <script>
+const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: order } = createNamespacedHelpers('order');
 const { mapActions: orderDetail } = createNamespacedHelpers('orderDetail');
@@ -157,7 +158,9 @@ export default {
     async handleChange(data) {
       if (data) {
         let res;
-        let info = { customer: this.customer._id, limit: 5, shop: this.shop._id };
+        let info = { customer: this.customer._id, shop: this.shop._id };
+        info[`buy_time@end`] = moment().format('YYYY-MM-DD');
+        info[`buy_time@start`] = moment().subtract(3, 'months').format('YYYY-MM-DD');
         if (data == '1') {
           info.status = '0';
           res = await this.orderQuery(info);