Pārlūkot izejas kodu

产品品牌 修改

lilei 3 gadi atpakaļ
vecāks
revīzija
ee73c0a59b

+ 9 - 52
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -37,32 +37,14 @@
                   </a-col>
                   <template v-if="advanced">
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品品牌">
-                        <a-select
-                          placeholder="请选择"
-                          id="chainTransferOutEdit-brandSn"
-                          allowClear
-                          v-model="queryParam.brandSn"
-                          :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>
-                      </a-form-item>
+                      <a-form-model-item label="产品品牌">
+                        <ProductBrand id="chainTransferOutEdit-brandSn" placeholder="请选择产品品牌" v-model="queryParam.brandSn"></ProductBrand>
+                      </a-form-model-item>
                     </a-col>
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品分类">
-                        <a-cascader
-                          @change="changeProductType"
-                          change-on-select
-                          v-model="productType"
-                          expand-trigger="hover"
-                          :options="productTypeList"
-                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                          id="chainTransferOutEdit-productType"
-                          placeholder="请选择产品分类"
-                          allowClear />
-                      </a-form-item>
+                      <a-form-model-item label="产品分类">
+                        <ProductType id="chainTransferOutEdit-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                      </a-form-model-item>
                     </a-col>
                     <a-col :md="6" :sm="24">
                       <a-form-item label="仓库">
@@ -197,14 +179,14 @@ import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
 import { productQuery } from '@/api/allocWarehouse'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'AllocLinkageOutEdit',
