fix: build
This commit is contained in:
parent
a1084ee5ed
commit
c7c774f801
12
Dockerfile
12
Dockerfile
|
@ -1,7 +1,4 @@
|
|||
|
||||
FROM nginx:alpine as production
|
||||
EXPOSE 80
|
||||
|
||||
FROM node:20-slim as base
|
||||
ENV PROJECT_DIR=/huaxin-front \
|
||||
PNPM_HOME="/pnpm" \
|
||||
|
@ -28,7 +25,10 @@ RUN pnpm run build
|
|||
FROM base AS result
|
||||
COPY --from=prod-deps $PROJECT_DIR/node_modules $PROJECT_DIR/node_modules
|
||||
COPY --from=builder $PROJECT_DIR/dist $PROJECT_DIR/dist
|
||||
COPY --from=builder $PROJECT_DIR/dist/ /usr/share/nginx/html
|
||||
COPY --from=builder $PROJECT_DIR/nginx.conf /etc/nginx/nginx.conf
|
||||
# 构建nginx,并且在result之后拷贝dist到nginx中,其中包含了自定义nginx.conf
|
||||
|
||||
# 构建nginx,并且在result之后拷贝dist到nginx中,其中包含了自定义nginx.conf,
|
||||
FROM nginx:alpine as production
|
||||
ENV PROJECT_DIR=/huaxin-front
|
||||
COPY --from=result $PROJECT_DIR/dist/ /usr/share/nginx/html
|
||||
COPY --from=result $PROJECT_DIR/nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 80
|
|
@ -26,6 +26,8 @@ import * as netDiskManage from './netDiskManage';
|
|||
import * as netDiskOverview from './netDiskOverview';
|
||||
import * as businessTodo from './businessTodo';
|
||||
import * as contract from './contract';
|
||||
import * as materialsInventory from './materialsInventory';
|
||||
|
||||
export default {
|
||||
auth,
|
||||
account,
|
||||
|
@ -51,4 +53,5 @@ export default {
|
|||
netDiskOverview,
|
||||
businessTodo,
|
||||
contract,
|
||||
materialsInventory
|
||||
};
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import { request, type RequestOptions } from '@/utils/request';
|
||||
|
||||
/** 获取原材料盘点列表 GET /api/contract */
|
||||
export async function materialsInventoryList(params: API.MaterialsInventoryListParams, options?: RequestOptions) {
|
||||
/** 获取原材料盘点列表 GET /api/materials-inventory */
|
||||
export async function materialsInventoryList(
|
||||
params: API.MaterialsInventoryListParams,
|
||||
options?: RequestOptions,
|
||||
) {
|
||||
return request<{
|
||||
items?: API.ContractEntity[];
|
||||
items?: API.MaterialsInventoryEntity[];
|
||||
meta?: {
|
||||
itemCount?: number;
|
||||
totalItems?: number;
|
||||
|
@ -11,7 +14,7 @@ export async function materialsInventoryList(params: API.MaterialsInventoryListP
|
|||
totalPages?: number;
|
||||
currentPage?: number;
|
||||
};
|
||||
}>('/api/contract', {
|
||||
}>('/api/materials-inventory', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
// page has a default value: 1
|
||||
|
@ -25,9 +28,12 @@ export async function materialsInventoryList(params: API.MaterialsInventoryListP
|
|||
});
|
||||
}
|
||||
|
||||
/** 新增原材料盘点 POST /api/contract */
|
||||
export async function contractCreate(body: API.ContractDto, options?: RequestOptions) {
|
||||
return request<any>('/api/contract', {
|
||||
/** 新增原材料盘点 POST /api/materials-inventory */
|
||||
export async function materialsInventoryCreate(
|
||||
body: API.MaterialsInventoryDto,
|
||||
options?: RequestOptions,
|
||||
) {
|
||||
return request<any>('/api/materials-inventory', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -37,29 +43,29 @@ export async function contractCreate(body: API.ContractDto, options?: RequestOpt
|
|||
});
|
||||
}
|
||||
|
||||
/** 获取原材料盘点信息 GET /api/contract/${param0} */
|
||||
export async function contractInfo(
|
||||
/** 获取原材料盘点信息 GET /api/materials-inventory/${param0} */
|
||||
export async function materialsInventoryInfo(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ContractInfoParams,
|
||||
params: API.MaterialsInventoryInfoParams,
|
||||
options?: RequestOptions,
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<API.ContractEntity>(`/api/contract/${param0}`, {
|
||||
return request<API.MaterialsInventoryEntity>(`/api/contract/${param0}`, {
|
||||
method: 'GET',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 解除原材料盘点和附件关联 PUT /api/contract/unlink-attachments/${param0} */
|
||||
/** 解除原材料盘点和附件关联 PUT /api/materials-inventory/unlink-attachments/${param0} */
|
||||
export async function unlinkAttachments(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ContractUpdateParams,
|
||||
body: API.ContractUpdateDto,
|
||||
params: API.MaterialsInventoryUpdateParams,
|
||||
body: API.MaterialsInventoryDto,
|
||||
options?: RequestOptions,
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/api/contract/unlink-attachments/${param0}`, {
|
||||
return request<any>(`/api/materials-inventory/unlink-attachments/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -70,15 +76,15 @@ export async function unlinkAttachments(
|
|||
});
|
||||
}
|
||||
|
||||
/** 更新原材料盘点 PUT /api/contract/${param0} */
|
||||
export async function contractUpdate(
|
||||
/** 更新原材料盘点 PUT /api/materials-inventory/${param0} */
|
||||
export async function MaterialsInventoryUpdate(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ContractUpdateParams,
|
||||
body: API.ContractUpdateDto,
|
||||
params: API.MaterialsInventoryUpdateParams,
|
||||
body: API.MaterialsInventoryUpdateDto,
|
||||
options?: RequestOptions,
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/api/contract/${param0}`, {
|
||||
return request<any>(`/api/materials-inventory/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -89,14 +95,14 @@ export async function contractUpdate(
|
|||
});
|
||||
}
|
||||
|
||||
/** 删除原材料盘点 DELETE /api/contract/${param0} */
|
||||
export async function contractDelete(
|
||||
/** 删除原材料盘点 DELETE /api/materials-inventory/${param0} */
|
||||
export async function materialsInventoryDelete(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ContractDeleteParams,
|
||||
params: API.MaterialsInventoryDeleteParams,
|
||||
options?: RequestOptions,
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/api/contract/${param0}`, {
|
||||
return request<any>(`/api/materials-inventory/${param0}`, {
|
||||
method: 'DELETE',
|
||||
params: { ...queryParams },
|
||||
...(options || { successMsg: '删除成功' }),
|
|
@ -90,9 +90,9 @@ export async function dictTypeDelete(
|
|||
});
|
||||
}
|
||||
|
||||
/** 一次性获取所有的字典类型(不分页) GET /api/system/dict-type/select-options */
|
||||
/** 一次性获取所有的字典类型(不分页) GET /api/system/dict-type/all*/
|
||||
export async function dictTypeGetAll(options?: RequestOptions) {
|
||||
return request<API.DictTypeEntity[]>('/api/system/dict-type/select-options', {
|
||||
return request<API.DictTypeEntity[]>('/api/system/dict-type/all', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
|
|
|
@ -1353,6 +1353,14 @@ declare namespace API {
|
|||
id: number;
|
||||
};
|
||||
|
||||
type MaterialsInventoryUpdateParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type MaterialsInventoryInfoParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type MaterialsInventoryListParams = {
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
|
@ -1361,7 +1369,7 @@ declare namespace API {
|
|||
_t?: number;
|
||||
};
|
||||
|
||||
type ContractEntity = {
|
||||
type MaterialsInventoryEntity = {
|
||||
/** 公司名称 */
|
||||
companyName: string;
|
||||
/** 产品名称(字典) */
|
||||
|
@ -1398,10 +1406,105 @@ declare namespace API {
|
|||
currentAmount: number;
|
||||
/** 经办人 */
|
||||
agent: string;
|
||||
/** 领料单号 */
|
||||
issuanceNumber?: number;
|
||||
/** 备注 */
|
||||
remark: string;
|
||||
/** 附件 */
|
||||
files?: any[];
|
||||
files: number[];
|
||||
id: number;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
type MaterialsInventoryDto = {
|
||||
/** 公司名称 */
|
||||
companyName: string;
|
||||
/** 产品名称(字典) */
|
||||
product: number;
|
||||
/** 单位(字典) */
|
||||
unit: number;
|
||||
/** 之前的库存数量 */
|
||||
previousInventoryQuantity: number;
|
||||
/** 之前的单价 */
|
||||
previousUnitPrice: number;
|
||||
/** 之前的金额 */
|
||||
previousAmount: number;
|
||||
/** 入库时间 */
|
||||
inventoryTime: Date;
|
||||
/** 入库数量 */
|
||||
inventoryQuantity: number;
|
||||
/** 入库单价*/
|
||||
inventoryUnitPrice: number;
|
||||
/** 入库金额 */
|
||||
inventoryAmount: number;
|
||||
/** 出库时间 */
|
||||
outime: Date;
|
||||
/** 出库数量 */
|
||||
outQuantity: number;
|
||||
/** 出库单价 */
|
||||
outUnitPrice: number;
|
||||
/** 出库金额 */
|
||||
outAmount: number;
|
||||
/** 现在的结存数量 */
|
||||
currentInventoryQuantity: number;
|
||||
/** 现在的单价 */
|
||||
currentUnitPrice: number;
|
||||
/** 现在的金额 */
|
||||
currentAmount: number;
|
||||
/** 经办人 */
|
||||
agent: string;
|
||||
/** 领料单号 */
|
||||
issuanceNumber?: number;
|
||||
/** 备注 */
|
||||
remark: string;
|
||||
/** 附件 */
|
||||
files: number[];
|
||||
};
|
||||
type MaterialsInventoryUpdateDto = {
|
||||
/** 公司名称 */
|
||||
companyName: string;
|
||||
/** 产品名称(字典) */
|
||||
product: number;
|
||||
/** 单位(字典) */
|
||||
unit: number;
|
||||
/** 之前的库存数量 */
|
||||
previousInventoryQuantity: number;
|
||||
/** 之前的单价 */
|
||||
previousUnitPrice: number;
|
||||
/** 之前的金额 */
|
||||
previousAmount: number;
|
||||
/** 入库时间 */
|
||||
inventoryTime: Date;
|
||||
/** 入库数量 */
|
||||
inventoryQuantity: number;
|
||||
/** 入库单价*/
|
||||
inventoryUnitPrice: number;
|
||||
/** 入库金额 */
|
||||
inventoryAmount: number;
|
||||
/** 出库时间 */
|
||||
outime: Date;
|
||||
/** 出库数量 */
|
||||
outQuantity: number;
|
||||
/** 出库单价 */
|
||||
outUnitPrice: number;
|
||||
/** 出库金额 */
|
||||
outAmount: number;
|
||||
/** 现在的结存数量 */
|
||||
currentInventoryQuantity: number;
|
||||
/** 现在的单价 */
|
||||
currentUnitPrice: number;
|
||||
/** 现在的金额 */
|
||||
currentAmount: number;
|
||||
/** 经办人 */
|
||||
agent: string;
|
||||
/** 领料单号 */
|
||||
issuanceNumber?: number;
|
||||
/** 备注 */
|
||||
remark: string;
|
||||
/** 附件 */
|
||||
files: number[];
|
||||
};
|
||||
type MaterialsInventoryDeleteParams = {
|
||||
id: number;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,10 +2,9 @@ import { ref } from 'vue';
|
|||
import { defineStore } from 'pinia';
|
||||
import Api from '@/api';
|
||||
import { store } from '@/store';
|
||||
// interface DictState {
|
||||
// /** 需要缓存的路由组件名称列表 */
|
||||
// list: API.DictItemDto[];
|
||||
// }
|
||||
const needCachedKey = [
|
||||
'contract_type', // 合同类型
|
||||
];
|
||||
|
||||
export const useDictStore = defineStore('dict', () => {
|
||||
const dictTypes = ref<API.DictTypeDto[]>([]);
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<div v-if="columns?.length">
|
||||
<DynamicTable
|
||||
row-key="id"
|
||||
header-title="合同管理"
|
||||
header-title="原材料盘点"
|
||||
title-tooltip=""
|
||||
:data-request="Api.contract.contractList"
|
||||
:data-request="Api.materialsInventory.materialsInventoryList"
|
||||
:columns="columns"
|
||||
bordered
|
||||
:scroll="{ x: 1920 }"
|
||||
|
|
Loading…
Reference in New Issue