Browse Source

update

master
wanggang 1 year ago
parent
commit
85f0efb588
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/.prettierrc.json
  2. 40
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  3. 9
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js
  4. 62
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  5. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
  6. 47
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/.prettierrc.json

@ -1,5 +1,5 @@
{
"printWidth": 120,
"printWidth": 180,
"tabWidth": 2,
"useTabs": false,
"semi": true,

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

@ -14,18 +14,13 @@ 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'||schema.input==='tabs'">{{options[model[prop]]?.label}}</template>
<template v-else-if="schema.input==='select'||schema.input==='tabs'">{{options.find(o=>o.value===model[prop])?.label}}</template>
<template v-else>{{model[prop]}}</template>
</template>
</template>
<template v-else>
<template v-if="getInput(schema)==='select'">
<el-select
v-model="model[prop]"
:placeholder="schema.placeholder??schema.title"
:multiple="!!schema.multiple"
:clearable="!!schema.clearable"
>
<el-select v-model="model[prop]" :placeholder="schema.placeholder??schema.title" :multiple="!!schema.multiple" :clearable="!!schema.clearable">
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
</template>
@ -36,38 +31,17 @@ export default {
</el-tabs>
<br />
</template>
<template
v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'||getInput(schema)==='datetimerange'"
>
<el-date-picker
v-model="model[prop]"
:type="schema.input"
:value-format="schema.format??'YYYY-MM-DD HH:mm:ss'"
/>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'||getInput(schema)==='datetimerange'">
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format??'YYYY-MM-DD HH:mm:ss'" />
</template>
<template v-else-if="getInput(schema)==='number'">
<el-input
:disabled="getDisabled()"
:placeholder="schema.placeholder??schema.title"
v-model="model[prop]"
type="number"
/>
<el-input :disabled="getDisabled()" :placeholder="schema.placeholder??schema.title" v-model="model[prop]" type="number" />
</template>
<template v-else-if="getInput(schema)==='integer'">
<el-input-number
:disabled="getDisabled()"
:placeholder="schema.placeholder??schema.title"
v-model="model[prop]"
:precision="0"
/>
<el-input-number :disabled="getDisabled()" :placeholder="schema.placeholder??schema.title" v-model="model[prop]" :precision="0" />
</template>
<template v-else-if="getInput(schema)==='boolean'">
<el-select
:disabled="getDisabled()"
v-model="model[prop]"
:placeholder="schema.placeholder??schema.title"
v-if="schema.nullable"
>
<el-select :disabled="getDisabled()" v-model="model[prop]" :placeholder="schema.placeholder??schema.title" v-if="schema.nullable">
<el-option prop="select" value="" :label="$t('select')" />
<el-option prop="true" :value="true" :label="$t('true')" />
<el-option prop="false" :value="false" :label="$t('false')" />

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

@ -10,14 +10,7 @@ export default {
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<template v-if="schema && schema.properties">
<template v-for="(value, prop) in getProperties(schema.properties)">
<app-form-item
:parentSchema="schema"
:schema="value"
v-model="model"
:prop="prop"
:mode="mode"
:errors="errors"
/>
<app-form-item :parentSchema="schema" :schema="value" v-model="model" :prop="prop" :mode="mode" :errors="errors" />
</template>
</template>
<slot></slot>

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

@ -20,16 +20,7 @@ export default {
<div v-loading="tableLoading">
<el-row>
<el-col>
<app-form
inline
mode="query"
label-position="left"
:schema="config.query.schema"
v-model="queryModel"
@submit="load"
:hideButton="true"
:isQueryForm="true"
>
<app-form inline mode="query" label-position="left" :schema="config.query.schema" v-model="queryModel" @submit="load" :hideButton="true" :isQueryForm="true">
<template v-for="item in filterList.filter(o=>!o.hidden&&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" />
@ -76,9 +67,7 @@ export default {
>
<el-table-column fixed="left" type="selection" :selectable="config.table.selectable" />
<el-table-column type="index" :label="$t('rowIndex')">
<template #default="scope">
{{ (pageModel.pageIndex - 1) * pageModel.pageSize + scope.$index + 1 }}
</template>
<template #default="scope"> {{ (pageModel.pageIndex - 1) * pageModel.pageSize + scope.$index + 1 }} </template>
</el-table-column>
<template v-for="(item,key) in config.table.schema.properties">
<template v-if="item.navigation">
@ -104,12 +93,7 @@ export default {
</template>
<template v-else>
<template v-if="showColumn(item,key)">
<el-table-column
:prop="key"
sortable="custom"
:sort-orders="['descending', 'ascending', null]"
:filters="getFilters(item,key)"
>
<el-table-column :prop="key" sortable="custom" :sort-orders="['descending', 'ascending', null]" :filters="getFilters(item,key)">
<template #header="scope">{{item.title}}</template>
<template #default="scope">
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
@ -185,9 +169,7 @@ export default {
<el-button type="primary" @click="columns.forEach(o=>o.checked=true)"> {{$t('selectAll')}} </el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="columns.forEach(o=>o.checked=!o.checked)">
{{$t('selectInverse')}}
</el-button>
<el-button type="primary" @click="columns.forEach(o=>o.checked=!o.checked)"> {{$t('selectInverse')}} </el-button>
</el-form-item>
<el-form-item v-for="item in columns">
<el-checkbox v-model="item.checked" :label="item.title" size="large" />
@ -204,12 +186,7 @@ export default {
</el-drawer>
<el-drawer v-model="subDrawer" destroy-on-close size="50%">
<el-scrollbar>
<app-list
v-if="subDrawer"
:query="subListQuery"
:buttons="subListQuery.buttons"
:config="subListQuery.config"
/>
<app-list v-if="subDrawer" :query="subListQuery" :buttons="subListQuery.buttons" :config="subListQuery.config" />
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
@ -217,12 +194,7 @@ export default {
</span>
</template>
</el-drawer>
<el-dialog
v-model="dialogVisible"
align-center
destroy-on-close
style="width:auto;min-width:500px;max-width:1000px;"
>
<el-dialog v-model="dialogVisible" align-center destroy-on-close style="width:auto;min-width:500px;max-width:1000px;">
<template #header> <span class="el-dialog__title"> {{editFormTitle}} </span> </template>
<el-row v-loading="editFormloading">
<el-col style="max-height:calc(100vh - 180px );min-height:100%;">
@ -286,21 +258,13 @@ export default {
<el-col :span="6">
<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"
/>
<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" 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-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="8" v-if="item.column">
@ -672,8 +636,7 @@ export default {
const valid = await editFormRef.value.validate();
if (valid) {
editFormloading.value = true;
let url =
(editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url;
let url = (editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url;
if (editFormMode.value === "update") {
url = format(url, editFormModel.value.id);
}
@ -883,12 +846,7 @@ export default {
return postData;
}
function isNotJit() {
return (
route.meta.businessType !== 3 ||
route.meta.businessType !== 4 ||
route.meta.businessType !== 7 ||
route.meta.businessType !== 8
);
return route.meta.businessType !== 3 || route.meta.businessType !== 4 || route.meta.businessType !== 7 || route.meta.businessType !== 8;
}
onMounted(async () => {
if (route.meta.children?.length) {

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js

@ -6,13 +6,7 @@ export default {
<div class="row">
<div class="cell el-table__cell" v-for="item in columns">
<div class="cell" style="text-align:center;" v-if="item.input==='selection'">
<input
class="el-checkbox__input"
type="checkbox"
v-model="checkAll"
:indeterminate="checkAllIndeterminate"
@click="checkAllClick($event)"
/>
<input class="el-checkbox__input" type="checkbox" v-model="checkAll" :indeterminate="checkAllIndeterminate" @click="checkAllClick($event)" />
</div>
<div class="cell" v-else-if="!item.hidden">{{item.title}}</div>
</div>

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

@ -18,11 +18,7 @@ function createInputFaYunShuJu(path, business, client, title = "发运数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/fa-yun",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("sync", "title=手动同步&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
],
children: [createButton("query", "title=查询&isTop=true"), createButton("sync", "title=手动同步&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
};
}
@ -30,10 +26,7 @@ function createInputEdiShuJu(path, business, client, title = "EDI数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/edi",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
],
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
};
}
// #endregion
@ -107,11 +100,7 @@ function createVmiCheck(path, business, client, title = "寄售库库存扣减
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/settle/finance",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=扣减审核通过&isTop=true"),
createButton("export", "title=导出&pattern=paged"),
],
children: [createButton("query", "title=查询&isTop=true"), createButton("compare", "title=扣减审核通过&isTop=true"), createButton("export", "title=导出&pattern=paged")],
};
}
@ -156,7 +145,7 @@ export default [
...createRoute("contrast", "title=数据比对"),
children: [
createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI与发运对比"),
createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac"),
createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI、发运与结算对比"),
],
},
{
@ -345,7 +334,7 @@ export default [
...createRoute("contrast", "title=数据比对"),
children: [
createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI与发运对比"),
createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo"),
createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI、发运与结算对比"),
],
},
{
@ -534,17 +523,12 @@ export default [
},
children: [
createInputJieSuanShuju("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 结算数据"),
createInputFaYunShuJu(
"bbac_jit_pub_se_detail_service",
"ZhiGongJianBBAC",
"bbac",
"直供件-BBAC 发运数据"
),
createInputFaYunShuJu("bbac_jit_pub_se_detail_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 发运数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac")],
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac", "直供件-BBAC EDI、发运与结算对比")],
},
{
...createRoute("settlement", "title=结算开票"),
@ -724,17 +708,12 @@ export default [
},
children: [
createInputJieSuanShuju("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 结算数据"),
createInputFaYunShuJu(
"hbpo_jit_pub_se_detail_service",
"ZhiGongJianHBPO",
"hbpo",
"直供件-HBPO 发运数据"
),
createInputFaYunShuJu("hbpo_jit_pub_se_detail_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 发运数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo")],
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO EDI、发运与结算对比")],
},
{
...createRoute("settlement", "title=结算开票"),
@ -929,7 +908,7 @@ export default [
},
{
...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bbac_md_pub_sa_detail_jobservice", "MaiDanJianBBAC", "bbac")],
children: [createCompareJieSuan("bbac_md_pub_sa_detail_jobservice", "MaiDanJianBBAC", "bbac", "买单件-BBAC EDI、发运与结算对比")],
},
],
},
@ -955,7 +934,7 @@ export default [
},
{
...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo")],
children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo", "买单件-HBPO EDI、发运与结算对比")],
},
{
...createRoute("settlement", "title=结算开票"),
@ -1142,7 +1121,7 @@ export default [
},
{
...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac")],
children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac", "备件-BBAC EDI、发运与结算对比")],
},
{
...createRoute("settlement", "title=结算开票"),
@ -1327,7 +1306,7 @@ export default [
},
{
...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac")],
children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac", "印度件-BBAC EDI、发运与结算对比")],
},
{
...createRoute("settlement", "title=结算开票"),

Loading…
Cancel
Save