lilei преди 3 години
родител
ревизия
d09a4d6b2e

+ 7 - 6
src/views/productManagement/priceChangeRecord/list.vue

@@ -70,9 +70,9 @@
         </a-form>
       </div>
       <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
+      <!-- <a-alert type="info" showIcon style="margin-bottom:15px">
         <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-      </a-alert>
+      </a-alert> -->
       <!-- 列表 -->
       <s-table
         class="sTable"
@@ -132,7 +132,6 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: getDate.getThreeMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
@@ -213,9 +212,6 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 430
-        }
         return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -232,6 +228,11 @@ export default {
       productTypeList: [] //  分类下拉数据
     }
   },
+  computed: {
+    tableHeight () {
+      return window.innerHeight - (this.advanced ? 425 : 370)
+    }
+  },
   methods: {
     //  创建时间  change
     dateChange (date) {

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

@@ -207,7 +207,6 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -243,9 +242,6 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         return productList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -265,6 +261,9 @@ export default {
     }
   },
   computed: {
+    tableHeight () {
+      return window.innerHeight - (this.advanced ? 425 : 370)
+    },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     },

+ 1 - 1
src/views/productManagement/productLaunchAudit/list.vue

@@ -103,7 +103,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
+          this.tableHeight = window.innerHeight - 370
         }
         return productOnlineList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data

+ 10 - 9
src/views/productManagement/productLevel/list.vue

@@ -61,10 +61,10 @@
       </a-form>
     </div>
     <!-- 操作按钮 -->
-    <div class="table-operator">
-      <!-- <a-button style="margin: 0 0 18px 0" id="productLevelList-import" type="primary" @click="handleImport">导入</a-button> -->
-      <!-- <a-button style="margin: 0 0 18px 8px" id="productLevelList-export" type="danger" @click="handleExport" :loading="exportLoading">导出</a-button> -->
-    </div>
+    <!-- <div class="table-operator">
+      <a-button style="margin: 0 0 18px 0" id="productLevelList-import" type="primary" @click="handleImport">导入</a-button>
+      <a-button style="margin: 0 0 18px 8px" id="productLevelList-export" type="danger" @click="handleExport" :loading="exportLoading">导出</a-button>
+    </div> -->
     <!-- 列表 -->
     <s-table
       class="sTable"
@@ -73,7 +73,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1590 }"
+      :scroll="{ x: 1590, y: tableHeight }"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">
@@ -109,7 +109,6 @@ export default {
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -137,9 +136,6 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         return productLevelList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -161,6 +157,11 @@ export default {
       nowData: null
     }
   },
+  computed: {
+    tableHeight () {
+      return window.innerHeight - (this.advanced ? 380 : 320)
+    }
+  },
   methods: {
     //  重置
     resetSearchForm () {

+ 3 - 4
src/views/productManagement/productOfflineAudit/list.vue

@@ -138,7 +138,6 @@ export default {
         state: undefined //  状态
       },
       productType: [],
-      tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -159,9 +158,6 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         return productOfflineList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           this.disabled = false
@@ -173,6 +169,9 @@ export default {
     }
   },
   computed: {
+    tableHeight () {
+      return window.innerHeight - (this.advanced ? 425 : 370)
+    },
     hasSelected () {
       return this.selectedRowKeys.length > 0
     },

+ 14 - 7
src/views/productManagement/productPricing/list.vue

@@ -61,9 +61,9 @@
       </a-form>
     </div>
     <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
+    <!-- <a-alert type="info" showIcon style="margin-bottom:15px">
       <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-    </a-alert>
+    </a-alert> -->
     <!-- 列表 -->
     <s-table
       class="sTable"
@@ -102,7 +102,13 @@
           class="button-warning"
           @click="handleAudit(record)"
           id="productPricingList-audit-btn">审核</a-button>
-        <a-button size="small" type="link" v-if="$hasPermissions('B_productPricing_edit')" class="button-info" @click="handleEdit(record)" id="productPricingList-edit-btn">编辑</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="$hasPermissions('B_productPricing_edit')"
+          class="button-info"
+          @click="handleEdit(record)"
+          id="productPricingList-edit-btn">编辑</a-button>
         <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
       </template>
     </s-table>
@@ -125,7 +131,6 @@ export default {
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
       queryParam: { //  查询条件
         name: '', //  产品名称
         queryWord: '', // 产品编码/原厂编码
@@ -158,9 +163,6 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         return productPricingList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -180,6 +182,11 @@ export default {
       productTypeList: [] //  分类下拉数据
     }
   },
+  computed: {
+    tableHeight () {
+      return window.innerHeight - (this.advanced ? 375 : 320)
+    }
+  },
   methods: {
     //  重置
     resetSearchForm () {

+ 6 - 5
src/views/productManagement/productUniversal/list.vue

@@ -55,7 +55,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1580 }"
+        :scroll="{ x: 1580, y: tableHeight }"
         bordered>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
@@ -98,7 +98,6 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
       queryParam: { //  查询条件
         productCode: '',
         productName: '',
@@ -123,9 +122,6 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         return productUniversalCodeList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -140,6 +136,11 @@ export default {
       itemId: '' //  当前id
     }
   },
+  computed: {
+    tableHeight () {
+      return window.innerHeight - (this.advanced ? 425 : 370)
+    }
+  },
   methods: {
     //  重置
     resetSearchForm () {