doum
6 小时以前 89e9a42d48aca43ab3ed0aa2f111ff83626cd2e5
admin/src/components/business/OperaCouponGoodsWindow.vue
@@ -7,7 +7,7 @@
  >
    <TableLayout>
      <!-- 搜索表单 -->
      <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" style="display: block;" >
      <el-form ref="searchForm" slot="search-form" id="curSearchForm" :model="searchForm" label-width="100px" style="display: block;" >
        <el-form-item label="" prop="name" label-width="5px" style="display: inline-block;margin-right: 30px;">
          <el-input v-model="searchForm.name" style="width: 150px;" placeholder="商品名称" clearable @keypress.enter.native="search"></el-input>
        </el-form-item>
@@ -28,14 +28,14 @@
      </el-form>
      <!-- 表格和分页 -->
      <template v-slot:table-wrap>
        <div :style="'display: flex;height:'+tabelHeight+'px;'">
        <div :style="'display: flex;height:'+tableHeight+'px;'">
          <div style="flex: 6;">
            <ul class="toolbar">
              <li><el-button type="primary"  icon="el-icon-plus"  @click="addAll()" :disabled="!(tableData.selectedRows &&  tableData.selectedRows.length)">批量添加</el-button></li>
            </ul>
          <el-table
              ref="singleTable"
              :height="tabelHeight-80"
              :height="tableHeight-80"
              v-loading="isWorking.search"
              :data="tableData.list"
              stripe
@@ -73,7 +73,7 @@
                <div style="flex: 6"> <span>已选择<i class="blue" style="margin: 0 10px">{{selectGoods.length||0}}</i>件商品</span></div>
                <div style="flex: 1;text-align: right"> <el-button size="mini" type="danger" class="blue" @click="cleanAll">清空</el-button></div>
              </div>
              <div :style="`display: flex;flex-direction: column;max-height: ${tabelHeight-80}px;overflow: auto`">
              <div :style="`display: flex;flex-direction: column;max-height: ${tableHeight-80}px;overflow: auto`">
                <div  v-for="(item,index) in selectGoods" style="display: flex;margin: 10px 0;" :key="'selGoods'+item.id">
                  <div style="flex: 6">{{item.name}}<br><span class="red">¥{{item.skuPrice || 0}}</span></div>
                  <div style="flex: 1;text-align: right;">
@@ -128,11 +128,17 @@
      .then(res => {
        this.brands = res
      })
    window.addEventListener('resize', () => {
      this.handleResize()
    })
    this.handleResize()
  },
  methods: {
    handleResize(){
      this.tabelHeight = window.innerHeight - 300
    handleResize () {
      this.tableHeight = window.innerHeight - 260
      if (document.getElementById('curSearchForm')) {
        this.tableHeight = this.tableHeight - document.getElementById('curSearchForm').clientHeight
      }
    },
    checkSelectable (row) {
      return row.tabStatus !== 2