Commit 11b0e6d3 by 张立顺

Merge branch 'SAAS+V4.55.0-0730' into SAAS+V4.55.1

2 parents cd53d214 6857ba85
Showing 56 changed files with 2282 additions and 989 deletions
......@@ -20,7 +20,7 @@ const request = (
) => {
// 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = ""
console.log("params.method", params)
if (params.method.includes("dj.api.smartcarlife")) {
apiName = "dj"
} else if (params.method.includes("dj.api.script")) {
......
......@@ -39,7 +39,7 @@ export function customizeList(data) {
return request(data, RequestMethods.POST)
}
// 查询所有配置
export function findAllConfig(data) {
export function findAllConfig(data = {}) {
data.method = `${path}longcoursesceneconfig.findAllConfig`
return request(data, RequestMethods.POST)
}
......@@ -106,3 +106,19 @@ export function getStaffInfo(data) {
data.method = `${path}servicecenter.staff.info`
return request(data, RequestMethods.POST)
}
// 长课程配置-查询课程列表
export function getStaffTagCourseList(data = {}) {
data.method = `${path}servicecenter.contentmanager.staff.tag.course`
return request(data, RequestMethods.POST)
}
//提交配置
export function insertOrUpdate(data) {
data.method = `${path}contentManagerTask.insertOrUpdate`
return request(data, RequestMethods.POST)
}
// 根据ID查询详细信息
export function getByTaskId(data) {
data.method = `${path}contentManagerTask.getById`
return request(data, RequestMethods.POST)
}
......@@ -317,6 +317,10 @@ $prefix: d2;
max-height: 200px !important;
overflow-y: scroll;
}
.serverHeight {
height: 200px !important;
overflow-y: scroll;
}
.el-tooltip__popper.tools-gltip {
width: 238px !important;
height: 95px !important;
......@@ -356,7 +360,3 @@ $prefix: d2;
overflow: hidden;
text-overflow: ellipsis;
}
.el-popover {
height: 200px;
overflow: scroll;
}
......@@ -710,7 +710,8 @@ export const businessNatureShow = {
export const storeType = [
{ confId: 1, confName: "嘀加" },
{ confId: 2, confName: "广汇" },
{ confId: 3, confName: "直营" }
{ confId: 3, confName: "直营" },
{ confId: 9, confName: "冀联" }
]
// 店面配置 部署场景
export const sceneForShop = [
......@@ -903,7 +904,6 @@ export const refundExamine_status = [
{ confId: 3, confValue: "财务结算" },
{ confId: 4, confValue: "已完成" },
{ confId: 5, confValue: "驳回" },
{ confId: 6, confValue: "驻店发起" },
{ confId: 7, confValue: "区域运营审核" },
{ confId: 8, confValue: "运营补充" }
]
......@@ -1393,9 +1393,9 @@ export const punishStatusOpt = [
]
// 服务中心-长课程配置 归属业务
export const course_businessOpt = [
{ confId: "0", confValue: "轻改" },
{ confId: "1", confValue: "权益" },
{ confId: "2", confValue: "延保" }
{ confId: "轻改", confValue: "轻改" },
{ confId: "权益", confValue: "权益" },
{ confId: "延保", confValue: "延保" }
]
export const taskStatusOpt = [
......@@ -1408,12 +1408,11 @@ export const effectiveTypeOpt = [
]
// 服务中心-长课程配置 处罚方式
export const punishTypeOpt = [
{ confId: "0", confValue: "不处罚" },
{ confId: "1", confValue: "限制录单" }
{ confId: 0, confValue: "不处罚" },
{ confId: 1, confValue: "限制录单" }
]
// 服务中心-长课程配置 任务状态
export const course_taskStatusOpt = [
{ confId: 0, confValue: "未开始" },
{ confId: 1, confValue: "进行中" },
{ confId: 2, confValue: "已结束" }
]
......@@ -1425,3 +1424,8 @@ export const learningProgressOpt = [
{ confId: 4, confValue: "未通过" },
{ confId: 5, confValue: "已完成" }
]
export const long_businessOpt = [
{ confId: "1", confValue: "延保" },
{ confId: "3", confValue: "权益" },
{ confId: "2", confValue: "轻改" }
]
......@@ -3,6 +3,7 @@ class GlOssApi {
constructor(params = {}) {
this.baseConfig = params.baseConfig
}
/**
* 分片上传大文件到阿里云OSS(带断点续传和重试机制)
* @param {*} file 文件流(大文件)
......@@ -26,24 +27,27 @@ class GlOssApi {
if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置"))
const fileName = file.name
const client = new OSS({
accessKeyId: baseConfig.alyOss.accessKeyId,
accessKeySecret: baseConfig.alyOss.accessKeySecret,
bucket: baseConfig.alyOss.bucket,
endpoint: baseConfig.alyOss.endpoint
accessKeyId: baseConfig.alyOss2.accessKeyId,
accessKeySecret: baseConfig.alyOss2.accessKeySecret,
bucket: baseConfig.alyOss2.bucket,
endpoint: baseConfig.alyOss2.endpoint
})
if (partSize < 100) {
console.error("分片大小不能小于100KB")
errCallBack(new Error("分片大小不能小于100KB"))
return
}
// 确保目录以斜杠结尾
if (!dir.endsWith("/")) {
dir += "/"
}
const key = dir + fileName
const uniqueDir =
dir + Date.now() + "_" + Math.floor(Math.random() * 10000) + "/"
const key = uniqueDir + fileName
let retryCount = 0
let currentCheckpoint = null
const uploadWithRetry = async () => {
const uploadWithRetry = () => {
client
.multipartUpload(key, file, {
partSize: partSize * 1024, // 转换为字节
......@@ -53,25 +57,20 @@ class GlOssApi {
console.log(`上传进度: ${p * 100}%`)
}
})
.then(async (result) => {
.then((result) => {
const size =
file.size > 1000000
? parseFloat(file.size / 1000000).toFixed(2) + "M"
: parseFloat(file.size / 1000).toFixed(2) + "KB"
console.log(result, 111111111)
console.log(result.res)
let [aliyunAddress] = result.res.requestUrls
console.log(aliyunAddress, "aliyunAddress")
const sourceImage = aliyunAddress
const targetImage = "exampledir/dest.png"
await processImage(
"image/quality,Q_50",
bucketName,
result.name,
targetImage
)
let url = aliyunAddress.split("?")[0].split("https:")[1]
console.log(url, "url")
successCallback({
attachment: fileName,
aliyunAddress: decodeURIComponent(aliyunAddress).split("?")[0],
aliyunAddress:
"https:" + encodeOSSFilename(decodeURIComponent(url)),
size: size
})
})
......@@ -88,19 +87,21 @@ class GlOssApi {
}
})
}
const processImage = async (
processStr,
targetBucket,
sourceImage,
targetImage
) => {
const result = await client.processObjectSave(
sourceImage,
targetImage,
processStr,
targetBucket
const encodeOSSFilename = (filename) => {
// 定义需要转码的特殊字符(包括空格)
const specialChars = '? \\ * | " < > [ ] { } % # & + = ^ ` ~ ; '
// 创建正则表达式匹配所有特殊字符
const escapeRegex = new RegExp(
`[${specialChars.replace(/ /g, "").replace(/(.)/g, "\\$1")}]`,
"g"
)
console.log(result.res, "99999")
// 转码函数:将字符转为百分号编码
return filename.replace(escapeRegex, (char) => {
// 获取字符的UTF-8编码
const code = char.charCodeAt(0)
// 空格特殊处理为%20,其他转为大写十六进制
return code === 32 ? "%20" : `%${code.toString(16).toUpperCase()}`
})
}
uploadWithRetry() // 启动上传流程
}
......
......@@ -20,16 +20,16 @@
<script>
export default {
name: 'D2TebleHeader',
name: "D2TebleHeader",
props: {
title: {
type: String,
required: false,
default: ''
default: ""
},
titleClassName:{
titleClassName: {
type: String,
default: ''
default: ""
},
leftSpan: {
type: Number,
......@@ -44,6 +44,10 @@ export default {
.table-header {
font-size: 14px;
}
.table-header-title {
color: #111111;
font-size: 16px;
}
.table-header .el-col-12 {
/* min-width: 50%; */
......
......@@ -61,12 +61,12 @@ export const routerName = {
],
component: _import("serviceCentre/shortCourse/index")
},
91403: {
91903: {
path: "/configureCourse",
name: "configureCourse",
meta: {
title: "配置课程",
authId: "91403",
authId: "91903",
parentId: "91901",
cache: false,
activePath: "/longCourse"
......
......@@ -13,7 +13,14 @@
:style="{ width: picOptions.width, height: picOptions.height }"
v-if="picOptions.type == 'video'"
>
<video id="video" width="100%" height="100%" preload="none" loop muted>
<video
id="video"
width="100%"
height="100%"
preload="none"
loop
muted
>
<source :src="item" type="video/mp4" />
</video>
<img
......@@ -173,6 +180,7 @@ import draggable from "vuedraggable"
import ImageViewer from "./Image.vue"
import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk"
// import GlOssApi from "@/common/oss"
export default {
components: {
draggable,
......@@ -207,13 +215,13 @@ export default {
dialogVisibleImg(val) {
if (!val) {
// 关闭所有视频播放
const videos = document.querySelectorAll('.preVideo');
videos.forEach(video => {
const videos = document.querySelectorAll(".preVideo")
videos.forEach((video) => {
if (video && !video.paused) {
video.pause();
video.currentTime = 0;
video.pause()
video.currentTime = 0
}
});
})
}
}
},
......
......@@ -5,8 +5,13 @@
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth"
:form-data="showFormData" />
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
......@@ -20,20 +25,33 @@
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch"
:table-params="tableParams" :before-search-fn="beforeSearchFn">
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span>
<span style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2 || scope.scope.contentType == 5">
<span
style="margin-right: 10px"
v-if="
(scope.scope.sendStatus == 1 && scope.scope.contentType == 5) ||
(scope.scope.sendStatus == 2 && scope.scope.contentType == 5)
"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2">
<span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span>
</div>
......@@ -227,7 +245,7 @@ export default {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -311,7 +329,8 @@ export default {
goStatisticsPage(row) {
this.$router.push({
name: row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
name:
row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
query: {
id: row.id,
title: row.title
......
......@@ -532,6 +532,14 @@ export default {
width: '100px',
formatter: (cellValue) => {
return this.baseData.oaApproveStatusList.find(item => item.confId === cellValue.oaApproveStatus)?.confValue || '--'
},
className: (cellValue) => {
return {
1: 'blueSpot',
2: 'greenSpot',
3: 'redSpot',
4: 'ashSpot'
}[cellValue.oaApproveStatus]
}
},
{
......
......@@ -621,8 +621,8 @@ import { limitPrice } from "@/common/format"
import { applicableModelTypeList, BaseData } from "@/common/constants.js"
import { mapActions, mapMutations } from "vuex"
import { baseConfig } from "@/main"
// import GlOssApi from "glsk-oss-jssdk"
import GlOssApi from "@/common/oss.js"
import GlOssApi from "glsk-oss-jssdk"
// import GlOssApi from "@/common/oss.js"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default {
name: "ProductForm",
......
......@@ -67,7 +67,7 @@ export default {
},
searchFormSearch: {},
showFormData: [{
label: '蓝字发票号码',
label: '数电票号码',
name: 'electronicInvoiceNo',
type: 'input',
maxlength: '50',
......
......@@ -8,7 +8,7 @@
<div v-loading="loading">
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
label-width="200px"
:inline="true">
<el-form-item label="审批编号:">
{{ detailInfo.applyCode ? detailInfo.applyCode : "-" }}
......@@ -170,12 +170,11 @@
<div v-if="detailInfo.refundApplyDetailList">
<d2-table :table-params="orderTableParams" :tableData="detailInfo.refundApplyDetailList" :hasPage="false"></d2-table>
</div>
<div class="examine-record"
v-if="detailInfo.approveType == 1">
<div class="examine-record">
<div class="title">
操作记录<el-button type="text"
class="edit-btn"
@click="handleRecordUpdate">编辑</el-button>
@click="handleRecordUpdate" v-if="detailInfo.approveType == 1">编辑</el-button>
</div>
<div class="record-div">
<div class="record-div-d"
......@@ -572,18 +571,26 @@ export default {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else if (item.beforeStatus == 6) {
} else if (item.beforeStatus == 7) {
item.optShow = "区域运营审核"
item.optStautsShow = "通过"
item.optPerShow = "审核人"
item.optTimeShow = "审核时间"
item.optRemarkShow = "备注"
} else if (item.beforeStatus == 7) {
if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else if (item.beforeStatus == 8) {
item.optShow = "运营补充"
item.optStautsShow = "通过"
item.optPerShow = "操作人"
item.optTimeShow = "操作时间"
item.optRemarkShow = "备注"
if (item.afterStatus == 5) {
item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因"
}
} else {
item.isShow = item.beforeStatus == item.afterStatus
if (item.beforeStatus == item.afterStatus) {
......@@ -796,7 +803,7 @@ export default {
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
width: calc(100% - 200px);
line-height: 24px;
}
......
......@@ -47,11 +47,11 @@
</div>
</template>
</glsx-combi-form>
<el-form :model="detail" :rules="tableRules" ref="refundTableForm">
<el-form :model="detail" :rules="tableRules" ref="refundTableForm" class="refund-table" v-if="detail && detail.refundApplyDetailList && detail.refundApplyDetailList.length">
<d2-table ref="recordTable" :table-params="orderTableParams" :tableData="detail.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount">
<el-input v-model="detail.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" type="number" @input="handleInput(scope.index, 'refundAmount')">
<el-input v-model="detail.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" @input="handleInput(scope.index, 'refundAmount')">
</el-input>
</el-form-item>
</div>
......@@ -80,7 +80,7 @@
<template slot="attachmentListHtml" slot-scope="scope">
<el-upload action="" accept=".xlsx,.xls,.doc,.pdf,.docx,.jpg,.png" class="upload-file" :show-file-list="false" :file-list="uploadFileList" :limit="5" :auto-upload="false" :on-remove="importFileChange" :on-change="
(file, fileList) => handleFileChange(file, fileList, scope.scope)
" :on-exceed="hanldeOnExceed" multiple v-if="!detail.applyCode">
" :on-exceed="hanldeOnExceed" multiple v-if="!detail || (detail && !detail.applyCode)">
<!-- <i class="el-icon-upload"></i>
<div class="el-upload__text">点击或将文件拖拽到此区域上传</div>
<div class="item-tips text-tips">
......@@ -97,7 +97,7 @@
<div class="file-name">{{ subItem.fileName }}</div>
</div>
<i v-if="!subItem.fileUrl" class="el-icon-close del-icon" @click="doCancel(scope.scope, subIndex)"></i>
<i v-if="subItem.fileUrl && !detail.applyCode" class="el-icon-delete" @click="handleFileDelete(scope.scope, subIndex)"></i>
<i v-if="subItem.fileUrl && (!detail || (detail && !detail.applyCode))" class="el-icon-delete" @click="handleFileDelete(scope.scope, subIndex)"></i>
</div>
</div>
</div>
......@@ -108,6 +108,12 @@
</template>
</glsx-combi-form>
</div>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="imageFileArr"
:initial-index="initialIndex"
/>
</baseDialog>
</template>
......@@ -129,6 +135,9 @@ import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk"
export default {
name: "NewSignRefundDialog",
components: {
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
},
data() {
var checkAmount = (rule, value, callback) => {
if (!value) {
......@@ -144,6 +153,8 @@ export default {
userInfo: this.$store.state.d2admin.user.info,
loading: false,
refundOldData: [],
imageFileArr: [],
imgViewerVisible: false,
// 标记apiList是否都正确返回数据
baseApiIdx: 0,
okParams: {},
......@@ -479,7 +490,7 @@ export default {
],
tableRules: {
refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' }
{ required: true, message: '请输入退款金额', trigger: 'blur' },
]
},
orderTableParams: {
......@@ -592,6 +603,10 @@ export default {
scene: {
type: String,
default: ""
},
title: {
type: String,
default: ''
}
},
watch: {
......@@ -610,6 +625,9 @@ export default {
this.uploadFileList = newVal.filter(
(v) => !this.filterEmpty(v.uploadProgress) || v.fileUrl
) // 文件列表
const imageFileArr = newVal.filter(v => v.fileUrl && (v.fileUrl.includes('.png') || v.fileUrl.includes('jpg')))
this.imageFileArr = imageFileArr.map(item => { return item.fileUrl })
console.log(this.imageFileArr, 'this.imageFileArr')
}
},
deep: true
......@@ -685,6 +703,7 @@ export default {
this.GlOssApi = new GlOssApi({
baseConfig
})
this.dialogConfig.title = this.title || this.dialogConfig.title
this.infoForm.orderType = this.orderType
if (this.orderType == 1) {
this.infoEditFormData[this.findAttrIdx("refundType")].isDisabled = true
......@@ -697,7 +716,7 @@ export default {
this.orderInfoList.push({
orderCode: this.detail.orderCode,
price: this.detail.totalPrice,
total: this.detail.total,
total: this.detail.total.toFixed(2),
refundSubOrderCode: this.detail.refundSubOrderCode,
refundApplyDetailList: this.detail.refundApplyDetailList
})
......@@ -799,7 +818,7 @@ export default {
var params = {
orderCode: this.detail.orderCode
}
if(this.detail.applyCode) {
if(this.detail && this.detail?.applyCode) {
params.applyCode = this.detail.applyCode
}
getOrderDefaultInfo(params).then((res) => {
......@@ -822,7 +841,7 @@ export default {
this.infoForm.payee = res.refundApplyRecordInfo.payee || ''
this.infoForm.openAccBankName = res.refundApplyRecordInfo.openAccBankName || ''
this.infoForm.bankAccountNo = res.refundApplyRecordInfo.bankAccountNo || ''
this.infoForm.payReason = res.refundApplyRecordInfo.payReason || ''
this.infoForm.remark = res.refundApplyRecordInfo.payReason || ''
this.infoForm.attachmentList = []
res.refundApplyRecordInfo.attachmentList.forEach(item => {
this.infoForm.attachmentList.push({
......@@ -1044,15 +1063,16 @@ export default {
},
// 预览文件
handleFileView(item) {
// if (!item.fileUrl) return
// if (item?.fileUrl.includes('.pdf')) { // pdf文件直接打开新窗口预览
// window.open(item.fileUrl)
// } else {
// this.imgViewerVisible = true
// this.imageFileArr.forEach((val, index) => {
// if (val == item.fileUrl) this.initialIndex = index
// })
// }
console.log(item, 'item--')
if (!item.fileUrl) return
if (item?.fileUrl.includes('.pdf')) { // pdf文件直接打开新窗口预览
window.open(item.fileUrl)
} else if (item.fileUrl.includes('.png') || item.fileUrl.includes('jpg')) {
this.imgViewerVisible = true
this.imageFileArr.forEach((val, index) => {
if (val == item.fileUrl) this.initialIndex = index
})
}
},
closeImgViewer() {
this.imgViewerVisible = false
......@@ -1141,9 +1161,15 @@ export default {
infoValid = true
this.clearValid("refundPoints2")
}
let tableValid = true
if (this.detail) {
this.$refs.refundTableForm.validate((valid) => {
tableValid = valid
})
}
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
this.$refs.refundTableForm.validate((tableValid) => {
if (infoValid && valid && tableValid) {
// this.$refs.refundTableForm.validate((tableValid) => {
if (infoValid && valid && tableValid) {
this.okParams = deepClone(this.infoForm)
// return console.log('this.okParams', this.okParams)
const attachmentList = this.okParams.attachmentList
......@@ -1181,7 +1207,7 @@ export default {
})
})
}
if(this.detail.applyCode) {
if(this.detail && this.detail?.applyCode) {
this.okParams.applyCode = this.detail.applyCode
this.okParams.id = this.detail.id
addOaRefund(this.okParams).then((res) => {
......@@ -1195,7 +1221,7 @@ export default {
})
}
}
})
// })
})
}
)
......@@ -1221,6 +1247,12 @@ export default {
margin: 0 !important;
}
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
.edit-sub-block {
padding-top: 16px;
.el-form-item {
......
......@@ -151,7 +151,7 @@ export default {
_refundSubOrderCode.push(item.subOrderCode)
this.$set(selection[idx], 'refundAmount', item.totalPrice)
})
this.total = _total
this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join("/")
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode)
......
......@@ -13,10 +13,14 @@
<span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' :
'未通过' }}</span>
</el-form-item>
<el-form-item label="施工图片:" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" :key="index" :src="item" alt="">
<el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" @click="
handleEnlargeImg(infoForm.constructionImgList, 'customerPhoto', index)
" :key="index" :src="item" alt="">
</el-form-item>
</el-form>
<el-image-viewer v-if="imgVisible" :mask-closable="true" zIndex="3000" :on-close="closeImgViewer"
:url-list="imgList" :initial-index="initialIndex" />
</d2-dialog>
</template>
......@@ -24,13 +28,21 @@
import { deepClone } from '@/common/util'
export default {
name: 'technicianDialog',
components: {
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
// remark: ''
},
imgVisible: false,
index: 0,
initialIndex: 0,
imgList: [],
imgUrlName: "",
formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
}
......@@ -53,14 +65,23 @@ export default {
created() {
},
components: {},
mounted() {
this.infoForm = deepClone(this.detail)
},
methods: {
closeImgViewer() {
this.imgVisible = false
},
handleEnlargeImg(url, name, index) {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.initialIndex = index
this.imgList = url
this.imgUrlName = name
},
handleAddConfirm() {
this.handleClose(true)
},
......@@ -93,6 +114,7 @@ export default {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
padding: 0 10px;
::v-deep .el-form-item__content {
margin-left: 0 !important;
......@@ -102,12 +124,11 @@ export default {
.img {
width: 120px;
height: 120px;
}
.img+.img {
margin-left: 10px;
}
// .img {}
.status {
color: #2A58AD;
}
......
......@@ -95,7 +95,7 @@
<img class="icon" v-else src="./images/picIcon.png" alt="">
<span class="label">{{ detail.payOrder.zyVoucherUrl.split(',').length == 1 &&
detail.payOrder.zyVoucherUrl.split(',')[0].split('.').pop().toLowerCase() == 'pdf' ? '文件' : '图片.jpg'
}}</span>
}}</span>
<span class="handle" @click="handleEnlargeFile(detail.payOrder.zyVoucherUrl)">点击查看
<span
v-if="detail.payOrder.zyVoucherUrl.split(',').length && detail.payOrder.zyVoucherUrl.split(',')[0].split('.').pop().toLowerCase() != 'pdf'">({{
......@@ -143,8 +143,8 @@
<img class="icon" src="./images/picIcon.png" />
<span class="label">图片.jpg</span>
<span class="handle" @click="
handleEnlargeImg(
[detail.electronicSignature],
handleImg(
detail.electronicSignature,
'electronicSignature'
)
">点击查看</span>
......@@ -221,7 +221,7 @@
<el-table-column prop="cardCode" align="center" label="质保条形码">
<span slot-scope="scope">{{
scope.row.cardCode ? scope.row.cardCode : "无"
}}</span>
}}</span>
</el-table-column>
<el-table-column prop="nums" align="center" label="数量(件)">
<template slot-scope="scope">
......@@ -279,24 +279,6 @@
</p>
</div>
<!-- <el-dialog :visible="imgVisible"
:before-close="handleEnlargeImg">
<el-carousel :autoplay="false"
arrow="always"
trigger="click"
height="695px"
:initial-index="index"
ref="carousel">
<el-carousel-item v-for="(item, index) in imgList"
:key="index"
class="carousel">
<img :src="item[imgUrlName]"
alt=""
class="carousel-img">
</el-carousel-item>
</el-carousel>
</el-dialog> -->
<el-image-viewer v-if="imgVisible" :on-close="closeImgViewer" :url-list="imgList" :initial-index="initialIndex" />
<!-- 标记退款 -->
......@@ -441,9 +423,20 @@ export default {
},
handleEnlargeImg(url, name) {
this.imgVisible = !this.imgVisible
this.initialIndex = 0
// this.imgList = url
console.log("url", url)
this.imgList = url.map((item) => item[name])
// this.imgList = url
this.imgUrlName = name
},
handleImg(url, name) {
this.imgVisible = !this.imgVisible
this.initialIndex = 0
// this.imgList = url
// this.imgList = url.map((item) => item[name])
this.imgList = [url]
console.log("url", this.imgList)
this.imgUrlName = name
},
handleEnlargeFile(url) {
......
......@@ -67,7 +67,7 @@
</span>
<!-- 下载 -->
<span style="margin-right: 10px;"
v-if="scope.scope.approveType == 1">
v-if="scope.scope.approveType == 1 && ![7, 8].includes(scope.scope.status)">
<auth-button :data="scope.scope"
:show-btn-ids="['9040808']" />
<span v-if="scope.scope.downCount != 0"
......@@ -101,6 +101,7 @@
<!-- 补充 - 退款 -->
<new-sign-refund-dialog :sign-refund-visible="signRefundVisible"
title="运营补充"
:detail="refundDetail"
:order-type="1"
:scene="refundScene"
......@@ -636,12 +637,12 @@ export default {
info.refundApplyDetailList.forEach((item) => {
total += item.totalPrice
})
let refundSubOrderCode = info.refundApplyDetailList.map(item => item.bizOrderCode).join("/")
this.refundScene = row.refundApplyOrderRefList[0].sceneType + ''
this.refundDetail.totalPrice = info.refundableTotalPrice
this.refundDetail.applyCode = row.applyCode
this.refundDetail.total = total
this.refundDetail.id = info.id
this.refundDetail.refundSubOrderCode = refundSubOrderCode
this.refundDetail.refundSubOrderCode = info.refundSubOrderCode
this.refundDetail.refundApplyDetailList = deepClone(info.refundApplyDetailList)
this.refundDetail.isAll = res?.refundApplyRecordInfo.refundType == 1
this.refundDetail.isOneSubFirst = false
......
......@@ -7,7 +7,7 @@
>
<div class="detail-content">
<div class="form_div">
<el-form class="edit-sub-block" label-width="140px" :inline="true">
<el-form class="edit-sub-block" label-width="100px" :inline="true">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="客户:">
......@@ -539,7 +539,7 @@ export default {
white-space: nowrap; /* 禁止文本换行 */
overflow: hidden; /* 超出内容隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
max-width: 150px;
max-width: 150px;
}
</style>
......
......@@ -119,7 +119,7 @@ export default {
_total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode)
})
this.total = _total
this.total = parseFloat(_total.toFixed(2))
this.refundSubOrderCode = _refundSubOrderCode.join('/')
this.refundApplyDetailList = selection
console.log(this.refundSubOrderCode)
......
......@@ -108,11 +108,11 @@
<div class="max-value">可退金额:{{refundInfo.total}}</div>
</template>
</glsx-combi-form>
<el-form :model="refundInfo" :rules="tableRules" ref="refundTableForm">
<el-form :model="refundInfo" :rules="tableRules" ref="refundTableForm" class="refund-table">
<d2-table ref="recordTable" :table-params="orderTableParams" :tableData="refundInfo.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount">
<el-input v-model="refundInfo.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" type="number" @input="handleInput(scope.index, 'refundAmount')">
<el-input v-model="refundInfo.refundApplyDetailList[scope.index].refundAmount" placeholder="请输入退款金额" @input="handleInput(scope.index, 'refundAmount')">
</el-input>
</el-form-item>
</div>
......@@ -420,7 +420,7 @@ export default {
refundOldData: [],
tableRules: {
refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' }
{ required: true, message: '请输入退款金额', trigger: 'blur' },
]
},
orderTableParams: {
......@@ -731,7 +731,7 @@ export default {
handleConfirm(val) {
console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total
this.refundInfo.total = val.total.toFixed(2)
this.refundInfo.isAll = val.isAll
this.refundInfo.isOneSubFirst = val.isOneSubFirst
this.refundInfo.refundApplyDetailList = val.refundApplyDetailList
......@@ -958,6 +958,13 @@ export default {
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
}
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
}
.max-value {
margin-left: 220px;
......
......@@ -69,7 +69,9 @@
/>
</div>
</div>
<el-link class="copy-btn" icon="el-icon-download" :underline="false" :href="detailObj.fileUrl" target="_blank">打开链接</el-link>
<div
v-if="detailObj.bussinessType!=2"
class="copy-btn"
@click="copyText"
:data-track="JSON.stringify(copyTrack)"
......@@ -79,7 +81,7 @@
class="icon"
src="@/assets/copy.png"
/>
音频链接
分享链接
</div>
</div>
<div
......@@ -194,6 +196,7 @@ export default {
}
},
mounted () {
console.log(this.detailObj, '=============')
this.conversationDetailPage()
this.myAud = document.getElementById("audio1")
......@@ -363,6 +366,7 @@ export default {
align-items: center;
flex-shrink: 0;
cursor: pointer;
font-weight: 400;
.icon {
width: 16px;
height: 16px;
......
......@@ -67,10 +67,11 @@
<img src="@/assets/pause.png" />
</div>
<div>{{ currentTime }}</div>
<div class="copy-btn" @click="copyText" :data-track="JSON.stringify(copyTrack)"
<el-link class="copy-btn" icon="el-icon-download" :underline="false" :href="qualityDetailList[currentNum].fileUrl" target="_blank">打开链接</el-link>
<div v-if="qualityDetailList[currentNum].bussinessType!=2" class="copy-btn" @click="copyText" :data-track="JSON.stringify(copyTrack)"
data-event-code="audio_link">
<img class="icon" src="@/assets/copy.png" />
音频链接
分享链接
</div>
</div>
</div>
......@@ -514,6 +515,7 @@ export default {
align-items: center;
flex-shrink: 0;
cursor: pointer;
font-weight: 400;
.icon {
width: 16px;
......
......@@ -347,7 +347,7 @@ export default {
},
{
label: "品牌",
name: "carBrandId",
name: "carBrandIds",
type: "select",
multiple: true,
isClear: true,
......
......@@ -6,8 +6,10 @@
<div class="info-wrap">
<div class="info-item flex">
<label>员工:</label>
<span>{{ queryData.employeeName || "-" }}
{{ queryData.phoneNumber || "" }}</span>
<span
>{{ queryData.employeeName || "-" }}
{{ queryData.phoneNumber || "" }}</span
>
</div>
<div class="info-item flex">
<label>门店:</label>
......@@ -79,7 +81,9 @@
@click="handleReset"
:data-track="JSON.stringify(searchForm)"
data-event-code="reception_list_search"
> 重置 </el-button>
>
重置
</el-button>
</div>
<div class="content-table">
<d2-table
......@@ -92,19 +96,13 @@
@setTableFinishFun="setTableFinishFun"
@pageChange="pageChange"
>
<div
slot="durationHtml"
slot-scope="scope"
>
<div slot="durationHtml" slot-scope="scope">
<template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }}
</template>
<template v-else>--</template>
</div>
<div
slot="scoreHtml"
slot-scope="scope"
>
<div slot="scoreHtml" slot-scope="scope">
<!-- <template v-if="scope.scope.bussinessType != 2"> -->
<template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }}
......@@ -113,58 +111,56 @@
<!-- </template>
<template v-else>-</template> -->
</div>
<div
slot="estimatedResult"
slot-scope="scope"
>
<div slot="estimatedResult" slot-scope="scope">
<!-- v-if="scope.scope.bussinessType != 2" -->
<div :class="['tag', setTagColor(scope.scope.estimatedResult)]">
{{ scope.scope.estimatedResult }}
</div>
<!-- <div v-else></div> -->
</div>
<div
slot="defencePoint"
slot-scope="scope"
>
<div slot="defencePoint" slot-scope="scope">
<template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template>
<template v-else-if="
<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
>
<template v-else-if="scope.scope.defence === 3"
>未发现攻防</template
>
<template v-else>-</template>
</div>
<div
slot="customerTypeName"
slot-scope="scope"
>
<div slot="customerTypeName" slot-scope="scope">
<template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName
? scope.scope.customerTypeName
: "-"
}}</template>
<template v-else-if="
<template
v-else-if="
scope.scope.defence === 1 ||
scope.scope.defence === 0 ||
scope.scope.defence === 4
">分析中</template>
"
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template>
</div>
<template
slot="auth-button"
slot-scope="scope"
>
<template slot="auth-button" slot-scope="scope">
<el-button
type="text"
@click="qualitDetail(scope.scope)"
:data-track="JSON.stringify({
batchId:scope.scope.id
})"
:data-track="
JSON.stringify({
batchId: scope.scope.id
})
"
data-event-code="reception_detail"
>
接待详情
......@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range"
import QualityDetail from "./qualityDetail.vue"
import NewQualityDetail from "./newQualityDetail.vue"
import { conversationPage } from "@api/resident"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
export default {
mixins: [reportTrackFunMixin],
props: {
queryData: Object,
show: Boolean
},
data () {
data() {
return {
isQualityVisible: false,
isNewQualityVisible: false,
......@@ -259,14 +255,14 @@ export default {
{
label: "业务场景",
prop: "bussinessType",
formatter (row) {
formatter(row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-"
}
},
{
label: "APP接待结果",
formatter (row) {
formatter(row) {
let result = {
1: "成交",
0: "战败"
......@@ -303,7 +299,7 @@ export default {
label: "安心包是否开口",
prop: "axbOpenFlag",
width: 130,
formatter (row) {
formatter(row) {
return row.axbOpenFlag ? "是" : "否"
}
},
......@@ -311,7 +307,7 @@ export default {
label: "安心包是否成交",
prop: "isFinishFlag",
width: 130,
formatter (row) {
formatter(row) {
return row.finishFlag ? "是" : "否"
}
},
......@@ -344,8 +340,8 @@ export default {
qualityDetailList: [],
currentNum: 0,
batchNum: null,
track_event_code: 'reception_detail_list',
track_businessParam_key: 'searchForm'
track_event_code: "reception_detail_list",
track_businessParam_key: "searchForm"
}
},
components: {
......@@ -355,14 +351,14 @@ export default {
},
watch: {
show: {
handler (val) {
handler(val) {
if (val) this.onPageShow()
else this.onPageHide()
},
immediate: true
}
},
mounted () {
mounted() {
this.getOptionsList()
let timer = setInterval(() => {
if (timer && this.batchNum != null) {
......@@ -374,7 +370,7 @@ export default {
}, 1e3)
},
methods: {
toMinutesAndSeconds (seconds) {
toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000)
let formattedTime = ""
if (seconds < 60) {
......@@ -395,10 +391,10 @@ export default {
return formattedTime
}
},
handleSearch () {
handleSearch() {
this.$refs.recepDetail.refreshTable(true, true)
},
handleReset () {
handleReset() {
this.searchForm = {
recepTime: [],
qualityTestScore: [],
......@@ -406,9 +402,9 @@ export default {
}
this.$refs.recepDetail.refreshTable()
},
closeDialog () {
if(this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if(this.$refs.newQualityDetail) {
closeDialog() {
if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide()
}
......@@ -416,7 +412,7 @@ export default {
this.isNewQualityVisible = false
this.onPageShow()
},
qualitDetail (row) {
qualitDetail(row) {
const list = this.$refs.recepDetail.data,
currentNum = list.findIndex((e) => e.id == row.id)
this.currentNum = currentNum
......@@ -428,7 +424,7 @@ export default {
}
this.onPageHide()
},
beforeSearchFn () {
beforeSearchFn() {
return new Promise((resolve) => {
const { queryData } = this
if (!this.searchForm.recepTime.length)
......@@ -471,19 +467,19 @@ export default {
resolve()
})
},
setTableFinishFun (data) {
setTableFinishFun(data) {
let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
}
},
getOptionsList () {
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -499,7 +495,7 @@ export default {
}
})
},
setTagColor (estimatedResult) {
setTagColor(estimatedResult) {
switch (estimatedResult) {
case "成交":
return "greenBg"
......@@ -509,9 +505,9 @@ export default {
return "grayBg"
}
},
pageChange (page) {
pageChange(page) {
let { searchForm } = this
this.setReportTrackData(0, 'reception_list_page', {
this.setReportTrackData(0, "reception_list_page", {
...searchForm,
...page
})
......
......@@ -18,7 +18,7 @@
</div>
</div>
<div class="d2-container-content">
<d2-table-header title="标签录音管理列表">
<d2-table-header title="录音标签管理列表">
<el-button size="small" type="primary" @click="exportTable">
导出
</el-button>
......@@ -68,7 +68,7 @@ export default {
},
{
label: "品牌",
prop: "oneCarBrand"
prop: "carBrand"
},
{
label: "录音链接",
......@@ -95,13 +95,11 @@ export default {
},
{
label: "APP接待结果",
formatter(row) {
let result = {
1: "成交",
0: "战败"
}[row.receptionStatus]
return result || "-"
}
prop: "isOrderFinishFlagName"
},
{
label: "质检得分",
prop: "score"
},
{
label: "身份介绍",
......@@ -147,7 +145,7 @@ export default {
staffName: "",
merchantId: "",
checkType: "",
checkStart: [],
checkStart: [new Date(), new Date()],
carBrandId: ""
},
showFormData: [
......@@ -192,11 +190,11 @@ export default {
label: "质检时间",
name: "checkStart",
type: "datePicker",
isClear: false,
isClear: true,
pickerOptions: "rangePickerOptions_30day2"
},
{
label: "app接待结果",
label: "接待结果",
name: "orderFinishFlag",
type: "select",
isClear: true,
......@@ -215,7 +213,7 @@ export default {
},
{
confId: 1,
confValue: "未成交"
confValue: "战败"
}
],
brandList: [],
......
......@@ -6,17 +6,17 @@
:class="['type', titleActiveIndex == index ? 'active' : '']"
v-for="(item, index) in titleTypeList"
:key="index"
@click="handleClick(index)"
@click="handleTitleClick(index)"
>
{{ item.title }}
</div>
</div>
<div class="content gl-form-page">
<el-form :inline="true" :model="cousrFrom" class="form-inline">
<el-form :inline="true" :model="courseForm" class="form-inline">
<el-form-item>
<el-input
prefix-icon="el-icon-search"
v-model="cousrFrom.user"
v-model="courseForm.tagSearch"
placeholder="课程/标签搜索"
></el-input>
</el-form-item>
......@@ -27,20 +27,38 @@
<el-button @click="resetForm" size="small">重置</el-button>
</el-form-item>
</el-form>
<el-checkbox-group v-model="checkedCities">
<el-checkbox v-for="city in cityOptions" :label="city" :key="city">
<div class="title">问界延保+安心包套餐培训视频(含考核)</div>
<el-checkbox-group v-model="selected" @change="handleCheckedChange">
<el-checkbox
v-for="course in courseList"
:key="course.id"
:label="course.courseId"
>
<div class="title">{{ course.courseName }}</div>
<el-tooltip
effect="light"
placement="top"
popper-class="tools-gltip"
v-if="course.status == 2 || course.status == 5"
>
<div slot="content" class="process-info">
<div>学习进度:<span>已完成</span></div>
<div>考核成绩:<span>80分</span></div>
<div>完成时间:<span>2025-06-30 16:30:05</span></div>
<div>
学习进度:<span>
{{ statusObj[course.status] }}
</span>
</div>
<div>
考核成绩:<span>{{ course.totalScore || 0 }}分</span>
</div>
<div v-if="course.finishDate">
完成时间:<span>{{ course.finishDate || "-" }}</span>
</div>
</div>
<div
:class="['status', statusColors[course.status]]"
v-if="course.status"
>
{{ statusObj[course.status] }}
</div>
<div class="status orange">已完成</div>
</el-tooltip>
</el-checkbox>
</el-checkbox-group>
......@@ -49,7 +67,9 @@
<div class="right">
<div class="title-type">
<div class="select">已选课程</div>
<div class="time">共3节 75min</div>
<div class="time">
共{{ selectObj.count }}节 {{ selectObj.courseTotalDuration }}min
</div>
</div>
<div class="reminder">
<img
......@@ -58,39 +78,167 @@
/>提示:总课程时长建议< 60 min
</div>
<div class="select-list">
<div class="select-item" v-for="i in 20">
<div
class="select-item"
v-for="(selectCourse, index) in selectCourseList"
:key="selectCourse.courseId"
>
<div class="item-content">
问界销售异议处理问界销售异议处理问界销售异议处理-质量异议(含考核)<span
class="item-time"
>25min</span
{{ selectCourse.courseName
}}<span class="item-time"
>{{ selectCourse.courseTotalDuration }}min</span
>
</div>
<div class="del">删除</div>
<div class="del" @click="delCourse(selectCourse)">删除</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { getStaffTagCourseList } from "@/api/serviceCentre"
export default {
name: "allocation",
data() {
return {
cousrFrom: {
user: ""
courseForm: {
tagSearch: "",
queryAll: false
},
checkedCities: [],
selected: [],
selectCourseList: [],
titleActiveIndex: 0,
titleTypeList: [{ title: "推荐课程" }, { title: "自选课程" }],
cityOptions: ["上海", "北京", "广州", "深圳"]
titleTypeList: [
{ title: "推荐课程", queryAll: false },
{ title: "自选课程", queryAll: true }
],
cityOptions: ["上海", "北京", "广州", "深圳"],
statusObj: {
2: "未完成",
5: "已完成"
},
statusColors: {
2: "orange",
5: "green"
},
selectObj: {
courseTotalDuration: 0,
count: 0
}
}
},
props: {
courseList: {
type: Array,
default: () => []
}
},
mounted() {
console.log(this.courseList, "courseList")
},
methods: {
handleClick(index) {
reset() {
this.selected = []
this.selectCourseList = []
this.titleActiveIndex = 0
},
handleCheckedChange(val) {
console.log(val)
this.selected = val ? val : []
this.handleCourse()
},
handleCourse() {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
this.selectCourseList = this.courseList.filter((item) => {
const isSelected = this.selected.includes(item.courseId)
if (isSelected) {
// 使用 toFixed(2) 保留两位小数,防止浮点误差
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
}
return isSelected
})
this.$emit("handleCourse", this.selectCourseList)
},
// handleCourse() {
// this.selectObj = {
// courseTotalDuration: 0,
// count: 0
// }
// this.selectCourseList = this.courseList.filter((item) => {
// const isSelected = this.selected.includes(item.courseId)
// if (isSelected) {
// this.selectObj.courseTotalDuration += item.courseTotalDuration
// this.selectObj.count += 1
// }
// return isSelected
// })
// this.$emit("handleCourse", this.selectCourseList)
// },
// delCourse(val) {
// this.selectObj = {
// courseTotalDuration: 0,
// count: 0
// }
// let currentIndex = this.selectCourseList.findIndex(
// (item) => item.courseId == val.courseId
// )
// let selectedIndex = this.selected.findIndex(
// (item) => item == val.courseId
// )
// this.selected.splice(selectedIndex, 1)
// this.selectCourseList.splice(currentIndex, 1)
// this.selectCourseList.forEach((item) => {
// this.selectObj.courseTotalDuration += item.courseTotalDuration
// this.selectObj.count += 1
// })
// this.$emit("handleCourse", this.selectCourseList)
// },
delCourse(val) {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
let currentIndex = this.selectCourseList.findIndex(
(item) => item.courseId == val.courseId
)
let selectedIndex = this.selected.findIndex(
(item) => item == val.courseId
)
this.selected.splice(selectedIndex, 1)
this.selectCourseList.splice(currentIndex, 1)
this.selectCourseList.forEach((item) => {
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
})
this.$emit("handleCourse", this.selectCourseList)
},
handleTitleClick(index) {
this.titleActiveIndex = index
this.courseForm.queryAll = this.titleTypeList[index].queryAll
console.log(this.courseForm, " this.courseForm")
this.search()
},
resetForm() {
this.courseForm.tagSearch = ""
this.search()
},
resetForm() {},
search() {}
search() {
this.$emit("fromAllocation", this.courseForm)
}
}
}
</script>
......@@ -161,13 +309,14 @@ export default {
padding: 14px 16px;
white-space: wrap;
border-right: 1px solid #e5e5e5;
width: 284px;
}
.item-time {
font-size: 12px;
color: #666666;
}
.del {
padding: 14px 18px;
padding: 0 18px;
color: #2a58ad;
font-size: 14px;
white-space: nowrap;
......@@ -198,6 +347,7 @@ export default {
}
.content {
padding: 16px 7px 16px 16px;
overflow: hidden;
}
}
.gl-form-page {
......@@ -206,6 +356,7 @@ export default {
}
.el-form-item__content {
height: 32px;
// width:231px;
}
.el-form .el-button {
width: 52px;
......@@ -213,7 +364,7 @@ export default {
}
::v-deep {
.el-checkbox-group {
height: 365px;
height: 360px;
overflow-y: auto;
overflow-x: hidden;
}
......@@ -240,6 +391,10 @@ export default {
font-weight: 500;
border-radius: 2px;
}
.ash {
color: #c6c8cc;
border: 1px solid #c6c8cc;
}
.orange {
color: #f59619;
border: 1px solid #f59619;
......
......@@ -7,22 +7,26 @@
<img class="staff-icon" src="../../images/staff-icon.png" alt="" />
<div class="title">
员工列表
<div class="num">共7人,已配置1人</div>
<div class="num">
共{{ statisticsObj.total }}人,已配置{{
statisticsObj.complete
}}人
</div>
</div>
</div>
<div class="staff-list">
<div
v-for="(item, index) in staffList"
:key="item.id"
:key="item.staffUUID"
:class="['staff-item', staffIndex == index ? 'active' : '']"
@click="handleClick(index)"
>
{{ item.name }}
<div class="config" v-if="item.isConfig">已配置</div>
<div class="employeeName">{{ item.employeeName }}</div>
<div class="config" v-if="item.courseConfigFlag == 1">已配置</div>
</div>
</div>
</div>
<div class="right-wrap">
<div class="right-wrap" v-loading="loading">
<div class="nav-tabs">
<div
:class="['nav-item', activeName == index ? 'active' : '']"
......@@ -33,20 +37,34 @@
{{ item.label }}
</div>
</div>
<components :is="tabName"></components>
<components
ref="components"
:is="tabName"
:aiJy="aiJy"
:staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse"
:staffList="staffList"
></components>
</div>
</div>
<div class="end-configuration">结束配置</div>
<div class="end-configuration" @click="handleEndConfigure">结束配置</div>
</div>
</template>
<script>
import staffDetail from "./staffDetail"
import couseAllocation from "./couseAllocation"
import {
customizeList,
findStaffByMerchantNo,
findStoreEmployeePerformance
} from "@/api/serviceCentre"
export default {
name: "configureCourse",
components: { staffDetail, couseAllocation },
data() {
return {
loading: false,
staffIndex: 0,
activeName: "0",
tabPaneList: [
......@@ -57,34 +75,103 @@ export default {
label: "课程配置"
}
],
tabName: "couseAllocation",
staffList: [
{
name: "王小虎",
isConfig: true,
id: 1
},
{
name: "李小宣",
isConfig: true,
id: 1
},
{
name: "胡明星",
isConfig: true,
id: 1
},
{
name: "郝怡逸",
isConfig: true,
id: 1
}
]
tabName: "staffDetail",
aiJy: "",
staffItem: {},
staffList: [],
courseList: [],
staffDetailInfo: {},
statisticsObj: {
total: 0,
complete: 0
}
}
},
created() {
//课程搜索功能
// this.$EventBus.$on("fromAllocation", (courseForm) => {
// console.log("父组件接收到孙组件事件:", courseForm)
// this.getStaffTagCourseList(courseForm)
// })
},
async mounted() {
this.queryData = this.$route.query
//获取员工列表
this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex]
//查询员工详情
// this.findStoreEmployeePerformanceData()
},
methods: {
//提交本员工配置回调
async handleConfigureCourse() {
this.staffIndex = 0
//获取员工列表
this.staffList = await this.getStaffInfoData()
this.handleTabClick(1)
this.staffItem = this.staffList[0]
},
//查询员工详情
findStoreEmployeePerformanceData() {
this.loading = true
let { staffItem, queryData } = this
findStoreEmployeePerformance({
// phone: "18978849947",
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.loading = false
this.aiJy = res.aiJy
})
},
// getStaffTagCourseList(courseForm = {}) {
// console.log(this.staffItem, " this.staffItem")
// let params = {
// staffPhone: this.staffItem.phone,
// currentPage: 1,
// pageSize: 99999,
// queryAll: false,
// ...courseForm
// }
// getStaffTagCourseList(params).then((res) => {
// this.courseList = res ? res.list : []
// })
// },
handleStatistics(res) {
let total = 0,
complete = 0
res.forEach((item) => {
if (item.courseConfigFlag == 1) {
complete++
}
total++
})
this.statisticsObj = {
total,
complete
}
console.log(this.statisticsObj)
},
getStaffInfoData() {
return new Promise((resolve, reject) => {
let { unionOrAndType } = this.queryData
let methods = unionOrAndType ? customizeList : findStaffByMerchantNo
methods(this.queryData).then((res) => {
console.log(res)
if (res) {
resolve(res)
}
//员工统计
this.handleStatistics(res)
})
})
},
handleClick(index) {
this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex]
this.findStoreEmployeePerformanceData()
},
handleTabClick(index) {
this.activeName = index
......@@ -93,6 +180,38 @@ export default {
1: "couseAllocation"
}
this.tabName = arr[+this.activeName]
this.$nextTick(() => {
console.log(this.$refs.components)
if (index == 0) {
//查询员工详情
this.$refs.components?.findStoreEmployeePerformanceData()
// this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
// this.getStaffTagCourseList()
this.$refs.components?.getStaffTagCourseList()
}
})
},
handleEndConfigure() {
if (this.statisticsObj.total != this.statisticsObj.complete) {
this.$confirm("还有员工未完成课程配置,是否确定结束配置?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$router.push({
name: "longCourse"
})
})
.catch(() => {})
} else {
this.$router.push({
name: "longCourse"
})
}
}
}
}
......@@ -107,13 +226,14 @@ export default {
min-width: 200px;
width: 200px;
height: 100%;
min-height: 760px;
min-height: 100%;
background: #ffffff;
margin-right: 16px;
box-sizing: border-box;
.header {
display: flex;
align-items: flex-start;
margin: 12px 0 8px 13px;
margin: 12px 0 12px 13px;
.staff-icon {
width: 16px;
height: 16px;
......@@ -137,18 +257,22 @@ export default {
overflow-y: auto;
.staff-item {
color: #666666;
font-size: 16px;
font-size: 14px;
font-weight: 400;
padding: 10px 12px 10px 36px;
position: relative;
.employeeName {
width: 90px;
white-space: wrap;
}
.config {
position: absolute;
border-radius: 2px;
border: 1px solid #2cca74;
background: #e9eef7;
padding: 4px 8px;
padding: 2px 6px;
color: #2cca74;
font-size: 12px;
font-size: 11px;
font-weight: 500;
top: 10px;
right: 12px;
......@@ -162,7 +286,7 @@ export default {
}
}
.right-wrap {
min-height: 760px;
min-height: 100%;
width: calc(100% - 216px);
min-width: 984px;
overflow-x: auto;
......@@ -180,14 +304,14 @@ export default {
box-sizing: border-box;
text-align: center;
margin-right: 2px;
border: 1px solid #e5e5e5;
// border: 1px solid #e5e5e5;
background: #f8f8f8;
}
.active {
color: #2a58ad;
font-size: 16px;
font-weight: 500;
border: 1px solid #e5e5e5;
// border: 1px solid #e5e5e5;
background: #ffffff;
}
}
......
<!-- 倒计时 -->
<template>
<div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
{{ countdown }}
</div>
</template>
<script>
export default {
data() {
return {
countdown: "",
isOvertime: false
}
},
mounted() {
this.startCountdown()
},
methods: {
startCountdown() {
const now = new Date()
const wednesday = new Date(now)
// 计算本周三的日期
const day = now.getDay()
const diff = (day - 3 + 7) % 7 // 3代表星期三
wednesday.setDate(wednesday.getDate() - diff)
wednesday.setHours(23, 59, 59, 0)
// 如果今天是周四或周五
if (day === 4 || day === 5) {
this.isOvertime = true
this.countdown = "已超出本周配课时间,学员需本周日前完成学习"
return
}
// 如果已过本周三,显示下周三
if (now > wednesday) {
wednesday.setDate(wednesday.getDate() + 7)
}
// 开始倒计时
this.updateCountdown(wednesday)
},
updateCountdown(endTime) {
const now = new Date()
if (now >= endTime) {
this.isOvertime = true
this.countdown = "已超出本周配课时间,学员需本周日前完成学习"
return
}
const diff = endTime - now
const days = Math.floor(diff / (1000 * 60 * 60 * 24))
const hours = Math.floor((diff / (1000 * 60 * 60)) % 24)
const minutes = Math.floor((diff / (1000 * 60)) % 60)
const seconds = Math.floor((diff / 1000) % 60)
this.countdown = `倒计时:完成本周课程配置还剩 ${days}天${hours}时${minutes}分${seconds}秒`
setTimeout(() => this.updateCountdown(endTime), 1000)
}
}
}
</script>
<style>
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
</style>
<!-- 课程任务配置 -->
<template>
<div class="couse-wrap">
<div class="header">
课程任务配置
<count-down></count-down>
<!-- <div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div> -->
</div>
<div class="condition">
<div class="couse-tabs" v-if="longForm.scene != 3">
<div
:class="['couse-tabs-item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in longAllData[longForm.scene]"
:key="index"
@click="handleClick(index)"
>
{{ item.brand }}
</div>
</div>
<el-button
size="small"
type="primary"
class="custom-btn"
@click="handleCustom"
v-if="longForm.isDisabled"
>自定义配课</el-button
>
</div>
<div class="couse-content">
<div
class="content-item"
v-for="(metric, mIndex) in metricRuleList"
:key="mIndex"
>
<div class="name">{{ metric.metricName }}</div>
<div class="value">{{ metric.itemBrand }}</div>
<div class="configuration">
<div class="item">
<div>可配置</div>
<div
class="number"
v-if="metric.merchantCount || metric.merchantCount === 0"
>
{{ metric.merchantCount }}家
</div>
<div v-else class="number">-</div>
</div>
<div class="item">
<div>
{{
metric.matchMerchantCourseCount == null ? "未配课" : "已配置"
}}
</div>
<div
class="number"
v-if="
metric.matchMerchantCourseCount ||
metric.matchMerchantCourseCount === 0
"
>
{{ metric.matchMerchantCourseCount }}家
</div>
<div v-else class="number">-</div>
</div>
</div>
<div class="btns">
<div
:class="[metric.merchantCount ? 'details' : 'disabled']"
@click="handleDetail(metric)"
>
详情
</div>
<div
:class="[metric.merchantCount ? 'configure-course' : 'disabled']"
@click="handleConfigureCourse(metric)"
v-if="longForm.isDisabled"
>
配置课程
</div>
</div>
</div>
</div>
<!-- 自定义 -->
<custom-couse
:longForm="longForm"
:longItemData="longAllData[longForm.scene][activeIndex]"
:customVisible="customVisible"
v-if="customVisible"
@dialogClose="handleCloseDialog"
></custom-couse>
</div>
</template>
<script>
import customCouse from "./customCouse.vue"
import countDown from "./countDown.vue"
import {
findAllItemByConfigId,
findStaffByMerchantNo
} from "@/api/serviceCentre"
export default {
components: { customCouse, countDown },
data() {
return {
activeIndex: 0,
customVisible: false
}
},
props: {
longAllData: {
type: Object,
default: () => {}
},
longForm: {
type: Object,
default: () => {}
}
},
watch: {
longForm: {
handler(val) {
this.activeIndex = 0
this.findAllItemByConfigIdData()
},
deep: true
}
},
computed: {
metricRuleList() {
if (this.longAllData[this.longForm.scene]) {
return this.longAllData[this.longForm.scene][this.activeIndex]
.metricRuleList
}
}
},
mounted() {
// this.findAllItemByConfigIdData()
},
methods: {
findAllItemByConfigIdData() {
setTimeout(() => {
let params = {
...this.longForm,
configId: this.longAllData[this.longForm.scene][this.activeIndex].id
}
findAllItemByConfigId(params).then((res) => {
if (
params.configId ==
this.longAllData[this.longForm.scene][this.activeIndex].id
) {
this.longAllData[this.longForm.scene][
this.activeIndex
].metricRuleList = res
}
})
console.log(params.configId, 99999)
this.$emit("changeBrand", params.configId)
}, 0)
},
async handleConfigureCourse(item) {
let brandId = this.longAllData[this.longForm.scene][this.activeIndex].id
if (item.merchantCount) {
let data = await this.getStaffInfoData(item.merchantNos)
if (data && data.length > 0) {
this.$router.push({
name: "configureCourse",
query: {
scene: this.longForm.scene,
merchantNos: item.merchantNos,
brandId: brandId
}
})
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
},
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => {
findStaffByMerchantNo({
merchantNos,
scene: this.longForm.scene
}).then((res) => {
console.log(res)
resolve(res)
})
})
},
handleDetail(row) {
if (row.merchantCount) {
row.isDisabled = this.longForm.isDisabled
row.activeName = "indicatorInfo"
row.scene = this.longForm.scene
row.pageId = row.id
this.$emit("openWindow", row)
}
},
handleClick(index) {
console.log(index)
this.activeIndex = index
this.findAllItemByConfigIdData()
},
handleCustom() {
this.customVisible = true
},
handleCloseDialog() {
this.customVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couse-wrap {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
}
.condition {
display: flex;
align-items: center;
margin: 16px 20px 8px 20px;
position: relative;
height: 32px;
.couse-tabs {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
padding: 6px 20px;
background: #f2f3f5;
border-radius: 2px;
line-height: 20px;
color: #333333;
font-size: 14px;
font-weight: 500;
margin: 0 8px 8px 0;
cursor: pointer;
}
.active {
color: #2a58ad;
background: #2a58ad26;
}
}
.custom-btn {
position: absolute;
right: 0;
top: -1px;
}
}
.couse-content {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 20px;
.content-item {
min-width: 278px;
width: calc((100% / 4) - (16px * 3 / 4));
padding: 20px;
border-radius: 4px;
background: #f8faff;
height: 204px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 16px;
.name {
color: #1d1d1d;
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.value {
color: #1d1d1d;
font-size: 14px;
font-weight: 400;
line-height: 20px;
margin: 4px 0 16px;
}
.configuration {
display: flex;
align-items: center;
margin-bottom: 16px;
justify-content: space-between;
.item {
width: 114px;
color: #888888;
font-size: 14px;
font-weight: 400;
.number {
color: #1d1d1d;
font-size: 16px;
font-weight: 400;
line-height: 24px;
margin-top: 4px;
}
}
}
}
.content-item:nth-child(4n) {
margin-right: 0;
}
.btns {
display: flex;
align-items: center;
justify-content: space-between;
color: #2a58ad;
font-size: 14px;
font-weight: 400;
.details {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
border: 1px solid #2a58ad80;
background: #ffffff;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.disabled {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
line-height: 32px;
text-align: center;
color: rgb(188, 190, 194);
background-color: rgb(244, 244, 245);
border-color: rgb(233, 233, 235);
}
.configure-course {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
background: #dfe6f3;
line-height: 32px;
text-align: center;
cursor: pointer;
}
}
}
}
</style>
......@@ -13,21 +13,23 @@
<div class="itemDiv">
<el-form-item label="姓名:"
class="halfItem">
{{ staffInfo.staffName ? staffInfo.staffName : "-" }}
{{ paramsObj.staffName ? paramsObj.staffName : "-" }}
</el-form-item>
<el-form-item label="手机号码:"
class="halfItem">
{{ staffInfo.staffPhone ? staffInfo.staffPhone : "-" }}
{{ paramsObj.staffPhone ? paramsObj.staffPhone : "-" }}
</el-form-item>
<el-form-item label="门店:"
class="halfItem">
{{ staffInfo.merchantNames ? staffInfo.merchantNames : "-" }}
class="halfItem"
:title="paramsObj.merchantName">
{{ paramsObj.merchantName ? (paramsObj.merchantName.length > 15 ? (paramsObj.merchantName.slice(0, 15) + '...') : paramsObj.merchantName) : '' }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="上级:"
class="halfItem">
{{ staffInfo.superiors ? staffInfo.superiors : "-" }}
class="halfItem"
:title="staffInfo.superiors">
{{ staffInfo.superiors ? (staffInfo.superiors.length > 15 ? (staffInfo.superiors.slice(0, 15) + '...') : staffInfo.superiors) : '' }}
</el-form-item>
<el-form-item label="导师:"
class="halfItem">
......@@ -37,8 +39,9 @@
<div class="div-title">任务信息</div>
<div class="itemDiv">
<el-form-item label="学习任务名称:"
class="halfItem">
{{ paramsObj.title ? paramsObj.title : "-" }}
class="halfItem"
:title="paramsObj.title">
{{ paramsObj.title ? (paramsObj.title .length > 15 ? (paramsObj.title .slice(0, 15) + '...') : paramsObj.title ) : '' }}
</el-form-item>
<el-form-item label="任务状态:"
class="halfItem">
......@@ -67,6 +70,7 @@
<div class="div-title">课程列表</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:has-page="false"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
......@@ -75,18 +79,21 @@
</div>
</div>
</div>
</basedialog>
</baseDialog>
</div>
</template>
<script>
import { staffCourse, staffInfo } from "@api/serviceCentre"
import { Util, deepClone } from "@/common/util"
import { course_taskStatusOpt, punishStatusOpt, learningProgressOpt } from '@/common/constants.js'
import {
course_taskStatusOpt,
punishStatusOpt,
learningProgressOpt
} from "@/common/constants.js"
export default {
name: "CourseDetailDialog",
components: {
},
components: {},
props: {
visible: {
type: Boolean,
......@@ -104,8 +111,8 @@ export default {
},
set(val) {
// this.$emit("update:visible", val)
console.log('this.refreshFlag', this.refreshFlag)
this.$emit('dialogClose', { flag: this.refreshFlag })
console.log("this.refreshFlag", this.refreshFlag)
this.$emit("dialogClose", { flag: this.refreshFlag })
}
}
},
......@@ -135,60 +142,72 @@ export default {
getListApi: staffCourse,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
listName: "list",
tableOption: false,
tableColumns: [{
label: '课程名称',
prop: 'courseName',
width: '300px'
}, {
label: '学习时长',
prop: 'learnDuration'
}, {
label: '学习进度',
prop: 'failReason',
formatter: (cellValue) => {
return this.learningProgressOpt.find(
(item) => item.confId === cellValue.status
)?.confValue + (cellValue.status == 2 ? `(${cellValue.progress}%)` : '')
tableColumns: [
{
label: "课程名称",
prop: "courseName",
width: "300px"
},
{
label: "课程时长",
prop: "courseTotalDuration",
formatter: (cellValue) => {
return cellValue.courseTotalDuration ? cellValue.courseTotalDuration + 'min' : '-'
}
},
{
label: "学习进度",
prop: "failReason",
formatter: (cellValue) => {
return (
this.learningProgressOpt.find(
(item) => item.confId === cellValue.status
)?.confValue +
(cellValue.status == 2 ? `(${cellValue.progress * 100}%)` : "")
)
},
className: (cellValue) => {
return {
1: "ashSpot",
2: "orgenSpot",
5: "greenSpot"
}[cellValue.status]
}
},
{
label: "成绩",
prop: "totalScore"
},
className: (cellValue) => {
return {
1: 'ashSpot',
2: 'orgenSpot',
5: 'greenSpot'
}[cellValue.status]
{
label: "完成时间",
prop: "finishDate"
}
}, {
label: '成绩',
prop: 'totalScore'
}, {
label: '完成时间',
prop: 'finishDate'
}]
]
},
taskStatusOpt: deepClone(course_taskStatusOpt),
punishStatusOpt: deepClone(punishStatusOpt),
learningProgressOpt: deepClone(learningProgressOpt),
taskStatusShow: '',
punishStatusShow: '',
taskStatusShow: "",
punishStatusShow: "",
refreshFlag: false,
colorClass: {
0: 'ashSpot',
1: 'orgenSpot',
2: 'greenSpot'
1: "orgenSpot",
2: "ashSpot"
},
colorClass2: {
1: 'ashSpot',
2: 'orgenSpot',
3: 'greenSpot'
1: "ashSpot",
2: "orgenSpot",
3: "greenSpot"
}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
return new Promise((resolve) => {
this.searchForm.staffStudyId = this.paramsObj.id
this.searchForm.pageSize = 9999
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
......@@ -196,13 +215,13 @@ export default {
getStaffInfo() {
var params = { staffPhone: this.paramsObj.staffPhone }
staffInfo(params).then(res => {
staffInfo(params).then((res) => {
this.staffInfo = res
})
},
getStaffCourse() {
var params = { staffStudyId: this.paramsObj.id }
staffCourse(params).then(res => {
staffCourse(params).then((res) => {
// this.staffInfo = res
})
},
......@@ -214,7 +233,9 @@ export default {
if (info.taskStatus == 1) {
this.taskStatusShow = this.taskStatusShow + `(${info.progress}%)`
}
this.punishStatusShow = this.punishStatusOpt.find(item => item.confId === info.punishStatus)?.confValue
this.punishStatusShow = this.punishStatusOpt.find(
(item) => item.confId === info.punishStatus
)?.confValue || '-'
}
}
}
......@@ -483,7 +504,7 @@ export default {
}
</style>
<style >
<style>
.detailDialog-tooltip-width {
max-width: 500px;
}
......
<!-- 课程任务配置 -->
<template>
<div class="couse-wrap">
<div class="header">
课程任务配置
<div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div>
</div>
<div class="condition">
<div class="couse-tabs">
<div
:class="['couse-tabs-item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in 10"
:key="index"
@click="handleClick(index)"
>
问界
</div>
</div>
<el-button size="small" type="primary" @click="handleCustom"
>自定义配课</el-button
>
</div>
<div class="couse-content">
<div class="content-item" v-for="item in couseData" :key="item">
<div class="name">{{ item.title }}</div>
<div class="value">{{ item.rate }}</div>
<div class="configuration">
<div class="item">
<div>可配置</div>
<div class="number">{{ item.configNum }}家</div>
</div>
<div class="item">
<div>已配置</div>
<div class="number">{{ item.readyNum }}家</div>
</div>
</div>
<div class="btns">
<div class="details" @click="handleDetail(item)">详情</div>
<div class="configure-course" @click="handleConfigureCourse(item)">
配置课程
</div>
</div>
</div>
</div>
<custom-couse
:customVisible="customVisible"
v-if="customVisible"
@dialogClose="handleCloseDialog"
></custom-couse>
</div>
</template>
<script>
import customCouse from "./customCouse.vue"
export default {
components: { customCouse },
data() {
return {
activeIndex: 0,
customVisible: false,
couseData: [
{
title: "月产值",
rate: "<30万",
configNum: 3,
readyNum: 4,
id: 1
}
]
}
},
methods: {
handleConfigureCourse(item) {
this.$router.push({
name: "configureCourse"
// params: { id: item.id }
})
},
handleDetail(row) {
console.log(1111)
row.activeName = "indicatorInfo"
row.pageId = row.id
this.$emit("openWindow", row)
},
handleClick(index) {
console.log(index)
this.activeIndex = index
},
handleCustom() {
this.customVisible = true
},
handleCloseDialog() {
this.customVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couse-wrap {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
}
.condition {
display: flex;
align-items: center;
margin: 16px 20px;
.couse-tabs {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
padding: 6px 20px;
background: #f2f3f5;
border-radius: 2px;
line-height: 20px;
color: #333333;
font-size: 14px;
font-weight: 500;
margin: 0 8px 8px 0;
cursor: pointer;
}
.active {
color: #2a58ad;
background: #2a58ad26;
}
}
}
.couse-content {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 20px;
.content-item {
min-width: 278px;
width: calc((100% / 4) - (16px * 3 / 4));
padding: 20px;
border-radius: 4px;
background: #f8faff;
height: 204px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 16px;
.name {
color: #1d1d1d;
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.value {
color: #1d1d1d;
font-size: 14px;
font-weight: 400;
line-height: 20px;
margin: 4px 0 16px;
}
.configuration {
display: flex;
align-items: center;
margin-bottom: 16px;
.item {
flex: 1;
color: #888888;
font-size: 14px;
font-weight: 400;
.number {
color: #1d1d1d;
font-size: 16px;
font-weight: 400;
line-height: 24px;
margin-top: 4px;
}
}
}
}
.content-item:nth-child(4n) {
margin-right: 0;
}
.btns {
display: flex;
align-items: center;
justify-content: space-between;
color: #2a58ad;
font-size: 14px;
font-weight: 400;
.details {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
border: 1px solid #2a58ad80;
background: #ffffff;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.configure-course {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
background: #dfe6f3;
line-height: 32px;
text-align: center;
cursor: pointer;
}
}
}
}
</style>
......@@ -5,10 +5,27 @@
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
:config="config"
@handleClick="handleConfirm"
@closeDialog="handleClose"
>
<el-form class="edit-sub-block" label-width="160px">
<el-form-item label="归属业务:">
{{
coustomForm.scene == 1
? "延保"
: coustomForm.scene == 2
? "轻改"
: "权益"
}}
</el-form-item>
<el-form-item label="品牌:">
{{ longItemData.brand || "-" }}
</el-form-item>
</el-form>
<glsx-combi-form
ref="editFormRef"
:form-ref="handleFormRef"
label-width="150px"
default-width="400px"
:form-obj="coustomForm"
......@@ -19,26 +36,60 @@
<div class="condition-tabs">
<div
:class="['condition-tab', item.active ? 'active' : '']"
v-for="(item, index) in conditionList"
v-for="(item, index) in conditionData.metricRuleList"
:key="index"
@click="item.active = !item.active"
@click="handleChange(index)"
>
{{ item.text }}
{{ item.metricName }}{{ item.itemBrand }}
</div>
</div>
</template>
</glsx-combi-form>
<div class="footer">
<el-button type="primary" @click="handleConfirm">
{{ config.confirm_name }}
</el-button>
<el-button @click="handleClose">
{{ config.cancel_name }}
</el-button>
</div>
</baseDialog>
</div>
</template>
<script>
import { customizeList } from "@/api/serviceCentre"
export default {
props: {
customVisible: {
type: Boolean,
default: false
},
longItemData: {
type: Object,
default: () => {}
},
longForm: {
type: Object,
default: () => {}
}
},
watch: {
longItemData: {
handler(val) {
this.handleData(val)
},
immediate: true,
deep: true
},
longForm: {
handler(val) {
this.coustomForm.scene = val.scene
},
immediate: true,
deep: true
}
},
computed: {
visible: {
get() {
......@@ -58,25 +109,45 @@ export default {
title: "自定义配课",
width: "720px"
},
config: {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: false,
cancel_name: "重置规则",
confirm_name: "配置课程"
},
handleFormRef: "handleFormRef",
infoRules: {
refundType: [
unionOrAndType: [
{
required: true,
message: "请选择退款类型",
trigger: "blur"
message: "请选择组合筛选条件",
trigger: "change"
}
],
merchantNos: [
{
required: true,
message: "请选择筛选条件",
trigger: "click"
}
]
},
coustomForm: {},
coustomForm: {
merchantNos: "",
unionOrAndType: "",
scene: "",
brandId: ""
},
coustomFormData: [
{
label: "选择筛选条件",
name: "condition",
name: "merchantNos",
addHtml: "condition"
},
{
label: "组合筛选条件:",
name: "condition",
label: "组合筛选条件",
name: "unionOrAndType",
type: "radio",
optionId: "confId",
optionLabel: "confLabel",
......@@ -89,42 +160,102 @@ export default {
confLabel: "符合已选规则(且)",
confId: 2
}
]
],
handleRadioChange: () => {}
}
],
conditionList: [
{
text: "月产值<30万",
value: 1,
active: true
},
{
text: "客单价<9000元",
value: 2,
active: false
},
{
text: "转化率<30%",
value: 3,
active: false
}
]
conditionData: {}
}
},
methods: {
handleChange(index) {
this.conditionData.metricRuleList[index].active =
!this.conditionData.metricRuleList[index].active
let merchantNos = []
this.conditionData.metricRuleList.forEach((item) => {
if (item.active) {
console.log(item)
if (!item.merchantNos || item.merchantNos.length == 0) {
item.merchantNos = [-1]
}
merchantNos.push(item.merchantNos.join(","))
}
})
console.log(merchantNos)
if (merchantNos.length > 0) {
this.$refs.editFormRef.$refs[this.handleFormRef].clearValidate(
`merchantNos`
)
}
this.coustomForm.merchantNos = merchantNos
},
handleData(val) {
this.coustomForm.brandId = val.id
let data = JSON.parse(JSON.stringify(val))
data.metricRuleList.forEach((item) => {
item.active = false
})
this.conditionData = data
},
handleClose() {
this.visible = false
//将已选项进行重置
// this.visible = false
this.coustomForm.merchantNos = ""
this.coustomForm.unionOrAndType = ""
this.coustomForm.brandId = ""
this.conditionData.metricRuleList.forEach((item) => {
item.active = false
})
},
handleConfirm() {
this.visible = false
this.$refs.editFormRef.$refs[this.handleFormRef].validate(
async (valid) => {
if (valid) {
let data = await this.getStaffInfoData()
if (data && data.length > 0) {
this.$router.push({
name: "configureCourse",
query: this.coustomForm
})
this.visible = false
} else {
this.$message({
message: "选中指标无匹配驻店人员",
type: "warning"
})
}
}
}
)
},
getStaffInfoData() {
return new Promise((resolve, reject) => {
customizeList({ ...this.coustomForm }).then((res) => {
console.log(res)
resolve(res)
})
})
}
}
}
</script>
<style scoped lang="scss">
.coustom-dialog {
.glsx-combi-form .el-form-item--small.el-form-item {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.footer {
display: flex;
justify-content: flex-end;
}
}
.condition-tabs {
display: flex;
align-items: center;
flex-wrap: wrap;
width: 500px;
.condition-tab {
padding: 6px 12px;
border-radius: 2px;
......
......@@ -6,6 +6,9 @@ import * as echarts from "echarts"
export default {
name: "barChart",
props: {
title: {
type: String
},
colors: {
type: Array,
default: () => ["#FFC154", "#FF9671"]
......@@ -18,6 +21,13 @@ export default {
type: Array,
default: []
},
rate: {
type: String
},
dataRate: {
type: Array,
default: () => []
},
id: {
type: String,
default: ""
......@@ -38,9 +48,9 @@ export default {
// this.lineOptions = this.revese ? getBarReverseOptions(obj) : getBarOptions(obj)
// },
watch: {
analysisList: {
yData: {
handler() {
this.chart.setOption(this.getChartSetOption())
this.chart.setOption(this.getChartSetOption(), { notMerge: true })
},
deep: true
}
......@@ -48,15 +58,74 @@ export default {
mounted() {
this.client = this.$refs[this.id]
this.chart = echarts.init(this.client)
this.chart.setOption(this.getChartSetOption())
this.chart.setOption(this.getChartSetOption(), { notMerge: true })
window.addEventListener("resize", this.resizeHandler)
},
methods: {
resizeHandler() {
if (this.chart) {
this.chart.clear()
setTimeout(() => {
this.chart.setOption(this.getChartSetOption(), { notMerge: true })
this.chart.resize()
}, 1000)
}
},
getChartSetOption() {
var options = {
tooltip: {
trigger: "axis",
axisPointer: {
lineStyle: {
type: "solid"
}
},
padding: 12,
borderColor: "transparent",
borderWidth: 1,
backgroundColor: "rgba(255, 255, 255, 0.95)",
borderRadius: 4,
textStyle: {
color: "rgba(0, 0, 0, 0.65)",
fontSize: 14
},
formatter: (params) => {
let rate = String(this.dataRate[params[0].dataIndex][this.rate])
return `
<div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${
params[0].name
}</div>
<div style="rgba(0, 0, 0, 0.65);display:flex;align-items:center; line-height: 20px;"> <div style="width: 6px;
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${
params[0].value === 0 ? params[0].value : params[0].value || "-"
}
</div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "#2CCA74"
: "#EB4E4E"
}">${rate == "null" ? "-" : rate ? rate + "%" : 0 + "%"}${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "↓"
: "↑"
}</span></div>
`
}
},
xAxis: {
type: "category",
splitNumber: 4,
axisLabel: {
// rotate: 30, // 横轴名称旋转
interval: 0,
show: true,
color: "#000000a6",
fontSize: "11px"
},
......@@ -81,13 +150,15 @@ export default {
},
yAxis: {
type: "value",
splitLine: {
lineStyle: {
color: "#E7EBEF"
}
},
axisLabel: {
show: false
show: false,
color: "transparent"
},
axisLine: { show: false, color: "#E7EBEF" },
axisTick: { show: false, color: "transparent" },
splitLine: {
show: true, // 根据截图隐藏网格线
color: "#F5F7F8"
}
// splitNumber: 4
},
......@@ -103,13 +174,34 @@ export default {
show: true,
color: "#999999"
},
barWidth: "35%",
itemStyle: {
color: "#2A58AD"
},
barWidth: "25%",
data: this.yData
}
]
}
return options
},
destroyChart() {
// 移除窗口 resize 事件监听器
window.removeEventListener("resize", this.resizeHandler)
// 销毁 ECharts 实例
if (this.chart) {
this.chart.dispose()
this.chart = null
}
}
},
beforeDestroy() {
this.destroyChart()
},
// 如果使用的是 Vue 3,则使用 beforeUnmount
beforeUnmount() {
this.destroyChart()
}
}
</script>
......
......@@ -27,18 +27,30 @@ export default {
id: {
type: String,
default: ""
},
title: {
type: String,
default: ""
},
rate: {
type: String
},
dataRate: {
type: Array,
default: () => []
}
},
watch: {
xData: {
handler() {
this.chart.setOption(this.getChartSetOption())
}
},
// xData: {
// handler() {
// this.chart.setOption(this.getChartSetOption())
// }
// },
yData: {
handler() {
this.chart.setOption(this.getChartSetOption())
}
},
deep: true
}
},
mounted() {
......@@ -60,31 +72,73 @@ export default {
getChartSetOption() {
var option = {
grid: {
bottom: "12%",
top: "10%",
left: "15%",
right: "20px"
top: "8%",
bottom: "4%",
left: "6%",
right: "6%",
containLabel: true
},
tooltip: {
show: true,
trigger: "axis",
triggerOn: "click",
backgroundColor: "rgba(41, 45, 51, 1)",
borderRadius: 15,
borderColor: "rgba(41, 45, 51, 1)",
axisPointer: {
lineStyle: {
type: "solid"
}
},
padding: 12,
borderColor: "transparent",
borderWidth: 1,
backgroundColor: "rgba(255, 255, 255, 0.95)",
borderRadius: 4,
textStyle: {
// 悬浮框文字样式
color: "#fff",
fontSize: 12
color: "rgba(0, 0, 0, 0.65)",
fontSize: 14
},
formatter: (params) => {
return params[0].value
console.log(params)
console.log(this.dataRate)
let rate = String(this.dataRate[params[0].dataIndex][this.rate])
console.log(
rate,
rate == "null" || params[0].value === 0,
rate.indexOf("-") > -1
)
return `
<div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${
params[0].name
}</div>
<div style="rgba(0, 0, 0, 0.65);display:flex;align-items:center; line-height: 20px;"> <div style="width: 6px;
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${
params[0].value === 0
? "0%"
: params[0].value
? params[0].value + "%"
: "-"
}
</div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "#2CCA74"
: "#EB4E4E"
}">${rate == "null" ? "-" : rate ? rate + "%" : 0 + "%"}${
rate == "null" || rate == 0
? ""
: rate.indexOf("-") > -1
? "↓"
: "↑"
}</span></div>
`
}
},
xAxis: {
type: "category",
boundaryGap: false,
splitNumber: 8,
// boundaryGap: false,
splitNumber: 4,
axisLine: {
show: false
},
......@@ -92,12 +146,14 @@ export default {
show: false
},
splitLine: {
show: false
show: false, // 根据截图隐藏网格线
color: "#F5F7F8"
},
axisLine: {
show: false
},
axisLabel: {
// rotate: 30, // 横轴名称旋转
interval: 0,
show: true,
color: "#000000a6",
......@@ -120,10 +176,8 @@ export default {
show: false
},
splitLine: {
show: true,
lineStyle: {
color: "#E7EBEF"
}
show: true, // 根据截图隐藏网格线
color: "#F5F7F8"
},
axisTick: {
show: false
......@@ -149,7 +203,25 @@ export default {
]
}
return option
},
destroyChart() {
// 移除窗口 resize 事件监听器
window.removeEventListener("resize", this.resizeHandler)
// 销毁 ECharts 实例
if (this.chart) {
this.chart.dispose()
this.chart = null
}
}
},
beforeDestroy() {
this.destroyChart()
},
// 如果使用的是 Vue 3,则使用 beforeUnmount
beforeUnmount() {
this.destroyChart()
}
}
</script>
......
......@@ -2,35 +2,74 @@
<template>
<div class="week-replay">
<div class="header">
课程任务配置<span class="time">(2025-06-09 至 2025-06-15)</span>
上周学习复盘<span class="time"
>({{ lastForm.startTime }} 至 {{ lastForm.endTime }})</span
>
</div>
<div class="improve">
<div
:class="['item', activeIndex == index ? 'active' : '']"
:class="['item', activeIndex == index + 1 ? 'active' : '']"
v-for="(item, index) in improveList"
:key="item.id"
@click="handleClick(index)"
>
{{ item.name }}
</div>
</div>
<d2-table
class="couse-table"
ref="recordTable"
ref="lastTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
v-if="show"
>
<div slot="merchantName" slot-scope="scope">
<template
v-if="
scope.scope.merchantName &&
scope.scope.merchantName.split(',').length > 1
"
>
<span>{{
scope.scope.merchantName.split(",").slice(0, 1).join("")
}}</span>
<el-popover placement="top" width="fit-content" trigger="hover">
<div
:class="{
serverHeight: scope.scope.merchantName.split(',').length >= 10
}"
>
<div
v-for="(item, index) in scope.scope.merchantName.split(',')"
:key="index"
>
{{ item }}
</div>
</div>
<span class="more-info" slot="reference"
>...({{ scope.scope.merchantName.split(",").length }})</span
>
</el-popover>
</template>
<template v-else>
<span>{{
scope.scope.merchantName ? scope.scope.merchantName : "--"
}}</span>
</template>
</div>
<div slot="auth-button" slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px; cursor: pointer">
<el-button type="text" @click="handleLookCouse"> 查看课程 </el-button>
<el-button type="text" @click="handleLookCouse(scope.scope)">
查看课程
</el-button>
</span>
</div>
<!-- 查看课程 -->
</d2-table>
<long-detail-dialog
:longForm="longForm"
:longVisible.sync="detailVisible"
v-if="detailVisible"
:params-obj="recordInfo"
......@@ -39,8 +78,10 @@
</div>
</template>
<script>
import { invoicePage } from "@api/invoiceManage"
import longDetailDialog from "./longDetailDialog"
import { Util, deepClone } from "@/common/util"
import { course_taskStatusOpt } from "@/common/constants.js"
import { taskStaffStudyPage } from "@api/serviceCentre"
export default {
components: { longDetailDialog },
data() {
......@@ -48,91 +89,147 @@ export default {
detailVisible: false,
recordInfo: "",
show: false,
activeIndex: 0,
searchFormSearch: {},
getListApi: invoicePage,
activeIndex: 1,
searchFormSearch: {
studyStatus: "1",
sendStartTime: "",
sendEndTime: ""
},
baseData: {
taskStatusOpt: deepClone(course_taskStatusOpt)
},
getListApi: taskStaffStudyPage,
improveList: [
{
name: "未改善",
id: 1
},
{
name: "已改善",
id: 2
}
// {
// name: "已改善",
// id: 2
// }
],
column: [
{
label: "驻店人员",
prop: "invoiceAmount",
prop: "staffName",
width: "150",
isHide: false
},
{
label: "手机号码",
prop: "phone",
prop: "staffPhone",
width: "150",
isHide: false
},
{
label: "门店名称",
prop: "itemNames",
prop: "merchantName",
addHtml: "merchantName",
width: "300",
isHide: false
},
{
label: "主营品牌",
prop: "merchantBrandName",
width: "300",
prop: "mainBrand",
isHide: true
},
{
label: "学习任务情况",
prop: "expireStatus",
width: "120px",
isHide: false
isHide: false,
formatter: (cellValue) => {
return (
this.baseData.taskStatusOpt.find(
(item) => item.confId === cellValue.taskStatus
)?.confValue +
(cellValue.taskStatus == 1
? `(${
cellValue.progress ? cellValue.progress.toFixed(1) : "0"
}%)`
: "")
)
},
className: (cellValue) => {
return {
2: "ashSpot",
1: "orgenSpot",
0: "greenSpot"
}[cellValue.taskStatus]
}
},
{
label: "任务完成时间",
prop: "createdDate",
width: "180",
prop: "passedTime",
isHide: false
}
],
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
// mutiSelectUniqueKey: 'id',
// mutiSelectName: 'invoiceCode',
listName: "list",
tableOption: { width: "150px" },
tableColumns: []
}
}
},
created() {
this.handleClick(0)
props: {
longForm: {
type: Object,
default: () => {}
},
lastForm: {
type: Object,
default: () => {}
},
configId: {
type: String
}
},
mounted() {
// this.handleClick()
},
methods: {
handleSearch() {
setTimeout(() => {
this.$refs.lastTable.refreshTable()
}, 0)
},
beforeSearchFn() {
console.log(this.longForm)
return new Promise((resolve) => {
this.searchFormSearch.sendStartTime =
this.lastForm.startTime + " 00:00:00"
this.searchFormSearch.studyStatus = 1
this.searchFormSearch.sendEndTime = this.lastForm.endTime + " 23:59:59"
this.searchFormSearch.scene = this.longForm.scene
this.searchFormSearch.startTime = this.lastForm.startTime + " 00:00:00"
this.searchFormSearch.endTime = this.lastForm.endTime + " 23:59:59"
this.searchFormSearch.configId = this.configId
resolve()
})
},
closeDetailDialog() {
this.detailVisible = !this.detailVisible
this.$refs.recordTable.refreshTable(false, true)
this.handleSearch()
},
handleLookCouse() {
console.log("查看课程")
handleLookCouse(row) {
this.recordInfo = row
this.detailVisible = true
},
handleClick(index) {
this.show = false
this.activeIndex = index
if (this.activeIndex == 0) {
this.column[this.findAttrIdx("merchantBrandName")].isHide = true
this.column[this.findAttrIdx("phone")].isHide = false
this.activeIndex = index ? index : this.activeIndex
if (this.activeIndex == 1) {
this.column[this.findAttrIdx("mainBrand")].isHide = true
this.column[this.findAttrIdx("staffPhone")].isHide = false
} else {
this.column[this.findAttrIdx("merchantBrandName")].isHide = false
this.column[this.findAttrIdx("phone")].isHide = true
this.column[this.findAttrIdx("mainBrand")].isHide = false
this.column[this.findAttrIdx("staffPhone")].isHide = true
}
this.searchFormSearch.studyStatus = index
this.filterColumn()
},
filterColumn() {
......@@ -143,6 +240,7 @@ export default {
this.$nextTick(() => {
this.show = true
})
this.handleSearch()
},
findAttrIdx(attrName) {
return this.column.findIndex((item) => item.prop == attrName)
......@@ -152,8 +250,9 @@ export default {
</script>
<style lang="scss" scoped>
.week-replay {
margin-top: 16px;
margin: 16px 0;
background: #fff;
padding: 0 0 16px 0;
.header {
color: #111111;
font-size: 16px;
......
......@@ -5,6 +5,7 @@
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
:config="config"
@handleClick="handleConfirm"
@closeDialog="handleClose"
>
......@@ -16,17 +17,20 @@
:form-rules="infoRules"
>
<template slot="multiple" slot-scope="scope">
<el-checkbox v-model="checkAll" @change="handleCheckAllChange"
<el-checkbox
v-model="checkAll"
@change="handleCheckAllChange"
:disabled="disabled"
>全选</el-checkbox
>
<div class="staff-list">
<div
:class="['staff-item', item.active ? 'active' : '']"
v-for="(item, index) in staffList"
v-for="(item, index) in selectStaffList"
:key="index"
@click="item.active = !item.active"
@click="handleChooseStaff(index)"
>
{{ item.text }}
{{ item.employeeName }}
</div>
</div>
</template>
......@@ -35,11 +39,29 @@
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
export default {
props: {
multipleVisible: {
type: Boolean,
default: false
},
staffList: {
type: Array,
default: () => []
},
staffItem: {
type: Object,
default: () => {}
}
},
watch: {
staffList: {
handler(val) {
this.filterStaffList(deepClone(val))
},
deep: true,
immediate: true
}
},
computed: {
......@@ -61,7 +83,15 @@ export default {
title: "多人配置",
width: "720px"
},
checkAll: true,
config: {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: "取 消",
confirm_name: "确定配置"
},
disabled: false,
checkAll: false,
infoRules: {
refundType: [
{
......@@ -79,80 +109,54 @@ export default {
addHtml: "multiple"
}
],
staffList: [
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
}
]
selectStaffList: []
}
},
methods: {
reset() {
this.checkAll = []
this.selectStaffList = []
},
handleChooseStaff(index) {
if (this.staffItem.phone != this.selectStaffList[index].phone) {
this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
}
},
filterStaffList(val) {
this.selectStaffList = []
val.forEach((item) => {
if (item.courseConfigFlag != 1) {
this.selectStaffList.push(item)
}
})
this.checkAll = this.selectStaffList.every((item) => item.active)
if (
this.selectStaffList.length == 1 &&
this.selectStaffList[0].phone == this.staffItem.phone
) {
this.disabled = true
} else {
this.disabled = false
}
},
handleCheckAllChange() {
this.staffList.forEach((item) => {
item.active = this.checkAll
this.selectStaffList.forEach((item) => {
if (item.phone == this.staffItem.phone) {
item.active = true
} else {
item.active = this.checkAll
}
})
},
handleClose() {
this.visible = false
},
handleConfirm() {
// console.log("this.selectStaffList", this.selectStaffList, this.checkAll)/
let arr = this.selectStaffList.filter((item) => item.active)
// console.log(arr)
this.$emit("handleMultiple", arr)
this.visible = false
}
}
......
<!-- 业绩状况 -->
<template>
<div class="performance-status">
<div class="header">业绩状况(延保)</div>
<div class="header">
业绩状况({{
queryData.scene == 1 ? "延保" : queryData.scene == 2 ? "轻改" : "权益"
}})
</div>
<div class="tabs">
<div
:class="{
......@@ -20,28 +24,37 @@
<div class="content-item">
<div class="title">个人产值(元)</div>
<echart-bar
title="个人产值"
class="echart"
id="production"
id="Output"
:rate="'outputChangeRatio'"
:dataRate="performanceItemInfo"
:xData="xData"
:yData="yData"
:yData="yOutputData"
></echart-bar>
</div>
<div class="content-item">
<div class="title">转化率(%)</div>
<echart-line
title="转化率"
class="echart"
id="production"
id="Conversion"
:rate="'conversionChangeRatio'"
:dataRate="performanceItemInfo"
:xData="xData"
:yData="yData"
:yData="yConversionData"
></echart-line>
</div>
<div class="content-item">
<div class="title">客单价(元)</div>
<echart-bar
title="客单价"
class="echart"
id="production"
id="AverageOrderValue"
:rate="'aovChangeRatio'"
:dataRate="performanceItemInfo"
:xData="xData"
:yData="yData"
:yData="yAverageOrderValueData"
></echart-bar>
</div>
</div>
......@@ -59,24 +72,90 @@ export default {
name: "performanceStatus",
data() {
return {
xData: ["2021-01-01", "2021-01-02", "2021-01-03", "2021-01-04"],
yData: [15600, 24897, 24897, 18350],
xData: [],
yOutputData: [], //产值
yConversionData: [], //转化率
yAverageOrderValueData: [], //客单价
activeIndex: 0,
activeType: "week",
timeData: [
{
text: "近4周",
value: 1
value: "week"
},
{
text: "近4月",
value: 2
value: "month"
}
]
],
performanceItemInfo: [],
queryData: {}
}
},
watch: {
performanceInfo: {
handler(val) {
console.log(val, "业绩状况")
this.initData()
},
deep: true,
immediate: true
}
},
props: {
performanceInfo: {
type: Array,
default: () => []
}
},
created() {
this.queryData = this.$route.query
},
methods: {
initData() {
this.performanceInfo.forEach((item) => {
if (item.timeUnit == this.activeType) {
this.performanceItemInfo = item.data
this.handleData(item.data)
}
})
},
handleData(data) {
let xData = [],
yOutputData = [],
yConversionData = [],
yAverageOrderValueData = []
//近四周
if (this.activeIndex == 0) {
data.forEach((item) => {
// let timeStr = item.startTime + "-" + item.endTime
xData.push(item.endTime)
yOutputData.push(item.personalOutput)
// yOutputDataRate
yConversionData.push(item.conversionRate)
yAverageOrderValueData.push(item.averageOrderValue)
})
} else {
//近四月
data.forEach((item) => {
// let timeStr = item.startTime + "-" + item.endTime
xData.unshift(item.endTime.substring(0, 7))
yOutputData.unshift(item.personalOutput)
// yOutputDataRate
yConversionData.unshift(item.conversionRate)
yAverageOrderValueData.unshift(item.averageOrderValue)
})
}
this.xData = xData
this.yOutputData = yOutputData
this.yConversionData = yConversionData
this.yAverageOrderValueData = yAverageOrderValueData
},
handleClick(index) {
this.activeIndex = index
this.activeType = this.timeData[index].value
this.initData()
}
}
}
......
<!-- 员工详情 -->
<template>
<div class="staff-detail">
<div class="staff-detail-wrap">
<div class="header">基础信息</div>
<div class="baseInfo">
<div class="form_div" v-if="infoData && infoData.length">
......@@ -11,15 +11,60 @@
<el-form-item :label="item.title">
<div
v-if="item.className"
:class="[item.className(detailInfo)]"
:class="[item.className(baseInfo)]"
></div>
{{
item.formatter
? item.formatter(detailInfo)
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
<template
v-if="item.key == 'store' || item.key == 'regionManager'"
>
<template
v-if="
baseInfo[item.key] &&
baseInfo[item.key].split(',').length > 1
"
>
<span>{{
baseInfo[item.key].split(",").slice(0, 1).join("")
}}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<div
:class="{
serverHeight:
baseInfo[item.key].split(',').length >= 10
}"
>
<div
v-for="(item, index) in baseInfo[item.key].split(
','
)"
:key="index"
>
{{ item }}
</div>
</div>
<span class="more-info" slot="reference"
>...({{ baseInfo[item.key].split(",").length }})</span
>
</el-popover>
</template>
<template v-else>
<span>{{
baseInfo[item.key] ? baseInfo[item.key] : "-"
}}</span>
</template>
</template>
<template v-else>
{{
item.formatter
? item.formatter(baseInfo)
: baseInfo[item.key]
? baseInfo[item.key]
: "-"
}}
</template>
</el-form-item></el-col
>
</template>
......@@ -28,111 +73,164 @@
</div>
</div>
<!-- 业绩状况 -->
<performance-status :detailInfo="detailInfo"></performance-status>
<performance-status :performanceInfo="performanceInfo"></performance-status>
<!-- 谈客能力-->
<div class="header">谈客能力</div>
<div class="presentation">
<div
v-for="(item, index) in capacityList"
:key="index"
class="capacity-line"
>
<div class="title">{{ item.title }}</div>
<div class="capacity">
<div
class="capacity-item"
v-for="(child, seconds) in item.children"
:key="seconds"
>
{{ child.title }}
<template v-if="queryData.brandId == 1 && queryData.scene == 1">
<div class="header">谈客能力</div>
<div class="presentation">
<div
v-for="(item, index) in capacityList"
:key="index"
class="capacity-line"
>
<div class="title">{{ item.title }}</div>
<div class="capacity">
<div
:class="['capacity-item', item.key == 'ohterList' ? 'other' : '']"
v-for="(child, chindIndex) of item.children"
:key="chindIndex"
>
{{ child.label }}:{{ child.value }}
</div>
</div>
</div>
</div>
</div>
</template>
<!-- 学习情况 -->
<learning-situation></learning-situation>
<learning-situation
:learningProgress="learningProgress"
></learning-situation>
</div>
</template>
<script>
import LearningSituation from "./learningSituation.vue"
import PerformanceStatus from "./performanceStatus.vue"
import { long_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util"
import { findStoreEmployeePerformance } from "@/api/serviceCentre"
export default {
components: {
PerformanceStatus,
LearningSituation
},
props: {
staffItem: {
type: Object,
default: () => {}
}
},
watch: {
staffItem: {
handler(val) {
this.findStoreEmployeePerformanceData()
},
// immediate: true,
deep: true
}
},
data() {
return {
detailInfo: {},
businessOpt: deepClone(long_businessOpt),
aiJy: "",
baseInfo: {},
performanceInfo: [],
consultationAbility: {},
learningProgress: {},
infoData: [
{
title: "入职时间:",
key: "employeeName",
formatter(cellValue) {
return cellValue.employeeName
}
key: "joinDateTag"
},
{
title: "上级:",
key: "fileUrl"
key: "regionManager"
},
{
title: "导师:",
key: "carModel"
key: "mentor"
},
{
title: "门店:",
key: "merchantName"
key: "store"
},
{
title: "归属业务:",
key: "merchantName"
key: "businessType",
formatter: (cellValue) => {
return (
this.businessOpt.find(
(item) => item.confId === cellValue.businessType
)?.confValue || "-"
)
}
}
],
queryData: this.$route.query,
capacityList: [
{
title: "弱项:",
children: [
{
title: "身份介绍:差",
key: "weakItem"
},
{
title: "场景塑造:差",
key: "weakItem"
},
{
title: "案例展示:差",
key: "weakItem"
}
]
key: "badList",
children: []
},
{
title: "其他项:",
children: [
{
title: "逼单能力:一般",
key: "weakItem"
},
{
title: "话题介入:一般",
key: "weakItem"
},
{
title: "攻防能力:一般",
key: "weakItem"
}
]
key: "ohterList",
children: []
}
]
}
},
methods: {
//查询员工详情
findStoreEmployeePerformanceData() {
let { staffItem, queryData } = this
findStoreEmployeePerformance({
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.initBaseData(res)
})
},
initBaseData(val) {
this.baseInfo = val.baseInfo ? val.baseInfo : {}
// this.aiJy = val.aiJy
this.consultationAbility = val.consultationAbility
val.learningProgress.courseRecords &&
val.learningProgress.courseRecords.forEach((item) => {
item.isCollapse = true
})
this.learningProgress = val.learningProgress
this.performanceInfo = val.performance
// 处理 otherList 数据
const otherData = this.consultationAbility.ohterList || {}
const ohterList = Object.keys(otherData).map((key) => ({
label: key,
value: otherData[key]
}))
const badData = this.consultationAbility.badList || {}
const badList = Object.keys(badData).map((key) => ({
label: key,
value: badData[key]
}))
// 更新 capacityList.children
this.capacityList = this.capacityList.map((item) => {
if (item.key === "ohterList") {
item.children = ohterList
}
if (item.key === "badList") {
item.children = badList
}
return item
})
}
}
}
</script>
<style lang="scss" scoped>
.staff-detail {
.staff-detail-wrap {
background: #fff;
overflow-y: auto;
overflow-x: hidden;
......@@ -152,6 +250,7 @@ export default {
.el-form-item {
width: 100%;
margin-bottom: 0px;
display: flex;
}
.itemDiv {
display: flex;
......@@ -168,11 +267,13 @@ export default {
white-space: nowrap;
}
::v-deep .el-form-item__label {
white-space: nowrap;
color: #666666;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 1280px);
// max-width: calc(100% - 1280px);
word-break: break-all;
width: 90%;
}
}
......@@ -206,6 +307,11 @@ export default {
font-size: 14px;
font-weight: 400;
margin-left: 8px;
margin-bottom: 4px;
}
.other {
color: #333333 !important;
font-size: 14px;
}
}
}
......
<!-- 门店指标 -->
<template>
<div class="store-wrap">
<div v-for="(item, index) in storeList" :key="index" class="store-item">
<div class="name">{{ item.name }}</div>
<div class="value">{{ item.value }}</div>
<div class="link" v-if="item.link">
环比<span>{{ item.link }}</span>
<div class="triangle-up"></div>
</div>
<div class="detail" v-if="item.addHtml" @click="handleDetail(item)">
<div class="store-wrap" v-if="storeIndicatoerInfo">
<div class="store-item">
<div class="name">门店总数</div>
<div class="value">{{ storeIndicatoerInfo.merchantCount }}</div>
<div class="detail" @click="handleDetail(storeIndicatoerInfo)">
详情<i class="el-icon-arrow-right"></i>
</div>
</div>
<template
v-if="storeIndicatoerInfo && storeIndicatoerInfo.metricDTOList.length"
>
<div
v-for="(item, index) in storeIndicatoerInfo.metricDTOList"
:key="index"
class="store-item"
>
<template v-if="item">
<div class="name">{{ indicatorCode[item.metricCode] }}</div>
<div class="value">
{{ item.metricValue === 0 ? 0 : item.metricValue || "-" }}
</div>
<div class="link">
环比<span
v-if="item.linkRelativeRatio || item.linkRelativeRatio === 0"
:class="[
item.linkRelativeRatio
? String(item.linkRelativeRatio).indexOf('-') > -1
? 'dowm'
: 'up'
: ''
]"
>{{
item.linkRelativeRatio === 0
? "0%"
: item.linkRelativeRatio + "%" || "-"
}}</span
>
<span v-else>-</span>
<template v-if="item.linkRelativeRatio">
<div
class="triangle-down"
v-if="String(item.linkRelativeRatio).indexOf('-') > -1"
></div>
<div class="triangle-up" v-else></div>
</template>
</div>
</template>
</div>
</template>
</div>
</template>
<script>
import { findAllItem } from "@/api/serviceCentre"
export default {
data() {
return {
storeIndicatoerInfo: "",
indicatorCode: {
A075: "订单数",
A036: "产值(元)",
A076: "客单价(元)",
A062: "交车数",
A063: "触客数"
},
storeList: [
{
name: "门店总数",
value: "100",
addHtml: "store",
id: 2
id: 9999
},
{
name: "产值(元)",
......@@ -31,8 +77,7 @@ export default {
link: "11%",
trend: () => {
return false
},
id: 3
}
},
{
name: "客单价(元)",
......@@ -40,8 +85,7 @@ export default {
link: "11%",
trend: () => {
return false
},
id: 4
}
},
{
name: "交车数",
......@@ -49,8 +93,7 @@ export default {
link: "11%",
trend: () => {
return false
},
id: 5
}
},
{
name: "触客数",
......@@ -58,8 +101,7 @@ export default {
link: "11%",
trend: () => {
return false
},
id: 6
}
},
{
name: "订单数",
......@@ -67,17 +109,50 @@ export default {
link: "11%",
trend: () => {
return false
},
id: 6
}
}
]
}
},
props: {
longAllData: {},
longForm: {
type: Object,
default: () => {}
}
},
watch: {
longForm: {
handler(val) {
this.findAllItemData()
},
deep: true,
immediate: true
}
},
mounted() {
this.findAllItemData()
},
methods: {
findAllItemData() {
console.log(33333333333333333)
let params = {
...this.longForm
}
findAllItem(params)
.then((res) => {
this.storeIndicatoerInfo = res
this.storeIndicatoerInfo.id = "-9999"
})
.catch((err) => {
new Error(err)
})
},
handleDetail(row) {
console.log(1111)
row.activeName = "storeInfo"
row.pageId = row.id
row.merchantNos = row.merchantCount ? row.merchantNos : [-1]
row.scene = this.longForm.scene
this.$emit("openWindow", row)
}
},
......@@ -89,6 +164,7 @@ export default {
display: flex;
align-items: center;
flex-wrap: wrap;
margin-top: 16px;
.store-item {
width: calc((100% / 3) - (16px * 2 / 3));
min-width: 376px;
......@@ -124,9 +200,14 @@ export default {
font-size: 14px;
font-weight: 400;
span {
color: #eb4e4e;
margin: 0 6px;
}
span.up {
color: #eb4e4e;
}
span.dowm {
color: #43cf7c;
}
}
}
.store-item:nth-child(3n) {
......
......@@ -3,218 +3,198 @@
<div class="d2-container-content">
<d2-table-header title="门店列表"> </d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:hasPage="hasPage"
ref="storeTable"
:tableData="tableData"
:search-form="searchForm"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="mainBrand" slot-scope="scope">
<template
v-if="
scope.scope.mainBrand &&
scope.scope.mainBrand.split(',').length > 1
"
>
<span>{{
scope.scope.mainBrand.split(",").slice(0, 1).join("")
}}</span>
<el-popover placement="top" width="fit-content" trigger="hover">
<div
:class="{
serverHeight: scope.scope.mainBrand.split(',').length >= 10
}"
>
<div
v-for="(item, index) in scope.scope.mainBrand.split(',')"
:key="index"
>
{{ item }}
</div>
</div>
<span class="more-info" slot="reference"
>...({{ scope.scope.mainBrand.split(",").length }})</span
>
</el-popover>
</template>
<template v-else>
<span>{{
scope.scope.mainBrand ? scope.scope.mainBrand : "--"
}}</span>
</template>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script type="text/ecmascript-6">
import { mapActions, mapState } from 'vuex'
import { refundApplyRecordPage } from "@api/refundExamine"
import { Util, deepClone } from "@/common/util"
import {
studyPage,
studyUpdate
} from "@api/contentManager"
findStoreInfoByMerchantNo
} from "@api/serviceCentre"
import { long_businessOpt } from "@/common/constants.js"
import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
export default {
name: "storreInfo",
data() {
return {
hasPage:false,
listOfPenaltiesShow: false,
noDataImg,
searchForm: {
bussinessScene: "",
merchantId: "",
scriptMatching: "",
receptionist: "",
solutionBrowsing: "",
// searchdate: [new Date(), new Date()]
sendStartData: [],
finishStartData: []
scene: "",
merchantNos: []
},
tableData:[],
baseData: {
directOperateOpt: [
{ confId: 0, confValue: "非直营" },
{ confId: 1, confValue: "直营" }
],
businessOpt:long_businessOpt,
},
searchFormSearch: {},
currentItem: {},
getListApi: studyPage,
// 表格参数
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "门店名称",
prop: "title"
prop: "storeName"
},
{
label: "商户号",
prop: "staffName"
prop: "merchantNo"
// minWidth: 144,
},
{
label: "是否直营",
prop: "staffPhone"
formatter: (cellValue) => {
return this.baseData.directOperateOpt.find(
(item) => item.confId === cellValue.isDirectOperated
)?.confValue
}
},
{
label: "展业时间",
prop: "createdDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.sendStartTime
// ? Util.dateFormate(cellValue.sendStartTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
prop: "businessDevDate",
formatter: (cellValue) => {
return cellValue.businessDevDate
? Util.dateFormate(cellValue.businessDevDate, "YYYY-MM-DD")
: ""
}
},
{
label: "归属业务",
addHtml: 'taskStatus'
formatter: (cellValue) => {
return this.baseData.businessOpt.find(
(item) => item.confId ==this.queryData.scene
)?.confValue
}
},
{
label: "主营品牌",
prop: "finishDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.finishEndTime
// ? Util.dateFormate(cellValue.finishEndTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
prop: "mainBrand",
addHtml: "mainBrand"
},
{
label: "区域运营经理",
prop: "finishDate",
prop: "regionalManager",
},
{
label: "驻店人数",
prop: "finishDate",
prop: "staffCount",
},
{
label: "已配课程人数",
prop: "finishDate",
prop: "courseConfiguredCount",
}
]
},
detailInfo: {}
}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
props: {
queryData: {
type: Object,
default: () => {}
}
},
watch: {
queryData: {
handler(val) {
setTimeout(() => {
this.findStoreInfoByMerchantNoData()
}, 0)
},
deep: true,
immediate: true
}
},
created() { },
mounted() {
// this.getServiceStore()
// this.getStudyPage()
this.findStoreInfoByMerchantNoData()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
// 详情
handleDetail(row) {
this.listOfPenaltiesShow = true
this.detailInfo = row
methods: {
findStoreInfoByMerchantNoData() {
console.log(this.queryData, "queryData")
this.searchForm.scene = this.queryData.scene
this.searchForm.merchantNos = this.queryData.merchantNos
? this.queryData.merchantNos
: []
findStoreInfoByMerchantNo(this.searchForm).then((res) => {
this.tableData = res
})
},
beforeSearchFn(type = 1) {
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.sendStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.sendStartData
this.searchFormSearch.sendStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.sendEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
if (this.searchForm?.finishStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.finishStartData
this.searchFormSearch.finishStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.finishEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
delete this.searchFormSearch.sendStartData
delete this.searchFormSearch.finishStartData
resolve()
findStaffByMerchantNo({
merchantNos,
scene: this.queryData.scene
}).then((res) => {
console.log(res)
resolve(res)
})
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
await this.beforeSearchFn()
// console.log(params)
let params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.study.punish.list.export'
const list = [
...this.dowloadList,
{
name: '处罚名单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
// try {
// await this.beforeSearchFn()
// const res = await studyExport({
// ...this.searchFormSearch
// })
// console.log(res)
// if (res) window.open(res)
// } catch (error) {
// if (error) this.$message.error(error)
// }
},
// getServiceStore() {
// listShop4sByRef({}).then((res) => {
// res ||= []
// this.showFormData.forEach((item, index) => {
// if (item.type === "select" && item.name == "merchantId") {
// this.$set(this.showFormData[index], "optionList", [
// {
// merchantName: "全部",
// merchantId: ""
// },
// ...res
// ])
// }
// })
// })
// },
// async getStudyPage() {
// try {
// await this.beforeSearchFn()
// const res = await studyPage({
// ...this.searchFormSearch
// })
// console.log(res)
// this.staticData = res || {}
// } catch (error) {
// if (error) this.$message.error(error)
// }
// },
}
}
</script>
<style scoped lang="scss">
.customer-tags {
.d2-container-content {
margin-top: 0 !important;
}
}
.emptyBg {
display: flex;
flex-direction: column;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!