Browse Source

[feat]仓库管理

修改仓库出库单前端列表页面:修改列表页面表头的按钮,按钮采用统一样式;操作栏引用$.table.dropdownToggle方法,去掉之前按钮的样式,采用默认样式;
修改销售-出库前端页面,修复申请人员可编辑问题;修改子表出货设备的查询条件加上出库单号
修改售后第二次维护设备前端页面,修改展示出库设备的查询接口
售后维护设备出库Controller层新增:展示第二次维护设备出库,已经添加了的出货设备后端接口;
售后维护设备出库iml层新增展示售后第二次维护设备已经添加了需要维护出货物料信息和转换vo类的方法
仓库出库单Controller新增销售单-出库 物料信息关联设备子表信息后端接口;iml层新增 销售单-出库 物料信息关联设备子表信息后端方法;
销售出货通知iml层:修改 保存确认发货方法:实现同时更新出库单和售后维护设备出库单的送货日期
dev
liuxiaoxu 2 weeks ago
parent
commit
7e9784b918
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java
  2. 22
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java
  3. 7
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java
  4. 8
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java
  5. 36
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java
  6. 74
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java
  7. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java
  8. 8
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java
  9. 6
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java
  10. 46
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java
  11. 2
      ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentTwo.html
  12. 5
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html
  13. 49
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html

13
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java

@ -384,4 +384,17 @@ public String addShippingDevicesOne(@RequestParam("outOrderDetailId") Long outOr
/**
* 展示第二次维护设备出库已经添加了的出货设备
*/
@ResponseBody
@PostMapping("/showAddShippingDevicesTwo")
public TableDataInfo showAddShippingDevicesTwo(AftersalesOutOrder aftersalesOutOrder)
{
startPage();
List<SelectShippingDeviceVO> list = aftersalesOutOrderService.showAddShippingDevicesTwo(aftersalesOutOrder);
return getDataTable(list);
}
}

22
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java

@ -372,17 +372,17 @@ public class AftersalesWarehouseOutController extends BaseController
/**
* 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息
*/
@PostMapping("/showAftersalesShippingDeviceListTwo")
@ResponseBody
public TableDataInfo showAftersalesShippingDeviceListTwo(@RequestParam("materialNo") String materialNo,
@RequestParam("salesOrderCode") String salesOrderCode,
@RequestParam("makeNo") String makeNo)
{
startPage();
List<SelectShippingDeviceVO> list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo);
return getDataTable(list);
}
// @PostMapping("/showAftersalesShippingDeviceListTwo")
// @ResponseBody
// public TableDataInfo showAftersalesShippingDeviceListTwo(@RequestParam("materialNo") String materialNo,
// @RequestParam("salesOrderCode") String salesOrderCode,
// @RequestParam("makeNo") String makeNo)
// {
//
// startPage();
// List<SelectShippingDeviceVO> list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo);
// return getDataTable(list);
// }
/**

7
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java

@ -128,4 +128,11 @@ public interface IAftersalesOutOrderService
* @return
*/
int updateMaintenanceEquipmentTwo(AftersalesOutOrder aftersalesOutOrder);
/**
* 展示售后第二次维护设备已经添加了需要维护出货物料信息
* @param aftersalesOutOrder
* @return
*/
List<SelectShippingDeviceVO> showAddShippingDevicesTwo(AftersalesOutOrder aftersalesOutOrder);
}

8
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java

@ -131,10 +131,10 @@ public interface IAftersalesWarehouseOutService
int updateMaintenanceEquipmentOne(WarehouseOutOrder warehouseOutOrder);
/**
* 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息
*/
List<SelectShippingDeviceVO> showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo);
// /**
// * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息
// */
// List<SelectShippingDeviceVO> showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder);
/**
* 修改保存售后第二次维护设备

36
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java

@ -524,4 +524,40 @@ public class AftersalesOutOrderServiceImpl implements IAftersalesOutOrderService
return result;
}
/**
* 展示售后第二次维护设备已经添加了需要维护出货物料信息
* @param aftersalesOutOrder
* @return
*/
@Override
public List<SelectShippingDeviceVO> showAddShippingDevicesTwo(AftersalesOutOrder aftersalesOutOrder) {
String outOrderCode = aftersalesOutOrder.getOutOrderCode();
String materialNo = aftersalesOutOrder.getMaterialNo();
List<SelectShippingDeviceVO> selectShippingDeviceVOS = new ArrayList<>();
AfterSalesShippingDevice tempShippingDevice = new AfterSalesShippingDevice();
tempShippingDevice.setMaterialNo(materialNo);
tempShippingDevice.setOutOrderCode(outOrderCode);
List<AfterSalesShippingDevice> afterSalesShippingDevices = afterSalesShippingDeviceMapper.selectHasAddShippingDevice(tempShippingDevice);
convertToDeviceVOsTwo(afterSalesShippingDevices, selectShippingDeviceVOS);
return selectShippingDeviceVOS;
}
//转换成vo类
private void convertToDeviceVOsTwo(List<AfterSalesShippingDevice> afterSalesShippingDevices, List<SelectShippingDeviceVO> selectShippingDeviceVOS) {
for (AfterSalesShippingDevice device : afterSalesShippingDevices) {
SelectShippingDeviceVO selectShippingDeviceVO = new SelectShippingDeviceVO();
selectShippingDeviceVO.setShippingDeviceId(device.getShippingDeviceId());
selectShippingDeviceVO.setDeviceModelCode(device.getDeviceModelCode());
selectShippingDeviceVO.setDeviceRunningNumber(device.getDeviceRunningNumber());
selectShippingDeviceVO.setMakePhotoUrl(device.getMakePhotourl());
selectShippingDeviceVO.setAddShippingDeviceFlag(device.getAddShippingDeviceFlag());
selectShippingDeviceVO.setSnCode(device.getSnCode());
selectShippingDeviceVOS.add(selectShippingDeviceVO);
}
}
}

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

