Переглянути джерело

修改列表品牌筛选条件

zhangdan 3 роки тому
батько
коміт
13c5e27d88

+ 4 - 16
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -23,16 +23,8 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="inventoryQueryList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="inventoryQueryList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                  </a-form-item>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -129,9 +121,10 @@ import exportExcelModal from './exportExcelModal.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { hdExportExcel } from '@/libs/exportExcel'
+import ProductBrand from '@/views/common/productBrand.js'
 import { stockList, stockCount, stockExport } from '@/api/stock'
 export default {
-  components: { STable, VSelect, inventoryQueryDetailModal, exportExcelModal },
+  components: { STable, VSelect, inventoryQueryDetailModal, exportExcelModal,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -301,11 +294,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 3 - 16
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -23,16 +23,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="inventoryWarningList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="inventoryWarningList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -169,8 +160,9 @@ import { STable, VSelect } from '@/components'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stock'
+import ProductBrand from '@/views/common/productBrand.js'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -383,11 +375,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 3 - 16
src/views/productManagement/newProduct/list.vue

@@ -23,16 +23,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="productInfoList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+					<ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -110,9 +101,10 @@ import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQueryAll } from '@/api/productType'
 import { queryNewProductPage } from '@/api/product'
 import { STable, VSelect } from '@/components'
+import ProductBrand from '@/views/common/productBrand.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -186,11 +178,6 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  详情
     handleDetail (row) {
       this.itemId = row.productSn

+ 3 - 16
src/views/productManagement/priceChangeRecord/list.vue

@@ -23,16 +23,7 @@
             <template v-if="advanced">
               <a-col :md="7" :sm="24">
                 <a-form-item label="品牌">
-                  <a-select
-                    placeholder="请选择"
-                    id="productChangeRecordList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="productChangeRecordList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -123,9 +114,10 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { productPriceChangeList, productPriceChangeExport } from '@/api/product'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -249,11 +241,6 @@ export default {
       this.itemId = row.id
       this.openAuditModal = true
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  编辑
     handleEdit (row) {
       this.itemId = row.id

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

@@ -17,16 +17,7 @@
             </a-col>
             <a-col :md="5" :sm="24">
               <a-form-item label="品牌">
-                <a-select
-                  placeholder="请选择"
-                  id="productInfoList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+                <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -198,9 +189,10 @@ import productInfoDetailModal from './detailModal.vue'
 import productInfoOfflineModal from './offlineModal.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQueryAll } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport } from '@/api/product'
 export default {
-  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal },
+  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -492,11 +484,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  详情
     handleDetail (row) {
       this.itemSn = row.productSn

+ 3 - 16
src/views/productManagement/productLevel/list.vue

@@ -31,16 +31,7 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="品牌">
-                <a-select
-                  placeholder="请选择"
-                  id="productLevelList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+                <ProductBrand id="productLevelList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -105,9 +96,10 @@ import { STable, VSelect } from '@/components'
 import productLevelEditModal from './editModal.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { productLevelList } from '@/api/product'
 export default {
-  components: { STable, VSelect, productLevelEditModal },
+  components: { STable, VSelect, productLevelEditModal,ProductBrand },
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
@@ -175,11 +167,6 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  编辑
     handleEdit (row) {
       this.nowData = row

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

@@ -29,16 +29,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="品牌">
-                  <a-select
-                    placeholder="请选择"
-                    id="productOfflineAuditList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="productOfflineAuditList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -122,9 +113,10 @@
 import { STable, VSelect } from '@/components'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { productOfflineList, productOfflineAudit, productBatchOfflineAudit } from '@/api/product'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -193,11 +185,6 @@ export default {
     }
   },
   methods: {
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  重置
     resetSearchForm () {
       this.queryParam.name = ''

+ 3 - 15
src/views/productManagement/productPricing/list.vue

@@ -17,15 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="品牌">
-                <a-select
-                  placeholder="请选择"
-                  id="productPricingList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                 <ProductBrand id="productPricingList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -122,8 +114,9 @@ import productPricingAuditModal from './auditModal.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { productPricingList } from '@/api/product'
+import ProductBrand from '@/views/common/productBrand.js'
 export default {
-  components: { STable, VSelect, productPricingEditModal, productPricingAuditModal },
+  components: { STable, VSelect, productPricingEditModal, productPricingAuditModal,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -200,11 +193,6 @@ export default {
       this.itemSn = row.productSn
       this.openAuditModal = true
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  编辑
     handleEdit (row) {
       this.itemSn = row.productSn

+ 3 - 16
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -37,16 +37,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="productStatisticsList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="productStatisticsList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
             </template>
@@ -105,9 +96,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import productStatisticsDetailModal from './detailModal.vue'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { salesDetailPromoList, salesDetailPromoCount } from '@/api/salesDetail'
 export default {
-  components: { STable, VSelect, productStatisticsDetailModal, rangeDate },
+  components: { STable, VSelect, productStatisticsDetailModal, rangeDate,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -231,11 +223,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 3 - 16
src/views/reportData/allocationDetails/list.vue

@@ -32,16 +32,7 @@
             <template v-if="advanced">
               <a-col :md="7" :sm="24">
                 <a-form-model-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择"
-                    id="allocationDetailsList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="allocationDetailsList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -176,10 +167,11 @@ import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { getArea } from '@/api/data'
 import { allocateTypeAllList } from '@/api/allocateType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { userQueryList } from '@/api/power-user'
 import { allocateReportDetailList, allocateReportDetailCount, allocateReportDetailExport } from '@/api/allocateReport'
 export default {
-  components: { STable, VSelect, rangeDate, subarea },
+  components: { STable, VSelect, rangeDate, subarea,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -378,11 +370,6 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''

+ 3 - 11
src/views/reportData/salesReturnDetailReport/list.vue

@@ -56,16 +56,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择"
-                    id="salesReturnDetailList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="salesReturnDetailList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -198,9 +189,10 @@ import custList from '@/views/common/custList.vue'
 import { getArea } from '@/api/data'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
 import { reportSalesReturnDetailList, reportSalesReturnDetailCount, reportSalesReturnDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDateTime, custList, subarea },
+  components: { STable, VSelect, rangeDateTime, custList, subarea,ProductBrand },
   data () {
     return {
       spinning: false,

+ 3 - 16
src/views/salesManagement/priceInquiry/list.vue

@@ -31,16 +31,7 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="priceInquiryList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+                <ProductBrand id="priceInquiryList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -93,8 +84,9 @@ import { STable, VSelect } from '@/components'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import { productPriceList } from '@/api/product'
+import ProductBrand from '@/views/common/productBrand.js'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect,ProductBrand },
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
@@ -165,11 +157,6 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''

+ 3 - 16
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -56,16 +56,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="品牌">
-                  <a-select
-                    placeholder="请选择"
-                    id="shortageStatisticsCList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
+                  <ProductBrand id="shortageStatisticsCList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -160,9 +151,10 @@ import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
 import { productTypeQuery } from '@/api/productType'
 import { productBrandQuery } from '@/api/productBrand'
+import ProductBrand from '@/views/common/productBrand.js'
 import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
 export default {
-  components: { STable, VSelect, custList, subarea, rangeDate },
+  components: { STable, VSelect, custList, subarea, rangeDate,ProductBrand },
   data () {
     return {
       spinning: false,
@@ -358,11 +350,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  省/市/区
     getArea (leve, sn) {
       let params