|
|
@ -11,9 +11,9 @@ |
|
|
|
<el-input v-model="searchForm.phone" placeholder="联系方式" clearable /> |
|
|
|
<el-input v-model="searchForm.phone" placeholder="联系方式" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="searchForm.settleType" placeholder="结算类型" clearable filterable> |
|
|
|
<el-select v-model="searchForm.settlementType" placeholder="结算类型" clearable filterable> |
|
|
|
<el-option label="报名费" :value="1" /> |
|
|
|
<el-option label="货款" value="货款" /> |
|
|
|
<el-option label="其他支出" :value="2" /> |
|
|
|
<el-option label="其他支出" value="其他支出" /> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
@ -39,11 +39,11 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="searchForm.productId" |
|
|
|
v-model="searchForm.signProduct" |
|
|
|
placeholder="选择成交产品" |
|
|
|
placeholder="选择成交产品" |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
@change="searchForm.specsId = undefined" |
|
|
|
@change="searchForm.signSpecs = undefined" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in prodOptions" |
|
|
|
v-for="item in prodOptions" |
|
|
@ -55,14 +55,14 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-select |
|
|
|
<el-select |
|
|
|
v-model="searchForm.specsId" |
|
|
|
v-model="searchForm.signSpecs" |
|
|
|
placeholder="选择规格" |
|
|
|
placeholder="选择规格" |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
:disabled="!searchForm.productId" |
|
|
|
:disabled="!searchForm.signProduct" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in specsOptions(searchForm.productId)" |
|
|
|
v-for="item in specsOptions(searchForm.signProduct)" |
|
|
|
:key="item.specsId" |
|
|
|
:key="item.specsId" |
|
|
|
:label="item.specsName" |
|
|
|
:label="item.specsName" |
|
|
|
:value="item.specsId" |
|
|
|
:value="item.specsId" |
|
|
@ -80,9 +80,9 @@ |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-radio-group v-model="searchForm.settleStatus"> |
|
|
|
<el-radio-group v-model="searchForm.settlementState"> |
|
|
|
<el-radio :label="1"> 已结算 </el-radio> |
|
|
|
<el-radio :label="1"> 已结算 </el-radio> |
|
|
|
<el-radio :label="2"> 未结算 </el-radio> |
|
|
|
<el-radio :label="0"> 待结算 </el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
@ -101,38 +101,42 @@ |
|
|
|
:summary-method="getSummaries" |
|
|
|
:summary-method="getSummaries" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="60" /> |
|
|
|
<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="signId" label="成交单号" min-width="120px" /> |
|
|
|
<el-table-column prop="name" 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="phone" label="联系方式" width="120px" /> |
|
|
|
<el-table-column prop="signUserName" label="登记人" min-width="90" /> |
|
|
|
<el-table-column prop="signUserName" label="登记人" min-width="90" /> |
|
|
|
<el-table-column prop="dealDate" label="登记时间" width="120px" :formatter="dateFormatter" /> |
|
|
|
<el-table-column prop="dealDate" label="登记时间" width="120px" :formatter="dateFormatter" /> |
|
|
|
<el-table-column prop="productName" label="成交产品" min-width="150px" /> |
|
|
|
<el-table-column prop="signProduct" label="成交产品" min-width="150px" /> |
|
|
|
<el-table-column prop="specsName" label="成交规格" min-width="150px" /> |
|
|
|
<el-table-column prop="signSpecs" label="成交规格" min-width="150px" /> |
|
|
|
<el-table-column prop="signNum" label="成交数量" min-width="150px" /> |
|
|
|
<el-table-column prop="supplier" label="供应商" min-width="150px" /> |
|
|
|
<el-table-column prop="" label="供应商" min-width="150px" /> |
|
|
|
<el-table-column prop="settlementPrice" label="结算单价" min-width="150px" /> |
|
|
|
<el-table-column prop="signClass" label="结算单价" min-width="150px" /> |
|
|
|
<el-table-column prop="settlementNum" label="结算数量" min-width="150px" /> |
|
|
|
<el-table-column prop="settleNum" label="结算数量" min-width="150px" /> |
|
|
|
<el-table-column prop="settlementMoney" label="结算金额" min-width="150px" /> |
|
|
|
<el-table-column prop="settleAmount" label="结算金额" min-width="150px" /> |
|
|
|
|
|
|
|
<el-table-column label="费用备注" width="90px"> |
|
|
|
<el-table-column label="费用备注" width="90px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.feeRemark"> |
|
|
|
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.extraRemark"> |
|
|
|
<template #reference> |
|
|
|
<template #reference> |
|
|
|
<el-button type="primary" style="padding: 0" text>点击查看</el-button> |
|
|
|
<el-button type="primary" style="padding: 0" text>点击查看</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<div v-dompurify-html="scope.row.feeRemark"></div> |
|
|
|
<div v-dompurify-html="scope.row.extraRemark"></div> |
|
|
|
</el-popover> |
|
|
|
</el-popover> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
prop="settleTime" |
|
|
|
prop="settlementDate" |
|
|
|
label="结算时间" |
|
|
|
label="结算时间" |
|
|
|
width="120px" |
|
|
|
width="120px" |
|
|
|
:formatter="dateFormatter" |
|
|
|
:formatter="dateFormatter" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<el-table-column prop="settleUser" label="结算人" min-width="90px" /> |
|
|
|
<el-table-column prop="settlementUserName" label="结算人" min-width="90px" /> |
|
|
|
<el-table-column prop="settleType" label="结算类型" width="90px" fixed="right" /> |
|
|
|
<el-table-column prop="settlementType" label="结算类型" width="90px" fixed="right" /> |
|
|
|
<el-table-column prop="settleStatus" label="结算状态" width="90px" fixed="right" /> |
|
|
|
<el-table-column prop="settlementState" label="结算状态" width="90px" fixed="right" /> |
|
|
|
<el-table-column label="结算备注" width="90px"> |
|
|
|
<el-table-column label="结算备注" width="90px"> |
|
|
|
<template #default="scope"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.remark"> |
|
|
|
<el-popover placement="top" width="500px" trigger="click" v-if="scope.row.remark"> |
|
|
@ -152,6 +156,9 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
<el-dialog title="批量结算" v-model="showDailog" width="600px"> |
|
|
|
<el-dialog title="批量结算" v-model="showDailog" width="600px"> |
|
|
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px"> |
|
|
|
<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"> |
|
|
|
<el-form-item label="结算备注" prop="remark"> |
|
|
|
<Editor v-model:modelValue="form.remark" /> |
|
|
|
<Editor v-model:modelValue="form.remark" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -168,12 +175,13 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script setup name="SchoolSettle"> |
|
|
|
<script setup name="MallSettle"> |
|
|
|
import { getSimpleUserList as getUserOption } from '@/api/system/user' |
|
|
|
import { getSimpleUserList as getUserOption } from '@/api/system/user' |
|
|
|
import { getSimpleProductList } from '@/api/mall/product' |
|
|
|
import { getSimpleProductList } from '@/api/mall/product' |
|
|
|
import * as SettleApi from '@/api/clue/settle' |
|
|
|
import * as SettleApi from '@/api/clue/settle' |
|
|
|
|
|
|
|
|
|
|
|
import { getDictOptions } from '@/utils/dict' |
|
|
|
import { getDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
import { removeNullField } from '@/utils/index' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -188,12 +196,11 @@ const searchForm = ref({ |
|
|
|
phone: undefined, |
|
|
|
phone: undefined, |
|
|
|
signUser: undefined, |
|
|
|
signUser: undefined, |
|
|
|
dealDate: [], |
|
|
|
dealDate: [], |
|
|
|
productId: undefined, |
|
|
|
signProduct: undefined, |
|
|
|
specsId: undefined, |
|
|
|
signSpecs: undefined, |
|
|
|
signClass: undefined, |
|
|
|
|
|
|
|
signId: undefined, |
|
|
|
signId: undefined, |
|
|
|
settleStatus: 2, |
|
|
|
settlementState: 0, |
|
|
|
settleType: undefined, |
|
|
|
settlementType: undefined, |
|
|
|
supplier: undefined, |
|
|
|
supplier: undefined, |
|
|
|
pageSize: 20, |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1 |
|
|
|
pageNo: 1 |
|
|
@ -205,13 +212,12 @@ function handleReset() { |
|
|
|
phone: undefined, |
|
|
|
phone: undefined, |
|
|
|
signUser: undefined, |
|
|
|
signUser: undefined, |
|
|
|
dealDate: [], |
|
|
|
dealDate: [], |
|
|
|
signSchool: undefined, |
|
|
|
signProduct: undefined, |
|
|
|
signPlace: undefined, |
|
|
|
signSpecs: undefined, |
|
|
|
signClass: undefined, |
|
|
|
|
|
|
|
signId: undefined, |
|
|
|
signId: undefined, |
|
|
|
settleType: undefined, |
|
|
|
settlementState: 0, |
|
|
|
|
|
|
|
settlementType: undefined, |
|
|
|
supplier: undefined, |
|
|
|
supplier: undefined, |
|
|
|
settleStatus: 2, |
|
|
|
|
|
|
|
pageSize: 20, |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1 |
|
|
|
pageNo: 1 |
|
|
|
} |
|
|
|
} |
|
|
@ -225,12 +231,16 @@ function handleSearch() { |
|
|
|
const loading = ref(false) |
|
|
|
const loading = ref(false) |
|
|
|
const tableList = ref([]) |
|
|
|
const tableList = ref([]) |
|
|
|
const total = ref(0) |
|
|
|
const total = ref(0) |
|
|
|
|
|
|
|
const totalNum = ref(0) |
|
|
|
|
|
|
|
const totalAmount = ref(0) |
|
|
|
async function getList() { |
|
|
|
async function getList() { |
|
|
|
loading.value = true |
|
|
|
loading.value = true |
|
|
|
try { |
|
|
|
try { |
|
|
|
const data = await SettleApi.getSettlePage(searchForm.value) |
|
|
|
const data = await SettleApi.getMallSettlePage(removeNullField(searchForm.value)) |
|
|
|
tableList.value = data.list |
|
|
|
tableList.value = data.list |
|
|
|
total.value = data.total |
|
|
|
total.value = data.total |
|
|
|
|
|
|
|
totalNum.value = data.totalNum |
|
|
|
|
|
|
|
totalAmount.value = data.totalAmount |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
loading.value = false |
|
|
|
loading.value = false |
|
|
|
} |
|
|
|
} |
|
|
@ -243,9 +253,9 @@ function getSummaries(param) { |
|
|
|
if (index === 0) { |
|
|
|
if (index === 0) { |
|
|
|
sums[index] = '合计' |
|
|
|
sums[index] = '合计' |
|
|
|
} else if (column.property == 'settleNum') { |
|
|
|
} else if (column.property == 'settleNum') { |
|
|
|
sums[index] = 123 |
|
|
|
sums[index] = totalNum.value |
|
|
|
} else if (column.property == 'settleAmount') { |
|
|
|
} else if (column.property == 'settleAmount') { |
|
|
|
sums[index] = 54321 |
|
|
|
sums[index] = totalAmount.value |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
sums[index] = '' |
|
|
|
sums[index] = '' |
|
|
|
} |
|
|
|
} |
|
|
@ -254,9 +264,9 @@ function getSummaries(param) { |
|
|
|
return sums |
|
|
|
return sums |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const batchIds = ref([]) |
|
|
|
const selectList = ref([]) |
|
|
|
function handleSelectionChange(val) { |
|
|
|
function handleSelectionChange(val) { |
|
|
|
batchIds.value = val.map((it) => it.id) |
|
|
|
selectList.value = [...val] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const showDailog = ref(false) |
|
|
|
const showDailog = ref(false) |
|
|
@ -267,13 +277,15 @@ const rules = { |
|
|
|
remark: { required: true, message: '结算备注不可为空', trigger: 'change,blur' } |
|
|
|
remark: { required: true, message: '结算备注不可为空', trigger: 'change,blur' } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const settleAmount = ref(0) |
|
|
|
function batchSettle() { |
|
|
|
function batchSettle() { |
|
|
|
if (batchIds.value.length) { |
|
|
|
if (selectList.value.length) { |
|
|
|
showDailog.value = true |
|
|
|
showDailog.value = true |
|
|
|
form.value = { |
|
|
|
form.value = { |
|
|
|
signIds: batchIds.value, |
|
|
|
settlementIds: selectList.value.map((it) => it.settlementId), |
|
|
|
reamrk: undefined |
|
|
|
reamrk: undefined |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
settleAmount.value = selectList.value.reduce((pre, cur) => pre + cur.settlementMoney, 0) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
message.info('请选择表格数据!') |
|
|
|
message.info('请选择表格数据!') |
|
|
|
} |
|
|
|
} |
|
|
@ -281,12 +293,12 @@ function batchSettle() { |
|
|
|
|
|
|
|
|
|
|
|
async function handleSaveSettle() { |
|
|
|
async function handleSaveSettle() { |
|
|
|
if (!formRef.value) return |
|
|
|
if (!formRef.value) return |
|
|
|
const valid = await formRef.value.getElFormRef().validate() |
|
|
|
const valid = await formRef.value.validate() |
|
|
|
if (!valid) return |
|
|
|
if (!valid) return |
|
|
|
try { |
|
|
|
try { |
|
|
|
formLoading.value = true |
|
|
|
formLoading.value = true |
|
|
|
await SettleApi.batchSaveSettle(form.value) |
|
|
|
await SettleApi.batchSaveSettle(form.value) |
|
|
|
message.success(data) |
|
|
|
message.success('结算成功') |
|
|
|
showDailog.value = false |
|
|
|
showDailog.value = false |
|
|
|
getList() |
|
|
|
getList() |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|