|
@@ -32,7 +32,7 @@
|
|
<a-form-item label="产品名称"><a-input id="easyPassShopping-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称" /></a-form-item>
|
|
<a-form-item label="产品名称"><a-input id="easyPassShopping-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称" /></a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="产品编码/原厂编码"><a-input id="easyPassShopping-code" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码" /></a-form-item>
|
|
|
|
|
|
+ <a-form-item label="产品编码/原厂编码"><a-input id="easyPassShopping-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码/原厂编码" /></a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品品牌">
|
|
<a-form-item label="产品品牌">
|
|
@@ -46,13 +46,14 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="商城类目">
|
|
<a-form-item label="商城类目">
|
|
- <v-select
|
|
|
|
- code="ENABLE_FLAG"
|
|
|
|
|
|
+ <a-cascader
|
|
id="easyPassShopping-category"
|
|
id="easyPassShopping-category"
|
|
- v-model="category"
|
|
|
|
- @change="changeCategory"
|
|
|
|
|
|
+ expandTrigger="hover"
|
|
|
|
+ :fieldNames="fieldNames"
|
|
|
|
+ :options="categoryOptions"
|
|
|
|
+ placeholder="请选择商城类目"
|
|
allowClear
|
|
allowClear
|
|
- placeholder="请选择商城类目"></v-select>
|
|
|
|
|
|
+ v-model="category" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -105,7 +106,7 @@ import { STable, VSelect } from '@/components'
|
|
import productType from '@/views/common/productType.js'
|
|
import productType from '@/views/common/productType.js'
|
|
import productBrand from '@/views/common/productBrand.js'
|
|
import productBrand from '@/views/common/productBrand.js'
|
|
// 接口
|
|
// 接口
|
|
-import { shopProductList, findMallParam, updateMallParam } from '@/api/shopProduct'
|
|
|
|
|
|
+import { shopProductList, findMallParam, updateMallParam, queryExtList } from '@/api/shopProduct'
|
|
export default {
|
|
export default {
|
|
name: 'ShelfProductTemplList',
|
|
name: 'ShelfProductTemplList',
|
|
components: { STable, VSelect, productType, productBrand },
|
|
components: { STable, VSelect, productType, productBrand },
|
|
@@ -120,17 +121,18 @@ export default {
|
|
// 查询条件
|
|
// 查询条件
|
|
queryParam: {
|
|
queryParam: {
|
|
productName: '', // 产品名称
|
|
productName: '', // 产品名称
|
|
- queryWord: '', // 产品编码/原厂编码
|
|
|
|
|
|
+ productCode: '', // 产品编码/原厂编码
|
|
productBrandSn: undefined, // 产品品牌
|
|
productBrandSn: undefined, // 产品品牌
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
status: undefined, // 状态
|
|
status: undefined, // 状态
|
|
- categorysn1: undefined, // 产品一级类目
|
|
|
|
- categorysn2: undefined// 产品二级类目
|
|
|
|
|
|
+ categorySn: undefined // 产品类目
|
|
},
|
|
},
|
|
productType: [], // 产品分类
|
|
productType: [], // 产品分类
|
|
- category: [], // 产品类目
|
|
|
|
|
|
+ categoryOptions: [], // 产品类目列表
|
|
|
|
+ category: [],
|
|
|
|
+ fieldNames: { label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' },
|
|
shoppingMallStatus: '0', // 商城状态1:开启 0 关闭
|
|
shoppingMallStatus: '0', // 商城状态1:开启 0 关闭
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
@@ -152,6 +154,7 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
|
|
+ this.queryParam.categorySn = (this.category && this.category.length > 1) ? this.category[1] : this.category[0]
|
|
return shopProductList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
return shopProductList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -176,22 +179,29 @@ export default {
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
- // 产品类目 change
|
|
|
|
- changeCategory (val) {
|
|
|
|
- this.queryParam.categorysn1 = val[0] ? val[0] : ''
|
|
|
|
- this.queryParam.categorysn2 = val[1] ? val[1] : ''
|
|
|
|
|
|
+ // 获取产品类目列表
|
|
|
|
+ getCategoryList () {
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ queryExtList({}).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.categoryOptions = res.data || []
|
|
|
|
+ }
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.productName = ''
|
|
this.queryParam.productName = ''
|
|
- this.queryParam.queryWord = ''
|
|
|
|
|
|
+ this.queryParam.productCode = ''
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productTypeSn1 = undefined
|
|
this.queryParam.productTypeSn1 = undefined
|
|
this.queryParam.productTypeSn2 = undefined
|
|
this.queryParam.productTypeSn2 = undefined
|
|
this.queryParam.productTypeSn3 = undefined
|
|
this.queryParam.productTypeSn3 = undefined
|
|
this.queryParam.status = undefined
|
|
this.queryParam.status = undefined
|
|
- this.queryParam.categorysn1 = undefined
|
|
|
|
- this.queryParam.categorysn2 = undefined
|
|
|
|
|
|
+ this.queryParam.categorySn = undefined
|
|
|
|
+ this.productType = []
|
|
|
|
+ this.category = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 获取初始商城打开、关闭状态
|
|
// 获取初始商城打开、关闭状态
|
|
@@ -236,6 +246,7 @@ export default {
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.getShoppingStatus()
|
|
this.getShoppingStatus()
|
|
|
|
+ this.getCategoryList()
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|