Browse Source

更改发运后端调用接口

master
wanggang 1 year ago
parent
commit
ed4aee8ffc
  1. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
  2. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
  3. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js

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

@ -3,40 +3,40 @@ import { reactive, ref } from "vue";
export default { export default {
template: html`<div class="app-table el-table" ref="tableRef"> template: html`<div class="app-table el-table" ref="tableRef">
<div class="row"> <div class="row header">
<template v-for="(item,key) in columns.properties"> <template v-for="(item,key) in columns.properties">
<div class="cell el-table__cell" v-if="item.input==='selection'"> <div class="cell el-table__cell selection" v-if="item.input==='selection'">
<div class="cell" style="text-align:center;"> <div class="cell" style="text-align:center;">
<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>
</div> </div>
<template v-else-if="item.type==='object'"> <template v-else-if="item.type==='object'">
<template v-for="(item2,key2) in item.properties"> <template v-for="(item2,key2) in item.properties">
<div class="cell el-table__cell" v-if="!item2.hidden"> <div class="cell el-table__cell" :class="key+'.'+key2" v-if="!item2.hidden">
<div class="cell">{{item2.title}}</div> <div class="cell">{{item2.title}}</div>
</div> </div>
</template> </template>
</template> </template>
<div class="cell el-table__cell" v-else-if="!item.hidden"> <div class="cell el-table__cell" :class="key" v-else-if="!item.hidden">
<div class="cell">{{item.title}}</div> <div class="cell">{{item.title}}</div>
</div> </div>
</template> </template>
</div> </div>
<div v-for="(row,index) in data" class="row"> <div v-for="(row,index) in data" class="row">
<template v-for="(item,key) in columns.properties"> <template v-for="(item,key) in columns.properties">
<div class="cell el-table__cell" v-if="item.input==='selection'"> <div class="cell el-table__cell selection" v-if="item.input==='selection'">
<div class="cell" style="text-align:center;" v-if="item.input==='selection'"> <div class="cell" style="text-align:center;" v-if="item.input==='selection'">
<input class="el-checkbox__input row" type="checkbox" :value="index" @click="checkClick" /> <input class="el-checkbox__input row" type="checkbox" :value="index" @click="checkClick" />
</div> </div>
</div> </div>
<template v-else-if="item.type==='object'"> <template v-else-if="item.type==='object'">
<template v-for="(item2,key2) in item.properties"> <template v-for="(item2,key2) in item.properties">
<div class="cell el-table__cell" v-if="!item2.hidden"> <div class="cell el-table__cell" :class="key+'.'+key2" v-if="!item2.hidden">
<div class="cell" v-if="row[key]&&!item.hidden">{{row[key][key2]}}</div> <div class="cell" v-if="row[key]&&!item.hidden">{{row[key][key2]}}</div>
</div> </div>
</template> </template>
</template> </template>
<div class="cell el-table__cell" v-else-if="!item.hidden"> <div class="cell el-table__cell" :class="key" v-else-if="!item.hidden">
<div class="cell">{{row[key]}}</div> <div class="cell">{{row[key]}}</div>
</div> </div>
</template> </template>

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js

@ -312,19 +312,16 @@ const schema2 = {
export default function (businessType) { export default function (businessType) {
let schema = null; let schema = null;
let service = null; let service = null;
let syncService = null; const syncService = "hand-se-sync/sync";
if (businessType === "JisBBAC") { if (businessType === "JisBBAC") {
schema = schema1; schema = schema1;
service = "bbac_se_detail_service"; service = "bbac_se_detail_service";
syncService = "bbacse-sync/invoke";
} else if (businessType === "JisHBPO") { } else if (businessType === "JisHBPO") {
schema = schema1; schema = schema1;
service = "hbpo_se_detail_service"; service = "hbpo_se_detail_service";
syncService = "hbpose-sync/invoke";
} else { } else {
schema = schema2; schema = schema2;
service = "pub_se_detail_service"; service = "pub_se_detail_service";
syncService = "hand-se-sync/sync";
} }
const queryUrl = `settleaccount/${service}/get-list`; const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`; const exportUrl = `settleaccount/${service}/export`;

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js

@ -1,13 +1,15 @@
import AppList from "../../components/list/index.js"; import AppList from "../../components/list/index.js";
import html from "html"; import html from "html";
import { ref } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import useConfig from "../../models/input/fa-yun.js"; import useConfig from "../../models/input/fa-yun.js";
import request from "../../request/index.js"; import request from "../../request/index.js";
export default { export default {
components: { AppList }, components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`, template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
setup() { setup() {
const appListRef = ref(null);
const route = useRoute(); const route = useRoute();
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
const config = useConfig(businessType); const config = useConfig(businessType);
@ -16,9 +18,9 @@ export default {
if (item.path === "sync") { if (item.path === "sync") {
const url = config.edit.syncUrl; const url = config.edit.syncUrl;
const method = config.edit.syncMethod; const method = config.edit.syncMethod;
await request(url, route.meta.businessType, { method }); await appListRef.value.action(async () => await request(url, route.meta.businessType, { method }), `确认手动同步吗?`);
} }
}; };
return { config, onCommand }; return { appListRef, config, onCommand };
}, },
}; };

Loading…
Cancel
Save