@ -298,43 +298,43 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu
return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder);
}
/**
* 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息
*/
@Override
public List<SelectShippingDeviceVO> showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo) {
List<SelectShippingDeviceVO> selectShippingDeviceVOs = new ArrayList<>();
AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice();
afterSalesShippingDevice.setMaterialNo(materialNo);
afterSalesShippingDevice.setSalesOrderCode(salesOrderCode);
afterSalesShippingDevice.setMakeNo(makeNo);
List<AfterSalesShippingDevice> afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice);
List<AfterSalesShippingDevice> filterAfterSalesShippingDevices = afterSalesShippingDevices.stream().filter(shippingDevice -> "0".equals(shippingDevice.getAddShippingDeviceFlag())).collect(Collectors.toList());
if (!StringUtils.isNotEmpty(filterAfterSalesShippingDevices)) {
// 记录日志
log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",materialNo);
}
for (AfterSalesShippingDevice tempAfterSalesShippingDevice : filterAfterSalesShippingDevices) {
SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO();
shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId());
shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode());
shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber());
shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl());
shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode());
shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode());
shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate());
shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod());
shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate());
shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag());
shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate());
shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate());
selectShippingDeviceVOs.add(shippingDeviceVO);
}
return selectShippingDeviceVOs;
}
// /**
// * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息
// */
// @Override
// public List<SelectShippingDeviceVO> showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo) {
//
// List<SelectShippingDeviceVO> selectShippingDeviceVOs = new ArrayList<>();
// AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice();
// afterSalesShippingDevice.setMaterialNo(materialNo);
// afterSalesShippingDevice.setSalesOrderCode(salesOrderCode);
// afterSalesShippingDevice.setMakeNo(makeNo);
// List<AfterSalesShippingDevice> afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice);
// List<AfterSalesShippingDevice> filterAfterSalesShippingDevices = afterSalesShippingDevices.stream().filter(shippingDevice -> "0".equals(shippingDevice.getAddShippingDeviceFlag())).collect(Collectors.toList());
// if (!StringUtils.isNotEmpty(filterAfterSalesShippingDevices)) {
// // 记录日志
// log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",materialNo);
// }
//
// for (AfterSalesShippingDevice tempAfterSalesShippingDevice : filterAfterSalesShippingDevices) {
// SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO();
// shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId());
// shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode());
// shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber());
// shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl());
// shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode());
// shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode());
// shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate());
// shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod());
// shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate());
// shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag());
// shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate());
// shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate());
// selectShippingDeviceVOs.add(shippingDeviceVO);
//
// }
// return selectShippingDeviceVOs;
// }
/**
* 修改保存售后第二次维护设备

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

@ -326,6 +326,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
log.warn("出库单号为空:{}",outOrderCode);
}
WarehouseOutOrder warehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderByCode(outOrderCode);
warehouseOutOrder.setDeliveryDate(sysSalesShippingInform.getDeliverTime());
warehouseOutOrder.setWarehouseOutStatus("3");
warehouseOutOrder.setUpdateBy(loginName);
warehouseOutOrder.setUpdateTime(new Date());
@ -338,6 +339,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor
aftersalesOutOrder.setWarehouseOutStatus("3");
aftersalesOutOrder.setUpdateBy(loginName);
aftersalesOutOrder.setUpdateTime(new Date());
aftersalesOutOrder.setDeliveryDate(sysSalesShippingInform.getDeliverTime());
int updateAftersalesOutOrderResult = aftersalesOutOrderMapper.updateAftersalesOutOrderByOutOrderCode(aftersalesOutOrder);
if (updateAftersalesOutOrderResult <= 0){
throw new BusinessException("更新售后出库单数据失败");

8
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java

@ -233,16 +233,14 @@ public class WarehouseOutOrderController extends BaseController
/**
* 销售单-出库 物料信息关联设备信息
* 销售单-出库 物料信息关联设备子表信息
*/
@PostMapping("/getShippingDeviceList")
@ResponseBody
public TableDataInfo getShippingDeviceList(@RequestParam("materialNo") String materialNo,
@RequestParam("salesOrderCode") String salesOrderCode,
@RequestParam("makeNo") String makeNo)
public TableDataInfo getShippingDeviceList(WarehouseOutOrder warehouseOutOrder)
{
startPage();
List<SelectShippingDeviceVO> list = aftersalesWarehouseOutService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo);
List<SelectShippingDeviceVO> list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(warehouseOutOrder);
return getDataTable(list);
}

