Commit 277296ad by 张立顺

功能开发完成

1 parent 9f0ecde8
<!-- 关联门店弹窗 -->
<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;
......
......@@ -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")
......
......@@ -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
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!