Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
zhangsiqi 4 months ago
parent
commit
0ef896ab82
  1. 1
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java
  3. 25
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java
  5. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformDetailMapper.java
  6. 5
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java
  7. 22
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java
  8. 9
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java
  9. 36
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java
  10. 7
      ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml
  11. 34
      ruoyi-admin/src/main/resources/mapper/system/SysSalesShippingInformDetailMapper.xml
  12. 45
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml
  13. 8
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html
  14. 245
      ruoyi-admin/src/main/resources/templates/system/salesShippingInform/customerCheckGoodsDetail.html
  15. 14
      ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html
  16. 18
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html

1
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java

@ -16,6 +16,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.SysSalesOrderChild;
import com.ruoyi.system.domain.SysSalesShippingInform;
import com.ruoyi.system.domain.SysSalesShippingInformDetail;
import com.ruoyi.system.mapper.SysSalesOrderChildMapper;
import com.ruoyi.system.mapper.SysSalesOrderMapper;
import com.ruoyi.system.mapper.SysSalesShippingInformMapper;

6
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java

@ -162,7 +162,11 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService
// }
//计算不良数量的合计值
int processBadNumTotal = unqualifiedDataList.stream().mapToInt(QualityOrderReportUnqualified::getProcessBadNum).sum();
int processBadNumTotal = 0;
if (!CollectionUtils.isEmpty(unqualifiedDataList)){
processBadNumTotal = unqualifiedDataList.stream().mapToInt(QualityOrderReportUnqualified::getProcessBadNum).sum();
}
//后续处理本次到货数
// if (processBadNumTotal>thisArrivedNum){

25
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java

@ -220,6 +220,31 @@ public class SysSalesShippingInformController extends BaseController
/**
* 详情
*/
@GetMapping("/customerCheckGoodsDetail/{shippingInformId}")
public String customerCheckGoodsDetail(@PathVariable("shippingInformId") Long shippingInformId, ModelMap mmap)
{
SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformService.selectSysSalesShippingInformById(shippingInformId);
mmap.put("sysSalesShippingInform", sysSalesShippingInform);
return prefix + "/customerCheckGoodsDetail";
}
/**
* 修改保存详情
*/
@RequiresPermissions("system:salesShippingInform:customerCheckGoodsDetail")
@Log(title = "销售取消发货", businessType = BusinessType.UPDATE)
@PostMapping("/customerCheckGoodsDetail")
@ResponseBody
public AjaxResult customerCheckGoodsDetailSave(@RequestBody SysSalesShippingInform sysSalesShippingInform)
{
return toAjax(sysSalesShippingInformService.updateCustomerCheckGoodsDetail(sysSalesShippingInform));
}
/**
* 客户验收 物料信息信息
*/

5
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java

@ -119,4 +119,9 @@ public interface SysMakeOrderMapper
* 根据入库单号查询生产单号
* */
String selectMakeByWarehouseStorageCode(String warehouseStorageCode);
/*
* 根据销售单号查询生产订单
* */
SysMakeOrder selectMakeOrderBySaleNo(String salesOrderCode);
}

11
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformDetailMapper.java

@ -43,6 +43,17 @@ public interface SysSalesShippingInformDetailMapper
*/
public int updateSysSalesShippingInformDetail(SysSalesShippingInformDetail sysSalesShippingInformDetail);
/**
* 修改销售出货通知详情
*
* @param sysSalesShippingInformDetail 销售出货通知详情
* @return 结果
*/
public int updateSysSalesShippingInformDetailByCodeAndNo(SysSalesShippingInformDetail sysSalesShippingInformDetail);
/**
* 删除销售出货通知详情
*

5
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java

@ -101,4 +101,9 @@ public interface ISysSalesShippingInformService
* 客户验收查询物料相关数据
* */
List<SysSalesShippingInformDetail> getMaterialListByOutOrderCode(SysSalesShippingInform sysSalesShippingInform);
/**
* 客户验收详情
* */
int updateCustomerCheckGoodsDetail(SysSalesShippingInform sysSalesShippingInform);
}

22
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java

