学 赵
1 year ago
22 changed files with 5787 additions and 250 deletions
Binary file not shown.
@ -0,0 +1,8 @@ |
|||||
|
const options1 = [ |
||||
|
{ value: 1, label: "正常" }, |
||||
|
{ value: 2, label: "报废" }, |
||||
|
{ value: 3, label: "提交" }, |
||||
|
]; |
||||
|
|
||||
|
const invoiceState = { title: "发票状态", type: "string", input: "select", options: options1 }; |
||||
|
export default invoiceState; |
@ -1,15 +1,52 @@ |
|||||
import AppList from "../../../components/list/index.js"; |
import AppList from "../../../components/list/index.js"; |
||||
import html from "html"; |
import html from "html"; |
||||
import useConfig from "../../../models/inventory/log.js"; |
import useConfig from "../../../models/inventory/log.js"; |
||||
|
import { reactive, ref } from "vue"; |
||||
|
import request from "../../request/index.js"; |
||||
|
import { schemaToModel } from "../../utils/index.js"; |
||||
|
|
||||
export default { |
export default { |
||||
components: { AppList }, |
components: { AppList }, |
||||
template: html`<app-list :config="config" @command="onCommand" />`, |
template: html`<app-list :config="config" @command="onCommand" />
|
||||
|
<el-dialog v-model="dialog" width="45%" title="补货数据导出"> |
||||
|
<el-form :model="exportModel" style="height:100%;"> |
||||
|
<el-form-item label="" label-width="100px"> |
||||
|
开始时间<el-date-picker v-model="exportModel.startDatetime" value-format="YYYY-MM-DD" /> |
||||
|
<span style="margin:0 .5em;">-</span> |
||||
|
结束时间<el-date-picker v-model="exportModel.endDatetime" value-format="YYYY-MM-DD" /> |
||||
|
</el-form-item> |
||||
|
<el-button type="primary" @click="openDialog" style="margin-left: 10px;">确定</el-button> |
||||
|
</el-form> |
||||
|
</el-dialog> `, |
||||
setup() { |
setup() { |
||||
|
const defaultExportModel = { |
||||
|
startDatetime: "", |
||||
|
endDatetime: "", |
||||
|
}; |
||||
|
const exportModel = ref(defaultExportModel); |
||||
const config = useConfig(); |
const config = useConfig(); |
||||
|
const dialog = ref(false); |
||||
|
const prop = ref(""); |
||||
|
const queryModel = ref(schemaToModel(config.query.schema)); |
||||
|
function buildQuery() { |
||||
|
const postData = JSON.parse(JSON.stringify(queryModel.value)); |
||||
|
return postData; |
||||
|
} |
||||
|
const openDialog = async () => { |
||||
|
// const url =
|
||||
|
// const method =
|
||||
|
// const postData = buildQuery();
|
||||
|
const response = await request(url, postData, { method }); |
||||
|
if (!response.errors) { |
||||
|
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`)); |
||||
|
} |
||||
|
dialog.value = false; |
||||
|
}; |
||||
const onCommand = async (item, rows) => { |
const onCommand = async (item, rows) => { |
||||
|
prop.value = item.path; |
||||
|
dialog.value = true; |
||||
console.log(item.path, item, rows); |
console.log(item.path, item, rows); |
||||
}; |
}; |
||||
return { config, onCommand }; |
return { config, onCommand, dialog, prop, exportModel, openDialog }; |
||||
}, |
}, |
||||
}; |
}; |
||||
|
@ -0,0 +1,44 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Coravel.Invocable; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// JisBBAC 发运数据与EDI数据对比
|
||||
|
/// </summary>
|
||||
|
[ApiExplorerSettings(IgnoreApi = true)] |
||||
|
public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable |
||||
|
{ |
||||
|
private readonly IServiceProvider _serviceProvider; |
||||
|
|
||||
|
public JisBBACSeEdiCompareAppService(IServiceProvider serviceProvider) |
||||
|
{ |
||||
|
_serviceProvider = serviceProvider; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行
|
||||
|
/// </summary>
|
||||
|
public async Task Invoke() |
||||
|
{ |
||||
|
using var serviceScope = _serviceProvider.CreateScope(); |
||||
|
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>(); |
||||
|
var query = db.Set<BBAC_SE_DETAIL>().Join(db.Set<BBAC_SE_EDI>(), a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se, edi }).Where(t => t.se.IsHaveEdiData == false && t.edi.IsHaveSeData == false); |
||||
|
var ses = query.Select(t => t.se); |
||||
|
var edis = query.Select(t => t.edi); |
||||
|
|
||||
|
ses.ForEach(t => t.IsHaveEdiData = true); |
||||
|
edis.ForEach(t => t.IsHaveSeData = true); |
||||
|
|
||||
|
db.Set<BBAC_SE_DETAIL>().UpdateRange(ses); |
||||
|
db.Set<BBAC_SE_EDI>().UpdateRange(edis); |
||||
|
await db.SaveChangesAsync().ConfigureAwait(false); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,56 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202308103 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("96b1beec-0eef-4ae5-880b-23678addb759")); |
||||
|
|
||||
|
migrationBuilder.AddColumn<bool>( |
||||
|
name: "IsHaveSeData", |
||||
|
table: "Set_BBAC_SE_EDI", |
||||
|
type: "bit", |
||||
|
nullable: false, |
||||
|
defaultValue: false); |
||||
|
|
||||
|
migrationBuilder.AddColumn<bool>( |
||||
|
name: "IsHaveEdiData", |
||||
|
table: "Set_BBAC_SE_DETAIL", |
||||
|
type: "bit", |
||||
|
nullable: false, |
||||
|
defaultValue: false); |
||||
|
|
||||
|
migrationBuilder.InsertData( |
||||
|
table: "Set_VmiBalance", |
||||
|
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
||||
|
values: new object[] { new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "1d0093aa74814ffd982671a5ac362c52", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545")); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "IsHaveSeData", |
||||
|
table: "Set_BBAC_SE_EDI"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "IsHaveEdiData", |
||||
|
table: "Set_BBAC_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.InsertData( |
||||
|
table: "Set_VmiBalance", |
||||
|
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
||||
|
values: new object[] { new Guid("96b1beec-0eef-4ae5-880b-23678addb759"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "ebf2d34687e14358a9d63dbe3df7abd3", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue