salary
parent
1c37dbc5f8
commit
e3c85cbaae
@ -0,0 +1,16 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 查询(精简)列表
|
||||
export const getPaymentList = async (params) => { |
||||
return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params }) |
||||
} |
||||
|
||||
// 新增
|
||||
export const createPayment = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/create', data }) |
||||
} |
||||
|
||||
// 审核
|
||||
export const auditPayment = async (data) => { |
||||
return await request.post({ url: '/admin-api/crm/sign-pay-record/check', data }) |
||||
} |
@ -0,0 +1,150 @@ |
||||
<template> |
||||
<div> |
||||
<el-form :model="searchForm" label-width="0" inline> |
||||
<el-form-item> |
||||
<el-input v-model="searchForm.signId" placeholder="成交单号" /> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-input v-model="searchForm.name" placeholder="线索名称" /> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-select v-model="searchForm.dealUser" 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" |
||||
range-separator="-" |
||||
start-placeholder="登记日期" |
||||
end-placeholder="登记日期" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-select v-model="searchForm.createUser" 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.createDate" |
||||
type="daterange" |
||||
range-separator="-" |
||||
start-placeholder="申请日期" |
||||
end-placeholder="申请日期" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button @click="handleSearch">查询</el-button> |
||||
<el-button @click="handleReset">重置</el-button> |
||||
<el-button @click="batchAudit">批量审核</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
|
||||
<el-table :data="tableList" border> |
||||
<el-table-column prop="signId" label="成交单号" width="150px" /> |
||||
<el-table-column prop="name" label="线索名称" width="120px" /> |
||||
<el-table-column prop="phone" label="联系方式" width="150px" /> |
||||
<el-table-column prop="signId" label="售后原因" width="150px" /> |
||||
<el-table-column prop="signId" label="退款金额" width="90px" /> |
||||
<el-table-column prop="signId" label="是否退货" width="90px" /> |
||||
<el-table-column prop="signId" label="解决方案" width="150px" /> |
||||
<el-table-column prop="signId" label="备注" width="200px" /> |
||||
<el-table-column prop="signId" label="登记人" /> |
||||
<el-table-column prop="signId" label="登记时间" width="150px" /> |
||||
<el-table-column prop="signId" label="申请人" /> |
||||
<el-table-column prop="signId" label="申请时间" width="150px" /> |
||||
<el-table-column prop="signId" label="审核状态" fixed="right" width="90px" /> |
||||
<el-table-column label="操作" width="150px" fixed="right"> |
||||
<template #default="{ row }"> |
||||
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)"> |
||||
详情 |
||||
</el-button> |
||||
<el-button type="primary" style="padding: 0" text @click="handleCancel(row.id)"> |
||||
撤销 |
||||
</el-button> |
||||
<el-button type="primary" style="padding: 0" text @click="handleAudit(row.id)"> |
||||
审核 |
||||
</el-button> |
||||
</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="AfterSales"> |
||||
const searchForm = ref({ |
||||
signId: undefined, |
||||
name: undefined, |
||||
dealDate: [], |
||||
dealUser: undefined, |
||||
createDate: [], |
||||
createUser: undefined, |
||||
pageNo: 1, |
||||
pageSize: 20 |
||||
}) |
||||
|
||||
const userOptions = ref([]) |
||||
|
||||
const tableList = ref([]) |
||||
const total = ref(0) |
||||
|
||||
function handleSearch() { |
||||
searchForm.value.pageNo = 1 |
||||
getList() |
||||
} |
||||
|
||||
function handleReset() { |
||||
searchForm.value = { |
||||
signId: undefined, |
||||
name: undefined, |
||||
dealDate: [], |
||||
dealUser: undefined, |
||||
createDate: [], |
||||
createUser: undefined, |
||||
pageNo: 1, |
||||
pageSize: 20 |
||||
} |
||||
} |
||||
|
||||
function getList() { |
||||
tableList.value = [{ name: '测试' }] |
||||
} |
||||
|
||||
function batchAudit() { |
||||
console.log(123) |
||||
} |
||||
|
||||
function handleDetail(id) { |
||||
console.log(id) |
||||
} |
||||
function handleCancel(id) { |
||||
console.log(id) |
||||
} |
||||
function handleAudit(id) { |
||||
console.log(id) |
||||
} |
||||
|
||||
onMounted(() => { |
||||
handleSearch() |
||||
}) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,107 @@ |
||||
<template> |
||||
<Dialog title="成交详情" v-model="show" width="800px"> |
||||
<el-tabs v-model="tabName"> |
||||
<el-tab-pane label="线索信息" name="clueInfo"> |
||||
<Descriptions :data="clueInfo" :schema="clueSchema" :columns="2" labelWidth="130px" /> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="成交信息" name="orderInfo"> |
||||
<Descriptions :data="orderInfo" :schema="orderSchema" :columns="2" labelWidth="130px" /> |
||||
<el-divider direction="horizontal" content-position="left">额外支出</el-divider> |
||||
<el-table :data="orderInfo.extraPay" border stripe> |
||||
<el-table-column type="index" width="50" /> |
||||
<el-table-column prop="extraPayType" label="额外支出项" /> |
||||
<el-table-column prop="extraPayMoney" label="支出金额" /> |
||||
<el-table-column prop="remark" label="备注" /> |
||||
</el-table> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="回款记录" name="returnRecord"> |
||||
<el-table :data="returnRecord" border stripe> |
||||
<el-table-column type="index" width="50" /> |
||||
<el-table-column prop="money" label="回款金额" /> |
||||
<el-table-column prop="" label="回款日期" /> |
||||
<el-table-column prop="" label="是否结清" /> |
||||
<el-table-column prop="remark" label="备注" /> |
||||
<el-table-column prop="" label="审核状态" /> |
||||
</el-table> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
<div class="mb-15px"></div> |
||||
</Dialog> |
||||
</template> |
||||
|
||||
<script setup name="DialogOrder"> |
||||
import * as ClueApi from '@/api/clue' |
||||
import * as OrderApi from '@/api/clue/sign' |
||||
import { getSimpleFieldList as getClueFieldList } from '@/api/clue/clueField' |
||||
import { getSimpleFieldList as getOrderFieldList } from '@/api/clue/orderField' |
||||
import { getPaymentList } from '@/api/clue/payment' |
||||
|
||||
import { formatDate } from '@/utils/formatTime' |
||||
|
||||
const tabName = ref('clueInfo') |
||||
const show = ref(false) |
||||
const clueInfo = ref({}) |
||||
const orderInfo = ref({}) |
||||
const returnRecord = ref([]) |
||||
|
||||
function open(clueId, orderId) { |
||||
try { |
||||
show.value = true |
||||
tabName.value = 'clueInfo' |
||||
getFields() |
||||
ClueApi.getClue(clueId).then((data) => { |
||||
clueInfo.value = { ...data, ...data.diyParams } |
||||
}) |
||||
OrderApi.getSign(orderId).then((data) => { |
||||
orderInfo.value = { ...data, ...data.diyParams } |
||||
orderInfo.value.dealDate = formatDate(orderInfo.value.dealDate, 'YYYY-MM-DD HH:mm') |
||||
}) |
||||
getPaymentList({ signId: orderId }).then((data) => { |
||||
returnRecord.value = data |
||||
}) |
||||
} catch (error) { |
||||
console.log(error) |
||||
} |
||||
} |
||||
|
||||
const clueSchema = ref([]) |
||||
const orderSchema = ref([]) |
||||
function getFields() { |
||||
getClueFieldList().then((data) => { |
||||
const arr = useCrudSchemas(data).allSchemas.detailSchema |
||||
clueSchema.value = [ |
||||
...arr, |
||||
{ |
||||
field: 'requirement', |
||||
label: '诉求', |
||||
span: 2 |
||||
}, |
||||
{ |
||||
field: 'remark', |
||||
label: '备注', |
||||
span: 2, |
||||
isEditor: true |
||||
} |
||||
] |
||||
}) |
||||
|
||||
getOrderFieldList().then((data) => { |
||||
const arr = useCrudSchemas(data).allSchemas.detailSchema |
||||
orderSchema.value = [ |
||||
...arr, |
||||
{ |
||||
field: 'remark', |
||||
label: '备注', |
||||
span: 2, |
||||
isEditor: true |
||||
} |
||||
] |
||||
}) |
||||
} |
||||
|
||||
defineExpose({ |
||||
open |
||||
}) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,335 @@ |
||||
<template> |
||||
<div> |
||||
<!-- 搜索工作栏 --> |
||||
<div> |
||||
<el-form :model="searchForm" ref="moreSearchRef" inline label-width="0"> |
||||
<template v-if="appStore.getAppInfo?.instanceType == 1"> |
||||
<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> |
||||
</template> |
||||
<template v-else-if="appStore.getAppInfo?.instanceType == 2"> |
||||
<el-form-item> |
||||
<el-select |
||||
v-model="searchForm.signProduct" |
||||
placeholder="选择成交产品" |
||||
filterable |
||||
@change="searchForm.specsId = 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.specsId" |
||||
placeholder="选择规格" |
||||
filterable |
||||
: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> |
||||
</template> |
||||
</el-form> |
||||
<Search v-if="!loading" ref="searchRef" :schema="allSchemas.searchSchema" labelWidth="0"> |
||||
<template #actionMore> |
||||
<el-button @click="getTableList" v-hasPermi="['clue:order:search']"> 搜索 </el-button> |
||||
<el-button @click="resetQuery" v-hasPermi="['clue:order:reset']"> 重置 </el-button> |
||||
</template> |
||||
</Search> |
||||
</div> |
||||
<!-- 列表 --> |
||||
<SSTable |
||||
v-if="!loading" |
||||
class="mt-20px" |
||||
v-model:tableObject="tableObject" |
||||
:tableColumns="allSchemas.tableColumns" |
||||
@get-list="getTableList" |
||||
> |
||||
<el-table-column |
||||
v-for="item in allSchemas.tableColumns" |
||||
:key="item.field" |
||||
:prop="item.field" |
||||
:label="item.label" |
||||
min-width="120px" |
||||
/> |
||||
<el-table-column label="操作" width="200px" fixed="right"> |
||||
<template #default="scope"> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:detail']" |
||||
@click="handleDetail(scope.row)" |
||||
> |
||||
详情 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:after-sale']" |
||||
@click="sellAfter(scope.row)" |
||||
> |
||||
售后 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:after-sale-audit']" |
||||
> |
||||
售后审核 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
v-if="appStore.getAppInfo?.instanceType == 2" |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:send']" |
||||
> |
||||
发货 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:return']" |
||||
@click="feeBack(scope.row)" |
||||
> |
||||
回款 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:return-audit']" |
||||
> |
||||
回款确认 |
||||
</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</SSTable> |
||||
|
||||
<!-- 详情 --> |
||||
<DialogOrder ref="orderDetailDialog" /> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="ClueOrderList"> |
||||
import { getSimpleFieldList } from '@/api/clue/orderField' |
||||
import * as SignApi from '@/api/clue/sign' |
||||
import { getSimpleUserList as getUserOption } from '@/api/system/user' |
||||
import { getPlaceList } from '@/api/school/place' |
||||
import { getClassTypePage } from '@/api/school/class' |
||||
import { getSimpleProductList } from '@/api/mall/product' |
||||
|
||||
import DialogOrder from './DialogOrder.vue' |
||||
|
||||
import { removeNullField } from '@/utils' |
||||
import { useAppStore } from '@/store/modules/app' |
||||
|
||||
const appStore = useAppStore() |
||||
|
||||
const allSchemas = ref({}) |
||||
|
||||
const orderDetailDialog = ref() |
||||
const searchRef = ref() |
||||
const schoolOptions = ref([]) |
||||
const allPlaceOptions = ref([]) |
||||
const prodOptions = ref([]) |
||||
|
||||
const specsOptions = computed({ |
||||
get() { |
||||
return (prodId) => { |
||||
if (prodId) { |
||||
return prodOptions.value.find((it) => it.productId == prodId).productSpecList |
||||
} |
||||
return [] |
||||
} |
||||
} |
||||
}) |
||||
|
||||
const searchForm = ref({ |
||||
signSchool: undefined, |
||||
signPlace: undefined, |
||||
signClass: undefined, |
||||
signProduct: undefined |
||||
}) |
||||
|
||||
const tableObject = ref({ |
||||
tableList: [], |
||||
loading: false, |
||||
total: 1, |
||||
pageSize: 20, |
||||
currentPage: 1 |
||||
}) |
||||
|
||||
const placeOptions = computed(() => { |
||||
return allPlaceOptions.value.filter((it) => it.schoolId == searchForm.value.signSchool) |
||||
}) |
||||
|
||||
function resetQuery() { |
||||
searchForm.value = { |
||||
signSchool: undefined, |
||||
signPlace: undefined, |
||||
signClass: undefined, |
||||
signProduct: undefined |
||||
} |
||||
searchRef.value.reset() |
||||
tableObject.value.currentPage = 1 |
||||
getTableList() |
||||
} |
||||
// 查询 |
||||
async function getTableList() { |
||||
// 查询 |
||||
tableObject.value.loading = true |
||||
try { |
||||
const queryParams = await searchRef.value.getFormModel() |
||||
const params = { |
||||
...queryParams, |
||||
...searchForm.value, |
||||
pageNo: tableObject.value.currentPage, |
||||
pageSize: tableObject.value.pageSize |
||||
} |
||||
const data = await SignApi.getSignPage(removeNullField(params)) |
||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams })) |
||||
tableObject.value.total = data.total |
||||
} finally { |
||||
tableObject.value.loading = false |
||||
} |
||||
} |
||||
|
||||
const loading = ref(true) |
||||
async function getCurdSchemas() { |
||||
loading.value = true |
||||
try { |
||||
const data = await getSimpleFieldList() |
||||
data.forEach((elem) => { |
||||
if (elem.field == 'createUser') { |
||||
elem.search.options = userOptions.value |
||||
} |
||||
}) |
||||
allSchemas.value = useCrudSchemas(data).allSchemas |
||||
} finally { |
||||
loading.value = false |
||||
nextTick(() => { |
||||
getTableList() |
||||
}) |
||||
} |
||||
} |
||||
|
||||
// 详情 |
||||
function handleDetail(row) { |
||||
orderDetailDialog.value.open(row.clueId, row.signId) |
||||
} |
||||
|
||||
// 售后 |
||||
function sellAfter() { |
||||
// 方法体 |
||||
} |
||||
|
||||
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 |
||||
} |
||||
|
||||
function getOptions() { |
||||
if (appStore.getAppInfo?.instanceType == 1) { |
||||
// 驾校 |
||||
getPlaceList().then((data) => { |
||||
schoolOptions.value = data.schoolList |
||||
allPlaceOptions.value = data.placeList |
||||
}) |
||||
} else { |
||||
// 产品 |
||||
getSimpleProductList().then((data) => { |
||||
prodOptions.value = data |
||||
}) |
||||
} |
||||
} |
||||
|
||||
const userOptions = ref([]) |
||||
onMounted(() => { |
||||
getUserOption().then((data) => { |
||||
userOptions.value = data |
||||
getCurdSchemas() |
||||
}) |
||||
getOptions() |
||||
}) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,148 @@ |
||||
<template> |
||||
<div> |
||||
<el-form :model="searchForm" label-width="0" inline> |
||||
<el-form-item> |
||||
<el-input v-model="searchForm.signId" placeholder="成交单号" /> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-input v-model="searchForm.name" placeholder="线索名称" /> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-select v-model="searchForm.dealUser" 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" |
||||
range-separator="-" |
||||
start-placeholder="登记日期" |
||||
end-placeholder="登记日期" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-select v-model="searchForm.createUser" 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.createDate" |
||||
type="daterange" |
||||
range-separator="-" |
||||
start-placeholder="申请日期" |
||||
end-placeholder="申请日期" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button @click="handleSearch">查询</el-button> |
||||
<el-button @click="handleReset">重置</el-button> |
||||
<el-button @click="batchAudit">批量审核</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
|
||||
<el-table :data="tableList" border> |
||||
<el-table-column prop="signId" label="成交单号" width="150px" /> |
||||
<el-table-column prop="name" label="线索名称" /> |
||||
<el-table-column prop="phone" label="联系方式" width="150px" /> |
||||
<el-table-column prop="signId" label="回款金额" /> |
||||
<el-table-column prop="signId" label="是否结清" /> |
||||
<el-table-column prop="signId" label="备注" width="200px" /> |
||||
<el-table-column prop="signId" label="登记人" /> |
||||
<el-table-column prop="signId" label="登记时间" width="150px" /> |
||||
<el-table-column prop="signId" label="申请人" /> |
||||
<el-table-column prop="signId" label="申请时间" width="150px" /> |
||||
<el-table-column prop="signId" label="审核状态" fixed="right" /> |
||||
<el-table-column label="操作" width="150px" fixed="right"> |
||||
<template #default="{ row }"> |
||||
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)" |
||||
>详情</el-button |
||||
> |
||||
<el-button type="primary" style="padding: 0" text @click="handleCancel(row.id)" |
||||
>撤销</el-button |
||||
> |
||||
<el-button type="primary" style="padding: 0" text @click="handleAudit(row.id)" |
||||
>审核</el-button |
||||
> |
||||
</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="Reback"> |
||||
const searchForm = ref({ |
||||
signId: undefined, |
||||
name: undefined, |
||||
dealDate: [], |
||||
dealUser: undefined, |
||||
createDate: [], |
||||
createUser: undefined, |
||||
pageNo: 1, |
||||
pageSize: 20 |
||||
}) |
||||
|
||||
const userOptions = ref([]) |
||||
|
||||
const tableList = ref([]) |
||||
const total = ref(0) |
||||
|
||||
function handleSearch() { |
||||
searchForm.value.pageNo = 1 |
||||
getList() |
||||
} |
||||
|
||||
function handleReset() { |
||||
searchForm.value = { |
||||
signId: undefined, |
||||
name: undefined, |
||||
dealDate: [], |
||||
dealUser: undefined, |
||||
createDate: [], |
||||
createUser: undefined, |
||||
pageNo: 1, |
||||
pageSize: 20 |
||||
} |
||||
} |
||||
|
||||
function getList() { |
||||
tableList.value = [{ name: '测试' }] |
||||
} |
||||
|
||||
function batchAudit() { |
||||
console.log(123) |
||||
} |
||||
|
||||
function handleDetail(id) { |
||||
console.log(id) |
||||
} |
||||
function handleCancel(id) { |
||||
console.log(id) |
||||
} |
||||
function handleAudit(id) { |
||||
console.log(id) |
||||
} |
||||
|
||||
onMounted(() => { |
||||
handleSearch() |
||||
}) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -1,146 +1,28 @@ |
||||
<template> |
||||
<div> |
||||
<!-- 搜索工作栏 --> |
||||
<Search v-if="!loading" ref="searchRef" :schema="allSchemas.searchSchema" labelWidth="0"> |
||||
<template #actionMore> |
||||
<el-button @click="getTableList" v-hasPermi="['clue:order:search']"> 搜索 </el-button> |
||||
<el-button @click="resetQuery" v-hasPermi="['clue:order:reset']"> 重置 </el-button> |
||||
</template> |
||||
</Search> |
||||
<!-- 列表 --> |
||||
<SSTable |
||||
v-if="!loading" |
||||
class="mt-20px" |
||||
v-model:tableObject="tableObject" |
||||
:tableColumns="allSchemas.tableColumns" |
||||
@get-list="getTableList" |
||||
> |
||||
<el-table-column |
||||
v-for="item in allSchemas.tableColumns" |
||||
:key="item.field" |
||||
:prop="item.field" |
||||
:label="item.label" |
||||
min-width="120px" |
||||
/> |
||||
<el-table-column label="操作" width="200px" fixed="right"> |
||||
<template #default="scope"> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:after-sale']" |
||||
@click="sellAfter(scope.row)" |
||||
> |
||||
售后 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:after-sale-audit']" |
||||
> |
||||
售后审核 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:send']" |
||||
> |
||||
发货(进销存) |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:return']" |
||||
@click="feeBack(scope.row)" |
||||
> |
||||
回款 |
||||
</el-button> |
||||
<el-button |
||||
type="primary" |
||||
class="mr-10px" |
||||
link |
||||
style="padding: 0; margin-left: 0" |
||||
v-hasPermi="['clue:order:return-audit']" |
||||
> |
||||
回款确认 |
||||
</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</SSTable> |
||||
</div> |
||||
<el-tabs v-model="tabName"> |
||||
<el-tab-pane label="成交列表" name="list"> |
||||
<OrderList v-if="tabName == 'list'" /> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="回款申请" name="commission"> |
||||
<Reback v-if="tabName == 'commission'" /> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="售后申请" name="aftersale"> |
||||
<AfterSales v-if="tabName == 'aftersale'" /> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="发货列表" name="delivery" v-if="appStore.getAppInfo?.instanceType == 2"> |
||||
<OrderList v-if="tabName == 'delivery'" /> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
</template> |
||||
|
||||
<script setup name="ClueOrder"> |
||||
import { getSimpleFieldList } from '@/api/clue/orderField' |
||||
import * as SignApi from '@/api/clue/sign' |
||||
import { useAppStore } from '@/store/modules/app' |
||||
import OrderList from './Comp/OrderList.vue' |
||||
import Reback from './Comp/Reback.vue' |
||||
import AfterSales from './Comp/AfterSales.vue' |
||||
|
||||
import { removeNullField } from '@/utils' |
||||
|
||||
const allSchemas = ref({}) |
||||
|
||||
const searchRef = ref() |
||||
|
||||
const tableObject = ref({ |
||||
tableList: [], |
||||
loading: false, |
||||
total: 1, |
||||
pageSize: 20, |
||||
currentPage: 1 |
||||
}) |
||||
|
||||
function resetQuery() { |
||||
searchRef.value.reset() |
||||
tableObject.value.currentPage = 1 |
||||
getTableList() |
||||
} |
||||
// 查询 |
||||
async function getTableList() { |
||||
// 查询 |
||||
tableObject.value.loading = true |
||||
try { |
||||
const queryParams = await searchRef.value.getFormModel() |
||||
const params = { |
||||
...queryParams, |
||||
pageNo: tableObject.value.currentPage, |
||||
pageSize: tableObject.value.pageSize |
||||
} |
||||
const data = await SignApi.getSignPage(removeNullField(params)) |
||||
tableObject.value.tableList = data.list.map((it) => ({ ...it, ...it.diyParams })) |
||||
tableObject.value.total = data.total |
||||
} finally { |
||||
tableObject.value.loading = false |
||||
} |
||||
} |
||||
|
||||
const loading = ref(true) |
||||
async function getCurdSchemas() { |
||||
loading.value = true |
||||
try { |
||||
const data = await getSimpleFieldList() |
||||
allSchemas.value = useCrudSchemas(data).allSchemas |
||||
} finally { |
||||
loading.value = false |
||||
nextTick(() => { |
||||
getTableList() |
||||
}) |
||||
} |
||||
} |
||||
|
||||
// 售后 |
||||
function sellAfter() { |
||||
// 方法体 |
||||
} |
||||
|
||||
onMounted(() => { |
||||
getCurdSchemas() |
||||
}) |
||||
const appStore = useAppStore() |
||||
const tabName = ref('list') |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
||||
|
Loading…
Reference in new issue