This commit is contained in:
2025-12-25 18:03:40 +08:00
16 changed files with 719 additions and 377 deletions

View File

@ -8,9 +8,21 @@ enum Api {
Info = '/contract/contractFact/info', Info = '/contract/contractFact/info',
LngContractFact = '/contract/contractFact', LngContractFact = '/contract/contractFact',
queryAllCurrency ='/magic-api/mdm//queryAllCurrency'
}
export async function getAllCurrency( mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractFactPageResult>(
{
url: Api.queryAllCurrency,
params: { },
},
{
errorMessageMode: mode,
},
);
} }
/** /**

View File

@ -9,8 +9,8 @@
<template v-if="column.dataIndex === 'fileOrg'"> <template v-if="column.dataIndex === 'fileOrg'">
<a @click="handleDownload(record)">{{record.fileOrg}}</a> <a @click="handleDownload(record)">{{record.fileOrg}}</a>
</template> </template>
<template v-if="column.dataIndex === 'docDesc' && !disabled"> <template v-if="column.dataIndex === 'remark' && !disabled">
<a-input :placeholder="t('请输入附件说明')" :disabled="disabled" v-model:value="record.docDesc" /> <a-input :placeholder="t('请输入附件说明')" :disabled="disabled" v-model:value="record.remark" />
</template> </template>
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
<a style="margin-right: 10px" @click="btnCheck('delete', record, index)">删除</a> <a style="margin-right: 10px" @click="btnCheck('delete', record, index)">删除</a>
@ -34,7 +34,7 @@
const columns = ref([ const columns = ref([
{ title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`}, { title: t('序号'), dataIndex: 'index', sorter: true, customRender: (column) => `${column.index + 1}`},
{ title: t('附件名称'), dataIndex: 'fileOrg', sorter: true}, { title: t('附件名称'), dataIndex: 'fileOrg', sorter: true},
{ title: t('附件说明'), dataIndex: 'docDesc', sorter: true}, { title: t('附件说明'), dataIndex: 'remark', sorter: true},
{ title: t('操作'), dataIndex: 'operation', sorter: true}, { title: t('操作'), dataIndex: 'operation', sorter: true},
]); ]);
const tableId = ref<string>(); const tableId = ref<string>();

View File

@ -0,0 +1,111 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="approListModal"></BasicTable>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { getLngApproPage} from '/@/api/approve/appro';
const { t } = useI18n();
const codeFormSchema: FormSchema[] = [
{ field: 'title', label: '标题/编号', component: 'Input'},
];
const columns: BasicColumn[] = [
{ dataIndex: 'title', title: '标题', align: 'left', sorter: true},
{ dataIndex: 'code', title: '编号', align: 'left', sorter: true},
{ dataIndex: 'typeName', title: '签报类型', align: 'left', sorter: true},
{ dataIndex: 'empName', title: '拟稿人', align: 'left', sorter: true},
{ dataIndex: 'bDeptName', title: '拟稿人所属部门', align: 'left', sorter: true},
{ dataIndex: 'dateAppro', title: '拟稿日期', align: 'left', sorter: true},
{ dataIndex: 'file', title: '附件', align: 'left', sorter: true},
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
});
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
title: t('签报列表'),
api: getLngApproPage,
columns,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchema,
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params, valid: 'Y',approCode: 'YSP'};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const handleVisibleChange = (visible: boolean) => {
if (visible) {
nextTick(() => {
reload();
});
}
};
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('签报列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择签报')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
.approListModal .basicCol{
position: inherit !important;
top: 0;
}
</style>

View File

@ -18,65 +18,16 @@
const { t } = useI18n(); const { t } = useI18n();
const codeFormSchema: FormSchema[] = [ const codeFormSchema: FormSchema[] = [
{ { field: 'shortName', label: '银行名称/简称', component: 'Input'},
field: 'shortName',
label: '银行名称/简称',
component: 'Input',
},
]; ];
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
{ { dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', sorter: true},
dataIndex: 'code', { dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', sorter: true},
title: '编码', { dataIndex: 'shortName', title: '简称', componentType: 'input', align: 'left', sorter: true},
componentType: 'input', { dataIndex: 'bankCode', title: '联行号', componentType: 'input', align: 'left', sorter: true },
align: 'left', { dataIndex: 'regionName', title: '所属国家和地区', componentType: 'input', align: 'left', sorter: true},
{ dataIndex: 'swift', title: 'SWIFT', componentType: 'input', align: 'left', sorter: true},
sorter: true,
},
{
dataIndex: 'fullName',
title: '名称',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'shortName',
title: '简称',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'bankCode',
title: '联行号',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'regionName',
title: '所属国家和地区',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'swift',
title: 'SWIFT',
componentType: 'input',
align: 'left',
sorter: true,
},
]; ];
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);

View File

@ -0,0 +1,157 @@
<template>
<BasicModal v-bind="$attrs" destroyOnClose @register="registerModal" showFooter :title="getTitle" width="40%" @ok="handleSubmit" @cancel="handleCancel" :showOkBtn="!isDisable">
<a-form ref="formRef" class="formViewStyle" :model="formState" :rules="rules" v-bind="{labelCol: { span: 8 },wrapperCol: { span: 16 },}">
<a-row>
<a-col :span="12">
<a-form-item label="相对方名称" name="cpName" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-input-search v-model:value="formState.cpName" :disabled="isDisable" placeholder="请选择名称" readonly @search="onSearchUser"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="相对方序号" name="sort">
<a-input-number v-model:value="formState.sort" style="width: 100%" :precision="0" :min="0" :step="1"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="对方银行名称" name="cpBankName" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-select v-model:value="formState.cpBankName" placeholder="请选择银行名称" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionList" :key="item.code" :value="item.code">
{{ item.fullName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="对方银行开户名" name="cpBankAccountName" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.cpBankAccountName" disabled />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="对方银行账号" name="cpBankAccount" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.cpBankAccount" disabled />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="对方联系人姓名" name="contactName" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.contactName" placeholder="请输入资质证书编号" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="对方联系人电话" name="contactTel" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.contactTel" placeholder="请输入资质证书编号" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="对方联系人邮箱" name="contactEmail" :label-col="{ span: 8 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.contactEmail" placeholder="请输入资质证书编号" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="对方通讯地址" name="contactAddress" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.contactAddress" placeholder="请输入资质证书编号" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.note" placeholder="请输入备注最多50字" :disabled="isDisable" :maxlength="50" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
<customerSupplierListModal @register="register" @success="handleSuccess"/>
</BasicModal>
</template>
<script setup lang="ts">
import { ref, onMounted, computed, unref,reactive } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { Form, message } from 'ant-design-vue';
import { useI18n } from '/@/hooks/web/useI18n';
import type { Rule } from 'ant-design-vue/es/form';
import { useMessage } from '/@/hooks/web/useMessage';
import { getDocCpList } from '/@/api/sales/Customer';
import type { FormInstance } from 'ant-design-vue';
import customerSupplierListModal from '/@/components/common/customerSupplierListModal.vue';
const { t } = useI18n();
const isUpdate = ref(true);
const isDisable = ref(false);
let optionList = reactive([])
const formRef = ref()
const { notification } = useMessage();
const emit = defineEmits(['success','register']);
const getTitle = computed(() => (!unref(isUpdate) ? t('新增证书') : t('编辑证书')));
let formState = reactive({
docTypeCode: '',
fileList: [],
filePath: ''
});
const list = ref()
const rules = {
docTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
};
const props = defineProps({
type: String
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
curData.value = ''
formState.filePath = ''
getOption()
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
isDisable.value = data?.btnType == 'view' ? true : false
list.value = data.list
if (unref(isUpdate)) {
Object.assign(formState, {...data.record})
}
});
onMounted(() => {
getOption()
});
async function getOption() {
let obj = {}
if (props.type == 'cuSign') {
obj = {'cuSign': 'Y'}
} else {
obj = {'suSign': 'Y'}
tableName = 'supplier'
}
optionList = await getDocCpList({'valid': 'Y',...obj })
}
const handleCancel = () => {
formRef.value.resetFields();
}
const handleSubmit = async () => {
try {
await formRef.value.validate();
// 验证通过,提交表单
let obj = {
...formState,
}
let idx =list.value.findIndex(v => v.docTypeCode == obj.docTypeCode)
if (idx > -1 && formState.docTypeCode !=curData.value) {
message.warn('证书已存在')
formRef.value.resetFields();
closeModal();
return
}
emit('success', obj);
notification.success({
message: t('操作'),
description:!unref(isUpdate)? t('新增成功') : t('编辑成功')
}); //提示消息
formRef.value.resetFields();
closeModal();
} catch (error) {
console.log('验证失败:', error);
}
};
</script>

View File

@ -17,47 +17,15 @@
const { t } = useI18n(); const { t } = useI18n();
const codeFormSchema: FormSchema[] = [ const codeFormSchema: FormSchema[] = [
{ { field: 'cuName', label: '客户名称', component: 'Input'},
field: 'cuName',
label: '客户名称',
component: 'Input',
},
]; ];
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
{ { dataIndex: 'cuCode', title: '客户编码', align: 'left', sorter: true },
dataIndex: 'cuCode', { dataIndex: 'cuName', title: '客户名称', align: 'left', sorter: true },
title: '客户编码', { dataIndex: 'cuSname', title: '客户简称', align: 'left', sorter: true },
align: 'left', { dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
sorter: true, { dataIndex: 'classCode', title: '客户分类', align: 'left', sorter: true },
},
{
dataIndex: 'cuName',
title: '客户名称',
align: 'left',
sorter: true,
},
{
dataIndex: 'cuSname',
title: '客户简称',
align: 'left',
sorter: true,
},
{
dataIndex: 'dI',
title: '国内/国际',
align: 'left',
sorter: true,
},
{
dataIndex: 'classCode',
title: '客户分类',
align: 'left',
sorter: true,
},
]; ];
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);

View File

@ -0,0 +1,160 @@
<template>
<div class="customerSupplierList">
<BasicModal v-bind="$attrs" :zIndex="1001 @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<a-tabs v-model:activeKey="activeKey" @change="handleTabChange" :class="{ 'h-full': ['1', '2'].includes(activeKey) }">
<a-tab-pane key="1" tab="客户">
<BasicTable @register="registerTable" class="customerSupplierListModal"></BasicTable>
</a-tab-pane>
<a-tab-pane key="2" tab="供应商" force-render>
<BasicTable @register="registerTableSupplier" class="customerSupplierListModal"></BasicTable>
</a-tab-pane>
</a-tabs>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { getLngCustomerPage} from '/@/api/sales/Customer';
import { getLngSupplierPage } from '/@/api/supplier/Supplier';
const activeKey = ref('1');
const { t } = useI18n();
const codeFormSchema: FormSchema[] = [
{ field: 'cuName', label: '客户名称', component: 'Input'},
];
const columns: BasicColumn[] = [
{ dataIndex: 'cuCode', title: '客户编码', align: 'left', sorter: true },
{ dataIndex: 'cuName', title: '客户名称', align: 'left', sorter: true },
{ dataIndex: 'cuSname', title: '客户简称', align: 'left', sorter: true },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
{ dataIndex: 'classCode', title: '客户分类', align: 'left', sorter: true },
];
const codeFormSchemaSupplier: FormSchema[] = [
{ field: 'suName', label: '供应商名称', component: 'Input' },
];
const columnsSupplier: BasicColumn[] = [
{ dataIndex: 'suCode', title: '供应商编码', align: 'left', sorter: true },
{ dataIndex: 'suName', title: '供应商名称', align: 'left', sorter: true },
{ dataIndex: 'suSname', title: '供应商简称', align: 'left', sorter: true },
{ dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
{ dataIndex: 'classCode', title: '供应商分类', align: 'left', sorter: true },
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
});
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
title: t('客户列表'),
api: getLngCustomerPage,
columns,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchema,
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params, valid: 'Y',approCode: 'YSP'};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const [registerTableSupplier, { getDataSource, setTableData, updateTableDataRecord, reload:reloadSupplier }] = useTable({
title: t('供应商列表'),
api: getLngSupplierPage,
columns:columnsSupplier,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchemaSupplier,
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params, valid: 'Y',approCode: 'YSP'};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const handleVisibleChange = (visible: boolean) => {
if (visible) {
nextTick(() => {
reload();
reloadSupplier()
});
}
};
const handleTabChange = (key) => {
};
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('客户列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择数据')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
.customerSupplierListModal .basicCol{
position: inherit !important;
top: 0;
}
.customerSupplierList .ant-modal-wrap{
z-index: 1001 !important;
}
.customerSupplierList .ant-modal-mask {
z-index: 1001 !important;
}
</style>

View File

@ -25,33 +25,13 @@
const { t } = useI18n(); const { t } = useI18n();
const treeData = ref<TreeItem[]>([]); const treeData = ref<TreeItem[]>([]);
const codeFormSchema: FormSchema[] = [ const codeFormSchema: FormSchema[] = [
{ { field: 'name', label: '组织名称', component: 'Input'},
field: 'name', { field: 'code', label: '组织编码', component: 'Input'},
label: '组织名称',
component: 'Input',
},
{
field: 'code',
label: '组织编码',
component: 'Input',
},
]; ];
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
{ { dataIndex: 'name', title: '组织名称', align: 'left', sorter: true },
dataIndex: 'name', { dataIndex: 'code', title: '组织编码', align: 'left', sorter: true },
title: '组织名称',
align: 'left',
sorter: true,
},
{
dataIndex: 'code',
title: '组织编码',
align: 'left',
sorter: true,
},
]; ];
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);

View File

@ -26,39 +26,14 @@
const { t } = useI18n(); const { t } = useI18n();
const codeFormSchema: FormSchema[] = [ const codeFormSchema: FormSchema[] = [
{ { field: 'userName', label: '用户名', component: 'Input' },
field: 'userName',
label: '用户名',
component: 'Input',
},
]; ];
const treeData = ref<TreeItem[]>([]); const treeData = ref<TreeItem[]>([]);
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
{ { dataIndex: 'name', title: '姓名', align: 'left', sorter: true },
dataIndex: 'name', { dataIndex: 'genderDesc', title: '性别', align: 'left', sorter: true },
title: '姓名', { dataIndex: 'mobile', title: '手机号', align: 'left', sorter: true },
align: 'left', { dataIndex: 'email', title: '邮箱', align: 'left', sorter: true },
sorter: true,
},
{
dataIndex: 'genderDesc',
title: '性别',
align: 'left',
sorter: true,
},
{
dataIndex: 'mobile',
title: '手机号',
align: 'left',
sorter: true,
},
{
dataIndex: 'email',
title: '邮箱',
align: 'left',
sorter: true,
},
]; ];
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);

View File

@ -17,47 +17,15 @@
const { t } = useI18n(); const { t } = useI18n();
const codeFormSchema: FormSchema[] = [ const codeFormSchema: FormSchema[] = [
{ { field: 'suName', label: '供应商名称', component: 'Input' },
field: 'suName',
label: '供应商名称',
component: 'Input',
},
]; ];
const columns: BasicColumn[] = [ const columns: BasicColumn[] = [
{ { dataIndex: 'suCode', title: '供应商编码', align: 'left', sorter: true },
dataIndex: 'suCode', { dataIndex: 'suName', title: '供应商名称', align: 'left', sorter: true },
title: '供应商编码', { dataIndex: 'suSname', title: '供应商简称', align: 'left', sorter: true },
align: 'left', { dataIndex: 'dI', title: '国内/国际', align: 'left', sorter: true },
sorter: true, { dataIndex: 'classCode', title: '供应商分类', align: 'left', sorter: true },
},
{
dataIndex: 'suName',
title: '供应商名称',
align: 'left',
sorter: true,
},
{
dataIndex: 'suSname',
title: '供应商简称',
align: 'left',
sorter: true,
},
{
dataIndex: 'dI',
title: '国内/国际',
align: 'left',
sorter: true,
},
{
dataIndex: 'classCode',
title: '供应商分类',
align: 'left',
sorter: true,
},
]; ];
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);

View File

@ -104,7 +104,7 @@ export const columns: BasicColumn[] = [
}, },
{ {
dataIndex: 'deptName', dataIndex: 'bDeptName',
title: '拟稿人所属部门', title: '拟稿人所属部门',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',

View File

@ -47,8 +47,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="拟稿人所属部门" name="deptName"> <a-form-item label="拟稿人所属部门" name="bDeptName">
<a-input-search v-model:value="formState.deptName" :disabled="isDisable" placeholder="请选择拟稿人部门" readonly @search="onSearch"/> <a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择拟稿人部门" readonly @search="onSearch"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -156,7 +156,7 @@
securityCode: [{ required: true, message: "该项为必填项", trigger: 'change' }], securityCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
urgencyCode: [{ required: true, message: "该项为必填项", trigger: 'change' }], urgencyCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }], empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
deptName: [{ required: true, message: "该项为必填项", trigger: 'change' }], bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
comName: [{ required: true, message: "该项为必填项", trigger: 'change' }], comName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
dateAppro: [{ required: true, message: "该项为必填项", trigger: 'change' }], dateAppro: [{ required: true, message: "该项为必填项", trigger: 'change' }],
content: [{ required: true, message: "该项为必填项", trigger: 'change' }], content: [{ required: true, message: "该项为必填项", trigger: 'change' }],
@ -226,7 +226,7 @@
if (!pageId.value) { if (!pageId.value) {
const res = await getCompDept(userInfo.id) const res = await getCompDept(userInfo.id)
formState.deptName = res?.dept?.name formState.bDeptName = res?.dept?.name
formState.bDeptId = res?.dept?.id formState.bDeptId = res?.dept?.id
formState.comName = res?.comp?.name formState.comName = res?.comp?.name
@ -245,7 +245,7 @@
formState.empId = val[0].id formState.empId = val[0].id
} }
const handleSuccessDept = (val, info) => { const handleSuccessDept = (val, info) => {
formState.deptName = val[0].name formState.bDeptName = val[0].name
formState.bDeptId = val[0].id formState.bDeptId = val[0].id
formState.comName = info.name formState.comName = info.name

View File

@ -12,9 +12,17 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
}, },
{ {
field: 'modifyDate', field: 'relTypeCode',
label: '主相对方', label: '关联类别',
component: 'Input', component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '1990669393069129729' },
labelField: 'name',
valueField: 'value',
getPopupContainer: () => document.body,
},
}, },
]; ];
@ -36,10 +44,17 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
}, },
{
dataIndex: 'relTypeCode',
title: '关联类别',
componentType: 'input',
align: 'left',
sorter: true,
},
{ {
dataIndex: 'kTypeCode1', dataIndex: 'kTypeCode1',
title: '合同类', title: '合同类',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
@ -47,17 +62,8 @@ export const columns: BasicColumn[] = [
}, },
{ {
dataIndex: 'comId', dataIndex: 'kTypeCode2',
title: '合同阶段', title: '二级类别',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'modifyDate',
title: '主相对方',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
@ -74,9 +80,18 @@ export const columns: BasicColumn[] = [
}, },
{ {
dataIndex: 'dateDraft', dataIndex: 'comName',
title: '起草日期', title: '合同主体',
componentType: 'date', componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'periodTypeCode',
title: '合同期限',
componentType: 'input',
align: 'left', align: 'left',
sorter: true, sorter: true,
@ -117,6 +132,14 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
}, },
{
dataIndex: 'amountTypeCode',
title: '合同金额类型',
componentType: 'select',
align: 'left',
sorter: true,
},
{ {
dataIndex: 'amount', dataIndex: 'amount',
@ -136,15 +159,6 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
}, },
{
dataIndex: 'tel',
title: '业方联系电话',
componentType: 'input',
align: 'left',
sorter: true,
},
{ {
dataIndex: 'bDeptId', dataIndex: 'bDeptId',
title: '业务部门', title: '业务部门',
@ -154,51 +168,6 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
}, },
{
dataIndex: 'bidSign',
title: '是否招投标',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'preApproSign',
title: '是否已获前置审批',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'aheadSign',
title: '先行履行',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'tempSign',
title: '采用范本',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'impSign',
title: '是否属于重大事项所涉合同',
componentType: 'input',
align: 'left',
sorter: true,
},
{ {
dataIndex: 'approCode', dataIndex: 'approCode',
title: '状态', title: '状态',
@ -208,23 +177,6 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
}, },
{
dataIndex: 'kDesc',
title: '合同说明',
componentType: 'input',
align: 'left',
sorter: true,
},
{
dataIndex: 'note',
title: '备注',
componentType: 'input',
align: 'left',
sorter: true,
},
]; ];
//表单事件 //表单事件
export const formEventConfigs = { export const formEventConfigs = {

View File

@ -6,42 +6,36 @@
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="合同号" name="kNo"> <a-form-item label="合同号" name="kNo">
<a-input v-model:value="formState.kNo" disabled /> <a-input v-model:value="formState.kNo" :disabled="isDisable" style="width: 65%" /><a-button type="primary" @click="onAppro">关联签报</a-button>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="16"> <a-col :span="16">
<a-form-item label="合同名称" name="kName" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }"> <a-form-item label="合同名称" name="kName" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.kName" placeholder="请输入标题"/> <a-input v-model:value="formState.kName" placeholder="请输入合同名称" :disabled="isDisable"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="相对方数量" name="cpCount"> <a-form-item label="关联类别" name="relTypeCode">
<a-input-number v-model:value="formState.cpCount" style="width: 100%" :precision="0" :min="0" :step="1" :max="20"/> <a-select v-model:value="formState.relTypeCode" :disabled="isDisable" placeholder="请选择关联类别" style="width: 100%" allow-clear>
</a-form-item> <a-select-option v-for="item in optionSelect.relTypeCodeList" :key="item.code" :value="item.code">
</a-col>
<a-col :span="16">
<a-form-item label="主相对方" name="code" :label-col="{ span: 4 }" :wrapper-col="{ span: 24 }">
<a-input v-model:value="formState.code" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同主体" name="comId">
<a-input v-model:value="formState.comId" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同类型" name="kTypeCode1">
<a-select v-model:value="formState.kTypeCode1" :disabled="isDisable" placeholder="请选择合同类型" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.typeCodeList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="合同阶段" name="securityCode"> <a-form-item label="合同类别" name="kTypeCode1">
<a-select v-model:value="formState.securityCode" :disabled="isDisable" placeholder="请选择密级" style="width: 100%" allow-clear> <a-select v-model:value="formState.kTypeCode1" :disabled="isDisable" placeholder="请选择合同类别" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.securityCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.kTypeCode1List" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="二级类别" name="kTypeCode2">
<a-select v-model:value="formState.kTypeCode2" :disabled="isDisable" placeholder="请选择二级类别" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.kTypeCode2List" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -50,69 +44,87 @@
<a-col :span="8"> <a-col :span="8">
<a-form-item label="合同期限" name="periodTypeCode"> <a-form-item label="合同期限" name="periodTypeCode">
<a-select v-model:value="formState.periodTypeCode" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear> <a-select v-model:value="formState.periodTypeCode" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.securityCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.periodTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="有效期开始" name="dateFrom"> <a-form-item label="有效期开始" name="dateFrom">
<a-date-picker v-model:value="formState.dateAppro" style="width: 100%" placeholder="请选择开始日期" /> <a-date-picker v-model:value="formState.dateFrom" style="width: 100%" :disabled-date="disabledDateStart" placeholder="请选择开始日期" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="有效期结束" name="dateTo"> <a-form-item label="有效期结束" name="dateTo">
<a-date-picker v-model:value="formState.dateAppro" style="width: 100%" placeholder="请选择结束日期" /> <a-date-picker v-model:value="formState.dateTo" style="width: 100%" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="起草日期" name="dateDraft"> <a-form-item label="起草日期" name="dateDraft">
<a-date-picker v-model:value="formState.dateAppro" style="width: 100%" placeholder="请选择起草日期" /> <a-date-picker v-model:value="formState.dateDraft" style="width: 100%" placeholder="请选择起草日期" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="币种" name="curCode"> <a-form-item label="币种" name="curCode">
<a-select v-model:value="formState.curCode" :disabled="isDisable" placeholder="请选择缓急" style="width: 100%" allow-clear> <a-select v-model:value="formState.curCode" :disabled="isDisable" placeholder="请选择币种" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.curCodeList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.fullName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="合同金额" name="amount"> <a-form-item label="相对方数量" name="cpCount">
<a-input v-model:value="formState.amount" :disabled="isDisable"/> <a-input-number v-model:value="formState.cpCount" style="width: 100%" :precision="0" :min="0" :step="1" :max="20"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="业务联系人" name="empId"> <a-form-item label="合同金额类型" name="amountTypeCode">
<a-input v-model:value="formState.empId" /> <a-select v-model:value="formState.amountTypeCode" :disabled="isDisable" placeholder="请选择合同金额类型" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.amountTypeCodeList" :key="item.code" :value="item.code">
{{ item.fullName }}
</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="联系电话" name="tel"> <a-form-item label="合同金额(万元)" name="amount">
<a-input v-model:value="formState.tel" /> <a-input-number v-model:value="formState.amount" style="width: 100%" :min="0" :disabled="isDisable" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="业务部门" name="bDeptId"> <a-form-item label="合同金额大写" name="amountCn">
<a-input v-model:value="formState.bDeptId" /> <a-input v-model:value="formState.amountCn" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="22">
<a-form-item label="合同金额说明" name="amountDesc" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.amountDesc" :disabled="isDisable" placeholder="请输入合同金额说明" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="结算类型" name="settleTypeCode">
<a-select v-model:value="formState.settleTypeCode" :disabled="isDisable" placeholder="请选择结算类型" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.settleTypeCodeList" :key="item.code" :value="item.code">
{{ item.fullName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="是否招投标" name="bidSign"> <a-form-item label="是否招投标" name="bidSign">
<a-select v-model:value="formState.bidSign" :disabled="isDisable" placeholder="请选择是否招投标" style="width: 100%" allow-clear> <a-select v-model:value="formState.bidSign" :disabled="isDisable" placeholder="请选择是否招投标" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.signList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="已获前置审批" name="preApproSign"> <a-form-item label="是否已获前置审批" name="preApproSign">
<a-select v-model:value="formState.preApproSign" :disabled="isDisable" placeholder="请选择已获前置审批" style="width: 100%" allow-clear> <a-select v-model:value="formState.preApproSign" :disabled="isDisable" placeholder="请选择已获前置审批" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.signList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -121,7 +133,7 @@
<a-col :span="8"> <a-col :span="8">
<a-form-item label="先行履行" name="aheadSign"> <a-form-item label="先行履行" name="aheadSign">
<a-select v-model:value="formState.aheadSign" :disabled="isDisable" placeholder="请选择先行履行" style="width: 100%" allow-clear> <a-select v-model:value="formState.aheadSign" :disabled="isDisable" placeholder="请选择先行履行" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.signList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -130,7 +142,7 @@
<a-col :span="8"> <a-col :span="8">
<a-form-item label="采用范本" name="tempSign"> <a-form-item label="采用范本" name="tempSign">
<a-select v-model:value="formState.tempSign" :disabled="isDisable" placeholder="请选择采用范本" style="width: 100%" allow-clear> <a-select v-model:value="formState.tempSign" :disabled="isDisable" placeholder="请选择采用范本" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.tempSignList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -139,12 +151,32 @@
<a-col :span="8"> <a-col :span="8">
<a-form-item label="重大事项所涉合同" name="impSign"> <a-form-item label="重大事项所涉合同" name="impSign">
<a-select v-model:value="formState.impSign" :disabled="isDisable" placeholder="请选择重大事项所涉合同" style="width: 100%" allow-clear> <a-select v-model:value="formState.impSign" :disabled="isDisable" placeholder="请选择重大事项所涉合同" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code"> <a-select-option v-for="item in optionSelect.impSignList" :key="item.code" :value="item.code">
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8">
<a-form-item label="业务联系人" name="empName">
<a-input-search v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择业务联系人" readonly @search="onSearchUser"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="联系电话" name="tel">
<a-input v-model:value="formState.tel" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="业务部门" name="bDeptName">
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同主体" name="comName">
<a-input v-model:value="formState.comName" disabled />
</a-form-item>
</a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="状态" name="approCode"> <a-form-item label="状态" name="approCode">
<a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear> <a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear>
@ -167,18 +199,22 @@
</a-row> </a-row>
</a-card> </a-card>
<a-card title="相对方信息" :bordered="false" > <a-card title="相对方信息" :bordered="false" >
<a-table :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 200}"> <div style="width: 100%">
<template #bodyCell="{ column, record, index }"> <a-button type="primary" style="margin-bottom: 10px" @click="onAppro">新增行</a-button>
<template v-if="column.dataIndex === 'operation'"> <a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 2000}">
<!-- <a @click="btnCheck(record, index)">删除</a> --> <template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'operation'">
<!-- <a @click="btnCheck(record, index)">删除</a> -->
</template>
</template> </template>
</template> </a-table>
</a-table> </div>
</a-card> </a-card>
<a-card title="附件信息" :bordered="false" > <a-card title="附件信息" :bordered="false" >
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/> <UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
</a-card> </a-card>
<a-card title="签报列表" :bordered="false" > <a-card title="签报列表" :bordered="false" >
<a-button type="primary" style="margin-bottom: 10px" @click="onAppro">关联签报</a-button>
<a-table :columns="columnsAppro" :data-source="dataListAppro" :pagination="false"> <a-table :columns="columnsAppro" :data-source="dataListAppro" :pagination="false">
<template #bodyCell="{ column, record, index }"> <template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
@ -191,6 +227,7 @@
</div> </div>
<deptUserModal @register="register" @success="handleSuccess"/> <deptUserModal @register="register" @success="handleSuccess"/>
<deptListModal @register="registerDept" @success="handleSuccessDept" /> <deptListModal @register="registerDept" @success="handleSuccessDept" />
<approListModal @register="registerAppro" @success="handleSuccessAppro" />
</a-spin> </a-spin>
</template> </template>
@ -205,13 +242,15 @@
import type { Rule } from 'ant-design-vue/es/form'; import type { Rule } from 'ant-design-vue/es/form';
import { getDictionary } from '/@/api/sales/Customer'; import { getDictionary } from '/@/api/sales/Customer';
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import { addLngAppro,updateLngAppro,getLngAppro,getCompDept } from '/@/api/approve/Appro'; import { addLngContractFact,updateLngContractFact,getAllCurrency, getLngContractFact } from '/@/api/contract/ContractFact';
import { getLngAppro,getCompDept } from '/@/api/approve/Appro';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { getAppEnvConfig } from '/@/utils/env'; import { getAppEnvConfig } from '/@/utils/env';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import UploadList from '/@/components/Form/src/components/UploadList.vue'; import UploadList from '/@/components/Form/src/components/UploadList.vue';
import deptUserModal from '/@/components/common/deptUserModal.vue'; import deptUserModal from '/@/components/common/deptUserModal.vue';
import deptListModal from '/@/components/common/deptListModal.vue'; import deptListModal from '/@/components/common/deptListModal.vue';
import approListModal from '/@/components/common/approListModal.vue';
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
@ -247,21 +286,29 @@
const { notification } = useMessage(); const { notification } = useMessage();
const { t } = useI18n(); const { t } = useI18n();
const formState = reactive({ const formState = reactive({
approCode: 'WTJ', approCode: 'WTJ',
dateAppro: dayjs(new Date()), dateDraft: dayjs(new Date()),
}); });
const [register, { openModal:openModal}] = useModal(); const [register, { openModal:openModal}] = useModal();
const [registerDept, { openModal:openModalDept}] = useModal(); const [registerDept, { openModal:openModalDept}] = useModal();
const [registerAppro, { openModal:openModalAppro}] = useModal();
const rules: Record<string, Rule[]> = { const rules: Record<string, Rule[]> = {
title: [{ required: true, message: "该项为必填项", trigger: 'change' }], kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
typeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }], kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
securityCode: [{ required: true, message: "该项为必填项", trigger: 'change' }], relTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
urgencyCode: [{ required: true, message: "该项为必填项", trigger: 'change' }], kTypeCode1: [{ required: true, message: "该项为必填项", trigger: 'change' }],
periodTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
cpCount: [{ required: true, message: "该项为必填项", trigger: 'change' }],
amountTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
settleTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
bidSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
preApproSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
aheadSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
tempSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
impSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }], empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
deptName: [{ required: true, message: "该项为必填项", trigger: 'change' }], tel: [{ required: true, message: "该项为必填项", trigger: 'change' }],
comName: [{ required: true, message: "该项为必填项", trigger: 'change' }], bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
dateAppro: [{ required: true, message: "该项为必填项", trigger: 'change' }],
content: [{ required: true, message: "该项为必填项", trigger: 'change' }],
}; };
const layout = { const layout = {
@ -270,17 +317,17 @@
} }
const columns= ref([ const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100}, { title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('相对方名称'), dataIndex: 'cpName', sorter: true, width:100}, { title: t('相对方名称'), dataIndex: 'cpName', sorter: true, width:200},
{ title: t('相对方顺序'), dataIndex: 'sort', sorter: true, width: 100}, { title: t('相对方顺序'), dataIndex: 'sort', sorter: true, width: 180},
{ title: t('相对方银行名称'), dataIndex: 'cpBankName', sorter: true, width: 140}, { title: t('相对方银行名称'), dataIndex: 'cpBankName', sorter: true, width: 200},
{ title: t('对方银行开户名'), dataIndex: 'cpBankAccountName', sorter: true, width: 140}, { title: t('对方银行开户名'), dataIndex: 'cpBankAccountName', sorter: true, width: 300},
{ title: t('对方银行账号'), dataIndex: 'cpBankAccount', sorter: true, width: 140}, { title: t('对方银行账号'), dataIndex: 'cpBankAccount', sorter: true, width: 300},
{ title: t('对方联系人姓名'), dataIndex: 'contactName', sorter: true, width: 140}, { title: t('对方联系人姓名'), dataIndex: 'contactName', sorter: true, width: 300},
{ title: t('对方联系人电话'), dataIndex: 'contactTel', sorter: true, width: 140}, { title: t('对方联系人电话'), dataIndex: 'contactTel', sorter: true, width: 200},
{ title: t('对方联系人邮箱'), dataIndex: 'contactEmail', sorter: true, width: 140}, { title: t('对方联系人邮箱'), dataIndex: 'contactEmail', sorter: true, width: 300},
{ title: t('对方通讯地址'), dataIndex: 'contactAddress', sorter: true, width: 140}, { title: t('对方通讯地址'), dataIndex: 'contactAddress', sorter: true, width: 200},
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 140}, { title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 120}, { title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]); ]);
const columnsAppro= ref([ const columnsAppro= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100}, { title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
@ -288,19 +335,20 @@
{ title: t('编号'), dataIndex: 'code', sorter: true}, { title: t('编号'), dataIndex: 'code', sorter: true},
{ title: t('签报类型'), dataIndex: 'typeName', sorter: true, width: 140}, { title: t('签报类型'), dataIndex: 'typeName', sorter: true, width: 140},
{ title: t('拟稿人'), dataIndex: 'empName', sorter: true, width: 140}, { title: t('拟稿人'), dataIndex: 'empName', sorter: true, width: 140},
{ title: t('拟稿人所属部门'), dataIndex: 'deptName', sorter: true, width: 140}, { title: t('拟稿人所属部门'), dataIndex: 'bDeptName', sorter: true, width: 140},
{ title: t('拟稿时间'), dataIndex: 'dateAppro', sorter: true, width: 140}, { title: t('拟稿时间'), dataIndex: 'dateAppro', sorter: true, width: 140},
{ title: t('附件'), dataIndex: 'contactTel', sorter: true, width: 140}, { title: t('附件'), dataIndex: 'contactTel', sorter: true, width: 140},
{ title: t('操作'), dataIndex: 'operation', width: 120}, { title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]); ]);
const dataList = ref([]) const dataList = ref([{cpName: 88}])
const dataFile = ref([]); const dataFile = ref([]);
const dataListAppro = ref([]) const dataListAppro = ref([])
let optionSelect= reactive({ let optionSelect= reactive({
approCodeList: [], approCodeList: [],
typeCodeList: [], typeCodeList: [],
securityCodeList: [], relTypeCodeList: [],
urgencyCodeList: [] signList: [],
periodTypeCodeList: []
}); });
watch( watch(
() => props.id, () => props.id,
@ -329,6 +377,9 @@
} else { } else {
formState.empName = userInfo.name formState.empName = userInfo.name
formState.empId = userInfo.id formState.empId = userInfo.id
formState.tel = userInfo.mobile
console.log(userInfo, 'userInfo')
} }
}); });
@ -342,20 +393,30 @@
spinning.value = false spinning.value = false
Object.assign(formState, {...data}) Object.assign(formState, {...data})
Object.assign(dataFile.value, formState.lngFileUploadList || []) Object.assign(dataFile.value, formState.lngFileUploadList || [])
formState.dateAppro = formState.dateAppro ? dayjs(formState.dateAppro) : null formState.dateDraft = formState.dateDraft ? dayjs(formState.dateDraft) : null
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
} catch (error) { } catch (error) {
spinning.value = false spinning.value = false
} }
} }
async function getOption() { async function getOption() {
optionSelect.typeCodeList = await getDictionary('LNG_K_PER') optionSelect.relTypeCodeList = await getDictionary('LNG_K_REL')
optionSelect.securityCodeList = await getDictionary('LNG_K_TYP1') optionSelect.kTypeCode1List = await getDictionary('LNG_K_TYP1')
optionSelect.urgencyCodeList = await getDictionary('LNG_K_TYP2') optionSelect.kTypeCode2List = await getDictionary('LNG_K_TYP2')
optionSelect.amountTypeCodeList = await getDictionary('LNG_K_AMT')
optionSelect.settleTypeCodeList = await getDictionary('LNG_K_ST')
optionSelect.periodTypeCodeList = await getDictionary('LNG_K_PER')
optionSelect.signList = await getDictionary('LNG_YNU')
optionSelect.tempSignList = await getDictionary('LNG_YNR')
optionSelect.impSignList = await getDictionary('LNG_YN')
optionSelect.approCodeList = await getDictionary('LNG_APPRO') optionSelect.approCodeList = await getDictionary('LNG_APPRO')
optionSelect.curCodeList = await getAllCurrency()
if (!pageId.value) { if (!pageId.value) {
const res = await getCompDept(userInfo.id) const res = await getCompDept(userInfo.id)
formState.deptName = res?.dept?.name formState.bDeptName = res?.dept?.name
formState.bDeptId = res?.dept?.id formState.bDeptId = res?.dept?.id
formState.comName = res?.comp?.name formState.comName = res?.comp?.name
@ -363,24 +424,67 @@
} }
} }
const disabledDateStart = (startValue) => {
const endValue = formState?.dateTo;
if (!startValue || !endValue) {
return false
}
return startValue.valueOf() >= endValue.valueOf();
}
const disabledDateEnd = (endValue) => {
const startValue = formState?.dateFrom;
if (!endValue || !startValue) {
return false
}
return endValue.valueOf() <= startValue.valueOf();
}
const onSearch = (val)=> { const onSearch = (val)=> {
openModalDept(true,{isUpdate: false}) openModalDept(true,{isUpdate: false})
} }
const onSearchUser = (val)=> { const onSearchUser = (val)=> {
openModal(true,{isUpdate: false}) openModal(true,{isUpdate: false})
} }
const onAppro = (val)=> {
openModalAppro(true,{isUpdate: false})
}
const handleSuccess = (val) => { const handleSuccess = (val) => {
formState.empName = val[0].name formState.empName = val[0].name
formState.empId = val[0].id formState.empId = val[0].id
formState.tel = val[0].mobile
} }
const handleSuccessDept = (val, info) => { const handleSuccessDept = (val, info) => {
formState.deptName = val[0].name formState.bDeptName = val[0].name
formState.bDeptId = val[0].id formState.bDeptId = val[0].id
formState.comName = info.name formState.comName = info.name
formState.comId = info.id formState.comId = info.id
} }
const handleSuccessAppro = (val) =>{
if (!dataListAppro.value.length) {
dataListAppro.value = val
return
}
let arr = []
val.forEach(v => {
dataListAppro.value.forEach(i => {
if (v.code == i.code){
message.warning(v.code + '已重复')
} else {
arr.push(v)
}
})
})
dataListAppro.value = unique([...dataListAppro.value, ...arr], 'code')
}
function unique(arr, u_key) {
const map = new Map()
arr.forEach((item, index) => {
if (!map.has(item[u_key])) {
map.set(item[u_key], item)
}
})
return [...map.values()]
}
function close() { function close() {
tabStore.closeTab(currentRoute.value, router); tabStore.closeTab(currentRoute.value, router);
} }
@ -396,7 +500,7 @@
} }
spinning.value = true; spinning.value = true;
let request = !formState.id ? addLngAppro :updateLngAppro let request = !formState.id ? addLngContractFact :updateLngContractFact
try { try {
const data = await request(obj); const data = await request(obj);
@ -434,6 +538,10 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-form-item .ant-form-item-label) {
width: 135px !important;
max-width: 135px !important;
}
.page-bg-wrap { .page-bg-wrap {
background-color: #fff; background-color: #fff;
} }

View File

@ -10,8 +10,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="客户分类" name="classCode"> <a-form-item label="客户分类" name="cpClassName">
<a-input v-model:value="formState.classCode" disabled /> <a-input v-model:value="formState.cpClassName" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -203,7 +203,7 @@
} }
const handleSuccess = (val) => { const handleSuccess = (val) => {
formState.cpCode = val[0].cuCode formState.cpCode = val[0].cuCode
formState.classCode = val[0].classCode formState.cpClassName = val[0].classCode
formState.cpName = val[0].cuName formState.cpName = val[0].cuName
} }
const gsIdFocus = (val) => { const gsIdFocus = (val) => {

View File

@ -10,8 +10,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="供应商分类" name="classCode"> <a-form-item label="供应商分类" name="cpClassName">
<a-input v-model:value="formState.classCode" disabled /> <a-input v-model:value="formState.cpClassName" disabled />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -203,7 +203,7 @@
} }
const handleSuccess = (val) => { const handleSuccess = (val) => {
formState.cpCode = val[0].suCode formState.cpCode = val[0].suCode
formState.classCode = val[0].classCode formState.cpClassName = val[0].classCode
formState.cpName = val[0].suName formState.cpName = val[0].suName
} }
const gsIdFocus = (val) => { const gsIdFocus = (val) => {