Commit 26d7ce90 by wangzhihui

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 a412882c 45e09a85
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 长课程配置-已配置课程列表(上周复盘列表)
export function taskStaffStudyPage(data) {
data.method = `${path}servicecenter.contentmanager.task.staff.study.page`
return request(data, RequestMethods.POST)
}
// 长课程配置-已配置课程详情(上周复盘查看课程)
export function taskStaffStudyDetail(data) {
data.method = `${path}servicecenter.contentmanager.task.staff.study.detail`
return request(data, RequestMethods.POST)
}
...@@ -1339,3 +1339,20 @@ export const label_businessOpt = [ ...@@ -1339,3 +1339,20 @@ export const label_businessOpt = [
{ confId: 3, confValue: "权益" }, { confId: 3, confValue: "权益" },
{ confId: 1, confValue: "延保" } { confId: 1, confValue: "延保" }
] ]
// 服务中心-长课程配置 是否启用处罚
export const punishFlagOpt = [
{ confId: "0", confValue: "否" },
{ confId: "1", confValue: "是" }
]
// 服务中心-长课程配置 处罚状态
export const punishStatusOpt = [
{ confId: "1", confValue: "未触发" },
{ confId: "2", confValue: "处罚中" },
{ confId: "3", confValue: "已结束" }
]
// 服务中心-长课程配置 归属业务
export const course_businessOpt = [
{ confId: "0", confValue: "轻改" },
{ confId: "1", confValue: "权益" },
{ confId: "2", confValue: "延保" }
]
<!-- 表格+分页 --> <!-- 表格+分页 -->
<template> <template>
<div class="d2-table"> <div class="d2-table">
<el-table <el-table :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData" :data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''" :row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading" v-loading="loading"
...@@ -13,26 +12,21 @@ ...@@ -13,26 +12,21 @@
:tree-props="{ children: 'upgradeGoodsList' }" :tree-props="{ children: 'upgradeGoodsList' }"
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
v-bind="$attrs" v-bind="$attrs"
v-scroll="scroll" v-scroll="scroll">
> <el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection" type="selection"
align="center" align="center"
:selectable="selectableFn" :selectable="selectableFn"
width="55" width="55" />
/> <el-table-column v-if="tableParams.singleSelectUniqueKey"
<el-table-column
v-if="tableParams.singleSelectUniqueKey"
align="center" align="center"
width="55" width="55">
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="single-button" :scope="scope.row" /> <slot name="single-button"
:scope="scope.row" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="hasNum"
v-if="hasNum"
align="center" align="center"
width="60px" width="60px"
label="序号" label="序号"
...@@ -46,10 +40,8 @@ ...@@ -46,10 +40,8 @@
1) * 1) *
(pagination.pageSize ? pagination.pageSize : page.pageSize) + (pagination.pageSize ? pagination.pageSize : page.pageSize) +
1 1
" " />
/> <el-table-column v-for="(item, index) in tableParams.tableColumns"
<el-table-column
v-for="(item, index) in tableParams.tableColumns"
:key="index" :key="index"
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
...@@ -58,28 +50,23 @@ ...@@ -58,28 +50,23 @@
:align="item.align || 'center'" :align="item.align || 'center'"
:sortable="item.sortable" :sortable="item.sortable"
:render-header="item.renderHeader" :render-header="item.renderHeader"
:show-overflow-tooltip="item.showOverFlow" :show-overflow-tooltip="item.showOverFlow">
>
<template slot="header"> <template slot="header">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<table-head-search <table-head-search v-if="item.optionConfig"
v-if="item.optionConfig"
:search-form="headSearchForm" :search-form="headSearchForm"
:option-config="item.optionConfig" :option-config="item.optionConfig"
:base-data="baseData" :base-data="baseData"
@handleTableHeadChange="handleTableHeadChange" @handleTableHeadChange="handleTableHeadChange" />
/>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot v-if="item.addHtml"
v-if="item.addHtml"
:name="item.addHtml" :name="item.addHtml"
:scope="scope.row" :scope="scope.row"
:index="scope.$index" :index="scope.$index"
:prop="item.prop" :prop="item.prop"
:width="item.width" :width="item.width"
:columnsObj="item" :columnsObj="item" />
/>
<template v-else-if="item.type == 'ownSerialNum'"> <template v-else-if="item.type == 'ownSerialNum'">
<span>{{ <span>{{
scope.row[item.prop] >= 0 scope.row[item.prop] >= 0
...@@ -96,19 +83,16 @@ ...@@ -96,19 +83,16 @@
}}</span> }}</span>
</template> </template>
<template v-else-if="item.tagLabel"> <template v-else-if="item.tagLabel">
<el-tag <el-tag v-if="!item.tagName"
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]" :type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]" v-text="tableParams.tag.label[scope.row[item.prop]]" />
/> <el-tag v-else
<el-tag
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]" :type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]" v-text="tableParams[item.tagName].label[scope.row[item.prop]]" />
/>
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span v-if="item.html" v-html="item.formatter(scope.row)" /> <span v-if="item.html"
v-html="item.formatter(scope.row)" />
<template v-if="!item.html"> <template v-if="!item.html">
<span :class="item.className ? item.className(scope.row) : ''" /> <span :class="item.className ? item.className(scope.row) : ''" />
<span v-text="item.formatter(scope.row)" /> <span v-text="item.formatter(scope.row)" />
...@@ -129,43 +113,41 @@ ...@@ -129,43 +113,41 @@
<span v-else>{{ scope.row[item.prop] || "-" }}</span> <span v-else>{{ scope.row[item.prop] || "-" }}</span>
</template> </template>
<template v-else> <template v-else>
<span <span v-text="
v-text="
tableData[scope.$index][item.prop] != null tableData[scope.$index][item.prop] != null
? tableData[scope.$index][item.prop] ? tableData[scope.$index][item.prop]
: '-' : '-'
" " />
/>
</template> </template>
<template v-if="item.addSymbol"> <template v-if="item.addSymbol">
<span v-text="item.addSymbol" /> <span v-text="item.addSymbol" />
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column v-if="tableParams.tableOption"
v-if="tableParams.tableOption"
label="操作" label="操作"
fixed="right" fixed="right"
:align="tableParams.tableOption.align || 'center'" :align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || 'auto'" :width="tableParams.tableOption.width || 'auto'">
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="auth-button" :scope="scope.row" :index="scope.$index" /> <slot name="auth-button"
<slot
name="auth-button-other"
:scope="scope.row" :scope="scope.row"
:index="scope.$index" :index="scope.$index" />
/> <slot name="auth-button-other"
:scope="scope.row"
:index="scope.$index" />
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty" class="emptyBg"> <div slot="empty"
<img class="noDataImg" :src="noDataImg" v-if="noDataImg" /> class="emptyBg">
<img class="noDataImg"
:src="noDataImg"
v-if="noDataImg" />
{{ noDataText }} {{ noDataText }}
</div> </div>
</el-table> </el-table>
<el-pagination <el-pagination v-if="hasPage"
v-if="hasPage"
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -173,8 +155,7 @@ ...@@ -173,8 +155,7 @@
:page-sizes="[5, 10, 20, 30, 40]" :page-sizes="[5, 10, 20, 30, 40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" :layout="layout" />
/>
</div> </div>
</template> </template>
...@@ -219,17 +200,17 @@ export default { ...@@ -219,17 +200,17 @@ export default {
// 搜索条件 // 搜索条件
searchForm: { searchForm: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
// 表格头部搜索条件 - start // 表格头部搜索条件 - start
headSearchForm: { headSearchForm: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
// 选项列表Obj // 选项列表Obj
baseData: { baseData: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
// 表格头部搜索条件 - end // 表格头部搜索条件 - end
// 表格数据-外部传入 // 表格数据-外部传入
...@@ -278,7 +259,7 @@ export default { ...@@ -278,7 +259,7 @@ export default {
// 排序列表对象 // 排序列表对象
sortObj: { sortObj: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
tableParams: { tableParams: {
type: Object, type: Object,
...@@ -336,7 +317,7 @@ export default { ...@@ -336,7 +317,7 @@ export default {
// 合并单元格方法 // 合并单元格方法
arraySpanMethod: { arraySpanMethod: {
type: Function, type: Function,
default: () => {} default: () => { }
}, },
// 边框 // 边框
border: { border: {
...@@ -441,9 +422,9 @@ export default { ...@@ -441,9 +422,9 @@ export default {
v.goodsInfo = {} v.goodsInfo = {}
shopPriceArr.push(v.upgradePrice) shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice v.listShowShopPrice = v.upgradePrice
let specificationTypeSequenceArr = const specificationTypeSequenceArr =
v.specificationTypeSequence?.split(";~;") v.specificationTypeSequence?.split(";~;")
let specificationValueSequenceArr = const specificationValueSequenceArr =
v?.specificationData?.split(";~;") v?.specificationData?.split(";~;")
const suffixMapping = { const suffixMapping = {
1: "年", 1: "年",
...@@ -616,7 +597,7 @@ export default { ...@@ -616,7 +597,7 @@ export default {
.orgenSpot { .orgenSpot {
@include spotBase(); @include spotBase();
background: #eb4e4e; background: #f59619;
} }
.blueSpot { .blueSpot {
......
...@@ -167,9 +167,9 @@ export default { ...@@ -167,9 +167,9 @@ export default {
nbTransferStatusOpt: [], nbTransferStatusOpt: [],
refreshFlag: false, refreshFlag: false,
colorClass: { colorClass: {
0: 'ashSpot', 1: 'ashSpot',
1: 'greenSpot', 2: 'orgenSpot',
2: 'redSpot' 3: 'greenSpot'
} }
} }
}, },
......
...@@ -35,13 +35,14 @@ ...@@ -35,13 +35,14 @@
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="performanceFlag" <div slot="punishFlagHtml"
slot-scope="scope"> slot-scope="scope">
<el-switch v-model="scope.scope.cancelStatus" <el-switch v-model="scope.scope.punishFlag"
class="switchStyle"
active-color="#2a58ad"
active-text="启用" active-text="启用"
inactive-text="停用"></el-switch> inactive-text="停用"
active-value="1"
inactive-value="0"></el-switch>
<!-- <span>{{ scope.scope.cancelStatus ? "启用" : "停用" }}</span> -->
</div> </div>
<div slot="auth-button" <div slot="auth-button"
slot-scope="scope"> slot-scope="scope">
...@@ -74,34 +75,33 @@ import courseDetailDialog from "./components/courseDetailDialog" ...@@ -74,34 +75,33 @@ import courseDetailDialog from "./components/courseDetailDialog"
// import QRCodeDetailDialog from "../../components/QRCodeDetailDialog" // import QRCodeDetailDialog from "../../components/QRCodeDetailDialog"
import { invoicePage, batchCancelInvoiceQrcode } from "@api/invoiceManage" import { invoicePage, batchCancelInvoiceQrcode } from "@api/invoiceManage"
import { import {
useStatusOpt, punishFlagOpt,
expireStatusOpt, punishStatusOpt,
createdSourceOpt, course_businessOpt
cancelStatusOpt,
invoiceTypeOpt
} from "@/common/constants.js" } from "@/common/constants.js"
export default { export default {
name: "CourseList", name: "CourseList",
data() { data() {
return { return {
searchForm: { searchForm: {
createTime: "", staffName: "",
staffPhone: "",
title: "",
mainBrand: "",
merchantName: "",
businessSceneTypeName: "",
sendTime: "",
finishTime: "",
passedTime: "",
useStatus: "", useStatus: "",
expireStatus: "", punishStatus: "",
itemNames: "", punishFlag: ""
createdSource: "",
cancelStatus: "",
bizOrderCode: "",
bizTradeNo: "",
tradeNo: "",
invoiceType: "",
invoiceAmount: []
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [ showFormData: [
{ {
label: "员工姓名", label: "员工姓名",
name: "itemNames", name: "staffName",
type: "input", type: "input",
maxlength: "50", maxlength: "50",
isClear: true isClear: true
...@@ -116,88 +116,85 @@ export default { ...@@ -116,88 +116,85 @@ export default {
}, },
{ {
label: "任务名称", label: "任务名称",
name: "itemNames", name: "title",
type: "input", type: "input",
maxlength: "50", maxlength: "50",
isClear: true isClear: true
}, },
{ {
label: "主营品牌", label: "主营品牌",
name: "useStatus", name: "mainBrand",
type: "select", type: "input",
isClear: true, maxlength: "50",
optionList: [], isClear: true
optionId: "confId",
optionLabel: "confValue",
optionsName: "useStatusOpt"
}, },
{ {
label: "门店名称", label: "门店名称",
name: "itemNames", name: "merchantName",
type: "input", type: "input",
maxlength: "50", maxlength: "50",
isClear: true isClear: true
}, },
{ {
label: "归属业务", label: "归属业务",
name: "useStatus", name: "businessSceneTypeName",
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "useStatusOpt" optionsName: "businessOpt"
}, },
{ {
label: "课程配置时间", label: "课程配置时间",
name: "createTime", name: "sendTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
}, },
{ {
label: "课程结束时间", label: "课程结束时间",
name: "createTime", name: "finishTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
}, },
{ {
label: "课程完成时间", label: "课程完成时间",
name: "createTime", name: "passedTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
}, },
{ {
label: "任务状态", label: "任务状态",
name: "useStatus", name: "taskStatus",
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "useStatusOpt" optionsName: "taskStatusOpt"
}, },
{ {
label: "处罚状态", label: "处罚状态",
name: "useStatus", name: "punishStatus",
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "useStatusOpt" optionsName: "punishStatusOpt"
}, },
{ {
label: "处罚启停", label: "处罚启停",
name: "useStatus", name: "punishFlag",
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "useStatusOpt" optionsName: "punishFlagOpt"
} }
], ],
getListApi: invoicePage, getListApi: invoicePage,
...@@ -211,66 +208,61 @@ export default { ...@@ -211,66 +208,61 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "员工姓名", label: "员工姓名",
prop: "invoiceAmount", prop: "staffName",
width: "150" width: "150"
}, },
{ {
label: "手机号码", label: "手机号码",
prop: "invoiceAmount", prop: "staffPhone",
width: "150" width: "150"
}, },
{ {
label: "门店名称", label: "门店名称",
prop: "itemNames", prop: "merchantName",
width: "300" width: "300"
}, },
{ {
label: "归属业务", label: "归属业务",
prop: "expireStatus", prop: "businessSceneTypeName",
width: "120px", width: "120px",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.expireStatusOpt.find( return this.baseData.businessOpt.find(
(item) => item.confId === cellValue.expireStatus (item) => item.confId === cellValue.businessSceneTypeName
)?.confValue )?.confValue
} }
}, },
{ {
label: "主营品牌", label: "主营品牌",
prop: "expireStatus", prop: "mainBrand",
width: "120px", width: "120px"
formatter: (cellValue) => {
return this.baseData.expireStatusOpt.find(
(item) => item.confId === cellValue.expireStatus
)?.confValue
}
}, },
{ {
label: "学习任务名称", label: "学习任务名称",
prop: "itemNames", prop: "title",
width: "300" width: "300"
}, },
{ {
label: "课程信息", label: "课程信息",
prop: "itemNames", prop: "courseName",
width: "150" width: "150"
}, },
{ {
label: "课程配置时间", label: "课程配置时间",
prop: "createdDate", prop: "sendTime",
width: "180" width: "180"
}, },
{ {
label: "课程结束时间", label: "课程结束时间",
prop: "createdDate", prop: "finishDate",
width: "180" width: "180"
}, },
{ {
label: "任务状态", label: "任务状态",
prop: "useStatus", prop: "taskStatus",
width: "120px", width: "120px",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.useStatusOpt.find( return this.baseData.taskStatusOpt.find(
(item) => item.confId === cellValue.useStatus (item) => item.confId === cellValue.taskStatus
)?.confValue )?.confValue
}, },
className: (cellValue) => { className: (cellValue) => {
...@@ -282,7 +274,7 @@ export default { ...@@ -282,7 +274,7 @@ export default {
}, },
{ {
label: "任务完成时间", label: "任务完成时间",
prop: "createdDate", prop: "passedTime",
width: "180" width: "180"
}, },
{ {
...@@ -292,31 +284,32 @@ export default { ...@@ -292,31 +284,32 @@ export default {
}, },
{ {
label: "处罚状态", label: "处罚状态",
prop: "cancelStatus", prop: "punishStatus",
width: "100px", width: "100px",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.baseData.cancelStatusOpt.find( return this.baseData.punishStatusOpt.find(item => item.confId === cellValue.punishStatus)?.confValue
(item) => item.confId === cellValue.cancelStatus },
)?.confValue className: (cellValue) => {
return {
1: 'ashSpot',
2: 'orgenSpot',
3: 'greenSpot'
}[cellValue.punishStatus]
} }
}, },
{ {
label: '处罚启停', label: '处罚启停',
prop: 'cancelStatus', prop: 'punishFlag',
width: '150px', width: '150px',
addHtml: 'performanceFlag' addHtml: 'punishFlagHtml'
// formatter: (cellValue) => {
// return this.baseData.cancelStatusOpt.find(item => item.confId === cellValue.cancelStatus)?.confValue
// }
} }
] ]
}, },
baseData: { baseData: {
useStatusOpt: deepClone(useStatusOpt), punishStatusOpt: deepClone(punishStatusOpt),
expireStatusOpt: deepClone(expireStatusOpt), punishFlagOpt: deepClone(punishFlagOpt),
createdSourceOpt: deepClone(createdSourceOpt), businessOpt: deepClone(course_businessOpt),
cancelStatusOpt: deepClone(cancelStatusOpt), taskStatusOpt: deepClone(taskStatusOpt)
invoiceTypeOpt: deepClone(invoiceTypeOpt)
}, },
recordInfo: null, recordInfo: null,
detailVisible: false detailVisible: false
...@@ -381,17 +374,18 @@ export default { ...@@ -381,17 +374,18 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
createTime: "", staffName: "",
staffPhone: "",
title: "",
mainBrand: "",
merchantName: "",
businessSceneTypeName: "",
sendTime: "",
finishTime: "",
passedTime: "",
useStatus: "", useStatus: "",
expireStatus: "", punishStatus: "",
itemNames: "", punishFlag: ""
createdSource: "",
cancelStatus: "",
bizOrderCode: "",
bizTradeNo: "",
tradeNo: "",
invoiceType: "",
invoiceAmount: []
} }
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!