Browse Source

新品上线信息

chenrui 1 year ago
parent
commit
024d5fd29f
1 changed files with 16 additions and 4 deletions
  1. 16 4
      src/views/productManagement/newProduct/list.vue

+ 16 - 4
src/views/productManagement/newProduct/list.vue

@@ -66,7 +66,7 @@
         </template>
         <!-- 上/下线时间 内容 -->
         <template slot="auditTime" slot-scope="text, record">
-          {{ $route.params.onlineFalg=='1'?record.auditTime:record.auditTime }}
+          {{ ($route.params.onlineFalg=='1'&&$route.params.type=="onlineInfo")?record.onlineAuditTime:record.auditTime }}
         </template>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -86,10 +86,9 @@
     </a-spin>
   </a-card>
 </template>
-
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { queryNewProductPage } from '@/api/product'
+import { queryNewProductPage, productList } from '@/api/product'
 import { STable, VSelect } from '@/components'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
@@ -134,7 +133,20 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.$route.params.onlineFalg })).then(res => {
+        const ajaxName = this.$route.params.type == 'onlineInfo' ? productList : queryNewProductPage
+        if (this.$route.params.type == 'onlineInfo') {
+          this.queryParam.state = 'ONLINE'
+          if (this.queryParam.beginDate || this.queryParam.endDate) {
+            this.queryParam.onlineFalg = 1
+            this.queryParam.newProductDateScope = 9999
+          } else {
+            this.queryParam.onlineFalg = undefined
+            this.queryParam.newProductDateScope = undefined
+          }
+        } else {
+          this.queryParam.onlineFalg = this.$route.params.onlineFalg
+        }
+        return ajaxName(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data