Commit 9d9423bb by 张立顺

Merge branch 'dev_v4.35.0-0305' of http://192.168.3.233:8090/saas_plus/dj-car-li…

…fe-system into dev_v4.35.0-0305
2 parents d53bb7a4 a122efd3
Showing 57 changed files with 4129 additions and 114 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')
}
// 根据园区店商户号获取不同场景下的4S店
export function getMerchantStoreApi(data) {
data.method = "dj.api.scenemerchantref.query4SRefByYqShop"
return request(data, "post")
}
import request from "./request"
// 获取店面目标列表
export function getStoreTargetListApi(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.ref.page'
return request(data, 'post')
}
// 获取员工任务列表
export function getStaffTaskListApi(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.ref.page'
return request(data, 'post')
}
// 获取员工任务详情
export function getStaffTaskDetailApi(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.ref.page'
return request(data, 'post')
}
\ No newline at end of file
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)
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询规则审核记录
export function ruleAuditPage(data) {
data.method = `${path}ruleAudit.page`
return request(data, RequestMethods.POST)
}
// 规则审核-查看详情
export function ruleAuditDetail(data) {
data.method = `${path}ruleAudit.detail`
return request(data, RequestMethods.POST)
}
// 规则审核-审核通过
export function ruleAuditPass(data) {
data.method = `${path}ruleAudit.pass`
return request(data, RequestMethods.POST)
}
// 规则审核-驳回
export function ruleAuditReject(data) {
data.method = `${path}ruleAudit.reject`
return request(data, RequestMethods.POST)
}
// 规则审核-撤销
export function ruleAuditCancel(data) {
data.method = `${path}ruleAudit.cancel`
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,30 @@ export const stockManagementModeList = [
{ confId: 2, confName: "不使用膜卷号" },
{ confId: 1, confName: "使用膜卷号" }
]
// 转账管理-预警状态
export const warningStatus = [
{ confId: 1, confValue: "正常" },
{ confId: 2, confValue: "异常" }
]
// 规则审核-类型
export const ruleReview_type = [
{ confId: 1, confValue: "清分" },
{ confId: 3, confValue: "对账" }
]
// 规则审核-状态
export const ruleReview_status = [
{ confId: 1, confValue: "待审核" },
{ confId: 2, confValue: "已审核" },
{ confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "逾期未审" },
{ confId: 5, confValue: "已撤销" }
]
// 服务商类型
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
}
}
/**
* 时间控件-限制月份
*/
......
......@@ -319,6 +319,7 @@ export default {
}
this.total = res.total
this.loading = false
this.$emit('setTableFinishFun', this.data)
}).catch(() => {
this.loading = false
})
......
......@@ -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,266 @@ 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")
},
90624: {
path: "/ruleReview",
name: "ruleReview",
meta: {
title: "规则审核",
authId: "90624",
parentId: "906",
cache: false
},
auth: [
{
authId: "9062401",
parentId: "90624",
label: "审核",
handle: "handleReview",
addRoutePath: [
{
authId: "9062404",
name: "审核",
parentId: "90624"
}
]
},
{
authId: "9062402",
parentId: "90624",
label: "驳回",
handle: "handleReject"
},
{
authId: "9062403",
parentId: "90624",
label: "撤销",
handle: "handleRevoke"
}
],
component: _import("systemConfig/ruleReview/index")
},
9062404: {
path: "/examineDetail",
name: "examineDetail",
meta: {
title: "审核",
authId: "9062404",
parentId: "90624",
cache: false,
sideHidden: false,
activePath: "/ruleReview"
},
component: _import("systemConfig/ruleReview/examineDetail")
},
90625: {
path: '/inStoreGoalsConfig',
name: "inStoreGoalsConfig",
meta: {
title: "驻店目标配置",
authId: "90625",
parentId: "906",
cache: false
},
auth: [
{
authId: "9062501",
parentId: "90625",
label: "新增",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "90626",
name: "新增",
parentId: "90625"
}
]
},
{
authId: "9062502",
parentId: "90625",
label: "查看",
handle: "handleStoreView",
addRoutePath: [
{
authId: "90627",
name: "查看",
parentId: "90625"
}
]
},
{
authId: "9062503",
parentId: "90625",
label: "编辑",
handle: "handleStoreEdit",
addRoutePath: [
{
authId: "90626",
name: "编辑",
parentId: "90625"
}
]
},
{
authId: "9062504",
parentId: "90625",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9062505",
parentId: "90625",
label: "查看",
handle: "handleStaffView",
addRoutePath: [
{
authId: "90628",
name: "查看任务",
parentId: "90625"
}
]
}
],
component: _import("systemConfig/inStoreGoalsConfig/index")
},
90626: {
path: "/addInStoreConfig",
name: "addInStoreConfig",
meta: {
title: "新增",
authId: "90626",
parentId: "90625",
sideHidden: true,
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/addInStoreConfig")
},
// 查看店面目标配置
90627: {
path: "/inStoreConfigView",
name: "inStoreConfigView",
meta: {
title: "查看",
authId: "90627",
parentId: "90625",
sideHidden: true,
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/inStoreConfigView")
},
// 查看驻店员工任务
90628: {
path: "/employeeTasksView",
name: "employeeTasksView",
meta: {
title: "查看任务",
authId: "90628",
parentId: "90625",
sideHidden: true,
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/employeeTasksView")
}
}
<!-- 月度库存结算单弹窗 -->
<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>
......@@ -102,6 +102,29 @@
</el-select>
<span class="item-tips">注:设置店面的驻店负责人,可配置驻店月份绩效</span>
</el-form-item>
<el-form-item label="1.1业务负责人:"
prop="residentManager">
<el-select v-model="form.businessType"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
:value="item.confId"
:label="item.confName" />
</el-select>
<span class="item-tips">注:获取账户中心创建在广联数科下的员工,角色类型选广联销售</span>
</el-form-item>
<el-form-item label="2.1业务负责人:"
prop="residentManager">
<el-select v-model="form.businessType"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
:value="item.confId"
:label="item.confName" />
</el-select>
</el-form-item>
<el-form-item>
<div class="month-set-div">
<div class="month-choose">
......@@ -178,6 +201,20 @@
placeholder="请输入" />&nbsp;%
</span>
</el-form-item>
<el-form-item label="阳光激励费:"
prop="sunlightIncentiveCost">
<el-input class="rateInput_t"
v-model="form.sunlightIncentiveCost"
@input="sunlightIncentiveCost_handleInput"
placeholder="请输入比例" />&nbsp;%
</el-form-item>
<el-form-item label="市场激励费:"
prop="marketIncentiveCost">
<el-input class="rateInput_t"
v-model="form.marketIncentiveCost"
@input="marketIncentiveCost_handleInput"
placeholder="请输入比例" />&nbsp;%
</el-form-item>
<el-form-item>
<div class="btnCon">
<el-button type="primary"
......@@ -227,7 +264,9 @@ export default {
residentManager: {},
currentMonthOutputValue: '',
nextMonthOutputValue: '',
serviceMerchantServiceChargeConfig: {}
serviceMerchantServiceChargeConfig: {},
sunlightIncentiveCost: '',
marketIncentiveCost: ''
},
outputValueListByYear: [],
year: '',
......@@ -260,7 +299,9 @@ export default {
// gasCardServiceCharge_isDisabled: false,
oldVal: {
passageServiceChargeFlag: '',
gasCardServiceChargeFlag: ''
gasCardServiceChargeFlag: '',
sunlightIncentiveCost: '',
marketIncentiveCost: ''
},
}
},
......@@ -549,6 +590,14 @@ export default {
gasCardServiceCharge_handleInput(newVal) {
this.form.serviceMerchantServiceChargeConfig.gasCardServiceCharge = limitPrice(newVal, this.oldVal.gasCardServiceCharge, 3, 2, 0, 100)
this.oldVal.gasCardServiceCharge = this.form.serviceMerchantServiceChargeConfig.gasCardServiceCharge
},
sunlightIncentiveCost_handleInput(newVal) {
this.form.sunlightIncentiveCost = limitPrice(newVal, this.oldVal.sunlightIncentiveCost, 3, 2, 0, 100)
this.oldVal.sunlightIncentiveCost = this.form.sunlightIncentiveCost
},
marketIncentiveCost_handleInput(newVal) {
this.form.marketIncentiveCost = limitPrice(newVal, this.oldVal.marketIncentiveCost, 3, 2, 0, 100)
this.oldVal.marketIncentiveCost = this.form.marketIncentiveCost
}
}
}
......@@ -803,4 +852,7 @@ export default {
.rateInput {
width: 100px;
}
.rateInput_t {
width: 150px;
}
</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>
<div v-if="diffExplain == 'performanceConfig'">
<div class="mb10">提成配置中,高产值,成交率以及均客单为联动配置,需请完整填写,无提成时填无,请将此三项全部填无。根据员工每月单店完成(升级订单) 的订单产值累计,匹配符合的奖励规则进行每单奖励计算。</div>
<div v-for="(item, index) in commissionConfigArr" :key="index">
<div>{{ item.title }}</div>
<d2-table :tableData="item.tableData" :table-params="item.tableParams" :hasPage="false"></d2-table>
</div>
</div>
<d2-table v-else :tableData="tableData" :table-params="tableParams" :hasPage="false"></d2-table>
<template>
<div class="explain-title mt20">示例业务场景</div>
<div class="business-info" v-html="infoHtml"></div>
</template>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
data() {
return {
tableParams: {
tableColumns: [
{
label: '区间开始值/元',
prop: 'startValue'
},
{
label: '区间结束值/元',
prop: 'endValue'
},
{
label: '提成比例',
prop: 'calculateValue'
}
]
},
tableData: [],
commissionConfigArr: [{
title: '高产值比例配置',
name: 'outputBonus',
tableData: [],
tableParams: {}
}, {
title: '成交率系数配置',
name: 'upgradeRateBonus',
tableData: [],
tableParams: {}
}, {
title: '均客单系数配置',
name: 'averagePriceBonus',
tableData: [],
tableParams: {}
}]
}
},
props: {
isExplain: {
type: Boolean,
default: false
},
diffExplain: {
type: String,
default: ''
}
},
computed: {
title() {
const titleObj = {
performanceConfig: '工资绩效示例说明',
montorAdditionalBonus: '导师附加提成示例说明'
}
return titleObj[this.diffExplain]
},
infoHtml() {
const infoObj = {
performanceConfig: `<div class='mb10'>员工A在某个月中单店完成产值20000元,按高产值奖励规则,奖励值落点区间在0-80000,则提成比例为产值4%;根据该员工的当月成交率为45%,均可单价为2000计算,则整体提成系数为0.8*0.8=0.64</div>
<div class='mb10'>汇总计算员工A在该月份获得的提成为=20000*5%*0.8*0.8=640元。</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) {
if (newVal == 'performanceConfig') {
this.commissionConfigArr.forEach(val => {
val.tableParams = deepClone(this.tableParams)
switch (val.name) {
case 'outputBonus':
val.tableData = [
{ startValue: 0, endValue: 80000, calculateValue: '4%' },
{ startValue: 80000.01, endValue: '--', calculateValue: '5%' }
]
val.tableParams.tableColumns[2].label = '提成比例'
break
case 'upgradeRateBonus':
val.tableData = [
{ startValue: 0, endValue: '50%', calculateValue: 0.8 },
{ startValue: '50.01%', endValue: '55%', calculateValue: 1.0 },
{ startValue: '55.01%', endValue: '100%', calculateValue: 1.1 }
]
val.tableParams.tableColumns[2].label = '提成系数'
break
case 'averagePriceBonus':
val.tableData = [
{ startValue: 0, endValue: 3000, calculateValue: 0.8 },
{ startValue: 3000.01, endValue: '--', calculateValue: 1.0 }
]
val.tableParams.tableColumns[2].label = '提成系数'
break
}
})
} else { // 导师附加提成
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 = '提成比例'
}
}
},
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-container class="montor-config" :loading="$store.state.d2admin.loading.value" v-if="showPage">
<div class="container-content">
<div class="title">
<span>导师配置</span>
<div class="sub-title" v-if="routerQuery.partnerMerchantArr.length">服务商:
<span v-for="(subV, subIdx) in routerQuery.partnerMerchantArr" :key="subIdx">{{ subV }}</span>
</div>
</div>
<div class="content">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="154px"
default-width="432px"
:is-block="true"
form-ref="editChildRef"
:form-obj="configInfo"
:form-data="editFormData">
<template>
<div slot="sceneSelect">
<el-tabs v-model="configInfo.deploymentScene">
<el-tab-pane v-for="item in openedSceneList" :key="item.scene" :label="item.label" :name="item.scene"></el-tab-pane>
</el-tabs>
</div>
</template>
</glsx-combi-form>
<div class="scene_config_box">
<mentorForm ref="mentor-form-ref1" :mentor-config-info="configInfo.upgradeConfigInfo" :mentor-staff-list="upgradeStaffList" :dialog-merchant-list="upgradeMerchantList" v-show="configInfo.deploymentScene == '1'"></mentorForm>
<mentorForm ref="mentor-form-ref0" :mentor-config-info="configInfo.equityConfigInfo" :mentor-staff-list="equityStaffList" :dialog-merchant-list="equityMerchantList" v-show="configInfo.deploymentScene == '0'"></mentorForm>
</div>
</div>
</div>
<div class="footer">
<el-button @click="submit" type="primary">保存</el-button>
<el-button @click="navBack">取消</el-button>
</div>
</d2-container>
</template>
<script>
import mentorForm from './mentorForm.vue'
import { setMentorApi, getMentorInfoApi, getNoRelateStaffListApi, getMerchantStoreApi } from '@api/businessSchool'
import { mapActions } from 'vuex'
export default {
name: 'MentorConfig',
components: {
mentorForm
},
data() {
return {
showPage: false,
configInfo: {
staffName: '',
phoneNumber: ''
},
editFormData: [{
label: '员工姓名',
name: 'staffName',
type: 'input',
isHide: false,
isDisabled: true
}, {
label: '手机号',
name: 'phoneNumber',
type: 'input',
isHide: false,
isDisabled: true
}, {
label: '选择业务',
name: 'sceneSelect',
isHide: false,
style: "width: calc(100% - 432px)",
addHtml: 'sceneSelect'
}],
upgradeConfigInfo: {},
equityConfigInfo: {},
selectedRelateOptions: [], // 关联员工已选的
upgradeStaffList: [], // 1.1场景所有初级驻店
equityStaffList: [], // 2.1场景 所有初级驻店
upgradeMerchantList: [], // 1.1场景所有门店
equityMerchantList: [], // 2.1场景所有门店
routerQuery: {
yqMerchantObj: {},
partnerMerchantArr: []
},
openedSceneList: []
}
},
watch: {
'configInfo.deploymentScene': {
handler(val) {
let customerConfigInfo = val == '1' ? this.configInfo.upgradeConfigInfo : this.configInfo.equityConfigInfo
let customerMerchantArr = val == '1' ? this.configInfo.upgradeConfigInfo?.merchantArr : this.configInfo.equityConfigInfo?.merchantArr
if (!customerConfigInfo.defaultMerchant || customerConfigInfo.defaultMerchant == '0') {
customerConfigInfo.defaultMerchant = customerMerchantArr[0]?.merchantId
}
this.$nextTick(() => {
this.$refs['mentor-form-ref' + val].updateData(customerConfigInfo)
})
},
deep: true
}
},
mounted() {
this.routerQuery = {
...this.$route.query,
yqMerchantObj: JSON.parse(this.$route.query?.yqMerchantObj),
partnerMerchantArr: JSON.parse(this.$route.query?.partnerMerchantArr)
}
// 获取配置详情
this.getConfigInfo()
for (var i = 0; i < 2; i++) {
// 获取未关联导师的初级驻店数据
this.getNoRelateStaffList(i)
// 获取场景下园区店关联的4s店
this.getStoreList(i)
}
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
getNoRelateStaffList(sceneType) {
let routerQuery = this.routerQuery
getNoRelateStaffListApi({ sceneType, merchantId: routerQuery?.yqMerchantObj?.merchantId, currentPage: 1, pageSize: 9999 }).then(res => {
// 需过滤当前员工
let index = res?.list.findIndex(val => val.staffUuid == routerQuery?.staffUuid)
if (index > -1) res.list?.splice(index, 1)
sceneType == 1 ? this.upgradeStaffList = res?.list || [] : this.equityStaffList = res?.list || []
})
},
getStoreList(scene) {
let routerQuery = this.routerQuery
getMerchantStoreApi({ scene, merchantId: routerQuery?.yqMerchantObj?.merchantId }).then(res => {
scene == 1 ? this.upgradeMerchantList = res || [] : this.equityMerchantList = res || []
})
},
// 获取配置详情
getConfigInfo() {
let routerQuery = this.routerQuery
getMentorInfoApi({ staffUuid: routerQuery?.staffUuid, sceneType: routerQuery.sceneType }).then(res => {
// 处理返回数据用于回显
res?.tutorBonusConfigs?.forEach(val => {
val.startMonth == '0' ? (val.isStartEdit = true) : ''
val.endMonth == '99' ? (val.isEndEdit = true) : ''
})
// 假数据
this.openedSceneList = [{
scene: '1',
label: '1.1'
}, {
scene: '0',
label: '2.1'
}]
res.deploymentScene = '1'
res.upgradeConfigInfo = {
studentStaffs: res.studentStaffs || [],
montorAdditionalBonusList: res.tutorBonusConfigs || [],
titleText: ['初级驻店零售', '中级导师', '高级导师'][1],
lastSetTitle: '1',
merchantArr: [{
merchantId: '44209510',
merchantName: "test4s1"
}, {
merchantId: '44209515',
merchantName: "test4s2_ab=-*"
}],
merchantName: routerQuery?.yqMerchantObj?.merchantName,
defaultMerchant: '',
performanceConfigFlag: true
}
res.equityConfigInfo = {
performanceConfigFlag: false,
lastSetTitle: '1',
merchantArr: [{
merchantId: '44210823',
merchantName: "门店商户lw",
montorAdditionalBonusList: [{
startMonth: 0,
endMonth: 6,
calculateValue: 5
}]
}, {
merchantId: '44209510',
merchantName: "test4s1"
}],
performanceConfigFlag: true
}
this.configInfo = res
this.showPage = true
}).catch(() => {this.showPage = true})
},
// 保存
async submit() {
let sceneConfigData = []
for (var i = 1; i > -1; i--) {
let formValide = await this.$refs[`mentor-form-ref${i}`]?.submitValide(i)
if (formValide?.merchantValid?.includes('error')) {
if (i == 1) this.configInfo.deploymentScene = '1'
if (i == 0) this.configInfo.deploymentScene = '0'
return this.$message.error('请检查导师配置是否正确')
}
sceneConfigData.push(formValide)
}
console.log(sceneConfigData)
},
// 返回
navBack() {
this.close({ tagName: '/staffManage' })
this.$router.push({ name: 'staffManage' })
this.close({ tagName: '/mentorConfig' })
}
}
}
</script>
<style lang="scss" scoped>
.montor-config{
.container-content{
background: #fff;
.title{
font-size: 18px;
color: #333333;
font-weight: 500;
border-bottom: 1px solid #E8E8EA;
padding: 12px 16px 12px 24px;
&::before{
position: absolute;
display: inline-block;
content: "";
height: 18px;
width: 4px;
top: 16px;
left: 16px;
background-color: #0947c6;
}
.sub-title{
display: inline-block;
margin-left: 8px;
font-size: 14px;
color: #666666;
font-weight: 400;
}
.sub-title:last-child{
max-width: 1300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: bottom;
span{
margin-right: 10px;
}
}
}
.content{
padding: 16px 80px;
}
}
.footer{
display: flex;
align-items: center;
justify-content: center;
margin-top: 16px;
}
}
::v-deep .glsx-combi-form-block #sceneSelect .el-form-item__content{
width: calc(100% - 154px);
}
</style>
\ No newline at end of file
<!-- 业绩详情弹窗 -->
<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 || ''
})
},
......
<template>
</template>
<script>
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
<!-- 驻店员工查看任务 -->
<template>
<d2-container :loading="$store.state.d2admin.loading.value">
<div class="d2-container-content">
<p class="edit-sub-title">
查看员工任务
</p>
<glsx-combi-form class="edit-form-container"
ref="editFormRef2"
label-width="154px"
default-width="432px"
:is-block="true"
form-ref="editChildRef"
:form-obj="viewInfo"
:form-data="viewFormData">
<div slot="inStoreTarget">
<d2-table @arraySpanMethod="arraySpanMethod" :tableData="viewInfo.tableData" :table-params="tableParams" :hasPage="false"></d2-table>
</div>
</glsx-combi-form>
<div class="page_footer">
<el-button type="primary" @click="handleClose">
返回
</el-button>
</div>
</div>
</d2-container>
</template>
<script>
import { mapActions } from 'vuex'
import { getStaffTaskDetailApi } from '@api/inStoreTargetConfig'
export default {
name: 'EmployeeTaskView',
data() {
return {
viewFormData: [{
label: '门店名称',
isHide: false,
showTxt: true
}, {
label: '业务场景',
isHide: false,
showTxt: true
}, {
label: '驻店员工',
isHide: false,
showTxt: true
}, {
label: '联系方式',
isHide: false,
showTxt: true
}, {
label: '考核周期',
isHide: false,
showTxt: true
}, {
label: '驻店目标',
isHide: false,
addHtml: 'inStoreTarget'
}],
tableParams: {
tableColumns: [{
label: '月度',
prop: 'startValue'
}, {
label: '周期',
prop: 'startValue'
}, {
label: '车主类型',
prop: 'startValue'
}, {
label: '主推产品套餐',
prop: 'startValue'
}, {
label: '目标转化率',
prop: 'startValue'
}, {
label: '提成系数',
prop: 'startValue'
}, {
label: '目标客单价',
prop: 'startValue'
}, {
label: '提成系数',
prop: 'startValue'
}],
tableData: []
},
viewInfo: {
tableData: []
}
}
},
mounted() {
let routerQuery = this.$router.query
// 获取详情
this.getDetailInfo(routerQuery)
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
getDetailInfo(routerQuery) {
getStaffTaskDetailApi({}).then(res => {
this.viewInfo = res || {}
}).catch(() => {})
},
// 合并表格
arraySpanMethod() {
},
// 返回
handleClose() {
this.close({ tagName: '/inStoreGoalsConfig' })
this.$router.push({ name: 'inStoreGoalsConfig' })
this.close({ tagName: '/employeeTasksView' })
}
}
}
</script>
<style scoped lang="scss">
.edit-sub-title {
padding-bottom: 14px;
border-bottom: 1px solid #e8e8ea;
}
.page_footer{
display: flex;
justify-content: center;
}
::v-deep .el-form-item__content{
width: calc(100% - 154px);
}
</style>
\ No newline at end of file
<template>
</template>
<script>
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
<!-- 驻店目标配置 -->
<template>
<div class="in-store-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 storeTargetList from "./storeTargetList.vue"
import staffTargetList from "./staffTargetList.vue"
export default {
name: 'InStoreGoalsConfig',
components: {
storeTargetList,
staffTargetList
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "门店目标配置",
name: "0"
},
{
label: '驻店员工目标',
name: "1"
}
],
tabName: "storeTargetList"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
handleClick() {
const arr = {
0: "storeTargetList",
1: "staffTargetList"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style scoped lang="scss">
.in-store-list-wrap {
padding: 0 24px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
\ No newline at end of file
<!-- 驻店员工目标 -->
<template>
<d2-container class="staff-target-list m-t-40">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" 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" style="{display: inline-block}" :show-btn-ids="['9062504']" />
</d2-table-header>
<d2-table ref="staffTargetTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062505']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { mapActions, mapState } from 'vuex'
import { Util } from '@/common/util'
import { getStaffTaskListApi } from '@api/inStoreTargetConfig'
export default {
name: "StoreTargetList",
data() {
return {
// 搜索框
showFormData: [{
label: '驻店员工',
name: 'staffName',
type: 'input',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '场景名称',
name: 'sceneType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}, {
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '商户号',
name: 'merchantId',
type: 'input',
inputType: 'number',
isClear: true,
keyFn: this.keyDownGetList
}],
getListApi: getStaffTaskListApi,
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: {
width: '100'
},
tableColumns: [{
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '员工名称',
prop: 'staffName',
width: '120'
}, {
label: '联系方式',
prop: 'staffPhoneNumber',
width: '120'
}, {
label: '账号创建日期',
prop: 'created',
width: '110'
}, {
label: '考核状态',
prop: 'status',
className: () => {
return 'blueSpot'
},
formatter: () => {
return '考核中'
}
}, {
label: '考核周期',
prop: 'assessmentCycle',
formatter: (cellValue) => {
return ``
}
}, {
label: '业务场景',
prop: 'scene'
}, {
label: '流量方',
prop: 'merchantName'
}, {
label: '车主类型',
prop: 'carOwnerType',
width: '160',
}, {
label: '商品分类',
prop: 'goodsType',
width: '160',
}, {
label: '主推产品套餐',
prop: 'studentNumber',
width: '160'
}, {
label: '目标转化率',
prop: 'updatedDate',
width: '100',
}, {
label: '提成系数',
prop: 'updatedDate',
width: '80',
}, {
label: '目标客单价',
prop: 'updatedDate',
width: '100',
}, {
label: '提成系数',
prop: 'updatedDate',
width: '80',
}, {
label: '关联服务商',
prop: 'updatedDate',
width: '100',
}, {
label: '关联服务商号',
prop: 'updatedDate',
width: '120',
}, {
label: '最近更新时间',
prop: 'updatedDate',
width: '160',
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}]
},
// 查询条件
searchForm: {
staffName: '',
merchantName: '',
merchantId: '',
sceneType: '',
},
baseData: {
sceneTypeList: [{
confId: 1,
confValue: '精品升级'
}, {
confId: 0,
confValue: '会员权益/升级'
}]
}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList,
updateList: (state) => state.d2admin.user.updateList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
getBaseData() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.baseData[item.name + 'List'].unshift({
confId: '',
confValue: '全部'
})
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
setTableFinishFun(data) {
},
// 重置
handleReset() {
this.searchForm = {
staffName: '',
merchantName: '',
merchantId: '',
sceneType: '',
}
this.$refs.staffTargetTable.refreshTable(true, true)
},
// 导出
handleExport() {
var params = this.searchForm
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.export.async'
const list = [
...this.dowloadList,
{
name: '合并导出',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 查看任务详情
handleStaffView(row) {
this.close({ tagName: '/inStoreGoalsConfig' })
this.$router.push({
path: '/employeeTasksView',
query: row.staffUuid
})
}
}
}
</script>
<style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
</style>
\ No newline at end of file
<!-- 门店目标配置 -->
<template>
<d2-container class="store-target-list m-t-40">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" 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" style="{display: inline-block}" :show-btn-ids="['9062501']" />
</d2-table-header>
<d2-table ref="storeTargetTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="sceneType" slot-scope="scope">
<div v-if="scope.scope.sceneType == 1">精品升级</div>
<div v-if="scope.scope.sceneType == 0">会员权益/升级</div>
<div v-else>-</div>
</template>
<template slot="yqMerchantName" slot-scope="scope">
<div v-for="item in scope.scope.yqMerchantList" :key="item.merchantId">{{ item.merchantName }}</div>
<!-- <div v-if="!scope.scope.yqMerchantList.length">-</div> -->
</template>
<template slot="yqMerchantId" slot-scope="scope">
<div v-for="item in scope.scope.yqMerchantList" :key="item.merchantId">{{ item.merchantId }}</div>
<!-- <div v-if="!scope.scope.yqMerchantList.length">-</div> -->
</template>
<template slot="partnerMerchantName" slot-scope="scope">
<div v-for="item in scope.scope.partnerMerchantList" :key="item.merchantId">{{ item.merchantName }}</div>
<!-- <div v-if="!scope.scope.partnerMerchantList.length">-</div> -->
</template>
<template slot="partnerMerchantId" slot-scope="scope">
<div v-for="item in scope.scope.partnerMerchantList" :key="item.merchantId">{{ item.merchantId }}</div>
<!-- <div v-if="!scope.scope.partnerMerchantList.length">-</div> -->
</template>
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062502']" />
</span>
<!-- 编辑 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062503']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { mapActions } from 'vuex'
import { getStoreTargetListApi } from '@api/inStoreTargetConfig'
import { Util } from '@/common/util'
export default {
name: "StoreTargetList",
data() {
return {
// 搜索框
showFormData: [{
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '商户号',
name: 'merchantId',
type: 'input',
inputType: 'number',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '场景名称',
name: 'sceneType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}, {
label: '配置状态',
name: 'status',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
}],
getListApi: getStoreTargetListApi,
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: {
width: '100'
},
tableColumns: [{
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '流量方',
prop: 'merchantName',
width: '120'
}, {
label: '流量方商户号',
prop: 'merchantId',
width: '120'
}, {
label: '业务场景',
prop: 'sceneType',
addHtml: 'sceneType'
}, {
label: '关联园区店',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName'
}, {
label: '关联园区店号',
prop: 'yqMerchantId',
addHtml: 'yqMerchantId'
}, {
label: '关联服务商',
prop: 'partnerMerchantName',
addHtml: 'partnerMerchantName'
}, {
label: '关联服务商号',
prop: 'partnerMerchantId',
addHtml: 'partnerMerchantId'
}, {
label: '配置状态',
prop: 'status',
width: '80',
className: (cellValue) => {
cellValue.performanceFlag = cellValue?.performanceFlag ? cellValue?.performanceFlag : 'N'
return {
'Y': 'greenSpot',
'N': 'yellowSpot'
}[cellValue.performanceFlag]
},
formatter: (cellValue) => {
return {
'Y': '已配置',
'N': '待配置'
}[cellValue.performanceFlag]
}
}, {
label: '创建时间',
prop: 'created',
width: '160',
formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '更新时间',
prop: 'update',
width: '160',
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '操作人',
prop: 'updateUser',
width: '80',
}]
},
// 查询条件
searchForm: {
merchantName: '',
merchantId: '',
sceneType: '',
status: ''
},
baseData: {
sceneTypeList: [{
confId: 1,
confValue: '精品升级'
}, {
confId: 0,
confValue: '会员权益/升级'
}],
statusList: [{
confId: 1,
confValue: '待配置'
}, {
confId: 2,
confValue: '已配置'
}]
}
}
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
getBaseData() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.baseData[item.name + 'List'].unshift({
confId: '',
confValue: '全部'
})
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
// 表格数据处理
setTableFinishFun(data) {
},
// 查看详情
handleStoreView(row) {
this.close({ tagName: '/inStoreGoalsConfig' })
this.$router.push({
path: '/inStoreConfigView',
query: row
})
},
// 新增配置
handleAdd() {
this.close({ tagName: '/inStoreGoalsConfig' })
let queryObj = { idEdit: false }
this.$router.push({
path: '/addInStoreConfig',
query: queryObj
})
},
// 编辑配置
handleStoreEdit(row) {
this.close({ tagName: '/inStoreGoalsConfig' })
let queryObj = { idEdit: true, ...row }
this.$router.push({
path: '/addInStoreConfig',
query: queryObj
})
},
// 重置
handleReset() {
this.searchForm = {
merchantName: '',
merchantId: '',
sceneType: '',
status: ''
}
this.$refs.storeTargetTable.refreshTable(true, true)
}
}
}
</script>
<style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
</style>
\ No newline at end of file
......@@ -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: '',
......@@ -203,7 +201,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({
......@@ -211,7 +209,7 @@ export default {
valueName: 'shopMerchantExpenseCategoryValue',
message: '请选择流量方总对账费',
label: '流量方总对账费用',
options: defaultSelectOptions
options: [...defaultSelectOptions, ...otherSelectOptions]
})
// }
})
......@@ -231,7 +229,7 @@ export default {
valueName: 'partnerMerchantExpenseCategoryValue',
label: '服务商总对账费用',
message: '请选择服务商总对账费用',
options: defaultSelectOptions
options: [...defaultSelectOptions, ...otherSelectOptions]
// options: severSelectOptions
})
})
......
<template>
<d2-Container>
<div class="merchant-checkdetail">
<div class="merchant-title">
<span>商户名称:我是4S点名称</span>
<span>业务场景:精品升级</span>
<span>类型:清分</span>
<span>生效时间:2024-01-01</span>
</div>
<ledgerAccount :items="checkDetailItem" />
<div class="btns">
<el-button @click="handleConfirm"
size="small"
type="primary">
审核
</el-button>
</div>
</div>
</d2-Container>
</template>
<script>
import ledgerAccount from '../merchant/merchantStep/components/ledgerAccount.vue'
import {
getDistributeRuleApi,
// getEffectRuleApi
} from "@api/merchant"
export default {
name: "ExamineDetail",
props: {},
data() {
return {
activeName: "first",
merchantRow: {},
// 分账数据
checkDetailItem: {},
// 对账数据
// checkRecordList: {}
}
},
created() {
this.getRowItem()
},
mounted() {
// 分账
this.getDistributeRule()
},
methods: {
async init() {
// if (this.activeName == "first") {
// 分账
this.getDistributeRule()
// } else {
// 对账
// this.getEffectRule()
// }
},
// 分账
async getDistributeRule() {
const params = {
merchantId: this.merchantRow.merchantId,
sceneType: this.merchantRow.scene,
expenseCategroyRulsBuildType: 2
}
const res = await getDistributeRuleApi(params)
console.log('res: ', res)
this.checkDetailItem = res
},
// 对账
// async getEffectRule() {
// const params = {
// merchantId: this.merchantRow.merchantId,
// sceneType: this.merchantRow.scene
// }
// const res = await getEffectRuleApi(params)
// console.log(res)
// this.checkRecordList = res
// // this.checkRecordList = res?.goodsTypeGroupReconciliationRules
// // console.log('res: ', res)
// },
getRowItem() {
const params = this.$route.query?.params
if (params) {
this.merchantRow = JSON.parse(params)
// console.log("is.merchantRow", this.merchantRow)
}
},
// handleClick(tab) {
// // console.log(tab.name)
// this.activeName = tab.name
// this.init()
// },
// handleType(num) {
// this.activeType = num
// },
// 保存
handleConfirm() {
this.$confirm('审核通过后,当前规则会自动应用并生效,可在商户管理-历史记录中查询。', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
// rewithdraw({ orderCode: row.orderCode }).then(res => {
this.$router.go(-1)
// })
}).catch(err => {
console.log(err)
})
},
},
components: {
ledgerAccount,
// reconciliation
},
computed: {}
}
</script>
<style lang="scss">
$color: #2a58ad;
.merchant-checkdetail {
// height: 100%;
padding-left: 20px;
padding-right: 16px;
padding-bottom: 20px;
// overflow-y: auto;
.title {
}
.merchant-title {
font-weight: 500;
font-size: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.type {
margin-top: 6px;
display: flex;
.btn {
width: 96px;
height: 40px;
background: #f8f8f8;
border-radius: 4px 4px 0 0;
line-height: 40px;
text-align: center;
cursor: pointer;
}
.act {
font-weight: 500;
color: $color;
background: #fff;
}
}
.content {
background: #ffffff;
.part1 {
.tit {
display: flex;
align-items: center;
height: 48px;
background: #ffffff;
font-weight: 500;
font-size: 18px;
color: #333333;
box-sizing: border-box;
border-bottom: 1px solid #ebebeb;
.line {
margin-left: 16px;
margin-right: 8px;
width: 4px;
height: 16px;
background: $color;
border-radius: 2px;
}
}
.cont {
display: flex;
flex-flow: column;
&.cont-table {
display: block;
}
&.cont-table1 {
padding: 16px 20px 20px;
}
display: flex;
flex-wrap: wrap;
flex-flow: column;
padding: 16px 20px 32px;
.mt16 {
margin-top: 16px;
}
.msg {
padding-bottom: 12px;
flex: 1 0 auto;
// width: 50%;
display: flex;
align-items: flex-start;
line-height: 24px;
.msg-title {
width: 138px;
// height: 20px;
font-size: 14px;
color: #666666;
text-align: right;
}
.msg-val {
// height: 20px;
font-size: 14px;
color: #1d1d1d;
text-align: left;
}
}
.msg-name-val {
margin-left: 138px;
font-size: 14px;
}
.compute {
margin-bottom: 10px;
display: flex;
font-size: 14px;
color: #666666;
.manner {
}
.online {
& + .online {
margin-left: 44px;
}
color: $color;
}
}
.white-table {
margin-bottom: 16px;
display: flex;
flex-wrap: wrap;
font-size: 14px;
color: #666666;
border-top: 1px solid #e5e5e5;
border-left: 1px solid #e5e5e5;
.type1 {
// &:first-child {
// border-top: 1px solid #E5E5E5;
// border-left: 1px solid #E5E5E5;
// }
display: flex;
width: 33.33%;
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
box-sizing: border-box;
.type-name {
text-align: right;
width: 90px;
}
.type-val {
flex: 1;
display: flex;
color: #1d1d1d;
}
.type-color {
color: $color;
}
.date {
margin-right: 10px;
color: #1d1d1d;
}
}
.type2 {
width: 66.66%;
}
}
.title-table {
font-size: 14px;
color: #333333;
border: 1px solid #e8e8ea;
.head {
display: flex;
height: 40px;
line-height: 40px;
text-align: center;
background: #f2f4f7;
.cost {
& + .cost {
border-left: 1px solid #e8e8ea;
}
flex: 1;
}
}
.detail {
display: flex;
min-height: 40px;
color: #666666;
border-top: 1px solid #e8e8ea;
.detail-i {
display: flex;
justify-content: center;
align-items: center;
& + .detail-i {
border-left: 1px solid #e8e8ea;
}
flex: 1;
}
}
}
}
}
// .part2 {
// }
// .part3 {
// }
// .part4 {
// }
// .part5 {
// }
}
.btns {
margin-top: 16px;
display: flex;
justify-content: center;
align-items: center;
}
}
</style>
<!-- 规则审核 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<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 class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<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">
<div slot="auth-button"
slot-scope="scope">
<!-- 审核 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope"
:show-btn-ids="['9062401']" />
</span>
<!-- 驳回 -->
<span style="margin-right: 10px;"
v-if="scope.scope.auditStatus == 1">
<auth-button :data="scope.scope"
:show-btn-ids="['9062402']" />
</span>
<!-- 撤销 -->
<span style="margin-right: 10px;"
v-if="scope.scope.auditStatus == 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9062403']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { sceneCodeList, ruleReview_status, ruleReview_type, withdrawalManageStatusList } from '@/common/constants.js'
import { withdrawOrderRecordPage, rewithdraw } from '@api/withdrawalManage'
import { ruleAuditPage, ruleAuditReject, ruleAuditCancel } from '@api/ruleReview'
export default {
name: 'TransferAccountsList',
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px',
searchForm: {
merchantName: '',
merchantIdFuzzy: '',
sceneType: '',
ruleType: '',
auditStatus: ''
},
searchFormSearch: {},
showFormData: [{
label: '商户名称',
name: 'merchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '商户号',
name: 'merchantIdFuzzy',
type: 'input',
inputType: 'number',
maxlength: '20',
isClear: true
}, {
label: '业务场景',
name: 'sceneType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}, {
label: '类型',
name: 'ruleType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'typeList'
}, {
label: '状态',
name: 'auditStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
}],
getListApi: withdrawOrderRecordPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [{
label: '商户名称',
prop: 'merchantName',
width: '160px'
}, {
label: '商户号',
prop: 'merchantId',
width: '160px'
}, {
label: '业务场景',
prop: 'sceneType',
width: '100px',
formatter: (cellValue) => {
return this.baseData.sceneTypeList.find(item => item.confId === cellValue.sceneType)?.confValue
}
},
{
label: '类型',
prop: 'ruleType',
width: '100px',
formatter: (cellValue) => {
return this.baseData.typeList.find(item => item.confId === cellValue.ruleType)?.confValue
}
},
{
label: '生效开始时间',
prop: 'effectStartDate',
width: '150px',
formatter: (cellValue) => {
if (cellValue.effectDateType == 2) {
return '立即生效'
} else {
return cellValue.effectStartDate ? Util.dateFormate(cellValue.effectStartDate, 'YYYY-MM-DD HH:mm:ss') : '--'
}
}
},
{
label: '状态',
prop: 'auditStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.auditStatus)?.confValue
}
},
{
label: '创建人',
prop: 'creatorName'
},
{
label: '创建时间',
prop: 'createdDate',
width: '150px',
formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '审核人',
prop: 'auditBy'
},
{
label: '审核时间',
prop: 'auditDate',
width: '150px',
formatter: (cellValue) => {
return cellValue.auditDate ? Util.dateFormate(cellValue.auditDate, 'YYYY-MM-DD HH:mm:ss') : '--'
}
}
]
},
baseData: {
sceneTypeList: deepClone(sceneCodeList),
statusList: deepClone(ruleReview_status),
typeList: deepClone(ruleReview_type),
},
}
},
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') {
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: '',
merchantIdFuzzy: '',
sceneType: '',
ruleType: '',
auditStatus: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
//审核
handleReview(row) {
row.merchantId = 44211847
row.scene = 1
this.$router.push({
name: "examineDetail",
query: {
params: JSON.stringify(row)
}
})
},
//驳回
handleReject(row) {
this.$confirm('进行驳回后,自动作废该申请,且无法撤回。是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
ruleAuditReject({ id: row.id }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
//撤销
handleRevoke(row) {
this.$confirm('进行撤销后,自动作废该规则记录,且无法撤回。是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
ruleAuditCancel({ id: row.id }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
},
}
</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>
<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">
......@@ -83,6 +89,10 @@ export default {
{ confId: 0, confLabel: "禁用" },
{ confId: 1, confLabel: "启用" }
],
// partnerTypeList: [
// { id: 1, name: '普通' },
// { id: 2, name: '个体' }
// ],
checkList: [0],
manageTypeList: manageTypeList,
businessModel: '',
......@@ -90,6 +100,7 @@ export default {
installMerchantName: '',
loginControlList: [],
marketingMerchantName: '',
// partnerType: 1,
serviceList: [], // 服务商数据
partnerMerchantId: '' // 主服务商
}
......@@ -113,6 +124,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)
})
},
......@@ -202,6 +214,7 @@ export default {
oParams.businessModel = this.businessModel
oParams.multiBusinessCustomerProfileDataExchangeMode = this.multiBusinessCustomerProfileDataExchangeMode
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!