提交 44f84d08 authored 作者: kxjia's avatar kxjia

非现场报送优化

上级 4aa6263d
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -997,10 +997,12 @@ export const tableFormData = [
{ C24A054: '', C24A055: '', C24A056: '', C24A058: '', C24A059: '', C24A060: '', C24A061: '' },
{ C24A054: '', C24A055: '', C24A056: '', C24A058: '', C24A059: '', C24A060: '', C24A061: '' },
],
footerData: [
{
labelField: 'C24A059',
labelValue: '合计',
pcode:'TB1012',
fields: ['C24A060', 'C24A061'],
tp: 'sum',
xmlCode: { C24A060: 'C24A075', C24A061: 'C24A076' },
......
......@@ -2,7 +2,7 @@
<div>
<BasicTable @register="registerTable">
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<template #htmlSlot="{ text }">
<div v-html="text"></div>
......@@ -14,19 +14,17 @@
</div>
</template>
<script lang="ts" name="baosong-baosongTask" setup>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useModal } from '/@/components/Modal';
import { useDrawer } from '/@/components/Drawer';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, searchFormSchema } from '../task/BaosongTask.data';
import RecordDrawer from './components/RecordDrawer.vue';
import RecordDrawer2 from './components/RecordDrawer2.vue';
import FileContentView from '../components/FileContentView.vue';
import { useRouter } from 'vue-router';
const router = useRouter()
import { listForFillData } from '../task/BaosongTask.api';
......@@ -36,7 +34,6 @@
const refRecordDrawer2 = ref()
const refFileContentView = ref()
const { prefixCls, tableContext, } = useListPage({
tableProps: {
title: '任务表',
......@@ -52,10 +49,10 @@
fieldMapToTime: [],
},
beforeFetch(params) {
params['sta'] = 2
params['sta'] = 1
},
actionColumn: {
width: 200,
width: 100,
fixed: 'right',
},
},
......@@ -66,15 +63,7 @@
function getTableAction(record) {
return [
{
label: '表单方式',
onClick: handleAddRecord.bind(null, record),
},
{
label: '表格方式',
onClick: handleAddRecord2.bind(null, record),
},
{
label: 'WORD方式',
label: '填报',
onClick: handleAddRecord3.bind(null, record),
},
{
......@@ -84,6 +73,18 @@
];
}
function getDropDownAction(record){
return [
{
label: '表单方式',
onClick: handleAddRecord.bind(null, record),
},
{
label: '表格方式',
onClick: handleAddRecord2.bind(null, record),
}
]
}
function handleAddRecord(record) {
refRecordDrawer.value.setIniData(record)
......
......@@ -644,7 +644,6 @@ const collectVxeTableData = async () => {
if (child) {
const formData = await child.getFormData()
let rind = 0
// 表格数据
for (const obj of formData.datas) {
rind++
......@@ -652,11 +651,10 @@ const collectVxeTableData = async () => {
await addFormValue(pcode, code, value, rind)
}
}
// 表尾数据
if (formData.footer) {
alert(formData.footerPcode)
for (const [code, value] of Object.entries(formData.footer)) {
await addFormValue(pcode, code, value, 1)
await addFormValue(formData.footerPcode, code, value, 1)
}
}
}
......
......@@ -211,11 +211,11 @@
return acc;
}, {});
}) || [];
return {
...formData,
datas: newDatas,
footer: formFooterData,
footerPcode: props.footerData[0].pcode,
};
};
......
<template>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit" okText="确定">
<BasicForm @register="registerForm" />
<BasicModal v-bind="$attrs" @register="registerModal"
destroyOnClose :title="title" width="100%" @ok="handleSubmit" okText="确定">
<div class="split-container">
<div class="left-panel">
<Tb ref="tbRef" />
</div>
<div class="right-panel">
<BasicForm @register="registerForm" />
</div>
</div>
</BasicModal>
</template>
......@@ -11,7 +20,10 @@
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchemaApprove } from '../BaosongTaskReview.data';
import { saveOrUpdate } from '../BaosongTaskReview.api';
import Tb1 from '/@/views/baosong/report/components/Tb1.vue';
const { createConfirm } = useMessage();
const showTab1 = ref(false);
// Emits声明
const emit = defineEmits(['register', 'success']);
const isUpdate = ref(true);
......@@ -72,6 +84,24 @@
</script>
<style lang="less" scoped>
.split-container {
display: flex;
width: 100%;
height: 100%;
min-height: 500px;
}
.left-panel {
width: 70%;
padding-right: 10px;
border-right: 1px solid #e8e8e8;
}
.right-panel {
width: 30%;
padding-left: 10px;
}
/** 时间和数字输入框样式 */
:deep(.ant-input-number) {
width: 100%;
......
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getAllRolesList, queryUserByDepId } from '/@/views/system/user/user.api';
const objTmp={1:"year",2:"quarter",3:"month"}
const valueFormat={1:"YYYY",2:"YYYYqQ",3:"YYYY-MM"}
//列表数据
......@@ -21,13 +21,13 @@ export const columns: BasicColumn[] = [
customRender: ({ text }) => {
return render.renderDict(text, 'report_tp');
},
width: "7%",
width: "10%",
resizable:true
},
{
title: '填报角色',
title: '填报',
align: 'left',
dataIndex: 'enterRole',
dataIndex: 'fillUser',
width:0,
ifShow: false,
resizable:true
......@@ -35,25 +35,25 @@ export const columns: BasicColumn[] = [
{
title: '负责人',
align: 'left',
dataIndex: 'respUser_dictText',
width: "7%",
dataIndex: 'respUser',
width: "10%",
resizable:true
},
{
title: '联系电话',
align: 'left',
dataIndex: 'enterTel',
width: "9%",
width: "10%",
resizable:true
},
{
title: '统计时段',
align: 'left',
dataIndex: 'enterDate',
width: "10%",
customRender: ({ text }) => {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
},
width: "9%",
resizable:true
},
{
......@@ -63,7 +63,6 @@ export const columns: BasicColumn[] = [
customRender: ({ text }) => {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
},
ifShow: false,
resizable:true
},
......@@ -261,58 +260,22 @@ export const formSchema: FormSchema[] = [
required: true,
},
{
label: '填报角色',
field: 'enterRole',
component: 'ApiSelect',
componentProps: {
mode: 'radio',
api: getAllRolesList,
labelField: 'roleName',
valueField: 'id',
},
label: '填报人',
field: 'fillUser',
component: 'Input',
required: true,
},
{
label: '填报部门',
field: 'respDepart',
required: true,
component: 'JSelectDept',
componentProps: ({ formActionType, formModel }) => {
return {
sync: false,
checkStrictly: true,
defaultExpandLevel: 2,
multiple:false,
onSelect: async (options, values) => {
// const depId = values.value[0]
// if(depId.length==32){
// const users = await queryUserByDepId({id:depId});
// const newArray = users.map(user => ({
// label: user.realname,
// value: user.id
// }));
// const { updateSchema } = formActionType;
// updateSchema([
// {
// field: 'respUser',
// componentProps: { options: newArray },
// },
// ]);
// }
},
};
},
component: 'Input',
},
{
label: '负责人',
field: 'respUser',
component: 'JSelectUserByDept',
componentProps:{
labelKey:'realname',
rowKey:'username'
},
component: 'Input',
required: true,
},
......
......@@ -164,9 +164,7 @@
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论