Merge branch 'main' of http://114.55.169.15:3000/qiushanhe/ss-crm-manage-web
commit
ed4522b043
@ -0,0 +1,26 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询招生结算列表
|
||||
export const getSchoolSettlePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/sch/page', params }) |
||||
} |
||||
|
||||
// 查询招生结算详情
|
||||
export const getSchoolSettleDetail = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/sch/get?id=' + id }) |
||||
} |
||||
|
||||
// 查询进销存结算列表
|
||||
export const getMallSettlePage = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/erp/page', params }) |
||||
} |
||||
|
||||
// 查询进销存结算详情
|
||||
export const getMallSettleDetail = async (id) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-settlement/erp/get?id=' + id }) |
||||
} |
||||
|
||||
// 批量结算
|
||||
export const batchSaveSettle = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', data }) |
||||
} |
@ -0,0 +1,335 @@ |
||||
<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.settlementType" placeholder="结算类型" clearable filterable> |
||||
<el-option label="货款" value="货款" /> |
||||
<el-option label="其他支出" value="其他支出" /> |
||||
</el-select> |
||||
</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.signProduct" |
||||
placeholder="选择成交产品" |
||||
filterable |
||||
clearable |
||||
@change="searchForm.signSpecs = undefined" |
||||
> |
||||
<el-option |
||||
v-for="item in prodOptions" |
||||
:key="item.productId" |
||||
:label="item.productName" |
||||
:value="item.productId" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-select |
||||
v-model="searchForm.signSpecs" |
||||
placeholder="选择规格" |
||||
filterable |
||||
clearable |
||||
:disabled="!searchForm.signProduct" |
||||
> |
||||
<el-option |
||||
v-for="item in specsOptions(searchForm.signProduct)" |
||||
:key="item.specsId" |
||||
:label="item.specsName" |
||||
:value="item.specsId" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-select v-model="searchForm.supplier" placeholder="选择供应商" filterable clearable> |
||||
<el-option |
||||
v-for="item in supplierOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-radio-group v-model="searchForm.settlementState"> |
||||
<el-radio :label="1"> 已结算 </el-radio> |
||||
<el-radio :label="0"> 待结算 </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 |
||||
show-summary |
||||
:summary-method="getSummaries" |
||||
@selection-change="handleSelectionChange" |
||||
> |
||||
<el-table-column |
||||
type="selection" |
||||
width="60" |
||||
fixed="left" |
||||
:selectable="(row) => row.settlementState == '待结算'" |
||||
/> |
||||
<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="signProduct" label="成交产品" min-width="150px" /> |
||||
<el-table-column prop="signSpecs" label="成交规格" min-width="150px" /> |
||||
<el-table-column prop="supplier" label="供应商" min-width="150px" /> |
||||
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px" /> |
||||
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" /> |
||||
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" /> |
||||
<el-table-column label="费用备注" width="90px"> |
||||
<template #default="scope"> |
||||
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.extraRemark"> |
||||
<template #reference> |
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button> |
||||
</template> |
||||
<div v-dompurify-html="scope.row.extraRemark"></div> |
||||
</el-popover> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column |
||||
prop="settlementDate" |
||||
label="结算时间" |
||||
width="120px" |
||||
:formatter="dateFormatter" |
||||
/> |
||||
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" /> |
||||
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" /> |
||||
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" /> |
||||
<el-table-column label="结算备注" width="90px"> |
||||
<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.remark"></div> |
||||
</el-popover> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<Pagination |
||||
v-model:limit="searchForm.pageSize" |
||||
v-model:page="searchForm.pageNo" |
||||
:total="total" |
||||
@pagination="getList" |
||||
/> |
||||
<el-dialog title="批量结算" v-model="showDailog" width="600px"> |
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px"> |
||||
<el-form-item label="结算金额"> |
||||
{{ settleAmount }} |
||||
</el-form-item> |
||||
<el-form-item label="结算备注" prop="remark"> |
||||
<Editor v-model:modelValue="form.remark" /> |
||||
</el-form-item> |
||||
</el-form> |
||||
<template #footer> |
||||
<span> |
||||
<el-button @click="showDailog = false">取 消</el-button> |
||||
<el-button :disabled="formLoading" type="primary" @click="handleSaveSettle"> |
||||
确 定 |
||||
</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="MallSettle"> |
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user' |
||||
import { getSimpleProductList } from '@/api/mall/product' |
||||
import * as SettleApi from '@/api/clue/settle' |
||||
|
||||
import { getDictOptions } from '@/utils/dict' |
||||
import { removeNullField } from '@/utils/index' |
||||
import { dateFormatter } from '@/utils/formatTime' |
||||
|
||||
const message = useMessage() // 消息弹窗 |
||||
|
||||
onMounted(() => { |
||||
getOptions() |
||||
handleSearch() |
||||
}) |
||||
|
||||
const searchForm = ref({ |
||||
name: undefined, |
||||
phone: undefined, |
||||
signUser: undefined, |
||||
dealDate: [], |
||||
signProduct: undefined, |
||||
signSpecs: undefined, |
||||
signId: undefined, |
||||
settlementState: 0, |
||||
settlementType: undefined, |
||||
supplier: undefined, |
||||
pageSize: 20, |
||||
pageNo: 1 |
||||
}) |
||||
|
||||
function handleReset() { |
||||
searchForm.value = { |
||||
name: undefined, |
||||
phone: undefined, |
||||
signUser: undefined, |
||||
dealDate: [], |
||||
signProduct: undefined, |
||||
signSpecs: undefined, |
||||
signId: undefined, |
||||
settlementState: 0, |
||||
settlementType: undefined, |
||||
supplier: undefined, |
||||
pageSize: 20, |
||||
pageNo: 1 |
||||
} |
||||
} |
||||
|
||||
function handleSearch() { |
||||
searchForm.value.pageNo = 1 |
||||
getList() |
||||
} |
||||
|
||||
const loading = ref(false) |
||||
const tableList = ref([]) |
||||
const total = ref(0) |
||||
const totalNum = ref(0) |
||||
const totalAmount = ref(0) |
||||
async function getList() { |
||||
loading.value = true |
||||
try { |
||||
const data = await SettleApi.getMallSettlePage(removeNullField(searchForm.value)) |
||||
tableList.value = data.list |
||||
total.value = data.total |
||||
totalNum.value = data.totalNum |
||||
totalAmount.value = data.totalAmount |
||||
} finally { |
||||
loading.value = false |
||||
} |
||||
} |
||||
|
||||
function getSummaries(param) { |
||||
const { columns } = param |
||||
const sums = [] |
||||
columns.forEach((column, index) => { |
||||
if (index === 0) { |
||||
sums[index] = '合计' |
||||
} else if (column.property == 'settlementNum') { |
||||
sums[index] = totalNum.value |
||||
} else if (column.property == 'settlementMoney') { |
||||
sums[index] = totalAmount.value |
||||
} else { |
||||
sums[index] = '' |
||||
} |
||||
}) |
||||
|
||||
return sums |
||||
} |
||||
|
||||
const selectList = ref([]) |
||||
function handleSelectionChange(val) { |
||||
selectList.value = [...val] |
||||
} |
||||
|
||||
const showDailog = ref(false) |
||||
const form = ref({}) |
||||
const formRef = ref() |
||||
const formLoading = ref(false) |
||||
const rules = { |
||||
remark: { required: true, message: '结算备注不可为空', trigger: 'change,blur' } |
||||
} |
||||
|
||||
const settleAmount = ref(0) |
||||
function batchSettle() { |
||||
if (selectList.value.length) { |
||||
showDailog.value = true |
||||
form.value = { |
||||
settlementIds: selectList.value.map((it) => it.settlementId), |
||||
reamrk: undefined |
||||
} |
||||
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0) |
||||
} else { |
||||
message.info('请选择表格数据!') |
||||
} |
||||
} |
||||
|
||||
async function handleSaveSettle() { |
||||
if (!formRef.value) return |
||||
const valid = await formRef.value.validate() |
||||
if (!valid) return |
||||
try { |
||||
formLoading.value = true |
||||
await SettleApi.batchSaveSettle(form.value) |
||||
message.success('结算成功') |
||||
showDailog.value = false |
||||
getList() |
||||
} finally { |
||||
formLoading.value = false |
||||
} |
||||
} |
||||
|
||||
const userOptions = ref([]) |
||||
const prodOptions = ref([]) |
||||
const supplierOptions = getDictOptions('erp_supplier') |
||||
|
||||
function getOptions() { |
||||
// 产品 |
||||
getSimpleProductList().then((data) => { |
||||
prodOptions.value = data |
||||
}) |
||||
getUserOption().then((data) => { |
||||
userOptions.value = data |
||||
}) |
||||
} |
||||
|
||||
const specsOptions = computed({ |
||||
get() { |
||||
return (prodId) => { |
||||
if (prodId) { |
||||
return prodOptions.value.find((it) => it.productId == prodId).productSpecList |
||||
} |
||||
return [] |
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,353 @@ |
||||
<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.settlementType" placeholder="结算类型" clearable filterable> |
||||
<el-option label="报名费" value="报名费" /> |
||||
<el-option label="其他支出" value="其他支出" /> |
||||
</el-select> |
||||
</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.settlementState"> |
||||
<el-radio :label="1"> 已结算 </el-radio> |
||||
<el-radio :label="0"> 待结算 </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 |
||||
show-summary |
||||
:summary-method="getSummaries" |
||||
@selection-change="handleSelectionChange" |
||||
> |
||||
<el-table-column |
||||
type="selection" |
||||
width="60" |
||||
fixed="left" |
||||
:selectable="(row) => row.settlementState == '待结算'" |
||||
/> |
||||
<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="settlementPrice" label="结算单价" min-width="150px" /> |
||||
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" /> |
||||
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" /> |
||||
<el-table-column label="费用备注" width="90px"> |
||||
<template #default="scope"> |
||||
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.extraRemark"> |
||||
<template #reference> |
||||
<el-button type="primary" style="padding: 0" text>点击查看</el-button> |
||||
</template> |
||||
<div v-dompurify-html="scope.row.extraRemark"></div> |
||||
</el-popover> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column |
||||
prop="settlementDate" |
||||
label="结算时间" |
||||
width="120px" |
||||
:formatter="dateFormatter" |
||||
/> |
||||
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" /> |
||||
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" /> |
||||
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" /> |
||||
<el-table-column label="结算备注" width="90px"> |
||||
<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.remark"></div> |
||||
</el-popover> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<Pagination |
||||
v-model:limit="searchForm.pageSize" |
||||
v-model:page="searchForm.pageNo" |
||||
:total="total" |
||||
@pagination="getList" |
||||
/> |
||||
|
||||
<el-dialog title="批量结算" v-model="showDailog" width="600px"> |
||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px"> |
||||
<el-form-item label="结算金额"> |
||||
{{ settleAmount }} |
||||
</el-form-item> |
||||
<el-form-item label="结算备注" prop="remark"> |
||||
<Editor v-model:modelValue="form.remark" /> |
||||
</el-form-item> |
||||
</el-form> |
||||
<template #footer> |
||||
<span> |
||||
<el-button @click="showDailog = false">取 消</el-button> |
||||
<el-button :disabled="formLoading" type="primary" @click="handleSaveSettle"> |
||||
确 定 |
||||
</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="SchoolSettle"> |
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user' |
||||
import { getPlaceList } from '@/api/school/place' |
||||
import { getClassTypeList } from '@/api/school/class' |
||||
import * as SettleApi from '@/api/clue/settle' |
||||
|
||||
import { dateFormatter } from '@/utils/formatTime' |
||||
import { removeNullField } from '@/utils/index' |
||||
|
||||
const message = useMessage() // 消息弹窗 |
||||
|
||||
onMounted(() => { |
||||
getOptions() |
||||
handleSearch() |
||||
}) |
||||
|
||||
const searchForm = ref({ |
||||
name: undefined, |
||||
phone: undefined, |
||||
signUser: undefined, |
||||
dealDate: [], |
||||
signSchool: undefined, |
||||
signPlace: undefined, |
||||
signClass: undefined, |
||||
signId: undefined, |
||||
settlementType: undefined, |
||||
settlementState: 0, |
||||
pageSize: 20, |
||||
pageNo: 1 |
||||
}) |
||||
|
||||
function handleReset() { |
||||
searchForm.value = { |
||||
name: undefined, |
||||
phone: undefined, |
||||
signUser: undefined, |
||||
dealDate: [], |
||||
signSchool: undefined, |
||||
signPlace: undefined, |
||||
signClass: undefined, |
||||
signId: undefined, |
||||
settlementType: undefined, |
||||
settlementState: 0, |
||||
pageSize: 20, |
||||
pageNo: 1 |
||||
} |
||||
} |
||||
|
||||
function handleSearch() { |
||||
searchForm.value.pageNo = 1 |
||||
getList() |
||||
} |
||||
|
||||
const loading = ref(false) |
||||
const tableList = ref([]) |
||||
const total = ref(0) |
||||
|
||||
const totalNum = ref(0) |
||||
const totalAmount = ref(0) |
||||
async function getList() { |
||||
loading.value = true |
||||
try { |
||||
const data = await SettleApi.getSchoolSettlePage(removeNullField(searchForm.value)) |
||||
tableList.value = data.list |
||||
total.value = data.total |
||||
totalNum.value = data.totalNum |
||||
totalAmount.value = data.totalAmount |
||||
} finally { |
||||
loading.value = false |
||||
} |
||||
} |
||||
|
||||
function getSummaries(param) { |
||||
const { columns } = param |
||||
const sums = [] |
||||
columns.forEach((column, index) => { |
||||
if (index === 0) { |
||||
sums[index] = '合计' |
||||
} else if (column.property == 'settlementNum') { |
||||
sums[index] = totalNum.value |
||||
} else if (column.property == 'settlementMoney') { |
||||
sums[index] = totalAmount.value |
||||
} else { |
||||
sums[index] = '' |
||||
} |
||||
}) |
||||
|
||||
return sums |
||||
} |
||||
|
||||
const selectList = ref([]) |
||||
function handleSelectionChange(val) { |
||||
selectList.value = [...val] |
||||
} |
||||
|
||||
const showDailog = ref(false) |
||||
const form = ref({}) |
||||
const formRef = ref() |
||||
const formLoading = ref(false) |
||||
const rules = { |
||||
remark: { required: true, message: '结算备注不可为空', trigger: 'change,blur' } |
||||
} |
||||
|
||||
const settleAmount = ref(0) |
||||
function batchSettle() { |
||||
if (selectList.value.length) { |
||||
showDailog.value = true |
||||
form.value = { |
||||
settlementIds: selectList.value.map((it) => it.settlementId), |
||||
reamrk: undefined |
||||
} |
||||
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0) |
||||
} else { |
||||
message.info('请选择表格数据!') |
||||
} |
||||
} |
||||
|
||||
async function handleSaveSettle() { |
||||
if (!formRef.value) return |
||||
const valid = await formRef.value.validate() |
||||
if (!valid) return |
||||
try { |
||||
formLoading.value = true |
||||
await SettleApi.batchSaveSettle(form.value) |
||||
message.success('结算成功') |
||||
showDailog.value = false |
||||
getList() |
||||
} finally { |
||||
formLoading.value = false |
||||
} |
||||
} |
||||
|
||||
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 getClassTypeList({ placeId: searchForm.value.signPlace, status: 0 }) |
||||
classOptions.value = data |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,16 @@ |
||||
<template> |
||||
<div> |
||||
<SchoolSettle v-if="appStore.getAppInfo?.instanceType == 1" /> |
||||
<MallSettle v-else /> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="Settle"> |
||||
import { useAppStore } from '@/store/modules/app' |
||||
import SchoolSettle from './SchoolSettle.vue' |
||||
import MallSettle from './MallSettle.vue' |
||||
|
||||
const appStore = useAppStore() |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -1,98 +0,0 @@ |
||||
// import { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||||
import { dateFormatter } from '@/utils/formatTime' |
||||
// import * as MailAccountApi from '@/api/system/mail/account'
|
||||
|
||||
// const userList = await MailAccountApi.getSimpleMailAccountList()
|
||||
const userList = [] |
||||
|
||||
const crudSchemas = reactive([ |
||||
{ |
||||
label: '订单号', |
||||
field: 'orderNo', |
||||
isSearch: true, |
||||
isTable: true |
||||
}, |
||||
{ |
||||
label: '线索名称', |
||||
field: 'name', |
||||
isSearch: true, |
||||
isTable: true |
||||
}, |
||||
{ |
||||
label: '联系方式', |
||||
field: 'contact', |
||||
isSearch: true, |
||||
isTable: true |
||||
}, |
||||
{ |
||||
label: '线索来源', |
||||
field: 'resource', |
||||
isSearch: true, |
||||
isTable: true, |
||||
search: { |
||||
component: 'Select', |
||||
api: () => userList, |
||||
componentProps: { |
||||
optionsAlias: { |
||||
labelField: 'name', |
||||
valueField: 'id' |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
label: '跟进人员', |
||||
field: 'userId', |
||||
isSearch: true, |
||||
isTable: true, |
||||
search: { |
||||
component: 'Select', |
||||
api: () => userList, |
||||
componentProps: { |
||||
optionsAlias: { |
||||
labelField: 'name', |
||||
valueField: 'id' |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
label: '成交时间', |
||||
field: 'createTime', |
||||
isSearch: true, |
||||
isTable: true, |
||||
table: { |
||||
fixed: 'left' |
||||
}, |
||||
formatter: dateFormatter, |
||||
detail: { |
||||
dateFormat: 'YYYY-MM-DD' |
||||
}, |
||||
search: { |
||||
component: 'DatePicker', |
||||
componentProps: { |
||||
type: 'daterange', |
||||
format: 'YYYY-MM-DD', |
||||
valueFormat: 'YYYY-MM-DD', |
||||
startPlaceholder: '创建时间', |
||||
endPlaceholder: '创建时间' |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
label: '是否全款', |
||||
field: 'isFull', |
||||
isSearch: true, |
||||
isTable: true, |
||||
search: { |
||||
component: 'Radio', |
||||
componentProps: { |
||||
options: [ |
||||
{ label: '全款', value: 1 }, |
||||
{ label: '非全款', value: 0 } |
||||
] |
||||
} |
||||
} |
||||
} |
||||
]) |
||||
export const { allSchemas } = useCrudSchemas(crudSchemas) |
Loading…
Reference in new issue