Commit 54e48c7e by wangzhihui

长课程需求开发

1 parent 26d7ce90
......@@ -14,3 +14,83 @@ export function taskStaffStudyDetail(data) {
data.method = `${path}servicecenter.contentmanager.task.staff.study.detail`
return request(data, RequestMethods.POST)
}
// 长课程配置-查询员工已配置课程
export function staffCouse(data) {
data.method = `${path}servicecenter.contentmanager.staff.course`
return request(data, RequestMethods.POST)
}
// 长课程-自定义指标逻辑
export function customizeList(data) {
data.method = `${path}longcoursesceneconfig.customizeList`
return request(data, RequestMethods.POST)
}
// 查询所有配置
export function findAllConfig(data) {
data.method = `${path}longcoursesceneconfig.findAllConfig`
return request(data, RequestMethods.POST)
}
// 查询指标详情
export function findAllItem(data) {
data.method = `${path}longcoursesceneconfig.findAllItem`
return request(data, RequestMethods.POST)
}
// 查询指标满足条件的商户
export function findAllItemByConfigId(data) {
data.method = `${path}longcoursesceneconfig.findAllItemByConfigId`
return request(data, RequestMethods.POST)
}
// 按照门店号查询驻店员工集合
export function findStaffByMerchantNo(data) {
data.method = `${path}longcoursesceneconfig.findStaffByMerchantNo`
return request(data, RequestMethods.POST)
}
// 查询门店信息
export function findStoreInfoByMerchantNo(data) {
data.method = `${path}longcoursesceneconfig.findStoreInfoByMerchantNo`
return request(data, RequestMethods.POST)
}
// 员工手机号查询员工信息
export function findStoreEmployeePerformance(data) {
data.method = `${path}longcoursesceneconfig.findStoreEmployeePerformance`
return request(data, RequestMethods.POST)
}
// 短课程配置-查询配置
export function getSopConfig(data) {
data.method = `${path}servicecenter.sop.config.get`
return request(data, RequestMethods.POST)
}
// 短课程配置-更新配置
export function updateSopConfig(data) {
data.method = `${path}servicecenter.sop.config.update`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录详情-标签列表
export function getSopDetailTagList(data) {
data.method = `${path}servicecenter.sop.detail.tag.list`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录列表
export function getSopDetailPage(data) {
data.method = `${path}servicecenter.sop.detail.page`
return request(data, RequestMethods.POST)
}
// 短课程配置-学习记录编辑启用
export function updateSopDetail(data) {
data.method = `${path}servicecenter.sop.detail.update`
return request(data, RequestMethods.POST)
}
// 课程配置-指定手机号查询员工信息
export function getStaffInfo(data) {
data.method = `${path}servicecenter.staff.info`
return request(data, RequestMethods.POST)
}
......@@ -1356,3 +1356,16 @@ export const course_businessOpt = [
{ confId: "1", confValue: "权益" },
{ confId: "2", confValue: "延保" }
]
export const punishTypeOpt = [
{ confId: 0, confValue: "不处罚" },
{ confId: 1, confValue: "禁止录单" }
]
export const taskStatusOpt = [
{ confId: "1", confValue: "进行中" },
{ confId: "2", confValue: "已结束" }
]
export const effectiveTypeOpt = [
{ confId: 0, confValue: "立即生效" },
{ confId: 1, confValue: "隔日生效" }
]
......@@ -5,7 +5,7 @@
<d2-search
ref="showSearch"
class="show-search"
label-width="110px"
label-width="130px"
:search-form="searchForm"
:form-data="showFormData"
>
......@@ -30,6 +30,17 @@
:display-value="searchForm.AbnormalProportion"
></el-input-range>
</div>
<div slot="orderTransactionAmount">
<el-input
type="text"
v-model="searchForm.orderTransactionAmount"
@blur="
validateNumber(searchForm, 'orderTransactionAmount', 99999)
"
placeholder="请输入"
class="input-width"
></el-input>
</div>
</d2-search>
<div class="up-btns">
<el-button
......@@ -212,6 +223,7 @@ import {
exportReclistList,
receptionStaffStatic
} from "@api/resident"
import { getBrandList } from "@/api/scene.js"
import VoiceDialog from "./VoiceDialog"
import dayjs from "dayjs"
import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
......@@ -332,7 +344,59 @@ export default {
optionId: "id",
optionLabel: "name",
optionsName: "sceneTypeList"
},
{
label: "品牌",
name: "carBrandId",
type: "select",
multiple: true,
isClear: true,
collapseTags: true,
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "brandList"
},
{
label: "是否成交",
name: "orderTransactionFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "orderTransactionList"
},
{
label: "客户类型",
name: "enterpriseCustomerFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "enterpriseCustomerList"
},
{
label: "客户姓名",
name: "customerName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "是否成交(安心包)",
name: "orderAxbTransactionFlag",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "name",
optionsName: "orderAxTransactionList"
},
{
label: "成交金额大于",
name: "orderTransactionAmount",
addHtml: "orderTransactionAmount"
}
// {
// label: "当日到店量",
// name: "toStoreCount",
......@@ -352,7 +416,13 @@ export default {
phoneNumber: "",
// toStoreCount: [],
qualityTestScore: [],
AbnormalProportion: []
AbnormalProportion: [],
enterpriseCustomerFlag: "",
orderAxbTransactionFlag: "",
orderTransactionAmount: "",
orderTransactionFlag: "",
customerName: "",
carBrandIds: []
},
searchFormSearch: {},
tableList: [],
......@@ -646,7 +716,38 @@ export default {
id: 2,
name: "轻改"
}
]
],
enterpriseCustomerList: [
{
id: 1,
name: "企业客户"
},
{
id: 2,
name: "非企业客户"
}
],
orderAxTransactionList: [
{
id: 1,
name: "是"
},
{
id: 0,
name: "否"
}
],
orderTransactionList: [
{
id: 1,
name: "是"
},
{
id: 0,
name: "否"
}
],
brandList: []
},
staffStatic: {},
voiceVisible: false,
......@@ -682,11 +783,51 @@ export default {
},
mounted() {
this.getOptionsList()
this.getOptionsList(true, "orderAxTransactionList")
this.getOptionsList(true, "enterpriseCustomerList")
this.getOptionsList(true, "orderTransactionList")
this.getServiceStore()
this.getSaasList()
this.getBrandList()
this.receptionStaffStatic()
},
methods: {
// validateNumber(item, field, maxLimit) {
// let value = item[field]
// value = parseInt(value)
// if (isNaN(value)) value = ""
// if (parseInt(value) > maxLimit) {
// value = maxLimit
// }
// if (parseInt(value) < 0) {
// value = 0
// }
// console.log(value)
// console.log(item[value])
// this.$set(item, field, value)
// },
validateNumber(item, field, maxLimit = 99999) {
let value = item[field]
if (!/^(\d+)(\.\d+)?$/.test(value)) {
value = String(value).slice(0, -1) // 移除最后一个非法字符
}
// 转换为浮点数进行校验
const numValue = parseFloat(value)
if (isNaN(numValue)) {
value = ""
} else if (numValue < 0) {
value = "0"
} else if (numValue > maxLimit) {
value = maxLimit.toString()
} else {
value = numValue.toString()
}
this.$set(item, field, value)
},
getSaasList() {
getList({
pageSize: 10000,
......@@ -696,6 +837,22 @@ export default {
this.getOptionsList(true, "parkServiceList")
})
},
getBrandList() {
const brandList = []
getBrandList({ containsChildren: true }).then((res) => {
res.map((e) => {
if (e && e.children && e.children.length) {
e.children.map((i) => {
i.brandId = e.id
brandList.push(i)
})
}
})
this.baseData.brandList = brandList
this.getOptionsList(false, "brandList")
})
},
getServiceStore(merchantId) {
listShop4sByRef({
yqMerchantId: merchantId
......
<template>
<div>
<d2-container>
<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" />
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="reportTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams">
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { loginRecordPage } from "@api/resident"
export default {
components: {},
data() {
return {
searchForm: {},
labelWidth: '100px',
showFormData: [
{
label: '日报模板',
name: 'templateName',
type: 'select',
optionList: [
{
label: '模板1',
value: 1
},
{
label: '模板2',
value: 2
}
]
},
{
label: '日报日期',
name: 'time',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
},
{
label: '督导',
name: 'dudao',
type: 'select',
}
],
searchFormSearch: {
businessScene: ["1"]
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOptions: false,
tableColumns: [
{
label: '督导',
prop: 'positionName'
},
{
label: '管理门店数',
prop: 'positionValue'
},
{
label: '门店平均渗透率(权益升级)',
prop: 'positionValue',
// sortable: "custom"
}
],
getListApi: loginRecordPage
}
}
},
created() {//默认当前日期
this.searchForm.time = [new Date(), new Date()]
},
methods: {
handleReset() {
this.searchForm = {
time: '',
merchantName: '',
}
this.$refs.reportTable.refreshTable(false, true)
},
handleSearch() {
this.$refs.reportTable.refreshTable(false, true)
},
beforeSearchFn() {
}
}
}
</script><!-- 登录日志 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData" />
<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"
/>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<!-- </d2-container>
......@@ -142,11 +24,13 @@ export default {
<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"
>
</d2-table>
</div>
</d2-container>
......@@ -154,64 +38,70 @@ export default {
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { Util, deepClone } from "@/common/util"
import { loginRecordPage } from "@api/resident"
export default {
name: 'TransferAccountsList',
components: {
},
name: "TransferAccountsList",
components: {},
data() {
return {
labelWidth: '100px',
labelWidth: "100px",
searchForm: {
time: '',
merchantName: '',
time: "",
merchantName: ""
},
searchFormSearch: {},
showFormData: [{
label: '日期',
name: 'time',
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '登录商户',
name: 'merchantName',
type: 'input',
maxlength: '20',
isClear: true
}],
showFormData: [
{
label: "日期",
name: "time",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "登录商户",
name: "merchantName",
type: "input",
maxlength: "20",
isClear: true
}
],
getListApi: loginRecordPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
listName: "list",
tableOption: false,
tableColumns: [{
label: '商户名称',
prop: 'merchantName'
}, {
label: '商户号',
prop: 'merchantId'
}, {
label: '员工姓名',
prop: 'staffName',
sortable: "custom"
}, {
label: '员工手机号',
prop: 'staffPhone',
width: '120px'
}, {
label: '登录次数',
prop: 'loginTimes'
}
tableColumns: [
{
label: "商户名称",
prop: "merchantName"
},
{
label: "商户号",
prop: "merchantId"
},
{
label: "员工姓名",
prop: "staffName",
sortable: "custom"
},
{
label: "员工手机号",
prop: "staffPhone",
width: "120px"
},
{
label: "登录次数",
prop: "loginTimes"
}
]
},
baseData: {
},
baseData: {}
}
},
created() {//默认当前日期
created() {
//默认当前日期
this.searchForm.time = [new Date(), new Date()]
},
mounted() {
......@@ -224,11 +114,17 @@ export default {
},
beforeSearchFn() {
return new Promise(resolve => {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.time) {
this.searchFormSearch.beginDate = Util.dateFormate(this.searchFormSearch.time[0], 'YYYY-MM-DD')
this.searchFormSearch.endDate = Util.dateFormate(this.searchFormSearch.time[1], 'YYYY-MM-DD')
this.searchFormSearch.beginDate = Util.dateFormate(
this.searchFormSearch.time[0],
"YYYY-MM-DD"
)
this.searchFormSearch.endDate = Util.dateFormate(
this.searchFormSearch.time[1],
"YYYY-MM-DD"
)
delete this.searchFormSearch.time
}
resolve()
......@@ -237,14 +133,23 @@ export default {
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] !== '全部') {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
......@@ -254,8 +159,8 @@ export default {
},
handleReset() {
this.searchForm = {
time: '',
merchantName: '',
time: "",
merchantName: ""
}
this.$refs.recordTable.refreshTable(false, true)
},
......@@ -264,25 +169,28 @@ export default {
var params = this.searchFormSearch
// 去除为null的值
for (const key in params) {
if (params[key] === null || params[key] === '' || params[key].length == 0) {
if (
params[key] === null ||
params[key] === "" ||
params[key].length == 0
) {
delete params[key]
}
}
params.method = 'dj.api.smartcarlife.staff.login.record.export'
params.method = "dj.api.smartcarlife.staff.login.record.export"
const list = [
...this.dowloadList,
{
name: '登录日志',
name: "登录日志",
exportParam: JSON.stringify(params),
status: 'waiting',
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
this.actionSetDownloadList({ list, type: "dowloadList" })
}
}
}
</script>
<style scoped>
.count-txt {
......
......@@ -56,9 +56,7 @@ export default {
getListApi: receptionTagPage,
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableOption: false,
tableColumns: [
{
label: "驻店名称",
......@@ -79,11 +77,7 @@ export default {
},
{
label: "质检日期",
formatter: (cellValue) => {
return cellValue.checkDate
? Util.dateFormate(cellValue.checkDate, "YYYY-MM-DD")
: "-"
}
prop: "checkDate"
},
{
label: "客户车型",
......@@ -149,7 +143,7 @@ export default {
},
searchFormSearch: {},
searchForm: {
orderFinishFlag: true,
orderFinishFlag: "",
staffName: "",
merchantId: "",
checkType: "",
......@@ -203,7 +197,7 @@ export default {
},
{
label: "app接待结果",
name: "receptionStatus",
name: "orderFinishFlag",
type: "select",
isClear: true,
optionList: [],
......@@ -233,6 +227,9 @@ export default {
this.initSelect()
},
methods: {
play(url) {
window.open(url)
},
handleDetail(data) {
console.log("row", data)
this.$router.push({
......@@ -362,4 +359,14 @@ export default {
}
</script>
<style></style>
<style scoped>
.audio {
width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #2a58ad;
font-size: 14px;
cursor: pointer;
}
</style>
......@@ -5,59 +5,71 @@
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
:config="config"
@handleClick="handleConfirm"
@closeDialog="handleClose"
>
<div class="dialog-content">
<el-form :model="form" :rules="rules" ref="formRef">
<el-form :model="configData" :rules="rules" ref="formRef">
<el-form-item label="开启课程:" label-width="100px">
<el-switch v-model="form.isOpen"></el-switch>
<el-switch
v-model="configData.openFlag"
active-value="Y"
inactive-value="N"
active-text="关闭"
></el-switch>
</el-form-item>
<h4 class="group-title">学习条件</h4>
<div class="rule-item">
<el-form-item label="本周门店渗透率 <">
<el-form-item
label="本周门店渗透率 <"
prop="storePenetrationWeekly"
>
<el-input
v-model="form.performanceSalarDeductionRatio"
v-model="configData.storePenetrationWeekly"
placeholder="请输入"
style="width: 80px"
style="width: 120px"
@blur="validateNumber('storePenetrationWeekly', 30, 90)"
>
<template slot="append">%</template>
</el-input>
</el-form-item>
<el-form-item label=",且驻店人员上月渗透率 ≤">
<el-form-item
label=",且驻店人员上月渗透率 ≤"
prop="storePenetrationMonthly"
>
<el-input
v-model="form.performanceSalarDeductionRatio"
v-model="configData.storePenetrationMonthly"
placeholder="请输入"
style="width: 80px"
style="width: 120px"
@blur="validateNumber('storePenetrationMonthly', 30, 90)"
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</div>
<div class="rule-item">
<el-form-item label="本周驻店接待记录为战败,且质检分低于">
<el-input
v-model="form.minAssessmentValue"
placeholder="请输入"
style="width: 80px"
></el-input>
</el-form-item>
<el-form-item label="分时,开展为期">
<el-form-item
label="本周驻店接待记录为战败,且质检分低于"
prop="inspectionScore"
>
<el-input
v-model="form.maxAssessmentValue"
v-model="configData.inspectionScore"
placeholder="请输入"
style="width: 80px"
@blur="validateNumber('inspectionScore', 30, 100)"
></el-input>
<span class="unit-text">天短课程学习</span>
<span class="unit-text">分时,开展为期7天短课程学习</span>
</el-form-item>
</div>
<h4 class="group-title">学习要求</h4>
<div class="rule-item">
<el-form-item label="短课程学习需要在课程发布后">
<el-form-item label="短课程学习需要在课程发布后" prop="finishTime">
<el-input
v-model="form.performanceSalarDeductionRatio"
v-model="configData.finishTime"
placeholder="请输入"
style="width: 80px"
@blur="validateNumber('finishTime', 24, 168)"
>
</el-input>
<span class="unit-text">小时内完成</span>
......@@ -65,26 +77,28 @@
</div>
<div class="rule-item">
<el-form-item label="如果在限时内未完成则">
<el-select v-model="form.value" placeholder="请选择">
<el-select v-model="configData.punishType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in punishTypeOpt"
:key="item.confId"
:label="item.confValue"
:value="item.confId"
>
</el-option>
</el-select>
</el-form-item>
</div>
<h4 class="生效时间">学习要求</h4>
<div class="rule-item">
<el-form-item label="生效时间为">
<el-select v-model="form.value" placeholder="请选择">
<el-select
v-model="configData.effectiveType"
placeholder="请选择"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in effectiveTypeOpt"
:key="item.confId"
:label="item.confValue"
:value="item.confId"
>
</el-option>
</el-select>
......@@ -96,6 +110,9 @@
</div>
</template>
<script>
import { getSopConfig, updateSopConfig } from "@api/serviceCentre"
import { punishTypeOpt, effectiveTypeOpt } from "@/common/constants.js"
import { filterSpecsStr } from "../../../goods/filterOption"
export default {
data() {
return {
......@@ -103,39 +120,97 @@ export default {
title: "短课程配课",
width: "720px"
},
form: {
isOpen: true
config: {
showClose: true,
appendToBody: false, // 是否将自身插入至 body 元素,有嵌套的弹窗时一定要设置
isShowFooter: true,
cancel_name: "取 消",
confirm_name: "提 交"
},
options: [
{
value: "选项1",
label: "黄金糕"
},
{
value: "选项2",
label: "双皮奶"
},
{
value: "选项3",
label: "蚵仔煎"
},
{
value: "选项4",
label: "龙须面"
},
{
value: "选项5",
label: "北京烤鸭"
}
],
rules: {}
punishTypeOpt: punishTypeOpt,
effectiveTypeOpt: effectiveTypeOpt,
rules: {
storePenetrationWeekly: [
{ required: true, message: "请输入本周门店渗透率", trigger: "blur" }
],
storePenetrationMonthly: [
{ required: true, message: "请输入上月渗透率", trigger: "blur" }
],
inspectionScore: [
{ required: true, message: "请输入质检分", trigger: "blur" }
],
finishTime: [
{ required: true, message: "请输入短课程学习时间", trigger: "blur" }
]
},
configData: {
effectiveType: "",
storePenetrationMonthly: "",
storePenetrationWeekly: "",
punishType: "",
effectiveType: "",
inspectionScore: "",
finishTime: "",
openFlag: ""
}
}
},
created() {
this.getSopConfigData()
},
methods: {
handleClose() {
this.visible = false
validateNumber(field, min, max) {
let value = this.configData[field]
value = parseInt(value)
if (isNaN(value)) value = ""
// 限制最大值
if (parseInt(value) > max) {
value = ""
this.$message.warning(`输入值不能超过 ${max}`)
}
if (parseInt(value) < min) {
value = ""
this.$message.warning(`输入值不能小于${min}`)
}
this.$set(this.configData, field, value)
},
getSopConfigData() {
getSopConfig({})
.then((res) => {
console.log(res, "getSopConfig")
this.configData = res
this.configData.openFlag == 1 ? "Y" : "N"
})
.catch((err) => {
new Error(err)
})
},
//提交
handleConfirm() {
this.$refs.formRef.validate((valid, invalidFields) => {
if (valid) {
let params = {
storePenetrationWeekly: this.configData.storePenetrationWeekly,
storePenetrationMonthly: this.configData.storePenetrationMonthly,
inspectionScore: this.configData.inspectionScore,
studyDay: this.configData.studyDay,
punishType: this.configData.punishType,
effectiveType: this.configData.effectiveType,
openFlag: this.configData.openFlag == "Y" ? 1 : 0
}
updateSopConfig(params)
.then((res) => {
console.log(res, "updateSopConfig")
this.$message.success("修改成功")
this.handleClose()
})
.catch((err) => {
new Error(err)
})
}
})
},
handleClose() {
this.visible = false
}
},
......@@ -193,5 +268,14 @@ export default {
.unit-text {
margin-left: 4px;
}
::v-deep
.el-form-item.is-required:not(.is-no-asterisk)
> .el-form-item__label:before {
color: #f5f7fa;
}
::v-deep .el-switch__label,
.el-switch__label.is-active {
color: #333;
}
}
</style>
......@@ -21,13 +21,13 @@
<el-form-item :label="item.title">
<div
v-if="item.className"
:class="[item.className(detailInfo)]"
:class="[item.className(shortInfo)]"
></div>
{{
item.formatter
? item.formatter(detailInfo)
: detailInfo[item.key]
? detailInfo[item.key]
? item.formatter(shortInfo)
: shortInfo[item.key]
? shortInfo[item.key]
: "-"
}}
</el-form-item></el-col
......@@ -40,7 +40,7 @@
<d2-table
ref="recordTable"
:table-params="detail.tableParams"
:tableData="detail.tableData"
:tableData="shortInfo.tableData"
:hasPage="false"
>
</d2-table>
......@@ -52,6 +52,7 @@
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { getSopDetailTagList, getStaffInfo } from "@api/serviceCentre"
export default {
data() {
return {
......@@ -59,18 +60,15 @@ export default {
title: "任务详情",
width: "720px"
},
detailInfo: {
tableData: []
},
configData: [
{
title: "个人信息",
infoData: [
{
title: "姓名:",
key: "employeeName",
key: "staffName",
formatter(cellValue) {
return cellValue.employeeName
return cellValue.staffName
}
},
{
......@@ -79,11 +77,11 @@ export default {
},
{
title: "上级:",
key: "fileUrl"
key: "superiors"
},
{
title: "导师:",
key: "carModel"
key: "mentors"
}
]
},
......@@ -92,36 +90,40 @@ export default {
infoData: [
{
title: "复盘日期:",
formatter: (cellValue) => {
return cellValue.startTime
? Util.dateFormate(cellValue.startTime, "YYYY-MM-DD HH:mm:ss")
: "-"
}
key: "checkDate"
},
{
title: "任务状态:",
key: "violationStatus",
key: "taskStatus",
formatter: (cellValue) => {
return {
1: "疑似违规",
2: "已违规",
0: "未违规"
}[cellValue.violationStatus]
1: "进行中",
2: "已结束"
}[cellValue.taskStatus]
},
className: (cellValue) => {
return {
1: "orgenSpot",
2: "ashSpot"
}[cellValue.taskStatus]
}
},
{
title: "课程完成时间:",
formatter: (cellValue) => {
return cellValue.endTime
? Util.dateFormate(cellValue.endTime, "YYYY-MM-DD HH:mm:ss")
return cellValue.completeTime
? Util.dateFormate(
cellValue.completeTime,
"YYYY-MM-DD HH:mm:ss"
)
: "-"
}
},
{
title: "课程结束时间:",
formatter: (cellValue) => {
return cellValue.endTime
? Util.dateFormate(cellValue.endTime, "YYYY-MM-DD HH:mm:ss")
return cellValue.deadline
? Util.dateFormate(cellValue.deadline, "YYYY-MM-DD HH:mm:ss")
: "-"
}
}
......@@ -133,41 +135,34 @@ export default {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: "课程名称",
prop: "invoiceAmount"
},
{
label: "学习时长",
prop: "invoiceAmount"
label: "学习标签",
prop: "tagName"
},
{
label: "学习进度",
prop: "useStatus",
label: "考核结果",
prop: "status",
formatter: (cellValue) => {
return this.baseData.useStatusOpt.find(
(item) => item.confId === cellValue.useStatus
)?.confValue
return {
1: "进行中",
2: "通过"
}[cellValue.status]
},
className: (cellValue) => {
return {
N: "redSpot",
Y: "greenSpot"
}[cellValue.useStatus]
1: "redSpot",
2: "greenSpot"
}[cellValue.status]
}
},
{
label: "成绩",
prop: "penalty "
},
{
label: "完成时间",
prop: "tradeNo",
width: "200",
formatter: (cellValue) => {
return cellValue.createdDate
return cellValue.finishTime
? Util.dateFormate(
cellValue.createdDate,
cellValue.finishTime,
"YYYY-MM-DD HH:mm:ss"
)
: ""
......@@ -183,6 +178,20 @@ export default {
shortVisible: {
type: Boolean,
default: false
},
shortInfo: {
type: Object,
default: () => {}
}
},
watch: {
shortInfo: {
handler(newVal) {
if (newVal) {
this.getSopDetailTagListData(newVal)
}
},
deep: true
}
},
computed: {
......@@ -198,7 +207,34 @@ export default {
}
}
},
created() {},
mounted() {
this.getSopDetailTagListData()
this.getStaffInfoData()
},
methods: {
getSopDetailTagListData() {
console.log(this.shortInfo)
let { staffPhone, checkDate } = this.shortInfo
getSopDetailTagList({
checkDate,
staffPhone
}).then((res) => {
this.shortInfo.tableData = res
console.log(res)
})
},
getStaffInfoData() {
getStaffInfo({
staffPhone: this.shortInfo.staffPhone,
currentPage: 1,
pageSize: 10
}).then((res) => {
Object.assign(this.shortInfo, res)
console.log(this.shortInfo, "this.shortInfo")
})
},
handleClose() {
this.visible = false
},
......
......@@ -166,7 +166,7 @@
></el-switch>
2.1日报
<el-switch
:value="scope.scope.boutiqueDailyReportFillFlag"
:value="scope.scope.quotationDailyReportFillFlag"
active-value="Y"
inactive-value="N"
@change="handleDailyReport(scope.scope, 0)"
......@@ -1047,7 +1047,9 @@ export default {
sceneType == 1
? "boutiqueDailyReportFillFlag"
: "quotationDailyReportFillFlag"
]
] == "Y"
? "N"
: "Y"
this.$confirm(
"切换日报填写开关会影响驻店是否需要填日报才能提单!",
"提示",
......@@ -1060,18 +1062,8 @@ export default {
updateDailyReportFlag({
merchantId: row.merchantId,
sceneType,
dailyReportFillFlag: !dailyReportFillFlag
dailyReportFillFlag: dailyReportFillFlag
}).then((res) => {
row[
sceneType == 1
? "boutiqueDailyReportFillFlag"
: "quotationDailyReportFillFlag"
] =
!row[
sceneType == 1
? "boutiqueDailyReportFillFlag"
: "quotationDailyReportFillFlag"
]
this.notice.okTips()
this.handleSearch()
})
......
......@@ -112,6 +112,11 @@ export default {
width: "75"
},
{
label: "品牌",
prop: "sonBrand",
width: "80"
},
{
label: "业务场景",
prop: "scene",
formatter: (cellValue) => {
......@@ -128,11 +133,7 @@ export default {
prop: "sceneLabelName",
width: "80"
},
{
label: "品牌",
prop: "sonBrand",
width: "80"
},
{
label: "优秀标签",
prop: "labelName",
......
......@@ -110,15 +110,16 @@ export default {
prop: "className"
},
{
label: "场景标签",
prop: "sceneLabelName"
},
{
label: "品牌",
prop: "sonBrand",
width: "80"
},
{
label: "场景标签",
prop: "sceneLabelName"
},
{
label: "优秀标签",
prop: "labelName"
},
......
......@@ -120,15 +120,16 @@ export default {
prop: "className"
},
{
label: "场景标签",
prop: "sceneLabelName"
},
{
label: "品牌",
prop: "sonBrand",
width: "80"
},
{
label: "场景标签",
prop: "sceneLabelName"
},
{
label: "优秀标签",
prop: "labelName"
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!