学 赵 1 year ago
parent
commit
36512fbd9d
  1. 39
      code/WebApp/vanilla/components/form/form-input.js
  2. 10
      code/WebApp/vanilla/components/form/index.js
  3. 354
      code/WebApp/vanilla/components/list/index.js
  4. 137
      code/WebApp/vanilla/models/centralized-control.js
  5. 38
      code/WebApp/vanilla/models/code-setting.js
  6. 12
      code/WebApp/vanilla/request/index.js
  7. 112
      code/WebApp/vanilla/router/routes.js
  8. 27
      code/WebApp/vanilla/views/base-data/centralized-control.js
  9. 13
      code/WebApp/vanilla/views/base-data/code-setting.js
  10. 4
      code/WebApp/vanilla/views/login.js
  11. 89
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  12. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  13. 56
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountEfCoreRepository.cs
  14. 8
      docs/demo/src/WTA.Application/Identity/Data/IdentityDbSeed.cs
  15. 4
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_CAN_SA.cs
  16. 4
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SA.cs
  17. 19
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SE_SA_REPORT.cs
  18. 4
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_DETAIL.cs
  19. 2
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_EDI.cs
  20. 3
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/HBPO_SE_SA_REPORT.cs
  21. 4
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_CAN_SA.cs
  22. 8
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/PUB_SE_DETAIL.cs
  23. 1
      docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/TB_RePartsRelationship.cs
  24. BIN
      docs/ui.rp

39
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`
<template v-if="getDisabled()">
<template v-if="model[prop]!==null">
<el-switch disabled v-model="model[prop]" type="checked" v-if="schema.type==='boolean'" />
<template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.input==='year'">{{dayjs(model[prop]).format('YYYY')}}</template>
<template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.input==='password'">******</template>
<template v-else>{{model[prop]}}</template>
</template>
@ -27,21 +29,24 @@ export default {
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
</template>
<template v-if="getInput(schema)==='month'">
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format" />
</template>
<el-input
:disabled="getDisabled()"
:placeholder="schema.title"
v-model="model[prop]"
type="number"
v-else-if="schema.type==='number'"
v-else-if="getInput(schema)==='number'"
/>
<el-input-number
:disabled="getDisabled()"
:placeholder="schema.title"
v-model="model[prop]"
:precision="0"
v-else-if="schema.type==='integer'"
v-else-if="getInput(schema)==='integer'"
/>
<template v-else-if="schema.type==='boolean'">
<template v-else-if="getInput(schema)==='boolean'">
<el-select :disabled="getDisabled()" v-model="model[prop]" :placeholder="schema.title" v-if="schema.nullable">
<el-option prop="select" value="" :label="$t('select')" />
<el-option prop="true" :value="true" :label="$t('true')" />
@ -51,6 +56,7 @@ export default {
</template>
<template v-else>
<el-input
clearable
:disabled="getDisabled()"
:placeholder="schema.title"
v-model="model[prop]"
@ -58,7 +64,14 @@ export default {
show-password
v-if="schema.input==='password'"
/>
<el-input :disabled="getDisabled()" :placeholder="schema.title" v-model="model[prop]" type="text" v-else />
<el-input
clearable
:disabled="getDisabled()"
:placeholder="schema.title"
v-model="model[prop]"
:type="schema.input??'text'"
v-else
/>
</template>
</template>
`,
@ -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;

10
code/WebApp/vanilla/components/form/index.js

