Commit 75447cbd by 前端

Merge branch 'hotfix_V4.46.2-1119' into 'develop'

上线合并

See merge request !374
2 parents aeb3e8b8 bf386ec3
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 查询员工预警列表
export function staffWarningMsgListWithPage(data) {
data.method = `${path}warningmsg.staffWarningMsgListWithPage`
return request(data, RequestMethods.POST)
}
// 预警明细
export function warningMsgDetailListWithPage(data) {
data.method = `${path}warningmsg.warningMsgDetailListWithPage`
return request(data, RequestMethods.POST)
}
// 查询枚举 Type 1.预警类型 2.预警事项
export function findAllData(data) {
data.method = `${path}warningmsg.findAllData`
return request(data, RequestMethods.POST)
}
// 查询相关警情的所有督导或销售 1.督导 2.销售
export function findAllPersonRelations(data) {
data.method = `${path}warningmsg.findAllPersonRelations`
return request(data, RequestMethods.POST)
}
// 根据预警id查询预警的跟进信息
export function findByMsgId(data) {
data.method = `${path}warningmsg.findByMsgId`
return request(data, RequestMethods.POST)
}
// 保存跟进记录
export function saveFollowRecord(data) {
data.method = `${path}warningmsg.saveFollowRecord`
return request(data, RequestMethods.POST)
}
// 导出预警明细
export function warningMsgDetailListWithPageExport(data) {
data.method = `${path}warningmsg.warningMsgDetailListWithPageExport`
return request(data, RequestMethods.POST)
}
// 查询门店预警列表
export function merchantWarningMsgListWithPage(data) {
data.method = `${path}warningmsg.merchantWarningMsgListWithPage`
return request(data, RequestMethods.POST)
}
...@@ -63,3 +63,9 @@ export function detailByUniquePhone(data) { ...@@ -63,3 +63,9 @@ export function detailByUniquePhone(data) {
data.method = `${path}staff.detailByUniquePhone` data.method = `${path}staff.detailByUniquePhone`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 更新未打卡无法录单限制配置
export function updateRecordOrderConfig(data) {
data.method = `dj.api.smartcarlife.staff.updateRecordOrderConfig`
return request(data, RequestMethods.POST)
}
\ No newline at end of file \ No newline at end of file
...@@ -819,7 +819,9 @@ export const downloadReportManage_reportType = [ ...@@ -819,7 +819,9 @@ export const downloadReportManage_reportType = [
{ confId: "merchantPerformance", confValue: "门店业绩数据表" }, { confId: "merchantPerformance", confValue: "门店业绩数据表" },
{ confId: "sellerPerformance", confValue: "零售人员业绩提成数据表" }, { confId: "sellerPerformance", confValue: "零售人员业绩提成数据表" },
{ confId: "multiCategoryOperation", confValue: "多品类运营" }, { confId: "multiCategoryOperation", confValue: "多品类运营" },
{ confId: "multiCategoryOperationMerchant", confValue: "多品类运营-门店" } { confId: "multiCategoryOperationMerchant", confValue: "多品类运营-门店" },
{ confId: "dailybehaviorsummary", confValue: "日行为汇总表" },
{ confId: "weeklybehaviorsummary", confValue: "周行为汇总表" }
] ]
// 下载报表 业务类型 // 下载报表 业务类型
...@@ -925,3 +927,45 @@ export const sendStatusList = [ ...@@ -925,3 +927,45 @@ export const sendStatusList = [
{ confId: 2, confValue: "待发送" }, { confId: 2, confValue: "待发送" },
{ confId: 3, confValue: "已发送" } { confId: 3, confValue: "已发送" }
] ]
// 预警管理 所属业务
export const businessOpt = [
{ confId: 2, confValue: "轻改" },
{ confId: 3, confValue: "权益" },
{ confId: 4, confValue: "延保" }
]
// 预警管理 所属业务 显示文字
export const businessOptShowText = {
2: "轻改",
3: "权益",
4: "延保"
}
// 预警管理 优先级
export const priorityOpt = [
{ confId: 1, confValue: "高" },
{ confId: 2, confValue: "中" },
{ confId: 3, confValue: "低" }
]
// 预警管理 优先级 显示文字
export const priorityShowText = {
1: "高",
2: "中",
3: "低"
}
// 预警管理 预警阶段
export const warnStageyOpt = [
{ confId: 1, confValue: "第一阶段" },
{ confId: 2, confValue: "第二阶段" }
]
// 预警管理 状态
export const statusOpt = [
{ confId: 1, confValue: "待处理" },
{ confId: 2, confValue: "预约处理" },
{ confId: 3, confValue: "已完成" },
{ confId: 0, confValue: "无需处理" }
]
...@@ -87,14 +87,10 @@ export function limitPriceForNegative(newValue) { ...@@ -87,14 +87,10 @@ export function limitPriceForNegative(newValue) {
} }
/** /**
* 时间控件-限制月份 * 时间控件-限制只能选当前及之前的时间
*/ */
export const rangePickerOptions = { export const rangePickerOptions = {
disabledDate(date) { disabledDate(date) {
// console.log(date)
// console.log(new Date())
if (date > new Date()) { if (date > new Date()) {
return true return true
} }
...@@ -103,6 +99,34 @@ export const rangePickerOptions = { ...@@ -103,6 +99,34 @@ export const rangePickerOptions = {
} }
/** /**
* 时间控件-限制只能选当前及之后的日期
*/
export const afterPickerOptions = {
disabledDate(date) {
return date.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
}
}
/**
* 时间控件-限制只能选当前及之后的日期
*/
export const afterPickerOptions_timeChoose = {
// 设置禁用过去日期不能选
disabledDate(date) {
return date.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
},
// 控制时分秒不可选
selectableRange: (() => {
const data = new Date()
const hour = data.getHours()
const minute = data.getMinutes()
// const second = data.getSeconds()
const second = "00"
return [`${hour}:${minute}:${second} - 23:59:59`]
})()
}
/**
* 时间控件-(0-30天内的日期) * 时间控件-(0-30天内的日期)
*/ */
export const appointDays = 35 export const appointDays = 35
......
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
915: {
path: "/earlyWarningManager",
name: "earlyWarningManager",
meta: {
title: "预警管理",
authId: "915",
parentId: "1",
cache: false
}
},
91501: {
path: "/staffWarn",
name: "staffWarn",
meta: {
title: "员工预警管理",
authId: "91501",
parentId: "915",
cache: false
},
auth: [
{
authId: "9150101",
parentId: "91501",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9150102",
parentId: "91501",
label: "查看",
handle: "handleDetail"
},
{
authId: "9150103",
parentId: "91501",
label: "处理",
handle: "handleDeal"
}
],
component: _import("earlyWarningManager/staff/indexControl")
},
91502: {
path: "/storeWarn",
name: "storeWarn",
meta: {
title: "门店预警管理",
authId: "91502",
parentId: "915",
cache: false
},
auth: [
{
authId: "9150201",
parentId: "91502",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9150202",
parentId: "91502",
label: "查看",
handle: "handleDetail"
},
{
authId: "9150203",
parentId: "91502",
label: "处理",
handle: "handleDeal"
}
],
component: _import("earlyWarningManager/store/indexControl")
}
}
<!-- 员工预警管理 -->
<template>
<div class="staffWarn">
<div class="header"
slot="header">
<el-tabs v-model="activeName"
@tab-click="handleClickTabs">
<el-tab-pane label="预警看板"
name="noticeBoard" />
<el-tab-pane label="预警明细"
name="details" />
</el-tabs>
<div>
<notice-board v-if="activeName === 'noticeBoard'"
@gotoDetail="gotoDetail" />
<staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" />
</div>
</div>
</div>
<!-- <d2-container class="staffWarn">
<div class="header"
slot="header">
<el-tabs v-model="activeName"
@tab-click="handleClickTabs">
<el-tab-pane label="预警看板"
name="noticeBoard" />
<el-tab-pane label="预警明细"
name="details" />
</el-tabs>
</div>
<div>
<notice-board v-if="activeName === 'noticeBoard'"
@gotoDetail="gotoDetail" />
<staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" />
</div>
</d2-container> -->
</template>
<script>
import noticeBoard from './noticeBoard'
import staffDetail from './details'
import { deepClone } from '@/common/util'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'noticeBoard',
recordInfo: {}
}
},
components: {
noticeBoard,
staffDetail
},
mounted() {
},
methods: {
handleClickTabs() {
this.recordInfo = {}
},
gotoDetail(params) {
this.activeName = 'details'
this.recordInfo = deepClone(params)
}
}
}
</script>
<style lang="scss" scoped>
.staffWarn {
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
<!-- 门店预警管理 -->
<template>
<div class="staffWarn">
<div class="header"
slot="header">
<el-tabs v-model="activeName"
@tab-click="handleClickTabs">
<el-tab-pane label="预警看板"
name="noticeBoard" />
<el-tab-pane label="预警明细"
name="details" />
</el-tabs>
<div>
<notice-board v-if="activeName === 'noticeBoard'"
@gotoDetail="gotoDetail" />
<staff-detail v-if="activeName === 'details'"
:params-obj="recordInfo" />
</div>
</div>
</div>
</template>
<script>
import noticeBoard from './noticeBoard'
import staffDetail from './details'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'noticeBoard',
recordInfo: {}
}
},
components: {
noticeBoard,
staffDetail
},
mounted() {
},
methods: {
handleClickTabs() {
this.recordInfo = {}
},
gotoDetail(params) {
this.activeName = 'details'
this.recordInfo = params
console.log(params)
}
}
}
</script>
<style lang="scss" scoped>
.staffWarn {
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
v-if="editRemarkFlag" v-if="editRemarkFlag"
@click="editRemark">修改</el-button> @click="editRemark">修改</el-button>
</el-form-item> </el-form-item>
<el-form-item label="撤销原因:" v-if="detail.revokeReason"> <el-form-item label="撤销原因:"
v-if="detail.revokeReason">
{{ detail.revokeReason }} {{ detail.revokeReason }}
</el-form-item> </el-form-item>
<el-form-item label="战败原因:" <el-form-item label="战败原因:"
...@@ -280,7 +281,7 @@ ...@@ -280,7 +281,7 @@
</p> </p>
</div> </div>
<el-dialog :visible="imgVisible" <!-- <el-dialog :visible="imgVisible"
:before-close="handleEnlargeImg"> :before-close="handleEnlargeImg">
<el-carousel :autoplay="false" <el-carousel :autoplay="false"
arrow="always" arrow="always"
...@@ -296,7 +297,12 @@ ...@@ -296,7 +297,12 @@
class="carousel-img"> class="carousel-img">
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</el-dialog> </el-dialog> -->
<el-image-viewer v-if="imgVisible"
:on-close="closeImgViewer"
:url-list="imgList"
:initial-index="initialIndex" />
<!-- 标记退款 --> <!-- 标记退款 -->
<!-- <sign-refund-dialog :sign-refund-visible="signRefundVisible" <!-- <sign-refund-dialog :sign-refund-visible="signRefundVisible"
...@@ -336,7 +342,8 @@ export default { ...@@ -336,7 +342,8 @@ export default {
components: { components: {
// signRefundDialog, // signRefundDialog,
remarkDialog, remarkDialog,
newSignRefundDialog newSignRefundDialog,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
}, },
data() { data() {
return { return {
...@@ -395,7 +402,8 @@ export default { ...@@ -395,7 +402,8 @@ export default {
extendedPosiTypeList: [], extendedPosiTypeList: [],
isPartialRefund: false, // 支持部分退款 isPartialRefund: false, // 支持部分退款
InvoicingFlag: false, // 标记已开票权限 InvoicingFlag: false, // 标记已开票权限
editRemarkFlag: false // 编辑备注权限 editRemarkFlag: false, // 编辑备注权限
initialIndex: 0
} }
}, },
computed: { computed: {
...@@ -425,7 +433,9 @@ export default { ...@@ -425,7 +433,9 @@ export default {
}, },
handleEnlargeImg(url, name) { handleEnlargeImg(url, name) {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
this.imgList = url // this.imgList = url
console.log('url', url)
this.imgList = url.map(item => item[name])
this.imgUrlName = name this.imgUrlName = name
}, },
getSummaries(param) { getSummaries(param) {
...@@ -547,6 +557,10 @@ export default { ...@@ -547,6 +557,10 @@ export default {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
},
closeImgViewer() {
this.imgVisible = false
} }
} }
} }
......
...@@ -4,24 +4,19 @@ ...@@ -4,24 +4,19 @@
<!-- class="order-detail" --> <!-- class="order-detail" -->
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" <div class="header" slot="header" style="padding: 10px 20px">
slot="header" <d2-search
style="padding: 10px 20px;"> ref="showSearch"
<d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:label-width="labelWidth" :label-width="labelWidth"
:form-data="showFormData" /> :form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" <el-button @click="handleSearch" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset"> 重置 </el-button>
@click="handleReset">
重置
</el-button>
</div> </div>
</div> </div>
<!-- </d2-container> <!-- </d2-container>
...@@ -30,14 +25,18 @@ ...@@ -30,14 +25,18 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table
ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
<div slot="auth-button" >
<div
slot="auth-button"
slot-scope="scope" slot-scope="scope"
v-if="scope.scope.status != -1"> v-if="scope.scope.status != -1"
>
<auth-button :data="scope.scope" /> <auth-button :data="scope.scope" />
</div> </div>
<div v-else> <div v-else>
...@@ -50,88 +49,107 @@ ...@@ -50,88 +49,107 @@
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from "@/common/util"
import { downloadReportManage_reportType, downloadReportManage_businessType } from '@/common/constants.js' import {
import { queryAllExcel, reportExport_download, rebuild } from '@api/downloadReportManage' downloadReportManage_reportType,
downloadReportManage_businessType
} from "@/common/constants.js"
import {
queryAllExcel,
reportExport_download,
rebuild
} from "@api/downloadReportManage"
export default { export default {
name: 'DownloadReportList', name: "DownloadReportList",
components: { components: {},
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px', labelWidth: "100px",
searchForm: { searchForm: {
filename: '', filename: "",
business_type: '', business_type: "",
report_type: '' report_type: "",
key: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [
label: '文件标题', {
name: 'filename', label: "文件标题",
type: 'input', name: "filename",
maxlength: '50', type: "input",
maxlength: "50",
isClear: true isClear: true
}, { },
label: '报表类型', {
name: 'report_type', label: "报表类型",
type: 'select', name: "report_type",
type: "select",
optionList: [], optionList: [],
optionId: 'confId', optionId: "confId",
optionLabel: 'confValue', optionLabel: "confValue",
optionsName: 'downloadReportManage_reportType' optionsName: "downloadReportManage_reportType"
}, { },
label: '业务类型', {
name: 'business_type', label: "业务类型",
type: 'select', name: "business_type",
type: "select",
optionList: [], optionList: [],
optionId: 'confId', optionId: "confId",
optionLabel: 'confValue', optionLabel: "confValue",
optionsName: 'downloadReportManage_businessType' optionsName: "downloadReportManage_businessType"
}], }
],
getListApi: queryAllExcel, getListApi: queryAllExcel,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
// tableOption: { width: '200px' }, // tableOption: { width: '200px' },
tableOption: true, tableOption: true,
tableColumns: [{ tableColumns: [
label: '文件标题', {
prop: 'filename', label: "文件标题",
width: '400px' prop: "filename",
}, { width: "400px"
label: '报表类型', },
prop: 'report_type' {
label: "报表类型",
prop: "report_type"
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return downloadReportManage_reportType.find(el => el.confId == cellValue.report_type)?.confValue // return downloadReportManage_reportType.find(el => el.confId == cellValue.report_type)?.confValue
// } // }
}, { },
label: '业务类型', {
prop: 'business_type' label: "业务类型",
prop: "business_type"
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return downloadReportManage_businessType.find(el => el.confId == cellValue.business_type)?.confValue // return downloadReportManage_businessType.find(el => el.confId == cellValue.business_type)?.confValue
// } // }
}, { },
label: '统计周期', {
prop: 'statperiod' label: "统计周期",
prop: "statperiod"
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue // return sceneForInStore.find(el => el.confId == o)?.confValue
// } // }
}, { },
label: '创建时间', {
prop: 'created_date' label: "创建时间",
prop: "created_date"
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue // return sceneForInStore.find(el => el.confId == o)?.confValue
// } // }
}] }
]
}, },
baseData: { baseData: {
downloadReportManage_reportType: deepClone(downloadReportManage_reportType), downloadReportManage_reportType: deepClone(
downloadReportManage_businessType: deepClone(downloadReportManage_businessType) downloadReportManage_reportType
),
downloadReportManage_businessType: deepClone(
downloadReportManage_businessType
)
} }
} }
}, },
computed: { computed: {
...@@ -155,7 +173,7 @@ export default { ...@@ -155,7 +173,7 @@ export default {
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
resolve() resolve()
}) })
...@@ -163,14 +181,23 @@ export default { ...@@ -163,14 +181,23 @@ export default {
getOptionsList() { getOptionsList() {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === "select") {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {} const temp = {}
temp[this.showFormData[index].optionId] = '' temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = '全部' temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp) 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]
)
} }
}) })
}, },
...@@ -180,9 +207,9 @@ export default { ...@@ -180,9 +207,9 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
filename: '', filename: "",
business_type: '', business_type: "",
report_type: '' report_type: ""
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
...@@ -190,7 +217,7 @@ export default { ...@@ -190,7 +217,7 @@ export default {
// 下载 // 下载
handleDownload(row) { handleDownload(row) {
reportExport_download({ key: row.key }).then((result) => { reportExport_download({ key: row.key }).then((result) => {
console.log(result, 'result') console.log(result, "result")
result && this.downLoadFile(result.list[0].url) result && this.downLoadFile(result.list[0].url)
}) })
}, },
...@@ -210,25 +237,28 @@ export default { ...@@ -210,25 +237,28 @@ export default {
// 重新生成 // 重新生成
handleGenerate(row) { handleGenerate(row) {
this.$confirm('系统将自动按照对应的报表及统计时间重新生成,生成过程中不可下载,请耐心等待。是否确认重新生成?', '提示', { this.$confirm(
confirmButtonText: '确定', "系统将自动按照对应的报表及统计时间重新生成,生成过程中不可下载,请耐心等待。是否确认重新生成?",
cancelButtonText: '取消', "提示",
type: 'warning', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false closeOnClickModal: false
}).then(() => { }
rebuild({ key: row.key }).then(res => { )
.then(() => {
rebuild({ key: row.key }).then((res) => {
this.notice.okTips() this.notice.okTips()
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}) })
}).catch(err => { })
.catch((err) => {
console.log(err) console.log(err)
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.count-txt { .count-txt {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!