caolin 3 weeks ago
commit bc3c4f2ebc
  1. 13
      src/views/Clue/Order/Comp/DialogOrder.vue
  2. 13
      src/views/Clue/Order/Comp/SchoolSettle.vue
  3. 74
      src/views/Clue/Set/Comp/DialogSource.vue
  4. 2
      src/views/Home/CloseRate.vue
  5. 0
      src/views/Home/Comp/DialogSalerReportDetail.vue
  6. 161
      src/views/Home/SalesReport.vue
  7. 1
      src/views/MiniMall/MallSet/Comp/SupplierSet.vue

@ -61,14 +61,15 @@
</el-table> </el-table>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="回款记录" name="returnRecord">
label="回款记录"
name="returnRecord"
v-if="checkPermi(['clue:order:return-list'])"
>
<el-table :data="returnRecordList" border stripe> <el-table :data="returnRecordList" border stripe>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column prop="money" label="回款金额" /> <el-table-column
v-if="checkPermi(['clue:order:return-list'])"
prop="money"
label="回款金额"
/>
<el-table-column prop="personProfit" label="员工利润" />
<el-table-column prop="applyTime" label="申请日期" /> <el-table-column prop="applyTime" label="申请日期" />
<el-table-column prop="isPayoff" label="是否结清" /> <el-table-column prop="isPayoff" label="是否结清" />
<el-table-column prop="stateName" label="审核状态" /> <el-table-column prop="stateName" label="审核状态" />

@ -248,6 +248,16 @@
<el-form-item label="结算金额"> <el-form-item label="结算金额">
{{ settleAmount }} {{ settleAmount }}
</el-form-item> </el-form-item>
<el-form-item label="结算日期">
<el-date-picker
v-model="form.settlementDate"
type="date"
placeholder="选择日期时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:clearable="false"
/>
</el-form-item>
<el-form-item label="结算备注" prop="remark"> <el-form-item label="结算备注" prop="remark">
<Editor v-model:modelValue="form.remark" /> <Editor v-model:modelValue="form.remark" />
</el-form-item> </el-form-item>
@ -270,7 +280,7 @@ import { getPlaceList } from '@/api/school/place'
import { getClassTypeList } from '@/api/school/class' import { getClassTypeList } from '@/api/school/class'
import * as SettleApi from '@/api/clue/settle' import * as SettleApi from '@/api/clue/settle'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter, formatDate } from '@/utils/formatTime'
import { removeNullField } from '@/utils/index' import { removeNullField } from '@/utils/index'
const message = useMessage() // const message = useMessage() //
@ -395,6 +405,7 @@ function batchSettle() {
showDailog.value = true showDailog.value = true
form.value = { form.value = {
settlementIds: selectList.value.map((it) => it.settlementId), settlementIds: selectList.value.map((it) => it.settlementId),
settlementDate: formatDate(new Date()),
reamrk: undefined reamrk: undefined
} }
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0) settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0)

