chenrui 2 anni fa
parent
commit
f9ec84be24
1 ha cambiato i file con 88 aggiunte e 59 eliminazioni
  1. 88 59
      src/views/salesManagement/salesQuery/edit.vue

+ 88 - 59
src/views/salesManagement/salesQuery/edit.vue

@@ -47,60 +47,64 @@
           </div>
         </a-alert>
         <!-- 筛选条件 -->
-        <a-row :gutter="15">
-          <a-col :span="24">
-            <div class="table-page-search-wrapper" style="position: relative;width: 100%;">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="5" :sm="24">
-                    <a-form-item label="出库仓库" prop="warehouseSn">
-                      <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="5" :sm="24">
-                    <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="5" :sm="24">
-                    <a-form-item label="产品名称" prop="productName">
-                      <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="3" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
-                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
-                  </a-col>
-                  <a-col :md="6" :sm="24" style="text-align: right;">
-                    <span>已选{{ selectTotal }}项</span>
-                    <a-dropdown>
-                      <a-menu slot="overlay" @click="handleMenuClick">
-                        <a-menu-item key="0">
-                          仓库设置
-                        </a-menu-item>
-                        <a-menu-item key="1">
-                          删除已选项
-                        </a-menu-item>
-                        <a-menu-item key="2">
-                          全部删除
-                        </a-menu-item>
-                      </a-menu>
-                      <a-button
-                        style="margin:0 15px;"
-                        type="primary"
-                        ghost
-                        id="salesEdit-plDel-btn"> 批量操作 <a-icon type="down" /> </a-button>
-                    </a-dropdown>
-                    <a-button
-                      type="default"
-                      id="salesEdit-import-btn"
-                      @click="openGuideModal=true">导入产品</a-button>
-                  </a-col>
-                </a-row>
-              </a-form>
-            </div>
-          </a-col>
-        </a-row>
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="出库仓库" prop="warehouseSn">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
+                  <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="品牌">
+                  <ProductBrand id="salesEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="salesEdit-productType"></productTypeAll>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
+              </a-col>
+              <a-col :md="12" :sm="24" style="text-align:right;">
+                <span>已选{{ selectTotal }}项</span>
+                <a-dropdown>
+                  <a-menu slot="overlay" @click="handleMenuClick">
+                    <a-menu-item key="0">
+                      仓库设置
+                    </a-menu-item>
+                    <a-menu-item key="1">
+                      删除已选项
+                    </a-menu-item>
+                    <a-menu-item key="2">
+                      全部删除
+                    </a-menu-item>
+                  </a-menu>
+                  <a-button
+                    style="margin:0 15px;"
+                    type="primary"
+                    ghost> 批量操作 <a-icon type="down" /> </a-button>
+                </a-dropdown>
+                <a-button
+                  type="default"
+                  @click="openGuideModal=true">导入产品</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
         <!-- 已选配件列表 -->
         <s-table
           class="sTable"
@@ -236,12 +240,24 @@ import ImportGuideModal from './importGuideModal.vue'
 import setWarehouse from './setWarehouse.vue'
 import setPriceModal from './setPriceModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
 import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll, submitCheck, updateBatch, updateWarehouse } from '@/api/sales'
 import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
 export default {
   name: 'SalesEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, queryPart, queryPromotable, ChooseActive, ImportGuideModal, chooseWarehouse, setWarehouse, setPriceModal },
+  components: { STable,
+    VSelect,
+    queryPart,
+    queryPromotable,
+    ChooseActive,
+    ImportGuideModal,
+    chooseWarehouse,
+    setWarehouse,
+    setPriceModal,
+    ProductBrand,
+    productTypeAll },
   data () {
     return {
       spinning: false,
@@ -285,8 +301,13 @@ export default {
       queryParam: {
         warehouseSn: undefined,
         productCode: '',
-        productName: ''
+        productName: '',
+        productBrandSn: undefined,
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
       },
+      productType: [],
       rowSelectionInfo: null,
       priceUpdateModal: false, // 价格更新弹窗
       updataData: {
@@ -357,6 +378,12 @@ export default {
         _this.spinning = false
       })
     },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
     // 选择仓库
     handleWarehouse (val) {
       this.warehouseSn = val
@@ -481,6 +508,11 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.warehouseSn = undefined
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
       this.$refs.table.refresh(!!flag)
       this.getPromoacActiveList()
       this.getOrderDetail(false)
@@ -790,9 +822,6 @@ export default {
         }
       }
     }
-    .redBg-row{
-      background-color: #f5cdc8;
-    }
   }
 
 </style>