Commit 283aa717 by zhangquan

联调

1 parent d160fe05
......@@ -11,6 +11,53 @@ const getGoodsListApi = params => {
})
}
const updateGoodsStatusApi = params => {
params.method = 'scrm.api.shopmall.goods.configuration.upgrade.update.status'
return http({
url,
method: 'post',
data: params,
sign: true
})
}
const delGoodsApi = params => {
params.method = 'scrm.api.shopmall.goods.configuration.upgrade.delete'
return http({
url,
method: 'post',
data: params,
sign: true
})
}
const getCarlifeGoodsApi = params => {
params.method = 'scrm.api.shopmall.goods.smartcarlife.page'
return http({
url,
method: 'post',
data: params,
sign: true
})
}
const addGoodsApi = params => {
params.method = 'scrm.api.shopmall.goods.configuration.upgrade.add.or.update'
return http({
url,
method: 'post',
data: params,
sign: true
})
}
export default {
getGoodsListApi
getGoodsListApi,
updateGoodsStatusApi,
delGoodsApi,
getCarlifeGoodsApi,
addGoodsApi
}
\ No newline at end of file
......@@ -3,12 +3,12 @@
<div class="add-container">
<div class="title">{{ this.channelForm.channelName }}编辑</div>
<div class="channel-content gl-form-page">
<el-form ref="ruleForm" :model="channelForm" label-width="154px" size="small" :rules="rules">
<el-form ref="ruleForm1" :model="channelForm" label-width="154px" size="small" :rules="rules">
<el-form-item label="频道名称:" prop="channelName">
<el-input v-model="channelForm.channelName"></el-input>
</el-form-item>
<el-form-item label="频道子名称:" prop="channelName">
<el-input v-model="channelForm.channelName"></el-input>
<el-form-item label="频道子名称:" prop="channelChildName">
<el-input v-model="channelForm.channelChildName"></el-input>
</el-form-item>
<span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle">
......@@ -70,6 +70,7 @@ export default {
publicityImgArr: [],
publicityImg: '',
channelImg: '',
channelChildName: '',
channelImgArr: []
},
channelImgbgArr: ['banner1', 'banner2'],
......@@ -94,11 +95,12 @@ export default {
isClose: true
},
rules: {
channelName: [{ required: true, message: '请输入频道名称', trigger: 'blur' }],
channelName: [{ required: true, message: '请输入频道名称', trigger: 'change' }],
channelStyle: [{ required: true, message: '请选择频道主题', trigger: 'change' }],
publicityImg: [{ required: true, message: '请上传频道分享预览图', trigger: 'change' }],
channelImg: [{ required: true, message: '请上传频道banner', trigger: 'change' }],
promotion: [{ required: true, message: '请输入频道分享文案', trigger: 'blur' }]
promotion: [{ required: true, message: '请输入频道分享文案', trigger: 'blur' }],
channelChildName: [{ required: true, message: '请输入频道子名称', trigger: 'change' }],
}
}
},
......@@ -144,40 +146,40 @@ export default {
this.$refs.ruleForm.clearValidate(val.key)
},
handleSave() {
this.$refs.ruleForm.validate(valid => {
if (!this.channelForm.channelImg) {
this.channelImgFlag = true
return
}
// if (!this.channelForm.publicityImg) {
// this.publicityImgFlag = true
// return
// }
if (valid) {
let params = {
channelName: this.channelForm.channelName,
channelType: this.channelForm.channelType,
channelStyle: this.channelForm.channelStyle,
channelImg: this.channelForm.channelImg,
promotion: this.channelForm.promotion,
publicityImg: this.channelForm.publicityImg,
posterImg: this.channelForm.posterImg
}
if (this.channelForm.channelType == 1) params.channelStyle = this.channelForm.channelStyle
let apis = this.id ? 'updateChannel' : this.merchantChannelId ? 'updateMerchantChannel' : ''
this.id ? (params.id = this.id) : this.merchantChannelId ? (params.merchantChannelId = this.merchantChannelId) : ''
this.loading = true
this.$apis.channel[apis](params).then(res => {
if (res.code == 0) {
this.loading = false
this.$router.go(-1)
this.$refs.ruleForm1.validate(valid1 =>{
if(valid1){
this.$refs.ruleForm.validate(valid => {
if (!this.channelForm.channelImg) {
this.channelImgFlag = true
return
}
if (valid) {
let params = {
channelName: this.channelForm.channelName,
channelChildName: this.channelForm.channelChildName,
channelType: this.channelForm.channelType,
channelStyle: this.channelForm.channelStyle,
channelImg: this.channelForm.channelImg,
promotion: this.channelForm.promotion,
publicityImg: this.channelForm.publicityImg,
posterImg: this.channelForm.posterImg
}
if (this.channelForm.channelType == 1) params.channelStyle = this.channelForm.channelStyle
let apis = this.id ? 'updateChannel' : this.merchantChannelId ? 'updateMerchantChannel' : ''
this.id ? (params.id = this.id) : this.merchantChannelId ? (params.merchantChannelId = this.merchantChannelId) : ''
this.loading = true
this.$apis.channel[apis](params).then(res => {
if (res.code == 0) {
this.loading = false
this.$router.go(-1)
}
this.$message({
message: res.code == '0' ? '编辑成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$message({
message: res.code == '0' ? '编辑成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
}
})
}
})
......
......@@ -75,7 +75,7 @@ export default {
},
{
label: '频道子名称',
prop: 'channelName'
prop: 'channelChildName'
},
{
label: '频道宣传语',
......
......@@ -9,7 +9,7 @@
<i v-show="brandTree" class="el-icon-arrow-down" style="color:#909399"></i>
</div>
<div :class="['tree-box', {'arrowUp': arrowUp}]" v-show="brandTree">
<el-tree :default-expanded-keys="expandedList" accordion empty-text="暂无数据" class="filter-tree" :data="brandListTree" :props="defaultProps" node-key="id" ref="tree">
<el-tree :default-expanded-keys="expandedList" accordion empty-text="暂无数据" class="filter-tree" :data="categoryData" :props="defaultProps" node-key="id" ref="tree">
<div :class="['custom-tree-node',{'active': data.id == curBrand.id && node.level==2}]" slot-scope="{ node, data }" @click="selectBrand(node)" >
<span>{{ node.label }}</span>
</div>
......@@ -26,52 +26,35 @@ export default {
brandTree: false,
arrowUp: false,
curBrand: {},
expandedList:[],
categoryData: [],
defaultProps: {
children: 'children',
label: 'label'
children: 'childs',
label: 'categoryName'
},
expandedList:[]
}
},
model: {
prop: 'value', // 默认是value
event: 'changeBrand', // 默认是input
event: 'change', // 默认是input
},
props: {
// defaultProps: {
// type: Object,
// default: ()=> {
// return {
// children: 'children',
// label: 'label'
// }
// }
// },
value: {
type: String
},
brandListTree: {
listTree: {
type: Array,
default: ()=>{
return [{
id: 1,
label: '一级 1',
children: [{
id: 4,
label: '二级 1-1'
}]
}, {
id: 2,
label: '一级 2',
children: [{
id: 5,
label: '二级 2-1'
}, {
id: 6,
label: '二级 2-2'
}]
}, {
id: 3,
label: '一级 3',
children: [{
id: 7,
label: '二级 3-1'
}, {
id: 8,
label: '二级 3-2',
}]
}]
return []
}
}
},
......@@ -83,6 +66,9 @@ export default {
// deep: true
// }
// },
created(){
this.getCategory()
},
mounted() {
document.addEventListener("click", this.eventListener);
},
......@@ -90,6 +76,27 @@ export default {
document.removeEventListener("click", this.eventListener);
},
methods: {
getCategory(){
const params = {
pageSize: 1000,
pageNum: 1,
categoryType: 1
}
this.$apis.category.getCategoryListApi(params).then(res => {
if(res?.list?.length){
let list = res.list.filter(item => item.categoryLevel == 1).map(item => ({...item, childs: []}))
let level2List = res.list.filter(item => item.categoryLevel == 2)
level2List.forEach(item => {
const target = list.find(row => row.id == item.parentCategoryId)
if(target){
target['childs'].push(item)
}
})
this.categoryData = list
console.log(this.categoryData)
}
})
},
eventListener(e){
if (!this.$refs?.cascaderRef?.contains(e.target)) this.brandTree = false;
},
......@@ -103,12 +110,13 @@ export default {
}
this.arrowUp = distance < 100 //判断是否向上展示
this.brandTree = !this.brandTree
this.$emit('clickBrand', this.brandTree)
},
selectBrand(e){
if(e.level==2) {
this.curBrand = e.data
this.$emit('changeBrand', this.curBrand.id)
this.brandTree = !this.brandTree
this.$emit('change', this.curBrand.id)
this.$emit('clickItem', {data: e.data, parent: e.parent?.data || {}})
}
}
}
......
<template>
<div class="select-store">
<GLDialog bigTitle="选择门店"
mode="big"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<!-- <glsx-combi-form ref="showSearch"
labelWidth="105px"
:formObj="searchForm"
:formData="searchFormData">
<span slot="footer">
<el-button :size="size"
type="primary"
@click="resetTable">查询</el-button>
</span>
</glsx-combi-form> -->
<GLTable ref="storeRef"
:noDataImg="url"
:tableTotal="total"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
@refreshTable="getList"
:tableData="storeList"
:hasNum="false"
:setTableFinishFun="setTableFinishFun">
<div slot="radioHtml"
class="store-table"
slot-scope="scope">
<el-radio v-model="curInfo.id"
:label="scope.scope.id"
@click.native="handleClick(scope.scope)"></el-radio>
</div>
<div slot="imageSlot" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goodsImage" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.goodsImage" />
</el-popover>
</div>
</GLTable>
</GLDialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectStore',
data() {
return {
url: url,
searchForm: {
},
// getListApi: this.$apis.common.getMerchantList,
total: 0,
storeList: [],
heightBox: 200,
curInfo: {},
// 搜索
// searchFormData: [
// {
// label: '商户名称',
// name: 'merchantName',
// type: 'input',
// placeholder: '请输入商户名称',
// width: '300px',
// labelWidth: '10px'
// },
// {
// label: '商户ID',
// name: 'merchantId',
// type: 'input',
// inputType: 'number',
// placeholder: '请输入商户ID',
// width: '300px',
// labelWidth: '10px'
// }
// ],
pageConfig: {
pageSize: 10,
currentPage: 1
},
tableParams: {
listName: 'list',
tableColumns: [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '价格(元)',
formatter: cellValue => {
return cellValue.retailPrice ? Number(Number(cellValue.retailPrice/100).toFixed(2)) : '--'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {}
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
storeSearchForm: {
type: Object
},
goodsInfo: {
required: true,
default: ()=> {}
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.curInfo = this.goodsInfo || {}
this.getList()
},
methods: {
getList(pageCon) {
pageCon && (this.pageConfig = pageCon)
var params = {
merchantId: this.merchantId,
...this.searchForm,
...this.pageConfig
// merchantId: '44209390',
}
this.$apis.goods.getCarlifeGoodsApi(params).then(res => {
this.storeList = res.list
this.total = res.total
let nowIndex = this.pageConfig.pageSize * (this.pageConfig.currentPage - 1)
this.storeList.forEach((item, index) => {
item.idx = index + 1 + nowIndex
})
})
},
resetTable() {
this.$refs.storeRef.page.currentPage = 1
this.getList()
},
setTableFinishFun() {
this.$refs.staffRef.tableHeightValues = '460px'
},
handleClick(item) {
console.log(item)
this.curInfo = item
},
handleClose() {
this.$emit('handleGoodsClose')
},
handleConfirm() {
this.$emit('handleGoodsConfirm', this.curInfo)
}
}
}
</script>
<style lang="scss">
.select-store {
.storeDailog {
width: 500px;
}
.title {
margin-bottom: 12px;
}
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
cursor: pointer;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
// .customer-list {
// width: calc(100% - 280px);
// margin-right: 10px;
// }
.p-16 {
padding: 16px;
}
.store-table .el-radio__label {
display: none;
}
}
</style>
<template>
<GLDialog bigTitle="选择商品优惠券" mode="big" :visible.sync="isVisible" :show-close="true" :before-close="handleClose" :close-on-click-modal="false" @onOk="onOk" @onCancel="handleClose">
<div class="dialog_body">
<GLCombiForm :rowNumber="1" class="dialog_search" ref="searchRef" :formObj="dialogSearchForm" :formData="dialogFormData" @handleOk="handleOk" @handleRest="handleRest"></GLCombiForm>
<div class="dialog_table">
<GLTable v-if="showTable" :pageSizes="pageSizes" ref="tableRef" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" :searchForm="dialogSearchForm" :tableParams="tableParams" :getListApi="getListApi">
<div slot="spreadPrice" slot-scope="scope">
<span :style="{ color: Number(scope.scope.lineationPrice - scope.scope.costPrice) <= 0 ? '#eb4e4e' : '#666666' }">{{ Number(Number(scope.scope.lineationPrice - scope.scope.costPrice).toFixed(1)) }}</span>
</div>
</GLTable>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'index',
props: {
isVisible: {
type: Boolean,
default: false
},
selectedList: {
type: Array,
default: ()=> []
}
},
data() {
return {
showTable: true,
copyList: [],
couponList: [],
directChargeList: [],
pageSizes: [5, 10, 20, 30, 40],
dialogSearchForm: {
merchantName: '',
merchantId: ''
},
dialogFormData: [
{
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '商户ID',
name: 'merchantId',
type: 'input',
isClear: true
}
],
getListApi: this.$apis.common.getMerchantList,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableParams: {
listName: 'list',
mutiSelectName: 'goodsIndex',
mutiSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [
{
label: '商户名称',
prop: 'merchantName'
},
{
label: '商户id',
prop: 'merchantNo'
},
]
}
}
},
created() {
},
methods: {
handleOk() {
this.$refs.tableRef.refreshTable()
},
handleRest() {
this.dialogSearchForm = {
merchantName: '',
merchantId: ''
}
this.handleOk()
},
onOk() {
let list = this.$refs.tableRef.mutiSelectArr[this.tableParams.mutiSelectName] || []
for (let i = 0; i < this.selectedList.length; i++) {
let idx = list.findIndex(item => item.id == this.selectedList[i].id)
if (idx > -1) {
list.splice(idx, 1)
}
}
list.map(item => this.$set(item, 'activityPrice', ''))
this.$emit('confirmDialog', [...list, ...this.selectedList])
},
handleClose() {
this.$emit('closeDialog')
},
setTableFinishFun() {
// this.copyList = [...this.selectedGoodsList, ...this[this.curType == 1 ? 'couponList' : 'directChargeList']]
// this.copyList.forEach(row => {
// this.$nextTick(() => {
// let idx = this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item => item.id == row.id)
// if (idx > -1) {
// try {
// this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.tableRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx], true)
// let id = this.copyList.findIndex(item => item.id == row.id)
// if (id > -1) this.copyList.splice(id, 1)
// } catch (err) {
// console.log(err)
// }
// }
// })
// })
}
}
}
</script>
<style lang="scss" scoped>
.container {
/deep/ .table-header {
display: inline-flex !important;
align-items: center;
justify-content: center;
padding: 0 !important;
.el-button {
min-width: 0;
}
}
.good_name {
img {
width: 40px;
height: 20px;
vertical-align: text-bottom;
}
}
.dialog_body {
border: 1px solid #e5e5e5;
.dialog_search {
padding: 20px 20px 0;
/deep/ .el-form-item {
width: 312px;
}
}
.coupon_type {
width: 100%;
display: inline-block;
border-bottom: 1px solid #eee;
.type {
display: inline-block;
height: 40px;
width: 70px;
line-height: 40px;
font-weight: 500;
text-align: center;
font-size: 16px;
cursor: pointer;
}
.active_type {
color: #5850ff;
border-bottom: 2px solid #5850ff;
}
}
.dialog_table {
padding: 20px;
}
}
}
</style>
......@@ -37,7 +37,7 @@
</template>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="4"></GLTableButton>
</div>
</GLTable>
</div>
......@@ -67,6 +67,59 @@
listeners: {
click: row => this.addContent(row.scope, 1)
}
},
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addContent(row.scope, 1)
}
},
{
type: 'el-button',
name: '上架',
attrs: {
type: 'text',
fn: '上架'
},
condition: row => {
return row.scope.goodsStatus!=1
},
listeners: {
click: row => this.shelfGoodsFn(row.scope, 1)
}
},
{
type: 'el-button',
name: '下架',
attrs: {
type: 'text',
fn: '下架'
},
condition: row => {
return row.scope.goodsStatus==1
},
listeners: {
click: row => this.shelfGoodsFn(row.scope, 0)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.scope.goodsStatus!=1
},
listeners: {
click: row => this.delGoodsFn(row.scope)
}
}
],
searchForm: {},
......@@ -107,7 +160,7 @@
tableParams: {
listName: 'list',
tableOption: {
width: 100
width: 200
},
tableColumns: [
{
......@@ -167,6 +220,47 @@
created() {},
mounted() {},
methods: {
shelfGoodsFn(item, type){
if(type==1){
this.updateStatus(item.id, type)
}else{
this.$confirm(`确定下架该商品吗`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.updateStatus(item.id, type)
}
}
})
}
},
delGoodsFn(item){
this.$confirm(`确定删除该商品吗`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis.goods.delGoodsApi({id: item.id}).then(res =>{
if(res){
this.$message.success('删除成功')
this.handleSearch()
}
})
}
}
})
},
updateStatus(id, goodsStatus){
this.$apis.goods.updateGoodsStatusApi({id, goodsStatus}).then(res =>{
if(res){
this.$message.success('操作成功')
this.handleSearch()
}
})
},
filterData({merchantList: list}){
return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0
......
......@@ -9,7 +9,7 @@
<p>所属门店</p>
<div class="merchantName ellipsis-1">{{ editForm.merchantName }}</div>
</div>
<div class="el-form-item__error mrt5" v-if="merchantFlag">请选择门店</div>
<!-- <div class="el-form-item__error mrt5" v-if="merchantFlag">请选择门店</div> -->
</div>
<div slot="channelHtml">
<el-checkbox-group v-model="editForm.channelIds" @change="handleCheckedChannelChange">
......@@ -18,16 +18,14 @@
</div>
<div slot="carSeriesHtml">
<el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleCarSeriesClose">选择车系</el-button>
<div class="merchantNameLabel" v-if="editForm.merchantName">
<p>所属门店</p>
<div class="merchantName ellipsis-1">{{ editForm.merchantName }}</div>
<div class="car-series-wrap" v-if="editForm.vehicleSeriesRequests && editForm.vehicleSeriesRequests.length">
<div class="car-series-item" v-for="item in editForm.vehicleSeriesRequests" :key="item.vehicleSeriesId">{{ item.vehicleSeriesName }}</div>
</div>
<div class="el-form-item__error mrt5" v-if="merchantFlag">请选择门店</div>
</div>
</glsx-combi-form>
</div>
<select-store v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="editForm.merchantId" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose"></select-store>
<selectCarDialog v-if="carDialogVisible" :dialogVisible="carDialogVisible"></selectCarDialog>
<selectCarDialog v-if="carDialogVisible" singleChoice @handleClose="handleClose" @handleConfirm="handleConfirm" :dialogVisible="carDialogVisible"></selectCarDialog>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
......@@ -49,6 +47,7 @@ export default {
merchantId: this.$route.query.merchantId ? this.$route.query.merchantId : '',
editForm: {
channelIds: [],
vehicleSeriesRequests: [],
merchantId: '',
merchantName: ''
},
......@@ -75,8 +74,28 @@ export default {
relateStoreVisible: false, // 选择门店
carDialogVisible: false, //选择车系
editRule: {
channelIds: [{ required: true, message: '请选择频道名称', trigger: 'change' }]
}
merchantId: [{ required: true,validator: (rule, value, callback) => {
if(this.editForm.merchantId){
callback()
}else{
callback(new Error(`请选择门店`))
}
}, trigger: 'change' }],
channel: [{ required: true,validator: (rule, value, callback) => {
if(this.editForm.channelIds && this.editForm.channelIds.length ){
callback()
}else{
callback(new Error(`请选择频道`))
}
}, trigger: 'change' }],
carId: [{ required: true, validator: (rule, value, callback) => {
if(this.editForm.vehicleSeriesRequests && this.editForm.vehicleSeriesRequests.length){
callback()
}else{
callback(new Error(`请选择主营品牌车系`))
}
}, trigger: 'change' }]
}
}
},
mounted() {
......@@ -135,7 +154,8 @@ export default {
let params = {
merchantId: this.editForm.merchantId,
merchantName: this.editForm.merchantName,
channelIds: this.editForm.channelIds
channelIds: this.editForm.channelIds,
vehicleSeriesRequests: this.editForm.vehicleSeriesRequests
}
this.loading = true
this.$apis.store.configMerchant(params).then(res => {
......@@ -168,6 +188,30 @@ export default {
selectedData.merchantId && (this.editForm.merchantId = selectedData.merchantId)
selectedData.merchantName && ((this.editForm.merchantName = selectedData.merchantName), (this.merchantFlag = false))
this.handleRelateStoreClose()
},
handleClose(){
this.carDialogVisible = false
},
handleConfirm(e={}){
let carList = []
for(const key in e){
for(const sonKey in e[key]){
carList = [...carList, ...e[key][sonKey]]
}
}
this.editForm.vehicleSeriesRequests = carList.map(item =>{
const {id, name, parentId, parentName, rootId, rootName} = item
return {
brandId: rootId,
brandName: rootName,
childBrandId: parentId,
childBrandName: parentName,
vehicleSeriesId: id,
vehicleSeriesName: name
}
})
this.handleClose()
this.$refs.editFormRef.$refs[this.editChildRef].validateField('carId')
}
}
}
......@@ -218,5 +262,27 @@ export default {
padding: 0 8px;
}
}
.car-series-wrap{
margin-top: 8px;
width: 580px;
height: 80px;
background: #FFFFFF;
border: 1px solid #E8E8EA;
border-radius: 4px;
padding: 6px 8px;
overflow-y: auto;
.car-series-item{
display: inline-block;
padding: 0 8px;
height: 24px;
color: #666666;
line-height: 24px;
background: #FAFBFE;
border: 1px solid #E5E5E5;
border-radius: 4px;
margin-right: 4px;
}
}
}
</style>
......@@ -191,7 +191,11 @@
})
},
handleConfirm(){
console.log(this.selectdData,155)
console.log(this.selectdData)
this.$emit('handleConfirm', this.selectdData)
},
handleClose(){
this.$emit('handleClose')
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!