diff --git a/doc/AICode.cmd b/doc/AICode.cmd
index e07416b..dd2af5e 100644
--- a/doc/AICode.cmd
+++ b/doc/AICode.cmd
@@ -373,4 +373,4 @@ UPDATE DATABASECHANGELOGLOCK SET locked=0, lockgranted=null, lockedby=null WHERE
... 每次你觉得你修好了,你就在终端里询问我是否满意 ( read -P "修复完成,是否满意?(y/n) " response && echo $response ) ,直到我回复 yes,你才能退出,如果我不回复或者回复其他的,请继续修复,重复上面过程直到你读取到 yes,这一点非常重要。
-你就在终端里询问我是否满意 ( read -P "修复完成,是否满意?(y/n) " response && echo $response ) ,直到我回复 yes,你才能退出
\ No newline at end of file
+请先分析当前项目使用的技术栈
\ No newline at end of file
diff --git a/doc/Readme.md b/doc/Readme.md
new file mode 100644
index 0000000..801547c
--- /dev/null
+++ b/doc/Readme.md
@@ -0,0 +1,45 @@
+# 项目结构分析
+
+这是一个使用 [JHipster](https://www.jhipster.tech/) 生成的全栈 Web 应用程序项目。项目整合了 Java 后端和现代前端技术栈。
+
+## 核心技术栈
+
+- **后端**:
+
+ - **语言**: Java
+ - **框架**: Spring Boot
+ - **构建工具**: Apache Maven (`pom.xml`)
+ - **数据库迁移**: Liquibase (`src/main/resources/config/liquibase/`)
+
+- **前端**:
+ - **语言**: TypeScript
+ - **框架**: Vue.js (`src/main/webapp/app/app.vue`)
+ - **构建/开发工具**: Vite (`vite.config.mts`)
+ - **包管理器**: npm (`package.json`)
+
+## 目录结构
+
+- `pom.xml`: 定义了 Java 项目的依赖和构建生命周期,是 Maven 项目的核心。
+- `package.json`: 定义了前端项目的依赖和脚本,是 npm/Node.js 项目的核心。
+- `src/main/java/com/vxnet/pms/`: 存放所有后端 Java 源代码。
+- `src/main/resources/`: 存放后端应用的配置文件 (`application.yml`)、国际化资源 (`i18n/`) 和数据库迁移脚本 (Liquibase)。
+- `src/main/webapp/`: 存放所有前端代码和资源。
+ - `app/`: 前端 Vue/TypeScript 应用程序的源代码。
+ - `content/`: 存放 CSS 和图片等静态资源。
+ - `i18n/`: 前端国际化文件。
+- `src/test/`: 包含了后端 (Java/JUnit) 和前端 (TypeScript/Vitest) 的测试代码。
+- `src/main/docker/`: 包含了用于构建和运行应用的 Docker Compose 配置文件,方便进行容器化部署(例如,`app.yml`, `mysql.yml`)。
+
+## 开发与质量工具
+
+- **版本控制**: Git (`.git/`)。
+- **代码质量**:
+ - ESLint (`eslint.config.mjs`) 和 Prettier (`.prettierrc`) 用于保证前端代码风格和质量。
+ - Checkstyle (`checkstyle.xml`) 用于 Java 代码规范。
+ - SonarQube (`sonar-project.properties`) 用于静态代码分析。
+- **Git Hooks**: Husky (`.husky/`) 用于在提交代码前自动运行检查 (linting)。
+- **开发容器**: 支持使用 Dev Containers (`.devcontainer/`) 进行标准化的容器化开发。
+
+## 总结
+
+该项目是一个结构清晰、工具链完善的 JHipster 单体应用。它遵循了标准的 Maven 和 npm 项目布局,将后端和前端代码清晰地分离在同一个仓库中。开发者可以通过 `mvnw` (或 `mvnw.cmd`) 来管理后端,通过 `npmw` (或 `npmw.cmd`) 来管理前端。
diff --git a/src/main/webapp/app/entities/company/company-edit.vue b/src/main/webapp/app/entities/company/company-edit.vue
index 204b74c..1351eb2 100644
--- a/src/main/webapp/app/entities/company/company-edit.vue
+++ b/src/main/webapp/app/entities/company/company-edit.vue
@@ -71,7 +71,12 @@
-
+
@@ -80,7 +85,12 @@
-
+
diff --git a/src/main/webapp/app/entities/company/company.vue b/src/main/webapp/app/entities/company/company.vue
index 61adb34..0de1292 100644
--- a/src/main/webapp/app/entities/company/company.vue
+++ b/src/main/webapp/app/entities/company/company.vue
@@ -64,7 +64,12 @@
-
+
@@ -75,7 +80,12 @@
-
+
diff --git a/src/main/webapp/app/entities/depart/depart-edit.vue b/src/main/webapp/app/entities/depart/depart-edit.vue
index 98d74a9..bc90d6c 100644
--- a/src/main/webapp/app/entities/depart/depart-edit.vue
+++ b/src/main/webapp/app/entities/depart/depart-edit.vue
@@ -35,7 +35,12 @@
-
+
@@ -43,7 +48,12 @@
-
+
@@ -52,19 +62,24 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/main/webapp/app/entities/dict/dict-edit.vue b/src/main/webapp/app/entities/dict/dict-edit.vue
index 0c6532f..d6985ad 100644
--- a/src/main/webapp/app/entities/dict/dict-edit.vue
+++ b/src/main/webapp/app/entities/dict/dict-edit.vue
@@ -39,7 +39,7 @@
v-for="dict in parentDicts"
:key="dict.number"
:value="dict.number"
- :label="dict.number + '-' + dict.name"
+ :label="dict.name + '(' + dict.number + ')'"
>
@@ -53,7 +53,12 @@
-
+
diff --git a/src/main/webapp/app/entities/dict/dict.component.ts b/src/main/webapp/app/entities/dict/dict.component.ts
index 8df231c..b7794f0 100644
--- a/src/main/webapp/app/entities/dict/dict.component.ts
+++ b/src/main/webapp/app/entities/dict/dict.component.ts
@@ -118,7 +118,7 @@ export default defineComponent({
//}
const response = await axios.get('api/dicts', { params });
numberOptions.value = response.data.map(item => ({
- label: `${item.number} - ${item.name}`,
+ label: `${item.name}(${item.number})`,
value: item.number,
}));
} catch (e) {
diff --git a/src/main/webapp/app/entities/dict/dict.vue b/src/main/webapp/app/entities/dict/dict.vue
index 3fd5b7d..175b6c6 100644
--- a/src/main/webapp/app/entities/dict/dict.vue
+++ b/src/main/webapp/app/entities/dict/dict.vue
@@ -68,7 +68,12 @@
-
+
diff --git a/src/main/webapp/app/entities/material/material-edit.vue b/src/main/webapp/app/entities/material/material-edit.vue
index 1edfee7..b5be113 100644
--- a/src/main/webapp/app/entities/material/material-edit.vue
+++ b/src/main/webapp/app/entities/material/material-edit.vue
@@ -48,7 +48,12 @@
-
+
@@ -86,7 +91,7 @@
v-for="dict in matGroupDicts[matGroupTitle.findIndex(item => item.number === group.number)]"
:key="dict.number"
:value="dict.number"
- :label="dict.number + ' - ' + dict.name"
+ :label="dict.name + ' (' + dict.number + ')'"
>
@@ -100,7 +105,12 @@
handleChange('status', val)">
-
+
diff --git a/src/main/webapp/app/entities/material/material.vue b/src/main/webapp/app/entities/material/material.vue
index a99d021..95d7385 100644
--- a/src/main/webapp/app/entities/material/material.vue
+++ b/src/main/webapp/app/entities/material/material.vue
@@ -77,7 +77,12 @@
-
+
diff --git a/src/main/webapp/app/entities/region/region-edit.component.ts b/src/main/webapp/app/entities/region/region-edit.component.ts
index 7969ffb..50675a1 100644
--- a/src/main/webapp/app/entities/region/region-edit.component.ts
+++ b/src/main/webapp/app/entities/region/region-edit.component.ts
@@ -17,6 +17,7 @@ export default defineComponent({
const isSaving = ref(false);
const regions = ref([]);
const parentRegions = ref([]);
+ const statusDicts = ref([]);
const region = ref({
id: null,
number: '',
@@ -56,6 +57,18 @@ export default defineComponent({
});
parentRegions.value = parentRegionsRes.data;
+ // 获取状态字典
+ const statusDictsRes = await axios.get('api/dicts', {
+ params: {
+ number: { name: '' },
+ name: { name: '' },
+ property: { name: '' },
+ parentNumber: { op: '=', value: 'StatusType' },
+ status: { op: '=', value: '1' },
+ },
+ });
+ statusDicts.value = statusDictsRes.data;
+
if (route.params?.id) {
const response = await axios.get(`api/regions/${route.params.id}`);
region.value = response.data;
@@ -105,6 +118,7 @@ export default defineComponent({
region,
regions,
parentRegions,
+ statusDicts,
previousState,
save,
regionForm,
diff --git a/src/main/webapp/app/entities/region/region-edit.vue b/src/main/webapp/app/entities/region/region-edit.vue
index 5198619..2ecd1bc 100644
--- a/src/main/webapp/app/entities/region/region-edit.vue
+++ b/src/main/webapp/app/entities/region/region-edit.vue
@@ -34,7 +34,12 @@
-
+
@@ -58,6 +63,19 @@
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/app/entities/region/region.component.ts b/src/main/webapp/app/entities/region/region.component.ts
index b5c7977..96b6795 100644
--- a/src/main/webapp/app/entities/region/region.component.ts
+++ b/src/main/webapp/app/entities/region/region.component.ts
@@ -22,6 +22,7 @@ export default defineComponent({
const deleteDialog = ref(null);
const propOrder = ref('sortNo');
const reverse = ref(false);
+ const statusDicts = ref([]);
const page = reactive({
total: 0,
@@ -35,6 +36,7 @@ export default defineComponent({
parentNumber: { op: '=', value: null },
contactPerson: { op: '=', value: null },
contactPhone: { op: '=', value: null },
+ status: { op: '=', value: null },
});
const operatorSelect = [
@@ -86,6 +88,11 @@ export default defineComponent({
title: $t('jewpmsApp.region.contactAddress'),
field: 'contactAddress',
},
+ {
+ title: $t('jewpmsApp.region.status'),
+ field: 'status',
+ sortable: true,
+ },
{
title: $t('jewpmsApp.region.remark'),
field: 'remark',
@@ -163,10 +170,22 @@ export default defineComponent({
sort: sort(),
};
- const regionsRes = await axios.get(`api/regions/tree?${buildPaginationQuery(paginationQuery)}`, {
- params: params,
- });
+ const [regionsRes, statusDictsRes] = await Promise.all([
+ axios.get(`api/regions/tree?${buildPaginationQuery(paginationQuery)}`, {
+ params: params,
+ }),
+ axios.get('api/dicts', {
+ params: {
+ number: { name: '' },
+ name: { name: '' },
+ property: { name: '' },
+ parentNumber: { op: '=', value: 'StatusType' },
+ status: { op: '=', value: '1' },
+ },
+ }),
+ ]);
regions.value = regionsRes.data;
+ statusDicts.value = statusDictsRes.data;
page.total = parseInt(regionsRes.headers['x-total-count']) || regionsRes.data.length;
} catch (e) {
alertService.showHttpError(e);
@@ -229,6 +248,7 @@ export default defineComponent({
operatorSelect,
handleChange,
handleInput,
+ statusDicts,
};
},
});
diff --git a/src/main/webapp/app/entities/region/region.vue b/src/main/webapp/app/entities/region/region.vue
index b266f03..02b9a8c 100644
--- a/src/main/webapp/app/entities/region/region.vue
+++ b/src/main/webapp/app/entities/region/region.vue
@@ -80,6 +80,22 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -119,6 +135,9 @@
+
+ {{ statusDicts.find(s => s.number === String(row.status))?.name || row.status }}
+
diff --git a/src/main/webapp/app/entities/stock/stock-edit.vue b/src/main/webapp/app/entities/stock/stock-edit.vue
index 1e28856..7142d28 100644
--- a/src/main/webapp/app/entities/stock/stock-edit.vue
+++ b/src/main/webapp/app/entities/stock/stock-edit.vue
@@ -41,7 +41,12 @@
-
+
diff --git a/src/main/webapp/app/entities/stock/stock.vue b/src/main/webapp/app/entities/stock/stock.vue
index e53baaa..113415f 100644
--- a/src/main/webapp/app/entities/stock/stock.vue
+++ b/src/main/webapp/app/entities/stock/stock.vue
@@ -63,7 +63,12 @@
-
+
diff --git a/src/main/webapp/app/orders/cost/cost-edit.vue b/src/main/webapp/app/orders/cost/cost-edit.vue
index 75b4de1..762cdae 100644
--- a/src/main/webapp/app/orders/cost/cost-edit.vue
+++ b/src/main/webapp/app/orders/cost/cost-edit.vue
@@ -35,7 +35,12 @@
-
+
@@ -43,7 +48,12 @@
-
+
@@ -51,7 +61,12 @@
-
+
@@ -59,7 +74,12 @@
-
+
@@ -67,7 +87,12 @@
-
+
@@ -75,7 +100,12 @@
-
+
@@ -103,7 +133,12 @@
-
+
@@ -118,7 +153,12 @@
-
+
diff --git a/src/main/webapp/app/orders/cost/cost.vue b/src/main/webapp/app/orders/cost/cost.vue
index 3b2f7ae..9dbceb2 100644
--- a/src/main/webapp/app/orders/cost/cost.vue
+++ b/src/main/webapp/app/orders/cost/cost.vue
@@ -55,7 +55,12 @@
>
-
+
@@ -66,7 +71,12 @@
-
+
@@ -77,7 +87,12 @@
-
+
@@ -88,7 +103,12 @@
-
+
@@ -99,7 +119,12 @@
-
+
@@ -110,7 +135,12 @@
-
+
diff --git a/src/main/webapp/app/orders/order/order-edit.vue b/src/main/webapp/app/orders/order/order-edit.vue
index 5810473..ab1eeba 100644
--- a/src/main/webapp/app/orders/order/order-edit.vue
+++ b/src/main/webapp/app/orders/order/order-edit.vue
@@ -52,7 +52,7 @@
v-for="company in companies"
:key="company.number"
:value="company.number"
- :label="`${company.number}(${company.name})`"
+ :label="`${company.name}(${company.number})`"
>
@@ -110,7 +110,7 @@
v-for="item in styles"
:key="item.number"
:value="item.number"
- :label="`${item.number}(${item.name})`"
+ :label="`${item.name}(${item.number})`"
>
已选 {{ data.styleNo }}
@@ -137,7 +137,7 @@
v-for="item in materials.filter(m => m.matGroup00 === 'M')"
:key="item.number"
:value="item.number"
- :label="`${item.number}(${item.name})`"
+ :label="`${item.name}(${item.number})`"
>
@@ -150,7 +150,7 @@
v-for="item in sizeTypes"
:key="item.id"
:value="item.number"
- :label="`${item.number}(${item.name})`"
+ :label="`${item.name}(${item.number})`"
>
@@ -193,7 +193,7 @@
v-for="item in platingTypes"
:key="item.id"
:value="item.number"
- :label="`${item.number}(${item.name})`"
+ :label="`${item.name}(${item.number})`"
>
@@ -209,7 +209,12 @@
-
+
@@ -218,7 +223,12 @@
-
+
diff --git a/src/main/webapp/app/orders/order/order-print.component.ts b/src/main/webapp/app/orders/order/order-print.component.ts
index 981065e..5cc7a82 100644
--- a/src/main/webapp/app/orders/order/order-print.component.ts
+++ b/src/main/webapp/app/orders/order/order-print.component.ts
@@ -142,8 +142,19 @@ export default defineComponent({
return;
}
+ // 等待图片加载完毕
+ const images = element.querySelectorAll('img');
+ await Promise.all(
+ Array.from(images).map(img => {
+ if (img.complete) return Promise.resolve();
+ return new Promise(resolve => {
+ img.onload = img.onerror = resolve;
+ });
+ }),
+ );
+
const opt = {
- margin: [5, 5, 5, 5], // 上右下左边距(mm)
+ margin: [5, 5, 5, 5],
filename: `${$t('jewpmsApp.order.detail.title')}-${order.value.number}.pdf`,
image: { type: 'jpeg', quality: 0.98 },
html2canvas: {
diff --git a/src/main/webapp/app/orders/order/order.vue b/src/main/webapp/app/orders/order/order.vue
index afd8a67..2f0b6b9 100644
--- a/src/main/webapp/app/orders/order/order.vue
+++ b/src/main/webapp/app/orders/order/order.vue
@@ -86,7 +86,12 @@
-
+
@@ -102,7 +107,12 @@
>
-
+
@@ -113,7 +123,12 @@
-
+
diff --git a/src/main/webapp/app/orders/style/style-edit.vue b/src/main/webapp/app/orders/style/style-edit.vue
index 4c00be7..16b8c9a 100644
--- a/src/main/webapp/app/orders/style/style-edit.vue
+++ b/src/main/webapp/app/orders/style/style-edit.vue
@@ -45,7 +45,7 @@
v-for="company in companies"
:key="company.number"
:value="company.number"
- :label="`${company.number}(${company.name})`"
+ :label="`${company.name}(${company.number})`"
>
@@ -61,7 +61,12 @@
-
+
@@ -92,7 +97,7 @@
v-for="dict in styleGroupDicts[parseInt(group.number.replace(styleGroupPrefix, ''))]"
:key="dict.number"
:value="dict.number"
- :label="`${dict.number}(${dict.name})`"
+ :label="`${dict.name}(${dict.number})`"
>
@@ -138,7 +143,12 @@
:disabled="processDtls.some(r => hasEditStatus(r)) || settingDtls.some(r => hasEditStatus(r))"
>
-
+
diff --git a/src/main/webapp/app/orders/style/style.vue b/src/main/webapp/app/orders/style/style.vue
index e3e2329..876ad96 100644
--- a/src/main/webapp/app/orders/style/style.vue
+++ b/src/main/webapp/app/orders/style/style.vue
@@ -77,7 +77,12 @@
>
-
+
@@ -101,7 +106,12 @@
-
+
diff --git a/src/main/webapp/i18n/zh-cn/region.json b/src/main/webapp/i18n/zh-cn/region.json
index 53d6c49..b3f0bc1 100644
--- a/src/main/webapp/i18n/zh-cn/region.json
+++ b/src/main/webapp/i18n/zh-cn/region.json
@@ -22,6 +22,7 @@
"contactPhone": "联系电话",
"email": "电子邮箱",
"contactAddress": "联系地址",
+ "status": "状态",
"remark": "备注",
"sortNo": "排序号"
}