mahao 1 year ago
parent
commit
b20cd55013
  1. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs
  2. 56
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  3. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
  4. 12
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
  5. 23
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
  6. 112
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
  7. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
  8. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  9. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
  10. 58
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  11. 37
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
  12. 20
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
  13. 24
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
  14. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
  15. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js
  16. 79
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  17. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  18. 29
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  19. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs

@ -1,3 +1,5 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR;
using SettleAccount.Job.SignalR;
@ -20,10 +22,10 @@ namespace Win.Sfs.SettleAccount.Controllers
return File("~/index.html", "text/html");
}
public IActionResult Test()
public async Task<string> Test(int seconds)
{
this._hubContext.Clients.All.ServerToClient("test", "hello", "");
return Json("ok");
await Task.Delay(seconds*1000).ConfigureAwait(false);
return "ok";
}
}
}

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

@ -159,7 +159,7 @@ export default {
</el-col>
</el-row>
</div>
<el-drawer v-model="filterDrawer" 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>
<el-scrollbar>
<el-row>
@ -184,7 +184,7 @@ export default {
</span>
</template>
</el-drawer>
<el-drawer v-model="subDrawer" destroy-on-close size="50%">
<el-drawer :close-on-click-modal="false" v-model="subDrawer" destroy-on-close size="50%">
<el-scrollbar>
<app-list v-if="subDrawer" :query="subListQuery" :buttons="subListQuery.buttons" :config="subListQuery.config" />
</el-scrollbar>
@ -556,40 +556,7 @@ export default {
}
}
await load();
} else if (item.path === "check") {
const urls = new Map();
urls.set("JisBBAC", "settleaccount/bbac_ba_service/generate-invoice");
urls.set("JisHBPO", "settleaccount/hbpo_ba_service/generate-invoice");
urls.set("ZhiGongJianBBAC", "settleaccount/pub_ba_service/generate-invoice");
urls.set("ZhiGongJianHBPO", "settleaccount/pub_ba_service/generate-invoice");
urls.set("MaiDanJianHBPO", "settleaccount/pub_ba_service/generate-invoice");
urls.set("BeiJian", "settleaccount/pub_ba_service/generate-invoice");
urls.set("YinDuJian", "settleaccount/pub_ba_service/generate-invoice");
try {
await ElMessageBox.confirm(format("确认审核通过选中的%s行数据吗?", rows.length), "提示", {
type: "warning",
});
const response = await request(
urls.get(config.query.schema.properties.businessType?.default),
rows.map((o) => o.id),
{ method: "POST" }
);
if (!response.errors) {
ElMessage({
type: "info",
message: "操作完毕",
});
}
} catch (error) {
if (error === "cancel") {
ElMessage({
type: "info",
message: "操作取消",
});
}
}
} else if (item.path === "export") {
//export
if (item.meta.pattern === "paged") {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
@ -845,23 +812,6 @@ export default {
}
return postData;
}
function buildImport() {
importModel.value.maxResultCount = pageModel.pageSize;
importModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
//
const postData = JSON.parse(JSON.stringify(importModel.value));
postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false));
if (postData.items) {
delete postData["items"];
}
if (postData.import?.id) {
delete postData.import["id"];
}
return postData;
}
function isNotJit() {
return route.meta.businessType !== 3 || route.meta.businessType !== 4 || route.meta.businessType !== 7 || route.meta.businessType !== 8;
}
onMounted(async () => {
if (route.meta.children?.length) {
for (const item of route.meta.children) {
@ -885,6 +835,7 @@ export default {
load,
config,
queryModel,
buildQuery,
pageModel,
treeProps,
tableKey,
@ -927,7 +878,6 @@ export default {
versions,
pushfilterList,
getOperators,
isNotJit,
getFilters,
};
},

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js

@ -2,7 +2,7 @@ import { version } from "../_options.js";
const version2 = Object.assign({}, version);
const compareSchema = {
const defaultCompareSchema = {
title: "数据比对",
properties: {
version: Object.assign(version2, { rules: [{ required: true }] }),
@ -88,7 +88,9 @@ export default function (businessType, type) {
let compareService = null;
let title = null;
let name = null;
const compareSchema = Object.assign({}, defaultCompareSchema);
if (type === "fa-yun") {
delete compareSchema.properties["downLineDateTime"];
if (businessType === "JisBBAC") {
compareService = "edi-se-compare/bbacedi-se-compare";
name = "JisBBACEDI与发运数据对比";
@ -106,13 +108,12 @@ export default function (businessType, type) {
}
name = nameList[businessType];
}
const queryUrl = "settleaccount/Job/list";
const deleteUrl = "settleaccount/Job/delete";
const exportUrl = "settleaccount/pub_sa_detail_service/export";
const compareUrl = `settleaccount/${compareService}`;
const queryMethod = "POST";
const deleteMethod = "POST";
const exportMethod = "POST";
const compareMethod = "POST";
return {
@ -131,6 +132,7 @@ export default function (businessType, type) {
name: {
type: "string",
hidden: true,
default: name,
},
stateName,
businessType: {
@ -178,10 +180,8 @@ export default function (businessType, type) {
},
edit: {
deleteUrl,
exportUrl,
compareUrl,
deleteMethod,
exportMethod,
compareMethod,
schema: schema,
},

12
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js

@ -6,7 +6,6 @@ const schema = {
title: "商务审批",
type: "object",
properties: {
version,
realnvBillNum: {
title: "金税发票号",
type: "string",
@ -54,10 +53,10 @@ const schema = {
export default function (businessType, type) {
let service = null;
if (type === "shangwu") {
if (type === "shang-wu") {
if (businessType === "JisBBAC") {
service = "bbac_ba_service";
} else if (businessType === "JisBBAC") {
} else if (businessType === "JisHBPO") {
service = "hbpo_ba_service";
} else {
service = "pub_ba_service";
@ -108,13 +107,6 @@ export default function (businessType, type) {
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "state",

23
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js

@ -1,5 +1,3 @@
import { version } from "../_options.js";
const schema = {
title: "通用代码",
type: "object",
@ -68,8 +66,9 @@ const schema = {
},
};
export default function (businessType) {
export default function (businessType, type) {
let service;
if (type === "unable") {
if (businessType === "JisBBAC") {
service = "bbac_not_sa_service";
} else if (businessType === "JisHBPO") {
@ -77,6 +76,15 @@ export default function (businessType) {
} else {
service = "pub_not_sa_service";
}
} else {
if (businessType === "JisBBAC") {
service = "bbac_can_sa_service";
} else if (businessType === "JisHBPO") {
service = "hbpo_can_sa_service";
} else {
service = "pub_can_sa_service";
}
}
if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码";
} else if (businessType === "ZhiGongJianBBAC" || businessType === "ZhiGongJianHBPO" || businessType === "YinDuJian") {
@ -93,7 +101,11 @@ export default function (businessType) {
delete schema.properties["site"];
}
const queryUrl = `settleaccount/${service}/detail-query`;
const addUrl = `settleaccount/${service}/generate-settlement-order`;
const exportUrl = `settleaccount/${service}/export`;
const queryMethod = "POST";
const addMethod = "POST";
const exportMethod = "POST";
return {
query: {
@ -167,6 +179,11 @@ export default function (businessType) {
schema: schema,
},
edit: {
addUrl,
exportUrl,
addMethod,
exportUrl,
exportMethod,
schema: schema,
},
};

112
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js

@ -0,0 +1,112 @@
import { version, state } from "../_options.js";
const schema = {
title: "可结算单",
type: "object",
properties: {
version,
state,
billNum: {
title: "结算单据",
type: "string",
oneToMany: "/settle/detail",
config: "/models/settle/detail.js",
},
settleBillNum: {
title: "关联结算单号",
type: "string",
},
invGroupNum: {
title: "发票分组号",
type: "string",
},
},
};
export default function (businessType) {
let service;
if (businessType === "JisBBAC") {
service = "bbac_can_sa_service";
} else if (businessType === "JisHBPO") {
service = "hbpo_can_sa_service";
} else {
service = "pub_can_sa_service";
}
const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-invoice`;
const queryMethod = "POST";
const exportMethod = "POST";
const addMethod = "POST";
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "发票分组号",
type: "object",
properties: {
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
table: {
schema: schema,
},
edit: {
exportUrl,
addUrl,
exportMethod,
addMethod,
schema: schema,
},
};
}

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

@ -65,10 +65,7 @@ const getResult = async (response) => {
} catch (error) {
console.log(error);
}
ElMessageBox.alert(
`${result.errors?.error?.message ?? messages.get(response.status) ?? result.status}`,
`${result.errors?.error?.code ?? result.status}`
);
ElMessageBox.alert(`${result.errors?.error?.message ?? messages.get(response.status) ?? result.status}`, `${result.errors?.error?.code ?? "错误"}`);
}
return result;
};

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

@ -85,10 +85,10 @@ function createCommerceCheckList(path, business, client, title = "商务审批")
component: "/settle/commerce",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=商务审核通过&isTop=true"),
createButton("reject", "title=退回&isTop=true"),
createButton("approval", "title=商务审核通过&isTop=true"),
createButton("reject", "title=退回"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
createButton("????", "title=客户已收票&isTop=true"),
createButton("receive", "title=客户已收票&isTop=true"),
],
};
}
@ -338,7 +338,7 @@ export default [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入开票文件&isTop=true"),
createButton("compare", "title=财务审核通过&isTop=true"),
createButton("export", "title=导出&pattern=paged"),
createButton("export-group", "title=导出发票分组&pattern=paged"),
createButton("reject", "title=退回&isTop=true"),
createButton("sync", "title=同步到QAD&isTop=true"),
],

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

@ -11,7 +11,7 @@ export default function (type) {
return {
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;">
<el-dialog v-model="dialogVisable" align-center :close-on-click-modal="false" destroy-on-close style="width:40%;height:50%;">
<template #header> <span class="el-dialog__title"> EDI与发运对比 </span> </template>
<el-scrollbar>
<app-form ref="formRef" :mode="create" label-position="left" :schema="schema" v-model="model" :hideButton="true" @submit="submit" />

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

@ -4,6 +4,7 @@ import { ref, nextTick, onMounted, watch } from "vue";
import request from "../../request/index.js";
import AppForm from "../../components/form/index.js";
import AppTable from "../../components/table/index.js";
import { getUrl } from "../../request/index.js";
export default {
components: { AppForm, AppTable },
@ -42,7 +43,7 @@ export default {
</span>
</template>
</el-drawer>
<el-dialog class="re-open" v-model="setupDialogVisable" :close-on-click-modal="false" align-center destroy-on-close style="width:50%;height:80%">
<el-dialog class="re-open" v-model="setupDialogVisable" :close-on-click-modal="false" align-center destroy-on-close style="width:100%;height:100%">
<template #header>发票重开</template>
<el-steps :active="setupRef" align-center style="height:60px;">
<el-step title="调整明细列表" />
@ -65,12 +66,28 @@ export default {
</el-row>
</el-scrollbar>
</div>
<div v-show="setupRef===2" style="height:100%;">
<el-row style="padding:14px 0;height:60px;">
<el-col>
<el-button type="primary" @click="showAddAdjDialog">新建</el-button>
<el-button type="primary" @click="showImportAdjDialog">导入</el-button>
<el-button type="primary" @click="deleteAdj">删除</el-button>
</el-col>
</el-row>
<el-scrollbar ref="scrollRef">
<el-row style="height:100%;">
<el-col style="height:calc(100% - 180px);">
<app-table ref="adjListRef" :data="adjList" :columns="columns5" />
</el-col>
</el-row>
</el-scrollbar>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="setupRef-=1" v-if="setupRef>1">上一步</el-button>
</span>
<span class="dialog-footer">
<el-button type="primary" @click="setupRef+=1" v-if="setupRef<3">下一步</el-button>
<el-button type="primary" @click="next" v-if="setupRef<3">下一步</el-button>
<el-button type="primary" @click="submitReOpen" v-if="setupRef===3">确定</el-button>
</span>
</template>
@ -253,6 +270,8 @@ export default {
const addDialogVisible = ref(false);
const importDialogVisible = ref(false);
const showSetupDialog = () => {
//重开发票号
//invBillNum=
adjList.value = [];
setupRef.value = 1;
setupDialogVisable.value = true;
@ -276,6 +295,7 @@ export default {
type: "string",
title: "发票号",
rules: [{ required: true }],
default: props.data.invbillNum,
},
settleDate: {
type: "string",
@ -307,7 +327,7 @@ export default {
},
};
const defaultAdjModel = schemaToModel(adjSchema);
const adjModel = ref(Object.assign({}, defaultAdjModel));
const adjModel = ref(Object.assign({ invBillNum: "" }, defaultAdjModel));
const addAdjFormRef = ref(null);
const showAddAdjDialog = () => {
adjModel.value = Object.assign({}, defaultAdjModel);
@ -372,11 +392,40 @@ export default {
loading.value = false;
}
};
const next = async () => {
if (setupRef.value === 1) {
try {
// const url = "settleaccount/adj_service/check-import";
// const result = await request(url, adjList.value, { method: "POST" });
// if (!result.errors) {
// if (result.data?.code === 200) {
// setupRef.value += 1;
// } else if (result.data?.code === 400 && result.data.fileName) {
// window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
// }
// }
setupRef.value += 1;
} catch (e) {
console.log(e);
}
} else {
setupRef += 1;
}
};
const submitReOpen = async () => {};
//
onMounted(async () => {
loading.value = true;
const response = await request("settleaccount/invoice_service/detail-query", props.data, { method: "POST" });
const data = { filters: [] };
Object.keys(props.data).forEach((o) => {
data.filters.push({
logic: "and",
column: o,
action: "equal",
value: props.data[o],
});
});
const response = await request("settleaccount/invoice_service/detail-query", data, { method: "POST" });
model.value = response.data;
loading.value = false;
});
@ -409,6 +458,7 @@ export default {
importAdjSchema,
importAdj,
scrollRef,
next,
};
},
};

37
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js

@ -2,23 +2,56 @@ import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import { ref } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import request from "../../request/index.js";
import useConfig from "../../models/settle/commerce.js";
import AppCheck from "./_check.js";
export default {
components: { AppList, AppCheck },
template: html`<app-list :config="config" @command="onCommand" /> <app-check v-if="visable" v-model="visable" :data="data" :isBusiness="true" />`,
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" /> <app-check v-if="visable" v-model="visable" :data="data" :isBusiness="true" />`,
setup() {
const appListRef = ref(null);
const visable = ref(false);
const data = ref(null);
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType, "shang-wu");
const onCommand = async (item, rows) => {
if (item.path === "approval" || item.path === "reject" || item.path === "receive") {
if (rows.length === 0) {
ElMessage({
type: "warning",
message: "没有选中的数据",
});
} else {
const message =
item.path === "approval"
? `确认审核通过选中的${rows.length}行数据吗?`
: item.path === "reject"
? `确认退回选中的${rows.length}行数据吗?`
: `确认选中的${rows.length}行数据客户已收票吗?`;
const data = item.path === "approval" ? rows.map((o) => o.invbillNum) : item.path === "reject" ? rows[0]["invGroupNum"] : rows.map((o) => o.invbillNum);
const url = item.path === "approval" ? config.edit.invoiceUrl : item.path === "reject" ? config.edit.rejectUrl : config.edit.receivedUrl;
try {
await ElMessageBox.confirm(message, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
const result = request(url, data, { method: "POST" });
console.log(result);
} catch (e) {
console.log(e);
} finally {
appListRef.value.tableLoading = false;
}
}
} else if (item.path === "invbillNum" || item.path === "invGroupNum") {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
console.log(item.path, item, rows);
};
return { config, onCommand, visable, data };
return { appListRef, config, onCommand, visable, data };
},
};

20
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js

@ -4,6 +4,7 @@ import { useRoute } from "vue-router";
import { ref } from "vue";
import useConfig from "../../models/settle/commerce.js";
import AppCheck from "./_check.js";
import request, { getUrl } from "../../request/index.js";
export default {
components: { AppList, AppCheck },
@ -15,8 +16,27 @@ export default {
const businessType = route.meta.businessType;
const config = useConfig(businessType, "cai-wu");
const onCommand = async (item, rows) => {
if (item.path === "export-group") {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
const postData = {
filters: [
{
logic: "and",
column: "invGroupNum",
action: "equal",
value: rows[0]["invGroupNum"],
},
],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} else if (item.path === "invbillNum" || item.path === "invGroupNum") {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
console.log(item.path, item, rows);
};
return { config, onCommand, visable, data };

24
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js

@ -1,19 +1,37 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { ref } from "vue";
import { useRoute } from "vue-router";
import { ElMessageBox } from "element-plus";
import useConfig from "../../models/settle/detail.js";
import request from "../../request/index.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
setup() {
const appListRef = ref(null);
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType);
const config = useConfig(businessType, "unable");
const onCommand = async (item, rows) => {
const url = config.edit.addUrl;
if (item.path === "add") {
try {
await ElMessageBox.confirm(`确认是否对所有符合查询条件的数据生成可结算单?`, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
const data = appListRef.value.buildQuery();
const result = request(url, data, { method: "POST" });
console.log(result);
} catch (e) {
console.log(e);
} finally {
appListRef.value.tableLoading = false;
}
}
};
return { config, onCommand };
return { appListRef, config, onCommand };
},
};

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

@ -19,11 +19,14 @@ export default {
if (item.path === "add") {
const invbillNum = rows[0].billNum;
try {
await ElMessageBox.confirm(`"确认为${invbillNum}创建发票?`, "提示", {
await ElMessageBox.confirm(`确认为${invbillNum}创建发票?`, "提示", {
type: "warning",
});
appListRef.value.tableLoading = true;
const result = request(url, { invbillNum }, { method: "POST" });
if (!result.errors) {
await appListRef.value.load();
}
console.log(result);
} catch (e) {
console.log(e);

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js

@ -1,30 +1,22 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/log.js";
import { reactive, ref } from "vue";
import { ref } from "vue";
import { schemaToModel } from "../../utils/index.js";
import AppForm from "../../../components/form/index.js";
import AppTable from "../../components/table/index.js";
import request, { get, getUrl, post } from "../../request/index.js";
import request, { getUrl } from "../../request/index.js";
export default {
components: { AppList, AppTable, AppForm },
template: html`
<app-list :config="config" @command="onCommand" />
<el-dialog v-model="addDialogVisible" align-center destroy-on-close style="width:380px;height:480px;">
<el-dialog v-model="addDialogVisible" align-center :close-on-click-modal="false" destroy-on-close style="width:380px;height:480px;">
<template #header>补货数据导出</template>
<el-scrollbar>
<el-row>
<el-col>
<app-form
ref="addAdjFormRef"
v-if="addDialogVisible && adjModel"
:schema="adjSchema"
v-model="adjModel"
:hideButton="true"
inline
@submit="submitAdj"
/>
<app-form ref="addAdjFormRef" v-if="addDialogVisible && adjModel" :schema="adjSchema" v-model="adjModel" :hideButton="true" inline @submit="submitAdj" />
</el-col>
</el-row>
</el-scrollbar>

79
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -1,11 +1,14 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services.Report;
using SettleAccount.Job.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using Volo.Abp.Application.Services;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
@ -16,6 +19,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@ -28,8 +32,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_PD_DETAIL, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_DTO>
{
public BBAC_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<BBAC_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
private readonly TaskJobService _service;
public BBAC_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<BBAC_PD, Guid> repository, VmiAppService vimservice,
INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository,
TaskJobService service
) :
base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
_service = service;
}
public override async Task<string> ApprovalPassed(List<string> p_list)
@ -37,33 +49,48 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
//List<CustomCondition> customConditionList = new List<CustomCondition>();
////customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
////customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
////customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
////customConditionList.Add(new CustomCondition() { Name = "State", Value = string.IsNullOrEmpty(input.State) ? string.Empty : input.State });
//var _taskid = await _service.ExportEnqueueAsync("出库单合计汇总输出", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(WmsOutputSumExportService), customConditionList, (rs) =>
//{
//});
//return _taskid;
// _bbacSecRepository.Where(p=>)
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
DeliverTime = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
});
}
}
//if (detailist != null && detailist.Count > 0)
//{
// foreach (var itm in detailist)
// {
// await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
// {
// BillTime = itm.CreationTime,
// ChangedTime = DateTime.Now,
// Qty = itm.Qty,
// DeliverTime = itm.CreationTime,
// LogType = Entities.BQ.Vmi.VmiLogType.Type200,
// ChangedQty = itm.Qty,
// ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.小件BBAC,
// BillType = EnumDeliverBjBmpBillType.JIS件,
// PartCode = itm.LU,
// SettlementVinCode = itm.PN,
// PartCode2 = itm.LU,
// CustomerPartCode = itm.LU,
// VinCode = itm.PN,
// OrderNum = itm.GroupNum,
// ErpToLoc = "C0001"
// });
// }
//}
return ApplicationConsts.SuccessStr;

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -47,8 +47,11 @@ public class PendingDeductionService : ITransientDependency, IExportJob
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
var list = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
var list=billList.Split(",");
if (type == "BBACJIS")
{
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan==false);
@ -172,11 +175,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}
return ApplicationConsts.SuccessStr;
return id.ToString();
}
}

29
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs

@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Application;
@ -10,6 +10,9 @@ using Volo.Abp.Dapper;
using Win.Abp.Snowflakes;
using Volo.Abp.EventBus.RabbitMq;
using Volo.Abp.RabbitMQ;
using System;
using TaskJob.Interfaces;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace Win.Sfs.SettleAccount
{
@ -46,6 +49,30 @@ namespace Win.Sfs.SettleAccount
//context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
// typeof(SettleAccountNormalEfCoreRepository<,>));
context.Services.AddTransient(implementationFactory =>
{
Func<string, IExportJob> accesor = key =>
{
if (key.Equals(typeof(PendingDeductionService).FullName))
{
return implementationFactory.GetService<PendingDeductionService>();
}
else
{
throw new ArgumentException($"Not Support key:{key}");
}
};
return accesor;
});
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Bases.DomainServices
//ICommonManager commonManager
)
{
_pricebjRepository = pricebjRepository;
_priceRepository = priceRepository;
_pricebjRepository= pricebjRepository;
_materialRepository = materialRepository;
_relationshipRepository = relationshipRepository;

Loading…
Cancel
Save