gcz 4 سال پیش
والد
کامیت
02733bf9f9

+ 22 - 21
src/router/index.js

@@ -61,6 +61,27 @@ export const asyncRouterMap = [
         meta: {title: '修改商品', icon: 'product-add'},
         hidden: true
       },
+      {
+        path: 'origin',
+        name: 'origin',
+        component: () => import('@/views/pms/origin/index'),
+        meta: {title: '生产地管理', icon: 'tree'}
+      },
+      {
+        path: 'addOrigin',
+        name: 'addOrigin',
+        component: () => import('@/views/pms/origin/add'),
+        meta: {title: '添加生产地'},
+        hidden: true
+        
+      },
+      {
+        path: 'updateOrigin',
+        name: 'updateOrigin',
+        component: () => import('@/views/pms/origin/update'),
+        meta: {title: '生产地'},
+        hidden: true
+      },
       {
         path: 'productCate',
         name: 'productCate',
@@ -376,27 +397,7 @@ export const asyncRouterMap = [
         component: () => import('@/views/ums/company/update'),
         meta: {title: '供应商'},
         hidden: true
-      },
-      {
-        path: 'origin',
-        name: 'origin',
-        component: () => import('@/views/ums/origin/index'),
-        meta: {title: '生产地管理', icon: 'tree'}
-      },
-      {
-        path: 'addOrigin',
-        name: 'addOrigin',
-        component: () => import('@/views/ums/origin/add'),
-        meta: {title: '添加生产地'},
-        hidden: true
-      },
-      {
-        path: 'updateOrigin',
-        name: 'updateOrigin',
-        component: () => import('@/views/ums/origin/update'),
-        meta: {title: '生产地'},
-        hidden: true
-      }
+      }      
       
 
     ]

+ 1 - 1
src/views/layout/components/Sidebar/index.vue

@@ -27,7 +27,7 @@ export default {
       'routers'
     ]),
     routes() {
-      // console.log('this.routers',JSON.parse(JSON.stringify(this.routers)))
+      console.log('this.routers',JSON.parse(JSON.stringify(this.routers)))
       // return this.$router.options.routes
       return this.routers
     },

src/views/ums/origin/add.vue → src/views/pms/origin/add.vue


src/views/ums/origin/components/originDetail.vue → src/views/pms/origin/components/originDetail.vue


src/views/ums/origin/index.vue → src/views/pms/origin/index.vue


src/views/ums/origin/update.vue → src/views/pms/origin/update.vue


+ 2 - 0
src/views/pms/product/components/ProductDetail.vue

@@ -88,11 +88,13 @@
     productCategoryId: null,
     productBigCategoryId:null,
     productCategoryName: '',
+    productBigCategoryName:'',
     productSn: '',
     promotionEndTime: '',
     promotionPerLimit: 0,
     promotionPrice: null,
     promotionStartTime: '',
+    qualityGuaranteePeriod:'',//保质期
     promotionType: 0,
     publishStatus: 0,
     recommandStatus: 0,

+ 22 - 6
src/views/pms/product/components/ProductInfoDetail.vue

@@ -39,6 +39,12 @@
           </el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="规格:">
+        <el-input v-model="value.spec"></el-input>
+      </el-form-item>
+      <el-form-item label="保质期:">
+        <el-input v-model="value.qualityGuaranteePeriod"></el-input>
+      </el-form-item>
       <el-form-item label="商品介绍:">
         <el-input
           :autoSize="true"
@@ -60,10 +66,7 @@
       </el-form-item>
       <el-form-item label="计量单位:">
         <el-input v-model="value.unit"></el-input>
-      </el-form-item>
-      <el-form-item label="规格:">
-        <el-input v-model="value.spec"></el-input>
-      </el-form-item>
+      </el-form-item>      
       <el-form-item label="商品重量:">
         <el-input v-model="value.weight" style="width: 300px"></el-input>
         <span style="margin-left: 20px">克</span>
@@ -133,12 +136,14 @@
         this.handleEditCreated();
       },
       selectProductCateValue: function (newValue) {
-        console.log('newValue',newValue);
+        // console.log('newValue',newValue);
         if (newValue != null && newValue.length === 2) {
           this.value.productCategoryId = newValue[1];
           this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
           // 大类ID
           this.value.productBigCategoryId = newValue[0];
+          // 大类名称
+          this.value.productBigCategoryName= this.getBigCateNameById(this.value.productBigCategoryId);
         } else {
           this.value.productCategoryId = null;
           this.value.productCategoryName=null;
@@ -171,6 +176,7 @@
             this.productCateOptions.push({label: list[i].name, value: list[i].id, children: children});
           }
         });
+        
       },
       getBrandList() {
         fetchBrandList({pageNum: 1, pageSize: 100}).then(response => {
@@ -183,7 +189,7 @@
       },
       getOriginList() {
         fetchOriginList({pageNum: 1, pageSize: 100}).then(response => {
-          console.log('getOriginList',response);
+          // console.log('getOriginList',response);
           this.originOptions = [];
           let originList = response.data;
           for (let i = 0; i < originList.length; i++) {
@@ -203,6 +209,16 @@
         }
         return name;
       },
+      getBigCateNameById(id){
+        let bigName=null;
+        for(let i=0;i<this.productCateOptions.length;i++){
+            if(this.productCateOptions[i].value===id){
+              bigName=this.productCateOptions[i].label;
+              return bigName;
+            }
+        }
+        return bigName;
+      },
       handleNext(formName){
         this.$refs[formName].validate((valid) => {
            console.log('this.$refs[formName]',this.$refs[formName]);

+ 2 - 2
src/views/pms/product/components/ProductSaleDetail.vue

@@ -38,13 +38,13 @@
           :inactive-value="0">
         </el-switch>
       </el-form-item>
-      <el-form-item label="服务保证:">
+      <!-- <el-form-item label="服务保证:">
         <el-checkbox-group v-model="selectServiceList">
           <el-checkbox :label="1">无忧退货</el-checkbox>
           <el-checkbox :label="2">快速退款</el-checkbox>
           <el-checkbox :label="3">免费包邮</el-checkbox>
         </el-checkbox-group>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="详细页标题:">
         <el-input v-model="value.detailTitle"></el-input>
       </el-form-item>

+ 2 - 2
src/views/pms/product/index.vue

@@ -133,11 +133,11 @@
         <el-table-column label="排序" width="100" align="center">
           <template slot-scope="scope">{{scope.row.sort}}</template>
         </el-table-column>
-        <el-table-column label="SKU库存" width="100" align="center">
+        <!-- <el-table-column label="SKU库存" width="100" align="center">
           <template slot-scope="scope">
             <el-button type="primary" icon="el-icon-edit" @click="handleShowSkuEditDialog(scope.$index, scope.row)" circle></el-button>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column label="销量" width="100" align="center">
           <template slot-scope="scope">{{scope.row.sale}}</template>
         </el-table-column>