diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java index d13b75eb..b05f0e78 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java @@ -166,6 +166,10 @@ public class AfterSalesShippingDevice extends BaseEntity /** 是否添加出货设备(0代表是 1代表否) */ private String addShippingDeviceFlag; + /** 是否确认收货(0代表是 1代表否) 业务确认收货的时候使用 */ + private String isConfirmReceivingFlag; + + //生产开始时间 private Date startMakeTime; @@ -531,6 +535,15 @@ public class AfterSalesShippingDevice extends BaseEntity this.outOrderCode = outOrderCode; } + + public String getIsConfirmReceivingFlag() { + return isConfirmReceivingFlag; + } + + public void setIsConfirmReceivingFlag(String isConfirmReceivingFlag) { + this.isConfirmReceivingFlag = isConfirmReceivingFlag; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -574,6 +587,7 @@ public class AfterSalesShippingDevice extends BaseEntity .append("updateTime", getUpdateTime()) .append("addShippingDeviceFlag",getAddShippingDeviceFlag()) .append("outOrderCode",getOutOrderCode()) + .append("isConfirmReceivingFlag",getIsConfirmReceivingFlag()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java index ee55307a..23e7f330 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java @@ -1,16 +1,18 @@ package com.ruoyi.system.controller; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.erp.domain.ErpBom; import com.ruoyi.erp.domain.ErpBomVo; import com.ruoyi.purchase.domain.PurchaseOrder; import com.ruoyi.system.domain.SysSalesOrder; +import com.ruoyi.system.domain.SysSalesOrderVo; import com.ruoyi.system.domain.SysSalesShippingInformDetail; +import com.ruoyi.system.domain.Vo.ConfirmReceivingDetailVo; +import com.ruoyi.system.service.ISysSalesOrderService; import com.ruoyi.system.service.ISysSalesShippingInformDetailService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -47,6 +49,9 @@ public class SysSalesShippingInformController extends BaseController @Autowired private ISysSalesShippingInformDetailService shippingInformDetailService; + @Autowired + private ISysSalesOrderService sysSalesOrderService; + @RequiresPermissions("system:salesShippingInform:view") @GetMapping() public String salesShippingInform() @@ -334,6 +339,60 @@ public class SysSalesShippingInformController extends BaseController return toAjax(sysSalesShippingInformService.updateCancelShipping(sysSalesShippingInform)); } + + + /** + * 确认收货 + */ + @GetMapping("/confirmReceiving/{shippingInformId}") + public String confirmReceiving(@PathVariable("shippingInformId") Long shippingInformId, ModelMap mmap) + { + SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformService.selectSysSalesShippingInformById(shippingInformId); + + List sysSalesOrders = new ArrayList<>(); + String salesOrderCode = sysSalesShippingInform.getSalesOrderCode(); + + List salesOrderCodes = new ArrayList<>(); + + if (StringUtils.isNotEmpty(salesOrderCode)){ + String[] splitSalesOrderCode = salesOrderCode.split(","); + salesOrderCodes = Arrays.asList(splitSalesOrderCode); + } + + sysSalesOrders = sysSalesOrderService.selectSysSalesOrderListByCodeList(salesOrderCodes); + mmap.put("sysSalesOrders", sysSalesOrders); + mmap.put("sysSalesShippingInform", sysSalesShippingInform); + return prefix + "/confirmReceiving"; + } + + /** + * 修改保存确认收货 + */ + @RequiresPermissions("system:salesShippingInform:confirmReceiving") + @Log(title = "销售确认收货", businessType = BusinessType.UPDATE) + @PostMapping("/confirmReceiving") + @ResponseBody + public AjaxResult confirmReceivingSave(@RequestBody SysSalesShippingInform sysSalesShippingInform) + { + return toAjax(sysSalesShippingInformService.updateConfirmReceiving(sysSalesShippingInform)); + } + + + + /** + * 客户确认发货 物料信息详情 + */ + @PostMapping("/confirmReceivingDetailList") + @ResponseBody + public TableDataInfo confirmReceivingDetailList(SysSalesShippingInform sysSalesShippingInform) + { + startPage(); + List list = sysSalesShippingInformService.confirmReceivingDetailList(sysSalesShippingInform); + return getDataTable(list); + } + + + /** * 客户验收 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/ConfirmReceivingDetailVo.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/ConfirmReceivingDetailVo.java new file mode 100644 index 00000000..c69dd819 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/ConfirmReceivingDetailVo.java @@ -0,0 +1,19 @@ +package com.ruoyi.system.domain.Vo; + + +import com.ruoyi.system.domain.SysSalesShippingInformDetail; +import lombok.Data; + +/** +* 客户确认收货物料详情Vo类 +* */ +@Data +public class ConfirmReceivingDetailVo extends SysSalesShippingInformDetail { + + + /** 出货设备id */ + private String shippingDeviceId; + + /** SN号 */ + private String snCode; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java index c78dd551..0ed04696 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderMapper.java @@ -92,4 +92,8 @@ public interface SysSalesOrderMapper * */ List selectBatchSalesOrderById(List salesOrderIds); + /** + * 通过销售订单code批量查询销售订单 + * */ + List selectSysSalesOrderListByCodeList(List salesOrderCodes); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java index 14c71045..0b0a46a3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java @@ -143,4 +143,9 @@ public interface ISysSalesOrderService * 通过销售订单id批量查询销售订单 * */ List selectBatchSalesOrderById(List salesOrderIds); + + /** + * 通过销售订单号集合查询销售订单集合 + * */ + List selectSysSalesOrderListByCodeList(List salesOrderCodes); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java index 85263a59..9fa15041 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java @@ -5,6 +5,7 @@ import java.util.List; import com.ruoyi.system.domain.SysSalesOrder; import com.ruoyi.system.domain.SysSalesShippingInform; import com.ruoyi.system.domain.SysSalesShippingInformDetail; +import com.ruoyi.system.domain.Vo.ConfirmReceivingDetailVo; import javax.servlet.http.HttpServletResponse; @@ -148,4 +149,16 @@ public interface ISysSalesShippingInformService * 导出出货发票2模板 * */ void exportShippingInvoiceTwo(String outOrderCode, HttpServletResponse response); + + /** + * 确认收货 + * */ + int updateConfirmReceiving(SysSalesShippingInform sysSalesShippingInform); + + /** + * 展示确认收货物料详情 + * */ + List confirmReceivingDetailList(SysSalesShippingInform sysSalesShippingInform); + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java index e09653eb..02724ab2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java @@ -141,6 +141,16 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService return sysSalesOrders; } + + /** + * 通过销售订单号集合查询销售订单集合 + * */ + @Override + public List selectSysSalesOrderListByCodeList(List salesOrderCodes) { + List sysSalesOrders = sysSalesOrderMapper.selectSysSalesOrderListByCodeList(salesOrderCodes); + return sysSalesOrders; + } + /** * 查询销售订单列表 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java index 194f023f..7fdf3499 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java @@ -26,6 +26,7 @@ import com.ruoyi.common.utils.file.FileDownloadUtils; import com.ruoyi.sales.domain.SalesShippingInformation; import com.ruoyi.sales.mapper.SalesShippingInformationMapper; import com.ruoyi.system.domain.*; +import com.ruoyi.system.domain.Vo.ConfirmReceivingDetailVo; import com.ruoyi.system.dto.ExportShippingInformOrderDto; import com.ruoyi.system.dto.ExportShippingInvoiceDto; import com.ruoyi.system.dto.ExportShippingOrderDto; @@ -34,11 +35,13 @@ import com.ruoyi.system.mapper.*; import com.ruoyi.warehouse.domain.WarehouseOutOrder; import com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.service.ISysSalesShippingInformService; import com.ruoyi.common.core.text.Convert; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import javax.servlet.http.HttpServletResponse; @@ -374,6 +377,198 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor return 1; } + + /** + * 修改保存确认收货 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int updateConfirmReceiving(SysSalesShippingInform sysSalesShippingInform) { + + String loginName = ShiroUtils.getLoginName(); + + List shippingInformDetailList = sysSalesShippingInform.getShippingInformDetailList(); + + boolean anyNullThisReceivingNum = shippingInformDetailList.stream().anyMatch(item -> item.getThisReceivingNum() == null); + if (anyNullThisReceivingNum){ + throw new BusinessException("请填写每个本次收货数"); + } + + // 分组:有 shippingDeviceId 和没有 shippingDeviceId + Map> groupedDetails = shippingInformDetailList.stream() + .collect(Collectors.partitioningBy(detail -> detail.getShippingDeviceId() != null)); + + List withShippingDeviceIdList = groupedDetails.getOrDefault(true, new ArrayList<>()); + List withoutShippingDeviceIdList = groupedDetails.getOrDefault(false, new ArrayList<>()); + + // 处理没有出货设备ID的数据 + processWithoutShippingDeviceId(withoutShippingDeviceIdList); + + // 处理有出货设备ID的数据 + processWithShippingDeviceId(withShippingDeviceIdList); + + //更新收货维护设备出库单数据 + AftersalesOutOrder aftersalesOutOrder = new AftersalesOutOrder(); + aftersalesOutOrder.setOutOrderCode(sysSalesShippingInform.getOutOrderCode()); + //设置为待验收 + aftersalesOutOrder.setWarehouseOutStatus("10"); + aftersalesOutOrder.setUpdateBy(loginName); + aftersalesOutOrder.setUpdateTime(new Date()); + int updateAftersalesOutOrderResult = aftersalesOutOrderMapper.updateAftersalesOutOrderByOutOrderCode(aftersalesOutOrder); + if (updateAftersalesOutOrderResult <= 0){ + throw new BusinessException("更新售后出库单数据失败"); + } + + return updateAftersalesOutOrderResult; + } + + + + + private void processWithoutShippingDeviceId(List withoutShippingDeviceIdList) { + + + + for (SysSalesShippingInformDetail sysSalesShippingInformDetail : withoutShippingDeviceIdList) { + Long shippingInformDetailId = sysSalesShippingInformDetail.getShippingInformDetailId(); + SysSalesShippingInformDetail tempShippingInformDetail = shippingInformDetailMapper.selectSysSalesShippingInformDetailById(shippingInformDetailId); + + if (tempShippingInformDetail.getHasReceivingNum() == null || tempShippingInformDetail.getHasReceivingNum() == 0) { + sysSalesShippingInformDetail.setHasReceivingNum(sysSalesShippingInformDetail.getThisReceivingNum()); + } else { + sysSalesShippingInformDetail.setHasReceivingNum(tempShippingInformDetail.getHasReceivingNum() + sysSalesShippingInformDetail.getThisReceivingNum()); + } + + if (sysSalesShippingInformDetail.getHasReceivingNum() > sysSalesShippingInformDetail.getThisShippingNum()) { + throw new BusinessException("已收货数和本次收货数之和不能大于本次出货数"); + } + sysSalesShippingInformDetail.setThisReceivingNum(null); + int updateShippingInformDetailResult = shippingInformDetailMapper.updateSysSalesShippingInformDetail(sysSalesShippingInformDetail); + if (updateShippingInformDetailResult <= 0) { + throw new BusinessException("更新销售出货通知单详情数据失败"); + } + } + } + + private void processWithShippingDeviceId(List withShippingDeviceIdList) { + String loginName = ShiroUtils.getLoginName(); + + List filterShippingDeviceIdList = withShippingDeviceIdList.stream() + .filter(item -> item.getHasReceivingNum() != 1) + .collect(Collectors.toList()); + + // 判断是否有收货数量大于1,因为收货数量要么为0要么为1 + boolean anyThisReceivingNum = filterShippingDeviceIdList.stream().anyMatch(item -> item.getThisReceivingNum() > 1); + if (anyThisReceivingNum){ + throw new BusinessException("本次收货数量只能为0或1"); + } + + for (SysSalesShippingInformDetail sysSalesShippingInformDetail : filterShippingDeviceIdList) { + String shippingDeviceId = sysSalesShippingInformDetail.getShippingDeviceId(); + AfterSalesShippingDevice afterSalesShippingDevice = salesShippingDeviceMapper.selectAfterSalesShippingDeviceByShippingDeviceId(shippingDeviceId); + if (sysSalesShippingInformDetail.getThisReceivingNum() == 1){ + afterSalesShippingDevice.setIsConfirmReceivingFlag("0"); //设置已添加 + } + afterSalesShippingDevice.setUpdateBy(loginName); + afterSalesShippingDevice.setUpdateTime(new Date()); + int updateShippingDeviceResult = salesShippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice); + if (updateShippingDeviceResult <= 0){ + throw new BusinessException("更新出货设备数据失败"); + } + } + + + Integer allReceivingNum = filterShippingDeviceIdList.stream() + .mapToInt(SysSalesShippingInformDetail::getThisReceivingNum) + .sum(); + + SysSalesShippingInformDetail sysSalesShippingInformDetail = filterShippingDeviceIdList.get(0); + Long shippingInformDetailId = sysSalesShippingInformDetail.getShippingInformDetailId(); + SysSalesShippingInformDetail tempShippingInformDetail = shippingInformDetailMapper.selectSysSalesShippingInformDetailById(shippingInformDetailId); + + if (tempShippingInformDetail.getHasReceivingNum() == null) { + tempShippingInformDetail.setHasReceivingNum(allReceivingNum); + } else { + tempShippingInformDetail.setHasReceivingNum(tempShippingInformDetail.getHasReceivingNum() + allReceivingNum); + } + + int updateShippingInformDetailResult = shippingInformDetailMapper.updateSysSalesShippingInformDetail(tempShippingInformDetail); + if (updateShippingInformDetailResult <= 0) { + throw new BusinessException("更新销售出货通知单详情数据失败"); + } + } + + + + + + /** + * 展示确认收货物料详情 + * */ + @Override + public List confirmReceivingDetailList(SysSalesShippingInform sysSalesShippingInform) { + + + List confirmReceivingDetailVos = new ArrayList<>(); + String outOrderCode = sysSalesShippingInform.getOutOrderCode(); + List sysSalesShippingInformDetails = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode); + if (CollectionUtils.isEmpty(sysSalesShippingInformDetails)){ + log.warn("确认收货物料详情为空,出库单号为:{}",outOrderCode); + } + for (SysSalesShippingInformDetail sysSalesShippingInformDetail : sysSalesShippingInformDetails) { + ConfirmReceivingDetailVo confirmReceivingDetailVo = new ConfirmReceivingDetailVo(); + BeanUtils.copyProperties(sysSalesShippingInformDetail,confirmReceivingDetailVo); + confirmReceivingDetailVos.add(confirmReceivingDetailVo); + } + + + // 过滤 materialType 为 chcpsb 的设备 + List chcpsbDevices = confirmReceivingDetailVos.stream() + .filter(item -> "chcpsb".equals(item.getMaterialType())) + .collect(Collectors.toList()); + + // 存储最终要保留的 chcpsb 设备 + List validChcpsbDevices = new ArrayList<>(); + + for (ConfirmReceivingDetailVo chcpsbDevice : chcpsbDevices) { + String materialNo = chcpsbDevice.getMaterialNo(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setMaterialNo(materialNo); + afterSalesShippingDevice.setOutOrderCode(outOrderCode); + + List afterSalesShippingDevices = salesShippingDeviceMapper.selectHasAddShippingDevice(afterSalesShippingDevice); + + if (!CollectionUtils.isEmpty(afterSalesShippingDevices)) { + for (AfterSalesShippingDevice device : afterSalesShippingDevices) { + ConfirmReceivingDetailVo detailVo = new ConfirmReceivingDetailVo(); + BeanUtils.copyProperties(chcpsbDevice, detailVo); + detailVo.setShippingDeviceId(device.getShippingDeviceId()); + detailVo.setSnCode(device.getSnCode()); + detailVo.setThisShippingNum(1); + detailVo.setHasOutOrderNum(1); + if ("0".equals(device.getIsConfirmReceivingFlag())){ + detailVo.setHasReceivingNum(1); + }else { + detailVo.setHasReceivingNum(0); + } + validChcpsbDevices.add(detailVo); + } + } + } + + // 从 confirmReceivingDetailVos 中移除没有对应 AfterSalesShippingDevice 的 chcpsb 设备 + confirmReceivingDetailVos = confirmReceivingDetailVos.stream() + .filter(item -> !"chcpsb".equals(item.getMaterialType()) || validChcpsbDevices.contains(item)) + .collect(Collectors.toList()); + + // 添加有效的 chcpsb 设备 + confirmReceivingDetailVos.addAll(validChcpsbDevices); + + return confirmReceivingDetailVos; + + } + + /** * 客户验收 */ @@ -959,6 +1154,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor } } + /** * 导出出货通知单模板 * */ diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml index d3744d6e..7edd5296 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml @@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -56,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select shipping_device_code, shipping_device_id, make_no,sales_order_code, out_order_code, material_no, material_photoUrl, material_name, material_type, material_class, material_model_code, material_unit, material_brand, material_describe, device_model_code, device_running_number, make_photoUrl, sn_code, aftersales_photoUrl, factory_date, guarantee_period, guarantee_period_flag, lock_date, lock_date_flag, wastage_expire_date, wastage_expire_flag, component_guarantee_date, component_guarantee_flag, engineer_name, salesman_name, make_name,customer_id, customer_name, maintain_order_code, maintain_time, create_by, create_time, update_by, update_time, - add_shipping_device_flag, start_make_time, end_make_time, add_process_issue_record_flag,quality_status from aftersales_shipping_device + add_shipping_device_flag, is_confirm_receiving_flag, start_make_time, end_make_time, add_process_issue_record_flag,quality_status from aftersales_shipping_device + + insert into sys_sales_order diff --git a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/confirmReceiving.html b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/confirmReceiving.html new file mode 100644 index 00000000..4f60d711 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/confirmReceiving.html @@ -0,0 +1,301 @@ + + + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html index ab16d680..63943ed4 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html @@ -95,11 +95,15 @@ var restoreFlag = [[${@permission.hasPermi('system:salesShippingInform:restore')}]]; var confirmShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:confirmShipping')}]]; var cancelShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:cancelShipping')}]]; + var confirmReceivingFlag = [[${@permission.hasPermi('system:salesShippingInform:confirmReceiving')}]]; + var customerCheckGoodsFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoods')}]]; var customerCheckGoodsDetailFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoodsDetail')}]]; + + var warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]]; var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]]; @@ -316,11 +320,14 @@ var actions = []; actions.push('详情 '); if(row.warehouseOutStatus == '2'){ - actions.push('确认发货 '); - actions.push('取消发货 '); + actions.push('确认发货 '); + actions.push('取消发货 '); + } + if(row.warehouseOutStatus == '9'){ + actions.push('确认收货 '); } if(row.warehouseOutStatus == '10' || row.warehouseOutStatus == '11'){ - actions.push('确认验收 '); + actions.push('确认验收 '); } var actionLinks = actions.join(''); @@ -347,6 +354,14 @@ $.modal.open("取消发货",url); } + + //确认收货 + function confirmReceiving(shippingInformId){ + var url = prefix +'/confirmReceiving/' + shippingInformId; + $.modal.open("确认收货",url); + } + + //客户验收 function customerCheckGoods(shippingInformId){ var url = prefix +'/customerCheckGoods/' + shippingInformId;