feat: 统一选择组件中的标签格式为“名称(编号)”并添加状态字段
在多个组件中更新了下拉选择框的标签格式,使其统一为“名称(编号)”的形式,以提升用户体验。同时,在区域编辑页面中新增了状态字段的选择功能,并更新了相关的国际化文件以支持新功能。
This commit is contained in:
parent
5e7c45b9e3
commit
e4923bac17
@ -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,你才能退出
|
||||
请先分析当前项目使用的技术栈
|
||||
45
doc/Readme.md
Normal file
45
doc/Readme.md
Normal file
@ -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`) 来管理前端。
|
||||
@ -71,7 +71,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.type" clearable data-cy="type">
|
||||
<vxe-option :value="null" :label="t$('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in typeDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in typeDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -80,7 +85,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="t$('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -64,7 +64,12 @@
|
||||
<vxe-select v-model="data.type.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.type.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in typeDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in typeDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -75,7 +80,12 @@
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -35,7 +35,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.parentNumber" clearable data-cy="parentNumber">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="depart in parentDeparts" :key="depart.number" :value="depart.number" :label="depart.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="depart in parentDeparts"
|
||||
:key="depart.number"
|
||||
:value="depart.number"
|
||||
:label="depart.name + ' (' + depart.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -43,7 +48,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.region" clearable data-cy="region">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="region in regions" :key="region.number" :value="region.number" :label="region.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="region in regions"
|
||||
:key="region.number"
|
||||
:value="region.number"
|
||||
:label="region.name + ' (' + region.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -52,19 +62,24 @@
|
||||
<vxe-input v-model="data.property" type="text" clearable data-cy="property" />
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="sortNo" :title="$t('jewpmsApp.depart.sortNo')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-input v-model="data.sortNo" type="number" min="0" exponential clearable data-cy="sortNo" />
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="status" :title="$t('jewpmsApp.depart.status')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="sortNo" :title="$t('jewpmsApp.depart.sortNo')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-input v-model="data.sortNo" type="number" min="0" exponential clearable data-cy="sortNo" />
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="remark" :title="$t('jewpmsApp.depart.remark')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-textarea v-model="data.remark" data-cy="remark" />
|
||||
|
||||
@ -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 + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -53,7 +53,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -68,7 +68,12 @@
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -48,7 +48,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.unitWeight" filterable clearable data-cy="unitWeight">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in unitWeightDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in unitWeightDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -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 + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -100,7 +105,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status" @change="val => handleChange('status', val)">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -77,7 +77,12 @@
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -34,7 +34,12 @@
|
||||
<vxe-form-item field="parentNumber" :title="$t('jewpmsApp.region.parentNumber')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.parentNumber" clearable data-cy="parentNumber">
|
||||
<vxe-option v-for="item in parentRegions" :key="item.number" :value="item.number" :label="item.name" />
|
||||
<vxe-option
|
||||
v-for="item in parentRegions"
|
||||
:key="item.number"
|
||||
:value="item.number"
|
||||
:label="item.name + ' (' + item.number + ')'"
|
||||
/>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -58,6 +63,19 @@
|
||||
<vxe-input v-model="data.contactAddress" type="text" data-cy="contactAddress" clearable />
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="status" :title="$t('jewpmsApp.region.status')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
/>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="sortNo" :title="$t('jewpmsApp.region.sortNo')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<vxe-input v-model="data.sortNo" type="number" min="0" exponential clearable data-cy="sortNo" />
|
||||
|
||||
@ -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,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@ -80,6 +80,22 @@
|
||||
</div>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item field="status" :title="$t('jewpmsApp.region.status')" :item-render="{}">
|
||||
<template #default="{ data }">
|
||||
<div class="vxe-filter-group">
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
</vxe-form>
|
||||
|
||||
<div class="alert alert-warning" v-if="!isLoading && regions && regions.length === 0">
|
||||
@ -119,6 +135,9 @@
|
||||
<vxe-button class="btn-circle text-danger" icon="vxe-icon-delete" @click="prepareDelete(row)"></vxe-button>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row }" v-else-if="column.field === 'status'">
|
||||
{{ statusDicts.find(s => s.number === String(row.status))?.name || row.status }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<!-- 分页组件 -->
|
||||
|
||||
@ -41,7 +41,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -63,7 +63,12 @@
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -35,7 +35,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.matGroup" clearable data-cy="matGroup">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in matGroupDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in matGroupDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -43,7 +48,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.matType" clearable data-cy="matType">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in matTypeDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in matTypeDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -51,7 +61,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.process" clearable data-cy="process">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in processDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in processDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -59,7 +74,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.quality" clearable data-cy="quality">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in qualityDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in qualityDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -67,7 +87,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.productType" clearable data-cy="productType">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in productTypeDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in productTypeDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -75,7 +100,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.depart" clearable data-cy="depart">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in departDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in departDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -103,7 +133,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.lostType" clearable data-cy="lostType">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in lostTypeDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in lostTypeDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -118,7 +153,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -55,7 +55,12 @@
|
||||
></vxe-select>
|
||||
<vxe-select v-model="data.matGroup.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in matGroupDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in matGroupDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -66,7 +71,12 @@
|
||||
<vxe-select v-model="data.matType.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.matType.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in matTypeDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in matTypeDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -77,7 +87,12 @@
|
||||
<vxe-select v-model="data.process.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.process.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in processDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in processDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -88,7 +103,12 @@
|
||||
<vxe-select v-model="data.quality.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.quality.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in qualityDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in qualityDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -99,7 +119,12 @@
|
||||
<vxe-select v-model="data.depart.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.depart.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in departDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in departDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -110,7 +135,12 @@
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in statusDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in statusDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
<template #footer>
|
||||
<span>已选 {{ data.styleNo }} </span>
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -209,7 +209,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.quality" clearable data-cy="quality">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="item in qualityDicts" :key="item.number" :value="item.number" :label="item.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="item in qualityDicts"
|
||||
:key="item.number"
|
||||
:value="item.number"
|
||||
:label="`${item.name}(${item.number})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -218,7 +223,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.status" clearable data-cy="status">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="item in statusDicts" :key="item.number" :value="item.number" :label="item.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="item in statusDicts"
|
||||
:key="item.number"
|
||||
:value="item.number"
|
||||
:label="`${item.name}(${item.number})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -86,7 +86,12 @@
|
||||
<vxe-select v-model="data.status.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.status.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="status in statusDicts" :key="status.number" :value="status.number" :label="status.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="status in statusDicts"
|
||||
:key="status.number"
|
||||
:value="status.number"
|
||||
:label="status.name + ' (' + status.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -102,7 +107,12 @@
|
||||
></vxe-select>
|
||||
<vxe-select v-model="data.material.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="material in materials" :key="material.number" :value="material.number" :label="material.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="material in materials"
|
||||
:key="material.number"
|
||||
:value="material.number"
|
||||
:label="material.name + ' (' + material.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -113,7 +123,12 @@
|
||||
<vxe-select v-model="data.quality.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.quality.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="quality in qualityDicts" :key="quality.number" :value="quality.number" :label="quality.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="quality in qualityDicts"
|
||||
:key="quality.number"
|
||||
:value="quality.number"
|
||||
:label="quality.name + ' (' + quality.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -61,7 +61,12 @@
|
||||
<template #default="{ data }">
|
||||
<vxe-select v-model="data.productType" clearable data-cy="productType">
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="type in productTypes" :key="type.number" :value="type.number" :label="type.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="type in productTypes"
|
||||
:key="type.number"
|
||||
:value="type.number"
|
||||
:label="type.name + ' (' + type.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
@ -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})`"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
@ -138,7 +143,12 @@
|
||||
:disabled="processDtls.some(r => hasEditStatus(r)) || settingDtls.some(r => hasEditStatus(r))"
|
||||
>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="item in qualityDicts" :key="item.number" :value="item.number" :label="item.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="item in qualityDicts"
|
||||
:key="item.number"
|
||||
:value="item.number"
|
||||
:label="item.name + ' (' + item.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</template>
|
||||
</vxe-form-item>
|
||||
|
||||
@ -77,7 +77,12 @@
|
||||
></vxe-select>
|
||||
<vxe-select v-model="data.productType.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="type in productTypes" :key="type.number" :value="type.number" :label="type.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="type in productTypes"
|
||||
:key="type.number"
|
||||
:value="type.number"
|
||||
:label="type.name + ' (' + type.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
@ -101,7 +106,12 @@
|
||||
<vxe-select v-model="data.quality.op" class="vxe-filter-operator" :options="operatorSelect" @change="handleChange"></vxe-select>
|
||||
<vxe-select v-model="data.quality.value" @change="handleChange" :immediate="false" clearable>
|
||||
<vxe-option :value="null" :label="$t('entity.action.select')"></vxe-option>
|
||||
<vxe-option v-for="dict in qualityDicts" :key="dict.number" :value="dict.number" :label="dict.name"></vxe-option>
|
||||
<vxe-option
|
||||
v-for="dict in qualityDicts"
|
||||
:key="dict.number"
|
||||
:value="dict.number"
|
||||
:label="dict.name + ' (' + dict.number + ')'"
|
||||
></vxe-option>
|
||||
</vxe-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
"contactPhone": "联系电话",
|
||||
"email": "电子邮箱",
|
||||
"contactAddress": "联系地址",
|
||||
"status": "状态",
|
||||
"remark": "备注",
|
||||
"sortNo": "排序号"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user