Merge remote-tracking branch 'origin/master'

master
王家东 3 weeks ago
commit 1cb6dc754d
  1. 26
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/depsbncz/controller/DepsbnczController.java
  2. 5
      jeecgboot-vue3/src/views/depsbncz/Depsbncz.api.ts
  3. 64
      jeecgboot-vue3/src/views/depsbncz/Depsbncz.data.ts
  4. 26
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/DepartBaseInfoDemo.vue
  5. 130
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue

@ -12,6 +12,7 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
@ -29,6 +30,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -63,6 +66,8 @@ public class DepsbnczController extends JeecgController<Depsbncz, IDepsbnczServi
private IDepadminlxService depadminlxService;
@Autowired
private IAnnualService annualService;
@Autowired
private ISysDepartService iSysDepartService;
/**
* 分页列表查询
@ -88,6 +93,20 @@ public class DepsbnczController extends JeecgController<Depsbncz, IDepsbnczServi
return Result.OK(pageList);
}
@ApiOperation(value="预算书-部门基本情况-上年度(末)主要财务数据", notes="预算书-部门基本情况-上年度(末)主要财务数据")
@GetMapping(value = "/getBydepid")
public Result<IPage<Depsbncz>> getBydepid(Depsbncz depsbncz,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode, depsbncz.getDepid()));
depsbncz.setDepid(sysDepart.getId());
QueryWrapper<Depsbncz> queryWrapper = QueryGenerator.initQueryWrapper(depsbncz, req.getParameterMap());
Page<Depsbncz> page = new Page<Depsbncz>(pageNo, pageSize);
IPage<Depsbncz> pageList = depsbnczService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -176,6 +195,13 @@ public class DepsbnczController extends JeecgController<Depsbncz, IDepsbnczServi
return Result.OK(depsbncz);
}
@ApiOperation(value="上年度(末)主要财务数据-通过depid查询", notes="上年度(末)主要财务数据-通过depid查询")
@GetMapping(value = "/queryBydepid/{depid}")
public Result<List<Depsbncz>> queryBydepid(@PathVariable("depid") String depid) {
List<Depsbncz> list = depsbnczService.list(new LambdaQueryWrapper<Depsbncz>().eq(Depsbncz::getDepid, depid));
return Result.OK(list);
}
/**
* 导出excel
*

@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
enum Api {
list = '/depsbncz/depsbncz/list',
getBydepid = '/depsbncz/depsbncz/getBydepid',
save='/depsbncz/depsbncz/add',
edit='/depsbncz/depsbncz/edit',
deleteOne = '/depsbncz/depsbncz/delete',
@ -30,6 +31,10 @@ export const getImportUrl = Api.importExcel;
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const listDepsbncz = (params) =>
defHttp.get({url: Api.getBydepid, params});
/**
* 删除单个
* @param params

@ -67,6 +67,70 @@ export const columns: BasicColumn[] = [
},
];
export const depsbnczColumns2: BasicColumn[] = [
/*{
title: '部门',
align: "center",
dataIndex: 'depid_dictText'
},*/
{
title: '单位开办费',
align: "center",
dataIndex: 'dwkbf'
},
{
title: '资产合计',
align: "center",
dataIndex: 'zchj'
},
{
title: '负债合计',
align: "center",
dataIndex: 'fzhj'
},
{
title: '净资产',
align: "center",
dataIndex: 'jzc'
},
{
title: '财政拨款',
align: "center",
dataIndex: 'czbk'
},
{
title: '财政拨款专项支出',
align: "center",
dataIndex: 'czbkzxzc'
},
{
title: '经营收入',
align: "center",
dataIndex: 'jysr'
},
{
title: '经营支出',
align: "center",
dataIndex: 'jyzc'
},
{
title: '经营结余',
align: "center",
dataIndex: 'jyjy'
},
{
title: '纳税总额',
align: "center",
dataIndex: 'nsze'
},
/*{
title: '年度',
align: "center",
dataIndex: 'annualid_dictText'
},*/
];
//
export const superQuerySchema = {
depid: {title: '部门',order: 0,view: 'sel_search', type: 'string',dictTable: "sys_depart", dictCode: 'id', dictText: 'depart_name',},

@ -10,6 +10,7 @@
/>
</PageWrapper>
<BasicTable @register="registerTimeTable"/>
<BasicTable @register="depsbnczTable"/>
</div>
<!-- <div>
&lt;!&ndash;引用表格&ndash;&gt;
@ -28,10 +29,14 @@ import {BasicTable, useTable} from '/@/components/Table';
import {useRoute, useRouter} from "vue-router";
import {useModal} from "@/components/Modal";
import {list} from '@/views/projectApplication/project/Project.api';
import { useUserStore } from '/@/store/modules/user';
const { userInfo } = useUserStore();
import {getDepartByProjectId} from './FengMian.api';
import {columns2} from "@/views/cooperationDepart/CooperationDepart.data";
import {list2} from "@/views/cooperationDepart/CooperationDepart.api";
import {depsbnczColumns2} from "@/views/depsbncz/Depsbncz.data";
import {listDepsbncz} from "@/views/depsbncz/Depsbncz.api";
const route = useRoute();
const router = useRouter();
@ -65,6 +70,25 @@ async function listCooperationByProjectId() {
};
const [depsbnczTable] = useTable({
title: '上年度(末)主要财务数据',
columns: depsbnczColumns2,
pagination: false,
// dataSource: null,
api: listDepsbnczByProjectId,
showIndexColumn: false,
scroll: {y: 300},
});
async function listDepsbnczByProjectId() {
let params = {
depid: userInfo.orgCode,
};
console.log(JSON.stringify(params));
return await listDepsbncz(params);
};
const schema2: any = [
{
field: 'name',

@ -4,23 +4,15 @@
<thead>
<tr>
<th rowspan="2" style="width: 300px; position: relative">
<div
style="
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
"
>
<!-- <a-button @click="save" type="primary">Primary Button</a-button>-->
<th>单位名称</th>
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)">
<!-- <a-button @click="save" type="primary">Primary Button</a-button>-->
单位名称
</div>
</th>
<th colspan="3">分年预算</th>
<th rowspan="2">合计</th>
<th rowspan="2">合计</th>
</tr>
<tr>
<th><a-date-picker v-model:value="data.year1" picker="year" /></th>
<th><a-date-picker v-model:value="data.year2" picker="year" /></th>
<th><a-date-picker v-model:value="data.year3" picker="year" /></th>
@ -32,67 +24,68 @@
<td><a-input prefix="¥" suffix="RMB" v-model:value="data.year1Value" /></td>
<td><a-input prefix="¥" suffix="RMB" v-model:value="data.year2Value" /></td>
<td><a-input prefix="¥" suffix="RMB" v-model:value="data.year3Value" /></td>
<td>{{Amount}}</td>
<td>{{ Amount }}</td>
</tr>
</tbody>
</table>
</div>
<div class="button-container">
<a-button type="primary" @click="handleSubmit">保存</a-button>
<a-button type="primary" @click="router.back();">返回</a-button>
<div class="button-container" style="margin-top: 50px">
<a-button type="primary" @click="handleSubmit">保存</a-button>
<a-button type="primary" @click="router.back()" style="margin-left: 30px">返回</a-button>
</div>
</div>
</template>
<script setup>
import {ref,onMounted,computed} from 'vue'
import {useRoute, useRouter} from "vue-router";
import {saveOrUpdate} from "@/views/projectAnnualBudget/ProjectAnnualBudget.api";
import {defHttp} from "@/utils/http/axios";
import {useMessage} from "@/hooks/web/useMessage";
import { ref, onMounted, computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { saveOrUpdate } from '@/views/projectAnnualBudget/ProjectAnnualBudget.api';
import { defHttp } from '@/utils/http/axios';
import { useMessage } from '@/hooks/web/useMessage';
import dayjs from 'dayjs';
const { createMessage } = useMessage();
const router = useRouter();
const route = useRoute();
// import moment from 'moment';
const data = ref({
year1:'',
year2:'',
year3:'',
year1Value:0,
year2Value:0,
year3Value:0,
departName:'',
totalAmount:''
})
onMounted(()=> {
year1: '',
year2: '',
year3: '',
year1Value: 0,
year2Value: 0,
year3Value: 0,
departName: '',
totalAmount: '',
});
onMounted(() => {
loadData();
})
// data.value.year1 = dayjs('2018/01/01','YYYY/MM/DD')
});
const handleSubmit = async () => {
const handleSubmit = async () => {
let params = {
year1:data.value.year1.$y,
year2:data.value.year2.$y,
year3:data.value.year3.$y,
year1Value:data.value.year1Value,
year2Value:data.value.year2Value,
year3Value:data.value.year3Value,
departName:data.value.departName,
totalAmount:Number(data.value.year1Value) + Number(data.value.year2Value) + Number(data.value.year3Value),
}
year1: data.value.year1.$y,
year2: data.value.year2.$y,
year3: data.value.year3.$y,
year1Value: data.value.year1Value,
year2Value: data.value.year2Value,
year3Value: data.value.year3Value,
departName: data.value.departName,
totalAmount: Number(data.value.year1Value) + Number(data.value.year2Value) + Number(data.value.year3Value),
};
params.projectId = route.query.id;
defHttp
.post({
url: '/projectAnnualBudget/projectAnnualBudget/add/'+route.query.id,
params: params,
})
/*.then(() => {
// createMessage.success(``);
// loadData();
})
.finally(() => {
// loading.value = false;
});*/
}
defHttp.post({
url: '/projectAnnualBudget/projectAnnualBudget/add/' + route.query.id,
params: params,
});
/*.then(() => {
// createMessage.success(``);
// loadData();
})
.finally(() => {
// loading.value = false;
});*/
};
//
async function loadData() {
@ -101,31 +94,36 @@ async function loadData() {
await defHttp
.get({
//
url: '/projectAnnualBudget/projectAnnualBudget/queryByProjectId/'+route.query.id,
}).then((result) => {
data.value.year1Value = result.year1Value
data.value.year2Value = result.year2Value
data.value.year3Value = result.year3Value
data.value.departName = result.departName
console.log("the data()",JSON.stringify(result))
url: '/projectAnnualBudget/projectAnnualBudget/queryByProjectId/' + route.query.id,
})
.then((result) => {
data.value.year1Value = result.year1Value;
data.value.year2Value = result.year2Value;
data.value.year3Value = result.year3Value;
data.value.departName = result.departName;
data.value.year1 = dayjs(result.year1, 'YYYY');
data.value.year2 = dayjs(result.year3, 'YYYY');
data.value.year3 = dayjs(result.year3, 'YYYY');
console.log('the data()', JSON.stringify(result));
// total
// pagination.total = result.total;
// dataSource
// dataSource.value = result.records;
// //
// selectedRows.value = [];
})
});
}
const Amount = computed(() => {
return Number(data.value.year1Value) + Number(data.value.year2Value) + Number(data.value.year3Value)
})
return Number(data.value.year1Value) + Number(data.value.year2Value) + Number(data.value.year3Value);
});
</script>
<style scoped lang="less">
.container {
width: 100%;
height: 500px;
margin-top: 20px;
}
table {
width: 100%;

Loading…
Cancel
Save