产值管理
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = 'http://192.168.110.159:8899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.180:8899'
|
||||
|
||||
# 无人机接口地址
|
||||
|
||||
|
63
src/api/out/settlementValueOwner/index.ts
Normal file
63
src/api/out/settlementValueOwner/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { SettlementValueOwnerVO, SettlementValueOwnerForm, SettlementValueOwnerQuery } from '@/api/out/settlementValueOwner/types';
|
||||
|
||||
/**
|
||||
* 查询结算产值登记(对甲)列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listSettlementValueOwner = (query?: SettlementValueOwnerQuery): AxiosPromise<SettlementValueOwnerVO[]> => {
|
||||
return request({
|
||||
url: '/out/settlementValueOwner/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询结算产值登记(对甲)详细
|
||||
* @param id
|
||||
*/
|
||||
export const getSettlementValueOwner = (id: string | number): AxiosPromise<SettlementValueOwnerVO> => {
|
||||
return request({
|
||||
url: '/out/settlementValueOwner/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增结算产值登记(对甲)
|
||||
* @param data
|
||||
*/
|
||||
export const addSettlementValueOwner = (data: SettlementValueOwnerForm) => {
|
||||
return request({
|
||||
url: '/out/settlementValueOwner',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改结算产值登记(对甲)
|
||||
* @param data
|
||||
*/
|
||||
export const updateSettlementValueOwner = (data: SettlementValueOwnerForm) => {
|
||||
return request({
|
||||
url: '/out/settlementValueOwner',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除结算产值登记(对甲)
|
||||
* @param id
|
||||
*/
|
||||
export const delSettlementValueOwner = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/out/settlementValueOwner/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
96
src/api/out/settlementValueOwner/types.ts
Normal file
96
src/api/out/settlementValueOwner/types.ts
Normal file
@ -0,0 +1,96 @@
|
||||
export interface SettlementValueOwnerVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 结算产值
|
||||
*/
|
||||
settlementValue: number;
|
||||
|
||||
/**
|
||||
* 1-设计 2-采购 3-施工
|
||||
*/
|
||||
valueType: string;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
settlementDate: string;
|
||||
|
||||
}
|
||||
|
||||
export interface SettlementValueOwnerForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 结算产值
|
||||
*/
|
||||
settlementValue?: number;
|
||||
|
||||
/**
|
||||
* 1-设计 2-采购 3-施工
|
||||
*/
|
||||
valueType?: string;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
settlementDate?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface SettlementValueOwnerQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 结算产值
|
||||
*/
|
||||
settlementValue?: number;
|
||||
|
||||
/**
|
||||
* 1-设计 2-采购 3-施工
|
||||
*/
|
||||
valueType?: string;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
settlementDate?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
63
src/api/out/settlementValueSubcontract/index.ts
Normal file
63
src/api/out/settlementValueSubcontract/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { SettlementValueSubcontractVO, SettlementValueSubcontractForm, SettlementValueSubcontractQuery } from '@/api/out/settlementValueSubcontract/types';
|
||||
|
||||
/**
|
||||
* 查询结算产值登记(对乙)列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listSettlementValueSubcontract = (query?: SettlementValueSubcontractQuery): AxiosPromise<SettlementValueSubcontractVO[]> => {
|
||||
return request({
|
||||
url: '/out/settlementValueSubcontract/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询结算产值登记(对乙)详细
|
||||
* @param id
|
||||
*/
|
||||
export const getSettlementValueSubcontract = (id: string | number): AxiosPromise<SettlementValueSubcontractVO> => {
|
||||
return request({
|
||||
url: '/out/settlementValueSubcontract/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增结算产值登记(对乙)
|
||||
* @param data
|
||||
*/
|
||||
export const addSettlementValueSubcontract = (data: SettlementValueSubcontractForm) => {
|
||||
return request({
|
||||
url: '/out/settlementValueSubcontract',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改结算产值登记(对乙)
|
||||
* @param data
|
||||
*/
|
||||
export const updateSettlementValueSubcontract = (data: SettlementValueSubcontractForm) => {
|
||||
return request({
|
||||
url: '/out/settlementValueSubcontract',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除结算产值登记(对乙)
|
||||
* @param id
|
||||
*/
|
||||
export const delSettlementValueSubcontract = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/out/settlementValueSubcontract/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
201
src/api/out/settlementValueSubcontract/types.ts
Normal file
201
src/api/out/settlementValueSubcontract/types.ts
Normal file
@ -0,0 +1,201 @@
|
||||
export interface SettlementValueSubcontractVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
documentCode: string;
|
||||
|
||||
/**
|
||||
* 结算说明
|
||||
*/
|
||||
settlementDescribe: string;
|
||||
|
||||
/**
|
||||
* 结算周期(YYYY-MM)
|
||||
*/
|
||||
settlementMonth: string;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
settlementDate: string;
|
||||
|
||||
/**
|
||||
* 分包单位ID
|
||||
*/
|
||||
contractorId: string | number;
|
||||
|
||||
/**
|
||||
* 分包单位名
|
||||
*/
|
||||
contractorName: string;
|
||||
|
||||
/**
|
||||
* 结算产值
|
||||
*/
|
||||
settlementValue: number;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
contractCode: string;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
contractName: string;
|
||||
|
||||
/**
|
||||
* 合同地址
|
||||
*/
|
||||
contractUrl: string;
|
||||
}
|
||||
|
||||
export interface SettlementValueSubcontractForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
/**
|
||||
* 产值类型
|
||||
*/
|
||||
valueType?: string;
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
documentCode?: string;
|
||||
|
||||
/**
|
||||
* 结算说明
|
||||
*/
|
||||
settlementDescribe?: string;
|
||||
|
||||
/**
|
||||
* 结算周期(YYYY-MM)
|
||||
*/
|
||||
settlementMonth?: string;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
settlementDate?: string;
|
||||
|
||||
/**
|
||||
* 分包单位ID
|
||||
*/
|
||||
contractorId?: string | number;
|
||||
|
||||
/**
|
||||
* 分包单位名
|
||||
*/
|
||||
contractorName?: string;
|
||||
|
||||
/**
|
||||
* 结算产值
|
||||
*/
|
||||
settlementValue?: number;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
contractCode?: string;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
contractName?: string;
|
||||
|
||||
/**
|
||||
* 合同地址
|
||||
*/
|
||||
contractUrl?: string;
|
||||
}
|
||||
|
||||
export interface SettlementValueSubcontractQuery extends PageQuery {
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
/**
|
||||
* 产值类型
|
||||
*/
|
||||
valueType?: string;
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
documentCode?: string;
|
||||
|
||||
/**
|
||||
* 结算说明
|
||||
*/
|
||||
settlementDescribe?: string;
|
||||
|
||||
/**
|
||||
* 结算周期(YYYY-MM)
|
||||
*/
|
||||
settlementMonth?: string;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
settlementDate?: string;
|
||||
|
||||
/**
|
||||
* 分包单位ID
|
||||
*/
|
||||
contractorId?: string | number;
|
||||
|
||||
/**
|
||||
* 分包单位名
|
||||
*/
|
||||
contractorName?: string;
|
||||
|
||||
/**
|
||||
* 结算产值
|
||||
*/
|
||||
settlementValue?: number;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
contractCode?: string;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
contractName?: string;
|
||||
|
||||
/**
|
||||
* 合同地址
|
||||
*/
|
||||
contractUrl?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/out/valueAllocation/index.ts
Normal file
63
src/api/out/valueAllocation/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ValueAllocationVO, ValueAllocationForm, ValueAllocationQuery } from '@/api/out/valueAllocation/types';
|
||||
|
||||
/**
|
||||
* 查询项目总产值分配列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listValueAllocation = (query?: ValueAllocationQuery): AxiosPromise<ValueAllocationVO[]> => {
|
||||
return request({
|
||||
url: '/out/valueAllocation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目总产值分配详细
|
||||
* @param id
|
||||
*/
|
||||
export const getValueAllocation = (id: string | number): AxiosPromise<ValueAllocationVO> => {
|
||||
return request({
|
||||
url: '/out/valueAllocation/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增项目总产值分配
|
||||
* @param data
|
||||
*/
|
||||
export const addValueAllocation = (data: ValueAllocationForm) => {
|
||||
return request({
|
||||
url: '/out/valueAllocation',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改项目总产值分配
|
||||
* @param data
|
||||
*/
|
||||
export const updateValueAllocation = (data: ValueAllocationForm) => {
|
||||
return request({
|
||||
url: '/out/valueAllocation',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除项目总产值分配
|
||||
* @param id
|
||||
*/
|
||||
export const delValueAllocation = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/out/valueAllocation/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
155
src/api/out/valueAllocation/types.ts
Normal file
155
src/api/out/valueAllocation/types.ts
Normal file
@ -0,0 +1,155 @@
|
||||
export interface ValueAllocationVO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 对甲设计产值
|
||||
*/
|
||||
ownerDesignValue: number;
|
||||
|
||||
/**
|
||||
* 对甲采购产值
|
||||
*/
|
||||
ownerPurchaseValue: number;
|
||||
|
||||
/**
|
||||
* 对甲施工产值
|
||||
*/
|
||||
ownerConstructionValue: number;
|
||||
|
||||
/**
|
||||
* 对甲总产值
|
||||
*/
|
||||
ownerTotalValue: number;
|
||||
|
||||
/**
|
||||
* 对乙设计产值
|
||||
*/
|
||||
subDesignValue: number;
|
||||
|
||||
/**
|
||||
* 对乙采购产值
|
||||
*/
|
||||
subPurchaseValue: number;
|
||||
|
||||
/**
|
||||
* 对乙施工产值
|
||||
*/
|
||||
subConstructionValue: number;
|
||||
|
||||
/**
|
||||
* 对乙总产值
|
||||
*/
|
||||
subTotalValue: number;
|
||||
}
|
||||
|
||||
export interface ValueAllocationForm extends BaseEntity {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: string | number;
|
||||
valueType?: number;
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 对甲设计产值
|
||||
*/
|
||||
ownerDesignValue?: number;
|
||||
|
||||
/**
|
||||
* 对甲采购产值
|
||||
*/
|
||||
ownerPurchaseValue?: number;
|
||||
|
||||
/**
|
||||
* 对甲施工产值
|
||||
*/
|
||||
ownerConstructionValue?: number;
|
||||
|
||||
/**
|
||||
* 对甲总产值
|
||||
*/
|
||||
ownerTotalValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙设计产值
|
||||
*/
|
||||
subDesignValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙采购产值
|
||||
*/
|
||||
subPurchaseValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙施工产值
|
||||
*/
|
||||
subConstructionValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙总产值
|
||||
*/
|
||||
subTotalValue?: number;
|
||||
}
|
||||
|
||||
export interface ValueAllocationQuery extends PageQuery {
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
projectId?: string | number;
|
||||
valueType?: number;
|
||||
/**
|
||||
* 对甲设计产值
|
||||
*/
|
||||
ownerDesignValue?: number;
|
||||
|
||||
/**
|
||||
* 对甲采购产值
|
||||
*/
|
||||
ownerPurchaseValue?: number;
|
||||
|
||||
/**
|
||||
* 对甲施工产值
|
||||
*/
|
||||
ownerConstructionValue?: number;
|
||||
|
||||
/**
|
||||
* 对甲总产值
|
||||
*/
|
||||
ownerTotalValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙设计产值
|
||||
*/
|
||||
subDesignValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙采购产值
|
||||
*/
|
||||
subPurchaseValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙施工产值
|
||||
*/
|
||||
subConstructionValue?: number;
|
||||
|
||||
/**
|
||||
* 对乙总产值
|
||||
*/
|
||||
subTotalValue?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
@ -56,17 +56,21 @@
|
||||
<el-col :lg="4" :xs="24" style="">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<el-button type="primary" size="default" @click="addBatch" icon="FolderAdd" plain>新增</el-button>
|
||||
<el-button type="danger" size="default" @click="" icon="FolderDelete" plain>删除</el-button>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5" :offset="0"
|
||||
><el-button type="primary" size="default" @click="addBatch" icon="FolderAdd" plain>新增</el-button></el-col
|
||||
>
|
||||
<el-col :span="1.5" :offset="0"><el-button type="danger" size="default" @click="" icon="FolderDelete" plain>删除</el-button></el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-input v-model="batchId" placeholder="请输入批次号" prefix-icon="Search" clearable />
|
||||
<el-input v-model="batchId" placeholder="请输入批次号" @input="getBatchList" prefix-icon="Search" clearable />
|
||||
<el-tree
|
||||
ref="batchTreeRef"
|
||||
class="mt-2"
|
||||
node-key="id"
|
||||
:data="batchOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:props="{ label: 'batchNumber', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@ -114,20 +118,18 @@
|
||||
|
||||
<el-table v-loading="loading" :data="cailiaoshebeiList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true" />
|
||||
<el-table-column label="批次ID" align="center" prop="batchId" />
|
||||
<el-table-column label="供货商ID" align="center" prop="supplierId" />
|
||||
<!-- <el-table-column label="供货商ID" align="center" prop="supplierId" /> -->
|
||||
<el-table-column label="供货商" align="center" prop="supplier" />
|
||||
<el-table-column label="设备材料名称" align="center" prop="name" />
|
||||
<el-table-column label="供货来源(字典)" align="center" prop="supply">
|
||||
<el-table-column label="供货来源" align="center" prop="supply">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="supply" :value="scope.row.supply" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||
<el-table-column label="特征描述" align="center" prop="signalment" />
|
||||
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
||||
<el-table-column label="计划到场时间" align="center" prop="arrivalTime" width="180">
|
||||
<el-table-column label="物料编码" align="center" prop="materialCode" width="200" />
|
||||
<!-- <el-table-column label="计划到场时间" align="center" prop="arrivalTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.arrivalTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
@ -136,7 +138,7 @@
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.finishTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="计量单位" align="center" prop="unit" />
|
||||
<el-table-column label="计划数量" align="center" prop="plan" />
|
||||
<el-table-column label="实际数量" align="center" prop="realQuantity" />
|
||||
@ -180,7 +182,7 @@
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="cailiaoshebeiFormRef" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="批次ID" prop="batchId">
|
||||
<el-input v-model="form.batchId" placeholder="请输入批次ID" />
|
||||
<el-input v-model="form.batchId" placeholder="请输入批次ID" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="供货商ID" prop="supplierId">
|
||||
<el-input v-model="form.supplierId" placeholder="请输入供货商ID" />
|
||||
@ -191,8 +193,10 @@
|
||||
<el-form-item label="设备材料名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入设备材料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供货来源(字典)" prop="supply">
|
||||
<el-input v-model="form.supply" placeholder="请输入供货来源(字典)" />
|
||||
<el-form-item label="供货来源" prop="supply">
|
||||
<el-select v-model="form.supply" value-key="value" placeholder="请选择供货来源" clearable filterable @change="">
|
||||
<el-option v-for="item in supply" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="specification">
|
||||
<el-input v-model="form.specification" placeholder="请输入规格型号" />
|
||||
@ -203,23 +207,23 @@
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input v-model="form.materialCode" placeholder="请输入物料编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划到场时间" prop="arrivalTime">
|
||||
<!-- <el-form-item label="计划到场时间" prop="arrivalTime">
|
||||
<el-date-picker clearable v-model="form.arrivalTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择计划到场时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划完成时间" prop="finishTime">
|
||||
<el-date-picker clearable v-model="form.finishTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择计划完成时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="计量单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入计量单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划数量" prop="plan">
|
||||
<el-input v-model="form.plan" placeholder="请输入计划数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际数量" prop="realQuantity">
|
||||
<!-- <el-form-item label="实际数量" prop="realQuantity">
|
||||
<el-input v-model="form.realQuantity" placeholder="请输入实际数量" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
@ -321,12 +325,6 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询物资-材料设备列表 */
|
||||
const getList = async () => {
|
||||
const batchRes = await listBatch({
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
projectId: currentProject.value.id
|
||||
});
|
||||
|
||||
loading.value = true;
|
||||
const res = await listCailiaoshebei(queryParams.value);
|
||||
cailiaoshebeiList.value = res.rows;
|
||||
@ -334,13 +332,34 @@ const getList = async () => {
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
//查询批次列表
|
||||
const getBatchList = async () => {
|
||||
const res = await listBatch({
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
projectId: currentProject.value.id,
|
||||
batchNumber: batchId.value
|
||||
});
|
||||
batchOptions.value = res.rows;
|
||||
try {
|
||||
queryParams.value.batchId = res.rows[0].id;
|
||||
form.value.batchId = res.rows[0].id;
|
||||
} catch (error) {
|
||||
queryParams.value.batchId = '';
|
||||
form.value.batchId = '';
|
||||
}
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 节点单击事件 */
|
||||
const handleNodeClick = (data: any) => {
|
||||
queryParams.value.batchId = data.id;
|
||||
form.value.batchId = data.id;
|
||||
console.log('🚀 ~ handleNodeClick ~ form.value:', form.value);
|
||||
if (data.id === '0') {
|
||||
queryParams.value.batchId = '';
|
||||
}
|
||||
handleQuery();
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
@ -351,7 +370,8 @@ const cancel = () => {
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
const preservedBatchId = form.value.batchId; // 先保存当前的 batchId
|
||||
form.value = { ...initFormData, batchId: preservedBatchId }; // 重置但保留
|
||||
cailiaoshebeiFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
@ -393,6 +413,7 @@ const handleUpdate = async (row?: CailiaoshebeiVO) => {
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
console.log('🚀 ~ submitForm ~ form.value:', form.value);
|
||||
cailiaoshebeiFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
@ -440,6 +461,6 @@ const handleExport = () => {
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getBatchList();
|
||||
});
|
||||
</script>
|
||||
|
16
src/views/out/outTable/index.vue
Normal file
16
src/views/out/outTable/index.vue
Normal file
@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div>init</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
// todo
|
||||
return {};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped></style>
|
292
src/views/out/settlementValueOwner/index.vue
Normal file
292
src/views/out/settlementValueOwner/index.vue
Normal file
@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="产值类型" prop="valueType">
|
||||
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
||||
<el-option v-for="item in out_value_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期" prop="settlementDate">
|
||||
<el-date-picker clearable v-model="queryParams.settlementDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择结算日期" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:settlementValueOwner:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['out:settlementValueOwner:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['out:settlementValueOwner:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:settlementValueOwner:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="settlementValueOwnerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="填报人" align="center" prop="createByName" />
|
||||
<el-table-column label="结算产值" align="center" prop="settlementValue" />
|
||||
<el-table-column label="产值类型" align="center" prop="valueType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="out_value_type" :value="scope.row.valueType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算日期" align="center" prop="settlementDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.settlementDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="填报日期" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['out:settlementValueOwner:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['out:settlementValueOwner:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改结算产值登记(对甲)对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="settlementValueOwnerFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="结算产值" prop="settlementValue">
|
||||
<el-input v-model="form.settlementValue" placeholder="请输入结算产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产值类型" prop="valueType">
|
||||
<el-select v-model="form.valueType" placeholder="请选择产值类型">
|
||||
<el-option v-for="item in out_value_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="说明" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入说明" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期" prop="settlementDate">
|
||||
<el-date-picker clearable v-model="form.settlementDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择结算日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="SettlementValueOwner" lang="ts">
|
||||
import {
|
||||
listSettlementValueOwner,
|
||||
getSettlementValueOwner,
|
||||
delSettlementValueOwner,
|
||||
addSettlementValueOwner,
|
||||
updateSettlementValueOwner
|
||||
} from '@/api/out/settlementValueOwner';
|
||||
import { SettlementValueOwnerVO, SettlementValueOwnerQuery, SettlementValueOwnerForm } from '@/api/out/settlementValueOwner/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { out_value_type } = toRefs<any>(proxy?.useDict('out_value_type'));
|
||||
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const settlementValueOwnerList = ref<SettlementValueOwnerVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const settlementValueOwnerFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: SettlementValueOwnerForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
settlementValue: undefined,
|
||||
valueType: undefined,
|
||||
remark: undefined,
|
||||
settlementDate: undefined
|
||||
};
|
||||
const data = reactive<PageData<SettlementValueOwnerForm, SettlementValueOwnerQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
settlementValue: undefined,
|
||||
valueType: undefined,
|
||||
settlementDate: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
settlementValue: [{ required: true, message: '结算产值不能为空', trigger: 'blur' }],
|
||||
valueType: [{ required: true, message: '产值类型不能为空', trigger: 'change' }],
|
||||
settlementDate: [{ required: true, message: '结算日期不能为空', trigger: 'change' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询结算产值登记(对甲)列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listSettlementValueOwner(queryParams.value);
|
||||
settlementValueOwnerList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
settlementValueOwnerFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: SettlementValueOwnerVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加结算产值登记(对甲)';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: SettlementValueOwnerVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getSettlementValueOwner(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改结算产值登记(对甲)';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
settlementValueOwnerFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateSettlementValueOwner(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addSettlementValueOwner(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: SettlementValueOwnerVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除结算产值登记(对甲)编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delSettlementValueOwner(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'out/settlementValueOwner/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`settlementValueOwner_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
366
src/views/out/settlementValueSubcontract/index.vue
Normal file
366
src/views/out/settlementValueSubcontract/index.vue
Normal file
@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="产值类型" prop="valueType">
|
||||
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
||||
<el-option v-for="item in out_value_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算周期" prop="settlementMonth">
|
||||
<el-date-picker clearable v-model="queryParams.settlementMonth" type="month" value-format="YYYY-MM" placeholder="请选择结算周期" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:settlementValueSubcontract:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate()"
|
||||
v-hasPermi="['out:settlementValueSubcontract:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete()"
|
||||
v-hasPermi="['out:settlementValueSubcontract:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:settlementValueSubcontract:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="settlementValueSubcontractList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="分包单位" align="center" prop="contractorName" />
|
||||
<el-table-column label="单据编码" align="center" prop="documentCode" />
|
||||
<el-table-column label="结算说明" align="center" prop="settlementDescribe" />
|
||||
<el-table-column label="产值类型" align="center" prop="valueType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="out_value_type" :value="scope.row.valueType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算周期" align="center" prop="settlementMonth" />
|
||||
<el-table-column label="结算日期" align="center" prop="settlementDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.settlementDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算产值" align="center" prop="settlementValue" />
|
||||
<el-table-column label="说明" align="center" prop="remark" />
|
||||
<el-table-column label="合同编码" align="center" prop="contractCode" />
|
||||
<el-table-column label="合同名称" align="center" prop="contractName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['out:settlementValueSubcontract:edit']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['out:settlementValueSubcontract:remove']"
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改结算产值登记(对乙)对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="settlementValueSubcontractFormRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="单据编码" prop="documentCode">
|
||||
<el-input v-model="form.documentCode" placeholder="请输入单据编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算说明" prop="settlementDescribe">
|
||||
<el-input v-model="form.settlementDescribe" placeholder="请输入结算说明" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算周期" prop="settlementMonth">
|
||||
<el-date-picker clearable v-model="form.settlementMonth" type="month" value-format="YYYY-MM" placeholder="请选择结算周期"> </el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期" prop="settlementDate">
|
||||
<el-date-picker clearable v-model="form.settlementDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择结算日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="产值类型" prop="valueType">
|
||||
<el-select v-model="form.valueType" placeholder="请选择产值类型">
|
||||
<el-option v-for="item in out_value_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="contractorId">
|
||||
<el-select v-model="form.contractorId" value-key="id" placeholder="请选择分包单位" clearable filterable @change="">
|
||||
<el-option v-for="item in contractorList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算产值" prop="settlementValue">
|
||||
<el-input v-model="form.settlementValue" placeholder="请输入结算产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="说明" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入说明" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编码" prop="contractCode">
|
||||
<el-input v-model="form.contractCode" placeholder="请输入合同编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="contractName">
|
||||
<el-input v-model="form.contractName" placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同地址" prop="contractUrl">
|
||||
<el-input v-model="form.contractUrl" placeholder="请输入合同地址" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="SettlementValueSubcontract" lang="ts">
|
||||
import {
|
||||
listSettlementValueSubcontract,
|
||||
getSettlementValueSubcontract,
|
||||
delSettlementValueSubcontract,
|
||||
addSettlementValueSubcontract,
|
||||
updateSettlementValueSubcontract
|
||||
} from '@/api/out/settlementValueSubcontract';
|
||||
import {
|
||||
SettlementValueSubcontractVO,
|
||||
SettlementValueSubcontractQuery,
|
||||
SettlementValueSubcontractForm
|
||||
} from '@/api/out/settlementValueSubcontract/types';
|
||||
import { listContractor } from '@/api/project/contractor';
|
||||
import { ContractorVO } from '@/api/project/contractor/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { out_value_type } = toRefs<any>(proxy?.useDict('out_value_type'));
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const settlementValueSubcontractList = ref<SettlementValueSubcontractVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const settlementValueSubcontractFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: SettlementValueSubcontractForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
documentCode: undefined,
|
||||
settlementDescribe: undefined,
|
||||
valueType: undefined,
|
||||
settlementMonth: undefined,
|
||||
settlementDate: undefined,
|
||||
contractorId: undefined,
|
||||
contractorName: undefined,
|
||||
settlementValue: undefined,
|
||||
remark: undefined,
|
||||
contractCode: undefined,
|
||||
contractName: undefined,
|
||||
contractUrl: undefined
|
||||
};
|
||||
const data = reactive<PageData<SettlementValueSubcontractForm, SettlementValueSubcontractQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
documentCode: undefined,
|
||||
settlementDescribe: undefined,
|
||||
valueType: undefined,
|
||||
settlementMonth: undefined,
|
||||
settlementDate: undefined,
|
||||
contractorId: undefined,
|
||||
contractorName: undefined,
|
||||
settlementValue: undefined,
|
||||
contractCode: undefined,
|
||||
contractName: undefined,
|
||||
contractUrl: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
settlementMonth: [{ required: true, message: '结算周期不能为空', trigger: 'blur' }],
|
||||
settlementDate: [{ required: true, message: '结算日期不能为空', trigger: 'blur' }],
|
||||
settlementValue: [{ required: true, message: '结算产值不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询结算产值登记(对乙)列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listSettlementValueSubcontract(queryParams.value);
|
||||
settlementValueSubcontractList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
//获取分包单位
|
||||
const contractorList = ref<ContractorVO[]>([]);
|
||||
const getContractorList = async () => {
|
||||
const res = await listContractor({ projectId: currentProject.value.id } as any);
|
||||
contractorList.value = res.rows;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
settlementValueSubcontractFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: SettlementValueSubcontractVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
getContractorList();
|
||||
dialog.title = '添加结算产值登记(对乙)';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: SettlementValueSubcontractVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
await getContractorList();
|
||||
const res = await getSettlementValueSubcontract(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改结算产值登记(对乙)';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
settlementValueSubcontractFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateSettlementValueSubcontract(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addSettlementValueSubcontract(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: SettlementValueSubcontractVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除结算产值登记(对乙)编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delSettlementValueSubcontract(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'out/settlementValueSubcontract/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`settlementValueSubcontract_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
272
src/views/out/valueAllocation/index.vue
Normal file
272
src/views/out/valueAllocation/index.vue
Normal file
@ -0,0 +1,272 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:valueAllocation:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['out:valueAllocation:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['out:valueAllocation:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:valueAllocation:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="valueAllocationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="对甲总产值" align="center" prop="ownerTotalValue" />
|
||||
<el-table-column label="对甲设计产值" align="center" prop="ownerDesignValue" />
|
||||
<el-table-column label="对甲采购产值" align="center" prop="ownerPurchaseValue" />
|
||||
<el-table-column label="对甲施工产值" align="center" prop="ownerConstructionValue" />
|
||||
<el-table-column label="对乙总产值" align="center" prop="subTotalValue" />
|
||||
<el-table-column label="对乙设计产值" align="center" prop="subDesignValue" />
|
||||
<el-table-column label="对乙采购产值" align="center" prop="subPurchaseValue" />
|
||||
<el-table-column label="对乙施工产值" align="center" prop="subConstructionValue" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['out:valueAllocation:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['out:valueAllocation:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改项目总产值分配对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="valueAllocationFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="对甲总产值" prop="ownerTotalValue">
|
||||
<el-input v-model="form.ownerTotalValue" placeholder="请输入对甲总产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对甲设计产值" prop="ownerDesignValue">
|
||||
<el-input v-model="form.ownerDesignValue" placeholder="请输入对甲设计产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对甲采购产值" prop="ownerPurchaseValue">
|
||||
<el-input v-model="form.ownerPurchaseValue" placeholder="请输入对甲采购产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对甲施工产值" prop="ownerConstructionValue">
|
||||
<el-input v-model="form.ownerConstructionValue" placeholder="请输入对甲施工产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对乙总产值" prop="subTotalValue">
|
||||
<el-input v-model="form.subTotalValue" placeholder="请输入对乙总产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对乙设计产值" prop="subDesignValue">
|
||||
<el-input v-model="form.subDesignValue" placeholder="请输入对乙设计产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对乙采购产值" prop="subPurchaseValue">
|
||||
<el-input v-model="form.subPurchaseValue" placeholder="请输入对乙采购产值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对乙施工产值" prop="subConstructionValue">
|
||||
<el-input v-model="form.subConstructionValue" placeholder="请输入对乙施工产值" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ValueAllocation" lang="ts">
|
||||
import { listValueAllocation, getValueAllocation, delValueAllocation, addValueAllocation, updateValueAllocation } from '@/api/out/valueAllocation';
|
||||
import { ValueAllocationVO, ValueAllocationQuery, ValueAllocationForm } from '@/api/out/valueAllocation/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const valueAllocationList = ref<ValueAllocationVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref<Array<string | number>>([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const valueAllocationFormRef = ref<ElFormInstance>();
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
|
||||
const initFormData: ValueAllocationForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
ownerDesignValue: undefined,
|
||||
ownerPurchaseValue: undefined,
|
||||
ownerConstructionValue: undefined,
|
||||
ownerTotalValue: undefined,
|
||||
subDesignValue: undefined,
|
||||
subPurchaseValue: undefined,
|
||||
valueType: undefined,
|
||||
subConstructionValue: undefined,
|
||||
subTotalValue: undefined
|
||||
};
|
||||
const data = reactive<PageData<ValueAllocationForm, ValueAllocationQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
ownerDesignValue: undefined,
|
||||
ownerPurchaseValue: undefined,
|
||||
ownerConstructionValue: undefined,
|
||||
valueType: undefined,
|
||||
ownerTotalValue: undefined,
|
||||
subDesignValue: undefined,
|
||||
subPurchaseValue: undefined,
|
||||
subConstructionValue: undefined,
|
||||
subTotalValue: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
|
||||
ownerDesignValue: [{ required: true, message: '对甲设计产值不能为空', trigger: 'blur' }],
|
||||
ownerPurchaseValue: [{ required: true, message: '对甲采购产值不能为空', trigger: 'blur' }],
|
||||
ownerConstructionValue: [{ required: true, message: '对甲施工产值不能为空', trigger: 'blur' }],
|
||||
ownerTotalValue: [{ required: true, message: '对甲总产值不能为空', trigger: 'blur' }],
|
||||
subDesignValue: [{ required: true, message: '对乙设计产值不能为空', trigger: 'blur' }],
|
||||
subPurchaseValue: [{ required: true, message: '对乙采购产值不能为空', trigger: 'blur' }],
|
||||
subConstructionValue: [{ required: true, message: '对乙施工产值不能为空', trigger: 'blur' }],
|
||||
subTotalValue: [{ required: true, message: '对乙总产值不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询项目总产值分配列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listValueAllocation(queryParams.value);
|
||||
valueAllocationList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset();
|
||||
dialog.visible = false;
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initFormData };
|
||||
valueAllocationFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: ValueAllocationVO[]) => {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加项目总产值分配';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: ValueAllocationVO) => {
|
||||
reset();
|
||||
const _id = row?.id || ids.value[0];
|
||||
const res = await getValueAllocation(_id);
|
||||
Object.assign(form.value, res.data);
|
||||
dialog.visible = true;
|
||||
dialog.title = '修改项目总产值分配';
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
valueAllocationFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateValueAllocation(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addValueAllocation(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: ValueAllocationVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
await proxy?.$modal.confirm('是否确认删除项目总产值分配编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
||||
await delValueAllocation(_ids);
|
||||
proxy?.$modal.msgSuccess('删除成功');
|
||||
await getList();
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy?.download(
|
||||
'out/valueAllocation/export',
|
||||
{
|
||||
...queryParams.value
|
||||
},
|
||||
`valueAllocation_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
@ -203,7 +203,7 @@ import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { progress_unit_type, progress_status } = toRefs<any>(proxy?.useDict('progress_unit_type', 'progress_status'));
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
|
||||
import CreatePlan from './component/createPlan.vue';
|
||||
import CreateDaily from './component/createDaily.vue';
|
||||
import CreateDailyRate from './component/createDailyRate.vue';
|
||||
@ -212,7 +212,7 @@ type ProgressCategoryOption = {
|
||||
name: string;
|
||||
children?: ProgressCategoryOption[];
|
||||
};
|
||||
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
@ -273,7 +273,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
if (!queryParams.value.matrixId) {
|
||||
const res = await getProjectSquare(currentProject.value.id);
|
||||
if (res.data.length === 0) {
|
||||
if (!res.data || res.data.length === 0) {
|
||||
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
} else {
|
||||
let matrixList = res.data.map((item) => {
|
||||
@ -282,9 +282,13 @@ const getList = async () => {
|
||||
matrixId: item.projectId
|
||||
};
|
||||
});
|
||||
if (!matrixValue.value) matrixValue.value = matrixList[0].id;
|
||||
matrixOptions.value = matrixList;
|
||||
queryParams.value.matrixId = matrixList[0].children[0].matrixId;
|
||||
try {
|
||||
if (!matrixValue.value) matrixValue.value = matrixList[0].id;
|
||||
matrixOptions.value = matrixList;
|
||||
queryParams.value.matrixId = matrixList[0].children[0].matrixId;
|
||||
} catch (error) {
|
||||
proxy?.$modal.msgError('获取方阵失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
loading.value = true;
|
||||
|
Reference in New Issue
Block a user