@ -5,7 +5,7 @@ export default {
components: { AppFormItem: defineAsyncComponent(() => import("./form-item.js")) },
name: "AppForm",
template: html`<div v-loading="loading">
<el-form ref="formRef" :model="model" label-width="auto">
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<template v-for="(value, prop) in schema.properties">
<app-form-item
:parentSchema="schema"
@ -16,14 +16,16 @@ export default {
:errors="errors"
/>
</template>
<slot name="items"></slot>
<slot></slot>
<el-form-item v-if="!hideButton">
<template #label></template>
<el-button type="primary" @click="submit" :disabled="loading"><slot>$t('confirm')</slot></el-button>
<el-button type="primary" @click="submit" :disabled="loading">
<slot name="submitText">$t('confirm')</slot>
</el-button>
</el-form-item>
</el-form>
</div>`,
props: ["modelValue", "schema", "action", "hideButton", "isQueryForm", "mode"],
props: ["modelValue", "inline", "schema", "action", "hideButton", "isQueryForm", "mode"],
emits: ["update:modelValue", "submit"],
setup(props, context) {
// init

354
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"
/>
>
<template v-for="item in filterList.filter(o=>o.readOnly)">
<el-form-item :label="config.edit.schema.properties[item.column].title">
<app-form-input v-model="item" :schema="config.edit.schema.properties[item.column]" prop="value" />
</el-form-item>
</template>
</app-form>
</el-col>
</el-row>
<el-row style="padding-bottom:20px;">
@ -48,7 +54,7 @@ export default {
<span>{{item.meta.title}}</span>
</el-button>
</template>
<el-button @click="click('filter',selectedRows)">
<el-button @click="click('filter',selectedRows)" v-if="config.query.hasFilter">
<el-icon><ep-filter /></el-icon>
<span>{{$t('筛选')}}</span>
</el-button>
@ -231,23 +237,26 @@ export default {
</el-form>
</template>
<template v-else-if="editFormMode==='import'">
<el-form :model="importModel" inline>
<el-form-item :label="$t('部分成功')">
<el-switch v-model="importModel.partial" />
</el-form-item>
<el-form-item :label="$t('全部替换')">
<el-switch v-model="importModel.replace" />
</el-form-item>
<el-form :model="importModel" style="height:100%;">
<el-form-item :label="$t('导入模板')">
<el-link type="primary" @click="getImportTemplate">{{$t('下载')}}</el-link>
</el-form-item>
<el-form-item :label="$t('文件')">
<el-form-item label="选择工厂" label-width="80px">
<el-select v-model="importModel.version">
<el-option v-for="item in versions" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item label="选择期间" label-width="80px">
<el-select v-model="importModel.factory">
<el-option v-for="item in versions" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item :label="$t('文件')" label-width="80px">
<el-upload
ref="uploadRef"
class="upload"
drag
accept=".xlsx"
:disabled="fileList.length===1"
:limit="1"
:auto-upload="false"
:on-change="handleChange"
>
@ -257,37 +266,33 @@ export default {
</el-form>
</template>
<template v-else-if="editFormMode==='filter'">
<el-form :model="queryList" inline class="filter">
<el-row v-for="(item,index) in queryList">
<el-form :model="filterList" inline class="filter">
<el-row v-for="(item,index) in filterList">
<el-col :span="6">
<el-select v-model="item.property" :placeholder="$t('字段')">
<el-option v-for="(value, prop) in querySchema.properties" :value="prop" :label="value.title" />
<el-select clearable :disabled="item.readOnly" v-model="item.column" :placeholder="$t('字段')">
<template v-for="(value, prop) in config.edit.schema.properties">
<el-option
v-if="value.type!=='object'&&value.type!=='array'&&value.input!=='textarea'"
:value="prop"
:label="value.title"
/>
</template>
</el-select>
</el-col>
<el-col :span="6">
<el-select v-model="item.operator" :placeholder="$t('操作符')">
<el-option value="{0}=@0" :label="$t('等于')" />
<el-option value="{0}!=@0" :label="$t('不等于')" />
<el-option value="{0}>@0" :label="$t('大于')" />
<el-option value="{0}>=@0" :label="$t('大于等于')" />
<el-option value="{0}<@0" :label="$t('小于')" />
<el-option value="{0}<=@0" :label="$t('小于等于')" />
<el-option value="{0}.Contains(@0)" :label="$t('包含')" />
<el-option value="{0}.StartsWith(@0)" :label="$t('开始于')" />
<el-option value="{0}.StartsWith(@0)" :label="$t('结束于')" />
<el-col :span="6" v-if="item.column">
<el-select clearable :disabled="item.readOnly" v-model="item.action" :placeholder="$t('操作符')">
<el-option
v-for="item in getOperators(config.edit.schema.properties[item.column])"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-col>
<el-col :span="6">
<el-input v-model="item.value" :placeholder="$t('值')" />
<el-col :span="8" v-if="item.column">
<app-form-input v-model="item" :schema="config.edit.schema.properties[item.column]" prop="value" />
</el-col>
<!-- <el-col :span="4">
<el-select v-model="item.logic" :placeholder="$t('关系')">
<el-option value="and" :label="$t('且')" />
<el-option value="or" :label="$t('或')" />
</el-select>
</el-col> -->
<el-col :span="2">
<el-button circle @click="queryList.splice(index, 1)">
<el-col :span="2" v-if="!item.readOnly&&item.action">
<el-button circle @click="filterList.splice(index, 1)">
<template #icon>
<ep-close />
</template>
@ -296,7 +301,7 @@ export default {
</el-row>
<el-row>
<el-col>
<el-button circle @click="pushQueryList">
<el-button circle @click="pushfilterList">
<template #icon>
<ep-plus />
</template>
@ -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%;
}
</style>`,
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,
};
},
};

137
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,
},
};
}

38
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,
},
};

12
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 };

112
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",
},
},
],
},
},
],

27
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`<app-list ref="listRef" :config="config" @command="onCommand" />`,
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 };
},
};

13
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`<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 };
},

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

@ -20,7 +20,9 @@ export default {
<layout-locale />
</div>
<el-card class="box-card" style="width:400px;">
<app-form :schema="schema" v-model="model" :action="action" @submit="submit">{{$t('login')}}</app-form>
<app-form :schema="schema" v-model="model" :action="action" @submit="submit">
<template #submitText>{{$t('login')}}</template>
</app-form>
</el-card>
<layout-footer />
</div>

89
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

@ -2,12 +2,14 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NPOI.Util;
using NUglify.Helpers;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
@ -67,6 +69,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public PUB_SA_SERVICE(INormalEfCoreRepository<PUB_SA, Guid> repository,
INormalEfCoreRepository<PUB_SA_DETAIL, Guid> pubSaDetailRepository,
INormalEfCoreRepository<PriceList, Guid> priceListRepository,
INormalEfCoreRepository<PUB_CAN_SA, Guid> pubCanSaRepository,
INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> pubCanSaDetailRepository,
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> pubNotSaDetailRepository,
IDistributedCache<PUB_SA> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
@ -75,6 +80,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
_repository = repository;
_pubSaDetailRepository = pubSaDetailRepository;
_pubCanSaRepository = pubCanSaRepository;
_pubCanSaDetailRepository = pubCanSaDetailRepository;
_pubNotSaDetailRepository = pubNotSaDetailRepository;
_priceListRepository = priceListRepository;
}
@ -89,9 +97,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
public async Task<string> ZGJImportAsync([FromForm] IFormFileCollection files)
{
//类型(直供件)
EnumBusinessType businessType = EnumBusinessType.ZhiGongJian;
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>(files, _excelImportService);
var _ls = ObjectMapper.Map<List<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>, List<PUB_SA_DETAIL>>(result);
var importPubSaDetails = ObjectMapper.Map<List<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>, List<PUB_SA_DETAIL>>(result);
//结算分组号
var pubSaGroupNums = importPubSaDetails.Select(t => t.GroupNum).Distinct();
//销售价格
var priceListEntitys = await _priceListRepository.GetAllAsync();
@ -103,63 +116,70 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
State = "1"
};
_ls.ForEach(s =>
importPubSaDetails.ForEach(importPubSaDetail =>
{
if (s.LU != null)
List<string> luList = importPubSaDetail.LU.Split(" ").ToList();
if (luList.Count > 1)
{
List<string> luList = s.LU.Split(" ").ToList();
s.LU = luList[0].Replace(" ", "");
if (luList.Count > 1)
{
luList.RemoveAt(0);
luList.Reverse();
var luAssemble = luList.Select(t => t.Replace(" ", ""));
s.LU += luAssemble.Aggregate(" ", (current, index) => current + index);
}
importPubSaDetail.LU = luList[0].Replace(" ", "");
luList.RemoveAt(0);
var luAssemble = luList.Select(t => t.Replace(" ", ""));
importPubSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index);
}
s.LU = s.LU;
s.BillNum = pubSaBillNum;
s.Site = "XX工厂";
s.KeyCode = s.LU + s.PN;
importPubSaDetail.BillNum = pubSaBillNum;
importPubSaDetail.Site = "XX工厂";
importPubSaDetail.KeyCode = importPubSaDetail.PN + importPubSaDetail.LU;
//根据物料号、结算日期获取价格
var priceListEntity = priceListEntitys.Find(t => t.LU == s.LU && s.SettleDate > t.BeginTime && s.SettleDate < t.EndTime);
s.Price = priceListEntity?.Price ?? 0;
var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate > t.BeginTime && importPubSaDetail.SettleDate < t.EndTime);
importPubSaDetail.Price = priceListEntity?.Price ?? 0;
});
//可结算
var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("INV");
var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C");
var pubCanSa = new PUB_CAN_SA()
{
BillNum = pubCanSaBillNum,
SettleBillNum = pubSaBillNum,
State = SettleBillState.,
BusinessType = EnumBusinessType.ZhiGongJian
BusinessType = businessType
};
//不可结算 结算分组号码(根据价格区分结算、不可结算)
var pubNotSaGroupNum = _ls.FindAll(t => t.Price != 0).Select(t => t.GroupNum).Distinct();
var pubSaDetailsCanSe = _ls.FindAll(t => pubNotSaGroupNum.Contains(t.GroupNum) == false);
var pubSaDetailsNotCanSe = _ls.FindAll(t => pubNotSaGroupNum.Contains(t.GroupNum) == true);
var pubNotSaGroupNums = importPubSaDetails.FindAll(t => t.Price == default(decimal)).Select(t => t.GroupNum).Distinct();
var pubSaDetailsCanSes = importPubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == false);
var pubSaDetailsNotCanSes = importPubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == true);
//可结算
var pubCanSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_CAN_SA_DETAIL>>(pubSaDetailsCanSe);
var pubCanSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_CAN_SA_DETAIL>>(pubSaDetailsCanSes);
//不可结算
var pubNotSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_NOT_SA_DETAIL>>(pubSaDetailsNotCanSe);
var pubNotSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_NOT_SA_DETAIL>>(pubSaDetailsNotCanSes);
//添加入库
await _repository.InsertAsync(pubSa);
await _pubSaDetailRepository.InsertManyAsync(_ls);
await _pubSaDetailRepository.InsertManyAsync(importPubSaDetails);
if (pubCanSaDetails.Count > 0)
{
pubCanSa.InvGroupNum = pubCanSaDetails.Count.ToString();
pubCanSaDetails.ForEach(pubCanSaDetail =>
{
pubCanSaDetail.BillNum = pubCanSaDetail.InvGroupNum = pubCanSaBillNum;
pubCanSaDetail.BusinessType = businessType;
});
await _pubCanSaRepository.InsertAsync(pubCanSa);
await _pubCanSaDetailRepository.InsertManyAsync(pubCanSaDetails);
}
if (pubNotSaDetails.Count > 0)
{
pubNotSaDetails.ForEach(pubNotSaDetail =>
{
pubNotSaDetail.InvGroupNum = pubCanSaBillNum;
pubNotSaDetail.BusinessType = businessType;
});
await _pubNotSaDetailRepository.InsertManyAsync(pubNotSaDetails);
}
return ApplicationConsts.SuccessStr;
@ -206,30 +226,31 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//结算主表
PUB_SA pubSaDelEntity;
//结算明细
IEnumerable<PUB_SA_DETAIL> pubSaDetailDelEntitys = default;
List<PUB_SA_DETAIL> pubSaDetailDelEntitys;
//可结算主表
IEnumerable<PUB_CAN_SA> pubCanSaDelEntitys = default;
List<PUB_CAN_SA> pubCanSaDelEntitys;
//可结算明细
IEnumerable<PUB_CAN_SA_DETAIL> pubCanSaDetailDelEntitys = default;
List<PUB_CAN_SA_DETAIL> pubCanSaDetailDelEntitys;
//不可结算
IEnumerable<PUB_NOT_SA_DETAIL> pubNotSaDetailDelEntitys = default;
List<PUB_NOT_SA_DETAIL> pubNotSaDetailDelEntitys;
pubSaDelEntity = await _repository.FindAsync(id);
if (pubSaDelEntity != null) return;
if (pubSaDelEntity == null) return;
//结算单据
string pubSaBillNum = pubSaDelEntity.BillNum;
pubCanSaDelEntitys = _pubCanSaRepository.Where(t => t.SettleBillNum == pubSaBillNum);
pubCanSaDelEntitys = await _pubCanSaRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum);
//验证可结算主表状态
if (pubCanSaDelEntitys.Any(t => t.State != SettleBillState.))
{
throw new UserFriendlyException($"该单据可结算单状态无法删除!");
}
pubCanSaDetailDelEntitys = _pubCanSaDetailRepository.Where(t => t.SettleBillNum == pubSaBillNum);
pubNotSaDetailDelEntitys = _pubNotSaDetailRepository.Where(t => t.SettleBillNum == pubSaBillNum);
pubSaDetailDelEntitys = await _pubSaDetailRepository.GetListAsync(t => t.BillNum == pubSaBillNum);
pubCanSaDetailDelEntitys = await _pubCanSaDetailRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum);
pubNotSaDetailDelEntitys = await _pubNotSaDetailRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum);
//删除
await _repository.DeleteAsync(pubSaDelEntity);

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -973,6 +973,11 @@ namespace Win.Sfs.SettleAccount
{
CreateMap<PUB_SA, PUB_SA_DTO>();
CreateMap<PUB_SA_DETAIL, PUB_CAN_SA_DETAIL>()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap<PUB_SA_DETAIL, PUB_NOT_SA_DETAIL>()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap<ZGJ_PUB_SA_DETAIL_IMPORT_DTO, PUB_SA_DETAIL>();
}