@ -7,21 +7,40 @@
:rules="formRules" :rules="formRules"
label-width="80px" label-width="80px"
> >
<el-form-item v-if="formData.parentSource" label="上级来源"> <el-row :gutter="20">
<el-col v-if="formData.parentSource" :span="12" :offset="0">
<el-form-item label="上级来源">
<el-input v-model="formData.parentSource" disabled /> <el-input v-model="formData.parentSource" disabled />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="来源名称" prop="sourceName"> <el-form-item label="来源名称" prop="sourceName">
<el-input v-model="formData.sourceName" placeholder="请输入来源名称" /> <el-input v-model="formData.sourceName" placeholder="请输入来源名称" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="排序" prop="sort"> <el-form-item label="排序" prop="sort">
<el-input v-model="formData.sort" placeholder="请输入排序" type="number" :min="0" /> <el-input v-model="formData.sort" placeholder="请输入排序" type="number" :min="0" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="成本模式" prop="mode">
<el-radio-group v-model="formData.mode">
<el-radio :label="0"> 总价 </el-radio>
<el-radio :label="1"> 单价 </el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" :offset="0">
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-radio-group v-model="formData.status"> <el-radio-group v-model="formData.status">
<el-radio :label="0"> 启用 </el-radio> <el-radio :label="0"> 启用 </el-radio>
<el-radio :label="1"> 禁用 </el-radio> <el-radio :label="1"> 禁用 </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="24" :offset="0">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
type="textarea" type="textarea"
@ -30,7 +49,39 @@
:autosize="{ minRows: 4, maxRows: 8 }" :autosize="{ minRows: 4, maxRows: 8 }"
/> />
</el-form-item> </el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<el-divider direction="horizontal" content-position="left">线索成本</el-divider>
<el-button class="mb-10px" type="primary" @click="handleAddPrice"> 添加年份 </el-button>
<el-table :data="formData.priceVOList" border>
<el-table-column label="年份" width="120">
<template #default="{ row }">
<el-date-picker
v-model="row.year"
type="year"
placeholder="选择年份"
size="small"
format="YYYY"
value-format="YYYY"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column v-for="col in 12" :key="col" :label="`${col}月`" width="100px">
<template #default="{ row }">
<el-input-number
v-model="row.monthTargetVOList[col - 1].targetPrice"
size="small"
:controls="false"
style="width: 100%"
/>
</template>
</el-table-column>
</el-table>
<template #footer> <template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button> <el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
@ -111,8 +162,27 @@ const resetForm = () => {
sourceName: '', sourceName: '',
status: 0, status: 0,
sort: 1, sort: 1,
remark: '' remark: '',
mode: 0,
priceVOList: []
} }
formRef.value?.resetFields() formRef.value?.resetFields()
} }
function handleAddPrice() {
const obj = {
year: undefined,
monthTargetVOList: []
}
for (let i = 1; i <= 12; i++) {
obj.monthTargetVOList.push({
month: i,
targetPrice: undefined
})
}
if (!formData.value.priceVOList) {
formData.value.priceVOList = []
}
formData.value.priceVOList.push(obj)
}
</script> </script>

