Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
7e0bb981
Commit
7e0bb981
authored
Sep 13, 2021
by
jisiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 商家管家
parent
d94838c6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
index.vue
src/pages/Groupmeal/merchantManagement/index.vue
+9
-4
No files found.
src/pages/Groupmeal/merchantManagement/index.vue
View file @
7e0bb981
...
@@ -18,11 +18,13 @@
...
@@ -18,11 +18,13 @@
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"modifyMerchant(scope.row.ota_id, scope.$index)"
>
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"modifyMerchant(scope.row.ota_id, scope.$index)"
>
修改
修改
</el-button>
</el-button>
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"handleDisable(scope.row)"
>
禁用
</el-button>
<el-button
type=
"text"
:disabled=
"scope.row.status == 1"
@
click=
"handleDisable(scope.row)"
>
{{
scope
.
row
.
status
==
1
?
"启用"
:
"禁用"
}}
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!-- 添加商家 -->
<!-- 添加商家
弹窗
-->
<el-dialog
title=
"商家编辑"
v-model=
"merchantAdd"
width=
"70%"
:show-close=
"false"
>
<el-dialog
title=
"商家编辑"
v-model=
"merchantAdd"
width=
"70%"
:show-close=
"false"
>
<el-form
class=
"dioFor"
:model=
"addMerchant"
:rules=
"rules"
>
<el-form
class=
"dioFor"
:model=
"addMerchant"
:rules=
"rules"
>
<el-form-item
label=
"商家名称"
label-width=
"100px"
prop=
"ota_name"
>
<el-form-item
label=
"商家名称"
label-width=
"100px"
prop=
"ota_name"
>
...
@@ -92,7 +94,7 @@
...
@@ -92,7 +94,7 @@
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入商家名称"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"请输入商家名称"
,
trigger
:
"blur"
}],
},
},
//
修改信息
//
弹窗初始:关闭
merchantAdd
:
false
,
merchantAdd
:
false
,
addMerchant
:
{
addMerchant
:
{
ota_name
:
""
,
ota_name
:
""
,
...
@@ -114,22 +116,25 @@
...
@@ -114,22 +116,25 @@
// this.addMerchant = this.merchantList[index];
// this.addMerchant = this.merchantList[index];
this
.
addMerchant
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
merchantList
[
index
]));
this
.
addMerchant
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
merchantList
[
index
]));
}
}
//点击“添加商家”按钮,弹窗打开
this
.
merchantAdd
=
true
;
this
.
merchantAdd
=
true
;
},
},
async
getOtaList
()
{
async
getOtaList
()
{
const
{
result
,
code
,
reason
}
=
await
otaList
();
const
{
result
,
code
,
reason
}
=
await
otaList
();
this
.
merchantList
=
result
.
list
;
if
(
code
!==
0
)
return
this
.
$message
.
error
(
reason
);
if
(
code
!==
0
)
return
this
.
$message
.
error
(
reason
);
this
.
merchantList
=
result
.
list
;
},
},
//保存
//保存
async
saveMerchant
()
{
async
saveMerchant
()
{
let
{
result
,
code
,
reason
}
=
this
.
addMerchant
.
ota_id
?
await
updateOta
(
this
.
addMerchant
)
:
await
addOta
(
this
.
addMerchant
);
let
{
result
,
code
,
reason
}
=
this
.
addMerchant
.
ota_id
?
await
updateOta
(
this
.
addMerchant
)
:
await
addOta
(
this
.
addMerchant
);
if
(
code
!==
0
)
return
this
.
$message
.
error
(
reason
);
if
(
code
!==
0
)
return
this
.
$message
.
error
(
reason
);
await
this
.
getOtaList
();
await
this
.
getOtaList
();
//点击保存时,弹窗关闭
this
.
merchantAdd
=
false
;
this
.
merchantAdd
=
false
;
},
},
// 取消
// 取消
addCancel
()
{
addCancel
()
{
//点击取消时,弹窗关闭
this
.
merchantAdd
=
false
;
this
.
merchantAdd
=
false
;
this
.
resetDate
();
this
.
resetDate
();
},
},
...
...
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