Commit 277296ad by 张立顺

功能开发完成

1 parent 9f0ecde8
...@@ -108,8 +108,7 @@ ...@@ -108,8 +108,7 @@
</template> </template>
<script> <script>
// import _ from 'lodash' import _ from 'lodash'
import { deepClone } from '@/common/util'
import { limitPrice, warrantyProList } from '@/common/constants' import { limitPrice, warrantyProList } from '@/common/constants'
export default { export default {
name: 'RelateProDialog', name: 'RelateProDialog',
......
<!-- 关联门店弹窗 --> <!-- 关联门店弹窗 -->
<template> <template>
<d2-dialog <d2-dialog title="关联门店"
title="关联门店"
:is-visible.sync="relateStoreVisible" :is-visible.sync="relateStoreVisible"
width="70%" width="70%"
btn-ok-label="关联" btn-ok-label="关联"
@confirmDialog="handleRelateStoreConfirm" @confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose" @closeDialog="handleRelateStoreClose"
class="relateStore" class="relateStore">
>
<slot /> <slot />
<el-row> <el-row class="tableCon">
<el-col :span="12"> <!-- <el-col :span="12"> -->
<el-table <div class="tableBox">
ref="seletingTable" <el-table ref="seletingTable"
:data="selectingData" :data="selectingData"
height="464px" height="464px"
class="table" class="table"
border border
@select="handleChange" @select="handleChange"
@select-all="handleAll" @select-all="handleAll">
> <el-table-column type="selection"
<el-table-column
type="selection"
width="55" width="55"
align="center" align="center"
:selectable="selectable" :selectable="selectable" />
/> <el-table-column v-if="sourcePage != 'serviceStore'"
<el-table-column
v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
align="center" align="center">
>
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="merchantName"
prop="merchantName"
label="4S店名称" label="4S店名称"
align="center" align="center">
>
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.merchantName }}</span> <span
<el-tooltip :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.merchantName }}</span>
v-if="!scope.row.isSetUpgradeSettleRule" <el-tooltip v-if="!scope.row.isSetUpgradeSettleRule"
popper-class="tooltip-class" popper-class="tooltip-class"
effect="dark" effect="dark"
content="该门店无配置财务分润规则,无法关联!" content="该门店无配置财务分润规则,无法关联!"
placement="top" placement="top">
> <span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
<span class="tip-icon">?</span>
v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
class="tip-icon"
>?</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination small
small
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-size="pageSize" :page-size="pageSize"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" :total="total" />
/> </div>
</el-col> <!-- </el-col> -->
<el-col :span="12"> <!-- <el-col :span="12"> -->
<el-table <el-table :data="selectedData"
:data="selectedData" class="table tableBox"
class="table"
border border
height="464px" height="464px">
> <el-table-column v-if="sourcePage != 'serviceStore'"
<el-table-column
v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
align="center" align="center" />
/> <el-table-column prop="merchantName"
<el-table-column
prop="merchantName"
label="4S店名称" label="4S店名称"
align="center" />
<el-table-column label="删除"
align="center" align="center"
/> width="50px">
<el-table-column
label="删除"
align="center"
width="50px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button class="el-icon-delete"
class="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
type="text" type="text" />
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> <!-- </el-col> -->
</el-row> </el-row>
</d2-dialog> </d2-dialog>
</template> </template>
...@@ -219,11 +197,17 @@ export default { ...@@ -219,11 +197,17 @@ export default {
} }
</script> </script>
<style> <style lang="scss">
.relateStore .table { .relateStore .table {
margin: 0 auto 20px !important; margin: 0 auto 20px !important;
width: 98%; width: 98%;
} }
.relateStore .tableCon {
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell, .service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell { .d2-form .relateStore .el-table .cell {
line-height: 26px !important; line-height: 26px !important;
......
...@@ -11,7 +11,7 @@ Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue")) ...@@ -11,7 +11,7 @@ Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue"))
Vue.component("D2TableHeader", () => import("./d2-table-header/index.vue")) Vue.component("D2TableHeader", () => import("./d2-table-header/index.vue"))
Vue.component("D2Table", () => import("./d2-table/index.vue")) Vue.component("D2Table", () => import("./d2-table/index.vue"))
Vue.component("D2Dialog", () => import("./d2-dialog/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("D2Search", () => import("./d2-search/index.vue"))
Vue.component("RelateStoreDialog", () => Vue.component("RelateStoreDialog", () =>
import("./d2-form/relateStoreDialog.vue") import("./d2-form/relateStoreDialog.vue")
......
...@@ -7,10 +7,19 @@ const chaining = { ...@@ -7,10 +7,19 @@ const chaining = {
const name = rest[key] const name = rest[key]
tmp = tmp?.[name] 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.$$ = 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!