Kaynağa Gözat

产品分类

lilei 2 yıl önce
ebeveyn
işleme
c649e161e6

+ 0 - 4
src/views/allocationManagement/transferOut/edit.vue

@@ -377,10 +377,6 @@ export default {
       loading: false,
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
-      productBrandList: [], //  产品品牌  下拉数据
-      productTypeList: [], //  产品分类  下拉数据
-      productType: [],
-      warehouseList: [], //  仓库  下拉数据
       departmentList: [], // 部门列表
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 0 - 4
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -272,10 +272,6 @@ export default {
       loading: false,
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
-      productBrandList: [], //  产品品牌  下拉数据
-      productTypeList: [], //  产品分类  下拉数据
-      productType: [],
-      warehouseList: [], //  仓库  下拉数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true

+ 0 - 1
src/views/dealerManagement/businessOwnerSettings/chooseBrandModal.vue

@@ -25,7 +25,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { bindRelation } from '@/api/dealerRelation'
 export default {
   name: 'ChooseClassifyModal',
   mixins: [commonMixin],

+ 0 - 1
src/views/dealerManagement/businessOwnerSettings/chooseClassifyModal.vue

@@ -25,7 +25,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { bindRelation } from '@/api/dealerRelation'
 export default {
   name: 'ChooseClassifyModal',
   mixins: [commonMixin],

+ 5 - 45
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -27,18 +27,9 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="inventoryQueryList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
-                </a-form-item>
+                <a-form-model-item label="产品分类">
+                  <ProductType id="inventoryQueryList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="库存情况">
@@ -117,15 +108,14 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import inventoryQueryDetailModal from './detailModal.vue'
 import exportExcelModal from './exportExcelModal.vue'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery } from '@/api/productType'
 import { hdExportExcel } from '@/libs/exportExcel'
+import ProductType from '../../common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import { stockList, stockCount, stockExport } from '@/api/stock'
 export default {
   name: 'InventoryQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, inventoryQueryDetailModal, exportExcelModal, ProductBrand },
+  components: { STable, VSelect, inventoryQueryDetailModal, exportExcelModal, ProductType, ProductBrand },
   data () {
     return {
       spinning: false,
@@ -144,8 +134,6 @@ export default {
       productType: [],
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       zeroQtyData: [ //  库存情况
         { name: '库存数量为0', id: '1' },
         { name: '库存数量不为0', id: '0' }
@@ -181,14 +169,6 @@ export default {
             this.spinning = false
             // 总计
             this.getTotal(params)
-            // 产品分类
-            if (this.productTypeList.length == 0) {
-              this.getProductType()
-            }
-            // 产品品牌
-            if (this.productBrandList.length == 0) {
-              this.getProductBrand()
-            }
           }
           return data
         })
@@ -282,26 +262,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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(() => { // 页面渲染完成后的回调

+ 6 - 40
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -27,18 +27,9 @@
                 </a-form-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="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="预警提示">
@@ -164,14 +155,13 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery } from '@/api/productType'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stock'
+import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 export default {
   name: 'InventoryWarningList',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand },
+  components: { STable, VSelect, ProductBrand, ProductType },
   data () {
     return {
       spinning: false,
@@ -189,8 +179,6 @@ export default {
       },
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
-      productBrandList: [], //  产品品牌下拉数据
-      productTypeList: [], //  产品类别下拉数据
       productType: [],
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -345,39 +333,17 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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.getProductType()
-      this.getProductBrand()
       this.rowSelectionInfo = null
       this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 240
     }
   },
   watch: {

+ 4 - 38
src/views/productManagement/priceChangeRecord/list.vue

@@ -28,16 +28,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productInfoList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <ProductType id="productChangeRecordList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-item>
               </a-col>
             </template>
@@ -113,14 +104,13 @@ import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 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 ProductType from '@/views/common/productType.js'
 import { productPriceChangeList, productPriceChangeExport } from '@/api/product'
 export default {
   name: 'PriceChangeRecordList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductBrand, ProductType },
   data () {
     return {
       spinning: false,
@@ -162,9 +152,7 @@ export default {
           return data
         })
       },
-      total: 0,
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  分类下拉数据
+      total: 0
     }
   },
   computed: {
@@ -310,33 +298,11 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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

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

@@ -23,16 +23,7 @@
             <template v-if="advanced">
               <a-col :md="4" :sm="24">
                 <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productInfoList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="productInfoList-productType"></productTypeAll>
                 </a-form-item>
               </a-col>
               <a-col :md="4" :sm="24">
@@ -221,9 +212,8 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 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 productTypeAll from '@/views/common/productTypeAll.js'
 import { exportExcel } from '@/libs/JGPrint.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import importGuideModal from './importGuideModal.vue'
@@ -231,7 +221,7 @@ import { productList, productAudit, productBatchAudit, productDel, productOnline
 export default {
   name: 'ProductInfoList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, rangeDate, importGuideModal },
+  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, productTypeAll, rangeDate, importGuideModal },
   data () {
     return {
       spinning: false,
@@ -294,8 +284,6 @@ export default {
       itemSn: '', //  当前sn
       openOfflineModal: false, //  下线  弹框
       offlineProductList: [], //  下线 当前所选数据
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       pageFromInfo: null,
       rowSelectionInfo: null
     }
@@ -565,33 +553,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQueryAll({}).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 - 37
src/views/productManagement/productLevel/list.vue

@@ -15,18 +15,9 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="产品分类">
-              <a-cascader
-                @change="changeProductType"
-                expand-trigger="hover"
-                change-on-select
-                :options="productTypeList"
-                :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                id="productLevelList-productType"
-                placeholder="请选择产品分类"
-                allowClear
-                v-model="productType" />
-            </a-form-item>
+            <a-form-model-item label="产品分类">
+              <ProductType id="productLevelList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+            </a-form-model-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
@@ -101,14 +92,13 @@ import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 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 ProductType from '@/views/common/productType.js'
 import { productLevelList } from '@/api/product'
 export default {
   name: 'ProductLevelList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productLevelEditModal, ProductBrand },
+  components: { STable, VSelect, productLevelEditModal, ProductBrand, ProductType },
   data () {
     return {
       advanced: true, // 高级搜索 展开/关闭
@@ -220,33 +210,11 @@ export default {
       document.body.appendChild(link)
       link.click()
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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 - 39
src/views/productManagement/productPricing/list.vue

@@ -22,18 +22,9 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productPricingList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
-                </a-form-item>
+                <a-form-model-item label="产品分类">
+                  <ProductType id="productPricingList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="定价状态">
@@ -143,15 +134,14 @@ import { STable, VSelect } from '@/components'
 import { exportExcel } from '@/libs/JGPrint.js'
 import productPricingEditModal from './editModal.vue'
 import productPricingAuditModal from './auditModal.vue'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery } from '@/api/productType'
 import { productPricingList, productExportPricing, batchAuditPrice, productPriceInsertImport } from '@/api/product'
+import ProductType from '@/views/common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import ImportGuideModal from './importGuideModal.vue'
 export default {
   name: 'ProductPricingList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productPricingEditModal, productPricingAuditModal, ProductBrand, ImportGuideModal },
+  components: { STable, VSelect, productPricingEditModal, productPricingAuditModal, ProductBrand, ProductType, ImportGuideModal },
   data () {
     return {
       spinning: false,
@@ -192,8 +182,6 @@ export default {
       openModal: false, //  编辑  弹框
       openAuditModal: false, //  审核  弹框
       itemSn: '', //  当前产品sn
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       rowSelectionInfo: null
     }
   },
@@ -324,33 +312,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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

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

@@ -23,16 +23,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productStatisticsList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <productTypeAll id="productStatisticsList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></productTypeAll>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -95,14 +86,13 @@ import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import productStatisticsDetailModal from './detailModal.vue'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery } from '@/api/productType'
+import productTypeAll from '@/views/common/productTypeAll.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import { salesDetailPromoList, salesDetailPromoCount } from '@/api/salesDetail'
 export default {
   name: 'ProductStatisticsList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productStatisticsDetailModal, rangeDate, ProductBrand },
+  components: { STable, VSelect, productStatisticsDetailModal, rangeDate, ProductBrand, productTypeAll },
   data () {
     return {
       spinning: false,
@@ -147,8 +137,6 @@ export default {
       openModal: false, //  查看客户详情  弹框
       itemSn: '', //  当前sn
       nowData: null,
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       productTotal: null
     }
   },
@@ -219,33 +207,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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

+ 6 - 28
src/views/reportData/allocationDetails/list.vue

@@ -19,18 +19,18 @@
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="产品名称">
                 <a-input id="allocationDetailsList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="品牌分类">
                 <v-select code="BRAND_TYPE" id="allocationDetailsList-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="7" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品品牌">
                   <ProductBrand id="allocationDetailsList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-model-item>
@@ -59,16 +59,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="allocationDetailsList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <ProductType id="allocationDetailsList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -152,11 +143,10 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import subarea from '@/views/common/subarea.js'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery } from '@/api/productType'
 import Area from '@/views/common/area.js'
 import { allocateTypeAllList } from '@/api/allocateType'
 import ProductBrand from '@/views/common/productBrand.js'
+import ProductType from '@/views/common/productType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { userQueryList } from '@/api/power-user'
 import AllocateType from '@/views/common/allocateType.js'
@@ -164,7 +154,7 @@ import { allocateReportDetailList, allocateReportDetailCount, allocateReportDeta
 export default {
   name: 'AllocationDetailsList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, Area, ProductBrand, reportModal, AllocateType },
+  components: { STable, VSelect, rangeDate, subarea, Area, ProductBrand, reportModal, AllocateType, ProductType },
   data () {
     return {
       spinning: false,
@@ -243,7 +233,6 @@ export default {
         }
       },
       allocateTypeList: [], //  调拨类型
-      productTypeList: [], //  分类下拉数据
       operatorList: [], //  操作员下拉数据
       totalData: null //  合计
     }
@@ -397,16 +386,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     //  调拨类型
     getAllocateTypeAllList () {
       allocateTypeAllList().then(res => {
@@ -428,7 +407,6 @@ export default {
       })
     },
     pageInit () {
-      this.getProductType()
       this.getAllocateTypeAllList()
       this.getUserList()
       this.resetSearchForm()

+ 1 - 1
src/views/reportData/productRebateReport/detailList.vue

@@ -57,7 +57,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品分类">
-                <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+                <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">

+ 3 - 24
src/views/reportData/receivedSendStorageReport/index.vue

@@ -58,16 +58,7 @@
           </a-col>
           <a-col :md="5" :sm="24">
             <a-form-item label="产品分类">
-              <a-cascader
-                @change="changeProductType"
-                expand-trigger="hover"
-                change-on-select
-                :options="productTypeList"
-                :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                id="receivedSendStorageReport-productType"
-                placeholder="请选择产品分类"
-                allowClear
-                v-model="productType" />
+              <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="receivedSendStorageReport-productType"></productTypeAll>
             </a-form-item>
           </a-col>
           <a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;align-item:center;justify-content:center;">
@@ -101,14 +92,14 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
 import { STable, VSelect } from '@/components'
-import { productTypeQueryAll } from '@/api/productType'
 import gatherList from './list'
 import moment from 'moment'
 export default {
   name: 'PriceDifferenceDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand, gatherList },
+  components: { STable, VSelect, ProductBrand, gatherList, productTypeAll },
   data () {
     return {
       moment,
@@ -121,7 +112,6 @@ export default {
         productTypeSn3: undefined
       },
       productType: undefined,
-      productTypeList: [],
       disabled: false,
       tableHeight: 0,
       endOpen: false,
@@ -160,16 +150,6 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQueryAll({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     handleExport () {
 
     },
@@ -180,7 +160,6 @@ export default {
 
     },
     pageInit () {
-      this.getProductType()
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()

+ 7 - 28
src/views/reportData/salesDetails/list.vue

@@ -61,16 +61,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="salesDetailsList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <ProductType id="salesDetailsList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -115,7 +106,8 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.id"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ x: 2480 }"
@@ -147,14 +139,14 @@ import subarea from '@/views/common/subarea.js'
 import custList from '@/views/common/custList.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
-import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
+import ProductType from '@/views/common/productType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 export default {
   name: 'SalesDetailsList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, custList, subarea, ProductBrand, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, custList, subarea, ProductBrand, ProductType, reportModal, AreaList },
   data () {
     return {
       spinning: false,
@@ -209,8 +201,7 @@ export default {
           return data
         })
       },
-      totalData: null,
-      productTypeList: [] //  分类下拉数据
+      totalData: null
     }
   },
   computed: {
@@ -357,36 +348,24 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     areaChange(val){
       this.queryParam.dealerProvinceSn = val[0] ? val[0] : ''
       this.queryParam.dealerCitySn = val[1] ? val[1] : ''
       this.queryParam.dealerCountySn = val[2] ? val[2] : ''
     },
     pageInit () {
-      this.getProductType()
+      this.resetSearchForm()
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 5 - 32
src/views/reportData/salesReturnDetailReport/list.vue

@@ -61,16 +61,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="salesReturnDetailList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <ProductType id="salesReturnDetailList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -150,14 +141,14 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
-import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
+import ProductType from '@/views/common/productType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesReturnDetailList, reportSalesReturnDetailCount, reportSalesReturnDetailExport } from '@/api/reportData'
 export default {
   name: 'SalesReturnDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, ProductBrand, reportModal, AreaList },
+  components: { STable, VSelect, rangeDate, subarea, ProductBrand, ProductType, reportModal, AreaList },
   data () {
     return {
       spinning: false,
@@ -213,8 +204,7 @@ export default {
           return data
         })
       },
-      totalData: null,
-      productTypeList: [] //  分类下拉数据
+      totalData: null
     }
   },
   computed: {
@@ -337,27 +327,12 @@ export default {
         }
       })
     },
-    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] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     //  重置
     resetSearchForm () {
       this.queryParam.time = [
@@ -395,20 +370,18 @@ export default {
       this.queryParam.dealerCountySn = val[2] ? val[2] : ''
     },
     pageInit () {
-      this.getProductType()
+      this.resetSearchForm()
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 6 - 26
src/views/reportData/transferReturnDetailReport/list.vue

@@ -63,18 +63,9 @@
                   <v-select code="BRAND_TYPE" id="allocateReturnDetailReport-productBrandTypeSn" v-model="queryParam.productBrandTypeSn" allowClear placeholder="请选择品牌分类"></v-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="allocateReturnDetailReport-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                  <ProductType id="allocateReturnDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="5" :sm="24">
@@ -153,14 +144,14 @@ import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import AllocateType from '@/views/common/allocateType.js'
 import Area from '@/views/common/area.js'
-import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
+import ProductType from '@/views/common/productType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { allocateReturnReportDetailQueryPage, allocateReturnReportDetailQueryCount, allocateReturnReportDetailExport } from '@/api/reportData'
 export default {
   name: 'TransferReturnDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, Area, ProductBrand, reportModal, AllocateType },
+  components: { STable, VSelect, rangeDate, subarea, Area, ProductBrand, ProductType, reportModal, AllocateType },
   data () {
     return {
       spinning: false,
@@ -232,7 +223,6 @@ export default {
         })
       },
       totalData: null,
-      productTypeList: [], //  分类下拉数据
       allocateTypeVal: []
     }
   },
@@ -374,23 +364,13 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     pageInit () {
-      this.getProductType()
       this.resetSearchForm()
     }
   },
   mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+    // 页签刷新时调用
+    if (!this.$store.state.app.isNewTab) { 
       this.pageInit()
     }
   },

+ 3 - 6
src/views/salesManagement/salesQuery/list.vue

@@ -76,10 +76,8 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="地区">
-                  <a-form-model-item prop="shippingAddrProvinceSn">
-                    <Area id="salesManagementList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
-                  </a-form-model-item>
+                <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
+                  <Area id="salesManagementList-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -535,11 +533,10 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getArea('province')
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 280
+      this.tableHeight = window.innerHeight - tableSearchH - 285
     }
   },
   watch: {

+ 6 - 58
src/views/supplierManagement/costSetting/addProductModal.vue

@@ -42,30 +42,12 @@
                 </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-model-item label="产品品牌">
-                    <a-select
-                      placeholder="请选择产品品牌"
-                      id="chooseProducts-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="chooseProducts-productBrandSn" 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="queryParam.productType"
-                      expand-trigger="hover"
-                      :options="productTypeList"
-                      :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                      id="chooseProducts-productType"
-                      placeholder="请选择产品分类"
-                      allowClear />
+                    <ProductType id="chooseProducts-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
                   </a-form-model-item>
                 </a-col>
                 <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -73,7 +55,7 @@
                   <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseProducts-reset">重置</a-button>
                 </a-col>
               </a-row>
-            </a-form-model></a-form>
+            </a-form-model>
           </div>
           <!-- 列表 -->
           <s-table
@@ -113,14 +95,14 @@
 
 <script>
 import { STable } from '@/components'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery, productTypeQueryAll } from '@/api/productType'
+import ProductBrand from '@/views/common/productBrand.js'
+import ProductType from '@/views/common/productType.js'
 import supplier from '@/views/common/supplier.js'
 import { addProduct, supplierProductSnList } from '@/api/supplier'
 import { productPricingList } from '@/api/product'
 export default {
   name: 'ChooseProductsModal',
-  components: { STable, supplier },
+  components: { STable, supplier, ProductType, ProductBrand },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -183,8 +165,6 @@ export default {
           return data
         })
       },
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [], //  分类下拉数据
       rowSelectionInfo: null
     }
   },
@@ -278,31 +258,6 @@ export default {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).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 = []
-        }
-      })
     }
   },
   watch: {
@@ -318,13 +273,6 @@ export default {
         this.chooseData = []
         this.supplierSn = undefined
         this.resetData()
-      } else {
-        if (this.productBrandList.length == 0) {
-          this.getProductBrand()
-        }
-        if (this.productTypeList.length == 0) {
-          this.getProductType()
-        }
       }
     }
   }