0530
parent
1cc29a2b98
commit
fc7d38306f
|
@ -107,6 +107,11 @@ public class PrintCodeDetailService : IDynamicApiController, ITransient
|
||||||
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task UpdateByEntity(PrintCodeDetail entity)
|
||||||
|
{
|
||||||
|
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取打印条码详情
|
/// 获取打印条码详情
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -10,9 +10,11 @@ namespace Admin.NET.Application;
|
||||||
public class ReportDetailTableService : IDynamicApiController, ITransient
|
public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
private readonly SqlSugarRepository<ReportDetailTable> _rep;
|
private readonly SqlSugarRepository<ReportDetailTable> _rep;
|
||||||
public ReportDetailTableService(SqlSugarRepository<ReportDetailTable> rep)
|
private readonly PrintCodeDetailService _codeDetailService;
|
||||||
|
public ReportDetailTableService(SqlSugarRepository<ReportDetailTable> rep, PrintCodeDetailService codeDetailService)
|
||||||
{
|
{
|
||||||
_rep = rep;
|
_rep = rep;
|
||||||
|
_codeDetailService = codeDetailService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -100,8 +102,26 @@ public class ReportDetailTableService : IDynamicApiController, ITransient
|
||||||
[ApiDescriptionSettings(Name = "Add")]
|
[ApiDescriptionSettings(Name = "Add")]
|
||||||
public async Task<long> Add(AddReportDetailTableInput input)
|
public async Task<long> Add(AddReportDetailTableInput input)
|
||||||
{
|
{
|
||||||
|
var details = await _codeDetailService.List();
|
||||||
|
if (details == null || details.Count < 1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
var printDetails = details.FindAll(a => a.TempListId == input.UpdateUserId);
|
||||||
|
if (printDetails.Count < 1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
var entity = input.Adapt<ReportDetailTable>();
|
var entity = input.Adapt<ReportDetailTable>();
|
||||||
await _rep.InsertAsync(entity);
|
await _rep.InsertAsync(entity);
|
||||||
|
for (int i = 0; i < printDetails.Count; i++)
|
||||||
|
{
|
||||||
|
var item = printDetails[i];
|
||||||
|
item.ReportTableId = entity.Id;
|
||||||
|
var ent = item.Adapt<PrintCodeDetail>();
|
||||||
|
await _codeDetailService.UpdateByEntity(ent);
|
||||||
|
}
|
||||||
|
|
||||||
return entity.Id;
|
return entity.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,10 @@ public class AddReportContext
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? Batch { get; set; }
|
public string? Batch { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 物料ID
|
||||||
|
/// </summary>
|
||||||
|
public long? MaterialsId { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// 打印数据
|
/// 打印数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<PrintData> PrintDatas { get; set; }
|
public List<PrintData> PrintDatas { get; set; }
|
||||||
|
|
|
@ -44,6 +44,11 @@ public class PrintCodeTreeData
|
||||||
/// 子码数
|
/// 子码数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? ChildCount { get; set; }
|
public int? ChildCount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
public string? Remarks { get; set; }
|
||||||
|
|
||||||
public List<PrintCodeTreeData> Children { get; set; }
|
public List<PrintCodeTreeData> Children { get; set; }
|
||||||
|
public bool HasChildren { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ using Admin.NET.Application.Const;
|
||||||
using Admin.NET.Application.Entity;
|
using Admin.NET.Application.Entity;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Admin.NET.Application.Service.ReportTable.Dto;
|
using Admin.NET.Application.Service.ReportTable.Dto;
|
||||||
|
using static SKIT.FlurlHttpClient.Wechat.Api.Models.ComponentTCBBatchCreateContainerServiceVersionRequest.Types;
|
||||||
|
using Nest;
|
||||||
|
|
||||||
namespace Admin.NET.Application;
|
namespace Admin.NET.Application;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -84,8 +86,25 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
[ApiDescriptionSettings(Name = "Add")]
|
[ApiDescriptionSettings(Name = "Add")]
|
||||||
public async Task<long> Add(AddReportTableInput input)
|
public async Task<long> Add(AddReportTableInput input)
|
||||||
{
|
{
|
||||||
|
//input.UpdateUserId
|
||||||
|
var details = await _codeDetailService.List();
|
||||||
|
if (details == null || details.Count < 1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
var printDetails = details.FindAll(a => a.TempListId == input.UpdateUserId);
|
||||||
|
if (printDetails.Count < 1)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
var entity = input.Adapt<ReportTable>();
|
var entity = input.Adapt<ReportTable>();
|
||||||
await _rep.InsertAsync(entity);
|
await _rep.InsertAsync(entity);
|
||||||
|
for (int i = 0; i < printDetails.Count; i++)
|
||||||
|
{
|
||||||
|
var item = printDetails[i];
|
||||||
|
item.ReportTableId = entity.Id;
|
||||||
|
await _codeDetailService.Update(item.Adapt<UpdatePrintCodeDetailInput>());
|
||||||
|
}
|
||||||
return entity.Id;
|
return entity.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,13 +193,13 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 新增汇报单
|
/// 新增打印详情单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ApiDescriptionSettings(Name = "AddPrintList")]
|
[ApiDescriptionSettings(Name = "AddPrintDetail")]
|
||||||
public async Task<List<PrintCodeTreeData>> AddPrintList(AddReportContext input)
|
public async Task<List<PrintCodeTreeData>> AddPrintDetail(AddReportContext input)
|
||||||
{
|
{
|
||||||
var result = new List<PrintCodeTreeData>();
|
var result = new List<PrintCodeTreeData>();
|
||||||
var unitGroup = await _repUnitGroup.Detail(new QueryByIdSysUnitGroupInput() { Id = input.UnitGroupId });
|
var unitGroup = await _repUnitGroup.Detail(new QueryByIdSysUnitGroupInput() { Id = input.UnitGroupId });
|
||||||
|
@ -197,7 +216,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
if (unit == null)
|
if (unit == null)
|
||||||
throw new ArgumentNullException(nameof(unitGroup));
|
throw new ArgumentNullException(nameof(unitGroup));
|
||||||
|
|
||||||
var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 1 };
|
var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0,UpdateUserId = input.MaterialsId };
|
||||||
var addReport = await Add(newReport);
|
var addReport = await Add(newReport);
|
||||||
var others = units.FindAll(a => a.Rate < unit.Rate).OrderBy(a => a.Rate).ToList();
|
var others = units.FindAll(a => a.Rate < unit.Rate).OrderBy(a => a.Rate).ToList();
|
||||||
others.Reverse();
|
others.Reverse();
|
||||||
|
@ -221,7 +240,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
}
|
}
|
||||||
treeData1.Children = new List<PrintCodeTreeData>();
|
treeData1.Children = new List<PrintCodeTreeData>();
|
||||||
var currUnit = tempUnits.FirstOrDefault();
|
var currUnit = tempUnits.FirstOrDefault();
|
||||||
var printDatas = await _printDataService.GetPrintDatas(currUnit.Name, codeType, currUnit.ChildUnitCount);
|
var printDatas = await _printDataService.GetPrintDatas(currUnit.Name, codeType, unit.ChildUnitCount);
|
||||||
foreach (var dt in printDatas)
|
foreach (var dt in printDatas)
|
||||||
{
|
{
|
||||||
var code2 = string.IsNullOrEmpty(dt.BarCode) ? dt.QrCode : dt.BarCode;
|
var code2 = string.IsNullOrEmpty(dt.BarCode) ? dt.QrCode : dt.BarCode;
|
||||||
|
@ -232,7 +251,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
treeData2.Children = new List<PrintCodeTreeData>();
|
treeData2.Children = new List<PrintCodeTreeData>();
|
||||||
var currUnit3 = tempUnits[1];
|
var currUnit3 = tempUnits[1];
|
||||||
var printDatas3 = await _printDataService.GetPrintDatas(currUnit3.Name, codeType, currUnit3.ChildUnitCount);
|
var printDatas3 = await _printDataService.GetPrintDatas(currUnit3.Name, codeType, currUnit.ChildUnitCount);
|
||||||
foreach (var dt3 in printDatas3)
|
foreach (var dt3 in printDatas3)
|
||||||
{
|
{
|
||||||
var code3 = string.IsNullOrEmpty(dt3.BarCode) ? dt3.QrCode : dt3.BarCode;
|
var code3 = string.IsNullOrEmpty(dt3.BarCode) ? dt3.QrCode : dt3.BarCode;
|
||||||
|
@ -243,7 +262,7 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
treeData3.Children = new List<PrintCodeTreeData>();
|
treeData3.Children = new List<PrintCodeTreeData>();
|
||||||
var currUnit4 = tempUnits[2];
|
var currUnit4 = tempUnits[2];
|
||||||
var printDatas4 = await _printDataService.GetPrintDatas(currUnit4.Name, codeType, currUnit4.ChildUnitCount);
|
var printDatas4 = await _printDataService.GetPrintDatas(currUnit4.Name, codeType, currUnit3.ChildUnitCount);
|
||||||
foreach (var dt4 in printDatas4)
|
foreach (var dt4 in printDatas4)
|
||||||
{
|
{
|
||||||
var code4 = string.IsNullOrEmpty(dt4.BarCode) ? dt4.QrCode : dt4.BarCode;
|
var code4 = string.IsNullOrEmpty(dt4.BarCode) ? dt4.QrCode : dt4.BarCode;
|
||||||
|
@ -261,5 +280,73 @@ public class ReportTableService : IDynamicApiController, ITransient
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取打印详情单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
[ApiDescriptionSettings(Name = "GetPrintDetail")]
|
||||||
|
public async Task<List<PrintCodeTreeData>> GetPrintDetail(long? id)
|
||||||
|
{
|
||||||
|
var result = new List<PrintCodeTreeData>();
|
||||||
|
//var report = await Detail(new QueryByIdReportTableInput() { Id = id });
|
||||||
|
//if (report==null)
|
||||||
|
//{
|
||||||
|
// return result;
|
||||||
|
//}
|
||||||
|
var details = await _codeDetailService.List();
|
||||||
|
if (details == null || details.Count < 1)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
var printDetails = details.FindAll(a => a.TempListId == id || a.ReportTableId == id);
|
||||||
|
if (printDetails.Count<1)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
var father = printDetails.FindAll(a => a.FatherId == null || a.FatherId == 0);
|
||||||
|
foreach (var item in father)
|
||||||
|
{
|
||||||
|
var treeData1 = item.Adapt<PrintCodeTreeData>();
|
||||||
|
var list1 = printDetails.FindAll(a => a.FatherId == item.Id);
|
||||||
|
if (list1.Count > 0)
|
||||||
|
{
|
||||||
|
treeData1.Children = new List<PrintCodeTreeData>();
|
||||||
|
treeData1.HasChildren = false;
|
||||||
|
foreach (var dt in list1)
|
||||||
|
{
|
||||||
|
var list2 = printDetails.FindAll(a => a.FatherId == dt.Id);
|
||||||
|
var treeData2 = dt.Adapt<PrintCodeTreeData>();
|
||||||
|
if (list2.Count > 0)
|
||||||
|
{
|
||||||
|
treeData2.Children = new List<PrintCodeTreeData>();
|
||||||
|
treeData2.HasChildren = false;
|
||||||
|
foreach (var dt3 in list2)
|
||||||
|
{
|
||||||
|
var list3 = printDetails.FindAll(a => a.FatherId == dt3.Id);
|
||||||
|
var treeData3 = dt3.Adapt<PrintCodeTreeData>();
|
||||||
|
if (list3.Count > 0)
|
||||||
|
{
|
||||||
|
treeData3.Children = new List<PrintCodeTreeData>();
|
||||||
|
treeData3.HasChildren = false;
|
||||||
|
foreach (var dt4 in list3)
|
||||||
|
{
|
||||||
|
var treeData4 = dt4.Adapt<PrintCodeTreeData>();
|
||||||
|
treeData3.Children.Add(treeData4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
treeData2.Children.Add(treeData3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
treeData1.Children.Add(treeData2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.Add(treeData1);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* 业务应用
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印信息
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
export interface PrintCodeTreeData {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 雪花Id
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
code?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上级码
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
fatherCode?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条码类型
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
codeName?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
unit?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
count?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基本单位
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
baseUnit?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基本数量
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
baseCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子码数
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
childCount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
remark?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子项
|
||||||
|
*
|
||||||
|
* @type {PrintCodeTreeData[]}
|
||||||
|
* @memberof PrintCodeTreeData
|
||||||
|
*/
|
||||||
|
children?: PrintCodeTreeData[] | null;
|
||||||
|
}
|
|
@ -5,6 +5,8 @@ enum Api {
|
||||||
UpdateReportTable = '/api/reportTable/update',
|
UpdateReportTable = '/api/reportTable/update',
|
||||||
PageReportTable = '/api/reportTable/page',
|
PageReportTable = '/api/reportTable/page',
|
||||||
DetailReportTable = '/api/reportTable/detail',
|
DetailReportTable = '/api/reportTable/detail',
|
||||||
|
AddPrintDetail = '/api/reportTable/addPrintDetail',
|
||||||
|
GetPrintDetail = '/api/reportTable/getPrintDetail',
|
||||||
}
|
}
|
||||||
|
|
||||||
// 增加汇报单
|
// 增加汇报单
|
||||||
|
@ -47,4 +49,18 @@ export const detailReportTable = (id: any) =>
|
||||||
data: { id },
|
data: { id },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 新增打印详情单
|
||||||
|
export const addPrintDetail = (params?: any) =>
|
||||||
|
request({
|
||||||
|
url: Api.AddPrintDetail,
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取打印详情单
|
||||||
|
export const getPrintDetail = (id: any) =>
|
||||||
|
request({
|
||||||
|
url: Api.GetPrintDetail,
|
||||||
|
method: 'get',
|
||||||
|
data: { id },
|
||||||
|
});
|
|
@ -74,6 +74,11 @@
|
||||||
|
|
||||||
<!-- 预览 -->
|
<!-- 预览 -->
|
||||||
<PrintPreview ref="preViewRef" />
|
<PrintPreview ref="preViewRef" />
|
||||||
|
|
||||||
|
<detailForm
|
||||||
|
ref="editDialogRef"
|
||||||
|
:title="editReportTableTitle"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -86,13 +91,14 @@ import { ElMessageBox, ElMessage, TabsPaneContext } from 'element-plus';
|
||||||
import VueJsonPretty from 'vue-json-pretty';
|
import VueJsonPretty from 'vue-json-pretty';
|
||||||
import 'vue-json-pretty/lib/styles.css';
|
import 'vue-json-pretty/lib/styles.css';
|
||||||
import {getCodeConfig} from "/@/api/main/codeElement";
|
import {getCodeConfig} from "/@/api/main/codeElement";
|
||||||
|
import { addReportTable, addPrintDetail} from "/@/api/main/reportTable";
|
||||||
|
|
||||||
import { hiprint } from 'vue-plugin-hiprint';
|
import { hiprint } from 'vue-plugin-hiprint';
|
||||||
import providers from '../../print/component/hiprint/providers';
|
import providers from '../../print/component/hiprint/providers';
|
||||||
import PrintPreview from '../../print/component/hiprint/preview.vue';
|
import PrintPreview from '../../print/component/hiprint/preview.vue';
|
||||||
import { PrintDataApiFp } from '../../../../api-services/apis/print-data-api';
|
import { PrintDataApiFp } from '../../../../api-services/apis/print-data-api';
|
||||||
import { async } from '../../../../router/backEnd';
|
import { async } from '../../../../router/backEnd';
|
||||||
|
import detailForm from '/@/views/labelPrinting/printDataDetail/component/editDialog.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: String,
|
title: String,
|
||||||
|
@ -103,7 +109,8 @@ let hiprintTemplate = ref();
|
||||||
const preViewRef = ref();
|
const preViewRef = ref();
|
||||||
const codeConfigData = ref<any>([]);
|
const codeConfigData = ref<any>([]);
|
||||||
const printData = ref<PrintData[]>([]);
|
const printData = ref<PrintData[]>([]);
|
||||||
|
const editDialogRef = ref();
|
||||||
|
const editReportTableTitle = ref("打印详情");
|
||||||
//定义printInfoFrom字段
|
//定义printInfoFrom字段
|
||||||
const printInfoFrom = reactive({
|
const printInfoFrom = reactive({
|
||||||
name: '',
|
name: '',
|
||||||
|
@ -162,7 +169,7 @@ const queryUnitByGroupId = async (groupId:number) => {
|
||||||
|
|
||||||
|
|
||||||
//定义matterSubmit方法
|
//定义matterSubmit方法
|
||||||
const printSubmit = () => {
|
const printSubmit = async () => {
|
||||||
if(printInfoFrom.printDataTem=='')
|
if(printInfoFrom.printDataTem=='')
|
||||||
{
|
{
|
||||||
ElMessage.error('请先选择打印模板');
|
ElMessage.error('请先选择打印模板');
|
||||||
|
@ -179,8 +186,11 @@ const printSubmit = () => {
|
||||||
printData.value,
|
printData.value,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
callback: () => {
|
callback: async () => {
|
||||||
state.waitShowPrinter = false;
|
state.waitShowPrinter = false;
|
||||||
|
let contexts={unitGroupId:state.matterFrom.unitGroupId, materialsId:state.matterFrom.id, name:printInfoFrom.package, productDate:printInfoFrom.productDate, loseDate:printInfoFrom.loseDate, batch:printInfoFrom.batch, printDatas:printData.value};
|
||||||
|
let details = await addPrintDetail(contexts);
|
||||||
|
editDialogRef.value.openDialog(details.data.result);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -237,6 +247,8 @@ const closeDialog = () => {
|
||||||
state.isShowDialog = false;
|
state.isShowDialog = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//定义printLabel方法,打开打印设置界面
|
//定义printLabel方法,打开打印设置界面
|
||||||
const printLabel = (data:any) => {
|
const printLabel = (data:any) => {
|
||||||
const unitGroupId = data.unitGroupId
|
const unitGroupId = data.unitGroupId
|
||||||
|
|
|
@ -1,75 +1,37 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="reportTable-container">
|
<div class="reportTable-container">
|
||||||
<el-dialog v-model="isShowDialog" :width="800" draggable="">
|
<el-dialog v-model="isShowDialog" :width="1000" draggable="">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="color: #fff">
|
<div style="color: #fff">
|
||||||
<!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>-->
|
<!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>-->
|
||||||
<span>{{ props.title }}</span>
|
<span>{{ props.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules">
|
<div>
|
||||||
<el-row :gutter="35">
|
<el-table
|
||||||
<el-form-item v-show="false">
|
:data="ruleForm"
|
||||||
<el-input v-model="ruleForm.id" />
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
</el-form-item>
|
style="width: 100%"
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
tooltip-effect="light"
|
||||||
<el-form-item label="单号" prop="oddNumber">
|
row-key="code"
|
||||||
<el-input v-model="ruleForm.oddNumber" placeholder="请输入单号" maxlength="32" show-word-limit clearable />
|
:default-expand-all="isExpandAll"
|
||||||
|
border="">
|
||||||
</el-form-item>
|
<el-table-column prop="code" label="条码" width="200" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="fatherCode" label="上级码" width="140" show-overflow-tooltip="" />
|
||||||
</el-col>
|
<el-table-column prop="codeName" label="条码类型" width="100" show-overflow-tooltip="" />
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-table-column prop="count" label="数量" width="80" show-overflow-tooltip="" />
|
||||||
<el-form-item label="业务日期" prop="startDate">
|
<el-table-column prop="unit" label="单位" width="80" show-overflow-tooltip="" />
|
||||||
<el-date-picker v-model="ruleForm.startDate" type="date" placeholder="业务日期" />
|
<el-table-column prop="baseCount" label="基本数量" width="100" show-overflow-tooltip="" />
|
||||||
|
<el-table-column prop="baseUnit" label="基本单位" width="100" show-overflow-tooltip="" />
|
||||||
</el-form-item>
|
<el-table-column prop="childCount" label="子码数" width="80" show-overflow-tooltip="" />
|
||||||
|
<!-- <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" >
|
||||||
</el-col>
|
<template #default="scope">
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="''" > 查看 </el-button>
|
||||||
<el-form-item label="状态" prop="state">
|
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="''" > 删除 </el-button>
|
||||||
<el-input-number v-model="ruleForm.state" placeholder="请输入状态" clearable />
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
</el-form-item>
|
</el-table>
|
||||||
|
</div>
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
||||||
<el-form-item label="生产类型" prop="productType">
|
|
||||||
<el-input v-model="ruleForm.productType" placeholder="请输入生产类型" maxlength="32" show-word-limit clearable />
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
||||||
<el-form-item label="生产线" prop="productionLine">
|
|
||||||
<el-input v-model="ruleForm.productionLine" placeholder="请输入生产线" maxlength="32" show-word-limit clearable />
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
||||||
<el-form-item label="生产线编码" prop="codeNum">
|
|
||||||
<el-input v-model="ruleForm.codeNum" placeholder="请输入生产线编码" maxlength="32" show-word-limit clearable />
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
||||||
<el-form-item label="源单号" prop="sourceNumber">
|
|
||||||
<el-input v-model="ruleForm.sourceNumber" placeholder="请输入源单号" maxlength="32" show-word-limit clearable />
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
|
||||||
<el-form-item label="备注" prop="remarks">
|
|
||||||
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="64" show-word-limit clearable />
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
@ -86,11 +48,11 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref,onMounted } from "vue";
|
import { ref,onMounted,reactive } from "vue";
|
||||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import type { FormRules } from "element-plus";
|
import type { FormRules } from "element-plus";
|
||||||
import { addReportTable, updateReportTable, detailReportTable } from "/@/api/main/reportTable";
|
import { addReportTable, updateReportTable, detailReportTable ,getPrintDetail} from "/@/api/main/reportTable";
|
||||||
|
|
||||||
//父级传递来的参数
|
//父级传递来的参数
|
||||||
var props = defineProps({
|
var props = defineProps({
|
||||||
|
@ -103,20 +65,30 @@
|
||||||
const emit = defineEmits(["reloadTable"]);
|
const emit = defineEmits(["reloadTable"]);
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
const isShowDialog = ref(false);
|
const isShowDialog = ref(false);
|
||||||
const ruleForm = ref<any>({});
|
const ruleForm = ref<any>([]);
|
||||||
//自行添加其他规则
|
//自行添加其他规则
|
||||||
const rules = ref<FormRules>({
|
const rules = ref<FormRules>({
|
||||||
});
|
});
|
||||||
|
const state = reactive({
|
||||||
|
loading: false,
|
||||||
|
isShowCheckbox: false,
|
||||||
|
ownOrgData: [],
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
const openDialog = async (row: any) => {
|
const openDialog = async (row: any) => {
|
||||||
// ruleForm.value = JSON.parse(JSON.stringify(row));
|
// ruleForm.value = JSON.parse(JSON.stringify(row));
|
||||||
// 改用detail获取最新数据来编辑
|
//console.log(row);
|
||||||
let rowData = JSON.parse(JSON.stringify(row));
|
|
||||||
if (rowData.id)
|
if(typeof(row) === 'number'){
|
||||||
ruleForm.value = (await detailReportTable(rowData.id)).data.result;
|
var res = await getPrintDetail(row);
|
||||||
else
|
//console.log(res);
|
||||||
ruleForm.value = rowData;
|
ruleForm.value = res.data.result;
|
||||||
|
}else{
|
||||||
|
ruleForm.value=row;
|
||||||
|
}
|
||||||
|
//console.log(ruleForm.value);
|
||||||
isShowDialog.value = true;
|
isShowDialog.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,29 +105,11 @@
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => {
|
isShowDialog.value = false;
|
||||||
if (isValid) {
|
|
||||||
let values = ruleForm.value;
|
|
||||||
if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) {
|
|
||||||
await addReportTable(values);
|
|
||||||
} else {
|
|
||||||
await updateReportTable(values);
|
|
||||||
}
|
|
||||||
closeDialog();
|
|
||||||
} else {
|
|
||||||
ElMessage({
|
|
||||||
message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`,
|
|
||||||
type: "error",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const isExpandAll = ref(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 页面加载时
|
// 页面加载时
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
@ -91,10 +91,11 @@
|
||||||
<el-table-column prop="codeNum" label="生产线编码" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="codeNum" label="生产线编码" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="sourceNumber" label="源单号" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="sourceNumber" label="源单号" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportTable:update') || auth('reportTable:delete')">
|
<el-table-column label="操作" width="240" align="center" fixed="right" show-overflow-tooltip="" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditReportTable(scope.row)" v-auth="'reportTable:update'"> 编辑 </el-button>
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportTable(scope.row.id)" > 查看 </el-button>
|
||||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delReportTable(scope.row)" v-auth="'reportTable:delete'"> 删除 </el-button>
|
<el-button icon="ele-Add" size="small" text="" type="primary" @click="addReportTable(scope.row)" > 生成汇报单 </el-button>
|
||||||
|
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delReportTable(scope.row)" > 删除 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -112,7 +113,10 @@
|
||||||
<editDialog
|
<editDialog
|
||||||
ref="editDialogRef"
|
ref="editDialogRef"
|
||||||
:title="editReportTableTitle"
|
:title="editReportTableTitle"
|
||||||
@reloadTable="handleQuery"
|
/>
|
||||||
|
<addReportDialog
|
||||||
|
ref="addReportDialogRef"
|
||||||
|
:title="addReportTitle"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,13 +129,14 @@
|
||||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||||
import { formatDate } from '/@/utils/formatTime';
|
import { formatDate } from '/@/utils/formatTime';
|
||||||
|
|
||||||
|
import addReportDialog from '/@/views/productionCenter/reportDetailTable/component/editDialog.vue'
|
||||||
import editDialog from '/@/views/productionCenter/reportTable/component/editDialog.vue'
|
import editDialog from '/@/views/labelPrinting/printDataDetail/component/editDialog.vue'
|
||||||
import { pageReportTable, deleteReportTable } from '/@/api/main/reportTable';
|
import { pageReportTable, deleteReportTable } from '/@/api/main/reportTable';
|
||||||
|
|
||||||
|
|
||||||
const showAdvanceQueryUI = ref(false);
|
const showAdvanceQueryUI = ref(false);
|
||||||
const editDialogRef = ref();
|
const editDialogRef = ref();
|
||||||
|
const addReportDialogRef = ref();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const tableData = ref<any>([]);
|
const tableData = ref<any>([]);
|
||||||
const queryParams = ref<any>({});
|
const queryParams = ref<any>({});
|
||||||
|
@ -142,6 +147,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
const editReportTableTitle = ref("");
|
const editReportTableTitle = ref("");
|
||||||
|
const addReportTitle = ref("");
|
||||||
|
|
||||||
// 改变高级查询的控件显示状态
|
// 改变高级查询的控件显示状态
|
||||||
const changeAdvanceQueryUI = () => {
|
const changeAdvanceQueryUI = () => {
|
||||||
|
@ -166,15 +172,20 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
// 打开新增页面
|
// 打开新增页面
|
||||||
const openAddReportTable = () => {
|
// const openAddReportTable = () => {
|
||||||
editReportTableTitle.value = '添加汇报单';
|
// editReportTableTitle.value = '添加汇报单';
|
||||||
editDialogRef.value.openDialog({});
|
// editDialogRef.value.openDialog({});
|
||||||
|
// };
|
||||||
|
|
||||||
|
// 打开新增汇报单页面
|
||||||
|
const addReportTable = (row: any) => {
|
||||||
|
addReportTitle.value = '添加汇报单';
|
||||||
|
addReportDialogRef.value.openDialog({updateUserId:row.id});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 打开打印详情页面
|
||||||
// 打开编辑页面
|
const readReportTable = (row: any) => {
|
||||||
const openEditReportTable = (row: any) => {
|
editReportTableTitle.value = '打印详情';
|
||||||
editReportTableTitle.value = '编辑汇报单';
|
|
||||||
editDialogRef.value.openDialog(row);
|
editDialogRef.value.openDialog(row);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -206,6 +217,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
handleQuery();
|
handleQuery();
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
:deep(.el-ipnut),
|
:deep(.el-ipnut),
|
||||||
|
|
|
@ -223,6 +223,7 @@
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
const isShowDialog = ref(false);
|
const isShowDialog = ref(false);
|
||||||
const ruleForm = ref<any>({});
|
const ruleForm = ref<any>({});
|
||||||
|
const materials = ref<any>({});
|
||||||
//自行添加其他规则
|
//自行添加其他规则
|
||||||
const rules = ref<FormRules>({
|
const rules = ref<FormRules>({
|
||||||
productName: [{required: true, message: '请输入产品名称!', trigger: 'blur',},],
|
productName: [{required: true, message: '请输入产品名称!', trigger: 'blur',},],
|
||||||
|
@ -238,7 +239,13 @@
|
||||||
ruleForm.value = (await detailReportDetailTable(rowData.id)).data.result;
|
ruleForm.value = (await detailReportDetailTable(rowData.id)).data.result;
|
||||||
else
|
else
|
||||||
ruleForm.value = rowData;
|
ruleForm.value = rowData;
|
||||||
|
|
||||||
|
if(rowData.updateUserId){
|
||||||
|
console.log('matertails');
|
||||||
|
|
||||||
|
}
|
||||||
isShowDialog.value = true;
|
isShowDialog.value = true;
|
||||||
|
//console.log(ruleForm.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
|
@ -166,7 +166,7 @@
|
||||||
<el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button>
|
<el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button>
|
||||||
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
|
||||||
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
|
||||||
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddReportDetailTable" v-auth="'reportDetailTable:add'"> 新增 </el-button>
|
<!-- <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddReportDetailTable" v-auth="'reportDetailTable:add'"> 新增 </el-button> -->
|
||||||
|
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -210,9 +210,10 @@
|
||||||
<el-table-column prop="endDate" label="完工时间" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="endDate" label="完工时间" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="sourceOddNumber" label="源单号" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="sourceOddNumber" label="源单号" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
|
||||||
<el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportDetailTable:update') || auth('reportDetailTable:delete')">
|
<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportDetailTable:update') || auth('reportDetailTable:delete')">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> 编辑 </el-button>
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> 编辑 </el-button>
|
||||||
|
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportDetailTable(scope.row.id)" v-auth="'reportDetailTable:update'"> 详情 </el-button>
|
||||||
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delReportDetailTable(scope.row)" v-auth="'reportDetailTable:delete'"> 删除 </el-button>
|
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delReportDetailTable(scope.row)" v-auth="'reportDetailTable:delete'"> 删除 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -228,15 +229,15 @@
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
/>
|
/>
|
||||||
<printDialog
|
|
||||||
ref="printDialogRef"
|
|
||||||
:title="printReportDetailTableTitle"
|
|
||||||
@reloadTable="handleQuery" />
|
|
||||||
<editDialog
|
<editDialog
|
||||||
ref="editDialogRef"
|
ref="editDialogRef"
|
||||||
:title="editReportDetailTableTitle"
|
:title="editReportDetailTableTitle"
|
||||||
@reloadTable="handleQuery"
|
@reloadTable="handleQuery"
|
||||||
/>
|
/>
|
||||||
|
<printDetailDialog
|
||||||
|
ref="printDetailDialogRef"
|
||||||
|
:title="printDetailTableTitle"
|
||||||
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -248,15 +249,14 @@
|
||||||
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
|
||||||
import { formatDate } from '/@/utils/formatTime';
|
import { formatDate } from '/@/utils/formatTime';
|
||||||
|
|
||||||
|
import editDialog from '/@/views/productionCenter/reportDetailTable/component/editDialog.vue'
|
||||||
import printDialog from '/@/views/labelPrinting/print/component/hiprint/preview.vue'
|
import printDetailDialog from '/@/views/labelPrinting/printDataDetail/component/editDialog.vue'
|
||||||
import editDialog from '/@/views/main/reportDetailTable/component/editDialog.vue'
|
|
||||||
import { pageReportDetailTable, deleteReportDetailTable } from '/@/api/main/reportDetailTable';
|
import { pageReportDetailTable, deleteReportDetailTable } from '/@/api/main/reportDetailTable';
|
||||||
|
|
||||||
|
|
||||||
const showAdvanceQueryUI = ref(false);
|
const showAdvanceQueryUI = ref(false);
|
||||||
const printDialogRef = ref();
|
|
||||||
const editDialogRef = ref();
|
const editDialogRef = ref();
|
||||||
|
const printDetailDialogRef = ref();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const tableData = ref<any>([]);
|
const tableData = ref<any>([]);
|
||||||
const queryParams = ref<any>({});
|
const queryParams = ref<any>({});
|
||||||
|
@ -266,8 +266,8 @@
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const printReportDetailTableTitle = ref("");
|
|
||||||
const editReportDetailTableTitle = ref("");
|
const editReportDetailTableTitle = ref("");
|
||||||
|
const printDetailTableTitle = ref("");
|
||||||
|
|
||||||
// 改变高级查询的控件显示状态
|
// 改变高级查询的控件显示状态
|
||||||
const changeAdvanceQueryUI = () => {
|
const changeAdvanceQueryUI = () => {
|
||||||
|
@ -292,15 +292,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
// 打开新增页面
|
// 打开新增页面
|
||||||
const openAddReportDetailTable = () => {
|
// const openAddReportDetailTable = () => {
|
||||||
editReportDetailTableTitle.value = '添加汇报单详情';
|
// editReportDetailTableTitle.value = '添加汇报单详情';
|
||||||
editDialogRef.value.openDialog({});
|
// editDialogRef.value.openDialog({});
|
||||||
};
|
// };
|
||||||
|
|
||||||
// 打开打印页面
|
|
||||||
const openPrintReportDetailTable = async (row: any) => {
|
|
||||||
printReportDetailTableTitle.value = '打印汇报单详情';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 打开编辑页面
|
// 打开编辑页面
|
||||||
const openEditReportDetailTable = (row: any) => {
|
const openEditReportDetailTable = (row: any) => {
|
||||||
|
@ -308,6 +304,14 @@
|
||||||
editDialogRef.value.openDialog(row);
|
editDialogRef.value.openDialog(row);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 打开查看详情页面
|
||||||
|
const readReportDetailTable = (row: any) => {
|
||||||
|
printDetailTableTitle.value = '打印详情';
|
||||||
|
console.log(row);
|
||||||
|
printDetailDialogRef.value.openDialog(row);
|
||||||
|
};
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const delReportDetailTable = (row: any) => {
|
const delReportDetailTable = (row: any) => {
|
||||||
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
ElMessageBox.confirm(`确定要删除吗?`, "提示", {
|
Loading…
Reference in New Issue