6
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java

@ -2,6 +2,7 @@ package com.ruoyi.warehouse.service;
import java.util.List;
import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO;
import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderPickingVo;
import com.ruoyi.system.domain.SysMakeorderPickVo;
import com.ruoyi.system.domain.SysSalesOrder;
@ -135,4 +136,9 @@ public interface IWarehouseOutOrderService
int generateWarehouseOutOrderByBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO);
int updateOutsourceOutWarehouse(WarehouseOutOrder warehouseOutOrder);
/**
* 销售单-出库 物料信息关联设备子表信息
*/
List<SelectShippingDeviceVO> showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder);
}

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

@ -4,8 +4,11 @@ import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import com.ruoyi.aftersales.domain.AfterSalesShippingDevice;
import com.ruoyi.aftersales.domain.AftersalesOutOrder;
import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail;
import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO;
import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper;
import com.ruoyi.aftersales.mapper.AftersalesOutOrderDetailMapper;
import com.ruoyi.aftersales.mapper.AftersalesOutOrderMapper;
import com.ruoyi.common.core.redis.RedisCache;
@ -106,6 +109,9 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
@Autowired
private AftersalesOutOrderDetailMapper aftersalesOutOrderDetailMapper;
@Autowired
private AfterSalesShippingDeviceMapper shippingDeviceMapper;
/**
* 查询仓库出库单
*
@ -411,6 +417,45 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
return updateWarehouseOutOrderResult;
}
/**
* 销售单-出库 物料信息关联设备子表信息
*/
@Override
public List<SelectShippingDeviceVO> showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder) {
List<SelectShippingDeviceVO> selectShippingDeviceVOs = new ArrayList<>();
AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice();
afterSalesShippingDevice.setMaterialNo(warehouseOutOrder.getMaterialNo());
afterSalesShippingDevice.setOutOrderCode(warehouseOutOrder.getOutOrderCode());
List<AfterSalesShippingDevice> afterSalesShippingDevices = shippingDeviceMapper.selectHasAddShippingDevice(afterSalesShippingDevice);
if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) {
// 记录日志
log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",warehouseOutOrder.getMaterialNo());
log.warn("未查找到与物料号关联的出库设备数据, 出库单号: {}",warehouseOutOrder.getOutOrderCode());
}
for (AfterSalesShippingDevice tempAfterSalesShippingDevice : afterSalesShippingDevices) {
SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO();
shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId());
shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode());
shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber());
shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl());
shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode());
shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode());
shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate());
shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod());
shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate());
shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag());
shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate());
shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate());
selectShippingDeviceVOs.add(shippingDeviceVO);
}
return selectShippingDeviceVOs;
}
// 更新物料对应库存查询记录
public int updateWarehouseInventoryInquiry(WarehouseOutOrderDetail outOrderDetail,WarehouseInventoryInquiry inventoryInquiry){
// 更新可用库存数
@ -1355,6 +1400,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService
}
}
/**
* 仓库出库单通用修改保持方法
* */

2
ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentTwo.html

