Commit b5dd0e25 authored by jzc's avatar jzc

开发品牌联系人页面功能

parent caac4acb
...@@ -194,7 +194,6 @@ ...@@ -194,7 +194,6 @@
<el-table-column label="职位" align="center" prop="position" /> <el-table-column label="职位" align="center" prop="position" />
<el-table-column label="邮箱地址" align="center" prop="mailbox" /> <el-table-column label="邮箱地址" align="center" prop="mailbox" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="是否启用" align="center" prop="enableFlag" /> -->
<el-table-column label="是否启用" align="center" prop="enableFlag"> <el-table-column label="是否启用" align="center" prop="enableFlag">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -245,7 +244,7 @@ ...@@ -245,7 +244,7 @@
<el-input v-model="form.brandId" placeholder="请输入品牌id" /> <el-input v-model="form.brandId" placeholder="请输入品牌id" />
</el-form-item> --> </el-form-item> -->
<el-row> <el-row>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="品牌" prop="brandId"> <el-form-item label="品牌" prop="brandId">
<el-select v-model="form.brandId" placeholder="请选择品牌"> <el-select v-model="form.brandId" placeholder="请选择品牌">
<el-option <el-option
...@@ -256,6 +255,23 @@ ...@@ -256,6 +255,23 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="品牌" prop="brandName">
<el-input v-model="form.brandName" placeholder="请选择品牌">
<el-button
slot="append"
icon="el-icon-search"
@click="handleBrandSelect"
></el-button>
</el-input>
<BrandSelect
ref="brSelect"
@onSelected="onBrandSelected"
></BrandSelect>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -361,6 +377,7 @@ ...@@ -361,6 +377,7 @@
</template> </template>
<script> <script>
import BrandSelect from "@/components/brandSelect/single.vue";
import { import {
listContact, listContact,
listBrand, listBrand,
...@@ -372,9 +389,11 @@ import { ...@@ -372,9 +389,11 @@ import {
export default { export default {
name: "Contact", name: "Contact",
components: { BrandSelect },
dicts: ["sys_yes_no"], dicts: ["sys_yes_no"],
data() { data() {
return { return {
optType: undefined,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -412,7 +431,18 @@ export default { ...@@ -412,7 +431,18 @@ export default {
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: {}, rules: {
brandId: [{ required: true, message: "品牌不能为空", trigger: "blur" }],
contactName: [
{ required: true, message: "联系人不能为空", trigger: "blur" },
],
contactPhone: [
{ required: true, message: "联系电话不能为空", trigger: "blur" },
],
enableFlag: [
{ required: true, message: "是否启用不能为空", trigger: "blur" },
],
},
}; };
}, },
created() { created() {
...@@ -480,14 +510,14 @@ export default { ...@@ -480,14 +510,14 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.getBrandList(); // this.getBrandList();
this.open = true; this.open = true;
this.title = "添加品牌联系人"; this.title = "添加品牌联系人";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.getBrandList(); // this.getBrandList();
const brandContactId = row.brandContactId || this.ids; const brandContactId = row.brandContactId || this.ids;
getContact(brandContactId).then((response) => { getContact(brandContactId).then((response) => {
this.form = response.data; this.form = response.data;
...@@ -541,6 +571,25 @@ export default { ...@@ -541,6 +571,25 @@ export default {
`contact_${new Date().getTime()}.xlsx` `contact_${new Date().getTime()}.xlsx`
); );
}, },
//选择品牌
handleBrandSelect() {
this.$refs.brSelect.showFlag = true;
},
onBrandSelected(row) {
if (row != undefined && row != null) {
this.form.brandId = row.brandId;
this.form.brandCode = row.brandCode;
this.form.brandName = row.brandName;
this.form.groupName = row.groupName;
this.form.address = row.address;
this.form.salesContact = row.salesContact;
this.form.devContact = row.devContact;
this.form.background = row.background;
this.form.scope = row.scope;
this.form.potentialProject = row.potentialProject;
this.form.integrityRegulations = row.integrityRegulations;
}
},
}, },
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment