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 @@ ...@@ -5,8 +5,13 @@
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" <d2-search
:form-data="showFormData" /> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -20,20 +25,33 @@ ...@@ -20,20 +25,33 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" <d2-table
:table-params="tableParams" :before-search-fn="beforeSearchFn"> ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span> </span>
<span style="margin-right: 10px" <span
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2 || scope.scope.contentType == 5"> 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']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3"> <span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span> </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']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span> </span>
</div> </div>
...@@ -227,7 +245,7 @@ export default { ...@@ -227,7 +245,7 @@ export default {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel this.showFormData[index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -311,7 +329,8 @@ export default { ...@@ -311,7 +329,8 @@ export default {
goStatisticsPage(row) { goStatisticsPage(row) {
this.$router.push({ this.$router.push({
name: row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage", name:
row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
query: { query: {
id: row.id, id: row.id,
title: row.title title: row.title
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<el-form class="edit-sub-block" <el-form class="edit-sub-block"
label-width="150px" label-width="200px"
:inline="true"> :inline="true">
<el-form-item label="审批编号:"> <el-form-item label="审批编号:">
{{ detailInfo.applyCode ? detailInfo.applyCode : "-" }} {{ detailInfo.applyCode ? detailInfo.applyCode : "-" }}
...@@ -572,13 +572,13 @@ export default { ...@@ -572,13 +572,13 @@ export default {
item.optStautsShow = "驳回" item.optStautsShow = "驳回"
item.optRemarkShow = "驳回原因" item.optRemarkShow = "驳回原因"
} }
} else if (item.beforeStatus == 6) { } else if (item.beforeStatus == 7) {
item.optShow = "区域运营审核" item.optShow = "区域运营审核"
item.optStautsShow = "通过" item.optStautsShow = "通过"
item.optPerShow = "审核人" item.optPerShow = "审核人"
item.optTimeShow = "审核时间" item.optTimeShow = "审核时间"
item.optRemarkShow = "备注" item.optRemarkShow = "备注"
} else if (item.beforeStatus == 7) { } else if (item.beforeStatus == 8) {
item.optShow = "运营补充" item.optShow = "运营补充"
item.optStautsShow = "通过" item.optStautsShow = "通过"
item.optPerShow = "操作人" item.optPerShow = "操作人"
...@@ -796,7 +796,7 @@ export default { ...@@ -796,7 +796,7 @@ export default {
.el-form-item__content { .el-form-item__content {
display: inline-block; display: inline-block;
width: calc(100% - 150px); width: calc(100% - 200px);
line-height: 24px; line-height: 24px;
} }
......
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
</div> </div>
</template> </template>
</glsx-combi-form> </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"> <d2-table ref="recordTable" :table-params="orderTableParams" :tableData="detail.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope"> <div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount"> <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-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -108,6 +108,12 @@ ...@@ -108,6 +108,12 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="imageFileArr"
:initial-index="initialIndex"
/>
</baseDialog> </baseDialog>
</template> </template>
...@@ -129,6 +135,9 @@ import { baseConfig } from "@/main" ...@@ -129,6 +135,9 @@ import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" import GlOssApi from "glsk-oss-jssdk"
export default { export default {
name: "NewSignRefundDialog", name: "NewSignRefundDialog",
components: {
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
},
data() { data() {
var checkAmount = (rule, value, callback) => { var checkAmount = (rule, value, callback) => {
if (!value) { if (!value) {
...@@ -144,6 +153,8 @@ export default { ...@@ -144,6 +153,8 @@ export default {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
loading: false, loading: false,
refundOldData: [], refundOldData: [],
imageFileArr: [],
imgViewerVisible: false,
// 标记apiList是否都正确返回数据 // 标记apiList是否都正确返回数据
baseApiIdx: 0, baseApiIdx: 0,
okParams: {}, okParams: {},
...@@ -479,7 +490,10 @@ export default { ...@@ -479,7 +490,10 @@ export default {
], ],
tableRules: { tableRules: {
refundAmount: [ 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: { orderTableParams: {
...@@ -614,6 +628,9 @@ export default { ...@@ -614,6 +628,9 @@ export default {
this.uploadFileList = newVal.filter( this.uploadFileList = newVal.filter(
(v) => !this.filterEmpty(v.uploadProgress) || v.fileUrl (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 deep: true
...@@ -702,7 +719,7 @@ export default { ...@@ -702,7 +719,7 @@ export default {
this.orderInfoList.push({ this.orderInfoList.push({
orderCode: this.detail.orderCode, orderCode: this.detail.orderCode,
price: this.detail.totalPrice, price: this.detail.totalPrice,
total: this.detail.total, total: this.detail.total.toFixed(2),
refundSubOrderCode: this.detail.refundSubOrderCode, refundSubOrderCode: this.detail.refundSubOrderCode,
refundApplyDetailList: this.detail.refundApplyDetailList refundApplyDetailList: this.detail.refundApplyDetailList
}) })
...@@ -1049,15 +1066,16 @@ export default { ...@@ -1049,15 +1066,16 @@ export default {
}, },
// 预览文件 // 预览文件
handleFileView(item) { handleFileView(item) {
// if (!item.fileUrl) return console.log(item, 'item--')
// if (item?.fileUrl.includes('.pdf')) { // pdf文件直接打开新窗口预览 if (!item.fileUrl) return
// window.open(item.fileUrl) if (item?.fileUrl.includes('.pdf')) { // pdf文件直接打开新窗口预览
// } else { window.open(item.fileUrl)
// this.imgViewerVisible = true } else if (item.fileUrl.includes('.png') || item.fileUrl.includes('jpg')) {
// this.imageFileArr.forEach((val, index) => { this.imgViewerVisible = true
// if (val == item.fileUrl) this.initialIndex = index this.imageFileArr.forEach((val, index) => {
// }) if (val == item.fileUrl) this.initialIndex = index
// } })
}
}, },
closeImgViewer() { closeImgViewer() {
this.imgViewerVisible = false this.imgViewerVisible = false
...@@ -1226,6 +1244,12 @@ export default { ...@@ -1226,6 +1244,12 @@ export default {
margin: 0 !important; margin: 0 !important;
} }
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
.edit-sub-block { .edit-sub-block {
padding-top: 16px; padding-top: 16px;
.el-form-item { .el-form-item {
......
...@@ -13,10 +13,14 @@ ...@@ -13,10 +13,14 @@
<span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' : <span class="status">{{ infoForm.approveStatus == null ? '未审核' : infoForm.approveStatus == "Y" ? '通过' :
'未通过' }}</span> '未通过' }}</span>
</el-form-item> </el-form-item>
<el-form-item label="施工图片:" class="imgItem"> <el-form-item label="" class="imgItem">
<img class="img" v-for="(item, index) in infoForm.constructionImgList" :key="index" :src="item" alt=""> <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-item>
</el-form> </el-form>
<el-image-viewer v-if="imgVisible" :mask-closable="true" zIndex="3000" :on-close="closeImgViewer"
:url-list="imgList" :initial-index="initialIndex" />
</d2-dialog> </d2-dialog>
</template> </template>
...@@ -24,13 +28,21 @@ ...@@ -24,13 +28,21 @@
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
export default { export default {
name: 'technicianDialog', name: 'technicianDialog',
components: {
"el-image-viewer": () =>
import("element-ui/packages/image/src/image-viewer")
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
infoForm: { infoForm: {
// remark: '' // remark: ''
}, },
imgVisible: false,
index: 0,
initialIndex: 0,
imgList: [],
imgUrlName: "",
formRules: { formRules: {
remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }] remark: [{ required: true, message: '请输入备注信息', trigger: 'change' }]
} }
...@@ -53,14 +65,22 @@ export default { ...@@ -53,14 +65,22 @@ export default {
created() { created() {
}, },
components: {},
mounted() { mounted() {
this.infoForm = deepClone(this.detail) this.infoForm = deepClone(this.detail)
}, },
methods: { 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() { handleAddConfirm() {
this.handleClose(true) this.handleClose(true)
}, },
...@@ -93,6 +113,7 @@ export default { ...@@ -93,6 +113,7 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
padding: 0 10px;
::v-deep .el-form-item__content { ::v-deep .el-form-item__content {
margin-left: 0 !important; margin-left: 0 !important;
...@@ -102,12 +123,11 @@ export default { ...@@ -102,12 +123,11 @@ export default {
.img { .img {
width: 120px; width: 120px;
height: 120px; height: 120px;
}
.img+.img {
margin-left: 10px; margin-left: 10px;
} }
// .img {}
.status { .status {
color: #2A58AD; color: #2A58AD;
} }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</span> </span>
<!-- 下载 --> <!-- 下载 -->
<span style="margin-right: 10px;" <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" <auth-button :data="scope.scope"
:show-btn-ids="['9040808']" /> :show-btn-ids="['9040808']" />
<span v-if="scope.scope.downCount != 0" <span v-if="scope.scope.downCount != 0"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
> >
<div class="detail-content"> <div class="detail-content">
<div class="form_div"> <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-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="客户:"> <el-form-item label="客户:">
...@@ -539,7 +539,7 @@ export default { ...@@ -539,7 +539,7 @@ export default {
white-space: nowrap; /* 禁止文本换行 */ white-space: nowrap; /* 禁止文本换行 */
overflow: hidden; /* 超出内容隐藏 */ overflow: hidden; /* 超出内容隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */ text-overflow: ellipsis; /* 超出部分显示省略号 */
max-width: 150px; max-width: 150px;
} }
</style> </style>
......
...@@ -108,11 +108,11 @@ ...@@ -108,11 +108,11 @@
<div class="max-value">可退金额:{{refundInfo.total}}</div> <div class="max-value">可退金额:{{refundInfo.total}}</div>
</template> </template>
</glsx-combi-form> </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"> <d2-table ref="recordTable" :table-params="orderTableParams" :tableData="refundInfo.refundApplyDetailList" :hasPage="false">
<div slot="tableRefundAmount" slot-scope="scope"> <div slot="tableRefundAmount" slot-scope="scope">
<el-form-item :prop="'refundApplyDetailList.' + scope.index + '.refundAmount'" :rules="tableRules.refundAmount"> <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-input>
</el-form-item> </el-form-item>
</div> </div>
...@@ -420,7 +420,10 @@ export default { ...@@ -420,7 +420,10 @@ export default {
refundOldData: [], refundOldData: [],
tableRules: { tableRules: {
refundAmount: [ 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: { orderTableParams: {
...@@ -731,7 +734,7 @@ export default { ...@@ -731,7 +734,7 @@ export default {
handleConfirm(val) { handleConfirm(val) {
console.log(val, '=====') console.log(val, '=====')
this.refundInfo.refundSubOrderCode = val.refundSubOrderCode this.refundInfo.refundSubOrderCode = val.refundSubOrderCode
this.refundInfo.total = val.total this.refundInfo.total = val.total.toFixed(2)
this.refundInfo.isAll = val.isAll this.refundInfo.isAll = val.isAll
this.refundInfo.isOneSubFirst = val.isOneSubFirst this.refundInfo.isOneSubFirst = val.isOneSubFirst
this.refundInfo.refundApplyDetailList = val.refundApplyDetailList this.refundInfo.refundApplyDetailList = val.refundApplyDetailList
...@@ -958,6 +961,13 @@ export default { ...@@ -958,6 +961,13 @@ export default {
::v-deep .el-dialog__footer { ::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
} }
.refund-table {
.el-form-item {
margin: 16px 0;
}
}
} }
.max-value { .max-value {
margin-left: 220px; margin-left: 220px;
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>{{ queryData.employeeName || "-" }} <span
{{ queryData.phoneNumber || "" }}</span> >{{ queryData.employeeName || "-" }}
{{ queryData.phoneNumber || "" }}</span
>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
...@@ -31,7 +33,7 @@ ...@@ -31,7 +33,7 @@
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>接待批次/批:</label> <label>接待批次/批:</label>
<span>{{ batchNum }}</span> <span>{{ queryData.batchNum }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -79,7 +81,9 @@ ...@@ -79,7 +81,9 @@
@click="handleReset" @click="handleReset"
:data-track="JSON.stringify(searchForm)" :data-track="JSON.stringify(searchForm)"
data-event-code="reception_list_search" data-event-code="reception_list_search"
> 重置 </el-button> >
重置
</el-button>
</div> </div>
<div class="content-table"> <div class="content-table">
<d2-table <d2-table
...@@ -92,19 +96,13 @@ ...@@ -92,19 +96,13 @@
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@pageChange="pageChange" @pageChange="pageChange"
> >
<div <div slot="durationHtml" slot-scope="scope">
slot="durationHtml"
slot-scope="scope"
>
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div <div slot="scoreHtml" slot-scope="scope">
slot="scoreHtml"
slot-scope="scope"
>
<!-- <template v-if="scope.scope.bussinessType != 2"> --> <!-- <template v-if="scope.scope.bussinessType != 2"> -->
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
...@@ -113,58 +111,56 @@ ...@@ -113,58 +111,56 @@
<!-- </template> <!-- </template>
<template v-else>-</template> --> <template v-else>-</template> -->
</div> </div>
<div <div slot="estimatedResult" slot-scope="scope">
slot="estimatedResult"
slot-scope="scope"
>
<!-- v-if="scope.scope.bussinessType != 2" --> <!-- v-if="scope.scope.bussinessType != 2" -->
<div :class="['tag', setTagColor(scope.scope.estimatedResult)]"> <div :class="['tag', setTagColor(scope.scope.estimatedResult)]">
{{ scope.scope.estimatedResult }} {{ scope.scope.estimatedResult }}
</div> </div>
<!-- <div v-else></div> --> <!-- <div v-else></div> -->
</div> </div>
<div <div slot="defencePoint" slot-scope="scope">
slot="defencePoint"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint ? scope.scope.defencePoint : "-" scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template> }}</template>
<template v-else-if=" <template
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 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> <template v-else>-</template>
</div> </div>
<div <div slot="customerTypeName" slot-scope="scope">
slot="customerTypeName"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName scope.scope.customerTypeName
? scope.scope.customerTypeName ? scope.scope.customerTypeName
: "-" : "-"
}}</template> }}</template>
<template v-else-if=" <template
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
">分析中</template> "
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template> <template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<template <template slot="auth-button" slot-scope="scope">
slot="auth-button"
slot-scope="scope"
>
<el-button <el-button
type="text" type="text"
@click="qualitDetail(scope.scope)" @click="qualitDetail(scope.scope)"
:data-track="JSON.stringify({ :data-track="
batchId:scope.scope.id JSON.stringify({
})" batchId: scope.scope.id
})
"
data-event-code="reception_detail" data-event-code="reception_detail"
> >
接待详情 接待详情
...@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range" ...@@ -198,14 +194,14 @@ import ElInputRange from "../el-input-range"
import QualityDetail from "./qualityDetail.vue" import QualityDetail from "./qualityDetail.vue"
import NewQualityDetail from "./newQualityDetail.vue" import NewQualityDetail from "./newQualityDetail.vue"
import { conversationPage } from "@api/resident" import { conversationPage } from "@api/resident"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin' import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
export default { export default {
mixins: [reportTrackFunMixin], mixins: [reportTrackFunMixin],
props: { props: {
queryData: Object, queryData: Object,
show: Boolean show: Boolean
}, },
data () { data() {
return { return {
isQualityVisible: false, isQualityVisible: false,
isNewQualityVisible: false, isNewQualityVisible: false,
...@@ -259,14 +255,14 @@ export default { ...@@ -259,14 +255,14 @@ export default {
{ {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter (row) { formatter(row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter (row) { formatter(row) {
let result = { let result = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
...@@ -303,7 +299,7 @@ export default { ...@@ -303,7 +299,7 @@ export default {
label: "安心包是否开口", label: "安心包是否开口",
prop: "axbOpenFlag", prop: "axbOpenFlag",
width: 130, width: 130,
formatter (row) { formatter(row) {
return row.axbOpenFlag ? "是" : "否" return row.axbOpenFlag ? "是" : "否"
} }
}, },
...@@ -311,7 +307,7 @@ export default { ...@@ -311,7 +307,7 @@ export default {
label: "安心包是否成交", label: "安心包是否成交",
prop: "isFinishFlag", prop: "isFinishFlag",
width: 130, width: 130,
formatter (row) { formatter(row) {
return row.finishFlag ? "是" : "否" return row.finishFlag ? "是" : "否"
} }
}, },
...@@ -344,8 +340,8 @@ export default { ...@@ -344,8 +340,8 @@ export default {
qualityDetailList: [], qualityDetailList: [],
currentNum: 0, currentNum: 0,
batchNum: null, batchNum: null,
track_event_code: 'reception_detail_list', track_event_code: "reception_detail_list",
track_businessParam_key: 'searchForm' track_businessParam_key: "searchForm"
} }
}, },
components: { components: {
...@@ -355,14 +351,14 @@ export default { ...@@ -355,14 +351,14 @@ export default {
}, },
watch: { watch: {
show: { show: {
handler (val) { handler(val) {
if (val) this.onPageShow() if (val) this.onPageShow()
else this.onPageHide() else this.onPageHide()
}, },
immediate: true immediate: true
} }
}, },
mounted () { mounted() {
this.getOptionsList() this.getOptionsList()
let timer = setInterval(() => { let timer = setInterval(() => {
if (timer && this.batchNum != null) { if (timer && this.batchNum != null) {
...@@ -374,7 +370,7 @@ export default { ...@@ -374,7 +370,7 @@ export default {
}, 1e3) }, 1e3)
}, },
methods: { methods: {
toMinutesAndSeconds (seconds) { toMinutesAndSeconds(seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = "" let formattedTime = ""
if (seconds < 60) { if (seconds < 60) {
...@@ -395,10 +391,10 @@ export default { ...@@ -395,10 +391,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch () { handleSearch() {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -406,9 +402,9 @@ export default { ...@@ -406,9 +402,9 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
closeDialog () { closeDialog() {
if(this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide() if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if(this.$refs.newQualityDetail) { if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause() this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide() this.$refs.newQualityDetail.onPageHide()
} }
...@@ -416,7 +412,7 @@ export default { ...@@ -416,7 +412,7 @@ export default {
this.isNewQualityVisible = false this.isNewQualityVisible = false
this.onPageShow() this.onPageShow()
}, },
qualitDetail (row) { qualitDetail(row) {
const list = this.$refs.recepDetail.data, const list = this.$refs.recepDetail.data,
currentNum = list.findIndex((e) => e.id == row.id) currentNum = list.findIndex((e) => e.id == row.id)
this.currentNum = currentNum this.currentNum = currentNum
...@@ -428,7 +424,7 @@ export default { ...@@ -428,7 +424,7 @@ export default {
} }
this.onPageHide() this.onPageHide()
}, },
beforeSearchFn () { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
const { queryData } = this const { queryData } = this
if (!this.searchForm.recepTime.length) if (!this.searchForm.recepTime.length)
...@@ -471,19 +467,19 @@ export default { ...@@ -471,19 +467,19 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun (data) { setTableFinishFun(data) {
let { page } = this.$refs.recepDetail let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1) data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
} }
}, },
getOptionsList () { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel this.showFormData[index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -499,7 +495,7 @@ export default { ...@@ -499,7 +495,7 @@ export default {
} }
}) })
}, },
setTagColor (estimatedResult) { setTagColor(estimatedResult) {
switch (estimatedResult) { switch (estimatedResult) {
case "成交": case "成交":
return "greenBg" return "greenBg"
...@@ -509,9 +505,9 @@ export default { ...@@ -509,9 +505,9 @@ export default {
return "grayBg" return "grayBg"
} }
}, },
pageChange (page) { pageChange(page) {
let { searchForm } = this let { searchForm } = this
this.setReportTrackData(0, 'reception_list_page', { this.setReportTrackData(0, "reception_list_page", {
...searchForm, ...searchForm,
...page ...page
}) })
......
...@@ -196,7 +196,7 @@ export default { ...@@ -196,7 +196,7 @@ export default {
pickerOptions: "rangePickerOptions_30day2" pickerOptions: "rangePickerOptions_30day2"
}, },
{ {
label: "app接待结果", label: "接待结果",
name: "orderFinishFlag", name: "orderFinishFlag",
type: "select", type: "select",
isClear: true, isClear: true,
......
...@@ -48,11 +48,14 @@ ...@@ -48,11 +48,14 @@
<div> <div>
考核成绩:<span>{{ course.totalScore || 0 }}分</span> 考核成绩:<span>{{ course.totalScore || 0 }}分</span>
</div> </div>
<div> <div v-if="course.finishDate">
完成时间:<span>{{ course.finishDate || "-" }}</span> 完成时间:<span>{{ course.finishDate || "-" }}</span>
</div> </div>
</div> </div>
<div class="status orange" v-if="course.status"> <div
:class="['status', statusColors[course.status]]"
v-if="course.status"
>
{{ statusObj[course.status] }} {{ statusObj[course.status] }}
</div> </div>
</el-tooltip> </el-tooltip>
...@@ -111,12 +114,14 @@ export default { ...@@ -111,12 +114,14 @@ export default {
], ],
cityOptions: ["上海", "北京", "广州", "深圳"], cityOptions: ["上海", "北京", "广州", "深圳"],
statusObj: { statusObj: {
1: "未学习",
2: "未完成", 2: "未完成",
3: "待考核",
4: "未通过",
5: "已完成" 5: "已完成"
}, },
statusColors: {
2: "orange",
5: "green"
},
selectObj: { selectObj: {
courseTotalDuration: 0, courseTotalDuration: 0,
count: 0 count: 0
...@@ -136,6 +141,7 @@ export default { ...@@ -136,6 +141,7 @@ export default {
reset() { reset() {
this.selected = [] this.selected = []
this.selectCourseList = [] this.selectCourseList = []
this.titleActiveIndex = 0
}, },
handleCheckedChange(val) { handleCheckedChange(val) {
console.log(val) console.log(val)
...@@ -150,13 +156,52 @@ export default { ...@@ -150,13 +156,52 @@ export default {
this.selectCourseList = this.courseList.filter((item) => { this.selectCourseList = this.courseList.filter((item) => {
const isSelected = this.selected.includes(item.courseId) const isSelected = this.selected.includes(item.courseId)
if (isSelected) { if (isSelected) {
this.selectObj.courseTotalDuration += item.courseTotalDuration // 使用 toFixed(2) 保留两位小数,防止浮点误差
this.selectObj.courseTotalDuration = parseFloat(
(
this.selectObj.courseTotalDuration + item.courseTotalDuration
).toFixed(2)
)
this.selectObj.count += 1 this.selectObj.count += 1
} }
return isSelected return isSelected
}) })
this.$emit("handleCourse", this.selectCourseList) 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) { delCourse(val) {
this.selectObj = { this.selectObj = {
courseTotalDuration: 0, courseTotalDuration: 0,
...@@ -171,7 +216,11 @@ export default { ...@@ -171,7 +216,11 @@ export default {
this.selected.splice(selectedIndex, 1) this.selected.splice(selectedIndex, 1)
this.selectCourseList.splice(currentIndex, 1) this.selectCourseList.splice(currentIndex, 1)
this.selectCourseList.forEach((item) => { 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.selectObj.count += 1
}) })
this.$emit("handleCourse", this.selectCourseList) this.$emit("handleCourse", this.selectCourseList)
...@@ -187,7 +236,7 @@ export default { ...@@ -187,7 +236,7 @@ export default {
this.search() this.search()
}, },
search() { search() {
this.$EventBus.$emit("fromAllocation", this.courseForm) this.$emit("fromAllocation", this.courseForm)
} }
} }
} }
...@@ -339,6 +388,10 @@ export default { ...@@ -339,6 +388,10 @@ export default {
font-weight: 500; font-weight: 500;
border-radius: 2px; border-radius: 2px;
} }
.ash {
color: #c6c8cc;
border: 1px solid #c6c8cc;
}
.orange { .orange {
color: #f59619; color: #f59619;
border: 1px solid #f59619; border: 1px solid #f59619;
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
</div> </div>
</div> </div>
<components <components
ref="components"
:is="tabName" :is="tabName"
:staffDetailInfo="staffDetailInfo" :aiJy="aiJy"
:courseList="courseList"
:staffItem="staffItem" :staffItem="staffItem"
@handleConfigureCourse="handleConfigureCourse" @handleConfigureCourse="handleConfigureCourse"
:staffList="staffList" :staffList="staffList"
...@@ -57,8 +57,7 @@ import couseAllocation from "./couseAllocation" ...@@ -57,8 +57,7 @@ import couseAllocation from "./couseAllocation"
import { import {
customizeList, customizeList,
findStaffByMerchantNo, findStaffByMerchantNo,
findStoreEmployeePerformance, findStoreEmployeePerformance
getStaffTagCourseList
} from "@/api/serviceCentre" } from "@/api/serviceCentre"
export default { export default {
name: "configureCourse", name: "configureCourse",
...@@ -76,6 +75,7 @@ export default { ...@@ -76,6 +75,7 @@ export default {
} }
], ],
tabName: "staffDetail", tabName: "staffDetail",
aiJy: "",
staffItem: {}, staffItem: {},
staffList: [], staffList: [],
courseList: [], courseList: [],
...@@ -88,10 +88,10 @@ export default { ...@@ -88,10 +88,10 @@ export default {
}, },
created() { created() {
//课程搜索功能 //课程搜索功能
this.$EventBus.$on("fromAllocation", (courseForm) => { // this.$EventBus.$on("fromAllocation", (courseForm) => {
console.log("父组件接收到孙组件事件:", courseForm) // console.log("父组件接收到孙组件事件:", courseForm)
this.getStaffTagCourseList(courseForm) // this.getStaffTagCourseList(courseForm)
}) // })
}, },
async mounted() { async mounted() {
this.queryData = this.$route.query this.queryData = this.$route.query
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
this.staffList = await this.getStaffInfoData() this.staffList = await this.getStaffInfoData()
this.staffItem = this.staffList[this.staffIndex] this.staffItem = this.staffList[this.staffIndex]
//查询员工详情 //查询员工详情
this.findStoreEmployeePerformanceData() // this.findStoreEmployeePerformanceData()
}, },
methods: { methods: {
//提交本员工配置回调 //提交本员工配置回调
...@@ -118,22 +118,22 @@ export default { ...@@ -118,22 +118,22 @@ export default {
phone: staffItem.phone, phone: staffItem.phone,
scene: queryData.scene scene: queryData.scene
}).then((res) => { }).then((res) => {
this.staffDetailInfo = res 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 : []
}) })
}, },
// 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) { handleStatistics(res) {
let total = 0, let total = 0,
complete = 0 complete = 0
...@@ -166,13 +166,8 @@ export default { ...@@ -166,13 +166,8 @@ export default {
handleClick(index) { handleClick(index) {
this.staffIndex = index this.staffIndex = index
this.staffItem = this.staffList[this.staffIndex] this.staffItem = this.staffList[this.staffIndex]
if (this.activeName == 0) {
//查询员工详情 this.findStoreEmployeePerformanceData()
this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
this.getStaffTagCourseList()
}
}, },
handleTabClick(index) { handleTabClick(index) {
this.activeName = index this.activeName = index
...@@ -181,13 +176,19 @@ export default { ...@@ -181,13 +176,19 @@ export default {
1: "couseAllocation" 1: "couseAllocation"
} }
this.tabName = arr[+this.activeName] this.tabName = arr[+this.activeName]
if (index == 0) {
//查询员工详情 this.$nextTick(() => {
this.findStoreEmployeePerformanceData() console.log(this.$refs.components)
} else { if (index == 0) {
//获取配置课程列表 //查询员工详情
this.getStaffTagCourseList() this.$refs.components?.findStoreEmployeePerformanceData()
} // this.findStoreEmployeePerformanceData()
} else {
//获取配置课程列表
// this.getStaffTagCourseList()
this.$refs.components?.getStaffTagCourseList()
}
})
}, },
handleEndConfigure() { handleEndConfigure() {
if (this.statisticsObj.total != this.statisticsObj.complete) { if (this.statisticsObj.total != this.statisticsObj.complete) {
......
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" <baseDialog
:config="dialogConfig.setting" :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config" :config="dialogConfig.setting"
class="detail-content-warn"> :dialog-config="dialogConfig.config"
class="detail-content-warn"
>
<div v-loading="loading"> <div v-loading="loading">
<div class="form_div"> <div class="form_div">
<div class="div-title">个人信息</div> <div class="div-title">个人信息</div>
<el-form class="edit-sub-block" <el-form class="edit-sub-block" label-width="120px" :inline="true">
label-width="120px"
:inline="true">
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="姓名:" <el-form-item label="姓名:" class="halfItem">
class="halfItem">
{{ staffInfo.staffName ? staffInfo.staffName : "-" }} {{ staffInfo.staffName ? staffInfo.staffName : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="手机号码:" <el-form-item label="手机号码:" class="halfItem">
class="halfItem">
{{ staffInfo.staffPhone ? staffInfo.staffPhone : "-" }} {{ staffInfo.staffPhone ? staffInfo.staffPhone : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="门店:" <el-form-item label="门店:" class="halfItem">
class="halfItem">
{{ staffInfo.merchantNames ? staffInfo.merchantNames : "-" }} {{ staffInfo.merchantNames ? staffInfo.merchantNames : "-" }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="上级:" <el-form-item label="上级:" class="halfItem">
class="halfItem">
{{ staffInfo.superiors ? staffInfo.superiors : "-" }} {{ staffInfo.superiors ? staffInfo.superiors : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="导师:" <el-form-item label="导师:" class="halfItem">
class="halfItem">
{{ staffInfo.mentors ? staffInfo.mentors : "-" }} {{ staffInfo.mentors ? staffInfo.mentors : "-" }}
</el-form-item> </el-form-item>
</div> </div>
<div class="div-title">任务信息</div> <div class="div-title">任务信息</div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="学习任务名称:" <el-form-item label="学习任务名称:" class="halfItem">
class="halfItem">
{{ paramsObj.title ? paramsObj.title : "-" }} {{ paramsObj.title ? paramsObj.title : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="任务状态:" <el-form-item label="任务状态:" class="halfItem">
class="halfItem"> <span :class="colorClass[paramsObj.taskStatus]"></span
<span :class="colorClass[paramsObj.taskStatus]"></span>{{ taskStatusShow }} >{{ taskStatusShow }}
</el-form-item> </el-form-item>
<el-form-item label="处罚状态:" <el-form-item label="处罚状态:" class="halfItem">
class="halfItem"> <span :class="colorClass2[paramsObj.punishStatus]"></span
<span :class="colorClass2[paramsObj.punishStatus]"></span>{{ punishStatusShow }} >{{ punishStatusShow }}
</el-form-item> </el-form-item>
</div> </div>
<div class="itemDiv"> <div class="itemDiv">
<el-form-item label="课程完成时间:" <el-form-item label="课程完成时间:" class="halfItem">
class="halfItem">
{{ paramsObj.passedTime ? paramsObj.passedTime : "-" }} {{ paramsObj.passedTime ? paramsObj.passedTime : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="课程配置时间:" <el-form-item label="课程配置时间:" class="halfItem">
class="halfItem">
{{ paramsObj.sendTime ? paramsObj.sendTime : "-" }} {{ paramsObj.sendTime ? paramsObj.sendTime : "-" }}
</el-form-item> </el-form-item>
<el-form-item label="课程结束时间:" <el-form-item label="课程结束时间:" class="halfItem">
class="halfItem">
{{ paramsObj.finishDate ? paramsObj.finishDate : "-" }} {{ paramsObj.finishDate ? paramsObj.finishDate : "-" }}
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="div-title">课程列表</div> <div class="div-title">课程列表</div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table ref="recordTable" <d2-table
:get-list-api="getListApi" ref="recordTable"
:search-form="searchFormSearch" :get-list-api="getListApi"
:table-params="tableParams" :search-form="searchFormSearch"
:before-search-fn="beforeSearchFn"> :table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
</d2-table> </d2-table>
</div> </div>
</div> </div>
</div> </div>
</basedialog> </baseDialog>
</div> </div>
</template> </template>
<script> <script>
import { staffCourse, staffInfo } from "@api/serviceCentre" import { staffCourse, staffInfo } from "@api/serviceCentre"
import { Util, deepClone } from "@/common/util" 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 { export default {
name: "CourseDetailDialog", name: "CourseDetailDialog",
components: { components: {},
},
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
...@@ -104,8 +100,8 @@ export default { ...@@ -104,8 +100,8 @@ export default {
}, },
set(val) { set(val) {
// this.$emit("update:visible", val) // this.$emit("update:visible", val)
console.log('this.refreshFlag', this.refreshFlag) console.log("this.refreshFlag", this.refreshFlag)
this.$emit('dialogClose', { flag: this.refreshFlag }) this.$emit("dialogClose", { flag: this.refreshFlag })
} }
} }
}, },
...@@ -135,59 +131,68 @@ export default { ...@@ -135,59 +131,68 @@ export default {
getListApi: staffCourse, getListApi: staffCourse,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableOption: false, tableOption: false,
tableColumns: [{ tableColumns: [
label: '课程名称', {
prop: 'courseName', label: "课程名称",
width: '300px' prop: "courseName",
}, { width: "300px"
label: '学习时长', },
prop: 'learnDuration' {
}, { label: "学习时长",
label: '学习进度', prop: "courseTotalDuration"
prop: 'failReason', },
formatter: (cellValue) => { {
return this.learningProgressOpt.find( label: "学习进度",
(item) => item.confId === cellValue.status prop: "failReason",
)?.confValue + (cellValue.status == 2 ? `(${cellValue.progress}%)` : '') 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 { label: "成绩",
1: 'ashSpot', prop: "totalScore"
2: 'orgenSpot', },
5: 'greenSpot' {
}[cellValue.status] label: "完成时间",
prop: "finishDate"
} }
}, { ]
label: '成绩',
prop: 'totalScore'
}, {
label: '完成时间',
prop: 'finishDate'
}]
}, },
taskStatusOpt: deepClone(course_taskStatusOpt), taskStatusOpt: deepClone(course_taskStatusOpt),
punishStatusOpt: deepClone(punishStatusOpt), punishStatusOpt: deepClone(punishStatusOpt),
learningProgressOpt: deepClone(learningProgressOpt), learningProgressOpt: deepClone(learningProgressOpt),
taskStatusShow: '', taskStatusShow: "",
punishStatusShow: '', punishStatusShow: "",
refreshFlag: false, refreshFlag: false,
colorClass: { colorClass: {
0: 'ashSpot', 0: "ashSpot",
1: 'orgenSpot', 1: "orgenSpot",
2: 'greenSpot' 2: "greenSpot"
}, },
colorClass2: { colorClass2: {
1: 'ashSpot', 1: "ashSpot",
2: 'orgenSpot', 2: "orgenSpot",
3: 'greenSpot' 3: "greenSpot"
} }
} }
}, },
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchForm.staffStudyId = this.paramsObj.id this.searchForm.staffStudyId = this.paramsObj.id
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
resolve() resolve()
...@@ -196,13 +201,13 @@ export default { ...@@ -196,13 +201,13 @@ export default {
getStaffInfo() { getStaffInfo() {
var params = { staffPhone: this.paramsObj.staffPhone } var params = { staffPhone: this.paramsObj.staffPhone }
staffInfo(params).then(res => { staffInfo(params).then((res) => {
this.staffInfo = res this.staffInfo = res
}) })
}, },
getStaffCourse() { getStaffCourse() {
var params = { staffStudyId: this.paramsObj.id } var params = { staffStudyId: this.paramsObj.id }
staffCourse(params).then(res => { staffCourse(params).then((res) => {
// this.staffInfo = res // this.staffInfo = res
}) })
}, },
...@@ -214,7 +219,9 @@ export default { ...@@ -214,7 +219,9 @@ export default {
if (info.taskStatus == 1) { if (info.taskStatus == 1) {
this.taskStatusShow = this.taskStatusShow + `(${info.progress}%)` 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 { ...@@ -483,7 +490,7 @@ export default {
} }
</style> </style>
<style > <style>
.detailDialog-tooltip-width { .detailDialog-tooltip-width {
max-width: 500px; max-width: 500px;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="couseAllocation"> <div class="couseAllocation">
<div class="header">AI导师建议</div> <div class="header">AI导师建议</div>
<div class="ai-suggest"> <div class="ai-suggest">
{{ staffDetailInfo.aiJy ? staffDetailInfo.aiJy : "暂无AI导师建议" }} {{ aiJy ? aiJy : "暂无AI导师建议" }}
</div> </div>
<div class="header">课程配置</div> <div class="header">课程配置</div>
<!-- 已配置 --> <!-- 已配置 -->
...@@ -60,8 +60,9 @@ ...@@ -60,8 +60,9 @@
<div slot="allocationHtml" slot-scope="scope"> <div slot="allocationHtml" slot-scope="scope">
<curricula-variable <curricula-variable
ref="curriculaVariable" ref="curriculaVariable"
:courseList="courseAllocationData" :courseList="courseList"
@handleCourse="handleCourse" @handleCourse="handleCourse"
@fromAllocation="fromAllocation"
></curricula-variable> ></curricula-variable>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -79,6 +80,7 @@ ...@@ -79,6 +80,7 @@
v-if="multipleVisible" v-if="multipleVisible"
@dialogClose="handleCloseDialog" @dialogClose="handleCloseDialog"
:staffList="staffListData" :staffList="staffListData"
:staffItem="staffItem"
@handleMultiple="handleConfirmMultiple" @handleMultiple="handleConfirmMultiple"
></multipleDialog> ></multipleDialog>
</div> </div>
...@@ -86,7 +88,12 @@ ...@@ -86,7 +88,12 @@
<script> <script>
import curriculaVariable from "./allocation" import curriculaVariable from "./allocation"
import multipleDialog from "./multiple" import multipleDialog from "./multiple"
import { insertOrUpdate, staffCourse, getByTaskId } from "@/api/serviceCentre" import {
insertOrUpdate,
staffCourse,
getByTaskId,
getStaffTagCourseList
} from "@/api/serviceCentre"
export default { export default {
components: { components: {
curriculaVariable, curriculaVariable,
...@@ -98,12 +105,13 @@ export default { ...@@ -98,12 +105,13 @@ export default {
handleFormRef: "handleFormRef", handleFormRef: "handleFormRef",
multipleVisible: false, multipleVisible: false,
extendConfig: { extendConfig: {
punishType: 1, //惩罚方式:0无 1禁止录单 punishType: 0, //惩罚方式:0无 1禁止录单
deadline: "", deadline: "",
title: "", title: "",
studyType: 1, studyType: 1,
courseList: [] courseList: []
}, },
aiJy: "",
alreadyConfig: {}, alreadyConfig: {},
handleFormRef: "handleFormRef", handleFormRef: "handleFormRef",
formRules: { formRules: {
...@@ -140,11 +148,11 @@ export default { ...@@ -140,11 +148,11 @@ export default {
optionList: [ optionList: [
{ {
confLabel: "不处罚", confLabel: "不处罚",
confId: 1 confId: 0
}, },
{ {
confLabel: "限制录单", confLabel: "限制录单",
confId: 2 confId: 1
} }
], ],
optionId: "confId", optionId: "confId",
...@@ -165,8 +173,8 @@ export default { ...@@ -165,8 +173,8 @@ export default {
maxlength: 20 maxlength: 20
} }
], ],
courseAllocationData: [],
staffListData: [], staffListData: [],
courseList: [],
staffTagCourseList: [], //已配置的课程列表 staffTagCourseList: [], //已配置的课程列表
selectObj: { selectObj: {
courseTotalDuration: 0, courseTotalDuration: 0,
...@@ -179,9 +187,9 @@ export default { ...@@ -179,9 +187,9 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
courseList: { aiJy: {
type: Array, type: String,
default: () => [] default: ""
}, },
staffItem: { staffItem: {
type: Object, type: Object,
...@@ -193,21 +201,29 @@ export default { ...@@ -193,21 +201,29 @@ export default {
} }
}, },
watch: { watch: {
courseList: { // courseList: {
handler(val) { // handler(val) {
console.log(val, "val") // console.log(val, "val")
this.courseAllocationData = val // this.courseAllocationData = val
this.handleReset() // this.handleReset()
}, // },
deep: true // deep: true
}, // },
staffList: { staffList: {
handler(val) { handler(val) {
console.log(val, "我是员工我是员工我是员工") this.staffListData = val.map((record) => {
this.staffListData = val.map((record) => ({ if (record.staffUUID == this.staffItem.staffUUID) {
...record, return {
active: false // 初始化为 false ...record,
})) active: true
}
} else {
return {
...record,
active: false
}
}
})
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -217,24 +233,52 @@ export default { ...@@ -217,24 +233,52 @@ export default {
console.log(val, "我是员工详情") console.log(val, "我是员工详情")
if (val.courseConfigFlag == 1) { if (val.courseConfigFlag == 1) {
//查询员工已配置课程 //查询员工已配置课程
this.getStaffTagCourseList() this.getStaffCourse()
//查询员工已配置详情 //查询员工已配置详情
this.getByTaskId() this.getByTaskId()
} else {
this.handleReset()
//获取配置课程列表
this.getStaffTagCourseList()
} }
}, },
deep: true, deep: true,
immediate: true immediate: true
} }
}, },
created() {},
methods: { 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({ staffCourse({
taskId: this.staffItem.taskId taskId: this.staffItem.taskId
}).then((res) => { }).then((res) => {
console.log("获取到已配课", res)
this.staffTagCourseList = res.list 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 { ...@@ -244,7 +288,7 @@ export default {
this.alreadyConfig = { this.alreadyConfig = {
title: res.title, title: res.title,
punishTypeText: punishTypeText:
res.extendConfig.punishType == 1 ? "不处罚" : "限制录单" res.extendConfig.punishType == 0 ? "不处罚" : "限制录单"
} }
}) })
}, },
...@@ -263,10 +307,13 @@ export default { ...@@ -263,10 +307,13 @@ export default {
) )
} }
}, },
fromAllocation(courseForm) {
this.getStaffTagCourseList(courseForm)
},
//重置 //重置
handleReset() { handleReset() {
this.extendConfig = { this.extendConfig = {
punishType: 1, //惩罚方式:0无 1禁止录单 punishType: 0, //惩罚方式:0无 1禁止录单
deadline: "", deadline: "",
title: "", title: "",
studyType: 1, studyType: 1,
......
...@@ -62,6 +62,15 @@ export default { ...@@ -62,6 +62,15 @@ export default {
window.addEventListener("resize", this.resizeHandler) window.addEventListener("resize", this.resizeHandler)
}, },
methods: { methods: {
resizeHandler() {
if (this.chart) {
this.chart.clear()
setTimeout(() => {
this.chart.setOption(this.getChartSetOption())
this.chart.resize()
}, 1000)
}
},
getChartSetOption() { getChartSetOption() {
var options = { var options = {
tooltip: { tooltip: {
......
...@@ -28,6 +28,10 @@ export default { ...@@ -28,6 +28,10 @@ export default {
type: String, type: String,
default: "" default: ""
}, },
title: {
type: String,
default: ""
},
rate: { rate: {
type: String type: String
}, },
...@@ -71,7 +75,7 @@ export default { ...@@ -71,7 +75,7 @@ export default {
grid: { grid: {
bottom: "12%", bottom: "12%",
top: "10%", top: "10%",
left: "15%", left: "20px",
right: "20px" right: "20px"
}, },
tooltip: { tooltip: {
...@@ -90,6 +94,7 @@ export default { ...@@ -90,6 +94,7 @@ export default {
fontSize: 14 fontSize: 14
}, },
formatter: (params) => { formatter: (params) => {
console.log(params)
let rate = String(this.dataRate[params[0].dataIndex][this.rate]) let rate = String(this.dataRate[params[0].dataIndex][this.rate])
return ` return `
<div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${ <div style="font-weight:bold;color:rgba(0, 0, 0, 0.65); line-height: 20px;">${
...@@ -99,7 +104,7 @@ export default { ...@@ -99,7 +104,7 @@ export default {
height: 6px;background: ${ height: 6px;background: ${
params[0].color params[0].color
};border-radius:50%;margin-right:8px;"></div> };border-radius:50%;margin-right:8px;"></div>
${this.title}:${params[0].value} ${this.title}:${params[0].value}%
</div> </div>
<div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${ <div style="margin-left:18px; line-height: 20px;">环比: <span style="color:${
rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E" rate.indexOf("-") > -1 ? "#2CCA74" : "#EB4E4E"
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import { mapActions, mapState } from "vuex"
import { import {
findStoreInfoByMerchantNo, findStoreInfoByMerchantNo,
findStaffByMerchantNo findStaffByMerchantNo
...@@ -32,7 +31,6 @@ export default { ...@@ -32,7 +31,6 @@ export default {
name: "indicatorInfo", name: "indicatorInfo",
data() { data() {
return { return {
listOfPenaltiesShow: false,
noDataImg, noDataImg,
searchForm: { searchForm: {
scene: "", scene: "",
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<template> <template>
<div class="week-replay"> <div class="week-replay">
<div class="header"> <div class="header">
上周学习复盘<span class="time">(2025-06-09 至 2025-06-15)</span> 上周学习复盘<span class="time"
>({{ longForm.startTime }} 至 {{ longForm.endTime }})</span
>
</div> </div>
<div class="improve"> <div class="improve">
<div <div
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="situation-content"> <div class="situation-content" v-if="!isHide">
<div class="time-line"> <div class="time-line">
<div <div
class="line-item" class="line-item"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
{{ sitem.courseNum }}节|{{ sitem.taskTime }} {{ sitem.courseNum }}节|{{ sitem.taskTime }}
<template v-if="sitem.countNameList"> <template v-if="sitem.countNameList">
<div class="collapse" @click="handleCollapse(sIndex)"> <div class="collapse" @click="handleCollapse(sIndex)">
{{ sitem.isCollapse ? "展开" : "收起" }} {{ sitem.isCollapse ? "收起" : "展开" }}
</div> </div>
</template> </template>
</div> </div>
...@@ -87,6 +87,11 @@ ...@@ -87,6 +87,11 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else class="emptyBg">
<img class="noDataImg" src="@/assets/empty.png" />
<p>暂无数据</p>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -95,6 +100,7 @@ export default { ...@@ -95,6 +100,7 @@ export default {
data() { data() {
return { return {
learningInfo: {}, learningInfo: {},
isHide: false,
couseData: [ couseData: [
{ {
text: "长课程", text: "长课程",
...@@ -103,7 +109,8 @@ export default { ...@@ -103,7 +109,8 @@ export default {
return { return {
已改善: "greenSpot", 已改善: "greenSpot",
未改善: "redSpot", 未改善: "redSpot",
进行中: "yellowSpot" 进行中: "yellowSpot",
未学习: "ashSpot"
}[cellValue.longCourseTag] }[cellValue.longCourseTag]
} }
}, },
...@@ -114,7 +121,8 @@ export default { ...@@ -114,7 +121,8 @@ export default {
return { return {
已改善: "greenSpot", 已改善: "greenSpot",
未改善: "redSpot", 未改善: "redSpot",
进行中: "yellowSpot" 进行中: "yellowSpot",
未学习: "ashSpot"
}[cellValue.shortCourseTag] }[cellValue.shortCourseTag]
} }
} }
...@@ -184,6 +192,9 @@ export default { ...@@ -184,6 +192,9 @@ export default {
isCollapse: false // 初始化为 false isCollapse: false // 初始化为 false
})) }))
} }
this.isHide = false
} else {
this.isHide = true
} }
}, },
deep: true, deep: true,
...@@ -443,4 +454,18 @@ export default { ...@@ -443,4 +454,18 @@ export default {
overflow: hidden; 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> </style>
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
> >
环 {{ scope.scope.outputValueRate }} 环 {{ scope.scope.outputValueRate }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
<div slot="Conversion" slot-scope="scope"> <div slot="Conversion" slot-scope="scope">
<div> <div>
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
> >
环 {{ scope.scope.conversionRate }} 环 {{ scope.scope.conversionRate }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
<div slot="CustomerUnitPrice" slot-scope="scope"> <div slot="CustomerUnitPrice" slot-scope="scope">
<div> <div>
...@@ -94,6 +96,7 @@ ...@@ -94,6 +96,7 @@
> >
环 {{ scope.scope.customerUnitPriceRate }} 环 {{ scope.scope.customerUnitPriceRate }}
</div> </div>
<div v-else class="normal">环 -</div>
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -184,7 +187,7 @@ export default { ...@@ -184,7 +187,7 @@ export default {
}, },
{ {
label: "学习时长", label: "学习时长",
prop: "learnDuration" prop: "courseTotalDuration"
}, },
{ {
label: "学习进度", label: "学习进度",
...@@ -341,4 +344,7 @@ export default { ...@@ -341,4 +344,7 @@ export default {
font-size: 12px; font-size: 12px;
color: #43cf7c; color: #43cf7c;
} }
.normal {
font-size: 12px;
}
</style> </style>
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
:form-rules="infoRules" :form-rules="infoRules"
> >
<template slot="multiple" slot-scope="scope"> <template slot="multiple" slot-scope="scope">
<el-checkbox v-model="checkAll" @change="handleCheckAllChange" <el-checkbox
v-model="checkAll"
@change="handleCheckAllChange"
:disabled="disabled"
>全选</el-checkbox >全选</el-checkbox
> >
<div class="staff-list"> <div class="staff-list">
...@@ -46,12 +49,15 @@ export default { ...@@ -46,12 +49,15 @@ export default {
staffList: { staffList: {
type: Array, type: Array,
default: () => [] default: () => []
},
staffItem: {
type: Object,
default: () => {}
} }
}, },
watch: { watch: {
staffList: { staffList: {
handler(val) { handler(val) {
console.log(val, "🚀🚀🚀🚀🚀🚀🚀🚀🚀")
this.filterStaffList(deepClone(val)) this.filterStaffList(deepClone(val))
}, },
deep: true, deep: true,
...@@ -84,6 +90,7 @@ export default { ...@@ -84,6 +90,7 @@ export default {
cancel_name: "取 消", cancel_name: "取 消",
confirm_name: "确定配置" confirm_name: "确定配置"
}, },
disabled: false,
checkAll: false, checkAll: false,
infoRules: { infoRules: {
refundType: [ refundType: [
...@@ -111,8 +118,10 @@ export default { ...@@ -111,8 +118,10 @@ export default {
this.selectStaffList = [] this.selectStaffList = []
}, },
handleChooseStaff(index) { handleChooseStaff(index) {
this.selectStaffList[index].active = !this.selectStaffList[index].active if (this.staffItem.staffUUID !== this.selectStaffList[index].staffUUID) {
this.checkAll = this.selectStaffList.every((item) => item.active) this.selectStaffList[index].active = !this.selectStaffList[index].active
this.checkAll = this.selectStaffList.every((item) => item.active)
}
}, },
filterStaffList(val) { filterStaffList(val) {
this.selectStaffList = [] this.selectStaffList = []
...@@ -121,10 +130,23 @@ export default { ...@@ -121,10 +130,23 @@ export default {
this.selectStaffList.push(item) 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() { handleCheckAllChange() {
this.staffList.forEach((item) => { this.selectStaffList.forEach((item) => {
item.active = this.checkAll if (item.staffUUID == this.staffItem.staffUUID) {
item.active = true
} else {
item.active = this.checkAll
}
}) })
}, },
handleClose() { handleClose() {
......
...@@ -13,13 +13,56 @@ ...@@ -13,13 +13,56 @@
v-if="item.className" v-if="item.className"
:class="[item.className(baseInfo)]" :class="[item.className(baseInfo)]"
></div> ></div>
{{ <template v-if="item.key == 'store'">
item.formatter <template
? item.formatter(baseInfo) v-if="
: baseInfo[item.key] baseInfo[item.key] &&
? 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 </el-form-item></el-col
> >
</template> </template>
...@@ -63,21 +106,22 @@ import LearningSituation from "./learningSituation.vue" ...@@ -63,21 +106,22 @@ import LearningSituation from "./learningSituation.vue"
import PerformanceStatus from "./performanceStatus.vue" import PerformanceStatus from "./performanceStatus.vue"
import { course_businessOpt } from "@/common/constants.js" import { course_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { findStoreEmployeePerformance } from "@/api/serviceCentre"
export default { export default {
components: { components: {
PerformanceStatus, PerformanceStatus,
LearningSituation LearningSituation
}, },
props: { props: {
staffDetailInfo: { staffItem: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
}, },
watch: { watch: {
staffDetailInfo: { staffItem: {
handler(val) { handler(val) {
this.initBaseData(val) this.findStoreEmployeePerformanceData()
}, },
// immediate: true, // immediate: true,
deep: true deep: true
...@@ -86,6 +130,7 @@ export default { ...@@ -86,6 +130,7 @@ export default {
data() { data() {
return { return {
businessOpt: deepClone(course_businessOpt), businessOpt: deepClone(course_businessOpt),
aiJy: "",
baseInfo: {}, baseInfo: {},
performanceInfo: [], performanceInfo: [],
consultationAbility: {}, consultationAbility: {},
...@@ -112,9 +157,11 @@ export default { ...@@ -112,9 +157,11 @@ export default {
title: "归属业务:", title: "归属业务:",
key: "businessType", key: "businessType",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.businessOpt.find( return (
(item) => item.confId === cellValue.businessType this.businessOpt.find(
)?.confValue (item) => item.confId === cellValue.businessType
)?.confValue || "-"
)
} }
} }
], ],
...@@ -134,8 +181,19 @@ export default { ...@@ -134,8 +181,19 @@ export default {
} }
}, },
methods: { methods: {
//查询员工详情
findStoreEmployeePerformanceData() {
let { staffItem, queryData } = this
findStoreEmployeePerformance({
phone: staffItem.phone,
scene: queryData.scene
}).then((res) => {
this.initBaseData(res)
})
},
initBaseData(val) { initBaseData(val) {
this.baseInfo = val.baseInfo this.baseInfo = val.baseInfo ? val.baseInfo : {}
// this.aiJy = val.aiJy
this.consultationAbility = val.consultationAbility this.consultationAbility = val.consultationAbility
val.learningProgress.courseRecords.forEach((item) => { val.learningProgress.courseRecords.forEach((item) => {
item.isCollapse = true item.isCollapse = true
...@@ -164,7 +222,6 @@ export default { ...@@ -164,7 +222,6 @@ export default {
} }
return item return item
}) })
console.log(this.capacityList)
} }
} }
} }
......
...@@ -21,16 +21,20 @@ ...@@ -21,16 +21,20 @@
<div class="value">{{ item.metricValue }}</div> <div class="value">{{ item.metricValue }}</div>
<div class="link"> <div class="link">
环比<span 环比<span
v-if="item.linkRelativeRatio"
:class="[ :class="[
item.linkRelativeRatio.indexOf('-') > -1 ? 'dowm' : 'up' String(item.linkRelativeRatio).indexOf('-') > -1 ? 'dowm' : 'up'
]" ]"
>{{ item.linkRelativeRatio }}</span >{{ item.linkRelativeRatio || "-" }}</span
> >
<div <span v-else>-</span>
class="triangle-down" <template v-if="item.linkRelativeRatio">
v-if="item.linkRelativeRatio.indexOf('-') > -1" <div
></div> class="triangle-down"
<div class="triangle-up" v-else></div> v-if="String(item.linkRelativeRatio).indexOf('-') > -1"
></div>
<div class="triangle-up" v-else></div>
</template>
</div> </div>
</template> </template>
</div> </div>
...@@ -124,24 +128,21 @@ export default { ...@@ -124,24 +128,21 @@ export default {
console.log(33333333333333333) console.log(33333333333333333)
let params = { let params = {
...this.longForm ...this.longForm
// scene: 1,
// startTime: "2025-06-01",
// endTime: "2025-07-06"
} }
findAllItem(params) findAllItem(params)
.then((res) => { .then((res) => {
this.storeIndicatoerInfo = res this.storeIndicatoerInfo = res
this.storeIndicatoerInfo.id = "-9999" this.storeIndicatoerInfo.id = "-9999"
console.log(res)
}) })
.catch((err) => { .catch((err) => {
new Error(err) new Error(err)
}) })
}, },
handleDetail(row) { handleDetail(row) {
console.log(1111)
row.activeName = "storeInfo" row.activeName = "storeInfo"
row.pageId = row.id row.pageId = row.id
row.merchantNos = row.merchantNos
row.scene = this.longForm.scene
this.$emit("openWindow", row) this.$emit("openWindow", row)
} }
}, },
...@@ -153,6 +154,7 @@ export default { ...@@ -153,6 +154,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 16px;
.store-item { .store-item {
width: calc((100% / 3) - (16px * 2 / 3)); width: calc((100% / 3) - (16px * 2 / 3));
min-width: 376px; min-width: 376px;
...@@ -188,9 +190,11 @@ export default { ...@@ -188,9 +190,11 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
span { span {
color: #eb4e4e;
margin: 0 6px; margin: 0 6px;
} }
span.up {
color: #eb4e4e;
}
span.dowm { span.dowm {
color: #43cf7c; color: #43cf7c;
} }
......
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header title="门店列表"> </d2-table-header> <d2-table-header title="门店列表"> </d2-table-header>
<d2-table <d2-table
ref="table" ref="storeTable"
:get-list-api="getListApi" :tableData="tableData"
:search-form="searchFormSearch" :search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" @refreshTable="refreshTable"
@pageChange="pageChange"
> >
</d2-table> </d2-table>
</div> </div>
...@@ -15,13 +16,10 @@ ...@@ -15,13 +16,10 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import { mapActions, mapState } from 'vuex'
import { refundApplyRecordPage } from "@api/refundExamine"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { import {
studyPage, findStoreInfoByMerchantNo
studyUpdate } from "@api/serviceCentre"
} from "@api/contentManager"
import noDataImg from "@/assets/empty.png" import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs" import dayjs from "dayjs"
export default { export default {
...@@ -31,186 +29,134 @@ export default { ...@@ -31,186 +29,134 @@ export default {
listOfPenaltiesShow: false, listOfPenaltiesShow: false,
noDataImg, noDataImg,
searchForm: { searchForm: {
bussinessScene: "", scene: "",
merchantId: "", merchantNos: []
scriptMatching: "", },
receptionist: "", tableData:[],
solutionBrowsing: "", baseData: {
// searchdate: [new Date(), new Date()] directOperateOpt: [
sendStartData: [], { confId: 0, confValue: "非直营" },
finishStartData: [] { confId: 1, confValue: "直营" }
]
}, },
searchFormSearch: {},
currentItem: {},
getListApi: studyPage,
// 表格参数 // 表格参数
tableParams: { tableParams: {
listName: "list", listName: "list",
tableOption: {
width: "100"
},
tableColumns: [ tableColumns: [
{ {
label: "门店名称", label: "门店名称",
prop: "title" prop: "storeName"
}, },
{ {
label: "商户号", label: "商户号",
prop: "staffName" prop: "merchantNo"
// minWidth: 144, // minWidth: 144,
}, },
{ {
label: "是否直营", label: "是否直营",
prop: "staffPhone" formatter: (cellValue) => {
return this.baseData.directOperateOpt.find(
(item) => item.confId === cellValue.isDirectOperated
)?.confValue
}
}, },
{ {
label: "展业时间", label: "展业时间",
prop: "createdDate", prop: "businessDevDate",
// minWidth: 140 formatter: (cellValue) => {
// formatter: (cellValue) => { return cellValue.businessDevDate
// return cellValue.sendStartTime ? Util.dateFormate(cellValue.businessDevDate, "YYYY-MM-DD")
// ? Util.dateFormate(cellValue.sendStartTime, "YYYY-MM-DD HH:mm:ss") : ""
// : "-" }
// }
}, },
{ {
label: "归属业务", label: "归属业务",
addHtml: 'taskStatus' formatter: () => {
return ["延保", "权益", "轻改"][this.queryData.scene - 1]
}
}, },
{ {
label: "主营品牌", label: "主营品牌",
prop: "finishDate", prop: "mainBrand"
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.finishEndTime
// ? Util.dateFormate(cellValue.finishEndTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
}, },
{ {
label: "区域运营经理", label: "区域运营经理",
prop: "finishDate", prop: "regionalManager",
}, },
{ {
label: "驻店人数", label: "驻店人数",
prop: "finishDate", prop: "staffCount",
}, },
{ {
label: "已配课程人数", label: "已配课程人数",
prop: "finishDate", prop: "courseConfiguredCount",
} }
] ]
}, }
detailInfo: {}
} }
}, },
computed: {
...mapState({ props: {
dowloadList: (state) => state.d2admin.user.dowloadList queryData: {
}) type: Object,
default: () => {}
}
},
watch: {
queryData: {
handler(val) {
setTimeout(() => {
this.findStoreInfoByMerchantNoData()
}, 0)
},
deep: true,
immediate: true
}
}, },
created() { },
mounted() { mounted() {
// this.getServiceStore() this.findStoreInfoByMerchantNoData()
// this.getStudyPage()
}, },
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']), methods: {
// 详情 findStoreInfoByMerchantNoData() {
handleDetail(row) { console.log(this.queryData, "queryData")
this.listOfPenaltiesShow = true this.searchForm = {
this.detailInfo = row ...this.$refs.storeTable.page
}, }
beforeSearchFn(type = 1) { this.searchForm.scene = this.queryData.scene
return new Promise((resolve, reject) => { this.searchForm.merchantNos = this.queryData.merchantNos
this.searchFormSearch = deepClone(this.searchForm) ? this.queryData.merchantNos
if (this.searchForm?.sendStartData?.length) { : []
let [searchStartDate, searchEndDate] = this.searchForm.sendStartData
this.searchFormSearch.sendStartTime = Util.dateFormate( findStoreInfoByMerchantNo(this.searchForm).then((res) => {
searchStartDate, this.tableData = res
"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()
}) })
}, },
handleSearch() { refreshTable() {
this.page = this.$options.data.call(this).page this.findStoreInfoByMerchantNoData()
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
}, },
handleReset() { pageChange(page) {
this.searchForm = this.$options.data.call(this).searchForm object.assign(this.searchForm, page)
this.handleSearch() this.refreshTable()
}, },
async exportTable() {
await this.beforeSearchFn()
// console.log(params) //获取门店下的员工
let params = this.searchFormSearch getStaffInfoData(merchantNos) {
params.method = 'dj.api.smartcarlife.study.punish.list.export' return new Promise((resolve, reject) => {
const list = [ findStaffByMerchantNo({
...this.dowloadList, merchantNos,
{ scene: this.queryData.scene
name: '处罚名单', }).then((res) => {
exportParam: JSON.stringify(params), console.log(res)
status: 'waiting', resolve(res)
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> </script>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
analysisActiveIndex == index ? 'active' : '' analysisActiveIndex == index ? 'active' : ''
]" ]"
v-for="(analyse, index) in analysisList" v-for="(analyse, index) in analysisList"
v-if="analyse.isshow"
:key="index" :key="index"
@click="handleAnalysisClick(index)" @click="handleAnalysisClick(index)"
> >
...@@ -102,11 +103,13 @@ export default { ...@@ -102,11 +103,13 @@ export default {
analysisList: [ analysisList: [
{ {
name: "上周数据", name: "上周数据",
value: "2025/6/30-2025/7/6" value: "2025/6/30-2025/7/6",
isshow: true
}, },
{ {
name: "当月数据", name: "当月数据",
value: "2025/7/1-2025/7/31" value: "2025/7/1-2025/7/31",
isshow: true
} }
] ]
} }
...@@ -201,6 +204,9 @@ export default { ...@@ -201,6 +204,9 @@ export default {
handleClick(index) { handleClick(index) {
this.activeIndex = index this.activeIndex = index
this.longForm.scene = this.conditionList[index].value this.longForm.scene = this.conditionList[index].value
this.analysisActiveIndex = 0
this.handleSetTime()
this.analysisList[1].isshow = index != 0 ? false : true
}, },
handleSetTime() { handleSetTime() {
let [start, end] = let [start, end] =
...@@ -281,7 +287,7 @@ export default { ...@@ -281,7 +287,7 @@ export default {
color: #111111; color: #111111;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
margin: 16px 0; margin-top: 16px;
.analysis-index-list { .analysis-index-list {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -250,9 +250,7 @@ export default { ...@@ -250,9 +250,7 @@ export default {
width: "150", width: "150",
formatter: (cellValue) => { formatter: (cellValue) => {
return ( return (
(cellValue.courseFinishCount (cellValue.courseCount ? cellValue.courseCount : "-") +
? cellValue.courseFinishCount
: "-") +
" | " + " | " +
(cellValue.courseDuration ? cellValue.courseDuration : "-") (cellValue.courseDuration ? cellValue.courseDuration : "-")
) )
......
...@@ -126,10 +126,12 @@ export default { ...@@ -126,10 +126,12 @@ export default {
const id = data.pageId ? data.pageId : `${data.metricName}_${data.itemBrand}` const id = data.pageId ? data.pageId : `${data.metricName}_${data.itemBrand}`
const windowList = [...this.tab, ...this.dropdownList] const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id) const windowItem = windowList.find((e) => e.id == id)
// windowItem.
let component = data.activeName, let component = data.activeName,
title = data.metricName+data.itemBrand || '-' title = data.metricName+data.itemBrand || '门店详情'
if (data.componentName) component = data.componentName if (data.componentName) component = data.componentName
if (windowItem) { if (windowItem) {
windowItem.data=data
this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data) this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data)
return this.windowId = id return this.windowId = id
} }
...@@ -145,6 +147,7 @@ export default { ...@@ -145,6 +147,7 @@ export default {
this.tab.push(item) this.tab.push(item)
this.checkEl() this.checkEl()
} }
this.windowId = id this.windowId = id
}, },
close (index) { close (index) {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<d2-table <d2-table
ref="recordTable" ref="recordTable"
:table-params="detail.tableParams" :table-params="detail.tableParams"
:tableData="shortInfo.tableData" :tableData="detailInfo.tableData"
:hasPage="false" :hasPage="false"
> >
</d2-table> </d2-table>
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
1: "redSpot", 1: "orgenSpot",
2: "greenSpot" 2: "greenSpot"
}[cellValue.status] }[cellValue.status]
} }
...@@ -165,13 +165,16 @@ export default { ...@@ -165,13 +165,16 @@ export default {
cellValue.finishTime, cellValue.finishTime,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
) )
: "" : "-"
} }
} }
] ]
} }
} }
] ],
detailInfo: {
tableData: []
}
} }
}, },
props: { props: {
...@@ -214,14 +217,13 @@ export default { ...@@ -214,14 +217,13 @@ export default {
}, },
methods: { methods: {
getSopDetailTagListData() { getSopDetailTagListData() {
console.log(this.shortInfo)
let { staffPhone, checkDate } = this.shortInfo let { staffPhone, checkDate } = this.shortInfo
getSopDetailTagList({ getSopDetailTagList({
checkDate, checkDate,
staffPhone staffPhone
}).then((res) => { }).then((res) => {
this.shortInfo.tableData = res this.detailInfo.tableData = res
console.log(res) console.log(res)
}) })
}, },
...@@ -232,7 +234,6 @@ export default { ...@@ -232,7 +234,6 @@ export default {
pageSize: 10 pageSize: 10
}).then((res) => { }).then((res) => {
Object.assign(this.shortInfo, res) Object.assign(this.shortInfo, res)
console.log(this.shortInfo, "this.shortInfo")
}) })
}, },
handleClose() { handleClose() {
......
...@@ -333,9 +333,11 @@ export default { ...@@ -333,9 +333,11 @@ export default {
prop: "punishType", prop: "punishType",
width: "100px", width: "100px",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.punishTypeOpt.find( return (
(item) => item.confId === cellValue.punishType this.baseData.punishTypeOpt.find(
)?.confValue (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!