Commit 6a8a1691 by 董晓奇

(3)报废车入库的时候需要挂载明细,该单据入库后和预处理页面根据明细进行校验,已入库的可以进行作业。

处理思路,采购入库的时候增加独立菜单,报废车采购入库,需要上传采购入库明细,明细见仓库模板---待定

1.添加明细行中查看关联报废车按钮
2.将报废车入库与采购入库通过单据类型字段分开
3.添加清理数据表sql文件
4.添加报废车关联校验接口
5.去除不能修改用户和重置密码的限制
parent d618696e
...@@ -44,7 +44,7 @@ VITE_GLOB_API_URL_PREFIX = ...@@ -44,7 +44,7 @@ VITE_GLOB_API_URL_PREFIX =
VITE_USE_PWA = false VITE_USE_PWA = false
# 是否启用官网代码 # 是否启用官网代码
VITE_GLOB_PRODUCTION = true VITE_GLOB_PRODUCTION = false
# 帆软服务地址 # 帆软服务地址
VITE_GLOB_FINE_REPORT_URL = http://127.0.0.1:8075 VITE_GLOB_FINE_REPORT_URL = http://127.0.0.1:8075
...@@ -44,7 +44,7 @@ VITE_GLOB_API_URL_PREFIX = ...@@ -44,7 +44,7 @@ VITE_GLOB_API_URL_PREFIX =
VITE_USE_PWA = false VITE_USE_PWA = false
# 是否启用官网代码 # 是否启用官网代码
VITE_GLOB_PRODUCTION = true VITE_GLOB_PRODUCTION = false
# 帆软服务地址 # 帆软服务地址
VITE_GLOB_FINE_REPORT_URL = http://127.0.0.1:8075 VITE_GLOB_FINE_REPORT_URL = http://127.0.0.1:8075
import {
import { MesWarehouseInPageModel, MesWarehouseInPageParams, MesWarehouseInPageResult } from './model/BfccgrkModel'; MesWarehouseInPageModel,
MesWarehouseInPageParams,
MesWarehouseInPageResult,
} from './model/BfccgrkModel';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios'; import { ErrorMessageMode } from '/#/axios';
...@@ -8,16 +11,17 @@ enum Api { ...@@ -8,16 +11,17 @@ enum Api {
List = '/ckgl/bfccgrk/list', List = '/ckgl/bfccgrk/list',
Info = '/ckgl/bfccgrk/info', Info = '/ckgl/bfccgrk/info',
MesWarehouseIn = '/ckgl/bfccgrk', MesWarehouseIn = '/ckgl/bfccgrk',
Export = '/ckgl/bfccgrk/export', Export = '/ckgl/bfccgrk/export',
ListByBfc = '/magic-api/getBfcListByids',
} }
/** /**
* @description: 查询MesWarehouseIn分页列表 * @description: 查询MesWarehouseIn分页列表
*/ */
export async function getMesWarehouseInPage(params: MesWarehouseInPageParams, mode: ErrorMessageMode = 'modal') { export async function getMesWarehouseInPage(
params: MesWarehouseInPageParams,
mode: ErrorMessageMode = 'modal',
) {
return defHttp.get<MesWarehouseInPageResult>( return defHttp.get<MesWarehouseInPageResult>(
{ {
url: Api.Page, url: Api.Page,
...@@ -47,7 +51,10 @@ export async function getMesWarehouseIn(id: String, mode: ErrorMessageMode = 'mo ...@@ -47,7 +51,10 @@ export async function getMesWarehouseIn(id: String, mode: ErrorMessageMode = 'mo
/** /**
* @description: 新增MesWarehouseIn * @description: 新增MesWarehouseIn
*/ */
export async function addMesWarehouseIn(mesWarehouseIn: Recordable, mode: ErrorMessageMode = 'modal') { export async function addMesWarehouseIn(
mesWarehouseIn: Recordable,
mode: ErrorMessageMode = 'modal',
) {
return defHttp.post<boolean>( return defHttp.post<boolean>(
{ {
url: Api.MesWarehouseIn, url: Api.MesWarehouseIn,
...@@ -62,7 +69,10 @@ export async function addMesWarehouseIn(mesWarehouseIn: Recordable, mode: ErrorM ...@@ -62,7 +69,10 @@ export async function addMesWarehouseIn(mesWarehouseIn: Recordable, mode: ErrorM
/** /**
* @description: 更新MesWarehouseIn * @description: 更新MesWarehouseIn
*/ */
export async function updateMesWarehouseIn(mesWarehouseIn: Recordable, mode: ErrorMessageMode = 'modal') { export async function updateMesWarehouseIn(
mesWarehouseIn: Recordable,
mode: ErrorMessageMode = 'modal',
) {
return defHttp.put<boolean>( return defHttp.put<boolean>(
{ {
url: Api.MesWarehouseIn, url: Api.MesWarehouseIn,
...@@ -89,15 +99,10 @@ export async function deleteMesWarehouseIn(ids: string[], mode: ErrorMessageMode ...@@ -89,15 +99,10 @@ export async function deleteMesWarehouseIn(ids: string[], mode: ErrorMessageMode
); );
} }
/** /**
* @description: 导出MesWarehouseIn * @description: 导出MesWarehouseIn
*/ */
export async function exportMesWarehouseIn( export async function exportMesWarehouseIn(params?: object, mode: ErrorMessageMode = 'modal') {
params?: object,
mode: ErrorMessageMode = 'modal'
) {
return defHttp.download( return defHttp.download(
{ {
url: Api.Export, url: Api.Export,
...@@ -110,5 +115,11 @@ export async function exportMesWarehouseIn( ...@@ -110,5 +115,11 @@ export async function exportMesWarehouseIn(
}, },
); );
} }
export async function getBfcListByids(ids: string) {
return defHttp.get<any>({
url: Api.ListByBfc,
params: { ids },
isTransformResponse: false, // 关闭自动转换,直接获取原始响应数据
});
}
<template> <template>
<BasicModal
:height="1080"
<BasicModal v-bind="$attrs"
:height="1080" @register="registerModal"
v-bind="$attrs" @register="registerModal" :title="getTitle" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" > @ok="handleSubmit"
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" /> @cancel="handleClose"
<template #footer v-if=" !state.isView"> >
<ModalForm ref="formRef" v-model:value="state.formModel" :fromPage="FromPageType.MENU" />
<template #footer v-if="!state.isView">
<template v-for="(item, index) in sortBy(formButtons, 'index')" :key="item.key"> <template v-for="(item, index) in sortBy(formButtons, 'index')" :key="item.key">
<template v-if="item.isShow"> <template v-if="item.isShow">
<CustomButtonModal v-if="item.type == CustomButtonModalType.Modal" :info="item" /> <CustomButtonModal v-if="item.type == CustomButtonModalType.Modal" :info="item" />
<a-button <a-button
:type="item.style" :type="item.style"
...@@ -22,29 +23,46 @@ ...@@ -22,29 +23,46 @@
</template> </template>
</template> </template>
</template> </template>
</BasicModal> </BasicModal>
<ShowBfcModal @register="registerBfcModal" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, reactive, provide, Ref } from 'vue'; import { ref, computed, reactive, provide, Ref, onMounted, onUnmounted } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModal, useModalInner } from '/@/components/Modal';
import { CustomButtonModalType } from '/@/enums/userEnum'; import { CustomButtonModalType } from '/@/enums/userEnum';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { formProps ,formButtons } from './config'; import { formProps, formButtons } from './config';
import ModalForm from './Form.vue'; import ModalForm from './Form.vue';
import { FromPageType } from '/@/enums/workflowEnum'; import { FromPageType } from '/@/enums/workflowEnum';
import { sortBy } from 'lodash-es';
import { executeCurFormEvent } from '/@/utils/event/data';
import { sortBy } from 'lodash-es';
import { executeCurFormEvent } from '/@/utils/event/data';
import ShowBfcModal from './ShowBfcModal.vue';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [registerBfcModal, { openModal: openBfcModal }] = useModal();
const showBfcModal = (rowData: any) => {
openBfcModal(true, {
bfcIds: rowData.bfcIds,
bfcCodes: rowData.bfcCodes,
});
};
// 挂载到 window 供按钮配置调用(组件卸载时移除)
onMounted(() => {
window.showBfcModal = showBfcModal;
});
onUnmounted(() => {
delete window.showBfcModal;
});
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const { notification } = useMessage(); const { notification } = useMessage();
const formRef = ref(); const formRef = ref();
const isCopy = ref<boolean>(false) const isCopy = ref<boolean>(false);
const state = reactive({ const state = reactive({
formModel: {}, formModel: {},
isUpdate: true, isUpdate: true,
...@@ -55,40 +73,41 @@ ...@@ -55,40 +73,41 @@
const { t } = useI18n(); const { t } = useI18n();
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await handleInner(data); await handleInner(data);
}); });
const getTitle = computed(() => (state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增')); const getTitle = computed(() =>
state.isView ? '查看' : state.isUpdate ? '编辑' : isCopy.value ? '复制数据' : '新增',
);
async function handleInner(data) {
async function handleInner(data){
state.isUpdate = !!data?.isUpdate; state.isUpdate = !!data?.isUpdate;
state.isView = !!data?.isView; state.isView = !!data?.isView;
isCopy.value = !!data?.isCopy; isCopy.value = !!data?.isCopy;
setModalProps({ setModalProps({
destroyOnClose: true, destroyOnClose: true,
maskClosable: false, maskClosable: false,
showCancelBtn: false, showCancelBtn: false,
showOkBtn: false, showOkBtn: false,
canFullscreen: true, canFullscreen: true,
width: 1980, width: 1980,
footer: state.isView ? null : undefined,defaultFullscreen:true, footer: state.isView ? null : undefined,
defaultFullscreen: true,
}); });
if (state.isUpdate || state.isView || isCopy.value) { if (state.isUpdate || state.isView || isCopy.value) {
state.rowId = data.id; state.rowId = data.id;
if (state.isView) { if (state.isView) {
await formRef.value.setDisabledForm(); await formRef.value.setDisabledForm();
} }
await formRef.value.setFormDataFromId(state.rowId); await formRef.value.setFormDataFromId(state.rowId);
} else { } else {
formRef.value.resetFields(); formRef.value.resetFields();
} }
} }
async function saveModal() { async function saveModal() {
let saveSuccess = false; let saveSuccess = false;
try { try {
...@@ -117,9 +136,9 @@ ...@@ -117,9 +136,9 @@
async function handleSubmit() { async function handleSubmit() {
try { try {
const saveSuccess = await saveModal(); const saveSuccess = await saveModal();
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
if (saveSuccess) { if (saveSuccess) {
if (!state.isUpdate || isCopy.value) { if (!state.isUpdate || isCopy.value) {
//false 新增 //false 新增
...@@ -133,34 +152,31 @@ ...@@ -133,34 +152,31 @@
description: t('修改成功!'), description: t('修改成功!'),
}); //提示消息 }); //提示消息
} }
closeModal(); closeModal();
formRef.value.resetFields(); formRef.value.resetFields();
emit('success'); emit('success');
} }
} finally { } finally {
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
} }
} }
function customClick(item) { function customClick(item) {
if (item.key == 'confirm') { if (item.key == 'confirm') {
handleSubmit(); handleSubmit();
} else if (item.key == 'cancel' && props.formType !== 'normal') { } else if (item.key == 'cancel') {
handleClose(); handleClose();
closeModal(); closeModal();
} else if (item.key == 'reset') { } else if (item.key == 'reset') {
formRef.value.resetFields(); formRef.value.resetFields();
} else { } else {
executeCurFormEvent(item.event, state.formModel, true); executeCurFormEvent(item.event, state.formModel, true);
} }
} }
function handleClose() { function handleClose() {
formRef.value.resetFields(); formRef.value.resetFields();
} }
</script> </script>
\ No newline at end of file
<template> <template>
<div class="pt-4"> <div class="pt-4">
<SimpleForm <SimpleForm
ref="systemFormRef" ref="systemFormRef"
:formProps="data.formDataProps" :formProps="data.formDataProps"
:formModel="state.formModel" :formModel="state.formModel"
:isWorkFlow="props.fromPage!=FromPageType.MENU" :isWorkFlow="props.fromPage != FromPageType.MENU"
:isCamelCase="true" :isCamelCase="true"
@model-change="handleChange" @model-change="handleChange"
/> />
</div> </div>
...@@ -16,20 +15,25 @@ ...@@ -16,20 +15,25 @@
import { formProps, formEventConfigs } from './config'; import { formProps, formEventConfigs } from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue'; import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addMesWarehouseIn, getMesWarehouseIn, updateMesWarehouseIn } from '/@/api/ckgl/bfccgrk'; import { addMesWarehouseIn, getMesWarehouseIn, updateMesWarehouseIn } from '/@/api/ckgl/bfccgrk';
import { cloneDeep, isString } from 'lodash-es'; import { cloneDeep, isString } from 'lodash-es';
import { FormDataProps } from '/@/components/Designer/src/types'; import { FormDataProps } from '/@/components/Designer/src/types';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { FromPageType } from '/@/enums/workflowEnum'; import { FromPageType } from '/@/enums/workflowEnum';
import { createFormEvent, getFormDataEvent, loadFormEvent, submitFormEvent,} from '/@/hooks/web/useFormEvent'; import {
createFormEvent,
getFormDataEvent,
loadFormEvent,
submitFormEvent,
} from '/@/hooks/web/useFormEvent';
import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm'; import { changeWorkFlowForm, changeSchemaDisabled } from '/@/hooks/web/useWorkFlowForm';
import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig'; import { WorkFlowFormParams } from '/@/model/workflow/bpmnConfig';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
const { filterFormSchemaAuth } = usePermission(); const { filterFormSchemaAuth } = usePermission();
const RowKey = 'id'; const RowKey = 'id';
const emits = defineEmits(['changeUploadComponentIds','loadingCompleted', 'update:value']); const emits = defineEmits(['changeUploadComponentIds', 'loadingCompleted', 'update:value']);
const props = defineProps({ const props = defineProps({
fromPage: { fromPage: {
type: Number, type: Number,
...@@ -42,34 +46,52 @@ ...@@ -42,34 +46,52 @@
}); });
const state = reactive({ const state = reactive({
formModel: {}, formModel: {},
formInfo:{formId:'',formName:''} formInfo: { formId: '', formName: '' },
}); });
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
watch( watch(
() => state.formModel, () => state.formModel,
(val) => { (val) => {
emits('update:value', val); emits('update:value', val);
}, },
{ {
deep: true, deep: true,
}, },
); );
onMounted(async () => { onMounted(async () => {
try { try {
if (props.fromPage == FromPageType.MENU) { if (props.fromPage == FromPageType.MENU) {
setMenuPermission(); setMenuPermission();
if(currentRoute.value.meta){ if (currentRoute.value.meta) {
state.formInfo.formName = currentRoute.value.meta.title&&isString(currentRoute.value.meta.title)?currentRoute.value.meta.title:''; state.formInfo.formName =
state.formInfo.formId = currentRoute.value.meta.formId&&isString(currentRoute.value.meta.formId)?currentRoute.value.meta.formId:''; currentRoute.value.meta.title && isString(currentRoute.value.meta.title)
? currentRoute.value.meta.title
: '';
state.formInfo.formId =
currentRoute.value.meta.formId && isString(currentRoute.value.meta.formId)
? currentRoute.value.meta.formId
: '';
} }
await createFormEvent(formEventConfigs, state.formModel, await createFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:初始化表单
await nextTick(); await nextTick();
await loadFormEvent(formEventConfigs, state.formModel, await loadFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:加载表单
} else if (props.fromPage == FromPageType.FLOW) { } else if (props.fromPage == FromPageType.FLOW) {
emits('loadingCompleted'); //告诉系统表单已经加载完毕 emits('loadingCompleted'); //告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法 // loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...@@ -78,15 +100,28 @@ ...@@ -78,15 +100,28 @@
} else if (props.fromPage == FromPageType.DESKTOP) { } else if (props.fromPage == FromPageType.DESKTOP) {
// 桌面设计 表单事件需要执行 // 桌面设计 表单事件需要执行
emits('loadingCompleted'); //告诉系统表单已经加载完毕 emits('loadingCompleted'); //告诉系统表单已经加载完毕
await createFormEvent(formEventConfigs, state.formModel, await createFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单 formProps.schemas,
await loadFormEvent(formEventConfigs, state.formModel, true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:初始化表单
await loadFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:加载表单
} }
} catch (error) {} } catch (error) {}
}); });
// 根据菜单页面权限,设置表单属性(必填,禁用,显示) // 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function setMenuPermission() { function setMenuPermission() {
data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!); data.formDataProps.schemas = filterFormSchemaAuth(data.formDataProps.schemas!);
...@@ -106,20 +141,26 @@ ...@@ -106,20 +141,26 @@
} finally { } finally {
} }
return values; return values;
} }
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】 // 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async function setFormDataFromId(rowId) { async function setFormDataFromId(rowId) {
try { try {
const record = await getMesWarehouseIn(rowId); const record = await getMesWarehouseIn(rowId);
setFieldsValue(record); setFieldsValue(record);
state.formModel = record; state.formModel = record;
await getFormDataEvent(formEventConfigs, state.formModel, await getFormDataEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:获取表单数据 formProps.schemas,
} catch (error) { true,
state.formInfo.formName,
} state.formInfo.formId,
); //表单事件:获取表单数据
} catch (error) {}
} }
// 辅助返回表单数据 // 辅助返回表单数据
async function getFieldsValue() { async function getFieldsValue() {
let values = []; let values = [];
...@@ -135,47 +176,66 @@ ...@@ -135,47 +176,66 @@
} }
return values; return values;
} }
// 辅助设置表单数据 // 辅助设置表单数据
function setFieldsValue(record) { function setFieldsValue(record) {
systemFormRef.value.setFieldsValue(record); systemFormRef.value.setFieldsValue(record);
} }
// 重置表单数据 // 重置表单数据
async function resetFields() { async function resetFields() {
await systemFormRef.value.resetFields(); await systemFormRef.value.resetFields();
} }
// 设置表单数据全部为Disabled 【查看】 // 设置表单数据全部为Disabled 【查看】
async function setDisabledForm( ) { async function setDisabledForm() {
data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas)); data.formDataProps.schemas = changeSchemaDisabled(cloneDeep(data.formDataProps.schemas));
} }
// 获取行键值 // 获取行键值
function getRowKey() { function getRowKey() {
return RowKey; return RowKey;
} }
// 更新api表单数据 // 更新api表单数据
async function update({ values, rowId }) { async function update({ values, rowId }) {
try { try {
values[RowKey] = rowId; values[RowKey] = rowId;
state.formModel = values; state.formModel = values;
let saveVal = await updateMesWarehouseIn(values); let saveVal = await updateMesWarehouseIn(values);
await submitFormEvent(formEventConfigs, state.formModel, await submitFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:提交表单
return saveVal; return saveVal;
} catch (error) {} } catch (error) {}
} }
// 新增api表单数据 // 新增api表单数据
async function add(values) { async function add(values) {
try { try {
state.formModel = values; state.formModel = values;
let saveVal = await addMesWarehouseIn(values); let saveVal = await addMesWarehouseIn(values);
await submitFormEvent(formEventConfigs, state.formModel, await submitFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:提交表单
return saveVal; return saveVal;
} catch (error) {} } catch (error) {}
} }
// 根据工作流页面权限,设置表单属性(必填,禁用,显示) // 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async function setWorkFlowForm(obj: WorkFlowFormParams) { async function setWorkFlowForm(obj: WorkFlowFormParams) {
try { try {
if (obj.formId) state.formInfo.formId = obj.formId; if (obj.formId) state.formInfo.formId = obj.formId;
if (obj.formName) state.formInfo.formName = obj.formName; if (obj.formName) state.formInfo.formName = obj.formName;
...@@ -189,23 +249,38 @@ ...@@ -189,23 +249,38 @@
state.formModel = formModels; state.formModel = formModels;
setFieldsValue(formModels); setFieldsValue(formModels);
} catch (error) {} } catch (error) {}
await createFormEvent(formEventConfigs, state.formModel, await createFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:初始化表单 formProps.schemas,
await loadFormEvent(formEventConfigs, state.formModel, true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:初始化表单
await loadFormEvent(
formEventConfigs,
state.formModel,
systemFormRef.value, systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:加载表单 formProps.schemas,
true,
state.formInfo.formName,
state.formInfo.formId,
); //表单事件:加载表单
} }
function handleChange(val) {
function handleChange(val) {
emits('update:value', val); emits('update:value', val);
} }
async function sendMessageForAllIframe() {
async function sendMessageForAllIframe() {
try { try {
if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) { if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) {
systemFormRef.value.sendMessageForAllIframe(); systemFormRef.value.sendMessageForAllIframe();
} }
} catch (error) {} } catch (error) {}
} }
defineExpose({ defineExpose({
setFieldsValue, setFieldsValue,
resetFields, resetFields,
...@@ -218,8 +293,6 @@ ...@@ -218,8 +293,6 @@
setWorkFlowForm, setWorkFlowForm,
getRowKey, getRowKey,
getFieldsValue, getFieldsValue,
sendMessageForAllIframe sendMessageForAllIframe,
}); });
</script> </script>
\ No newline at end of file
<template>
<BasicModal
v-bind="$attrs"
@register="registerModal"
title="关联报废车"
width="800px"
:footer="null"
:loading="loading"
zIndex="9999"
>
<div v-if="loading" class="empty-text">加载中...</div>
<div v-else-if="bfcList.length === 0" class="empty-text">暂无关联报废车</div>
<a-table
v-else
:data-source="bfcList"
:columns="columns"
:pagination="false"
row-key="plate_number"
bordered
/>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { getBfcListByids } from '/@/api/ckgl/bfccgrk';
import { useMessage } from '/@/hooks/web/useMessage';
const { notification } = useMessage();
const bfcList = ref<any[]>([]);
const loading = ref(false);
const columns = [
{ title: '车牌号', dataIndex: 'plate_number', key: 'plate_number' },
{ title: '批次号', dataIndex: 'batch_no', key: 'batch_no' },
{ title: '车辆类型', dataIndex: 'vehicle_type', key: 'vehicle_type' },
{ title: '品牌型号', dataIndex: 'brand_model', key: 'brand_model' },
{ title: '重量(kg)', dataIndex: 'weight_kg', key: 'weight_kg' },
{ title: '创建日期', dataIndex: 'create_date', key: 'create_date' },
];
const [registerModal] = useModalInner(async (data) => {
const { bfcIds } = data;
if (!bfcIds) {
bfcList.value = [];
return;
}
loading.value = true;
try {
const res = await getBfcListByids(bfcIds);
console.log(res);
// 直接使用 res,因为后端返回的就是数组
bfcList.value = Array.isArray(res) ? res : [];
} catch (error) {
notification.error({ message: '请求失败', description: (error as Error).message });
bfcList.value = [];
} finally {
loading.value = false;
}
});
</script>
<style scoped>
.empty-text {
text-align: center;
padding: 40px 0;
color: #999;
}
</style>
...@@ -1193,6 +1193,37 @@ export const formProps: FormProps = { ...@@ -1193,6 +1193,37 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'c2ebafaed93d4fd6862b02da913f0e30',
title: '报废车车牌',
dataIndex: 'bfcCodes',
componentType: 'Input',
defaultValue: '',
componentProps: {
width: '100%',
span: '',
defaultValue: '',
placeholder: '请输入报废车车牌',
maxlength: null,
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: true,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
},
},
{
key: '8ea1afc68d394f818b139e6b14622088', key: '8ea1afc68d394f818b139e6b14622088',
title: '报废车id', title: '报废车id',
dataIndex: 'bfcIds', dataIndex: 'bfcIds',
...@@ -1202,12 +1233,12 @@ export const formProps: FormProps = { ...@@ -1202,12 +1233,12 @@ export const formProps: FormProps = {
width: '100%', width: '100%',
span: '', span: '',
defaultValue: '', defaultValue: '',
placeholder: '请输入报废车id报废车id报废车id', placeholder: '请输入报废车id',
prefix: '', prefix: '',
suffix: '', suffix: '',
addonBefore: '', addonBefore: '',
addonAfter: '', addonAfter: '',
disabled: false, disabled: true,
allowClear: false, allowClear: false,
showLabel: true, showLabel: true,
required: false, required: false,
...@@ -1215,7 +1246,7 @@ export const formProps: FormProps = { ...@@ -1215,7 +1246,7 @@ export const formProps: FormProps = {
events: {}, events: {},
listStyle: '', listStyle: '',
isSave: false, isSave: false,
isShow: true, isShow: false,
scan: false, scan: false,
bordered: true, bordered: true,
isShowAi: false, isShowAi: false,
...@@ -1255,6 +1286,12 @@ export const formProps: FormProps = { ...@@ -1255,6 +1286,12 @@ export const formProps: FormProps = {
mainComponent: mainComponent:
'{"key":"8ea1afc68d394f818b139e6b14622088","table":"mes_warehouse_in_info","field":"bfc_ids"}', '{"key":"8ea1afc68d394f818b139e6b14622088","table":"mes_warehouse_in_info","field":"bfc_ids"}',
}, },
{
name: 'plateNumbers',
component: '{"table":"table_96346","field":"platenumbers9576"}',
mainComponent:
'{"key":"c2ebafaed93d4fd6862b02da913f0e30","table":"mes_warehouse_in_info","field":"bfc_codes"}',
},
], ],
modalWidth: 900, modalWidth: 900,
modalWidthUnit: 'px', modalWidthUnit: 'px',
...@@ -1274,6 +1311,20 @@ export const formProps: FormProps = { ...@@ -1274,6 +1311,20 @@ export const formProps: FormProps = {
], ],
type: 2, type: 2,
}, },
{
key: 'button1774255831447',
label: '查看关联报废车',
icon: 'ant-design:align-left-outlined',
event: [
{
operateType: 2,
operateConfig: {
js: 'window.showBfcModal && window.showBfcModal(curRowData)',
},
},
],
type: 1,
},
], ],
topButtonList: [], topButtonList: [],
isExport: false, isExport: false,
......
<template> <template>
<ResizePageWrapper :hasLeft="false">
<template #resizeRight>
<ResizePageWrapper :hasLeft="false"> <BasicTable
@register="registerTable"
isMenuTable
<template #resizeRight> ref="tableRef"
<BasicTable @register="registerTable" isMenuTable ref="tableRef" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
>
>
<template #toolbar> <template #toolbar>
<template v-for="button in tableButtonConfig" :key="button.code"> <template v-for="button in tableButtonConfig" :key="button.code">
<a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)"> <a-button v-if="button.isDefault" type="primary" @click="buttonClick(button.code)">
<template #icon><Icon :icon="button.icon" /></template> <template #icon>
<Icon :icon="button.icon" />
</template>
{{ button.name }} {{ button.name }}
</a-button> </a-button>
<CustomButtonModal v-else-if="button.buttonType == 'modal'" :info="button" /> <CustomButtonModal v-else-if="button.buttonType == 'modal'" :info="button" />
<a-button v-else :type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'" :danger="button.buttonType === 'danger'" > <a-button
<template #icon><Icon :icon="button.icon" /></template> v-else
:type="button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger="button.buttonType === 'danger'"
>
<template #icon>
<Icon :icon="button.icon" />
</template>
{{ button.name }} {{ button.name }}
</a-button> </a-button>
</template> </template>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'"> <template v-if="column.dataIndex === 'action'">
<TableAction
<TableAction
:actions="getLessActions(record)" :actions="getLessActions(record)"
:dropDownActions="getMoreActions(record)" :dropDownActions="getMoreActions(record)"
/> />
</template> </template>
<template v-else-if="column.dataIndex && column?.listStyle"> <template v-else-if="column.dataIndex && column?.listStyle">
<span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{ <span :style="executeListStyle(getValue(record, column, 'style'), column?.listStyle)">{{
getValue(record, column, 'value') getValue(record, column, 'value')
}}</span> }}</span>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
</template> </template>
<BfccgrkModal
@register="registerModal"
<BfccgrkModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/> @success="handleFormSuccess"
@cancel="handleFormCancel"
/>
<ExportModal
<ExportModal
v-if="visibleExport" v-if="visibleExport"
@close="visibleExport = false" @close="visibleExport = false"
:columns="columns" :columns="columns"
@success="handleExportSuccess" @success="handleExportSuccess"
/> />
</ResizePageWrapper>
</ResizePageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed,provide,Ref, createVNode, import { ref, computed, provide, Ref, createVNode } from 'vue';
} from 'vue';
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesWarehouseInPage, deleteMesWarehouseIn, exportMesWarehouseIn} from '/@/api/ckgl/bfccgrk'; import {
getMesWarehouseInPage,
deleteMesWarehouseIn,
exportMesWarehouseIn,
} from '/@/api/ckgl/bfccgrk';
import { ResizePageWrapper } from '/@/components/Page'; import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { usePermission } from '/@/hooks/web/usePermission'; import { usePermission } from '/@/hooks/web/usePermission';
import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue'; import CustomButtonModal from '/@/components/Form/src/components/CustomButtonModal.vue';
import { executeListStyle, getValue } from '/@/hooks/web/useListStyle';//列表样式配置 import { executeListStyle, getValue } from '/@/hooks/web/useListStyle'; //列表样式配置
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import printJS from 'print-js'; import printJS from 'print-js';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import BfccgrkModal from './components/BfccgrkModal.vue'; import BfccgrkModal from './components/BfccgrkModal.vue';
import { downloadByData } from '/@/utils/file/download'; import { downloadByData } from '/@/utils/file/download';
import ExportModal from '/@/views/form/template/components/ExportModal.vue'; import ExportModal from '/@/views/form/template/components/ExportModal.vue';
import { searchFormSchema, columns } from './components/config';
import { searchFormSchema, columns } from './components/config';
import Icon from '/@/components/Icon/index'; import Icon from '/@/components/Icon/index';
import { generateTableJson } from '/@/utils/event/design';
const listSpliceNum = ref(3); //操作列最先展示几个
import { generateTableJson, } from '/@/utils/event/design';
const listSpliceNum = ref(3); //操作列最先展示几个
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
const { enableLockeData,handleOpenFormEnableLockeData, handleCloseFormEnableLocke, handleHasEnableLocke } = const {
useConcurrentLock(); enableLockeData,
handleOpenFormEnableLockeData,
handleCloseFormEnableLocke,
handleHasEnableLocke,
} = useConcurrentLock();
const { notification } = useMessage(); const { notification } = useMessage();
const { t } = useI18n(); const { t } = useI18n();
...@@ -133,18 +112,68 @@ ...@@ -133,18 +112,68 @@
const filterColumns = filterColumnAuth(columns); const filterColumns = filterColumnAuth(columns);
const tableRef = ref(); const tableRef = ref();
const visibleExport = ref(false); const visibleExport = ref(false);
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]); const actionButtons = ref<string[]>(['view', 'edit', 'delete']);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(() => {
const list = [{"buttonId":"2011687510413426688","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2011687510413426690","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2011729952881885184","name":"打印","code":"print","icon":"ant-design:printer-outlined","isDefault":true,"isUse":true},{"buttonId":"2011691871017484288","name":"快速导出","code":"export","icon":"ant-design:export-outlined","isDefault":true,"isUse":true},{"buttonId":"2011691871017484289","name":"提交","code":"commit","icon":"ant-design:arrow-up-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"},{"buttonId":"2011687510413426691","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}] const list = [
{
buttonId: '2011687510413426688',
name: '查看',
code: 'view',
icon: 'ant-design:eye-outlined',
isDefault: true,
isUse: true,
},
{
buttonId: '2011687510413426690',
name: '编辑',
code: 'edit',
icon: 'ant-design:form-outlined',
isDefault: true,
isUse: true,
isEnableLock: true,
},
{
buttonId: '2011729952881885184',
name: '打印',
code: 'print',
icon: 'ant-design:printer-outlined',
isDefault: true,
isUse: true,
},
{
buttonId: '2011691871017484288',
name: '快速导出',
code: 'export',
icon: 'ant-design:export-outlined',
isDefault: true,
isUse: true,
},
{
buttonId: '2011691871017484289',
name: '提交',
code: 'commit',
icon: 'ant-design:arrow-up-outlined',
isDefault: false,
isUse: true,
setting: [],
showType: 'top',
buttonType: 'primary',
},
{
buttonId: '2011687510413426691',
name: '删除',
code: 'delete',
icon: 'ant-design:delete-outlined',
isDefault: true,
isUse: true,
},
];
return filterButtonAuth(list); return filterButtonAuth(list);
}) });
const tableButtonConfig = computed(() => { const tableButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
...@@ -154,29 +183,25 @@ ...@@ -154,29 +183,25 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
}); });
const btnEvent = {view : handleView,edit : handleEdit,print : handlePrint,export : handleExport,delete : handleDelete,} const btnEvent = {
view: handleView,
edit: handleEdit,
print: handlePrint,
export: handleExport,
delete: handleDelete,
};
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string); const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
provide<Ref<string>>('currentFormId', formIdComputedRef); provide<Ref<string>>('currentFormId', formIdComputedRef);
const selectedKeys = ref<string[]>([]); const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]); const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, getRawDataSource }] = useTable({
const [registerTable, { reload, getRawDataSource, }] = useTable({
title: 'Bfccgrk列表', title: 'Bfccgrk列表',
api: getMesWarehouseInPage, api: getMesWarehouseInPage,
rowKey: 'id', rowKey: 'id',
...@@ -187,28 +212,21 @@ ...@@ -187,28 +212,21 @@
formConfig: { formConfig: {
labelWidth: 100, labelWidth: 100,
schemas: searchFormSchema, schemas: searchFormSchema,
fieldMapToTime: [['djrq', ['djrqStart', 'djrqEnd'], 'YYYY-MM-DD HH:mm:ss ', true],], fieldMapToTime: [['djrq', ['djrqStart', 'djrqEnd'], 'YYYY-MM-DD HH:mm:ss ', true]],
showResetButton: false, showResetButton: false,
}, },
bordered:false, bordered: false,
beforeFetch: (params) => { beforeFetch: (params) => {
pageParamsInfo.value = {...params, FormId: formIdComputedRef.value,PK: 'id' } pageParamsInfo.value = { ...params, FormId: formIdComputedRef.value, PK: 'id' };
return pageParamsInfo.value; return pageParamsInfo.value;
}, },
afterFetch: (res) => { afterFetch: (res) => {
selectedKeys.value = []; selectedKeys.value = [];
selectedRowsData.value = []; selectedRowsData.value = [];
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 195, width: 195,
...@@ -220,53 +238,40 @@ ...@@ -220,53 +238,40 @@
size: false, size: false,
}, },
customRow, customRow,
isAdvancedQuery: false, isAdvancedQuery: false,
querySelectOption: JSON.stringify(searchFormSchema), querySelectOption: JSON.stringify(searchFormSchema),
objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值 objectId: formIdComputedRef.value, ////系统表单formId,自定义表单releaseId的id值
}); });
function buttonClick(code) { function buttonClick(code) {
btnEvent[code](); btnEvent[code]();
} }
async function handleEdit(record: Recordable) { async function handleEdit(record: Recordable) {
let field = 'id'; let field = 'id';
try { try {
let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit'); let hasIn = handleHasEnableLocke(buttonConfigs.value, 'edit');
if (hasIn) { if (hasIn) {
let res = await handleOpenFormEnableLockeData( let res = await handleOpenFormEnableLockeData(record[field], formIdComputedRef.value);
record[field],
formIdComputedRef.value,
);
if (res !== null) { if (res !== null) {
return; return;
} }
} }
let info = { let info = {
id: record[field], id: record[field],
isUpdate: true, isUpdate: true,
};
};
openModal(true, info);
openModal(true, info); } catch (error) {}
} catch (error) {}
} }
function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
deleteList([record.id]); deleteList([record.id]);
} }
function deleteList(ids) { function deleteList(ids) {
Modal.confirm({ Modal.confirm({
title: '提示信息', title: '提示信息',
...@@ -286,10 +291,9 @@ ...@@ -286,10 +291,9 @@
onCancel() {}, onCancel() {},
}); });
} }
async function handlePrint() { async function handlePrint() {
const dataSource = Array.isArray(getRawDataSource()) const dataSource = Array.isArray(getRawDataSource())
? getRawDataSource() ? getRawDataSource()
: getRawDataSource().list; : getRawDataSource().list;
const json = generateTableJson(filterColumns, dataSource); const json = generateTableJson(filterColumns, dataSource);
...@@ -300,17 +304,14 @@ ...@@ -300,17 +304,14 @@
type: 'json', type: 'json',
}); });
} }
function onSelectChange(selectedRowKeys: [], selectedRows) { function onSelectChange(selectedRowKeys: [], selectedRows) {
selectedKeys.value = selectedRowKeys; selectedKeys.value = selectedRowKeys;
selectedRowsData.value = selectedRows; selectedRowsData.value = selectedRows;
} }
function customRow(record: Recordable) { function customRow(record: Recordable) {
return { return {
onClick: () => { onClick: () => {
let selectedRowKeys = [...selectedKeys.value]; let selectedRowKeys = [...selectedKeys.value];
if (selectedRowKeys.indexOf(record.id) >= 0) { if (selectedRowKeys.indexOf(record.id) >= 0) {
...@@ -322,47 +323,47 @@ ...@@ -322,47 +323,47 @@
selectedKeys.value = selectedRowKeys; selectedKeys.value = selectedRowKeys;
}, },
ondblclick: () => { ondblclick: () => {
if (record.isCanEdit && hasPermission("bfccgrk:edit")) { if (record.isCanEdit && hasPermission('bfccgrk:edit')) {
handleEdit(record); handleEdit(record);
} }
}, },
}; };
} }
function handleSuccess() { function handleSuccess() {
selectedKeys.value = [];
selectedRowsData.value = [];
selectedKeys.value = [];
selectedRowsData.value = [];
reload(); reload();
} }
function handleFormSuccess() {
function handleFormSuccess() {
handleSuccess(); handleSuccess();
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
} }
function handleFormCancel() { function handleFormCancel() {
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
} }
function handleView(record: Recordable) { function handleView(record: Recordable) {
let info={ let info = {
isView: true, isView: true,
id: record.id, id: record.id,
} };
openModal(true, info); openModal(true, info);
} }
async function handleExport() { async function handleExport() {
visibleExport.value = true; visibleExport.value = true;
} }
async function handleExportSuccess(cols) { async function handleExportSuccess(cols) {
const res = await exportMesWarehouseIn({ isTemplate: false, columns: cols.toString(), ...pageParamsInfo.value}); const res = await exportMesWarehouseIn({
isTemplate: false,
columns: cols.toString(),
...pageParamsInfo.value,
});
visibleExport.value = false; visibleExport.value = false;
downloadByData( downloadByData(
res.data, res.data,
...@@ -371,27 +372,27 @@ ...@@ -371,27 +372,27 @@
); );
reload(); reload();
} }
function getLessActions(record: Recordable) { function getLessActions(record: Recordable) {
let list = getActions(record); let list = getActions(record);
return list.slice(0, listSpliceNum.value); return list.slice(0, listSpliceNum.value);
} }
function getMoreActions(record: Recordable) { function getMoreActions(record: Recordable) {
let list = getActions(record); let list = getActions(record);
return list.slice(listSpliceNum.value); return list.slice(listSpliceNum.value);
} }
function getActions(record: Recordable):ActionItem[] {
function getActions(record: Recordable): ActionItem[] {
record.isCanEdit = false; record.isCanEdit = false;
let actionsList: ActionItem[] = []; let actionsList: ActionItem[] = [];
actionButtonConfig.value?.map((button) => { actionButtonConfig.value?.map((button) => {
if (!record?.workflowData?.processId) { if (!record?.workflowData?.processId) {
record.isCanEdit = true; record.isCanEdit = true;
actionsList.push({ actionsList.push({
...button, ...button,
auth: `bfccgrk:${button.code}`, auth: `bfccgrk:${button.code}`,
label: button?.name, label: button?.name,
color: button.code === 'delete' ? 'error' : undefined, color: button.code === 'delete' ? 'error' : undefined,
...@@ -400,34 +401,26 @@ ...@@ -400,34 +401,26 @@
} else { } else {
if (!['edit', 'delete'].includes(button.code)) { if (!['edit', 'delete'].includes(button.code)) {
actionsList.push({ actionsList.push({
auth: `bfccgrk:${button.code}`, auth: `bfccgrk:${button.code}`,
label: button?.name, label: button?.name,
onClick: btnEvent[button.code]?.bind(null, record), onClick: btnEvent[button.code]?.bind(null, record),
}); });
} }
} }
}); });
return actionsList; return actionsList;
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-table-selection-col) { :deep(.ant-table-selection-col) {
width: 50px; width: 50px;
} }
.show{ .show {
display: flex; display: flex;
} }
.hide{ .hide {
display: none !important; display: none !important;
} }
</style>
</style>
\ No newline at end of file
...@@ -92,6 +92,10 @@ declare global { ...@@ -92,6 +92,10 @@ declare global {
[elem: string]: any; [elem: string]: any;
} }
} }
interface Window {
showBfcModal?: (rowData: any) => void;
}
} }
declare module 'vue' { declare module 'vue' {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment