lilei 6 tháng trước cách đây
mục cha
commit
e66ec97cf1
1 tập tin đã thay đổi với 125 bổ sung118 xóa
  1. 125 118
      src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

+ 125 - 118
src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

@@ -1,134 +1,133 @@
 <template>
-  <div>
-    <!-- 筛选条件 -->
-    <div class="table-page-search-wrapper" style="margin:0" v-show="showSearchBox">
-      <a-form layout="inline" @keyup.enter.native="searchProduct">
-        <a-row :gutter="15" type="flex">
-          <a-col flex="1">
-            <a-form-item label="出库仓库" prop="warehouseSn">
-              <chooseWarehouse
-                style="width:100%;"
-                :id="'salesEdit-warehouseSn-'+id"
-                ref="warehouse"
-                v-model="queryParam.warehouseSn"
-                @load="warehouseLoad"></chooseWarehouse>
-            </a-form-item>
-          </a-col>
-          <a-col flex="1">
-            <a-form-item label="产品编码" prop="productCode">
-              <a-input
-                style="width:100%;"
-                :id="'salesEdit-productCode-'+id"
-                v-model.trim="queryParam.productCode"
-                placeholder="请输入产品编码"
-                allowClear />
-            </a-form-item>
-          </a-col>
-          <a-col flex="1">
-            <a-form-item label="产品名称" prop="productName">
-              <a-input
-                style="width:100%;"
-                :id="'salesEdit-productName-'+id"
-                v-model.trim="queryParam.productName"
-                placeholder="请输入产品名称"
-                allowClear />
-            </a-form-item>
-          </a-col>
-          <a-col flex="1">
-            <a-form-item label="品牌">
-              <ProductBrand :id="'salesEdit-productBrandSn-'+id" v-model="queryParam.productBrandSn"></ProductBrand>
-            </a-form-item>
-          </a-col>
-          <a-col flex="1">
-            <a-form-item label="产品分类">
-              <productTypeAll
-                style="width:100%;"
-                :id="'salesEdit-productType-'+id"
-                size="small"
-                placeholder="请选择产品分类"
-                @change="changeProductType"
-                v-model="productType"></productTypeAll>
-            </a-form-item>
-          </a-col>
-          <a-col flex="1">
-            <a-form-item label="满足起订量">
-              <v-select code="FLAG" v-model="queryParam.unitFlag" allowClear placeholder="请选择是否满足起订量"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col flex="1">
-            <a-form-item label="累计产品">
-              <v-select code="FLAG" v-model="queryParam.borrowFlag" allowClear placeholder="请选择是否累计产品"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col flex="2" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="searchProduct" :disabled="disabled" :id="'salesEdit-refresh-'+id">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" :id="'salesEdit-reset-'+id">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
+  <div style="position: relative;">
+    <!-- 已选配件列表 -->
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 筛选条件 -->
+      <div class="table-page-search-wrapper" style="margin:0" v-show="showSearchBox">
+        <a-form layout="inline" @keyup.enter.native="searchProduct">
+          <a-row :gutter="15" type="flex">
+            <a-col flex="1">
+              <a-form-item label="出库仓库" prop="warehouseSn">
+                <chooseWarehouse
+                  style="width:100%;"
+                  :id="'salesEdit-warehouseSn-'+id"
+                  ref="warehouse"
+                  v-model="queryParam.warehouseSn"
+                  @load="warehouseLoad"></chooseWarehouse>
+              </a-form-item>
+            </a-col>
+            <a-col flex="1">
+              <a-form-item label="产品编码" prop="productCode">
+                <a-input
+                  style="width:100%;"
+                  :id="'salesEdit-productCode-'+id"
+                  v-model.trim="queryParam.productCode"
+                  placeholder="请输入产品编码"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col flex="1">
+              <a-form-item label="产品名称" prop="productName">
+                <a-input
+                  style="width:100%;"
+                  :id="'salesEdit-productName-'+id"
+                  v-model.trim="queryParam.productName"
+                  placeholder="请输入产品名称"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col flex="1">
+              <a-form-item label="品牌">
+                <ProductBrand :id="'salesEdit-productBrandSn-'+id" v-model="queryParam.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col flex="1">
+              <a-form-item label="产品分类">
+                <productTypeAll
+                  style="width:100%;"
+                  :id="'salesEdit-productType-'+id"
+                  size="small"
+                  placeholder="请选择产品分类"
+                  @change="changeProductType"
+                  v-model="productType"></productTypeAll>
+              </a-form-item>
+            </a-col>
+            <a-col flex="1">
+              <a-form-item label="满足起订量">
+                <v-select code="FLAG" v-model="queryParam.unitFlag" allowClear placeholder="请选择是否满足起订量"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col flex="1">
+              <a-form-item label="累计产品">
+                <v-select code="FLAG" v-model="queryParam.borrowFlag" allowClear placeholder="请选择是否累计产品"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col flex="2" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="searchProduct" :disabled="disabled" :id="'salesEdit-refresh-'+id">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" :id="'salesEdit-reset-'+id">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
 
