Commit df44b603 by wangzhihui

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

…ife-system into SAAS+V4.51.0-0331
2 parents 102225ab f4701f21
......@@ -5927,7 +5927,7 @@
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true,
"requires": {
......@@ -7142,7 +7142,7 @@
},
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
},
......@@ -8883,7 +8883,7 @@
"dependencies": {
"big.js": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/big.js/-/big.js-3.2.0.tgz",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q=="
},
"json5": {
......@@ -12929,7 +12929,7 @@
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm-run-path": {
"version": "2.0.2",
......@@ -13536,7 +13536,7 @@
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
},
......@@ -16718,7 +16718,7 @@
},
"type-fest": {
"version": "0.6.0",
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.6.0.tgz",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
"integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true
},
......@@ -17106,7 +17106,7 @@
},
"vue-hot-reload-api": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"resolved": "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true
},
......@@ -18031,7 +18031,7 @@
},
"yarn": {
"version": "1.22.19",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
"resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
},
"yorkie": {
......
......@@ -145,3 +145,33 @@ export function exportGrantRecord(data) {
data.method = 'dj.api.smartcarlife.resident.coupon.grant.record.export'
return request(data, RequestMethods.POST)
}
// 月度统计列表
export function monthlyStatistisc(data) {
data.method = 'dj.api.smartcarlife.resident.point.monthly.statistics'
return request(data, RequestMethods.POST)
}
// 月度统计导出
export function monthlyStatistiscExport(data) {
data.method = 'dj.api.smartcarlife.resident.point.monthly.statistics.export'
return request(data, RequestMethods.POST)
}
// 门店品牌
export function brandList(data = {}) {
data.method = 'dj.api.smartcarlife.common.car.brand.list'
return request(data, RequestMethods.POST)
}
// 归属商户
export function yqMerchantList(data = {}) {
data.method = 'dj.smartcarlife.api.yqMerchant.list'
return request(data, RequestMethods.POST)
}
// 服务门店
export function query4SRefByYqShop(data = {}) {
data.method = 'dj.api.scenemerchantref.query4SRefByYqShop'
return request(data, RequestMethods.POST)
}
......@@ -1108,3 +1108,10 @@ export const businessLineOpt = [
{ confId: 1, confValue: "权益" },
{ confId: 2, confValue: "延保" }
]
// 门店产值 业务类型
export const outputValue_businessOpt = [
{ confId: 0, confValue: "轻改" },
{ confId: 1, confValue: "权益" },
{ confId: 2, confValue: "延保" }
]
......@@ -806,13 +806,57 @@ export const routerName = {
handle: "markRefundHandle"
},
{
authId: "9061915",
parentId: "90619",
label: "导入产值",
category: "Button",
type: "primary",
handle: "handleImport"
},
{
authId: "9061916",
parentId: "90619",
label: "新增产值",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9061917",
parentId: "90619",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9061918",
parentId: "90619",
label: "详情",
handle: "handleDetail"
},
{
authId: "9061919",
parentId: "90619",
label: "修改",
handle: "handleEdit"
},
{
authId: "9061920",
parentId: "90619",
label: "删除",
handle: "handleDelete"
},
{
authId: "9061927",
parentId: "90619",
label: "预警设置",
handle: "warningHandle"
}
],
component: _import("systemConfig/ShopConfig/index")
// component: _import("systemConfig/ShopConfig/index")
component: _import("systemConfig/ShopConfig/indexControl")
},
9061905: {
path: "/setWorkorderDetail",
......
......@@ -81,6 +81,7 @@
>
<el-radio :label="1">分值</el-radio>
<el-radio :label="2">排名</el-radio>
<el-radio :label="3">满勤</el-radio>
</el-radio-group>
</div>
<div slot="ratingRankHtml" slot-scope="scope">
......@@ -363,9 +364,11 @@ export default {
this.showOrHideAttr("editFormData", "评级项目", false)
this.showOrHideAttr("editFormData", "评级方式", false)
this.pointRule()
// if (this.infoForm.ratingMethod == 1) {
// this.showOrHideAttr('editFormData', '评级积分', false)
// }
if (this.infoForm.ratingMethod == 1) {
this.showOrHideAttr('editFormData', '评级积分', false)
} else if (this.infoForm.ratingMethod == 2) {
this.showOrHideAttr('editFormData', '评级排名', false)
}
} else if (this.infoForm.levelType == 1) {
this.showOrHideAttr("editFormData", "评级积分", false)
}
......@@ -446,9 +449,12 @@ export default {
if (value == 1) {
this.showOrHideAttr("editFormData", "评级积分", false)
this.showOrHideAttr("editFormData", "评级排名", true)
} else {
} else if (value == 2) {
this.showOrHideAttr("editFormData", "评级积分", true)
this.showOrHideAttr("editFormData", "评级排名", false)
} else if (value == 3) {
this.showOrHideAttr("editFormData", "评级积分", true)
this.showOrHideAttr("editFormData", "评级排名", true)
}
},
......
......@@ -6,12 +6,15 @@
<el-tabs v-model="activeName">
<el-tab-pane label="积分记录"
name="pointsRecord" />
<el-tab-pane label="月度统计记录"
name="monthlyStatistics" />
<el-tab-pane label="积分配置管理"
name="pointsConfig" />
</el-tabs>
<div>
<points-record v-if="activeName === 'pointsRecord'" />
<points-config v-if="activeName === 'pointsConfig'" />
<monthly-statistics v-if="activeName === 'monthlyStatistics'" />
</div>
</div>
</div>
......@@ -20,6 +23,7 @@
<script>
import pointsRecord from './pointsRecord'
import pointsConfig from './pointsConfig'
import monthlyStatistics from './monthlyStatistics'
// import { deepClone } from '@/common/util'
export default {
name: 'StaffIndex',
......@@ -33,7 +37,8 @@ export default {
components: {
pointsRecord,
pointsConfig
pointsConfig,
monthlyStatistics
},
mounted() {
......
<!-- 月度统计记录 -->
<template>
<d2-container class="points-config">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button @click="handleExport">导出 </el-button>
</d2-table-header>
<d2-table ref="detailListTable"
:search-form="searchData"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</d2-container>
</template>
<script>
import { Util, deepClone, downLoadFile } from '@/common/util'
import { brandList, yqMerchantList, query4SRefByYqShop, monthlyStatistisc, monthlyStatistiscExport} from '@api/inStorePoints'
export default {
name: 'PointsConfig',
props: {
},
data() {
return {
searchForm: {
grantTime: ''
},
searchData: {},
showFormData: [
{
label: '员工姓名',
name: 'staffName',
type: 'input',
isClear: true,
},
{
label: '电话号码',
name: 'staffPhone',
type: 'input',
isClear: true,
},
{
label: '服务门店',
name: 'serviceMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'serviceMerchantList'
},
{
label: '门店品牌',
name: 'brandId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'id',
optionLabel: 'label',
optionsName: 'brandList'
},
{
label: '归属商户',
name: 'yqMerchantId',
type: 'select',
isClear: true,
optionList: [],
optionId: 'id',
optionLabel: 'merchantName',
optionsName: 'merchantList'
},
{
label: "发放时间",
name: "grantTime",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions"
}],
getListApi: monthlyStatistisc,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
// tableOption: { width: '150px' },
tableColumns: [
{
label: '员工姓名',
prop: 'staffName'
}, {
label: '电话号码',
prop: 'staffPhone'
}, {
label: '服务门店',
prop: "serviceMerchantName"
}, {
label: '门店品牌',
prop: 'merchantBrand'
}, {
label: '角色',
prop: 'roleName'
}, {
label: '归属商户',
prop: 'yqMerchantName'
}, {
label: '培训类',
prop: 'trainingScore'
}, {
label: '学习类',
prop: 'studyScore'
}, {
label: '行为类',
prop: 'studyScore'
}, {
label: '总积分',
prop: 'totalScore'
}, {
label: '发放时间',
prop: 'grantTimeRange',
width: '150',
// formatter: (cellValue) => {
// return Util.dateFormate(cellValue.grantTimeRange, 'YYYY-MM-DD HH:mm:ss')
// }
}
]
},
baseData: {
serviceMerchantList: [],
brandList: [],
merchantList: []
},
}
},
created() {
this.searchForm.grantTime = [new Date(), new Date()]
},
mounted() {
this.getBaseData()
},
methods: {
async getBaseData() {
this.findAllServiceMerchant()
this.findAllBrandList()
this.findAllMerchantList()
},
beforeSearchFn() {
return new Promise(resolve => {
console.log('this.searchForm', this.searchForm)
this.searchData = deepClone(this.searchForm)
if(this.searchData.brandId) {
this.searchData.brandIdList = [this.searchForm.brandId]
delete this.searchData.brandId
}
if (this.searchData.grantTime) {
this.searchData.grantTimeStart = Util.dateFormate(this.searchData.grantTime[0], 'YYYY-MM-DD') + ' 00:00:00'
this.searchData.grantTimeEnd = Util.dateFormate(this.searchData.grantTime[1], 'YYYY-MM-DD') + ' 23:59:59'
delete this.searchData.grantTime
}
resolve()
})
},
findAllServiceMerchant() {
query4SRefByYqShop().then((res) => {
this.baseData.serviceMerchantList = res
this.getOptionsList()
})
},
findAllBrandList(id) {
brandList().then((res) => {
this.baseData.brandList = res || []
this.getOptionsList()
})
},
findAllMerchantList() {
yqMerchantList().then(res => {
this.baseData.merchantList = res || []
this.getOptionsList()
})
},
handleReset() {
this.searchForm = {
grantTime: [new Date(), new Date()]
}
this.searchData = {}
this.$refs.detailListTable.refreshTable()
},
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] !== '全部'
) {
const temp = {}
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]
)
}
})
},
handleExport() {
var params = this.searchForm
monthlyStatistiscExport(params).then((res) => {
res && downLoadFile(res)
})
}
}
}
</script>
<style lang="scss" scoped>
.points-config {
margin-top: 40px;
.m-l-md {
margin-left: 20px;
}
}
</style>
<!-- 店面配置 -->
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search
ref="showSearch"
class="show-search"
label-width="100px"
:search-form="searchForm"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button :id="tableParams.btnId" 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="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<auth-button
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
/>
</d2-table>
<!-- <div> -->
<d2-container class="m-t-40">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
label-width="100px"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset"> 重置 </el-button>
</div>
</d2-container>
</div>
<div class="d2-container-content">
<d2-table-header>
<span>
<auth-button category="Button"
:show-btn-ids="['9061901', '9061902', '9061911']" /></span>
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:show-btn-ids="['9061903', '9061904', '9061906', '9061908', '9061910', '9061912', '9061914','9061927']"
:data="scope.scope" />
</d2-table>
</div>
<!-- 导入门店设置 -->
<d2-dialog
:title="'上传文件'"
......@@ -145,7 +145,8 @@
@closeWarnDialog="closeWarnDialog"
@confirmWarnDialog="confirmWarnDialog"
></warning-set>
</div>
</d2-container>
<!-- </div> -->
</template>
<script>
......@@ -899,33 +900,27 @@ export default {
.el-table .cell {
padding: 0 10px;
}
// padding-right: 3px;
.el-table__body-wrapper {
.el-table__row td:nth-child(1) {
border-left: 1px solid #ebeef5;
}
.el-table__row td:nth-last-child(1) {
border-right: 1px solid #ebeef5;
}
}
.select {
.el-tag {
width: auto;
}
}
}
.upload-wrap {
display: flex;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
......@@ -936,36 +931,30 @@ export default {
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
.m-l-md {
margin-left: 20px;
}
.upload-statistics {
display: flex;
align-items: center;
justify-content: space-between;
margin: 30px 70px;
.quantity {
font-size: 14px;
color: #333333;
text-align: center;
.success {
font-size: 26px;
color: #2cca74;
text-align: center;
margin-bottom: 4px;
}
.err {
font-size: 26px;
color: #eb4e4e;
......@@ -973,7 +962,6 @@ export default {
margin-bottom: 4px;
}
}
.line {
width: 1px;
height: 56px;
......@@ -985,4 +973,7 @@ export default {
align-items: center;
justify-content: center;
}
</style>
.m-t-40 {
margin-top: 40px;
}
</style>
\ No newline at end of file
<!-- 店面配置 -->
<template>
<div class="shopConfig">
<div class="header"
slot="header">
<el-tabs v-model="activeName"
@tab-click="handleClickTabs">
<el-tab-pane label="店铺设置"
name="shopSet" />
<el-tab-pane label="门店产值"
name="outputValue" />
<el-tab-pane label="主机厂交付数"
name="deliveryQuantity" />
</el-tabs>
<div>
<shop-set v-if="activeName === 'shopSet'" />
<output-value v-if="activeName === 'outputValue'" />
</div>
</div>
</div>
</template>
<script>
import shopSet from './index'
import outputValue from './outputValue/index'
import { deepClone } from '@/common/util'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'shopSet',
recordInfo: {}
}
},
components: {
shopSet,
outputValue
},
mounted() {
},
methods: {
handleClickTabs() {
this.recordInfo = {}
},
gotoDetail(params) {
this.activeName = 'details'
this.recordInfo = deepClone(params)
}
}
}
</script>
<style lang="scss" scoped>
.shopConfig {
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<!----><!---->
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
}
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
}
}
},
methods: {
handleStartInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[0] = event
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[1] = event
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!