@ -102,8 +102,6 @@ function totalSort(pre, cur) {
} }
function monthSort(pre, cur, idx) { function monthSort(pre, cur, idx) {
console.log(idx)
return ( return (
Number(pre.monthClueSignRateReportList[idx].rate) - Number(pre.monthClueSignRateReportList[idx].rate) -
Number(cur.monthClueSignRateReportList[idx].rate) Number(cur.monthClueSignRateReportList[idx].rate)

@ -0,0 +1,161 @@
<template>
<ContentWrap>
<el-form :model="searchForm" label-width="0" inline>
<el-form-item>
<el-date-picker
v-model="searchForm.period"
type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
start-placeholder="选择日期"
end-placeholder="选择日期"
/>
</el-form-item>
<el-form-item>
<el-input v-model="searchForm.nickname" placeholder="销售姓名" clearable />
</el-form-item>
<el-form-item>
<el-tree-select
v-model="searchForm.sourceId"
:data="sourceOptions"
:props="defaultProps"
check-strictly
node-key="sourceId"
placeholder="请选择渠道"
/>
</el-form-item>
<el-form-item>
<el-select v-model="searchForm.cartype" placeholder="选择驾照类型" clearable>
<el-option
v-for="item in cartypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" border stripe>
<el-table-column type="index" width="50" fixed="left" />
<el-table-column prop="nickname" label="姓名" width="80" fixed="left" />
<el-table-column prop="" sortable min-width="100">
<template #header>
<Tooltip message="咨询日期在所选周期内的线索总数" />
<span>新线索数</span>
</template>
</el-table-column>
<el-table-column label="成交数" prop="" sortable min-width="100">
<template #header>
<Tooltip message="成交日期在所选周期内的成交数" />
<span>成交数</span>
</template>
</el-table-column>
<el-table-column label="成交率" prop="" sortable min-width="100" />
<el-table-column label="跟进数/日" prop="" sortable min-width="100" />
<el-table-column label="成交数/日" prop="" sortable min-width="100" />
<el-table-column label="平均成交周期/天" prop="" sortable min-width="100" />
<el-table-column prop="" sortable min-width="100">
<template #header>
<Tooltip
message="平均每笔成交订单的公司利润【按照登记,不按审核到账】=总公司利润/总成交数"
/>
<span>毛利/</span>
</template>
</el-table-column>
<el-table-column prop="" sortable min-width="100">
<template #header>
<Tooltip
message="平均每笔成交订单的额外支出(返费等)【按照登记,不按审核到账】=总支出/总成交数"
/>
<span>支出/</span>
</template>
</el-table-column>
<el-table-column prop="" sortable min-width="100">
<template #header>
<Tooltip message="平均每条线索的成本=总线索成本/新线索条数" />
<span>线索成本/</span>
</template>
</el-table-column>
<el-table-column prop="" sortable min-width="100">
<template #header>
<Tooltip message="=(总公司利润-总支出-总线索成本)/总成交数" />
<span>净利润/</span>
</template>
</el-table-column>
<el-table-column label="总线索成本" prop="" sortable min-width="100" />
<el-table-column label="总支出" prop="" sortable min-width="100" />
<el-table-column label="总利润" prop="" sortable min-width="100" />
<el-table-column prop="" sortable min-width="100">
<template #header>
<Tooltip message="=总利润/(总成本+总支出)" min-width="100" />
<span>能效</span>
</template>
</el-table-column>
<el-table-column label="撞单数" prop="" sortable min-width="100" />
<el-table-column label="撞单成交数" prop="" sortable min-width="100" />
</el-table>
</ContentWrap>
</template>
<script setup name="SalesReport">
import * as reportApi from '@/api/home/reportSignRate'
import { removeNullField } from '@/utils'
onMounted(() => {
handleReset()
handleSearch()
})
const searchForm = ref({})
function handleReset() {
searchForm.value = {
nickname: undefined,
year: new Date().getFullYear() + ''
}
}
const loading = ref(false)
const tableList = ref([])
async function handleSearch() {
loading.value = true
try {
const data = await reportApi.getList(removeNullField(searchForm.value))
tableList.value = data.map((item) => {
const count = item.monthClueSignRateReportList.reduce(
(pre, cur) => {
return {
signCount: pre.signCount + cur.clueSignNum,
clueCount: pre.clueCount + cur.followClueNum
}
},
{ signCount: 0, clueCount: 0 }
)
const rate = count.clueCount > 0 ? ((count.signCount * 100) / count.clueCount).toFixed(2) : 0
return {
...item,
totalRate: `${rate}%(${count.signCount}/${count.clueCount})`,
totalRateNum: rate
}
})
} finally {
loading.value = false
}
}
// function monthSort(pre, cur, idx) {
// return (
// Number(pre.monthClueSignRateReportList[idx].rate) -
// Number(cur.monthClueSignRateReportList[idx].rate)
// )
// }
</script>
<style lang="scss" scoped></style>

@ -17,6 +17,7 @@
</el-form> </el-form>
<el-table v-loading="loading" :data="tableList"> <el-table v-loading="loading" :data="tableList">
<el-table-column prop="label" label="供应商名称" /> <el-table-column prop="label" label="供应商名称" />
<!-- <el-table-column prop="" label="微信群名称" /> -->
<el-table-column prop="sort" label="排序" width="100px" /> <el-table-column prop="sort" label="排序" width="100px" />
<el-table-column prop="remark" label="备注" /> <el-table-column prop="remark" label="备注" />
<el-table-column <el-table-column

Loading…
Cancel
Save