客户样式调整

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;
}
</style>
<style>
<style lang="less">
.vben-default-layout {
height: 100%;
}
@ -87,4 +87,27 @@
flex: 1 !important;
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>

View File

@ -1,6 +1,6 @@
<template>
<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" >
<BasicTable @register="registerTable" class="bankListModal">
@ -175,4 +175,7 @@
z-index: 1001 !important;
}
.bankListModal .ant-modal-mask {
z-index: 1001 !important;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<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-col :span="24">
<a-form-item label="证书名称" name="docTypeCode" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">

View File

@ -1,6 +1,6 @@
<template>
<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-card title="客户基本信息" :bordered="false" >
<div>
@ -27,7 +27,7 @@
</a-col>
<a-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-col>
<a-col :span="8">
@ -676,18 +676,21 @@
try {
const data = await request(obj);
if (type) {
data?.id && (formState.id = data.id)
data?.cuCode && (formState.cuCode = data.cuCode)
// 新增保存
// data?.id && (formState.id = data.id)
// data?.cuCode && (Object.assign(formState, {cuCode: data?.cuCode}))
if (data?.id) {
getList(data?.id)
}
// 同意保存不提示
if (!type) {
notification.success({
message: 'Tip',
description: data?.id ? t('新增成功!') : t('修改成功!')
}); //提示消息
}
}
// formRef.value.resetFields();
return data?.id ? data : formState
return data?.id ? data : obj
// setTimeout(() => {
// bus.emit(FORM_LIST_MODIFIED, { path: formPath });
// close();
@ -700,7 +703,7 @@
} catch (errorInfo) {
spinning.value = false;
console.log(errorInfo, 'errorInfo')
errorInfo?.value && notification.warning({
errorInfo?.errorFields?.length && notification.warning({
message: 'Tip',
description: '请完善信息'
});
@ -734,4 +737,9 @@
font-size: 20px;
font-weight: bold;
}
</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 actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'enable', 'disable', 'startwork','flowRecord']);
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'startwork','flowRecord']);
const buttonConfigs = computed(()=>{
return filterButtonAuth(buttons.value);
})
@ -145,13 +145,19 @@
dataIndex: 'action',
slots: { customRender: 'action' },
},
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
},
tableSetting: {
size: false,
setting: false,
},
});
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return;
@ -261,16 +267,16 @@
}
function handleEnable(record: Recordable) {
// if (!selectedKeys.value.length) {
// notification.warning({
// message: 'Tip',
// description: t('请选择需要启用的数据'),
// });
// return;
// }
if (!selectedKeys.value.length) {
notification.warning({
message: 'Tip',
description: t('请选择需要启用的数据'),
});
return;
}
// let ids = selectedKeys.value;
let ids = [record.id]
let ids = selectedKeys.value;
// let ids = [record.id]
Modal.confirm({
title: '提示信息',
icon: createVNode(ExclamationCircleOutlined),
@ -291,15 +297,15 @@
}
function handleDisable(record: Recordable) {
let ids = [record.id]
// if (!selectedKeys.value.length) {
// notification.warning({
// message: 'Tip',
// description: t('请选择需要禁用的数据'),
// });
// return;
// }
// let ids = selectedKeys.value;
// let ids = [record.id]
if (!selectedKeys.value.length) {
notification.warning({
message: 'Tip',
description: t('请选择需要禁用的数据'),
});
return;
}
let ids = selectedKeys.value;
Modal.confirm({
title: '提示信息',
icon: createVNode(ExclamationCircleOutlined),
@ -406,13 +412,13 @@
actionsList = actionsList.concat(editAndDelBtn);
}
}
if (record.approCode === 'YSP') {
let idx = actionsList.findIndex(v =>v.tooltip == '作废')
idx>-1 && actionsList.splice(idx, 1)
} else {
let idx = actionsList.findIndex(v =>v.tooltip == '启用')
idx>-1 && actionsList.splice(idx, 1)
}
// if (record.approCode === 'YSP' && record.valid!='有效') {
// let idx = actionsList.findIndex(v =>v.tooltip == '作废')
// idx>-1 && actionsList.splice(idx, 1)
// } else {
// let idx = actionsList.findIndex(v =>v.tooltip == '启用')
// record.valid=='有效' && idx>-1 && actionsList.splice(idx, 1)
// }
return actionsList;
}

View File

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