sooyie-material 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,68 @@
1
+ import { deepMerge as n, addViteMenus as i, i18n as r } from "jmash-core";
2
+ const o = {}, l = {
3
+ // 出入库明细
4
+ inventoryDetail: {
5
+ name: "出入库明细",
6
+ tenantId: "租户ID",
7
+ detailId: "明细ID",
8
+ taskId: "任务ID",
9
+ inventoryId: "库存ID",
10
+ applyId: "物料申请ID",
11
+ deptId: "出入部门ID",
12
+ inventoryType: "库存类型(入库、出库、归还)",
13
+ quantity: "出入数量",
14
+ amount: "出入金额"
15
+ },
16
+ // 材料分类
17
+ materialCategory: {
18
+ categoryName: "分类名称",
19
+ parentId: "上级分类",
20
+ orderBy: "排序",
21
+ note: "备注",
22
+ categoryNameRequired: "请输入分类名称",
23
+ parentIdRequired: "请选择上级分类",
24
+ noteRequired: "请输入备注"
25
+ },
26
+ // 材料信息
27
+ materialInfo: {
28
+ name: "材料信息",
29
+ categoryId: "材料分类",
30
+ materialCode: "材料编码",
31
+ materialName: "材料名称",
32
+ specInfo: "规格型号",
33
+ unit: "计量单位",
34
+ unitPrice: "单价",
35
+ plannerId: "计划员",
36
+ categoryIdRequired: "请选择材料分类",
37
+ materialCodeRequired: "请输入材料编码",
38
+ materialNameRequired: "请输入材料名称",
39
+ specInfoRequired: "请输入规格型号",
40
+ unitRequired: "请输入计量单位",
41
+ unitPriceRequired: "请输入单价",
42
+ plannerIdRequired: "请选择计划员"
43
+ },
44
+ // 材料库存信息
45
+ materialInventory: {
46
+ name: "材料库存信息",
47
+ tenantId: "租户ID",
48
+ inventoryId: "库存ID",
49
+ materialId: "材料ID",
50
+ deptId: "部门ID",
51
+ parentId: "上级部门",
52
+ stock: "当前库存"
53
+ }
54
+ };
55
+ function d(e) {
56
+ let a = e.global.getLocaleMessage("zh-cn");
57
+ a = n(a, l);
58
+ let t = e.global.getLocaleMessage("en");
59
+ t = n(t, o), e.global.setLocaleMessage("zh-cn", a), e.global.setLocaleMessage("en", t);
60
+ }
61
+ const m = /* @__PURE__ */ Object.assign({ "./views/mat-material-category/edit.vue": () => import("./edit-DF2SGpoh.mjs"), "./views/mat-material-category/index.vue": () => import("./index-CTsML4zt.mjs"), "./views/mat-material-info/edit.vue": () => import("./edit-C1Gne0fI.mjs"), "./views/mat-material-info/index.vue": () => import("./index-Df2_o7yW.mjs") }), s = {
62
+ install(e) {
63
+ i(m, 7), d(r);
64
+ }
65
+ };
66
+ export {
67
+ s as default
68
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { BizLayDict, type LayEntry, BizDict, type Entry } from "jmash-core";
2
+ import type { MaterialCategoryModel } from "@/api/mat-material-category/types";
3
+ export declare class MaterialCategoryBizLayDict extends BizLayDict {
4
+ useValues(): Promise<LayEntry[]>;
5
+ convertToLayEntryArray(dictLayEntries: MaterialCategoryModel[]): LayEntry[];
6
+ }
7
+ export declare class UserBizDict extends BizDict {
8
+ useValues(): Promise<Entry[]>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import { MaterialCategoryBizLayDict, UserBizDict } from "./dict";
2
+ export declare class Dict {
3
+ static readonly materialCategoryBizDict: MaterialCategoryBizLayDict;
4
+ static readonly userDict: UserBizDict;
5
+ }
@@ -0,0 +1,50 @@
1
+ import type { AxiosPromise } from "axios";
2
+ import type { MaterialCategoryApi, MaterialCategoryReq, MaterialCategoryModel, MaterialCategoryList, MaterialCategoryKey, MaterialCategoryCreateReq, MaterialCategoryUpdateReq } from "./types";
3
+ declare class MaterialCategoryApiImpl implements MaterialCategoryApi {
4
+ getKey(model: MaterialCategoryModel): MaterialCategoryKey;
5
+ /**
6
+ * 查询列表信息材料分类
7
+ * @param query - 查询参数对象,可选
8
+ * @returns 返回材料分类列表的Promise对象
9
+ */
10
+ findList(query?: MaterialCategoryReq): AxiosPromise<MaterialCategoryList>;
11
+ /**
12
+ * 根据ID查询材料分类信息
13
+ * @param query 包含分类ID的查询参数对象
14
+ * @returns 返回材料分类信息的Promise对象
15
+ */
16
+ findById(query: MaterialCategoryKey): AxiosPromise<MaterialCategoryModel>;
17
+ /**
18
+ * 创建实体材料分类
19
+ * @param data - 材料分类创建请求参数
20
+ * @returns 返回创建的材料分类信息
21
+ */
22
+ create(data: MaterialCategoryCreateReq): AxiosPromise<MaterialCategoryModel>;
23
+ /**
24
+ * 修改实体材料分类
25
+ * @param data - 材料分类更新请求数据
26
+ * @returns 返回材料分类模型的Promise对象
27
+ */
28
+ update(data: MaterialCategoryUpdateReq): AxiosPromise<MaterialCategoryModel>;
29
+ /**
30
+ * 移动物料分类位置(上移或下移)
31
+ * @param key - 物料分类标识对象,包含分类ID等信息
32
+ * @param up - 移动方向,true表示上移,false表示下移
33
+ * @returns 返回Promise对象,resolve时返回操作是否成功的布尔值
34
+ */
35
+ move(key: MaterialCategoryKey, up: boolean): AxiosPromise<boolean>;
36
+ /**
37
+ * 删除材料分类
38
+ * @param query - 材料分类的查询条件,包含要删除的分类ID等信息
39
+ * @returns 返回一个Promise,解析后得到删除的材料分类数据模型
40
+ */
41
+ delete(query: MaterialCategoryKey): AxiosPromise<MaterialCategoryModel>;
42
+ /**
43
+ * 批量删除材料分类
44
+ * @param keys 需要删除的材料分类键值数组
45
+ * @returns 返回一个Promise,解析后得到删除操作影响的记录数
46
+ */
47
+ batchDelete(keys: MaterialCategoryKey[]): AxiosPromise<number>;
48
+ }
49
+ declare const materialCategoryApi: MaterialCategoryApiImpl;
50
+ export { materialCategoryApi };
@@ -0,0 +1,41 @@
1
+ import type { EntityApi, EntityReq, EntityModel, EntityList, EntityKey, EntityKeyList, EntityCreateReq, EntityUpdateReq } from "jmash-core";
2
+ export interface MaterialCategoryApi extends EntityApi {
3
+ }
4
+ export interface MaterialCategoryReq extends EntityReq {
5
+ likeCategoryName?: string;
6
+ }
7
+ export interface MaterialCategoryModel extends EntityModel {
8
+ categoryId?: string;
9
+ categoryName?: string;
10
+ parentId?: string;
11
+ note?: string;
12
+ children?: Array<MaterialCategoryModel>;
13
+ }
14
+ export interface MaterialCategoryList extends EntityList {
15
+ results: Array<MaterialCategoryModel>;
16
+ }
17
+ export interface MaterialCategoryKey extends EntityKey {
18
+ tenant?: string;
19
+ categoryId?: string;
20
+ }
21
+ export interface MaterialCategoryKeyList extends EntityKeyList {
22
+ tenant?: string;
23
+ categoryId?: Array<string>;
24
+ }
25
+ export interface MaterialCategoryCreateReq extends EntityCreateReq {
26
+ categoryName?: string;
27
+ parentId?: string;
28
+ note?: string;
29
+ }
30
+ export interface MaterialCategoryUpdateReq extends EntityUpdateReq {
31
+ categoryId?: string;
32
+ categoryName?: string;
33
+ parentId?: string;
34
+ note?: string;
35
+ }
36
+ export type MaterialCategoryFormReq = MaterialCategoryCreateReq | MaterialCategoryUpdateReq;
37
+ export interface MaterialCategoryMoveKey {
38
+ tenant?: string;
39
+ categoryId?: string;
40
+ up?: boolean;
41
+ }
@@ -0,0 +1,62 @@
1
+ import type { AxiosPromise } from "axios";
2
+ import type { MaterialInfoApi, MaterialInfoReq, MaterialInfoModel, MaterialInfoPage, MaterialInfoList, MaterialInfoKey, MaterialInfoCreateReq, MaterialInfoUpdateReq, MaterialInfoExportReq, MaterialInfoImportReq } from "./types";
3
+ declare class MaterialInfoApiImpl implements MaterialInfoApi {
4
+ getKey(model: MaterialInfoModel): MaterialInfoKey;
5
+ /**
6
+ * 查询翻页信息材料信息
7
+ * @param query - 查询条件参数对象,可选
8
+ * @returns 返回材料信息分页数据的Promise对象
9
+ */
10
+ findPage(query?: MaterialInfoReq): AxiosPromise<MaterialInfoPage>;
11
+ findList(query?: MaterialInfoReq): AxiosPromise<MaterialInfoList>;
12
+ /**
13
+ * 查询材料信息
14
+ * @param query - 材料信息查询条件,包含材料ID等关键信息
15
+ * @returns 返回材料信息的Promise对象,包含材料详细信息
16
+ */
17
+ findById(query: MaterialInfoKey): AxiosPromise<MaterialInfoModel>;
18
+ /**
19
+ * 创建实体材料信息
20
+ * @param data - 材料信息创建请求数据
21
+ * @returns 返回创建的材料信息模型的Promise对象
22
+ */
23
+ create(data: MaterialInfoCreateReq): AxiosPromise<MaterialInfoModel>;
24
+ /**
25
+ * 修改实体材料信息
26
+ * @param data - 材料信息更新请求数据
27
+ * @returns 返回材料信息模型的Promise对象
28
+ */
29
+ update(data: MaterialInfoUpdateReq): AxiosPromise<MaterialInfoModel>;
30
+ /**
31
+ * 删除材料信息
32
+ * @param query - 材料信息的查询条件,包含要删除的材料ID等信息
33
+ * @returns 返回删除操作的结果,包含被删除的材料信息模型数据
34
+ */
35
+ delete(query: MaterialInfoKey): AxiosPromise<MaterialInfoModel>;
36
+ /**
37
+ * 批量删除材料信息
38
+ * @param keys - 要删除的材料信息键值数组
39
+ * @returns 返回一个Promise,解析后为删除操作影响的记录数
40
+ */
41
+ batchDelete(keys: MaterialInfoKey[]): AxiosPromise<number>;
42
+ /**
43
+ * 下载导入模板材料信息
44
+ * 该函数用于下载指定租户的材料信息导入模板文件
45
+ * @returns 返回一个AxiosPromise对象,包含下载的模板文件数据
46
+ */
47
+ downloadTemplate(): AxiosPromise;
48
+ /**
49
+ * 导入材料信息
50
+ * @param data - 材料信息导入请求参数
51
+ * @returns 返回导入结果的Promise对象
52
+ */
53
+ importExcel(data: MaterialInfoImportReq): AxiosPromise<string>;
54
+ /**
55
+ * 导出材料信息Excel文件
56
+ * @param queryParams - 材料信息导出请求参数
57
+ * @returns 返回Excel文件的下载Promise
58
+ */
59
+ exportExcel(queryParams: MaterialInfoExportReq): AxiosPromise;
60
+ }
61
+ declare const materialInfoApi: MaterialInfoApiImpl;
62
+ export { materialInfoApi };
@@ -0,0 +1,63 @@
1
+ import type { EntityApi, EntityReq, EntityModel, EntityList, EntityPage, EntityTotal, EntityKey, EntityKeyList, EntityCreateReq, EntityUpdateReq, EntityExportReq, EntityImportReq } from "jmash-core";
2
+ export interface MaterialInfoApi extends EntityApi {
3
+ }
4
+ export interface MaterialInfoReq extends EntityReq {
5
+ categoryId?: string;
6
+ likeCategoryName?: string;
7
+ likeMaterialCode?: string;
8
+ likeSpecInfo?: string;
9
+ }
10
+ export interface MaterialInfoModel extends EntityModel {
11
+ materialId?: string;
12
+ categoryId?: string;
13
+ materialCode?: string;
14
+ materialName?: string;
15
+ specInfo?: string;
16
+ unit?: string;
17
+ unitPrice?: number;
18
+ plannerId?: string;
19
+ }
20
+ export interface MaterialInfoList extends EntityList {
21
+ results: Array<MaterialInfoModel>;
22
+ }
23
+ export interface MaterialInfoPage extends EntityPage {
24
+ results: Array<MaterialInfoModel>;
25
+ subTotalDto: MaterialInfoModelTotal;
26
+ totalDto: MaterialInfoModelTotal;
27
+ }
28
+ export interface MaterialInfoModelTotal extends EntityTotal {
29
+ totalSize: number;
30
+ }
31
+ export interface MaterialInfoKey extends EntityKey {
32
+ tenant?: string;
33
+ materialId?: string;
34
+ }
35
+ export interface MaterialInfoKeyList extends EntityKeyList {
36
+ tenant?: string;
37
+ materialId?: Array<string>;
38
+ }
39
+ export interface MaterialInfoCreateReq extends EntityCreateReq {
40
+ categoryId?: string;
41
+ materialCode?: string;
42
+ materialName?: string;
43
+ specInfo?: string;
44
+ unit?: string;
45
+ unitPrice?: number;
46
+ plannerId?: string;
47
+ }
48
+ export interface MaterialInfoUpdateReq extends EntityUpdateReq {
49
+ materialId?: string;
50
+ categoryId?: string;
51
+ materialCode?: string;
52
+ materialName?: string;
53
+ specInfo?: string;
54
+ unit?: string;
55
+ unitPrice?: number;
56
+ plannerId?: string;
57
+ }
58
+ export type MaterialInfoFormReq = MaterialInfoCreateReq | MaterialInfoUpdateReq;
59
+ export interface MaterialInfoExportReq extends EntityExportReq {
60
+ req: MaterialInfoReq;
61
+ }
62
+ export interface MaterialInfoImportReq extends EntityImportReq {
63
+ }
@@ -0,0 +1,5 @@
1
+ export declare class Constant {
2
+ static readonly MODULE_DICT = "dict";
3
+ static readonly ENUM_ENTRY_TYPES = "jmash.dict.protobuf.EntryTypes";
4
+ static readonly DICT_DEGREE = "FirstDegree";
5
+ }
@@ -0,0 +1,5 @@
1
+ import type { App } from "vue";
2
+ declare const material: {
3
+ install(app: App): void;
4
+ };
5
+ export default material;
@@ -0,0 +1 @@
1
+ export declare function loadLang(i18n: any): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,50 @@
1
+ declare const _default: {
2
+ inventoryDetail: {
3
+ name: string;
4
+ tenantId: string;
5
+ detailId: string;
6
+ taskId: string;
7
+ inventoryId: string;
8
+ applyId: string;
9
+ deptId: string;
10
+ inventoryType: string;
11
+ quantity: string;
12
+ amount: string;
13
+ };
14
+ materialCategory: {
15
+ categoryName: string;
16
+ parentId: string;
17
+ orderBy: string;
18
+ note: string;
19
+ categoryNameRequired: string;
20
+ parentIdRequired: string;
21
+ noteRequired: string;
22
+ };
23
+ materialInfo: {
24
+ name: string;
25
+ categoryId: string;
26
+ materialCode: string;
27
+ materialName: string;
28
+ specInfo: string;
29
+ unit: string;
30
+ unitPrice: string;
31
+ plannerId: string;
32
+ categoryIdRequired: string;
33
+ materialCodeRequired: string;
34
+ materialNameRequired: string;
35
+ specInfoRequired: string;
36
+ unitRequired: string;
37
+ unitPriceRequired: string;
38
+ plannerIdRequired: string;
39
+ };
40
+ materialInventory: {
41
+ name: string;
42
+ tenantId: string;
43
+ inventoryId: string;
44
+ materialId: string;
45
+ deptId: string;
46
+ parentId: string;
47
+ stock: string;
48
+ };
49
+ };
50
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import "@/permission";
2
+ import "jmash-core/dist/style.css";
3
+ import "jmash-dict/dist/style.css";
4
+ import "jmash-rbac/dist/style.css";
@@ -0,0 +1 @@
1
+ import "nprogress/nprogress.css";
@@ -0,0 +1,28 @@
1
+ import { type PropType } from "vue";
2
+ import type { MaterialCategoryKey } from "@/api/mat-material-category/types";
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ entityKey: {
5
+ type: PropType<MaterialCategoryKey>;
6
+ default: () => void;
7
+ };
8
+ modelValue: {
9
+ type: PropType<boolean>;
10
+ };
11
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ refresh: (...args: any[]) => void;
13
+ "update:modelValue": (value: boolean | undefined) => void;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ entityKey: {
16
+ type: PropType<MaterialCategoryKey>;
17
+ default: () => void;
18
+ };
19
+ modelValue: {
20
+ type: PropType<boolean>;
21
+ };
22
+ }>> & Readonly<{
23
+ onRefresh?: ((...args: any[]) => any) | undefined;
24
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
25
+ }>, {
26
+ entityKey: MaterialCategoryKey;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { type PropType } from "vue";
2
+ import type { MaterialInfoKey } from "@/api/mat-material-info/types";
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ entityKey: {
5
+ type: PropType<MaterialInfoKey>;
6
+ default: () => void;
7
+ };
8
+ modelValue: {
9
+ type: PropType<boolean>;
10
+ };
11
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ refresh: (...args: any[]) => void;
13
+ "update:modelValue": (value: boolean | undefined) => void;
14
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ entityKey: {
16
+ type: PropType<MaterialInfoKey>;
17
+ default: () => void;
18
+ };
19
+ modelValue: {
20
+ type: PropType<boolean>;
21
+ };
22
+ }>> & Readonly<{
23
+ onRefresh?: ((...args: any[]) => any) | undefined;
24
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
25
+ }>, {
26
+ entityKey: MaterialInfoKey;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "sooyie-material",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "module": "dist/index.mjs",
6
+ "types": "dts/src/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "dts/src"
10
+ ],
11
+ "peerDependencies": {
12
+ "axios": "^1.9.0",
13
+ "element-plus": "^2.9.10",
14
+ "pinia": "^2.3.1",
15
+ "vue": "^3.5.13",
16
+ "vue-i18n": "^9.14.4",
17
+ "vue-router": "^4.5.1",
18
+ "jmash-core": "^0.1.7",
19
+ "jmash-dict": "^0.1.1",
20
+ "jmash-rbac": "^0.1.20"
21
+ },
22
+ "devDependencies": {
23
+ "@eslint/js": "^9.14.0",
24
+ "@tsconfig/node20": "^20.1.2",
25
+ "@types/node": "^20.11.10",
26
+ "@vitejs/plugin-vue": "^5.0.3",
27
+ "@vue/tsconfig": "^0.5.1",
28
+ "eslint": "^9.14.0",
29
+ "eslint-plugin-vue": "^9.30.0",
30
+ "globals": "^15.12.0",
31
+ "npm-run-all2": "^6.1.1",
32
+ "prettier": "^3.0.3",
33
+ "sass": "^1.72.0",
34
+ "typescript": "~5.3.0",
35
+ "typescript-eslint": "^8.13.0",
36
+ "unplugin-auto-import": "^0.17.5",
37
+ "unplugin-vue-components": "^0.26.0",
38
+ "vite": "^5.0.11",
39
+ "vue-tsc": "^2.1.10"
40
+ },
41
+ "dependencies": {
42
+ "file-saver": "^2.0.5",
43
+ "nprogress": "^0.2.0",
44
+ "@vueuse/core": "^10.9.0",
45
+ "qs": "^6.14.0"
46
+ },
47
+ "scripts": {
48
+ "dev": "vite",
49
+ "build": "vite build && pnpm build:dts",
50
+ "build:dts": "vue-tsc --declaration --emitDeclarationOnly",
51
+ "preview": "vite preview",
52
+ "build-only": "vite build",
53
+ "type-check": "vue-tsc --build --force",
54
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
55
+ "format": "prettier --write src/"
56
+ }
57
+ }