Commit 5ea187fc authored by jzc's avatar jzc

Merge branch 'feature/jzc/brand/0.0.1' into dev

parents dc5acacb 18efd8cc
...@@ -181,6 +181,7 @@ ...@@ -181,6 +181,7 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="品牌id" align="center" prop="brandId" /> --> <!-- <el-table-column label="品牌id" align="center" prop="brandId" /> -->
<el-table-column label="品牌编码" align="center" prop="brandCode" />
<el-table-column label="品牌名称" align="center" prop="brandName" /> <el-table-column label="品牌名称" align="center" prop="brandName" />
<el-table-column label="联系人" align="center" prop="contactName" /> <el-table-column label="联系人" align="center" prop="contactName" />
<el-table-column <el-table-column
...@@ -193,7 +194,7 @@ ...@@ -193,7 +194,7 @@
<el-table-column label="部门" align="center" prop="department" /> <el-table-column label="部门" align="center" prop="department" />
<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">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -209,6 +210,14 @@ ...@@ -209,6 +210,14 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-query"
@click="handleView(scope.row)"
v-hasPermi="['mes:contact:query']"
>查看</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -239,7 +248,13 @@ ...@@ -239,7 +248,13 @@
<!-- 添加或修改品牌联系人对话框 --> <!-- 添加或修改品牌联系人对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form
ref="form"
:model="form"
:rules="rules"
:disabled="form.brandContactId&&optType!='edit'"
label-width="100px"
>
<!-- <el-form-item label="品牌id" prop="brandId"> <!-- <el-form-item label="品牌id" prop="brandId">
<el-input v-model="form.brandId" placeholder="请输入品牌id" /> <el-input v-model="form.brandId" placeholder="请输入品牌id" />
</el-form-item> --> </el-form-item> -->
...@@ -258,12 +273,13 @@ ...@@ -258,12 +273,13 @@
</el-col> --> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="品牌" prop="brandName"> <el-form-item label="品牌编码" prop="brandCode">
<el-input v-model="form.brandName" placeholder="请选择品牌"> <el-input v-model="form.brandCode" readonly="readonly">
<el-button <el-button
slot="append" slot="append"
icon="el-icon-search" icon="el-icon-search"
@click="handleBrandSelect" @click="handleBrandSelect"
:disabled="form.brandContactId"
></el-button> ></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -273,12 +289,20 @@ ...@@ -273,12 +289,20 @@
></BrandSelect> ></BrandSelect>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="品牌名称" prop="brandName">
<el-input v-model="form.brandName" readonly="readonly" />
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="联系人" prop="contactName"> <el-form-item label="联系人" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人" /> <el-input v-model="form.contactName" placeholder="请输入联系人" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="联系人(英文名)" prop="contactNameEn"> <el-form-item label="联系人(英文名)" prop="contactNameEn">
<el-input <el-input
...@@ -287,9 +311,6 @@ ...@@ -287,9 +311,6 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="联系电话" prop="contactPhone"> <el-form-item label="联系电话" prop="contactPhone">
<el-input <el-input
...@@ -306,15 +327,14 @@ ...@@ -306,15 +327,14 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="部门" prop="department"> <el-form-item label="部门" prop="department">
<el-input v-model="form.department" placeholder="请输入部门" /> <el-input v-model="form.department" placeholder="请输入部门" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="职位" prop="position"> <el-form-item label="职位" prop="position">
<el-input v-model="form.position" placeholder="请输入职位" /> <el-input v-model="form.position" placeholder="请输入职位" />
...@@ -330,6 +350,33 @@ ...@@ -330,6 +350,33 @@
<el-input v-model="form.enableFlag" placeholder="请输入是否启用(Y/N)" /> <el-input v-model="form.enableFlag" placeholder="请输入是否启用(Y/N)" />
</el-form-item> --> </el-form-item> -->
<!-- <el-col :span="8">
<el-form-item label="是否启用" prop="enableFlag">
<el-radio-group
v-model="form.enableFlag"
disabled
v-if="optType == 'view'"
>
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
<el-radio-group v-model="form.enableFlag" v-else>
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
</el-col> -->
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否启用" prop="enableFlag"> <el-form-item label="是否启用" prop="enableFlag">
<el-radio-group <el-radio-group
...@@ -355,6 +402,7 @@ ...@@ -355,6 +402,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
...@@ -368,7 +416,12 @@ ...@@ -368,7 +416,12 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="cancel" v-if="optType == 'view'"
>返回</el-button
>
<el-button type="primary" @click="submitForm" v-if="optType != 'view'"
>确 定</el-button
>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -474,6 +527,7 @@ export default { ...@@ -474,6 +527,7 @@ export default {
this.form = { this.form = {
brandContactId: null, brandContactId: null,
brandId: null, brandId: null,
brandCode: null,
brandName: null, brandName: null,
contactName: null, contactName: null,
contactNameEn: null, contactNameEn: null,
...@@ -488,6 +542,7 @@ export default { ...@@ -488,6 +542,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
status: "PREPARE",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -513,6 +568,7 @@ export default { ...@@ -513,6 +568,7 @@ export default {
// this.getBrandList(); // this.getBrandList();
this.open = true; this.open = true;
this.title = "添加品牌联系人"; this.title = "添加品牌联系人";
this.optType = "add";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -523,6 +579,18 @@ export default { ...@@ -523,6 +579,18 @@ export default {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改品牌联系人"; this.title = "修改品牌联系人";
this.optType = "edit";
});
},
// 查询明细按钮操作
handleView(row) {
this.reset();
const brandContactId = row.brandContactId || this.ids;
getContact(brandContactId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "查看品牌联系人信息";
this.optType = "view";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
......
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