Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mes
mes-ui
Commits
a10cfdbc
Commit
a10cfdbc
authored
Jan 17, 2024
by
jzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改排版
parent
b9ae5e9d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
520 additions
and
142 deletions
+520
-142
index.vue
src/views/mes/md/brand/index.vue
+69
-40
single.vue
src/views/mes/md/brand/single.vue
+219
-0
index.vue
src/views/mes/md/brandcontact/index.vue
+232
-102
No files found.
src/views/mes/md/brand/index.vue
View file @
a10cfdbc
...
...
@@ -161,7 +161,7 @@
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"背景"
label=
"
品牌
背景"
align=
"center"
prop=
"background"
:show-overflow-tooltip=
"true"
...
...
@@ -173,7 +173,7 @@
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"
品牌名称
"
label=
"
潜力项目
"
align=
"center"
prop=
"potentialProject"
:show-overflow-tooltip=
"true"
...
...
@@ -284,35 +284,55 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"
7
"
>
<el-col
:span=
"
8
"
>
<el-form-item
label=
"集团"
prop=
"groupName"
>
<el-input
v-model=
"form.groupName"
placeholder=
"请输入所属集团名称"
/>
<el-input
v-model=
"form.groupName"
placeholder=
"请输入所属集团名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"地址"
prop=
"address"
>
<el-input
v-model=
"form.address"
placeholder=
"请输入地址"
/>
<el-col
:span=
"8"
>
<el-form-item
label=
"销售对接人"
prop=
"salesContact"
>
<el-input
v-model=
"form.salesContact"
placeholder=
"请输入销售对接人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"7"
>
<el-form-item
label=
"销售对接人"
prop=
"salesContact"
>
<el-input
v-model=
"form.salesContact"
placeholder=
"请输入销售对接人"
/>
<el-col
:span=
"8"
>
<el-form-item
label=
"开发对接人"
prop=
"devContact"
>
<el-input
v-model=
"form.devContact"
placeholder=
"请输入开发对接人"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"
7
"
>
<el-form-item
label=
"
开发对接人"
prop=
"devContact
"
>
<el-input
v-model=
"form.
devContact"
placeholder=
"请输入开发对接人
"
/>
<el-col
:span=
"
24
"
>
<el-form-item
label=
"
地址"
prop=
"address
"
>
<el-input
v-model=
"form.
address"
placeholder=
"请输入地址
"
/>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"背景"
prop=
"background"
>
<el-input
v-model=
"form.background"
placeholder=
"请输入品牌背景"
/>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"品牌背景"
prop=
"background"
>
<el-input
v-model=
"form.background"
placeholder=
"请输入品牌背景"
/>
</el-form-item>
</el-col>
<el-col
:span=
"7"
>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"经营范围"
prop=
"scope"
>
<el-input
v-model=
"form.scope"
placeholder=
"请输入经营范围"
/>
</el-form-item>
...
...
@@ -320,14 +340,23 @@
</el-row>
<el-row>
<el-col
:span=
"
7
"
>
<el-col
:span=
"
24
"
>
<el-form-item
label=
"潜力项目"
prop=
"potentialProject"
>
<el-input
v-model=
"form.potentialProject"
placeholder=
"请输入潜力项目"
/>
<el-input
v-model=
"form.potentialProject"
placeholder=
"请输入潜力项目"
/>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"廉洁规定"
prop=
"integrityRegulations"
>
<el-input
v-model=
"form.integrityRegulations"
placeholder=
"请输入廉洁规定"
/>
<el-input
v-model=
"form.integrityRegulations"
placeholder=
"请输入廉洁规定"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -401,7 +430,7 @@ export default {
},
// 表单参数
form
:
{},
brandList
:[],
brandList
:
[],
// 表单校验
rules
:
{
brandCode
:
[
...
...
@@ -528,8 +557,8 @@ export default {
},
/** 删除按钮操作 */
handleDelete
()
{
const
brandIds
=
this
.
ids
.
join
(
','
);
console
.
log
(
brandIds
)
const
brandIds
=
this
.
ids
.
join
(
","
);
console
.
log
(
brandIds
)
;
this
.
$modal
.
confirm
(
"是否确认删除品牌?"
)
...
...
src/views/mes/md/brand/single.vue
0 → 100644
View file @
a10cfdbc
<
template
>
<el-dialog
title=
"物料产品选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
false
width=
"80%"
center
>
<el-row
:gutter=
"20"
>
<!--品牌数据-->
<el-col
:span=
"20"
:xs=
"24"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"品牌编码"
prop=
"brandCode"
>
<el-input
v-model=
"queryParams.brandCode"
placeholder=
"请输入品牌编码"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"品牌名称"
prop=
"brandName"
>
<el-input
v-model=
"queryParams.brandName"
placeholder=
"请输入品牌名称"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"brandList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"50"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedBrandId"
:label=
"scope.row.brandId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio>
</
template
>
</el-table-column>
<el-table-column
label=
"品牌编码"
width =
"120"
align=
"center"
key=
"brandCode"
prop=
"brandCode"
v-if=
"columns[0].visible"
>
</el-table-column>
<el-table-column
label=
"品牌名称"
min-width=
"120"
align=
"left"
key=
"brandName"
prop=
"brandName"
v-if=
"columns[1].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"集团"
align=
"left"
key=
"specification"
prop=
"specification"
v-if=
"columns[2].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"地址"
align=
"center"
key=
"unitOfMeasure"
prop=
"unitOfMeasure"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"销售对接人"
align=
"center"
key=
"salesContact"
prop=
"salesContact"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
>
</el-table-column>
<el-table-column
label=
"开发对接人"
align=
"center"
key=
"devContact"
prop=
"devContact"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"品牌背景"
align=
"center"
key=
"background"
prop=
"background"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"经营范围"
align=
"center"
key=
"scope"
prop=
"scope"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"潜力项目"
align=
"center"
key=
"potentialProject"
prop=
"potentialProject"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"廉洁规定"
align=
"center"
key=
"integrityRegulations"
prop=
"integrityRegulations"
v-if=
"columns[4].visible"
:show-overflow-tooltip=
"true"
></el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-col>
</el-row>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirmSelect"
>
确 定
</el-button>
<el-button
@
click=
"showFlag=false"
>
取 消
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
{
listBrand
}
from
"@/api/mes/md/brand"
;
import
{
listAllUnitmeasure
}
from
"@/api/mes/md/unitmeasure"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
treeselect
}
from
"@/api/mes/md/itemtype"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
export
default
{
name
:
"MdBrandSingle"
,
components
:
{
Treeselect
},
data
()
{
return
{
showFlag
:
false
,
// 选中数组
selectedBrandId
:
undefined
,
selectedRows
:
undefined
,
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 品牌表格数据
brandList
:
null
,
// 品牌名称
brandName
:
undefined
,
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
brandCode
:
undefined
,
brandName
:
undefined
,
brandId
:
0
,
},
// 列信息
columns
:
[
{
key
:
0
,
label
:
`品牌编码`
,
visible
:
true
},
{
key
:
1
,
label
:
`品牌名称`
,
visible
:
true
},
{
key
:
2
,
label
:
`集团`
,
visible
:
true
},
{
key
:
3
,
label
:
`地址`
,
visible
:
true
},
{
key
:
4
,
label
:
`销售对接人`
,
visible
:
true
},
{
key
:
5
,
label
:
`开发对接人`
,
visible
:
true
},
{
key
:
6
,
label
:
`品牌背景`
,
visible
:
true
},
{
key
:
6
,
label
:
`经营范围`
,
visible
:
true
},
{
key
:
6
,
label
:
`潜力项目`
,
visible
:
true
},
{
key
:
6
,
label
:
`廉洁规定`
,
visible
:
true
},
],
};
},
// watch: {
// // 根据名称筛选分类树
// itemTypeName(val) {
// this.$refs.tree.filter(val);
// },
// },
created
()
{
this
.
getList
();
},
methods
:
{
// /** 查询物料编码列表 */
// getList() {
// this.loading = true;
// listMdItem(this.queryParams).then((response) => {
// this.itemList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
/** 查询品牌列表 */
getList
()
{
this
.
loading
=
true
;
listBrand
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
brandList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// /** 查询分类下拉树结构 */
// getTreeselect() {
// treeselect().then((response) => {
// this.itemTypeOptions = response.data;
// });
// },
// 筛选节点
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
// 节点单击事件
handleNodeClick
(
data
)
{
this
.
queryParams
.
brandId
=
data
.
id
;
this
.
handleQuery
();
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
handleCurrent
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
handleRowDbClick
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
// 单选选中数据
handleRowChange
(
row
)
{
debugger
;
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
//确定选中
confirmSelect
()
{
if
(
this
.
selectedBrandId
==
null
||
this
.
selectedBrandId
==
0
)
{
this
.
$notify
({
title
:
"提示"
,
type
:
"warning"
,
message
:
"请至少选择一条数据!"
,
});
return
;
}
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
},
},
};
</
script
>
\ No newline at end of file
src/views/mes/md/brandcontact/index.vue
View file @
a10cfdbc
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"品牌id"
prop=
"brandId"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"品牌名称"
prop=
"brandName"
>
<el-input
v-model=
"queryParams.brand
Id
"
placeholder=
"请输入品牌
id
"
v-model=
"queryParams.brand
Name
"
placeholder=
"请输入品牌"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<!--
<el-form-item
label=
"品牌"
prop=
"brandName"
>
<el-select
v-model=
"queryParams.brandName"
placeholder=
"请选择品牌"
clearable
>
<el-option
v-for=
"dict in dict.type.mes_dvsubject_type"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"联系人"
prop=
"contactName"
>
<el-input
v-model=
"queryParams.contactName"
...
...
@@ -90,10 +108,17 @@
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
...
...
@@ -105,7 +130,8 @@
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['md:contact:add']"
>
新增
</el-button>
>
新增
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -116,7 +142,8 @@
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['md:contact:edit']"
>
修改
</el-button>
>
修改
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -127,7 +154,8 @@
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['md:contact:remove']"
>
删除
</el-button>
>
删除
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -137,17 +165,29 @@
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['md:contact:export']"
>
导出
</el-button>
>
导出
</el-button
>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"contactList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"contactList"
@
selection-change=
"handleSelectionChange"
>
<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=
"brandName"
/>
<el-table-column
label=
"联系人"
align=
"center"
prop=
"contactName"
/>
<el-table-column
label=
"联系人(英文名)"
align=
"center"
prop=
"contactNameEn"
/>
<el-table-column
label=
"联系人(英文名)"
align=
"center"
prop=
"contactNameEn"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"contactPhone"
/>
<el-table-column
label=
"办公区域"
align=
"center"
prop=
"officeArea"
/>
<el-table-column
label=
"部门"
align=
"center"
prop=
"department"
/>
...
...
@@ -164,7 +204,11 @@
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
...
...
@@ -172,20 +216,22 @@
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['md:contact:edit']"
>
修改
</el-button>
>
修改
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['md:contact:remove']"
>
删除
</el-button>
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
...
...
@@ -193,12 +239,13 @@
/>
<!-- 添加或修改品牌联系人对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
50
0px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
8
0px"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
96
0px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
10
0px"
>
<!-- <el-form-item label="品牌id" prop="brandId">
<el-input v-model="form.brandId" placeholder="请输入品牌id" />
</el-form-item> -->
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"品牌"
prop=
"brandId"
>
<el-select
v-model=
"form.brandId"
placeholder=
"请选择品牌"
>
<el-option
...
...
@@ -209,35 +256,66 @@
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"联系人"
prop=
"contactName"
>
<el-input
v-model=
"form.contactName"
placeholder=
"请输入联系人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"联系人(英文名)"
prop=
"contactNameEn"
>
<el-input
v-model=
"form.contactNameEn"
placeholder=
"请输入联系人(英文名)"
/>
<el-input
v-model=
"form.contactNameEn"
placeholder=
"请输入联系人(英文名)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"联系电话"
prop=
"contactPhone"
>
<el-input
v-model=
"form.contactPhone"
placeholder=
"请输入联系电话"
/>
<el-input
v-model=
"form.contactPhone"
placeholder=
"请输入联系电话"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"办公区域"
prop=
"officeArea"
>
<el-input
v-model=
"form.officeArea"
placeholder=
"请输入办公区域"
/>
<el-input
v-model=
"form.officeArea"
placeholder=
"请输入办公区域"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"部门"
prop=
"department"
>
<el-input
v-model=
"form.department"
placeholder=
"请输入部门"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"职位"
prop=
"position"
>
<el-input
v-model=
"form.position"
placeholder=
"请输入职位"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"邮箱地址"
prop=
"mailbox"
>
<el-input
v-model=
"form.mailbox"
placeholder=
"请输入邮箱地址"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
<!-- <el-form-item label="是否启用" prop="enableFlag">
<el-input v-model="form.enableFlag" placeholder="请输入是否启用(Y/N)" />
</el-form-item> -->
<el-col
:span=
"8"
>
<el-form-item
label=
"是否启用"
prop=
"enableFlag"
>
<el-radio-group
v-model=
"form.enableFlag"
...
...
@@ -260,7 +338,19 @@
>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
...
@@ -271,7 +361,14 @@
</template>
<
script
>
import
{
listContact
,
listBrand
,
getContact
,
delContact
,
addContact
,
updateContact
}
from
"@/api/mes/md/brandcontact"
;
import
{
listContact
,
listBrand
,
getContact
,
delContact
,
addContact
,
updateContact
,
}
from
"@/api/mes/md/brandcontact"
;
export
default
{
name
:
"Contact"
,
...
...
@@ -293,7 +390,7 @@ export default {
// 品牌联系人表格数据
contactList
:
[],
//品牌选项
mdBrands
:[],
mdBrands
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -302,12 +399,20 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
brandId
:
null
,
contactName
:
null
,
contactNameEn
:
null
,
contactPhone
:
null
,
officeArea
:
null
,
department
:
null
,
position
:
null
,
mailbox
:
null
,
enableFlag
:
null
,
},
brandId
:
null
,
contactName
:
null
,
contactNameEn
:
null
,
contactPhone
:
null
,
officeArea
:
null
,
department
:
null
,
position
:
null
,
mailbox
:
null
,
enableFlag
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
}
rules
:
{},
};
},
created
()
{
...
...
@@ -317,7 +422,7 @@ export default {
/** 查询品牌联系人列表 */
getList
()
{
this
.
loading
=
true
;
listContact
(
this
.
queryParams
).
then
(
response
=>
{
listContact
(
this
.
queryParams
).
then
(
(
response
)
=>
{
this
.
contactList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
...
...
@@ -326,7 +431,7 @@ export default {
/** 查询品牌列表 */
getBrandList
()
{
this
.
loading
=
true
;
listBrand
().
then
(
response
=>
{
listBrand
().
then
(
(
response
)
=>
{
this
.
mdBrands
=
response
.
data
;
});
},
...
...
@@ -338,7 +443,22 @@ export default {
// 表单重置
reset
()
{
this
.
form
=
{
brandContactId
:
null
,
brandId
:
null
,
contactName
:
null
,
contactNameEn
:
null
,
contactPhone
:
null
,
officeArea
:
null
,
department
:
null
,
position
:
null
,
mailbox
:
null
,
remark
:
null
,
enableFlag
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
};
brandContactId
:
null
,
brandId
:
null
,
contactName
:
null
,
contactNameEn
:
null
,
contactPhone
:
null
,
officeArea
:
null
,
department
:
null
,
position
:
null
,
mailbox
:
null
,
remark
:
null
,
enableFlag
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
...
...
@@ -353,14 +473,14 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
brandContactId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
brandContactId
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
getBrandList
()
this
.
getBrandList
()
;
this
.
open
=
true
;
this
.
title
=
"添加品牌联系人"
;
},
...
...
@@ -368,8 +488,8 @@ export default {
handleUpdate
(
row
)
{
this
.
reset
();
this
.
getBrandList
();
const
brandContactId
=
row
.
brandContactId
||
this
.
ids
getContact
(
brandContactId
).
then
(
response
=>
{
const
brandContactId
=
row
.
brandContactId
||
this
.
ids
;
getContact
(
brandContactId
).
then
(
(
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改品牌联系人"
;
...
...
@@ -377,16 +497,16 @@ export default {
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
brandContactId
!=
null
)
{
updateContact
(
this
.
form
).
then
(
response
=>
{
updateContact
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addContact
(
this
.
form
).
then
(
response
=>
{
addContact
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
...
...
@@ -398,19 +518,29 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
brandContactIds
=
row
.
brandContactId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除品牌联系人编号为"'
+
brandContactIds
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除品牌联系人编号为"'
+
brandContactIds
+
'"的数据项?'
)
.
then
(
function
()
{
return
delContact
(
brandContactIds
);
}).
then
(()
=>
{
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'md/contact/export'
,
{
...
this
.
queryParams
},
`contact_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
this
.
download
(
"md/contact/export"
,
{
...
this
.
queryParams
,
},
`contact_
${
new
Date
().
getTime
()}
.xlsx`
);
},
},
};
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment