salary
qsh 5 months ago
parent f2064d99ad
commit e3e24f4939
  1. 236
      src/views/Clue/Order/Comp/SchoolSettle.vue
  2. 14
      src/views/Clue/Order/Comp/Settle.vue
  3. 4
      src/views/Clue/Order/index.vue
  4. 15
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  5. 127
      src/views/SchoolManagement/Class/Comp/DialogClass.vue
  6. 14
      src/views/SchoolManagement/Class/index.vue

@ -0,0 +1,236 @@
<template>
<div>
<el-form :model="searchForm" label-width="0" inline>
<el-form-item>
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
</el-form-item>
<el-form-item>
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
</el-form-item>
<el-form-item>
<el-input v-model="searchForm.phone" placeholder="联系方式" clearable />
</el-form-item>
<el-form-item>
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="searchForm.dealDate"
type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-"
start-placeholder="登记日期"
end-placeholder="登记日期"
/>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.signSchool"
placeholder="选择驾校"
filterable
clearable
@change="changeSchool"
>
<el-option
v-for="item in schoolOptions"
:key="item.schoolId"
:label="item.schoolName"
:value="item.schoolId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.signPlace"
placeholder="选择场地"
filterable
clearable
:disabled="!searchForm.signSchool"
@change="changePlace"
>
<el-option
v-for="item in placeOptions"
:key="item.placeId"
:label="item.name"
:value="item.placeId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model="searchForm.signClass"
:disabled="!searchForm.signPlace"
placeholder="选择班型"
filterable
clearable
>
<el-option
v-for="item in classOptions"
:key="item.typeId"
:label="item.typeName"
:value="item.typeId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-radio-group v-model="searchForm.settleStatus">
<el-radio :label="1"> 已结算 </el-radio>
<el-radio :label="2"> 未结算 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch">查询</el-button>
<el-button @click="handleReset">重置</el-button>
<el-button @click="batchSettle">批量结算</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="tableList"
border
@selection-change="handleSelectionChange"
>
<el-table-column prop="signId" label="成交单号" min-width="120px" />
<el-table-column prop="name" label="线索名称" min-width="120px" />
<el-table-column prop="phone" label="联系方式" width="120px" />
<el-table-column prop="signUserName" label="登记人" min-width="90" />
<el-table-column prop="dealDate" label="登记时间" width="120px" :formatter="dateFormatter" />
<el-table-column prop="signSchool" label="成交驾校" min-width="150px" />
<el-table-column prop="signPlace" label="成交场地" min-width="150px" />
<el-table-column prop="signClass" label="成交班型" min-width="150px" />
<el-table-column prop="settleTime" label="结算时间" width="120px" />
<el-table-column prop="settleUser" label="结算人" min-width="90px" />
<el-table-column prop="settleStatus" label="结算状态" width="90px" />
<el-table-column label="结算备注">
<template #default="scope">
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.remark">
<template #reference>
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
</template>
<div v-dompurify-html="scope.row.settleRemark"></div>
</el-popover>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="getList"
/>
</div>
</template>
<script setup name="SchoolSettle">
import { getSimpleUserList as getUserOption } from '@/api/system/user'
import { getPlaceList } from '@/api/school/place'
import { getClassTypePage } from '@/api/school/class'
onMounted(() => {
getOptions()
handleSearch()
})
const searchForm = ref({
name: undefined,
phone: undefined,
signUser: undefined,
dealDate: [],
signSchool: undefined,
signPlace: undefined,
signClass: undefined,
signId: undefined,
settleStatus: 2,
pageSize: 20,
pageNo: 1
})
function handleReset() {
searchForm.value = {
name: undefined,
phone: undefined,
signUser: undefined,
dealDate: [],
signSchool: undefined,
signPlace: undefined,
signClass: undefined,
signId: undefined,
settleStatus: 2,
pageSize: 20,
pageNo: 1
}
}
function handleSearch() {
searchForm.value.pageNo = 1
getList()
}
const loading = ref(false)
const tableList = ref([])
const total = ref(0)
async function getList() {
loading.value = true
try {
const data = await DeliveryApi.getDeliveryPage(searchForm.value)
tableList.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const batchIds = ref([])
function handleSelectionChange(val) {
batchIds.value = val.map((it) => it.id)
}
function batchSettle() {}
const schoolOptions = ref([])
const allPlaceOptions = ref([])
const userOptions = ref([])
function getOptions() {
//
getPlaceList({ placeStatus: 0, schoolStatus: 0, isSearchSchool: true }).then((data) => {
schoolOptions.value = data.schoolList
allPlaceOptions.value = data.placeList
})
getUserOption().then((data) => {
userOptions.value = data
})
}
const placeOptions = computed(() => {
return allPlaceOptions.value.filter((it) => it.schoolId == searchForm.value.signSchool)
})
function changeSchool() {
searchForm.value.signPlace = undefined
searchForm.value.signClass = undefined
}
function changePlace() {
searchForm.value.signClass = undefined
getClassTypeOptions()
}
const classOptions = ref([])
async function getClassTypeOptions() {
const data = await getClassTypePage({ placeId: searchForm.value.signPlace })
classOptions.value = data.list
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,14 @@
<template>
<div>
<SchoolSettle v-if="appStore.getAppInfo?.instanceType == 1" />
</div>
</template>
<script setup name="Settle">
import { useAppStore } from '@/store/modules/app'
import SchoolSettle from './SchoolSettle.vue'
const appStore = useAppStore()
</script>
<style lang="scss" scoped></style>

@ -15,6 +15,9 @@
<el-tab-pane label="发货列表" name="delivery" v-if="appStore.getAppInfo?.instanceType == 2">
<Delivery v-if="tabName == 'delivery'" />
</el-tab-pane>
<el-tab-pane label="对外结算" name="settle">
<Settle v-if="tabName == 'settle'" />
</el-tab-pane>
</el-tabs>
</template>
@ -25,6 +28,7 @@ import MallOrderList from './Comp/MallOrderList.vue'
import Reback from './Comp/Reback.vue'
import AfterSales from './Comp/AfterSales.vue'
import Delivery from './Comp/Delivery.vue'
import Settle from './Comp/Settle.vue'
const appStore = useAppStore()
const tabName = ref('list')

@ -79,6 +79,7 @@
:disabled="!form.signPlace"
placeholder="选择班型"
filterable
@change="changeClass"
>
<el-option
v-for="item in classOptions"
@ -90,6 +91,14 @@
</el-form-item>
</el-col>
</template>
<el-col :span="8" :offset="0">
<el-form-item label="公司收款" prop="isCompanyReceipts">
<el-radio-group v-model="form.isCompanyReceipts">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span="8"
:offset="0"
@ -368,6 +377,7 @@ function resetForm(id) {
state: true,
payAmount: 0,
remark: undefined,
isCompanyReceipts: appStore.getAppInfo?.instanceType == 1,
extraPay: [],
signProducts: []
}
@ -476,6 +486,11 @@ function changePlace() {
getClassTypeOptions()
}
function changeClass() {
form.value.payAmount =
classOptions.value.find((it) => (it.typeId = form.value.signClass)).guidingPrice || 0
}
function handleRemove(type, index) {
form.value[type].splice(index, 1)
}

@ -116,26 +116,26 @@
label-width="90px"
>
<el-form-item label="利润模式:">
<el-radio-group v-model="profitCompanyForm.profitType">
<el-radio-group v-model="profitCompanyForm.profitMode">
<el-radio :label="1">比例模式</el-radio>
<el-radio :label="2">固定模式</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="计算规则:">
<div class="flex items-center" v-if="profitCompanyForm.profitType == 1">
<div class="flex items-center" v-if="profitCompanyForm.profitMode == 1">
<span>公司利润 = 成交价 </span>
<el-select
v-model="profitCompanyForm.isPlus"
v-model="profitCompanyForm.profitRule.mark"
size="small"
placeholder="加/减"
class="ml-10px mr-10px"
style="width: 70px"
>
<el-option label="+" :value="1" />
<el-option label="-" :value="2" />
<el-option label="+" value="+" />
<el-option label="-" value="-" />
</el-select>
<el-input-number
v-model="profitCompanyForm.bianliang"
v-model="profitCompanyForm.profitRule.minPrice"
size="small"
placeholder="金额"
:min="0"
@ -144,7 +144,7 @@
/>
<span class="ml-10px mr-10px"> 乘以 </span>
<el-input-number
v-model="profitCompanyForm.bili"
v-model="profitCompanyForm.profitRule.rate"
size="small"
placeholder="比例"
:min="0"
@ -152,11 +152,11 @@
:controls="false"
/>
</div>
<div v-else-if="profitCompanyForm.profitType == 2">
<div v-else-if="profitCompanyForm.profitMode == 2">
<el-button
type="primary"
size="small"
@click="profitCompanyForm.dangwei.push({ dangweizhi: undefined, lirun: undefined })"
@click="profitCompanyForm.dangwei.push({ signPrice: undefined, profit: undefined })"
>添加利润档位</el-button
>
<div
@ -166,7 +166,7 @@
>
<span>成交额满</span>
<el-input-number
v-model="item.dangweizhi"
v-model="item.signPrice"
size="small"
placeholder="金额"
:min="0"
@ -176,7 +176,7 @@
/>
<span>公司利润为</span>
<el-input-number
v-model="item.lirun"
v-model="item.profit"
size="small"
placeholder="金额"
:min="0"
@ -197,16 +197,16 @@
label-width="90px"
>
<el-form-item label="利润模式:">
<el-radio-group v-model="profitEmployeeForm.profitType">
<el-radio-group v-model="profitEmployeeForm.profitMode">
<el-radio :label="1">比例模式</el-radio>
<el-radio :label="2">固定模式</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="计算规则:">
<div class="flex items-center" v-if="profitEmployeeForm.profitType == 1">
<div class="flex items-center" v-if="profitEmployeeForm.profitMode == 1">
<span>公司利润 = 成交价 </span>
<el-select
v-model="profitEmployeeForm.isPlus"
v-model="profitEmployeeForm.profitRule.mark"
size="small"
placeholder="加/减"
class="ml-10px mr-10px"
@ -216,7 +216,7 @@
<el-option label="-" :value="2" />
</el-select>
<el-input-number
v-model="profitEmployeeForm.bianliang"
v-model="profitEmployeeForm.profitRule.minPrice"
size="small"
placeholder="金额"
:min="0"
@ -225,7 +225,7 @@
/>
<span class="ml-10px mr-10px"> 乘以 </span>
<el-input-number
v-model="profitEmployeeForm.bili"
v-model="profitEmployeeForm.profitRule.rate"
size="small"
placeholder="比例"
:min="0"
@ -233,12 +233,12 @@
:controls="false"
/>
</div>
<div v-else-if="profitEmployeeForm.profitType == 2">
<div v-else-if="profitEmployeeForm.profitMode == 2">
<el-button
type="primary"
size="small"
@click="
profitEmployeeForm.dangwei.push({ dangweizhi: undefined, lirun: undefined })
profitEmployeeForm.dangwei.push({ signPrice: undefined, profit: undefined })
"
>添加利润档位</el-button
>
@ -249,7 +249,7 @@
>
<span>成交额满</span>
<el-input-number
v-model="item.dangweizhi"
v-model="item.signPrice"
size="small"
placeholder="金额"
:min="0"
@ -259,7 +259,7 @@
/>
<span>公司利润为</span>
<el-input-number
v-model="item.lirun"
v-model="item.profit"
size="small"
placeholder="金额"
:min="0"
@ -451,15 +451,17 @@ const formRef = ref() // 表单 Ref
const currentTab = ref('base')
const profitCompanyForm = ref({
profitType: 1,
dangwei: []
profitMode: 1,
dangwei: [],
profitRule: {}
})
const profitCompanyRules = {}
const profitCompanyRef = ref()
const profitEmployeeForm = ref({
profitType: 1,
dangwei: []
profitMode: 1,
dangwei: [],
profitRule: {}
})
const profitEmployeeRules = {}
const profitEmployeeRef = ref()
@ -476,6 +478,7 @@ const open = async (type, id) => {
dialogVisible.value = true
dialogTitle.value = type == 'create' ? '新增班型' : '修改班型'
formType.value = type
currentTab.value = 'base'
resetForm()
if (!opts.value.length) {
const arr = await ClassApi.getCommissionParams()
@ -489,6 +492,37 @@ const open = async (type, id) => {
try {
formData.value = await ClassApi.getClassType(id)
formData.value.schPlace = [formData.value.schoolId, formData.value.placeId]
if (!formData.value.companyProfitVO) {
profitCompanyForm.value = {
profitMode: 1,
dangwei: [],
profitRule: {}
}
} else if (formData.value.companyProfitVO.profitMode == 1) {
profitCompanyForm.value = { ...formData.value.companyProfitVO, dangwei: [] }
} else {
profitCompanyForm.value = {
...formData.value.companyProfitVO,
dangwei: formData.value.companyProfitVO.profitRule
}
profitCompanyForm.value.profitRule = {}
}
if (!formData.value.personProfitVO) {
profitEmployeeForm.value = {
profitMode: 1,
dangwei: [],
profitRule: {}
}
} else if (formData.value.personProfitVO.profitMode == 1) {
profitEmployeeForm.value = { ...formData.value.personProfitVO, dangwei: [] }
} else {
profitEmployeeForm.value = {
...formData.value.personProfitVO,
dangwei: formData.value.personProfitVO.profitRule
}
profitEmployeeForm.value.profitRule = {}
}
} finally {
formLoading.value = false
}
@ -579,6 +613,51 @@ async function submitForm() {
delete data.schPlace
delete data.percentages
data.percentages = { ...comissionForm.value }
data.companyProfitVO = { ...profitCompanyForm.value }
data.personProfitVO = { ...profitEmployeeForm.value }
if (data.companyProfitVO.profitMode == 1) {
data.companyProfitVO.profitRule.minPrice = data.companyProfitVO.profitRule.minPrice || 0
if (!data.companyProfitVO.profitRule.mark || !data.companyProfitVO.profitRule.rate) {
message.info('请将公司利润计算规则填写完整!')
return
}
} else {
data.companyProfitVO.profitRule = data.companyProfitVO?.dangwei || []
delete data.companyProfitVO.dangwei
if (data.companyProfitVO.profitRule.length == 0) {
message.info('请添加公司利润计算规则!')
return
} else if (
data.companyProfitVO.profitRule.some(
(it) => it.signPrice == undefined || it.profit == undefined
)
) {
message.info('请将公司利润计算规则填写完整!')
return
}
}
if (data.personProfitVO.profitMode == 1) {
data.personProfitVO.profitRule.minPrice = data.personProfitVO.profitRule.minPrice || 0
if (!data.personProfitVO.profitRule.mark || !data.personProfitVO.profitRule.rate) {
message.info('请将员工利润计算规则填写完整!')
return
}
} else {
data.personProfitVO.profitRule = data.personProfitVO?.dangwei || []
delete data.personProfitVO.dangwei
if (data.personProfitVO.profitRule.length == 0) {
message.info('请添加员工利润计算规则!')
return
} else if (
data.personProfitVO.profitRule.some(
(it) => it.signPrice == undefined || it.profit == undefined
)
) {
message.info('请将员工利润计算规则填写完整!')
return
}
}
if (formType.value === 'create') {
await ClassApi.createClassType(data)
message.success(t('common.createSuccess'))

@ -82,7 +82,13 @@
/>
<el-table-column label="备注" width="260">
<template #default="{ row }">
<div v-dompurify-html="row.remark"></div>
<!-- <div v-dompurify-html="row.remark"></div> -->
<el-popover placement="top" width="500px" trigger="click">
<template #reference>
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
</template>
<div v-dompurify-html="row.remark"></div>
</el-popover>
</template>
</el-table-column>
<el-table-column label="状态" width="80">
@ -154,6 +160,7 @@ import DialogClass from './Comp/DialogClass.vue'
import { checkPermi } from '@/utils/permission'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { removeNullField } from '@/utils'
const message = useMessage() //
@ -198,8 +205,7 @@ const columns = [
{ props: 'placeName', label: '场地' },
{ props: 'typeName', label: '班型名称' },
{ props: 'licenseType', label: '驾照类型', width: '100px' },
{ props: 'guidingPrice', label: '最新报价', width: '100px' },
{ props: 'minPrice', label: '最新底价', width: '100px' }
{ props: 'guidingPrice', label: '最新报价', width: '100px' }
// { props: 'remark', label: '', width: '100px' }
]
@ -219,7 +225,7 @@ async function getList() {
}
}
delete params.schPlace
const data = await ClassApi.getClassTypePage(params)
const data = await ClassApi.getClassTypePage(removeNullField(params))
tableList.value = data.list
total.value = data.total
} finally {

Loading…
Cancel
Save