fix: 木箱类型
This commit is contained in:
@@ -58,4 +58,5 @@ public interface ErrorCodeConstants {
|
|||||||
|
|
||||||
// ========== 木箱类型 ==========
|
// ========== 木箱类型 ==========
|
||||||
ErrorCode BOX_TYPE_NOT_EXISTS = new ErrorCode(400001, "木箱类型不存在");
|
ErrorCode BOX_TYPE_NOT_EXISTS = new ErrorCode(400001, "木箱类型不存在");
|
||||||
|
ErrorCode BOX_TYPE_EXISTS = new ErrorCode(400002, "木箱类型已存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,22 @@ public class BoxTypeRespVO {
|
|||||||
@ExcelProperty("木箱描述")
|
@ExcelProperty("木箱描述")
|
||||||
private String boxName;
|
private String boxName;
|
||||||
|
|
||||||
|
@Schema(description = "木箱长度")
|
||||||
|
@ExcelProperty("木箱长度")
|
||||||
|
private Integer boxLength;
|
||||||
|
|
||||||
|
@Schema(description = "木箱宽度")
|
||||||
|
@ExcelProperty("木箱宽度")
|
||||||
|
private Integer boxWidth;
|
||||||
|
|
||||||
|
@Schema(description = "木箱高度")
|
||||||
|
@ExcelProperty("木箱高度")
|
||||||
|
private Integer boxHigh;
|
||||||
|
|
||||||
|
@Schema(description = "最大子卷数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("最大子卷数")
|
||||||
|
private Integer maxNum;
|
||||||
|
|
||||||
@Schema(description = "捆扎模版")
|
@Schema(description = "捆扎模版")
|
||||||
@ExcelProperty("捆扎模版")
|
@ExcelProperty("捆扎模版")
|
||||||
private String lashNum;
|
private String lashNum;
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
package cn.code.nl.module.lms.controller.admin.boxtype.vo;
|
package cn.code.nl.module.lms.controller.admin.boxtype.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import java.io.IOException;
|
||||||
import lombok.*;
|
|
||||||
import java.util.*;
|
|
||||||
import jakarta.validation.constraints.*;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonToken;
|
||||||
|
import com.fasterxml.jackson.core.exc.InputCoercionException;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 木箱类型新增/修改 Request VO")
|
@Schema(description = "管理后台 - 木箱类型新增/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@@ -17,6 +26,21 @@ public class BoxTypeSaveReqVO {
|
|||||||
@Schema(description = "木箱描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
@Schema(description = "木箱描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||||
private String boxName;
|
private String boxName;
|
||||||
|
|
||||||
|
@Schema(description = "木箱长度")
|
||||||
|
private Integer boxLength;
|
||||||
|
|
||||||
|
@Schema(description = "木箱宽度")
|
||||||
|
private Integer boxWidth;
|
||||||
|
|
||||||
|
@Schema(description = "木箱高度")
|
||||||
|
private Integer boxHigh;
|
||||||
|
|
||||||
|
@Schema(description = "最大子卷数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "最大子卷数不能为空")
|
||||||
|
@Min(value = 1, message = "最大子卷数不能小于1")
|
||||||
|
@JsonDeserialize(using = StrictIntegerDeserializer.class)
|
||||||
|
private Integer maxNum;
|
||||||
|
|
||||||
@Schema(description = "捆扎模版")
|
@Schema(description = "捆扎模版")
|
||||||
private String lashNum;
|
private String lashNum;
|
||||||
|
|
||||||
@@ -42,4 +66,22 @@ public class BoxTypeSaveReqVO {
|
|||||||
@NotNull(message = "干燥剂数量不能为空")
|
@NotNull(message = "干燥剂数量不能为空")
|
||||||
private Integer desiccantNum;
|
private Integer desiccantNum;
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* 严格限制 JSON 数字必须为整数,避免小数被 Jackson 截断。
|
||||||
|
*/
|
||||||
|
private static class StrictIntegerDeserializer extends JsonDeserializer<Integer> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer deserialize(JsonParser parser, DeserializationContext context) throws IOException {
|
||||||
|
if (!parser.hasToken(JsonToken.VALUE_NUMBER_INT)) {
|
||||||
|
throw InvalidFormatException.from(parser, "最大子卷数必须为整数", parser.getText(), Integer.class);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return parser.getIntValue();
|
||||||
|
} catch (InputCoercionException exception) {
|
||||||
|
throw InvalidFormatException.from(parser, "最大子卷数超出整数范围", parser.getText(), Integer.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class SubPackageRelationPageReqVO extends PageParam {
|
|||||||
private String saleOrderName;
|
private String saleOrderName;
|
||||||
|
|
||||||
@Schema(description = "客户编号", example = "王五")
|
@Schema(description = "客户编号", example = "王五")
|
||||||
private String customerName;
|
private String customerCode;
|
||||||
|
|
||||||
@Schema(description = "产品编码", example = "李四")
|
@Schema(description = "产品编码", example = "李四")
|
||||||
private String productName;
|
private String productName;
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ public class SubPackageRelationRespVO {
|
|||||||
@ExcelProperty("箱内子卷数量")
|
@ExcelProperty("箱内子卷数量")
|
||||||
private Integer qualityInBox;
|
private Integer qualityInBox;
|
||||||
|
|
||||||
@Schema(description = "erp木箱号")
|
|
||||||
@ExcelProperty("erp木箱号")
|
|
||||||
private String extBoxSn;
|
|
||||||
|
|
||||||
@Schema(description = "木箱自身重量")
|
@Schema(description = "木箱自身重量")
|
||||||
@ExcelProperty("木箱自身重量")
|
@ExcelProperty("木箱自身重量")
|
||||||
private BigDecimal boxWeight;
|
private BigDecimal boxWeight;
|
||||||
@@ -47,11 +43,11 @@ public class SubPackageRelationRespVO {
|
|||||||
|
|
||||||
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
@ExcelProperty("客户编号")
|
@ExcelProperty("客户编号")
|
||||||
private String customerName;
|
private String customerCode;
|
||||||
|
|
||||||
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||||
@ExcelProperty("客户名称")
|
@ExcelProperty("客户名称")
|
||||||
private String customerDescription;
|
private String customerName;
|
||||||
|
|
||||||
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||||
@ExcelProperty("产品编码")
|
@ExcelProperty("产品编码")
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ public class SubPackageRelationSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
@NotEmpty(message = "客户编号不能为空")
|
@NotEmpty(message = "客户编号不能为空")
|
||||||
private String customerName;
|
private String customerCode;
|
||||||
|
|
||||||
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||||
@NotEmpty(message = "客户名称不能为空")
|
@NotEmpty(message = "客户名称不能为空")
|
||||||
private String customerDescription;
|
private String customerName;
|
||||||
|
|
||||||
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||||
@NotEmpty(message = "产品编码不能为空")
|
@NotEmpty(message = "产品编码不能为空")
|
||||||
|
|||||||
@@ -35,6 +35,22 @@ public class BoxTypeDO {
|
|||||||
* 木箱描述
|
* 木箱描述
|
||||||
*/
|
*/
|
||||||
private String boxName;
|
private String boxName;
|
||||||
|
/**
|
||||||
|
* 木箱长度
|
||||||
|
*/
|
||||||
|
private Integer boxLength;
|
||||||
|
/**
|
||||||
|
* 木箱宽度
|
||||||
|
*/
|
||||||
|
private Integer boxWidth;
|
||||||
|
/**
|
||||||
|
* 木箱高度
|
||||||
|
*/
|
||||||
|
private Integer boxHigh;
|
||||||
|
/**
|
||||||
|
* 最大子卷数
|
||||||
|
*/
|
||||||
|
private Integer maxNum;
|
||||||
/**
|
/**
|
||||||
* 捆扎模版
|
* 捆扎模版
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,11 +59,11 @@ public class SubPackageRelationDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 客户编号
|
* 客户编号
|
||||||
*/
|
*/
|
||||||
private String customerName;
|
private String customerCode;
|
||||||
/**
|
/**
|
||||||
* 客户名称
|
* 客户名称
|
||||||
*/
|
*/
|
||||||
private String customerDescription;
|
private String customerName;
|
||||||
/**
|
/**
|
||||||
* 产品编码
|
* 产品编码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -26,4 +26,8 @@ public interface BoxTypeMapper extends BaseMapperX<BoxTypeDO> {
|
|||||||
.orderByDesc(BoxTypeDO::getId));
|
.orderByDesc(BoxTypeDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default BoxTypeDO selectByBoxType(String boxType) {
|
||||||
|
return selectOne(BoxTypeDO::getBoxType, boxType);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ public interface SubPackageRelationMapper extends BaseMapperX<SubPackageRelation
|
|||||||
.eqIfPresent(SubPackageRelationDO::getPackageBoxSn, reqVO.getPackageBoxSn())
|
.eqIfPresent(SubPackageRelationDO::getPackageBoxSn, reqVO.getPackageBoxSn())
|
||||||
.eqIfPresent(SubPackageRelationDO::getBoxType, reqVO.getBoxType())
|
.eqIfPresent(SubPackageRelationDO::getBoxType, reqVO.getBoxType())
|
||||||
.likeIfPresent(SubPackageRelationDO::getSaleOrderName, reqVO.getSaleOrderName())
|
.likeIfPresent(SubPackageRelationDO::getSaleOrderName, reqVO.getSaleOrderName())
|
||||||
.likeIfPresent(SubPackageRelationDO::getCustomerName, reqVO.getCustomerName())
|
.likeIfPresent(SubPackageRelationDO::getCustomerCode, reqVO.getCustomerCode())
|
||||||
.likeIfPresent(SubPackageRelationDO::getProductName, reqVO.getProductName())
|
.likeIfPresent(SubPackageRelationDO::getProductName, reqVO.getProductName())
|
||||||
.eqIfPresent(SubPackageRelationDO::getDateOfFgInbound, reqVO.getDateOfFgInbound())
|
.eqIfPresent(SubPackageRelationDO::getDateOfFgInbound, reqVO.getDateOfFgInbound())
|
||||||
.likeIfPresent(SubPackageRelationDO::getContainerName, reqVO.getContainerName())
|
.likeIfPresent(SubPackageRelationDO::getContainerName, reqVO.getContainerName())
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ public class BoxTypeServiceImpl implements BoxTypeService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createBoxType(BoxTypeSaveReqVO createReqVO) {
|
public Long createBoxType(BoxTypeSaveReqVO createReqVO) {
|
||||||
|
// 校验唯一性
|
||||||
|
validateBoxTypeUnique(createReqVO.getBoxType());
|
||||||
// 插入
|
// 插入
|
||||||
BoxTypeDO boxType = BeanUtils.toBean(createReqVO, BoxTypeDO.class);
|
BoxTypeDO boxType = BeanUtils.toBean(createReqVO, BoxTypeDO.class);
|
||||||
boxTypeMapper.insert(boxType);
|
boxTypeMapper.insert(boxType);
|
||||||
@@ -42,6 +44,12 @@ public class BoxTypeServiceImpl implements BoxTypeService {
|
|||||||
return boxType.getId();
|
return boxType.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void validateBoxTypeUnique(String boxType) {
|
||||||
|
if (boxTypeMapper.selectByBoxType(boxType) != null) {
|
||||||
|
throw exception(BOX_TYPE_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateBoxType(BoxTypeSaveReqVO updateReqVO) {
|
public void updateBoxType(BoxTypeSaveReqVO updateReqVO) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ export namespace LmsBoxTypeApi {
|
|||||||
id?: number; // id
|
id?: number; // id
|
||||||
boxType: string; // 木箱类型
|
boxType: string; // 木箱类型
|
||||||
boxName?: string; // 木箱描述
|
boxName?: string; // 木箱描述
|
||||||
|
boxLength?: number; // 木箱长度
|
||||||
|
boxWidth?: number; // 木箱宽度
|
||||||
|
boxHigh?: number; // 木箱高度
|
||||||
|
maxNum: number; // 最大子卷数
|
||||||
lashNum: string; // 捆扎模版
|
lashNum: string; // 捆扎模版
|
||||||
lashNumOne: number; // 一次捆扎次数
|
lashNumOne: number; // 一次捆扎次数
|
||||||
lashNumTwo: number; // 二次捆扎次数
|
lashNumTwo: number; // 二次捆扎次数
|
||||||
|
|||||||
@@ -8,13 +8,12 @@ export namespace LmsSubPackageRelationApi {
|
|||||||
id: number; // 子卷包装标识
|
id: number; // 子卷包装标识
|
||||||
packageBoxSn: string; // 木箱唯一码
|
packageBoxSn: string; // 木箱唯一码
|
||||||
qualityInBox: number; // 箱内子卷数量
|
qualityInBox: number; // 箱内子卷数量
|
||||||
extBoxSn: string; // erp木箱号
|
|
||||||
boxWeight: number; // 木箱自身重量
|
boxWeight: number; // 木箱自身重量
|
||||||
boxType: string; // 木箱料号
|
boxType: string; // 木箱料号
|
||||||
qualityGuaranPeriod: string; // 保质期
|
qualityGuaranPeriod: string; // 保质期
|
||||||
saleOrderName?: string; // 销售订单及行号
|
saleOrderName?: string; // 销售订单及行号
|
||||||
customerName?: string; // 客户编号
|
customerCode?: string; // 客户编号
|
||||||
customerDescription?: string; // 客户名称
|
customerName?: string; // 客户名称
|
||||||
productName?: string; // 产品编码
|
productName?: string; // 产品编码
|
||||||
productDescription?: string; // 产品描述
|
productDescription?: string; // 产品描述
|
||||||
dateOfFgInbound: string; // 入库日期
|
dateOfFgInbound: string; // 入库日期
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
import type { LmsBoxTypeApi } from '#/api/lms/boxtype';
|
||||||
|
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { DICT_TYPE } from '@vben/constants';
|
||||||
|
|
||||||
|
import { message } from 'antdv-next';
|
||||||
|
|
||||||
|
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
|
import { getBoxTypePage } from '#/api/lms/boxtype';
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
select: [rows: LmsBoxTypeApi.BoxType[]];
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const selectedRows = ref<LmsBoxTypeApi.BoxType[]>([]);
|
||||||
|
const selectModalGridHeight = 600;
|
||||||
|
|
||||||
|
function handleRadioChange({ row }: { row: LmsBoxTypeApi.BoxType }) {
|
||||||
|
selectedRows.value = row ? [row] : [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCheckboxChange({ records }: { records: LmsBoxTypeApi.BoxType[] }) {
|
||||||
|
selectedRows.value = records;
|
||||||
|
}
|
||||||
|
|
||||||
|
const baseColumns: VxeTableGridOptions<LmsBoxTypeApi.BoxType>['columns'] = [
|
||||||
|
{ field: 'boxType', title: '木箱类型', minWidth: 120 },
|
||||||
|
{ field: 'boxName', title: '木箱描述', minWidth: 180 },
|
||||||
|
{ field: 'boxLength', title: '木箱长度', minWidth: 110 },
|
||||||
|
{ field: 'boxWidth', title: '木箱宽度', minWidth: 110 },
|
||||||
|
{ field: 'boxHigh', title: '木箱高度', minWidth: 110 },
|
||||||
|
{ field: 'maxNum', title: '最大子卷数', minWidth: 120 },
|
||||||
|
{
|
||||||
|
field: 'needLashOne',
|
||||||
|
title: '是否一次捆扎',
|
||||||
|
minWidth: 120,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'needLashTwo',
|
||||||
|
title: '是否二次捆扎',
|
||||||
|
minWidth: 120,
|
||||||
|
cellRender: {
|
||||||
|
name: 'CellDict',
|
||||||
|
props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
|
formOptions: {
|
||||||
|
schema: [
|
||||||
|
{
|
||||||
|
fieldName: 'boxType',
|
||||||
|
label: '木箱类型',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
allowClear: true,
|
||||||
|
placeholder: '请输入木箱类型',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'boxName',
|
||||||
|
label: '木箱描述',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
allowClear: true,
|
||||||
|
placeholder: '请输入木箱描述',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
gridOptions: {
|
||||||
|
columns: [{ type: 'radio', width: 40 }, ...baseColumns],
|
||||||
|
height: selectModalGridHeight,
|
||||||
|
keepSource: true,
|
||||||
|
proxyConfig: {
|
||||||
|
ajax: {
|
||||||
|
query: async ({ page }, formValues) => {
|
||||||
|
return await getBoxTypePage({
|
||||||
|
pageNo: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowConfig: {
|
||||||
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
|
},
|
||||||
|
toolbarConfig: {
|
||||||
|
refresh: true,
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
} as VxeTableGridOptions<LmsBoxTypeApi.BoxType>,
|
||||||
|
gridEvents: {
|
||||||
|
radioChange: handleRadioChange,
|
||||||
|
checkboxAll: handleCheckboxChange,
|
||||||
|
checkboxChange: handleCheckboxChange,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
async function clearSelectedRows() {
|
||||||
|
selectedRows.value = [];
|
||||||
|
await gridApi.grid?.clearRadioRow?.();
|
||||||
|
await gridApi.grid?.clearCheckboxRow?.();
|
||||||
|
}
|
||||||
|
|
||||||
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
async onConfirm() {
|
||||||
|
if (selectedRows.value.length === 0) {
|
||||||
|
message.warning('请至少选择一条木箱类型');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit('select', selectedRows.value);
|
||||||
|
modalApi.close();
|
||||||
|
},
|
||||||
|
async onOpenChange(isOpen: boolean) {
|
||||||
|
await clearSelectedRows();
|
||||||
|
if (!isOpen) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const data = modalApi.getData<{ multiple?: boolean }>();
|
||||||
|
const multiple = data?.multiple ?? false;
|
||||||
|
gridApi.setGridOptions({
|
||||||
|
columns: [
|
||||||
|
{ type: multiple ? 'checkbox' : 'radio', width: 40 },
|
||||||
|
...baseColumns,
|
||||||
|
],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Modal title="选择木箱类型" class="w-[1100px]">
|
||||||
|
<Grid />
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
@@ -119,6 +119,55 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
placeholder: '请输入木箱结构',
|
placeholder: '请输入木箱结构',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'boxLength',
|
||||||
|
label: '木箱长度',
|
||||||
|
rules: 'required',
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
placeholder: '请输入木箱长度',
|
||||||
|
precision: 0,
|
||||||
|
step: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'boxWidth',
|
||||||
|
label: '木箱宽度',
|
||||||
|
rules: 'required',
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
placeholder: '请输入木箱宽度',
|
||||||
|
precision: 0,
|
||||||
|
step: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'boxHigh',
|
||||||
|
label: '木箱高度',
|
||||||
|
rules: 'required',
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
placeholder: '请输入木箱高度',
|
||||||
|
precision: 0,
|
||||||
|
step: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'maxNum',
|
||||||
|
label: '最大子卷数',
|
||||||
|
rules: 'required',
|
||||||
|
component: 'InputNumber',
|
||||||
|
defaultValue: 1,
|
||||||
|
componentProps: {
|
||||||
|
min: 1,
|
||||||
|
placeholder: '请输入最大子卷数',
|
||||||
|
precision: 0,
|
||||||
|
step: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,6 +230,26 @@ export function useGridColumns(): VxeTableGridOptions<LmsBoxTypeApi.BoxType>['co
|
|||||||
title: '木箱描述',
|
title: '木箱描述',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'boxLength',
|
||||||
|
title: '木箱长度',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'boxWidth',
|
||||||
|
title: '木箱宽度',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'boxHigh',
|
||||||
|
title: '木箱高度',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'maxNum',
|
||||||
|
title: '最大子卷数',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'lashNum',
|
field: 'lashNum',
|
||||||
title: '捆扎模版',
|
title: '捆扎模版',
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'packageBoxSn',
|
fieldName: 'packageBoxSn',
|
||||||
label: '木箱唯一码',
|
label: '木箱码',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入木箱唯一码',
|
placeholder: '请输入木箱唯一码',
|
||||||
@@ -33,14 +33,6 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
placeholder: '请输入箱内子卷数量',
|
placeholder: '请输入箱内子卷数量',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
fieldName: 'extBoxSn',
|
|
||||||
label: 'erp木箱号',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
placeholder: '请输入erp木箱号',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'boxWeight',
|
fieldName: 'boxWeight',
|
||||||
label: '木箱自身重量',
|
label: '木箱自身重量',
|
||||||
@@ -76,7 +68,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'customerName',
|
fieldName: 'customerCode',
|
||||||
label: '客户编号',
|
label: '客户编号',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
@@ -85,10 +77,13 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'customerDescription',
|
fieldName: 'customerName',
|
||||||
label: '客户名称',
|
label: '客户名称',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'RichTextarea',
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入客户名称',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'productName',
|
fieldName: 'productName',
|
||||||
@@ -103,7 +98,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
fieldName: 'productDescription',
|
fieldName: 'productDescription',
|
||||||
label: '产品描述',
|
label: '产品描述',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
component: 'RichTextarea',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'dateOfFgInbound',
|
fieldName: 'dateOfFgInbound',
|
||||||
@@ -293,7 +288,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
{
|
{
|
||||||
fieldName: 'saleOrderDescription',
|
fieldName: 'saleOrderDescription',
|
||||||
label: '销售订单描述',
|
label: '销售订单描述',
|
||||||
component: 'RichTextarea',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'widthStandard',
|
fieldName: 'widthStandard',
|
||||||
@@ -412,7 +407,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
fieldName: 'packageBoxSn',
|
fieldName: 'packageBoxSn',
|
||||||
label: '木箱唯一码',
|
label: '木箱码',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
@@ -439,7 +434,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'customerName',
|
fieldName: 'customerCode',
|
||||||
label: '客户编号',
|
label: '客户编号',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@@ -539,12 +534,12 @@ export function useGridColumns(): VxeTableGridOptions<LmsSubPackageRelationApi.S
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerName',
|
field: 'customerCode',
|
||||||
title: '客户编号',
|
title: '客户编号',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerDescription',
|
field: 'customerName',
|
||||||
title: '客户名称',
|
title: '客户名称',
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,12 +26,13 @@ const [Form, formApi] = useVbenForm({
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
class: 'w-full',
|
class: 'w-full',
|
||||||
},
|
},
|
||||||
formItemClass: 'col-span-2',
|
formItemClass: 'col-span-1',
|
||||||
labelWidth: 80,
|
labelWidth: 168,
|
||||||
},
|
},
|
||||||
layout: 'horizontal',
|
layout: 'horizontal',
|
||||||
schema: useFormSchema(),
|
schema: useFormSchema(),
|
||||||
showDefaultActions: false,
|
showDefaultActions: false,
|
||||||
|
wrapperClass: 'grid-cols-2 gap-x-4',
|
||||||
});
|
});
|
||||||
|
|
||||||
const [Modal, modalApi] = useVbenModal({
|
const [Modal, modalApi] = useVbenModal({
|
||||||
@@ -76,7 +77,7 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Modal :title="getTitle">
|
<Modal :title="getTitle" class="w-1/2">
|
||||||
<Form class="mx-4" />
|
<Form class="mx-4" />
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user