Commit 6b8d03e7 by 前端

Merge branch 'develop' into SAAS+V4.38.0-0425

2 parents f6e11823 5ca2c222
......@@ -90,6 +90,10 @@ export function findMerchantStaffList(data) {
// return request(data, "post")
return request(data)
}
export function merchantStaffByRoleList(data) {
data.method = `${path2}merchant.staff.by.role.list`
return request(data)
}
// 隐私协议标题查询
export function getPrivacyAgreement(data) {
......
......@@ -10,31 +10,38 @@ import request from "./request"
// 获取所有主营品牌列表
export function brandList(data) {
data.method = "dj.api.smartcarlife.common.car.brand.list"
return request(data)
return request(data, 'post')
}
// 查询4s店列表
export function listShop4sByRef(data) {
data.method = "dj.api.scenemerchantref.listShop4sByRef"
return request(data)
return request(data, 'post')
}
// 渗透率报表(分页)
// 渗透率报表(分页)会员权益
export function permeabilityList(data) {
data.method = "dj.api.smarcarlife.permeability.report.page"
return request(data)
return request(data, 'post')
}
// 渗透率报表导出
// 渗透率报表导出 会员权益
export function permeabilityExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.exportAsync"
return request(data)
return request(data, 'post')
}
// 渗透率报表填报明细列表(分页)
export function permeabilityDetail(data) {
data.method = "dj.api.smarcarlife.permeability.report.detail.page"
return request(data)
return request(data, 'post')
}
// 渗透率报表详情导出
export function permeabilityDetailExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.detail.exportAsync"
return request(data)
return request(data, 'post')
}
// 渗透率报表(分页)精品升级
export function permeabilityBoutiqueList(data) {
// data.method = "dj.api.smarcarlife.permeability.report.page"
data.method = "dj.api.smarcarlife.boutique.permeability.report.page"
return request(data, 'post')
}
......@@ -91,3 +91,9 @@ export function getBrandList(data) {
data.method = `${path}common.car.brand.list`
return request(data)
}
// 根据4s店或者园区店查询员工信息
export function getResidentStaffList(data) {
data.method = `${path}merchant.staff.list`
return request(data, "post")
}
......@@ -57,7 +57,7 @@
:filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'"
:multiple="item.multiple" :multiple-limit="item.multipleLimit || 0" :collapse-tags="item.collapseTags"
@change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]"
<el-option v-for="(subItem, subIndex) in item.optionList" :key="subIndex"
:label="subItem[item.optionLabel]" :value="subItem[item.optionId]" />
</el-select>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="searchForm[item.name]"
......
......@@ -218,7 +218,9 @@
<td class="lb">
商品成本
</td>
<td>{{ detail.goodsCost?('¥ '+detail.goodsCost):'¥0' }}</td>
<!-- 子订单有嘀加成本或第三方成本 商品成本显示- -->
<td v-if="isSubOrder">{{ !filterEmpty(detail.djCost) || !filterEmpty(detail.thirdPartyCost) ? '-' : (detail.goodsCost?('¥ '+detail.goodsCost):'¥0') }}</td>
<td v-else>{{ detail.goodsCostForShow?('¥ '+detail.goodsCostForShow):'-' }}</td>
<td class="lb">
回收成本
</td>
......@@ -230,6 +232,16 @@
</td>
<td>{{ detail.virtualAccountCost?('¥ '+detail.virtualAccountCost):'¥0' }}</td>
<td class="lb">
嘀加成本
</td>
<td>{{ detail.djCost?('¥ '+detail.djCost):'¥0' }}</td>
</tr>
<tr>
<td class="lb">
第三方成本
</td>
<td>{{ detail.thirdPartyCost?('¥ '+detail.thirdPartyCost):'¥0' }}</td>
<td class="lb">
</td>
<td></td>
</tr>
......@@ -411,6 +423,9 @@ export default {
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
},
filterEmpty(data) {
return (data ?? '') === ''
},
getDetail(row) {
if (this.$route.params.from && this.$route.params.from == 'orderSupplement') { // 从待补录订单列表跳转过来
mainOrderDetail({ orderCode: row.inputtedOrderCode }).then(res => {
......
......@@ -293,6 +293,14 @@
label="虚拟对账成本"
align="center"
width="110px" />
<el-table-column prop="djCost"
label="嘀加成本"
align="center"
width="110px" />
<el-table-column prop="thirdPartyCost"
label="第三方成本"
align="center"
width="110px" />
</el-table-column>
<el-table-column label="支付信息"
......@@ -1121,8 +1129,13 @@ export default {
item.hasOwnProperty('subOrderProfitAllocations') &&
item.subOrderProfitAllocations
) {
item.goodsCost = ''
item.subOrderProfitAllocations.forEach(subItem => {
// 有嘀加成本或第三方成本 商品成本显示-
if (!this.filterEmpty(subItem.djCost) || !this.filterEmpty(subItem.thirdPartyCost)) subItem.goodsCost = ''
subItem.uniqueKey = temp++
// 主订单商品成本根据 是否有嘀加成本或商品成本累加计算
item.goodsCost = this.subStr(item.goodsCost, Number(subItem.goodsCost)) > 0 ? (this.subStr(item.goodsCost, Number(subItem.goodsCost)) - 0) : ''
subItem = this.numAddPrefix(subItem)
subItem.positionStr = this.positionTypeList?.filter(val => val.position == subItem.goodsPosition)[0]?.confName || '-'
})
......@@ -1137,6 +1150,26 @@ export default {
}
})
},
// 价格计算精度丢失处理
subStr(num1, num2) {
var r1, r2, m, n
try {
r1 = num1.toString().split('.')[1].length
} catch (e) {
r1 = 0
}
try {
r2 = num2.toString().split(".")[1].length
} catch (e) {
r2 = 0
}
m = Math.pow(10, Math.max(r1, r2))
n = (r1 >= r2) ? r1 : r2
return ((num1 * m + num2 * m) / m).toFixed(n)
},
filterEmpty(data) {
return (data ?? '') === ''
},
numAddPrefix(item) {
const moneyLabels = [
'goodsCost',
......@@ -1160,7 +1193,11 @@ export default {
'marketingCost',
'rewardAndPenaltyCost',
'franchiseeProfitMoneyForAudit',
'glProfitMoneyForAudit'
'glProfitMoneyForAudit',
'recoveryCost',
'virtualAccountCost',
'djCost',
'thirdPartyCost'
]
const rateToFloat = [ // 分润比例整数补零字段
'franchiseeProfitPer',
......
......@@ -14,16 +14,30 @@
<div class="header">
<d2-search
:search-form="searchForm"
class="show-search"
label-width="140px"
:search-select-obj="searchSelectObj"
:form-data="showFormData"
>
<template slot="reportDate">
<el-date-picker
size="mini"
v-model="searchForm.reportDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
/>
</template>
<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-search>
<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">
<div class="table-header">
......@@ -58,6 +72,7 @@ export default {
name: "DetailDialog",
components: {},
data() {
let timeOptionRange = null
return {
getListApi: permeabilityDetail,
countObj: {},
......@@ -77,6 +92,11 @@ export default {
name: "createdDate",
type: "datePicker",
valueFormat: "yyyy-MM-dd"
},
{
label: "日报时间",
name: "reportDate",
addHtml: 'reportDate'
}
],
// getListApi: getReportByGoods,
......@@ -93,7 +113,10 @@ export default {
},
{
label: "填报交付数",
prop: "deliveryCount"
prop: "deliveryCount",
formatter: (cellValue) => {
return (cellValue.deliveryCount ?? '') === '' ? '-' : cellValue.deliveryCount
}
},
{
label: "填报时间",
......@@ -105,7 +128,29 @@ export default {
}
]
},
baseData: {}
baseData: {},
pickerOptions: {
disabledDate: (time) => {
// 可选范围是今天及之前且最大可选跨度是31天
const secondNum = 30 * 24 * 60 * 60 * 1000;
const today = new Date();
const [year, month, date] = [today.getFullYear(), today.getMonth(), today.getDate()]
const yesterdayStamp = new Date(year, month, date).getTime()
if (timeOptionRange) {
return time.getTime() > timeOptionRange.getTime() + secondNum || time.getTime() < timeOptionRange.getTime() - secondNum || time.getTime() > yesterdayStamp
} else {
return time.getTime() > yesterdayStamp
}
},
onPick: (dateRange) => {
if (dateRange.minDate && !dateRange.maxDate) {
timeOptionRange = dateRange.minDate
}
if (dateRange.maxDate) {
timeOptionRange = null
}
}
}
}
},
......@@ -125,6 +170,10 @@ export default {
merchantName: {
type: String,
default: ""
},
sceneType: {
type: String,
default: '0'
}
},
......@@ -156,6 +205,13 @@ export default {
dayjs(this.searchFormSearch.createdDate[1]).format("YYYY-MM-DD") +
" 23:59:59"
}
if (this.searchFormSearch.reportDate) {
this.searchFormSearch.reportStartDate =
dayjs(this.searchFormSearch.reportDate[0]).format("YYYY-MM-DD")
this.searchFormSearch.reportEndDate =
dayjs(this.searchFormSearch.reportDate[1]).format("YYYY-MM-DD")
}
this.searchFormSearch.sceneType = this.sceneType
return this.searchFormSearch
},
handleExport() {
......
......@@ -79,6 +79,14 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="客户来源"
align="center"
prop="salesType">
<template slot-scope="scope">
<span v-if="scope.row.salesType>-1">{{ scope.row.salesType == 1 ? "售后" : "售前" }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="客户车型"
align="center"
width="200"
......@@ -612,7 +620,15 @@ export default {
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'invoiceStatusList'
}
},{
label: '客户来源',
name: 'salesType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'salesTypeList'
}
],
searchForm: {
sceneType: 0,
......@@ -630,7 +646,8 @@ export default {
businessType: "",
paySuccessDate: '',
provinceId: '',
invoiceStatus: ''
invoiceStatus: '',
salesType:''
},
baseData: {
orderStatusList: [
......@@ -749,6 +766,16 @@ export default {
confId: '2',
confLabel: '已开票'
}
],
salesTypeList:[
{
confId: '0',
confLabel: '售前'
},
{
confId: '1',
confLabel: '售后'
}
]
},
tableData: [],
......
......@@ -269,6 +269,14 @@
<span>{{ scope.row.source == 7 ? '系统导入' : '小程序订单' }}</span>
</template>
</el-table-column>
<el-table-column
label="客户来源"
align="center"
prop="source">
<template slot-scope="scope">
<span>{{ scope.row.salesType == 1 ? '售后' : '售前' }}</span>
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
fixed="right">
......@@ -631,6 +639,14 @@ export default {
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'invoiceStatusList'
},{
label: '客户来源',
name: 'salesType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'salesTypeList'
}],
searchForm: {
sceneType: 1,
......@@ -648,7 +664,8 @@ export default {
subShopMerchantId: '',
paySuccessDate: '',
provinceId: '',
invoiceStatus: ''
invoiceStatus: '',
salesType:''
},
baseData: {
orderStatusList: [{
......@@ -753,6 +770,16 @@ export default {
confId: '2',
confLabel: '已开票'
}
],
salesTypeList:[
{
confId: '0',
confLabel: '售前'
},
{
confId: '1',
confLabel: '售后'
}
]
},
tableData: [],
......@@ -951,7 +978,7 @@ export default {
provinceId: '',
invoiceStatus: ''
}
this.baseData.storeIdList = []
// this.baseData.storeIdList = []
this.getOptionsList()
},
getServiceStore(merchantIds) {
......
......@@ -94,6 +94,9 @@
<el-form-item label="用户姓名:">
{{ detail.customerName || $$(detail, 'customer', 'customerName') }}
</el-form-item>
<el-form-item label="客户来源:">
{{ detail.customer.salesType==1?'售后':'售前'}}
</el-form-item>
<el-form-item label="评论:">
{{ detail.customerComment }}
</el-form-item>
......
......@@ -370,6 +370,7 @@ export default {
...this.form,
...this.rulesTestParams
}
if (!params?.goodsTypeGroupRule?.goodsTypeGroupRelations) delete params.goodsTypeGroupRule.goodsTypeGroupRelations
merchantSettleDistributeRuleTestRule(params).then((result) => {
console.log('result', result)
result.expenseCategoryCalculatedLevelItemForRuleTestsResults = result.expenseCategoryCalculatedLevelItemForRuleTestsResults.sort((a, b) => {
......
......@@ -30,6 +30,9 @@
<el-form-item label="姓名:">
{{ $$(detail.ownerDTO, 'owner') }}
</el-form-item>
<el-form-item label="车主来源:">
{{ detail.ownerDTO.salesType==1?'售后':'售前' }}
</el-form-item>
<el-form-item label="手机号:">
{{ $$(detail.ownerDTO, 'phone') }}
</el-form-item>
......
......@@ -152,6 +152,14 @@ export default {
width: "250px"
},
{
label: "客户来源",
prop: "salesType",
width: "100px",
formatter:(cellValue)=>{
return cellValue.salesType==1?'售后':'售前'
}
},
{
label: "车架号",
prop: "carVin",
width: "250px"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!