Commit 2b2f560c by Jaxon

Merge branch 'SAAS+V5.7.1' into feature/d-plus-list-product

2 parents 8999b2c4 7837bf8c
Showing 22 changed files with 140 additions and 806 deletions
<!-- 新增招聘管理 -->
<template>
<div class="addRecruitment-wrap">
<div class="addRecruitment-title">
新增招聘管理
</div>
<div class="addRecruitment-content">
<glsx-combi-form ref="editFormRef"
class="edit-form-container"
default-width="530px"
:default-width="defaultWidth"
:form-data="editFormData"
:form-obj="addForm"
:form-ref="editChildRef"
:form-rules="formRules"
:is-block="isBlock"
:label-width="labelWidth">
<template #urgentHtml>
<el-switch active-color="#2a58ad"
active-text="开"
:active-value="1"
class="switchStyle"
inactive-text="关"
:inactive-value="0"
:value="addForm.urgent"
@change="confirmUrgentChange">
</el-switch>
</template>
<template #merchantHtml>
<div style="display: flex; align-items: center; width: 100%;">
<el-select v-if="!addForm.bySystemMerchant"
v-model="addForm.merchantId"
filterable
placeholder="请选择门店名称"
style="width: 530px;"
@change="handleMerchantSelectChange">
<el-option v-for="item in baseData.merchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId">
</el-option>
</el-select>
<el-input v-else
v-model="addForm.merchantId"
maxlength="50"
placeholder="请输入门店名称"
style="width: 530px;">
</el-input>
<el-checkbox v-model="addForm.bySystemMerchant"
style="margin-left: 10px;"
@change="handleIsNewMerchantChange">
未创建系统门店
</el-checkbox>
</div>
</template>
<template #merchantAddressHtml>
<ProvinceCity ref="provinceCityRef"
default-width="125px"
:subdistrict="2"
@selectCity="handleSelectCity"
@selectProvince="handleSelectProvince" />
</template>
</glsx-combi-form>
</div>
<div class="footer">
<el-button class="save-btn"
:loading="btnLoding"
size="small"
@click="handleSave">
提交
</el-button>
<el-button class="cancel-btn"
size="small"
@click="handleCancel">
取消
</el-button>
</div>
</div>
<div class="addRecruitment-wrap">
<div class="addRecruitment-title">
新增招聘管理
</div>
<div class="addRecruitment-content">
<glsx-combi-form ref="editFormRef" class="edit-form-container" default-width="530px"
:default-width="defaultWidth" :form-data="editFormData" :form-obj="addForm" :form-ref="editChildRef"
:form-rules="formRules" :is-block="isBlock" :label-width="labelWidth">
<template #urgentHtml>
<el-switch active-color="#2a58ad" active-text="开" :active-value="1" class="switchStyle"
inactive-text="关" :inactive-value="0" :value="addForm.urgent" @change="confirmUrgentChange">
</el-switch>
</template>
<template #merchantHtml>
<div style="display: flex; align-items: center; width: 100%;">
<el-select v-if="!addForm.bySystemMerchant" v-model="addForm.merchantId" filterable
placeholder="请选择门店名称" style="width: 530px;" @change="handleMerchantSelectChange">
<el-option v-for="item in baseData.merchantList" :key="item.merchantId"
:label="item.merchantName" :value="item.merchantId">
</el-option>
</el-select>
<el-input v-else v-model="addForm.merchantId" maxlength="50" placeholder="请输入门店名称"
style="width: 530px;">
</el-input>
<el-checkbox v-model="addForm.bySystemMerchant" style="margin-left: 10px;"
@change="handleIsNewMerchantChange">
未创建系统门店
</el-checkbox>
</div>
</template>
<template #merchantAddressHtml>
<ProvinceCity ref="provinceCityRef" default-width="125px" :subdistrict="2"
@selectCity="handleSelectCity" @selectProvince="handleSelectProvince" />
</template>
</glsx-combi-form>
</div>
<div class="footer">
<el-button class="save-btn" :loading="btnLoding" size="small" @click="handleSave">
提交
</el-button>
<el-button class="cancel-btn" size="small" @click="handleCancel">
取消
</el-button>
</div>
</div>
</template>
<script>
......@@ -143,7 +112,7 @@ export default {
multiple: true,
noFilter: false,
optionList: [],
optionId: "brandName",
optionId: "brandId",
optionLabel: "brandName",
optionsName: "brandList",
isHide: true,
......@@ -360,7 +329,7 @@ export default {
.then(() => {
this.addForm.urgent = val;
})
.catch((err) => {});
.catch((err) => { });
} else {
this.addForm.urgent = val;
}
......@@ -403,7 +372,7 @@ export default {
this.baseData.merchantList = merchantListOpt.list;
this.baseData.supervisionOptionsListOpt = supervisionOptionsListOpt;
this.baseData.brandList = brandTreeOpt.map(item => ({
brandId: item.id || item.value || item.label,
brandId: item.id,
brandName: item.label || item.name,
}));
this.getOptionsList(this, "editFormData", false);
......@@ -451,6 +420,16 @@ export default {
this.addForm.provinceCityCode = this.addForm.provinceCode + "/" + val.cityCode;
this.addForm.merchantAddress = this.addForm.province + "" + val.cityName;
},
getBrandName() {
console.log(this.addForm.brand);
let arr = [];
this.baseData.brandList.length && this.addForm.brand.length && this.baseData.brandList.forEach((item) => {
if (this.addForm.brand.includes(item.brandId)) {
arr.push(item.brandName);
}
});
return arr;
},
handleSave() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
......@@ -460,6 +439,7 @@ export default {
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let brands = this.getBrandName();
let params = {
merchantId: this.addForm.bySystemMerchant ? "" : this.addForm.merchantId,
regionOperationId: this.addForm.regionOperationId,
......@@ -477,7 +457,7 @@ export default {
};
if (this.addForm.bySystemMerchant) {
params.salesVolume = this.addForm.salesVolume;
params.brand = this.addForm.brand.join("/");
params.brand = brands.join("/");
params.merchantAddress = this.addForm.merchantAddress;
params.province = this.addForm.province;
params.provinceCityCode = this.addForm.provinceCityCode;
......@@ -510,7 +490,7 @@ export default {
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
......@@ -533,7 +513,7 @@ export default {
hasAll
&& that.baseData[item.optionsName].length
&& that.baseData[item.optionsName][0][
that[formName][index].optionLabel
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {};
......@@ -555,6 +535,7 @@ export default {
background: #ffffff;
margin: 0 20px 20px;
border-radius: 6px;
.addRecruitment-title {
padding: 0 20px;
display: flex;
......@@ -567,15 +548,18 @@ export default {
font-weight: bold;
color: #333333;
}
.addRecruitment-content {
padding: 20px;
}
.footer {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
padding-bottom: 20px;
.save-btn {
// width: 60px;
padding: 5px 14px;
......@@ -588,6 +572,7 @@ export default {
height: 32px;
box-sizing: border-box;
}
.cancel-btn {
color: #666666;
font-size: 14px;
......@@ -600,6 +585,7 @@ export default {
box-sizing: border-box;
}
}
::v-deep .el-input__count {
right: 12px;
bottom: 1px;
......
......@@ -4,7 +4,8 @@
<p class="edit-sub-title">
费用归属设置 (用于定义费用的业务归属)
</p>
<el-form class="formSty" ref="divisionRuleRef2" :model="form2" :rules="rules" label-suffix=":" label-width="180px">
<el-form class="formSty" ref="divisionRuleRef2" :model="form2" :rules="rules" :validate-on-rule-change="false"
label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
<!-- <tr>
......@@ -68,7 +69,8 @@
<p class="edit-sub-title">
实际分账设置 (用于定义费用的实际分账归属)
</p>
<el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
<el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" :validate-on-rule-change="false"
label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
<!-- <tr>
......
......@@ -17,7 +17,8 @@
基础信息<span class="title-tips">开启线上自动分账且分账相关方账号测试通过,分账金额会根据分账规则自动转入分账方的对公账户。</span>
</p>
<div class="publicContainer">
<el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" label-suffix=":" label-width="180px">
<el-form ref="divisionRuleRef" :model="financialObj" :rules="rules" :validate-on-rule-change="false"
label-suffix=":" label-width="180px">
<!-- key 拼接 index:避免接口返回重复 paymentChannelId 时 Vue key 冲突导致表单状态错位 -->
<el-form-item label="" prop="" v-for="(item, index) in financialObj.divisionRuleAutos"
:key="item.paymentChannelId != null && item.paymentChannelId !== '' ? `${String(item.paymentChannelId)}-${index}` : `division-auto-${index}`">
......@@ -101,7 +102,8 @@
<!-- closable -->
<el-tab-pane v-for="(item, idx) in editableTabs" :key="item.name" :label="item.title" :name="item.name"
:closable="idx != 0">
<span slot="label"><i v-show="item.testFlag == 'N' || item.calculateModeError"
<span slot="label"><i
v-show="item.calculateModeError || (item.testFlag == 'N' && tabNeedsDivisionTestWarning(item))"
class="el-icon-warning car-error-txt" />{{ item.title }}
</span>
<div class="classificationCptContainer">
......@@ -437,6 +439,15 @@ export default {
return Array.isArray(ref) ? ref[0] : ref
},
/**
* Tab 标签警告:仅在后端返回需补做分账测试(带 groupDivisionRuleId)或费用模式冲突时显示。
* 新建 Tab 默认 testFlag 为 N 仅表示「未走提交校验」,不应在标签上误报为错误。
*/
tabNeedsDivisionTestWarning(tab) {
if (!tab || tab.testFlag !== "N") return false
const id = tab.groupDivisionRuleId
return id != null && String(id).trim() !== ""
},
/**
* 嘀加商品来源 + 特殊品类(groupType===2):接口回显或Tab缓存里可能仅有 goodsTypes/upgradeGoods/packageGoods,
* 没有 goodsTypeGroupRelations;非激活Tab提交走缓存时不会执行子组件 getParams,后端会报「未指定商品/品类列表」。
* 提交前按 categoryType 与单行度维度补齐 goodsTypeGroupRelations。
......@@ -896,6 +907,14 @@ export default {
this.currentIndex = this.editableTabsValue
}
this.rebuildCrossTabGoodsSelectionsFromRules()
this.$nextTick(() => {
if (
this.$refs.divisionRuleRef
&& typeof this.$refs.divisionRuleRef.clearValidate === "function"
) {
this.$refs.divisionRuleRef.clearValidate();
}
})
resolve()
})
.catch(() => {
......@@ -956,7 +975,8 @@ export default {
const res = deepClone(await this.handlerConfirm())
delete res.goodsTypeGroupRules
const goodsTypeGroupRules = await this.getGoodsTypeGroupRules(
this.editableTabs
this.editableTabs,
{ onlyActiveTab: true }
)
// console.log(!this.checkParamsType(res, goodsTypeGroupRules))
if (!this.checkParamsType(res, goodsTypeGroupRules)) {
......@@ -1208,10 +1228,27 @@ export default {
*
* 【可感知性能】Tab>1 时全屏 Loading(若支持 setText 则刷新进度);每 YIELD_EVERY 个 Tab await rAF,
* 让浏览器有机会重绘,减轻「死机感」。finally 内务必 close,避免异常时遮罩残留。
*
* @param {object} [options]
* @param {boolean} [options.onlyActiveTab] 为 true 时仅校验/收集当前 editableTabsValue 对应分类 Tab(如「进行测算」)
*/
getGoodsTypeGroupRules(list) {
getGoodsTypeGroupRules(list, options = {}) {
return new Promise(async (resolve, reject) => {
const panes = filterDivisionTabPanes(list)
let panes = filterDivisionTabPanes(list)
if (options.onlyActiveTab) {
const active = this.editableTabsValue
if (
active == null ||
String(active) === "" ||
String(active) === "add"
) {
panes = []
} else {
panes = panes.filter(
(p) => String(p.name) === String(active)
)
}
}
let loadingInst = null
if (panes.length > 1) {
loadingInst = this.$loading({
......@@ -1570,7 +1607,19 @@ export default {
// 通过tab标签的切换事件触发增加的函数
// 如果name是add,则调用增加tab的函数(必须同步 return false,不可走 Promise 分支)
if (currentName == "add") {
this.addTab()
// 须同步 return false,不可把整段改成 Promise;与下方普通切换一致,先持久化离开的 tab 再 addTab,
// 否则虚拟 Tab 卸载「全部品类」后缓存未更新,切回会丢刚填的值。
if (oldName != null && oldName !== "" && oldName !== "add") {
this.$nextTick()
.then(() => this.$nextTick())
.then(() => {
this.persistClassificationTabByPaneName(oldName)
this.rebuildCrossTabGoodsSelectionsFromRules()
this.addTab()
})
} else {
this.addTab()
}
return false
}
const finish = () => {
......
.org-tree-container {
display: inline-block;
padding: 15px;
background-color: #fff;
}
.org-tree {
display: table;
text-align: center;
}
.org-tree:before, .org-tree:after {
content: '';
display: table;
}
.org-tree:after {
clear: both;
}
.org-tree-node,
.org-tree-node-children {
position: relative;
margin: 0;
padding: 0;
list-style-type: none;
}
.org-tree-node:before, .org-tree-node:after,
.org-tree-node-children:before,
.org-tree-node-children:after {
transition: all .35s;
}
.org-tree-node-label {
position: relative;
display: inline-block;
}
.org-tree-node-label .org-tree-node-label-inner {
padding: 10px 15px;
text-align: center;
border-radius: 3px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}
.org-tree-node-btn {
position: absolute;
top: 100%;
left: 50%;
width: 20px;
height: 20px;
z-index: 10;
margin-left: -11px;
margin-top: 9px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 50%;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.15);
cursor: pointer;
transition: all .35s ease;
}
.org-tree-node-btn:hover {
background-color: #e7e8e9;
transform: scale(1.15);
}
.org-tree-node-btn:before, .org-tree-node-btn:after {
content: '';
position: absolute;
}
.org-tree-node-btn:before {
top: 50%;
left: 4px;
right: 4px;
height: 0;
border-top: 1px solid #ccc;
}
.org-tree-node-btn:after {
top: 4px;
left: 50%;
bottom: 4px;
width: 0;
border-left: 1px solid #ccc;
}
.org-tree-node-btn.expanded:after {
border: none;
}
.org-tree-node {
padding-top: 20px;
display: table-cell;
vertical-align: top;
}
.org-tree-node.is-leaf, .org-tree-node.collapsed {
padding-left: 10px;
padding-right: 10px;
}
.org-tree-node:before, .org-tree-node:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 19px;
}
.org-tree-node:after {
left: 50%;
border-left: 1px solid #ddd;
}
.org-tree-node:not(:first-child):before, .org-tree-node:not(:last-child):after {
border-top: 1px solid #ddd;
}
.collapsable .org-tree-node.collapsed {
padding-bottom: 30px;
}
.collapsable .org-tree-node.collapsed .org-tree-node-label:after {
content: '';
position: absolute;
top: 100%;
left: 0;
width: 50%;
height: 20px;
border-right: 1px solid #ddd;
}
.org-tree > .org-tree-node {
padding-top: 0;
}
.org-tree > .org-tree-node:after {
border-left: 0;
}
.org-tree-node-children {
padding-top: 20px;
display: table;
}
.org-tree-node-children:before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 20px;
border-left: 1px solid #ddd;
}
.org-tree-node-children:after {
content: '';
display: table;
clear: both;
}
.horizontal .org-tree-node {
display: table-cell;
float: none;
padding-top: 0;
padding-left: 20px;
}
.horizontal .org-tree-node.is-leaf, .horizontal .org-tree-node.collapsed {
padding-top: 10px;
padding-bottom: 10px;
}
.horizontal .org-tree-node:before, .horizontal .org-tree-node:after {
width: 19px;
height: 50%;
}
.horizontal .org-tree-node:after {
top: 50%;
left: 0;
border-left: 0;
}
.horizontal .org-tree-node:only-child:before {
top: 1px;
border-bottom: 1px solid #ddd;
}
.horizontal .org-tree-node:not(:first-child):before, .horizontal .org-tree-node:not(:last-child):after {
border-top: 0;
border-left: 1px solid #ddd;
}
.horizontal .org-tree-node:not(:only-child):after {
border-top: 1px solid #ddd;
}
.horizontal .org-tree-node .org-tree-node-inner {
display: table;
}
.horizontal .org-tree-node-label {
display: table-cell;
vertical-align: middle;
}
.horizontal.collapsable .org-tree-node.collapsed {
padding-right: 30px;
}
.horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after {
top: 0;
left: 100%;
width: 20px;
height: 50%;
border-right: 0;
border-bottom: 1px solid #ddd;
}
.horizontal .org-tree-node-btn {
top: 50%;
left: 100%;
margin-top: -11px;
margin-left: 9px;
}
.horizontal > .org-tree-node:only-child:before {
border-bottom: 0;
}
.horizontal .org-tree-node-children {
display: table-cell;
padding-top: 0;
padding-left: 20px;
}
.horizontal .org-tree-node-children:before {
top: 50%;
left: 0;
width: 20px;
height: 0;
border-left: 0;
border-top: 1px solid #ddd;
}
.horizontal .org-tree-node-children:after {
display: none;
}
.horizontal .org-tree-node-children > .org-tree-node {
display: block;
}
.horizontal .displaynone {
display: none;
}
.org-tree-container{display:inline-block;padding:15px;background-color:#fff}.org-tree{display:table;text-align:center}.org-tree:before,.org-tree:after{content:'';display:table}.org-tree:after{clear:both}.org-tree-node,.org-tree-node-children{position:relative;margin:0;padding:0;list-style-type:none}.org-tree-node:before,.org-tree-node:after,.org-tree-node-children:before,.org-tree-node-children:after{transition:all .35s}.org-tree-node-label{position:relative;display:inline-block}.org-tree-node-label .org-tree-node-label-inner{padding:10px 15px;text-align:center;border-radius:3px;box-shadow:0 1px 5px rgba(0,0,0,0.15)}.org-tree-node-btn{position:absolute;top:100%;left:50%;width:20px;height:20px;z-index:10;margin-left:-11px;margin-top:9px;background-color:#fff;border:1px solid #ccc;border-radius:50%;box-shadow:0 0 2px rgba(0,0,0,0.15);cursor:pointer;transition:all .35s ease}.org-tree-node-btn:hover{background-color:#e7e8e9;transform:scale(1.15)}.org-tree-node-btn:before,.org-tree-node-btn:after{content:'';position:absolute}.org-tree-node-btn:before{top:50%;left:4px;right:4px;height:0;border-top:1px solid #ccc}.org-tree-node-btn:after{top:4px;left:50%;bottom:4px;width:0;border-left:1px solid #ccc}.org-tree-node-btn.expanded:after{border:none}.org-tree-node{padding-top:20px;display:table-cell;vertical-align:top}.org-tree-node.is-leaf,.org-tree-node.collapsed{padding-left:10px;padding-right:10px}.org-tree-node:before,.org-tree-node:after{content:'';position:absolute;top:0;left:0;width:50%;height:19px}.org-tree-node:after{left:50%;border-left:1px solid #ddd}.org-tree-node:not(:first-child):before,.org-tree-node:not(:last-child):after{border-top:1px solid #ddd}.collapsable .org-tree-node.collapsed{padding-bottom:30px}.collapsable .org-tree-node.collapsed .org-tree-node-label:after{content:'';position:absolute;top:100%;left:0;width:50%;height:20px;border-right:1px solid #ddd}.org-tree>.org-tree-node{padding-top:0}.org-tree>.org-tree-node:after{border-left:0}.org-tree-node-children{padding-top:20px;display:table}.org-tree-node-children:before{content:'';position:absolute;top:0;left:50%;width:0;height:20px;border-left:1px solid #ddd}.org-tree-node-children:after{content:'';display:table;clear:both}.horizontal .org-tree-node{display:table-cell;float:none;padding-top:0;padding-left:20px}.horizontal .org-tree-node.is-leaf,.horizontal .org-tree-node.collapsed{padding-top:10px;padding-bottom:10px}.horizontal .org-tree-node:before,.horizontal .org-tree-node:after{width:19px;height:50%}.horizontal .org-tree-node:after{top:50%;left:0;border-left:0}.horizontal .org-tree-node:only-child:before{top:1px;border-bottom:1px solid #ddd}.horizontal .org-tree-node:not(:first-child):before,.horizontal .org-tree-node:not(:last-child):after{border-top:0;border-left:1px solid #ddd}.horizontal .org-tree-node:not(:only-child):after{border-top:1px solid #ddd}.horizontal .org-tree-node .org-tree-node-inner{display:table}.horizontal .org-tree-node-label{display:table-cell;vertical-align:middle}.horizontal.collapsable .org-tree-node.collapsed{padding-right:30px}.horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after{top:0;left:100%;width:20px;height:50%;border-right:0;border-bottom:1px solid #ddd}.horizontal .org-tree-node-btn{top:50%;left:100%;margin-top:-11px;margin-left:9px}.horizontal>.org-tree-node:only-child:before{border-bottom:0}.horizontal .org-tree-node-children{display:table-cell;padding-top:0;padding-left:20px}.horizontal .org-tree-node-children:before{top:50%;left:0;width:20px;height:0;border-left:0;border-top:1px solid #ddd}.horizontal .org-tree-node-children:after{display:none}.horizontal .org-tree-node-children>.org-tree-node{display:block}.horizontal .displaynone{display:none}
.org-tree-container {
display: inline-block;
padding: 15px;
background-color: #fff;
}
.org-tree {
// display: inline-block;
display: table;
text-align: center;
&:before,
&:after {
content: '';
display: table;
}
&:after {
clear: both;
}
}
.org-tree-node,
.org-tree-node-children {
position: relative;
margin: 0;
padding: 0;
list-style-type: none;
&:before,
&:after {
transition: all .35s;
}
}
.org-tree-node-label {
position: relative;
display: inline-block;
.org-tree-node-label-inner {
padding: 10px 15px;
text-align: center;
border-radius: 3px;
box-shadow: 0 1px 5px rgba(0, 0, 0, .15);
}
}
.org-tree-node-btn {
position: absolute;
top: 100%;
left: 50%;
width: 20px;
height: 20px;
z-index: 10;
margin-left: -11px;
margin-top: 9px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 50%;
box-shadow: 0 0 2px rgba(0, 0, 0, .15);
cursor: pointer;
transition: all .35s ease;
&:hover {
background-color: #e7e8e9;
transform: scale(1.15);
}
&:before,
&:after {
content: '';
position: absolute;
}
&:before {
top: 50%;
left: 4px;
right: 4px;
height: 0;
border-top: 1px solid #ccc;
}
&:after {
top: 4px;
left: 50%;
bottom: 4px;
width: 0;
border-left: 1px solid #ccc;
}
&.expanded:after {
border: none;
}
}
.org-tree-node {
padding-top: 20px;
display: table-cell;
vertical-align: top;
&.is-leaf,
&.collapsed {
padding-left: 10px;
padding-right: 10px;
}
&:before,
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 19px;
}
&:after {
left: 50%;
border-left: 1px solid #ddd;
}
&:not(:first-child):before,
&:not(:last-child):after {
border-top: 1px solid #ddd;
}
}
.collapsable .org-tree-node.collapsed {
padding-bottom: 30px;
.org-tree-node-label:after {
content: '';
position: absolute;
top: 100%;
left: 0;
width: 50%;
height: 20px;
border-right: 1px solid #ddd;
}
}
.org-tree>.org-tree-node {
padding-top: 0;
&:after {
border-left: 0;
}
}
.org-tree-node-children {
padding-top: 20px;
display: table;
&:before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 20px;
border-left: 1px solid #ddd;
}
&:after {
content: '';
display: table;
clear: both;
}
}
.horizontal {
.org-tree-node {
// display: flex;
// flex-direction: row;
// justify-content: flex-start;
// align-items: center;
display: table-cell;
float: none;
padding-top: 0;
padding-left: 20px;
&.is-leaf,
&.collapsed {
padding-top: 10px;
padding-bottom: 10px;
}
&:before,
&:after {
width: 19px;
height: 50%;
}
&:after {
top: 50%;
left: 0;
border-left: 0;
}
&:only-child:before {
top: 1px;
border-bottom: 1px solid #ddd;
}
&:not(:first-child):before,
&:not(:last-child):after {
border-top: 0;
border-left: 1px solid #ddd;
}
&:not(:only-child):after {
border-top: 1px solid #ddd;
}
.org-tree-node-inner {
display: table;
}
}
.org-tree-node-label {
display: table-cell;
vertical-align: middle;
}
&.collapsable .org-tree-node.collapsed {
padding-right: 30px;
.org-tree-node-label:after {
top: 0;
left: 100%;
width: 20px;
height: 50%;
border-right: 0;
border-bottom: 1px solid #ddd;
}
}
.org-tree-node-btn {
top: 50%;
left: 100%;
margin-top: -11px;
margin-left: 9px;
}
&>.org-tree-node:only-child:before {
border-bottom: 0;
}
.org-tree-node-children {
// display: flex;
// flex-direction: column;
// justify-content: center;
// align-items: flex-start;
display: table-cell;
padding-top: 0;
padding-left: 20px;
&:before {
top: 50%;
left: 0;
width: 20px;
height: 0;
border-left: 0;
border-top: 1px solid #ddd;
}
&:after {
display: none;
}
&>.org-tree-node {
display: block;
}
}
.displaynone {
display: none;
}
}
\ No newline at end of file
<!-- 4 - 开启分账 -->
<template>
<div class="open-division">
<p class="edit-sub-title">
开启分账<span class="title-tips">开启线上自动分账,分账金额会根据分账规则自动转入分账方的对公账户。</span>
</p>
<el-form
ref="divisionRuleRef"
:model="form"
:rules="rules"
label-suffix=":"
label-width="180px">
<el-form-item
label=""
prop="autoFlag">
<span
class="tips-block"
slot="label">
<span class="tips-label">线上自动分账</span>
<el-tooltip
popper-class="tooltip-class"
effect="dark"
content="产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement="top">
<span class="tips-icon" />
</el-tooltip>:
</span>
<el-radio-group v-model="form.autoFlag">
<el-switch
v-model="form.autoFlag"
active-value="Y"
inactive-value="N" />
</el-radio-group>
</el-form-item>
<el-form-item
label="结算时间方式"
prop="settleTimeType">
<span
class="tips-block"
slot="label">
<span class="tips-label">分账周期</span>
<el-tooltip
popper-class="tooltip-class"
effect="dark"
content="用户支付的款项可按T+1或指定日自动打款给商户。"
placement="top">
<span class="tips-icon" />
</el-tooltip>:
</span>
<el-radio-group
v-model="form.settleTimeType"
:disabled="form.autoFlag === 'N'">
<div
class="block_item"
style="margin-bottom: 20px;">
<el-radio :label="1">
分账周期 T+
<el-input-number
v-model="settleTimeObj.first"
controls-position="right"
size="small"
:min="0"
:max="30"
:disabled="form.settleTimeType === 2 || form.autoFlag === 'N'" />
日
<span v-show="form.settleTimeType === 1">(分账后第2天到分账方对公账户)</span>
</el-radio>
</div>
<div class="block_item">
<el-radio :label="2">
固定日期分账:每月
<el-input-number
v-model="settleTimeObj.second"
controls-position="right"
size="small"
:min="1"
:max="31"
:disabled="form.settleTimeType === 1 || form.autoFlag === 'N'" />
日
<span v-show="form.settleTimeType === 2">(上个月整月的分账金额于次月{{ +settleTimeObj.second + 1 }}日分账到分账方对公账户)</span>
</el-radio>
</div>
</el-radio-group>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { updateDivisionRuleApi } from '@api/merchant'
export default {
name: 'StepFour',
data() {
return {
form: {
autoFlag: 'N',
settleTimeType: 1
},
rules: {},
// 结算周期
settleTimeObj: {
first: '1',
second: '1'
}
}
},
props: {
stepStat: {
type: Number,
default: 1
},
merchantInfo: {
type: Object,
default: () => { }
},
// 短信
smsForm: {
type: Object,
default: () => {}
}
},
watch: {
stepStat(val) {
if (val === 4) {
this.getInfo()
}
}
},
mounted() {
// subProgress:41
},
methods: {
getInfo() {
if (this.merchantInfo.divisionRule) {
Object.assign(this.form, this.merchantInfo.divisionRule)
this.settleTimeObj[this.form.settleTimeType === 1 ? 'first' : 'second'] = this.form.settleTime
}
},
handleConfirm() {
this.$refs.divisionRuleRef.validate(valid => {
if (valid) {
var params = {
...this.form,
smsCode: this.smsForm.smsCode,
merchantId: this.merchantInfo.merchantId,
// channelType: this.merchantInfo.channelType,
settleTime: this.settleTimeObj[this.form.settleTimeType === 1 ? 'first' : 'second'],
channelType: this.merchantInfo.divisionRule.channelType,
shopProfitDivisionFlag: this.merchantInfo.divisionRule.shopProfitDivisionFlag,
partnerProfitDivisionFlag: this.merchantInfo.divisionRule.partnerProfitDivisionFlag,
goodsCostDivisionFlag: this.merchantInfo.divisionRule.goodsCostDivisionFlag,
extraCostDivisionFlag: this.merchantInfo.divisionRule.extraCostDivisionFlag,
incentiveCostDivisionFlag: this.merchantInfo.divisionRule.incentiveCostDivisionFlag
}
// console.log(params)
updateDivisionRuleApi(params).then(res => {
this.notice.okTips()
this.$emit('handleNextStep', 4)
})
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -629,7 +629,19 @@ export default {
/* 活动标签切换时触发 */
beforeLeave(currentName, oldName) {
if (currentName == "add") {
this.addTab()
// 须同步 return false;先持久化离开的 tab 再 addTab,与 financialRules 一致,
// 否则虚拟 Tab 卸载后缓存未更新,切回会丢刚填的值。
if (oldName != null && oldName !== "" && oldName !== "add") {
this.$nextTick()
.then(() => this.$nextTick())
.then(() => {
this.persistClassificationTabByPaneName(oldName)
this.rebuildCrossTabGoodsSelectionsFromRules()
this.addTab()
})
} else {
this.addTab()
}
return false
}
if (oldName != null && oldName !== "" && oldName !== "add") {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!