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