Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 277296ad
authored
Nov 22, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能开发完成
1 parent
9f0ecde8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
96 deletions
src/components/d2-form/relateProDialog.vue
src/components/d2-form/relateStoreDialog.vue
src/components/index.js
src/plugin/chaining/index.js
src/components/d2-form/relateProDialog.vue
View file @
277296a
This diff is collapsed.
Click to expand it.
src/components/d2-form/relateStoreDialog.vue
View file @
277296a
<!-- 关联门店弹窗 -->
<
template
>
<d2-dialog
title=
"关联门店"
:is-visible
.
sync=
"relateStoreVisible"
width=
"70%"
btn-ok-label=
"关联"
@
confirmDialog=
"handleRelateStoreConfirm"
@
closeDialog=
"handleRelateStoreClose"
class=
"relateStore"
>
<d2-dialog
title=
"关联门店"
:is-visible
.
sync=
"relateStoreVisible"
width=
"70%"
btn-ok-label=
"关联"
@
confirmDialog=
"handleRelateStoreConfirm"
@
closeDialog=
"handleRelateStoreClose"
class=
"relateStore"
>
<slot
/>
<el-row>
<el-col
:span=
"12"
>
<el-table
ref=
"seletingTable"
:data=
"selectingData"
height=
"464px"
class=
"table"
border
@
select=
"handleChange"
@
select-all=
"handleAll"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
:selectable=
"selectable"
/>
<el-table-column
v-if=
"sourcePage != 'serviceStore'"
prop=
"yqMerchantName"
label=
"园区店名称"
align=
"center"
>
<el-row
class=
"tableCon"
>
<!--
<el-col
:span=
"12"
>
-->
<div
class=
"tableBox"
>
<el-table
ref=
"seletingTable"
:data=
"selectingData"
height=
"464px"
class=
"table"
border
@
select=
"handleChange"
@
select-all=
"handleAll"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
:selectable=
"selectable"
/>
<el-table-column
v-if=
"sourcePage != 'serviceStore'"
prop=
"yqMerchantName"
label=
"园区店名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span
:class=
"
{'red': !scope.row.isSetUpgradeSettleRule
&&
needTip.includes(sourcePage)}">
{{
scope
.
row
.
yqMerchantName
}}
</span>
<span
:class=
"
{'red': !scope.row.isSetUpgradeSettleRule
&&
needTip.includes(sourcePage)}">
{{
scope
.
row
.
yqMerchantName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"merchantName"
label=
"4S店名称"
align=
"center"
>
<el-table-column
prop=
"merchantName"
label=
"4S店名称"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span
:class=
"
{'red': !scope.row.isSetUpgradeSettleRule
&&
needTip.includes(sourcePage)}">
{{
scope
.
row
.
merchantName
}}
</span>
<el-tooltip
v-if=
"!scope.row.isSetUpgradeSettleRule"
popper-class=
"tooltip-class"
effect=
"dark"
content=
"该门店无配置财务分润规则,无法关联!"
placement=
"top"
>
<span
v-if=
"!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
class=
"tip-icon"
>
?
</span>
<span
:class=
"
{'red': !scope.row.isSetUpgradeSettleRule
&&
needTip.includes(sourcePage)}">
{{
scope
.
row
.
merchantName
}}
</span>
<el-tooltip
v-if=
"!scope.row.isSetUpgradeSettleRule"
popper-class=
"tooltip-class"
effect=
"dark"
content=
"该门店无配置财务分润规则,无法关联!"
placement=
"top"
>
<span
v-if=
"!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
class=
"tip-icon"
>
?
</span>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
small
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
:page-size=
"pageSize"
layout=
"total, prev, pager, next"
:total=
"total"
/>
</el-col>
<el-col
:span=
"12"
>
<el-table
:data=
"selectedData"
class=
"table"
border
height=
"464px"
>
<el-table-column
v-if=
"sourcePage != 'serviceStore'"
prop=
"yqMerchantName"
label=
"园区店名称"
align=
"center"
/>
<el-table-column
prop=
"merchantName"
label=
"4S店名称"
align=
"center"
/>
<el-table-column
label=
"删除"
align=
"center"
width=
"50px"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
type=
"text"
/>
</
template
>
</el-table-column>
</el-table>
</el-col>
<el-pagination
small
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
:page-size=
"pageSize"
layout=
"total, prev, pager, next"
:total=
"total"
/>
</div>
<!-- </el-col> -->
<!-- <el-col :span="12"> -->
<el-table
:data=
"selectedData"
class=
"table tableBox"
border
height=
"464px"
>
<el-table-column
v-if=
"sourcePage != 'serviceStore'"
prop=
"yqMerchantName"
label=
"园区店名称"
align=
"center"
/>
<el-table-column
prop=
"merchantName"
label=
"4S店名称"
align=
"center"
/>
<el-table-column
label=
"删除"
align=
"center"
width=
"50px"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
type=
"text"
/>
</
template
>
</el-table-column>
</el-table>
<!-- </el-col> -->
</el-row>
</d2-dialog>
</template>
...
...
@@ -219,11 +197,17 @@ export default {
}
</
script
>
<
style
>
<
style
lang=
"scss"
>
.relateStore
.table
{
margin
:
0
auto
20px
!important
;
width
:
98%
;
}
.relateStore
.tableCon
{
display
:
flex
;
.tableBox
{
flex
:
1
;
}
}
.service-store
.relateStore
.el-table
.cell
,
.d2-form
.relateStore
.el-table
.cell
{
line-height
:
26px
!important
;
...
...
src/components/index.js
View file @
277296a
...
...
@@ -11,7 +11,7 @@ Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue"))
Vue
.
component
(
"D2TableHeader"
,
()
=>
import
(
"./d2-table-header/index.vue"
))
Vue
.
component
(
"D2Table"
,
()
=>
import
(
"./d2-table/index.vue"
))
Vue
.
component
(
"D2Dialog"
,
()
=>
import
(
"./d2-dialog/index.vue"
))
//
Vue.component("D2Form", () => import("./d2-form/index.vue"))
Vue
.
component
(
"D2Form"
,
()
=>
import
(
"./d2-form/index.vue"
))
Vue
.
component
(
"D2Search"
,
()
=>
import
(
"./d2-search/index.vue"
))
Vue
.
component
(
"RelateStoreDialog"
,
()
=>
import
(
"./d2-form/relateStoreDialog.vue"
)
...
...
src/plugin/chaining/index.js
View file @
277296a
...
...
@@ -7,10 +7,19 @@ const chaining = {
const
name
=
rest
[
key
]
tmp
=
tmp
?.[
name
]
}
return
tmp
||
''
return
tmp
||
""
}
// const test = (obj, ...rest) => {
// let tmp = obj
// for (const key in rest) {
// const name = rest[key]
// tmp = tmp?.[name]
// }
// return tmp || ''
// }
// 添加实例方法
vue
.
prototype
.
$$
=
optionalChaining
// vue.prototype.$sy = test
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment