|
|
|
@ -9,12 +9,13 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #toolbar> |
|
|
|
<div style="width: 100%; padding: 2px" class="flex-row-center-space"> |
|
|
|
<RadioGroup button-style="solid" v-model:value="radioVal" @change="handleRadioChange"> |
|
|
|
<div style="width: 100%; padding: 2px" class="flex-row-center-end"> |
|
|
|
<!-- <RadioGroup button-style="solid" v-model:value="radioVal" @change="handleRadioChange"> |
|
|
|
<RadioButton v-for="item in clueStatusList" :key="item.value" :value="item.value">{{item.label}}</RadioButton> |
|
|
|
</RadioGroup> |
|
|
|
</RadioGroup> --> |
|
|
|
<div class="flex-row-center-start"> |
|
|
|
<Popconfirm placement="bottom" icon="分配线索" :disabled="datingClueIdList.length == 0" @confirm="allocateList(null)"> |
|
|
|
<Button type="primary" danger :disabled="datingClueIdList.length == 0" @click="handleDelete(null)">删除</Button> |
|
|
|
<!-- <Popconfirm placement="bottom" icon="分配线索" :disabled="datingClueIdList.length == 0" @confirm="allocateList(null)"> |
|
|
|
<template #title> |
|
|
|
<div class="flex-row-center-start" style="padding: 8px 8px 8px 0px;border-bottom: 1px solid #ddd;" v-for="item in memberList" :key="item.userId"> |
|
|
|
<Checkbox :checked="verifier == item.userId" @change="e => onCheckChange(e, item)"> |
|
|
|
@ -23,15 +24,15 @@ |
|
|
|
</Checkbox> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<Button type="primary" danger :disabled="datingClueIdList.length == 0">分配</Button> |
|
|
|
</Popconfirm> |
|
|
|
<Button type="primary" danger style="margin-left: 16px;" :disabled="datingClueIdList.length == 0">分配</Button> |
|
|
|
</Popconfirm> --> |
|
|
|
<Button style="margin-left: 16px;" @click="handleAdd(true)">批量导入</Button> |
|
|
|
<Button :type="'primary'" style="margin-left: 16px;" @click="handleAdd(false)">新增</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #userinfo="{ text, record }"> |
|
|
|
<div class="flex-row"> |
|
|
|
<div class="flex-row" style="padding-left: 12px;"> |
|
|
|
<Image style="width: 40px;height: 40px;" :src="record.profilePhoto || 'https://dating-agency-prod.oss-cn-shenzhen.aliyuncs.com/827036501B11.png'" /> |
|
|
|
<div class="flex-col" style="margin-left: 8px;"> |
|
|
|
<div class="flex-row"> |
|
|
|
@ -47,19 +48,21 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #recordInfo="{ text, record }"> |
|
|
|
<div class="flex-col"> |
|
|
|
<div class="flex-row"> |
|
|
|
<span class="single-line" style="font-size: 14px;color: #333;font-weight: bold;max-width: 160px;">{{record.creatorName}}</span> |
|
|
|
<!-- <span style="font-size: 13px;color: #666;margin-left: 12px;">{{record.orgName}}</span> --> |
|
|
|
</div> |
|
|
|
<div class="flex-row"> |
|
|
|
<span style="font-size: 13px;color: #666;">{{record.createTime}}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #action="{ record }"> |
|
|
|
<!-- <TableAction |
|
|
|
:actions="[ |
|
|
|
{ |
|
|
|
label: '详情', |
|
|
|
onClick: toDetail.bind(null, record), |
|
|
|
}, |
|
|
|
]" |
|
|
|
/> --> |
|
|
|
<div class="flex-row-center-start"> |
|
|
|
<Button type="link" @click="toDetail(record)">详情</Button> |
|
|
|
<span style="color: #999;">|</span> |
|
|
|
<Popconfirm placement="topRight" :icon="record.allocationStatus == 1 ? '分配' : '重新分配'" @confirm="allocateList(record.id)"> |
|
|
|
<div class="flex-col-center-start"> |
|
|
|
<Button style="width: 100px;" @click.stop="toDetail(record)">编辑</Button> |
|
|
|
<!-- <Popconfirm placement="topRight" :icon="record.allocationStatus == 1 ? '分配' : '重新分配'" @confirm="allocateList(record.id)"> |
|
|
|
<template #title> |
|
|
|
<div class="flex-row-center-start" style="padding: 8px 8px 8px 0px;border-bottom: 1px solid #ddd;" v-for="item in memberList" :key="item.userId"> |
|
|
|
<Checkbox :checked="verifier == item.userId" @change="e => onCheckChange(e, item)"> |
|
|
|
@ -68,8 +71,9 @@ |
|
|
|
</Checkbox> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<Button type="link" danger >{{record.allocationStatus == 1 ? '分配' : '重新分配'}}</Button> |
|
|
|
</Popconfirm> |
|
|
|
<Button danger style="width: 100px;margin-top: 8px;">{{record.allocationStatus == 1 ? '分配' : '重新分配'}}</Button> |
|
|
|
</Popconfirm> --> |
|
|
|
<Button danger style="width: 100px;margin-top: 8px;" @click.stop="handleDelete(record.id)">删除</Button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
@ -95,7 +99,7 @@ |
|
|
|
import { useModal } from '/@/components/Modal' |
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table' |
|
|
|
import ClueModal from './modal.vue' |
|
|
|
import { getCluePage, allocateCluing } from '/@/api/clue' |
|
|
|
import { getCluePage, allocateCluing, deleteCluingList } from '/@/api/clue' |
|
|
|
import { pageOrganizationMember } from '/@/api/staff/staff' |
|
|
|
import { educationList, maritalList } from '/@/enums/customerEnum' |
|
|
|
|
|
|
|
@ -122,20 +126,20 @@ |
|
|
|
}) |
|
|
|
|
|
|
|
const [registerTable, { reload, setPagination, getSelectRowKeys, clearSelectedRowKeys }] = useTable({ |
|
|
|
bordered: true, |
|
|
|
bordered: false, |
|
|
|
useSearchForm: true, |
|
|
|
columns: tableColumns, |
|
|
|
showIndexColumn: true, |
|
|
|
showIndexColumn: false, |
|
|
|
showTableSetting: false, |
|
|
|
api: getCluePage, |
|
|
|
rowKey: 'id', |
|
|
|
rowSelection: { |
|
|
|
type: 'checkbox', |
|
|
|
onChange, |
|
|
|
getCheckboxProps(record: Recordable) { |
|
|
|
// Demo: 第一行(id为0)的选择框禁用 |
|
|
|
return { disabled: record.allocationStatus !== 1 }; |
|
|
|
}, |
|
|
|
// getCheckboxProps(record: Recordable) { |
|
|
|
// // Demo: 第一行(id为0)的选择框禁用 |
|
|
|
// return { disabled: record.allocationStatus !== 1 }; |
|
|
|
// }, |
|
|
|
}, |
|
|
|
formConfig: { |
|
|
|
labelWidth: 120, |
|
|
|
@ -184,10 +188,32 @@ |
|
|
|
const { createMessage } = useMessage() |
|
|
|
const router = useRouter() |
|
|
|
function toDetail(record: any) { |
|
|
|
const { id } = record |
|
|
|
router.push({ |
|
|
|
query: { id }, |
|
|
|
path: '/clue/customer', |
|
|
|
openModal(true, {record, ifUpdate: false}) |
|
|
|
// const { id } = record |
|
|
|
// router.push({ |
|
|
|
// query: { id }, |
|
|
|
// path: '/clue/customer', |
|
|
|
// }) |
|
|
|
} |
|
|
|
async function handleDelete(id){ |
|
|
|
const { createConfirm } = useMessage() |
|
|
|
createConfirm({ |
|
|
|
title: '提示', |
|
|
|
iconType: 'warning', |
|
|
|
content: `是否确定删除?`, |
|
|
|
onOk: () => { |
|
|
|
var datingClueIdList: string[] = [] |
|
|
|
if(id){ |
|
|
|
datingClueIdList = [id] |
|
|
|
} else { |
|
|
|
datingClueIdList = getSelectRowKeys() |
|
|
|
} |
|
|
|
deleteCluingList({datingClueIdList}).then(() => { |
|
|
|
createMessage.success('删除成功') |
|
|
|
clearSelectedRowKeys() |
|
|
|
reload() |
|
|
|
}) |
|
|
|
}, |
|
|
|
}) |
|
|
|
} |
|
|
|
const datingClueIdList = ref<string[]>([]); |
|
|
|
|