Browse Source

update

master
wanggang 1 year ago
parent
commit
1017e31b26
  1. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Controllers/HomeController.cs
  2. 55
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  3. 9
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
  4. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  5. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
  6. 13
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  7. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
  8. 20
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
  9. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
  10. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js

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";
}
}
}

55
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) {
@ -928,7 +878,6 @@ export default {
versions,
pushfilterList,
getOperators,
isNotJit,
getFilters,
};
},

9
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 {
@ -179,10 +180,8 @@ export default function (businessType, type) {
},
edit: {
deleteUrl,
exportUrl,
compareUrl,
deleteMethod,
exportMethod,
compareMethod,
schema: schema,
},

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

@ -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" />

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

@ -39,7 +39,7 @@ export default {
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="show=false"> 返回 </el-button>
<el-button type="primary" @click="showSetupDialog" v-if="isBusiness&&model.adJ_DETAIL.length===0"> 重开发票 </el-button>
<el-button type="primary" @click="showSetupDialog" v-if="isBusiness&&data.invbillNum&&model.adJ_DETAIL.length===0"> 重开发票 </el-button>
</span>
</template>
</el-drawer>
@ -416,7 +416,16 @@ export default {
//
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;
});

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

@ -47,10 +47,10 @@ export default {
}
}
} else if (item.path === "invbillNum" || item.path === "invGroupNum") {
data.value = { invbillNum: rows[0]["invbillNum"], invGroupNum: rows[0]["invGroupNum"] };
data.value = { [item.path]: rows[0][item.path] };
visable.value = true;
console.log(item.path, item, rows);
}
console.log(item.path, item, rows);
};
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 };

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

@ -24,6 +24,9 @@ export default {
});
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>

Loading…
Cancel
Save