-    <div class="table-page-search-wrapper">
-      <a-row :gutter="15" type="flex" justify="space-between" align="middle">
-        <a-col :md="8" :sm="24" style="text-align:left;">
-          <a-dropdown>
-            <a-menu slot="overlay" @click="handleMenuClick" :id="'salesEdit-menu-'+id">
-              <!-- <a-menu-item key="3" :id="'salesEdit-menu-3-'+id">
+      <div class="table-page-search-wrapper">
+        <a-row :gutter="15" type="flex" justify="space-between" align="middle">
+          <a-col :md="8" :sm="24" style="text-align:left;">
+            <a-dropdown>
+              <a-menu slot="overlay" @click="handleMenuClick" :id="'salesEdit-menu-'+id">
+                <!-- <a-menu-item key="3" :id="'salesEdit-menu-3-'+id">
                 全部仓库设置
               </a-menu-item>
               <a-menu-item key="2" :id="'salesEdit-menu-2-'+id">
                 全部删除
               </a-menu-item>
               <a-menu-divider /> -->
-              <a-menu-item key="0" :id="'salesEdit-menu-0-'+id">
-                部分仓库设置
-              </a-menu-item>
-              <a-menu-item key="1" :id="'salesEdit-menu-1-'+id">
-                删除已选项
-              </a-menu-item>
-              <a-menu-item key="4" :id="'salesEdit-menu-4-'+id">
-                批量取消促销
-              </a-menu-item>
-            </a-menu>
+                <a-menu-item key="0" :id="'salesEdit-menu-0-'+id">
+                  部分仓库设置
+                </a-menu-item>
+                <a-menu-item key="1" :id="'salesEdit-menu-1-'+id">
+                  删除已选项
+                </a-menu-item>
+                <a-menu-item key="4" :id="'salesEdit-menu-4-'+id">
+                  批量取消促销
+                </a-menu-item>
+              </a-menu>
+              <a-button
+                :id="'salesEdit-plaction-'+id"
+                type="default"
+                class="button-info"
+                size="small"
+              >批量操作<a-icon type="down" /> </a-button>
+            </a-dropdown>
+            <span v-if="selectTotal" style="margin:0 10px;">已选 {{ selectTotal }} 项</span>
+          </a-col>
+          <a-col :md="12" :sm="24" style="text-align:right;">
+            <a-button
+              :id="'salesEdit-searchBox-'+id"
+              type="link"
+              class="button-info"
+              @click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
             <a-button
-              :id="'salesEdit-plaction-'+id"
-              type="default"
+              :id="'salesEdit-allSetWare-'+id"
+              type="link"
               class="button-info"
               size="small"
-            >批量操作<a-icon type="down" /> </a-button>
-          </a-dropdown>
-          <span v-if="selectTotal" style="margin:0 10px;">已选 {{ selectTotal }} 项</span>
-        </a-col>
-        <a-col :md="12" :sm="24" style="text-align:right;">
-          <a-button
-            :id="'salesEdit-searchBox-'+id"
-            type="link"
-            class="button-info"
-            @click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
-          <a-button
-            :id="'salesEdit-allSetWare-'+id"
-            type="link"
-            class="button-info"
-            size="small"
-            style="margin-right:10px;"
-            @click="handleMenuClick({key:3})"
-          ><a-icon type="setting"/> 全部仓库设置</a-button>
-          <a-button
-            :id="'salesEdit-allDel-'+id"
-            type="link"
-            class="button-error"
-            size="small"
-            @click="handleMenuClick({key:2})"
-          ><a-icon type="delete"/> 全部删除</a-button>
-        </a-col>
-      </a-row>
-    </div>
+              style="margin-right:10px;"
+              @click="handleMenuClick({key:3})"
+            ><a-icon type="setting"/> 全部仓库设置</a-button>
+            <a-button
+              :id="'salesEdit-allDel-'+id"
+              type="link"
+              class="button-error"
+              size="small"
+              @click="handleMenuClick({key:2})"
+            ><a-icon type="delete"/> 全部删除</a-button>
+          </a-col>
+        </a-row>
+      </div>
 
-    <!-- 已选配件列表 -->
-    <a-spin :spinning="spinning" tip="Loading...">
       <ve-table
         style="width:100%"
-        v-show="dataSource.length>0"
         border-y
         border-x
         border-around
@@ -260,6 +259,7 @@ export default {
     },
     tableHeight () {
       const len = this.dataSource.length
+      if (len == 0) return 300
       return len <= 10 ? ((len + 1) * 35) + 'px' : '350px'
     },
     // 表格复选框设置
@@ -716,7 +716,7 @@ export default {
     handleBatchDelAll () {
       const _this = this
       if (_this.dataSource.length == 0) {
-        _this.$message.warning('暂无可删除的已选产品!')
+        _this.$message.warning('暂无可删除的产品!')
         return
       }
       this.$confirm({
@@ -822,6 +822,10 @@ export default {
         this.handleBatchDel()
       } else if (e.key == 3) { // 全部仓库设置
         _this.clearTableSelect()
+        if (_this.dataSource.length == 0) {
+          _this.$message.warning('暂无可设置的产品!')
+          return
+        }
         _this.warehouseTit = '全部仓库设置'
         _this.openWarehouseModal = true
       } else if (e.key == 4) { // 批量取消促销
@@ -915,6 +919,9 @@ export default {
       color: #999;
       text-align: center;
       padding: 20px;
+      position: absolute;
+      bottom: 50px;
+      width: 100%;
   }
    .ant-input-number-sm input{
     text-align: center;