Browse Source

更新前端自动查询,后端寄售库字段

master
wanggang 1 year ago
parent
commit
895ed178da
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html
  4. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/bbac_sa_detail_jobservice.js
  5. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  6. 57
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs
  7. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
  8. 3
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  9. 4411
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.Designer.cs
  10. 227
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.cs
  11. 52
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js

@ -127,7 +127,7 @@ export default {
value: o[props.schema.value],
label: o[props.schema.label],
}));
if (!props.schema.selected && options.value.length) {
if (props.schema.defaultSelected && options.value.length) {
model[props.prop] = options.value[0].value;
}
} catch (error) {

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

@ -1,6 +1,6 @@
import html, { getProp } from "html";
import request, { get, getUrl, post } from "../../request/index.js";
import { defineAsyncComponent, ref, reactive, onMounted } from "vue";
import { defineAsyncComponent, ref, reactive, onMounted, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { listToTree, schemaToModel, importFunction, format } from "../../utils/index.js";
@ -384,7 +384,7 @@ export default {
const filterDrawer = ref(false);
const subDrawer = ref(false);
const subListQuery = ref({});
const tableLoading = ref(true);
const tableLoading = ref(false);
const selectedRows = ref([]);
const dialogVisible = ref(false);
const route = useRoute();
@ -396,7 +396,12 @@ export default {
// 添加下行代码暂停权限验证
const buttons = ref(props.buttons ?? route.meta.children);
const baseUrl = props.controller ?? `${route.meta.path}`;
const queryModel = ref({});
const queryModel = ref(schemaToModel(config.query.schema));
watch(queryModel.value, async (value, oldValue, a) => {
if (config.query.autoSubmit) {
await load();
}
});
const sortColumns = ref(new Map());
const querySchema = ref(props.querySchema);
const filterList = ref([]);
@ -825,14 +830,15 @@ export default {
}
}
//
queryModel.value = schemaToModel(config.query.schema);
getSortModel(queryModel.value);
filterList.value = queryModel.value?.filters ?? [];
getColumns(config.table.schema);
if (props.query) {
Object.assign(queryModel.value.query, props.query);
}
await load();
if (!route.meta.disableQueryOnLoad) {
await load();
}
});
context.expose({ load });
return {

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

@ -49,7 +49,7 @@
"html":"./utils/index.js",
"detect-it":"./lib/detect-it/detect-it.esm.js",
"lodash":"./lib/lodash/lodash.esm.js",
"vue": "./lib/vue/vue.esm-browser.js",
"vue": "./lib/vue/vue.esm-browser.prod.js",
"vue-router": "./lib/vue-router/vue-router.esm-browser.js",
"vue-i18n":"./lib/vue-i18n/vue-i18n.esm-browser.prod.js",
"pinia": "./lib/pinia/pinia.esm-browser.js",

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/bbac_sa_detail_jobservice.js

@ -71,11 +71,12 @@ export default function () {
url: queryUrl,
method: queryMethod,
hasFilter: true,
autoSubmit: true,
schema: {
title: "期间设置",
type: "object",
properties: {
type: version,
type: Object.assign({ defaultSelected: true }, version),
name: {
type: "string",
default: null,

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

@ -184,6 +184,7 @@ export default [
title: "EDI与发运数据对比",
icon: "file",
enumBusinessType: "BBAC",
disableQueryOnLoad: true,
},
children: [
{

57
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs

@ -1,35 +1,56 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiBalance : Entity<Guid>
{
/// <summary>
/// LU零件号:BBAC发运单BBAC_SE_DETAIL.LU
/// </summary>
[Display(Name = "Erp目标库位", Description = "Key")]
public string ErpToLoc { get; set; }
[Display(Name = "LU零件号", Description = "Key")]
public string LU { get; set; }
/// <summary>
/// 生产码:BBAC发运单BBAC_SE_DETAIL.PN
/// </summary>
public string PN { get; set; }
[Display(Name = "客户零件号")]
public string PartCode { get; set; }
[Display(Name = "生产码", Description = "Key")]
public string VinCode { get; set; }
/// <summary>
/// 生产码类型(01前保、02后保、03门槛等)
/// </summary>
public int PNType { get; set; }
[Display(Name = "生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 发货类型???
/// </summary>
public string Type { get; set; }
[Display(Name = "发货类型")]
public string ProType { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
[Display(Name = "发运日期")]
public DateTime ShippingDate { get; set; }
[Display(Name = "订单日期")]
public DateTime CreationTime { get; set; }
[Display(Name = "EDI顺序号")]
public string SeqNumber { get; set; }
[Display(Name = "客户订单号")]
public string Tmpe4 { get; set; }
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
[Display(Name = "EDI总成号")]
public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号")]
public string PjsNum { get; set; }
[Display(Name = "备注")]
public string Desc { get; set; }
public List<VmiLog> Logs { get; set; } = new List<VmiLog>();
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs

@ -16,6 +16,9 @@ public class VmiLog : Entity<Guid>
/// </summary>
public string SessionId { get; set; }
public string OrderNumber { get; set; }
public DateTime CreatedDate { get; set; } = DateTime.Now;
public string CreatedBy { get; set; }
public VmiOperatorType Type { get; set; }
public VmiCategory Category { get; set; }
public VmiBalance Balance { get; set; }

3
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -59,6 +59,7 @@ namespace Win.Sfs.SettleAccount
#endregion 基础数据
#region 北汽结算
builder.ConfigureTaskJob(options);
builder.ConfigureBBAC_CAN_SA(options);
builder.ConfigureBBAC_CAN_SA_DETAIL(options);
@ -1114,7 +1115,7 @@ namespace Win.Sfs.SettleAccount
{
b.ToTable($"{options.TablePrefix}_VmiBalance", options.Schema);
b.ConfigureByConvention();
b.HasAlternateKey(o => new { o.PN, o.LU });
b.HasAlternateKey(o => new { o.ErpToLoc, o.PartCode, o.LU });
});
builder.Entity<VmiLog>(b =>

4411
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.Designer.cs

File diff suppressed because it is too large

227
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.cs

@ -0,0 +1,227 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropUniqueConstraint(
name: "AK_Set_VmiBalance_PN_LU",
table: "Set_VmiBalance");
migrationBuilder.DeleteData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6efe1947-a242-4d20-b633-20b0f716a782"));
migrationBuilder.DropColumn(
name: "PNType",
table: "Set_VmiBalance");
migrationBuilder.RenameColumn(
name: "Type",
table: "Set_VmiBalance",
newName: "VinCode");
migrationBuilder.RenameColumn(
name: "PN",
table: "Set_VmiBalance",
newName: "PartCode");
migrationBuilder.AddColumn<string>(
name: "CreatedBy",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreatedDate",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "OrderNumber",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CodeType",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "Set_VmiBalance",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "Desc",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ErpToLoc",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "MatchNumber",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PjsNum",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ProType",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SeqNumber",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "ShippingDate",
table: "Set_VmiBalance",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "Tmpe4",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "UniqueCode",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddUniqueConstraint(
name: "AK_Set_VmiBalance_ErpToLoc_PartCode_LU",
table: "Set_VmiBalance",
columns: new[] { "ErpToLoc", "PartCode", "LU" });
migrationBuilder.InsertData(
table: "Set_JobItem",
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" },
values: new object[] { new Guid("579e2b8d-c9ec-4754-9520-e4475aea2a73"), null, "0 0 8 26 *", false, "库存快照", "Win.Sfs.SettleAccount.Entities.BQ.VmiService" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropUniqueConstraint(
name: "AK_Set_VmiBalance_ErpToLoc_PartCode_LU",
table: "Set_VmiBalance");
migrationBuilder.DeleteData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("579e2b8d-c9ec-4754-9520-e4475aea2a73"));
migrationBuilder.DropColumn(
name: "CreatedBy",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CreatedDate",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "OrderNumber",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CodeType",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "CreationTime",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "Desc",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "ErpToLoc",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "MatchNumber",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "PjsNum",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "SeqNumber",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "ShippingDate",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "Tmpe4",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "UniqueCode",
table: "Set_VmiBalance");
migrationBuilder.RenameColumn(
name: "VinCode",
table: "Set_VmiBalance",
newName: "Type");
migrationBuilder.RenameColumn(
name: "PartCode",
table: "Set_VmiBalance",
newName: "PN");
migrationBuilder.AddColumn<int>(
name: "PNType",
table: "Set_VmiBalance",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddUniqueConstraint(
name: "AK_Set_VmiBalance_PN_LU",
table: "Set_VmiBalance",
columns: new[] { "PN", "LU" });
migrationBuilder.InsertData(
table: "Set_JobItem",
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" },
values: new object[] { new Guid("6efe1947-a242-4d20-b633-20b0f716a782"), null, "0 0 8 26 *", false, "库存快照", "Win.Sfs.SettleAccount.Entities.BQ.VmiService" });
}
}
}

52
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -3319,7 +3319,7 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("6efe1947-a242-4d20-b633-20b0f716a782"),
Id = new Guid("579e2b8d-c9ec-4754-9520-e4475aea2a73"),
Cron = "0 0 8 26 *",
IsRunning = false,
Name = "库存快照",
@ -3361,26 +3361,57 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Desc")
.HasColumnType("nvarchar(max)");
b.Property<string>("ErpToLoc")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("LU")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("PN")
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartCode")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("PNType")
.HasColumnType("int");
b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("ProType")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
b.Property<string>("Type")
b.Property<string>("SeqNumber")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2");
b.Property<string>("Tmpe4")
.HasColumnType("nvarchar(max)");
b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("VinCode")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasAlternateKey("PN", "LU");
b.HasAlternateKey("ErpToLoc", "PartCode", "LU");
b.ToTable("Set_VmiBalance");
});
@ -3424,6 +3455,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<string>("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime2");
b.Property<string>("OrderNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(max)");

Loading…
Cancel
Save