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 648 additions and 233 deletions
......@@ -254,3 +254,13 @@ export function updateOneKpiMetric (data) {
data.method = 'dj.riskmanage.api.kpiMetric.updateOneKpiMetri'
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)
}
......@@ -78,4 +78,25 @@ export function deductOrderPage(data) {
export function cancelDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`
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
......@@ -52,3 +52,15 @@ export function getBusisDetailBasic(data) {
data.method = `dj.api.create.business.approve.detail.basic`
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 @@
<script type='text/ecmascript-6'>
import SearchBox from '../SearchBox'
import * as echarts from 'echarts'
import { getMerchantOutputDetail, getBoardDetail } from '@api/earlyWarningManager'
import { getBoardDetail } from '@api/earlyWarningManager'
import dayjs from 'dayjs'
import { tooltipConfig, xAxisConfig, dataZoomSliderConfig } from '../chartConfig'
import { KPI_DATA } from '../kpiConfig.js'
export default {
components: {
SearchBox
......@@ -84,17 +84,18 @@ export default {
startDate,
dateType,
endDate,
code: 'A048'
code
})
this.drawChart(res)
},
drawChart (list) {
this.chart.clear()
let { pageData: { name } } = this,
let { pageData: { name, code } } = this,
_this = this,
{ allYear, dateType } = this.searchTime,
timeList = [],
data = []
data = [],
unit = KPI_DATA[code]?.valueUnit ? KPI_DATA[code].valueUnit : ''
list.map(e => {
let { startDate, endDate } = e,
axisLabel = dayjs(startDate).format("YYYY-MM-DD"),
......@@ -116,7 +117,7 @@ export default {
if (dateType == 1) title = axisValue
return `${title}<br>
<div class="tooltips">
<i class="circle"></i>${name}:${value?.toLocaleString() || 0}
<i class="circle"></i>${name}:${value?.toLocaleString() || 0}${unit}
</div>`;
}
},
......@@ -129,7 +130,20 @@ export default {
right: '60',
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: {
type: 'value',
boundaryGap: [0, '100%'],
......
<template>
<div class="data-list-box">
<div
class="data-list-box"
v-loading="loading"
>
<template v-if="boardList.length">
<div class="data-list">
......@@ -34,6 +37,7 @@
import onShowMixin from './onShowMixin'
import BoardItem from '../shopGuardIndex/BoardItem'
import { getBoardList } from '@api/earlyWarningManager'
import { KPI_DATA } from '../kpiConfig.js'
export default {
mixins: [onShowMixin],
......@@ -50,26 +54,33 @@ export default {
},
methods: {
async search () {
this.boardList = this.$options.data.call(this).boardList
let { businessType } = this.searchForm
const res = await getBoardList({
...this.searchForm,
scope: 1
})
res.map(e => {
this.boardList.push({
componentName: 'boardDetail',
pageId: `board-${e.code}`,
tabTitle: `${e.name}详情`,
definition: e.definition,
code: e.code,
name: e.name,
businessType,
data: e,
value: 'value',
percent: 'ratio'
try {
this.loading = true
this.boardList = this.$options.data.call(this).boardList
let { businessType } = this.searchForm
const res = await getBoardList({
...this.searchForm,
scope: 1
})
})
res.map(e => {
this.boardList.push({
componentName: 'boardDetail',
pageId: `board-${e.code}`,
tabTitle: `${e.name}详情`,
definition: e.definition,
code: e.code,
name: e.name,
businessType,
data: e,
value: 'value',
percent: 'ratio',
...KPI_DATA[e.code]
})
})
this.loading = false
} catch (error) {
this.loading = false
}
},
openWindow (e) {
console.log(e)
......
......@@ -63,12 +63,9 @@ export default {
businessScenarioList: [],
secondBrandIdList: [],
merchantRange: 1,
// merchantId: '',
merchantId: '',
},
// baseData: {
// storeIdList: [],
// },
showFormData: [
{
label: '归属业务',
......
......@@ -4,6 +4,7 @@
<el-button
size="small"
type="primary"
@click="handleExport"
>导出</el-button>
</div>
<d2-table
......@@ -13,13 +14,50 @@
:hasPage="false"
:has-num="false"
noDataText="暂无门店数据"
v-loading="loading"
@sortChange="sortChange"
>
<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-scope="scope"
>
<div class="sortableHtml">
{{scope.scope[scope.prop]}}
{{formatterValue(scope)}}
<div :class="['percent',`${percentColor(scope)}`]">
{{formattedPercent(scope)}}
</div>
</div>
</template>
<div
......@@ -37,8 +75,16 @@
<script type='text/ecmascript-6'>
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'
const RATIO_KEY = {
output: 'outputRatio',
orderNumber: 'orderNumberRatio',
customerUnitPrice: 'customerUnitPriceRatio',
penetrationRate: 'penetrationRateRatio',
touchConversionRate: 'touchConversionRateRatio',
}
export default {
mixins: [onShowMixin],
name: '',
......@@ -47,12 +93,8 @@ export default {
},
data () {
return {
tableTotal: 0,
page: {
pageSize: 10,
currentPage: 1
},
tableData: [],
originTableData: [],
// 表格参数
tableParams: {
tableOption: { width: '150px' },
......@@ -81,10 +123,9 @@ export default {
}
}, {
label: '督导',
width: 'supervisionList',
formatter (row) {
return "-"
}
minWidth: 150,
prop: 'supervisionNameList',
addHtml: 'popoverHtml'
}, {
label: '归属业务',
prop: 'businessType',
......@@ -98,10 +139,8 @@ export default {
}
}, {
label: '主营品牌',
prop: "brandList",
formatter (row) {
return
}
prop: "carBrandList",
addHtml: 'popoverHtml'
}, {
label: '业务性质',
prop: "businessScenario",
......@@ -119,7 +158,7 @@ export default {
width: '150',
prop: "output",
sortable: true,
addHtml: 'sortableHtml'
addHtml: 'sortableHtml',
}, {
label: '订单数',
width: '150',
......@@ -131,20 +170,20 @@ export default {
width: '130',
prop: "customerUnitPrice",
sortable: true,
addHtml: 'sortableHtml'
addHtml: 'sortableHtml',
}, {
label: '渗透率',
prop: "penetrationRate",
width: 130,
sortable: true,
addHtml: 'sortableHtml'
addHtml: 'sortableHtml',
},
{
label: '触客转化率',
prop: "touchConversionRate",
sortable: true,
width: 130,
addHtml: 'sortableHtml'
addHtml: 'sortableHtml',
}
]
},
......@@ -154,13 +193,35 @@ export default {
},
methods: {
async search () {
this.tableData = []
const res = await getBoardMerchantList({
...this.searchForm
})
console.log(res)
this.tableData = res
// this.tableTotal = total
try {
this.loading = true
this.tableData = []
this.originTableData = []
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
})
this.tableData = deepClone(res)
this.originTableData = deepClone(res)
this.loading = false
} catch (error) {
this.loading = false
}
},
handleDetail (e) {
this.$emit('openWindow', {
......@@ -172,9 +233,48 @@ export default {
merchantName: e.merchantName
})
},
pageChange (e) {
this.page = e
this.search()
handleExport () {
exportMerchantList(this.searchForm).then((res) => {
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 {
display: flex;
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>
\ No newline at end of file
......@@ -2,6 +2,7 @@ export default {
data () {
return {
initStatus: false,
loading:false
}
},
props: {
......
export const KpiList = {
'A014': {
}
export const KPI_DATA = {
"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
<template>
<div class="store-layout">
<div class="store-box">
<div class="board-box">
<template v-for="(item,index) in boardList">
<board-item
:key="index"
class="board-item"
:item="item"
:data="boardData"
@click="openWindow(item)"
/>
</template>
</div>
<div
class="store-box"
v-loading="loading"
>
<template v-if="boardList.length">
<div class="board-box">
<template v-for="(item,index) in boardList">
<board-item
:key="index"
class="board-item"
:item="item"
:data="item.data"
@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 v-else>
<div class="no-data">
暂无数据
</div>
</template>
</div>
<div class="store-chart">
......@@ -40,6 +57,7 @@ import Funnel from './Funnel'
import LineChart from './LineChart'
import { getMerchantBaseDetail, getBoardList } from '@/api/earlyWarningManager'
import onShowMixin from '../onShowMixin'
import { KPI_DATA } from '../../kpiConfig.js'
export default {
mixins: [onShowMixin],
components: {
......@@ -54,7 +72,7 @@ export default {
outputTrend: []
},
boardList: [],
loading: false
}
},
watch: {
......@@ -78,6 +96,7 @@ export default {
},
methods: {
async getData () {
this.getBoardList()
const { merchantId, businessType } = this.pageData,
{ searchTime } = this
const res = await getMerchantBaseDetail({
......@@ -89,33 +108,40 @@ export default {
if (res[key] == null) res[key] = '-'
})
this.boardData = res
this.getBoardList()
},
async getBoardList () {
this.boardList = this.$options.data.call(this).boardList
let { merchantId, merchantName, businessType } = this.pageData,
{ searchTime: { startDate, endDate } } = this
const res = await getBoardList({
businessType,
merchantId,
startDate,
endDate,
scope: 2
})
res.map(e => {
this.boardList.push({
componentName: 'boardDetail',
pageId: `board-${e.code}`,
tabTitle: `${e.name}(${merchantName})`,
definition: e.definition,
code: e.code,
name: e.name,
try {
this.loading = true
this.boardList = this.$options.data.call(this).boardList
let { merchantId, merchantName, businessType } = this.pageData,
{ searchTime: { startDate, endDate } } = this
const res = await getBoardList({
businessType,
data: e,
value: 'value',
percent: 'ratio'
merchantId,
startDate,
endDate,
scope: 2
})
})
res.map(e => {
this.boardList.push({
componentName: 'boardDetail',
pageId: `board-${merchantId}-${e.code}`,
tabTitle: `${e.name}(${merchantName})`,
definition: e.definition,
merchantId,
code: e.code,
name: e.name,
businessType,
data: e,
value: 'value',
percent: 'ratio',
...KPI_DATA[e.code]
})
})
this.loading = false
} catch (error) {
this.loading = false
}
},
openWindow (e) {
this.$emit('openWindow', e)
......@@ -132,10 +158,11 @@ export default {
border-radius: 0 0 4px 4px;
margin-bottom: 16px;
padding-top: 54px;
min-height: 200px;
.board-box {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 0 16px;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
padding: 0 20px 20px;
.board-item {
cursor: pointer;
......@@ -143,6 +170,32 @@ export default {
border-radius: 4px;
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 {
......
......@@ -166,7 +166,6 @@ export default {
const res = await getShopGuardIndexBoard(params)
Object.keys(res).map(key => {
if (res[key] != null) {
if (key == 'outputCompletionProgress' || key == 'grossProfitMargin') res[key] = res[key] + '%'
if (key == 'budget') res[key] = '¥' + res[key].toLocaleString()
} else res[key] = '-'
})
......
......@@ -3,12 +3,8 @@
class="item"
@click="$emit('click')"
>
<div class="name">{{item.name}}
<template v-if="item.unit">{{item.unit}}</template>
</div>
<div class="value">
{{formattedValue(data[item.value])}}
</div>
<div class="name">{{formattedName(item)}}</div>
<div class="value">{{formattedValue(data[item.value],item.valueUnit)}}</div>
<div :class="['percent',`${percentColor(data[item.percent])}`]">
环比<div class="percent-value">{{data[item.percent] != null ? formatted(data[item.percent]) : '-'}}</div>
<template v-if="data[item.percent] != null && data[item.percent] != '-'">
......@@ -68,10 +64,18 @@ export default {
return ''
}
},
formattedValue (num) {
if (num != null) num = num.toLocaleString()
formattedValue (num, unit) {
if (num != null) {
num = num.toLocaleString()
if (unit) num = `${num}%`
}
else num = '-'
return num
},
formattedName (item) {
let name = item.name
if (item.unit) name = `${name}${item.unit}`
return name
}
},
......
......@@ -148,7 +148,6 @@ export default {
this.financialObj.goodsTypeGroupRules[this.editableTabsValue]
.expenseCategoryRules
)
console.log(filterObj)
const obj = {
trafficSide: filterObj
}
......@@ -315,9 +314,8 @@ export default {
item.expenseCategoryTypeRules
)
})
this.financialObj = data
this.initSettleTimeObj()
console.log(this.financialObj, 76666)
console.log(this.financialObj, 555555555)
},
initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj
......
......@@ -3,15 +3,17 @@
<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">
<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>
</div>
</el-drawer>
</template>
<script>
import { deepClone } from '@/common/util'
import SelectBrand from '@/components/SelectBrand/index.vue'
import ProvinceCity from '@/components/province-city/index.vue'
import { brandList, getMerchantType } from "@api/shelfManage"
export default {
name: 'AddMerchant',
components: {
......@@ -37,23 +39,21 @@ export default {
formRules: {},
editData: {},
editFormData: [{
name: '',
name: 'accounttypeId',
label: '商户类型',
type: 'radio',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'merchantList',
optionsName: 'merchantTypeList',
optionList: [],
// isDisabled: false,
// style: { width: '520px' },
handleRadioChange: () => { }
}, {
label: "账户等级",
name: '',
name: 'merchantAccountLevel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'accountLevelList'
}, {
label: "上级商户",
......@@ -65,12 +65,12 @@ export default {
optionsName: 'parentMerchantList'
}, {
label: "渠道",
name: '',
name: 'channelId',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: ''
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'channelList'
}, {
label: "选择开通模式",
name: '',
......@@ -81,12 +81,12 @@ export default {
optionsName: ''
}, {
label: '商户名称',
name: '',
name: 'merchantName',
type: 'input',
maxlength: 50
}, {
label: '联系电话',
name: '',
name: 'merchantLegalPersonPhone',
type: 'input',
maxlength: 11
}, {
......@@ -99,27 +99,92 @@ export default {
addHtml: 'selectBrand'
}, {
label: '登录账号',
name: '',
name: 'merchantLoginAccount',
type: 'input',
maxlength: 15
}, {
label: '登录密码',
name: '',
name: 'merchantLoginPassword',
type: 'input',
maxlength: 20
}],
baseData: {
merchantList: [],
merchantTypeList: [],
accountLevelList: [],
channelList: [],
parentMerchantList: []
}
}
},
mounted() {
setTimeout(() => {
this.brandList()
}, 200)
this.getMerchantType()
this.getAccountLevel()
this.getChannel()
},
//方法集合
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() {
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() {
// let merchantBrandMain = chant.filter(item => item)
// this.$set(this.editData, 'merchantBrandMain', merchantBrandMain)
......@@ -129,21 +194,25 @@ export default {
this.brandList()
// this.$refs.brandListTree.getCheckList(this.editData.merchantBrandMain)
},
async brandList() {
brandList() {
this.$refs.brandListTree.loading = true
const brandListTree = await this.$apis.baseInfo.brandList({})
brandListTree.forEach(item => {
let child = item.children
if (!child) return
child.forEach(k => {
delete k.children
// const brandListTree = await brandList({})
brandList({}).then(res => {
const brandListTree = res
brandListTree.forEach(item => {
let child = item.children
if (!child) return
child.forEach(k => {
delete k.children
})
})
this.brandListTree = brandListTree
this.$refs.brandListTree.getCheckList(this.editData.merchantBrandMain)
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
})
})
this.brandListTree = brandListTree
this.$refs.brandListTree.getCheckList(this.editData.merchantBrandMain)
this.$nextTick(() => {
this.$refs.brandListTree.loading = false
})
},
// 点击主营品牌
clickBrand(val) {
......
......@@ -490,11 +490,16 @@ export default {
Promise.all(eventArr).then(() => {
this.checkSelectEmpty()
})
//平台方
this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{
console.log(obj)
this.financialObj.realityPlatformMerchantId=obj.merchantId
this.financialObj.realityPlatformMerchantName=obj.merchantName
})
//服务商
this.$EventBus.$on('shelfUpdateParMer', (obj)=>{
})
},
methods: {
...mapActions("FinancialRules", ["reset"]),
......@@ -864,7 +869,8 @@ export default {
this.editableTabs
)
if (!this.checkParamsType(res, goodsTypeGroupRules)) {
return this.$message.warning("请完善分账规则")
this.$message.warning("请完善分账规则")
return false
}
try {
this.submitParams = {
......@@ -874,6 +880,7 @@ export default {
this.checkCalculateType()
this.verificationCodeVisible = true
console.log(this.submitParams, "this.submitParams ")
return true
} catch (error) {}
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验
},
......
......@@ -892,7 +892,8 @@ export default {
async submit() {
let res = await this.verifyFormData()
if (!this.checkParamsType(res)) {
return this.$message.error("请完善对账规则")
this.$message.error("请完善对账规则")
return false
}
// 检验已经通过了
this.errorIndex = -1
......@@ -914,7 +915,7 @@ export default {
partnerMerchantExpenseCategoryValue
}
this.submitParams=params
console.log( this.submitParams)
return true
},
// 校验所有form数据
async verifyFormData() {
......
......@@ -1044,7 +1044,6 @@ export default {
},
// 查询4s店及上级列表 参数 channelType=1(流量方对象)
async getMerchantLevelList() {
console.log( this.merchantRow)
return new Promise(async (resolve, reject) => {
const that = this
const localRes = localStorage.getItem("getMerchantLevelList")
......@@ -1072,7 +1071,7 @@ export default {
merchantName: val.merchantName
})
})
that.flowList = listArr
that.flowList = listArr
resolve()
}
})
......@@ -1364,13 +1363,14 @@ export default {
},
// 对账item的详情 更新和初始化 classificationObj
getEffectRule() {
let promiseArr = [
this.getListPartnerMerchant(),
this.getMerchantLevelList(),
this.getListPlatformMerchant()
]
Promise.all(promiseArr).then(() => {
const res = deepClone(this.goodsTypeGroupReconciliationRules)
// let promiseArr = [
// this.getListPartnerMerchant(),
// // this.getMerchantLevelList(),
// // this.getListPlatformMerchant()
// ]
// Promise.all(promiseArr).then(() => {
this.$nextTick(()=>{
const res = deepClone(this.goodsTypeGroupReconciliationRules)
const that = this
// 赋值
const checkRecordItem = res && res[+that.tabindex]
......@@ -1406,7 +1406,9 @@ export default {
)
}
this.forceUpdate()
})
})
// })
},
// 换成后端数据结构
getBackendFormat() {
......
......@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -14,7 +14,7 @@
<!-- 流量方信息 -->
<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>
<!-- 分账配置 -->
......@@ -72,8 +72,8 @@ export default {
},
mounted() {
this.routeObj = this.$route.params
this.isLoad = true
this.getBasicDetail()
this.getDetail()
},
//方法集合
methods: {
......@@ -85,11 +85,10 @@ export default {
console.log(res, 'res----')
this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {}
}).finally(() => {
this.isLoad = false
})
},
getDetail() {
this.isLoad = false
},
handleAddMerchant() {
console.log('新建---')
this.addMerVisible = !this.addMerVisible
......
......@@ -127,16 +127,17 @@
>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="退款类型:" class="halfItem">
{{ detailInfo.status }}
{{ detailInfo.refundType?detailInfo.refundType==1?'全部退款':'部分退款':'-' }}
</el-form-item></el-col
>
<el-col :span="8">
<el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="订单总积分:" class="halfItem">
{{ detailInfo.status }}
</el-form-item></el-col
{{ detailInfo.addScore? detailInfo.addScore:'-' }}
</el-form-item>
</el-col
>
</el-row>
</el-form>
......@@ -165,15 +166,15 @@
</div>
<div v-else class="empty">暂无记录</div>
</div>
<div class="examine-record">
<div class="examine-record" v-if="detailInfo.status == '已审核'">
<div class="title">操作记录</div>
<div
class="record-div"
v-if="detailInfo.operationList && detailInfo.operationList.length > 0"
v-if="operationList && operationList.length > 0"
>
<div
class="record-div-d"
v-for="(item, index) in detailInfo.operationList"
v-for="(item, index) in operationList"
:key="index"
>
<div class="div-operator">操作人:{{ item.operator }}</div>
......@@ -209,7 +210,7 @@
<script>
import { Util, deepClone } from "@/common/util"
import { getPointDetail } from "@api/point"
import { getPointDetail ,getOperationRecord,getOrderByScore} from "@api/point"
export default {
name: "DetailDialog",
props: {
......@@ -255,6 +256,7 @@ export default {
},
detailInfo: {},
operationList:[],
loading: false,
imgVisible: false,
photoList: [],
......@@ -284,11 +286,32 @@ export default {
: "错单"
: "--"
this.detailInfo = res
this.getScore()
this.getOrderOperateData()
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) {
this.imgVisible = !this.imgVisible
this.imgList = url
......
......@@ -27,9 +27,6 @@
>
</el-tab-pane>
</el-tabs>
<!-- <el-button type="primary" size="mini" @click="handleExport">
导出
</el-button> -->
<div>
<span style="margin-right: 10px"
><auth-button category="Button" :show-btn-ids="['9140105']"
......@@ -67,11 +64,14 @@
:show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/>
<!-- v-if="
<auth-button
v-if="
scope.scope.status == 1 &&
scope.scope.pointsRefundAvailable == 'Y'
" -->
<auth-button :data="scope.scope" :show-btn-ids="['9140104']" />
"
:data="scope.scope"
:show-btn-ids="['9140104']"
/>
</span>
</div>
</d2-table>
......@@ -116,7 +116,10 @@ import {
getShopMerchantList,
pointCheck,
exportFile,
markAsRefunded
markAsRefunded,
refreshData,
getOrderByScore,
getOperationRecord
} from "@api/point"
export default {
name: "PointList",
......@@ -140,7 +143,7 @@ export default {
}
return {
show: true,
handleFormRef: 'handleFormRef',
handleFormRef: "handleFormRef",
refundVisible: false,
activeName: "4",
tabPaneList: [
......@@ -162,7 +165,7 @@ export default {
},
{
label: "未兑换",
name: "3"
name: "-1"
}
],
statusEnum: {
......@@ -610,16 +613,32 @@ export default {
//标记退款
handleRefund(data) {
this.refundVisible = true
this.refundForm.id = data.id
this.refundForm.orderCode = data.orderCode
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundForm.refundPoints = 10000
this.refundForm.maXPoints =10000
if(data.operator==true){
//对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
this.refundFormData[0].optionList[0].isDisabled=true
}
this.updateDisable()
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:部分退),
} else {
this.refundForm.refundType = 2
this.refundFormData[0].optionList[0].isDisabled = true
}
this.updateDisable()
})
},
updateDisable() {
let disabled = this.refundForm.refundType == 2 ? false : true
......@@ -637,8 +656,8 @@ export default {
if (valid) {
markAsRefunded({
orderCode: this.refundForm.orderCode,
refundType:this.refundForm.refundType,
refundPoints:this.refundForm.refundPoints
refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints
}).then((res) => {
if (res) {
this.$message.success("退款成功!")
......@@ -652,21 +671,23 @@ export default {
},
//刷新
handleRefresh() {
let params = {
...this.searchFormSearch,
...this.$refs.pointTable.page
}
this.$confirm("确定需要刷新并同步订单信息", "", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
// if (action == "confirm") {
// markAsRefunded({
// orderCode: data.orderCode
// }).then((res) => {
// if (res) {
// this.$message.success("订单信息已同步完成!")
// this.handleSearch()
// }
// })
// }
if (action == "confirm") {
refreshData(params).then((res) => {
if (res) {
this.$message.success("订单信息已同步完成!")
this.handleSearch()
}
})
}
}
})
},
......
......@@ -50,8 +50,9 @@ export default {
staffName: "",
staffPhone: "",
merchantId: "",
withdrawalTime:[],
rewardTime:[]
rewardTime:[],
reviewTime:[],
successTime:[]
},
searchFormSearch:{
......@@ -95,14 +96,14 @@ export default {
// },
{
label: "积分付款时间",
name: "rewardTime",
name: "reviewTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "积分到账时间",
name: "withdrawalTime",
name: "successTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
......@@ -212,20 +213,33 @@ export default {
"YYYY-MM-DD"
) + " 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 =
Util.dateFormate(
this.searchFormSearch.withdrawalTime[0],
this.searchFormSearch.successBeginTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.withdrawalEndTime =
Util.dateFormate(
this.searchFormSearch.withdrawalTime[1],
this.searchFormSearch.successEndTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
delete this.searchFormSearch.rewardTime
delete this.searchFormSearch.withdrawalTime
delete this.searchFormSearch.successTime
delete this.searchFormSearch.reviewTime
resolve()
})
},
......@@ -237,8 +251,9 @@ export default {
staffName: "",
staffPhone: "",
merchantId: "",
withdrawalTime:[],
rewardTime:[]
rewardTime:[],
reviewTime:[],
successTime:[]
}
this.searchFormSearch={}
this.$refs.pointTable.refreshTable(true, true)
......
......@@ -207,7 +207,10 @@
</div>
<div class="info-item-block block-line" style="height: 100%;display: flex;align-items: start;">
<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" >
<el-form-item label="" style="display: inline-block;" :prop="`staffDailyReportConfigList[${index}].startEffectiveTime`">
<el-date-picker v-model="detail.staffDailyReportConfigList[index].startEffectiveTime"
......@@ -254,7 +257,7 @@
</el-select>
<el-input v-else class="select-store" disabled v-model="detail.staffDailyReportConfigList[index].merchantName"></el-input>
</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" @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">
......@@ -486,15 +489,7 @@ export default {
v.currentlyFlag = true
}
})
const obj = {
startEffectiveTime: '',
endEffectiveTime: '',
currentlyFlag: false,
yqMerchantId: '',
merchantId: '',
targetMerchantList: []
}
res.staffDailyReportConfigList = res?.staffDailyReportConfigList?.length ? res.staffDailyReportConfigList : [obj]
res.staffDailyReportConfigList = res.staffDailyReportConfigList || []
}
this.detail = res || {}
this.tableData = res?.accountRecordList || []
......
......@@ -189,9 +189,16 @@ export default {
})
},
del(index) {
this.infoData.campusList.splice(index, 1)
this.$nextTick(() => {
this.$refs['configForm'].clearValidate()
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.infoData.campusList.splice(index, 1)
this.$nextTick(() => {
this.$refs['configForm'].clearValidate()
})
}).catch(() => {
})
},
handleInput(e, key, scope) {
......
......@@ -44,7 +44,8 @@
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
:before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn">
<template slot="brand" slot-scope="scope">
<template v-if="scope.scope.brand && scope.scope.brand.length > 20">
<el-popover placement="top" width="300" trigger="hover">
......@@ -273,6 +274,13 @@ export default {
resolve()
})
},
selectableFn(row) {
var isSelect = true
if (row.minPerformConfigStatus == 2 || !row.minPerformConfigStatus) { // 无配置方案或已禁用的不可勾选
isSelect = false
}
return isSelect
},
brandFilter(ele, lenght) {
if (ele.brand) {
return lenght ? (ele.brand?.length > lenght ? ele.brand.substring(0, lenght) + '\u2026' : ele.brand.substring(0, lenght)) : ele.brand
......
......@@ -323,11 +323,18 @@ export default {
// 删除
handleDelete(item, index) {
const data = this.configInfo
data[item + 'List']?.splice(index, 1)
this.$set(this.configInfo, item + 'List', data[item + 'List'])
this.$nextTick(() => {
this.$refs['editFormRef'].$refs['editChildRef'].clearValidate()
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = this.configInfo
data[item + 'List']?.splice(index, 1)
this.$set(this.configInfo, item + 'List', data[item + 'List'])
this.$nextTick(() => {
this.$refs['editFormRef'].$refs['editChildRef'].clearValidate()
})
}).catch(() => {
})
},
// 自定义校验区间结束值
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!