56
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<TEntity> GetSortingQueryable(IQueryable<TEntity> 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;
}

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

@ -151,8 +151,8 @@ public class IdentityDbSeed : IDbSeed<IdentityDbContext>
context.Set<HBPO_SA>().Add(new HBPO_SA { Version = "测试数据", BillNum = "456", DNBillNum = "测试数据", State = "测试数据", RecordCount = "测试数据" });
context.Set<HBPO_SA_DETAIL>().Add(new HBPO_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据" });
context.Set<HBPO_SA_DETAIL>().Add(new HBPO_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据" });
context.Set<BBAC_SA>().Add(new BBAC_SA { Version = "测试数据", BillNum = "123", DNBillNum = "测试数据", State = "测试数据", RecordCount = "测试数据" });
context.Set<BBAC_SA>().Add(new BBAC_SA { Version = "测试数据", BillNum = "456", DNBillNum = "测试数据", State = "测试数据", RecordCount = "测试数据" });
context.Set<BBAC_SA>().Add(new BBAC_SA { Version = "测试数据", BillNum = "123", State = "测试数据", RecordCount = "测试数据" });
context.Set<BBAC_SA>().Add(new BBAC_SA { Version = "测试数据", BillNum = "456", State = "测试数据", RecordCount = "测试数据" });
context.Set<BBAC_SA_DETAIL>().Add(new BBAC_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set<BBAC_SA_DETAIL>().Add(new BBAC_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set<HBPO_CAN_SA>().Add(new HBPO_CAN_SA { SettleBillNum = "测试数据", Version = "测试数据", BillNum = "123", State = "测试数据", InvGroupNum = "测试数据" });
@ -161,8 +161,8 @@ public class IdentityDbSeed : IDbSeed<IdentityDbContext>
context.Set<HBPO_CAN_SA_DETAIL>().Add(new HBPO_CAN_SA_DETAIL { SettleBillNum = "测试数据", InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据" });
context.Set<BBAC_CAN_SA>().Add(new BBAC_CAN_SA { SettleBillNum = "测试数据", Version = "测试数据", BillNum = "123", State = "测试数据", InvGroupNum = "测试数据" });
context.Set<BBAC_CAN_SA>().Add(new BBAC_CAN_SA { SettleBillNum = "测试数据", Version = "测试数据", BillNum = "456", State = "测试数据", InvGroupNum = "测试数据" });
context.Set<BBAC_CAN_SA_DETAIL>().Add(new BBAC_CAN_SA_DETAIL { SettleBillNum = "测试数据", InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set<BBAC_CAN_SA_DETAIL>().Add(new BBAC_CAN_SA_DETAIL { SettleBillNum = "测试数据", InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set<BBAC_CAN_SA_DETAIL>().Add(new BBAC_CAN_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "123", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set<BBAC_CAN_SA_DETAIL>().Add(new BBAC_CAN_SA_DETAIL { InvGroupNum = "测试数据", KeyCode = "测试数据", Version = "测试数据", BillNum = "456", LU = "测试数据", PN = "测试数据", Site = "测试数据", SettleDate = new DateTime(), GroupNum = "测试数据", Category = "测试数据", IsReturn = "测试数据" });
context.Set<INVOICE_GRP>().Add(new INVOICE_GRP { Version = "测试数据", RealnvBillNum = "测试数据", InvbillNum = "123", InvGroupNum = "分组号测试数据一", FileName = "测试数据", BusinessType = "测试数据" });
context.Set<INVOICE_GRP>().Add(new INVOICE_GRP { Version = "测试数据", RealnvBillNum = "测试数据", InvbillNum = "456", InvGroupNum = "分组号测试数据二", FileName = "测试数据", BusinessType = "测试数据" });
context.Set<INVOICE_WAIT_DETAIL>().Add(new INVOICE_WAIT_DETAIL { InvbillNum = "待开票明细123", InvGroupNum = "待开票明细分组号测试数据一", Version = "测试数据", LU = "测试数据", BussiessType = "测试数据", Extend1 = "测试数据", Extend2 = "测试数据", Extend3 = "测试数据", Extend4 = "测试数据" });

4
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_CAN_SA.cs

@ -53,8 +53,8 @@ public class BBAC_CAN_SA_DETAIL : BaseEntity
/// </summary>
[Display(Name = "结算单号")]
public string BillNum { get; set; } = null!;
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; } = null!;
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; } = null!;
/// <summary>
/// 对应字段Material
/// </summary>

4
docs/demo/src/WTA.Application/Identity/Entities/SystemManagement/BBAC_SA.cs

@ -18,8 +18,8 @@ public class BBAC_SA : BaseEntity
[OneToMany<BBAC_SA_DETAIL>]
public string BillNum { get; set; } = null!;
[Display(Name = "出库单号")]
public string DNBillNum { get; set; } = null!;
//[Display(Name = "出库单号")]
//public string DNBillNum { get; set; } = null!;
/// <summary>
/// 1、新建 2、已有出库3、已有扣减寄售库

19
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!;
/// <summary>
/// 有结算无发货(无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!;
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[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!;
}

4
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; }

2
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 = "期间")]

3
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单号")]

4
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!;
/// <summary>
/// 对应字段PartNumber

8
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!;
/// <summary>
/// 1、JIT 2、买单件 3、备件 3、印度件
/// 1、JIT 2、买单件 3、备件 4、印度件
/// </summary>
[Display(Name = "业务分类")]
public string BusinessType { get; set; } = null!;

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

@ -20,6 +20,7 @@ public class TB_RePartsRelationship : BaseEntity
/// </summary>
[Display(Name = "替换零件号")]
public string RepLU { set; get; } = null!;
//取值字段【客户编码】
[Display(Name = "客户编码")]
public string ClientCode { set; get; } = null!;

BIN
docs/ui.rp

Binary file not shown.
Loading…
Cancel
Save