Commit 25ccee51 by 前端

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

…ife-system into SAAS+V4.50.0-0311
2 parents 85f91e6a 73a7a3a6
Showing 25 changed files with 575 additions and 160 deletions
...@@ -254,3 +254,13 @@ export function updateOneKpiMetric (data) { ...@@ -254,3 +254,13 @@ export function updateOneKpiMetric (data) {
data.method = 'dj.riskmanage.api.kpiMetric.updateOneKpiMetri' data.method = 'dj.riskmanage.api.kpiMetric.updateOneKpiMetri'
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
/**
*
* 店效盯防-更多看板-门店列表导出
*/
export function exportMerchantList (data) {
data.method = 'dj.api.smartcarlife.risk.manage.notice.board.merchant.list.export'
return request(data, RequestMethods.POST)
}
...@@ -79,3 +79,24 @@ export function cancelDeduct(data) { ...@@ -79,3 +79,24 @@ export function cancelDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct` data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`
return request(data) return request(data)
} }
// 积分审批列表同步
export function refreshData(data) {
data.method = `dj.api.smartcarlife.staff.motivation.page.sync`
return request(data)
}
//查询指定订单的操作记录
export function getOperationRecord(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.operation`
return request(data)
}
//根据订单号查询剩余积分
// export function getScoreByscore(data) {
// data.method = `dj.api.smartcarlife.staff.motivation.order.score`
// return request(data)
// }
//获取到总积分
export function getOrderByScore(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.score`
return request(data)
}
\ No newline at end of file \ No newline at end of file
...@@ -52,3 +52,15 @@ export function getBusisDetailBasic(data) { ...@@ -52,3 +52,15 @@ export function getBusisDetailBasic(data) {
data.method = `dj.api.create.business.approve.detail.basic` data.method = `dj.api.create.business.approve.detail.basic`
return request(data) return request(data)
} }
// 新增商户 - 车品牌
export function brandList(data) {
data.method = `merchants.api.merchantCommon.getCarbrandTree`
return request(data, RequestMethods.POST)
}
// 新增商户 - 商户类型
export function getMerchantType(data) {
data.method = `merchants.api.menu.findAllDictData`
return request(data, RequestMethods.POST)
}
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import SearchBox from '../SearchBox' import SearchBox from '../SearchBox'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { getMerchantOutputDetail, getBoardDetail } from '@api/earlyWarningManager' import { getBoardDetail } from '@api/earlyWarningManager'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { tooltipConfig, xAxisConfig, dataZoomSliderConfig } from '../chartConfig' import { tooltipConfig, xAxisConfig, dataZoomSliderConfig } from '../chartConfig'
import { KPI_DATA } from '../kpiConfig.js'
export default { export default {
components: { components: {
SearchBox SearchBox
...@@ -84,17 +84,18 @@ export default { ...@@ -84,17 +84,18 @@ export default {
startDate, startDate,
dateType, dateType,
endDate, endDate,
code: 'A048' code
}) })
this.drawChart(res) this.drawChart(res)
}, },
drawChart (list) { drawChart (list) {
this.chart.clear() this.chart.clear()
let { pageData: { name } } = this, let { pageData: { name, code } } = this,
_this = this, _this = this,
{ allYear, dateType } = this.searchTime, { allYear, dateType } = this.searchTime,
timeList = [], timeList = [],
data = [] data = [],
unit = KPI_DATA[code]?.valueUnit ? KPI_DATA[code].valueUnit : ''
list.map(e => { list.map(e => {
let { startDate, endDate } = e, let { startDate, endDate } = e,
axisLabel = dayjs(startDate).format("YYYY-MM-DD"), axisLabel = dayjs(startDate).format("YYYY-MM-DD"),
...@@ -116,7 +117,7 @@ export default { ...@@ -116,7 +117,7 @@ export default {
if (dateType == 1) title = axisValue if (dateType == 1) title = axisValue
return `${title}<br> return `${title}<br>
<div class="tooltips"> <div class="tooltips">
<i class="circle"></i>${name}:${value?.toLocaleString() || 0} <i class="circle"></i>${name}:${value?.toLocaleString() || 0}${unit}
</div>`; </div>`;
} }
}, },
...@@ -129,7 +130,20 @@ export default { ...@@ -129,7 +130,20 @@ export default {
right: '60', right: '60',
bottom: '80' bottom: '80'
}, },
xAxis: xAxisConfig(_this), xAxis: {
...xAxisConfig(_this),
axisLabel: {
showMaxLabel: true,
formatter: function (value, index) {
let str = ''
str = allYear ? dayjs(value).format('YYYY年MM月') : dayjs(value).format('MM-DD')
if (dateType == 1) str = value
return str
}
}
},
yAxis: { yAxis: {
type: 'value', type: 'value',
boundaryGap: [0, '100%'], boundaryGap: [0, '100%'],
......
<template> <template>
<div class="data-list-box"> <div
class="data-list-box"
v-loading="loading"
>
<template v-if="boardList.length"> <template v-if="boardList.length">
<div class="data-list"> <div class="data-list">
...@@ -34,6 +37,7 @@ ...@@ -34,6 +37,7 @@
import onShowMixin from './onShowMixin' import onShowMixin from './onShowMixin'
import BoardItem from '../shopGuardIndex/BoardItem' import BoardItem from '../shopGuardIndex/BoardItem'
import { getBoardList } from '@api/earlyWarningManager' import { getBoardList } from '@api/earlyWarningManager'
import { KPI_DATA } from '../kpiConfig.js'
export default { export default {
mixins: [onShowMixin], mixins: [onShowMixin],
...@@ -50,6 +54,8 @@ export default { ...@@ -50,6 +54,8 @@ export default {
}, },
methods: { methods: {
async search () { async search () {
try {
this.loading = true
this.boardList = this.$options.data.call(this).boardList this.boardList = this.$options.data.call(this).boardList
let { businessType } = this.searchForm let { businessType } = this.searchForm
const res = await getBoardList({ const res = await getBoardList({
...@@ -67,9 +73,14 @@ export default { ...@@ -67,9 +73,14 @@ export default {
businessType, businessType,
data: e, data: e,
value: 'value', value: 'value',
percent: 'ratio' percent: 'ratio',
...KPI_DATA[e.code]
}) })
}) })
this.loading = false
} catch (error) {
this.loading = false
}
}, },
openWindow (e) { openWindow (e) {
console.log(e) console.log(e)
......
...@@ -63,12 +63,9 @@ export default { ...@@ -63,12 +63,9 @@ export default {
businessScenarioList: [], businessScenarioList: [],
secondBrandIdList: [], secondBrandIdList: [],
merchantRange: 1, merchantRange: 1,
// merchantId: '', merchantId: '',
}, },
// baseData: {
// storeIdList: [],
// },
showFormData: [ showFormData: [
{ {
label: '归属业务', label: '归属业务',
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<el-button <el-button
size="small" size="small"
type="primary" type="primary"
@click="handleExport"
>导出</el-button> >导出</el-button>
</div> </div>
<d2-table <d2-table
...@@ -13,13 +14,50 @@ ...@@ -13,13 +14,50 @@
:hasPage="false" :hasPage="false"
:has-num="false" :has-num="false"
noDataText="暂无门店数据" noDataText="暂无门店数据"
v-loading="loading"
@sortChange="sortChange"
> >
<template <template
slot="popoverHtml"
slot-scope="scope"
>
<template v-if="scope.scope[scope.prop] && scope.scope[scope.prop].length > 1">
<span>{{ scope.scope[scope.prop].slice(0, 1).join("") }}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover"
>
<div :class="{scrollHeight: scope.scope[scope.prop].length >= 10}">
<div
v-for="(item, index) in scope.scope[scope.prop]"
:key="index"
>
{{ item }}
</div>
</div>
<span
class="more-info"
slot="reference"
>...({{ scope.scope[scope.prop].length }})</span>
</el-popover>
</template>
<template v-else>
<span v-if="
!scope.scope[scope.prop] || !scope.scope[scope.prop].length
">-</span>
<span v-else>{{ scope.scope[scope.prop].join("") }}</span>
</template>
</template>
<template
slot="sortableHtml" slot="sortableHtml"
slot-scope="scope" slot-scope="scope"
> >
<div class="sortableHtml"> <div class="sortableHtml">
{{scope.scope[scope.prop]}} {{formatterValue(scope)}}
<div :class="['percent',`${percentColor(scope)}`]">
{{formattedPercent(scope)}}
</div>
</div> </div>
</template> </template>
<div <div
...@@ -37,8 +75,16 @@ ...@@ -37,8 +75,16 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import onShowMixin from './onShowMixin' import onShowMixin from './onShowMixin'
import { getBoardMerchantList } from '@api/earlyWarningManager' import { getBoardMerchantList, exportMerchantList } from '@api/earlyWarningManager'
import { deepClone, downLoadFile } from '@/common/util'
import dayjs from 'dayjs' import dayjs from 'dayjs'
const RATIO_KEY = {
output: 'outputRatio',
orderNumber: 'orderNumberRatio',
customerUnitPrice: 'customerUnitPriceRatio',
penetrationRate: 'penetrationRateRatio',
touchConversionRate: 'touchConversionRateRatio',
}
export default { export default {
mixins: [onShowMixin], mixins: [onShowMixin],
name: '', name: '',
...@@ -47,12 +93,8 @@ export default { ...@@ -47,12 +93,8 @@ export default {
}, },
data () { data () {
return { return {
tableTotal: 0,
page: {
pageSize: 10,
currentPage: 1
},
tableData: [], tableData: [],
originTableData: [],
// 表格参数 // 表格参数
tableParams: { tableParams: {
tableOption: { width: '150px' }, tableOption: { width: '150px' },
...@@ -81,10 +123,9 @@ export default { ...@@ -81,10 +123,9 @@ export default {
} }
}, { }, {
label: '督导', label: '督导',
width: 'supervisionList', minWidth: 150,
formatter (row) { prop: 'supervisionNameList',
return "-" addHtml: 'popoverHtml'
}
}, { }, {
label: '归属业务', label: '归属业务',
prop: 'businessType', prop: 'businessType',
...@@ -98,10 +139,8 @@ export default { ...@@ -98,10 +139,8 @@ export default {
} }
}, { }, {
label: '主营品牌', label: '主营品牌',
prop: "brandList", prop: "carBrandList",
formatter (row) { addHtml: 'popoverHtml'
return
}
}, { }, {
label: '业务性质', label: '业务性质',
prop: "businessScenario", prop: "businessScenario",
...@@ -119,7 +158,7 @@ export default { ...@@ -119,7 +158,7 @@ export default {
width: '150', width: '150',
prop: "output", prop: "output",
sortable: true, sortable: true,
addHtml: 'sortableHtml' addHtml: 'sortableHtml',
}, { }, {
label: '订单数', label: '订单数',
width: '150', width: '150',
...@@ -131,20 +170,20 @@ export default { ...@@ -131,20 +170,20 @@ export default {
width: '130', width: '130',
prop: "customerUnitPrice", prop: "customerUnitPrice",
sortable: true, sortable: true,
addHtml: 'sortableHtml' addHtml: 'sortableHtml',
}, { }, {
label: '渗透率', label: '渗透率',
prop: "penetrationRate", prop: "penetrationRate",
width: 130, width: 130,
sortable: true, sortable: true,
addHtml: 'sortableHtml' addHtml: 'sortableHtml',
}, },
{ {
label: '触客转化率', label: '触客转化率',
prop: "touchConversionRate", prop: "touchConversionRate",
sortable: true, sortable: true,
width: 130, width: 130,
addHtml: 'sortableHtml' addHtml: 'sortableHtml',
} }
] ]
}, },
...@@ -154,13 +193,35 @@ export default { ...@@ -154,13 +193,35 @@ export default {
}, },
methods: { methods: {
async search () { async search () {
try {
this.loading = true
this.tableData = [] this.tableData = []
const res = await getBoardMerchantList({ this.originTableData = []
...this.searchForm const res = await getBoardMerchantList(this.searchForm)
res.map(e => {
// e.output = Math.floor(Math.random() * 10001)
// e.orderNumber = Math.floor(Math.random() * 10001)
// e.customerUnitPrice = Math.floor(Math.random() * 10001)
// e.penetrationRate = Math.floor(Math.random() * 100)
// e.touchConversionRate = Math.floor(Math.random() * 100)
// e.outputRatio = Math.floor(Math.random() * 201) - 100
let carBrandList = [],
supervisionNameList = []
e.brandList?.map(i => {
carBrandList.push(i.name)
})
e.supervisionList?.map(i => {
supervisionNameList.push(i.supervisionName)
})
e.carBrandList = carBrandList
e.supervisionNameList = supervisionNameList
}) })
console.log(res) this.tableData = deepClone(res)
this.tableData = res this.originTableData = deepClone(res)
// this.tableTotal = total this.loading = false
} catch (error) {
this.loading = false
}
}, },
handleDetail (e) { handleDetail (e) {
this.$emit('openWindow', { this.$emit('openWindow', {
...@@ -172,9 +233,48 @@ export default { ...@@ -172,9 +233,48 @@ export default {
merchantName: e.merchantName merchantName: e.merchantName
}) })
}, },
pageChange (e) { handleExport () {
this.page = e exportMerchantList(this.searchForm).then((res) => {
this.search() res && downLoadFile(res)
})
},
sortChange (sortObj, sortColum, sort) {
if (sort) {
if (sort == 'ascending') this.tableData.sort((a, b) => {
return a[sortColum] - b[sortColum]
})
else this.tableData.sort((a, b) => {
return b[sortColum] - a[sortColum]
})
} else this.tableData = deepClone(this.originTableData)
},
formatterValue (e) {
const { scope, prop } = e
let str = scope[prop]
if (str != null) {
str = str.toLocaleString()
if (['output', 'customerUnitPrice'].includes(prop)) str = `¥${str}`
if (['penetrationRate', 'touchConversionRate'].includes(prop)) str = `${str}%`
} else str = '-'
return str
},
percentColor (e) {
const { scope, prop } = e,
key = RATIO_KEY[prop]
if (scope[key] > 0) {
return 'red'
} else if (scope[key] < 0) {
return 'green'
} else {
return ''
}
},
formattedPercent (e) {
const { scope, prop } = e,
key = RATIO_KEY[prop]
let str = ''
if (scope[key] != null) str = `环${scope[key]}%`
return str
} }
} }
} }
...@@ -187,5 +287,26 @@ export default { ...@@ -187,5 +287,26 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.sortableHtml {
color: #1d1d1d;
font-size: 14px;
font-weight: 500;
line-height: 20px;
.percent {
font-weight: 400;
color: #333333;
}
.red {
color: #eb4e4e;
}
.green {
color: #43cf7c;
}
}
.more-info {
white-space: nowrap;
color: #5850ff;
cursor: pointer;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ export default { ...@@ -2,6 +2,7 @@ export default {
data () { data () {
return { return {
initStatus: false, initStatus: false,
loading:false
} }
}, },
props: { props: {
......
export const KpiList = { export const KPI_DATA = {
'A014': { "A014": {unit: '(元)'},//产值
"A004": {},//触客数
} "A020": { unit: '(元)' },//客单价
"A010": {},//订单数
"A001": {},//交车数
"A046": {},//日均触客数
"A044": { unit: '(元)' },//店均产值
"A025": { valueUnit: '%' },//引流率
"A047": {},//日均交车数
"A023": { valueUnit: '%' },//触客转化率
"A021": { valueUnit: '%' },//触客转化率(售前)
"A022": { valueUnit: '%' },//触客转化率(售后)
"A026": { valueUnit: '%' },//溇透率
"A048": { unit: '(元)' },//日均产值
"A049": {},//新增门店数
"A050": {},//累计门店数
"A045": {},//展业门店数
"A051": {},//累计展业门店数
"A052": {},//新展业门店数
"A053": {},//疑似流失门店数
"A054": { valueUnit: '%' },//展业门店流失率
"A055": {},//疑似流失新门店数
"A056": { valueUnit: '%' }//新展业门店流失率
} }
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="store-layout"> <div class="store-layout">
<div class="store-box"> <div
class="store-box"
v-loading="loading"
>
<template v-if="boardList.length">
<div class="board-box"> <div class="board-box">
<template v-for="(item,index) in boardList"> <template v-for="(item,index) in boardList">
<board-item <board-item
:key="index" :key="index"
class="board-item" class="board-item"
:item="item" :item="item"
:data="boardData" :data="item.data"
@click="openWindow(item)" @click="openWindow(item)"
/> >
<div class="board-tips">
<el-tooltip placement="top">
<div slot="content">{{item.definition}}</div>
<div class="board-tips-icon">?</div>
</el-tooltip>
</div>
</board-item>
</template>
</div>
</template> </template>
<template v-else>
<div class="no-data">
暂无数据
</div> </div>
</template>
</div> </div>
<div class="store-chart"> <div class="store-chart">
...@@ -40,6 +57,7 @@ import Funnel from './Funnel' ...@@ -40,6 +57,7 @@ import Funnel from './Funnel'
import LineChart from './LineChart' import LineChart from './LineChart'
import { getMerchantBaseDetail, getBoardList } from '@/api/earlyWarningManager' import { getMerchantBaseDetail, getBoardList } from '@/api/earlyWarningManager'
import onShowMixin from '../onShowMixin' import onShowMixin from '../onShowMixin'
import { KPI_DATA } from '../../kpiConfig.js'
export default { export default {
mixins: [onShowMixin], mixins: [onShowMixin],
components: { components: {
...@@ -54,7 +72,7 @@ export default { ...@@ -54,7 +72,7 @@ export default {
outputTrend: [] outputTrend: []
}, },
boardList: [], boardList: [],
loading: false
} }
}, },
watch: { watch: {
...@@ -78,6 +96,7 @@ export default { ...@@ -78,6 +96,7 @@ export default {
}, },
methods: { methods: {
async getData () { async getData () {
this.getBoardList()
const { merchantId, businessType } = this.pageData, const { merchantId, businessType } = this.pageData,
{ searchTime } = this { searchTime } = this
const res = await getMerchantBaseDetail({ const res = await getMerchantBaseDetail({
...@@ -89,9 +108,10 @@ export default { ...@@ -89,9 +108,10 @@ export default {
if (res[key] == null) res[key] = '-' if (res[key] == null) res[key] = '-'
}) })
this.boardData = res this.boardData = res
this.getBoardList()
}, },
async getBoardList () { async getBoardList () {
try {
this.loading = true
this.boardList = this.$options.data.call(this).boardList this.boardList = this.$options.data.call(this).boardList
let { merchantId, merchantName, businessType } = this.pageData, let { merchantId, merchantName, businessType } = this.pageData,
{ searchTime: { startDate, endDate } } = this { searchTime: { startDate, endDate } } = this
...@@ -105,17 +125,23 @@ export default { ...@@ -105,17 +125,23 @@ export default {
res.map(e => { res.map(e => {
this.boardList.push({ this.boardList.push({
componentName: 'boardDetail', componentName: 'boardDetail',
pageId: `board-${e.code}`, pageId: `board-${merchantId}-${e.code}`,
tabTitle: `${e.name}(${merchantName})`, tabTitle: `${e.name}(${merchantName})`,
definition: e.definition, definition: e.definition,
merchantId,
code: e.code, code: e.code,
name: e.name, name: e.name,
businessType, businessType,
data: e, data: e,
value: 'value', value: 'value',
percent: 'ratio' percent: 'ratio',
...KPI_DATA[e.code]
}) })
}) })
this.loading = false
} catch (error) {
this.loading = false
}
}, },
openWindow (e) { openWindow (e) {
this.$emit('openWindow', e) this.$emit('openWindow', e)
...@@ -132,10 +158,11 @@ export default { ...@@ -132,10 +158,11 @@ export default {
border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
margin-bottom: 16px; margin-bottom: 16px;
padding-top: 54px; padding-top: 54px;
min-height: 200px;
.board-box { .board-box {
display: grid; display: grid;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 0 16px; gap: 16px;
padding: 0 20px 20px; padding: 0 20px 20px;
.board-item { .board-item {
cursor: pointer; cursor: pointer;
...@@ -143,6 +170,32 @@ export default { ...@@ -143,6 +170,32 @@ export default {
border-radius: 4px; border-radius: 4px;
background: #f8faff; background: #f8faff;
} }
.board-tips {
position: absolute;
top: 20px;
right: 20px;
&-icon {
width: 14px;
height: 14px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #999;
color: #999;
border-radius: 100%;
font-size: 10px;
font-weight: 500;
}
}
}
.no-data {
background: white;
padding: 20px 0;
min-height: 60px;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
} }
} }
.store-chart { .store-chart {
......
...@@ -166,7 +166,6 @@ export default { ...@@ -166,7 +166,6 @@ export default {
const res = await getShopGuardIndexBoard(params) const res = await getShopGuardIndexBoard(params)
Object.keys(res).map(key => { Object.keys(res).map(key => {
if (res[key] != null) { if (res[key] != null) {
if (key == 'outputCompletionProgress' || key == 'grossProfitMargin') res[key] = res[key] + '%'
if (key == 'budget') res[key] = '¥' + res[key].toLocaleString() if (key == 'budget') res[key] = '¥' + res[key].toLocaleString()
} else res[key] = '-' } else res[key] = '-'
}) })
......
...@@ -3,12 +3,8 @@ ...@@ -3,12 +3,8 @@
class="item" class="item"
@click="$emit('click')" @click="$emit('click')"
> >
<div class="name">{{item.name}} <div class="name">{{formattedName(item)}}</div>
<template v-if="item.unit">{{item.unit}}</template> <div class="value">{{formattedValue(data[item.value],item.valueUnit)}}</div>
</div>
<div class="value">
{{formattedValue(data[item.value])}}
</div>
<div :class="['percent',`${percentColor(data[item.percent])}`]"> <div :class="['percent',`${percentColor(data[item.percent])}`]">
环比<div class="percent-value">{{data[item.percent] != null ? formatted(data[item.percent]) : '-'}}</div> 环比<div class="percent-value">{{data[item.percent] != null ? formatted(data[item.percent]) : '-'}}</div>
<template v-if="data[item.percent] != null && data[item.percent] != '-'"> <template v-if="data[item.percent] != null && data[item.percent] != '-'">
...@@ -68,10 +64,18 @@ export default { ...@@ -68,10 +64,18 @@ export default {
return '' return ''
} }
}, },
formattedValue (num) { formattedValue (num, unit) {
if (num != null) num = num.toLocaleString() if (num != null) {
num = num.toLocaleString()
if (unit) num = `${num}%`
}
else num = '-' else num = '-'
return num return num
},
formattedName (item) {
let name = item.name
if (item.unit) name = `${name}${item.unit}`
return name
} }
}, },
......
...@@ -148,7 +148,6 @@ export default { ...@@ -148,7 +148,6 @@ export default {
this.financialObj.goodsTypeGroupRules[this.editableTabsValue] this.financialObj.goodsTypeGroupRules[this.editableTabsValue]
.expenseCategoryRules .expenseCategoryRules
) )
console.log(filterObj)
const obj = { const obj = {
trafficSide: filterObj trafficSide: filterObj
} }
...@@ -315,9 +314,8 @@ export default { ...@@ -315,9 +314,8 @@ export default {
item.expenseCategoryTypeRules item.expenseCategoryTypeRules
) )
}) })
this.financialObj = data
this.initSettleTimeObj() this.initSettleTimeObj()
console.log(this.financialObj, 76666) console.log(this.financialObj, 555555555)
}, },
initSettleTimeObj() { initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj const { settleTimeType, settleTime } = this.financialObj
......
...@@ -3,15 +3,17 @@ ...@@ -3,15 +3,17 @@
<div class=""> <div class="">
<glsx-combi-form class="edit-form-container" ref="addFormRef" :isBlock="isBlock" label-width="150px" default-width="400px" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules"> <glsx-combi-form class="edit-form-container" ref="addFormRef" :isBlock="isBlock" label-width="150px" default-width="400px" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<ProvinceCity slot="provinceCity" ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity> <ProvinceCity slot="provinceCity" ref="provinceForm" :subdistrict="subdistrict" @selectProvince="selectProvince" @selectCity="selectCity" :detailAddressLabel="detailAddressLabel" @selectAddressByMap="selectAddressByMap"></ProvinceCity>
<select-brand slot="selectBrand" :brandListTree="brandListTree" @clickBrand="clickBrand" ref="brandListTree"></select-brand> <select-brand slot="selectBrand" ref="brandListTree" :brandListTree="brandListTree" @clickBrand="clickBrand"></select-brand>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import { deepClone } from '@/common/util'
import SelectBrand from '@/components/SelectBrand/index.vue' import SelectBrand from '@/components/SelectBrand/index.vue'
import ProvinceCity from '@/components/province-city/index.vue' import ProvinceCity from '@/components/province-city/index.vue'
import { brandList, getMerchantType } from "@api/shelfManage"
export default { export default {
name: 'AddMerchant', name: 'AddMerchant',
components: { components: {
...@@ -37,23 +39,21 @@ export default { ...@@ -37,23 +39,21 @@ export default {
formRules: {}, formRules: {},
editData: {}, editData: {},
editFormData: [{ editFormData: [{
name: '', name: 'accounttypeId',
label: '商户类型', label: '商户类型',
type: 'radio', type: 'radio',
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'merchantList', optionsName: 'merchantTypeList',
optionList: [], optionList: [],
// isDisabled: false,
// style: { width: '520px' },
handleRadioChange: () => { } handleRadioChange: () => { }
}, { }, {
label: "账户等级", label: "账户等级",
name: '', name: 'merchantAccountLevel',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'dictValue',
optionLabel: 'confLabel', optionLabel: 'dictLabel',
optionsName: 'accountLevelList' optionsName: 'accountLevelList'
}, { }, {
label: "上级商户", label: "上级商户",
...@@ -65,12 +65,12 @@ export default { ...@@ -65,12 +65,12 @@ export default {
optionsName: 'parentMerchantList' optionsName: 'parentMerchantList'
}, { }, {
label: "渠道", label: "渠道",
name: '', name: 'channelId',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'dictValue',
optionLabel: 'confLabel', optionLabel: 'dictLabel',
optionsName: '' optionsName: 'channelList'
}, { }, {
label: "选择开通模式", label: "选择开通模式",
name: '', name: '',
...@@ -81,12 +81,12 @@ export default { ...@@ -81,12 +81,12 @@ export default {
optionsName: '' optionsName: ''
}, { }, {
label: '商户名称', label: '商户名称',
name: '', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 50 maxlength: 50
}, { }, {
label: '联系电话', label: '联系电话',
name: '', name: 'merchantLegalPersonPhone',
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
}, { }, {
...@@ -99,27 +99,92 @@ export default { ...@@ -99,27 +99,92 @@ export default {
addHtml: 'selectBrand' addHtml: 'selectBrand'
}, { }, {
label: '登录账号', label: '登录账号',
name: '', name: 'merchantLoginAccount',
type: 'input', type: 'input',
maxlength: 15 maxlength: 15
}, { }, {
label: '登录密码', label: '登录密码',
name: '', name: 'merchantLoginPassword',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20
}], }],
baseData: { baseData: {
merchantList: [], merchantTypeList: [],
accountLevelList: [], accountLevelList: [],
channelList: [],
parentMerchantList: [] parentMerchantList: []
} }
} }
}, },
mounted() {
setTimeout(() => {
this.brandList()
}, 200)
this.getMerchantType()
this.getAccountLevel()
this.getChannel()
},
//方法集合 //方法集合
methods: { methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleClose() { handleClose() {
this.$emit('handleClose') this.$emit('handleClose')
}, },
getMerchantType() {
const params = { dictType: 'account_type' }
getMerchantType(params).then(res => {
const list = ['4S店', '园区店', '服务商']
this.baseData.merchantTypeList = []
list.forEach((item) => {
let obj = res.find(k => k.dictLabel == item)
if(obj) {
this.baseData.merchantTypeList.push({
confId: obj.dictValue,
confLabel: obj.dictLabel
})
}
})
this.editFormData[0].optionList = this.baseData.merchantTypeList
})
},
getAccountLevel() {
const params = { dictType: 'account_level' }
getMerchantType(params).then(res => {
this.baseData.accountLevelList = res
this.getOptionsList('editFormData', false, 'merchantAccountLevel')
})
},
getChannel() {
const params = { dictType: 'channel' }
getMerchantType(params).then(res => {
this.baseData.channelList = res
this.getOptionsList('editFormData', false, 'channelId')
})
},
checkBrandList() { checkBrandList() {
// let merchantBrandMain = chant.filter(item => item) // let merchantBrandMain = chant.filter(item => item)
// this.$set(this.editData, 'merchantBrandMain', merchantBrandMain) // this.$set(this.editData, 'merchantBrandMain', merchantBrandMain)
...@@ -129,9 +194,11 @@ export default { ...@@ -129,9 +194,11 @@ export default {
this.brandList() this.brandList()
// this.$refs.brandListTree.getCheckList(this.editData.merchantBrandMain) // this.$refs.brandListTree.getCheckList(this.editData.merchantBrandMain)
}, },
async brandList() { brandList() {
this.$refs.brandListTree.loading = true this.$refs.brandListTree.loading = true
const brandListTree = await this.$apis.baseInfo.brandList({}) // const brandListTree = await brandList({})
brandList({}).then(res => {
const brandListTree = res
brandListTree.forEach(item => { brandListTree.forEach(item => {
let child = item.children let child = item.children
if (!child) return if (!child) return
...@@ -144,6 +211,8 @@ export default { ...@@ -144,6 +211,8 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.brandListTree.loading = false this.$refs.brandListTree.loading = false
}) })
})
}, },
// 点击主营品牌 // 点击主营品牌
clickBrand(val) { clickBrand(val) {
......
...@@ -490,11 +490,16 @@ export default { ...@@ -490,11 +490,16 @@ export default {
Promise.all(eventArr).then(() => { Promise.all(eventArr).then(() => {
this.checkSelectEmpty() this.checkSelectEmpty()
}) })
//平台方
this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{ this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{
console.log(obj)
this.financialObj.realityPlatformMerchantId=obj.merchantId this.financialObj.realityPlatformMerchantId=obj.merchantId
this.financialObj.realityPlatformMerchantName=obj.merchantName this.financialObj.realityPlatformMerchantName=obj.merchantName
}) })
//服务商
this.$EventBus.$on('shelfUpdateParMer', (obj)=>{
})
}, },
methods: { methods: {
...mapActions("FinancialRules", ["reset"]), ...mapActions("FinancialRules", ["reset"]),
...@@ -864,7 +869,8 @@ export default { ...@@ -864,7 +869,8 @@ export default {
this.editableTabs this.editableTabs
) )
if (!this.checkParamsType(res, goodsTypeGroupRules)) { if (!this.checkParamsType(res, goodsTypeGroupRules)) {
return this.$message.warning("请完善分账规则") this.$message.warning("请完善分账规则")
return false
} }
try { try {
this.submitParams = { this.submitParams = {
...@@ -874,6 +880,7 @@ export default { ...@@ -874,6 +880,7 @@ export default {
this.checkCalculateType() this.checkCalculateType()
this.verificationCodeVisible = true this.verificationCodeVisible = true
console.log(this.submitParams, "this.submitParams ") console.log(this.submitParams, "this.submitParams ")
return true
} catch (error) {} } catch (error) {}
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验 // if (!res || !goodsTypeGroupRules) return false // 没有通过检验
}, },
......
...@@ -892,7 +892,8 @@ export default { ...@@ -892,7 +892,8 @@ export default {
async submit() { async submit() {
let res = await this.verifyFormData() let res = await this.verifyFormData()
if (!this.checkParamsType(res)) { if (!this.checkParamsType(res)) {
return this.$message.error("请完善对账规则") this.$message.error("请完善对账规则")
return false
} }
// 检验已经通过了 // 检验已经通过了
this.errorIndex = -1 this.errorIndex = -1
...@@ -914,7 +915,7 @@ export default { ...@@ -914,7 +915,7 @@ export default {
partnerMerchantExpenseCategoryValue partnerMerchantExpenseCategoryValue
} }
this.submitParams=params this.submitParams=params
console.log( this.submitParams) return true
}, },
// 校验所有form数据 // 校验所有form数据
async verifyFormData() { async verifyFormData() {
......
...@@ -1044,7 +1044,6 @@ export default { ...@@ -1044,7 +1044,6 @@ export default {
}, },
// 查询4s店及上级列表 参数 channelType=1(流量方对象) // 查询4s店及上级列表 参数 channelType=1(流量方对象)
async getMerchantLevelList() { async getMerchantLevelList() {
console.log( this.merchantRow)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const that = this const that = this
const localRes = localStorage.getItem("getMerchantLevelList") const localRes = localStorage.getItem("getMerchantLevelList")
...@@ -1364,12 +1363,13 @@ export default { ...@@ -1364,12 +1363,13 @@ export default {
}, },
// 对账item的详情 更新和初始化 classificationObj // 对账item的详情 更新和初始化 classificationObj
getEffectRule() { getEffectRule() {
let promiseArr = [ // let promiseArr = [
this.getListPartnerMerchant(), // this.getListPartnerMerchant(),
this.getMerchantLevelList(), // // this.getMerchantLevelList(),
this.getListPlatformMerchant() // // this.getListPlatformMerchant()
] // ]
Promise.all(promiseArr).then(() => { // Promise.all(promiseArr).then(() => {
this.$nextTick(()=>{
const res = deepClone(this.goodsTypeGroupReconciliationRules) const res = deepClone(this.goodsTypeGroupReconciliationRules)
const that = this const that = this
// 赋值 // 赋值
...@@ -1407,6 +1407,8 @@ export default { ...@@ -1407,6 +1407,8 @@ export default {
} }
this.forceUpdate() this.forceUpdate()
}) })
// })
}, },
// 换成后端数据结构 // 换成后端数据结构
getBackendFormat() { getBackendFormat() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44 * @Date: 2025-02-24 21:48:44
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-02-25 17:57:05 * @LastEditTime: 2025-02-27 17:02:40
* @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue * @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info ref="shopMerchant" :editData="merchantEditData" @addMerchant="handleAddMerchant"></shop-merchant-info> <shop-merchant-info ref="shopMerchant" :editData="merchantEditData" @addMerchant="handleAddMerchant"></shop-merchant-info>
<!-- 流量方信息 - 新增 - 新增商户 --> <!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant :addMerVisible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant> <add-merchant v-if="addMerVisible" :addMerVisible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
<goods-info></goods-info> <goods-info></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -72,8 +72,8 @@ export default { ...@@ -72,8 +72,8 @@ export default {
}, },
mounted() { mounted() {
this.routeObj = this.$route.params this.routeObj = this.$route.params
this.isLoad = true
this.getBasicDetail() this.getBasicDetail()
this.getDetail()
}, },
//方法集合 //方法集合
methods: { methods: {
...@@ -85,10 +85,9 @@ export default { ...@@ -85,10 +85,9 @@ export default {
console.log(res, 'res----') console.log(res, 'res----')
this.basicInfo = res.basicInfo || {} this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {} this.merchantEditData = res.createBusinessApproveMerchant || {}
}) }).finally(() => {
},
getDetail() {
this.isLoad = false this.isLoad = false
})
}, },
handleAddMerchant() { handleAddMerchant() {
console.log('新建---') console.log('新建---')
......
...@@ -127,16 +127,17 @@ ...@@ -127,16 +127,17 @@
> >
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="退款类型:" class="halfItem"> <el-form-item label="退款类型:" class="halfItem">
{{ detailInfo.status }} {{ detailInfo.refundType?detailInfo.refundType==1?'全部退款':'部分退款':'-' }}
</el-form-item></el-col </el-form-item></el-col
> >
<el-col :span="8"> <el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="订单总积分:" class="halfItem"> <el-form-item label="订单总积分:" class="halfItem">
{{ detailInfo.status }} {{ detailInfo.addScore? detailInfo.addScore:'-' }}
</el-form-item></el-col </el-form-item>
</el-col
> >
</el-row> </el-row>
</el-form> </el-form>
...@@ -165,15 +166,15 @@ ...@@ -165,15 +166,15 @@
</div> </div>
<div v-else class="empty">暂无记录</div> <div v-else class="empty">暂无记录</div>
</div> </div>
<div class="examine-record"> <div class="examine-record" v-if="detailInfo.status == '已审核'">
<div class="title">操作记录</div> <div class="title">操作记录</div>
<div <div
class="record-div" class="record-div"
v-if="detailInfo.operationList && detailInfo.operationList.length > 0" v-if="operationList && operationList.length > 0"
> >
<div <div
class="record-div-d" class="record-div-d"
v-for="(item, index) in detailInfo.operationList" v-for="(item, index) in operationList"
:key="index" :key="index"
> >
<div class="div-operator">操作人:{{ item.operator }}</div> <div class="div-operator">操作人:{{ item.operator }}</div>
...@@ -209,7 +210,7 @@ ...@@ -209,7 +210,7 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { getPointDetail } from "@api/point" import { getPointDetail ,getOperationRecord,getOrderByScore} from "@api/point"
export default { export default {
name: "DetailDialog", name: "DetailDialog",
props: { props: {
...@@ -255,6 +256,7 @@ export default { ...@@ -255,6 +256,7 @@ export default {
}, },
detailInfo: {}, detailInfo: {},
operationList:[],
loading: false, loading: false,
imgVisible: false, imgVisible: false,
photoList: [], photoList: [],
...@@ -284,11 +286,32 @@ export default { ...@@ -284,11 +286,32 @@ export default {
: "错单" : "错单"
: "--" : "--"
this.detailInfo = res this.detailInfo = res
this.getScore()
this.getOrderOperateData()
this.photoList = res.attachments ? res.attachments.split(",") : [] this.photoList = res.attachments ? res.attachments.split(",") : []
} }
}) })
}, },
getScore() {
getOrderByScore({
orderCode: this.detailInfo.orderCode
}).then((res) => {
console.log(res)
this.detailInfo.addScore = res.addScore
this.$set(this.detailInfo,'addScore',res.addScore)
console.log(this.detailInfo)
})
},
getOrderOperateData(){
let params={
orderCode:this.detailInfo.orderCode,
operationType:1
}
getOperationRecord(params).then(res=>{
console.log(res)
this.operationList=res
})
},
handleEnlargeImg(url) { handleEnlargeImg(url) {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
this.imgList = url this.imgList = url
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
> >
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- <el-button type="primary" size="mini" @click="handleExport">
导出
</el-button> -->
<div> <div>
<span style="margin-right: 10px" <span style="margin-right: 10px"
><auth-button category="Button" :show-btn-ids="['9140105']" ><auth-button category="Button" :show-btn-ids="['9140105']"
...@@ -67,11 +64,14 @@ ...@@ -67,11 +64,14 @@
:show-btn-ids="['9140101']" :show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1" v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/> />
<!-- v-if=" <auth-button
v-if="
scope.scope.status == 1 && scope.scope.status == 1 &&
scope.scope.pointsRefundAvailable == 'Y' scope.scope.pointsRefundAvailable == 'Y'
" --> "
<auth-button :data="scope.scope" :show-btn-ids="['9140104']" /> :data="scope.scope"
:show-btn-ids="['9140104']"
/>
</span> </span>
</div> </div>
</d2-table> </d2-table>
...@@ -116,7 +116,10 @@ import { ...@@ -116,7 +116,10 @@ import {
getShopMerchantList, getShopMerchantList,
pointCheck, pointCheck,
exportFile, exportFile,
markAsRefunded markAsRefunded,
refreshData,
getOrderByScore,
getOperationRecord
} from "@api/point" } from "@api/point"
export default { export default {
name: "PointList", name: "PointList",
...@@ -140,7 +143,7 @@ export default { ...@@ -140,7 +143,7 @@ export default {
} }
return { return {
show: true, show: true,
handleFormRef: 'handleFormRef', handleFormRef: "handleFormRef",
refundVisible: false, refundVisible: false,
activeName: "4", activeName: "4",
tabPaneList: [ tabPaneList: [
...@@ -162,7 +165,7 @@ export default { ...@@ -162,7 +165,7 @@ export default {
}, },
{ {
label: "未兑换", label: "未兑换",
name: "3" name: "-1"
} }
], ],
statusEnum: { statusEnum: {
...@@ -610,16 +613,32 @@ export default { ...@@ -610,16 +613,32 @@ export default {
//标记退款 //标记退款
handleRefund(data) { handleRefund(data) {
this.refundVisible = true this.refundVisible = true
this.refundForm.id = data.id
this.refundForm.orderCode = data.orderCode this.refundForm.orderCode = data.orderCode
this.refundForm.integralIncome = data.integralIncome //当前积分能抵扣的最大值
this.getScore()
//
// this.refundForm.refundPoints = 10000
//
// if(data.operator==true){
// //对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
// this.refundFormData[0].optionList[0].isDisabled=true
// }
// this.updateDisable()
},
getScore() {
getOrderByScore({
orderCode: this.refundForm.orderCode
}).then((res) => {
this.refundForm.refundPoints = res.addScore //最大积分
this.refundForm.maXPoints = res.addScore //最大积分
if (this.refundForm.refundPoints == this.refundForm.integralIncome) {
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退), this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundForm.refundPoints = 10000 } else {
this.refundForm.maXPoints =10000 this.refundForm.refundType = 2
if(data.operator==true){ this.refundFormData[0].optionList[0].isDisabled = true
//对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
this.refundFormData[0].optionList[0].isDisabled=true
} }
this.updateDisable() this.updateDisable()
})
}, },
updateDisable() { updateDisable() {
let disabled = this.refundForm.refundType == 2 ? false : true let disabled = this.refundForm.refundType == 2 ? false : true
...@@ -637,8 +656,8 @@ export default { ...@@ -637,8 +656,8 @@ export default {
if (valid) { if (valid) {
markAsRefunded({ markAsRefunded({
orderCode: this.refundForm.orderCode, orderCode: this.refundForm.orderCode,
refundType:this.refundForm.refundType, refundType: this.refundForm.refundType,
refundPoints:this.refundForm.refundPoints refundPoints: this.refundForm.refundPoints
}).then((res) => { }).then((res) => {
if (res) { if (res) {
this.$message.success("退款成功!") this.$message.success("退款成功!")
...@@ -652,21 +671,23 @@ export default { ...@@ -652,21 +671,23 @@ export default {
}, },
//刷新 //刷新
handleRefresh() { handleRefresh() {
let params = {
...this.searchFormSearch,
...this.$refs.pointTable.page
}
this.$confirm("确定需要刷新并同步订单信息", "", { this.$confirm("确定需要刷新并同步订单信息", "", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
callback: (action) => { callback: (action) => {
// if (action == "confirm") { if (action == "confirm") {
// markAsRefunded({ refreshData(params).then((res) => {
// orderCode: data.orderCode if (res) {
// }).then((res) => { this.$message.success("订单信息已同步完成!")
// if (res) { this.handleSearch()
// this.$message.success("订单信息已同步完成!") }
// this.handleSearch() })
// } }
// })
// }
} }
}) })
}, },
......
...@@ -50,8 +50,9 @@ export default { ...@@ -50,8 +50,9 @@ export default {
staffName: "", staffName: "",
staffPhone: "", staffPhone: "",
merchantId: "", merchantId: "",
withdrawalTime:[], rewardTime:[],
rewardTime:[] reviewTime:[],
successTime:[]
}, },
searchFormSearch:{ searchFormSearch:{
...@@ -95,14 +96,14 @@ export default { ...@@ -95,14 +96,14 @@ export default {
// }, // },
{ {
label: "积分付款时间", label: "积分付款时间",
name: "rewardTime", name: "reviewTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
}, },
{ {
label: "积分到账时间", label: "积分到账时间",
name: "withdrawalTime", name: "successTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
...@@ -212,20 +213,33 @@ export default { ...@@ -212,20 +213,33 @@ export default {
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 23:59:59" ) + " 23:59:59"
} }
if (this.searchFormSearch.withdrawalTime&&this.searchFormSearch.withdrawalTime.length) { if (this.searchFormSearch.reviewTime&&this.searchFormSearch.reviewTime.length) {
this.searchFormSearch.reviewBeginTime =
Util.dateFormate(
this.searchFormSearch.reviewTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.reviewEndTime =
Util.dateFormate(
this.searchFormSearch.reviewTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
if (this.searchFormSearch.successTime&&this.searchFormSearch.successTime.length) {
this.searchFormSearch.withdrawalBeginTime = this.searchFormSearch.withdrawalBeginTime =
Util.dateFormate( Util.dateFormate(
this.searchFormSearch.withdrawalTime[0], this.searchFormSearch.successBeginTime[0],
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 00:00:00" ) + " 00:00:00"
this.searchFormSearch.withdrawalEndTime = this.searchFormSearch.withdrawalEndTime =
Util.dateFormate( Util.dateFormate(
this.searchFormSearch.withdrawalTime[1], this.searchFormSearch.successEndTime[1],
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 23:59:59" ) + " 23:59:59"
} }
delete this.searchFormSearch.rewardTime delete this.searchFormSearch.rewardTime
delete this.searchFormSearch.withdrawalTime delete this.searchFormSearch.successTime
delete this.searchFormSearch.reviewTime
resolve() resolve()
}) })
}, },
...@@ -237,8 +251,9 @@ export default { ...@@ -237,8 +251,9 @@ export default {
staffName: "", staffName: "",
staffPhone: "", staffPhone: "",
merchantId: "", merchantId: "",
withdrawalTime:[], rewardTime:[],
rewardTime:[] reviewTime:[],
successTime:[]
} }
this.searchFormSearch={} this.searchFormSearch={}
this.$refs.pointTable.refreshTable(true, true) this.$refs.pointTable.refreshTable(true, true)
......
...@@ -207,7 +207,10 @@ ...@@ -207,7 +207,10 @@
</div> </div>
<div class="info-item-block block-line" style="height: 100%;display: flex;align-items: start;"> <div class="info-item-block block-line" style="height: 100%;display: flex;align-items: start;">
<label class="label">调店分配:</label> <label class="label">调店分配:</label>
<div class="store-allocation"> <div v-if="!$$(detail.staffDailyReportConfigList, 'length')">
<el-button size="small" plain @click="addStorConfig">添加配置</el-button>
</div>
<div class="store-allocation" v-else>
<div v-for="(item, index) in detail.staffDailyReportConfigList" :key="index" > <div v-for="(item, index) in detail.staffDailyReportConfigList" :key="index" >
<el-form-item label="" style="display: inline-block;" :prop="`staffDailyReportConfigList[${index}].startEffectiveTime`"> <el-form-item label="" style="display: inline-block;" :prop="`staffDailyReportConfigList[${index}].startEffectiveTime`">
<el-date-picker v-model="detail.staffDailyReportConfigList[index].startEffectiveTime" <el-date-picker v-model="detail.staffDailyReportConfigList[index].startEffectiveTime"
...@@ -254,7 +257,7 @@ ...@@ -254,7 +257,7 @@
</el-select> </el-select>
<el-input v-else class="select-store" disabled v-model="detail.staffDailyReportConfigList[index].merchantName"></el-input> <el-input v-else class="select-store" disabled v-model="detail.staffDailyReportConfigList[index].merchantName"></el-input>
</el-form-item> </el-form-item>
<el-button type="text" class="text" v-if="detail.staffDailyReportConfigList.length > 1" @click="deletStorConfig(index)">删除</el-button> <el-button type="text" class="text" @click="deletStorConfig(index)">删除</el-button>
<el-button type="text" class="text" v-if="index == (detail.staffDailyReportConfigList.length - 1)" @click="addStorConfig">添加一行</el-button> <el-button type="text" class="text" v-if="index == (detail.staffDailyReportConfigList.length - 1)" @click="addStorConfig">添加一行</el-button>
<el-button type="text" class="text" @click="targetConfigConfirm(index)">确定</el-button> <el-button type="text" class="text" @click="targetConfigConfirm(index)">确定</el-button>
<div class="change-log" style="margin: 0 0 15px;align-items: center;" v-if="detail.staffDailyReportConfigList[index].salaryCalculateStartTime && detail.staffDailyReportConfigList[index].salaryCalculateEndTime"> <div class="change-log" style="margin: 0 0 15px;align-items: center;" v-if="detail.staffDailyReportConfigList[index].salaryCalculateStartTime && detail.staffDailyReportConfigList[index].salaryCalculateEndTime">
...@@ -486,15 +489,7 @@ export default { ...@@ -486,15 +489,7 @@ export default {
v.currentlyFlag = true v.currentlyFlag = true
} }
}) })
const obj = { res.staffDailyReportConfigList = res.staffDailyReportConfigList || []
startEffectiveTime: '',
endEffectiveTime: '',
currentlyFlag: false,
yqMerchantId: '',
merchantId: '',
targetMerchantList: []
}
res.staffDailyReportConfigList = res?.staffDailyReportConfigList?.length ? res.staffDailyReportConfigList : [obj]
} }
this.detail = res || {} this.detail = res || {}
this.tableData = res?.accountRecordList || [] this.tableData = res?.accountRecordList || []
......
...@@ -189,10 +189,17 @@ export default { ...@@ -189,10 +189,17 @@ export default {
}) })
}, },
del(index) { del(index) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.infoData.campusList.splice(index, 1) this.infoData.campusList.splice(index, 1)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['configForm'].clearValidate() this.$refs['configForm'].clearValidate()
}) })
}).catch(() => {
})
}, },
handleInput(e, key, scope) { handleInput(e, key, scope) {
e = e.replace(/[^\d.]/g, '') e = e.replace(/[^\d.]/g, '')
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
:search-form="searchForm" :search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn">
<template slot="brand" slot-scope="scope"> <template slot="brand" slot-scope="scope">
<template v-if="scope.scope.brand && scope.scope.brand.length > 20"> <template v-if="scope.scope.brand && scope.scope.brand.length > 20">
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
...@@ -273,6 +274,13 @@ export default { ...@@ -273,6 +274,13 @@ export default {
resolve() resolve()
}) })
}, },
selectableFn(row) {
var isSelect = true
if (row.minPerformConfigStatus == 2 || !row.minPerformConfigStatus) { // 无配置方案或已禁用的不可勾选
isSelect = false
}
return isSelect
},
brandFilter(ele, lenght) { brandFilter(ele, lenght) {
if (ele.brand) { if (ele.brand) {
return lenght ? (ele.brand?.length > lenght ? ele.brand.substring(0, lenght) + '\u2026' : ele.brand.substring(0, lenght)) : ele.brand return lenght ? (ele.brand?.length > lenght ? ele.brand.substring(0, lenght) + '\u2026' : ele.brand.substring(0, lenght)) : ele.brand
......
...@@ -323,12 +323,19 @@ export default { ...@@ -323,12 +323,19 @@ export default {
// 删除 // 删除
handleDelete(item, index) { handleDelete(item, index) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = this.configInfo const data = this.configInfo
data[item + 'List']?.splice(index, 1) data[item + 'List']?.splice(index, 1)
this.$set(this.configInfo, item + 'List', data[item + 'List']) this.$set(this.configInfo, item + 'List', data[item + 'List'])
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['editFormRef'].$refs['editChildRef'].clearValidate() this.$refs['editFormRef'].$refs['editChildRef'].clearValidate()
}) })
}).catch(() => {
})
}, },
// 自定义校验区间结束值 // 自定义校验区间结束值
checkEndValue(row) { checkEndValue(row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!