Explorar el Código

新产品上线提醒

lilei hace 3 años
padre
commit
f35445acf0

+ 11 - 0
src/api/product.js

@@ -22,6 +22,17 @@ export const productList = (params) => {
     method: 'post'
   })
 }
+// 查询最近上下线产品
+export const queryNewProductPage = (params) => {
+  const url = `/product/queryNewProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 // 产品详情
 export const productDetail = (params) => {
   const url = `/product/findBySn/${params.sn}`

+ 24 - 24
src/config/router.config.js

@@ -48,6 +48,28 @@ export const asyncRouterMap = [
         },
         hidden: true
       },
+      // 新品列表
+      {
+        path: '/newProduct',
+        name: 'newProduct',
+        component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
+        meta: {
+          title: '新品信息',
+          icon: 'home'
+        },
+        hidden: true
+      },
+      // 产品详情
+      {
+        path: '/viewProduct/:sn',
+        name: 'viewProduct',
+        component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/detail'),
+        meta: {
+          title: '产品详情',
+          icon: 'home'
+        },
+        hidden: true
+      },
       // 销售管理
       {
         path: '/salesManagement',
@@ -1656,7 +1678,7 @@ export const asyncRouterMap = [
                 name: 'productInfoList',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/list.vue'),
                 meta: {
-                  title: '产品信息列表',
+                  title: '产品信息列表(自建)',
                   icon: 'file-text',
                   hidden: true,
                   permission: 'M_dealerProductList'
@@ -1703,7 +1725,7 @@ export const asyncRouterMap = [
                 name: 'productInfoJgList',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfoJg/list.vue'),
                 meta: {
-                  title: '产品信息列表',
+                  title: '产品信息列表(箭冠)',
                   icon: 'file-text',
                   hidden: true,
                   permission: 'M_productInfoList'
@@ -1786,28 +1808,6 @@ export const asyncRouterMap = [
               }
             ]
           },
-          // 新品列表
-          {
-            path: '/newProduct',
-            name: 'newProduct',
-            component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
-            meta: {
-              title: '新品信息',
-              icon: 'home'
-            },
-            hidden: true
-          },
-          // 产品详情
-          {
-            path: '/viewProduct/:sn',
-            name: 'viewProduct',
-            component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/detail'),
-            meta: {
-              title: '产品详情',
-              icon: 'home'
-            },
-            hidden: true
-          },
         ]
       },
       //  供应商管理

+ 7 - 3
src/views/Home.vue

@@ -26,7 +26,7 @@
       :destroyOnClose="true"
       @cancel="openNewProduct=false"
       v-model="openNewProduct">
-      <newProduct></newProduct>
+      <newProduct @close="openNewProduct=false"></newProduct>
     </a-modal>
   </div>
 </template>
@@ -35,7 +35,7 @@
 import { mapGetters } from 'vuex'
 import ResetPwd from '@/views/user/ResetPwd.vue'
 import newProduct from '@/views/productManagement/newProduct/modal.vue'
-
+import { queryNewProductPage } from '@/api/product'
 export default {
   name: 'Home',
   components: { ResetPwd, newProduct },
@@ -53,7 +53,11 @@ export default {
   },
   methods: {
     hasNewProduct () {
-      // this.openNewProduct = true
+      queryNewProductPage({ pageNo: 1, pageSize: 20 }).then(res => {
+        if (res.status == 200) {
+          this.openNewProduct = true
+        }
+      })
     }
   },
   beforeRouteEnter (to, from, next) {

+ 10 - 14
src/views/productManagement/newProduct/detail.vue

@@ -18,35 +18,31 @@
             <a-descriptions-item label="产品品牌:">{{ (detailsData && detailsData.productBrandName) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="产品编码:">{{ (detailsData && detailsData.code) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="原厂编码:">{{ (detailsData && detailsData.origCode) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="商品尺寸:">{{ (detailsData && detailsData.name) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="重量:">{{ (detailsData && detailsData.unit) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="商品尺寸:">{{ (detailsData && detailsData.size) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="重量:">{{ (detailsData && detailsData.weight) || '--' }}</a-descriptions-item>
             <a-descriptions-item label="计量单位:">{{ (detailsData && detailsData.unit) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="其它编号:">
-              {{ detailsData && (detailsData.specialPrice || detailsData.specialPrice == 0) ? detailsData.specialPrice : '--' }}
-            </a-descriptions-item>
-            <a-descriptions-item label=""></a-descriptions-item>
-            <a-descriptions-item label="适用车型:">{{ productTypeName || '--' }}</a-descriptions-item>
+            <!-- <a-descriptions-item label="适用车型:">{{ productTypeName || '--' }}</a-descriptions-item> -->
           </a-descriptions>
           <div class="productDetail">
             <h4>产品介绍</h4>
-            <div class="productDesc">阿斯顿发链接撒旦发了就阿斯大幅拉四大佛教萨拉丁撒地方就拉萨撒萨德勒撒旦发了撒打发士大夫了士大夫了撒打发</div>
+            <div class="productDesc">
+              {{ detailsData && detailsData.description || '暂无产品介绍' }}
+            </div>
           </div>
         </div>
-        <div class="productImg">
+        <div class="productImg" v-if="detailsData && detailsData.productPicList">
           <a-carousel arrows>
             <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1"><a-icon type="left-circle" /></div>
             <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"><a-icon type="right-circle" /></div>
-            <div><img src="../../../assets/avatar2.jpg" /></div>
-            <div><img src="../../../assets/avatar2.jpg" /></div>
-            <div><img src="../../../assets/avatar2.jpg" /></div>
+            <div><img v-for="item in detailsData.productPicList" :src="item.imageUrl" /></div>
           </a-carousel>
-          <div class="sycxImg">
+          <!-- <div class="sycxImg">
             <p>适用车型图片</p>
             <div>
               <img src="../../../assets/avatar2.jpg" />
               <div>江陵凯瑞200</div>
             </div>
-          </div>
+          </div> -->
         </div>
       </div>
     </div>

+ 3 - 2
src/views/productManagement/newProduct/list.vue

@@ -107,7 +107,8 @@
 import moment from 'moment'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
-import { dealerProductList, dealerProductExport } from '@/api/dealerProduct'
+// import { dealerProductList, dealerProductExport } from '@/api/dealerProduct'
+import { queryNewProductPage } from '@/api/product'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 export default {
@@ -149,7 +150,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
+        return queryNewProductPage(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {

+ 4 - 2
src/views/productManagement/newProduct/modal.vue

@@ -20,12 +20,13 @@
 
 <script>
 import { STable } from '@/components'
-import { dealerProductList } from '@/api/dealerProduct'
+import { queryNewProductPage } from '@/api/product'
 export default {
   name: 'NewProduct',
   components: { STable },
   data () {
     return {
+      queryParam: {},
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
@@ -36,7 +37,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
+        return queryNewProductPage(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -50,6 +51,7 @@ export default {
   methods: {
     viewMore () {
       this.$router.push({ name: 'newProduct' })
+      this.$emit('close')
     }
   }
 }

+ 15 - 1
src/views/productManagement/productInfoJg/list.vue

@@ -95,6 +95,14 @@
         <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
         <span v-else>--</span>
       </template>
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          class="button-success"
+          @click="handleDetail(record)"
+          id="productInfoList-detail-btn">详情</a-button>
+      </template>
     </s-table>
   </a-card>
 </template>
@@ -160,6 +168,10 @@ export default {
         })
       }
     },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.code = ''
@@ -188,7 +200,8 @@ export default {
         { title: '终端价', dataIndex: 'terminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '车主价', dataIndex: 'carOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'onlineFalgDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '状态', dataIndex: 'onlineFalgDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ]
       getCurrentDealer().then(res => {
         if (res.status == 200) {
@@ -270,6 +283,7 @@ export default {
     this.$nextTick(() => { // 页面渲染完成后的回调
       _this.setTableH()
     })
+    this.getColumns()
   },
   watch: {
     advanced (newValue, oldValue) {

+ 2 - 2
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -93,8 +93,8 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '店内单号', scopedSlots: { customRender: 'urgentBillNo' }, width: 180, align: 'center' },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '急件单号', scopedSlots: { customRender: 'urgentBillNo' }, width: 180, align: 'center' },
+        { title: '店内单号', dataIndex: 'salesBillNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },