skyouc
6 天以前 de010011aa92785f04b6f0345411c584d49a92d4
#优化
1. 出库单据优化
2. 字典类型数据优化
11个文件已修改
97 ■■■■■ 已修改文件
rsf-admin/.env 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/en.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/zh.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/outStock/OutOrderCreate.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/outStock/OutOrderEdit.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/outStock/OutOrderList.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/system/dicts/dictType/DictTypeList.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/OutStockController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrder.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/SerialRule.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/utils/SerialRuleUtils.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/.env
@@ -1,3 +1,3 @@
VITE_BASE_IP=192.168.4.25
VITE_BASE_IP=192.168.4.56
# VITE_BASE_IP=47.76.147.249
VITE_BASE_PORT=8080
rsf-admin/src/i18n/en.js
@@ -171,7 +171,9 @@
        permissions: 'Permissions',
        delivery: 'Delivery',
        outStock: 'Out Stock',
        outStockItem: 'Out Stock Item'
        outStockItem: 'Out Stock Item',
        inStockPoces: 'In Stock Pocess',
        outStockPoces: 'Out Stock Pocess',
    },
    table: {
        field: {
rsf-admin/src/i18n/zh.js
@@ -172,7 +172,9 @@
        permissions: '权限管理',
        delivery: 'DO单',
        outStock: '出库单',
        outStockItem: '出库单明细'
        outStockItem: '出库单明细',
        inStockPoces: '入库流程',
        outStockPoces: '出库流程',
    },
    table: {
        field: {
rsf-admin/src/page/orders/outStock/OutOrderCreate.jsx
@@ -97,7 +97,7 @@
                                        label="table.field.asnOrder.poId"
                                        source="poId"
                                    />
                                    <AutocompleteInput
                                    {/* <AutocompleteInput
                                        choices={dicts}
                                        optionText="label"
                                        label="table.field.asnOrder.type"
@@ -105,8 +105,7 @@
                                        optionValue="value"
                                        validate={required()}
                                        parse={v => v}
                                    />
                                    /> */}
                                </Grid>
                                <Grid item xs={12} display="flex" gap={1}>
                                    <AutocompleteInput
rsf-admin/src/page/orders/outStock/OutOrderEdit.jsx
@@ -73,13 +73,13 @@
                            </Typography>
                            <Stack direction='row' gap={2}>
                                <TextInput
                                    label="table.field.asnOrder.code"
                                    label="table.field.outStock.code"
                                    source="code"
                                    readOnly
                                    parse={v => v}
                                />
                                <TextInput
                                    label="table.field.asnOrder.poCode"
                                    label="table.field.outStock.poCode"
                                    source="poCode"
                                    readOnly
                                    parse={v => v}
@@ -87,7 +87,7 @@
                                <AutocompleteInput
                                    choices={dicts}
                                    optionText="label"
                                    label="table.field.asnOrder.type"
                                    label="table.field.outStock.type"
                                    source="type"
                                    optionValue="value"
                                    parse={v => v}
@@ -96,7 +96,7 @@
                                <AutocompleteInput
                                    choices={business}
                                    optionText="label"
                                    label="table.field.asnOrder.wkType"
                                    label="table.field.outStock.wkType"
                                    source="wkType"
                                    optionValue="value"
                                    parse={v => v}
@@ -105,30 +105,30 @@
                            </Stack>
                            <Stack direction='row' gap={2}>
                                <TextInput
                                    label="table.field.asnOrder.logisNo"
                                    label="table.field.outStock.logisNo"
                                    source="logisNo"
                                    readOnly
                                    parse={v => v}
                                />
                                <TextInput
                                    label="table.field.asnOrder.anfme"
                                    label="table.field.outStock.anfme"
                                    source="anfme"
                                    readOnly
                                    parse={v => v}
                                />
                                <TextInput
                                    label="table.field.asnOrder.qty"
                                    label="table.field.outStock.qty"
                                    source="qty"
                                    readOnly
                                    parse={v => v}
                                />
                                <DateInput
                                    label="table.field.asnOrder.arrTime"
                                    label="table.field.outStock.arrTime"
                                    source="arrTime"
                                    readOnly
                                />
                                <SelectInput
                                    label="table.field.asnOrder.rleStatus"
                                    label="table.field.outStock.rleStatus"
                                    source="rleStatus"
                                    readOnly
                                    choices={[
rsf-admin/src/page/orders/outStock/OutOrderList.jsx
@@ -223,10 +223,11 @@
  const record = useRecordContext();
  const notify = useNotify();
  const refresh = useRefresh();
  const cancelOrder = async (event) => {
    event.stopPropagation();
    const { data: { code, data, msg } } = await request.get(`/outStock/cancel/${record.id}`);
  console.log(record);
  const cancelOrder = async () => {
    console.log(event);
    const { data: { code, data, msg } } = await request.get(`/outStock/cancel/${record?.id}`);
    if (code === 200) {
      notify(msg);
      refresh()
rsf-admin/src/page/system/dicts/dictType/DictTypeList.jsx
@@ -91,7 +91,7 @@
                title={"menu.dictType"}
                empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
                filters={filters}
                sort={{ field: "sort", order: "asc" }}
                sort={{ field: "create_time", order: "desc" }}
                actions={(
                    <TopToolbar>
                        <FilterButton />
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/OutStockController.java
@@ -98,6 +98,10 @@
        asnOrder.setType(OrderType.ORDER_OUT.type)
                .setUpdateBy(getLoginUserId())
                .setUpdateTime(new Date());
        if (Objects.isNull(asnOrder.getCode())) {
            String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_OUT_STOCK_CODE, asnOrder);
            asnOrder.setCode(ruleCode);
        }
        if (!outStockService.updateById(asnOrder)) {
            return R.error("Update Fail");
        }
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrder.java
@@ -187,34 +187,14 @@
        this.memo = memo;
    }
//    AsnOrder asnOrder = new AsnOrder(
//            null,    // 编号
//            null,    // PO单号
//            null,    // PO单据标识
//            null,    // 单据类型[非空]
//            null,    // 业务类型[非空]
//            null,    // 送货数量[非空]
//            null,    // 已收数量[非空]
//            null,    // 物流单号
//            null,    // 预计到达时间
//            null,    // 释放状态[非空]
//            null,    // 名称
//            null,    // 状态[非空]
//            null,    // 是否删除[非空]
//            null,    // 租户
//            null,    // 添加人员
//            null,    // 添加时间[非空]
//            null,    // 修改人员
//            null,    // 修改时间[非空]
//            null    // 备注
//    );
    public String getExceStatus$() {
        if (Cools.isEmpty(this.exceStatus)){
            return "";
        }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_ASN_EXCE_STATUS).eq(DictData::getValue, this.exceStatus));
        DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_ASN_EXCE_STATUS)
                .eq(DictData::getValue, this.exceStatus));
        if (Objects.isNull(dictData)) {
            return null;
        }
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/SerialRule.java
@@ -155,24 +155,6 @@
        this.memo = memo;
    }
//    SerialRule serialRule = new SerialRule(
//            null,    // 编号
//            null,    // 名称
//            null,    // 分隔符
//            null,    // 序号重置规则[非空]
//            null,    // 重置依赖
//            null,    // 当前值
//            null,    // 最近生成编码
//            null,    // 状态[非空]
//            null,    // 是否删除[非空]
//            null,    // 租户
//            null,    // 添加人员
//            null,    // 添加时间[非空]
//            null,    // 修改人员
//            null,    // 修改时间[非空]
//            null    // 备注
//    );
    public String getReset$(){
        if (null == this.reset){ return null; }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
rsf-server/src/main/java/com/vincent/rsf/server/system/utils/SerialRuleUtils.java
@@ -64,9 +64,9 @@
                if (serialRule.getReset().equals(SerialRuleReset.SERIAL_REST_TYPE_YEAR.type)) {
                     format = DateUtils.format(new Date(), "yyyy");
                } else if (serialRule.getReset().equals(SerialRuleReset.SERIAL_REST_TYPE_MONTH.type)) {
                     format = DateUtils.format(new Date(), "MM");
                     format = DateUtils.format(new Date(), "yyyyMM");
                } else if (serialRule.getReset().equals(SerialRuleReset.SERIAL_REST_TYPE_DAYS.type)){
                     format = DateUtils.format(new Date(), "dd");
                     format = DateUtils.format(new Date(), "yyyyMMdd");
                }
                //当前值自动加1
                Integer curVal = serialRule.getCurrValue() + 1;
@@ -91,7 +91,6 @@
                }
            }
        });
        serialRule.setLastCode(buffer.toString());
        //修改当前规则编码号至数据库
        if (!ruleService.saveOrUpdate(serialRule)) {