Commit c0dc172e by 张立顺

Merge branch 'dev_v4.34.0-0131' into 'develop'

上线合并

See merge request !264
2 parents 69b37f1e fdfca2b0
Showing 40 changed files with 2103 additions and 115 deletions
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询记录
export function dfBalanceMonthStatPage(data) {
data.method = `${path}dfBalanceMonthStat.page`
return request(data, RequestMethods.POST)
}
// 商户年份明细查询
export function dfBalanceMonthStatListStatYear(data) {
data.method = `${path}dfBalanceMonthStat.listStatYear`
return request(data, RequestMethods.POST)
}
import request from "./request"
const path = 'dj.api.businessSchool.'
// 根据场景值获取有关联关系的园区店
export function getYqMerchantListBySceneApi(data) {
data.method = 'dj.api.scenemerchantref.listYqShopByRef'
return request(data, 'post')
}
// 获取员工列表
export function getListApi(data) {
data.method = `${path}staff.performance.page`
// data.method = 'dj.api.life.pos.trm.list'
return request(data,'post')
}
// 获取启用商学院员工数量
export function getEnableStaffNumApi(data) {
data.method = `${path}businessSchoolEnable.number`
return request(data, 'post')
}
// 导入员工
export function importStaffApi(data) {
data.method = `${path}staff.performanceConfig.import`
return request(data, "post", ["file"])
}
// 禁用启用商学院
export function enableOrDisableApi(data) {
data.method = `${path}businessSchoolEnable.update`
return request(data,'post')
}
// 查看员工业绩详情
export function getPerDetailListApi(data) {
data.method = `${path}staff.orderPerformance.page`
return request(data, 'post')
}
// 重置员工查看绩效密码
export function resetStaffPasswordApi(data) {
data.method = `${path}staff.performancePassword.reset`
return request(data, 'post')
}
// 员工绩效配置详情
export function getPerformanceInfoApi(data) {
data.method = `${path}staff.performanceConfig.get`
return request(data, 'post')
}
// 配置员工绩效
export function setPerformanceApi(data) {
data.method = `${path}staff.performanceConfig.save`
return request(data, 'post')
}
// 员工导师配置详情
export function getMentorInfoApi(data) {
data.method = `${path}staff.mentorPerformanceConfig`
return request(data, 'post')
}
// 配置导师
export function setMentorApi(data) {
data.method = `${path}staff.mentorPerformanceConfig.save`
return request(data, 'post')
}
// 获取未关联导师的初级驻店零售员工数据
export function getNoRelateStaffListApi(data) {
data.method = `${path}staff.mentorPerformanceConfig.listAvailableStudent`
return request(data, 'post')
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询记录
export function transferQuotaMonitorConfigPage(data) {
data.method = `${path}transferQuotaMonitorConfig.page`
return request(data, RequestMethods.POST)
}
// 编辑
export function transferQuotaMonitorConfigUpdate(data) {
data.method = `${path}transferQuotaMonitorConfig.update`
return request(data, RequestMethods.POST)
}
......@@ -26,7 +26,13 @@ export function transferAccountsRecordUpdateStatus(data) {
data.method = `${path}transferAccountsRecord.updateStatus`
return request(data, RequestMethods.POST)
}
// dj.api.smartcarlife./1.0.0
// 批量商务领导审核
export function batchBusinessAudit(data) {
data.method = `${path}transferAccountsRecord.batchBusinessAudit`
return request(data, RequestMethods.POST)
}
// 批量运营审核
export function batchOperatorAudit(data) {
data.method = `${path}transferAccountsRecord.batchOperatorAudit`
......
......@@ -14,6 +14,31 @@ export const defaultSelectOptions = [
}
]
// 财务管理-费用管理-费用类别-其他费用类别计算方式
export const otherSelectOptions = [
// {
// expenseCategoryCalculateType: 1,
// label: "按毛利比例"
// },
// {
// expenseCategoryCalculateType: 2,
// label: "按收入比例"
// },
// {
// expenseCategoryCalculateType: 3,
// label: "按固定金额"
// },
{
expenseCategoryCalculateType: 8,
label: "按(收入-自定义其他费用)比例"
},
{
expenseCategoryCalculateType: 9,
label: "按(收入-其他费用)比例"
}
]
// 财务管理-费用管理-费用类别-费用类别计算方式
export const severSelectOptions = [
{
......@@ -39,6 +64,14 @@ export const severSelectOptions = [
{
expenseCategoryCalculateType: 6,
label: "按园区店毛利比例"
},
{
expenseCategoryCalculateType: 8,
label: "按(收入-自定义其他费用)比例"
},
{
expenseCategoryCalculateType: 9,
label: "按(收入-其他费用)比例"
}
]
// 回显财务管理-费用管理-费用类别-费用类
......@@ -48,7 +81,9 @@ export const severSelectOptionsLabel = {
3: "按固定金额",
4: "按(产值-流量成本)比例",
5: "按(产值-流量成本-其他费用不包含产品成本))比例",
6: "按(产值-流量成本-其他费用包含产品成本)比例"
6: "按(产值-流量成本-其他费用包含产品成本)比例",
8: "按(收入-自定义其他费用)比例",
9: "按(收入-其他费用)比例"
}
// 商品来源
export const goodsSourceList = [
......
......@@ -715,6 +715,7 @@ export const upgradeFlags = [
// 转账管理 状态
export const transferAccountsStatusList = [
{ confId: 0, confValue: "商务领导审核" },
{ confId: 1, confValue: "运营审核" },
{ confId: 2, confValue: "财务确认" },
{ confId: 3, confValue: "转账中" },
......@@ -727,6 +728,7 @@ export const transferAccountsStatusList = [
]
export const transferAccountsStatusShow = {
0: "商务领导审核",
1: "运营审核",
2: "财务确认",
3: "转账中",
......@@ -758,3 +760,9 @@ export const stockManagementModeList = [
{ confId: 2, confName: "不使用膜卷号" },
{ confId: 1, confName: "使用膜卷号" }
]
// 服务商类型
export const partnerTypeList = [
{ confId: 1, confName: "普通" },
{ confId: 2, confName: "个体" }
]
......@@ -15,7 +15,8 @@ export function limitPrice(
) {
var reg = {
priceReg: /^\d[\d\.]*$/, // eslint-disable-line
numReg: /^[1-9]\d*$/
numReg: /^[1-9]\d*$/,
priceReg_negative: /^-?\d[\d\.]*$/ // 允许负数的正则表达式
}
regRule = regRule || "priceReg"
if (
......@@ -48,6 +49,35 @@ export function limitPrice(
}
}
//允许输入负数的输入框限制
export function limitPriceForNegative(newValue) {
//用来检索整数且不超过七位数
const limitDigit = /[0-9]{1,7}/
// 用来检索小数且小数点后不超过两位数
const limitDigitdot = /[0-9]{1,7}.[\d]{0,2}/
if (newValue) {
newValue = newValue + ""
let nn = ""
// 正负判断
if (newValue.match("-")) {
nn = newValue.match("-")[0]
}
// 小数判断
if (newValue.indexOf(".") != -1) {
if (newValue.match(limitDigitdot)) {
nn = nn + newValue.match(limitDigitdot)[0] || ""
}
} else {
if (newValue.match(limitDigit)) {
nn = nn + newValue.match(limitDigit)[0] || ""
}
}
// 限制数字最大为100
// if (parseFloat(nn) > 100) nn = 9999999;
return nn
}
}
/**
* 时间控件-限制月份
*/
......
......@@ -583,6 +583,13 @@ export default {
margin-right: 2px;
}
/* 有tips-icon 全局样式 修改因全局样式影响 */
.glsx-combi-form .tips-block span:last-child{
display: inline-block;
width: 16px;
height: 16px;
}
.glsx-combi-form .tips-icon {
display: inline-block;
width: 14px;
......
import emojiRegex from 'emoji-regex' // npm install emoji-regex
import emojiRegex from "emoji-regex" // npm install emoji-regex
export default {
name: 'clearEmoij',
name: "clearEmoij",
bind: function (el, binding, vnode, oldVnode) {
const regex = emojiRegex()
const obj = el.querySelectorAll('.el-input__inner,.el-textarea__inner')[0]
const obj = el.querySelectorAll(".el-input__inner,.el-textarea__inner")[0]
const zclearNoNum = function (e) {
if (e.target.composing) return
const match = regex.exec(obj.value) // 也可以直接用正则表达式判断
......@@ -12,13 +12,13 @@ export default {
obj.value = obj.value.replace(match[i],"");
}*/
obj.value = obj.value.replace(
/(\ud83c[\udc00-\udfff])|(\ud83d[\udc00-\udfff])|(\ud83e[\udc00-\udfff])|[\u2100-\u32ff]|[\u0030-\u007f][\u20d0-\u20ff]|[\u0080-\u00ff]/g,
''
/[\u{1F300}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F1E6}-\u{1F1FF}]/gu,
""
)
zclearNoNum(e)
}
// 触发v-model的更新
obj.dispatchEvent(new Event('input'))
obj.dispatchEvent(new Event("input"))
}
const zblur = function (e) {
zclearNoNum(e)
......@@ -26,13 +26,13 @@ export default {
const match = regex.exec(obj.value)
if (match) {
obj.value = obj.value.replace(
/(\ud83c[\udc00-\udfff])|(\ud83d[\udc00-\udfff])|(\ud83e[\udc00-\udfff])|[\u2100-\u32ff]|[\u0030-\u007f][\u20d0-\u20ff]|[\u0080-\u00ff]/g,
''
/[\u{1F300}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F1E6}-\u{1F1FF}]/gu,
""
)
zclearNoNum(e)
}
// 触发v-model的更新
obj.dispatchEvent(new Event('change'))
obj.dispatchEvent(new Event("change"))
}, 50)
}
obj.onkeyup = zclearNoNum
......@@ -42,22 +42,22 @@ export default {
e.target.composing = true
}
function onCompositionEnd(e) {
console.log('按回车将字输入', e.target.value)
console.log("按回车将字输入", e.target.value)
e.target.composing = false
obj.dispatchEvent(new Event('change'))
obj.dispatchEvent(new Event("change"))
setTimeout(() => {
if (obj.value) {
obj.value = obj.value.replace(
/(\ud83c[\udc00-\udfff])|(\ud83d[\udc00-\udfff])|(\ud83e[\udc00-\udfff])|[\u2100-\u32ff]|[\u0030-\u007f][\u20d0-\u20ff]|[\u0080-\u00ff]/g,
''
/[\u{1F300}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F1E6}-\u{1F1FF}]/gu,
""
)
zclearNoNum(e)
}
// 触发v-model的更新
obj.dispatchEvent(new Event('change'))
obj.dispatchEvent(new Event("change"))
}, 50)
}
obj.addEventListener('compositionstart', onCompositionStart)
obj.addEventListener('compositionend', onCompositionEnd)
obj.addEventListener("compositionstart", onCompositionStart)
obj.addEventListener("compositionend", onCompositionEnd)
}
}
......@@ -126,17 +126,26 @@ export const routerName = {
handle: "handleAdd"
},
{
authId: "9050512",
parentId: "90505",
label: "批量商务审核",
category: "Button",
type: "primary",
handle: "handleLeaderAllExamine"
},
{
authId: "9050502",
parentId: "90505",
label: "批量审核",
label: "批量运营审核",
category: "Button",
type: "primary",
handle: "handleBatchExamine"
},
{
authId: "9050503",
parentId: "90505",
label: "批量确认",
label: "批量财务确认",
category: "Button",
type: "primary",
handle: "handleBatchConfirm"
......@@ -184,6 +193,12 @@ export const routerName = {
parentId: "90505",
label: "重新发起提现",
handle: "handleReWithdrawal"
},
{
authId: "9050511",
parentId: "90505",
label: "审核",
handle: "handleLeaderExamine"
}
],
component: _import("financeManage/transferAccountsManage/index")
......@@ -223,5 +238,59 @@ export const routerName = {
}
],
component: _import("financeManage/withdrawalManage/index")
},
90507: {
path: "/limitMonitor",
name: "limitMonitor",
meta: {
title: "额度监控",
authId: "90507",
parentId: "905",
cache: false
},
auth: [
{
authId: "9050701",
parentId: "90507",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050702",
parentId: "90507",
label: "编辑",
handle: "handleEdit"
}
],
component: _import("financeManage/limitMonitor/index")
},
90508: {
path: "/balanceStatistics",
name: "balanceStatistics",
meta: {
title: "余额统计",
authId: "90508",
parentId: "905",
cache: false
},
auth: [
{
authId: "9050801",
parentId: "90508",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050802",
parentId: "90508",
label: "明细",
handle: "handleDetail"
}
],
component: _import("financeManage/balanceStatistics/index")
}
}
......@@ -762,5 +762,102 @@ export const routerName = {
cache: false
},
component: _import("system/codeTest/index")
}
},
90621: {
path: "/staffManage",
name: "staffManage",
meta: {
title: "商学院管理",
authId: "90621",
parentId: "906",
cache: false
},
auth: [
{
authId: "9062101",
parentId: "90621",
label: "导出工资绩效",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9062102",
parentId: "90621",
label: "导入员工",
category: "Button",
handle: "handleImport"
},
{
authId: "9062103",
parentId: "90621",
label: "绩效配置",
handle: "handlePerformance",
addRoutePath: [
{
authId: "90622",
name: "绩效配置",
parentId: "90621"
}
]
},
{
authId: "9062104",
parentId: "90621",
label: "导师配置",
handle: "handleMentor",
addRoutePath: [
{
authId: "90623",
name: "导师配置",
parentId: "90621"
}
]
},
{
authId: "9062105",
parentId: "90621",
label: "启用商学院",
handle: "handleEnableOrDisable",
ruleObj: {
attr: "businessSchoolEnableFlag",
rule: {
'N': "启用商学院",
'Y': "禁用商学院"
}
}
},
{
authId: "9062106",
parentId: "90621",
label: "业绩详情",
handle: "handleDetail"
}
],
component: _import("systemConfig/businessSchoolManage/index")
},
90622: {
path: "/performanceConfig",
name: "performanceConfig",
meta: {
title: "绩效配置",
authId: "90622",
parentId: "90621",
sideHidden: true,
activePath: "/staffManage"
},
component: _import("systemConfig/businessSchoolManage/performanceConfig")
},
90623: {
path: "/mentorConfig",
name: "mentorConfig",
meta: {
title: "导师配置",
authId: "90623",
parentId: "90621",
sideHidden: true,
activePath: "/staffManage"
},
component: _import("systemConfig/businessSchoolManage/mentorConfig")
},
}
<!-- 月度库存结算单弹窗 -->
<template>
<d2-dialog title="查看明细"
:is-visible="detailVisible"
class="stockMonthDailog"
width="70%"
:no-cancel="true"
btn-ok-label="关闭"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="merchantInfo">
<span class="merchantName">{{recordInfo.merchantName}}</span><span
class="merchantId">{{recordInfo.merchantId}}</span>
</div>
<div>
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:search-select-obj="searchSelectObj"
:form-data="showFormData">
<div slot="yearChoose"
slot-scope="scope">
<el-date-picker v-model="searchForm.statYear"
type="year"
placeholder="选择年"
value-format="yyyy"
format="yyyy"
:clearable="false"
:picker-options="pickerOption"
@change="chooseYear">
</el-date-picker>
</div>
</d2-search>
</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:table-data="tableData"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:has-page="false"
:has-num="false">
</d2-table>
</div>
</div>
</d2-dialog>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { dfBalanceMonthStatListStatYear } from '@api/balanceStatistics'
import { rangePickerOptions_year_2023 } from '@/common/format'
export default {
name: 'DetailDialog',
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
pickerOption: rangePickerOptions_year_2023,
countObj: {},
searchForm: {
statYear: '',
merchantId: ''
},
searchFormSearch: {},
searchSelectObj: {},
showFormData: [{
label: '年度',
addHtml: 'yearChoose'
}],
// getListApi: getReportByGoods,
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [{
label: '月份',
prop: 'statMonth',
width: '100px'
}, {
label: '可代付金额',
prop: 'canDfQuota',
formatter: (cellValue) => {
return (cellValue.canDfQuota || cellValue.canDfQuota == 0) ? cellValue.canDfQuota.toFixed(2) : '-'
}
}, {
label: '已代付金额',
prop: 'usedDfQuota',
formatter: (cellValue) => {
return (cellValue.usedDfQuota || cellValue.usedDfQuota == 0) ? cellValue.usedDfQuota.toFixed(2) : '-'
}
}, {
label: '余额',
prop: 'remnantQuota',
formatter: (cellValue) => {
return (cellValue.remnantQuota || cellValue.remnantQuota == 0) ? cellValue.remnantQuota.toFixed(2) : '-'
}
}
]
},
baseData: {
},
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
computed: {
},
mounted() {
const nowDate = new Date()
this.searchForm.statYear = nowDate.getFullYear().toString()
if (this.recordInfo) {
this.searchForm.merchantId = this.recordInfo.merchantId
}
this.getList()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
chooseYear() {
this.getList()
},
getList() {
var params = deepClone(this.searchForm)
dfBalanceMonthStatListStatYear(params).then(res => {
this.tableData = res
})
},
handleClose() {
this.$emit('dialogClose')
}
}
}
</script>
<style lang="scss" scoped>
.merchantInfo {
// margin-left: 20px;
.merchantName {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 15px;
color: #333333;
}
.merchantId {
margin-left: 10px;
}
}
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.stockMonthDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
.stockMonthDailog .btn-tips img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
.stockMonthDailog .btn-tips {
display: inline-block;
font-size: 12px;
height: 14px;
line-height: 14px;
background-color: #fff2e5;
color: #999999;
margin-right: 24px;
padding: 6.5px 10px;
}
.show-search {
margin-left: -65px;
}
</style>
<!-- 余额统计 - 列表 -->
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:labelWidth="labelWidth"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
<!-- 明细 -->
<detail-dialog :detailVisible="detailVisible"
v-if="detailVisible"
:recordInfo="recordInfo"
@dialogClose="editDialogClose" />
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { dfBalanceMonthStatPage } from '@api/balanceStatistics'
import detailDialog from './components/detailDialog'
export default {
name: 'LimitMonitorList',
components: {
detailDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '110px',
searchForm: {
merchantName: '',
matchMerchantId: ''
},
searchFormSearch: {},
showFormData: [{
label: '平台方名称',
name: 'merchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '平台方商户号',
name: 'matchMerchantId',
type: 'input',
inputType: 'number',
maxlength: '20',
isClear: true
}],
getListApi: dfBalanceMonthStatPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// mutiSelectUniqueKey: 'id',
// mutiSelectName: 'transferAccounts',
tableOption: true,
tableColumns: [{
label: '平台方名称',
prop: 'merchantName',
width: '500px'
}, {
label: '平台方商户号',
prop: 'merchantId',
width: '150px'
}, {
label: '累计可代付金额',
prop: 'totalCanDfQuota',
width: '150px',
formatter: (cellValue) => {
return (cellValue.totalCanDfQuota || cellValue.totalCanDfQuota == 0) ? parseFloat(cellValue.totalCanDfQuota).toFixed(2) : '-'
}
}, {
label: '累计已代付金额',
prop: 'totalUsedDfQuota',
width: '150px',
formatter: (cellValue) => {
return (cellValue.totalUsedDfQuota || cellValue.totalUsedDfQuota == 0) ? parseFloat(cellValue.totalUsedDfQuota).toFixed(2) : '-'
}
}, {
label: '累计余额',
prop: 'totalRemnantQuota',
width: '150px',
formatter: (cellValue) => {
return (cellValue.totalRemnantQuota || cellValue.totalRemnantQuota == 0) ? parseFloat(cellValue.totalRemnantQuota).toFixed(2) : '-'
}
}, {
label: '上月可代付金额',
prop: 'lastMonthCanDfQuota',
width: '150px',
formatter: (cellValue) => {
return (cellValue.lastMonthCanDfQuota || cellValue.lastMonthCanDfQuota == 0) ? parseFloat(cellValue.lastMonthCanDfQuota).toFixed(2) : '-'
}
}, {
label: '上月已代付金额',
prop: 'lastMonthUsedDfQuota',
width: '150px',
formatter: (cellValue) => {
return (cellValue.lastMonthUsedDfQuota || cellValue.lastMonthUsedDfQuota == 0) ? parseFloat(cellValue.lastMonthUsedDfQuota).toFixed(2) : '-'
}
}, {
label: '上月余额',
prop: 'lastMonthRemnantQuota',
width: '150px',
formatter: (cellValue) => {
return (cellValue.lastMonthRemnantQuota || cellValue.lastMonthRemnantQuota == 0) ? parseFloat(cellValue.lastMonthRemnantQuota).toFixed(2) : '-'
}
}
]
},
baseData: {
},
recordInfo: null,
detailVisible: false
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
console.log('this.baseData[item.optionsName]', item.optionsName)
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
merchantName: '',
matchMerchantId: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
handleDetail(row) {
this.recordInfo = row
this.detailVisible = !this.detailVisible
},
editDialogClose(obj) {
this.detailVisible = !this.detailVisible
},
handleExport() {
var params = this.searchFormSearch
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.api.smartcarlife.dfBalanceMonthStat.exportAsync'
const list = [
...this.dowloadList,
{
name: '余额统计',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
<!-- 编辑额度 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="merchantInfo">
<span class="merchantName">{{paramsObj.merchantName}}</span><span
class="merchantId">{{paramsObj.merchantId}}</span>
</div>
<div class="add-dialog">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="150px"
default-width="400px"
:form-ref="editChildRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
<div slot="dayQuotaHtml"
slot-scope="scope">
<el-input placeholder="请输入日额度"
v-model="infoForm.dayQuota"
style="width:400px"
clearable
@input="handleInput($event, 'dayQuota')">
</el-input>
</div>
<div slot="monthQuotaHtml"
slot-scope="scope">
<el-input placeholder="请输入月额度"
v-model="infoForm.monthQuota"
style="width:400px"
clearable
@input="handleInput($event, 'monthQuota')">
</el-input>
</div>
<div slot="yearQuotaHtml"
slot-scope="scope">
<el-input placeholder="请输入年额度"
v-model="infoForm.yearQuota"
style="width:400px"
clearable
@input="handleInput($event, 'yearQuota')">
</el-input>
</div>
<div slot="unDfQuotaHtml"
slot-scope="scope">
<el-input placeholder="请输入非代付已用额度"
v-model="infoForm.unDfQuota"
style="width:400px"
clearable
@input="handleUpgradeNum_unDfQuota">
</el-input>
</div>
</glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { transferQuotaMonitorConfigUpdate } from '@api/limitMonitor'
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { limitPrice, limitPriceForNegative } from '@/common/format'
import BigNumber from 'bignumber.js'
export default {
name: 'EditDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
merchantId: '',
statYear: '',
dayQuota: '',
monthQuota: '',
yearQuota: '',
dfQuota: '',
unDfQuota: '',
usedYearQuota: ''
},
oldVal: {
dayQuota: '',
monthQuota: '',
yearQuota: '',
unDfQuota: ''
},
dialogConfig: {
title: '额度设置',
width: '860px'
},
editChildRef: 'editChildRef',
formRules: {
platformMerchantId: [{ required: true, message: '请选择平台方', trigger: 'change' }],
sceneType: [{ required: true, message: '请选择业务场景', trigger: 'change' }],
transferType: [{ required: true, message: '请选择转账类型', trigger: 'change' }],
partnerMerchantId: [{ required: true, message: '请选择对账服务商', trigger: 'change' }],
// yqMerchantId: [{ required: true, message: '请选择对账园区店', trigger: 'change' }],
// shopMerchantId: [{ required: true, message: '请选择对账流量方', trigger: 'change' }],
reconciliationDate: [{ required: true, message: '请选择对账周期', trigger: 'change' }],
// expenseType: [{ required: true, message: '请选择费用类型', trigger: 'change' }],
transferInMerchantId: [{ required: true, message: '请选择转入方', trigger: 'change' }]
},
editFormData: [{
label: '所属年度',
name: 'statYear',
type: 'input',
isDisabled: true
}, {
label: '日额度/元',
name: 'dayQuota',
addHtml: 'dayQuotaHtml',
rules: [{ required: true, message: '请输入金额,支持输入0~9999999的数字,支持小数点后2位', trigger: 'change' }]
}, {
label: '月额度/元',
name: 'monthQuota',
addHtml: 'monthQuotaHtml',
rules: [{ required: true, message: '请输入金额,支持输入0~9999999的数字,支持小数点后2位', trigger: 'change' }]
}, {
label: '年额度/元',
name: 'yearQuota',
addHtml: 'yearQuotaHtml',
rules: [{ required: true, message: '请输入金额,支持输入0~9999999的数字,支持小数点后2位', trigger: 'change' }]
}, {
label: '已代付额度/元',
name: 'dfQuota',
type: 'input',
isDisabled: true
}, {
label: '非代付已用额度/元',
name: 'unDfQuota',
addHtml: 'unDfQuotaHtml',
rules: [{ required: true, message: '支持输入-9999999.99~9999999.99的数字,支持小数点后2位', trigger: 'change' }]
}, {
label: '已用额度/元',
name: 'usedYearQuota',
type: 'input',
isDisabled: true
}],
baseData: {
},
}
},
props: {
editVisible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
watch: {
},
computed: {
visible: {
get() {
return this.editVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'editVisible' })
}
},
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getDetail()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
getDetail() {
this.infoForm = deepClone(this.paramsObj)
console.log('this.infoForm', this.infoForm);
// this.infoForm.statYear = obj.statYear
// this.infoForm.usedYearQuota = obj.usedYearQuota
// this.infoForm.dfQuota = obj.dfQuota
},
handleInput(newVal, name) {
console.log(newVal)
newVal = newVal.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
this.infoForm[name] = limitPrice(newVal, this.oldVal[name], 7, 2, 0, 9999999)
this.oldVal[name] = this.infoForm[name]
},
handleUpgradeNum_unDfQuota(newVal) {
this.infoForm.unDfQuota = limitPriceForNegative(newVal)
if (this.infoForm.unDfQuota && !isNaN(this.infoForm.unDfQuota)) {
let dfQuota = new BigNumber(this.infoForm.dfQuota)
let unDfQuota = new BigNumber(this.infoForm.unDfQuota)
console.log(dfQuota);
console.log(unDfQuota);
this.infoForm.usedYearQuota = dfQuota.plus(unDfQuota).toString()
} else {
this.infoForm.usedYearQuota = deepClone(this.paramsObj.usedYearQuota)
}
},
handleAddConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var infoForm = deepClone(this.infoForm)
var params = {}
params.merchantId = infoForm.merchantId
params.statYear = infoForm.statYear
params.dayQuota = infoForm.dayQuota
params.monthQuota = infoForm.monthQuota
params.yearQuota = infoForm.yearQuota
params.unDfQuota = infoForm.unDfQuota
transferQuotaMonitorConfigUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.merchantInfo {
margin-left: 20px;
.merchantName {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 15px;
color: #333333;
}
.merchantId {
margin-left: 10px;
}
}
.add-dialog {
margin: 20px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
.down-cla {
width: 56px;
height: 32px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #185efe;
text-align: right;
line-height: 32px;
padding-left: 8px;
// cursor: pointer;
}
.file-box {
width: 350px;
.file-item {
margin-top: 6px;
position: relative;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
::v-deep .el-progress-bar {
width: 320px;
background: #ffffff;
border: 1px solid #f4f6fc;
border-radius: 4px;
.el-progress-bar__outer {
background: transparent;
border-radius: 4px;
.el-progress-bar__inner {
background: #f5f7fa;
border-radius: 4px;
}
}
}
::v-deep .el-image-viewer__wrapper {
width: 100vw;
height: 100vh;
}
.file-name {
position: absolute;
left: 12px;
top: 6px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image-file {
z-index: -1;
}
}
.file-item:first-child {
margin-top: 15px;
.file-name {
position: absolute;
left: 12px;
top: 15px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
}
}
}
}
</style>
<!-- 额度监控 - 列表 -->
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:labelWidth="labelWidth"
:form-data="showFormData">
<div slot="yearChoose"
slot-scope="scope">
<el-date-picker v-model="searchForm.statYear"
type="year"
placeholder="选择年"
value-format="yyyy"
format="yyyy"
:clearable="false"
:picker-options="pickerOption"
:editable="false">
</el-date-picker>
</div>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
<!-- 编辑 -->
<edit-dialog :editVisible="editVisible"
v-if="editVisible"
:paramsObj="recordInfo"
@dialogClose="editDialogClose" />
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { rangePickerOptions_year_2023 } from '@/common/format'
import { transferQuotaMonitorConfigPage } from '@api/limitMonitor'
import editDialog from './components/editDialog'
export default {
name: 'LimitMonitorList',
components: {
editDialog
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
pickerOption: rangePickerOptions_year_2023,
labelWidth: '100px',
searchForm: {
statYear: '',
merchantName: '',
matchMerchantId: ''
},
searchFormSearch: {},
showFormData: [{
label: '统计年度',
addHtml: 'yearChoose'
}, {
label: '商户名称',
name: 'merchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '商户号',
name: 'matchMerchantId',
type: 'input',
inputType: 'number',
maxlength: '20',
isClear: true
}],
getListApi: transferQuotaMonitorConfigPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// mutiSelectUniqueKey: 'id',
// mutiSelectName: 'transferAccounts',
// tableOption: { width: '100px' },
tableOption: true,
tableColumns: [{
label: '区域',
prop: 'cityName',
width: '100'
}, {
label: '商户名称',
prop: 'merchantName',
width: '300px'
}, {
label: '商户号',
prop: 'merchantId',
width: '120'
}, {
label: '联系方式',
prop: 'phone',
width: '120'
}, {
label: '开户行',
prop: 'openAccBankName',
width: '200px'
}, {
label: '账号',
prop: 'bankAccountNo',
width: '200px'
}, {
label: '日额度/元',
prop: 'dayQuota',
width: '120',
formatter: (cellValue) => {
return (cellValue.dayQuota || cellValue.dayQuota == 0) ? parseFloat(cellValue.dayQuota).toFixed(2) : '-'
}
}, {
label: '月额度/元',
prop: 'monthQuota',
width: '120',
formatter: (cellValue) => {
return (cellValue.monthQuota || cellValue.monthQuota == 0) ? parseFloat(cellValue.monthQuota).toFixed(2) : '-'
}
}, {
label: '年额度/元',
prop: 'yearQuota',
width: '120',
formatter: (cellValue) => {
return (cellValue.yearQuota || cellValue.yearQuota == 0) ? parseFloat(cellValue.yearQuota).toFixed(2) : '-'
}
}, {
label: '本年已用额度',
prop: 'usedYearQuota',
width: '120',
formatter: (cellValue) => {
return (cellValue.usedYearQuota || cellValue.usedYearQuota == 0) ? parseFloat(cellValue.usedYearQuota).toFixed(2) : '-'
}
}, {
label: '剩余额度',
prop: 'remnantQuota',
width: '120',
formatter: (cellValue) => {
return (cellValue.remnantQuota || cellValue.remnantQuota == 0) ? parseFloat(cellValue.remnantQuota).toFixed(2) : '-'
}
}
]
},
baseData: {
},
recordInfo: null,
editVisible: false
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
if (!this.searchForm.statYear) {
const nowDate = new Date()
this.searchForm.statYear = nowDate.getFullYear().toString()
}
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
console.log('this.baseData[item.optionsName]', item.optionsName)
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
statYear: '',
merchantName: '',
matchMerchantId: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
handleEdit(row) {
this.recordInfo = row
this.editVisible = !this.editVisible
},
editDialogClose(obj) {
this[obj.attrName] = !this[obj.attrName]
if (obj.flag) {
this.$refs.recordTable.refreshTable()
}
},
handleExport() {
var params = this.searchFormSearch
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.api.smartcarlife.transferQuotaMonitorConfig.exportAsync'
const list = [
...this.dowloadList,
{
name: '额度监控',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
......@@ -150,12 +150,14 @@ import { mapActions, mapState } from 'vuex'
import { limitPrice } from '@/common/format'
import { uploadPDF, uploadExcel } from '@/api/sys.base'
import { getServiceStore } from '@api/editCustomer'
import { getPlatformMerchantList } from '@api/index'
export default {
name: 'AddDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
platformMerchantId: '',
sceneType: '',
transferType: 1,
partnerMerchantId: '',
......@@ -181,6 +183,7 @@ export default {
},
editChildRef: 'editChildRef',
formRules: {
platformMerchantId: [{ required: true, message: '请选择平台方', trigger: 'change' }],
sceneType: [{ required: true, message: '请选择业务场景', trigger: 'change' }],
transferType: [{ required: true, message: '请选择转账类型', trigger: 'change' }],
partnerMerchantId: [{ required: true, message: '请选择对账服务商', trigger: 'change' }],
......@@ -191,10 +194,18 @@ export default {
transferInMerchantId: [{ required: true, message: '请选择转入方', trigger: 'change' }]
},
editFormData: [{
label: '所属平台方',
name: 'platformMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList'
}, {
label: '业务场景',
name: 'sceneType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
......@@ -264,7 +275,7 @@ export default {
this.baseData.shopMerchantList = [{ merchantId: '', merchantName: '全部' }]
this.infoForm.shopMerchantId = ''
this.getOptionsList('editFormData', true, 'shopMerchantId')
this.baseData.yqMerchantList = targetItem.optionList.find(item => item.partnerMerchantId == value).subMerchantsInfo
this.baseData.yqMerchantList = targetItem.optionList.find(item => item.partnerMerchantId == value).ymerchants
this.getOptionsList('editFormData', true, 'yqMerchantId')
this.getAmount()
}
......@@ -274,8 +285,8 @@ export default {
type: 'select',
isClear: true,
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionId: 'ymerchantId',
optionLabel: 'ymerchantName',
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
if (value) {
......@@ -380,8 +391,8 @@ export default {
],
expenseTypes2: [
{ confId: 3, confValue: "流量费" }
// { confId: 4, confValue: "流量费" },
]
],
PlatformMerchantList: [],
},
uploadFileList: []
}
......@@ -428,6 +439,7 @@ export default {
},
mounted() {
this.getPlatformMerchantList()
this.getMerchantList()
this.getInMerchantList()
this.getOptionsList('editFormData', false)
......@@ -845,6 +857,7 @@ export default {
})
}
params.voucherList = infoForm.voucherList
params.platformMerchantId = infoForm.platformMerchantId
transferAccountsRecordAdd(params).then(res => {
this.notice.okTips('操作成功')
......@@ -857,6 +870,18 @@ export default {
// 找到在formList的位置,通过name来匹配
findFormIdx(name) {
return this.editFormData.findIndex(item => item.name === name)
},
//获取平台方数据
getPlatformMerchantList() {
getPlatformMerchantList({}).then(res => {
res.unshift({
merchantId: -1,
merchantName: '嘀加智慧云'
})
this.baseData.PlatformMerchantList = res
this.getOptionsList('editFormData', false, 'platformMerchantId')
})
}
}
}
......
<!-- 商务领导审核 -->
<template>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" class="accountDailog" @handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container" ref="formRef" label-width="150px" default-width="350px"
:form-ref="examineRef" :form-obj="infoForm" :form-data="editFormData" :form-rules="formRules"></glsx-combi-form>
<span :style="{ 'margin-left': '150px' }">审核通过后,转账业务单据自动流转至运营审核。</span>
</div>
</baseDialog>
</template>
<script>
import { transferAccountsRecordUpdateStatus, batchBusinessAudit } from '@api/transferAccountsManage'
// import { deepClone } from '@/common/util'
export default {
name: 'LeaderExamineDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
// txtObj: {
// procurementReview: '说明:订单审核后会自动流转至商务进行复审',
// procurementBusiness: '说明:订单审核后会自动流转至供应商进行确认并发货'
// },
infoForm: {
remark: ''
},
dialogConfig: {
title: '商务领导审核',
width: '600px'
},
examineRef: 'examineRef',
formRules: {
// sendOutMerchantId: [{ required: true, message: '请选择发货主体', trigger: 'change' }]
},
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 50,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
// shippingEntityList: []
}
}
},
props: {
// fromPage: {
// type: String,
// default: 'procurementReview'
// },
examineVisible: {
type: Boolean,
default: false
},
// paramsObj: {
// type: Object,
// default: {}
// }
infoList: {
type: Array,
default: () => { }
}
},
computed: {
visible: {
get() {
return this.examineVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'leaderExamineDialogVisible' })
}
}
},
mounted() {
},
methods: {
handleAddConfirm() {
var params = {}
params.remark = this.infoForm.remark
params.status = 1
if (this.infoList.length > 1) {
params.orderCodeList = this.infoList.map((item) => {
return item.orderCode
})
} else {
params.orderCode = this.infoList[0].orderCode
}
console.log(params)
const _api = this.infoList.length > 1 ? batchBusinessAudit : transferAccountsRecordUpdateStatus
_api(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<template>
<d2-dialog :title="title" mode="mid" v-if="isVisible" :is-visible.sync="isVisible" width="750px" noCancel btn-ok-label="关闭" :before-close="handleClose" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<div class="explain-title">示例规则定义</div>
<d2-table v-if="diffExplain !== 'minimumWage'" :tableData="tableData" :table-params="tableParams" :hasPage="false"></d2-table>
<div v-else>开启保底工资,当员工的基本工资+绩效工资低于保底工资时,默认以保底工资作为最终工资</div>
<template v-if="diffExplain !== 'minimumWage'">
<div class="explain-title mt20">示例业务场景</div>
<div class="business-info" v-html="infoHtml"></div>
</template>
</d2-dialog>
</template>
<script>
export default {
data() {
return {
tableParams: {
tableColumns: [
{
label: '区间开始值/元',
prop: 'startValue'
},
{
label: '区间结束值/元',
prop: 'endValue'
},
{
label: '奖励金额/元',
prop: 'calculateValue'
}
]
},
tableData: []
}
},
props: {
isExplain: {
type: Boolean,
default: false
},
diffExplain: {
type: String,
default: ''
}
},
computed: {
title() {
const titleObj = {
minimumWage: '保底工资示例说明',
averagePriceBonus: '均客单奖励示例说明',
customerUnitBonus: '高客单奖励示例说明',
outputBonus: '高产值奖励示例说明',
upgradeRateBonus: '成交率奖励示例说明',
montorAdditionalBonus: '导师附加提成示例说明'
}
return titleObj[this.diffExplain]
},
infoHtml() {
const infoObj = {
averagePriceBonus: `<div class='mb10'>员工A在某个月中完成升级订单5个,对应的订单产值1000.00元、1500.00元、2000.00元、2500.00元、3000.00元,</div>
<div class='mb10'>则月度的平均客单价=升级订单总产值/升级订单数量=2000.00元,对应规则的提成比例=10.00%,按每个升级订单的产值*10%计算每单提成;</div>
<div class='mb10'>则员工A在该月份获得的总提成奖励=100.00+150.00+200.00+250.00+300.00=1000.00元。</div>`,
customerUnitBonus: `<div class='mb10'>员工A在某个月中完成升级订单5个,对应的订单产值1000.00元、1500.00元、2000.00元、2500.00元、3000.00元,</div>
<div class='mb10'>按高客单奖励规则,产值在0.00-2000.00元的订单每单奖励0.00元(不奖励),产值在2000.00元以上的订单每单奖励100.00元;</div>
<div class='mb10'>则员工A在该月份获得的高客单奖励=0.00+0.00+0.00+100.00+100.00=200元。</div>`,
outputBonus: `<div class='mb10'>员工A在某个月中单店完成产值15000元,按高产值奖励规则,奖励值落点区间在0-20000,则提成比例为产值5%;</div>
<div class='mb10'>则员工A在该月份获得的高产值奖励=15000*5%=750元。</div>`,
upgradeRateBonus: `<div class='mb10'>员工A在某个月中完成升级订单9个,战败订单1个</div>
<div class='mb10'>则月度的成交率=升级订单数/(升级订单数+战败订单数)=90.00%,对应规则的提成比例为10%,若该员工的订单产值为10000元,</div>
<div class='mb10'>则员工A在该月份获得的成交率奖励=1000.00元。</div>`,
montorAdditionalBonus: `<div class='mb10'>1、员工a入职时间为8月18日,对应0-3个月内的导师提成比例为20%,假如第一个月内员工a产生订单产值40000元,根据业绩配置该员工提成为4000元,则其关联导师的导师提成激励为4000*20%=800元,计入次月导师的月份最终工资</div>
<div class='mb10'>2、员工a到11月18日为满三个月,12月份初计算导师提成时,按11.1-11.18的学员提成20%和11.19-11.30的学员提成10%计算为该导师的11月总导师激励提成</div>
<div class='mb10'>3、删除解绑学员时不影响订单提成规则,如8月18日关联导师,8月20日解绑学员时,导师在9月初将计算8.18-8.20该学员的订单提成比例,并入导师提成激励计算到9月初发放的最终工资中。</div>
<div class='mb10'>4、按导师学员的绑定关系计算,区间月份含当月,0即为第一个月份,0-3代表前三个月,4-6代表第四到第六个月整,以此类推</div>`
}
return infoObj[this.diffExplain]
},
isVisible() {
return this.isExplain
}
},
watch: {
diffExplain(newVal) {
this.tableParams.tableColumns[0].label = '区间开始值/元'
this.tableParams.tableColumns[1].label = '区间结束值/元'
this.tableParams.tableColumns[2].label = '提成比例/%'
switch (newVal) {
case 'customerUnitBonus':
this.tableData = [
{ startValue: 0, endValue: 2000, calculateValue: 0 },
{ startValue: 2000.01, endValue: '--', calculateValue: 100 }
]
this.tableParams.tableColumns[2].label = '奖励金额/元'
break
case 'upgradeRateBonus':
this.tableData = [
{ startValue: 0, endValue: '45%', calculateValue: '5%' },
{ startValue: '45.01%', endValue: '--', calculateValue: '10%' }
]
this.tableParams.tableColumns[0].label = '区间开始值/%'
this.tableParams.tableColumns[1].label = '区间结束值/%'
break
case 'averagePriceBonus':
this.tableData = [
{ startValue: 0, endValue: 2000, calculateValue: '10%' },
{ startValue: 2000.01, endValue: '--', calculateValue: '20%' }
]
break
case 'outputBonus':
this.tableData = [
{ startValue: 0, endValue: 20000, calculateValue: '5%' },
{ startValue: 20000.01, endValue: '--', calculateValue: '10%' }
]
break
case 'montorAdditionalBonus':
this.tableData = [
{ startValue: 0, endValue: 3, calculateValue: '20%' },
{ startValue: 4, endValue: 6, calculateValue: '10%' }
]
this.tableParams.tableColumns[0].label = '区间开始值/月(含当月)'
this.tableParams.tableColumns[1].label = '区间结束值/月'
this.tableParams.tableColumns[2].label = '提成比例/%'
break
}
}
},
methods: {
handleConfirm() {
this.$emit('handleClose')
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style lang="scss">
.explain-title {
font-weight: 600;
font-size: 16px;
color: #333333;
margin-bottom: 10px;
}
.business-info {
font-size: 14px;
color: #333333;
line-height: 18px;
}
.mb10 {
margin-bottom: 10px;
}
.mt20 {
margin-top: 20px;
}
</style>
\ No newline at end of file
<!-- 商学院员工管理 -->
<template>
<div class="staff-list-wrap">
<div class="header" slot="header" style="background: #e7eaec">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane>
</el-tabs>
<components :is="tabName" :sceneType="activeName"></components>
</div>
</div>
</template>
<script>
import staffList from "./staffList.vue"
export default {
name: "StaffManage",
components: {
staffList,
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "2.1权益业务员工",
name: "0"
}
],
tabName: "staffList"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
handleClick() {
const arr = {
0: "staffList"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style lang="scss" scoped>
.staff-list-wrap {
padding: 0 24px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
<!-- 业绩详情弹窗 -->
<template>
<d2-dialog
title="查看明细"
:is-visible.sync="perDetailVisible"
width="75%"
btn-ok-label="关闭"
@confirmDialog="handleConfirm"
@closeDialog="handleConfirm"
:noCancel="true"
class="performance-detail">
<span slot="sub-title">
<span class="title-staff-name">{{ detailInfoData.updatedBy }}</span><span>{{ detailInfoData.merchantName }}</span>
</span>
<el-row class="tableCon">
<div class="tableBox">
<d2-table ref="perDetailTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</el-row>
</d2-dialog>
</template>
<script>
import { getPerDetailListApi } from '@api/businessSchool'
import { Util } from '@/common/util'
export default {
name: 'PerformanceDetailDialog',
data() {
return {
getListApi: getPerDetailListApi,
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [{
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '订单编号',
prop: 'orderCode',
width: '160'
}, {
label: '支付时间',
prop: 'paySuccessTime',
width: '160',
formatter: (cellValue) => {
return Util.dateFormate(cellValue?.paySuccessTime, 'YYYY-MM-DD HH:mm:ss')
}
}, {
label: '客户名称',
prop: 'customerName',
}, {
label: '客户手机号',
prop: 'customerPhone',
width: '120'
}, {
label: '订单产值/元',
prop: 'orderMoney'
}, {
label: '均客单奖励',
prop: 'averagePriceBonus'
}, {
label: '高客单奖励',
prop: 'customerUnitBonus'
}, {
label: '高产值奖励',
prop: 'outputBonus'
}, {
label: '成交率奖励',
prop: 'upgradeRateBonus'
}, {
label: '导师激励提成',
prop: 'mentorBonus'
}, {
label: '订单总提成',
prop: '',
formatter: (cellValue) => {
// 当前员工id=mentorStaffUuid 取导师奖励提成 否则就是 均客单奖励+高客单奖励+高产值奖励+成交率奖励
return cellValue?.mentorStaffUuid == this.detailInfoData?.staffUuid ? (cellValue?.mentorBonus || 0) : cellValue?.averagePriceBonus + cellValue?.customerUnitBonus + cellValue?.outputBonus + cellValue?.upgradeRateBonus
}
}]
},
searchForm: {}
}
},
props: {
perDetailVisible: {
type: Boolean,
default: false
},
detailInfoData: {
type: Object
},
sceneType: {
type: String
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
mentorOrStudentStaffUuid: this.detailInfoData?.staffUuid,
sceneType: this.sceneType
}
resolve()
})
},
handleConfirm() {
this.$emit('handleConfirm')
}
}
}
</script>
<style lang="scss">
.performance-detail .table {
margin: 0 auto 20px !important;
width: 98%;
}
.title-staff-name{
margin: 0 8px;
}
</style>
......@@ -218,6 +218,7 @@ export default {
console.log(res)
// res = res[0]
this.form.feeCategoryName = res.feeCategoryName
this.form.feeCategoryNameId = res?.feeCategoryNameId || ''
// const scenes = res.feeCategorySceneList
// if (scenes && scenes.length > 0) {
// const list = scenes.map(item => {
......
......@@ -181,6 +181,7 @@ export default {
this.form.applicationObjectType = res.applicationObjectType
// this.form.tableData = res[0].feeCategoryNameList
this.form.tableData = res.feeCategoryChildren
// this.form.feeCategoryNameId = res?.feeCategoryNameId || ''
})
},
......
......@@ -101,7 +101,9 @@
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
<p>按固定金额:费用=定义的固定金额;</p>
<p>按(收入-自定义其他费用)比例:以(收入-自定义其他费用)*(定义的比例)进行费用计算,其中自定义其他费用为不包含产品成本的其他费用;</p>
<p>按(收入-其他费用)比例:以(收入-其他费用)*(定义的比例)进行费用计算,其中其他费用是包含产品成本的全部其他费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
......@@ -119,7 +121,7 @@
<el-select v-model="classificationObj.trafficSide[index]
.expenseCategoryCalculateType
" @change="forceUpdate" placeholder="请选择分润模式">
<el-option v-for="el in defaultSelectOptions" :key="el.expenseCategoryCalculateType" :label="el.label"
<el-option v-for="el in otherSelectOptions" :key="el.expenseCategoryCalculateType" :label="el.label"
:value="el.expenseCategoryCalculateType" />
</el-select>
</el-form-item>
......@@ -175,7 +177,7 @@
<el-select v-model="scope.row
.expenseCategoryCalculateType
" @change="forceUpdate" placeholder="请选择分润模式">
<el-option v-for="el in defaultSelectOptions" :key="el.expenseCategoryCalculateType" :label="el.label"
<el-option v-for="el in otherSelectOptions" :key="el.expenseCategoryCalculateType" :label="el.label"
:value="el.expenseCategoryCalculateType" />
</el-select>
</el-form-item>
......@@ -257,6 +259,8 @@
<p>
按园区店毛利比例:以(收入-流量方总分润-其他费用包含产品成本)*(定义的比例)进行费用计算
</p>
<p>按(收入-自定义其他费用)比例:以(收入-自定义其他费用)*(定义的比例)进行费用计算,其中自定义其他费用为不包含产品成本的其他费用;</p>
<p>按(收入-其他费用)比例:以(收入-其他费用)*(定义的比例)进行费用计算,其中其他费用是包含产品成本的全部其他费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
......@@ -468,12 +472,13 @@
</p>
<br />
<p>分润模式说明:</p>
<p>
<p>默认按不扣除手续费进行计算</p>
<!-- <p>
若流量方分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;
</p>
<p>
若流量方分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。
</p>
</p> -->
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
......@@ -617,6 +622,7 @@ import { getAllGoodsList } from '@api/grounding'
import {
defaultSelectOptions,
severSelectOptions,
otherSelectOptions,
goodsSourceList
} from "@/common/constant/merchant"
import tipsDialog from "./tipsDialog"
......@@ -751,6 +757,7 @@ export default {
},
defaultSelectOptions: Object.freeze(defaultSelectOptions),
severSelectOptions: Object.freeze(severSelectOptions),
otherSelectOptions: Object.freeze([...defaultSelectOptions, ...otherSelectOptions]), // 新增适配分账模式
goodsSourceList: Object.freeze(goodsSourceList),
// serviceMerchantList: [],
rules: {
......@@ -1211,6 +1218,8 @@ export default {
expenseCategoryRules.find(
(el) => el.expenseCategoryId == item.expenseCategoryId
) || {}
// 解决 类目更新名字历史财务会覆盖掉的问题
editObj.expenseCategoryName = item.applicationObjectName
editObj.children = editObj.children || []
// console.log(editObj)
const obj = {
......@@ -1245,7 +1254,8 @@ export default {
editObj.children?.find(
(el) => el.expenseCategoryId == ele.expenseCategoryId
) || {}
// 解决 类目更新名字历史财务会覆盖掉的问题
editChildrenObj.expenseCategoryName = ele.applicationObjectName
// console.log(ele, 'ele')
const childrenObj = {
expenseCategoryCalculateType: "", // 计算方式
......
......@@ -39,13 +39,13 @@
<el-table :header-cell-style="{ background: '#F2F4F7', 'text-align': 'center', 'color': '#333333' }"
:cell-style="{ 'text-align': 'center', 'color': '#666666;' }" border :span-method="objectSpanMethod"
:data="categoryTableData.expenseCategoryCalculatedLevelItemForRuleTestsResults">
<el-table-column prop="targetType" label="类型" width="143">
<el-table-column prop="targetType" label="类型" width="100">
<template slot-scope="scope">
{{ targetType[scope.row.targetType] }}
</template>
</el-table-column>
<el-table-column prop="expenseCategoryName" label="分账类目" width="143" />
<el-table-column prop="calculateMode" label="计算模式" width="143">
<el-table-column prop="calculateMode" label="计算模式" width="100">
<template slot-scope="scope">
<span>{{ scope.row.calculateMode == 1 ? '按品类计算' : scope.row.calculateMode == 2 ? '按整单计算' : '-' }}</span>
</template>
......@@ -83,7 +83,7 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="calculateMode" label="分账规则" width="143">
<el-table-column prop="calculateMode" label="分账规则" width="">
<template slot-scope="scope">
<div v-if="scope.row.nodeType == 2">
<!-- <div class="detail-i more">
......@@ -206,7 +206,8 @@ export default {
// prop: 'orderCode',
width: '200px',
formatter: (cellValue) => {
return this.targetMerchantType[cellValue.targetMerchantType] + ':' + cellValue.merchantName
// realityMerchantName 实际分账对象
return this.targetMerchantType[cellValue.targetMerchantType] + ':' + cellValue.realityMerchantName
}
}, {
label: '分账类目',
......
......@@ -287,6 +287,7 @@ export default {
border-spacing: 0;
text-align: center;
min-width: 100px;
white-space: nowrap;
/* white-space: nowrap; */
/* overflow: hidden; */
/* text-overflow: ellipsis; */
......
......@@ -357,7 +357,7 @@ export default {
// debugger
queryFeeCategoryByType({ feeCategoryType: 1, applicationSceneType: this.routerInfo.scene, orderBy: 2, pageSize: 100000 }).then((result) => {
result = result.list
// console.log(result, 'result')
console.log(result, 'result')
this.classificationObj = result.reduce((prev, item) => {
// console.log(item, 'item')
const { applicationObjectType, feeCategoryChildren, formType, feeCategoryNameId, targetType, nodeType } = item
......
......@@ -91,7 +91,9 @@
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
<p>按固定金额:费用=定义的固定金额;</p>
<p>按(收入-自定义其他费用)比例:以(收入-自定义其他费用)*(定义的比例)进行费用计算,其中自定义其他费用为不包含产品成本的其他费用;</p>
<p>按(收入-其他费用)比例:以(收入-其他费用)*(定义的比例)进行费用计算,其中其他费用是包含产品成本的全部其他费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
......@@ -194,9 +196,14 @@
<p>若服务商分润扣除手续费,则收入=实收金额,毛利=实收金额-产品成本;</p>
<p>若服务商分润不扣除手续费,则收入=原支付金额,毛利=原支付金额-产品成本。</p>
<br />
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按毛利比例:以毛利*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额</p>
<p>按收入比例:以收入*(定义的比例)进行费用计算;</p>
<p>按固定金额:费用=定义的固定金额;</p>
<p>按园区店总金额比例:以(收入-流量方总分润)*(定义的比例)进行费用计算;</p>
<p>按园区店毛利(不扣除产品成本)比例:以(收入-流量方总分润-其他费用不包含产品成本)*(定义的比例)进行费用计算</p>
<p>按园区店毛利比例:以(收入-流量方总分润-其他费用包含产品成本)*(定义的比例)进行费用计算</p>
<p>按(收入-自定义其他费用)比例:以(收入-自定义其他费用)*(定义的比例)进行费用计算,其中自定义其他费用为不包含产品成本的其他费用;</p>
<p>按(收入-其他费用)比例:以(收入-其他费用)*(定义的比例)进行费用计算,其中其他费用是包含产品成本的全部其他费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
......@@ -296,7 +303,7 @@ import {
getMerchantLevelListApi
} from "@api/merchant"
import {
defaultSelectOptions, severSelectOptions, goodsSourceList
defaultSelectOptions, severSelectOptions, otherSelectOptions, goodsSourceList
} from "@/common/constant/merchant"
import { deepClone } from "@/common/util"
import { getAllGoodsList } from '@api/grounding'
......@@ -414,8 +421,8 @@ export default {
{ required: true, message: "请输入", trigger: "change" }
]
},
flowFeeList: defaultSelectOptions, // 流量方费用列表
serveFeeList: severSelectOptions, // 服务商费用列表
flowFeeList: Object.freeze([...defaultSelectOptions, ...otherSelectOptions]), // 流量方费用列表
serveFeeList: Object.freeze(severSelectOptions), // 服务商费用列表
goodsSourceList: Object.freeze(goodsSourceList), // 商品来源
flowList: [], // 流量方列表
serveList: [], // 服务商列表
......@@ -718,6 +725,12 @@ export default {
const listLength = titleListFlow.length
const resultArr = that.addTitleList(listLength, 1)
console.log('resultArr:表头流量方 ', resultArr)
// 初始化 流量方 需要最后一个是承担剩余金额
titleListFlow.forEach((item, index) => {
if (index == resultArr.length - 1) {
item.calculateMode = 2
}
})
that.classificationObj.flowCostArr = resultArr
// 设置表头关联id,名称
titleListFlow.forEach((item, index) => {
......@@ -755,8 +768,17 @@ export default {
item.feeCategoryNameId
that.classificationObj.serviceCostArr[index].expenseCategoryName =
item.feeCategoryName
that.classificationObj.serviceCostArr[index].calculateMode = item.calculateMode || 1
// 奖惩费是需要特殊处理的
if (item.feeCategoryName == '奖惩费') {
that.classificationObj.serviceCostArr[index].calculateMode = 2
}
// if (condition) {
// }
})
// console.log(titleListServe, 'titleListServe')
this.getEffectRule()
// }
......@@ -814,7 +836,7 @@ export default {
item = {
targetType: innerItem.targetType,
expenseCategoryId: innerItem.expenseCategoryId,
expenseCategoryName: innerItem.expenseCategoryName,
expenseCategoryName: item?.expenseCategoryName || innerItem.expenseCategoryName,
expenseCategoryCalculateType:
innerItem.expenseCategoryCalculateType,
expenseCategoryValue: innerItem.expenseCategoryValue,
......
......@@ -549,6 +549,12 @@ export default {
case 6:
res = '按(产值-流量成本-其他费用包含产品成本):'
break
case 8:
res = '按(收入-自定义其他费用):'
break
case 9:
res = '按(收入-其他费用):'
break
}
res = res + num + (value == 3 ? '元' : '%')
return res
......
......@@ -83,7 +83,7 @@
import { deepClone } from "@/common/util"
import {
defaultSelectOptions,
severSelectOptions
otherSelectOptions
} from "@/common/constant/merchant"
import { sceneList } from "@/common/constants"
import {
......@@ -104,8 +104,6 @@ export default {
},
data() {
return {
// defaultSelectOptions,
// severSelectOptions,
sceneList,
verificationCodeVisible: false,
smsCode: '',
......@@ -202,7 +200,7 @@ export default {
pageSize: 10000
}
getQueryFeeCategoryByTypeApi(params).then((result) => {
console.log(result, 'result')
console.log(result, [...defaultSelectOptions, ...otherSelectOptions], 'result')
this.queryFeeCategoryByTypeFlow = result.list
// if (condition) {
result.list.length && this.formObjConfig.unshift({
......@@ -210,7 +208,7 @@ export default {
valueName: 'shopMerchantExpenseCategoryValue',
message: '请选择流量方总对账费',
label: '流量方总对账费用',
options: defaultSelectOptions
options: [...defaultSelectOptions, ...otherSelectOptions]
})
// }
})
......@@ -230,7 +228,7 @@ export default {
valueName: 'partnerMerchantExpenseCategoryValue',
label: '服务商总对账费用',
message: '请选择服务商总对账费用',
options: defaultSelectOptions
options: [...defaultSelectOptions, ...otherSelectOptions]
// options: severSelectOptions
})
})
......
<template>
<d2-container class="edit_service">
<div class="d2-container-content form_class">
<el-form label-width="120px"
:model="detailInfo"
ref="editServiceForm"
:rules="rules">
<el-form-item label="采购模式:"
prop="procurementType">
<el-radio-group size="mini"
v-model="detailInfo.procurementType">
<el-radio v-for="(subItem, subIdx) in procureModeList"
:key="subIdx"
:label="subItem.confId">{{
<el-form label-width="120px" :model="detailInfo" ref="editServiceForm" :rules="rules">
<el-form-item label="类型:" prop="partnerType">
<el-radio-group size="mini" v-model="detailInfo.partnerType">
<el-radio v-for="(subItem, subIdx) in partnerTypeList" :key="subIdx" :label="subItem.confId">{{
subItem.confName }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="发货主体:"
prop="shippingEntityId">
<el-select v-model="detailInfo.shippingEntityId"
class="select_class"
placeholder="请选择发货主体">
<el-option v-for="(subItem, subIndex) in shippingEntityList"
:key="subIndex"
:label="subItem.shippingEntity"
:value="subItem.shippingEntityId" />
<el-form-item label="采购模式:" prop="procurementType">
<el-radio-group size="mini" v-model="detailInfo.procurementType">
<el-radio v-for="(subItem, subIdx) in procureModeList" :key="subIdx" :label="subItem.confId">{{
subItem.confName }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="发货主体:" prop="shippingEntityId">
<el-select v-model="detailInfo.shippingEntityId" class="select_class" placeholder="请选择发货主体">
<el-option v-for="(subItem, subIndex) in shippingEntityList" :key="subIndex" :label="subItem.shippingEntity"
:value="subItem.shippingEntityId" />
</el-select>
</el-form-item>
<el-form-item label="库存管理模式:"
prop="stockManagementMode">
<el-radio-group size="mini"
v-model="detailInfo.stockManagementMode">
<el-radio v-for="(subItem, subIdx) in stockManagementModeList"
:key="subIdx"
:label="subItem.confId">{{
<el-form-item label="库存管理模式:" prop="stockManagementMode">
<el-radio-group size="mini" v-model="detailInfo.stockManagementMode">
<el-radio v-for="(subItem, subIdx) in stockManagementModeList" :key="subIdx" :label="subItem.confId">{{
subItem.confName }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="下级服务商:">
<div v-for="(item, index) in detailInfo.subMerchantList"
:key="index">
<div v-for="(item, index) in detailInfo.subMerchantList" :key="index">
<div class="inputCol">
<el-form-item>
<el-select v-model="item.merchantId"
filterable
remote
reserve-keyword
placeholder="请输入关键字"
style="width: 432px"
:remote-method="remoteMethod"
@change="changeOpt"
:loading="loading">
<el-option v-for="(opt, optIndex) in options"
:key="optIndex"
:label="opt.merchantName"
:value="opt.merchantId"
:disabled="setDisabled(opt.merchantId)">
<el-select v-model="item.merchantId" filterable remote reserve-keyword placeholder="请输入关键字"
style="width: 432px" :remote-method="remoteMethod" @change="changeOpt" :loading="loading">
<el-option v-for="(opt, optIndex) in options" :key="optIndex" :label="opt.merchantName"
:value="opt.merchantId" :disabled="setDisabled(opt.merchantId)">
</el-option>
</el-select>
<el-button type="text"
style="color: red;paddingLeft:10px"
@click="handleDelMerchant(index)">删除</el-button>
<el-button type="text" style="color: red;paddingLeft:10px"
@click="handleDelMerchant(index)">删除</el-button>
</el-form-item>
</div>
</div>
<div>
<el-button type="primary"
size="small"
plain
@click="handleAddMerchant">添加一行</el-button>
<el-button type="primary" size="small" plain @click="handleAddMerchant">添加一行</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div style="margin-top: 40px;text-align: center;">
<el-button class="width_100 cancel-btn"
@click="handleClose">取消</el-button>
<el-button type="primary"
@click="handleUp"
:disabled="$store.state.d2admin.loading.value"
class="width_100">提交</el-button>
<el-button class="width_100 cancel-btn" @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleUp" :disabled="$store.state.d2admin.loading.value"
class="width_100">提交</el-button>
</div>
</d2-container>
</template>
<script>
import { deepClone } from '@/common/util'
import { procureModeList, stockManagementModeList } from "@/common/constants"
import { procureModeList, stockManagementModeList, partnerTypeList } from "@/common/constants"
import { mapActions } from 'vuex'
import { getProviderProcurementInfo, updateProviderProcurementInfo, getShippingEntityInfoAll, searchServiceMerchant } from "@api/serviceManage"
export default {
......@@ -93,6 +65,7 @@ export default {
return {
procureModeList,
stockManagementModeList,
partnerTypeList,
rules: {
// procurementType: [{ required: true, message: '请选择采购模式', trigger: 'change' }],
shippingEntityId: [{ required: true, message: '请选择发货主体', trigger: 'change' }],
......@@ -102,12 +75,13 @@ export default {
procurementType: '',
shippingEntityId: '',
subMerchantList: [],
stockManagementMode: 2
stockManagementMode: 2,
partnerType: 1
},
shippingEntityList: [],
serviceMerchantId: '',
loading: false,
options: [],
options: []
}
},
mounted() {
......@@ -172,10 +146,11 @@ export default {
procurementType: this.detailInfo.procurementType,
shippingEntity: this.shippingEntityList.filter(val => val.shippingEntityId == this.detailInfo.shippingEntityId)[0]?.shippingEntity || '',
shippingEntityId: this.detailInfo.shippingEntityId,
stockManagementMode: this.detailInfo.stockManagementMode
stockManagementMode: this.detailInfo.stockManagementMode,
partnerType: this.detailInfo.partnerType
}
if (this.detailInfo.subMerchantList && this.detailInfo.subMerchantList.length > 0) {
let _subMerchantList = deepClone(this.detailInfo.subMerchantList)
const _subMerchantList = deepClone(this.detailInfo.subMerchantList)
const list = []
let info
......@@ -252,7 +227,7 @@ export default {
} else {
return false
}
},
}
}
}
</script>
......
......@@ -7,6 +7,12 @@
</div>
<div class="form_box">
<el-form label-width="180px" size="small">
<!-- <el-form-item label="类型:">
<el-radio-group v-model="partnerType">
<el-radio v-for="(item, index) in partnerTypeList" :key="index" :label="item.id">{{ item.name
}}</el-radio>
</el-radio-group>
</el-form-item> -->
<el-form-item label="登录控制:" class="loginClass">
<el-checkbox-group v-model="loginControlList" :min="1">
<el-checkbox v-for="(item, index) in loginTypeList" :key="index" :label="item.id" :disabled="item.disabled">
......@@ -36,7 +42,8 @@
</el-form-item>
<el-form-item label="设置为真实(主)服务商:">
<el-select style="width: 350px;" v-model="partnerMerchantId">
<el-option v-for="(subItem, subIndex) in serviceList" :key="subIndex" :label="subItem.partnerMerchantName" :value="subItem.partnerMerchantId"></el-option>
<el-option v-for="(subItem, subIndex) in serviceList" :key="subIndex" :label="subItem.partnerMerchantName"
:value="subItem.partnerMerchantId"></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -71,14 +78,19 @@ export default {
{ id: 0, name: '微信', disabled: false },
{ id: 1, name: '企业微信', disabled: false }
],
// partnerTypeList: [
// { id: 1, name: '普通' },
// { id: 2, name: '个体' }
// ],
checkList: [0],
manageTypeList: manageTypeList,
businessModel: '',
installMerchantName: '',
loginControlList: [],
marketingMerchantName: '',
// partnerType: 1,
serviceList: [], // 服务商数据
partnerMerchantId: '', // 主服务商
partnerMerchantId: '' // 主服务商
}
},
mounted() {
......@@ -99,6 +111,7 @@ export default {
this.marketingMerchantName = res.marketingMerchantName || ''
this.loginControlList = res.loginControlList || [0, 1]
this.partnerMerchantId = res.partnerMerchantId || ''
// this.partnerType = res.partnerType || 1
this.onChange(this.checkList)
})
},
......@@ -187,6 +200,7 @@ export default {
oParams.supportPayTypes = this.checkList
oParams.businessModel = this.businessModel
oParams.loginControlList = this.loginControlList
// oParams.partnerType = this.partnerType
UPDATEYQMERCHANTCONFIG(oParams).then((res) => {
console.log(res)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!