wanggang 1 year ago
parent
commit
747250cd71
  1. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  2. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  3. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js
  4. 41
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  5. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js
  6. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

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

@ -36,7 +36,7 @@ export default {
v-if="item.meta.isTop"
@click="click(item,selectedRows)"
:class="item.meta.htmlClass??'el-button--primary'"
v-show="true||!item.meta.show||item.meta.show(selectedRows,queryModel)"
v-show="!item.meta.show||item.meta.show(selectedRows,queryModel)"
: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>
@ -127,6 +127,7 @@ export default {
<el-button
:class="item.meta.htmlClass??'el-button--primary'"
v-if="!item.meta.isTop"
v-show="!item.meta.show||item.meta.show(scope.row,queryModel)"
@click="click(item,[scope.row])"
:disabled="item.meta.disabled && item.meta.disabled(scope.row)"
>

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -5,7 +5,7 @@ const schema = {
type: "object",
properties: {
version,
state,
//state,
billNum: {
title: "结算单号",
type: "string",

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js

@ -1,8 +1,7 @@
//财务审核
import version from "../version.js";
import { state2 } from "../state.js";
import businessType from "../businessType.js";
import invoiceState from "../invoiceState.js";
import { businessType, invoiceState } from "../_options.js";
const state = Object.assign({}, state2);
state.input = "tabs";

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

@ -90,10 +90,27 @@ function createCommerceCheckList(path, business, client, title = "商务审批")
component: "/settle/commerce",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("approval", "title=商务审核通过&isTop=true"),
createButton("reject", "title=退回"),
createButton(
"approval",
"title=商务审核通过&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 1) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton(
"reject",
"title=退回",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 1) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton("export-group", "title=导出发票分组&pattern=paged"),
createButton("receive", "title=客户已收票&isTop=true"),
createButton(
"receive",
"title=客户已收票&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 3) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton(
"bao-fei",
"title=报废&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && (o.value === 3 || o.value === 4)) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
],
};
}
@ -343,11 +360,23 @@ export default [
component: "/settle/finance",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入开票文件&isTop=true", "(a, b) => false"),
createButton("approval", "title=财务审核通过&isTop=true"),
createButton(
"import",
"title=导入开票文件&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 3) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton(
"approval",
"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("export-group", "title=导出发票分组&pattern=paged"),
createButton("approval", "title=发票重开"),
createButton("reject", "title=退回&isTop=true"),
createButton(
"reject",
"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("sync", "title=同步到QAD&isTop=true"),
],
},

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

@ -85,7 +85,7 @@ const refreshRouter = async () => {
await connect();
const appStore = useAppStore();
const permissions = appStore.user.permissions;
const serverRoutes = JSON.parse(JSON.stringify(remoteRoutes));
const serverRoutes = Object.assign([], remoteRoutes);
const setPermission = (list, parent = null) => {
list.forEach((o) => {
// full path

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -162,12 +162,11 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
try
{
var now = DateTime.Now;
var time = now.ToString("yyyy-MM-dd_HH:mm");
var table = $"Set_VmiBalance_{time}";
var table = $"Set_VmiBalance_{now.ToString("yyyy_MM_dd_HH_mm_ss")}";
var snapshot = db.Set<VmiSnapshot>().Where(o => o.Name == table).FirstOrDefault();
if (snapshot == null)
{
snapshot = new VmiSnapshot { Name = time, Start = now, Description = table };
snapshot = new VmiSnapshot { Name = now.ToString("yyyy-MM-dd HH:mm:ss"), Start = now, Description = table };
db.Set<VmiSnapshot>().Add(snapshot);
db.SaveChanges();
var result = db.Database.ExecuteSqlRaw($"select * into {table} from Set_VmiBalance;");

Loading…
Cancel
Save