| | |
| | | * DataTable 样式常量 |
| | | */ |
| | | const tableStyles = { |
| | | '& .RaBulkActionsToolbar-toolbar': { |
| | | top: 0, |
| | | zIndex: 6, |
| | | }, |
| | | '& .MuiTableCell-head': { |
| | | zIndex: 4, |
| | | borderBottom: 'none' |
| | |
| | | * - label: 显示的标签,支持翻译 key 或直接显示的文本 |
| | | * - render: 可选,自定义渲染函数 (value, data) => ReactNode |
| | | * @param {string} props.footerLabel - footer 第一列标签,默认'合计' |
| | | * @param {number} props.bulkActionsOffsetY - 批量操作栏展开时向下偏移(px) |
| | | */ |
| | | export const StickyDataTable = ({ |
| | | stickyLeft = [], |
| | | stickyRight = [], |
| | | footerConfig, |
| | | footerLabel = '合计', |
| | | bulkActionsOffsetY = 0, |
| | | children, |
| | | ...props |
| | | }) => { |
| | |
| | | return () => <StickyTableFooter footerConfig={footerConfig} footerLabel={footerLabel} />; |
| | | }, [footerConfig, footerLabel]); |
| | | |
| | | const dataTableStyles = useMemo(() => { |
| | | return { |
| | | ...tableStyles, |
| | | '& .RaBulkActionsToolbar-toolbar:not(.RaBulkActionsToolbar-collapsed)': { |
| | | transform: `translateY(${bulkActionsOffsetY}px)`, |
| | | }, |
| | | }; |
| | | }, [bulkActionsOffsetY]); |
| | | |
| | | return ( |
| | | <DataTable {...props} foot={footerComponent} sx={tableStyles}> |
| | | <DataTable {...props} foot={footerComponent} sx={dataTableStyles}> |
| | | {/* {processedChildren} */} |
| | | {processedChildren |
| | | .map((column) => ( |
| | |
| | | "orders": formData, |
| | | "items": tabelData, |
| | | } |
| | | const res = await request.post(`/outStock/items/save`, parmas); |
| | | const res = await request.post(`/preparation/items/save`, parmas); |
| | | if (res?.data?.code === 200) { |
| | | setOpen(false); |
| | | refresh(); |
| | |
| | | "orders": formData, |
| | | "items": tabelData, |
| | | } |
| | | const res = await request.post(`/outStock/items/update`, parmas); |
| | | const res = await request.post(`/preparation/items/update`, parmas); |
| | | if (res?.data?.code === 200) { |
| | | setOpen(false); |
| | | refresh(); |
| | |
| | | |
| | | |
| | | const handleDelete = async () => { |
| | | const res = await request.post(`/outStock/remove/${asnId}`); |
| | | const res = await request.post(`/preparation/remove/${asnId}`); |
| | | if (res?.data?.code === 200) { |
| | | setOpen(false); |
| | | refresh(); |
| | |
| | | }; |
| | | |
| | | const requestGetHead = async () => { |
| | | const res = await request.get(`/outStock/${asnId}`); |
| | | const res = await request.get(`/preparation/${asnId}`); |
| | | if (res?.data?.code === 200) { |
| | | setFormData(res.data.data) |
| | | } else { |
| | |
| | | required |
| | | /> |
| | | </Grid> */} |
| | | <Grid item md={2}> |
| | | {/* <Grid item md={2}> |
| | | <DictSelect |
| | | label={translate("table.field.outStock.wkType")} |
| | | value={formData.wkType} |
| | |
| | | dictTypeCode="sys_business_type" |
| | | required |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item md={2}> |
| | | <TextField |
| | | label={translate("table.field.outStock.poCode")} |
| | |
| | | onChange={(e) => handleChange(e.target.value, 'poCode')} |
| | | /> |
| | | </Grid> |
| | | <Grid item md={2}> |
| | | {/* <Grid item md={2}> |
| | | <TextField |
| | | label={translate("table.field.outStock.logisNo")} |
| | | value={formData.logisNo} |
| | |
| | | size='small' |
| | | onChange={(e) => handleChange(e.target.value, 'logisNo')} |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item md={2}> |
| | | <DateInput |
| | | source="arrTime" |
| | |
| | | |
| | | public BigDecimal getAbleQty() { |
| | | if (anfme == null) { anfme = 0.0;} |
| | | if (qty == null) { qty = 0.0;} |
| | | if (workQty == null) { workQty = 0.0;} |
| | | BigDecimal anfmeDec = new BigDecimal(anfme.toString()); |
| | | BigDecimal qtyDec = new BigDecimal(qty.toString()); |
| | | BigDecimal qtyDec = new BigDecimal(workQty.toString()); |
| | | |
| | | return anfmeDec.subtract(qtyDec); |
| | | } |
| | |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.controller.erp.params.SyncOrderParams; |
| | | import com.vincent.rsf.server.api.utils.LocUtils; |
| | | import com.vincent.rsf.server.common.constant.Constants; |
| | | import com.vincent.rsf.server.manager.controller.dto.ExistDto; |
| | |
| | | throw new CoolException("业务类型不能为空!!"); |
| | | } |
| | | |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_OUT_STOCK_CODE, orders); |
| | | if (StringUtils.isBlank(ruleCode)) { |
| | | throw new CoolException("编码规则错误:请检查「SYS_OUT_STOCK_CODE」是否设置正确!!"); |
| | | } |
| | | orders.setCode(ruleCode) |
| | | // String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_OUT_STOCK_CODE, orders); |
| | | // if (StringUtils.isBlank(ruleCode)) { |
| | | // throw new CoolException("编码规则错误:请检查「SYS_OUT_STOCK_CODE」是否设置正确!!"); |
| | | // } |
| | | orders.setCode(orders.getPoCode()) |
| | | .setWkType(OrderWorkType.ORDER_WORK_TYPE_STOCK_UP.type) |
| | | .setType(OrderType.ORDER_OUT.type) |
| | | .setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_INIT.val) |
| | | .setUpdateBy(loginUserId) |