Commit 65a13344 by 张立顺

feat 场景功能开发

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