| | |
| | | }*/ |
| | | .foot{ |
| | | position: absolute; |
| | | bottom: 1cm; |
| | | bottom: 0.3cm; |
| | | //transform: translateY(8cm); |
| | | } |
| | | /*#table-sum { |
| | |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | let dialogTableVisible = ref(false) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post(`/finishedGoodsInventory/getSelect/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | |
| | | const selectOrderList = ()=>{ |
| | | |
| | | request.post(`/finishedGoodsInventory/getSelect/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | |
| | | { 'code' :'issue','name':t('productStock.orderTransfer'),status: 'primary'}, |
| | | { 'code' :'out','name':t('productStock.finishedProductPickup'),status: 'primary'}, |
| | | /*{ 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'},*/ |
| | | /*{ 'code' :'changeRack','name':'装箱调架',status: 'primary'},*/ |
| | | |
| | | ], |
| | | /*import: false, |
| | |
| | | }) |
| | | |
| | | |
| | | |
| | | let currentRecord = ref(null) |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick({ code }) { |
| | |
| | | switch (code){ |
| | | case 'issue':{ |
| | | /*VXETable.modal.confirm('点击了库存调拨');*/ |
| | | router.push({path: '/main/productStock/OrderAllocation'}); |
| | | return; |
| | | router.push({path: '/main/productStock/OrderAllocation'}) |
| | | break |
| | | } |
| | | case 'out':{ |
| | | router.push({path: '/main/productStock/FinishedGoodsIssue'}); |
| | | return; |
| | | break; |
| | | router.push({path: '/main/productStock/FinishedGoodsIssue'}) |
| | | break |
| | | } |
| | | case 'rework':{ |
| | | router.push({path: '/main/productStock/FinishedProductRework'}); |
| | | return; |
| | | break; |
| | | router.push({path: '/main/productStock/FinishedProductRework'}) |
| | | break |
| | | } |
| | | case 'changeRack':{ |
| | | currentRecord.value = null |
| | | if(xGrid.value.getCurrentRecord()===null){ |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | currentRecord.value = JSON.parse(JSON.stringify(xGrid.value.getCurrentRecord())) |
| | | console.log(currentRecord.value) |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | const changeRack = () => { |
| | | // if(){ |
| | | // |
| | | // } |
| | | request.post(`/finishedGoodsInventory/changeRack`,currentRecord.value).then((res) => { |
| | | console.log(res) |
| | | if(res.code==200 && res.data ===true){ |
| | | ElMessage.success('装箱调架成功') |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogTableVisible" style="width: 400px;height:250px;margin-top: 25vh"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-text>箱号:</el-text> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-input v-model="currentRecord.boxNo"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-text>数量:</el-text> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-input v-model="currentRecord.quantityAvailable" type="number"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-text>备注:</el-text> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-input v-model="currentRecord.remark"/> |
| | | </el-col> |
| | | </el-row> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="changeRack"> |
| | | 调架 |
| | | </el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | .el-row { |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |
| | |
| | | columns:[ |
| | | {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80 ,fixed:"left",}, |
| | | |
| | | |
| | | {field: 'orderId',width:120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerId',width:120, title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'goodsQuantity',width:120, title: t('searchOrder.inventoryNum'), sortable: true}, |
| | | {field: 'area',width:120, title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'bomPrice',width:120, title: 'BOM成本',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120,filters:[{ data: '' }],slots: { filter: 'num1_filter' }, title: t('basicData.reportData'), sortable: true}, |
| | | {field: 'packType',width:120, title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'goodsQuantity','area','perimeter','money'] |
| | | const List = ["quantity",'goodsQuantity','area','perimeter','money','bomPrice'] |
| | | if (List.includes(column.field)) { |
| | | //return footSum(data, column.field) |
| | | return total.value[column.field] |
| | | return footSum(data, column.field) |
| | | //return total.value[column.field] |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | /*total.dataTotal = res.data.total.dataTotal*1 |
| | | total.pageTotal= res.data.total.pageTotal*/ |
| | | orderInfo.selectDate = res.data.selectDate |
| | | res.data.data.forEach((item)=>{ |
| | | item.bomPrice=(item.money/1.3).toFixed(2) |
| | | }) |
| | | orderList.value = deepClone(res.data.data) |
| | | xGrid.value.loadData(orderList.value) |
| | | }else{ |
| | |
| | | public Result getSelectPrints( @RequestBody Map<String, Object> object){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectPrintSvs(object)); |
| | | } |
| | | |
| | | @ApiOperation("成品装箱调架") |
| | | @SaCheckPermission("createProductStock.add") |
| | | @PostMapping("/changeRack") |
| | | public Result changeRack( @RequestBody FinishedGoodsInventory finishedGoodsInventory){ |
| | | return Result.seccess(finishedGoodsInventoryService.changeRack(finishedGoodsInventory)); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.*; |
| | | import lombok.Data; |
| | |
| | | private LocalDate endTime; |
| | | private String processId; |
| | | private String boxNo; |
| | | @TableField(select = false,exist = false) |
| | | private Order order; |
| | | @TableField(select = false,exist = false) |
| | | private OrderDetail orderDetail; |
| | | @TableField(select = false,exist = false) |
| | | private Double weight; |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.dto.otherSystem.GlassDetailList; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface FinishedGoodsInventoryMapper extends CrudRepository<FinishedGoodsInventory,Long> { |
| | | public interface FinishedGoodsInventoryMapper extends BaseMapper<FinishedGoodsInventory> { |
| | | |
| | | |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | |
| | | } |
| | | return "true"; |
| | | } |
| | | |
| | | public Map<String,Object> changeRack(FinishedGoodsInventory finishedGoodsInventory) { |
| | | Long id = finishedGoodsInventory.getId(); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | FinishedGoodsInventory oldFinishedGoodsInventory = finishedGoodsInventoryMapper.selectById(finishedGoodsInventory.getId()); |
| | | |
| | | //查询此此序号箱号的库存是否存在 |
| | | FinishedGoodsInventory existFinishedGoodsInventory = finishedGoodsInventoryMapper |
| | | .selectOne(new LambdaQueryWrapper<FinishedGoodsInventory>() |
| | | .eq(FinishedGoodsInventory::getOrderId, finishedGoodsInventory.getOrderId()) |
| | | .eq(FinishedGoodsInventory::getOrderNumber, finishedGoodsInventory.getOrderNumber()) |
| | | .eq(FinishedGoodsInventory::getBoxNo, finishedGoodsInventory.getBoxNo()) |
| | | .last("limit 1") |
| | | ); |
| | | //当成品箱号不存在,则新增 |
| | | if(existFinishedGoodsInventory==null){ |
| | | //当转移数量大于实际库存箱号时,则不能转移 |
| | | if(oldFinishedGoodsInventory.getQuantityAvailable()<finishedGoodsInventory.getQuantityAvailable()){ |
| | | map.put("code",0); |
| | | return map; |
| | | } |
| | | //原库存 数量面积减少 |
| | | oldFinishedGoodsInventory.setInventory(oldFinishedGoodsInventory.getInventory()-finishedGoodsInventory.getQuantityAvailable()); |
| | | oldFinishedGoodsInventory.setQuantityAvailable(oldFinishedGoodsInventory.getQuantityAvailable()-finishedGoodsInventory.getQuantityAvailable()); |
| | | oldFinishedGoodsInventory.setArea(oldFinishedGoodsInventory.getInventory()*oldFinishedGoodsInventory.getActualSignalArea()); |
| | | |
| | | //新库存数据增加 |
| | | finishedGoodsInventory.setId(null); |
| | | finishedGoodsInventory.setInventory(finishedGoodsInventory.getQuantityAvailable()); |
| | | finishedGoodsInventory.setArea(finishedGoodsInventory.getQuantityAvailable()*finishedGoodsInventory.getActualSignalArea()); |
| | | |
| | | finishedGoodsInventoryMapper. |
| | | update(oldFinishedGoodsInventory, |
| | | new LambdaUpdateWrapper<FinishedGoodsInventory>() |
| | | .eq(FinishedGoodsInventory::getId,id) |
| | | ) ; |
| | | finishedGoodsInventoryMapper.insert(finishedGoodsInventory); |
| | | map.put("code",1); |
| | | return map;//库存转移成功,新增箱号 |
| | | |
| | | }else{ |
| | | //当id不变时,修改备注 |
| | | if(Objects.equals(id, existFinishedGoodsInventory.getId())){ |
| | | finishedGoodsInventoryMapper. |
| | | update(null,new LambdaUpdateWrapper<FinishedGoodsInventory>() |
| | | .eq(FinishedGoodsInventory::getId,id) |
| | | .set(FinishedGoodsInventory::getRemark,finishedGoodsInventory.getRemark())); |
| | | map.put("code",2); |
| | | return map;//库存备注修改成功 |
| | | }else{ |
| | | //原库存 数量面积减少 |
| | | oldFinishedGoodsInventory.setInventory(oldFinishedGoodsInventory.getInventory()-finishedGoodsInventory.getQuantityAvailable()); |
| | | oldFinishedGoodsInventory.setQuantityAvailable(oldFinishedGoodsInventory.getQuantityAvailable()-finishedGoodsInventory.getQuantityAvailable()); |
| | | oldFinishedGoodsInventory.setArea(oldFinishedGoodsInventory.getInventory()*oldFinishedGoodsInventory.getActualSignalArea()); |
| | | |
| | | existFinishedGoodsInventory.setInventory(existFinishedGoodsInventory.getInventory()+finishedGoodsInventory.getQuantityAvailable()); |
| | | existFinishedGoodsInventory.setQuantityAvailable(existFinishedGoodsInventory.getQuantityAvailable()+finishedGoodsInventory.getQuantityAvailable()); |
| | | existFinishedGoodsInventory.setArea(existFinishedGoodsInventory.getInventory()*existFinishedGoodsInventory.getActualSignalArea()); |
| | | |
| | | finishedGoodsInventoryMapper. |
| | | update(oldFinishedGoodsInventory, |
| | | new LambdaUpdateWrapper<FinishedGoodsInventory>() |
| | | .eq(FinishedGoodsInventory::getId,id) |
| | | ) ; |
| | | finishedGoodsInventoryMapper. |
| | | update(existFinishedGoodsInventory, |
| | | new LambdaUpdateWrapper<FinishedGoodsInventory>() |
| | | .eq(FinishedGoodsInventory::getId,existFinishedGoodsInventory.getId()) |
| | | ) ; |
| | | |
| | | map.put("code",3); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(oldFinishedGoodsInventory.getBoxNo()); |
| | | list.add(existFinishedGoodsInventory.getBoxNo()); |
| | | map.put("msg",list); |
| | | return map;//库存转移成功,修改箱号 |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <!--映射成品库存--> |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory"> |
| | | <id column="fid" property="id"/> |
| | | <result column="id" property="id"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="inventory" property="inventory"/> |
| | | <result column="area" property="area"/> |
| | | <result column="actual_signal_area" property="actualSignalArea"/> |
| | |
| | | |
| | | |
| | | <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory"> |
| | | select od.order_number, |
| | | select |
| | | fgi.id, |
| | | fgi.process_id, |
| | | od.order_number, |
| | | o.order_id, |
| | | o.project, |
| | | o.order_type, |