cl
2026-04-17 60633a391e1840291272a6a678868620cfa915df
入库类型不会
1个文件已添加
5个文件已修改
129 ■■■■ 已修改文件
rsf-admin/src/page/components/DictSelect.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/asnOrder/AsnOrderModal.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/asnOrder/orderWorkTypeInbound.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictDataController.java 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/components/DictSelect.jsx
@@ -13,12 +13,13 @@
    useEffect(() => {
        http();
    }, [dictTypeCode]);
    }, [dictTypeCode, group]);
    const http = async () => {
        const res = await request.post('/dictData/page', { dictTypeCode, group });
        if (res?.data?.code === 200) {
            setList(res.data.data.records.map((item) => {
            const rows = res.data.data.records || [];
            setList(rows.map((item) => {
                return {
                    value: item.value,
                    label: item.label
rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx
@@ -34,7 +34,10 @@
const AsnOrderEdit = () => {
    const translate = useTranslate();
    const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_order_type')) || [];
    const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_order_work_type')) || [];
    const workTypeDicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_order_work_type' && Number(dict.group) === 1)) || [];
    // const businessTypeDicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type')) || [];
    const businessTypeDicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type' && Number(dict.group) === 1)) || [];
    const business = workTypeDicts.length > 0 ? workTypeDicts : businessTypeDicts;
    return (
        <>
rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
@@ -24,7 +24,6 @@
  SelectInput,
  NumberInput,
  ReferenceInput,
  ReferenceArrayInput,
  AutocompleteInput,
  DeleteButton,
  Button,
@@ -88,7 +87,7 @@
  <TextInput source="poCode" label="table.field.asnOrder.poCode" />,
  <NumberInput source="poId" label="table.field.asnOrder.poId" />,
  <TextInput source="type" label="table.field.asnOrder.type" />,
  <ReferenceInput source="wkType" reference="dictData" filter={{ dictTypeCode: 'sys_order_work_type', group: "1" }} label="table.field.asnOrder.wkType" alwaysOn>
  <ReferenceInput source="wkType" reference="dictData" filter={{ dictTypeCode: 'sys_order_work_type', group: '1' }} label="table.field.asnOrder.wkType" alwaysOn>
    <AutocompleteInput label="table.field.asnOrder.wkType" optionValue="value" />
  </ReferenceInput>,
  <NumberInput source="anfme" label="table.field.asnOrder.anfme" />,
@@ -117,7 +116,6 @@
  const billReload = useRef();
  const notify = useNotify();
  const refresh = useRefresh();
  const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_order_work_type')) || [];
  return (
    <Box display="flex">
      <List
rsf-admin/src/page/orders/asnOrder/AsnOrderModal.jsx
@@ -250,9 +250,9 @@
                                    <DictSelect
                                        label={translate("table.field.asnOrder.wkType")}
                                        value={formData.wkType}
                                        group='1'
                                        onChange={(e) => handleChange(e.target.value, 'wkType')}
                                        dictTypeCode="sys_order_work_type"
                                        group='1'
                                        required
                                    />
                                </Grid>
rsf-admin/src/page/orders/asnOrder/orderWorkTypeInbound.js
New file
@@ -0,0 +1,21 @@
/**
 * 订单业务类型(sys_order_work_type):入库通知单仅展示入库侧
 * 与后端 OrderWorkType 枚举中的出库类 value 对齐
 */
// 与后端 OrderWorkType.getOrderType:ORDER_OUT 一致(不含 D004)
export const OUTBOUND_ORDER_WORK_TYPE_VALUES = new Set([
  '11', '12', '13', '14', '15', '18', '19',
]);
export function filterInboundOrderWorkTypeRecords(records) {
  if (!Array.isArray(records)) {
    return [];
  }
  return records.filter((row) => {
    const v = row && row.value != null ? String(row.value).trim() : '';
    if (!v) {
      return false;
    }
    return !OUTBOUND_ORDER_WORK_TYPE_VALUES.has(v);
  });
}
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictDataController.java
@@ -12,7 +12,6 @@
import com.vincent.rsf.server.common.domain.PageParam;
import com.vincent.rsf.server.system.entity.DictData;
import com.vincent.rsf.server.system.service.DictDataService;
import com.vincent.rsf.server.system.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -42,14 +41,57 @@
    @PreAuthorize("hasAuthority('system:dictData:list')")
    @PostMapping({"/dictData/many/{ids}", "/dictDatas/many/{ids}"})
    public R many(@PathVariable Long[] ids) {
        return R.ok().add(dictDataService.listByIds(Arrays.asList(ids)));
    public R many(@PathVariable String[] ids) {
        if (ids == null || ids.length == 0) {
            return R.ok().add(Collections.emptyList());
        }
        List<Long> idList = new ArrayList<>();
        List<String> valueList = new ArrayList<>();
        for (String raw : ids) {
            if (raw == null) {
                continue;
            }
            String item = raw.trim();
            if (item.isEmpty()) {
                continue;
            }
            valueList.add(item);
            if (item.matches("^\\d+$")) {
                try {
                    idList.add(Long.parseLong(item));
                } catch (NumberFormatException ignored) {
                }
            }
        }
        if (valueList.isEmpty()) {
            return R.ok().add(Collections.emptyList());
        }
        LambdaQueryWrapper<DictData> wrapper = new LambdaQueryWrapper<>();
        wrapper.in(DictData::getValue, valueList);
        if (!idList.isEmpty()) {
            wrapper.or().in(DictData::getId, idList);
        }
        return R.ok().add(dictDataService.list(wrapper));
    }
    @PreAuthorize("hasAuthority('system:dictData:list')")
    @GetMapping("/dictData/{id}")
    public R get(@PathVariable("id") Long id) {
        return R.ok().add(dictDataService.getById(id));
    public R get(@PathVariable("id") String id) {
        if (id == null || id.trim().isEmpty()) {
            return R.ok().add(null);
        }
        String key = id.trim();
        DictData data = null;
        if (key.matches("^\\d+$")) {
            try {
                data = dictDataService.getById(Long.parseLong(key));
            } catch (NumberFormatException ignored) {
            }
        }
        if (data == null) {
            data = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getValue, key), false);
        }
        return R.ok().add(data);
    }
    @PreAuthorize("hasAuthority('system:dictData:save')")
@@ -91,8 +133,44 @@
    @PreAuthorize("hasAuthority('system:dictData:remove')")
    @OperationLog("Delete 字典数据集")
    @PostMapping("/dictData/remove/{ids}")
    public R remove(@PathVariable Long[] ids) {
        if (!dictDataService.removeByIds(Arrays.asList(ids))) {
    public R remove(@PathVariable String[] ids) {
        if (ids == null || ids.length == 0) {
            return R.ok("Delete Success").add(Collections.emptyList());
        }
        List<Long> idList = new ArrayList<>();
        List<String> valueList = new ArrayList<>();
        for (String raw : ids) {
            if (raw == null) {
                continue;
            }
            String item = raw.trim();
            if (item.isEmpty()) {
                continue;
            }
            valueList.add(item);
            if (item.matches("^\\d+$")) {
                try {
                    idList.add(Long.parseLong(item));
                } catch (NumberFormatException ignored) {
                }
            }
        }
        if (valueList.isEmpty()) {
            return R.ok("Delete Success").add(Collections.emptyList());
        }
        LambdaQueryWrapper<DictData> wrapper = new LambdaQueryWrapper<>();
        wrapper.in(DictData::getValue, valueList);
        if (!idList.isEmpty()) {
            wrapper.or().in(DictData::getId, idList);
        }
        List<DictData> rows = dictDataService.list(wrapper);
        List<Long> removeIds = new ArrayList<>();
        for (DictData row : rows) {
            if (row != null && row.getId() != null) {
                removeIds.add(row.getId());
            }
        }
        if (!removeIds.isEmpty() && !dictDataService.removeByIds(removeIds)) {
            return R.error("Delete Fail");
        }
        return R.ok("Delete Success").add(ids);