@ -189,6 +189,11 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
sysSalesShippingInform.setMaterialSum(Math.toIntExact(sysSalesOrderVo.getMaterialSum()));
//更新数量合计
sysSalesShippingInform.setEnterpriseSum(Math.toIntExact(sysSalesOrderVo.getEnterpriseSum()));
sysSalesShippingInform.setCustomerContact(sysSalesOrderVo.getCustomerDelivery());
sysSalesShippingInform.setContactNumber(sysSalesOrderVo.getDeliveryPhone());
sysSalesShippingInform.setCustomerContactAddress(sysSalesOrderVo.getDeliveryAddress());
//更新销售出库详情数据
List<SysSalesOrderChild> sysSalesOrderChildList = sysSalesOrder.getSysSalesOrderChildList();
@ -204,6 +209,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
sysSalesShippingInformDetail.setMaterialProcessMethod(sysSalesOrderChild.getProcessMethod());
sysSalesShippingInformDetail.setMakeNum(sysSalesOrderChild.getMaterialNum());
sysSalesShippingInformDetail.setHasOutOrderNum(sysSalesOrderChild.getOutBoundQuantity());
sysSalesShippingInformDetail.setThisShippingNum(sysSalesOrderChild.getApplyShippingNum());
sysSalesShippingInformDetail.setCreateBy(loginName);
sysSalesShippingInformDetail.setCreateTime(new Date());
shippingInformDetailMapper.insertSysSalesShippingInformDetail(sysSalesShippingInformDetail);
@ -236,10 +242,11 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
warehouseOutOrder.setUpdateTime(new Date());
//更新销售订单的出货状态
// SysSalesShippingInform tempShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode);
SysSalesOrder sysSalesOrder = new SysSalesOrder();
sysSalesOrder.setUpdateBy(loginName);
sysSalesOrder.setUpdateTime(new Date());
sysSalesOrder.setSalesOrderCode(sysSalesShippingInform.getSalesOrderCode());
sysSalesOrder.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode());
//暂收设置为全部出货
sysSalesOrder.setDeliveryStatus("6");
int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder);
@ -295,7 +302,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
}
}
//设置出货状态为全部验收
sysSalesShippingInform.setWarehouseOutStatus("11");
sysSalesShippingInform.setWarehouseOutStatus("12");
//更新出库状态
WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder();
@ -304,7 +311,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
warehouseOutOrder.setUpdateBy(loginName);
//设置为全部验收
warehouseOutOrder.setWarehouseOutStatus("12");
int updateWarehouseOutOrdeResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder);
int updateWarehouseOutOrdeResult = warehouseOutOrderMapper.updateWarehouseOutOrderByCode(warehouseOutOrder);
if (updateWarehouseOutOrdeResult <= 0){
throw new BusinessException("更新出库单数据失败");
}
@ -338,4 +345,13 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
List<SysSalesShippingInformDetail> list = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode);
return list;
}
/**
* 客户验收详情
* */
@Override
public int updateCustomerCheckGoodsDetail(SysSalesShippingInform sysSalesShippingInform) {
return 1;
}
}

9
ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java

