Commit ed0c0b60 by Jaxon

feat: 嘀加上架 - 运营确认与查看 - 流量方模块 - UI对齐

1 parent 78ed6e9b
...@@ -59,6 +59,6 @@ export default { ...@@ -59,6 +59,6 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.detail-wrapper { .detail-wrapper {
padding-top: 20px; padding: 20px;
} }
</style> </style>
...@@ -3,23 +3,31 @@ ...@@ -3,23 +3,31 @@
<div class="modify-wrapper"> <div class="modify-wrapper">
<glsx-combi-form ref="trafficFromRef" <glsx-combi-form ref="trafficFromRef"
class="edit-form-container" class="edit-form-container"
default-width="314px"
:form-data="schema" :form-data="schema"
:form-obj="trafficForm" :form-obj="trafficForm"
:form-rules="rules" :form-rules="rules"
label-width="250px"> default-width="100%"
label-width="208px">
<template #merchantId="scope"> <template #merchantId="scope">
<div> <div class="merchant-wrapper">
<div class="select-wrapper">
<el-select v-model="trafficForm[scope.scope.name]" <el-select v-model="trafficForm[scope.scope.name]"
disabled disabled
:placeholder="scope.scope.placeholder" :placeholder="scope.scope.placeholder">
style="width: 314px">
<el-option v-for="subItem in scope.scope.optionList" <el-option v-for="subItem in scope.scope.optionList"
:key="subItem[scope.scope.optionId]" :key="subItem[scope.scope.optionId]"
:label="subItem[scope.scope.optionLabel]" :label="subItem[scope.scope.optionLabel]"
:value="subItem[scope.scope.optionId]"> :value="subItem[scope.scope.optionId]">
</el-option> </el-option>
</el-select> </el-select>
</div>
<div class="actions-wrapper">
<el-button type="text">
新建
</el-button>
</div>
</div> </div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
...@@ -95,7 +103,21 @@ export default { ...@@ -95,7 +103,21 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.modify-wrapper { .modify-wrapper {
padding-top: 20px; padding: 20px;
.merchant-wrapper {
display: flex;
overflow: hidden;
.select-wrapper {
flex: 1;
}
> ::v-deep .actions-wrapper {
flex-shrink: 0;
.el-button {
padding: 0 12px;
}
}
}
} }
.shop-merchant-info { .shop-merchant-info {
.add-mer-btn { .add-mer-btn {
......
...@@ -50,17 +50,17 @@ export const ShopMerchantInfoFormRules = { ...@@ -50,17 +50,17 @@ export const ShopMerchantInfoFormRules = {
], ],
}; };
// TODO: 修改this
export const ShopMerchantFormData = [ export const ShopMerchantFormData = [
{ {
label: "流量方信息", label: "流量方信息",
name: "merchantId", name: "merchantId",
addHtml: "merchantId", addHtml: "merchantId",
style: { width: "calc( 50% - 30px )" },
placeholder: "请选择流量方信息", placeholder: "请选择流量方信息",
optionList: [], optionList: [],
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
style: { width: "50%" },
optionsName: "merchantList", optionsName: "merchantList",
searchKey: "merchantIdName", searchKey: "merchantIdName",
}, },
...@@ -68,7 +68,8 @@ export const ShopMerchantFormData = [ ...@@ -68,7 +68,8 @@ export const ShopMerchantFormData = [
label: "集团(上级商户)", label: "集团(上级商户)",
name: "parentMerchantName", name: "parentMerchantName",
type: "input", type: "input",
style: { width: "calc( 50% - 30px )" }, style: { width: "50%" },
placeholder: "选择流量方后自动获取", placeholder: "选择流量方后自动获取",
isDisabled: true, isDisabled: true,
}, },
...@@ -76,8 +77,9 @@ export const ShopMerchantFormData = [ ...@@ -76,8 +77,9 @@ export const ShopMerchantFormData = [
label: "业务模式", label: "业务模式",
name: "businessMode", name: "businessMode",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
optionList: businessModeList, optionList: businessModeList,
style: { width: "50%" },
optionId: "confId", optionId: "confId",
optionLabel: "confName", optionLabel: "confName",
optionsName: "businessModeList", optionsName: "businessModeList",
...@@ -86,8 +88,9 @@ export const ShopMerchantFormData = [ ...@@ -86,8 +88,9 @@ export const ShopMerchantFormData = [
label: "签约主体", label: "签约主体",
name: "contractingMerchantId", name: "contractingMerchantId",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
optionList: [], optionList: [],
style: { width: "50%" },
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
optionsName: "contractMerList", optionsName: "contractMerList",
...@@ -96,9 +99,10 @@ export const ShopMerchantFormData = [ ...@@ -96,9 +99,10 @@ export const ShopMerchantFormData = [
label: "业务场景", label: "业务场景",
name: "sceneType", name: "sceneType",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
isDisabled: true, isDisabled: true,
optionList: sceneCodeList, optionList: sceneCodeList,
style: { width: "50%" },
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "sceneCodeList", optionsName: "sceneCodeList",
...@@ -107,24 +111,27 @@ export const ShopMerchantFormData = [ ...@@ -107,24 +111,27 @@ export const ShopMerchantFormData = [
label: "园区店", label: "园区店",
name: "yqMerchantId", name: "yqMerchantId",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
optionList: [], optionList: [],
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
style: { width: "50%" },
optionsName: "yqMerchantList", optionsName: "yqMerchantList",
}, },
{ {
style: { width: "50%" },
label: "预估流量/月", label: "预估流量/月",
name: "estimatedFlow", name: "estimatedFlow",
type: "input", type: "input",
style: { width: "calc( 50% - 30px )" },
maxlength: 6, maxlength: 6,
}, },
{ {
label: "预估转化率", label: "预估转化率",
name: "estimatedUpgradeRate", name: "estimatedUpgradeRate",
type: "input", type: "input",
style: { width: "calc( 50% - 30px )" }, style: { width: "50%" },
maxlength: 6, maxlength: 6,
append: "%", append: "%",
}, },
...@@ -132,37 +139,41 @@ export const ShopMerchantFormData = [ ...@@ -132,37 +139,41 @@ export const ShopMerchantFormData = [
label: "运营模式", label: "运营模式",
name: "operationMode", name: "operationMode",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
optionList: operationModeList, optionList: operationModeList,
optionId: "confId", optionId: "confId",
optionLabel: "confName", optionLabel: "confName",
optionsName: "operationModeList", optionsName: "operationModeList",
style: { width: "50%" },
}, },
{ {
label: "服务商", label: "服务商",
name: "partnerMerchantId", name: "partnerMerchantId",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
isDisabled: false, isDisabled: false,
optionList: [], optionList: [],
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
optionsName: "partnerMerchantList", optionsName: "partnerMerchantList",
style: { width: "50%" },
}, },
{ {
label: "上级服务商", label: "上级服务商",
name: "parentPartnerMerchantName", name: "parentPartnerMerchantName",
style: { width: "50%" },
type: "input", type: "input",
style: { width: "calc( 50% - 30px )" },
maxlength: 50, maxlength: 50,
}, },
{ {
label: "一线阳光是否开启线上积分", label: "一线阳光是否开启线上积分",
name: "firstLineSunshineOnlinePointsFlag", name: "firstLineSunshineOnlinePointsFlag",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" },
optionList: onlinePointsEnabledList, optionList: onlinePointsEnabledList,
optionId: "confId", optionId: "confId",
style: { width: "50%" },
optionLabel: "confName", optionLabel: "confName",
optionsName: "onlinePointsEnabledList", optionsName: "onlinePointsEnabledList",
}, },
...@@ -170,7 +181,7 @@ export const ShopMerchantFormData = [ ...@@ -170,7 +181,7 @@ export const ShopMerchantFormData = [
label: "一线阳光2是否开启线上积分", label: "一线阳光2是否开启线上积分",
name: "firstLineSunshine2OnlinePointsFlag", name: "firstLineSunshine2OnlinePointsFlag",
type: "select", type: "select",
style: { width: "calc( 50% - 30px )" }, style: { width: "50%" },
optionList: onlinePointsEnabledList, optionList: onlinePointsEnabledList,
optionId: "confId", optionId: "confId",
optionLabel: "confName", optionLabel: "confName",
......
<template> <template>
<div class="edit-page traffic-source-wrapper"> <div class="edit-page traffic-source-wrapper">
<div class="title"> <div class="title-wrapper">
<span>流量方信息</span> <span class="title">流量方信息</span>
<div class="select-wrapper">
<RemoteSelect v-model="tabsActive"
class="tab-select"
:fetch-api="getTrafficOptions"
placeholder="请输入相关名称以搜索"
value-key="id"
:option-props="(subItem) => ({
label: `${subItem.merchantName}`,
})"
:multiple="false"
:collapse-tags="false" />
</div>
<!-- TODO: 虚拟化滚动 --> <!-- TODO: 虚拟化滚动 -->
<el-select v-model="tabsActive"
<!-- <el-select v-model="tabsActive"
class="tab-select" class="tab-select"
filterable
:loading="tabs.loading"
placeholder="请选择流量方"
:popper-append-to-body="false" :popper-append-to-body="false"
remote
:remote-method="handleSearchTrafficSource"> :remote-method="handleSearchTrafficSource">
<el-option v-for="item in merchantList" <el-option v-for="item in merchantList"
:key="item.id" :key="item.id"
...@@ -17,9 +26,31 @@ ...@@ -17,9 +26,31 @@
:value="item.id"> :value="item.id">
<span>{{ item.merchantName }}</span> <span>{{ item.merchantName }}</span>
</el-option> </el-option>
</el-select> </el-select> -->
<div class="actions-wrapper">
<el-button v-if="mode === VIEW_MODE.VIEW" plain>
<span class="el-icon-plus"></span>
新增
</el-button>
</div>
</div>
<div class="content-wrapper">
<div class="actions-wrapper">
<el-button v-if="mode === VIEW_MODE.VIEW"
plain
style="width:160px"
type="primary"
@click="handleChangeMode">
编辑
</el-button>
<el-button v-else
style="width:160px"
type="primary"
@click="handleChangeMode">
保存
</el-button>
</div> </div>
<div class="content">
<div class="tabs-wrapper"> <div class="tabs-wrapper">
<Detail v-if="mode === VIEW_MODE.VIEW" <Detail v-if="mode === VIEW_MODE.VIEW"
:schema="trafficFromSchema" :schema="trafficFromSchema"
...@@ -32,10 +63,6 @@ ...@@ -32,10 +63,6 @@
:traffic-form="currentTraffic" /> :traffic-form="currentTraffic" />
</div> </div>
<el-button @click="handleChangeMode">
编辑
</el-button>
</div> </div>
</div> </div>
...@@ -46,6 +73,8 @@ import { getPlatformMerchantList } from "@api/index"; ...@@ -46,6 +73,8 @@ import { getPlatformMerchantList } from "@api/index";
import { getServiceList, getyqMerchantList, serviceGetMerchantList } from "@api/merchant"; import { getServiceList, getyqMerchantList, serviceGetMerchantList } from "@api/merchant";
import { uniqBy } from "lodash-es"; import { uniqBy } from "lodash-es";
import { mapActions } from "vuex"; import { mapActions } from "vuex";
import { getBusisDetailBasic as getBusinessDetailBasicApi } from "@/api/shelfManage.js";
import RemoteSelect from "@/components/remoteSearchSelect/index.vue";
import { VIEW_MODE } from "../../constant/baseData.js"; import { VIEW_MODE } from "../../constant/baseData.js";
import Detail from "./components/detail/index.vue"; import Detail from "./components/detail/index.vue";
import Modify from "./components/modify/index.vue"; import Modify from "./components/modify/index.vue";
...@@ -56,6 +85,7 @@ export default { ...@@ -56,6 +85,7 @@ export default {
components: { components: {
Modify, Modify,
Detail, Detail,
RemoteSelect,
}, },
props: { props: {
shelveId: { shelveId: {
...@@ -93,7 +123,7 @@ export default { ...@@ -93,7 +123,7 @@ export default {
computed: { computed: {
tabsActive: { tabsActive: {
get() { get() {
return this.tabs.active || (this.merchantList.length ? this.merchantList?.[0]?.id : undefined); return this.tabs.active || (this.merchantList.length ? this.merchantList?.[0]?.id : "");
}, },
set(val) { set(val) {
this.tabs.active = val; this.tabs.active = val;
...@@ -119,13 +149,19 @@ export default { ...@@ -119,13 +149,19 @@ export default {
handleSearchTrafficSource() {}, handleSearchTrafficSource() {},
handleRemoveTraffic() {}, handleRemoveTraffic() {},
getTrafficOptions() {
},
async getTraffic(trafficId) { async getTraffic(trafficId) {
this.currentTraffic = { id: 2885, businessCode: "CG202505272007551640", merchantId: 44218028, merchantName: "xiejq4S店-20", parentMerchantId: 44212538, parentMerchantName: "xiejq单店001", businessMode: 1, contractingMerchantId: 44211442, contractingMerchantName: "旧市长", sceneType: 0, yqMerchantId: 44218107, yqMerchantName: "鸿蒙园区店", estimatedFlow: 50, estimatedUpgradeRate: 60, operationMode: 0, partnerMerchantId: 44212541, partnerMerchantName: "xiejq服务商-更新2", parentPartnerMerchantId: null, parentPartnerMerchantName: "上级服务商信息01", settleRuleId: 4968, divisionRuleId: 4928, reconciliationRuleId: 3574, firstLineSunshineOnlinePointsFlag: "N", firstLineSunshine2OnlinePointsFlag: "N", createdBy: "glsadmin", createdDate: 1748347675000, updatedBy: "glsadmin", updatedDate: 1748347675000, deletedFlag: "N", businessCodes: null, realityShopUserType: null, merchantTypeSame: true, isHuawei: null }; this.currentTraffic = { id: 2885, businessCode: "CG202505272007551640", merchantId: 44218028, merchantName: "xiejq4S店-20", parentMerchantId: 44212538, parentMerchantName: "xiejq单店001", businessMode: 1, contractingMerchantId: 44211442, contractingMerchantName: "旧市长", sceneType: 0, yqMerchantId: 44218107, yqMerchantName: "鸿蒙园区店", estimatedFlow: 50, estimatedUpgradeRate: 60, operationMode: 0, partnerMerchantId: 44212541, partnerMerchantName: "xiejq服务商-更新2", parentPartnerMerchantId: null, parentPartnerMerchantName: "上级服务商信息01", settleRuleId: 4968, divisionRuleId: 4928, reconciliationRuleId: 3574, firstLineSunshineOnlinePointsFlag: "N", firstLineSunshine2OnlinePointsFlag: "N", createdBy: "glsadmin", createdDate: 1748347675000, updatedBy: "glsadmin", updatedDate: 1748347675000, deletedFlag: "N", businessCodes: null, realityShopUserType: null, merchantTypeSame: true, isHuawei: null };
// this.traffic = {}; // this.traffic = {};
}, },
async initData() { async initData() {
const { createBusinessApproveMerchantList } = await this.getBusinessDetailBasic({ id: this.shelveId }); const res = await getBusinessDetailBasicApi({ id: this.shelveId });
this.merchantList = createBusinessApproveMerchantList || []; console.log("initData", res);
// const { createBusinessApproveMerchantList } = await this.getBusinessDetailBasic({ id: this.shelveId });
// this.merchantList = createBusinessApproveMerchantList || [];
}, },
async initOptionsList() { async initOptionsList() {
...@@ -206,12 +242,36 @@ export default { ...@@ -206,12 +242,36 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .tab-select { .traffic-source-wrapper {
margin-left: 20px; .title-wrapper {
display: flex;
align-items: center;
padding-right: 20px;
border-bottom: 1px solid #e5e5e5;
> .title {
border-bottom: 0;
}
.select-wrapper {
flex-shrink: 0;
flex: 1;
::v-deep .tab-select {
width: 280px;
.el-select-dropdown__item { .el-select-dropdown__item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
}
}
> .actions-wrapper {
flex-shrink: 0;
}
}
.content-wrapper {
> .actions-wrapper {
margin-top: 20px;
text-align: center;
}
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!