fix:优化出库逻辑
This commit is contained in:
@@ -321,7 +321,9 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
|
||||
@Override
|
||||
public List<StrategyStructMaterialVO> outBoundSectDiv(StrategyStructParam param) {
|
||||
//只校验仓库,库区
|
||||
Assert.noNullElements(new Object[]{param.getSect_code()},"请求参数不能为空");
|
||||
if (StringUtils.isEmpty(param.getSect_code())){
|
||||
throw new BadRequestException("分配失败,未选择出库库区");
|
||||
}
|
||||
StSectStrategy one = iStSectStrategyService.getOne(new LambdaQueryWrapper<StSectStrategy>()
|
||||
.eq(StSectStrategy::getSect_code, param.getSect_code())
|
||||
.eq(StSectStrategy::getStrategy_type, StatusEnum.STRATEGY_TYPE.code("出库")));
|
||||
|
||||
@@ -43,7 +43,7 @@ public class FIFORuleHandler extends Decisioner<StrategyStructMaterialVO, Strate
|
||||
StrategyMater strategyMater = maters.get(0);
|
||||
BigDecimal planQty = strategyMater.getQty();
|
||||
List<StructattrVechielDto> vechielDtos =
|
||||
iStructattrService.collectVechicle(MapOf.of("material_id", strategyMater.getMaterial_id()
|
||||
iStructattrService.collectVechicle(MapOf.of("material_code", strategyMater.getMaterial_code()
|
||||
, "pcsn", strategyMater.getPcsn()
|
||||
, "sect_code", param.getSect_code()
|
||||
, "plan_qty", planQty
|
||||
|
||||
@@ -42,7 +42,7 @@ public class EasApi {
|
||||
//保存回传单
|
||||
PmStockReturn stockReturn = new PmStockReturn();
|
||||
stockReturn.setRequest_Id(receiveOutRequest.getBillno());
|
||||
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("生产领料"));
|
||||
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("生产出库"));
|
||||
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode()); // 0-处理中
|
||||
stockReturn.setCreate_time(DateUtil.now());
|
||||
stockReturn.setRequest_data(req.toJSONString());
|
||||
|
||||
@@ -67,6 +67,7 @@ public class PdaIosOutController {
|
||||
|
||||
@PostMapping("/assignOutDis")
|
||||
@SaIgnore
|
||||
@Log("平库出库明细确认")
|
||||
public ResponseEntity<Object> assignOutDis(@RequestBody OutBoundDis outBoundDis) {
|
||||
pdaIosOutService.outDisFinish(outBoundDis);
|
||||
return ResponseData.build();
|
||||
|
||||
@@ -304,7 +304,7 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchasemstMapper, Purchase
|
||||
row.put("source_bill_code", purchase.getBill_id());
|
||||
row.put("source_bill_type", SourceBillTypeEnum.PM_PURCHASE.getBillType());
|
||||
row.put("source_billdtl_id", detail.getItem_no());
|
||||
row.put("callback_strategy", "DealPurchaseRecBillCallback");
|
||||
row.put("callback_strategy", "dealPurchaseRecBillCallback");
|
||||
row.put("remark", "关联采购单:" + purchase.getOrder_no());
|
||||
tableData.add(row);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class SchBasePointController {
|
||||
.isNull(SchBasePoint::getVehicle_code));
|
||||
List<Map> result = new ArrayList<>();
|
||||
for (SchBasePoint point : points) {
|
||||
result.add(MapOf.of("value",point.getVehicle_code(),"label",point.getVehicle_code()));
|
||||
result.add(MapOf.of("value",point.getPoint_code(),"label",point.getPoint_name()));
|
||||
}
|
||||
return ResponseData.build(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum IOSEnum {
|
||||
BILL_STATUS(MapOf.of("生成","10", "分配中", "20", "分配完", "30", "完成", "99")),
|
||||
|
||||
// 入库业务类型
|
||||
BILL_TYPE(MapOf.of("生产入库","0001", "采购入库", "0005","生产领料", "0006", "手工入库", "0009","销售出库","1001","生产出库","1005","调拨出库","1004", "手工出库", "1009","库存调拨", "2001")),
|
||||
BILL_TYPE(MapOf.of("生产入库","0001", "采购入库", "103", "调拨入库", "107", "其他入库", "109", "销售出库","102","生产出库","1005","调拨出库","106", "其他出库", "108","库存调拨", "2001")),
|
||||
|
||||
//入库分配明细状态
|
||||
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
||||
|
||||
@@ -6,8 +6,12 @@ import org.nl.common.base.ResponseData;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.IOutBillService;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillCancelReq;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillDivReq;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillManualDivReq;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillOneCancelReq;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;import org.nl.common.base.ResponseData;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -36,6 +40,12 @@ public class OutBillController {
|
||||
public ResponseEntity<Object> getCanuseIvt(@RequestParam Map whereJson, PageQuery page) {
|
||||
return ResponseData.build(iOutBillService.getCanuseIvt(whereJson,page), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/getStructIvt")
|
||||
@Log("查询可分配库存")
|
||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson) {
|
||||
return ResponseData.build(iOutBillService.queryAvailableInv(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PutMapping
|
||||
@Log("修改出库单")
|
||||
@@ -50,7 +60,6 @@ public class OutBillController {
|
||||
iOutBillService.deleteAll(ids);
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
@PostMapping()
|
||||
@Log("新增出库单")
|
||||
public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson) {
|
||||
@@ -69,52 +78,34 @@ public class OutBillController {
|
||||
public ResponseEntity<Object> getOutBillDis(@RequestParam Map whereJson) {
|
||||
return ResponseData.build(iOutBillService.getOutBillDis(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/allDiv")
|
||||
@Log("出库单全部分配")
|
||||
public ResponseEntity<Object> allDiv(@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.allDiv(whereJson);
|
||||
public ResponseEntity<Object> allDiv(@RequestBody OutBillDivReq req) {
|
||||
iOutBillService.doDiv(req, false);
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
@PostMapping("/allCancel")
|
||||
@Log("出库单全部取消")
|
||||
public ResponseEntity<Object> allCancel(@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.allCancel(whereJson);
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
@PostMapping("/autoDiv")
|
||||
@Log("出库单自动分配")
|
||||
public ResponseEntity<Object> autoDiv(@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.autoDiv(whereJson);
|
||||
public ResponseEntity<Object> autoDiv(@RequestBody OutBillDivReq req) {
|
||||
iOutBillService.doDiv(req, true);
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
@PostMapping("/autoCancel")
|
||||
@Log("出库单自动取消分配")
|
||||
public ResponseEntity<Object> autoCancel(@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.autoCancel(whereJson);
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
@GetMapping("/getStructIvt")
|
||||
@Log("查询可分配库存")
|
||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson) {
|
||||
return ResponseData.build(iOutBillService.queryAvailableInv(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/manualDiv")
|
||||
@Log("出库单手动分配")
|
||||
public ResponseEntity<Object> manualDiv(@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.manualDiv(whereJson);
|
||||
public ResponseEntity<Object> manualDiv(@RequestBody OutBillManualDivReq req) {
|
||||
iOutBillService.manualDiv(req);
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
@PostMapping("/oneCancel")
|
||||
@Log("出库单取消分配")
|
||||
public ResponseEntity<Object> oneCancel (@RequestBody JSONObject whereJson) {
|
||||
iOutBillService.oneCancel(whereJson);
|
||||
@PostMapping("/allCancel")
|
||||
@Log("出库单全部取消")
|
||||
public ResponseEntity<Object> allCancel(@RequestBody OutBillCancelReq req) {
|
||||
iOutBillService.doCancel(req.getIostorinv_id(), null);
|
||||
return ResponseData.build();
|
||||
}
|
||||
@PostMapping("/autoCancel")
|
||||
@Log("出库单自动取消分配")
|
||||
public ResponseEntity<Object> autoCancel(@RequestBody OutBillDivReq req) {
|
||||
iOutBillService.doCancel(req.getIostorinv_id(), req.getIostorinvdtl_id());
|
||||
return ResponseData.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillCancelReq;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillDivReq;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillManualDivReq;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.OutBillOneCancelReq;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -83,32 +87,9 @@ public interface IOutBillService extends IService<IOStorInv> {
|
||||
*/
|
||||
List<IOStorInvDisDto> getOutBillDis(Map whereJson);
|
||||
|
||||
/**
|
||||
* 全部分配,对同一出库单明细进行分配
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void allDiv(JSONObject whereJson);
|
||||
void doDiv(OutBillDivReq req, boolean singleDtl);
|
||||
void doCancel(String iostorinvId, String iostorinvdtlId);
|
||||
|
||||
/**
|
||||
* 全部取消
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void allCancel(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
*
|
||||
* 自动分配 单条出库单明细
|
||||
* @param whereJson
|
||||
*/
|
||||
void autoDiv(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 自动取消分配 单条出库单明细
|
||||
* @param whereJson
|
||||
*/
|
||||
void autoCancel(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询可用库存
|
||||
@@ -122,14 +103,8 @@ public interface IOutBillService extends IService<IOStorInv> {
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void manualDiv(JSONObject whereJson);
|
||||
void manualDiv(OutBillManualDivReq req);
|
||||
|
||||
/**
|
||||
* 出库单取消分配
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void oneCancel(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 设置全部站点
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.nl.wms.warehouse_manage.inAndOut.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库单全部取消请求参数
|
||||
*
|
||||
* @author dsh
|
||||
* 2026/7/22
|
||||
*/
|
||||
@Data
|
||||
public class OutBillCancelReq {
|
||||
|
||||
/**
|
||||
* 出入库单标识
|
||||
*/
|
||||
private String iostorinv_id;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.wms.warehouse_manage.inAndOut.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库分配请求参数
|
||||
*
|
||||
* @author dsh
|
||||
* 2026/7/22
|
||||
*/
|
||||
@Data
|
||||
public class OutBillDivReq {
|
||||
|
||||
/**
|
||||
* 出入库单标识
|
||||
*/
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 出入库单明细标识
|
||||
*/
|
||||
private String iostorinvdtl_id;
|
||||
|
||||
/**
|
||||
* 库区编码
|
||||
*/
|
||||
private String sect_code;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.nl.wms.warehouse_manage.inAndOut.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库单手工分配请求参数
|
||||
*
|
||||
* @author dsh
|
||||
* 2026/7/22
|
||||
*/
|
||||
@Data
|
||||
public class OutBillManualDivReq {
|
||||
|
||||
private Row row;
|
||||
|
||||
private List<Item> rows;
|
||||
|
||||
@Data
|
||||
public static class Row {
|
||||
/**
|
||||
* 出入库单标识
|
||||
*/
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 出入库单明细标识
|
||||
*/
|
||||
private String iostorinvdtl_id;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Item {
|
||||
private String sect_id;
|
||||
private String pcsn;
|
||||
private String sect_name;
|
||||
private String sect_code;
|
||||
private String struct_id;
|
||||
private String struct_name;
|
||||
private String struct_code;
|
||||
private String storagevehicle_code;
|
||||
private String material_code;
|
||||
private BigDecimal change_qty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.wms.warehouse_manage.inAndOut.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库单单条取消分配请求参数
|
||||
*
|
||||
* @author dsh
|
||||
* 2026/7/22
|
||||
*/
|
||||
@Data
|
||||
public class OutBillOneCancelReq {
|
||||
|
||||
/**
|
||||
* 出入库单标识
|
||||
*/
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 出入库单明细标识
|
||||
*/
|
||||
private String iostorinvdtl_id;
|
||||
|
||||
/**
|
||||
* 出入库单分配标识
|
||||
*/
|
||||
private String iostorinvdis_id;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -131,7 +131,6 @@ public class StInventoryServiceImpl implements IStInventoryService {
|
||||
break;
|
||||
case "OutDisParam":
|
||||
final List<OutDisParam> outDisParams = (List<OutDisParam>) params;
|
||||
List<StIvtStructivtflow> recordsOutDis = new ArrayList<>();
|
||||
for (OutDisParam outDisParam : outDisParams) {
|
||||
LambdaQueryWrapper<GroupPlate> query = new QueryWrapper<GroupPlate>().lambda()
|
||||
.eq(GroupPlate::getStoragevehicle_code, outDisParam.getStoragevehicleCode())
|
||||
@@ -149,26 +148,10 @@ public class StInventoryServiceImpl implements IStInventoryService {
|
||||
}
|
||||
final BigDecimal frozenQty = groupPlate.getFrozen_qty().add(outDisParam.getFrozenQty());
|
||||
iMdPbGroupplateService.update(new LambdaUpdateWrapper<GroupPlate>()
|
||||
.set(GroupPlate::getQty, qty)
|
||||
.set(GroupPlate::getFrozen_qty,frozenQty)
|
||||
.set(GroupPlate::getUpdate_time,DateUtil.now())
|
||||
.eq(GroupPlate::getGroup_id,groupPlate.getGroup_id()));
|
||||
StIvtStructivtflow stIvtStructivtflow = new StIvtStructivtflow();
|
||||
stIvtStructivtflow.setId(IdUtil.getStringId());
|
||||
stIvtStructivtflow.setUpdate_time(DateUtil.now());
|
||||
stIvtStructivtflow.setChange_qty(BigDecimal.ZERO);
|
||||
stIvtStructivtflow.setQty(qty);
|
||||
stIvtStructivtflow.setFrozen_qty(frozenQty);
|
||||
stIvtStructivtflow.setVehicle_code(outDisParam.getStoragevehicleCode());
|
||||
stIvtStructivtflow.setStor_code(outDisParam.getStorCode());
|
||||
stIvtStructivtflow.setSect_code(outDisParam.getSectCode());
|
||||
stIvtStructivtflow.setStruct_code(outDisParam.getStructCode());
|
||||
stIvtStructivtflow.setPcsn(groupPlate.getPcsn());
|
||||
stIvtStructivtflow.setGrowth(false);
|
||||
stIvtStructivtflow.setMaterial_id(groupPlate.getMaterial_code());
|
||||
recordsOutDis.add(stIvtStructivtflow);
|
||||
}
|
||||
stIvtStructivtflowService.saveBatch(recordsOutDis);
|
||||
break;
|
||||
case "OutFinishParam":
|
||||
final List<OutFinishParam> outFinishParams = (List<OutFinishParam>) params;
|
||||
@@ -183,6 +166,7 @@ public class StInventoryServiceImpl implements IStInventoryService {
|
||||
}
|
||||
GroupPlate groupPlate = iMdPbGroupplateService.getOne(queryWrapper);
|
||||
groupPlate.setFrozen_qty(groupPlate.getFrozen_qty().subtract(outFinishParam.getChangeQty()));
|
||||
groupPlate.setQty(groupPlate.getQty().subtract(outFinishParam.getChangeQty()));
|
||||
groupPlate.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
groupPlate.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
groupPlate.setUpdate_time(DateUtil.now());
|
||||
@@ -220,11 +204,10 @@ public class StInventoryServiceImpl implements IStInventoryService {
|
||||
throw new BadRequestException("当前物料在组盘"+param.getStoragevehicleCode()+"库存中不存在");
|
||||
}
|
||||
groupPlate.setFrozen_qty(groupPlate.getFrozen_qty().subtract(param.getChangeQty()));
|
||||
groupPlate.setQty(groupPlate.getQty().add(param.getChangeQty()));
|
||||
groupPlate.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
groupPlate.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
groupPlate.setUpdate_time(DateUtil.now());
|
||||
System.out.println("========="+groupPlate.getFrozen_qty()+"=========");
|
||||
System.out.println("========="+groupPlate.getFrozen_qty()+"_"+groupPlate.getQty()+"=========");
|
||||
iMdPbGroupplateService.updateById(groupPlate);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -49,16 +49,12 @@ public class DealPurchaseRecBillCallback implements CallbackStrategy {
|
||||
List<EasAuditRequestDto.EasAuditEntryDto> entryList = new ArrayList<>();
|
||||
Purchasedtl purchasedtl = purchasedtlService.getOne(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, orderCode)
|
||||
// .eq(Purchasedtl::getSku_code, param.getMaterial_code())
|
||||
.eq(Purchasedtl::getItem_no, param.getSource_billdtl_id()));
|
||||
|
||||
purchasedtl.setInstock_qty(param.getPlan_qty().add(purchasedtl.getInstock_qty()));
|
||||
purchasedtlService.updateById(purchasedtl);
|
||||
|
||||
|
||||
List<Purchasedtl> list = purchasedtlService.list(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, orderCode));
|
||||
boolean flag = list.stream().anyMatch(i -> i.getQty().compareTo(i.getInstock_qty()) != 0);
|
||||
boolean flag = list.stream().anyMatch(i -> i.getQty().compareTo(i.getInstock_qty())>0);
|
||||
if (!flag){
|
||||
//全部相等则单据完成
|
||||
purchaseService.lambdaUpdate()
|
||||
|
||||
@@ -82,7 +82,11 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="request_Id" label="回传业务单据号" min-width="170" />
|
||||
<el-table-column prop="request_type" label="回传类型" min-width="120" :formatter="formatRequestType" />
|
||||
<el-table-column prop="request_type" label="回传类型" min-width="120" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.INANDOUT_BILL_TYPE[scope.row.request_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态" min-width="90" :formatter="formatStatus" />
|
||||
<el-table-column prop="error_msg" label="ERP处理失败记录" min-width="220" show-overflow-tooltip />
|
||||
<el-table-column prop="create_time" label="单据创建时间" min-width="160" />
|
||||
@@ -124,7 +128,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inandoutreturn from '@/views/wms/st/inAndOutReturn/inandoutreturn'
|
||||
import inandoutreturn from './inandoutreturn'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -148,6 +152,7 @@ export default {
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
dicts: ['INANDOUT_BILL_TYPE'],
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
@@ -158,14 +163,6 @@ export default {
|
||||
{ value: '1', label: '成功' },
|
||||
{ value: '2', label: '失败' }
|
||||
],
|
||||
typeStatusMap: {
|
||||
'生产入库': '0001',
|
||||
'采购入库': '0005',
|
||||
'手工入库': '0009',
|
||||
'销售出库': '1001',
|
||||
'生产出库': '1005',
|
||||
'手工出库': '1009'
|
||||
},
|
||||
jsonDialog: {
|
||||
visible: false,
|
||||
edit: false,
|
||||
@@ -129,6 +129,7 @@ export default {
|
||||
},
|
||||
isPushDisabled() {
|
||||
// 没有选中、选中多行、或选中的行状态不是 '0' 时禁用
|
||||
// eslint-disable-next-line no-debugger
|
||||
if (this.multipleSelection.length !== 1) return true
|
||||
return this.multipleSelection[0].bill_status !== '0'
|
||||
},
|
||||
@@ -177,6 +178,7 @@ export default {
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
console.log(val.length)
|
||||
this.multipleSelection = val
|
||||
if (val.length == 0) {
|
||||
this.audit_flag = true
|
||||
} else {
|
||||
@@ -200,16 +202,12 @@ export default {
|
||||
return
|
||||
}
|
||||
// eslint-disable-next-line eqeqeq
|
||||
debugger
|
||||
const invalidRows = this.multipleSelection.filter(item => String(item.bill_status) === '99')
|
||||
if (invalidRows.length) {
|
||||
this.$message.warning('仅支持批量下推状态为“分配”的需求单')
|
||||
return
|
||||
}
|
||||
this.$confirm(`确认批量下推已勾选的 ${this.multipleSelection.length} 条需求单吗?`, '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.outPush(this.multipleSelection[0]).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('下推成功')
|
||||
@@ -220,7 +218,6 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$message.error('下推失败')
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
issueReturnBill() {
|
||||
|
||||
@@ -53,5 +53,11 @@ export function pushZD(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, issueReturnBill, print, pushZD }
|
||||
export function outPush(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/outPush',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, get, issueReturnBill, print, pushZD, outPush }
|
||||
|
||||
@@ -156,7 +156,7 @@ import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
import { get } from './receiveOutReturn'
|
||||
import { uploadReceiveOut } from '@/views/wms/st/inAndOutReturn/inandoutreturn'
|
||||
import { uploadReceiveOut } from './receiveOutReturn'
|
||||
|
||||
const createDefaultForm = () => ({
|
||||
id: null,
|
||||
|
||||
@@ -37,5 +37,11 @@ export function easStock(param) {
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, easStock }
|
||||
export function uploadReceiveOut(data) {
|
||||
return request({
|
||||
url: '/api/receiveOutReturn/upload',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, get, easStock, uploadReceiveOut }
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
:disabled="button1"
|
||||
@click="oneDiv()"
|
||||
>
|
||||
自动分配
|
||||
按行分配
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="this.mstrow.bill_type !== '1011'"
|
||||
@@ -83,7 +83,7 @@
|
||||
:disabled="button2"
|
||||
@click="oneCancel()"
|
||||
>
|
||||
自动取消
|
||||
按行取消
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
@@ -162,7 +162,7 @@
|
||||
<el-form-item label="出库区" prop="gender2">
|
||||
<el-cascader
|
||||
placeholder="请选择"
|
||||
:options="outBoundRegion"
|
||||
:options="outBoundPoint"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
@change="outBoundChange"
|
||||
@@ -293,6 +293,7 @@ export default {
|
||||
},
|
||||
sects: [],
|
||||
outBoundRegion: [],
|
||||
outBoundPoint: [],
|
||||
pointList: [],
|
||||
rules: {
|
||||
}
|
||||
@@ -323,6 +324,7 @@ export default {
|
||||
})
|
||||
crudPoint.getRegionPoints({ 'regionCode': 'CKQ' }).then(res => {
|
||||
this.outBoundRegion = res.data
|
||||
this.outBoundPoint = res.data
|
||||
})
|
||||
},
|
||||
close() {
|
||||
@@ -397,9 +399,11 @@ export default {
|
||||
this.form2.unassign_qty = current.unassign_qty
|
||||
this.form2.assign_qty = current.assign_qty
|
||||
if (current.source_load_port !== null) {
|
||||
this.outBoundRegion = [
|
||||
this.outBoundPoint = [
|
||||
{ label: current.source_load_port, value: current.source_load_port }
|
||||
];
|
||||
]
|
||||
} else {
|
||||
this.outBoundPoint = this.outBoundRegion
|
||||
}
|
||||
this.tabledis = []
|
||||
if (current.bill_status === '10') {
|
||||
@@ -407,9 +411,9 @@ export default {
|
||||
this.button2 = true
|
||||
this.button3 = false
|
||||
} else if (current.bill_status === '30') {
|
||||
this.button1 = false
|
||||
this.button1 = true
|
||||
this.button2 = false
|
||||
this.button3 = false
|
||||
this.button3 = true
|
||||
} else if (current.bill_status === '40') {
|
||||
this.button1 = true
|
||||
this.button2 = false
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<el-table-column show-overflow-tooltip sortable prop="frozen_qty" label="冻结数量" align="center" width="150px" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="分配数量" :formatter="crud.formatNum3" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.change_qty" clearable style="width: 120px" />
|
||||
<el-input-number v-model="scope.row.change_qty" :max="scope.row.qty" clearable style="width: 100px" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||
|
||||
Reference in New Issue
Block a user