Commit 65a13344 by 张立顺

feat 场景功能开发

1 parent 118b2bbb
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
@close="onDialogClose" @close="onDialogClose"
> >
<div v-loading="loading" class="dialog-body-inner"> <div v-loading="loading" class="dialog-body-inner">
<div v-if="$scopedSlots.storeDetail">
<slot name="storeDetail" :customer-row="customerRow" />
</div>
<glsx-combi-form <glsx-combi-form
ref="editFormRef" ref="editFormRef"
class="info-verify-form" class="info-verify-form"
...@@ -82,7 +85,7 @@ ...@@ -82,7 +85,7 @@
import { deepClone } from "@/common/util"; import { deepClone } from "@/common/util";
import ProvinceCity from "@/components/province-city/index.vue"; import ProvinceCity from "@/components/province-city/index.vue";
import SelectBrand from "@/components/SelectBrand/index.vue"; import SelectBrand from "@/components/SelectBrand/index.vue";
import merchantVerifyFormMixin from "../mixins/merchantVerifyFormMixin"; import merchantVerifyFormMixin from "./merchantVerifyFormMixin";
export default { export default {
name: "InfoVerifyMerchantDialog", name: "InfoVerifyMerchantDialog",
...@@ -104,6 +107,11 @@ export default { ...@@ -104,6 +107,11 @@ export default {
type: Object, type: Object,
default: null, default: null,
}, },
/** 商户类型选项(字典 label),如客户信息核验仅 4S:['4S店'];园区店/服务商新增:['园区店'];不传则三种都展示 */
merchantTypeLabels: {
type: Array,
default: null,
},
}, },
computed: { computed: {
dialogVisible: { dialogVisible: {
......
...@@ -49,6 +49,7 @@ function buildEditFormData(vm) { ...@@ -49,6 +49,7 @@ function buildEditFormData(vm) {
optionLabel: "confLabel", optionLabel: "confLabel",
optionsName: "merchantTypeList", optionsName: "merchantTypeList",
optionList: [], optionList: [],
isHide: false,
style: DIALOG_FULL, style: DIALOG_FULL,
handleRadioChange: () => {}, handleRadioChange: () => {},
}, },
...@@ -286,6 +287,10 @@ export default { ...@@ -286,6 +287,10 @@ export default {
this.editFormData[this.findIdx("parentId")].isHide = false; this.editFormData[this.findIdx("parentId")].isHide = false;
this.editFormData[this.findIdx("channelId")].isHide = false; this.editFormData[this.findIdx("channelId")].isHide = false;
this.editFormData[this.findIdx("merchantModel")].isHide = false; this.editFormData[this.findIdx("merchantModel")].isHide = false;
const accIdx = this.findIdx("accounttypeId");
if (accIdx >= 0) {
this.$set(this.editFormData[accIdx], "isHide", false);
}
this.formRules.parentId[0].required = true; this.formRules.parentId[0].required = true;
this.formRules.channelId[0].required = true; this.formRules.channelId[0].required = true;
this.formRules.merchantModel[0].required = true; this.formRules.merchantModel[0].required = true;
...@@ -388,9 +393,12 @@ export default { ...@@ -388,9 +393,12 @@ export default {
async getMerchantType() { async getMerchantType() {
const params = { dictType: "account_type" }; const params = { dictType: "account_type" };
const res = await getMerchantTypeApi(params); const res = await getMerchantTypeApi(params);
const list = ["4S店", "园区店", "服务商"]; const labelOrder =
this.merchantTypeLabels && this.merchantTypeLabels.length
? this.merchantTypeLabels
: ["4S店", "园区店", "服务商"];
this.baseData.merchantTypeList = []; this.baseData.merchantTypeList = [];
list.forEach((item) => { labelOrder.forEach((item) => {
const obj = res.find((k) => k.dictLabel == item); const obj = res.find((k) => k.dictLabel == item);
if (obj) { if (obj) {
this.baseData.merchantTypeList.push({ this.baseData.merchantTypeList.push({
...@@ -399,7 +407,14 @@ export default { ...@@ -399,7 +407,14 @@ export default {
}); });
} }
}); });
this.editFormData[0].optionList = this.baseData.merchantTypeList; const accIdx = this.findIdx("accounttypeId");
this.editFormData[accIdx].optionList = this.baseData.merchantTypeList;
if (this.baseData.merchantTypeList.length === 1) {
this.editData.accounttypeId = this.baseData.merchantTypeList[0].confId;
this.$set(this.editFormData[accIdx], "isHide", true);
} else {
this.$set(this.editFormData[accIdx], "isHide", false);
}
}, },
async getAccountLevel() { async getAccountLevel() {
const params = { dictType: "account_level" }; const params = { dictType: "account_level" };
......
...@@ -64,8 +64,34 @@ ...@@ -64,8 +64,34 @@
:visible.sync="infoVerifyVisible" :visible.sync="infoVerifyVisible"
:customer-row="infoVerifyRow" :customer-row="infoVerifyRow"
:submit-api="infoVerifySubmit" :submit-api="infoVerifySubmit"
:merchant-type-labels="['4S店']"
@success="handleSearch" @success="handleSearch"
/> >
<template #storeDetail="{ customerRow }">
<div
v-if="customerRow && customerRow.id"
class="info-verify-store-detail"
>
<div class="info-verify-store-detail__title">
门店详情
</div>
<div class="info-verify-store-detail__grid">
<div class="info-verify-store-detail__row">
<span class="info-verify-store-detail__label">门店名称</span>
<span class="info-verify-store-detail__value">{{ customerRow.storeName || '-' }}</span>
</div>
<div class="info-verify-store-detail__row">
<span class="info-verify-store-detail__label">所在地区</span>
<span class="info-verify-store-detail__value">{{ [customerRow.provinceName, customerRow.city].filter(Boolean).join(' ') || '-' }}</span>
</div>
<div class="info-verify-store-detail__row info-verify-store-detail__row--full">
<span class="info-verify-store-detail__label">详细地址</span>
<span class="info-verify-store-detail__value">{{ customerRow.address || '-' }}</span>
</div>
</div>
</div>
</template>
</info-verify-merchant-dialog>
<glsk-form-dialog v-if="editVisible" :selectVisible="editVisible" :dialogConfig="editDialogConfig" label-width="104px" <glsk-form-dialog v-if="editVisible" :selectVisible="editVisible" :dialogConfig="editDialogConfig" label-width="104px"
dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData" :slotArr="slotArr" dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData" :slotArr="slotArr"
:base-data="baseData" @handleClose="editVisible = false" @handleConfirm="handleEditConfirm"> :base-data="baseData" @handleClose="editVisible = false" @handleConfirm="handleEditConfirm">
...@@ -89,7 +115,7 @@ import { busTypeOpt, cooperModeOpt, flowSituateOpt, potentialCustomerOpt } from ...@@ -89,7 +115,7 @@ import { busTypeOpt, cooperModeOpt, flowSituateOpt, potentialCustomerOpt } from
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { potentialCustomersPage, regionUserList, bind4SStore, potentialCustomersInfoVerify } from '@api/salesManagement' import { potentialCustomersPage, regionUserList, bind4SStore, potentialCustomersInfoVerify } from '@api/salesManagement'
import CustomerDetailDialog from '../components/CustomerDetailDialog.vue' import CustomerDetailDialog from '../components/CustomerDetailDialog.vue'
import InfoVerifyMerchantDialog from './components/InfoVerifyMerchantDialog.vue' import InfoVerifyMerchantDialog from '@/components/merchantVerify/InfoVerifyMerchantDialog.vue'
import { getList } from "@api/merchant" import { getList } from "@api/merchant"
// import { tmplTypeList } from "../constant/baseData" // import { tmplTypeList } from "../constant/baseData"
import { getDistrictDetail, getBrandList } from "@/api/shopConfig.js" import { getDistrictDetail, getBrandList } from "@/api/shopConfig.js"
...@@ -793,4 +819,41 @@ export default { ...@@ -793,4 +819,41 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.info-verify-store-detail {
margin-bottom: 16px;
padding: 12px 14px;
background: #f7f8fa;
border-radius: 6px;
border: 1px solid #ebeef5;
}
.info-verify-store-detail__title {
font-size: 14px;
font-weight: 600;
color: #303133;
margin-bottom: 10px;
}
.info-verify-store-detail__grid {
display: flex;
flex-wrap: wrap;
gap: 8px 24px;
}
.info-verify-store-detail__row {
flex: 1 1 40%;
min-width: 200px;
font-size: 13px;
line-height: 1.5;
}
.info-verify-store-detail__row--full {
flex: 1 1 100%;
}
.info-verify-store-detail__label {
color: #909399;
margin-right: 8px;
}
</style> </style>
...@@ -13,17 +13,32 @@ ...@@ -13,17 +13,32 @@
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header>
<span slot="left">服务商列表</span>
<el-button type="primary"
size="small"
@click="openInfoVerifyDialog">
新增
</el-button>
</d2-table-header>
<d2-table ref="serviceStoreTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi" <d2-table ref="serviceStoreTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :show-btn-ids="['9060503']" :data="scope.scope" /> <auth-button slot="auth-button" slot-scope="scope" :show-btn-ids="['9060503']" :data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
<info-verify-merchant-dialog :visible.sync="infoVerifyVisible"
:customer-row="null"
:submit-api="infoVerifySubmit"
:merchant-type-labels="['园区店']"
@success="onInfoVerifySuccess" />
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { Util } from '@/common/util' import { Util } from '@/common/util'
import { getList } from '@api/serviceManage' import { getList } from '@api/serviceManage'
import { potentialCustomersInfoVerify } from '@api/salesManagement'
import InfoVerifyMerchantDialog from '@/components/merchantVerify/InfoVerifyMerchantDialog.vue'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { procureModeList } from "@/common/constants" import { procureModeList } from "@/common/constants"
export default { export default {
...@@ -163,11 +178,14 @@ export default { ...@@ -163,11 +178,14 @@ export default {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '-' return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '-'
} }
}] }]
} },
infoVerifyVisible: false,
infoVerifySubmit: potentialCustomersInfoVerify
} }
}, },
components: { components: {
InfoVerifyMerchantDialog
}, },
mounted() { }, mounted() { },
...@@ -192,6 +210,12 @@ export default { ...@@ -192,6 +210,12 @@ export default {
} }
this.$refs.serviceStoreTable.refreshTable() this.$refs.serviceStoreTable.refreshTable()
}, },
openInfoVerifyDialog() {
this.infoVerifyVisible = true
},
onInfoVerifySuccess() {
this.$refs.serviceStoreTable.refreshTable()
},
// 编辑服务商 // 编辑服务商
handleEdit(row) { handleEdit(row) {
this.close({ tagName: '/editService' }) this.close({ tagName: '/editService' })
......
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left">园区店服务商关联列表</span> <span slot="left">园区店服务商关联列表</span>
<el-button type="primary"
size="small"
@click="openInfoVerifyDialog">
新增
</el-button>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="serviceStoreTable" <d2-table ref="serviceStoreTable"
...@@ -47,12 +52,19 @@ ...@@ -47,12 +52,19 @@
:info="recordInfo" :info="recordInfo"
v-if="sceneEntryVisible" v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose" /> @dialogClose="sceneDialogClose" />
<info-verify-merchant-dialog :visible.sync="infoVerifyVisible"
:customer-row="null"
:submit-api="infoVerifySubmit"
:merchant-type-labels="['园区店']"
@success="onInfoVerifySuccess" />
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { getYqMerchantinfoPage } from '@api/serviceManage' import { getYqMerchantinfoPage } from '@api/serviceManage'
import { potentialCustomersInfoVerify } from '@api/salesManagement'
import InfoVerifyMerchantDialog from '@/components/merchantVerify/InfoVerifyMerchantDialog.vue'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { BaseData, manageTypeList } from '@/common/constants.js' import { BaseData, manageTypeList } from '@/common/constants.js'
import qrcodeDialog from './qRcodeDialog' import qrcodeDialog from './qRcodeDialog'
...@@ -222,14 +234,17 @@ export default { ...@@ -222,14 +234,17 @@ export default {
qRcodeVisible: false, qRcodeVisible: false,
QRcodeDialog: false, QRcodeDialog: false,
recordInfo: {}, recordInfo: {},
sceneEntryVisible: false sceneEntryVisible: false,
infoVerifyVisible: false,
infoVerifySubmit: potentialCustomersInfoVerify
} }
}, },
components: { components: {
qrcodeDialog, qrcodeDialog,
wxQRcodeDialog, wxQRcodeDialog,
sceneEntryDialog sceneEntryDialog,
InfoVerifyMerchantDialog
}, },
mounted() { mounted() {
...@@ -316,6 +331,14 @@ export default { ...@@ -316,6 +331,14 @@ export default {
this.sceneEntryVisible = !this.sceneEntryVisible this.sceneEntryVisible = !this.sceneEntryVisible
}, },
openInfoVerifyDialog() {
this.infoVerifyVisible = true
},
onInfoVerifySuccess() {
this.$refs.serviceStoreTable.refreshTable()
},
// 上架 // 上架
handleLaunch(row) { handleLaunch(row) {
this.$router.push({ this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!