Browse Source

精简前端代码:数据输入-结算数据部分,提取通用组件,删除重复视图

master
wanggang 1 year ago
parent
commit
5fb4fb08f0
  1. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 7
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js
  3. 28
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/lib/element-plus/index.css
  5. 60
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js
  6. 52
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  7. 11
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
  8. 52
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js
  9. 18
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_service.js
  10. 661
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  11. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js
  12. 37
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/utils.js
  13. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  14. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_detail_service.js
  15. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_service.js
  16. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_detail_service.js
  17. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_service.js
  18. 29
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
  19. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_detail_service.js
  20. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_service.js
  21. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_detail_service.js
  22. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_service.js
  23. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js
  24. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js
  25. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js
  26. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js
  27. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js
  28. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js
  29. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js
  30. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js

@ -14,7 +14,7 @@ export default {
<template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template> <template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template> <template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.input==='password'">******</template> <template v-else-if="schema.input==='password'">******</template>
<template v-else-if="schema.input==='select'">{{options[model[prop]]?.label}}</template> <template v-else-if="schema.input==='select'||schema.input==='tabs'">{{options[model[prop]]?.label}}</template>
<template v-else>{{model[prop]}}</template> <template v-else>{{model[prop]}}</template>
</template> </template>
</template> </template>
@ -30,6 +30,13 @@ export default {
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
<template v-else-if="getInput(schema)==='tabs'">
<el-tabs type="card" v-model="model[prop]" style="height:32px;margin:0;" class="form">
<el-tab-pane key="all" label="全部" :value="null" />
<el-tab-pane v-for="item in options" :key="item.key" :label="item.label" :name="item.value" />
</el-tabs>
<br />
</template>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'"> <template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'">
<el-date-picker <el-date-picker
v-model="model[prop]" v-model="model[prop]"
@ -90,6 +97,12 @@ export default {
</template> </template>
</template> </template>
`, `,
styles: html`<style>
.form .el-tabs__header,
.form .el-tabs__item {
height: 32px;
}
</style>`,
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"], props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],
emit: ["update:modelValue"], emit: ["update:modelValue"],
setup(props, context) { setup(props, context) {

7
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js

@ -9,7 +9,7 @@ export default {
template: html`<div v-loading="loading"> template: html`<div v-loading="loading">
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline"> <el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<template v-if="schema && schema.properties"> <template v-if="schema && schema.properties">
<template v-for="(value, prop) in schema.properties"> <template v-for="(value, prop) in getProperties(schema.properties)">
<app-form-item <app-form-item
:parentSchema="schema" :parentSchema="schema"
:schema="value" :schema="value"
@ -70,12 +70,15 @@ export default {
console.log(error); console.log(error);
} }
}; };
// expose const getProperties = (properties) => {
return Object.fromEntries(Object.entries(properties).sort(([, a], [, b]) => a.order - b.order));
};
context.expose({ validate, reset }); context.expose({ validate, reset });
return { return {
model, model,
formRef, formRef,
loading, loading,
getProperties,
errors, errors,
reset, reset,
submit, submit,

28
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -45,7 +45,7 @@ export default {
:class="item.meta.htmlClass??'el-button--primary'" :class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop" v-if="item.meta.isTop"
@click="click(item,selectedRows)" @click="click(item,selectedRows)"
:disabled="item.meta.disabled && item.meta.disabled(selectedRows)" :disabled="item.meta.disabled && item.meta.disabled.constructor === Function && item.meta.disabled(selectedRows,queryModel)"
> >
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon> <el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span> <span>{{item.meta.title}}</span>
@ -94,7 +94,7 @@ export default {
<template v-else-if="item.oneToMany"> <template v-else-if="item.oneToMany">
<el-table-column :prop="key" :label="item.title"> <el-table-column :prop="key" :label="item.title">
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="showList(scope.row[key],item.oneToMany)"> <el-link type="primary" @click="showList({[key]:scope.row[key]},item.oneToMany,item.config)">
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" /> <app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
</el-link> </el-link>
</template> </template>
@ -121,6 +121,12 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="key==='extraProperties'">
<el-table-column v-for="item in scope.row['extraProperties']">
<template #header="scope">{{$t(item.key)??item.key}}</template>
<template #default="scope"> {{item.value}} </template>
</el-table-column>
</template>
</template> </template>
</template> </template>
<slot name="columns"></slot> <slot name="columns"></slot>
@ -627,6 +633,16 @@ export default {
} }
} else if (item.meta.pattern === "file") { } else if (item.meta.pattern === "file") {
window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`)); window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else if ((item.meta.pattern = "row")) {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod ?? "POST";
const postData = {
filters: [{ logic: "and", action: "equal", column: item.meta.key, value: rows[0][item.meta.key] }],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} else { } else {
console.log(item); console.log(item);
} }
@ -744,9 +760,13 @@ export default {
dialogVisible.value = false; dialogVisible.value = false;
} }
}; };
const showList = (value, nav, config) => { const showList = async (value, nav, config) => {
if (!subDrawer.value) { if (!subDrawer.value) {
const targetRoute = router.getRoutes().find((o) => o.meta?.path === nav); const targetRoute = router.getRoutes().find((o) => o.path === nav);
if (config.constructor === String) {
const value = (await import(config)).default;
config = value.constructor === Function ? value() : value;
}
subListQuery.value = { subListQuery.value = {
query: value, query: value,
buttons: targetRoute.meta.children, buttons: targetRoute.meta.children,

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/lib/element-plus/index.css

File diff suppressed because one or more lines are too long

60
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js

@ -1,41 +1,43 @@
import version from "../../version.js"; import version from "../version.js";
import businessType from "../../businessType.js"; import state from "../state.js";
const schema = { const schema = {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
version, version,
billNum: { state,
title: "结算单据", settleDate: {
title: "结算日期",
type: "string", type: "string",
input: "dateTime",
}, },
dnBillNum: { groupNum: {
title: "出库单号", title: "结算分组号",
type: "string", type: "string",
}, },
state: { deliveryDate: {
title: "状态", title: "到货日期",
type: "string", type: "string",
input: "dateTime",
}, },
recordCount: { lu: {
title: "明细记录行数", title: "客户零件号",
type: "string", type: "string",
}, },
site: { qty: {
title: "工厂地点", title: "结算数量",
type: "number",
},
pn: {
title: "生产号",
type: "string", type: "string",
}, },
businessType,
}, },
}; };
const queryUrl = "settleaccount/bbac_sa_service/get-list"; const queryUrl = "settleaccount/pub_sa_detail_service/get-list";
const deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const importUrl = "settleaccount/bbac_sa_service/import";
const queryMethod = "POST"; const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function () { export default function () {
return { return {
@ -44,7 +46,7 @@ export default function () {
method: queryMethod, method: queryMethod,
hasFilter: true, hasFilter: true,
schema: { schema: {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
filters: { filters: {
@ -68,15 +70,7 @@ export default function () {
}, },
}, },
}, },
default: [ default: [],
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
}, },
skipCount: { skipCount: {
hidden: true, hidden: true,
@ -89,6 +83,10 @@ export default function () {
sorting: { sorting: {
hidden: true, hidden: true,
}, },
businessType: {
hidden: true,
default: 0,
},
}, },
}, },
}, },
@ -96,10 +94,6 @@ export default function () {
schema: schema, schema: schema,
}, },
edit: { edit: {
deleteUrl,
importUrl,
deleteMethod,
importMethod,
schema: schema, schema: schema,
}, },
}; };

52
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -1,48 +1,44 @@
import version from "../../version.js"; import version from "../version.js";
import businessType from "../../businessType.js"; import state from "../state.js";
import state from "../../state.js";
const schema = { const schema = {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
version, version,
billNum: {
title: "结算单据",
type: "string",
},
dnBillNum: {
title: "出库单号",
type: "string",
},
state, state,
recordCount: { billNum: {
title: "明细记录行数", title: "结算单号",
type: "string", type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
}, },
site: { businessType: {
title: "工厂地点", title: "业务类型",
type: "string", type: "string",
hidden: true,
default: 0,
}, },
businessType,
}, },
}; };
const queryUrl = "settleaccount/hbpo_sa_service/get-list"; export default function (service = "pub_sa_service", detailService = "pub_sa_detail_service") {
const deleteUrl = "settleaccount/hbpo_sa_service/delete-list"; const queryUrl = `settleaccount/${service}/get-list`;
const importUrl = "settleaccount/hbpo_sa_service/import"; const deleteUrl = `settleaccount/${service}/delete-list`;
const queryMethod = "POST"; const importUrl = `settleaccount/${service}/import`;
const deleteMethod = "POST"; const exportUrl = `settleaccount/${detailService}/export`;
const importMethod = "POST"; const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return { return {
query: { query: {
url: queryUrl, url: queryUrl,
method: queryMethod, method: queryMethod,
hasFilter: true, hasFilter: true,
schema: { schema: {
title: "JIS结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
filters: { filters: {
@ -87,6 +83,10 @@ export default function () {
sorting: { sorting: {
hidden: true, hidden: true,
}, },
businessType: {
hidden: true,
default: 0,
},
}, },
}, },
}, },
@ -96,8 +96,10 @@ export default function () {
edit: { edit: {
deleteUrl, deleteUrl,
importUrl, importUrl,
exportUrl,
deleteMethod, deleteMethod,
importMethod, importMethod,
exportMethod,
schema: schema, schema: schema,
}, },
}; };

11
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js

@ -1,8 +1,10 @@
import version from "./version.js"; import version from "./version.js";
import { state2 as state, state3 } from "./state.js"; import { state2, state3 } from "./state.js";
import businessType from "./businessType.js"; import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js"; import invoiceState from "./invoiceState.js";
const state = Object.assign({}, state2);
state.input = "tabs";
const schema = { const schema = {
title: "商务审批", title: "商务审批",
type: "object", type: "object",
@ -96,6 +98,13 @@ export default function () {
value: null, value: null,
readOnly: true, readOnly: true,
}, },
{
logic: "and",
column: "state",
action: "equal",
value: null,
readOnly: true,
},
], ],
}, },
skipCount: { skipCount: {

52
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js

@ -7,56 +7,30 @@ const schema = {
properties: { properties: {
version, version,
state, state,
keyCode: { settleDate: {
title: "LU+ASN单号", title: "结算日期",
type: "string",
},
billNum: {
title: "关联结算单号",
type: "string", type: "string",
input: "dateTime",
}, },
lu: { groupNum: {
title: "零件号", title: "结算分组号",
type: "string", type: "string",
}, },
pn: { deliveryDate: {
title: "发货单号", title: "到货日期",
type: "string", type: "string",
input: "dateTime",
}, },
site: { lu: {
title: "工厂地点", title: "客户零件号",
type: "string", type: "string",
}, },
qty: { qty: {
title: "结算数量", title: "结算数量",
type: "decimal", type: "number",
},
price: {
title: "单价",
type: "decimal",
},
invGroupNum: {
title: "发票分组号",
type: "string",
}, },
settleDate: { pn: {
title: "结算日期(收货日期", title: "生产号",
type: "Datetime",
},
extend1: {
title: "扩展字段1",
type: "string",
},
extend2: {
title: "扩展字段2",
type: "string",
},
extend3: {
title: "扩展字段3",
type: "string",
},
groupNum: {
title: "结算分组",
type: "string", type: "string",
}, },
}, },

18
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_service.js

@ -5,11 +5,11 @@ const schema = {
title: "结算数据", title: "结算数据",
type: "object", type: "object",
properties: { properties: {
version,
state,
billNum: { billNum: {
title: "结算单号", title: "结算单号",
type: "string", type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
}, },
businessType: { businessType: {
title: "业务类型", title: "业务类型",
@ -17,6 +17,20 @@ const schema = {
hidden: true, hidden: true,
default: 0, default: 0,
}, },
dnBillNum: {
title: "出库单号",
type: "string",
},
recordCount: {
title: "明细记录行数",
type: "string",
},
site: {
title: "工厂地点",
type: "string",
},
state,
version,
}, },
}; };

661
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

@ -1,87 +1,30 @@
import createRoute, { createPage, createButton } from "./utils.js";
function createJieSuanShuJu(path, business, client, title = "结算数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/jie-suan",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入&isTop=true"),
createButton("export", "title=导出&pattern=row&key=billNum"),
createButton("delete", "title=删除&isTop=true"),
],
};
}
export default [ export default [
{ {
path: "jis-bbac", ...createPage("input/jie-suan/detail", "title=结算数据明细&isHidden=true"),
meta: { children: [createButton("query", "title=查询&isTop=true")],
type: "group", },
title: "JIS-BBAC", {
icon: "folder", ...createRoute("jis-bbac", "title=JIS-BBAC"),
},
children: [ children: [
{ {
path: "input", ...createRoute("input", "title=数据输入"),
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [ children: [
{ createJieSuanShuJu("bbac_sa_service", "JisBBAC", "bbac"),
path: "bbac_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bbac_sa_detail_service",
meta: {
type: "page",
title: "JIS结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "bbac_se_detail_service", path: "bbac_se_detail_service",
meta: { meta: {
@ -402,6 +345,7 @@ export default [
title: "退回", title: "退回",
icon: "file", icon: "file",
isTop: true, isTop: true,
disabled: "(rows,query)=>true",
}, },
}, },
{ {
@ -549,73 +493,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("hbpo_sa_service", "JisHBPO", "hbpo"),
path: "hbpo_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "hbpo_sa_detail_service",
meta: {
type: "page",
title: "JIS结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "hbpo_se_detail_service", path: "hbpo_se_detail_service",
meta: { meta: {
@ -1091,73 +969,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"),
path: "bbac_jit_pub_sa_service",
meta: {
type: "page",
title: "BBAC结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bbac_jit_pub_sa_detail_service",
meta: {
type: "page",
title: "BBAC结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "bbac_jit_pub_se_detail_service", path: "bbac_jit_pub_se_detail_service",
meta: { meta: {
@ -1551,11 +1363,12 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
createJieSuanShuJu("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"),
{ {
path: "hbpo_jit_pub_sa_service", path: "hbpo_jit_pub_se_detail_service",
meta: { meta: {
type: "page", type: "page",
title: "HBPO结算数据", title: "HBPO发运数据",
icon: "file", icon: "file",
}, },
children: [ children: [
@ -1569,32 +1382,42 @@ export default [
}, },
}, },
{ {
path: "import", path: "sync",
meta: { meta: {
type: "button", type: "button",
title: "导入", title: "手动同步",
icon: "file", icon: "file",
isTop: true, isTop: true,
}, },
}, },
{ {
path: "delete", path: "export",
meta: { meta: {
type: "button", type: "button",
title: "删除", title: "导出",
icon: "file", icon: "file",
isTop: true, isTop: true,
pattern: "paged",
}, },
}, },
], ],
}, },
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{ {
path: "hbpo_jit_pub_sa_detail_service", path: "hbpo_jit_pub_sa_detail_jobservice",
meta: { meta: {
type: "page", type: "page",
title: "HBPO结算数据明细", title: "HBPO发运与结算比对",
icon: "file", icon: "file",
isHidden: true,
}, },
children: [ children: [
{ {
@ -1607,39 +1430,28 @@ export default [
}, },
}, },
{ {
path: "export", path: "compare",
meta: { meta: {
type: "button", type: "button",
title: "导出", title: "生成对比",
icon: "file", icon: "file",
isTop: true, isTop: true,
pattern: "paged",
}, },
}, },
],
},
{
path: "hbpo_jit_pub_se_detail_service",
meta: {
type: "page",
title: "HBPO发运数据",
icon: "file",
},
children: [
{ {
path: "query", path: "delete",
meta: { meta: {
type: "button", type: "button",
title: "查询", title: "删除",
icon: "file", icon: "file",
isTop: true, isTop: true,
}, },
}, },
{ {
path: "sync", path: "update-data",
meta: { meta: {
type: "button", type: "button",
title: "手动同步", title: "更新结算数据状态",
icon: "file", icon: "file",
isTop: true, isTop: true,
}, },
@ -1648,10 +1460,9 @@ export default [
path: "export", path: "export",
meta: { meta: {
type: "button", type: "button",
title: "导出", title: "下载",
icon: "file", icon: "file",
isTop: true, pattern: "file",
pattern: "paged",
}, },
}, },
], ],
@ -1659,83 +1470,18 @@ export default [
], ],
}, },
{ {
path: "contrast", path: "settlement",
meta: { meta: {
type: "group", type: "group",
title: "数据对比", title: "结算开票",
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ {
path: "hbpo_jit_pub_sa_detail_jobservice", path: "hbpo_jit_pub_can_sa_service",
meta: { meta: {
type: "page", type: "page",
title: "HBPO发运与结算比对", title: "可结算单",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "compare",
meta: {
type: "button",
title: "生成对比",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "update-data",
meta: {
type: "button",
title: "更新结算数据状态",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "下载",
icon: "file",
pattern: "file",
},
},
],
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file", icon: "file",
}, },
children: [ children: [
@ -2021,83 +1767,7 @@ export default [
icon: "file", icon: "file",
}, },
children: [ children: [
{ createJieSuanShuJu("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"),
path: "bbac_md_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "bbac_md_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "bbac_md_pub_se_detail_service", path: "bbac_md_pub_se_detail_service",
meta: { meta: {
@ -2221,83 +1891,7 @@ export default [
icon: "file", icon: "file",
}, },
children: [ children: [
{ createJieSuanShuJu("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"),
path: "hbpo_md_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "hbpo_md_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "hbpo_md_pub_se_detail_service", path: "hbpo_md_pub_se_detail_service",
meta: { meta: {
@ -2693,73 +2287,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("bj_pub_sa_service", "BeiJian", "bbac"),
path: "bj_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bj_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "bj_pub_se_detail_service", path: "bj_pub_se_detail_service",
meta: { meta: {
@ -3124,73 +2652,7 @@ export default [
icon: "folder", icon: "folder",
}, },
children: [ children: [
{ createJieSuanShuJu("in_pub_sa_service", "YinDuJian", "bbac"),
path: "in_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "in_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{ {
path: "in_pub_se_detail_service", path: "in_pub_se_detail_service",
meta: { meta: {
@ -3665,7 +3127,6 @@ export default [
}, },
], ],
}, },
//实际采购成本,不知道起什么名
{ {
path: "cost", path: "cost",
meta: { meta: {

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

@ -101,10 +101,11 @@ const refreshRouter = async () => {
// component // component
if (o.meta?.type === "page") { if (o.meta?.type === "page") {
if (!o.component) { if (!o.component) {
o.component = o.path; o.component = o.meta.path ?? o.path;
} }
if (o.component.constructor === String) { if (o.component.constructor === String) {
o.component = () => import(`../views${o.meta.path}.js`); const name = o.component;
o.component = () => import(`../views${name}.js`);
} }
} }
// children // children

37
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/utils.js

@ -0,0 +1,37 @@
import qs from "../lib/qs/shim.js";
function createDefaultRoute(type = "group", icon = "folder", isHidden = false, isTop = false) {
return {
type,
icon,
isTop,
isHidden,
};
}
function createRoute(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute(), qs.parse(meta)),
};
}
function createPage(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute("page", "file"), qs.parse(meta)),
};
}
function createButton(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute("button", "file"), qs.parse(meta)),
};
}
export default createRoute;
export { createPage, createButton };

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css

@ -97,6 +97,7 @@ a.logo {
.el-form--inline .el-form-item__content { .el-form--inline .el-form-item__content {
width: 192px; width: 192px;
height: 32px;
} }
.el-table .cell { .el-table .cell {

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
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);
};
config.query.schema.properties.businessType.default="BeiJian";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
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);
};
config.query.schema.properties.businessType.default="BeiJian";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
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);
};
config.query.schema.properties.businessType.default = "YinDuJian";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
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);
};
config.query.schema.properties.businessType.default = "YinDuJian";
return { config, onCommand };
},
};

29
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js

@ -0,0 +1,29 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/input/jie-suan.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
if (businessType === "JisBBAC") {
config = useConfig("bbac_sa_service", "bbac_sa_detail_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_sa_service", "hbpo_sa_detail_service");
} else {
config = useConfig();
}
config.query.url = "settleaccount/bbac_sa_service/get-list";
config.edit.importUrl = "settleaccount/bbac_sa_service/import";
config.edit.exportUrl = "settleaccount/bbac_sa_detail_service/export";
config.edit.deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/input/bbac_sa_detail_service.js";
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);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/input/bbac_sa_service.js";
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);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/input/hbpo_sa_detail_service.js";
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);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/input/hbpo_sa_service.js";
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);
};
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
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);
};
config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
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);
};
config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
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);
};
config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
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);
};
config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
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);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
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);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
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);
};
config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
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);
};
config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
return { config, onCommand };
},
};
Loading…
Cancel
Save