客户样式调整

This commit is contained in:
‘huanghaiixia’
2025-12-04 17:03:49 +08:00
parent 52c58b9cc8
commit 239e269368
6 changed files with 84 additions and 44 deletions

View File

@ -79,7 +79,7 @@
line-height: 35px; line-height: 35px;
} }
</style> </style>
<style> <style lang="less">
.vben-default-layout { .vben-default-layout {
height: 100%; height: 100%;
} }
@ -87,4 +87,27 @@
flex: 1 !important; flex: 1 !important;
background-color: #fff; background-color: #fff;
} }
.formViewStyle {
.ant-input-number-disabled, input.ant-input-disabled,.ant-picker.ant-picker-disabled {
border: none !important;
background-color: transparent !important;
padding-left: 0 !important;
color: rgb(0 0 0 / 85%) !important;
::placeholder {
opacity: 0;
}
}
input.ant-input-disabled:placeholder-shown{
opacity: 0 !important;
}
.ant-picker-input > input[disabled], .ant-radio-disabled + span {
color: rgb(0 0 0 / 85%) !important;
}
.ant-picker.ant-picker-disabled .ant-picker-input .ant-picker-suffix {
display: none !important;
}
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="bankListTb"> <div class="bankListTb">
<BasicModal v-bind="$attrs" :zIndex="2000" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit" <BasicModal v-bind="$attrs" :zIndex="1001" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" > @visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="bankListModal"> <BasicTable @register="registerTable" class="bankListModal">
@ -175,4 +175,7 @@
z-index: 1001 !important; z-index: 1001 !important;
} }
.bankListModal .ant-modal-mask {
z-index: 1001 !important;
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<BasicModal v-bind="$attrs" destroyOnClose @register="registerModal" showFooter :title="getTitle" width="40%" @ok="handleSubmit" @cancel="handleCancel" :showOkBtn="!isDisable"> <BasicModal v-bind="$attrs" destroyOnClose @register="registerModal" showFooter :title="getTitle" width="40%" @ok="handleSubmit" @cancel="handleCancel" :showOkBtn="!isDisable">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="{labelCol: { span: 8 },wrapperCol: { span: 16 },}"> <a-form ref="formRef" class="formViewStyle" :model="formState" :rules="rules" v-bind="{labelCol: { span: 8 },wrapperCol: { span: 16 },}">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="证书名称" name="docTypeCode" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }"> <a-form-item label="证书名称" name="docTypeCode" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">

View File

