Commit e65e5289 by 张立顺

Merge branch 'SAAS+V4.40.0-0624' into 'develop'

上线合并

See merge request !336
2 parents 5670c05b 6897da4b
Showing 43 changed files with 1751 additions and 365 deletions
...@@ -3508,27 +3508,6 @@ ...@@ -3508,27 +3508,6 @@
"whatwg-fetch": "^3.6.2" "whatwg-fetch": "^3.6.2"
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": { "acorn-walk": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz", "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
...@@ -3918,6 +3897,27 @@ ...@@ -3918,6 +3897,27 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
...@@ -17080,7 +17080,7 @@ ...@@ -17080,7 +17080,7 @@
}, },
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.3.4", "version": "2.3.4",
"resolved": "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true "dev": true
}, },
......
...@@ -333,3 +333,39 @@ export function ruleAuditSituation(data) { ...@@ -333,3 +333,39 @@ export function ruleAuditSituation(data) {
data.method = `${path2}ruleAudit.situation` data.method = `${path2}ruleAudit.situation`
return request(data, "post") return request(data, "post")
} }
// 根据流量方查询当前已上架存在的业务类型数据
export function getBusinessTypeByDiversionMerchant(data) {
data.method = `${path2}scenemerchantref.listScene`
return request(data, "post")
}
// 获取数据列表(即账户中心中,嘀加智享车生活下的省代、市代园区店)
export function getContractAffiliationDataList(data) {
data.method = `${path2}shopMerchant.queryMerchantPaymentAccount`
return request(data, "post")
}
// 获取商户关系历史记录
export function getMerchantRelationRecordApi(data) {
data.method = `${path2}shopMerchant.queryMerchantRefDetailHistory`
return request(data, "post")
}
// 新增/编辑商户上架
export function merchantOnShelf(data) {
data.method = `${path2}shopMerchant.addOrUpdateSceneMerchantRefNew`
return request(data, "post")
}
// 获取商户关联关系详情
export function getMerchantRelationDetailApi(data) {
data.method = `${path2}shopMerchant.queryMerchantRefDetail`
return request(data, "post")
}
// 获取4s店和服务商门店数据
export function get4sAndServiceMerchantListApi(data) {
data.method = `${path}merchant.merchantAndService.page`
return request(data, "post")
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 获取支付主体商户列表
export function getPlatformMerchant(data) {
data.method = `${path}refundApplyRecord.getPlatformMerchant`
return request(data, RequestMethods.POST)
}
// 新增退款申请
export function addRefundApplyRecord(data) {
data.method = `${path}refundApplyRecord.add`
return request(data, RequestMethods.POST)
}
// 分页查询退款申请记录
export function refundApplyRecordPage(data) {
data.method = `${path}refundApplyRecord.page`
return request(data, RequestMethods.POST)
}
// 批量更新
export function updateBatch(data) {
data.method = `${path}refundApplyRecord.updateBatch`
return request(data, RequestMethods.POST)
}
// 根据ID查询详细信息
export function getById(data) {
data.method = `${path}refundApplyRecord.getById`
return request(data, RequestMethods.POST)
}
// 财务结算
export function financialSettlement(data) {
data.method = `${path}refundApplyRecord.financialSettlement`
return request(data, RequestMethods.POST)
}
// 下载PDF单据
export function downloadPdf(data) {
data.method = `${path}refundApplyRecord.downloadPdf`
return request(data, RequestMethods.POST)
}
...@@ -102,3 +102,9 @@ export function exportReclistList(data) { ...@@ -102,3 +102,9 @@ export function exportReclistList(data) {
data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistExport" data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistExport"
return request(data, "post") return request(data, "post")
} }
/** 攻防明细*/
export function defenceDetail(data) {
data.method = "dj.api.smartcarlife.inspection.defence.detail"
return request(data, "post")
}
...@@ -109,3 +109,10 @@ export function uploadExcel(data) { ...@@ -109,3 +109,10 @@ export function uploadExcel(data) {
data.method = `${path}smartcarlife.common.uploadExcel` data.method = `${path}smartcarlife.common.uploadExcel`
return request(data, RequestMethods.POST, ["file"]) return request(data, RequestMethods.POST, ["file"])
} }
// 文件上传通用接口
// fileType 文件类型(image,video,pdf,excel,doc)
export function uploadFile(data) {
data.method = `${path}common.uploadFile`
return request(data, RequestMethods.POST, ["file"])
}
...@@ -86,6 +86,7 @@ $prefix: d2; ...@@ -86,6 +86,7 @@ $prefix: d2;
// padding-left: 20px; // padding-left: 20px;
margin: 0 0; margin: 0 0;
} }
.edit-sub-title::before { .edit-sub-title::before {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
...@@ -185,6 +186,7 @@ $prefix: d2; ...@@ -185,6 +186,7 @@ $prefix: d2;
.tips-block { .tips-block {
position: relative; position: relative;
} }
.tips-label { .tips-label {
margin-right: 20px; margin-right: 20px;
} }
...@@ -201,6 +203,7 @@ $prefix: d2; ...@@ -201,6 +203,7 @@ $prefix: d2;
border: 1px solid #7f7f7f; border: 1px solid #7f7f7f;
border-radius: 50%; border-radius: 50%;
} }
.tips-icon::before { .tips-icon::before {
content: "?"; content: "?";
position: absolute; position: absolute;
...@@ -230,34 +233,43 @@ $prefix: d2; ...@@ -230,34 +233,43 @@ $prefix: d2;
.blue { .blue {
color: #0947c6; color: #0947c6;
} }
.m-b-10 { .m-b-10 {
margin-bottom: 10px; margin-bottom: 10px;
} }
.flex-align { .flex-align {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.img-36 { .img-36 {
width: 36px; width: 36px;
height: 36px; height: 36px;
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.img-circle { .img-circle {
border-radius: 50%; border-radius: 50%;
} }
.m-b-20 { .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.p-l-40 { .p-l-40 {
padding-left: 40px; padding-left: 40px;
} }
.img-60 { .img-60 {
width: 60px; width: 60px;
height: 60px; height: 60px;
} }
.grey { .grey {
background-color: #999999; background-color: #999999;
} }
...@@ -281,6 +293,7 @@ $prefix: d2; ...@@ -281,6 +293,7 @@ $prefix: d2;
.text-e8 { .text-e8 {
color: #eb4e4e !important; color: #eb4e4e !important;
} }
/* 以下两个修改箭头颜色 */ /* 以下两个修改箭头颜色 */
// .el-tooltip__popper[x-placement^='top'] .popper__arrow { // .el-tooltip__popper[x-placement^='top'] .popper__arrow {
// border-top-color: #505050; // border-top-color: #505050;
...@@ -296,11 +309,12 @@ $prefix: d2; ...@@ -296,11 +309,12 @@ $prefix: d2;
// opacity: 90%; // opacity: 90%;
// } // }
.el-popover{ .el-popover {
overflow:hidden; overflow: hidden;
} }
.scrollHeight{
max-height:200px!important; .scrollHeight {
max-height: 200px !important;
overflow-y: scroll; overflow-y: scroll;
} }
...@@ -310,6 +324,14 @@ $prefix: d2; ...@@ -310,6 +324,14 @@ $prefix: d2;
border: 1px solid #e4e7ed !important; border: 1px solid #e4e7ed !important;
color: #666; color: #666;
} }
.el-tooltip__popper.is-light[x-placement^=top] .popper__arrow{
.el-tooltip__popper.is-light[x-placement^=top] .popper__arrow {
border-color: #e4e7ed !important; border-color: #e4e7ed !important;
} }
.el-textarea {
.el-input__count {
right: -55px;
bottom: 0;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -845,8 +845,52 @@ export const auditTypeList = [ ...@@ -845,8 +845,52 @@ export const auditTypeList = [
{ confId: 2, confValue: "删除" } { confId: 2, confValue: "删除" }
] ]
// 人员管理-员工审核-审核状态
export const refundExamine_status = [
{ confId: 1, confValue: "商务审核" },
{ confId: 2, confValue: "财务复核" },
{ confId: 3, confValue: "财务结算" },
{ confId: 4, confValue: "已完成" },
{ confId: 5, confValue: "驳回" }
]
// 虚拟对公账户银盛到账模式 // 虚拟对公账户银盛到账模式
export const receiptModeList = [ export const receiptModeList = [
{ confId: 1, confValue: "T+1" }, { confId: 1, confValue: "T+1" },
{ confId: 2, confValue: "D+1" } { confId: 2, confValue: "D+1" }
] ]
// 发票税率
export const invoiceTaxRateList = [
{ confId: 0, confValue: "专票1%" },
{ confId: 1, confValue: "专票3%" },
{ confId: 2, confValue: "专票6%" },
{ confId: 3, confValue: "专票13%" },
{ confId: 4, confValue: "普票1%" },
{ confId: 5, confValue: "普票3%" },
{ confId: 6, confValue: "普票6%" },
{ confId: 7, confValue: "普票13%" },
{ confId: 8, confValue: "不需要开票" }
]
// 合作模式
export const cooperationModeList = [
{ confId: 0, confValue: "单店" },
{ confId: 1, confValue: "集团" }
]
// 收款方式
export const paymentMethodList = [
{ confId: 0, confValue: "嘀加收款" },
{ confId: 1, confValue: "门店收款" }
]
// 服务商分类
export const partnerClassifyList = [
{ confId: 0, confValue: "服务商" },
{ confId: 1, confValue: "直营" }
]
// 子业务
export const subBusinessList = [
{ confId: "0", confValue: "权益" },
{ confId: "1", confValue: "延保" }
]
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
v-if="config.isShowFooter"> v-if="config.isShowFooter">
<el-button type="primary" <el-button type="primary"
@click="confirmBtn" @click="confirmBtn"
:loading="$store.state.d2admin.loading.value"> :loading="$store.state.d2admin.loading.value || btnLoding">
{{ config.confirm_name }} {{ config.confirm_name }}
</el-button> </el-button>
<el-button v-preventReClick <el-button v-preventReClick
...@@ -75,6 +75,11 @@ export default { ...@@ -75,6 +75,11 @@ export default {
// 弹窗是否展示 // 弹窗是否展示
type: Boolean, type: Boolean,
default: false default: false
},
btnLoding: {
// 手动设置确定按钮loding
type: Boolean,
default: false
} }
// width: { // width: {
// //弹窗宽度 // //弹窗宽度
......
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
:style="{ width: item.width || defaultWidth }" :style="{ width: item.width || defaultWidth }"
:show-word-limit="item.showLimit || false" :show-word-limit="item.showLimit || false"
:show-password="item.showPass || false" :show-password="item.showPass || false"
@keydown.native="e => handleInputDown(e, item)"> @keydown.native="e => handleInputDown(e, item)"
@input="e => maxLengthInput(e, item)">
<span v-if="item.prepend" <span v-if="item.prepend"
slot="prepend">{{ item.prepend }}</span> slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" <span v-if="item.append"
...@@ -517,6 +518,11 @@ export default { ...@@ -517,6 +518,11 @@ export default {
this.formObj[targetItem.attrObj.cityCode] = '' this.formObj[targetItem.attrObj.cityCode] = ''
} }
this.formObj[targetItem.attrObj.fullAddress] = '' this.formObj[targetItem.attrObj.fullAddress] = ''
},
maxLengthInput(value, item) {
if (item.inputType && (value.length > item.maxlength)) {
this.formObj[item.name] = value.slice(0, item.maxlength)
}
} }
} }
} }
...@@ -584,7 +590,7 @@ export default { ...@@ -584,7 +590,7 @@ export default {
} }
/* 有tips-icon 全局样式 修改因全局样式影响 */ /* 有tips-icon 全局样式 修改因全局样式影响 */
.glsx-combi-form .tips-block span:last-child{ .glsx-combi-form .tips-block span:last-child {
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
......
...@@ -412,6 +412,14 @@ export const routerName = { ...@@ -412,6 +412,14 @@ export const routerName = {
parentId: "90402", parentId: "90402",
label: "订单详情", label: "订单详情",
handle: "orderDetail" handle: "orderDetail"
},
{
authId: "9040205",
parentId: "90402",
label: "发起退款",
category: "Button",
type: "primary",
handle: "batchRefund"
} }
], ],
component: _import("orderManage/orderSupplement") component: _import("orderManage/orderSupplement")
...@@ -606,5 +614,72 @@ export const routerName = { ...@@ -606,5 +614,72 @@ export const routerName = {
activePath: "/orderList" activePath: "/orderList"
}, },
component: _import("orderManage/configUpgradationDetail") component: _import("orderManage/configUpgradationDetail")
},
90408: {
path: "/refundExamine",
name: "refundExamine",
meta: {
title: "退款审核",
authId: "90408",
parentId: "904",
cache: false
},
auth: [
{
authId: "9040801",
parentId: "90408",
label: "批量商务审核",
category: "Button",
type: "primary",
handle: "batchBusinessExamine"
},
{
authId: "9040802",
parentId: "90408",
label: "批量财务复核",
category: "Button",
type: "primary",
handle: "batchFinanceExamine"
},
{
authId: "9040803",
parentId: "90408",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9040804",
parentId: "90408",
label: "查看",
handle: "handleDetail"
},
{
authId: "9040805",
parentId: "90408",
label: "审核",
handle: "handleExamine"
},
{
authId: "9040806",
parentId: "90408",
label: "结算",
handle: "handleSettlement"
},
{
authId: "9040807",
parentId: "90408",
label: "驳回",
handle: "handleReject"
},
{
authId: "9040808",
parentId: "90408",
label: "下载",
handle: "handleDownload"
}
],
component: _import("orderManage/refundExamine")
} }
} }
...@@ -85,14 +85,14 @@ export const routerName = { ...@@ -85,14 +85,14 @@ export const routerName = {
} }
] ]
}, },
{ // {
authId: "9060307", // authId: "9060307",
parentId: "90603", // parentId: "90603",
label: "商户关联", // label: "商户关联",
category: "Button", // category: "Button",
type: "primary", // type: "primary",
handle: "handleMerchantRelate" // handle: "handleMerchantRelate"
}, // },
{ {
authId: "9060308", authId: "9060308",
parentId: "90603", parentId: "90603",
...@@ -144,10 +144,58 @@ export const routerName = { ...@@ -144,10 +144,58 @@ export const routerName = {
parentId: "90603012" parentId: "90603012"
} }
] ]
},
{
authId: "90603014",
parentId: "90603",
label: "商户上架",
category: "Button",
type: "primary",
handle: "handleMerchantGrounding",
addRoutePath: [
{
authId: "90603015",
name: "商户上架",
parentId: "90603"
}
]
},
{
authId: "90603016",
parentId: "90603",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "90603017",
parentId: "90603",
label: "编辑",
handle: "handleEditMerchantGrounding",
addRoutePath: [
{
authId: "90603015",
name: "商户上架",
parentId: "90603"
}
]
} }
], ],
component: _import("systemConfig/merchant/merchantManage") component: _import("systemConfig/merchant/merchantManage")
}, },
90603015: {
path: "/merchantGrounding",
name: "merchantGrounding",
meta: {
title: "商户上架",
authId: "90603015",
parentId: "90603",
cache: false,
activePath: "/merchantManage"
},
component: _import("systemConfig/merchant/merchantGrounding")
},
90604: { 90604: {
path: "/merchantDetail", path: "/merchantDetail",
name: "merchantDetail", name: "merchantDetail",
......
<!-- 审核 -->
<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' }">{{ txtObj[examineType] }}</span>
</div>
</baseDialog>
</template>
<script>
import { updateBatch } from '@api/refundExamine'
// import { deepClone } from '@/common/util'
export default {
name: 'ExamineDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
txtObj: {
商务审核: '审核通过后,退款单据自动流转至财务复核。',
财务复核: '审核通过后,退款单据自动流转至财务结算。'
},
infoForm: {
remark: ''
},
dialogConfig: {
title: '',
width: '600px'
},
examineRef: 'examineRef',
formRules: {
},
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 50,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
}
}
},
props: {
examineType: {
type: String,
default: ''
},
examineVisible: {
type: Boolean,
default: false
},
infoList: {
type: Array,
default: () => { }
}
},
computed: {
visible: {
get() {
return this.examineVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'examineVisible' })
}
}
},
mounted() {
this.dialogConfig.title = this.examineType
},
methods: {
handleAddConfirm() {
var params = {}
params.remark = this.infoForm.remark
if (this.examineType == '商务审核') {
params.status = 2
} else {
params.status = 3
}
if (this.infoList.length > 1) {
params.idList = this.infoList.map((item) => {
return item.id
})
} else {
params.idList = [this.infoList[0].id]
}
console.log(params)
updateBatch(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin: 65px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
<!-- 驳回 -->
<template>
<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="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { updateBatch } from '@api/refundExamine'
export default {
name: 'RejectDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
// statusObj: {
// 1: '运营驳回',
// 2: '财务驳回'
// },
infoForm: {
remark: ''
},
dialogConfig: {
title: '',
width: '600px'
},
rejectRef: 'rejectRef',
formRules: {
remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
editFormData: [{
label: '驳回原因',
name: 'remark',
type: 'input',
maxlength: 50,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
}
}
},
props: {
rejectType: {
type: String,
default: ''
},
rejectVisible: {
type: Boolean,
default: false
},
infoList: {
type: Array,
default: () => { }
}
},
computed: {
visible: {
get() {
return this.rejectVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'rejectVisible' })
}
}
},
mounted() {
console.log('this.rejectType', this.rejectType)
this.dialogConfig.title = this.rejectType
},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.status = 5
if (this.infoList.length > 1) {
params.idList = this.infoList.map((item) => {
return item.id
})
} else {
params.idList = [this.infoList[0].id]
}
console.log(params)
updateBatch(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>
...@@ -201,25 +201,33 @@ ...@@ -201,25 +201,33 @@
@click="cancelRelat(scope.scope)"> @click="cancelRelat(scope.scope)">
取消关联 取消关联
</el-button> --> </el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040123', '9040124']" :data="scope.scope" /> <auth-button slot="auth-button"
:show-btn-ids="['9040123', '9040124']"
:data="scope.scope" />
</span> </span>
<span v-if="scope.scope.ledgerStatus == '2'" style="margin-left: 10px"> <span v-if="scope.scope.ledgerStatus == '2'"
style="margin-left: 10px">
<!-- <el-button type="text" <!-- <el-button type="text"
size="mini" size="mini"
style="margin-left: 10px" style="margin-left: 10px"
@click="chooseRule(scope.scope)"> @click="chooseRule(scope.scope)">
发起分账 发起分账
</el-button> --> </el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040125']" :data="scope.scope" /> <auth-button slot="auth-button"
:show-btn-ids="['9040125']"
:data="scope.scope" />
</span> </span>
<span v-if="scope.scope.ledgerStatus == '3'" style="margin-left: 10px"> <span v-if="scope.scope.ledgerStatus == '3'"
style="margin-left: 10px">
<!-- <el-button type="text" <!-- <el-button type="text"
size="mini" size="mini"
style="margin-left: 10px" style="margin-left: 10px"
@click="ruleHistory(scope.scope)"> @click="ruleHistory(scope.scope)">
分账记录 分账记录
</el-button> --> </el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040126']" :data="scope.scope" /> <auth-button slot="auth-button"
:show-btn-ids="['9040126']"
:data="scope.scope" />
</span> </span>
<!-- 尾款状态 0待支付 1已支付 2已退款 --> <!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag"> <span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
...@@ -231,14 +239,17 @@ ...@@ -231,14 +239,17 @@
</el-button> </el-button>
</span> </span>
<!-- 取消分账 分账中状态 --> <!-- 取消分账 分账中状态 -->
<span v-if="scope.scope.ledgerStatus == '4'" style="margin-left: 10px"> <span v-if="scope.scope.ledgerStatus == '4'"
style="margin-left: 10px">
<!-- <el-button type="text" <!-- <el-button type="text"
size="mini" size="mini"
style="margin-left: 10px" style="margin-left: 10px"
@click="cancelRule(scope.scope)"> @click="cancelRule(scope.scope)">
取消分账 取消分账
</el-button> --> </el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040127']" :data="scope.scope" /> <auth-button slot="auth-button"
:show-btn-ids="['9040127']"
:data="scope.scope" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
...@@ -313,6 +324,12 @@ ...@@ -313,6 +324,12 @@
:record-info="recordInfo" :record-info="recordInfo"
v-if="ruleInfoVisible" v-if="ruleInfoVisible"
@dialogClose="ruleInfoDialogClose" /> @dialogClose="ruleInfoDialogClose" />
<!-- 标记退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:detail="detail"
:order-type="1"
v-if="signRefundVisible"
@dialogClose="refundDialogClose" />
</div> </div>
</template> </template>
<script> <script>
...@@ -328,10 +345,12 @@ import orderManage from "@api/orderManage" ...@@ -328,10 +345,12 @@ import orderManage from "@api/orderManage"
import { batchUpdateToNotInput, batchUpdateConfirmInput, markAsRefunded, cancelDivideAccountsAPI } from '@api/order' import { batchUpdateToNotInput, batchUpdateConfirmInput, markAsRefunded, cancelDivideAccountsAPI } from '@api/order'
import chooseRuleDialog from './chooseRuleDialog' import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog' import ruleInfoDialog from './ruleInfoDialog'
import newSignRefundDialog from './components/newSignRefundDialog'
export default { export default {
components: { components: {
chooseRuleDialog, chooseRuleDialog,
ruleInfoDialog ruleInfoDialog,
newSignRefundDialog
}, },
data() { data() {
return { return {
...@@ -478,7 +497,9 @@ export default { ...@@ -478,7 +497,9 @@ export default {
ruleVisible: false, ruleVisible: false,
recordInfo: null, recordInfo: null,
ruleInfoVisible: false, ruleInfoVisible: false,
signRefundFlag: false signRefundFlag: false,
detail: {},
signRefundVisible: false
} }
}, },
name: "Crowdfunding", name: "Crowdfunding",
...@@ -1391,24 +1412,33 @@ export default { ...@@ -1391,24 +1412,33 @@ export default {
// 标记已退款 // 标记已退款
refund(row) { refund(row) {
this.$prompt('请输入退款备注', '提示', { // this.$prompt('请输入退款备注', '提示', {
confirmButtonText: '确定', // confirmButtonText: '确定',
cancelButtonText: '取消', // cancelButtonText: '取消',
inputValidator: value => { // inputValidator: value => {
if ((value ?? '') === '') return '请输入退款备注' // if ((value ?? '') === '') return '请输入退款备注'
if (value.length > 100) return '退款备注最多100字' // if (value.length > 100) return '退款备注最多100字'
}, // },
inputPlaceholder: '退款备注' // inputPlaceholder: '退款备注'
}).then(({ value }) => { // }).then(({ value }) => {
markAsRefunded({ // markAsRefunded({
orderCode: row?.orderCode, // orderCode: row?.orderCode,
refundRemark: value // refundRemark: value
}).then(res => { // }).then(res => {
this.notice.okTips() // this.notice.okTips()
this.$refs.crowdfundTable.refreshTable() // this.$refs.crowdfundTable.refreshTable()
// this.handleSearch()
// })
// }).catch(() => { })
this.signRefundVisible = !this.signRefundVisible
this.detail.orderCode = row.orderCode
this.detail.totalPrice = row.finalPaymentAmount ? row.finalPaymentAmount / 100 : 0
},
refundDialogClose(flag) {
this.signRefundVisible = !this.signRefundVisible
if (flag) {
this.handleSearch() this.handleSearch()
}) }
}).catch(() => { })
}, },
// 取消分账 // 取消分账
cancelRule(row) { cancelRule(row) {
......
...@@ -3,13 +3,20 @@ ...@@ -3,13 +3,20 @@
<d2-container class="order-detail"> <d2-container class="order-detail">
<div class="d2-container-content"> <div class="d2-container-content">
<p class="edit-title"> <p class="edit-title">
订单详情&nbsp;&nbsp;&nbsp;<el-button size="mini" 订单详情
<span v-if="detail.hasUnfinishedRefundApply"
class="refund-status">
退款审核中
</span>
<span v-else>
<el-button size="mini"
v-if="signRefundFlag && [4, 6].includes(detail.status)" v-if="signRefundFlag && [4, 6].includes(detail.status)"
class="signRefundBtn" class="signRefundBtn"
@click="refund"> @click="refund">
<img class="signRefundIcon" <img class="signRefundIcon"
src="./images/sign.png"> 标记为退款 src="./images/sign.png"> 标记为退款
</el-button> </el-button>
</span>
&nbsp;&nbsp;&nbsp;<el-button size="mini" &nbsp;&nbsp;&nbsp;<el-button size="mini"
v-if="InvoicingFlag && [4].includes(detail.status)" v-if="InvoicingFlag && [4].includes(detail.status)"
class="signRefundBtn" class="signRefundBtn"
...@@ -94,7 +101,7 @@ ...@@ -94,7 +101,7 @@
{{ detail.customerName || $$(detail, 'customer', 'customerName') }} {{ detail.customerName || $$(detail, 'customer', 'customerName') }}
</el-form-item> </el-form-item>
<el-form-item label="客户来源:"> <el-form-item label="客户来源:">
{{ detail.customer.salesType==1?'售后':'售前'}} {{ detail.customer.salesType==1?'售后':'售前' }}
</el-form-item> </el-form-item>
<el-form-item label="评论:"> <el-form-item label="评论:">
{{ detail.customerComment }} {{ detail.customerComment }}
...@@ -284,8 +291,13 @@ ...@@ -284,8 +291,13 @@
</el-dialog> </el-dialog>
<!-- 标记退款 --> <!-- 标记退款 -->
<sign-refund-dialog :sign-refund-visible="signRefundVisible" <!-- <sign-refund-dialog :sign-refund-visible="signRefundVisible"
:detail="detail"
v-if="signRefundVisible"
@dialogClose="dialogClose" /> -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:detail="detail" :detail="detail"
:order-type="1"
v-if="signRefundVisible" v-if="signRefundVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" />
<!-- 超管修改备注 --> <!-- 超管修改备注 -->
...@@ -293,27 +305,29 @@ ...@@ -293,27 +305,29 @@
:detail="detail" :detail="detail"
v-if="remarkVisible" v-if="remarkVisible"
@dialogClose="remarkDialogClose" /> @dialogClose="remarkDialogClose" />
<sign-refund-dialog :sign-refund-visible="signRefundVisible" <!-- <sign-refund-dialog :sign-refund-visible="signRefundVisible"
:is-partial-refund="isPartialRefund" :is-partial-refund="isPartialRefund"
:detail="detail" :detail="detail"
v-if="signRefundVisible" v-if="signRefundVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" /> -->
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import signRefundDialog from './signRefundDialog' // import signRefundDialog from './signRefundDialog'
import remarkDialog from './remarkDialog' import remarkDialog from './remarkDialog'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { payType, BaseData } from '@/common/constants.js' import { payType, BaseData } from '@/common/constants.js'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { goodsOrderDetail, markAsInvoiced } from '@api/order' import { goodsOrderDetail, markAsInvoiced } from '@api/order'
import newSignRefundDialog from './components/newSignRefundDialog'
export default { export default {
name: 'OrderDetail', name: 'OrderDetail',
components: { components: {
signRefundDialog, // signRefundDialog,
remarkDialog remarkDialog,
newSignRefundDialog
}, },
data() { data() {
return { return {
...@@ -644,4 +658,12 @@ export default { ...@@ -644,4 +658,12 @@ export default {
// overflow: scroll; // overflow: scroll;
// object-fit: fill; // object-fit: fill;
} }
.refund-status {
margin-left: 10px;
width: 60px;
height: 17px;
opacity: 1;
color: #ff8d1a;
font-size: 12px;
}
</style> </style>
...@@ -4,17 +4,26 @@ ...@@ -4,17 +4,26 @@
<!-- class="order-detail" --> <!-- class="order-detail" -->
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px;"> <div class="header"
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :search-select-obj="searchSelectObj" slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:search-select-obj="searchSelectObj"
:form-data="showFormData" /> :form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch"
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> <el-button size="small"
@click="handleReset">
重置 重置
</el-button> </el-button>
<el-button size="small" @click="handleRecord"> <el-button size="small"
@click="handleRecord">
返回 返回
</el-button> </el-button>
</div> </div>
...@@ -23,11 +32,16 @@ ...@@ -23,11 +32,16 @@
<d2-container> --> <d2-container> -->
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :left-span="13"> <d2-table-header :left-span="13">
<span slot="left" class="leftSpan">共<span class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span <span slot="left"
class="leftSpan">共<span
class="count-txt">{{ countObj.totalCount }}</span>条交易记录,总金额<span
class="count-txt">{{ countObj.totalAmount }}</span>元,已补录<span class="count-txt">{{ countObj.inputtedCount class="count-txt">{{ countObj.totalAmount }}</span>元,已补录<span class="count-txt">{{ countObj.inputtedCount
}}</span>条,未补录<span class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span class="count-txt">{{ }}</span>条,未补录<span
class="count-txt">{{ countObj.waitInputCount }}</span>条,未关联<span
class="count-txt">{{
countObj.notAssociatedCount }}</span>条,无需补录<span class="count-txt">{{ countObj.needNoSupplementCount countObj.notAssociatedCount }}</span>条,无需补录<span class="count-txt">{{ countObj.needNoSupplementCount
}}</span>条,待确认补录<span class="count-txt">{{ countObj.waitConfirmInputCount }}</span>条。</span> }}</span>条,待确认补录<span
class="count-txt">{{ countObj.waitConfirmInputCount }}</span>条。</span>
<!-- <el-button type="primary" @click="batchRecord"> <!-- <el-button type="primary" @click="batchRecord">
批量确认补录 批量确认补录
</el-button> --> </el-button> -->
...@@ -41,19 +55,26 @@ ...@@ -41,19 +55,26 @@
<el-button type="primary" @click="handleExport"> <el-button type="primary" @click="handleExport">
导出 导出
</el-button> --> </el-button> -->
<auth-button :show-btn-ids="['9040201', '9040202', '9040203']" <auth-button :show-btn-ids="['9040201', '9040202', '9040203', '9040205']"
category="Button" /> category="Button" />
</d2-table-header> </d2-table-header>
<!-- :beforeSearchFn="beforeSearchFn" --> <!-- :beforeSearchFn="beforeSearchFn" -->
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" <d2-table ref="recordTable"
:before-search-fn="beforeSearchFn" :selectable-fn="selectableFn"> :get-list-api="getListApi"
<template slot="auth-button" slot-scope="scope"> :search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn">
<template slot="auth-button"
slot-scope="scope">
<!-- 已分帐无可操作内容 --> <!-- 已分帐无可操作内容 -->
<div v-if="scope.scope.inputStatus !== '6'"> <div v-if="scope.scope.inputStatus !== '6'">
<!-- <el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)"> <!-- <el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)">
订单详情 订单详情
</el-button> --> </el-button> -->
<auth-button v-if="scope.scope.inputStatus == '1'" :show-btn-ids="['9040204']" :data="scope.scope"/> <auth-button v-if="scope.scope.inputStatus == '1'"
:show-btn-ids="['9040204']"
:data="scope.scope" />
<!-- <el-button type="text" <!-- <el-button type="text"
v-if="scope.scope.inputStatus == '0'" v-if="scope.scope.inputStatus == '0'"
@click="relatActivityOrder(scope.scope)"> @click="relatActivityOrder(scope.scope)">
...@@ -94,17 +115,31 @@ ...@@ -94,17 +115,31 @@
</div> </div>
</d2-container> </d2-container>
<!-- 批量修改所属园区店 --> <!-- 批量修改所属园区店 -->
<update-yqMerchant-dialog :merchant-visible="merchantDialogVisible" :id-list="ids" v-if="merchantDialogVisible" <update-yqMerchant-dialog :merchant-visible="merchantDialogVisible"
:id-list="ids"
v-if="merchantDialogVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose" />
<!-- 关联活动订单 --> <!-- 关联活动订单 -->
<relat-activity-order-dialog :relat-activity-visible="relatActivityVisible" :order-id="orderId" <relat-activity-order-dialog :relat-activity-visible="relatActivityVisible"
v-if="relatActivityVisible" @dialogClose="relatDialogClose" /> :order-id="orderId"
v-if="relatActivityVisible"
@dialogClose="relatDialogClose" />
<!-- 选择分账规则 --> <!-- 选择分账规则 -->
<choose-rule-dialog :rule-visible="ruleVisible" :record-info="recordInfo" v-if="ruleVisible" <choose-rule-dialog :rule-visible="ruleVisible"
:record-info="recordInfo"
v-if="ruleVisible"
@dialogClose="ruleDialogClose" /> @dialogClose="ruleDialogClose" />
<!-- 选择分账规则 --> <!-- 选择分账规则 -->
<rule-info-dialog :rule-info-visible="ruleInfoVisible" :record-info="recordInfo" v-if="ruleInfoVisible" <rule-info-dialog :rule-info-visible="ruleInfoVisible"
:record-info="recordInfo"
v-if="ruleInfoVisible"
@dialogClose="ruleInfoDialogClose" /> @dialogClose="ruleInfoDialogClose" />
<!-- 发起退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
:order-list="infoList"
:order-type="2"
v-if="signRefundVisible"
@dialogClose="refundDialogClose" />
</div> </div>
</template> </template>
...@@ -119,6 +154,7 @@ import updateYqMerchantDialog from './updateYqMerchantDialog' ...@@ -119,6 +154,7 @@ import updateYqMerchantDialog from './updateYqMerchantDialog'
import relatActivityOrderDialog from './relatActivityOrderDialog' import relatActivityOrderDialog from './relatActivityOrderDialog'
import chooseRuleDialog from './chooseRuleDialog' import chooseRuleDialog from './chooseRuleDialog'
import ruleInfoDialog from './ruleInfoDialog' import ruleInfoDialog from './ruleInfoDialog'
import newSignRefundDialog from './components/newSignRefundDialog'
const clonePayTypeList = deepClone(payTypeList) const clonePayTypeList = deepClone(payTypeList)
clonePayTypeList.splice(1, 1) clonePayTypeList.splice(1, 1)
export default { export default {
...@@ -127,7 +163,8 @@ export default { ...@@ -127,7 +163,8 @@ export default {
updateYqMerchantDialog, updateYqMerchantDialog,
relatActivityOrderDialog, relatActivityOrderDialog,
chooseRuleDialog, chooseRuleDialog,
ruleInfoDialog ruleInfoDialog,
newSignRefundDialog
}, },
data() { data() {
return { return {
...@@ -362,6 +399,14 @@ export default { ...@@ -362,6 +399,14 @@ export default {
{ {
confId: '6', confId: '6',
confLabel: '已分帐' confLabel: '已分帐'
},
{
confId: '7',
confLabel: '退款中'
},
{
confId: '8',
confLabel: '已退款'
} }
], ],
payTypeList: clonePayTypeList, payTypeList: clonePayTypeList,
...@@ -375,7 +420,9 @@ export default { ...@@ -375,7 +420,9 @@ export default {
orderId: null, orderId: null,
ruleVisible: false, ruleVisible: false,
recordInfo: null, recordInfo: null,
ruleInfoVisible: false ruleInfoVisible: false,
signRefundVisible: false,
infoList: []
} }
}, },
computed: { computed: {
...@@ -534,7 +581,7 @@ export default { ...@@ -534,7 +581,7 @@ export default {
selectableFn(row, index) { selectableFn(row, index) {
var isSelect = true var isSelect = true
if (row.inputStatus == '1' || row.inputStatus == '6') { // 已补录流水/已分帐不可勾选 if (row.inputStatus == '1' || row.inputStatus == '6' || row.inputStatus == '7' || row.inputStatus == '8') { // 已补录流水/已分帐/退款中/已退款不可勾选
isSelect = false isSelect = false
} }
return isSelect return isSelect
...@@ -714,6 +761,51 @@ export default { ...@@ -714,6 +761,51 @@ export default {
this.baseData.storeIdList = res || [] this.baseData.storeIdList = res || []
this.getOptionsList() this.getOptionsList()
}) })
},
// 批量发起退款
batchRefund() {
var selectedData = []
if (this.$refs.recordTable.mutiSelectArr.orderSupplement) {
selectedData = this.$refs.recordTable.mutiSelectArr.orderSupplement
}
this.batchRefund_commit(selectedData)
},
batchRefund_commit(selectedData) {
if (!selectedData?.length) {
this.$message({
message: "请选择需要发起退款的记录",
type: "warning",
showClose: true
})
return false
}
const flag = selectedData.some((item) => {
return item.inputStatus != '0' && item.inputStatus != '2' && item.inputStatus != '3' // 仅流水状态=“未关联”“未补录”“无需补录”可进行该操作
})
if (flag) {
this.$message({
message: "请勾选未进行过补单的流水",
type: "warning",
showClose: true
})
return false
}
var list = selectedData.map((item) => {
item.orderCode = item.tradeNo
item.price = item.totalFee ? item.totalFee / 100 : ''
return item
})
this.infoList = list
this.signRefundVisible = !this.signRefundVisible
},
refundDialogClose(flag) {
this.signRefundVisible = !this.signRefundVisible
if (flag) {
this.$refs.recordTable.refreshTable()
}
} }
} }
} }
......
<template>
<div v-loading="loading" class="container">
<div class="attack-detail" v-if="defenceDetail">
<div class="statistics-box">
<div
class="statistics-item"
v-for="(item, index) in statisticsObj"
:key="index"
>
<div class="text">{{ item.text }}</div>
<div class="value">{{ item.value(defenceDetail) }}</div>
</div>
</div>
<div class="dialog-box">
<div
class="dialog-item"
v-for="(item, index) in defenceDetail.detailList"
:key="item.is"
>
<div class="dialog-head" >
<img
class="attack-score"
src="../../../assets/attack-score.png"
alt=""
/>
<div class="text">攻防得分</div>
<div class="score">{{ item.defScore ? item.defScore : "-" }}</div>
<div class="text" @click="handleMapping(item.mergedOffset)">对话开始时间</div>
<div class="time" @click="handleMapping(item.mergedOffset)">
{{ item.conStartTime ? item.conStartTime : "-" }}
</div>
<div class="attack-index">攻防回合{{ index + 1 }}</div>
<img
class="index-logo"
src="../../../assets/index-logo.png"
alt=""
/>
</div>
<div class="dialog">
<div
:class="{
'dialog-detail': true
}"
:key="item.id"
>
<div class="name">
<img class="role" src="@/assets/role-one.png" />
客户
</div>
<div class="dig-content" @click="currentDialog(item)">
{{ item.question }}
</div>
</div>
<div class="dialog-detail nth-child" :key="item.id">
<div class="name">
销售
<img class="role two" src="@/assets/role-two.png" />
</div>
<div class="dig-content" @click="currentDialog(item)">
{{ item.answer }}
</div>
<br/>
<div class="suggest">
<div class="improve">
<img src="@/assets/improve.png" class="improve-img" />
改进建议
</div>
<div
class="improve-text"
v-html="
regText(item.highlight, item.suggestionsForImprovement)
"
></div>
<div class="line"></div>
<div class="improve">
<img src="@/assets/polish.png" class="improve-img" />
润色表达
</div>
<div
class="improve-text"
v-html="regText(item.highlight, item.refineTheExpression)"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
<template v-else>
<div class="empty-box">
<div class="icon">
<img src="@/assets/empty-2.png" />
</div>
<div class="text">
{{ detailObj.defence === 1||detailObj.defence === 0||detailObj.defence === 4 ? '数据分析中,请稍等' : detailObj.defence === 3?'未发现攻防':'未进行攻防识别' }}
</div>
</div>
</template>
</div>
</template>
<script>
import { defenceDetail } from "@api/resident"
export default {
props: {
detailObj: {
type: Object,
default: {}
}
},
data() {
return {
statisticsObj: [
{
text: "攻防次数",
value: (data) => {
return data.defenceCount + "次"
}
},
{
text: "攻防平均得分",
value: (data) => {
return data.avgDefence + "分"
}
},
{
text: "客户类型",
value: (data) => {
return data.customerType ? data.customerType : "未知"
}
}
],
defenceDetail: "",
loading: true,
isFlag: false
}
},
created() {
this.getDefenceDetail()
},
methods: {
handleMapping(time) {
Array.prototype.slice.call(this.$parent.$parent.$children).forEach(dom=>{
if(dom.currentDialog){
dom.currentDialog(time)
}
})
},
getDefenceDetail() {
let params = {
batchId: this.detailObj.id
}
defenceDetail(params).then((res) => {
this.defenceDetail = res
this.loading = false
})
},
regText(highlight, value) {
highlight = highlight && JSON.parse(highlight)
let replacedText = value
if (value) {
highlight.forEach((item) => {
replacedText = replacedText.replace(item, function (match) {
return '<span style="color: #FE9220;">' + match + "</span>"
})
})
}
return replacedText
}
}
}
</script>
<style scoped lang="scss">
.container {
height: 100%;
}
.attack-detail {
height: calc(100% - 55px);
overflow: hidden;
.statistics-box {
display: flex;
align-items: center;
margin-bottom: 12px;
.statistics-item {
flex: 1;
padding: 12px 16px;
background: #f7f9fa;
color: #333333;
height: 20px;
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 8px;
.value {
font-weight: 600;
}
}
}
.dialog-box {
height: calc(100% - 68px);
overflow-y: scroll;
.dialog-item {
width: 100%;
background: #f7f9fa;
margin-bottom: 12px;
.dialog-head {
padding: 12px 16px;
height: 24px;
position: relative;
line-height: 24px;
display: flex;
align-items: center;
border-bottom: 1px solid #e5e5e5;
// cursor: pointer;
.attack-score {
width: 24px;
// height: 24px;
margin-right: 8px;
}
.text {
font-weight: 400;
font-size: 14px;
color: #666666;
}
.score {
font-weight: 500;
font-size: 15px;
color: #fe9220;
margin: 0 24px 0 6px;
}
.time {
font-weight: 400;
font-size: 14px;
color: #2A58AD;
margin-left: 6px;
cursor: pointer;
}
.index-logo {
width: 86px;
height: 32px;
position: absolute;
right: 0;
}
.attack-index {
font-weight: 400;
font-size: 14px;
color: #ffffff;
position: absolute;
right: 12px;
z-index: 999;
}
}
.dialog {
width: 100%;
height: 100%;
background: #f7f9fa;
border-radius: 4px;
overflow-y: scroll;
padding: 12px 8px 12px 16px;
box-sizing: border-box;
.dialog-detail {
margin-bottom: 8px;
text-align: left;
.name {
font-size: 12px;
color: #666666;
letter-spacing: 0;
line-height: 16px;
.role {
width: 32px;
height: 32px;
vertical-align: top;
margin-right: 10px;
}
.two {
margin-right: 0;
}
}
.dig-content {
width: fit-content;
max-width: 70%;
background: #e4ecf7;
border-radius: 4px;
font-size: 14px;
color: #333333;
padding: 10px 12px;
white-space: pre-wrap;
text-align: left;
margin: -14px 0 0 40px;
line-height: 20px;
}
.suggest {
width: fit-content;
max-width: 70%;
background: #fff;
border-radius: 4px;
font-size: 14px;
color: #333333;
padding: 10px 12px;
white-space: pre-wrap;
text-align: left;
line-height: 20px;
margin-top: 12px;
margin-right: 40px;
display: inline-block;
.improve {
width: 94px;
height: 28px;
background: #f2f7fc;
border-radius: 4px;
padding: 4px 8px;
display: flex;
align-items: center;
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 6px;
box-sizing: border-box;
white-space: nowrap;
.improve-img {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.improve-text {
margin: 0 8px;
}
.line {
width: 100%;
height: 1px;
margin: 12px 8px;
background-color: #ebedff;
}
}
}
.nth-child {
text-align: right;
.dig-content {
display: inline-block;
background: #ffffff;
margin-right: 38px;
line-height: 22px;
}
}
}
}
}
}
.empty-box {
display: flex;
flex-direction: column;
font-size: 12px;
color: #999999;
padding-top: 184px;
text-align: center;
width: 100%;
height: 100%;
box-sizing: border-box;
border-radius: 0 4px 4px 4px;
.icon {
width: 270px;
height: 120px;
margin: 0 auto 8px;
img {
width: 100%;
height: 100%;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -3,28 +3,14 @@ ...@@ -3,28 +3,14 @@
<div class="record-box"> <div class="record-box">
<div class="record"> <div class="record">
<audio id="audio1"> <audio id="audio1">
<source <source :src="detailObj.fileUrl" type="audio/mpeg" />
:src="detailObj.fileUrl" <source :src="detailObj.fileUrl" type="audio/ogg" />
type="audio/mpeg"
/>
<source
:src="detailObj.fileUrl"
type="audio/ogg"
/>
您的浏览器不支持 audio 标签。 您的浏览器不支持 audio 标签。
</audio> </audio>
<div <div class="play" v-if="isPlay" @click="handleAudio">
class="play"
v-if="isPlay"
@click="handleAudio"
>
<img src="@/assets/play.png" /> <img src="@/assets/play.png" />
</div> </div>
<div <div class="play" v-else @click="handleAudio">
class="play"
v-else
@click="handleAudio"
>
<img src="@/assets/pause.png" /> <img src="@/assets/pause.png" />
</div> </div>
<div class="times">{{ currentTime }}/{{ totalTime }}</div> <div class="times">{{ currentTime }}/{{ totalTime }}</div>
...@@ -42,65 +28,45 @@ ...@@ -42,65 +28,45 @@
></div> ></div>
</div> </div>
</div> </div>
<div <div class="trumpet" @click="handleMute">
class="trumpet" <img src="@/assets/trumpet.png" v-if="isMuted" />
@click="handleMute" <img src="@/assets/mute.png" v-if="!isMuted" />
>
<img
src="@/assets/trumpet.png"
v-if="isMuted"
/>
<img
src="@/assets/mute.png"
v-if="!isMuted"
/>
</div> </div>
</div> </div>
<div <div class="copy-btn" @click="copyText">
class="copy-btn" <img class="icon" src="@/assets/copy.png" />
@click="copyText"
>
<img
class="icon"
src="@/assets/copy.png"
/>
音频链接 音频链接
</div> </div>
</div> </div>
<div <div class="record-info" v-loading="loading">
class="record-info"
v-loading="loading"
>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane <el-tab-pane label="对话详情" name="dialog">
label="对话详情"
name="dialog"
>
<template v-if="!loading"> <template v-if="!loading">
<template v-if="dialogList.length"> <template v-if="dialogList.length">
<div class="dialog"> <div class="dialog">
<template v-for="item in dialogList"> <template v-for="item in dialogList">
<div <div
:class="{ 'dialog-detail': true, 'nth-child': item.role % 2 === 1 }" :class="{
'dialog-detail': true,
'nth-child': item.role % 2 === 1
}"
:key="item.id" :key="item.id"
> >
<div class="name"> <div class="name">
<img <img
class="role" class="role"
src="@/assets/role-one.png" src="@/assets/role-one.png"
v-if=" item.role % 2 === 0" v-if="item.role % 2 === 0"
/> />
{{item.role % 2 === 0?'车主':'销售'}} {{ item.role % 2 === 0 ? "车主" : "销售" }}
<img <img
class="role two" class="role two"
src="@/assets/role-two.png" src="@/assets/role-two.png"
v-if=" item.role % 2 === 1" v-if="item.role % 2 === 1"
/> />
</div> </div>
<div <div class="dig-content" @click="currentDialog(item.mergedOffset)">{{ item.content }}
class="dig-content" </div>
@click="currentDialog(item)"
>{{ item.content }}</div>
</div> </div>
</template> </template>
</div> </div>
...@@ -110,15 +76,9 @@ ...@@ -110,15 +76,9 @@
</template> </template>
</template> </template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="对话摘要" name="abstract">
label="对话摘要"
name="abstract"
>
<template v-if="detailObj.digest"> <template v-if="detailObj.digest">
<div <div class="abstract" v-html="formatSrt(detailObj.digest)"></div>
class="abstract"
v-html="formatSrt(detailObj.digest)"
></div>
</template> </template>
<template v-else> <template v-else>
<empty /> <empty />
...@@ -131,7 +91,7 @@ ...@@ -131,7 +91,7 @@
<script> <script>
import { conversationDetailPage, getPointCategory } from "@api/resident" import { conversationDetailPage, getPointCategory } from "@api/resident"
import Empty from './Empty' import Empty from "./Empty"
export default { export default {
components: { Empty }, components: { Empty },
props: { props: {
...@@ -140,7 +100,7 @@ export default { ...@@ -140,7 +100,7 @@ export default {
default: {} default: {}
} }
}, },
data () { data() {
return { return {
myAud: "", myAud: "",
isPlay: true, isPlay: true,
...@@ -149,31 +109,32 @@ export default { ...@@ -149,31 +109,32 @@ export default {
totalTime: "0:00", totalTime: "0:00",
currentTime: "0:00", currentTime: "0:00",
isCircle: false, isCircle: false,
activeName: 'dialog', activeName: "dialog",
loading: true loading: true
} }
}, },
mounted () { mounted() {
this.conversationDetailPage() this.conversationDetailPage()
this.myAud = document.getElementById("audio1") this.myAud = document.getElementById("audio1")
this.handleprogress() this.handleprogress()
}, },
methods: { methods: {
formatSrt (str) { formatSrt(str) {
return str?.replace(/\n/g, "<br/>") || '' return str?.replace(/\n/g, "<br/>") || ""
}, },
currentDialog (data) { currentDialog(time) {
this.myAud.currentTime = data.mergedOffset this.myAud.currentTime = time
}, },
toMinutesAndSeconds (seconds) { toMinutesAndSeconds(seconds) {
let minutes = Math.floor(seconds / 60) let minutes = Math.floor(seconds / 60)
let remainingSeconds = parseInt(seconds % 60) let remainingSeconds = parseInt(seconds % 60)
minutes = minutes > 10 ? minutes : `0${minutes}` minutes = minutes > 10 ? minutes : `0${minutes}`
remainingSeconds = remainingSeconds > 10 ? remainingSeconds : `0${remainingSeconds}` remainingSeconds =
remainingSeconds > 10 ? remainingSeconds : `0${remainingSeconds}`
return `${minutes}:${remainingSeconds}` return `${minutes}:${remainingSeconds}`
}, },
handleprogress () { handleprogress() {
const progress = document.getElementById("progress") const progress = document.getElementById("progress")
const progressBar = document.getElementById("progressBar") const progressBar = document.getElementById("progressBar")
this.myAud.addEventListener("canplay", () => { this.myAud.addEventListener("canplay", () => {
...@@ -214,7 +175,7 @@ export default { ...@@ -214,7 +175,7 @@ export default {
false false
) )
}, },
handleAudio () { handleAudio() {
this.isPlay = !this.isPlay this.isPlay = !this.isPlay
if (!this.isPlay) { if (!this.isPlay) {
this.myAud.play() this.myAud.play()
...@@ -222,11 +183,11 @@ export default { ...@@ -222,11 +183,11 @@ export default {
this.myAud.pause() this.myAud.pause()
} }
}, },
handleMute () { handleMute() {
this.isMuted = !this.isMuted this.isMuted = !this.isMuted
this.myAud.muted = !this.isMuted this.myAud.muted = !this.isMuted
}, },
async conversationDetailPage () { async conversationDetailPage() {
try { try {
this.loading = true this.loading = true
const res = await conversationDetailPage({ const res = await conversationDetailPage({
...@@ -240,39 +201,45 @@ export default { ...@@ -240,39 +201,45 @@ export default {
this.loading = false this.loading = false
} }
}, },
copyText () { copyText() {
const { detailObj } = this, const { detailObj } = this,
receptionStatus = { receptionStatus = {
1: '成交', 1: "成交",
0: '战败' 0: "战败"
}[detailObj.receptionStatus], }[detailObj.receptionStatus],
{ customerName, startTime, duration, fileUrl } = detailObj { customerName, startTime, duration, fileUrl } = detailObj
// 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址 // 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [customerName, startTime, this.formatTime(duration), receptionStatus, fileUrl].join(' - ') let text = [
var textarea = document.createElement('textarea'); customerName,
textarea.style.position = 'fixed'; startTime,
textarea.style.opacity = 0; this.formatTime(duration),
textarea.value = text; receptionStatus,
document.body.appendChild(textarea); fileUrl
textarea.select(); ].join(" - ")
document.execCommand('copy'); var textarea = document.createElement("textarea")
document.body.removeChild(textarea); textarea.style.position = "fixed"
this.$message.success('已复制到剪切板') textarea.style.opacity = 0
textarea.value = text
document.body.appendChild(textarea)
textarea.select()
document.execCommand("copy")
document.body.removeChild(textarea)
this.$message.success("已复制到剪切板")
}, },
formatTime (seconds) { formatTime(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = '' let formattedTime = ""
if (seconds < 60) return seconds + '秒' if (seconds < 60) return seconds + "秒"
else { else {
let hours = Math.floor(seconds / 3600), let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60), minutes = Math.floor((seconds % 3600) / 60),
remainingSeconds = seconds % 60 remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + '小时' if (hours > 0) formattedTime += hours + "小时"
if (minutes > 0 || hours > 0) formattedTime += minutes + '分' if (minutes > 0 || hours > 0) formattedTime += minutes + "分"
if (remainingSeconds > 0) formattedTime += remainingSeconds + '秒' if (remainingSeconds > 0) formattedTime += remainingSeconds + "秒"
return formattedTime return formattedTime
} }
}, }
} }
} }
</script> </script>
...@@ -427,6 +394,7 @@ export default { ...@@ -427,6 +394,7 @@ export default {
text-align: left; text-align: left;
margin: -14px 0 0 40px; margin: -14px 0 0 40px;
line-height: 20px; line-height: 20px;
cursor: pointer;
} }
} }
.nth-child { .nth-child {
......
<template> <template>
<div class="analyse" v-loading="loading"> <div class="analyse" v-loading="loading">
<el-tabs v-model="activeName" >
<el-tab-pane label="质检明细" name="first"></el-tab-pane>
<el-tab-pane label="攻防明细" name="second"></el-tab-pane>
</el-tabs>
<template v-if="activeName === 'first'">
<d2-search <d2-search
ref="showSearch" ref="showSearch"
:search-form="searchForm" :search-form="searchForm"
...@@ -60,6 +65,7 @@ ...@@ -60,6 +65,7 @@
</el-radio-group> </el-radio-group>
</div> </div>
<d2-table <d2-table
class="table-wrap"
ref="analyseTable" ref="analyseTable"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
...@@ -92,7 +98,11 @@ ...@@ -92,7 +98,11 @@
<template slot="hitText" slot-scope="scope"> <template slot="hitText" slot-scope="scope">
<div v-if="!scope.scope.score">--</div> <div v-if="!scope.scope.score">--</div>
<template v-else> <template v-else>
<el-tooltip v-if="scope.scope.hitText" effect="light" placement="top"> <el-tooltip
v-if="scope.scope.hitText"
effect="light"
placement="top"
>
<div slot="content" v-html="scope.scope.hitText"></div> <div slot="content" v-html="scope.scope.hitText"></div>
<div class="two-line" v-html="scope.scope.hitText"></div> <div class="two-line" v-html="scope.scope.hitText"></div>
...@@ -106,6 +116,10 @@ ...@@ -106,6 +116,10 @@
</div> </div>
</template> </template>
</d2-table> </d2-table>
</template>
<template v-else>
<attack-detail :detailObj="detailObj" />
</template>
</div> </div>
</template> </template>
<script> <script>
...@@ -113,9 +127,11 @@ import ElInputRange from "../el-input-range" ...@@ -113,9 +127,11 @@ import ElInputRange from "../el-input-range"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { conversationCheckList, getPointCategory } from "@api/resident" import { conversationCheckList, getPointCategory } from "@api/resident"
import noDataImg from "@/assets/empty-2.png" import noDataImg from "@/assets/empty-2.png"
import AttackDetail from "./attackDetail"
export default { export default {
components: { components: {
ElInputRange ElInputRange,
AttackDetail
}, },
props: { props: {
detailObj: { detailObj: {
...@@ -125,6 +141,7 @@ export default { ...@@ -125,6 +141,7 @@ export default {
}, },
data() { data() {
return { return {
activeName: "first",
noDataImg, noDataImg,
analyseList: [], analyseList: [],
spanArr1: [], spanArr1: [],
...@@ -239,7 +256,7 @@ export default { ...@@ -239,7 +256,7 @@ export default {
} }
}, },
formatSrt(str) { formatSrt(str) {
return str?.replace(/\n/g, "<br/>") || '' return str?.replace(/\n/g, "<br/>") || ""
}, },
getPointCategory() { getPointCategory() {
this.classifyMap = new Map() this.classifyMap = new Map()
...@@ -381,6 +398,10 @@ export default { ...@@ -381,6 +398,10 @@ export default {
font-weight: 600; font-weight: 600;
} }
} }
.table-wrap{
height:calc(100% - 150px);
// overflow-y: auto;
}
.up-btns { .up-btns {
padding: 0; padding: 0;
width: fit-content; width: fit-content;
......
...@@ -147,7 +147,7 @@ export default { ...@@ -147,7 +147,7 @@ export default {
} }
}, },
{ {
label: "话术评分", label: "质检得分",
formatter(row) { formatter(row) {
if (row.bussinessType == 2) return "-" if (row.bussinessType == 2) return "-"
return row.score != null return row.score != null
...@@ -156,11 +156,15 @@ export default { ...@@ -156,11 +156,15 @@ export default {
} }
}, },
{ {
label: "接待时长", label: "攻防得分",
formatter(row) { formatter(row) {
return `<div class="num">${ return row.defence === 2
row.duration ? toMinutesAndSeconds(row.duration) : "-" ? `<div class="num">${row.defencePoint}<span class="unit">分</span></div>`
}</div>` : row.defence === 1||row.defence === 0||row.defence === 4
? `<span style="font-size:22px;color:#999">分析中</span>`
: row.defence === 3
? `<span style="font-size:22px;color:#999">未发现攻防</span>`
: `<span style="font-size:22px;color:#999">-</span>`
} }
} }
], ],
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
return { return {
showFormData: [ showFormData: [
{ {
label: "质检日期", label: "接待日期",
name: "searchdate", name: "searchdate",
type: "datePicker", type: "datePicker",
isClear: false, isClear: false,
...@@ -243,7 +243,7 @@ export default { ...@@ -243,7 +243,7 @@ export default {
searchForm: { searchForm: {
searchdate: [new Date(), new Date()], searchdate: [new Date(), new Date()],
// serviceMerchantNo: "", // serviceMerchantNo: "",
BussinessType: "", BussinessType: 1,
employeeName: "", employeeName: "",
phoneNumber: "", phoneNumber: "",
// toStoreCount: [], // toStoreCount: [],
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
width: "50px" width: "50px"
}, },
{ {
label: "质检日期", label: "接待日期",
prop: "searchdate", prop: "searchdate",
width: "120px" width: "120px"
}, },
...@@ -306,11 +306,11 @@ export default { ...@@ -306,11 +306,11 @@ export default {
width: "180px", width: "180px",
prop: "serviceMerchantNo" prop: "serviceMerchantNo"
}, },
{ // {
label: "工牌编号", // label: "工牌编号",
prop: "badgeId", // prop: "badgeId",
width: "140px" // width: "140px"
}, // },
{ {
label: "接待时长", label: "接待时长",
prop: "seconds", prop: "seconds",
...@@ -416,13 +416,13 @@ export default { ...@@ -416,13 +416,13 @@ export default {
} }
}, },
{ {
label: "话术质检评分/分", label: "质检评分/分",
prop: "score", prop: "score",
addHtml: "scoreHtml", addHtml: "scoreHtml",
width: "170px", width: "170px",
renderHeader: (createElement) => { renderHeader: (createElement) => {
return createElement("div", { style: "margin-left:-10px" }, [ return createElement("div", { style: "margin-left:-10px" }, [
"话术质检评分/分", "质检评分/分",
createElement( createElement(
"el-tooltip", "el-tooltip",
{ {
...@@ -461,10 +461,6 @@ export default { ...@@ -461,10 +461,6 @@ export default {
storeIdList: [], storeIdList: [],
sceneTypeList: [ sceneTypeList: [
{ {
id: "",
name: "全部"
},
{
id: 1, id: 1,
name: "延保" name: "延保"
}, },
...@@ -489,6 +485,7 @@ export default { ...@@ -489,6 +485,7 @@ export default {
this.getTableList() this.getTableList()
}, },
mounted() { mounted() {
this.getOptionsList()
this.getServiceStore() this.getServiceStore()
this.getSaasList() this.getSaasList()
}, },
...@@ -499,7 +496,7 @@ export default { ...@@ -499,7 +496,7 @@ export default {
currentPage: 1 currentPage: 1
}).then((res) => { }).then((res) => {
this.baseData.parkServiceList = res.list this.baseData.parkServiceList = res.list
this.getOptionsList() this.getOptionsList(true,'parkServiceList')
}) })
}, },
getServiceStore(merchantId) { getServiceStore(merchantId) {
...@@ -507,7 +504,7 @@ export default { ...@@ -507,7 +504,7 @@ export default {
yqMerchantId: merchantId yqMerchantId: merchantId
}).then((res) => { }).then((res) => {
this.baseData.storeIdList = res || [] this.baseData.storeIdList = res || []
this.getOptionsList() this.getOptionsList(true,'storeIdList')
}) })
}, },
recepDetail(row) { recepDetail(row) {
...@@ -582,9 +579,10 @@ export default { ...@@ -582,9 +579,10 @@ export default {
resolve() resolve()
}) })
}, },
getOptionsList() { getOptionsList(isAll,optionsName) {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if (isAll&&item.optionsName==optionsName) {
if ( if (
this.baseData[item.optionsName]?.length && this.baseData[item.optionsName]?.length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
...@@ -596,6 +594,8 @@ export default { ...@@ -596,6 +594,8 @@ export default {
temp[this.showFormData[index].optionLabel] = "全部" temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp) this.baseData[item.optionsName].unshift(temp)
} }
}
this.$set( this.$set(
this.showFormData[index], this.showFormData[index],
"optionList", "optionList",
...@@ -603,7 +603,7 @@ export default { ...@@ -603,7 +603,7 @@ export default {
) )
} }
}) })
console.log(this.showFormData, "this.showFormData")
}, },
handleSearch() { handleSearch() {
if ( if (
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>{{ queryData.employeeName || '-' }} {{queryData.phoneNumber || ''}}</span> <span
>{{ queryData.employeeName || "-" }}
{{ queryData.phoneNumber || "" }}</span
>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
...@@ -25,7 +28,7 @@ ...@@ -25,7 +28,7 @@
</template> </template>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>质检日期:</label> <label>接待日期:</label>
<span>{{ queryData.searchdate }}</span> <span>{{ queryData.searchdate }}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
...@@ -64,17 +67,10 @@ ...@@ -64,17 +67,10 @@
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button <el-button @click="handleSearch" size="small" type="primary">
@click="handleSearch"
size="small"
type="primary"
>
查询 查询
</el-button> </el-button>
<el-button <el-button size="small" @click="handleReset"> 重置 </el-button>
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
<div class="content-table"> <div class="content-table">
<d2-table <d2-table
...@@ -86,19 +82,13 @@ ...@@ -86,19 +82,13 @@
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
> >
<div <div slot="durationHtml" slot-scope="scope">
slot="durationHtml"
slot-scope="scope"
>
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div <div slot="scoreHtml" slot-scope="scope">
slot="scoreHtml"
slot-scope="scope"
>
<template v-if="scope.scope.bussinessType != 2"> <template v-if="scope.scope.bussinessType != 2">
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
...@@ -119,14 +109,42 @@ ...@@ -119,14 +109,42 @@
</div> </div>
<div v-else></div> <div v-else></div>
</div> </div>
<div slot="defencePoint" slot-scope="scope">
<template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template>
<template <template
slot="auth-button" v-else-if="
slot-scope="scope" scope.scope.defence === 1 ||
scope.scope.defence === 0 ||
scope.scope.defence === 4
"
>分析中</template
> >
<el-button <template v-else-if="scope.scope.defence === 3"
type="text" >未发现攻防</template
@click="qualitDetail(scope.scope)"
> >
<template v-else>-</template>
</div>
<div slot="customerTypeName" slot-scope="scope">
<template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName
? scope.scope.customerTypeName
: "-"
}}</template>
<template
v-else-if="
scope.scope.defence === 1 ||
scope.scope.defence === 0 ||
scope.scope.defence === 4
"
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template>
</div>
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="qualitDetail(scope.scope)">
接待详情 接待详情
</el-button> </el-button>
</template> </template>
...@@ -152,7 +170,7 @@ export default { ...@@ -152,7 +170,7 @@ export default {
props: { props: {
queryData: Object queryData: Object
}, },
data () { data() {
return { return {
isQualityVisible: false, isQualityVisible: false,
searchForm: { searchForm: {
...@@ -205,14 +223,14 @@ export default { ...@@ -205,14 +223,14 @@ export default {
{ {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter (row) { formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType] let result = { 1: "延保", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter (row) { formatter(row) {
let result = { let result = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
...@@ -226,11 +244,21 @@ export default { ...@@ -226,11 +244,21 @@ export default {
addHtml: "estimatedResult" addHtml: "estimatedResult"
}, },
{ {
label: "话术质检评分/分", label: "质检评分/分",
prop: "score", prop: "score",
addHtml: "scoreHtml" addHtml: "scoreHtml"
}, },
{ {
label: "攻防得分/分",
prop: "defencePoint",
addHtml: "defencePoint"
},
{
label: "客户类型识别",
prop: "customerTypeName",
addHtml: "customerTypeName"
},
{
label: "接待时长", label: "接待时长",
prop: "duration", prop: "duration",
addHtml: "durationHtml" addHtml: "durationHtml"
...@@ -270,7 +298,7 @@ export default { ...@@ -270,7 +298,7 @@ export default {
ElInputRange, ElInputRange,
QualityDetail QualityDetail
}, },
mounted () { mounted() {
this.getOptionsList() this.getOptionsList()
let timer = setInterval(() => { let timer = setInterval(() => {
if (timer && this.batchNum != null) { if (timer && this.batchNum != null) {
...@@ -282,7 +310,7 @@ export default { ...@@ -282,7 +310,7 @@ export default {
}, 1e3) }, 1e3)
}, },
methods: { methods: {
toMinutesAndSeconds (seconds) { toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = "" let formattedTime = ""
if (seconds < 60) { if (seconds < 60) {
...@@ -303,10 +331,10 @@ export default { ...@@ -303,10 +331,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch () { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -314,17 +342,17 @@ export default { ...@@ -314,17 +342,17 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
closeDialog () { closeDialog() {
this.isQualityVisible = false this.isQualityVisible = false
}, },
qualitDetail (row) { qualitDetail(row) {
const list = this.$refs.recepDetail.data, const list = this.$refs.recepDetail.data,
currentNum = list.findIndex((e) => e.id == row.id) currentNum = list.findIndex((e) => e.id == row.id)
this.currentNum = currentNum this.currentNum = currentNum
this.qualityDetailList = list this.qualityDetailList = list
this.isQualityVisible = true this.isQualityVisible = true
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
const { queryData } = this const { queryData } = this
if (!this.searchForm.recepTime.length) if (!this.searchForm.recepTime.length)
...@@ -367,13 +395,13 @@ export default { ...@@ -367,13 +395,13 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun (data) { setTableFinishFun(data) {
let { page } = this.$refs.recepDetail let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1) data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
} }
}, },
getOptionsList () { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -395,14 +423,14 @@ export default { ...@@ -395,14 +423,14 @@ export default {
} }
}) })
}, },
setTagColor (estimatedResult) { setTagColor(estimatedResult) {
switch (estimatedResult) { switch (estimatedResult) {
case '成交': case "成交":
return 'greenBg' return "greenBg"
case '战败': case "战败":
return 'redBg' return "redBg"
default: default:
return 'grayBg' return "grayBg"
} }
} }
} }
......
...@@ -1399,7 +1399,7 @@ export default { ...@@ -1399,7 +1399,7 @@ export default {
merchantSideobj merchantSideobj
] ]
} }
return [platformSideobj, ...this.serviceSelectList, merchantSideobj] return info.realityShopMerchantId ? [platformSideobj, ...this.serviceSelectList, merchantSideobj] : [platformSideobj, ...this.serviceSelectList]
} }
}, },
tableClassificationObjSelect() { tableClassificationObjSelect() {
...@@ -1929,6 +1929,26 @@ export default { ...@@ -1929,6 +1929,26 @@ export default {
} }
this.forceUpdate() this.forceUpdate()
}, },
checkSelectEmpty() {
this.classificationObj?.serviceProvider?.forEach((val, index) => {
if (!this.serviceMerchantList.find(el => el.merchantId == val.targetMerchant?.merchantId)) {
this.$set(this.classificationObj?.serviceProvider[index], 'targetMerchant', {})
this.$set(this.classificationObj?.serviceProvider[index], 'targetMerchantId', '')
this.$set(this.classificationObj?.serviceProvider[index], 'targetMerchantName', '')
val?.children?.forEach((item, idx) => {
if (!this.serviceMerchantList.find(el => el.merchantId == item.targetMerchant?.merchantId)) {
this.$set(this.classificationObj?.serviceProvider[index].children[idx], 'targetMerchant', {})
this.$set(this.classificationObj?.serviceProvider[index].children[idx], 'targetMerchantId', '')
this.$set(this.classificationObj?.serviceProvider[index].children[idx], 'targetMerchantName', '')
}
})
}
})
this.handleSelectChange()
this.$nextTick(() => {
this.$refs['tableAccount']?.$refs['divisionRuleRef'].clearValidate()
})
},
initList() { initList() {
this.classificationObj.groupType = this.tabindex ? 1 : 2 this.classificationObj.groupType = this.tabindex ? 1 : 2
// this.goodsTypeGroupRules // this.goodsTypeGroupRules
......
...@@ -453,15 +453,20 @@ export default { ...@@ -453,15 +453,20 @@ export default {
mounted() { mounted() {
this.initFinancialObj() // 先默认初始化平台方和流量方 this.initFinancialObj() // 先默认初始化平台方和流量方
this.initDjzhySubMerchant() // 初始化嘀加智慧云子商户 this.initDjzhySubMerchant() // 初始化嘀加智慧云子商户
this.getFinancialObj() // this.getFinancialObj()
this.init4sServiceList() // this.init4sServiceList()
this.initFeeCategoryByType() this.initFeeCategoryByType()
this.getGoodsCategoryConfiguration() this.getGoodsCategoryConfiguration()
this.getLedgerHistoryRecordApi() this.getLedgerHistoryRecordApi()
const { merchantId } = this.routerInfo const { merchantId, scene } = this.routerInfo
// yqMerchant && this.getMerchantLevel(yqMerchant.merchantId, 'PlatformLevelList') // yqMerchant && this.getMerchantLevel(yqMerchant.merchantId, 'PlatformLevelList')
this.initPlatformLevelList() this.initPlatformLevelList()
merchantId && this.getMerchantLevel(merchantId, "merchantLevelList") let eventArr = [this.init4sServiceList(), this.getFinancialObj()]
if (merchantId) eventArr.push(this.getMerchantLevel(merchantId, "merchantLevelList", scene))
// merchantId && this.getMerchantLevel(merchantId, "merchantLevelList", scene)
Promise.all(eventArr).then(() => {
this.checkSelectEmpty()
})
}, },
methods: { methods: {
...mapActions("FinancialRules", ["reset"]), ...mapActions("FinancialRules", ["reset"]),
...@@ -594,15 +599,21 @@ export default { ...@@ -594,15 +599,21 @@ export default {
}) })
}, },
init4sServiceList() { init4sServiceList() {
return new Promise((resolve) => {
const { scene, merchantId } = this.routerInfo const { scene, merchantId } = this.routerInfo
scenemerchantrefQueryServiceRefByShop({ scene, merchantId }).then( scenemerchantrefQueryServiceRefByShop({ scene, merchantId }).then(
(res) => { (res) => {
// console.log(res) // console.log(res)
this.serviceMerchantList = res this.serviceMerchantList = res
resolve()
} }
) ).catch((err) => {
resolve()
})
})
}, },
getFinancialObj() { getFinancialObj() {
return new Promise((resolve) => {
const { merchantId, scene: sceneType } = this.routerInfo const { merchantId, scene: sceneType } = this.routerInfo
merchantSettleDistributeRuleLastRule({ merchantSettleDistributeRuleLastRule({
merchantId, merchantId,
...@@ -693,8 +704,11 @@ export default { ...@@ -693,8 +704,11 @@ export default {
// 获取商品 // 获取商品
this.getSelectingList(upgradeArr) this.getSelectingList(upgradeArr)
this.getSelectingListPackage(packageArr) this.getSelectingListPackage(packageArr)
this.initSettleTimeObj() this.initSettleTimeObj()
resolve()
}).catch(() => {
resolve()
})
}) })
}, },
initBaseData() { initBaseData() {
...@@ -1306,12 +1320,25 @@ export default { ...@@ -1306,12 +1320,25 @@ export default {
] ]
}) })
}, },
getMerchantLevel(id, name) { // 校验下拉框选项值是否存在
checkSelectEmpty() {
// 流量方分账方
if (!this.baseData.merchantLevelList.find((item) => item.merchantId == this.financialObj.realityShopMerchantId)) {
this.financialObj.realityShopMerchantId = ''
}
// 服务商分润对象
this.editableTabs.forEach((val, index) => {
this.$refs[`classification${this.editableTabs[index].name}`][0].checkSelectEmpty()
})
},
getMerchantLevel(id, name, scene) {
// console.log(this.merchantInfo) // console.log(this.merchantInfo)
// getPlatformMerchantList().then(res => { // getPlatformMerchantList().then(res => {
return new Promise((resolve, reject) => {
getMerchantLevelApi({ getMerchantLevelApi({
merchantId: id, merchantId: id,
channelType: 1 channelType: 1,
scene
}).then((res) => { }).then((res) => {
// console.log('res', res) // console.log('res', res)
// 取消渠道判断 // 取消渠道判断
...@@ -1345,6 +1372,21 @@ export default { ...@@ -1345,6 +1372,21 @@ export default {
}) })
}) })
// 追加一级流量方和流量通道方
if (res.firstFlowMerchantId) {
this.baseData[name].push({
merchantId: res.firstFlowMerchantId,
showMerchantName: res.firstFlowMerchantName,
merchantName: res.firstFlowMerchantName
})
}
if (res.flowChannelMerchantId) {
this.baseData[name].push({
merchantId: res.flowChannelMerchantId,
showMerchantName: res.flowChannelMerchantName,
merchantName: res.flowChannelMerchantName
})
}
// 没有追加默认导流方 // 没有追加默认导流方
if (this.baseData[name].length == 0 && name == "merchantLevelList") { if (this.baseData[name].length == 0 && name == "merchantLevelList") {
const { merchantId, merchantName, userType = 4 } = this.routerInfo const { merchantId, merchantName, userType = 4 } = this.routerInfo
...@@ -1355,7 +1397,19 @@ export default { ...@@ -1355,7 +1397,19 @@ export default {
userType userType
}) })
} }
// 将数据去重 (商户上架时一级流量方和流量通道方设置同一家门店)
this.baseData[name] = this.uniqueMerchant(this.baseData[name])
resolve()
}).catch(() => {
resolve()
}) })
})
},
uniqueMerchant(arr) {
const res = new Map()
return arr.filter(
(a) => !res.has(a.merchantId) && res.set(a.merchantId, 1)
)
}, },
/* 函数定义 */ /* 函数定义 */
/* 活动标签切换时触发 */ /* 活动标签切换时触发 */
......
...@@ -14,50 +14,30 @@ ...@@ -14,50 +14,30 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<!-- <span slot="left">园区店导流方关联列表</span> --> <!-- <span slot="left">园区店导流方关联列表</span> -->
<auth-button category="Button" /> <!-- <auth-button category="Button" /> -->
<auth-button category="Button" :show-btn-ids="['90603014', '90603016']"/>
</d2-table-header> </d2-table-header>
<!-- :get-list-api="getListApi" --> <!-- :get-list-api="getListApi" -->
<d2-table ref="merchantTable" :table-data="restructureList" :search-form="searchForm" :table-params="tableParams" <d2-table ref="merchantTable" :table-data="restructureList" :search-form="searchForm" :table-params="tableParams"
:has-num="false" :table-total="total" :array-span-method="arraySpanMethod" @refreshTable="jumpPage"> :has-num="false" :table-total="total" :array-span-method="arraySpanMethod" @refreshTable="jumpPage">
<el-button type="text" /> <el-button type="text" />
<div slot="auth-button" slot-scope="scope" v-if="!filterEmpty(scope.scope.scene)" class="btnClass"> <div slot="auth-button" slot-scope="scope" v-if="!filterEmpty(scope.scope.scene)" class="btnClass">
<!-- <auth-button slot="auth-button" <!-- 编辑 -->
:data="scope.scope" /> --> <auth-button slot="auth-button" :show-btn-ids="['90603017']" :data="scope.scope" />
<!-- 查看详情 -->
<auth-button slot="auth-button" :show-btn-ids="['9060303']" :data="scope.scope" />
<!-- 财务 --> <!-- 财务 -->
<auth-button slot="auth-button" :show-btn-ids="['9060301']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['9060301']" :data="scope.scope" />
<!-- 品牌设置 -->
<!-- <auth-button slot="auth-button"
:show-btn-ids="['9060306']"
:data="scope.scope" /> -->
<!-- 历史记录 -->
<auth-button slot="auth-button" :show-btn-ids="['9060304']" :data="scope.scope" />
<!-- 对账 --> <!-- 对账 -->
<auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" />
<!-- 质保卡配置 --> <!-- 查看详情 -->
<!-- <auth-button slot="auth-button" <auth-button slot="auth-button" :show-btn-ids="['9060303']" :data="scope.scope" />
v-if="scope.scope.scene != 3" <!-- 历史记录 -->
:show-btn-ids="['9060309']" <auth-button slot="auth-button" :show-btn-ids="['9060304']" :data="scope.scope" />
:data="scope.scope" /> -->
<!-- 下级商户配置 -->
<!-- <span v-if="scope.scope.scene == 1">
<auth-button slot="auth-button"
:show-btn-ids="['90603010']"
:data="scope.scope" />
</span> -->
<!-- 对账 -->
<!-- <auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" /> -->
<!-- 配置 -->
<!-- <auth-button slot="auth-button"
:show-btn-ids="['90603012']"
:data="scope.scope" /> -->
<!-- 删除 --> <!-- 删除 -->
<auth-button slot="auth-button" :show-btn-ids="['9060305']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['9060305']" :data="scope.scope" />
</div> </div>
<span slot="newOperate" slot-scope="scope"> <!-- <span slot="newOperate" slot-scope="scope">
<auth-button slot="auth-button" :show-btn-ids="['90603011']" :data="scope.scope" /> <auth-button slot="auth-button" :show-btn-ids="['90603011']" :data="scope.scope" />
</span> </span> -->
</d2-table> </d2-table>
</div> </div>
<relate-store-mer-dialog v-if="relateStoreVisible" ref="relateStore" :relate-store-visible="relateStoreVisible" <relate-store-mer-dialog v-if="relateStoreVisible" ref="relateStore" :relate-store-visible="relateStoreVisible"
...@@ -188,7 +168,7 @@ import { ...@@ -188,7 +168,7 @@ import {
configureCar, configureCar,
deleteShopRef deleteShopRef
} from "@api/merchant" } from "@api/merchant"
import { mapActions } from "vuex" import { mapActions, mapState } from "vuex"
import { getParkStore } from "@api/editCustomer" import { getParkStore } from "@api/editCustomer"
import { import {
BaseData, BaseData,
...@@ -237,7 +217,9 @@ export default { ...@@ -237,7 +217,9 @@ export default {
merchantType: "", merchantType: "",
channelType: "", channelType: "",
keyWord: "", keyWord: "",
merchantId: "" divisionType: "",
merchantId: "",
scene: ""
}, },
page: { page: {
pageSize: 10, pageSize: 10,
...@@ -246,51 +228,43 @@ export default { ...@@ -246,51 +228,43 @@ export default {
total: 0, total: 0,
showFormData: [ showFormData: [
{ {
label: "渠道",
name: "channelType",
type: "select",
optionList: [],
optionId: "value",
optionLabel: "name",
optionsName: "channelTypeList"
},
{
label: "商户分类",
name: "merchantType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "merchantClassifyList"
},
{
label: "商户名称", label: "商户名称",
name: "keyWord", name: "keyWord",
type: "input", type: "input",
placeholder: "请输入园区店/导流方/服务商商户名称", placeholder: "请输入园区店/流量方/服务商商户名称",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, },
{ {
label: "分账类型",
name: "divisionType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "autoFlagList"
},
{
label: "商户号", label: "商户号",
name: "merchantId", name: "merchantId",
type: "input", type: "input",
inputType: "number", inputType: "number",
placeholder: "请输入园区店/导流方/服务商商户号", placeholder: "请输入园区店/流量方/服务商商户号",
isClear: true, isClear: true,
maxlength: "9" maxlength: "9"
// keyFn: this.keyDowmGetList // keyFn: this.keyDowmGetList
}, { },
label: '场景名', {
label: "渠道",
name: "channelType",
type: "select",
optionList: [],
optionId: "value",
optionLabel: "name",
optionsName: "channelTypeList"
},
// {
// label: "商户分类",
// name: "merchantType",
// type: "select",
// optionList: [],
// optionId: "confId",
// optionLabel: "confLabel",
// optionsName: "merchantClassifyList"
// },
{
label: '业务类型',
name: 'scene', name: 'scene',
type: 'select', type: 'select',
isClear: true, isClear: true,
...@@ -298,6 +272,15 @@ export default { ...@@ -298,6 +272,15 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'sceneTypeList' optionsName: 'sceneTypeList'
},
{
label: "分账类型",
name: "divisionType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "autoFlagList"
} }
], ],
getListApi: getList, getListApi: getList,
...@@ -353,7 +336,7 @@ export default { ...@@ -353,7 +336,7 @@ export default {
} }
}, },
{ {
label: "业务场景", label: "业务类型",
prop: "scene", prop: "scene",
formatter: (cellValue) => { formatter: (cellValue) => {
if (this.filterEmpty(cellValue.scene)) return '' if (this.filterEmpty(cellValue.scene)) return ''
...@@ -395,7 +378,7 @@ export default { ...@@ -395,7 +378,7 @@ export default {
if (cellValue.serviceList) { if (cellValue.serviceList) {
return cellValue.serviceList.reduce( return cellValue.serviceList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + `<p>${item.merchantName}</p>` merchString = merchString + `<p>${item?.merchantName}</p>`
return merchString return merchString
// return item.merchantName // return item.merchantName
}, },
...@@ -416,7 +399,7 @@ export default { ...@@ -416,7 +399,7 @@ export default {
if (cellValue.serviceList) { if (cellValue.serviceList) {
return cellValue.serviceList.reduce( return cellValue.serviceList.reduce(
(merchString, item) => { (merchString, item) => {
merchString = merchString + `<p>${item.merchantId}</p>` merchString = merchString + `<p>${item?.merchantId}</p>`
return merchString return merchString
// return item.merchantName // return item.merchantName
}, },
...@@ -554,6 +537,11 @@ export default { ...@@ -554,6 +537,11 @@ export default {
qRcodeVisible: false qRcodeVisible: false
} }
}, },
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.tree.filter(val) this.$refs.tree.filter(val)
...@@ -591,6 +579,7 @@ export default { ...@@ -591,6 +579,7 @@ export default {
methods: { methods: {
...mapActions("d2admin/base", ["get"]), ...mapActions("d2admin/base", ["get"]),
...mapActions({ close: "d2admin/page/close" }), ...mapActions({ close: "d2admin/page/close" }),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() { async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType) this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList() this.getOptionsList()
...@@ -682,9 +671,14 @@ export default { ...@@ -682,9 +671,14 @@ export default {
merchantType: "", merchantType: "",
channelType: "", channelType: "",
keyWord: "", keyWord: "",
merchantId: "" divisionType: "",
merchantId: "",
scene: ""
} }
this.getOptionsList() this.getOptionsList()
// 重置分页
this.page.currentPage = 1
this.queryList()
}, },
getOptionsList() { getOptionsList() {
...@@ -786,6 +780,40 @@ export default { ...@@ -786,6 +780,40 @@ export default {
handleSearchStore() { handleSearchStore() {
this.$refs.relateStore.handleCurrentChange(1) this.$refs.relateStore.handleCurrentChange(1)
}, },
// 商户上架
handleMerchantGrounding() {
this.$router.push({
name: 'merchantGrounding',
query: {
addOrEdit: 'add'
}
})
},
// 导出
handleExport() {
var params = this.searchForm
params.method = 'dj.api.servicemerchantref.exportMerchantRef.Async'
const list = [
...this.dowloadList,
{
name: '商户管理列表',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 编辑
handleEditMerchantGrounding(row) {
this.$router.push({
name: 'merchantGrounding',
query: {
addOrEdit: 'edit',
params: JSON.stringify(row)
}
})
},
// 查看详情 // 查看详情
handleViewClose() { handleViewClose() {
this.viewDetailVisible = !this.viewDetailVisible this.viewDetailVisible = !this.viewDetailVisible
......
...@@ -841,9 +841,9 @@ export default { ...@@ -841,9 +841,9 @@ export default {
this.getRowItem() this.getRowItem()
}, },
mounted() { mounted() {
this.getListPartnerMerchant() // this.getListPartnerMerchant()
this.getMerchantLevelList() // this.getMerchantLevelList()
this.getListPlatformMerchant() // this.getListPlatformMerchant()
// setTimeout(() => { // setTimeout(() => {
// this.getEffectRule() // this.getEffectRule()
// }, 1000) // }, 1000)
...@@ -1045,6 +1045,7 @@ export default { ...@@ -1045,6 +1045,7 @@ export default {
}, },
// 查询服务商列表 // 查询服务商列表
async getListPartnerMerchant() { async getListPartnerMerchant() {
return new Promise(async resolve => {
const that = this const that = this
const localRes = localStorage.getItem("getListPartnerMerchant") const localRes = localStorage.getItem("getListPartnerMerchant")
if (localRes) { if (localRes) {
...@@ -1073,10 +1074,13 @@ export default { ...@@ -1073,10 +1074,13 @@ export default {
}) })
}) })
that.serveList = listArr that.serveList = listArr
resolve()
} }
})
}, },
// 查询4s店及上级列表 参数 channelType=1(流量方对象) // 查询4s店及上级列表 参数 channelType=1(流量方对象)
async getMerchantLevelList() { async getMerchantLevelList() {
return new Promise(async (resolve, reject) => {
const that = this const that = this
const localRes = localStorage.getItem("getMerchantLevelList") const localRes = localStorage.getItem("getMerchantLevelList")
if (localRes) { if (localRes) {
...@@ -1085,7 +1089,8 @@ export default { ...@@ -1085,7 +1089,8 @@ export default {
} else { } else {
const params = { const params = {
merchantId: this.merchantRow.merchantId, merchantId: this.merchantRow.merchantId,
channelType: 1 channelType: 1,
scene: this.merchantRow.scene
} }
const res = await getMerchantLevelListApi(params) const res = await getMerchantLevelListApi(params)
if (res) { if (res) {
...@@ -1093,7 +1098,6 @@ export default { ...@@ -1093,7 +1098,6 @@ export default {
getData(res) getData(res)
} }
} }
// 赋值 // 赋值
function getData(res) { function getData(res) {
let listArr = [] let listArr = []
...@@ -1104,10 +1108,13 @@ export default { ...@@ -1104,10 +1108,13 @@ export default {
}) })
}) })
that.flowList = listArr that.flowList = listArr
resolve()
} }
})
}, },
// 查询平台方列表 // 查询平台方列表
async getListPlatformMerchant() { async getListPlatformMerchant() {
return new Promise(async (resolve, reject) => {
const that = this const that = this
const localRes = localStorage.getItem("getListPlatformMerchant") const localRes = localStorage.getItem("getListPlatformMerchant")
if (localRes) { if (localRes) {
...@@ -1135,7 +1142,9 @@ export default { ...@@ -1135,7 +1142,9 @@ export default {
}) })
}) })
that.platformList = listArr that.platformList = listArr
resolve()
} }
})
}, },
// 计算模式修改 // 计算模式修改
updateCalculateModeType(event, name, index) { updateCalculateModeType(event, name, index) {
...@@ -1313,8 +1322,21 @@ export default { ...@@ -1313,8 +1322,21 @@ export default {
}, },
// 获取详情中的数据 赋值改成页面中的结构(1流量方,2服务商) // 获取详情中的数据 赋值改成页面中的结构(1流量方,2服务商)
// originArr初始化生成的数据, 详情中的数据detailArr // originArr初始化生成的数据, 详情中的数据detailArr
getClassificationObjFormat(originArr, detailArr) { getClassificationObjFormat(originArr, detailArr, key) {
console.log('originArr, detailArr: ', originArr, detailArr) console.log('originArr, detailArr: ', originArr, detailArr)
let selectMerchantArr = []
switch (key) {
case 'flowCost':
selectMerchantArr = this.flowList
break
case 'platformCost':
selectMerchantArr = this.platformList
break
case 'serviceCost':
selectMerchantArr = this.serveList
break
}
console.log(selectMerchantArr, key, this.platformList)
if (originArr.length === 0 || detailArr.length === 0) return [] if (originArr.length === 0 || detailArr.length === 0) return []
const updateItem = (item, innerItem) => { const updateItem = (item, innerItem) => {
item.targetType = innerItem.targetType item.targetType = innerItem.targetType
...@@ -1322,12 +1344,12 @@ export default { ...@@ -1322,12 +1344,12 @@ export default {
item.expenseCategoryName = item?.expenseCategoryName || innerItem.expenseCategoryName item.expenseCategoryName = item?.expenseCategoryName || innerItem.expenseCategoryName
item.expenseCategoryCalculateType = innerItem.expenseCategoryCalculateType item.expenseCategoryCalculateType = innerItem.expenseCategoryCalculateType
item.expenseCategoryValue = innerItem.expenseCategoryValue item.expenseCategoryValue = innerItem.expenseCategoryValue
item.targetMerchantName = innerItem.targetMerchantName item.targetMerchantName = selectMerchantArr.findIndex(val => val.merchantId == innerItem.targetMerchantId) > -1 ? innerItem.targetMerchantName : ''
item.targetMerchantId = innerItem.targetMerchantId item.targetMerchantId = selectMerchantArr.findIndex(val => val.merchantId == innerItem.targetMerchantId) > -1 ? innerItem.targetMerchantId : ''
item.merchant = { item.merchant = selectMerchantArr.findIndex(val => val.merchantId == innerItem.targetMerchantId) > -1 ? {
merchantName: innerItem.targetMerchantName, merchantName: innerItem.targetMerchantName,
merchantId: innerItem.targetMerchantId merchantId: innerItem.targetMerchantId
} } : {}
item.calculateMode = innerItem.calculateMode || 1 item.calculateMode = innerItem.calculateMode || 1
} }
const updateChildren = (val, innerItem, item) => { const updateChildren = (val, innerItem, item) => {
...@@ -1336,12 +1358,12 @@ export default { ...@@ -1336,12 +1358,12 @@ export default {
val.expenseCategoryName = val?.expenseCategoryName || innerItem.expenseCategoryName val.expenseCategoryName = val?.expenseCategoryName || innerItem.expenseCategoryName
val.expenseCategoryCalculateType = val.nodeType == 4 || innerItem.expenseCategoryCalculateType == 7 ? '' : innerItem.expenseCategoryCalculateType val.expenseCategoryCalculateType = val.nodeType == 4 || innerItem.expenseCategoryCalculateType == 7 ? '' : innerItem.expenseCategoryCalculateType
val.expenseCategoryValue = val.nodeType == 4 || innerItem.expenseCategoryCalculateType == 7 ? '' : innerItem.expenseCategoryValue val.expenseCategoryValue = val.nodeType == 4 || innerItem.expenseCategoryCalculateType == 7 ? '' : innerItem.expenseCategoryValue
val.targetMerchantName = innerItem.targetMerchantName val.targetMerchantName = selectMerchantArr.findIndex(val => val.merchantId == innerItem.targetMerchantId) > -1 ? innerItem.targetMerchantName : ''
val.targetMerchantId = innerItem.targetMerchantId val.targetMerchantId = selectMerchantArr.findIndex(val => val.merchantId == innerItem.targetMerchantId) > -1 ? innerItem.targetMerchantId : ''
val.merchant = { val.merchant = selectMerchantArr.findIndex(val => val.merchantId == innerItem.targetMerchantId) > -1 ? {
merchantName: innerItem.targetMerchantName, merchantName: innerItem.targetMerchantName,
merchantId: innerItem.targetMerchantId merchantId: innerItem.targetMerchantId
} } : {}
val.calculateMode = item.calculateMode val.calculateMode = item.calculateMode
val.nodeType = val.nodeType val.nodeType = val.nodeType
} }
...@@ -1369,6 +1391,8 @@ export default { ...@@ -1369,6 +1391,8 @@ export default {
}, },
// 对账item的详情 更新和初始化 classificationObj // 对账item的详情 更新和初始化 classificationObj
getEffectRule() { getEffectRule() {
let promiseArr = [this.getListPartnerMerchant(), this.getMerchantLevelList(), this.getListPlatformMerchant()]
Promise.all(promiseArr).then(() => {
const res = deepClone(this.goodsTypeGroupReconciliationRules) const res = deepClone(this.goodsTypeGroupReconciliationRules)
const that = this const that = this
// 赋值 // 赋值
...@@ -1382,20 +1406,24 @@ export default { ...@@ -1382,20 +1406,24 @@ export default {
that.classificationObj.packageGoods = checkRecordItem?.packageGoods that.classificationObj.packageGoods = checkRecordItem?.packageGoods
that.classificationObj.flowCostArr = that.getClassificationObjFormat( that.classificationObj.flowCostArr = that.getClassificationObjFormat(
that.classificationObj.flowCostArr, that.classificationObj.flowCostArr,
checkRecordItem?.expenseCategoryRules || [] checkRecordItem?.expenseCategoryRules || [],
'flowCost'
) )
that.classificationObj.serviceCostArr = that.getClassificationObjFormat( that.classificationObj.serviceCostArr = that.getClassificationObjFormat(
that.classificationObj.serviceCostArr, that.classificationObj.serviceCostArr,
checkRecordItem?.expenseCategoryRules || [] checkRecordItem?.expenseCategoryRules || [],
'serviceCost'
) )
that.classificationObj.goodsSource = checkRecordItem?.goodsSource || 1 that.classificationObj.goodsSource = checkRecordItem?.goodsSource || 1
that.classificationObj.formType = checkRecordItem?.formType that.classificationObj.formType = checkRecordItem?.formType
that.classificationObj.platformCostArr = that.getClassificationObjFormat( that.classificationObj.platformCostArr = that.getClassificationObjFormat(
that.classificationObj.platformCostArr, that.classificationObj.platformCostArr,
checkRecordItem?.expenseCategoryRules || [] checkRecordItem?.expenseCategoryRules || [],
'platformCost'
) )
} }
this.forceUpdate() this.forceUpdate()
})
}, },
// 换成后端数据结构 // 换成后端数据结构
getBackendFormat() { getBackendFormat() {
......
<template>
<div class="text-tooltip">
<el-tooltip class="item" effect="dark" :disabled="isShowTooltip" :content="content" :placement="placement">
<p class="over-flow" :class="className" @mouseover="onMouseOver(refName)">
<span :ref="refName">{{content||'-'}}</span>
</p>
</el-tooltip>
</div>
</template>
<script>
export default {
name: 'textTooltip',
props: {
// 显示的文字内容
content: {
type: String,
default: () => {
return ''
}
},
// 位置
placement: {
type: String,
default: () => {
return 'top'
}
},
// 外层框的样式,在传入的这个类名中设置文字显示的宽度
className: {
type: String,
default: () => {
return 'text-hide'
}
},
// 为页面文字标识(如在同一页面中调用多次组件,此参数不可重复)
refName: {
type: String,
default: () => {
return ''
}
}
},
data() {
return {
isShowTooltip: true
}
},
methods: {
onMouseOver(str) {
let parentWidth = this.$refs[str]?.parentNode?.offsetWidth;
let contentWidth = this.$refs[str]?.offsetWidth;
// 若子集比中间层更宽 开启tooltip功能
if (contentWidth>parentWidth) {
this.isShowTooltip = false;
} else { // 否则 关掉tooltip功能
this.isShowTooltip = true;
}
}
}
}
</script>
<style lang="scss" scoped>
.text-tooltip{
display: flex;
align-items: center;
width: 100%;
}
.over-flow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
p{
margin: 0;
}
.text-hide{
width: 100%;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="merchant-checkdetail"> <div class="merchant-checkdetail">
<div class="title"> <div class="title">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="商户关系" name="third"></el-tab-pane>
<el-tab-pane label="分账规则" name="first"></el-tab-pane> <el-tab-pane label="分账规则" name="first"></el-tab-pane>
<el-tab-pane label="对账规则" name="second"></el-tab-pane> <el-tab-pane label="对账规则" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -12,6 +13,11 @@ ...@@ -12,6 +13,11 @@
<div class="btn" :class="{act:activeType==2}" @click="handleType(2)">特殊品类</div> <div class="btn" :class="{act:activeType==2}" @click="handleType(2)">特殊品类</div>
</div> --> </div> -->
<!-- 商户关系 -->
<template v-if="activeName == 'third'">
<merchantRelationships :form-item="checkDetailItem" />
</template>
<!-- 分账 --> <!-- 分账 -->
<template v-if="activeName == 'first'"> <template v-if="activeName == 'first'">
<ledgerAccount :items="checkDetailItem" /> <ledgerAccount :items="checkDetailItem" />
...@@ -37,16 +43,18 @@ ...@@ -37,16 +43,18 @@
<script> <script>
import ledgerAccount from './components/ledgerAccount.vue' import ledgerAccount from './components/ledgerAccount.vue'
import reconciliation from './components/reconciliation.vue' import reconciliation from './components/reconciliation.vue'
import merchantRelationships from './components/merchantRelationships.vue'
import { import {
getDistributeRuleApi, getDistributeRuleApi,
getEffectRuleApi getEffectRuleApi,
getMerchantRelationDetailApi
} from "@api/merchant" } from "@api/merchant"
export default { export default {
name: "MerchantCheckDetail", name: "MerchantCheckDetail",
props: {}, props: {},
data() { data() {
return { return {
activeName: "first", activeName: "third",
merchantRow: {}, merchantRow: {},
// 分账数据 // 分账数据
checkDetailItem: {}, checkDetailItem: {},
...@@ -59,16 +67,21 @@ export default { ...@@ -59,16 +67,21 @@ export default {
}, },
mounted() { mounted() {
// 分账 // 分账
this.getDistributeRule() // this.getDistributeRule()
// 商户关系
this.getMerchantRelationDetail()
}, },
methods: { methods: {
async init() { async init() {
if (this.activeName == "first") { if (this.activeName == "first") {
// 分账 // 分账
this.getDistributeRule() this.getDistributeRule()
} else { } else if (this.activeName == "second") {
// 对账 // 对账
this.getEffectRule() this.getEffectRule()
} else {
// 商户关系
this.getMerchantRelationDetail()
} }
}, },
// 分账 // 分账
...@@ -94,6 +107,15 @@ export default { ...@@ -94,6 +107,15 @@ export default {
// this.checkRecordList = res?.goodsTypeGroupReconciliationRules // this.checkRecordList = res?.goodsTypeGroupReconciliationRules
// console.log('res: ', res) // console.log('res: ', res)
}, },
// 商户关系
async getMerchantRelationDetail() {
const params = {
merchantId: this.merchantRow.merchantId,
scene: this.merchantRow.scene
}
const res = await getMerchantRelationDetailApi(params)
this.checkDetailItem = res
},
getRowItem() { getRowItem() {
const params = this.$route.query?.params const params = this.$route.query?.params
if (params) { if (params) {
...@@ -121,7 +143,8 @@ export default { ...@@ -121,7 +143,8 @@ export default {
}, },
components: { components: {
ledgerAccount, ledgerAccount,
reconciliation reconciliation,
merchantRelationships
}, },
computed: {} computed: {}
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="merchant-checkrecord"> <div class="merchant-checkrecord">
<div class="title"> <div class="title">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="商户关系" name="third"></el-tab-pane>
<el-tab-pane label="分账规则" name="first"></el-tab-pane> <el-tab-pane label="分账规则" name="first"></el-tab-pane>
<el-tab-pane label="对账规则" name="second"></el-tab-pane> <el-tab-pane label="对账规则" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
<div v-for="(formItem, index) in formArray " :ref="'resize' + index" :key="index"> <div v-for="(formItem, index) in formArray " :ref="'resize' + index" :key="index">
<p class="edit-sub-title" :class="{ 'sub-border': !formItem.show }"> <p class="edit-sub-title" :class="{ 'sub-border': !formItem.show }">
<span class="label"> <span class="label">
<template v-if="activeName != 'third'">
<span v-if="formItem.enableFlag != 2"> <span v-if="formItem.enableFlag != 2">
<span>{{ formItem.formatEffectStartDate }}</span> <span>{{ formItem.formatEffectStartDate }}</span>
<span v-if="formItem.formatEffectStartDate"> - </span> <span v-if="formItem.formatEffectStartDate"> - </span>
...@@ -24,15 +26,21 @@ ...@@ -24,15 +26,21 @@
<span v-if="formItem.enableFlag == 2"> <span v-if="formItem.enableFlag == 2">
<span>{{ formItem.formatEffectStartDate }}</span> <span>{{ formItem.formatEffectStartDate }}</span>
<span> - </span> <span> - </span>
<span :class="{ 'labelColorEff': !formItem.formatEffectEndDate }">{{ "待生效" <span :class="{ 'labelColorEff': !formItem.formatEffectEndDate }">{{ "待生效"}}</span>
}}</span>
</span> </span>
</template>
<!-- 商户关系 -->
<template v-else>
<span>{{ formItem.formatEffectStartDate }}</span>
<span> - </span>
<span :class="{ 'labelColor': !formItem.applyEndTime }">{{ formItem.applyEndTime ? formItem.formatEffectEndDate : "生效中"}}</span>
</template>
</span> </span>
<span class="updatedInfo"> <span class="updatedInfo">
操作人: {{ formItem.updatedBy }} &nbsp; &nbsp; 操作时间: 操作人: {{ formItem.updatedBy }} &nbsp; &nbsp; 操作时间:
{{ formItem.formatUpdatedDate }} {{ formItem.formatUpdatedDate }}
</span> </span>
<span class="updatedInfo"> <span class="updatedInfo" v-if="activeName != 'third'">
<span> <span>
审核人: {{ formItem.auditorName || '-' }} &nbsp; &nbsp; 审核时间: 审核人: {{ formItem.auditorName || '-' }} &nbsp; &nbsp; 审核时间:
{{ formItem.formatAuditDate || '-' }} {{ formItem.formatAuditDate || '-' }}
...@@ -58,6 +66,11 @@ ...@@ -58,6 +66,11 @@
<template v-if="activeName == 'second'"> <template v-if="activeName == 'second'">
<reconciliation :form-item="formItem" :items="formItem.typeList" /> <reconciliation :form-item="formItem" :items="formItem.typeList" />
</template> </template>
<!-- 商户关系 -->
<template v-if="activeName == 'third'">
<merchantRelationships :form-item="formItem" />
</template>
</div> </div>
</el-collapse-transition> </el-collapse-transition>
</div> </div>
...@@ -66,7 +79,8 @@ ...@@ -66,7 +79,8 @@
<div v-else class="nothingtips"> <div v-else class="nothingtips">
<img style="height: 109px; width: 109px" src="../images/empty.png" /> <img style="height: 109px; width: 109px" src="../images/empty.png" />
<p class="title" v-if="activeName == 'first'">暂无财务规则</p> <p class="title" v-if="activeName == 'first'">暂无财务规则</p>
<p class="title" v-else>暂无对账规则</p> <p class="title" v-if="activeName == 'second'">暂无对账规则</p>
<p class="title" v-if="activeName == 'third'">暂无商户关系</p>
<p class="tips">快去设置看看~</p> <p class="tips">快去设置看看~</p>
</div> </div>
...@@ -80,9 +94,11 @@ import dayjs from "dayjs" ...@@ -80,9 +94,11 @@ import dayjs from "dayjs"
import { getHistoryRecord } from "@api/publicAccount" import { getHistoryRecord } from "@api/publicAccount"
import ledgerAccount from "./components/ledgerAccount.vue" import ledgerAccount from "./components/ledgerAccount.vue"
import reconciliation from "./components/reconciliation.vue" import reconciliation from "./components/reconciliation.vue"
import merchantRelationships from "./components/merchantRelationships.vue"
import { import {
getLedgerHistoryRecordApi, getLedgerHistoryRecordApi,
getReconciliationHistoryRecordApi getReconciliationHistoryRecordApi,
getMerchantRelationRecordApi
} from "@api/merchant" } from "@api/merchant"
export default { export default {
name: "MerchantCheckRecord", name: "MerchantCheckRecord",
...@@ -98,7 +114,7 @@ export default { ...@@ -98,7 +114,7 @@ export default {
}, },
data() { data() {
return { return {
activeName: "first", activeName: "third",
activeType: 1, activeType: 1,
merchantRow: {}, merchantRow: {},
formArray: [] formArray: []
...@@ -109,7 +125,7 @@ export default { ...@@ -109,7 +125,7 @@ export default {
}, },
mounted() { mounted() {
// this.getDetail() // this.getDetail()
this.getLedgerHistoryRecord() this.getMerchantRelationRecord()
}, },
methods: { methods: {
getRowItem() { getRowItem() {
...@@ -121,6 +137,7 @@ export default { ...@@ -121,6 +137,7 @@ export default {
}, },
handleClick(tab) { handleClick(tab) {
this.activeName = tab.name this.activeName = tab.name
this.formArray = []
this.init() this.init()
}, },
// handleType(num) { // handleType(num) {
...@@ -139,8 +156,10 @@ export default { ...@@ -139,8 +156,10 @@ export default {
init() { init() {
if (this.activeName == "first") { if (this.activeName == "first") {
this.getLedgerHistoryRecord() this.getLedgerHistoryRecord()
} else { } else if (this.activeName == "second") {
this.getReconciliationHistoryRecord() this.getReconciliationHistoryRecord()
} else {
this.getMerchantRelationRecord()
} }
}, },
// 分账 // 分账
...@@ -220,11 +239,35 @@ export default { ...@@ -220,11 +239,35 @@ export default {
} else { } else {
this.formArray = [] this.formArray = []
} }
},
// 商户关系
async getMerchantRelationRecord() {
const merchantId = this.merchantRow.merchantId
const scene = this.merchantRow.scene
const params = {
merchantId,
scene
}
const res = await getMerchantRelationRecordApi(params)
if (res.length != 0) {
const format = "YYYY/MM/DD HH:mm"
this.formArray = res.map((item) => {
item.formatEffectEndDate = item.applyEndTime ? dayjs(item.applyEndTime).format(format) : ""
item.formatEffectStartDate = item.applyStartTime ? dayjs(item.applyStartTime).format(format) : ""
item.formatUpdatedDate = dayjs(item.operateDate).format(format)
item.updatedBy = item.operator
item.show = false
return item
})
} else {
this.formArray = []
}
} }
}, },
components: { components: {
ledgerAccount, ledgerAccount,
reconciliation reconciliation,
merchantRelationships
}, },
computed: {} computed: {}
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!