提交 c7f0df5d authored 作者: 袁伟伟's avatar 袁伟伟
<template> <template>
<BasicDrawer v-bind="$attrs" @register="registerDrawer" showFooter :confirmDisabled="getConfirmDisabled" :title="getTitle" width="600px" @ok="handleSubmit"> <BasicDrawer
v-bind="$attrs"
@register="registerDrawer"
showFooter
:confirmDisabled="getConfirmDisabled"
:title="getTitle"
width="600px"
@ok="handleSubmit"
>
<a-spin :spinning="isLoading"> <a-spin :spinning="isLoading">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
</a-spin> </a-spin>
...@@ -19,7 +27,7 @@ ...@@ -19,7 +27,7 @@
const entityId = ref(0); const entityId = ref(0);
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 120, labelWidth: 130,
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}); });
...@@ -52,6 +60,7 @@ ...@@ -52,6 +60,7 @@
const formData: any = { const formData: any = {
...detail.value, ...detail.value,
}; };
formData.licensePic = formData.licensePic?.split(',');
await setFieldsValue(formData); await setFieldsValue(formData);
} }
} }
...@@ -71,15 +80,15 @@ ...@@ -71,15 +80,15 @@
try { try {
const values = await validate(); const values = await validate();
setDrawerProps({ confirmLoading: true }); setDrawerProps({ confirmLoading: true });
const { const { ...rest } = values;
...rest rest.licensePic = rest.licensePic?.join(',');
} = values;
const action = !unref(isUpdate) ? DistributorApi.add : DistributorApi.update; const action = !unref(isUpdate) ? DistributorApi.add : DistributorApi.update;
const data = !unref(isUpdate) const data = !unref(isUpdate)
? { ? {
...rest, ...rest,
} }
: Object.assign({}, : Object.assign(
{},
{ {
...rest, ...rest,
id: unref(entityId), id: unref(entityId),
......
<template> <template>
<div> <div>
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #headerTop> <!-- <template #headerTop>-->
<a-alert type="info" show-icon> <!-- <a-alert type="info" show-icon>-->
<template #message> <!-- <template #message>-->
<template v-if="checkedKeys.length > 0"> <!-- <template v-if="checkedKeys.length > 0">-->
<span>已选中{{ checkedKeys.length }}条记录</span> <!-- <span>已选中{{ checkedKeys.length }}条记录</span>-->
<a-button type="link" @click="checkedKeys = []" size="small">清空</a-button> <!-- <a-button type="link" @click="checkedKeys = []" size="small">清空</a-button>-->
<a-popconfirm <!-- <a-popconfirm-->
v-if="isShowHandleDelete()" <!-- v-if="isShowHandleDelete()"-->
class="ml-4" <!-- class="ml-4"-->
title="确定要全部删除吗?" <!-- title="确定要全部删除吗?"-->
ok-text="是" <!-- ok-text="是"-->
cancel-text="否" <!-- cancel-text="否"-->
@confirm="handleBatchDelete" <!-- @confirm="handleBatchDelete"-->
> <!-- >-->
<a href="#" class="text-red-500">删除</a> <!-- <a href="#" class="text-red-500">删除</a>-->
</a-popconfirm> <!-- </a-popconfirm>-->
<a-popconfirm <!-- <a-popconfirm-->
v-auth="'AUTH_SYSTEM_RECEIVER:PASSED'" <!-- v-auth="'AUTH_SYSTEM_RECEIVER:PASSED'"-->
class="ml-4" <!-- class="ml-4"-->
title="确定要全部通过审核吗?" <!-- title="确定要全部通过审核吗?"-->
ok-text="是" <!-- ok-text="是"-->
cancel-text="否" <!-- cancel-text="否"-->
@confirm="handleBatchPassed" <!-- @confirm="handleBatchPassed"-->
> <!-- >-->
<a href="#" class="text-green-500">审核通过</a> <!-- <a href="#" class="text-green-500">审核通过</a>-->
</a-popconfirm> <!-- </a-popconfirm>-->
</template> <!-- </template>-->
<template v-else> <!-- <template v-else>-->
<span>未选中任何项目</span> <!-- <span>未选中任何项目</span>-->
</template> <!-- </template>-->
</template> <!-- </template>-->
</a-alert> <!-- </a-alert>-->
</template> <!-- </template>-->
<template #toolbar> <template #toolbar>
<a-button v-auth="'AUTH_SYSTEM_RECEIVER:ADD'" type="primary" @click="handleCreate"> 新增</a-button> <a-button v-auth="'AUTH_SYSTEM_RECEIVER:ADD'" type="primary" @click="handleCreate"> 新增</a-button>
</template> </template>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
:actions="[ :actions="[
//待审核 才能 通过 //待审核 才能 通过
{ {
label: '通过', label: record.status === StatusValEnum.FORBIDDEN ? '启用' : '通过',
color: 'success', color: 'success',
popConfirm: { popConfirm: {
title: '是否确认通过', title: '是否确认通过',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论