Bladeren bron

产品管理增加提示

chenrui 2 jaren geleden
bovenliggende
commit
fa03dd2534
2 gewijzigde bestanden met toevoegingen van 36 en 10 verwijderingen
  1. 33 10
      src/views/basicData/systemSettings/index.vue
  2. 3 0
      src/views/productManagement/productInfo/list.vue

+ 33 - 10
src/views/basicData/systemSettings/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <div>
+  <a-card size="small" :bordered="false" class="systemSettingsList-wrap" :style="{height:conHeight+'px'}">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-card>
+      <div ref="contentBox">
         <a-row :gutter="16">
           <a-col class="gutter-row" :span="12">
             销售下单时,是否显示产品库存为0的产品信息
@@ -17,8 +17,7 @@
             </a-radio-group>
           </a-col>
         </a-row>
-      </a-card>
-      <a-card>
+
         <a-row :gutter="16">
           <a-col class="gutter-row" :span="12">
             销售下单时,是否显示废品仓的产品信息
@@ -34,8 +33,7 @@
             </a-radio-group>
           </a-col>
         </a-row>
-      </a-card>
-      <a-card>
+
         <a-row :gutter="16">
           <a-col class="gutter-row" :span="12">
             库存预警,是否包含废品库数量
@@ -51,9 +49,9 @@
             </a-radio-group>
           </a-col>
         </a-row>
-      </a-card>
+      </div>
     </a-spin>
-  </div>
+  </a-card>
 </template>
 
 <script>
@@ -66,7 +64,8 @@ export default {
       spinning: false,
       qtyValue: 1,
       wasteInfoValue: 1,
-      wasteNumValue: 1
+      wasteNumValue: 1,
+      conHeight: '100%'
     }
   },
   methods: {
@@ -92,21 +91,45 @@ export default {
         this.spinning = false
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      this.conHeight = window.innerHeight - 110.5
+    },
     handleQty () {},
     handleWasteInfo () {},
     handleWasteNum () {}
   },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   mounted () {
-    this.spinning = true
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
       // this.getData()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       // this.getData()
     }
   }
 }
 </script>
+<style lang="less" scoped>
+  .systemSettingsList-wrap{
+    .ant-row{
+      padding:23px 10px;
+      border-bottom: 1px solid #e0e0e0;
+    }
+  }
+
+</style>

+ 3 - 0
src/views/productManagement/productInfo/list.vue

@@ -74,6 +74,9 @@
         </a-dropdown>
         <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
       </div>
+      <a-alert type="info" style="margin-bottom:10px">
+        <div class="ftext" slot="message">注意:产品被禁用后,不能再销售。</div>
+      </a-alert>
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"