mahao 1 year ago
parent
commit
930260d90c
  1. 6
      code/WebApp/vanilla/api/user.js
  2. 9
      code/WebApp/vanilla/components/form/form-input.js
  3. 24
      code/WebApp/vanilla/components/icon/index.js
  4. 22
      code/WebApp/vanilla/components/list/index.js
  5. 86
      code/WebApp/vanilla/models/code-setting.js
  6. 2
      code/WebApp/vanilla/models/role.js
  7. 35
      code/WebApp/vanilla/models/user.js
  8. 13
      code/WebApp/vanilla/request/index.js
  9. 13
      code/WebApp/vanilla/router/index.js
  10. 90
      code/WebApp/vanilla/router/routes.js
  11. 4
      code/WebApp/vanilla/utils/validation.js
  12. 28
      code/WebApp/vanilla/views/base-data/code-setting.js
  13. 13
      code/WebApp/vanilla/views/base-data/user.js
  14. 14
      code/WebApp/vanilla/views/login.js
  15. 2
      code/src/AuthServer/AuthServer.Host/appsettings.json
  16. 3
      code/src/Modules/BaseService/BaseService.Host/appsettings.json
  17. BIN
      docs/12.sql
  18. 32
      docs/demo/src/WTA.Application/Identity/Controllers/CodeSettingController.cs
  19. 10
      docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs
  20. 2
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_DETAIL.cs
  21. 29
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/CodeSetting.cs
  22. 2
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_NOT_SA_DETAIL.cs
  23. 1
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SA.cs
  24. 3
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs
  25. 2
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs

6
code/WebApp/vanilla/api/user.js

