diff --git a/code/WebApp/vanilla/components/form/form-input.js b/code/WebApp/vanilla/components/form/form-input.js
index 87d16b3d..24a7112c 100644
--- a/code/WebApp/vanilla/components/form/form-input.js
+++ b/code/WebApp/vanilla/components/form/form-input.js
@@ -2,14 +2,16 @@ import html from "html";
import { ref, reactive, watch, onMounted } from "vue";
import { dayjs } from "element-plus";
import request, { post } from "../../request/index.js";
+import { importFunction } from "../../utils/index.js";
export default {
template: html`
- {{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}
+ {{dayjs(model[prop]).format('YYYY')}}
{{dayjs(model[prop]).format('YYYY-MM-DD')}}
+ {{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}
******
{{model[prop]}}
@@ -27,21 +29,24 @@ export default {
+
+
+
-
+
@@ -51,6 +56,7 @@ export default {
-
+
`,
@@ -87,6 +100,22 @@ export default {
const selectProps = ref({});
const selectValues = ref([]);
const options = ref([]);
+ //watch
+
+ watch(
+ () => model[props.prop],
+ async (value) => {
+ if (props.schema.watch) {
+ console.log(value);
+ if (props.schema.watch?.constructor === String) {
+ props.schema.watch = await importFunction(props.schema.watch);
+ }
+ if (props.schema.watch?.constructor === Function) {
+ props.schema.watch(model, value);
+ }
+ }
+ }
+ );
onMounted(async () => {
if (props.schema.options) {
options.value = props.schema.options;
diff --git a/code/WebApp/vanilla/components/form/index.js b/code/WebApp/vanilla/components/form/index.js
index df07298f..9e876e63 100644
--- a/code/WebApp/vanilla/components/form/index.js
+++ b/code/WebApp/vanilla/components/form/index.js
@@ -5,7 +5,7 @@ export default {
components: { AppFormItem: defineAsyncComponent(() => import("./form-item.js")) },
name: "AppForm",
template: html`
-
+
-
+
- $t('confirm')
+
+ $t('confirm')
+
`,
- props: ["modelValue", "schema", "action", "hideButton", "isQueryForm", "mode"],
+ props: ["modelValue", "inline", "schema", "action", "hideButton", "isQueryForm", "mode"],
emits: ["update:modelValue", "submit"],
setup(props, context) {
// init
diff --git a/code/WebApp/vanilla/components/list/index.js b/code/WebApp/vanilla/components/list/index.js
index 802dee6b..a312d55c 100644
--- a/code/WebApp/vanilla/components/list/index.js
+++ b/code/WebApp/vanilla/components/list/index.js
@@ -1,5 +1,5 @@
import html, { getProp } from "html";
-import request, { get, post } from "../../request/index.js";
+import request, { get, getUrl, post } from "../../request/index.js";
import { defineAsyncComponent, ref, reactive, onMounted } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
@@ -14,6 +14,7 @@ export default {
name: "AppList",
components: {
AppForm: defineAsyncComponent(() => import("../form/index.js")),
+ AppFormInput: defineAsyncComponent(() => import("../../components/form/form-input.js")),
SvgIcon: defineAsyncComponent(() => import("../../components/icon/index.js")),
AppFormInput: defineAsyncComponent(() => import("../form/form-input.js")),
VueOfficeExcel,
@@ -26,13 +27,18 @@ export default {
inline
mode="query"
label-position="left"
- :schema="querySchema"
+ :schema="config.query.schema"
v-model="queryModel"
@submit="load"
:hideButton="true"
:isQueryForm="true"
- v-if="querySchema"
- />
+ >
+
+
+
+
+
+
@@ -48,7 +54,7 @@ export default {
{{item.meta.title}}
-
+
{{$t('筛选')}}
@@ -231,23 +237,26 @@ export default {
-
-
-
-
-
-
-
+
{{$t('下载')}}
-
+
+
+
+
+
+
+
+
+
+
+
@@ -257,37 +266,33 @@ export default {
-
-
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
@@ -296,7 +301,7 @@ export default {
-
+
@@ -322,6 +327,22 @@ export default {
.el-form.filter .el-col {
padding: 5px;
}
+ dl.upload {
+ min-height: 100%;
+ }
+ dl.upload dt {
+ font-weight: bold;
+ line-height: 3em;
+ }
+ dl.upload dd {
+ line-height: 2em;
+ }
+ dl.upload .el-form-item {
+ width: 300px;
+ }
+ div.upload {
+ width: 100%;
+ }
`,
props: ["modelValue", "config", "querySchema", "controller", "query", "buttons"],
emits: ["command"],
@@ -361,7 +382,7 @@ export default {
const queryModel = ref({});
const sortColumns = ref(new Map());
const querySchema = ref(props.querySchema);
- const queryList = ref([]);
+ const filterList = ref([]);
const tableSchema = ref({});
const tableData = ref([]);
const editFormRef = ref(null);
@@ -375,12 +396,16 @@ export default {
includeDeleted: false,
});
const importModel = reactive({
- partial: true,
- replace: false,
+ // partial: true,
+ // replace: false,
+ factory: "",
+ version: "",
});
+ const factories = ref([]);
+ const versions = ref([]);
const fileList = ref([]);
const getSortModel = (model) => {
- model.orderBy
+ (model.sorting ?? "")
.split(",")
.map((o) => o.trim())
.filter((o) => o)
@@ -393,7 +418,7 @@ export default {
const getColumns = (schema) => {
Object.keys(schema.properties).forEach((propertyName) => {
const property = schema.properties[propertyName];
- if (property.type !== "object" && property.type !== "array" && !property.hidden && property.showForList) {
+ if (property.showForList || (property.type !== "object" && property.type !== "array" && !property.hidden)) {
columns.value.push({ name: propertyName, title: property.title, checked: true });
}
});
@@ -409,39 +434,21 @@ export default {
} else {
sortColumns.value.set(prop, order);
}
- queryModel.value.orderBy = Array.from(sortColumns.value)
+ queryModel.value.sorting = Array.from(sortColumns.value)
.map((o) => capitalize(o[0]) + (o[1] === "ascending" ? "" : ` DESC`))
.join(",");
await load();
};
const showColumn = (item, prop) => {
- return (
- item.type !== "object" &&
- item.type !== "array" &&
- !item.hidden &&
- columns.value.findIndex((o) => o.name === prop && o.checked) >= 0
- );
+ return columns.value.some((o) => o.name === prop && o.checked);
};
-
const handleSelectionChange = (rows) => (selectedRows.value = rows);
const load = async () => {
tableLoading.value = true;
try {
const url = config.query.url;
const method = config.query.method;
- //
- queryModel.value = schemaToModel(config.query.schema);
- queryModel.value.maxResultCount = pageModel.pageSize;
- queryModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
- //
- const postData = JSON.parse(JSON.stringify(queryModel.value));
- postData.filters = queryList.value.filter((o) => o.property && o.value);
- if (postData.items) {
- delete postData["items"];
- }
- if (postData.query?.id) {
- delete postData.query["id"];
- }
+ const postData = buildQuery();
const listData = (await request(url, postData, { method })).data;
const items = listData.items;
if (tableSchema.value.isTree) {
@@ -462,8 +469,7 @@ export default {
const click = async (item, rows) => {
editFormloading.value = true;
editFormMode.value = item.path ?? item;
- context.emit("command", item, rows);
- if (item.path === "index") {
+ if (item.path === "query") {
//list
await load();
} else if (item.path === "details") {
@@ -485,13 +491,39 @@ export default {
editFormTitle.value = `${t(item.path)}${config.edit.schema.title}`;
dialogVisible.value = true;
} else if (item.path === "delete") {
+ if (!rows.length) {
+ return;
+ }
//delete
+ const url = format(config.edit.deleteUrl, rows[0].id);
if (item.meta.isTop) {
// 批量删除
- return;
+ try {
+ await ElMessageBox.confirm("删除", "提示", {
+ type: "warning",
+ message: format("确认删除选中的%s行数据吗?", rows.length),
+ });
+ const response = await request(
+ url,
+ rows.map((o) => o.id),
+ { method: config.edit.deleteMethod }
+ );
+ if (!response.errors) {
+ ElMessage({
+ type: "info",
+ message: "操作完毕",
+ });
+ }
+ } catch (error) {
+ if (error === "cancel") {
+ ElMessage({
+ type: "info",
+ message: "删除取消",
+ });
+ }
+ }
} else {
// 单个删除
- const url = format(config.edit.deleteUrl, rows[0].id);
try {
await ElMessageBox.confirm("删除", "提示", {
type: "warning",
@@ -511,7 +543,6 @@ export default {
}
}
}
- const url = `${baseUrl}/${item.path}`;
// await post(
// url,
// rows.map((o) => o.id)
@@ -519,17 +550,47 @@ export default {
await load();
} else if (item.path === "export") {
//export
- editFormTitle.value = `${t(item.path)}${querySchema.value?.title}`;
- dialogVisible.value = true;
+ if ((item.pattern = "paged")) {
+ const url = config.edit.exportUrl;
+ const method = config.edit.exportMethod;
+ const postData = buildQuery();
+ const response = await request(url, postData, { method });
+ if (!response.errors) {
+ window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
+ }
+ } else {
+ editFormTitle.value = `${t(item.path)}${querySchema.value?.title}`;
+ dialogVisible.value = true;
+ }
} else if (item.path === "import") {
//import
- const url = `${baseUrl}/${item.path}`;
- editFormTitle.value = `${t(item.path)}${querySchema.value?.title}`;
- fileList.value = [];
- dialogVisible.value = true;
+ try {
+ editFormloading.value = true;
+ editFormTitle.value = `${t(item.path)}${config.query.schema.title}`;
+ fileList.value = [];
+ dialogVisible.value = true;
+ versions.value = (
+ await request("settleaccount/centralized-control/get-all", null, { method: "POST" })
+ ).data.items.map((o) => ({
+ value: o.version,
+ label: o.version,
+ }));
+ factories.value = (
+ await request("settleaccount/code-setting/get-all", null, { method: "POST" })
+ ).data.items.map((o) => ({
+ value: o.project,
+ label: o.project,
+ }));
+ } catch (e) {
+ console.log(e);
+ } finally {
+ editFormloading.value = false;
+ }
} else if (item === "filter") {
editFormTitle.value = t("自定义查询");
dialogVisible.value = true;
+ } else {
+ context.emit("command", item, rows, load);
}
editFormloading.value = false;
};
@@ -545,10 +606,10 @@ export default {
url = format(url, editFormModel.value.id);
}
const method = editFormMode.value === "create" ? config.edit.createMethod : config.edit.updateMethod;
- const result = await request(url, editFormModel.value, { method });
- if (result.errors) {
- model.errors = result.errors; //??
- } else {
+ const response = await request(url, editFormModel.value, { method });
+ if (!response.errors) {
+ ElMessageBox.alert(`错误:${response.errors?.error?.message}`, `代码:${response.errors?.error?.code}`);
+ //model.errors = response.errors; //??
await load();
editFormMode.value = null;
dialogVisible.value = false;
@@ -564,7 +625,7 @@ export default {
editFormMode.value = null;
} else if (editFormMode.value === "export") {
const postData = JSON.parse(JSON.stringify(queryModel.value));
- postData.filters = queryList.value.filter((o) => o.property && o.value);
+ postData.filters = filterList.value.filter((o) => o.property && o.value);
delete postData.query["items"];
delete postData.query["id"];
const url = `${baseUrl}/${editFormMode.value}?${qs.stringify(exportModel)}`;
@@ -573,13 +634,14 @@ export default {
dialogVisible.value = false;
} else if (editFormMode.value === "import") {
editFormloading.value = true;
- const url = `${baseUrl}/${editFormMode.value}`;
+ const url = config.edit.importUrl;
const formData = new FormData();
- formData.append("partial", importModel.partial);
- formData.append("replace", importModel.replace);
- formData.append("file", fileList.value[0]?.raw);
- console.log(uploadRef.value);
- const response = await post(url, formData);
+ formData.append("version", importModel.version);
+ formData.append("factory", importModel.factory);
+ for (let i = 0; i < fileList.value.length; i++) {
+ formData.append(`files`, fileList.value[i].raw);
+ }
+ await post(url, formData);
editFormloading.value = false;
dialogVisible.value = false;
await load();
@@ -610,17 +672,8 @@ export default {
subDrawer.value = true;
}
};
- const pushQueryList = () => {
- queryList.value.push({
- property: "",
- operator: "{0}=@0",
- value: "",
- logic: "and",
- });
- };
- const download = (response) => {
- const downloadUrl = window.URL.createObjectURL(response.data);
- const filename = response.filename;
+ const download = (url, filename) => {
+ const downloadUrl = window.URL.createObjectURL(url);
let link = document.createElement("a");
link.href = downloadUrl;
link.download = filename;
@@ -630,7 +683,7 @@ export default {
const getImportTemplate = async () => {
const url = `${baseUrl}/${editFormMode.value}`;
const response = await get(url);
- download(response);
+ download(url, response.filename);
};
const handleChange = (uploadFile, uploadFiles) => {
fileList.value = uploadFiles;
@@ -642,6 +695,87 @@ export default {
}
return false;
};
+ const pushfilterList = () => {
+ filterList.value.push({
+ logic: "and",
+ column: "",
+ action: "equal",
+ value: null,
+ });
+ };
+ const logic = [
+ { value: "and", label: "且" },
+ { value: "or", label: "或" },
+ ];
+ const operators = [
+ {
+ value: "equal",
+ label: "等于",
+ },
+ {
+ value: "notEqual",
+ label: "不等于",
+ },
+ {
+ value: "biggerThan",
+ label: "大于",
+ },
+ {
+ value: "smallThan",
+ label: "小于",
+ },
+ {
+ value: "biggerThanOrEqual",
+ label: "大于等于",
+ },
+ {
+ value: "smallThanOrEqual",
+ label: "小于等于",
+ },
+ {
+ value: "like",
+ label: "类似于",
+ },
+ {
+ value: "notLike",
+ label: "不类似于",
+ },
+ {
+ value: "in",
+ label: "包含于",
+ },
+ {
+ value: "notIn",
+ label: "不包含于",
+ },
+ ];
+ const getOperators = (schema) => {
+ const values = ["equal", "notEqual"];
+ if (schema.type === "string") {
+ values.push("like", "notLike");
+ if (schema.input && ["year", "month", "date", "datetime"].includes(schema.input)) {
+ values.push("biggerThan", "smallThan", "biggerThanOrEqual", "smallThanOrEqual");
+ }
+ } else if (schema.type === "boolean") {
+ } else {
+ values.push("biggerThan", "smallThan", "biggerThanOrEqual", "smallThanOrEqual");
+ }
+ return operators.filter((o) => values.includes(o.value));
+ };
+ function buildQuery() {
+ queryModel.value.maxResultCount = pageModel.pageSize;
+ queryModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
+ //
+ const postData = JSON.parse(JSON.stringify(queryModel.value));
+ postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false));
+ if (postData.items) {
+ delete postData["items"];
+ }
+ if (postData.query?.id) {
+ delete postData.query["id"];
+ }
+ return postData;
+ }
onMounted(async () => {
if (route.meta.children?.length) {
for (const item of route.meta.children) {
@@ -650,7 +784,11 @@ export default {
}
}
}
- pushQueryList();
+ //
+ queryModel.value = schemaToModel(config.query.schema);
+ getSortModel(queryModel.value);
+ filterList.value = queryModel.value?.filters ?? [];
+ //pushfilterList();
// if (!querySchema.value) {
// const vm = (await get(indexUrl)).data;
// querySchema.value = vm.schema.properties.query;
@@ -662,9 +800,6 @@ export default {
// getSortModel(data.value);
// getColumns(vm.schema.properties.query);
// }
- if (!config) {
- //
- }
getColumns(config.table.schema);
if (props.query) {
Object.assign(queryModel.value.query, props.query);
@@ -673,7 +808,9 @@ export default {
// getColumns(vm.schema.properties.query);
await load();
});
+ context.expose({ load });
return {
+ load,
config,
queryModel,
pageModel,
@@ -689,7 +826,7 @@ export default {
dialogVisible,
selectedRows,
querySchema,
- queryList,
+ filterList,
tableSchema,
buttons,
tableData,
@@ -713,10 +850,13 @@ export default {
submit,
showList,
subListQuery,
- pushQueryList,
fileList,
handleChange,
getButtonDisabled,
+ factories,
+ versions,
+ pushfilterList,
+ getOperators,
};
},
};
diff --git a/code/WebApp/vanilla/models/centralized-control.js b/code/WebApp/vanilla/models/centralized-control.js
new file mode 100644
index 00000000..5e6a6dd2
--- /dev/null
+++ b/code/WebApp/vanilla/models/centralized-control.js
@@ -0,0 +1,137 @@
+const schema = {
+ title: "期间设置",
+ type: "object",
+ properties: {
+ year: {
+ title: "年度",
+ type: "string",
+ hidden: true,
+ showForList: true,
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ period: {
+ title: "期间",
+ type: "string",
+ hidden: true,
+ showForList: true,
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ version: {
+ title: "版本",
+ type: "string",
+ input: "month",
+ format: "YYYYMM",
+ showForList: true,
+ watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
+ rules: [
+ {
+ required: true,
+ trigger: "blur",
+ },
+ ],
+ },
+ state: {
+ title: "状态",
+ type: "boolean",
+ showForList: true,
+ default: true,
+ rules: [
+ {
+ required: true,
+ },
+ ],
+ },
+ },
+};
+
+const baseUrl = "settleaccount/centralized-control";
+const queryUrl = `${baseUrl}/get-list`;
+const detailsUrl = `${baseUrl}/get/%s`;
+const createUrl = `${baseUrl}/create`;
+const updateUrl = `${baseUrl}/update/%s`;
+const deleteUrl = `${baseUrl}/delete-list`;
+const queryMethod = "POST";
+const detailsMethod = "POST";
+const createMethod = "POST";
+const updateMethod = "POST";
+const deleteMethod = "POST";
+
+export default function () {
+ return {
+ baseUrl,
+ query: {
+ url: queryUrl,
+ method: queryMethod,
+ hasFilter: true,
+ schema: {
+ title: "通用代码",
+ type: "object",
+ properties: {
+ filters: {
+ type: "array",
+ hidden: true,
+ items: {
+ type: "object",
+ properties: {
+ logic: {
+ type: "int",
+ },
+ column: {
+ type: "string",
+ },
+ action: {
+ type: "int",
+ },
+ value: {
+ type: "string",
+ },
+ },
+ },
+ default: [
+ {
+ logic: "and",
+ column: "year",
+ action: "like",
+ value: null,
+ readOnly: true,
+ },
+ ],
+ },
+ skipCount: {
+ hidden: true,
+ default: 0,
+ },
+ maxResultCount: {
+ hidden: true,
+ default: 10,
+ },
+ sorting: {
+ hidden: true,
+ },
+ },
+ },
+ },
+ table: {
+ schema: schema,
+ },
+ edit: {
+ detailsUrl,
+ createUrl,
+ updateUrl,
+ deleteUrl,
+ detailsMethod,
+ createMethod,
+ updateMethod,
+ deleteMethod,
+ schema: schema,
+ },
+ };
+}
diff --git a/code/WebApp/vanilla/models/code-setting.js b/code/WebApp/vanilla/models/code-setting.js
index 1951c934..a6375733 100644
--- a/code/WebApp/vanilla/models/code-setting.js
+++ b/code/WebApp/vanilla/models/code-setting.js
@@ -27,11 +27,13 @@ const schema = {
description: {
title: "描述",
type: "string",
+ input: "textarea",
showForList: true,
rules: [
{
required: true,
},
+ { max: 60 },
],
},
},
@@ -39,37 +41,34 @@ const schema = {
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
-const detailsUrl = `${baseUrl}/GET/%s`;
-const createUrl = `${baseUrl}/Create`;
-const updateUrl = `${baseUrl}/Update/%s`;
-const deleteUrl = `${baseUrl}/DeleteList`;
+const detailsUrl = `${baseUrl}/get/%s`;
+const createUrl = `${baseUrl}/create`;
+const updateUrl = `${baseUrl}/update/%s`;
+const deleteUrl = `${baseUrl}/delete-list`;
+const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
+const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
+const importMethod = "POST";
+const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
+ hasFilter: true,
schema: {
title: "通用代码",
type: "object",
properties: {
- project: {
- type: "string",
- },
- value: {
- type: "string",
- },
- description: {
- type: "string",
- },
filters: {
title: "项目",
type: "array",
+ hidden: true,
items: {
type: "object",
properties: {
@@ -87,6 +86,15 @@ export default function () {
},
},
},
+ default: [
+ {
+ logic: "and",
+ column: "project",
+ action: "like",
+ value: null,
+ readOnly: true,
+ },
+ ],
},
skipCount: {
hidden: true,
@@ -110,10 +118,14 @@ export default function () {
createUrl,
updateUrl,
deleteUrl,
+ importUrl,
+ exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
+ importMethod,
+ exportMethod,
schema: schema,
},
};
diff --git a/code/WebApp/vanilla/request/index.js b/code/WebApp/vanilla/request/index.js
index dc9e51e3..a3e4efa6 100644
--- a/code/WebApp/vanilla/request/index.js
+++ b/code/WebApp/vanilla/request/index.js
@@ -3,6 +3,7 @@ import { isLogin } from "../api/user.js";
import { useAppStore } from "../store/index.js";
import { getFileName } from "../utils/index.js";
import settings from "../config/settings.js";
+import { ElMessageBox } from "element-plus";
// const requestSettings = {
// baseURL: "/api",
@@ -47,16 +48,21 @@ const getResult = async (response) => {
status: response.status,
message: messages.get(response.status),
};
- if (response.status == 200) {
+ if (response.status === 200 || response.status === 204) {
const contentType = response.headers.get("Content-Type");
if (contentType.indexOf("application/json") > -1) {
result.data = await response.json();
+ } else if (contentType.indexOf("text/plain") > -1) {
+ result.data = await response.text();
} else if (contentType === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") {
result.data = await response.blob();
result.filename = getFileName(response.headers.get("Content-Disposition"));
}
- } else if (response.status === 400 || response.status === 500) {
+ } /*if (response.status === 400 || response.status === 500) */ else {
result.errors = await response.json();
+ if (result.errors) {
+ ElMessageBox.alert(`错误:${result.errors?.error?.message}`, `代码:${result.errors?.error?.code}`);
+ }
}
return result;
};
@@ -141,4 +147,4 @@ async function request(url, data, options, withoutToken = false) {
}
export default request;
-export { get, post };
+export { get, post, getUrl };
diff --git a/code/WebApp/vanilla/router/routes.js b/code/WebApp/vanilla/router/routes.js
index 3ed7a755..6a2777dc 100644
--- a/code/WebApp/vanilla/router/routes.js
+++ b/code/WebApp/vanilla/router/routes.js
@@ -25,6 +25,15 @@ export default [
permission: "AbpIdentity.Users",
},
children: [
+ {
+ path: "query",
+ meta: {
+ type: "button",
+ title: "查询",
+ icon: "file",
+ isTop: true,
+ },
+ },
{
path: "create",
meta: {
@@ -109,12 +118,115 @@ export default [
// },
// ],
// },
+ {
+ path: "centralized-control",
+ meta: {
+ type: "page",
+ title: "期间设置",
+ icon: "file",
+ children: [
+ {
+ path: "query",
+ meta: {
+ type: "button",
+ title: "查询",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "create",
+ meta: {
+ type: "button",
+ title: "新建",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "open-version",
+ meta: {
+ type: "button",
+ title: "启用",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "closed-version",
+ meta: {
+ type: "button",
+ title: "停用",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "delete",
+ meta: {
+ type: "button",
+ title: "删除",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ ],
+ },
+ },
{
path: "code-setting",
meta: {
type: "page",
title: "通用代码",
icon: "file",
+ children: [
+ {
+ path: "query",
+ meta: {
+ type: "button",
+ title: "查询",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "create",
+ meta: {
+ type: "button",
+ title: "新建",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "delete",
+ meta: {
+ type: "button",
+ title: "删除",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "import",
+ meta: {
+ type: "button",
+ title: "导入",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "export",
+ meta: {
+ type: "button",
+ title: "导出",
+ icon: "file",
+ isTop: true,
+ pattern: "paged",
+ },
+ },
+ ],
},
},
],
diff --git a/code/WebApp/vanilla/views/base-data/centralized-control.js b/code/WebApp/vanilla/views/base-data/centralized-control.js
new file mode 100644
index 00000000..d96b18c0
--- /dev/null
+++ b/code/WebApp/vanilla/views/base-data/centralized-control.js
@@ -0,0 +1,27 @@
+import html from "html";
+import { ref } from "vue";
+import request from "../../request/index.js";
+import AppList from "../../components/list/index.js";
+import useConfig from "../../models/centralized-control.js";
+
+export default {
+ components: { AppList },
+ template: html``,
+ setup(props, context) {
+ const listRef = ref(null);
+ const config = useConfig();
+ const onCommand = async (item, rows, load) => {
+ if (item.path === "open-version" || item.path === "closed-version") {
+ const url = `${config.baseUrl}/${item.path}`;
+ await request(
+ url,
+ rows.map((o) => o.id),
+ { method: "POST" }
+ );
+ console.log(context);
+ await load();
+ }
+ };
+ return { config, onCommand };
+ },
+};
diff --git a/code/WebApp/vanilla/views/base-data/code-setting.js b/code/WebApp/vanilla/views/base-data/code-setting.js
index bab632ca..d69aaabe 100644
--- a/code/WebApp/vanilla/views/base-data/code-setting.js
+++ b/code/WebApp/vanilla/views/base-data/code-setting.js
@@ -1,27 +1,14 @@
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``,
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 };
},
diff --git a/code/WebApp/vanilla/views/login.js b/code/WebApp/vanilla/views/login.js
index 0f1c2a05..a8d3c28a 100644
--- a/code/WebApp/vanilla/views/login.js
+++ b/code/WebApp/vanilla/views/login.js
@@ -20,7 +20,9 @@ export default {
- {{$t('login')}}
+
+ {{$t('login')}}
+
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
index b94369b9..269d3996 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
@@ -65,7 +65,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
- public class INVOICE_GRP_EXPORT_DTO
+ public class INVOICE_GRP_EXP_DTO
{
@@ -133,7 +133,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public decimal TaxAmt { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
-
+ [Display(Name = "发票号")]
+ public string InvbillNum { get; set; }
+
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
index bef825a5..4b420034 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
@@ -89,7 +89,7 @@ namespace Win.Sfs.SettleAccount.Bases
IExporter _excel = new ExcelExporter();
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
- var dtoDetails = ObjectMapper.Map, List>(entities);
+ var dtoDetails = ObjectMapper.Map, List>(entities);
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
index 925adfe5..e7ed0eca 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
@@ -115,6 +115,10 @@ namespace Win.Sfs.SettleAccount.Bases
return new PagedResultDto(totalCount, dtos);
}
+
+
+
+
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
index 0b14e526..c3e12303 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
@@ -88,7 +88,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
IExporter _excel = new ExcelExporter();
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
- var dtoDetails = ObjectMapper.Map, List>(entities);
+ var dtoDetails = ObjectMapper.Map, List>(entities);
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
index ef9458f1..0f056a6f 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
@@ -63,6 +63,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
private readonly ISettleAccountBranchEfCoreRepository _preBatchRepository;
+
+
private readonly ISettleAccountBranchEfCoreRepository _repository;
private readonly ISettleAccountBranchEfCoreRepository _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository _fisRepository;
@@ -575,4 +577,4 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
-}
\ No newline at end of file
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index cc892c5a..05b4780c 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -145,10 +145,163 @@ namespace Win.Sfs.SettleAccount
CreateMapPUB_SE_DETAIL();
CreateMapPUB_SA();
+
+ CreateMapBBAC_CAN_SA();
+
+
+ CreateMapBBAC_CAN_SA_DETAIL();
+
+
+ CreateMapBBAC_NOT_SA_DETAIL();
+
+
+ CreateMapHBPO_CAN_SA();
+
+
+ CreateMapHBPO_CAN_SA_DETAIL();
+
+
+ CreateMapHBPO_NOT_SA_DETAIL();
+
+
+ CreateMapINVOICE_GRP();
+
+
+ CreateMapINVOICE_MAP_GROUP();
+
+
+ CreateMapINVOICE_NOT_SETTLE();
+
+
+ CreateMapINVOICE_WAIT_DETAIL();
+
+
+ CreateMapPUB_CAN_SA();
+
+
+ CreateMapPUB_CAN_SA_DETAIL();
+
+
+ CreateMapPUB_NOT_SA_DETAIL();
+
+
+
+
+
+
+
+
+
}
#region BQ
-
+
+
+ ///
+ /// BBAC可结算
+ ///
+
+ private void CreateMapBBAC_CAN_SA()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ }
+ private void CreateMapBBAC_CAN_SA_DETAIL()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapBBAC_NOT_SA_DETAIL()
+
+ {
+
+ CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapHBPO_CAN_SA()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ }
+ private void CreateMapHBPO_CAN_SA_DETAIL()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapHBPO_NOT_SA_DETAIL()
+
+ {
+
+ CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapINVOICE_GRP()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapINVOICE_MAP_GROUP()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapINVOICE_NOT_SETTLE()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ }
+ private void CreateMapINVOICE_WAIT_DETAIL()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ }
+ private void CreateMapPUB_CAN_SA()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ }
+ private void CreateMapPUB_CAN_SA_DETAIL()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
+ }
+ private void CreateMapPUB_NOT_SA_DETAIL()
+
+ {
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
+ }
+
+
+
+
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
index f4eaf225..8c0eeb03 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
@@ -1,10 +1,13 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities.Auditing;
+using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.SettleAccountDomain;
using static System.Runtime.CompilerServices.RuntimeHelpers;
@@ -33,7 +36,36 @@ namespace SettleAccount.Bases
public decimal Qty { set; get; }
}
- public interface ISA_BASE : ISBASE
+
+
+ public class SA_CAN_BASE_MAIN : FullAuditedAggregateRoot
+ {
+
+ [Display(Name = "期间")]
+ public int Version { get; set; }
+
+ [Display(Name = "结算单据")]
+ public string BillNum { get; set; } = null!;
+ [Display(Name = "关联结算单号")]
+ public string SettleBillNum { get; set; } = null!;
+
+ ///
+ /// 1、新建 2、已有出库3、已有扣减寄售库
+ ///
+ [Display(Name = "状态")]
+ public SettleBillState State { get; set; }
+
+ ///
+ /// 明细记录行数
+ ///
+ [Display(Name = "发票分组号")]
+ public string InvGroupNum { get; set; } = null!;
+
+ }
+
+
+
+ public interface ISA_BASE : ISBASE
{
///
/// 期间
@@ -238,6 +270,9 @@ namespace SettleAccount.Bases
}
}
+
+
+
public class SA_BASE : FullAuditedAggregateRoot, ISA_BASE
{
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/OrderNumberGenerator.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/OrderNumberGenerator.cs
similarity index 100%
rename from code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/OrderNumberGenerator.cs
rename to code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/OrderNumberGenerator.cs
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
index 17a8ad94..0f19e727 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
@@ -6,35 +6,28 @@ using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "BBAC可结算导入")]
-public class BBAC_CAN_SA:FullAuditedAggregateRoot
+public class BBAC_CAN_SA : SA_CAN_BASE_MAIN
{
- [Display(Name = "期间")]
- public int Version { get; set; }
-
- [Display(Name = "结算单据")]
- public string BillNum { get; set; } = null!;
- [Display(Name = "关联结算单号")]
- public string SettleBillNum { get; set; } = null!;
-
- ///
- /// 1、新建 2、已有出库3、已有扣减寄售库
- ///
- [Display(Name = "状态")]
- public SettleBillState State { get; set; }
+ //[Display(Name = "期间")]
+ //public int Version { get; set; }
- ///
- /// 明细记录行数
- ///
- [Display(Name = "明细记录行数")]
- public string InvGroupNum { get; set; } = null!;
+ //[Display(Name = "结算单据")]
+ //public string BillNum { get; set; } = null!;
+ //[Display(Name = "关联结算单号")]
+ //public string SettleBillNum { get; set; } = null!;
- ///
- /// 工厂地点
- ///
- [Display(Name = "工厂地点")]
- public string Site { get; set; } = null!;
+ /////
+ ///// 1、新建 2、已有出库3、已有扣减寄售库
+ /////
+ //[Display(Name = "状态")]
+ //public SettleBillState State { get; set; }
+ /////
+ ///// 明细记录行数
+ /////
+ //[Display(Name = "发票分组号")]
+ //public string InvGroupNum { get; set; } = null!;
public BBAC_CAN_SA()
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
index cb38b70e..6895afcc 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
@@ -6,27 +6,27 @@ using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "HBPO可结算导入")]
-public class HBPO_CAN_SA :FullAuditedAggregateRoot
+public class HBPO_CAN_SA : SA_CAN_BASE_MAIN
{
- [Display(Name = "期间")]
- public int Version { get; set; }
- [Display(Name = "关联结算单号")]
- public string SettleBillNum { get; set; } = null!;
- [Display(Name = "结算单据")]
+ //[Display(Name = "期间")]
+ //public int Version { get; set; }
+ //[Display(Name = "关联结算单号")]
+ //public string SettleBillNum { get; set; } = null!;
+ //[Display(Name = "结算单据")]
- public string BillNum { get; set; } = null!;
+ //public string BillNum { get; set; } = null!;
- ///
- /// 1、新建 2、已有出库3、已有扣减寄售库
- ///
- [Display(Name = "状态")]
- public SettleBillState State { get; set; }
+ /////
+ ///// 1、新建 2、已有出库3、已有扣减寄售库
+ /////
+ //[Display(Name = "状态")]
+ //public SettleBillState State { get; set; }
- ///
- /// 明细记录行数
- ///
- [Display(Name = "明细记录行数")]
- public string InvGroupNum { get; set; } = null!;
+ /////
+ ///// 明细记录行数
+ /////
+ //[Display(Name = "明细记录行数")]
+ //public string InvGroupNum { get; set; } = null!;
///
/// 工厂地点
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
index 6ae8fed8..58c1ff96 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
@@ -6,30 +6,30 @@ using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "PUB可结算导入")]
-public class PUB_CAN_SA :FullAuditedAggregateRoot
+public class PUB_CAN_SA : SA_CAN_BASE_MAIN
{
- [Display(Name = "期间")]
- public int Version { get; set; }
+ //[Display(Name = "期间")]
+ //public int Version { get; set; }
- [Display(Name = "关联结算单号")]
- public string SettleBillNum { get; set; } = null!;
+ //[Display(Name = "关联结算单号")]
+ //public string SettleBillNum { get; set; } = null!;
- [Display(Name = "结算单据")]
- public string BillNum { get; set; } = null!;
+ //[Display(Name = "结算单据")]
+ //public string BillNum { get; set; } = null!;
- ///
- /// 1、新建 2、已有出库3、已有扣减寄售库
- ///
- [Display(Name = "状态")]
- public SettleBillState State { get; set; }
- ///
- /// 1、JIT 2、买单件 3、备件 3、印度件
- ///
+ /////
+ ///// 1、新建 2、已有出库3、已有扣减寄售库
+ /////
+ //[Display(Name = "状态")]
+ //public SettleBillState State { get; set; }
+ /////
+ ///// 1、JIT 2、买单件 3、备件 3、印度件
+ /////
[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; }
- [Display(Name = "明细记录行数")]
- public string InvGroupNum { get; set; } = null!;
+ //[Display(Name = "明细记录行数")]
+ //public string InvGroupNum { get; set; } = null!;
public PUB_CAN_SA(int version, string settleBillNum, string billNum, SettleBillState state, EnumBusinessType businessType, string invGroupNum)
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/CAN_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/CAN_SA_MNG.cs
new file mode 100644
index 00000000..c2dd1f15
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/CAN_SA_MNG.cs
@@ -0,0 +1,97 @@
+using Hangfire.Annotations;
+using SettleAccount.Bases;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Domain.Entities;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.Guids;
+using Volo.Abp.ObjectMapping;
+using Win.Sfs.SettleAccount.Bases.DomainServices;
+using Win.Sfs.SettleAccount.Boms;
+using Win.Sfs.SettleAccount.Entities.Materials;
+using Win.Sfs.SettleAccount.MaterialRelationships;
+using Win.Sfs.Shared.RepositoryBase;
+
+namespace Win.Sfs.SettleAccount.Entities.Managers
+{
+ public class CAN_SA_MNG : DomainService
+ where TEntity : SA_CAN_BASE_MAIN
+ where TEntityDetail : SA_CAN_BASE
+ {
+ private readonly INormalEfCoreRepository _repository;
+ private readonly INormalEfCoreRepository _detailRepository;
+ public CAN_SA_MNG
+ (
+ INormalEfCoreRepository repository,
+ INormalEfCoreRepository detailRepository
+ )
+ {
+ _repository= repository;
+ _detailRepository= detailRepository;
+ }
+ public virtual async Task SetState(TEntity p_entiy,SettleBillState state)
+ {
+ switch (p_entiy.State)
+ {
+ case SettleBillState.财务已审核:
+ if (state == SettleBillState.商务已审核)
+ {
+ p_entiy.State = state;
+ }
+ else
+ {
+ throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态");
+ }
+ break;
+ case SettleBillState.商务已审核:
+ if (state == SettleBillState.已开票)
+ {
+ p_entiy.State = state;
+ }
+ else
+ {
+ throw new BusinessException("8989", "当前状态不是【已开票】状态,无法设置成【商务已审核】");
+ }
+ break;
+ case SettleBillState.已开票:
+ if (state == SettleBillState.未结状态)
+ {
+ p_entiy.State = state;
+ }
+ else
+ {
+ throw new BusinessException("8989", "当前状态不是【未结状态】状态,无法设置成【已开票】");
+ }
+ break;
+ case SettleBillState.已扣减:
+ if (state == SettleBillState.财务已审核)
+ {
+ p_entiy.State = state;
+ }
+ else
+ {
+ throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态");
+ }
+ break;
+ }
+ await _repository.UpdateAsync(p_entiy);
+ return true;
+ }
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/NOT_SA_MNG.cs
new file mode 100644
index 00000000..5b37ce06
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Managers/NOT_SA_MNG.cs
@@ -0,0 +1,42 @@
+using SettleAccount.Bases;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Services;
+using Volo.Abp;
+using Win.Sfs.Shared.RepositoryBase;
+
+namespace Win.Sfs.SettleAccount.Entities.Managers
+{
+ ///
+ /// 不能結算管理
+ ///
+ ///
+ ///
+ ///
+ public class NOT_SA_MNG : DomainService
+ where TEntity : SA_CAN_BASE_MAIN
+ where TEntityDetail : SA_CAN_BASE
+ where TNOTDetail:SA_NOT_BASE
+ {
+ private readonly INormalEfCoreRepository _repository;
+ private readonly INormalEfCoreRepository _detailRepository;
+ public NOT_SA_MNG
+ (
+ INormalEfCoreRepository repository,
+ INormalEfCoreRepository detailRepository
+ )
+ {
+ _repository = repository;
+ _detailRepository = detailRepository;
+ }
+ public virtual async Task GenerateSettlementOrder(List p_list)
+ {
+ return true;
+ }
+
+
+ }
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountEfCoreRepository.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountEfCoreRepository.cs
index 6a3edbcf..4256a044 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountEfCoreRepository.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountEfCoreRepository.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Linq.Dynamic.Core;
using System.Linq.Expressions;
using System.Text;
using System.Threading;
@@ -92,45 +93,46 @@ namespace Win.Sfs.SettleAccount.Repository
protected static IQueryable GetSortingQueryable(IQueryable entities, string sorting)
{
- if (string.IsNullOrEmpty(sorting))
- {
- entities = entities.OrderByDescending("Id");
- }
- else
- {
+ return string.IsNullOrEmpty(sorting)?entities:DynamicQueryableExtensions.OrderBy(entities, sorting);
+ //if (string.IsNullOrEmpty(sorting))
+ //{
+ // entities = entities.OrderByDescending("Id");
+ //}
+ //else
+ //{
- var sortParams = sorting?.Split(' ');
- var sortName = sortParams[0];
+ // var sortParams = sorting?.Split(' ');
+ // var sortName = sortParams[0];
- Type t = typeof(TEntity);
- var _first=t.GetProperties().Where(p => p.Name.ToUpper() == sortName.ToUpper()).FirstOrDefault();
- if (_first != null)
- {
- sortName = _first.Name;
- }
+ // Type t = typeof(TEntity);
+ // var _first=t.GetProperties().Where(p => p.Name.ToUpper() == sortName.ToUpper()).FirstOrDefault();
+ // if (_first != null)
+ // {
+ // sortName = _first.Name;
+ // }
- bool isDesc;
- if (sortParams.Length > 1)
- {
- var sortDirection = sortParams[1];
- isDesc = sortDirection.ToUpper().Contains("DESC")?true:false;
- }
- else
- {
- isDesc = true;
- }
+ // bool isDesc;
+ // if (sortParams.Length > 1)
+ // {
+ // var sortDirection = sortParams[1];
+ // isDesc = sortDirection.ToUpper().Contains("DESC")?true:false;
+ // }
+ // else
+ // {
+ // isDesc = true;
+ // }
- entities = isDesc ? entities.OrderByDescending(sortName) : entities.OrderBy(sortName);
- }
+ // entities = isDesc ? entities.OrderByDescending(sortName) : entities.OrderBy(sortName);
+ //}
- return entities;
+ //return entities;
}
diff --git a/docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs b/docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs
index 09ed0584..d6a385e9 100644
--- a/docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs
+++ b/docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs
@@ -151,8 +151,8 @@ public class IdentityDbSeed : IDbSeed
context.Set().Add(new HBPO_SA { Version = "测试数据", BillNum = "456", DNBillNum = "测试数据", State = "测试数据", RecordCount = "测试数据" });
context.Set().Add(new HBPO_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据" });
context.Set().Add(new HBPO_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据" });
- context.Set().Add(new BBAC_SA { Version = "测试数据", BillNum = "123", DNBillNum = "测试数据", State = "测试数据", RecordCount = "测试数据" });
- context.Set().Add(new BBAC_SA { Version = "测试数据", BillNum = "456", DNBillNum = "测试数据", State = "测试数据", RecordCount = "测试数据" });
+ context.Set().Add(new BBAC_SA { Version = "测试数据", BillNum = "123", State = "测试数据", RecordCount = "测试数据" });
+ context.Set().Add(new BBAC_SA { Version = "测试数据", BillNum = "456", State = "测试数据", RecordCount = "测试数据" });
context.Set().Add(new BBAC_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set().Add(new BBAC_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set().Add(new HBPO_CAN_SA { SettleBillNum = "测试数据", Version = "测试数据", BillNum = "123", State = "测试数据", InvGroupNum = "测试数据" });
@@ -161,8 +161,8 @@ public class IdentityDbSeed : IDbSeed
context.Set().Add(new HBPO_CAN_SA_DETAIL { SettleBillNum = "测试数据", InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据" });
context.Set().Add(new BBAC_CAN_SA { SettleBillNum = "测试数据", Version = "测试数据", BillNum = "123", State = "测试数据", InvGroupNum = "测试数据" });
context.Set().Add(new BBAC_CAN_SA { SettleBillNum = "测试数据", Version = "测试数据", BillNum = "456", State = "测试数据", InvGroupNum = "测试数据" });
- context.Set().Add(new BBAC_CAN_SA_DETAIL { SettleBillNum = "测试数据", InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
- context.Set().Add(new BBAC_CAN_SA_DETAIL { SettleBillNum = "测试数据", InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
+ context.Set().Add(new BBAC_CAN_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
+ context.Set().Add(new BBAC_CAN_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set().Add(new INVOICE_GRP { Version = "测试数据", RealnvBillNum = "测试数据", InvbillNum = "123", InvGroupNum = "分组号测试数据一", FileName = "测试数据", BusinessType = "测试数据" });
context.Set().Add(new INVOICE_GRP { Version = "测试数据", RealnvBillNum = "测试数据", InvbillNum = "456", InvGroupNum = "分组号测试数据二", FileName = "测试数据", BusinessType = "测试数据" });
context.Set().Add(new INVOICE_WAIT_DETAIL { InvbillNum = "待开票明细123", InvGroupNum = "待开票明细分组号测试数据一", Version = "测试数据", LU = "测试数据", BussiessType = "测试数据", Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", Extend4 = "测试数据" });
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_CAN_SA.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_CAN_SA.cs
index 1d26e962..4b2e4138 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_CAN_SA.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_CAN_SA.cs
@@ -53,8 +53,8 @@ public class BBAC_CAN_SA_DETAIL : BaseEntity
///
[Display(Name = "结算单号")]
public string BillNum { get; set; } = null!;
- [Display(Name = "关联结算单号")]
- public string SettleBillNum { get; set; } = null!;
+ //[Display(Name = "关联结算单号")]
+ //public string SettleBillNum { get; set; } = null!;
///
/// 对应字段Material
///
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SA.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SA.cs
index 0ea044d6..7f3aba68 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SA.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SA.cs
@@ -18,8 +18,8 @@ public class BBAC_SA : BaseEntity
[OneToMany]
public string BillNum { get; set; } = null!;
- [Display(Name = "出库单号")]
- public string DNBillNum { get; set; } = null!;
+ //[Display(Name = "出库单号")]
+ //public string DNBillNum { get; set; } = null!;
///
/// 1、新建 2、已有出库3、已有扣减寄售库
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_SA_REPORT.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_SA_REPORT.cs
index 96746d9d..0080be5d 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_SA_REPORT.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_SA_REPORT.cs
@@ -1,15 +1,16 @@
using System.ComponentModel.DataAnnotations;
-using WTA.Application.Identity.Entities.SystemManagement.Attribute;
using WTA.Shared.Attributes;
using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement;
+
[Hidden]
[Display(Name = "BBAC发运数据与结算数据对比实体")]
public class BBAC_SE_SA_REPORT : BaseEntity
{
[Display(Name = "LU+ASN单号")]
public string KeyCode { get; set; } = null!;
+
///
/// 有结算无发货(无EDI数据)
///有结算无发货(有EDI数据)
@@ -26,39 +27,55 @@ public class BBAC_SE_SA_REPORT : BaseEntity
[Display(Name = "Wms发货单号")]
public string WmsBillNum { get; set; } = null!;
+
[Display(Name = "发货时间")]
public DateTime ShippingDate { get; set; }
+
[Display(Name = "生产码")]
public string PN { get; set; } = null!;
+
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; } = null!;
+
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; } = null!;
+
[Display(Name = "物料号")]
public string MaterialNumber { get; set; } = null!;
+
[Display(Name = "物料描述")]
public string MaterialDes { get; set; } = null!;
+
[Display(Name = "零件号")]
public string LU { get; set; } = null!;
+
///
/// 结算数据中的过账日期
///
[Display(Name = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
+
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; } = null!;
+
[Display(Name = "注塑码")]
public string InjectionCode { get; set; } = null!;
+
[Display(Name = "结算数量")]
public decimal SEQty { get; set; }
+
[Display(Name = "发货数量")]
public decimal WMSQty { get; set; }
+
[Display(Name = "EDI数量")]
public decimal EDIQty { get; set; }
+
[Display(Name = "匹配类型")]
public string MateType { get; set; } = null!;
+
[Display(Name = "定价")]
public decimal FixPrice { get; set; }
+
[Display(Name = "期间")]
public string Version { get; set; } = null!;
}
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs
index 2b543d5e..70ca2b0b 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs
@@ -34,8 +34,8 @@ public class HBPO_SE_DETAIL : BaseEntity
[Display(Name = "发货数量")]
public decimal Qty { get; set; }
- [Display(Name = "订单时间")]
- public DateTime BeginDate { get; set; }
+ //[Display(Name = "订单时间")]
+ //public DateTime BeginDate { get; set; }
[Display(Name = "发货时间")]
public DateTime ShippingDate { get; set; }
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs
index 5cdcd2db..35da35e9 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs
@@ -10,7 +10,7 @@ namespace WTA.Application.Identity.Entities.SystemManagement;
//HBPO的EDI数据
public class HBPO_SE_EDI : BaseEntity
{
- [Display(Name = "LU+生产码")]
+ [Display(Name = "LU+PN")]
public string KeyCode { get; set; } = null!;
[Display(Name = "期间")]
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_SA_REPORT.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_SA_REPORT.cs
index 7b42a76f..d573bd71 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_SA_REPORT.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_SA_REPORT.cs
@@ -1,12 +1,11 @@
using System.ComponentModel.DataAnnotations;
-using WTA.Application.Identity.Entities.SystemManagement.Group;
using WTA.Shared.Attributes;
using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement;
+
[Hidden]
[Display(Name = "HBPO发运数据与结算数据对比实体")]
-
public class HBPO_SE_SA_REPORT : BaseEntity
{
[Display(Name = "LU+ASN单号")]
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_CAN_SA.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_CAN_SA.cs
index 8910a9c5..cf63e4e8 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_CAN_SA.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_CAN_SA.cs
@@ -52,8 +52,8 @@ public class PUB_CAN_SA_DETAIL : BaseEntity
[Display(Name = "结算单号")]
public string BillNum { get; set; } = null!;
- [Display(Name = "关联结算单号")]
- public string SettleBillNum { get; set; } = null!;
+ //[Display(Name = "关联结算单号")]
+ //public string SettleBillNum { get; set; } = null!;
///
/// 对应字段PartNumber
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_SE_DETAIL.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_SE_DETAIL.cs
index 69882f0e..a67b4a9e 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_SE_DETAIL.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_SE_DETAIL.cs
@@ -1,14 +1,14 @@
using System.ComponentModel.DataAnnotations;
-using WTA.Application.Identity.Entities.SystemManagement.Group;
using WTA.Shared.Attributes;
using WTA.Shared.Domain;
namespace WTA.Application.Identity.Entities.SystemManagement;
+
[Hidden]
[Display(Name = "PUB发运数据")]
public class PUB_SE_DETAIL : BaseEntity
{
- [Display(Name = "LU+生产码")]
+ [Display(Name = "LU+(交付单号、ASN单号等)")]
public string KeyCode { get; set; } = null!;
[Display(Name = "期间")]
@@ -17,7 +17,7 @@ public class PUB_SE_DETAIL : BaseEntity
[Display(Name = "零件号")]
public string LU { get; set; } = null!;
- [Display(Name = "ASN单号")]
+ [Display(Name = "交付单号、ASN单号等")]
public string PN { get; set; } = null!;
[Display(Name = "发货数量")]
@@ -33,7 +33,7 @@ public class PUB_SE_DETAIL : BaseEntity
public string Extend3 { get; set; } = null!;
///
- /// 1、JIT 2、买单件 3、备件 3、印度件
+ /// 1、JIT 2、买单件 3、备件 4、印度件
///
[Display(Name = "业务分类")]
public string BusinessType { get; set; } = null!;
diff --git a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/TB_RePartsRelationship.cs b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/TB_RePartsRelationship.cs
index a8376669..121bc543 100644
--- a/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/TB_RePartsRelationship.cs
+++ b/docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/TB_RePartsRelationship.cs
@@ -20,6 +20,7 @@ public class TB_RePartsRelationship : BaseEntity
///
[Display(Name = "替换零件号")]
public string RepLU { set; get; } = null!;
+ //取值字段【客户编码】
[Display(Name = "客户编码")]
public string ClientCode { set; get; } = null!;
diff --git a/docs/ui.rp b/docs/ui.rp
index b66d9440..dbf10740 100644
Binary files a/docs/ui.rp and b/docs/ui.rp differ