#优化
1. 出库单据优化
2. 字典类型数据优化
| | |
| | | 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 |
| | |
| | | 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: { |
| | |
| | | permissions: '权限管理', |
| | | delivery: 'DO单', |
| | | outStock: '出库单', |
| | | outStockItem: '出库单明细' |
| | | outStockItem: '出库单明细', |
| | | inStockPoces: '入库流程', |
| | | outStockPoces: '出库流程', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | label="table.field.asnOrder.poId" |
| | | source="poId" |
| | | /> |
| | | <AutocompleteInput |
| | | {/* <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.asnOrder.type" |
| | |
| | | optionValue="value" |
| | | validate={required()} |
| | | parse={v => v} |
| | | /> |
| | | |
| | | /> */} |
| | | </Grid> |
| | | <Grid item xs={12} display="flex" gap={1}> |
| | | <AutocompleteInput |
| | |
| | | </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} |
| | |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.asnOrder.type" |
| | | label="table.field.outStock.type" |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | |
| | | <AutocompleteInput |
| | | choices={business} |
| | | optionText="label" |
| | | label="table.field.asnOrder.wkType" |
| | | label="table.field.outStock.wkType" |
| | | source="wkType" |
| | | optionValue="value" |
| | | parse={v => v} |
| | |
| | | </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={[ |
| | |
| | | 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() |
| | |
| | | title={"menu.dictType"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "sort", order: "asc" }} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | |
| | | 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"); |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | serialRule.setLastCode(buffer.toString()); |
| | | //修改当前规则编码号至数据库 |
| | | if (!ruleService.saveOrUpdate(serialRule)) { |