添加:酒道馆关联品牌

This commit is contained in:
wuhui_zzw 2024-02-04 16:45:49 +08:00
parent 5cb9c36241
commit 34c7704704
3 changed files with 58 additions and 41 deletions

View File

@ -90,6 +90,13 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="品牌类型:">
<el-select v-model="merData.brand_id" filterable remote class="selWidth" placeholder="请输入品牌名称进行搜索" :remote-method="selectBrandList">
<el-option v-for="item in brand_list" :key="item.id" :label="item.title" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="排序:" prop="sort">
<el-input-number
@ -99,6 +106,8 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="mar_type_name + '状态:'" prop="status">
<el-switch
@ -111,8 +120,6 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注:" prop="mark">
<el-input
@ -370,7 +377,7 @@
<script>
import { merCategoryListApi } from '@/api/product'
import {getstoreTypeApi, merchantUpdate, merchantCreate, merchantListApi} from "@/api/merchant";
import {getstoreTypeApi, merchantUpdate, merchantCreate, merchantListApi, brandListApi} from "@/api/merchant";
export default {
props: {
merData: {
@ -397,6 +404,7 @@ export default {
}
}
return {
brand_list: {},
mer_list: {},
mar_type_name: '商户',
loading: false,
@ -430,6 +438,7 @@ export default {
this.mar_type_name = this.defaultMerchantType == 1 ? '酒道馆' : (this.defaultMerchantType == 2 ? '供应商' :'商户');
this.selectMerList();
this.selectBrandList('');
},
deep: true
}
@ -517,7 +526,22 @@ export default {
}).catch(res => {
this.$message.error(res.message);
});
},
//
selectBrandList(query){
let _this = this;
let params = {
page: 1,
limit: 100,
title: query,
};
brandListApi(params).then(res => {
_this.brand_list = res.data.list || {};
}).catch(res => {
this.$message.error(res.message);
});
}
},
};
</script>

View File

@ -106,19 +106,11 @@
</div>
<el-button size="small" type="primary" @click="onAdd">添加商户</el-button>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="small"
highlight-current-row
class="switchTable"
>
<el-table-column prop="mer_id" label="ID" min-width="60" />
<el-table-column prop="mer_name" label="商户名称" min-width="150" />
<el-table-column prop="real_name" label="商户姓名" min-width="150" />
<el-table-column prop="status" label="推荐" min-width="100">
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="small" highlight-current-row class="switchTable">
<el-table-column prop="mer_id" label="ID" min-width="60" align="center"/>
<el-table-column prop="mer_name" label="商户名称" min-width="150" align="center"/>
<el-table-column prop="real_name" label="商户姓名" min-width="150" align="center"/>
<el-table-column prop="status" label="推荐" min-width="100" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_best"
@ -131,7 +123,7 @@
/>
</template>
</el-table-column>
<el-table-column prop="status" label="开启/关闭" min-width="100">
<el-table-column prop="status" label="开启/关闭" min-width="100" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
@ -144,16 +136,15 @@
/>
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="150" />
<el-table-column prop="margin" label="保证金" min-width="150">
<el-table-column prop="create_time" label="创建时间" min-width="150" align="center"/>
<el-table-column prop="margin" label="保证金" min-width="150" align="center">
<template slot-scope="scope">
<span>{{scope.row.is_margin == 1 ? '未支付' : scope.row.is_margin == 0 ? '无' : '已支付'}}</span>
</template>
</el-table-column>
<el-table-column prop="sort" label="排序" min-width="100" />
<el-table-column prop="mark" label="备注" min-width="200" />
<el-table-column prop="sort" label="排序" min-width="100" align="center"/>
<el-table-column prop="mark" label="备注" min-width="200" align="center"/>
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<!-- <router-link

View File

@ -106,18 +106,16 @@
</div>
<el-button size="small" type="primary" @click="onAdd">添加酒道馆</el-button>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="small"
highlight-current-row
class="switchTable"
>
<el-table-column prop="mer_id" label="ID" min-width="60" />
<el-table-column prop="mer_name" label="酒道馆名称" min-width="150" />
<el-table-column prop="real_name" label="酒道馆姓名" min-width="150" />
<el-table-column prop="status" label="推荐" min-width="100">
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="small" highlight-current-row class="switchTable">
<el-table-column prop="mer_id" label="ID" min-width="60" align="center"/>
<el-table-column prop="mer_name" label="酒道馆名称" min-width="150" align="center"/>
<el-table-column prop="real_name" label="联系人" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.real_name }}<br />
{{ scope.row.mer_phone }}
</template>
</el-table-column>
<el-table-column prop="status" label="是否推荐" min-width="90" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.is_best"
@ -130,7 +128,7 @@
/>
</template>
</el-table-column>
<el-table-column prop="status" label="开启/关闭" min-width="100">
<el-table-column prop="status" label="状态" min-width="90" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
@ -143,20 +141,24 @@
/>
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="150" />
<el-table-column prop="margin" label="保证金" min-width="150">
<el-table-column prop="create_time" label="创建时间" min-width="140" align="center"/>
<el-table-column prop="margin" label="保证金" min-width="80" align="center">
<template slot-scope="scope">
<span>{{scope.row.is_margin == 1 ? '未支付' : scope.row.is_margin == 0 ? '无' : '已支付'}}</span>
</template>
</el-table-column>
<el-table-column prop="sort" label="排序" min-width="100" />
<el-table-column prop="status" label="关联商户" min-width="100">
<el-table-column prop="sort" label="排序" min-width="60" align="center"/>
<el-table-column prop="status" label="关联商户" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.merShop ? (scope.row.merShop.mer_name || '') : ''}}
</template>
</el-table-column>
<el-table-column prop="mark" label="备注" min-width="200" />
<el-table-column prop="status" label="品牌" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.brand ? (scope.row.brand.title || '') : ''}}
</template>
</el-table-column>
<!--<el-table-column prop="mark" label="备注" min-width="150" align="center"/>-->
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<!-- <router-link