mahao 1 year ago
parent
commit
9175f8f0d0
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js
  2. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/user.js
  3. 291
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 65
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
  5. 12
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  6. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/store/app.js
  7. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  8. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js
  9. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/login.js
  10. 75
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js

@ -1,5 +1,3 @@
import { get, post } from "../request/index.js";
async function getLocalizationAsync() { async function getLocalizationAsync() {
// const url = "abp/application-configuration"; // const url = "abp/application-configuration";
// const data = (await get(url, null, null, true, true)).data; // const data = (await get(url, null, null, true, true)).data;

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/user.js

@ -1,9 +1,7 @@
import router from "../router/index.js"; import router from "../router/index.js";
import request, { get, post } from "../request/index.js"; import request from "../request/index.js";
import jwt_decode from "../lib/jwt-decode/jwt-decode.esm.js"; import jwt_decode from "../lib/jwt-decode/jwt-decode.esm.js";
import qs from "../lib/qs/shim.js";
import { useAppStore } from "../store/index.js"; import { useAppStore } from "../store/index.js";
import { refreshRouter } from "../router/index.js";
import Enumerable from "linq"; import Enumerable from "linq";
import { connection } from "../signalr/index.js"; import { connection } from "../signalr/index.js";

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

@ -1,10 +1,9 @@
import html, { getProp } from "html"; import html, { getProp } from "html";
import request, { get, getUrl, post } from "../../request/index.js"; import request, { getUrl } from "../../request/index.js";
import { defineAsyncComponent, ref, reactive, onMounted, watch } from "vue"; import { defineAsyncComponent, ref, reactive, onMounted, watch, nextTick } from "vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { listToTree, schemaToModel, importFunction, format } from "../../utils/index.js"; import { listToTree, schemaToModel, importFunction, format } from "../../utils/index.js";
import qs from "../../lib/qs/shim.js";
import { camelCase, capitalize } from "lodash"; import { camelCase, capitalize } from "lodash";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
@ -17,153 +16,146 @@ export default {
AppFormInput: defineAsyncComponent(() => import("../form/form-input.js")), AppFormInput: defineAsyncComponent(() => import("../form/form-input.js")),
}, },
template: html` template: html`
<div v-loading="tableLoading"> <div class="c-list" v-loading="tableLoading" style="height:100%;">
<el-row> <div style="height:calc(100% - 52px);">
<el-col> <el-scrollbar ref="listScrollbarRef" :always="true" style="height:100%;">
<app-form inline mode="query" label-position="left" :schema="config.query.schema" v-model="queryModel" @submit="load" :hideButton="true" :isQueryForm="true"> <el-row style="padding-bottom:20px;">
<template v-for="item in filterList.filter(o=>!o.hidden&&o.readOnly)"> <el-col>
<el-form-item :label="config.edit.schema.properties[item.column].title"> <app-form inline mode="query" label-position="left" :schema="config.query.schema" v-model="queryModel" @submit="load" :hideButton="true" :isQueryForm="true">
<app-form-input v-model="item" :schema="config.edit.schema.properties[item.column]" prop="value" /> <template v-for="item in filterList.filter(o=>!o.hidden&&o.readOnly)">
</el-form-item> <el-form-item :label="config.edit.schema.properties[item.column].title">
</template> <app-form-input v-model="item" :schema="config.edit.schema.properties[item.column]" prop="value" />
</app-form> </el-form-item>
</el-col>
</el-row>
<el-row style="padding-bottom:20px;">
<el-col>
<template v-for="item in buttons">
<el-button
:class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop"
@click="click(item,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>
</el-button>
</template>
<el-button @click="click('filter',selectedRows)" v-if="config.query.hasFilter">
<el-icon><ep-filter /></el-icon>
<span>{{$t('筛选')}}</span>
</el-button>
<slot name="tableButtons" :rows="selectedRows"></slot>
</el-col>
</el-row>
<el-row>
<el-col>
<el-scrollbar>
<el-table
:key="tableKey"
ref="tableRef"
:tree-props="treeProps"
:data="tableData"
@selection-change="handleSelectionChange"
@sort-change="sortChange"
:header-cell-class-name="getClass"
row-key="id"
table-layout="auto"
border
fit
>
<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>
</el-table-column>
<template v-for="(item,key) in config.table.schema.properties">
<template v-if="item.navigation">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">{{getProp(scope.row,item.navigation)}}</template>
</el-table-column>
</template> </template>
<template v-else-if="item.oneToMany"> </app-form>
<el-table-column :prop="key" :label="item.title"> <template v-for="item in buttons">
<el-button
:class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop"
@click="click(item,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>
</el-button>
</template>
<el-button @click="click('filter',selectedRows)" v-if="config.query.hasFilter">
<el-icon><ep-filter /></el-icon>
<span>{{$t('筛选')}}</span>
</el-button>
<slot name="tableButtons" :rows="selectedRows"></slot>
</el-col>
</el-row>
<el-table
:key="tableKey"
ref="tableRef"
:tree-props="treeProps"
:data="tableData"
@selection-change="handleSelectionChange"
@sort-change="sortChange"
:header-cell-class-name="getClass"
row-key="id"
table-layout="auto"
border
fit
style="width:calc(100% - 26px);"
>
<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>
</el-table-column>
<template v-for="(item,key) in config.table.schema.properties">
<template v-if="item.navigation">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">{{getProp(scope.row,item.navigation)}}</template>
</el-table-column>
</template>
<template v-else-if="item.oneToMany">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">
<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>
</el-table-column>
</template>
<template v-else-if="item.link">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">
<el-link type="primary" @click="click({path:key},[scope.row])"> {{scope.row[key]}} </el-link>
</template>
</el-table-column>
</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)">
<template #header="scope">{{item.title}}</template>
<template #default="scope"> <template #default="scope">
<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>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-else-if="item.link"> </template>
<el-table-column :prop="key" :label="item.title"> <template v-if="item.type==='object'">
<template v-for="(item2,key2) in item['properties']">
<el-table-column :prop="key+'.'+key2">
<template #header="scope">{{item2.title}}</template>
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="click({path:key},[scope.row])"> {{scope.row[key]}} </el-link> <app-form-input mode="details" :schema="item2" :prop="key+'.'+key2" v-model="scope.row[key]" />
{{scope.row[key][key2]}}
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-else> </template>
<template v-if="showColumn(item,key)"> </template>
<el-table-column :prop="key" sortable="custom" :sort-orders="['descending', 'ascending', null]" :filters="getFilters(item,key)"> <slot name="columns"></slot>
<template #header="scope">{{item.title}}</template> <el-table-column fixed="right">
<template #default="scope"> <template #header>
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" /> <el-button @click="filterDrawer = true">
</template> {{$t('operations')}}
</el-table-column> <el-icon class="el-icon--right"><ep-filter /></el-icon>
</template> </el-button>
</template> </template>
<template v-if="item.type==='object'"> <template #default="scope">
<template v-for="(item2,key2) in item['properties']"> <div class="flex">
<el-table-column :prop="key+'.'+key2"> <template v-for="item in buttons">
<template #header="scope">{{item2.title}}</template> <el-button
<template #default="scope"> :class="item.meta.htmlClass??'el-button--primary'"
<app-form-input mode="details" :schema="item2" :prop="key+'.'+key2" v-model="scope.row[key]" /> v-if="!item.meta.isTop"
{{scope.row[key][key2]}} @click="click(item,[scope.row])"
</template> :disabled="item.meta.disabled && item.meta.disabled(scope.row)"
</el-table-column> >
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span>
</el-button>
</template> </template>
</template> <slot name="rowButtons" :rows="[scope.row]"></slot>
</div>
</template> </template>
<slot name="columns"></slot> </el-table-column>
<el-table-column fixed="right"> </el-table>
<template #header> </el-scrollbar>
<el-button @click="filterDrawer = true"> </div>
{{$t('operations')}} <div style="height:52px;padding-top:20px;">
<el-icon class="el-icon--right"><ep-filter /></el-icon> <el-scrollbar>
</el-button>
</template>
<template #default="scope">
<div class="flex">
<template v-for="item in buttons">
<el-button
:class="item.meta.htmlClass??'el-button--primary'"
v-if="!item.meta.isTop"
@click="click(item,[scope.row])"
:disabled="item.meta.disabled && item.meta.disabled(scope.row)"
>
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span>
</el-button>
</template>
<slot name="rowButtons" :rows="[scope.row]"></slot>
</div>
</template>
</el-table-column>
</el-table>
</el-scrollbar>
</el-col>
</el-row>
<el-row>
<el-col>
<el-pagination <el-pagination
v-model:currentPage="pageModel.pageIndex" v-model:currentPage="pageModel.pageIndex"
v-model:page-size="pageModel.pageSize" v-model:page-size="pageModel.pageSize"
:total="pageModel.total" :total="pageModel.total"
:page-sizes="pageModel.sizeList" :page-sizes="pageModel.sizeList"
class="justify-end"
:background="true" :background="true"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="onPageSizeChange" @size-change="onPageSizeChange"
@current-change="onPageIndexChange" @current-change="onPageIndexChange"
style="margin-top:20px"
/> />
</el-col> </el-scrollbar>
</el-row> </div>
</div> </div>
<el-drawer v-model="filterDrawer" :close-on-click-modal="false" destroy-on-close @close="tableRef.doLayout()"> <el-drawer v-model="filterDrawer" :close-on-click-modal="false" destroy-on-close @close="tableRef.doLayout()">
<template #header> <span class="el-dialog__title"> {{$t('filter')}} </span> </template> <template #header> <span class="el-dialog__title"> {{$t('filter')}} </span> </template>
<el-scrollbar> <el-scrollbar>
<el-row> <el-row>
<el-col style="max-height:calc(100vh - 180px);"> <el-col style="max-height:calc(100% - 180px);">
<el-form inline> <el-form inline>
<el-form-item> <el-form-item>
<el-button type="primary" @click="columns.forEach(o=>o.checked=true)"> {{$t('selectAll')}} </el-button> <el-button type="primary" @click="columns.forEach(o=>o.checked=true)"> {{$t('selectAll')}} </el-button>
@ -197,7 +189,7 @@ export default {
<el-dialog v-model="dialogVisible" align-center destroy-on-close :close-on-click-modal="false" style="width:auto;min-width:500px;max-width:1000px;"> <el-dialog v-model="dialogVisible" align-center destroy-on-close :close-on-click-modal="false" style="width:auto;min-width:500px;max-width:1000px;">
<template #header> <span class="el-dialog__title"> {{editFormTitle}} </span> </template> <template #header> <span class="el-dialog__title"> {{editFormTitle}} </span> </template>
<el-row v-loading="editFormloading"> <el-row v-loading="editFormloading">
<el-col style="max-height:calc(100vh - 180px );min-height:100%;"> <el-col style="max-height:calc(100% - 180px );min-height:100%;">
<el-scrollbar> <el-scrollbar>
<template v-if="editFormMode==='create'||editFormMode==='update'||editFormMode==='details'"> <template v-if="editFormMode==='create'||editFormMode==='update'||editFormMode==='details'">
<app-form <app-form
@ -326,6 +318,7 @@ export default {
props: ["modelValue", "config", "querySchema", "query", "buttons"], props: ["modelValue", "config", "querySchema", "query", "buttons"],
emits: ["command"], emits: ["command"],
setup(props, context) { setup(props, context) {
const listScrollbarRef = ref(null);
/*变量定义*/ /*变量定义*/
// 配置 // 配置
const config = reactive(props.config); const config = reactive(props.config);
@ -466,6 +459,10 @@ export default {
pageModel.total = listData.totalCount; pageModel.total = listData.totalCount;
//data.value = listData; //data.value = listData;
tableKey.value = !tableKey.value; tableKey.value = !tableKey.value;
nextTick(() => {
tableRef.value.doLayout();
nextTick(() => listScrollbarRef.value.update());
});
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} finally { } finally {
@ -483,13 +480,6 @@ export default {
if (item.path === "query") { if (item.path === "query") {
//list //list
await load(); await load();
} else if (item.path === "details") {
//details
const url = `${baseUrl}/${item.path}?${qs.stringify({ id: rows[0].id })}`;
editFormSchema.value = (await get(url)).data;
editFormModel.value = (await post(url)).data;
editFormTitle.value = `${config.edit.schema.title}${t("details")}`;
dialogVisible.value = true;
} else if (item.path === "create" || item.path === "update") { } else if (item.path === "create" || item.path === "update") {
//create //create
if (item.path === "create") { if (item.path === "create") {
@ -519,17 +509,11 @@ export default {
rows.map((o) => o.id), rows.map((o) => o.id),
{ method: config.edit.deleteMethod } { method: config.edit.deleteMethod }
); );
if (!response.errors) {
ElMessage({
type: "info",
message: "操作完毕",
});
}
} catch (error) { } catch (error) {
if (error === "cancel") { if (error === "cancel") {
ElMessage({ ElMessage({
type: "info", type: "info",
message: "删除取消", message: "操作取消",
}); });
} }
} finally { } finally {
@ -542,15 +526,11 @@ export default {
type: "warning", type: "warning",
}); });
await request(url, null, { method: config.edit.deleteMethod }); await request(url, null, { method: config.edit.deleteMethod });
ElMessage({
type: "info",
message: "操作完毕",
});
} catch (error) { } catch (error) {
if (error === "cancel") { if (error === "cancel") {
ElMessage({ ElMessage({
type: "info", type: "info",
message: "删除取消", message: "操作取消",
}); });
} }
} }
@ -699,11 +679,6 @@ export default {
link.click(); link.click();
window.URL.revokeObjectURL(downloadUrl); window.URL.revokeObjectURL(downloadUrl);
}; };
const getImportTemplate = async () => {
const url = `${baseUrl}/${editFormMode.value}`;
const response = await get(url);
download(url, response.filename);
};
const getButtonDisabled = async (src, row) => { const getButtonDisabled = async (src, row) => {
if (src) { if (src) {
const method = await importFunction(src); const method = await importFunction(src);
@ -719,10 +694,6 @@ export default {
value: null, value: null,
}); });
}; };
const logic = [
{ value: "and", label: "且" },
{ value: "or", label: "或" },
];
const operators = [ const operators = [
{ {
value: "equal", value: "equal",
@ -825,13 +796,11 @@ export default {
result = method(); result = method();
} }
if (!result.errors) { if (!result.errors) {
await ElMessage({ if (!result.data?.code || result.data.code === 200) {
type: "info", if (reload) {
message: successMessage, pageModel.pageIndex = 1;
}); await load();
if (reload) { }
pageModel.pageIndex = 1;
await load();
} }
} }
} catch (error) { } catch (error) {
@ -865,6 +834,7 @@ export default {
} }
}); });
return { return {
listScrollbarRef,
load, load,
action, action,
config, config,
@ -890,7 +860,6 @@ export default {
getClass, getClass,
sortChange, sortChange,
getProp, getProp,
getImportTemplate,
importFormRef, importFormRef,
editFormRef, editFormRef,
editFormloading, editFormloading,

65
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js

@ -3,7 +3,7 @@ import { isLogin } from "../api/user.js";
import { useAppStore } from "../store/index.js"; import { useAppStore } from "../store/index.js";
import { getFileName } from "../utils/index.js"; import { getFileName } from "../utils/index.js";
import settings from "../config/settings.js"; import settings from "../config/settings.js";
import { ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
// const requestSettings = { // const requestSettings = {
// baseURL: "/api", // baseURL: "/api",
@ -23,15 +23,6 @@ const getUrl = (url) => {
} }
let result = settings.baseURL; let result = settings.baseURL;
return (result += `/${url}`); return (result += `/${url}`);
// let result = requestSettings.baseURL;
// if (withoutCulture) {
// result += `/${url}`;
// } else {
// const appStore = useAppStore();
// result += withoutCulture ? "/" : `/${appStore.localization.locale}/`;
// result += url;
// }
// return result;
}; };
const getResult = async (response) => { const getResult = async (response) => {
@ -70,52 +61,6 @@ const getResult = async (response) => {
return result; return result;
}; };
const get = async (url, data, options, withoutToken = false) => {
url = getUrl(url);
if (data) {
url = `${url}?${qs.stringify(data)}`;
}
const defaultOptions = {
headers: { "Accept-Language": "zh-Hans" },
};
if (options) {
Object.assign(defaultOptions, options);
}
if (!withoutToken) {
await addToken(defaultOptions);
}
const response = await fetch(url, defaultOptions);
return getResult(response);
};
const post = async (url, data, options, withoutToken = false) => {
url = getUrl(url);
let defaultOptions = {
method: "POST",
headers: { "Accept-Language": "zh-Hans" },
};
if (!(data instanceof FormData)) {
defaultOptions.headers["Content-Type"] = "application/json";
}
if (options) {
Object.assign(defaultOptions, options);
}
if (data && !defaultOptions.body) {
if (defaultOptions.headers["Content-Type"]?.startsWith("application/x-www-form-urlencoded")) {
defaultOptions.body = qs.stringify(data);
} else if (defaultOptions.headers["Content-Type"]?.startsWith("application/json")) {
defaultOptions.body = JSON.stringify(data);
} else {
defaultOptions.body = data;
}
}
if (!withoutToken) {
await addToken(defaultOptions);
}
const response = await fetch(url, defaultOptions);
return getResult(response);
};
async function request(url, data, options, withoutToken = false) { async function request(url, data, options, withoutToken = false) {
url = getUrl(url); url = getUrl(url);
let defaultOptions = { let defaultOptions = {
@ -146,8 +91,14 @@ async function request(url, data, options, withoutToken = false) {
await addToken(defaultOptions); await addToken(defaultOptions);
} }
const response = await fetch(url, defaultOptions); const response = await fetch(url, defaultOptions);
// if (!result.data?.code || result.data.code === 200) {
// ElMessage({
// type: "success",
// message: "操作成功",
// });
// }
return getResult(response); return getResult(response);
} }
export default request; export default request;
export { get, post, getUrl }; export { getUrl };

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

@ -192,7 +192,7 @@ export default [
}, },
{ {
...createRoute("contrast", "title=数据比对"), ...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac", "直供件-BBAC EDI、发运与结算对比")], children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 发运与结算对比")],
}, },
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
@ -217,7 +217,7 @@ export default [
}, },
{ {
...createRoute("contrast", "title=数据比对"), ...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO EDI、发运与结算对比")], children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 发运与结算对比")],
}, },
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
@ -247,7 +247,7 @@ export default [
}, },
{ {
...createRoute("contrast", "title=数据比对"), ...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bbac_md_pub_sa_detail_jobservice", "MaiDanJianBBAC", "bbac", "买单件-BBAC EDI、发运与结算对比")], children: [createCompareJieSuan("bbac_md_pub_sa_detail_jobservice", "MaiDanJianBBAC", "bbac", "买单件-BBAC 发运与结算对比")],
}, },
], ],
}, },
@ -263,7 +263,7 @@ export default [
}, },
{ {
...createRoute("contrast", "title=数据比对"), ...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo", "买单件-HBPO EDI、发运与结算对比")], children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 发运与结算对比")],
}, },
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
@ -290,7 +290,7 @@ export default [
}, },
{ {
...createRoute("contrast", "title=数据比对"), ...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac", "备件-BBAC EDI、发运与结算对比")], children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac", "备件-BBAC 发运与结算对比")],
}, },
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),
@ -315,7 +315,7 @@ export default [
}, },
{ {
...createRoute("contrast", "title=数据比对"), ...createRoute("contrast", "title=数据比对"),
children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac", "印度件-BBAC EDI、发运与结算对比")], children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac", "印度件-BBAC 发运与结算对比")],
}, },
{ {
...createRoute("settlement", "title=结算开票"), ...createRoute("settlement", "title=结算开票"),

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/store/app.js

@ -1,7 +1,6 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import settings from "../config/settings.js"; import settings from "../config/settings.js";
import { getAccessToken, getUser, isLogin } from "../api/user.js"; import { getAccessToken, getUser, isLogin } from "../api/user.js";
import { get, post } from "../request/index.js";
import { refreshRouter } from "../router/index.js"; import { refreshRouter } from "../router/index.js";
import { getLocalizationAsync } from "../api/site.js"; import { getLocalizationAsync } from "../api/site.js";

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

@ -50,7 +50,7 @@ a {
} }
.el-main { .el-main {
min-height: calc(100% - 100px); height: calc(100% - 100px);
overflow: auto; overflow: auto;
} }

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/centralized-control.js

@ -15,7 +15,7 @@ export default {
const onCommand = async (item, rows, load) => { const onCommand = async (item, rows, load) => {
if (item.path === "open-version" || item.path === "closed-version") { if (item.path === "open-version" || item.path === "closed-version") {
try { try {
await ElMessageBox.confirm(format(`确认${item.path === "open-version" ? "启用" : "停用"}选中的%s行数据吗?`, rows.length), "提示", { await ElMessageBox.confirm(`确认${item.path === "open-version" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, "提示", {
type: "warning", type: "warning",
}); });
const url = `${config.baseUrl}/${item.path}`; const url = `${config.baseUrl}/${item.path}`;
@ -24,7 +24,6 @@ export default {
rows.map((o) => o.id), rows.map((o) => o.id),
{ method: "POST" } { method: "POST" }
); );
console.log(context);
await load(); await load();
} catch (error) { } catch (error) {
if (error === "cancel") { if (error === "cancel") {

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/login.js

@ -35,7 +35,7 @@ export default {
try { try {
const url = "base/token"; const url = "base/token";
const appStore = useAppStore(); const appStore = useAppStore();
const result = await request(url, model, { method: "POST" }, true); const result = await request(url, model, { method: "POST" });
if (!result.errors) { if (!result.errors) {
appStore.token = result.data.accessToken; appStore.token = result.data.accessToken;
if (appStore.token) { if (appStore.token) {

75
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -7,12 +7,13 @@ import AppTable from "../../components/table/index.js";
import extraProperties from "../../models/_extraProperties.js"; import extraProperties from "../../models/_extraProperties.js";
import { getUrl } from "../../request/index.js"; import { getUrl } from "../../request/index.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import businessTypes from "../../models/_options.js";
export default { export default {
components: { AppForm, AppTable }, components: { AppForm, AppTable },
template: html`<el-drawer v-if="refreshRef" v-model="show" destroy-on-close size="50%" class="page-drawer" :close-on-click-modal="false"> template: html`<el-drawer v-if="refreshRef" v-model="show" destroy-on-close size="50%" class="page-drawer" :close-on-click-modal="false">
<template #header> <span class="el-dialog__title"> 结算明细 </span> </template> <template #header> <span class="el-dialog__title"> 结算明细 </span> </template>
<el-row style="height:calc(100vh - 160px);" v-loading="loading"> <el-row style="height:calc(100% - 160px);" v-loading="loading">
<el-col> <el-col>
<el-tabs> <el-tabs>
<el-tab-pane :label="columns1.title" v-if="model.invoicE_MAP_GROUP.length"> <el-tab-pane :label="columns1.title" v-if="model.invoicE_MAP_GROUP.length">
@ -51,6 +52,7 @@ export default {
<el-step title="调整明细列表" /> <el-step title="调整明细列表" />
<el-step title="发票明细对比" /> <el-step title="发票明细对比" />
<el-step title="发票预览" /> <el-step title="发票预览" />
<el-step title="重开成功" />
</el-steps> </el-steps>
<div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);"> <div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);">
<el-row style="padding:14px 0;height:60px;"> <el-row style="padding:14px 0;height:60px;">
@ -82,28 +84,38 @@ export default {
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);background:#ebeef5;"> <div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;"> <el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;"> <el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar> <el-scrollbar>
<h2>发票预览</h2> <el-descriptions>
<div>{{setup3Model}}</div> <el-descriptions-item label="发票号">{{setup3Model.invbillNum}}</el-descriptions-item>
<el-descriptions-item label="业务类型">{{businessTypes.options.find(o=>o.value===setup3Model.businesType)?.label}}</el-descriptions-item>
<el-descriptions-item label="未税金额">{{setup3Model.tax}}</el-descriptions-item>
<el-descriptions-item label="税额">{{setup3Model.businesType}}</el-descriptions-item>
<el-descriptions-item label="税率">{{setup3Model.businesType}}</el-descriptions-item>
</el-descriptions>
<app-table :data="setup3Model.detail" :columns="setup2columns" />
</el-scrollbar> </el-scrollbar>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);background:#ebeef5;"> <div class="setup4" v-show="setupRef===4" style="height:calc(100% - 60px);">
<el-row style="width:100%;height:100%;padding:10px;"> <el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;"> <el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar> <el-scrollbar>
<h2>完成</h2> <el-result icon="success" title="重开完成">
<template #extra>
<el-button type="primary" @click="next">返回</el-button>
</template>
</el-result>
</el-scrollbar> </el-scrollbar>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<template #footer> <template #footer v-if="setupRef!==4">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="setupRef-=1" v-if="setupRef>1">上一步</el-button> <el-button type="primary" @click="setupRef-=1" v-if="setupRef>1&&setupRef<4">上一步</el-button>
</span> </span>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="next" v-if="setupRef<3">下一步</el-button> <el-button type="primary" @click="next" v-if="setupRef<3">下一步</el-button>
@ -143,12 +155,12 @@ export default {
styles: html` <style> styles: html` <style>
.page-drawer .el-tab-pane { .page-drawer .el-tab-pane {
width: 100%; width: 100%;
height: calc(100vh - 160px); height: calc(100% - 160px);
} }
.page-drawer .el-tabs__content, .page-drawer .el-tabs__content,
.page-drawer .el-scrollbar { .page-drawer .el-scrollbar {
width: 100%; width: 100%;
height: calc(100vh - 160px - 40px); height: calc(100% - 160px - 40px);
} }
.re-open .el-dialog__footer { .re-open .el-dialog__footer {
display: flex; display: flex;
@ -319,6 +331,35 @@ export default {
}, },
}, },
}; };
const setup3columns = {
properties: {
lu: {
type: "string",
title: "结算系统发票号",
},
lu: {
type: "string",
title: "发票日期",
input: "datetime",
},
lu: {
type: "string",
title: "零件号",
},
qty: {
type: "number",
title: "发票数量",
},
price: {
type: "number",
title: "发票价格",
},
amt: {
type: "number",
title: "发票未税金额",
},
},
};
delete columns5.properties["oldInvBillNum"]; delete columns5.properties["oldInvBillNum"];
delete columns5.properties["invGroupNum"]; delete columns5.properties["invGroupNum"];
//显示重开发票对话框 //显示重开发票对话框
@ -331,7 +372,9 @@ export default {
const importDialogVisible = ref(false); const importDialogVisible = ref(false);
const setup2table1Ref = ref(null); const setup2table1Ref = ref(null);
const setup2table2Ref = ref(null); const setup2table2Ref = ref(null);
const setup3Model = ref(null); const setup3Model = ref({
detail: [],
});
const showSetupDialog = () => { const showSetupDialog = () => {
//重开发票号 //重开发票号
//invBillNum= //invBillNum=
@ -504,7 +547,7 @@ export default {
} else if (result.data?.code === 400) { } else if (result.data?.code === 400) {
ElMessage({ ElMessage({
type: "error", type: "error",
message: "校验失败", message: "操作失败",
}); });
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`)); window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
} }
@ -516,7 +559,7 @@ export default {
let service = null; let service = null;
if (props.businessType === "JisBBAC") { if (props.businessType === "JisBBAC") {
service = "bbac_ba_service"; service = "bbac_ba_service";
} else if (bprops.usinessType === "JisHBPO") { } else if (props.usinessType === "JisHBPO") {
service = "hbpo_ba_service"; service = "hbpo_ba_service";
} else { } else {
service = "pub_ba_service"; service = "pub_ba_service";
@ -531,7 +574,7 @@ export default {
} else if (result.data?.code === 400 && result.data.fileName) { } else if (result.data?.code === 400 && result.data.fileName) {
ElMessage({ ElMessage({
type: "error", type: "error",
message: "提交失败", message: "操作失败",
}); });
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`)); window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
} }
@ -545,7 +588,7 @@ export default {
} else if (result.data?.code === 400 && result.data.fileName) { } else if (result.data?.code === 400 && result.data.fileName) {
ElMessage({ ElMessage({
type: "error", type: "error",
message: "提交失败", message: "操作失败",
}); });
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`)); window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
} }
@ -584,6 +627,7 @@ export default {
columns4, columns4,
columns5, columns5,
setup2columns, setup2columns,
setup3columns,
showSetupDialog, showSetupDialog,
setupRef, setupRef,
setupDialogVisable, setupDialogVisable,
@ -608,6 +652,7 @@ export default {
setup2table2Ref, setup2table2Ref,
refreshRef, refreshRef,
setup3Model, setup3Model,
businessTypes,
}; };
}, },
}; };

Loading…
Cancel
Save