|
@@ -22,30 +22,12 @@
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品品牌">
|
|
|
- <a-select
|
|
|
- placeholder="请选择产品品牌"
|
|
|
- id="inventoryWarningList-productBrandSn"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.productBrandSn"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <ProductBrand id="inventoryWarningList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<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 />
|
|
|
+ <ProductType id="inventoryWarningList-productType" v-model="productType" @change="changeProductType"></ProductType>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -161,10 +143,10 @@
|
|
|
import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
|
|
|
-import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
|
-import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
|
+import ProductBrand from '@/views/common/productBrand.js'
|
|
|
+import ProductType from '@/views/common/productType.js'
|
|
|
export default {
|
|
|
- components: { STable, VSelect },
|
|
|
+ components: { STable, VSelect, ProductBrand, ProductType },
|
|
|
data () {
|
|
|
return {
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
@@ -181,8 +163,6 @@ export default {
|
|
|
},
|
|
|
exportLoading: false, // 导出loading
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- productBrandList: [], // 产品品牌下拉数据
|
|
|
- productTypeList: [], // 产品类别下拉数据
|
|
|
productType: [],
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
@@ -327,6 +307,7 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = undefined
|
|
|
this.queryParam.productTypeSn3 = undefined
|
|
|
this.queryParam.warnTip = undefined
|
|
|
+ this.productType = []
|
|
|
this.pageInit(1)
|
|
|
},
|
|
|
// 批量更新
|
|
@@ -351,32 +332,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 = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
- },
|
|
|
// 导出
|
|
|
handleExport () {
|
|
|
const params = this.queryParam
|
|
@@ -403,8 +358,6 @@ export default {
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.pageInit(1)
|
|
|
- vm.getProductType()
|
|
|
- vm.getProductBrand()
|
|
|
})
|
|
|
}
|
|
|
}
|