Commit b23adaf1 by 张立顺

feat 场景上架功能联调

1 parent 610b7d0a
Showing 30 changed files with 454 additions and 217 deletions
...@@ -25,3 +25,4 @@ yarn-error.log* ...@@ -25,3 +25,4 @@ yarn-error.log*
*.njsproj *.njsproj
*.sln *.sln
*.sw* *.sw*
src/main.js
...@@ -35,6 +35,9 @@ function request (params = {}, method = RequestMethods.GET, noSignAttr = [], opt ...@@ -35,6 +35,9 @@ function request (params = {}, method = RequestMethods.GET, noSignAttr = [], opt
apiName = "dj"; apiName = "dj";
} else if (params.method.includes("dj.api.oaapproval")) { } else if (params.method.includes("dj.api.oaapproval")) {
apiName = "oaapproval"; apiName = "oaapproval";
} else if (params.method.includes("merchants.api.open.createMerchantWithPermissions")) {
/** 开放平台创建商户 — 与同网关 oaapproval 一致,使用 axios_oaapproval / baseURL */
apiName = "oaapproval";
} else { } else {
// console.log(params.method.split(".api")) // console.log(params.method.split(".api"))
apiName = params.method.split(".api")[0]; apiName = params.method.split(".api")[0];
......
...@@ -26,10 +26,18 @@ export function bind4SStore(data) { ...@@ -26,10 +26,18 @@ export function bind4SStore(data) {
return request(data, "post"); return request(data, "post");
} }
// 潜客信息核验提交(与新增商户字段一致;method 待后端确认后替换) // 潜客信息核验提交(dj.api.smartcarlife.sale.potentialCustomers.submitVerification)
export function potentialCustomersInfoVerify(data) { export function potentialCustomersInfoVerify(data) {
data.method = 'dj.api.smartcarlife.sale.potentialCustomers.infoVerify' data.method =
return request(data, "post") "dj.api.smartcarlife.sale.potentialCustomers.submitVerification";
return request(data, "post");
}
// 潜客新建商户 — 校验商户名称是否与账户中心重复
export function potentialCustomersCheckMerchantName(data) {
data.method =
"dj.api.smartcarlife.sale.potentialCustomers.checkMerchantName";
return request(data, "post");
} }
// 分页查询大区 // 分页查询大区
......
...@@ -2,6 +2,13 @@ import request from "./request" ...@@ -2,6 +2,13 @@ import request from "./request"
const path = "dj.smartcarlife.api." const path = "dj.smartcarlife.api."
/** 开放平台新建商户(含权限);走 request 层 oaapproval 路由→axios_oaapproval;园区店 merchantType=6、服务商 merchantType=7;提交固定 source=DJ */
export function createMerchantWithPermissions(data) {
data.method = "merchants.api.open.createMerchantWithPermissions"
data.source = "DJ"
return request(data, "post")
}
// 分页查询园区店服务商列表 // 分页查询园区店服务商列表
export function getList(data) { export function getList(data) {
// data.method = `${path}partnerMerchant.serviceRef.page` // data.method = `${path}partnerMerchant.serviceRef.page`
......
...@@ -101,6 +101,12 @@ export function findMerchantListByPage(data) { ...@@ -101,6 +101,12 @@ export function findMerchantListByPage(data) {
return request(data, RequestMethods.POST); return request(data, RequestMethods.POST);
} }
/** 账户中心校验商户名称是否已存在(method 与请求体以后端文档为准联调) */
export function checkMerchantNameExists(data) {
data.method = `merchants.api.open.merchantName.exists`;
return request(data, RequestMethods.POST);
}
// 嘀加上架 - 保存 // 嘀加上架 - 保存
export function operationConfirm(data) { export function operationConfirm(data) {
data.method = `dj.api.create.business.approve.operationConfirm`; data.method = `dj.api.create.business.approve.operationConfirm`;
......
...@@ -43,6 +43,19 @@ ...@@ -43,6 +43,19 @@
</template> </template>
<script> <script>
/** 后端约定 integer:车系 id、车品牌 id */
function toBrandInt(val) {
if (val === '' || val === null || val === undefined) return undefined
const n = parseInt(val, 10)
return Number.isNaN(n) ? undefined : n
}
/** 勾选 key 与节点 id 可能是 number/string,统一比较 */
function checkedKeysHas(keys, id) {
const sid = String(id)
return (keys || []).some((k) => String(k) === sid)
}
export default { export default {
name: 'SelectBrand', name: 'SelectBrand',
data() { data() {
...@@ -82,43 +95,50 @@ export default { ...@@ -82,43 +95,50 @@ export default {
} }
}, },
methods: { methods: {
/**
* 提交结构(submitVerification:merchantBrandList[].cars、merchantBrandList[].merchantBrandId[])
* - cars:车系 id(一级)
* - merchantBrandId:车品牌 id 数组(二级),integer[]
*/
collectMerchantBrandIdsFromSeriesNode(car, checkedKeys) {
const merchantBrandId = []
if (!car.children || !car.children.length) return merchantBrandId
car.children.forEach((item) => {
if (checkedKeysHas(checkedKeys, item.id)) {
const bid = toBrandInt(item.id)
if (bid !== undefined) merchantBrandId.push(bid)
}
})
return merchantBrandId
},
getMerchantBrandList() { getMerchantBrandList() {
let getCheckedNodes = this.$refs.tree.getCheckedNodes()
const getCheckedKeys = this.$refs.tree.getCheckedKeys() const getCheckedKeys = this.$refs.tree.getCheckedKeys()
const getHalfCheckedNodes = this.$refs.tree.getHalfCheckedNodes() const tree = this.brandListTree || []
let merchantBrandList = getHalfCheckedNodes.map(car => { const rows = []
let merchantBrandId = [] /*
car.children.forEach(item => { * 仅用「顶层车系 + 勾选中的二级叶子」组装,一车系一行。
if (getCheckedKeys.includes(item.id)) { * 原先用 half-checked 父级 + 全选父级 + 勾选叶子三套 concat,
merchantBrandId.push(item.id) * 在只选部分/全部叶子时同一车系会重复多行相同 cars。
*/
tree.forEach((series) => {
if (!series.children || !series.children.length) {
if (checkedKeysHas(getCheckedKeys, series.id)) {
const cars = toBrandInt(series.id)
if (cars !== undefined) {
rows.push({ cars, merchantBrandId: [] })
} }
})
return {
cars: car.id,
merchantBrandId
} }
}) return
let checkNodes = getCheckedNodes.filter(item => item.children)
let noCheckNodes = getCheckedNodes
.filter(item => item.children === null)
.map(i => {
return {
cars: i.id
} }
}) const merchantBrandId = this.collectMerchantBrandIdsFromSeriesNode(series, getCheckedKeys)
let merchantBrandList2 = checkNodes.map(car => { if (merchantBrandId.length) {
let merchantBrandId = [] const cars = toBrandInt(series.id)
car.children.forEach(item => { if (cars !== undefined) {
if (getCheckedKeys.includes(item.id)) { rows.push({ cars, merchantBrandId })
merchantBrandId.push(item.id)
} }
})
return {
cars: car.id,
merchantBrandId
} }
}) })
return merchantBrandList.concat(merchantBrandList2).concat(noCheckNodes) return rows
}, },
//勾选 //勾选
handleCheck() { handleCheck() {
...@@ -129,6 +149,7 @@ export default { ...@@ -129,6 +149,7 @@ export default {
if (this.$refs.tree.getCheckedKeys().length == this.treeArr.length) { if (this.$refs.tree.getCheckedKeys().length == this.treeArr.length) {
this.checkedAll = true this.checkedAll = true
} }
this.$emit('brand-change')
}, },
getCheckList(checkArr = []) { getCheckList(checkArr = []) {
checkArr.forEach(item => (item = parseInt(item))) checkArr.forEach(item => (item = parseInt(item)))
...@@ -165,6 +186,7 @@ export default { ...@@ -165,6 +186,7 @@ export default {
} }
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
this.$emit('brand-change')
}, 1000) }, 1000)
}, },
//重置 //重置
...@@ -172,6 +194,7 @@ export default { ...@@ -172,6 +194,7 @@ export default {
this.treeArr = [] this.treeArr = []
this.checkedAll = false this.checkedAll = false
this.$refs.tree.setCheckedKeys([]) this.$refs.tree.setCheckedKeys([])
this.$emit('brand-change')
}, },
//删除 //删除
removeItem(checkItem, index) { removeItem(checkItem, index) {
...@@ -193,6 +216,7 @@ export default { ...@@ -193,6 +216,7 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.loading = false this.loading = false
this.$emit('brand-change')
}) })
}, },
//过滤 //过滤
......
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog <el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose"
:title="title" :close-on-click-modal="false" :width="width" :append-to-body="appendToBody" :fullscreen="fullscreen">
:visible.sync="isVisible"
:show-close="showClose"
:before-close="handleClose"
:close-on-click-modal="false"
:width="width"
:append-to-body="appendToBody"
:fullscreen="fullscreen"
>
<span slot="title"> <span slot="title">
{{ title }} {{ title }}
<span class="dialog-sub-title"> <span class="dialog-sub-title">
...@@ -22,12 +14,8 @@ ...@@ -22,12 +14,8 @@
<slot name="btn-start" /> <slot name="btn-start" />
<el-button v-if="!noCancel" @click="handleClose"> 取消 </el-button> <el-button v-if="!noCancel" @click="handleClose"> 取消 </el-button>
<slot name="btn-middle" /> <slot name="btn-middle" />
<el-button <el-button type="primary" v-if="isShowFooter" @click="handleConfirm"
type="primary" :loading="$store.state.d2admin.loading.value">
v-if="isShowFooter"
@click="handleConfirm"
:loading="$store.state.d2admin.loading.value"
>
{{ btnOkLabel }} {{ btnOkLabel }}
</el-button> </el-button>
<slot name="btn-end" /> <slot name="btn-end" />
......
...@@ -135,6 +135,14 @@ ...@@ -135,6 +135,14 @@
:label="subItem[item.optionLabel]" :label="subItem[item.optionLabel]"
:value="subItem[item.optionId]" /> :value="subItem[item.optionId]" />
</el-select> </el-select>
<el-radio-group v-else-if="item.type === 'radio'"
v-model="searchForm[item.name]"
:style="{ width: item.width || '100%' }"
@change="item.changeAttr && item.changeAttr($event, item)">
<el-radio v-for="(subItem, subIndex) in item.optionList"
:key="subIndex"
:label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" <el-date-picker v-else-if="item.type === 'datePicker'"
v-model="searchForm[item.name]" v-model="searchForm[item.name]"
:clearable="item.isClear || false" :clearable="item.isClear || false"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
:form-rules="formRules" :form-rules="formRules"
:is-block="isBlock" :is-block="isBlock"
:label-width="labelWidth" :label-width="labelWidth"
:nested-modal-append-to-body="nestedModalAppendToBody"
@handleAddSelectTypeConfirm="handleAddSelectTypeConfirm" @handleAddSelectTypeConfirm="handleAddSelectTypeConfirm"
@handleEditSelectTypeConfirm="handleEditSelectTypeConfirm"> @handleEditSelectTypeConfirm="handleEditSelectTypeConfirm">
<template v-for="name in slotArr" #[name]> <template v-for="name in slotArr" #[name]>
...@@ -85,6 +86,11 @@ export default { ...@@ -85,6 +86,11 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
/** 表单内含地图/上传预览等内层弹窗时,外层已是 d2-dialog 则建议开启 */
nestedModalAppendToBody: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
......
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width" class="app-dialog"> <el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose"
:close-on-click-modal="false" append-to-body :modal-append-to-body="modalAppendToBody" :width="width" class="app-dialog">
<el-scrollbar v-if="hasScroll"> <el-scrollbar v-if="hasScroll">
<span slot="title"> <span slot="title">
<span class="main-title"></span> <span class="main-title">{{ title }}</span>
<span class="dialog-sub-title"> <span class="dialog-sub-title">
<slot name="sub-title"></slot> <slot name="sub-title"></slot>
</span> </span>
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
</el-scrollbar> </el-scrollbar>
<template v-if="!hasScroll"> <template v-if="!hasScroll">
<span slot="title"> <span slot="title">
<span class="main-title"></span> <span class="main-title">{{ title }}</span>
<span class="dialog-sub-title"> <span class="dialog-sub-title">
<slot name="sub-title"></slot> <slot name="sub-title"></slot>
</span> </span>
...@@ -23,9 +24,9 @@ ...@@ -23,9 +24,9 @@
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
<el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose"></el-button> <el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose">{{ btnCloseLabel }}</el-button>
<el-button type="default" v-if="!noCancel" :size="btnSize" @click="handleClose"></el-button> <el-button type="default" v-if="!noCancel" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button>
<el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm"></el-button> <el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
</div> </div>
</el-dialog> </el-dialog>
...@@ -90,6 +91,10 @@ export default { ...@@ -90,6 +91,10 @@ export default {
btnSize: { btnSize: {
type: String, type: String,
default: 'small' default: 'small'
},
modalAppendToBody: {
type: Boolean,
default: false
} }
}, },
......
/* MessageBox 挂在 body,与信息核验弹窗叠层共用;类名供确认 / 成功两种框 */
.el-message-box.merchant-submit-confirm-msgbox {
width: 440px;
padding-bottom: 10px;
.el-message-box__header {
padding: 12px 16px;
border-bottom: 1px solid #ebeef5;
}
.el-message-box__title {
font-size: 16px;
font-weight: 600;
color: #303133;
text-align: left;
}
.el-message-box__content {
padding: 20px 20px 12px;
}
.el-message-box__btns {
padding: 12px 16px;
border-top: 1px solid #ebeef5;
text-align: right;
.el-button {
padding: 8px 18px;
min-height: 32px;
line-height: 1;
}
}
}
.el-message-box.merchant-submit-success-msgbox {
width: 440px;
padding-bottom: 10px;
.el-message-box__header {
padding: 12px 16px;
border-bottom: 1px solid #ebeef5;
}
.el-message-box__title {
font-size: 16px;
font-weight: 600;
color: #303133;
text-align: left;
}
.el-message-box__content {
padding: 24px 24px;
}
.el-message-box__container {
display: flex;
flex-direction: column;
align-items: center;
padding-left: 0 !important;
}
.el-message-box__btns {
padding: 12px 16px;
border-top: 1px solid #ebeef5;
text-align: right;
.el-button {
padding: 8px 18px;
min-height: 32px;
line-height: 1;
}
}
.el-message-box__status {
position: static !important;
top: auto !important;
transform: none !important;
display: block;
margin: 0 auto 16px;
font-size: 56px !important;
padding-right: 0;
text-align: center;
}
.el-message-box__status + .el-message-box__message {
padding-left: 0 !important;
padding-right: 0 !important;
}
.el-message-box__message {
margin: 0;
padding: 0;
width: 100%;
text-align: center;
line-height: 22px;
font-size: 14px;
color: #606266;
}
}
/** 货架新增商户 / 潜客信息核验:提交前确认与创建成功 MessageBox */
export const MERCHANT_SUBMIT_CONFIRM_TITLE = "信息确认";
export const MERCHANT_SUBMIT_CONFIRM_MESSAGE =
"请确认商户信息无误,点击确认按钮后会同步账户中心生成商户账号!";
export const MERCHANT_CREATE_SUCCESS_TITLE = "提示";
export const MERCHANT_CREATE_SUCCESS_MESSAGE = "商户创建完成!";
export function showMerchantSubmitConfirm(vm) {
return vm.$confirm(
MERCHANT_SUBMIT_CONFIRM_MESSAGE,
MERCHANT_SUBMIT_CONFIRM_TITLE,
{
type: "warning",
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
customClass: "merchant-submit-confirm-msgbox",
}
);
}
export function showMerchantCreateSuccess(vm) {
return vm.$msgbox.alert(
MERCHANT_CREATE_SUCCESS_MESSAGE,
MERCHANT_CREATE_SUCCESS_TITLE,
{
type: "success",
confirmButtonText: "知道了",
customClass: "merchant-submit-success-msgbox",
}
);
}
<template> <template>
<div v-if="provinceView"> <div v-if="provinceView">
<el-form ref="provinceForm" :model="provinceForm" :inline="inline" label-width="154px" > <el-form ref="provinceForm" :model="provinceForm" :inline="inline" :class="{ 'province-city--embed': embedMode }"
<el-form-item :label="provinceLabel" > :label-width="embedMode ? '0px' : formLabelWidth" :style="embedFormCssVars">
<el-select size="small" v-model="provinceForm.provinceName" clearable placeholder="选择省份" @clear="selectProvince" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }"> <el-form-item :label="embedMode ? '' : provinceLabel">
<el-option v-for="(item, index) in AllData" :key="'province' + index" :label="item.name" :value="item.name" @click.native="selectProvince(item)"></el-option> <el-select size="small" v-model="provinceForm.provinceName" clearable placeholder="选择省份" @clear="selectProvince"
class="select-padding" :style="embedSelectWidthStyle" @blur.native="$emit('merchant-address-part-blur')">
<el-option v-for="(item, index) in AllData" :key="'province' + index" :label="item.name" :value="item.name"
@click.native="selectProvince(item)"></el-option>
</el-select> </el-select>
<el-select size="small" v-model="provinceForm.cityName" clearable placeholder="选择市" @clear="selectCity" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }"> <el-select size="small" v-model="provinceForm.cityName" clearable placeholder="选择市" @clear="selectCity"
<el-option v-for="(item, index) in cityList" :key="'city' + index" :label="item.name" :value="item.name" @click.native="selectCity(item)"></el-option> class="select-padding" :style="embedSelectWidthStyle" @blur.native="$emit('merchant-address-part-blur')">
<el-option v-for="(item, index) in cityList" :key="'city' + index" :label="item.name" :value="item.name"
@click.native="selectCity(item)"></el-option>
</el-select> </el-select>
<el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable placeholder="选择区" @clear="selectTown" class="select-padding" :style="{ width: subdistrict == 2 ? '52%' : '33.33%' }"> <el-select v-if="subdistrict == 3" size="small" v-model="provinceForm.townName" clearable placeholder="选择区"
<el-option v-for="(item, index) in townList" :key="'town' + index" :label="item.name" :value="item.name" @click.native="selectTown(item)"></el-option> @clear="selectTown" class="select-padding" :style="embedSelectWidthStyle" @blur.native="$emit('merchant-address-part-blur')">
<el-option v-for="(item, index) in townList" :key="'town' + index" :label="item.name" :value="item.name"
@click.native="selectTown(item)"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="detailAddressLabel" > <el-form-item :label="embedMode ? '' : detailAddressLabel">
<el-input size="small" v-if="mapView" readonly placeholder="请选择详细地址" v-model="provinceForm.fullAddress" class="map-input"> <el-input size="small" v-if="mapView" readonly placeholder="请选择详细地址" v-model="provinceForm.fullAddress"
class="map-input" @blur.native="$emit('merchant-address-part-blur')">
<el-button size="small" slot="append" @click="hanleSelectMap" icon="el-icon-location-outline"> <el-button size="small" slot="append" @click="hanleSelectMap" icon="el-icon-location-outline">
<!-- <img src="@/assets/map.png" alt="" class="map-icon" /> --> <!-- <img src="@/assets/map.png" alt="" class="map-icon" /> -->
<!-- <i class="gl-icon-location"></i> --> <!-- <i class="gl-icon-location"></i> -->
...@@ -21,7 +29,7 @@ ...@@ -21,7 +29,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<GLDialog :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址"> <GLDialog :append-to-body="true" :visible.sync="dialogMapVisible" :mode="'big'" bigTitle="选择地址">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> <map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogMapVisible = false">取 消</el-button> <el-button size="small" @click="dialogMapVisible = false">取 消</el-button>
...@@ -81,6 +89,39 @@ export default { ...@@ -81,6 +89,39 @@ export default {
detailAddressLabel: { detailAddressLabel: {
type: String, type: String,
default: '详细地址:' default: '详细地址:'
},
// 表单 label 宽度(与外层 glsx-combi-form 对齐时用默认;嵌入弹窗无内层标题时可配合 embedMode)
formLabelWidth: {
type: String,
default: '154px'
},
/** 嵌入外层表单项时使用:不占内层 label 区,由外层展示「商户地址」等 */
embedMode: {
type: Boolean,
default: false
},
/**
* 嵌入模式下列宽(px 数字或带单位字符串),通过 --pc-embed-select-w 生效。
*/
embedSelectWidth: {
type: [String, Number],
default: 108
}
},
computed: {
/** 非嵌入模式:省市下拉用百分比宽度 */
embedSelectWidthStyle() {
if (this.embedMode) {
return {};
}
return { width: this.subdistrict == 2 ? "52%" : "33.33%" };
},
/** 嵌入模式:用变量控制宽度(见 .province-city--embed .select-padding),可被父组件 prop 覆盖 */
embedFormCssVars() {
if (!this.embedMode) return {}
const w = this.embedSelectWidth
const val = typeof w === 'number' ? `${w}px` : String(w || '108px')
return { '--pc-embed-select-w': val }
} }
}, },
data() { data() {
...@@ -272,9 +313,16 @@ export default { ...@@ -272,9 +313,16 @@ export default {
this.provinceForm.provinceName = province this.provinceForm.provinceName = province
this.provinceForm.cityName = city this.provinceForm.cityName = city
this.provinceForm.townName = district this.provinceForm.townName = district
this.provinceForm.provinceCode = +((adcode + '').slice(0,3) + '000') this.provinceForm.provinceCode = +((adcode + '').slice(0, 3) + '000')
this.provinceForm.cityCode = adcode this.provinceForm.cityCode = adcode
this.provinceForm.townCode = town_code const tcFallback =
town_code != null && town_code !== ''
? town_code
: adcode != null && adcode !== ''
? adcode
: ''
this.provinceForm.townCode =
tcFallback !== '' ? String(tcFallback) : ''
} }
var fullAddress = '' var fullAddress = ''
var provincecode = '' var provincecode = ''
...@@ -322,6 +370,20 @@ export default { ...@@ -322,6 +370,20 @@ export default {
return return
} }
} }
// 地图确认后同步区级编码:逆地理常不带 town_code,用区级 adcode 兜底,避免外层表单校验缺少 districtCode 仍飘红
const md = mapData || {}
const tcMerged =
md.town_code != null && md.town_code !== ''
? String(md.town_code)
: md.adcode != null && md.adcode !== ''
? String(md.adcode)
: ''
if (tcMerged) {
this.provinceForm.townCode = tcMerged
}
if (town && String(this.provinceForm.townName || '').trim() === '') {
this.provinceForm.townName = town
}
this.provinceForm.fullAddress = this.$refs.mapForm.address this.provinceForm.fullAddress = this.$refs.mapForm.address
this.dialogMapVisible = false this.dialogMapVisible = false
// this.subdistrict == 2 ? this.init(province, city) : this.init(province, city, town) // this.subdistrict == 2 ? this.init(province, city) : this.init(province, city, town)
...@@ -339,30 +401,56 @@ export default { ...@@ -339,30 +401,56 @@ export default {
// } // }
.select-padding { .select-padding {
width: 120px !important; width: 120px !important;
&:nth-child(1) { &:nth-child(1) {
margin-left: 0; margin-left: 0;
} }
margin-left: 10px; margin-left: 10px;
} }
/* 嵌入模式:固定列宽(勿用 width:auto!important,会覆盖业务父级 scoped 样式) */
.province-city--embed .select-padding.el-select {
width: var(--pc-embed-select-w, 108px) !important;
max-width: var(--pc-embed-select-w, 108px) !important;
min-width: 0 !important;
margin-left: 0 !important;
flex-shrink: 0;
}
.province-city--embed .select-padding.el-select .el-input {
width: 100% !important;
}
.map-input { .map-input {
margin-top: 10px;
// margin-top: 10px;
::v-deep .el-input__inner { ::v-deep .el-input__inner {
border-right: none; border-right: none;
} }
} }
::v-deep { ::v-deep {
.el-input-group__append { .el-input-group__append {
background-color: #fff; background-color: #fff;
padding: 0 11px; padding: 0 11px;
} }
.el-form-item__content { .el-form-item__content {
width: 400px !important; width: 400px !important;
display: flex; display: flex;
margin-left: 0 !important; margin-left: 0 !important;
} }
.province-city--embed .el-form-item__content {
width: auto !important;
max-width: 100% !important;
}
.el-form-item { .el-form-item {
display: flex; display: flex;
} }
.el-dialog__body { .el-dialog__body {
padding: 20px 10px 30px !important; padding: 20px 10px 30px !important;
} }
......
...@@ -84,6 +84,10 @@ import { findMerchantListByPage, brandList as getBrandListApi, getMerchantType a ...@@ -84,6 +84,10 @@ import { findMerchantListByPage, brandList as getBrandListApi, getMerchantType a
import { deepClone, Util } from "@/common/util"; import { deepClone, Util } 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 {
showMerchantCreateSuccess,
showMerchantSubmitConfirm,
} from "@/components/merchantVerify/merchantVerifyDialogs";
export default { export default {
name: "AddMerchant", name: "AddMerchant",
...@@ -528,31 +532,38 @@ export default { ...@@ -528,31 +532,38 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validateField("merchantAddress"); this.$refs.editFormRef.$refs[this.editChildRef].validateField("merchantAddress");
}, },
handleConfirm() { handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate(async (valid) => {
if (valid) { if (!valid) {
// 判断主营品牌 return;
}
const merchantBrandList = this.$refs.brandListTree.getMerchantBrandList(); const merchantBrandList = this.$refs.brandListTree.getMerchantBrandList();
if (!merchantBrandList?.length) { if (!merchantBrandList?.length) {
this.loading = false;
this.$message({ this.$message({
message: "请选择主营品牌", message: "请选择主营品牌",
type: "error", type: "error",
}); });
return; return;
} }
let params = deepClone(this.editData); try {
await showMerchantSubmitConfirm(this);
} catch {
return;
}
const params = deepClone(this.editData);
params.merchantBrandListJson = JSON.stringify(merchantBrandList); params.merchantBrandListJson = JSON.stringify(merchantBrandList);
params.status = 2; params.status = 2;
params.isloginName = 0; params.isloginName = 0;
this.loading = true; this.loading = true;
saveMerchant(params).then((res) => { try {
this.$message.success("操作成功"); await saveMerchant(params);
await showMerchantCreateSuccess(this);
this.$EventBus.$emit("updateMerchant"); this.$EventBus.$emit("updateMerchant");
this.$emit("handleClose"); this.$emit("handleClose");
}).finally(() => { } catch (e) {
/* 失败由全局封装提示 */
} finally {
this.loading = false; this.loading = false;
});
} }
}); });
}, },
...@@ -560,6 +571,10 @@ export default { ...@@ -560,6 +571,10 @@ export default {
}; };
</script> </script>
<style lang="scss">
@import "@/components/merchantVerify/merchantSubmitMsgbox.scss";
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.drawer-container { ::v-deep.drawer-container {
.el-drawer__header { .el-drawer__header {
......
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
:form-rules="formRules" :form-rules="formRules"
glsx-combi-form glsx-combi-form
:is-block="isBlock" :is-block="isBlock"
:label-width="labelWidth"> :label-width="labelWidth"
:nested-modal-append-to-body="true">
<template #fileHtml> <template #fileHtml>
<el-row> <el-row>
<el-col :span="19"> <el-col :span="19">
......
...@@ -39,15 +39,16 @@ ...@@ -39,15 +39,16 @@
<div slot="auth-button" slot-scope="scope" width="400"> <div slot="auth-button" slot-scope="scope" width="400">
<!-- 首次绑定 / 重新绑定 --> <!-- 首次绑定 / 重新绑定 -->
<span <span
v-if="[4].includes(scope.scope.potentialCustomersStatus) || ([3].includes(scope.scope.potentialCustomersStatus) && scope.scope.isBind == '1')" v-if="[4].includes(scope.scope.potentialCustomersStatus) || ([3].includes(scope.scope.potentialCustomersStatus) && scope.scope.isBind == 1)"
style="margin-right: 10px"> style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9210102']" /> <auth-button :data="scope.scope" :show-btn-ids="['9210102']" />
</span> </span>
<!-- 信息核验 --> <!-- 信息核验(已签约且未完成核验) -->
<span v-if="([3].includes(scope.scope.potentialCustomersStatus) && scope.scope.isBind == '0')" <!-- <span
style="margin-right: 10px"> v-if="[3].includes(scope.scope.potentialCustomersStatus) && scope.scope.isBind == 0"
style="margin-right: 10px"> -->
<auth-button :data="scope.scope" :show-btn-ids="['9210104']" /> <auth-button :data="scope.scope" :show-btn-ids="['9210104']" />
</span> <!-- </span> -->
<!-- 详情 --> <!-- 详情 -->
<span> <span>
<auth-button :data="scope.scope" :show-btn-ids="['9210103']" /> <auth-button :data="scope.scope" :show-btn-ids="['9210103']" />
...@@ -59,42 +60,18 @@ ...@@ -59,42 +60,18 @@
<!-- 查看 --> <!-- 查看 -->
<customer-detail-dialog :detail-visible="detailVisible" :record-info="recordInfo" v-if="detailVisible" <customer-detail-dialog :detail-visible="detailVisible" :record-info="recordInfo" v-if="detailVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" />
<!-- 首次绑定 / 重新绑定 --> <!-- 信息核验 -->
<info-verify-merchant-dialog <info-verify-merchant-dialog :visible.sync="infoVerifyVisible" :customer-row="infoVerifyRow"
:visible.sync="infoVerifyVisible" :submit-api="infoVerifySubmit" :merchant-type-labels="['4S店']" dialog-title="信息核验" dialog-width="1080px"
:customer-row="infoVerifyRow" @success="handleSearch">
:submit-api="infoVerifySubmit"
:merchant-type-labels="['4S店']"
@success="handleSearch"
>
<template #storeDetail="{ customerRow }"> <template #storeDetail="{ customerRow }">
<div <potential-customer-store-detail-section v-if="customerRow && customerRow.id != null"
v-if="customerRow && customerRow.id" :record-id="customerRow.id" :show-visit-record="false" :show-section-title="true" />
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> </template>
</info-verify-merchant-dialog> </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"
dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData" :slotArr="slotArr" label-width="104px" dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData"
:base-data="baseData" @handleClose="editVisible = false" @handleConfirm="handleEditConfirm"> :slotArr="slotArr" :base-data="baseData" @handleClose="editVisible = false" @handleConfirm="handleEditConfirm">
<template #merchantMutilHtml> <template #merchantMutilHtml>
<el-select v-model="editData[editFormData[1].name]" :placeholder="editFormData[1].placeholder" <el-select v-model="editData[editFormData[1].name]" :placeholder="editFormData[1].placeholder"
@change="editFormData[1].changeAttr" style="width: 274px" filterable remote reserve-keyword @change="editFormData[1].changeAttr" style="width: 274px" filterable remote reserve-keyword
...@@ -115,6 +92,7 @@ import { busTypeOpt, cooperModeOpt, flowSituateOpt, potentialCustomerOpt } from ...@@ -115,6 +92,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 PotentialCustomerStoreDetailSection from '../components/PotentialCustomerStoreDetailSection.vue'
import InfoVerifyMerchantDialog from '@/components/merchantVerify/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"
...@@ -266,15 +244,14 @@ export default { ...@@ -266,15 +244,14 @@ export default {
{ {
label: '信息核验', label: '信息核验',
name: 'isBind', name: 'isBind',
type: 'select', type: 'radio',
optionList: [ optionList: [
{ value: '', label: '全部' }, { value: '', label: '全部' },
{ value: '1', label: '是' }, { value: '1', label: '是' },
{ value: '0', label: '否' } { value: '0', label: '否' }
], ],
optionId: 'value', optionId: 'value',
optionLabel: 'label', optionLabel: 'label'
isClear: true
}, },
{ {
label: '门店名称', label: '门店名称',
...@@ -325,7 +302,12 @@ export default { ...@@ -325,7 +302,12 @@ export default {
prop: 'merchantName', prop: 'merchantName',
width: '120px', width: '120px',
formatter: (cellValue) => { formatter: (cellValue) => {
return ((cellValue.merchantName || '') + (cellValue.merchantId ? ('(' + cellValue.merchantId + ')') : '')) || '-' // 仅已签约且已完成信息核验时展示商户名与商户号
if (cellValue.potentialCustomersStatus != 3 || cellValue.isBind != 1) return '-'
const text =
(cellValue.merchantName || '') +
(cellValue.merchantId ? '(' + cellValue.merchantId + ')' : '')
return text || '-'
} }
}, { }, {
label: '业务类型', label: '业务类型',
...@@ -393,8 +375,9 @@ export default { ...@@ -393,8 +375,9 @@ export default {
label: '信息核验', label: '信息核验',
prop: 'isBind', prop: 'isBind',
formatter: (cellValue) => { formatter: (cellValue) => {
if (cellValue.isBind === 1) return '是' if (cellValue.potentialCustomersStatus != 3) return '-'
if (cellValue.isBind === 0) return '否' if (cellValue.isBind == 1) return '是'
if (cellValue.isBind == 0) return '否'
return '-' return '-'
} }
}] }]
...@@ -484,6 +467,7 @@ export default { ...@@ -484,6 +467,7 @@ export default {
components: { components: {
CustomerDetailDialog, CustomerDetailDialog,
PotentialCustomerStoreDetailSection,
InfoVerifyMerchantDialog InfoVerifyMerchantDialog
}, },
directives: { directives: {
...@@ -696,6 +680,7 @@ export default { ...@@ -696,6 +680,7 @@ export default {
}, },
handleExport() { handleExport() {
// 导出入参与列表一致(含 isBind、storeName、merchantName);「信息核验」列由服务端导出模板配置并与列表口径一致。
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.sale.potentialCustomers.export.async' params.method = 'dj.api.smartcarlife.sale.potentialCustomers.export.async'
const list = [ const list = [
...@@ -819,41 +804,4 @@ export default { ...@@ -819,41 +804,4 @@ 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>
...@@ -359,6 +359,8 @@ export default { ...@@ -359,6 +359,8 @@ export default {
return i === -1 ? 0 : i return i === -1 ? 0 : i
}, },
sceneLabel() { sceneLabel() {
const name = this.routerInfo.baseSceneName
if (name != null && String(name).trim() !== "") return String(name).trim()
const scene = this.routerInfo.scene const scene = this.routerInfo.scene
if (scene == null || scene === "") return "—" if (scene == null || scene === "") return "—"
const label = this.sceneList[scene] const label = this.sceneList[scene]
......
...@@ -553,7 +553,7 @@ export default { ...@@ -553,7 +553,7 @@ export default {
if (arr[0]?.categoryType == 2) { if (arr[0]?.categoryType == 2) {
const length = arr.length - 1 const length = arr.length - 1
text = arr.reduce((str, item, index) => { text = arr.reduce((str, item, index) => {
str += `${item.upgradeGoodsName}(${item.commodityCode})${index == length ? "" : "、"}` str += `${item.upgradeGoodsName}(${item.merchantGoodsCode ?? ""})${index == length ? "" : "、"}`
return str return str
}, '') }, '')
return text return text
......
...@@ -584,7 +584,7 @@ export default { ...@@ -584,7 +584,7 @@ export default {
if (arr[0]?.categoryType == 2) { if (arr[0]?.categoryType == 2) {
const length = arr.length - 1 const length = arr.length - 1
text = arr.reduce((str, item, index) => { text = arr.reduce((str, item, index) => {
str += `${item.upgradeGoodsName}(${item.commodityCode})${ str += `${item.upgradeGoodsName}(${item.merchantGoodsCode ?? ""})${
index == length ? "" : "、" index == length ? "" : "、"
}` }`
return str return str
......
...@@ -245,6 +245,8 @@ export default { ...@@ -245,6 +245,8 @@ export default {
}, },
/** A1:避免模板每次渲染调用方法;scene 缺失时安全展示 */ /** A1:避免模板每次渲染调用方法;scene 缺失时安全展示 */
sceneLabel() { sceneLabel() {
const name = this.merchantRow?.baseSceneName
if (name != null && String(name).trim() !== "") return String(name).trim()
const key = this.merchantRow?.scene const key = this.merchantRow?.scene
if (key == null || key === "") return "-" if (key == null || key === "") return "-"
const label = this.sceneList[key] const label = this.sceneList[key]
......
...@@ -558,7 +558,7 @@ export default { ...@@ -558,7 +558,7 @@ export default {
if (arr[0]?.categoryType == 2) { if (arr[0]?.categoryType == 2) {
const length = arr.length - 1 const length = arr.length - 1
text = arr.reduce((str, item, index) => { text = arr.reduce((str, item, index) => {
str += `${item.upgradeGoodsName}(${item.commodityCode})${index == length ? "" : "、"}` str += `${item.upgradeGoodsName}(${item.merchantGoodsCode ?? ""})${index == length ? "" : "、"}`
return str return str
}, '') }, '')
return text return text
......
...@@ -678,7 +678,7 @@ export default { ...@@ -678,7 +678,7 @@ export default {
if (arr[0]?.categoryType == 2) { if (arr[0]?.categoryType == 2) {
const length = arr.length - 1 const length = arr.length - 1
text = arr.reduce((str, item, index) => { text = arr.reduce((str, item, index) => {
str += `${item.upgradeGoodsName}(${item.commodityCode})${ str += `${item.upgradeGoodsName}(${item.merchantGoodsCode ?? ""})${
index == length ? "" : "、" index == length ? "" : "、"
}` }`
return str return str
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="merchant-checkdetail"> <div class="merchant-checkdetail">
<div class="merchant-title"> <div class="merchant-title">
<span>商户名称:{{ merchantRow.merchantName }}</span> <span>商户名称:{{ merchantRow.merchantName }}</span>
<span>业务场景:{{ sceneList[merchantRow.sceneType] }}</span> <span>业务场景:{{ sceneDisplayLabel }}</span>
<span>类型:{{ ruleReviewType[merchantRow.ruleType] }}</span> <span>类型:{{ ruleReviewType[merchantRow.ruleType] }}</span>
<span>生效时间:{{ merchantRow.effectStartDateShow }}</span> <span>生效时间:{{ merchantRow.effectStartDateShow }}</span>
</div> </div>
...@@ -106,7 +106,16 @@ export default { ...@@ -106,7 +106,16 @@ export default {
ledgerAccount, ledgerAccount,
reconciliation reconciliation
}, },
computed: {} computed: {
sceneDisplayLabel() {
const name = this.merchantRow?.baseSceneName
if (name != null && String(name).trim() !== "") return String(name).trim()
const key = this.merchantRow?.sceneType
if (key == null || key === "") return "—"
const label = this.sceneList[key]
return label != null && label !== "" ? label : "—"
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
</div> </div>
<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" <el-button type="primary" size="small" @click="openInfoVerifyDialog">
size="small"
@click="openInfoVerifyDialog">
新增 新增
</el-button> </el-button>
</d2-table-header> </d2-table-header>
...@@ -26,18 +24,14 @@ ...@@ -26,18 +24,14 @@
<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" <info-verify-merchant-dialog :visible.sync="infoVerifyVisible" :customer-row="null" :submit-api="submitInfoVerifyMerchant"
:customer-row="null" :merchant-type-labels="['服务商']" @success="onInfoVerifySuccess" />
: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, createMerchantWithPermissions } from '@api/serviceManage'
import { potentialCustomersInfoVerify } from '@api/salesManagement'
import InfoVerifyMerchantDialog from '@/components/merchantVerify/InfoVerifyMerchantDialog.vue' 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"
...@@ -180,7 +174,6 @@ export default { ...@@ -180,7 +174,6 @@ export default {
}] }]
}, },
infoVerifyVisible: false, infoVerifyVisible: false,
infoVerifySubmit: potentialCustomersInfoVerify
} }
}, },
...@@ -216,6 +209,13 @@ export default { ...@@ -216,6 +209,13 @@ export default {
onInfoVerifySuccess() { onInfoVerifySuccess() {
this.$refs.serviceStoreTable.refreshTable() this.$refs.serviceStoreTable.refreshTable()
}, },
/** 服务商新增提交:merchantType=7 */
submitInfoVerifyMerchant(params) {
return createMerchantWithPermissions({
...params,
merchantType: 7
})
},
// 编辑服务商 // 编辑服务商
handleEdit(row) { handleEdit(row) {
this.close({ tagName: '/editService' }) this.close({ tagName: '/editService' })
......
<!-- 服务商管理 --> <!-- 服务商管理 -->
<template> <template>
<d2-container class="service-manage"> <d2-container class="service-manage">
<div class="header" <div class="header" slot="header">
slot="header"> <d2-search ref="showSearch" class="show-search" label-width="100px" :search-form="searchForm"
<d2-search ref="showSearch"
class="show-search"
label-width="100px"
:search-form="searchForm"
:form-data="showFormData" /> :form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
</div> </div>
<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" <el-button type="primary" size="small" @click="openInfoVerifyDialog">
size="small"
@click="openInfoVerifyDialog">
新增 新增
</el-button> </el-button>
<auth-button category="Button" /> <!-- <auth-button category="Button" /> -->
</d2-table-header> </d2-table-header>
<d2-table ref="serviceStoreTable" <d2-table ref="serviceStoreTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope">
slot-scope="scope"
:data="scope.scope">
</auth-button> </auth-button>
</d2-table> </d2-table>
<qrcode-dialog :q-rcode-visible="qRcodeVisible" <qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible"
:info="recordInfo"
v-if="qRcodeVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" />
</div> </div>
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" <wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" v-if="QRcodeDialog" :merchant-info="recordInfo" />
v-if="QRcodeDialog" <scene-entry-dialog :scene-entry-visible="sceneEntryVisible" :info="recordInfo" v-if="sceneEntryVisible"
:merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible"
:info="recordInfo"
v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose" /> @dialogClose="sceneDialogClose" />
<info-verify-merchant-dialog :visible.sync="infoVerifyVisible" <info-verify-merchant-dialog :visible.sync="infoVerifyVisible" :customer-row="null" :submit-api="submitInfoVerifyMerchant"
:customer-row="null" :merchant-type-labels="['园区店']" @success="onInfoVerifySuccess" />
: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, createMerchantWithPermissions } from '@api/serviceManage'
import { potentialCustomersInfoVerify } from '@api/salesManagement'
import InfoVerifyMerchantDialog from '@/components/merchantVerify/InfoVerifyMerchantDialog.vue' 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'
...@@ -236,7 +212,6 @@ export default { ...@@ -236,7 +212,6 @@ export default {
recordInfo: {}, recordInfo: {},
sceneEntryVisible: false, sceneEntryVisible: false,
infoVerifyVisible: false, infoVerifyVisible: false,
infoVerifySubmit: potentialCustomersInfoVerify
} }
}, },
...@@ -338,6 +313,13 @@ export default { ...@@ -338,6 +313,13 @@ export default {
onInfoVerifySuccess() { onInfoVerifySuccess() {
this.$refs.serviceStoreTable.refreshTable() this.$refs.serviceStoreTable.refreshTable()
}, },
/** 园区店新增提交:merchantType=6 */
submitInfoVerifyMerchant(params) {
return createMerchantWithPermissions({
...params,
merchantType: 6
})
},
// 上架 // 上架
handleLaunch(row) { handleLaunch(row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!