Commit 0f8a3ef0 authored by ccc2wdd's avatar ccc2wdd

变更签证,填报周期;设置填报周期弹窗样式修改

parent b397aa97
......@@ -30,6 +30,10 @@ enum Api {
DeleteList = '/pro/change-visa/delete-id',
// 判断季度选是否已存在
CheckQuarter = '/pro/change-visa/is-change',
GetCycelDetails = '/pro/change-visa/cycle/details',
EditCycel = '/pro/change-visa/cycle/edit',
EditStatus = '/pro/change-visa/cycle/editStatus',
BusinessComDetails = '/pro/change-visa/cycle/businessComDetails',
}
export const getSettlementManageList = (params?: ProjectParams) =>
......@@ -43,14 +47,14 @@ export const getStatisticListAll = (params?: ProjectParams) =>
// 导出
export const exportChangeSignature = (params?: any) =>
defHttp.post<any>(
{
url: Api.ExportChangeSignature,
data: params,
responseType: 'blob',
},
{ errorMessageMode: 'none', isTransformResponse: false },
);
defHttp.post<any>(
{
url: Api.ExportChangeSignature,
data: params,
responseType: 'blob',
},
{ errorMessageMode: 'none', isTransformResponse: false },
);
// 根据id 查询详情
export const getItem = (params?: any) =>
......@@ -113,3 +117,27 @@ export const checkQuarter = (params?: any) =>
url: Api.CheckQuarter,
params,
});
export const getCycel = (params?: any) =>
defHttp.post<any>({
url: Api.GetCycelDetails,
params,
});
export const setCycel = (params?: any) =>
defHttp.post<any>({
url: Api.EditCycel,
params,
});
export const setEditStatus = (params?: any) =>
defHttp.post<any>({
url: Api.EditStatus,
params,
});
export const getFillComDetails = (params?: any) =>
defHttp.post<any>({
url: Api.BusinessComDetails,
params,
});
......@@ -84,11 +84,9 @@
import { PageWrapper } from '@/components/Page';
import contractDrawer from '@/views/contract/contractDrawer.vue';
import { BasicForm, useForm, FormProps, UseFormReturnType } from '@/components/Form';
// import { formSchema, subFormSchema } from './tableData';
import { formSchema, subFormSchema } from './changeSignatrue.data';
import { deepMerge } from '@/utils';
import { useMessage } from '@/hooks/web/useMessage';
// import { addItem, updateItem, getItem } from '@/api/project/monthlyPlan';
import { addItem, getItem, updateItem } from '@/api/changeSignatrue/changeSignatrue';
import { EditModel } from '@/api/project/model/changeSignatureModel';
import { useModal } from '@/components/Modal';
......@@ -390,8 +388,6 @@
let contentRes = await getFormData(content.form[1]);
objCon = deepMerge(objCon, contentRes);
console.log('表格', formData.value.engineerConList);
console.log('索引', engineerConListIndex);
formData.value.engineerConList[engineerConListIndex].conList.push(objCon);
}
}
......
<template>
<BasicModal
v-bind="$attrs"
@register="register"
title="设置填报周期"
:minHeight="30"
okText="保存"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" :model="modelRef" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { setCycel } from '@/api/changeSignatrue/changeSignatrue';
const props = defineProps({
userData: { type: Object },
});
const emit = defineEmits(['getCycle', 'register']);
const modelRef = ref({});
const [registerForm, { getFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: [
{
field: 'year',
label: '填报年份',
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '年份',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 12 },
},
{
field: 'quarter',
label: '填报季度',
required: true,
component: 'Select',
componentProps: {
options: [
{
label: '第一季度',
value: '第一季度',
},
{
label: '第二季度',
value: '第二季度',
},
{
label: '第三季度',
value: '第三季度',
},
{
label: '第四季度',
value: '第四季度',
},
],
placeholder: '季度',
style: { width: '100%' },
},
colProps: { span: 12 },
},
],
showActionButtonGroup: false,
actionColOptions: {
span: 24,
},
});
const cycleData = ref({
beginTime: '2024-07-01',
endTime: '2024-09-02',
fillCycle: '2020年第一季度',
isEdit: '0',
deptNum: 8,
noNum: 6,
});
const [register, { closeModal }] = useModalInner((data) => {
cycleData.value = data.data;
});
function handleSubmit() {
validate().then(() => {
const value = getFieldsValue();
cycleData.value.fillCycle = value.year + '年' + value.quarter;
setCycel(cycleData.value).then(() => {
emit('getCycle');
});
closeModal();
});
}
</script>
<template>
<BasicModal v-bind="$attrs" width="80%" @register="register" :title="getTitle" :showOkBtn="false">
<Table
:pagination="false"
:dataSource="dataSource"
:columns="columns"
bordered
:sticky="true"
:loading="loadingRef"
>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'comStatus'">
<Tag color="green" v-if="record.comStatus === '1'"> 已完成 </Tag>
<Tag color="red" v-else> 未完成 </Tag>
</template>
</template>
</Table>
</BasicModal>
</template>
<script setup lang="ts">
import { useModalInner } from '@/components/Modal';
import BasicModal from '@/components/Modal/src/BasicModal.vue';
import { ref } from 'vue';
import { Table, Tag } from 'ant-design-vue';
import { getFillComDetails } from '@/api/changeSignatrue/changeSignatrue';
const loadingRef = ref(false);
// 列表
const dataSource = ref([]);
// 表头
const columns = [
{
title: '公司名称',
dataIndex: 'companyName',
width: 200,
},
{
title: '完成状态',
dataIndex: 'comStatus',
width: 180,
},
{
title: '上报时间',
dataIndex: 'auditTime',
width: 150,
},
];
const getTitle = ref('');
const params = ref({ mothCycle: '' });
const [register, { closeModal }] = useModalInner(async (data) => {
params.value.mothCycle = data.data.fillCycle;
dataSource.value = await getFillComDetails(params.value);
});
</script>
<style scoped lang="less"></style>
......@@ -190,6 +190,7 @@ import {useMessage} from '@/hooks/web/useMessage';
import {useUserStore} from '@/store/modules/user';
import CycleModel from '@/views/changeSignature/cycleModel/cycleModel.vue';
import FillDetailsModel from '@/views/changeSignature/fillDetailsModel/fillDetailsModel.vue';
import yearModal from '@/components/yearModal/yearModal.vue';
const { createMessage } = useMessage();
const { push } = useRouter();
......
......@@ -30,12 +30,13 @@
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '选择年份',
placeholder: '年份',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 12 },
},
{
field: 'quarter',
......@@ -64,6 +65,7 @@
placeholder: '季度',
style: { width: '100%' },
},
colProps: { span: 12 },
},
],
showActionButtonGroup: false,
......
......@@ -36,6 +36,7 @@
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 12 },
},
{
field: 'quarter',
......@@ -64,6 +65,7 @@
placeholder: '季度',
style: { width: '100%' },
},
colProps: { span: 12 },
},
],
showActionButtonGroup: false,
......
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