@ -1,5 +1,5 @@
import router from "../router/index.js"; import router from "../router/index.js";
import { get, post } from "../request/index.js"; import request, { get, post } from "../request/index.js";
import jwt_decode from "../lib/jwt-decode/jwt-decode.esm.js"; import jwt_decode from "../lib/jwt-decode/jwt-decode.esm.js";
import qs from "../lib/qs/shim.js"; import qs from "../lib/qs/shim.js";
import { useAppStore } from "../store/index.js"; import { useAppStore } from "../store/index.js";
@ -46,7 +46,9 @@ const logout = () => {
}; };
const getUser = async () => { const getUser = async () => {
const result = await get("abp/application-configuration"); const result = await request("abp/application-configuration", null, {
method: "GET",
});
const data = result.data; const data = result.data;
const user = {}; const user = {};
user.id = data.currentUser.id; user.id = data.currentUser.id;

9
code/WebApp/vanilla/components/form/form-input.js

@ -8,8 +8,9 @@ export default {
<template v-if="getDisabled()"> <template v-if="getDisabled()">
<template v-if="model[prop]!==null"> <template v-if="model[prop]!==null">
<el-switch disabled v-model="model[prop]" type="checked" v-if="schema.type==='boolean'" /> <el-switch disabled v-model="model[prop]" type="checked" v-if="schema.type==='boolean'" />
<template v-else-if="schema.format==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template> <template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.format==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template> <template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='password'">******</template>
<template v-else>{{model[prop]}}</template> <template v-else>{{model[prop]}}</template>
</template> </template>
</template> </template>
@ -70,7 +71,7 @@ export default {
}); });
/*start*/ /*start*/
const getDisabled = () => { const getDisabled = () => {
if (props.mode==='details') { if (props.mode === "details") {
return true; return true;
} }
if (props.mode === "update" && props.schema.readOnly) { if (props.mode === "update" && props.schema.readOnly) {
@ -92,7 +93,7 @@ export default {
} else if (props.schema.url) { } else if (props.schema.url) {
try { try {
const url = `${props.schema.url}`; const url = `${props.schema.url}`;
const result = await request(url, null, { method: "get" }); const result = await request(url, null, { method: "GET" });
options.value = result.data?.items.map((o) => ({ options.value = result.data?.items.map((o) => ({
value: o[props.schema.value], value: o[props.schema.value],
label: o[props.schema.label], label: o[props.schema.label],

24
code/WebApp/vanilla/components/icon/index.js

@ -16,27 +16,21 @@ export default {
}, },
setup(props) { setup(props) {
const svg = ref(null); const svg = ref(null);
const appStore = useAppStore();
onMounted(async () => { onMounted(async () => {
if (!props.name.startsWith("ep-")) { if (!props.name.startsWith("ep-")) {
try { try {
const url = `./assets/icons/${props.name}.svg`; const url = `./assets/icons/${props.name}.svg`;
navigator.locks.request(url, async () => { if (!appStore.cache.has(url)) {
const appStore = useAppStore(); const response = await fetch(url);
if (appStore.cache.has(url)) { const result = await response.text();
svg.value = appStore.cache.get(url); appStore.cache.set(url, result);
} else { }
const response = await fetch(url); svg.value = appStore.cache.get(url);
if (response.ok && response.status === 200) {
svg.value = await response.text();
appStore.cache.set(url, svg.value);
}
}
});
} catch (error) { } catch (error) {
console.log(error); console.log(error);
if (!svg.value) { } finally {
svg.value = `<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>`; svg.value ??= `<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>`;
}
} }
} }
}); });

22
code/WebApp/vanilla/components/list/index.js

@ -352,9 +352,11 @@ export default {
const router = useRouter(); const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const appStore = useAppStore(); const appStore = useAppStore();
const buttons = ref(props.buttons ?? route.meta.children.filter((o) => o.meta.hasPermission)); // 注释一下代码暂停权限验证
// const buttons = ref(props.buttons ?? route.meta.children.filter((o) => o.meta.hasPermission));
// 添加下行代码暂停权限验证
const buttons = ref(props.buttons ?? route.meta.children);
const baseUrl = props.controller ?? `${route.meta.path}`; const baseUrl = props.controller ?? `${route.meta.path}`;
const indexUrl = props.indexUrl ?? `${baseUrl}/index`;
const queryModel = ref({}); const queryModel = ref({});
const sortColumns = ref(new Map()); const sortColumns = ref(new Map());
const querySchema = ref(props.querySchema); const querySchema = ref(props.querySchema);
@ -476,7 +478,8 @@ export default {
editFormModel.value = schemaToModel(config.edit.schema); editFormModel.value = schemaToModel(config.edit.schema);
} else { } else {
const url = `${config.edit.updateUrl ?? config.query.url}/${rows[0].id}`; const url = `${config.edit.updateUrl ?? config.query.url}/${rows[0].id}`;
editFormModel.value = (await request(url, null, { method: "get" })).data; editFormModel.value = (await request(url, null, { method: "GET" })).data;
editFormModel.value.id = rows[0].id;
} }
editFormTitle.value = `${t(item.path)}${config.edit.schema.title}`; editFormTitle.value = `${t(item.path)}${config.edit.schema.title}`;
dialogVisible.value = true; dialogVisible.value = true;
@ -516,8 +519,11 @@ export default {
const valid = await editFormRef.value.validate(); const valid = await editFormRef.value.validate();
if (valid) { if (valid) {
editFormloading.value = true; editFormloading.value = true;
const url = let url =
(editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url; (editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url;
if (editFormMode.value === "update") {
url = `${url}/${editFormModel.value.id}`;
}
const method = editFormMode.value === "create" ? config.edit.createMethod : config.edit.updateMethod; const method = editFormMode.value === "create" ? config.edit.createMethod : config.edit.updateMethod;
const result = await request(url, editFormModel.value, { method }); const result = await request(url, editFormModel.value, { method });
if (result.errors) { if (result.errors) {
@ -617,9 +623,11 @@ export default {
return false; return false;
}; };
onMounted(async () => { onMounted(async () => {
for (const item of route.meta.children) { if (route.meta.children?.length) {
if (item.meta.disabled?.constructor === String) { for (const item of route.meta.children) {
item.meta.disabled = await importFunction(item.meta.disabled); if (item.meta.disabled?.constructor === String) {
item.meta.disabled = await importFunction(item.meta.disabled);
}
} }
} }
pushQueryList(); pushQueryList();

86
code/WebApp/vanilla/models/code-setting.js

@ -0,0 +1,86 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
userName: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
userName: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
name: {
title: "描述",
type: "string",
showForList: true,
rules: [
{
required: true,
},
],
},
},
};
const url = "base/code-settings";
const createUrl = url;
const updateUrl = url;
const deleteUrl = url;
const method = "GET";
const createMethod = "POST";
const updateMethod = "PUT";
const deleteMethod = "DELETE";
export default function () {
return {
query: {
url,
method,
schema: {
title: "通用代码",
type: "object",
properties: {
filter: {
title: "项目",
type: "string",
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
},
},
},
table: {
schema: schema,
},
edit: {
createUrl,
updateUrl,
deleteUrl,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

2
code/WebApp/vanilla/models/role.js

@ -23,7 +23,7 @@ export default function () {
return { return {
query: { query: {
url: "identity/roles", url: "identity/roles",
method: "get", method: "GET",
schema: { schema: {
title: "用户", title: "用户",
type: "object", type: "object",

35
code/WebApp/vanilla/models/user.js

@ -5,7 +5,7 @@ const schema = {
userName: { userName: {
title: "用户名", title: "用户名",
type: "string", type: "string",
readOnly: true, // readOnly: true,
showForList: true, showForList: true,
rules: [ rules: [
{ {
@ -20,6 +20,7 @@ const schema = {
password: { password: {
title: "密码", title: "密码",
type: "string", type: "string",
readOnly: true,
input: "password", input: "password",
}, },
name: { name: {
@ -52,18 +53,18 @@ const schema = {
}, },
], ],
}, },
roleNames: { // roleNames: {
title: "角色", // title: "角色",
type: "array", // type: "array",
input: "select", // input: "select",
multiple: true, // multiple: true,
url: "identity/roles/all", // url: "identity/roles/all",
value: "name", // value: "name",
label: "name", // label: "name",
items: { // items: {
type: "string", // type: "string",
}, // },
}, // },
}, },
}; };
@ -71,10 +72,10 @@ const url = "base/user";
const createUrl = url; const createUrl = url;
const updateUrl = url; const updateUrl = url;
const deleteUrl = "api/identity/users"; const deleteUrl = "api/identity/users";
const method = "get"; const method = "GET";
const createMethod = "post"; const createMethod = "POST";
const updateMethod = "put"; const updateMethod = "PUT";
const deleteMethod = "delete"; const deleteMethod = "DELETE";
export default function () { export default function () {
return { return {

13
code/WebApp/vanilla/request/index.js

@ -113,7 +113,6 @@ async function request(url, data, options, withoutToken = false) {
method: "POST", method: "POST",
headers: { headers: {
"Accept-Language": "zh-Hans", "Accept-Language": "zh-Hans",
"Content-Type": "application/json",
}, },
}; };
if (options) { if (options) {
@ -121,17 +120,17 @@ async function request(url, data, options, withoutToken = false) {
} }
if (defaultOptions.method === "GET" && data) { if (defaultOptions.method === "GET" && data) {
url = `${url}?${qs.stringify(data)}`; url = `${url}?${qs.stringify(data)}`;
} } else {
if (defaultOptions.method === "POST") {
if (data instanceof FormData) {
delete defaultOptions.headers["Content-Type"];
}
if (defaultOptions.headers["Content-Type"]?.startsWith("application/x-www-form-urlencoded")) { if (defaultOptions.headers["Content-Type"]?.startsWith("application/x-www-form-urlencoded")) {
defaultOptions.body = qs.stringify(data); defaultOptions.body = qs.stringify(data);
} else if (defaultOptions.headers["Content-Type"]?.startsWith("application/json")) { } else if (defaultOptions.headers["Content-Type"]?.startsWith("application/json")) {
defaultOptions.body = JSON.stringify(data); defaultOptions.body = JSON.stringify(data);
} else { } else if (data instanceof FormData) {
delete defaultOptions.headers["Content-Type"];
defaultOptions.body = data; defaultOptions.body = data;
} else if (data) {
defaultOptions.headers["Content-Type"] = "application/json";
defaultOptions.body = JSON.stringify(data);
} }
} }
if (!withoutToken) { if (!withoutToken) {

13
code/WebApp/vanilla/router/index.js

@ -49,11 +49,14 @@ router.beforeEach(async (to, from, next) => {
if (!(await isLogin())) { if (!(await isLogin())) {
next({ path: "/login", query: { redirect: to.fullPath } }); next({ path: "/login", query: { redirect: to.fullPath } });
} else { } else {
if (!to.meta.public && to.meta.hasPermission === false) { // 注释以下代码暂停权限验证
next({ path: "/403", query: { redirect: to.fullPath } }); // if (!to.meta.public && to.meta.hasPermission === false) {
} else { // next({ path: "/403", query: { redirect: to.fullPath } });
next(); // } else {
} // next();
// }
// 添加一下代码暂停权限验证
next();
} }
} else { } else {
next(); next();

90
code/WebApp/vanilla/router/routes.js

@ -55,50 +55,68 @@ export default [
isTop: true, isTop: true,
}, },
}, },
],
},
{
path: "role",
meta: {
type: "page",
title: "角色管理",
icon: "file",
permission: "AbpIdentity.Users",
},
children: [
{
path: "create",
meta: {
type: "button",
title: "新建",
icon: "file",
permission: "AbpIdentity.Users.Create",
isTop: true,
},
},
{ {
path: "update", path: "%s/reset-password",
meta: { meta: {
type: "button", type: "button",
title: "编辑", title: "重置密码",
icon: "file", icon: "file",
htmlClass: "el-button--primary", permission: "reset-password?",
permission: "AbpIdentity.Users.Update", method: "PUT",
disabled: `(o) => o.isStatic`,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
permission: "AbpIdentity.Users.Delete",
disabled: `(o) => o.isStatic`,
}, },
}, },
], ],
}, },
// {
// path: "role",
// meta: {
// type: "page",
// title: "角色管理",
// icon: "file",
// permission: "AbpIdentity.Users",
// },
// children: [
// {
// path: "create",
// meta: {
// type: "button",
// title: "新建",
// icon: "file",
// permission: "AbpIdentity.Users.Create",
// isTop: true,
// },
// },
// {
// path: "update",
// meta: {
// type: "button",
// title: "编辑",
// icon: "file",
// htmlClass: "el-button--primary",
// permission: "AbpIdentity.Users.Update",
// disabled: `(o) => o.isStatic`,
// },
// },
// {
// path: "delete",
// meta: {
// type: "button",
// title: "删除",
// icon: "file",
// permission: "AbpIdentity.Users.Delete",
// disabled: `(o) => o.isStatic`,
// },
// },
// ],
// },
{
path: "code-setting",
meta: {
type: "page",
title: "通用代码",
icon: "file",
},
},
], ],
}, },
]; ];

4
code/WebApp/vanilla/utils/validation.js

@ -80,10 +80,10 @@ const validators = {
} else { } else {
const config = { const config = {
url: rule.url, url: rule.url,
method: rule.method ?? "get", method: rule.method ?? "GET",
}; };
const data = { [rule.field]: value }; const data = { [rule.field]: value };
if (config.method === "get") { if (config.method === "GET") {
config.params = data; config.params = data;
} else { } else {
config.data = data; config.data = data;

28
code/WebApp/vanilla/views/base-data/code-setting.js

@ -0,0 +1,28 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/code-setting.js";
import request from "../../request/index.js";
import { format } from "../../utils/index.js";
import { ElMessage } from "element-plus";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
// 变量定义
const config = useConfig();
// 函数定义
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
const url = format(item.path, rows[0].id);
await request(`base/user/${url}`, null, { method: item.meta.method });
ElMessage({
type: "info",
message: format("用户%s的密码已经成功重置为123456", rows[0].userName),
});
}
};
return { config, onCommand };
},
};

13
code/WebApp/vanilla/views/base-data/user.js

@ -1,6 +1,9 @@
import AppList from "../../components/list/index.js"; import AppList from "../../components/list/index.js";
import html from "html"; import html from "html";
import useConfig from "../../models/user.js"; import useConfig from "../../models/user.js";
import request from "../../request/index.js";
import { format } from "../../utils/index.js";
import { ElMessage } from "element-plus";
export default { export default {
components: { AppList }, components: { AppList },
@ -9,8 +12,16 @@ export default {
// 变量定义 // 变量定义
const config = useConfig(); const config = useConfig();
// 函数定义 // 函数定义
const onCommand = (item, rows) => { const onCommand = async (item, rows) => {
console.log(item.path, item, rows); console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
const url = format(item.path, rows[0].id);
await request(`base/user/${url}`, null, { method: item.meta.method });
ElMessage({
type: "info",
message: format("用户%s的密码已经成功重置为123456", rows[0].userName),
});
}
}; };
return { config, onCommand }; return { config, onCommand };
}, },

14
code/WebApp/vanilla/views/login.js

@ -36,12 +36,14 @@ export default {
const result = await request(url, model, { method: "POST" }, true); const result = await request(url, model, { method: "POST" }, true);
if (!result.errors) { if (!result.errors) {
appStore.token = result.data.accessToken; appStore.token = result.data.accessToken;
setAccessToken(appStore.token); if (appStore.token) {
//setRefreshToken(result.data.refresh_token); setAccessToken(appStore.token);
appStore.user = await getUser(); //setRefreshToken(result.data.refresh_token);
await refreshRouter(); appStore.user = await getUser();
const redirect = router.currentRoute.value.query?.redirect ?? "/"; await refreshRouter();
router.push(redirect); const redirect = router.currentRoute.value.query?.redirect ?? "/";
router.push(redirect);
}
} }
callback(result.errors); callback(result.errors);
} catch (error) { } catch (error) {

2
code/src/AuthServer/AuthServer.Host/appsettings.json

@ -1,6 +1,6 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True" "Default": "Server=localhost;Database=BJABP;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True"
}, },
"CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307", "CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307",
"ElasticSearch": { "ElasticSearch": {

3
code/src/Modules/BaseService/BaseService.Host/appsettings.json

@ -1,8 +1,9 @@
{ {
"AuthServer": { "AuthServer": {
"Authority": "http://dev.ccwin-in.com:10580", "Authority": "http://dev.ccwin-in.com:10580",
//"Authority": "http://localhost:10130",
"ClientId": "basic-web", "ClientId": "basic-web",
"ClientSecret": "" "ClientSecret": "1q2w3e*"
}, },
"App": { "App": {
"CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307" "CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307"

BIN
docs/12.sql

Binary file not shown.

32
docs/demo/src/WTA.Application/Identity/Controllers/CodeSettingController.cs

@ -0,0 +1,32 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using WTA.Application.Identity.Entities.SystemManagement;
using WTA.Shared.Application;
using WTA.Shared.Controllers;
using WTA.Shared.Data;
namespace WTA.Application.Identity.Controllers;
public class CodeSettingController : GenericController<CodeSetting, CodeSetting, CodeSetting, CodeSetting, CodeSetting, CodeSetting>
{
public CodeSettingController(ILogger<CodeSetting> logger, IRepository<CodeSetting> repository) : base(logger, repository)
{
}
[Display(Name = "导出Excel")]
public override IActionResult Export([FromBody] PaginationModel<CodeSetting, CodeSetting> model, bool includeAll = false, bool includeDeleted = false)
{
return base.Export(model, includeAll, includeDeleted);
}
[Display(Name = "搜索")]
public override IActionResult Index([FromBody] PaginationModel<CodeSetting, CodeSetting> model)
{
return base.Index(model);
}
[Display(Name = "新增")]
public override IActionResult Create([FromBody] CodeSetting model)
{
return base.Create(model);
}
}

10
docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs

@ -172,10 +172,20 @@ public class IdentityDbSeed : IDbSeed<IdentityDbContext>
context.Set<INVOICE_NOT_SETTLE>().Add(new INVOICE_NOT_SETTLE { InvGroupNum = "分组号测试数据一", Version = "测试数据", SettleGroupNum = "测试数据", LU = "测试数据", LU1 = "测试数据", Extend1 = "测试数据", Extend2 = "测试数据" }); context.Set<INVOICE_NOT_SETTLE>().Add(new INVOICE_NOT_SETTLE { InvGroupNum = "分组号测试数据一", Version = "测试数据", SettleGroupNum = "测试数据", LU = "测试数据", LU1 = "测试数据", Extend1 = "测试数据", Extend2 = "测试数据" });
context.Set<INVOICE_NOT_SETTLE>().Add(new INVOICE_NOT_SETTLE { InvGroupNum = "分组号测试数据二", Version = "测试数据", SettleGroupNum = "测试数据", LU = "测试数据", LU1 = "测试数据", Extend1 = "测试数据", Extend2 = "测试数据" }); context.Set<INVOICE_NOT_SETTLE>().Add(new INVOICE_NOT_SETTLE { InvGroupNum = "分组号测试数据二", Version = "测试数据", SettleGroupNum = "测试数据", LU = "测试数据", LU1 = "测试数据", Extend1 = "测试数据", Extend2 = "测试数据" });
context.Set<HBPO_SE_REPORT>().Add(new HBPO_SE_REPORT { KeyCode = "测试数据", Version = "测试数据", LU = "测试数据", PN = "测试数据", SeqNumber = "测试数据", AssemblyCode = "测试数据", InjectionCode = "测试数据", BeginDate = new DateTime(), ShippingDate = new DateTime(), WmsBillNum = "测试数据" }); context.Set<HBPO_SE_REPORT>().Add(new HBPO_SE_REPORT { KeyCode = "测试数据", Version = "测试数据", LU = "测试数据", PN = "测试数据", SeqNumber = "测试数据", AssemblyCode = "测试数据", InjectionCode = "测试数据", BeginDate = new DateTime(), ShippingDate = new DateTime(), WmsBillNum = "测试数据" });
context.Set<BBAC_SE_REPORT>().Add(new BBAC_SE_REPORT { KeyCode = "测试数据", Version = "测试数据", LU = "测试数据", PN = "测试数据", SeqNumber = "测试数据", AssemblyCode = "测试数据", InjectionCode = "测试数据", BeginDate = new DateTime(), ShippingDate = new DateTime(), WmsBillNum = "测试数据" });
context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "1号测试数据" }); context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "1号测试数据" });
context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "2号测试数据" }); context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "2号测试数据" });
context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "3号测试数据" });
context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "一号测试数据" });
context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "二号测试数据" });
context.Set<PUB_SA>().Add(new PUB_SA { Version = "测试数据", State = "测试数据", BillNum = "三号测试数据" });
context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "1号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" }); context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "1号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" });
context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "2号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" }); context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "2号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" });
context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "3号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" });
context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "一号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" });
context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "二号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" });
context.Set<PUB_SA_DETAIL>().Add(new PUB_SA_DETAIL { KeyCode = "测试数据", Version = "测试数据", BillNum = "三号测试数据", LU = "测试数据", PN = "测试数据", Site = "测试数据", InvGroupNum = "测试数据", SettleDate = new DateTime(), Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", GroupNum = "测试数据" });
} }
private static void InitDictionaries(DbContext context) private static void InitDictionaries(DbContext context)

2
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_DETAIL.cs

@ -5,7 +5,7 @@ using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
[Order(4)] [Order(2)]
[JISBBACDataInputGroup] [JISBBACDataInputGroup]
[Display(Name = "JIS发运数据")] [Display(Name = "JIS发运数据")]
//BBAC发运单 //BBAC发运单

29
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/CodeSetting.cs

@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
using WTA.Shared.Attributes;
using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement;
[SystemManagement]
[Order(4)]
[Display(Name = "通用代码")]
public class CodeSetting : BaseEntity
{
/// <summary>
/// 项目
/// </summary>
[Display(Name = "项目")]
public string Project { set; get; } = null!;
/// <summary>
/// 值
/// </summary>
[Display(Name = "值")]
public string Value { set; get; } = null!;
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string Description { set; get; } = null!;
}

2
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_NOT_SA_DETAIL.cs

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using WTA.Application.Identity.Entities.SystemManagement.Group; using WTA.Application.Identity.Entities.SystemManagement.Group;
using WTA.Shared.Attributes;
using WTA.Shared.Domain; using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
@ -29,6 +30,7 @@ namespace WTA.Application.Identity.Entities.SystemManagement;
// [Display(Name = "明细记录行数")] // [Display(Name = "明细记录行数")]
// public string RecordCount { get; set; } = null!; // public string RecordCount { get; set; } = null!;
//} //}
[Order(2)]
[JISHBPOSettlementInvoicingGroup] [JISHBPOSettlementInvoicingGroup]
[Display(Name = "不可结算单")] [Display(Name = "不可结算单")]
//HBPO不可结算导入明细 //HBPO不可结算导入明细

1
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SA.cs

@ -4,6 +4,7 @@ using WTA.Shared.Attributes;
using WTA.Shared.Domain; using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
[Order(1)]
[JISHBPODataInputGroup] [JISHBPODataInputGroup]
[Display(Name = "JIS结算数据")] [Display(Name = "JIS结算数据")]
//HBPO结算导入 //HBPO结算导入

3
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs

@ -1,9 +1,10 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using WTA.Application.Identity.Entities.SystemManagement.Group; using WTA.Application.Identity.Entities.SystemManagement.Group;
using WTA.Shared.Attributes;
using WTA.Shared.Domain; using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
[Order(2)]
[Display(Name = "JIS发运数据")] [Display(Name = "JIS发运数据")]
//HBPO发运数据 //HBPO发运数据
[JISHBPODataInputGroup] [JISHBPODataInputGroup]

2
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs

@ -1,8 +1,10 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using WTA.Application.Identity.Entities.SystemManagement.Group; using WTA.Application.Identity.Entities.SystemManagement.Group;
using WTA.Shared.Attributes;
using WTA.Shared.Domain; using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement; namespace WTA.Application.Identity.Entities.SystemManagement;
[Order(3)]
[JISHBPODataInputGroup] [JISHBPODataInputGroup]
[Display(Name = "EDI数据")] [Display(Name = "EDI数据")]
//HBPO的EDI数据 //HBPO的EDI数据

Loading…
Cancel
Save