Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
| | |
| | | complete: "complete", |
| | | close: "close", |
| | | asnCreate: "asnCreate", |
| | | createTask: "createTask", |
| | | }, |
| | | }; |
| | | |
| | |
| | | complete: "完成", |
| | | close: "关闭", |
| | | asnCreate: "通过ASN创建", |
| | | createTask: "生成任务", |
| | | }, |
| | | }; |
| | | |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | Button, |
| | | useRefresh |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import AddIcon from '@mui/icons-material/Add'; |
| | | import request from '@/utils/request'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='waitPakin' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | bulkActionButtons={<> <CreateTaskButton /> <BulkDeleteButton mutationMode={OPERATE_MODE} /></>} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <WaitPakinPanel />} |
| | | expandSingle={true} |
| | |
| | | } |
| | | |
| | | export default WaitPakinList; |
| | | |
| | | const CreateTaskButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const { selectedIds, onUnselectItems, data } = useListContext(); |
| | | const createTask = async () => { |
| | | const rows = data.filter((item) => selectedIds.includes(item.id)) || []; |
| | | const res = await request.post(`/waitPakin/merge`, rows); |
| | | if (res?.data?.code === 200) { |
| | | refresh() |
| | | notify(res.data.msg); |
| | | |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => createTask()} label={"toolbar.createTask"}> |
| | | <AddIcon /> |
| | | </Button> |
| | | |
| | | |
| | | </> |
| | | |
| | | ) |
| | | } |
| | |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return mobileService.publicToStock(params); |
| | | return mobileService.publicToStock(params, getLoginUserId()); |
| | | } |
| | | |
| | | @ApiOperation("获取任务信息") |
| | |
| | | public enum OrderType { |
| | | //订单类型 |
| | | ORDER_PURCHASE_IN("purchase", "采购入库单"), |
| | | ORDER_OUT("out", "采购出库单"), |
| | | ORDER_RECEIPT("receipt", "收货") |
| | | ORDER_OUT("out", "出库单"), |
| | | ORDER_IN("in", "入库单"), |
| | | ORDER_RECEIPT("receipt", "收货单") |
| | | |
| | | ; |
| | | |
| | |
| | | |
| | | R operateToStock(OpStockParams params); |
| | | |
| | | R publicToStock(PublicToStockParams params); |
| | | R publicToStock(PublicToStockParams params, Long loginUserId); |
| | | |
| | | R taskToStock(String code); |
| | | |
| | |
| | | import com.vincent.rsf.server.system.mapper.TenantMapper; |
| | | import com.vincent.rsf.server.system.mapper.UserMapper; |
| | | import com.vincent.rsf.server.system.service.FieldsItemService; |
| | | import com.vincent.rsf.server.system.service.FieldsService; |
| | | import com.vincent.rsf.server.system.service.UserLoginService; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | /** |
| | | * 人工上架入库 |
| | | * |
| | | * @param params |
| | | * @param loginUserId |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R publicToStock(PublicToStockParams params) { |
| | | public R publicToStock(PublicToStockParams params, Long loginUserId) { |
| | | if (Objects.isNull(params.getLocCode()) || StringUtils.isBlank(params.getLocCode())) { |
| | | throw new CoolException("库位不能为空!!"); |
| | | } |
| | |
| | | stockItem.setAsnItemId(orderItem.getId()) |
| | | .setBarcode(orderItem.getBarcode()) |
| | | .setLocId(loc.getId()) |
| | | .setUpdateBy(loginUserId) |
| | | .setId(null) |
| | | .setStockId(stock.getId()); |
| | | stockItems.add(stockItem); |