bug
This commit is contained in:
@@ -95,11 +95,11 @@
|
|||||||
title="请选择店铺"
|
title="请选择店铺"
|
||||||
:visible.sync="mallDlgShow"
|
:visible.sync="mallDlgShow"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
width="500px"
|
width="790px"
|
||||||
:before-close="handleClose">
|
:before-close="handleClose">
|
||||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
<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-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
|
<el-option
|
||||||
v-for="item in $store.state.mallList"
|
v-for="item in $store.state.mallList"
|
||||||
:key="item.mallId"
|
:key="item.mallId"
|
||||||
@@ -108,6 +108,9 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="mallDlgShow = false">取 消</el-button>
|
<el-button @click="mallDlgShow = false">取 消</el-button>
|
||||||
@@ -136,6 +139,29 @@ import { Message } from 'element-ui'
|
|||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: ''
|
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: [
|
colConfigs: [
|
||||||
{ type: "selection", width: '70px', align: 'left', fixed: 'left'},
|
{ type: "selection", width: '70px', align: 'left', fixed: 'left'},
|
||||||
{ prop: 'productSpu', label: 'SPU', align: 'left' },
|
{ prop: 'productSpu', label: 'SPU', align: 'left' },
|
||||||
@@ -171,21 +197,13 @@ import { Message } from 'element-ui'
|
|||||||
if (this.$store.state.mallList.length > 0) {
|
if (this.$store.state.mallList.length > 0) {
|
||||||
this.productPage.mallId = this.$store.state.mallList[0].mallId
|
this.productPage.mallId = this.$store.state.mallList[0].mallId
|
||||||
|
|
||||||
this.getCateList()
|
this.getCateList('')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getCateList () {
|
getCateList (id) {
|
||||||
console.log(222)
|
// console.log(222)
|
||||||
sendChromeAPIMessage({
|
|
||||||
url: 'bg-anniston-mms/category/children/list',
|
|
||||||
needMallId: true,
|
|
||||||
data: {
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getList () {
|
getList () {
|
||||||
|
|||||||
Reference in New Issue
Block a user