Commit a669fa90 by 前端

Merge branch 'SAAS+V4.55.0-0730' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.55.0-0730
2 parents a7db3bda 4f7e1f74
Showing 29 changed files with 725 additions and 464 deletions
......@@ -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
......
......@@ -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 : "-" }}
......@@ -572,13 +572,13 @@ 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) {
} else if (item.beforeStatus == 8) {
item.optShow = "运营补充"
item.optStautsShow = "通过"
item.optPerShow = "操作人"
......@@ -796,7 +796,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">
<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>
......@@ -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,10 @@ export default {
],
tableRules: {
refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' }
{ required: true, message: '请输入退款金额', trigger: 'blur' },
{ required: true,
validator: (rule, value, callback) => { return value == 0 ? callback("退款金额不能为0") : callback() },
trigger: "blur" },
]
},
orderTableParams: {
......@@ -614,6 +628,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
......@@ -702,7 +719,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
})
......@@ -1049,15 +1066,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
......@@ -1226,6 +1244,12 @@ export default {
margin: 0 !important;
}
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
.edit-sub-block {
padding-top: 16px;
.el-form-item {
......
......@@ -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')
" :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,22 @@ export default {
created() {
},
components: {},
mounted() {
this.infoForm = deepClone(this.detail)
},
methods: {
closeImgViewer() {
this.imgVisible = false
},
handleEnlargeImg(url, name) {
this.imgVisible = !this.imgVisible
// this.imgList = url
console.log("url", url)
this.imgList = url
this.imgUrlName = name
},
handleAddConfirm() {
this.handleClose(true)
},
......@@ -93,6 +113,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 +123,11 @@ export default {
.img {
width: 120px;
height: 120px;
}
.img+.img {
margin-left: 10px;
}
// .img {}
.status {
color: #2A58AD;
}
......
......@@ -67,7 +67,7 @@
</span>
<!-- 下载 -->
<span style="margin-right: 10px;"
v-if="scope.scope.approveType == 1">
v-if="scope.scope.approveType == 1 && scope.scope.status != 8">
<auth-button :data="scope.scope"
:show-btn-ids="['9040808']" />
<span v-if="scope.scope.downCount != 0"
......
......@@ -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>
......
......@@ -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,10 @@ export default {
refundOldData: [],
tableRules: {
refundAmount: [
{ required: true, message: '请输入退款金额', trigger: 'blur' }
{ required: true, message: '请输入退款金额', trigger: 'blur' },
{ required: true,
validator: (rule, value, callback) => { return value == 0 ? callback("退款金额不能为0") : callback() },
trigger: "blur" },
]
},
orderTableParams: {
......@@ -731,7 +734,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 +961,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;
......
......@@ -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>
......@@ -31,7 +33,7 @@
</div>
<div class="info-item flex">
<label>接待批次/批:</label>
<span>{{ batchNum }}</span>
<span>{{ queryData.batchNum }}</span>
</div>
</div>
</div>
......@@ -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
})
......
......@@ -196,7 +196,7 @@ export default {
pickerOptions: "rangePickerOptions_30day2"
},
{
label: "app接待结果",
label: "接待结果",
name: "orderFinishFlag",
type: "select",
isClear: true,
......
......@@ -48,11 +48,14 @@
<div>
考核成绩:<span>{{ course.totalScore || 0 }}分</span>
</div>
<div>
<div v-if="course.finishDate">
完成时间:<span>{{ course.finishDate || "-" }}</span>
</div>
</div>
<div class="status orange" v-if="course.status">
<div
:class="['status', statusColors[course.status]]"
v-if="course.status"
>
{{ statusObj[course.status] }}
</div>
</el-tooltip>
......@@ -111,12 +114,14 @@ export default {
],
cityOptions: ["上海", "北京", "广州", "深圳"],
statusObj: {
1: "未学习",
2: "未完成",
3: "待考核",
4: "未通过",
5: "已完成"
},
statusColors: {
2: "orange",
5: "green"
},
selectObj: {
courseTotalDuration: 0,
count: 0
......@@ -136,6 +141,7 @@ export default {
reset() {
this.selected = []
this.selectCourseList = []
this.titleActiveIndex = 0
},
handleCheckedChange(val) {
console.log(val)
......@@ -150,13 +156,52 @@ export default {
this.selectCourseList = this.courseList.filter((item) => {
const isSelected = this.selected.includes(item.courseId)
if (isSelected) {
this.selectObj.courseTotalDuration += item.courseTotalDuration
// 使用 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,
......@@ -171,7 +216,11 @@ export default {
this.selected.splice(selectedIndex, 1)
this.selectCourseList.splice(currentIndex, 1)
this.selectCourseList.forEach((item) => {
this.selectObj.courseTotalDuration += item.courseTotalDuration
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
})
this.$emit("handleCourse", this.selectCourseList)
......@@ -187,7 +236,7 @@ export default {
this.search()
},
search() {
this.$EventBus.$emit("fromAllocation", this.courseForm)
this.$emit("fromAllocation", this.courseForm)
}
}
}
......@@ -339,6 +388,10 @@ export default {
font-weight: 500;
border-radius: 2px;
}
.ash {
color: #c6c8cc;
border: 1px solid #c6c8cc;
}
.orange {
color: #f59619;
border: 1px solid #f59619;
......
......@@ -38,9 +38,9 @@
</div>
</div>
<components
ref="components"
:is="tabName"
:staffDetailInfo="staffDetailInfo"
:courseList="courseList"
:aiJy="aiJy"
:staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse"
:staffList="staffList"
......@@ -57,8 +57,7 @@ import couseAllocation from "./couseAllocation"
import {
customizeList,
findStaffByMerchantNo,
findStoreEmployeePerformance,
getStaffTagCourseList
findStoreEmployeePerformance
} from "@/api/serviceCentre"
export default {
name: "configureCourse",
......@@ -76,6 +75,7 @@ export default {
}
],
tabName: "staffDetail",
aiJy: "",
staffItem: {},
staffList: [],
courseList: [],
......@@ -88,10 +88,10 @@ export default {
},
created() {
//课程搜索功能
this.$EventBus.$on("fromAllocation", (courseForm) => {
console.log("父组件接收到孙组件事件:", courseForm)
this.getStaffTagCourseList(courseForm)
})
// this.$EventBus.$on("fromAllocation", (courseForm) => {
// console.log("父组件接收到孙组件事件:", courseForm)
// this.getStaffTagCourseList(courseForm)
// })
},
async mounted() {
this.queryData = this.$route.query
......@@ -99,7 +99,7 @@ export default {
this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex]
//查询员工详情
this.findStoreEmployeePerformanceData()
// this.findStoreEmployeePerformanceData()
},
methods: {
//提交本员工配置回调
......@@ -118,22 +118,22 @@ export default {
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.staffDetailInfo = res
})
},
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 : []
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
......@@ -166,13 +166,8 @@ export default {
handleClick(index) {
this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex]
if (this.activeName == 0) {
//查询员工详情
this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
this.getStaffTagCourseList()
}
this.findStoreEmployeePerformanceData()
},
handleTabClick(index) {
this.activeName = index
......@@ -181,13 +176,19 @@ export default {
1: "couseAllocation"
}
this.tabName = arr[+this.activeName]
if (index == 0) {
//查询员工详情
this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
this.getStaffTagCourseList()
}
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) {
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
>
<div v-loading="loading">
<div class="form_div">
<div class="div-title">个人信息</div>
<el-form class="edit-sub-block"
label-width="120px"
:inline="true">
<el-form class="edit-sub-block" label-width="120px" :inline="true">
<div class="itemDiv">
<el-form-item label="姓名:"
class="halfItem">
<el-form-item label="姓名:" class="halfItem">
{{ staffInfo.staffName ? staffInfo.staffName : "-" }}
</el-form-item>
<el-form-item label="手机号码:"
class="halfItem">
<el-form-item label="手机号码:" class="halfItem">
{{ staffInfo.staffPhone ? staffInfo.staffPhone : "-" }}
</el-form-item>
<el-form-item label="门店:"
class="halfItem">
<el-form-item label="门店:" class="halfItem">
{{ staffInfo.merchantNames ? staffInfo.merchantNames : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="上级:"
class="halfItem">
<el-form-item label="上级:" class="halfItem">
{{ staffInfo.superiors ? staffInfo.superiors : "-" }}
</el-form-item>
<el-form-item label="导师:"
class="halfItem">
<el-form-item label="导师:" class="halfItem">
{{ staffInfo.mentors ? staffInfo.mentors : "-" }}
</el-form-item>
</div>
<div class="div-title">任务信息</div>
<div class="itemDiv">
<el-form-item label="学习任务名称:"
class="halfItem">
<el-form-item label="学习任务名称:" class="halfItem">
{{ paramsObj.title ? paramsObj.title : "-" }}
</el-form-item>
<el-form-item label="任务状态:"
class="halfItem">
<span :class="colorClass[paramsObj.taskStatus]"></span>{{ taskStatusShow }}
<el-form-item label="任务状态:" class="halfItem">
<span :class="colorClass[paramsObj.taskStatus]"></span
>{{ taskStatusShow }}
</el-form-item>
<el-form-item label="处罚状态:"
class="halfItem">
<span :class="colorClass2[paramsObj.punishStatus]"></span>{{ punishStatusShow }}
<el-form-item label="处罚状态:" class="halfItem">
<span :class="colorClass2[paramsObj.punishStatus]"></span
>{{ punishStatusShow }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="课程完成时间:"
class="halfItem">
<el-form-item label="课程完成时间:" class="halfItem">
{{ paramsObj.passedTime ? paramsObj.passedTime : "-" }}
</el-form-item>
<el-form-item label="课程配置时间:"
class="halfItem">
<el-form-item label="课程配置时间:" class="halfItem">
{{ paramsObj.sendTime ? paramsObj.sendTime : "-" }}
</el-form-item>
<el-form-item label="课程结束时间:"
class="halfItem">
<el-form-item label="课程结束时间:" class="halfItem">
{{ paramsObj.finishDate ? paramsObj.finishDate : "-" }}
</el-form-item>
</div>
</el-form>
<div class="div-title">课程列表</div>
<div class="d2-container-content">
<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"
>
</d2-table>
</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 +100,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,59 +131,68 @@ 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"
},
{
label: "学习进度",
prop: "failReason",
formatter: (cellValue) => {
return (
this.learningProgressOpt.find(
(item) => item.confId === cellValue.status
)?.confValue +
(cellValue.status == 2 ? `(${cellValue.progress}%)` : "")
)
},
className: (cellValue) => {
return {
1: "ashSpot",
2: "orgenSpot",
5: "greenSpot"
}[cellValue.status]
}
},
className: (cellValue) => {
return {
1: 'ashSpot',
2: 'orgenSpot',
5: 'greenSpot'
}[cellValue.status]
{
label: "成绩",
prop: "totalScore"
},
{
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'
0: "ashSpot",
1: "orgenSpot",
2: "greenSpot"
},
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.searchFormSearch = deepClone(this.searchForm)
resolve()
......@@ -196,13 +201,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 +219,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 +490,7 @@ export default {
}
</style>
<style >
<style>
.detailDialog-tooltip-width {
max-width: 500px;
}
......
......@@ -3,7 +3,7 @@
<div class="couseAllocation">
<div class="header">AI导师建议</div>
<div class="ai-suggest">
{{ staffDetailInfo.aiJy ? staffDetailInfo.aiJy : "暂无AI导师建议" }}
{{ aiJy ? aiJy : "暂无AI导师建议" }}
</div>
<div class="header">课程配置</div>
<!-- 已配置 -->
......@@ -60,8 +60,9 @@
<div slot="allocationHtml" slot-scope="scope">
<curricula-variable
ref="curriculaVariable"
:courseList="courseAllocationData"
:courseList="courseList"
@handleCourse="handleCourse"
@fromAllocation="fromAllocation"
></curricula-variable>
</div>
</glsx-combi-form>
......@@ -79,6 +80,7 @@
v-if="multipleVisible"
@dialogClose="handleCloseDialog"
:staffList="staffListData"
:staffItem="staffItem"
@handleMultiple="handleConfirmMultiple"
></multipleDialog>
</div>
......@@ -86,7 +88,12 @@
<script>
import curriculaVariable from "./allocation"
import multipleDialog from "./multiple"
import { insertOrUpdate, staffCourse, getByTaskId } from "@/api/serviceCentre"
import {
insertOrUpdate,
staffCourse,
getByTaskId,
getStaffTagCourseList
} from "@/api/serviceCentre"
export default {
components: {
curriculaVariable,
......@@ -98,12 +105,13 @@ export default {
handleFormRef: "handleFormRef",
multipleVisible: false,
extendConfig: {
punishType: 1, //惩罚方式:0无 1禁止录单
punishType: 0, //惩罚方式:0无 1禁止录单
deadline: "",
title: "",
studyType: 1,
courseList: []
},
aiJy: "",
alreadyConfig: {},
handleFormRef: "handleFormRef",
formRules: {
......@@ -140,11 +148,11 @@ export default {
optionList: [
{
confLabel: "不处罚",
confId: 1
confId: 0
},
{
confLabel: "限制录单",
confId: 2
confId: 1
}
],
optionId: "confId",
......@@ -165,8 +173,8 @@ export default {
maxlength: 20
}
],
courseAllocationData: [],
staffListData: [],
courseList: [],
staffTagCourseList: [], //已配置的课程列表
selectObj: {
courseTotalDuration: 0,
......@@ -179,9 +187,9 @@ export default {
type: Object,
default: () => {}
},
courseList: {
type: Array,
default: () => []
aiJy: {
type: String,
default: ""
},
staffItem: {
type: Object,
......@@ -193,21 +201,29 @@ export default {
}
},
watch: {
courseList: {
handler(val) {
console.log(val, "val")
this.courseAllocationData = val
this.handleReset()
},
deep: true
},
// courseList: {
// handler(val) {
// console.log(val, "val")
// this.courseAllocationData = val
// this.handleReset()
// },
// deep: true
// },
staffList: {
handler(val) {
console.log(val, "我是员工我是员工我是员工")
this.staffListData = val.map((record) => ({
...record,
active: false // 初始化为 false
}))
this.staffListData = val.map((record) => {
if (record.staffUUID == this.staffItem.staffUUID) {
return {
...record,
active: true
}
} else {
return {
...record,
active: false
}
}
})
},
deep: true,
immediate: true
......@@ -217,24 +233,52 @@ export default {
console.log(val, "我是员工详情")
if (val.courseConfigFlag == 1) {
//查询员工已配置课程
this.getStaffTagCourseList()
this.getStaffCourse()
//查询员工已配置详情
this.getByTaskId()
} else {
this.handleReset()
//获取配置课程列表
this.getStaffTagCourseList()
}
},
deep: true,
immediate: true
}
},
created() {},
methods: {
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 : []
})
},
//查询员工已配置课程
getStaffTagCourseList() {
getStaffCourse() {
this.selectObj = {
courseTotalDuration: 0,
count: 0
}
staffCourse({
taskId: this.staffItem.taskId
}).then((res) => {
console.log("获取到已配课", res)
this.staffTagCourseList = res.list
res.list.forEach((item) => {
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1
})
})
},
//查询员工已配置详情
......@@ -244,7 +288,7 @@ export default {
this.alreadyConfig = {
title: res.title,
punishTypeText:
res.extendConfig.punishType == 1 ? "不处罚" : "限制录单"
res.extendConfig.punishType == 0 ? "不处罚" : "限制录单"
}
})
},
......@@ -263,10 +307,13 @@ export default {
)
}
},
fromAllocation(courseForm) {
this.getStaffTagCourseList(courseForm)
},
//重置
handleReset() {
this.extendConfig = {
punishType: 1, //惩罚方式:0无 1禁止录单
punishType: 0, //惩罚方式:0无 1禁止录单
deadline: "",
title: "",
studyType: 1,
......
......@@ -62,6 +62,15 @@ export default {
window.addEventListener("resize", this.resizeHandler)
},
methods: {
resizeHandler() {
if (this.chart) {
this.chart.clear()
setTimeout(() => {
this.chart.setOption(this.getChartSetOption())
this.chart.resize()
}, 1000)
}
},
getChartSetOption() {
var options = {
tooltip: {
......
......@@ -28,6 +28,10 @@ export default {
type: String,
default: ""
},
title: {
type: String,
default: ""
},
rate: {
type: String
},
......@@ -71,7 +75,7 @@ export default {
grid: {
bottom: "12%",
top: "10%",
left: "15%",
left: "20px",
right: "20px"
},
tooltip: {
......@@ -90,6 +94,7 @@ export default {
fontSize: 14
},
formatter: (params) => {
console.log(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;">${
......@@ -99,7 +104,7 @@ export default {
height: 6px;background: ${
params[0].color
};border-radius:50%;margin-right:8px;"></div>
${this.title}:${params[0].value}
${this.title}:${params[0].value}%
</div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E"
......
......@@ -20,7 +20,6 @@
</template>
<script type="text/ecmascript-6">
import { mapActions, mapState } from "vuex"
import {
findStoreInfoByMerchantNo,
findStaffByMerchantNo
......@@ -32,7 +31,6 @@ export default {
name: "indicatorInfo",
data() {
return {
listOfPenaltiesShow: false,
noDataImg,
searchForm: {
scene: "",
......
......@@ -2,7 +2,9 @@
<template>
<div class="week-replay">
<div class="header">
上周学习复盘<span class="time">(2025-06-09 至 2025-06-15)</span>
上周学习复盘<span class="time"
>({{ longForm.startTime }} 至 {{ longForm.endTime }})</span
>
</div>
<div class="improve">
<div
......
......@@ -18,7 +18,7 @@
</div>
</div>
</div>
<div class="situation-content">
<div class="situation-content" v-if="!isHide">
<div class="time-line">
<div
class="line-item"
......@@ -48,7 +48,7 @@
{{ sitem.courseNum }}节|{{ sitem.taskTime }}
<template v-if="sitem.countNameList">
<div class="collapse" @click="handleCollapse(sIndex)">
{{ sitem.isCollapse ? "展开" : "收起" }}
{{ sitem.isCollapse ? "收起" : "展开" }}
</div>
</template>
</div>
......@@ -87,6 +87,11 @@
</div>
</div>
</div>
<div v-else class="emptyBg">
<img class="noDataImg" src="@/assets/empty.png" />
<p>暂无数据</p>
</div>
</div>
</template>
<script>
......@@ -95,6 +100,7 @@ export default {
data() {
return {
learningInfo: {},
isHide: false,
couseData: [
{
text: "长课程",
......@@ -103,7 +109,8 @@ export default {
return {
已改善: "greenSpot",
未改善: "redSpot",
进行中: "yellowSpot"
进行中: "yellowSpot",
未学习: "ashSpot"
}[cellValue.longCourseTag]
}
},
......@@ -114,7 +121,8 @@ export default {
return {
已改善: "greenSpot",
未改善: "redSpot",
进行中: "yellowSpot"
进行中: "yellowSpot",
未学习: "ashSpot"
}[cellValue.shortCourseTag]
}
}
......@@ -184,6 +192,9 @@ export default {
isCollapse: false // 初始化为 false
}))
}
this.isHide = false
} else {
this.isHide = true
}
},
deep: true,
......@@ -443,4 +454,18 @@ export default {
overflow: hidden;
}
}
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 0;
.noDataImg {
width: 64px;
height: 40px;
}
p {
color: #999999;
font-size: 14px;
}
}
</style>
......@@ -63,6 +63,7 @@
>
环 {{ scope.scope.outputValueRate }}
</div>
<div v-else class="normal">环 -</div>
</div>
<div slot="Conversion" slot-scope="scope">
<div>
......@@ -77,6 +78,7 @@
>
环 {{ scope.scope.conversionRate }}
</div>
<div v-else class="normal">环 -</div>
</div>
<div slot="CustomerUnitPrice" slot-scope="scope">
<div>
......@@ -94,6 +96,7 @@
>
环 {{ scope.scope.customerUnitPriceRate }}
</div>
<div v-else class="normal">环 -</div>
</div>
</d2-table>
</div>
......@@ -184,7 +187,7 @@ export default {
},
{
label: "学习时长",
prop: "learnDuration"
prop: "courseTotalDuration"
},
{
label: "学习进度",
......@@ -341,4 +344,7 @@ export default {
font-size: 12px;
color: #43cf7c;
}
.normal {
font-size: 12px;
}
</style>
......@@ -17,7 +17,10 @@
: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">
......@@ -46,12 +49,15 @@ export default {
staffList: {
type: Array,
default: () => []
},
staffItem: {
type: Object,
default: () => {}
}
},
watch: {
staffList: {
handler(val) {
console.log(val, "🚀🚀🚀🚀🚀🚀🚀🚀🚀")
this.filterStaffList(deepClone(val))
},
deep: true,
......@@ -84,6 +90,7 @@ export default {
cancel_name: "取 消",
confirm_name: "确定配置"
},
disabled: false,
checkAll: false,
infoRules: {
refundType: [
......@@ -111,8 +118,10 @@ export default {
this.selectStaffList = []
},
handleChooseStaff(index) {
this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
if (this.staffItem.staffUUID !== this.selectStaffList[index].staffUUID) {
this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
}
},
filterStaffList(val) {
this.selectStaffList = []
......@@ -121,10 +130,23 @@ export default {
this.selectStaffList.push(item)
}
})
this.checkAll = this.selectStaffList.every((item) => item.active)
if (
this.selectStaffList.length == 1 &&
this.selectStaffList[0].staffUUID == this.staffItem.staffUUID
) {
this.disabled = true
} else {
this.disabled = false
}
},
handleCheckAllChange() {
this.staffList.forEach((item) => {
item.active = this.checkAll
this.selectStaffList.forEach((item) => {
if (item.staffUUID == this.staffItem.staffUUID) {
item.active = true
} else {
item.active = this.checkAll
}
})
},
handleClose() {
......
......@@ -13,13 +13,56 @@
v-if="item.className"
:class="[item.className(baseInfo)]"
></div>
{{
item.formatter
? item.formatter(baseInfo)
: baseInfo[item.key]
? baseInfo[item.key]
: "-"
}}
<template v-if="item.key == 'store'">
<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="{
scrollHeight:
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>
......@@ -63,21 +106,22 @@ import LearningSituation from "./learningSituation.vue"
import PerformanceStatus from "./performanceStatus.vue"
import { course_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util"
import { findStoreEmployeePerformance } from "@/api/serviceCentre"
export default {
components: {
PerformanceStatus,
LearningSituation
},
props: {
staffDetailInfo: {
staffItem: {
type: Object,
default: () => {}
}
},
watch: {
staffDetailInfo: {
staffItem: {
handler(val) {
this.initBaseData(val)
this.findStoreEmployeePerformanceData()
},
// immediate: true,
deep: true
......@@ -86,6 +130,7 @@ export default {
data() {
return {
businessOpt: deepClone(course_businessOpt),
aiJy: "",
baseInfo: {},
performanceInfo: [],
consultationAbility: {},
......@@ -112,9 +157,11 @@ export default {
title: "归属业务:",
key: "businessType",
formatter: (cellValue) => {
return this.businessOpt.find(
(item) => item.confId === cellValue.businessType
)?.confValue
return (
this.businessOpt.find(
(item) => item.confId === cellValue.businessType
)?.confValue || "-"
)
}
}
],
......@@ -134,8 +181,19 @@ export default {
}
},
methods: {
//查询员工详情
findStoreEmployeePerformanceData() {
let { staffItem, queryData } = this
findStoreEmployeePerformance({
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.initBaseData(res)
})
},
initBaseData(val) {
this.baseInfo = val.baseInfo
this.baseInfo = val.baseInfo ? val.baseInfo : {}
// this.aiJy = val.aiJy
this.consultationAbility = val.consultationAbility
val.learningProgress.courseRecords.forEach((item) => {
item.isCollapse = true
......@@ -164,7 +222,6 @@ export default {
}
return item
})
console.log(this.capacityList)
}
}
}
......
......@@ -21,16 +21,20 @@
<div class="value">{{ item.metricValue }}</div>
<div class="link">
环比<span
v-if="item.linkRelativeRatio"
:class="[
item.linkRelativeRatio.indexOf('-') > -1 ? 'dowm' : 'up'
String(item.linkRelativeRatio).indexOf('-') > -1 ? 'dowm' : 'up'
]"
>{{ item.linkRelativeRatio }}</span
>{{ item.linkRelativeRatio || "-" }}</span
>
<div
class="triangle-down"
v-if="item.linkRelativeRatio.indexOf('-') > -1"
></div>
<div class="triangle-up" v-else></div>
<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>
......@@ -124,24 +128,21 @@ export default {
console.log(33333333333333333)
let params = {
...this.longForm
// scene: 1,
// startTime: "2025-06-01",
// endTime: "2025-07-06"
}
findAllItem(params)
.then((res) => {
this.storeIndicatoerInfo = res
this.storeIndicatoerInfo.id = "-9999"
console.log(res)
})
.catch((err) => {
new Error(err)
})
},
handleDetail(row) {
console.log(1111)
row.activeName = "storeInfo"
row.pageId = row.id
row.merchantNos = row.merchantNos
row.scene = this.longForm.scene
this.$emit("openWindow", row)
}
},
......@@ -153,6 +154,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;
......@@ -188,9 +190,11 @@ export default {
font-size: 14px;
font-weight: 400;
span {
color: #eb4e4e;
margin: 0 6px;
}
span.up {
color: #eb4e4e;
}
span.dowm {
color: #43cf7c;
}
......
......@@ -3,11 +3,12 @@
<div class="d2-container-content">
<d2-table-header title="门店列表"> </d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
ref="storeTable"
:tableData="tableData"
:search-form="searchForm"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
@refreshTable="refreshTable"
@pageChange="pageChange"
>
</d2-table>
</div>
......@@ -15,13 +16,10 @@
</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 noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
export default {
......@@ -31,186 +29,134 @@ export default {
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: "直营" }
]
},
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: () => {
return ["延保", "权益", "轻改"][this.queryData.scene - 1]
}
},
{
label: "主营品牌",
prop: "finishDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.finishEndTime
// ? Util.dateFormate(cellValue.finishEndTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
prop: "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
},
beforeSearchFn(type = 1) {
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()
methods: {
findStoreInfoByMerchantNoData() {
console.log(this.queryData, "queryData")
this.searchForm = {
...this.$refs.storeTable.page
}
this.searchForm.scene = this.queryData.scene
this.searchForm.merchantNos = this.queryData.merchantNos
? this.queryData.merchantNos
: []
findStoreInfoByMerchantNo(this.searchForm).then((res) => {
this.tableData = res
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
refreshTable() {
this.findStoreInfoByMerchantNoData()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
pageChange(page) {
object.assign(this.searchForm, page)
this.refreshTable()
},
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)
// }
//获取门店下的员工
getStaffInfoData(merchantNos) {
return new Promise((resolve, reject) => {
findStaffByMerchantNo({
merchantNos,
scene: this.queryData.scene
}).then((res) => {
console.log(res)
resolve(res)
})
})
},
// 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>
......
......@@ -28,6 +28,7 @@
analysisActiveIndex == index ? 'active' : ''
]"
v-for="(analyse, index) in analysisList"
v-if="analyse.isshow"
:key="index"
@click="handleAnalysisClick(index)"
>
......@@ -102,11 +103,13 @@ export default {
analysisList: [
{
name: "上周数据",
value: "2025/6/30-2025/7/6"
value: "2025/6/30-2025/7/6",
isshow: true
},
{
name: "当月数据",
value: "2025/7/1-2025/7/31"
value: "2025/7/1-2025/7/31",
isshow: true
}
]
}
......@@ -201,6 +204,9 @@ export default {
handleClick(index) {
this.activeIndex = index
this.longForm.scene = this.conditionList[index].value
this.analysisActiveIndex = 0
this.handleSetTime()
this.analysisList[1].isshow = index != 0 ? false : true
},
handleSetTime() {
let [start, end] =
......@@ -281,7 +287,7 @@ export default {
color: #111111;
font-size: 16px;
font-weight: 500;
margin: 16px 0;
margin-top: 16px;
.analysis-index-list {
display: flex;
align-items: center;
......
......@@ -250,9 +250,7 @@ export default {
width: "150",
formatter: (cellValue) => {
return (
(cellValue.courseFinishCount
? cellValue.courseFinishCount
: "-") +
(cellValue.courseCount ? cellValue.courseCount : "-") +
" | " +
(cellValue.courseDuration ? cellValue.courseDuration : "-")
)
......
......@@ -126,10 +126,12 @@ export default {
const id = data.pageId ? data.pageId : `${data.metricName}_${data.itemBrand}`
const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id)
// windowItem.
let component = data.activeName,
title = data.metricName+data.itemBrand || '-'
title = data.metricName+data.itemBrand || '门店详情'
if (data.componentName) component = data.componentName
if (windowItem) {
windowItem.data=data
this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data)
return this.windowId = id
}
......@@ -145,6 +147,7 @@ export default {
this.tab.push(item)
this.checkEl()
}
this.windowId = id
},
close (index) {
......
......@@ -40,7 +40,7 @@
<d2-table
ref="recordTable"
:table-params="detail.tableParams"
:tableData="shortInfo.tableData"
:tableData="detailInfo.tableData"
:hasPage="false"
>
</d2-table>
......@@ -150,7 +150,7 @@ export default {
},
className: (cellValue) => {
return {
1: "redSpot",
1: "orgenSpot",
2: "greenSpot"
}[cellValue.status]
}
......@@ -165,13 +165,16 @@ export default {
cellValue.finishTime,
"YYYY-MM-DD HH:mm:ss"
)
: ""
: "-"
}
}
]
}
}
]
],
detailInfo: {
tableData: []
}
}
},
props: {
......@@ -214,14 +217,13 @@ export default {
},
methods: {
getSopDetailTagListData() {
console.log(this.shortInfo)
let { staffPhone, checkDate } = this.shortInfo
getSopDetailTagList({
checkDate,
staffPhone
}).then((res) => {
this.shortInfo.tableData = res
this.detailInfo.tableData = res
console.log(res)
})
},
......@@ -232,7 +234,6 @@ export default {
pageSize: 10
}).then((res) => {
Object.assign(this.shortInfo, res)
console.log(this.shortInfo, "this.shortInfo")
})
},
handleClose() {
......
......@@ -333,9 +333,11 @@ export default {
prop: "punishType",
width: "100px",
formatter: (cellValue) => {
return this.baseData.punishTypeOpt.find(
(item) => item.confId === cellValue.punishType
)?.confValue
return (
this.baseData.punishTypeOpt.find(
(item) => item.confId === cellValue.punishType
)?.confValue || "-"
)
}
},
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!