@ -52,6 +52,15 @@ public interface WarehouseOutOrderMapper
*/
public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder);
/**
* 修改仓库出库单
*
* @param warehouseOutOrder 仓库出库单
* @return 结果
*/
public int updateWarehouseOutOrderByCode(WarehouseOutOrder warehouseOutOrder);
/**
* 删除仓库出库单
*

36
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java

@ -62,6 +62,9 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
private SysSalesShippingInformMapper shippingInformMapper;
@Autowired
private SysSalesShippingInformDetailMapper shippingInformDetailMapper;
/**
* 查询仓库出库单
*
@ -232,8 +235,20 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
sysSalesOrderChild.setQuoteId(warehouseOutOrder.getSalesOrderCode());
sysSalesOrderChild.setMaterialCode(warehouseOutOrderDetail.getMaterialNo());
sysSalesOrderChild.setOutBoundQuantity(warehouseOutOrderDetail.getActualOutOrderSum());
sysSalesOrderChild.setUpdateBy(loginName);
sysSalesOrderChild.setUpdateTime(new Date());
int updateSalesOrderChildResult = salesOrderChildMapper.updateSysSalesOrderChildByCodeAndQuoteId(sysSalesOrderChild);
if (updateSalesOrderChildResult <= 0){
throw new BusinessException("更新销售订单子表数据失败");
}
SysSalesShippingInformDetail sysSalesShippingInformDetail = new SysSalesShippingInformDetail();
sysSalesShippingInformDetail.setHasOutOrderNum(warehouseOutOrderDetail.getActualOutOrderSum());
sysSalesShippingInformDetail.setUpdateBy(loginName);
sysSalesShippingInformDetail.setUpdateTime(new Date());
sysSalesShippingInformDetail.setOutOrderCode(warehouseOutOrder.getOutOrderCode());
sysSalesShippingInformDetail.setMaterialNo(warehouseOutOrderDetail.getMaterialNo());
int updateShippingInformDetailResult = shippingInformDetailMapper.updateSysSalesShippingInformDetailByCodeAndNo(sysSalesShippingInformDetail);
if (updateShippingInformDetailResult <= 0){
throw new BusinessException("更新销售出库详情数据失败");
}
warehouseOutOrderDetail.setUpdateBy(loginName);
@ -579,6 +594,18 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder();
warehouseOutOrder.setOutOrderCode(outOrderCode);
//添加生产单号
SysMakeOrder makeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode);
if (makeOrder == null){
log.warn("生产订单编号为空:{}",makeOrder.getMakeNo());
}
warehouseOutOrder.setDeliveryName(sysSalesOrderVo.getCustomerDelivery());
warehouseOutOrder.setDeliveryNumber(sysSalesOrderVo.getDeliveryPhone());
warehouseOutOrder.setDeliveryAddress(sysSalesOrderVo.getDeliveryAddress());
warehouseOutOrder.setMakeNo(makeOrder.getMakeNo());
//出库状态为 待仓库准备物料
warehouseOutOrder.setWarehouseOutStatus("0");
warehouseOutOrder.setRelatedOrderCode(salesOrderCode);
@ -587,10 +614,17 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
warehouseOutOrder.setWarehouseOrderType("0");
//出库类型设置为 销售出库
warehouseOutOrder.setWarehouseOutType("0");
//物料合计
warehouseOutOrder.setMaterialSum(Math.toIntExact(sysSalesOrderVo.getMaterialSum()));
//数量合计
warehouseOutOrder.setEnterpriseSum(Math.toIntExact(sysSalesOrderVo.getEnterpriseSum()));
warehouseOutOrder.setBusinessName(sysSalesOrderVo.getBusinessMembers());
warehouseOutOrder.setCustomerId(sysSalesOrderVo.getEnterpriseCode());
warehouseOutOrder.setCustomerName(sysSalesOrderVo.getEnterpriseName());
warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUserName());
warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUser());
warehouseOutOrder.setDeliveryCondition(sysSalesOrderVo.getDeliveryConditions());
warehouseOutOrder.setCreateTime(new Date());
warehouseOutOrder.setCreateBy(ShiroUtils.getLoginName());

7
ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml

@ -270,6 +270,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectMakeOrderBySaleNo" parameterType="String" resultMap="SysMakeOrderResult">
<include refid="selectSysMakeOrderVo"/>
where a.saleNo = #{saleNo}
</select>
<select id="selectMakeByWarehouseStorageCode" parameterType="String" resultType="String">
SELECT DISTINCT sm.makeNo
FROM sys_makeorder sm

34
ruoyi-admin/src/main/resources/mapper/system/SysSalesShippingInformDetailMapper.xml

@ -136,6 +136,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where shipping_inform_detail_id = #{shippingInformDetailId}
</update>
<update id="updateSysSalesShippingInformDetailByCodeAndNo" parameterType="SysSalesShippingInformDetail">
update sys_sales_shipping_inform_detail
<trim prefix="SET" suffixOverrides=",">
<if test="outOrderCode != null">out_order_code = #{outOrderCode},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
<if test="materialModel != null">material_model = #{materialModel},</if>
<if test="materialSpecification != null">material_specification = #{materialSpecification},</if>
<if test="makeNum != null">make_num = #{makeNum},</if>
<if test="thisShippingNum != null">this_shipping_num = #{thisShippingNum},</if>
<if test="hasOutOrderNum != null">has_out_order_num = #{hasOutOrderNum},</if>
<if test="thisCheckNum != null">this_check_num = #{thisCheckNum},</if>
<if test="hasCheckNum != null">has_check_num = #{hasCheckNum},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where out_order_code = #{outOrderCode}
and material_no = #{materialNo}
</update>
<delete id="deleteSysSalesShippingInformDetailById" parameterType="Long">
delete from sys_sales_shipping_inform_detail where shipping_inform_detail_id = #{shippingInformDetailId}
</delete>

45
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml

@ -221,6 +221,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where out_order_id = #{outOrderId}
</update>
<update id="updateWarehouseOutOrderByCode" parameterType="WarehouseOutOrder">
update warehouse_out_order
<trim prefix="SET" suffixOverrides=",">
<if test="outOrderCode != null">out_order_code = #{outOrderCode},</if>
<if test="makeNo != null">make_no = #{makeNo},</if>
<if test="warehouseOutStatus != null">warehouse_out_status = #{warehouseOutStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if>
<if test="warehouseOrderType != null">warehouse_order_type = #{warehouseOrderType},</if>
<if test="outMakeCode != null">out_make_code = #{outMakeCode},</if>
<if test="warehouseOutType != null">warehouse_out_type = #{warehouseOutType},</if>
<if test="requisitioningCode != null">requisitioning_code = #{requisitioningCode},</if>
<if test="businessName != null">business_name = #{businessName},</if>
<if test="aftersalesName != null">aftersales_name = #{aftersalesName},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="shippingDeviceId != null">shipping_device_id = #{shippingDeviceId},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialSum != null">material_sum = #{materialSum},</if>
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if>
<if test="outOrderSum != null">out_order_sum = #{outOrderSum},</if>
<if test="outOrderName != null">out_order_name = #{outOrderName},</if>
<if test="outOrderTime != null">out_order_time = #{outOrderTime},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="applyName != null">apply_name = #{applyName},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="planDeliveryTime != null">plan_delivery_time = #{planDeliveryTime},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="deliveryCondition != null">delivery_condition = #{deliveryCondition},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="deliveryName != null">delivery_name = #{deliveryName},</if>
<if test="deliveryNumber != null">delivery_number = #{deliveryNumber},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where out_order_code = #{outOrderCode}
</update>
<delete id="deleteWarehouseOutOrderById" parameterType="Long">
delete from warehouse_out_order where out_order_id = #{outOrderId}
</delete>

8
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html

@ -120,10 +120,10 @@
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-unqualified-table').bootstrapTable('getData');
// 检查表格数据是否为空
if (table.length === 0) {
$.modal.alertWarning("请至少添加一条不合格数再保存!");
return;
}
// if (table.length === 0) {
// $.modal.alertWarning("请至少添加一条不合格数再保存!");
// return;
// }
console.log(JSON.stringify(table));
// 将表数据转换成与qualityReportData格式一致的数组
var unqualifiedDataList = table.map(function (item) {

245
ruoyi-admin/src/main/resources/templates/system/salesShippingInform/customerCheckGoodsDetail.html

@ -0,0 +1,245 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('客户验收')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customerCheckGoods-edit" th:object="${sysSalesShippingInform}">
<input name="shippingInformId" th:field="*{shippingInformId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="outOrderCode" th:field="*{outOrderCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联销售订单号:</label>
<div class="col-sm-8">
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单类型:</label>
<div class="col-sm-8">
<select name="warehouseOrderType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_order_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOrderType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">出库类型:</label>
<div class="col-sm-8">
<select name="warehouseOutType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOutType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">送货日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="deliverTime" th:value="${#dates.format(sysSalesShippingInform.deliverTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" th:field="*{customerId}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货地址:</label>
<div class="col-sm-8">
<input name="customerContactAddress" th:field="*{customerContactAddress}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text" disabled>
</div>
</div>
</form>
<!--物料信息-->
<div class="container">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var sysSalesShippingInform = [[${sysSalesShippingInform}]];
var prefix = ctx + "system/salesShippingInform";
$("#form-customerCheckGoods-edit").validate({
focusCleanup: true
});
// 新增提交
function submitHandler() {
// 获取表单数据
const shippingInformData = $("#form-customerCheckGoods-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-table').bootstrapTable('getData');
// 将表数据转换成与complaintNoticeData格式一致的数组
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
"shippingInformDetailId":item.shippingInformDetailId,
"outOrderCode":item.outOrderCode,
"materialNo": item.materialNo, // 假设id对应materialId
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"makeNum": item.makeNum,
"thisShippingNum": item.thisShippingNum,
"hasOutOrderSum": item.hasOutOrderSum,
"hasCheckNum": item.hasCheckNum,
"thisCheckNum": item.thisCheckNum,
// ...其他字段
};
});
const combinedData = Object.assign({}, shippingInformData, {
shippingInformDetailList: materialDataList,
});
// 合并表单数据和表格数据
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/customerCheckGoodsDetail", jsonData);
}
//物料信息展示列表
$(function() {
var options = {
modalName: "选择物料",
url: prefix + "/getMaterialListByOutOrderCode",
queryParams: queryParams,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
columns: [{
checkbox: true
},
{
title: '销售出库单详情ID',
field: 'shippingInformDetailId',
visible: false
},
{
title: '出库单号',
field: 'outOrderCode',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'materialPhotourl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '描述',
field: 'materialDescribe',
},
{
title: '品牌',
field: 'materialBrand',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '加工方式',
field: 'materialProcessMethod',
},
{
title: '订单数量',
field: 'makeNum',
},
{
title: '本次出货数',
field: 'thisShippingNum',
},
{
title: '已出库数',
field: 'hasOutOrderSum',
},
{
title: '已验收数',
field: 'hasCheckNum',
},
{
title: '本次验收数',
field: 'thisCheckNum',
},
]
};
$.table.init(options);
})
function queryParams(params) {
var curParams = {
// 传递参数查询参数
outOrderCode: sysSalesShippingInform.outOrderCode
};
return curParams;
}
</script>
</body>
</html>

14
ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html

@ -71,8 +71,8 @@
var cancelFlag = [[${@permission.hasPermi('system:salesShippingInform:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:salesShippingInform:restore')}]];
var confirmShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:confirmShipping')}]];
var customerCheckGoodsFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoods')}]];
var customerCheckGoodsDetailFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoodsDetail')}]];
@ -222,12 +222,12 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + customerCheckGoodsDetailFlag + '" href="javascript:void(0)" onclick="customerCheckGoodsDetail(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>详情</a> ');
if(row.warehouseOutStatus == '2'){
actions.push('<a class="btn btn-success btn-xs ' + confirmShippingFlag + '" href="javascript:void(0)" onclick="confirmShipping(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认发货</a> ');
}
if(row.warehouseOutStatus == '10' || row.warehouseOutStatus == '11'){
actions.push('<a class="btn btn-success btn-xs ' + confirmShippingFlag + '" href="javascript:void(0)" onclick="customerCheckGoods(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认验收</a> ');
actions.push('<a class="btn btn-success btn-xs ' + customerCheckGoodsFlag + '" href="javascript:void(0)" onclick="customerCheckGoods(\'' + row.shippingInformId + '\')"><i class="fa fa-edit"></i>确认验收</a> ');
}
return actions.join('');
@ -248,6 +248,12 @@
var url = prefix +'/customerCheckGoods/' + shippingInformId;
$.modal.open("客户验收",url);
}
//详情
function customerCheckGoodsDetail(shippingInformId){
var url = prefix +'/customerCheckGoodsDetail/' + shippingInformId;
$.modal.open("详情",url);
}
</script>
</body>
</html>

18
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html

@ -11,7 +11,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">出库单号:</label>
<div class="col-sm-8">
<input name="outOrderCode" th:field="*{outOrderCode}" class="form-control" type="text" disabled>
<input name="outOrderCode" th:field="*{outOrderCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
@ -25,49 +25,49 @@
<div class="form-group">
<label class="col-sm-3 control-label">销售订单号:</label>
<div class="col-sm-8">
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" disabled>
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请人员:</label>
<div class="col-sm-8">
<input name="applyName" th:field="*{applyName}" class="form-control" type="text" disabled>
<input name="applyName" th:field="*{applyName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产单号:</label>
<div class="col-sm-8">
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" disabled>
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" th:field="*{customerId}" class="form-control" type="text" disabled>
<input name="customerId" th:field="*{customerId}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text" disabled>
<input name="customerName" th:field="*{customerName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货联系人:</label>
<div class="col-sm-8">
<input name="deliveryName" th:field="*{deliveryName}" class="form-control" type="text" disabled>
<input name="deliveryName" th:field="*{deliveryName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货电话:</label>
<div class="col-sm-8">
<input name="deliveryNumber" th:field="*{deliveryNumber}" class="form-control" type="text" disabled>
<input name="deliveryNumber" th:field="*{deliveryNumber}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货地址:</label>
<div class="col-sm-8">
<input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" disabled>
<input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">

Loading…
Cancel
Save