@ -1,6 +1,6 @@
<template> <template>
<a-spin :spinning="spinning" tip="加载中..."> <a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap"> <div class="page-bg-wrap formViewStyle">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout"> <a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<a-card title="客户基本信息" :bordered="false" > <a-card title="客户基本信息" :bordered="false" >
<div> <div>
@ -27,7 +27,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="客户名称" name="cuName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }"> <a-form-item label="客户名称" name="cuName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.cuName" :disabled="isDisable" placeholder="请输入客户名称" :auto-size="{ minRows: 1, maxRows: 5 }"/> <a-input v-model:value="formState.cuName" :disabled="isDisable" placeholder="请输入客户名称" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -676,18 +676,21 @@
try { try {
const data = await request(obj); const data = await request(obj);
if (type) { // 新增保存
data?.id && (formState.id = data.id) // data?.id && (formState.id = data.id)
data?.cuCode && (formState.cuCode = data.cuCode) // data?.cuCode && (Object.assign(formState, {cuCode: data?.cuCode}))
if (!type) { if (data?.id) {
notification.success({ getList(data?.id)
message: 'Tip', }
description: data?.id ? t('新增成功!') : t('修改成功!') // 同意保存不提示
}); //提示消息 if (!type) {
} notification.success({
message: 'Tip',
description: data?.id ? t('新增成功!') : t('修改成功!')
}); //提示消息
} }
// formRef.value.resetFields(); // formRef.value.resetFields();
return data?.id ? data : formState return data?.id ? data : obj
// setTimeout(() => { // setTimeout(() => {
// bus.emit(FORM_LIST_MODIFIED, { path: formPath }); // bus.emit(FORM_LIST_MODIFIED, { path: formPath });
// close(); // close();
@ -700,7 +703,7 @@
} catch (errorInfo) { } catch (errorInfo) {
spinning.value = false; spinning.value = false;
console.log(errorInfo, 'errorInfo') console.log(errorInfo, 'errorInfo')
errorInfo?.value && notification.warning({ errorInfo?.errorFields?.length && notification.warning({
message: 'Tip', message: 'Tip',
description: '请完善信息' description: '请完善信息'
}); });
@ -734,4 +737,9 @@
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
</style> </style>

View File

@ -79,7 +79,7 @@
//所有按钮 //所有按钮
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true}]); const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true}]);
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'enable', 'disable', 'startwork','flowRecord']); const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'startwork','flowRecord']);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
return filterButtonAuth(buttons.value); return filterButtonAuth(buttons.value);
}) })
@ -145,13 +145,19 @@
dataIndex: 'action', dataIndex: 'action',
slots: { customRender: 'action' }, slots: { customRender: 'action' },
}, },
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
},
tableSetting: { tableSetting: {
size: false, size: false,
setting: false, setting: false,
}, },
}); });
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function dbClickRow(record) { function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) { if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return; return;
@ -261,16 +267,16 @@
} }
function handleEnable(record: Recordable) { function handleEnable(record: Recordable) {
// if (!selectedKeys.value.length) { if (!selectedKeys.value.length) {
// notification.warning({ notification.warning({
// message: 'Tip', message: 'Tip',
// description: t('请选择需要启用的数据'), description: t('请选择需要启用的数据'),
// }); });
// return; return;
// } }
// let ids = selectedKeys.value; let ids = selectedKeys.value;
let ids = [record.id] // let ids = [record.id]
Modal.confirm({ Modal.confirm({
title: '提示信息', title: '提示信息',
icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
@ -291,15 +297,15 @@
} }
function handleDisable(record: Recordable) { function handleDisable(record: Recordable) {
let ids = [record.id] // let ids = [record.id]
// if (!selectedKeys.value.length) { if (!selectedKeys.value.length) {
// notification.warning({ notification.warning({
// message: 'Tip', message: 'Tip',
// description: t('请选择需要禁用的数据'), description: t('请选择需要禁用的数据'),
// }); });
// return; return;
// } }
// let ids = selectedKeys.value; let ids = selectedKeys.value;
Modal.confirm({ Modal.confirm({
title: '提示信息', title: '提示信息',
icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
@ -406,13 +412,13 @@
actionsList = actionsList.concat(editAndDelBtn); actionsList = actionsList.concat(editAndDelBtn);
} }
} }
if (record.approCode === 'YSP') { // if (record.approCode === 'YSP' && record.valid!='有效') {
let idx = actionsList.findIndex(v =>v.tooltip == '作废') // let idx = actionsList.findIndex(v =>v.tooltip == '作废')
idx>-1 && actionsList.splice(idx, 1) // idx>-1 && actionsList.splice(idx, 1)
} else { // } else {
let idx = actionsList.findIndex(v =>v.tooltip == '启用') // let idx = actionsList.findIndex(v =>v.tooltip == '启用')
idx>-1 && actionsList.splice(idx, 1) // record.valid=='有效' && idx>-1 && actionsList.splice(idx, 1)
} // }
return actionsList; return actionsList;
} }

View File

@ -358,7 +358,7 @@
let obj = {} let obj = {}
system[key] = false system[key] = false
let value = await formInformation.value.handleSubmit(); let value = await formInformation.value.handleSubmit(true);
obj[key] = value obj[key] = value
mainFormModels.value = obj mainFormModels.value = obj
console.log(mainFormModels.value, 6666) console.log(mainFormModels.value, 6666)