Browse Source

增加3个比对任务

master
zhouhongjun 11 months ago
parent
commit
b17ebf6421
  1. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/vmi-job.js
  2. 17
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
  3. 60
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
  4. 19
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  5. 98
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/vmi-job.js
  6. 30
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js
  7. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
  8. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/vmi-job.js

@ -75,18 +75,20 @@ const nameList = {
};
export default function (businessType, type) {
alert(businessType);
alert(type);
let compareService = "report/get-balance-sum";
let title = null;
let name = "生成库存余额";
const compareSchema = Object.assign({}, defaultCompareSchema);
if (type === "fa-yun") {
delete compareSchema.properties["downLineDateTime"];
if (businessType === "JisBBAC") {
compareService = "compare/edi-se-compare";
name = "JisBBACEDI与发运数据对比";
} else if (businessType === "JisHBPO") {
compareService = "compare/edi-se-compare";
name = "JisHBPOEDI与发运数据对比";
if (businessType === "BBACDiff") {
compareService = "report/get-bbacwms-edi-diff";
name = "BBAC全表核对差异";
} else if (businessType === "HBPODiff") {
compareService = "report/get-hbpowms-edi-diff";
name = "HBPO全表核对差异";
}
} else {
// if (businessType === "JisBBAC") {

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

@ -64,6 +64,10 @@ const schema = {
title: "客户代码",
type: "string",
},
fileName: {
title: "备注",
type: "string",
},
},
};
@ -84,6 +88,7 @@ export default function (businessType, type) {
const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/invoice_service/export`;
const exportGroupUrl = `settleaccount/invoice_service/export-detail`;
const updateUrl = "settleaccount/invoice_service/update-invoice";
const invoiceUrl = `settleaccount/${service}/generate-invoice`;
const receivedUrl = `settleaccount/${service}/received`;
const rejectUrl = `settleaccount/${service}/reject`;
@ -92,6 +97,7 @@ export default function (businessType, type) {
const importUrl = `settleaccount/${service}/excel-import`;
const queryMethod = "POST";
const exportMethod = "POST";
const updateMethod = "POST";
const exportGroupMethod = "POST";
const invoiceMethod = "POST";
const receivedMethod = "POST";
@ -165,6 +171,15 @@ export default function (businessType, type) {
//default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "fileName",
action: "equal",
value: null,
readOnly: true,
title: "备注",
clearable: false,
},
],
},
skipCount: {
@ -191,6 +206,7 @@ export default function (businessType, type) {
edit: {
exportUrl,
exportGroupUrl,
updateUrl,
invoiceUrl,
receivedUrl,
rejectUrl,
@ -198,6 +214,7 @@ export default function (businessType, type) {
approvalUrl,
importUrl,
exportMethod,
updateMethod,
exportGroupMethod,
invoiceMethod,
receivedMethod,

60
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js

@ -26,7 +26,7 @@ function balanceSchema() {
// codeType,
// deliverBillType: Object.assign({ rules: [{ required: true }] }, deliverBillType),
qty: {
title: "数量",
title: "合计数量",
type: "string",
input: "number",
rules: [
@ -36,7 +36,13 @@ function balanceSchema() {
],
},
billTime: {
title: "发运日期",
title: "最后发运日期",
type: "string",
input: "datetime",
clearable: true,
},
shippingTime: {
title: "最后结算时间",
type: "string",
input: "datetime",
clearable: true,
@ -102,6 +108,56 @@ function balanceSchema() {
},
],
},
shippingQty: {
title: "发运入库数量",
type: "string",
input: "number",
rules: [
{
required: true,
},
],
},
settleQty: {
title: "结算出库数量",
type: "string",
input: "number",
rules: [
{
required: true,
},
],
},
returnQty: {
title: "退货出库数量",
type: "string",
input: "number",
rules: [
{
required: true,
},
],
},
inputQty: {
title: "调整入库数量",
type: "string",
input: "number",
rules: [
{
required: true,
},
],
},
outputQty: {
title: "调整出库数量",
type: "string",
input: "number",
rules: [
{
required: true,
},
],
},
// reMark: {
// title: "备注",
// type: "string",

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

@ -63,6 +63,19 @@ function createCompareVmi(path, business, client, title = "库存余额任务")
};
}
function createCompareDiff(path, business, client, title = "BBAC 全表核对差异") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/compare/vmi",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=生成数据&isTop=true"),
createButton("delete", "title=删除&isTop=true"),
createButton("export", "title=下载&pattern=file&disabled=o=>o.stateName!='Succeeded'"),
],
};
}
function createCompareJieSuan(path, business, client, title = "EDI、发运与结算比对") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
@ -173,6 +186,7 @@ export default [
children: [
createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI与发运对比"),
createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI、发运与结算对比"),
createCompareDiff("bbacwms_edi_diff", "BBACDiff", "bbac", "BBAC 全表核对差异")
],
},
{
@ -202,6 +216,7 @@ export default [
children: [
createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI与发运对比"),
createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI、发运与结算对比"),
createCompareDiff("hbpowms_edi_diff", "HBPODiff", "hbpo", "HBPO 全表核对差异")
],
},
{
@ -376,6 +391,7 @@ export default [
children: [
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
createButton("remark", "title=备注&isTop=true&pattern=paged"),
createButton(
"import",
"title=导入开票文件&isTop=true",
@ -386,7 +402,9 @@ export default [
"title=财务审核通过&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 2) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton("remark", "title=编辑&pattern=paged", (r, _) => r.invoiceState !== 2),
createButton("export-group", "title=导出发票分组&pattern=paged", (r, _) => r.invoiceState !== 2),
//createButton("approval", "title=发票重开"),
createButton(
"reject",
@ -398,6 +416,7 @@ export default [
"title=同步到QAD&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 5) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
],
},
{

98
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/vmi-job.js

@ -8,11 +8,11 @@ import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default function (type) {
return {
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
return {
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<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"> 库存余额任务 </span> </template>
<template #header> <span class="el-dialog__title"> 数据生成任务 </span> </template>
<el-scrollbar>
<app-form ref="formRef" :mode="create" label-position="left" :schema="schema" v-model="model" :hideButton="true" @submit="submit" />
</el-scrollbar>
@ -22,54 +22,54 @@ export default function (type) {
</span>
</template>
</el-dialog>`,
styles: html`<style>
styles: html`<style>
.el-dialog__body {
height: calc(100% - 120px);
}
</style>`,
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
const config = useConfig(businessType, type);
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign(model.value);
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
const config = useConfig(businessType, type);
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign(model.value);
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
await load();
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
await load();
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};
}

30
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js

@ -6,11 +6,16 @@ import request, { getUrl } 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 ref="appListRef" :config="config" @command="onCommand" />
<app-check v-if="visable" v-model="visable" :businessType="businessType" :row="row" :data="data" />`,
<app-check v-if="visable" v-model="visable" :businessType="businessType" :row="row" :data="data" />
`,
setup() {
const appListRef = ref(null);
const visable = ref(false);
const row = ref(null);
@ -64,6 +69,29 @@ export default {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
else if (item.path === "remark") {
const url = config.edit.updateUrl;
const method = config.edit.updateMethod;
alert("123");
if (rows.length > 0) {
let data = rows.map((o) => o.invbillNum);
alert(data);
const postData = {
InvbillNum: rows[0]["invbillNum"],
FileName: "remark123"
};
await appListRef.value.onClick(async () => {
const response = await request(url, postData, { method }, true);
if (!response.errors) {
}
});
}
}
console.log(item.path, item, rows);
};
return { appListRef, config, onCommand, visable, row, data, businessType };

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

@ -64,6 +64,7 @@ export default {
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
}
console.log(item.path, item, rows);
};
return { appListRef, config, onCommand, visable, row, data, businessType };

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -87,7 +87,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Year", Value = DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("EDI发运对比", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(EdiWmsDiffService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("BBAC全表核对差异", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(EdiWmsDiffService), customConditionList, (rs) =>
{
}).ConfigureAwait(false);
@ -109,7 +109,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Year", Value = DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("EDI发运对比", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(HBPOEdiWmsDiffService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("HBPO全表核对差异", ExportExtentsion.Excel, DateTime.Now.Year.ToString(), string.Empty, CurrentUser, typeof(HBPOEdiWmsDiffService), customConditionList, (rs) =>
{
}).ConfigureAwait(false);

Loading…
Cancel
Save