@ -262,7 +262,7 @@
var childTableId = 'child_table_'+index;
$detail.html('<table id="'+childTableId+'"></table>');
$('#'+childTableId).bootstrapTable({
url: prefix + "/showAddShippingDevicesOne",
url: prefix + "/showAddShippingDevicesTwo",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",

5
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html

@ -31,7 +31,7 @@
<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" r\>
<input name="applyName" th:field="*{applyName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
@ -268,7 +268,8 @@
queryParams : {
materialNo: row.materialNo,
salesOrderCode:warehouseOutOrder.salesOrderCode,
makeNo:warehouseOutOrder.makeNo
makeNo:warehouseOutOrder.makeNo,
outOrderCode:warehouseOutOrder.outOrderCode
},
columns: [
{

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

@ -56,7 +56,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="warehouse:warehouseOutOrder:export">
<a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="warehouse:warehouseOutOrder:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -102,6 +102,7 @@
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "仓库出库单",
showFooter: true,
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
@ -150,10 +151,24 @@
{
title: '物料合计',
field: 'materialSum',
formatter: function(value) {
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].materialSum) || 0;
}
return "总物料合计: " + sum.toFixed(2);
}
},
{
title: '数量合计',
field: 'enterpriseSum',
formatter: function(value) {
var sum = 0;
for (var i in value) {
sum += parseFloat(value[i].enterpriseSum) || 0;
}
return "总数量合计: " + sum.toFixed(2);
}
},
{
title: '出库数',
@ -194,68 +209,68 @@
var actions = [];
/*销售单-准备物料*/
if (row.warehouseOutStatus == 0 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){
actions.push('<a class="btn btn-success btn-xs ' + prepareMaterialFlag + '" href="javascript:void(0)" onclick="prepareMaterial(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>准备物料</a> ');
actions.push('<a class="btn btn-success btn-xs ' + prepareMaterialDetailFlag + '" href="javascript:void(0)" onclick="prepareMaterialDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class=" ' + prepareMaterialFlag + '" href="javascript:void(0)" onclick="prepareMaterial(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>准备物料</a> ');
actions.push('<a class="' + prepareMaterialDetailFlag + '" href="javascript:void(0)" onclick="prepareMaterialDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
/*销售单-出库*/
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){
actions.push('<a class="btn btn-success btn-xs ' + salesOutWarehouseFlag + '" href="javascript:void(0)" onclick="salesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
actions.push('<a class=" ' + salesOutWarehouseFlag + '" href="javascript:void(0)" onclick="salesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
}
/*销售单-出库详情*/
if (row.warehouseOrderType == 0 && row.warehouseOutType == 0 && row.warehouseOutStatus != 0 ){
actions.push('<a class="btn btn-success btn-xs ' + salesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="salesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class=" ' + salesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="salesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
/*生产单-出库*/
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 1 && row.warehouseOutType == 1){
actions.push('<a class="btn btn-success btn-xs ' + makeOutWarehouseFlag + '" href="javascript:void(0)" onclick="makeOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
actions.push('<a class="' + makeOutWarehouseFlag + '" href="javascript:void(0)" onclick="makeOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
}
/*生产单-出库 详情*/
if (row.warehouseOrderType == 1 && row.warehouseOutType == 1){
actions.push('<a class="btn btn-success btn-xs ' + makeOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="makeOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class=" ' + makeOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="makeOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
/*请购单-出库*/
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 2 && row.warehouseOutType == 2){
actions.push('<a class="btn btn-success btn-xs ' + requisitioningOutWarehouseFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
actions.push('<a class=" ' + requisitioningOutWarehouseFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
}
/*请购单-出库 详情*/
if (row.warehouseOrderType == 2 && row.warehouseOutType == 2){
actions.push('<a class="btn btn-success btn-xs ' + requisitioningOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class=" ' + requisitioningOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="requisitioningOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
/*退换货-出库*/
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 4 && row.warehouseOutType == 4){
actions.push('<a class="btn btn-success btn-xs ' + refundsExchangesOutWarehouseFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
actions.push('<a class=" ' + refundsExchangesOutWarehouseFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
}
/*退换货-出库详情*/
if (row.warehouseOrderType == 4 && row.warehouseOutType == 4){
actions.push('<a class="btn btn-success btn-xs ' + refundsExchangesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class=" ' + refundsExchangesOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="refundsExchangesOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
/*开发修改单-出库*/
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 5 && row.warehouseOutType == 5){
actions.push('<a class="btn btn-success btn-xs ' + developModifyOutWarehouseFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
actions.push('<a class="' + developModifyOutWarehouseFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
}
/*开发修改单-出库详情*/
if (row.warehouseOrderType == 5 && row.warehouseOutType == 5){
actions.push('<a class="btn btn-success btn-xs ' + developModifyOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class="' + developModifyOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="developModifyOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
/*委外单-出库*/
if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 3 && row.warehouseOutType == 3){
actions.push('<a class="btn btn-success btn-xs ' + outsourceOutWarehouseFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
actions.push('<a class="' + outsourceOutWarehouseFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouse(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>出库</a> ');
}
/*生产单-出库 详情*/
if (row.warehouseOrderType == 3 && row.warehouseOutType == 3){
actions.push('<a class="btn btn-success btn-xs ' + outsourceOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class=" ' + outsourceOutWarehouseDetailFlag + '" href="javascript:void(0)" onclick="outsourceOutWarehouseDetail(\'' + row.outOrderId + '\')"><i class="fa fa-edit"></i>详情</a> ');
}
return actions.join('');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}]
};

Loading…
Cancel
Save