This commit is contained in:
yanran200730
2023-08-13 21:21:27 +08:00
parent 8e41dcdf62
commit c2757cf12d

View File

@@ -95,11 +95,11 @@
title="请选择店铺"
:visible.sync="mallDlgShow"
:close-on-click-modal="false"
width="500px"
width="790px"
:before-close="handleClose">
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
<el-form-item label="店铺" style="width: 100%;" prop="targetMallId" :rules="[{ required: true, message: '请选择店铺', trigger: 'blur' }]">
<el-select v-model="form.targetMallId" placeholder="请选择" @change="getCateList">
<el-select style="width: 380px" v-model="form.targetMallId" placeholder="请选择" @change="getCateList">
<el-option
v-for="item in $store.state.mallList"
:key="item.mallId"
@@ -108,6 +108,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品分类" style="width: 100%;" prop="targetMallId" :rules="[{ required: true, message: '请选择店铺', trigger: 'blur' }]">
<el-cascader style="width: 380px" :props="props"></el-cascader>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="mallDlgShow = false"> </el-button>
@@ -136,6 +139,29 @@ import { Message } from 'element-ui'
startDate: '',
endDate: ''
},
props: {
value: 'catId',
label: 'catName',
lazy: true,
lazyLoad (node, resolve) {
sendChromeAPIMessage({
url: 'bg-anniston-mms/category/children/list',
needMallId: true,
data: {
parentCatId: node.value || ''
}
}).then(res => {
if (res.errorCode === 1000000) {
resolve(res.result.categoryNodeVOS.map(v => {
return {
...v,
leaf: v.isLeaf
}
}))
}
})
}
},
colConfigs: [
{ type: "selection", width: '70px', align: 'left', fixed: 'left'},
{ prop: 'productSpu', label: 'SPU', align: 'left' },
@@ -171,21 +197,13 @@ import { Message } from 'element-ui'
if (this.$store.state.mallList.length > 0) {
this.productPage.mallId = this.$store.state.mallList[0].mallId
this.getCateList()
this.getCateList('')
}
},
methods: {
getCateList () {
console.log(222)
sendChromeAPIMessage({
url: 'bg-anniston-mms/category/children/list',
needMallId: true,
data: {
}
}).then(res => {
console.log(res)
})
getCateList (id) {
// console.log(222)
},
getList () {