-  components: { STable, VSelect, Print },
+  components: { STable, VSelect, Print, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -219,8 +201,6 @@ export default {
         productTypeSn2: undefined,
         productTypeSn3: undefined
       },
-      productBrandList: [], //  产品品牌  下拉数据
-      productTypeList: [], //  产品分类  下拉数据
       productType: [],
       warehouseList: [], //  仓库  下拉数据
       disabled: false, //  查询、重置按钮是否可操作
@@ -339,8 +319,6 @@ export default {
         if (res.status == 200) {
           this.basicInfoData = res.data
           this.$refs.table.refresh(true)
-          this.getProductBrand()
-          this.getProductType()
         } else {
           this.basicInfoData = null
         }
@@ -455,27 +433,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      // sysFlag为1查询箭冠产品,为0查询非箭冠产品
-      dealerProductBrandQuery({ sysFlag: this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0' }).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({ sysFlag: this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0' }).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     // 仓库下拉数据
     getWarehouseList (type) {
       warehouseAllList({}).then(res => {

+ 9 - 55
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -40,32 +40,14 @@
                   </a-col>
                   <template v-if="advanced">
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品分类">
-                        <a-cascader
-                          @change="changeProductType"
-                          change-on-select
-                          v-model="productType"
-                          expand-trigger="hover"
-                          :options="productTypeList"
-                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                          id="storeTransferOutEdit-productType"
-                          placeholder="请选择产品分类"
-                          allowClear />
-                      </a-form-item>
+                      <a-form-model-item label="产品品牌">
+                        <ProductBrand id="storeTransferOutEdit-brandSn" placeholder="请选择产品品牌" v-model="queryParam.brandSn"></ProductBrand>
+                      </a-form-model-item>
                     </a-col>
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品品牌">
-                        <a-select
-                          placeholder="请选择产品品牌"
-                          id="storeTransferOutEdit-brandSn"
-                          allowClear
-                          v-model="queryParam.brandSn"
-                          :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>
-                      </a-form-item>
+                      <a-form-model-item label="产品分类">
+                        <ProductType id="storeTransferOutEdit-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                      </a-form-model-item>
                     </a-col>
                   </template>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -197,15 +179,15 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { storeCallOutDetailList, storeCallOutDetail, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
 import { productQuery } from '@/api/allocWarehouse'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'StoreCallOutEdit',
-  components: { STable, VSelect, Print },
+  components: { STable, VSelect, Print, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -445,27 +427,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      // sysFlag不传,此处应查询所有产品
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     // 仓库下拉数据
     getWarehouseList (type) {
       warehouseAllList({}).then(res => {
@@ -476,17 +437,10 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       this.printCostChecked = true
       this.getDetail()
       this.getWarehouseList()
-      this.getProductBrand()
-      this.getProductType()
       this.resetSearchForm()
       this.chooseResetSearchForm()
     }

+ 9 - 57
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -34,32 +34,14 @@
                   </a-col>
                   <template v-if="advanced">
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品品牌">
-                        <a-select
-                          placeholder="请选择产品品牌"
-                          id="warehouseAllocationEdit-brandSn"
-                          allowClear
-                          v-model="queryParam.brandSn"
-                          :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>
-                      </a-form-item>
+                      <a-form-model-item label="产品品牌">
+                        <ProductBrand id="warehouseAllocationEdit-brandSn" placeholder="请选择产品品牌" v-model="queryParam.brandSn"></ProductBrand>
+                      </a-form-model-item>
                     </a-col>
                     <a-col :md="6" :sm="24">
-                      <a-form-item label="产品分类">
-                        <a-cascader
-                          @change="changeProductType"
-                          change-on-select
-                          v-model="productType"
-                          expand-trigger="hover"
-                          :options="productTypeList"
-                          :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                          id="warehouseAllocationEdit-productType"
-                          placeholder="请选择产品分类"
-                          allowClear />
-                      </a-form-item>
+                      <a-form-model-item label="产品分类">
+                        <ProductType id="warehouseAllocationEdit-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                      </a-form-model-item>
                     </a-col>
                     <a-col :md="6" :sm="24">
                       <a-form-item label="调出仓位" prop="warehouseLocationSn">
@@ -237,12 +219,12 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { allocWarehouseDetailList, allocWarehouseDetail, updatePutWhLocation, productQuery, allocWarehouseDetailCount, allocWarehouseDetailSave, allocWarehouseDetailDel, allocWarehouseSubmit } from '@/api/allocWarehouse'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { warehouseLocAllList } from '@/api/warehouse'
 export default {
   name: 'AllocWarehouseEdit',
-  components: { STable, VSelect },
+  components: { STable, VSelect, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -265,8 +247,6 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
-      productBrandList: [], //  产品品牌  下拉数据
-      productTypeList: [], //  产品分类  下拉数据
       productType: [],
       warehousePutLocData: [], //  调入仓位  下拉数据
       warehouseOutLocData: [], //  调出仓位  下拉数据
@@ -527,27 +507,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      // sysFlag不传,此处应查询所有产品
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     // 获取仓库仓位
     getWarehouseLoc (sn, type) {
       warehouseLocAllList({ warehouseSn: sn }).then(res => {
@@ -558,15 +517,8 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       this.chooseResetSearchForm()
-      this.getProductBrand()
-      this.getProductType()
       this.getDetail()
     }
   },

+ 1 - 1
src/views/common/productBrand.js

@@ -25,7 +25,7 @@ const ProductBrand = {
     },
     sysFlag: {
       type: [String,Number],
-      default: '1'
+      default: ''
     }
   },
   data() {

+ 10 - 53
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -22,31 +22,14 @@
                 </a-form-item>
               </a-col>
               <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 brandData" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
-                </a-form-item>
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="inventoryQueryList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    :options="typeData"
-                    expand-trigger="hover"
-                    change-on-select
-                    :field-names="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productTypeSn"
-                    @change="changeType" />
-                </a-form-item>
+                <a-form-model-item label="产品分类">
+                  <ProductType id="inventoryQueryList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeType" v-model="productTypeSn"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="滞销天数">
@@ -157,14 +140,14 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { stockList, stockCount, stockExport } from '@/api/stock'
-import { dealerProductTypeList } from '@/api/dealerProductType'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { STable, VSelect } from '@/components'
 import inventoryQueryDetailModal from './detailModal.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 export default {
   name: 'InventoryQueryList',
-  components: { STable, VSelect, inventoryQueryDetailModal },
+  components: { STable, VSelect, inventoryQueryDetailModal, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -187,8 +170,6 @@ export default {
       productTypeSn: [],
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
-      brandData: [], //  产品品牌下拉数据
-      typeData: [], //  产品分类下拉数据
       zeroQtyData: [ //  库存情况
         { name: '库存数量为0', id: '1' },
         { name: '库存数量不为0', id: '0' }
@@ -234,14 +215,6 @@ export default {
               this.disabled = false
               // 总计
               this.getTotal(params)
-              // 产品分类
-              if (this.typeData.length == 0) {
-                this.getProductType()
-              }
-              // 产品品牌
-              if (this.brandData.length == 0) {
-                this.getProductBrand()
-              }
             }
             this.spinning = false
             return data
@@ -374,16 +347,10 @@ export default {
           })
           reader.readAsText(res)
         } else {
-		  downloadExcel(res, '库存查询')
+          downloadExcel(res, '库存查询')
         }
       })
     },
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        this.recursionFun(res.data)
-        this.typeData = res.data
-      })
-    },
     //  递归函数
     recursionFun (data) {
       if (data) {
@@ -407,16 +374,6 @@ export default {
         this.queryParam.productTypeSn3 = ''
       }
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.brandData = res.data
-        } else {
-          this.brandData = []
-        }
-      })
-    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 9 - 55
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -22,32 +22,14 @@
             </a-col>
             <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>
-                </a-form-item>
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="inventoryWarningList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="inventoryWarningList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
-                </a-form-item>
+                <a-form-model-item label="产品分类">
+                  <ProductType id="inventoryWarningList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="预警提示">
@@ -174,11 +156,11 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 export default {
   name: 'InventoryWarning',
-  components: { STable, VSelect },
+  components: { STable, VSelect, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -352,39 +334,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      // sysFlag不传,此处应查询所有产品
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getProductType()
-      this.getProductBrand()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 9 - 49
src/views/productManagement/newProduct/list.vue

@@ -22,32 +22,14 @@
             </a-col>
             <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>
-                </a-form-item>
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productInfoList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
-                </a-form-item>
+                <a-form-model-item label="产品分类">
+                  <ProductType id="productInfoList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="原厂编码">
@@ -107,14 +89,14 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { queryNewProductPage } from '@/api/product'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 export default {
   name: 'NewProductList',
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -208,33 +190,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getProductBrand()
-      this.getProductType()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 9 - 49
src/views/productManagement/productOnlineInfo/list.vue

@@ -22,32 +22,14 @@
             </a-col>
             <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>
-                </a-form-item>
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productInfoList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
-                </a-form-item>
+                <a-form-model-item label="产品分类">
+                  <ProductType id="productInfoList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="原厂编码">
@@ -109,13 +91,13 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { productTypeQuery } from '@/api/productType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { productList, productExport } from '@/api/product'
 export default {
   name: 'ProductJgOnlineList',
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -225,33 +207,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({ 'sysFlag': '1' }).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getProductBrand()
-      this.getProductType()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 5 - 47
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -46,30 +46,12 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="sendStorageReportList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productEntity.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="sendStorageReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="sendStorageReportList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
+                  <ProductType id="sendStorageReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -125,12 +107,12 @@
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { linkageReportPageList, linkageReportPageTotal, linkageGroupList, reportChainStockPutOutExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect },
+  components: { STable, VSelect, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -218,8 +200,6 @@ export default {
       },
       productType: [],
       linkageGroupData: [],
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       totalData: null // 合计
     }
   },
@@ -289,26 +269,6 @@ export default {
       this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -331,8 +291,6 @@ export default {
     },
     pageInit () {
       this.getLinkageGroup()
-      this.getProductBrand()
-      this.getProductType()
     }
   },
   mounted () {

+ 7 - 47
src/views/reportData/chainSalesDetailReport/list.vue

@@ -55,31 +55,13 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="chainSalesDetailReportList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productEntity.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>
-                </a-form-item>
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="chainSalesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="chainSalesDetailReportList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
+                  <ProductType id="chainSalesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -186,12 +168,12 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { settleStyleFindAllList } from '@/api/customer'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { warehouseCascadeList } from '@/api/warehouse'
 import { reportChainSalesBillDetailList, reportChainSalesBillDetailCount, linkageGroupList } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -365,32 +347,12 @@ export default {
         }
       })
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     // 连锁店
     getLinkageGroup () {
       linkageGroupList({}).then(res => {
@@ -485,8 +447,6 @@ export default {
       this.getArea('province')
       this.getCustTypeList()
       this.getSettleStyleList()
-      this.getProductBrand()
-      this.getProductType()
       this.getWarehouseCascade()
     }
   },

+ 7 - 49
src/views/reportData/chainStockReport/list.vue

@@ -46,30 +46,12 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="chainStockReportList-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="chainStockReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="chainStockReportList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
+                  <ProductType id="chainStockReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -158,14 +140,14 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import chainStockReportDetailModal from './detailModal.vue'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
 import { linkageGroupList } from '@/api/reportData'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { reportStockList, reportStockCount } from '@/api/reportStock'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { stockExport } from '@/api/stock'
 export default {
-  components: { STable, VSelect, chainStockReportDetailModal },
+  components: { STable, VSelect, chainStockReportDetailModal, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -208,7 +190,6 @@ export default {
         this.spinning = true
         if (params.tenantId) {
           if (this.checkValueRange()) {
-            console.log('====通过')
             return reportStockList(params).then(res => {
               let data
               if (res.status == 200) {
@@ -312,7 +293,6 @@ export default {
         days = '--'
       }
       return days
-      console.log(days, '天数')
     },
     // 合计
     getCount (params) {
@@ -346,8 +326,8 @@ export default {
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
-      this.queryParam.minUnsalableDays = undefined, // 滞销天数最小值
-      this.queryParam.maxUnsalableDays = undefined, // 滞销天数最大值
+      this.queryParam.minUnsalableDays = undefined // 滞销天数最小值
+      this.queryParam.maxUnsalableDays = undefined // 滞销天数最大值
       this.productType = []
       this.$refs.ruleForm.resetFields()
       this.totalData = null
@@ -402,26 +382,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -444,8 +404,6 @@ export default {
     },
     pageInit () {
       this.getLinkageGroup()
-      this.getProductBrand()
-      this.getProductType()
     }
   },
   mounted () {

+ 5 - 52
src/views/reportData/receivedSendStorageReport/list.vue

@@ -32,30 +32,12 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="receivedSendStorageReportList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productEntity.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="receivedSendStorageReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="receivedSendStorageReportList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
+                  <ProductType id="receivedSendStorageReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -110,13 +92,13 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { reportPageList, reportStockPutOutCount, reportStockPutOutExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -201,8 +183,6 @@ export default {
         }
       },
       productType: [],
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       totalData: {} // 合计
     }
   },
@@ -275,34 +255,7 @@ export default {
       this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
-      this.getProductBrand()
-      this.getProductType()
     }
   },
   mounted () {

+ 5 - 47
src/views/reportData/salesDetailReport/list.vue

@@ -42,30 +42,12 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="salesDetailReportList-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productEntity.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="salesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="salesDetailReportList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
+                  <ProductType id="salesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -182,12 +164,12 @@ import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { settleStyleFindAllList } from '@/api/customer'
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-import { dealerProductTypeList } from '@/api/dealerProductType'
 import { warehouseCascadeList } from '@/api/warehouse'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
   mixins: [commonMixin],
   data () {
     return {
@@ -270,9 +252,7 @@ export default {
       allocateTypeList: [], //  调拨类型
       custTypeList: [], //  客户类型 下拉数据
       settleStyleList: [], //  收款方式  下拉数据
-      productBrandList: [], //  品牌下拉数据
       productType: [],
-      productTypeList: [], //  分类下拉数据
       warehouseCascadeData: [] //  仓库仓位
     }
   },
@@ -377,32 +357,12 @@ export default {
         }
       })
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      dealerProductTypeList({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     //  仓库仓位  级联  列表
     getWarehouseCascade () {
       warehouseCascadeList({}).then(res => {
@@ -483,8 +443,6 @@ export default {
       this.getArea('province')
       this.getCustTypeList()
       this.getSettleStyleList()
-      this.getProductBrand()
-      this.getProductType()
       this.getWarehouseCascade()
     }
   },