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. 655
      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==='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==='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>
</template>
@ -30,6 +30,13 @@ export default {
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
</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'">
<el-date-picker
v-model="model[prop]"
@ -90,6 +97,12 @@ export default {
</template>
</template>
`,
styles: html`<style>
.form .el-tabs__header,
.form .el-tabs__item {
height: 32px;
}
</style>`,
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],
emit: ["update:modelValue"],
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">
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<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
:parentSchema="schema"
:schema="value"
@ -70,12 +70,15 @@ export default {
console.log(error);
}
};
// expose
const getProperties = (properties) => {
return Object.fromEntries(Object.entries(properties).sort(([, a], [, b]) => a.order - b.order));
};
context.expose({ validate, reset });
return {
model,
formRef,
loading,
getProperties,
errors,
reset,
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'"
v-if="item.meta.isTop"
@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>
<span>{{item.meta.title}}</span>
@ -94,7 +94,7 @@ export default {
<template v-else-if="item.oneToMany">
<el-table-column :prop="key" :label="item.title">
<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" />
</el-link>
</template>
@ -121,6 +121,12 @@ export default {
</template>
</el-table-column>
</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>
<slot name="columns"></slot>
@ -627,6 +633,16 @@ export default {
}
} else if (item.meta.pattern === "file") {
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 {
console.log(item);
}
@ -744,9 +760,13 @@ export default {
dialogVisible.value = false;
}
};
const showList = (value, nav, config) => {
const showList = async (value, nav, config) => {
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 = {
query: value,
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 businessType from "../../businessType.js";
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
version,
billNum: {
title: "结算单据",
state,
settleDate: {
title: "结算日期",
type: "string",
input: "dateTime",
},
dnBillNum: {
title: "出库单号",
groupNum: {
title: "结算分组号",
type: "string",
},
state: {
title: "状态",
deliveryDate: {
title: "到货日期",
type: "string",
input: "dateTime",
},
recordCount: {
title: "明细记录行数",
lu: {
title: "客户零件号",
type: "string",
},
site: {
title: "工厂地点",
qty: {
title: "结算数量",
type: "number",
},
pn: {
title: "生产号",
type: "string",
},
businessType,
},
};
const queryUrl = "settleaccount/bbac_sa_service/get-list";
const deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const importUrl = "settleaccount/bbac_sa_service/import";
const queryUrl = "settleaccount/pub_sa_detail_service/get-list";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function () {
return {
@ -44,7 +46,7 @@ export default function () {
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
filters: {
@ -68,15 +70,7 @@ export default function () {
},
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
default: [],
},
skipCount: {
hidden: true,
@ -89,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
@ -96,10 +94,6 @@ export default function () {
schema: schema,
},
edit: {
deleteUrl,
importUrl,
deleteMethod,
importMethod,
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 businessType from "../../businessType.js";
import state from "../../state.js";
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
version,
billNum: {
title: "结算单据",
type: "string",
},
dnBillNum: {
title: "出库单号",
type: "string",
},
state,
recordCount: {
title: "明细记录行数",
billNum: {
title: "结算单号",
type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
},
site: {
title: "工厂地点",
businessType: {
title: "业务类型",
type: "string",
hidden: true,
default: 0,
},
businessType,
},
};
const queryUrl = "settleaccount/hbpo_sa_service/get-list";
const deleteUrl = "settleaccount/hbpo_sa_service/delete-list";
const importUrl = "settleaccount/hbpo_sa_service/import";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function (service = "pub_sa_service", detailService = "pub_sa_detail_service") {
const queryUrl = `settleaccount/${service}/get-list`;
const deleteUrl = `settleaccount/${service}/delete-list`;
const importUrl = `settleaccount/${service}/import`;
const exportUrl = `settleaccount/${detailService}/export`;
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
filters: {
@ -87,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
@ -96,8 +96,10 @@ export default function () {
edit: {
deleteUrl,
importUrl,
exportUrl,
deleteMethod,
importMethod,
exportMethod,
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 { state2 as state, state3 } from "./state.js";
import { state2, state3 } from "./state.js";
import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js";
const state = Object.assign({}, state2);
state.input = "tabs";
const schema = {
title: "商务审批",
type: "object",
@ -96,6 +98,13 @@ export default function () {
value: null,
readOnly: true,
},
{
logic: "and",
column: "state",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {

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

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

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

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

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

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

@ -101,10 +101,11 @@ const refreshRouter = async () => {
// component
if (o.meta?.type === "page") {
if (!o.component) {
o.component = o.path;
o.component = o.meta.path ?? o.path;
}
if (o.component.constructor === String) {
o.component = () => import(`../views${o.meta.path}.js`);
const name = o.component;
o.component = () => import(`../views${name}.js`);
}
}
// 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 {
width: 192px;
height: 32px;
}
.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