明树Git Lab

Commit 537fb7f3 authored by zhanghan's avatar zhanghan

1

parent 9bdc48fa
Pipeline #111580 passed with stage
in 19 seconds
...@@ -266,7 +266,7 @@ const activeCollapse = reactive([ ...@@ -266,7 +266,7 @@ const activeCollapse = reactive([
"项目批复信息", "项目批复信息",
"其他", "其他",
"投决计划", "投决计划",
"投评报告及测算表", "投资各方现金流量表",
"项目投资资金流量表", "项目投资资金流量表",
"项目资本金现金流量表", "项目资本金现金流量表",
"能建方现金流量表", "能建方现金流量表",
...@@ -289,7 +289,7 @@ let projectId = route.query.projectId; ...@@ -289,7 +289,7 @@ let projectId = route.query.projectId;
const lxType = computed(() => formData.projectLzType?.toString()); const lxType = computed(() => formData.projectLzType?.toString());
const jcType = computed(() => jcFormData.projectLzType?.toString()); const jcType = computed(() => jcFormData.projectLzType?.toString());
const isDaibanUser = computed(() => const isDaibanUser = computed(() =>
formData?.daibanUsers?.includes(userInfo?.id) formData?.daibanUsers?.includes(userInfo?.id),
); );
// 表单禁用状态:基于流程节点 + 待办人判断 // 表单禁用状态:基于流程节点 + 待办人判断
...@@ -307,25 +307,26 @@ const jcFormDisabled = computed(() => { ...@@ -307,25 +307,26 @@ const jcFormDisabled = computed(() => {
}); });
const showSave = computed( const showSave = computed(
() => !isPreview && (!formData.id || formData.projectCreator === userInfo?.id) () =>
!isPreview && (!formData.id || formData.projectCreator === userInfo?.id),
); );
const showSubmitLixiang = computed( const showSubmitLixiang = computed(
() => lxType.value === "1" && formData.projectCreator === userInfo?.id () => lxType.value === "1" && formData.projectCreator === userInfo?.id,
); );
const showSubmitJuece = computed( const showSubmitJuece = computed(
() => jcType.value === "7" && formData.projectCreator === userInfo?.id () => jcType.value === "7" && formData.projectCreator === userInfo?.id,
); );
const showFirstAudit = computed( const showFirstAudit = computed(
() => isDaibanUser.value && lxType.value === "3" () => isDaibanUser.value && lxType.value === "3",
); );
const showAuditLixiang = computed( const showAuditLixiang = computed(
() => isDaibanUser.value && hasApproveRole && lxType.value === "4" () => isDaibanUser.value && hasApproveRole && lxType.value === "4",
); );
const showAuditJuece = computed( const showAuditJuece = computed(
() => isDaibanUser.value && jcType.value === "8" () => isDaibanUser.value && jcType.value === "8",
); );
const showApprove = computed( const showApprove = computed(
() => isDaibanUser.value && hasApproveRole && lxType.value === "2" () => isDaibanUser.value && hasApproveRole && lxType.value === "2",
); );
// 下载文件 // 下载文件
...@@ -348,7 +349,7 @@ const downloadTemplate = async (type) => { ...@@ -348,7 +349,7 @@ const downloadTemplate = async (type) => {
headers: { headers: {
Authorization: token.value, Authorization: token.value,
}, },
} },
) )
.then((res) => res.blob()) .then((res) => res.blob())
.then((blob) => { .then((blob) => {
...@@ -359,14 +360,14 @@ const downloadTemplate = async (type) => { ...@@ -359,14 +360,14 @@ const downloadTemplate = async (type) => {
type === "tjjh" type === "tjjh"
? "投决计划" ? "投决计划"
: type === "xmtzzjll" : type === "xmtzzjll"
? "项目投资资金流量表" ? "项目投资资金流量表"
: type === "xmzbjxjll" : type === "xmzbjxjll"
? "项目资本金现金流量表" ? "项目资本金现金流量表"
: type === "njfxjll" : type === "njfxjll"
? "能建方现金流量表" ? "能建方现金流量表"
: type === "lrb" : type === "lrb"
? "利润表" ? "利润表"
: ""; : "";
link.download = name + "模板.xlsx"; link.download = name + "模板.xlsx";
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
...@@ -385,7 +386,7 @@ const finance = useFinanceTables(); ...@@ -385,7 +386,7 @@ const finance = useFinanceTables();
const getObjSums = (obj, objkey) => { const getObjSums = (obj, objkey) => {
return Object.entries(obj).reduce( return Object.entries(obj).reduce(
(acc, [key, item]) => acc.plus(new Decimal(item[objkey] || 0)), (acc, [key, item]) => acc.plus(new Decimal(item[objkey] || 0)),
new Decimal(0) new Decimal(0),
); );
}; };
...@@ -475,6 +476,30 @@ const getProjectInfo = () => { ...@@ -475,6 +476,30 @@ const getProjectInfo = () => {
pageActiveName.value = "决策信息填报"; pageActiveName.value = "决策信息填报";
} }
// 按zb名称将后端数据合并到前端默认树结构中
function mergeTzzeData(defaultData, backendData) {
if (!backendData || !backendData.length) return;
const map = {};
function flatten(items) {
for (const item of items) {
if (item.zb) map[item.zb] = item;
if (item.children && item.children.length) flatten(item.children);
}
}
flatten(backendData);
function fill(items) {
for (const item of items) {
const src = map[item.zb];
if (src) {
item.id = src.id;
item.rmbjj = src.rmbjj;
}
if (item.children && item.children.length) fill(item.children);
}
}
fill(defaultData);
}
// 决策 // 决策
let jcData = res.juece || {}; let jcData = res.juece || {};
Object.assign(jcFormData, jcData); Object.assign(jcFormData, jcData);
...@@ -491,7 +516,7 @@ const getProjectInfo = () => { ...@@ -491,7 +516,7 @@ const getProjectInfo = () => {
Object.assign(juece.tpzcclData.value, jcData.qtxgzccl); Object.assign(juece.tpzcclData.value, jcData.qtxgzccl);
Object.assign(juece.tpbczcclData.value, jcData.bcxgzccl); Object.assign(juece.tpbczcclData.value, jcData.bcxgzccl);
Object.assign(juece.shyaData.value, jcData.shya); Object.assign(juece.shyaData.value, jcData.shya);
Object.assign(juece.jcTzzeqkjData, jcData.projectXmtzzes); mergeTzzeData(juece.jcTzzeqkjData, jcData.projectXmtzzes);
Object.assign(juece.jcCwpjzbData, jcData.projectCwpjzbs); Object.assign(juece.jcCwpjzbData, jcData.projectCwpjzbs);
Object.assign(juece.jcHxbjtjData, jcData.projectBjtjs); Object.assign(juece.jcHxbjtjData, jcData.projectBjtjs);
Object.assign(juece.jcztshqkData, jcData.projectJczts); Object.assign(juece.jcztshqkData, jcData.projectJczts);
...@@ -516,7 +541,7 @@ const getProjectInfo = () => { ...@@ -516,7 +541,7 @@ const getProjectInfo = () => {
?.children || []; ?.children || [];
resource.jcQxgjList.value = resource.jcQxgjList.value =
resource.jcDsgjList.value.filter( resource.jcDsgjList.value.filter(
(item) => item.key == jcData.dsjngjjw (item) => item.key == jcData.dsjngjjw,
)[0]?.children || []; )[0]?.children || [];
resource.jcTzsxejflList.value = resource.jcTzsxejflList.value =
resource.tzsxyjflList.filter((item) => item.key == jcData.tzsxyjfl)[0] resource.tzsxyjflList.filter((item) => item.key == jcData.tzsxyjfl)[0]
...@@ -635,10 +660,10 @@ const processInfo = computed(() => ({ ...@@ -635,10 +660,10 @@ const processInfo = computed(() => ({
})); }));
const processTableData = ref([]); const processTableData = ref([]);
const lxProcessData = computed(() => const lxProcessData = computed(() =>
processTableData.value.filter((r) => !r.actionName?.includes("决策")) processTableData.value.filter((r) => !r.actionName?.includes("决策")),
); );
const jcProcessData = computed(() => const jcProcessData = computed(() =>
processTableData.value.filter((r) => r.actionName?.includes("决策")) processTableData.value.filter((r) => r.actionName?.includes("决策")),
); );
const getProcessData = () => { const getProcessData = () => {
proxy.$post({ proxy.$post({
...@@ -671,10 +696,10 @@ const submitAudit = () => { ...@@ -671,10 +696,10 @@ const submitAudit = () => {
formData.projectLzType.toString() === "3" formData.projectLzType.toString() === "3"
? "approvalLixiangByTouGuanJbr" ? "approvalLixiangByTouGuanJbr"
: formData.projectLzType.toString() === "4" : formData.projectLzType.toString() === "4"
? "approvalLixiang" ? "approvalLixiang"
: jcFormData.projectLzType.toString() === "8" : jcFormData.projectLzType.toString() === "8"
? "approvalJuece" ? "approvalJuece"
: ""; : "";
proxy.$post({ proxy.$post({
url: "/api/project/" + url, url: "/api/project/" + url,
data: { data: {
......
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
<div class="tab-content"> <div class="tab-content">
<el-form :model="jcFormData" :label-width="150" :disabled="isPreview"> <el-form :model="jcFormData" :label-width="150" :disabled="isPreview">
<el-collapse v-model="activeCollapse"> <el-collapse v-model="activeCollapse">
<el-collapse-item title="投评报告及测算表" name="投评报告及测算表">
<FileUploader v-model="jcFormData.tpbgjcsb" />
</el-collapse-item>
<el-collapse-item title="投决计划" name="投决计划"> <el-collapse-item title="投决计划" name="投决计划">
<div class="tab-handle"> <div class="tab-handle">
<el-button <el-button
...@@ -383,6 +379,12 @@ ...@@ -383,6 +379,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-collapse-item> </el-collapse-item>
<el-collapse-item
title="投资各方现金流量表"
name="投资各方现金流量表"
>
<FileUploader v-model="jcFormData.tpbgjcsb" />
</el-collapse-item>
</el-collapse> </el-collapse>
</el-form> </el-form>
</div> </div>
......
...@@ -403,11 +403,18 @@ export function useJueceData(jcFormData, gdlxListRef) { ...@@ -403,11 +403,18 @@ export function useJueceData(jcFormData, gdlxListRef) {
}, },
], ],
}, },
{
xh: "4",
zb: "单位工程造价",
dw: "万元",
key: "2.4",
parentKey: "2",
},
], ],
}, },
{ {
xh: "", xh: "",
zb: "批复总资", zb: "批复总资",
dw: "万元", dw: "万元",
key: "3", key: "3",
}, },
...@@ -453,6 +460,8 @@ export function useJueceData(jcFormData, gdlxListRef) { ...@@ -453,6 +460,8 @@ export function useJueceData(jcFormData, gdlxListRef) {
ykphddw: "%", ykphddw: "%",
xsfwnlDw: "万元", xsfwnlDw: "万元",
dwscfwzcbDw: "万元", dwscfwzcbDw: "万元",
dwgczjDtDw: "元/km",
dwgczjJtDw: "元/km",
}); });
}; };
const deleteJchxbjtj = (index) => { const deleteJchxbjtj = (index) => {
...@@ -511,6 +520,7 @@ export function useJueceData(jcFormData, gdlxListRef) { ...@@ -511,6 +520,7 @@ export function useJueceData(jcFormData, gdlxListRef) {
}; };
// 申请报告 // 申请报告
let bhqkData = reactive([ let bhqkData = reactive([
{ lx: "投标保证金", tjzt: "", je: null, tjsj: "", thsj: "" }, { lx: "投标保证金", tjzt: "", je: null, tjsj: "", thsj: "" },
{ lx: "投资人履约保函", tjzt: "", je: null, tjsj: "", thsj: "" }, { lx: "投资人履约保函", tjzt: "", je: null, tjsj: "", thsj: "" },
......
...@@ -139,7 +139,7 @@ export function useLixiangData(formData, gdlxListRef) { ...@@ -139,7 +139,7 @@ export function useLixiangData(formData, gdlxListRef) {
children: [ children: [
{ {
xh: "2.1", xh: "2.1",
zb: "其中:并非表项目我方贷款/投保额", zb: "其中:非并表项目我方贷款/担保额",
dw: "万元", dw: "万元",
key: "2.1", key: "2.1",
parentKey: "2", parentKey: "2",
...@@ -163,7 +163,7 @@ export function useLixiangData(formData, gdlxListRef) { ...@@ -163,7 +163,7 @@ export function useLixiangData(formData, gdlxListRef) {
}, },
{ {
xh: "", xh: "",
zb: "批复总资", zb: "批复总资",
dw: "万元", dw: "万元",
key: "4", key: "4",
}, },
......
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