change - 项目信息、采购订单信息、销售订单信息
parent
aba082b5ad
commit
eec9c4b625
@ -0,0 +1,105 @@
|
||||
package com.hw.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.mes.domain.MesProjectInfo;
|
||||
import com.hw.mes.service.IMesProjectInfoService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/projectinfo")
|
||||
public class MesProjectInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesProjectInfoService mesProjectInfoService;
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:projectinfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
startPage();
|
||||
List<MesProjectInfo> list = mesProjectInfoService.selectMesProjectInfoList(mesProjectInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:projectinfo:export")
|
||||
@Log(title = "项目信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
List<MesProjectInfo> list = mesProjectInfoService.selectMesProjectInfoList(mesProjectInfo);
|
||||
ExcelUtil<MesProjectInfo> util = new ExcelUtil<MesProjectInfo>(MesProjectInfo.class);
|
||||
util.exportExcel(response, list, "项目信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:projectinfo:query")
|
||||
@GetMapping(value = "/{projectId}")
|
||||
public AjaxResult getInfo(@PathVariable("projectId") Long projectId)
|
||||
{
|
||||
return success(mesProjectInfoService.selectMesProjectInfoByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*/
|
||||
@RequiresPermissions("mes:projectinfo:add")
|
||||
@Log(title = "项目信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
return toAjax(mesProjectInfoService.insertMesProjectInfo(mesProjectInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*/
|
||||
@RequiresPermissions("mes:projectinfo:edit")
|
||||
@Log(title = "项目信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
return toAjax(mesProjectInfoService.updateMesProjectInfo(mesProjectInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目信息
|
||||
*/
|
||||
@RequiresPermissions("mes:projectinfo:remove")
|
||||
@Log(title = "项目信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{projectIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] projectIds)
|
||||
{
|
||||
return toAjax(mesProjectInfoService.deleteMesProjectInfoByProjectIds(projectIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.hw.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.mes.domain.MesPurchaseOrder;
|
||||
import com.hw.mes.service.IMesPurchaseOrderService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购订单信息Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/purchaseOrder")
|
||||
public class MesPurchaseOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesPurchaseOrderService mesPurchaseOrderService;
|
||||
|
||||
/**
|
||||
* 查询采购订单信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:purchaseOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
startPage();
|
||||
List<MesPurchaseOrder> list = mesPurchaseOrderService.selectMesPurchaseOrderList(mesPurchaseOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购订单信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:purchaseOrder:export")
|
||||
@Log(title = "采购订单信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
List<MesPurchaseOrder> list = mesPurchaseOrderService.selectMesPurchaseOrderList(mesPurchaseOrder);
|
||||
ExcelUtil<MesPurchaseOrder> util = new ExcelUtil<MesPurchaseOrder>(MesPurchaseOrder.class);
|
||||
util.exportExcel(response, list, "采购订单信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购订单信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:purchaseOrder:query")
|
||||
@GetMapping(value = "/{purchaseOrderId}")
|
||||
public AjaxResult getInfo(@PathVariable("purchaseOrderId") Long purchaseOrderId)
|
||||
{
|
||||
return success(mesPurchaseOrderService.selectMesPurchaseOrderByPurchaseOrderId(purchaseOrderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购订单信息
|
||||
*/
|
||||
@RequiresPermissions("mes:purchaseOrder:add")
|
||||
@Log(title = "采购订单信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
return toAjax(mesPurchaseOrderService.insertMesPurchaseOrder(mesPurchaseOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购订单信息
|
||||
*/
|
||||
@RequiresPermissions("mes:purchaseOrder:edit")
|
||||
@Log(title = "采购订单信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
return toAjax(mesPurchaseOrderService.updateMesPurchaseOrder(mesPurchaseOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购订单信息
|
||||
*/
|
||||
@RequiresPermissions("mes:purchaseOrder:remove")
|
||||
@Log(title = "采购订单信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{purchaseOrderIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] purchaseOrderIds)
|
||||
{
|
||||
return toAjax(mesPurchaseOrderService.deleteMesPurchaseOrderByPurchaseOrderIds(purchaseOrderIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.hw.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.mes.domain.MesSaleOrder;
|
||||
import com.hw.mes.service.IMesSaleOrderService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 销售订单信息Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/saleOrder")
|
||||
public class MesSaleOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesSaleOrderService mesSaleOrderService;
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:saleOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
startPage();
|
||||
List<MesSaleOrder> list = mesSaleOrderService.selectMesSaleOrderList(mesSaleOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出销售订单信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:saleOrder:export")
|
||||
@Log(title = "销售订单信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
List<MesSaleOrder> list = mesSaleOrderService.selectMesSaleOrderList(mesSaleOrder);
|
||||
ExcelUtil<MesSaleOrder> util = new ExcelUtil<MesSaleOrder>(MesSaleOrder.class);
|
||||
util.exportExcel(response, list, "销售订单信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取销售订单信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:saleOrder:query")
|
||||
@GetMapping(value = "/{saleOrderId}")
|
||||
public AjaxResult getInfo(@PathVariable("saleOrderId") Long saleOrderId)
|
||||
{
|
||||
return success(mesSaleOrderService.selectMesSaleOrderBySaleOrderId(saleOrderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*/
|
||||
@RequiresPermissions("mes:saleOrder:add")
|
||||
@Log(title = "销售订单信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
return toAjax(mesSaleOrderService.insertMesSaleOrder(mesSaleOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*/
|
||||
@RequiresPermissions("mes:saleOrder:edit")
|
||||
@Log(title = "销售订单信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
return toAjax(mesSaleOrderService.updateMesSaleOrder(mesSaleOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除销售订单信息
|
||||
*/
|
||||
@RequiresPermissions("mes:saleOrder:remove")
|
||||
@Log(title = "销售订单信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{saleOrderIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] saleOrderIds)
|
||||
{
|
||||
return toAjax(mesSaleOrderService.deleteMesSaleOrderBySaleOrderIds(saleOrderIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesProjectInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
public interface MesProjectInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目信息
|
||||
*
|
||||
* @param projectId 项目信息主键
|
||||
* @return 项目信息
|
||||
*/
|
||||
public MesProjectInfo selectMesProjectInfoByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 项目信息集合
|
||||
*/
|
||||
public List<MesProjectInfo> selectMesProjectInfoList(MesProjectInfo mesProjectInfo);
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesProjectInfo(MesProjectInfo mesProjectInfo);
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesProjectInfo(MesProjectInfo mesProjectInfo);
|
||||
|
||||
/**
|
||||
* 删除项目信息
|
||||
*
|
||||
* @param projectId 项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectInfoByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 批量删除项目信息
|
||||
*
|
||||
* @param projectIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectInfoByProjectIds(Long[] projectIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesPurchaseOrder;
|
||||
|
||||
/**
|
||||
* 采购订单信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
public interface MesPurchaseOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购订单信息
|
||||
*
|
||||
* @param purchaseOrderId 采购订单信息主键
|
||||
* @return 采购订单信息
|
||||
*/
|
||||
public MesPurchaseOrder selectMesPurchaseOrderByPurchaseOrderId(Long purchaseOrderId);
|
||||
|
||||
/**
|
||||
* 查询采购订单信息列表
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 采购订单信息集合
|
||||
*/
|
||||
public List<MesPurchaseOrder> selectMesPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 新增采购订单信息
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesPurchaseOrder(MesPurchaseOrder mesPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 修改采购订单信息
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesPurchaseOrder(MesPurchaseOrder mesPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 删除采购订单信息
|
||||
*
|
||||
* @param purchaseOrderId 采购订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseOrderByPurchaseOrderId(Long purchaseOrderId);
|
||||
|
||||
/**
|
||||
* 批量删除采购订单信息
|
||||
*
|
||||
* @param purchaseOrderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseOrderByPurchaseOrderIds(Long[] purchaseOrderIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesSaleOrder;
|
||||
|
||||
/**
|
||||
* 销售订单信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
public interface MesSaleOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询销售订单信息
|
||||
*
|
||||
* @param saleOrderId 销售订单信息主键
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
public MesSaleOrder selectMesSaleOrderBySaleOrderId(Long saleOrderId);
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 销售订单信息集合
|
||||
*/
|
||||
public List<MesSaleOrder> selectMesSaleOrderList(MesSaleOrder mesSaleOrder);
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesSaleOrder(MesSaleOrder mesSaleOrder);
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesSaleOrder(MesSaleOrder mesSaleOrder);
|
||||
|
||||
/**
|
||||
* 删除销售订单信息
|
||||
*
|
||||
* @param saleOrderId 销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesSaleOrderBySaleOrderId(Long saleOrderId);
|
||||
|
||||
/**
|
||||
* 批量删除销售订单信息
|
||||
*
|
||||
* @param saleOrderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesSaleOrderBySaleOrderIds(Long[] saleOrderIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesProjectInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
public interface IMesProjectInfoService
|
||||
{
|
||||
/**
|
||||
* 查询项目信息
|
||||
*
|
||||
* @param projectId 项目信息主键
|
||||
* @return 项目信息
|
||||
*/
|
||||
public MesProjectInfo selectMesProjectInfoByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 项目信息集合
|
||||
*/
|
||||
public List<MesProjectInfo> selectMesProjectInfoList(MesProjectInfo mesProjectInfo);
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesProjectInfo(MesProjectInfo mesProjectInfo);
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesProjectInfo(MesProjectInfo mesProjectInfo);
|
||||
|
||||
/**
|
||||
* 批量删除项目信息
|
||||
*
|
||||
* @param projectIds 需要删除的项目信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectInfoByProjectIds(Long[] projectIds);
|
||||
|
||||
/**
|
||||
* 删除项目信息信息
|
||||
*
|
||||
* @param projectId 项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectInfoByProjectId(Long projectId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesPurchaseOrder;
|
||||
|
||||
/**
|
||||
* 采购订单信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
public interface IMesPurchaseOrderService
|
||||
{
|
||||
/**
|
||||
* 查询采购订单信息
|
||||
*
|
||||
* @param purchaseOrderId 采购订单信息主键
|
||||
* @return 采购订单信息
|
||||
*/
|
||||
public MesPurchaseOrder selectMesPurchaseOrderByPurchaseOrderId(Long purchaseOrderId);
|
||||
|
||||
/**
|
||||
* 查询采购订单信息列表
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 采购订单信息集合
|
||||
*/
|
||||
public List<MesPurchaseOrder> selectMesPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 新增采购订单信息
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesPurchaseOrder(MesPurchaseOrder mesPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 修改采购订单信息
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesPurchaseOrder(MesPurchaseOrder mesPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 批量删除采购订单信息
|
||||
*
|
||||
* @param purchaseOrderIds 需要删除的采购订单信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseOrderByPurchaseOrderIds(Long[] purchaseOrderIds);
|
||||
|
||||
/**
|
||||
* 删除采购订单信息信息
|
||||
*
|
||||
* @param purchaseOrderId 采购订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPurchaseOrderByPurchaseOrderId(Long purchaseOrderId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesSaleOrder;
|
||||
|
||||
/**
|
||||
* 销售订单信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
public interface IMesSaleOrderService
|
||||
{
|
||||
/**
|
||||
* 查询销售订单信息
|
||||
*
|
||||
* @param saleOrderId 销售订单信息主键
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
public MesSaleOrder selectMesSaleOrderBySaleOrderId(Long saleOrderId);
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 销售订单信息集合
|
||||
*/
|
||||
public List<MesSaleOrder> selectMesSaleOrderList(MesSaleOrder mesSaleOrder);
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesSaleOrder(MesSaleOrder mesSaleOrder);
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesSaleOrder(MesSaleOrder mesSaleOrder);
|
||||
|
||||
/**
|
||||
* 批量删除销售订单信息
|
||||
*
|
||||
* @param saleOrderIds 需要删除的销售订单信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesSaleOrderBySaleOrderIds(Long[] saleOrderIds);
|
||||
|
||||
/**
|
||||
* 删除销售订单信息信息
|
||||
*
|
||||
* @param saleOrderId 销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesSaleOrderBySaleOrderId(Long saleOrderId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesProjectInfoMapper;
|
||||
import com.hw.mes.domain.MesProjectInfo;
|
||||
import com.hw.mes.service.IMesProjectInfoService;
|
||||
|
||||
/**
|
||||
* 项目信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
@Service
|
||||
public class MesProjectInfoServiceImpl implements IMesProjectInfoService
|
||||
{
|
||||
@Autowired
|
||||
private MesProjectInfoMapper mesProjectInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询项目信息
|
||||
*
|
||||
* @param projectId 项目信息主键
|
||||
* @return 项目信息
|
||||
*/
|
||||
@Override
|
||||
public MesProjectInfo selectMesProjectInfoByProjectId(Long projectId)
|
||||
{
|
||||
return mesProjectInfoMapper.selectMesProjectInfoByProjectId(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 项目信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesProjectInfo> selectMesProjectInfoList(MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
return mesProjectInfoMapper.selectMesProjectInfoList(mesProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesProjectInfo(MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
mesProjectInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return mesProjectInfoMapper.insertMesProjectInfo(mesProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*
|
||||
* @param mesProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesProjectInfo(MesProjectInfo mesProjectInfo)
|
||||
{
|
||||
mesProjectInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesProjectInfoMapper.updateMesProjectInfo(mesProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目信息
|
||||
*
|
||||
* @param projectIds 需要删除的项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesProjectInfoByProjectIds(Long[] projectIds)
|
||||
{
|
||||
return mesProjectInfoMapper.deleteMesProjectInfoByProjectIds(projectIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目信息信息
|
||||
*
|
||||
* @param projectId 项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesProjectInfoByProjectId(Long projectId)
|
||||
{
|
||||
return mesProjectInfoMapper.deleteMesProjectInfoByProjectId(projectId);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesPurchaseOrderMapper;
|
||||
import com.hw.mes.domain.MesPurchaseOrder;
|
||||
import com.hw.mes.service.IMesPurchaseOrderService;
|
||||
|
||||
/**
|
||||
* 采购订单信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
@Service
|
||||
public class MesPurchaseOrderServiceImpl implements IMesPurchaseOrderService
|
||||
{
|
||||
@Autowired
|
||||
private MesPurchaseOrderMapper mesPurchaseOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询采购订单信息
|
||||
*
|
||||
* @param purchaseOrderId 采购订单信息主键
|
||||
* @return 采购订单信息
|
||||
*/
|
||||
@Override
|
||||
public MesPurchaseOrder selectMesPurchaseOrderByPurchaseOrderId(Long purchaseOrderId)
|
||||
{
|
||||
return mesPurchaseOrderMapper.selectMesPurchaseOrderByPurchaseOrderId(purchaseOrderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购订单信息列表
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 采购订单信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesPurchaseOrder> selectMesPurchaseOrderList(MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
return mesPurchaseOrderMapper.selectMesPurchaseOrderList(mesPurchaseOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购订单信息
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesPurchaseOrder(MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
mesPurchaseOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return mesPurchaseOrderMapper.insertMesPurchaseOrder(mesPurchaseOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购订单信息
|
||||
*
|
||||
* @param mesPurchaseOrder 采购订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesPurchaseOrder(MesPurchaseOrder mesPurchaseOrder)
|
||||
{
|
||||
mesPurchaseOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesPurchaseOrderMapper.updateMesPurchaseOrder(mesPurchaseOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购订单信息
|
||||
*
|
||||
* @param purchaseOrderIds 需要删除的采购订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesPurchaseOrderByPurchaseOrderIds(Long[] purchaseOrderIds)
|
||||
{
|
||||
return mesPurchaseOrderMapper.deleteMesPurchaseOrderByPurchaseOrderIds(purchaseOrderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购订单信息信息
|
||||
*
|
||||
* @param purchaseOrderId 采购订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesPurchaseOrderByPurchaseOrderId(Long purchaseOrderId)
|
||||
{
|
||||
return mesPurchaseOrderMapper.deleteMesPurchaseOrderByPurchaseOrderId(purchaseOrderId);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesSaleOrderMapper;
|
||||
import com.hw.mes.domain.MesSaleOrder;
|
||||
import com.hw.mes.service.IMesSaleOrderService;
|
||||
|
||||
/**
|
||||
* 销售订单信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-02-19
|
||||
*/
|
||||
@Service
|
||||
public class MesSaleOrderServiceImpl implements IMesSaleOrderService
|
||||
{
|
||||
@Autowired
|
||||
private MesSaleOrderMapper mesSaleOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询销售订单信息
|
||||
*
|
||||
* @param saleOrderId 销售订单信息主键
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
@Override
|
||||
public MesSaleOrder selectMesSaleOrderBySaleOrderId(Long saleOrderId)
|
||||
{
|
||||
return mesSaleOrderMapper.selectMesSaleOrderBySaleOrderId(saleOrderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询销售订单信息列表
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 销售订单信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesSaleOrder> selectMesSaleOrderList(MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
return mesSaleOrderMapper.selectMesSaleOrderList(mesSaleOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售订单信息
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesSaleOrder(MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
mesSaleOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return mesSaleOrderMapper.insertMesSaleOrder(mesSaleOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销售订单信息
|
||||
*
|
||||
* @param mesSaleOrder 销售订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesSaleOrder(MesSaleOrder mesSaleOrder)
|
||||
{
|
||||
mesSaleOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesSaleOrderMapper.updateMesSaleOrder(mesSaleOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除销售订单信息
|
||||
*
|
||||
* @param saleOrderIds 需要删除的销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesSaleOrderBySaleOrderIds(Long[] saleOrderIds)
|
||||
{
|
||||
return mesSaleOrderMapper.deleteMesSaleOrderBySaleOrderIds(saleOrderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除销售订单信息信息
|
||||
*
|
||||
* @param saleOrderId 销售订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesSaleOrderBySaleOrderId(Long saleOrderId)
|
||||
{
|
||||
return mesSaleOrderMapper.deleteMesSaleOrderBySaleOrderId(saleOrderId);
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hw.mes.mapper.MesProjectInfoMapper">
|
||||
|
||||
<resultMap type="MesProjectInfo" id="MesProjectInfoResult">
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="erpId" column="erp_id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="documentStatus" column="document_status" />
|
||||
<result property="forbidStatus" column="forbid_status" />
|
||||
<result property="auditDate" column="audit_date" />
|
||||
<result property="erpModifyDate" column="erp_modify_date" />
|
||||
<result property="beginDate" column="begin_date" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="completeDate" column="complete_date" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesProjectInfoVo">
|
||||
select project_id, erp_id, project_no, project_name, document_status, forbid_status, audit_date, erp_modify_date, begin_date, end_date, order_status, complete_date, is_flag, remark, create_by, create_time, update_by, update_time from mes_project_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMesProjectInfoList" parameterType="MesProjectInfo" resultMap="MesProjectInfoResult">
|
||||
<include refid="selectMesProjectInfoVo"/>
|
||||
<where>
|
||||
<if test="erpId != null "> and erp_id = #{erpId}</if>
|
||||
<if test="projectNo != null and projectNo != ''"> and project_no = #{projectNo}</if>
|
||||
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="documentStatus != null and documentStatus != ''"> and document_status = #{documentStatus}</if>
|
||||
<if test="forbidStatus != null and forbidStatus != ''"> and forbid_status = #{forbidStatus}</if>
|
||||
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
|
||||
<if test="erpModifyDate != null "> and erp_modify_date = #{erpModifyDate}</if>
|
||||
<if test="beginDate != null "> and begin_date = #{beginDate}</if>
|
||||
<if test="endDate != null "> and end_date = #{endDate}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="completeDate != null "> and complete_date = #{completeDate}</if>
|
||||
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesProjectInfoByProjectId" parameterType="Long" resultMap="MesProjectInfoResult">
|
||||
<include refid="selectMesProjectInfoVo"/>
|
||||
where project_id = #{projectId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesProjectInfo" parameterType="MesProjectInfo" useGeneratedKeys="true" keyProperty="projectId">
|
||||
insert into mes_project_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="erpId != null">erp_id,</if>
|
||||
<if test="projectNo != null">project_no,</if>
|
||||
<if test="projectName != null">project_name,</if>
|
||||
<if test="documentStatus != null">document_status,</if>
|
||||
<if test="forbidStatus != null">forbid_status,</if>
|
||||
<if test="auditDate != null">audit_date,</if>
|
||||
<if test="erpModifyDate != null">erp_modify_date,</if>
|
||||
<if test="beginDate != null">begin_date,</if>
|
||||
<if test="endDate != null">end_date,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="completeDate != null">complete_date,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="erpId != null">#{erpId},</if>
|
||||
<if test="projectNo != null">#{projectNo},</if>
|
||||
<if test="projectName != null">#{projectName},</if>
|
||||
<if test="documentStatus != null">#{documentStatus},</if>
|
||||
<if test="forbidStatus != null">#{forbidStatus},</if>
|
||||
<if test="auditDate != null">#{auditDate},</if>
|
||||
<if test="erpModifyDate != null">#{erpModifyDate},</if>
|
||||
<if test="beginDate != null">#{beginDate},</if>
|
||||
<if test="endDate != null">#{endDate},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="completeDate != null">#{completeDate},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesProjectInfo" parameterType="MesProjectInfo">
|
||||
update mes_project_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="erpId != null">erp_id = #{erpId},</if>
|
||||
<if test="projectNo != null">project_no = #{projectNo},</if>
|
||||
<if test="projectName != null">project_name = #{projectName},</if>
|
||||
<if test="documentStatus != null">document_status = #{documentStatus},</if>
|
||||
<if test="forbidStatus != null">forbid_status = #{forbidStatus},</if>
|
||||
<if test="auditDate != null">audit_date = #{auditDate},</if>
|
||||
<if test="erpModifyDate != null">erp_modify_date = #{erpModifyDate},</if>
|
||||
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
||||
<if test="endDate != null">end_date = #{endDate},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="completeDate != null">complete_date = #{completeDate},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where project_id = #{projectId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesProjectInfoByProjectId" parameterType="Long">
|
||||
delete from mes_project_info where project_id = #{projectId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesProjectInfoByProjectIds" parameterType="String">
|
||||
delete from mes_project_info where project_id in
|
||||
<foreach item="projectId" collection="array" open="(" separator="," close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hw.mes.mapper.MesPurchaseOrderMapper">
|
||||
|
||||
<resultMap type="MesPurchaseOrder" id="MesPurchaseOrderResult">
|
||||
<result property="purchaseOrderId" column="purchase_order_id" />
|
||||
<result property="erpId" column="erp_id" />
|
||||
<result property="fentryId" column="fentry_id" />
|
||||
<result property="poNo" column="po_no" />
|
||||
<result property="documentStatus" column="document_status" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="orderAmount" column="order_amount" />
|
||||
<result property="completeAmount" column="complete_amount" />
|
||||
<result property="approveDate" column="approve_date" />
|
||||
<result property="erpModifyDate" column="erp_modify_date" />
|
||||
<result property="planDeliveryDate" column="plan_delivery_date" />
|
||||
<result property="beginDate" column="begin_date" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="completeDate" column="complete_date" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesPurchaseOrderVo">
|
||||
select purchase_order_id, erp_id, fentry_id, po_no, document_status, material_id, material_code, material_name, order_amount, complete_amount, approve_date, erp_modify_date, plan_delivery_date, begin_date, end_date, order_status, complete_date, is_flag, remark, create_by, create_time, update_by, update_time from mes_purchase_order
|
||||
</sql>
|
||||
|
||||
<select id="selectMesPurchaseOrderList" parameterType="MesPurchaseOrder" resultMap="MesPurchaseOrderResult">
|
||||
<include refid="selectMesPurchaseOrderVo"/>
|
||||
<where>
|
||||
<if test="erpId != null "> and erp_id = #{erpId}</if>
|
||||
<if test="fentryId != null "> and fentry_id = #{fentryId}</if>
|
||||
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
|
||||
<if test="documentStatus != null and documentStatus != ''"> and document_status = #{documentStatus}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="orderAmount != null "> and order_amount = #{orderAmount}</if>
|
||||
<if test="completeAmount != null "> and complete_amount = #{completeAmount}</if>
|
||||
<if test="approveDate != null "> and approve_date = #{approveDate}</if>
|
||||
<if test="erpModifyDate != null "> and erp_modify_date = #{erpModifyDate}</if>
|
||||
<if test="planDeliveryDate != null "> and plan_delivery_date = #{planDeliveryDate}</if>
|
||||
<if test="beginDate != null "> and begin_date = #{beginDate}</if>
|
||||
<if test="endDate != null "> and end_date = #{endDate}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="completeDate != null "> and complete_date = #{completeDate}</if>
|
||||
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesPurchaseOrderByPurchaseOrderId" parameterType="Long" resultMap="MesPurchaseOrderResult">
|
||||
<include refid="selectMesPurchaseOrderVo"/>
|
||||
where purchase_order_id = #{purchaseOrderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesPurchaseOrder" parameterType="MesPurchaseOrder" useGeneratedKeys="true" keyProperty="purchaseOrderId">
|
||||
insert into mes_purchase_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="erpId != null">erp_id,</if>
|
||||
<if test="fentryId != null">fentry_id,</if>
|
||||
<if test="poNo != null">po_no,</if>
|
||||
<if test="documentStatus != null">document_status,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="orderAmount != null">order_amount,</if>
|
||||
<if test="completeAmount != null">complete_amount,</if>
|
||||
<if test="approveDate != null">approve_date,</if>
|
||||
<if test="erpModifyDate != null">erp_modify_date,</if>
|
||||
<if test="planDeliveryDate != null">plan_delivery_date,</if>
|
||||
<if test="beginDate != null">begin_date,</if>
|
||||
<if test="endDate != null">end_date,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="completeDate != null">complete_date,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="erpId != null">#{erpId},</if>
|
||||
<if test="fentryId != null">#{fentryId},</if>
|
||||
<if test="poNo != null">#{poNo},</if>
|
||||
<if test="documentStatus != null">#{documentStatus},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="orderAmount != null">#{orderAmount},</if>
|
||||
<if test="completeAmount != null">#{completeAmount},</if>
|
||||
<if test="approveDate != null">#{approveDate},</if>
|
||||
<if test="erpModifyDate != null">#{erpModifyDate},</if>
|
||||
<if test="planDeliveryDate != null">#{planDeliveryDate},</if>
|
||||
<if test="beginDate != null">#{beginDate},</if>
|
||||
<if test="endDate != null">#{endDate},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="completeDate != null">#{completeDate},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesPurchaseOrder" parameterType="MesPurchaseOrder">
|
||||
update mes_purchase_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="erpId != null">erp_id = #{erpId},</if>
|
||||
<if test="fentryId != null">fentry_id = #{fentryId},</if>
|
||||
<if test="poNo != null">po_no = #{poNo},</if>
|
||||
<if test="documentStatus != null">document_status = #{documentStatus},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="orderAmount != null">order_amount = #{orderAmount},</if>
|
||||
<if test="completeAmount != null">complete_amount = #{completeAmount},</if>
|
||||
<if test="approveDate != null">approve_date = #{approveDate},</if>
|
||||
<if test="erpModifyDate != null">erp_modify_date = #{erpModifyDate},</if>
|
||||
<if test="planDeliveryDate != null">plan_delivery_date = #{planDeliveryDate},</if>
|
||||
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
||||
<if test="endDate != null">end_date = #{endDate},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="completeDate != null">complete_date = #{completeDate},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where purchase_order_id = #{purchaseOrderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesPurchaseOrderByPurchaseOrderId" parameterType="Long">
|
||||
delete from mes_purchase_order where purchase_order_id = #{purchaseOrderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesPurchaseOrderByPurchaseOrderIds" parameterType="String">
|
||||
delete from mes_purchase_order where purchase_order_id in
|
||||
<foreach item="purchaseOrderId" collection="array" open="(" separator="," close=")">
|
||||
#{purchaseOrderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hw.mes.mapper.MesSaleOrderMapper">
|
||||
|
||||
<resultMap type="MesSaleOrder" id="MesSaleOrderResult">
|
||||
<result property="saleOrderId" column="sale_order_id"/>
|
||||
<result property="erpId" column="erp_id"/>
|
||||
<result property="fentryId" column="fentry_id"/>
|
||||
<result property="saleorderCode" column="saleorder_code"/>
|
||||
<result property="saleorderLinenumber" column="saleorder_linenumber"/>
|
||||
<result property="documentStatus" column="document_status"/>
|
||||
<result property="factoryId" column="factory_id"/>
|
||||
<result property="prodlineId" column="prodline_id"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="matkl" column="matkl"/>
|
||||
<result property="orderAmount" column="order_amount"/>
|
||||
<result property="completeAmount" column="complete_amount"/>
|
||||
<result property="releaseQty" column="release_qty"/>
|
||||
<result property="isRelease" column="is_release"/>
|
||||
<result property="approveDate" column="approve_date"/>
|
||||
<result property="erpModifyDate" column="erp_modify_date"/>
|
||||
<result property="planDeliveryDate" column="plan_delivery_date"/>
|
||||
<result property="beginDate" column="begin_date"/>
|
||||
<result property="endDate" column="end_date"/>
|
||||
<result property="completeDate" column="complete_date"/>
|
||||
<result property="isFlag" column="is_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesSaleOrderVo">
|
||||
select sale_order_id,
|
||||
erp_id,
|
||||
fentry_id,
|
||||
saleorder_code,
|
||||
saleorder_linenumber,
|
||||
document_status,
|
||||
factory_id,
|
||||
prodline_id,
|
||||
material_id,
|
||||
material_code,
|
||||
material_name,
|
||||
matkl,
|
||||
order_amount,
|
||||
complete_amount,
|
||||
release_qty,
|
||||
is_release,
|
||||
approve_date,
|
||||
erp_modify_date,
|
||||
plan_delivery_date,
|
||||
begin_date,
|
||||
end_date,
|
||||
complete_date,
|
||||
is_flag,
|
||||
remark,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from mes_sale_order
|
||||
</sql>
|
||||
|
||||
<select id="selectMesSaleOrderList" parameterType="MesSaleOrder" resultMap="MesSaleOrderResult">
|
||||
<include refid="selectMesSaleOrderVo"/>
|
||||
<where>
|
||||
<if test="erpId != null ">and erp_id = #{erpId}</if>
|
||||
<if test="fentryId != null ">and fentry_id = #{fentryId}</if>
|
||||
<if test="saleorderCode != null and saleorderCode != ''">and saleorder_code = #{saleorderCode}</if>
|
||||
<if test="saleorderLinenumber != null and saleorderLinenumber != ''">and saleorder_linenumber =
|
||||
#{saleorderLinenumber}
|
||||
</if>
|
||||
<if test="documentStatus != null and documentStatus != ''">and document_status = #{documentStatus}</if>
|
||||
<if test="factoryId != null ">and factory_id = #{factoryId}</if>
|
||||
<if test="prodlineId != null ">and prodline_id = #{prodlineId}</if>
|
||||
<if test="materialId != null ">and material_id = #{materialId}</if>
|
||||
<if test="materialCode != null and materialCode != ''">and material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''">and material_name like concat('%', #{materialName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="matkl != null and matkl != ''">and matkl = #{matkl}</if>
|
||||
<if test="orderAmount != null ">and order_amount = #{orderAmount}</if>
|
||||
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
|
||||
<if test="releaseQty != null ">and release_qty = #{releaseQty}</if>
|
||||
<if test="isRelease != null and isRelease != ''">and is_release = #{isRelease}</if>
|
||||
<if test="approveDate != null ">and approve_date = #{approveDate}</if>
|
||||
<if test="erpModifyDate != null ">and erp_modify_date = #{erpModifyDate}</if>
|
||||
<if test="planDeliveryDate != null ">and plan_delivery_date = #{planDeliveryDate}</if>
|
||||
<if test="beginDate != null ">and begin_date = #{beginDate}</if>
|
||||
<if test="endDate != null ">and end_date = #{endDate}</if>
|
||||
<if test="completeDate != null ">and complete_date = #{completeDate}</if>
|
||||
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesSaleOrderBySaleOrderId" parameterType="Long" resultMap="MesSaleOrderResult">
|
||||
<include refid="selectMesSaleOrderVo"/>
|
||||
where sale_order_id = #{saleOrderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesSaleOrder" parameterType="MesSaleOrder" useGeneratedKeys="true" keyProperty="saleOrderId">
|
||||
insert into mes_sale_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="erpId != null">erp_id,</if>
|
||||
<if test="fentryId != null">fentry_id,</if>
|
||||
<if test="saleorderCode != null">saleorder_code,</if>
|
||||
<if test="saleorderLinenumber != null">saleorder_linenumber,</if>
|
||||
<if test="documentStatus != null">document_status,</if>
|
||||
<if test="factoryId != null">factory_id,</if>
|
||||
<if test="prodlineId != null">prodline_id,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="matkl != null">matkl,</if>
|
||||
<if test="orderAmount != null">order_amount,</if>
|
||||
<if test="completeAmount != null">complete_amount,</if>
|
||||
<if test="releaseQty != null">release_qty,</if>
|
||||
<if test="isRelease != null">is_release,</if>
|
||||
<if test="approveDate != null">approve_date,</if>
|
||||
<if test="erpModifyDate != null">erp_modify_date,</if>
|
||||
<if test="planDeliveryDate != null">plan_delivery_date,</if>
|
||||
<if test="beginDate != null">begin_date,</if>
|
||||
<if test="endDate != null">end_date,</if>
|
||||
<if test="completeDate != null">complete_date,</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="erpId != null">#{erpId},</if>
|
||||
<if test="fentryId != null">#{fentryId},</if>
|
||||
<if test="saleorderCode != null">#{saleorderCode},</if>
|
||||
<if test="saleorderLinenumber != null">#{saleorderLinenumber},</if>
|
||||
<if test="documentStatus != null">#{documentStatus},</if>
|
||||
<if test="factoryId != null">#{factoryId},</if>
|
||||
<if test="prodlineId != null">#{prodlineId},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="matkl != null">#{matkl},</if>
|
||||
<if test="orderAmount != null">#{orderAmount},</if>
|
||||
<if test="completeAmount != null">#{completeAmount},</if>
|
||||
<if test="releaseQty != null">#{releaseQty},</if>
|
||||
<if test="isRelease != null">#{isRelease},</if>
|
||||
<if test="approveDate != null">#{approveDate},</if>
|
||||
<if test="erpModifyDate != null">#{erpModifyDate},</if>
|
||||
<if test="planDeliveryDate != null">#{planDeliveryDate},</if>
|
||||
<if test="beginDate != null">#{beginDate},</if>
|
||||
<if test="endDate != null">#{endDate},</if>
|
||||
<if test="completeDate != null">#{completeDate},</if>
|
||||
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesSaleOrder" parameterType="MesSaleOrder">
|
||||
update mes_sale_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="erpId != null">erp_id = #{erpId},</if>
|
||||
<if test="fentryId != null">fentry_id = #{fentryId},</if>
|
||||
<if test="saleorderCode != null">saleorder_code = #{saleorderCode},</if>
|
||||
<if test="saleorderLinenumber != null">saleorder_linenumber = #{saleorderLinenumber},</if>
|
||||
<if test="documentStatus != null">document_status = #{documentStatus},</if>
|
||||
<if test="factoryId != null">factory_id = #{factoryId},</if>
|
||||
<if test="prodlineId != null">prodline_id = #{prodlineId},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="matkl != null">matkl = #{matkl},</if>
|
||||
<if test="orderAmount != null">order_amount = #{orderAmount},</if>
|
||||
<if test="completeAmount != null">complete_amount = #{completeAmount},</if>
|
||||
<if test="releaseQty != null">release_qty = #{releaseQty},</if>
|
||||
<if test="isRelease != null">is_release = #{isRelease},</if>
|
||||
<if test="approveDate != null">approve_date = #{approveDate},</if>
|
||||
<if test="erpModifyDate != null">erp_modify_date = #{erpModifyDate},</if>
|
||||
<if test="planDeliveryDate != null">plan_delivery_date = #{planDeliveryDate},</if>
|
||||
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
||||
<if test="endDate != null">end_date = #{endDate},</if>
|
||||
<if test="completeDate != null">complete_date = #{completeDate},</if>
|
||||
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where sale_order_id = #{saleOrderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesSaleOrderBySaleOrderId" parameterType="Long">
|
||||
delete
|
||||
from mes_sale_order
|
||||
where sale_order_id = #{saleOrderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesSaleOrderBySaleOrderIds" parameterType="String">
|
||||
delete from mes_sale_order where sale_order_id in
|
||||
<foreach item="saleOrderId" collection="array" open="(" separator="," close=")">
|
||||
#{saleOrderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目信息列表
|
||||
export function listProjectinfo(query) {
|
||||
return request({
|
||||
url: '/mes/projectinfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目信息详细
|
||||
export function getProjectinfo(projectId) {
|
||||
return request({
|
||||
url: '/mes/projectinfo/' + projectId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增项目信息
|
||||
export function addProjectinfo(data) {
|
||||
return request({
|
||||
url: '/mes/projectinfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改项目信息
|
||||
export function updateProjectinfo(data) {
|
||||
return request({
|
||||
url: '/mes/projectinfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除项目信息
|
||||
export function delProjectinfo(projectId) {
|
||||
return request({
|
||||
url: '/mes/projectinfo/' + projectId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询采购订单信息列表
|
||||
export function listPurchaseOrder(query) {
|
||||
return request({
|
||||
url: '/mes/purchaseOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询采购订单信息详细
|
||||
export function getPurchaseOrder(purchaseOrderId) {
|
||||
return request({
|
||||
url: '/mes/purchaseOrder/' + purchaseOrderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增采购订单信息
|
||||
export function addPurchaseOrder(data) {
|
||||
return request({
|
||||
url: '/mes/purchaseOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改采购订单信息
|
||||
export function updatePurchaseOrder(data) {
|
||||
return request({
|
||||
url: '/mes/purchaseOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除采购订单信息
|
||||
export function delPurchaseOrder(purchaseOrderId) {
|
||||
return request({
|
||||
url: '/mes/purchaseOrder/' + purchaseOrderId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询销售订单信息列表
|
||||
export function listSaleOrder(query) {
|
||||
return request({
|
||||
url: '/mes/saleOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询销售订单信息详细
|
||||
export function getSaleOrder(saleOrderId) {
|
||||
return request({
|
||||
url: '/mes/saleOrder/' + saleOrderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增销售订单信息
|
||||
export function addSaleOrder(data) {
|
||||
return request({
|
||||
url: '/mes/saleOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改销售订单信息
|
||||
export function updateSaleOrder(data) {
|
||||
return request({
|
||||
url: '/mes/saleOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除销售订单信息
|
||||
export function delSaleOrder(saleOrderId) {
|
||||
return request({
|
||||
url: '/mes/saleOrder/' + saleOrderId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,500 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目编码" prop="projectNo">
|
||||
<el-input
|
||||
v-model="queryParams.projectNo"
|
||||
placeholder="请输入项目编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="单据状态" prop="documentStatus">-->
|
||||
<!-- <el-select v-model="queryParams.documentStatus" placeholder="请选择单据状态" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.document_status"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="禁用状态" prop="forbidStatus">-->
|
||||
<!-- <el-select v-model="queryParams.forbidStatus" placeholder="请选择禁用状态" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.forbid_status"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="计划开始日期" prop="beginDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.beginDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划结束日期" prop="endDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择项目状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['mes:projectinfo:add']"-->
|
||||
<!-- >新增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['mes:projectinfo:edit']"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['mes:projectinfo:remove']"-->
|
||||
<!-- >删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:projectinfo:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="projectinfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="主键标识" align="center" prop="projectId" v-if="columns[0].visible"/>
|
||||
<el-table-column label="ERP主键" align="center" prop="erpId" v-if="columns[1].visible"/>
|
||||
<el-table-column label="项目编码" align="center" prop="projectNo" v-if="columns[2].visible"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" v-if="columns[3].visible"/>
|
||||
<el-table-column label="单据状态" align="center" prop="documentStatus" v-if="columns[4].visible">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.document_status" :value="scope.row.documentStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="禁用状态" align="center" prop="forbidStatus" v-if="columns[5].visible">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.forbid_status" :value="scope.row.forbidStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核日期" align="center" prop="auditDate" width="180" v-if="columns[6].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.auditDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ERP最后修改日期" align="center" prop="erpModifyDate" width="180" v-if="columns[7].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.erpModifyDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划开始日期" align="center" prop="beginDate" width="180" v-if="columns[8].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划结束日期" align="center" prop="endDate" width="180" v-if="columns[9].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目状态" align="center" prop="orderStatus" v-if="columns[10].visible">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成日期" align="center" prop="completeDate" width="180" v-if="columns[11].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.completeDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[12].visible">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.active_flag" :value="scope.row.isFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" v-if="columns[13].visible"/>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['mes:projectinfo:edit']"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['mes:projectinfo:remove']"-->
|
||||
<!-- >删除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="ERP主键" prop="erpId">
|
||||
<el-input v-model="form.erpId" placeholder="请输入ERP主键"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编码" prop="projectNo">
|
||||
<el-input v-model="form.projectNo" placeholder="请输入项目编码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="form.projectName" placeholder="请输入项目名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="documentStatus">
|
||||
<el-select v-model="form.documentStatus" placeholder="请选择单据状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.document_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="禁用状态" prop="forbidStatus">
|
||||
<el-select v-model="form.forbidStatus" placeholder="请选择禁用状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.forbid_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核日期" prop="auditDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.auditDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择审核日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="ERP最后修改日期" prop="erpModifyDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.erpModifyDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择ERP最后修改日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开始日期" prop="beginDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.beginDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划结束日期" prop="endDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目状态" prop="orderStatus">
|
||||
<el-radio-group v-model="form.orderStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="完成日期" prop="completeDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.completeDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择完成日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否标识" prop="isFlag">
|
||||
<el-radio-group v-model="form.isFlag">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.active_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listProjectinfo,
|
||||
getProjectinfo,
|
||||
delProjectinfo,
|
||||
addProjectinfo,
|
||||
updateProjectinfo
|
||||
} from "@/api/mes/projectinfo";
|
||||
|
||||
export default {
|
||||
name: "Projectinfo",
|
||||
dicts: ['active_flag', 'order_status', 'document_status', 'forbid_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目信息表格数据
|
||||
projectinfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
erpId: null,
|
||||
projectNo: null,
|
||||
projectName: null,
|
||||
documentStatus: null,
|
||||
forbidStatus: null,
|
||||
auditDate: null,
|
||||
erpModifyDate: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
orderStatus: null,
|
||||
completeDate: null,
|
||||
isFlag: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
isFlag: [
|
||||
{required: true, message: "是否标识不能为空", trigger: "change"}
|
||||
],
|
||||
},
|
||||
columns: [
|
||||
{key: 0, label: `主键标识`, visible: false},
|
||||
{key: 1, label: `ERP主键`, visible: false},
|
||||
{key: 2, label: `项目编码`, visible: true},
|
||||
{key: 3, label: `项目名称`, visible: true},
|
||||
{key: 4, label: `单据状态`, visible: true},
|
||||
{key: 5, label: `禁用状态`, visible: true},
|
||||
{key: 6, label: `审核日期`, visible: true},
|
||||
{key: 7, label: `ERP最后修改日期`, visible: true},
|
||||
{key: 8, label: `计划开始日期`, visible: true},
|
||||
{key: 9, label: `计划结束日期`, visible: true},
|
||||
{key: 10, label: `项目状态`, visible: true},
|
||||
{key: 11, label: `完成日期`, visible: true},
|
||||
{key: 12, label: `是否标识`, visible: false},
|
||||
{key: 13, label: `备注`, visible: true},
|
||||
{key: 14, label: `创建人`, visible: true},
|
||||
{key: 15, label: `创建时间`, visible: true},
|
||||
{key: 16, label: `更新人`, visible: true},
|
||||
{key: 17, label: `更新时间`, visible: true},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProjectinfo(this.queryParams).then(response => {
|
||||
this.projectinfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
projectId: null,
|
||||
erpId: null,
|
||||
projectNo: null,
|
||||
projectName: null,
|
||||
documentStatus: null,
|
||||
forbidStatus: null,
|
||||
auditDate: null,
|
||||
erpModifyDate: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
orderStatus: null,
|
||||
completeDate: null,
|
||||
isFlag: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.projectId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加项目信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const projectId = row.projectId || this.ids
|
||||
getProjectinfo(projectId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.projectId != null) {
|
||||
updateProjectinfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectinfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const projectIds = row.projectId || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目信息编号为"' + projectIds + '"的数据项?').then(function () {
|
||||
return delProjectinfo(projectIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/projectinfo/export', {
|
||||
...this.queryParams
|
||||
}, `projectinfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,515 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="采购订单编号" prop="poNo">
|
||||
<el-input
|
||||
v-model="queryParams.poNo"
|
||||
placeholder="请输入采购订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="documentStatus">
|
||||
<el-select v-model="queryParams.documentStatus" placeholder="请选择单据状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.document_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料ID" prop="materialId">
|
||||
<el-input
|
||||
v-model="queryParams.materialId"
|
||||
placeholder="请输入物料ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['mes:purchaseOrder:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['mes:purchaseOrder:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['mes:purchaseOrder:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:purchaseOrder:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="purchaseOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键标识" align="center" prop="purchaseOrderId" v-if="columns[0].visible"/>
|
||||
<el-table-column label="ERP主键信息" align="center" prop="erpId" v-if="columns[1].visible"/>
|
||||
<el-table-column label="金蝶ERP订单明细ID" align="center" prop="fentryId" v-if="columns[2].visible"/>
|
||||
<el-table-column label="采购订单编号" align="center" prop="poNo" v-if="columns[3].visible"/>
|
||||
<el-table-column label="单据状态" align="center" prop="documentStatus" v-if="columns[4].visible" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.document_status" :value="scope.row.documentStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料ID" align="center" prop="materialId" v-if="columns[5].visible"/>
|
||||
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[6].visible"/>
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[7].visible"/>
|
||||
<el-table-column label="订单计划数量" align="center" prop="orderAmount" v-if="columns[8].visible"/>
|
||||
<el-table-column label="完成采购数量" align="center" prop="completeAmount" v-if="columns[9].visible"/>
|
||||
<el-table-column label="审核日期" align="center" prop="approveDate" width="180" v-if="columns[10].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.approveDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ERP最后修改日期" align="center" prop="erpModifyDate" width="180" v-if="columns[11].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.erpModifyDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划交货日期" align="center" prop="planDeliveryDate" width="180" v-if="columns[12].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.planDeliveryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划开始日期" align="center" prop="beginDate" width="180" v-if="columns[13].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划结束日期" align="center" prop="endDate" width="180" v-if="columns[14].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus" v-if="columns[15].visible" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成日期" align="center" prop="completeDate" width="180" v-if="columns[16].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.completeDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[17].visible" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.active_flag" :value="scope.row.isFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" v-if="columns[18].visible"/>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['mes:purchaseOrder:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['mes:purchaseOrder:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改采购订单信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="ERP主键信息" prop="erpId">
|
||||
<el-input v-model="form.erpId" placeholder="请输入ERP主键信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金蝶ERP订单明细ID" prop="fentryId">
|
||||
<el-input v-model="form.fentryId" placeholder="请输入金蝶ERP订单明细ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采购订单编号" prop="poNo">
|
||||
<el-input v-model="form.poNo" placeholder="请输入采购订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="documentStatus">
|
||||
<el-select v-model="form.documentStatus" placeholder="请选择单据状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.document_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料ID" prop="materialId">
|
||||
<el-input v-model="form.materialId" placeholder="请输入物料ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input v-model="form.materialCode" placeholder="请输入物料编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input v-model="form.materialName" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单计划数量" prop="orderAmount">
|
||||
<el-input v-model="form.orderAmount" placeholder="请输入订单计划数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="完成采购数量" prop="completeAmount">
|
||||
<el-input v-model="form.completeAmount" placeholder="请输入完成采购数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核日期" prop="approveDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.approveDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择审核日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="ERP最后修改日期" prop="erpModifyDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.erpModifyDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择ERP最后修改日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划交货日期" prop="planDeliveryDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.planDeliveryDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划交货日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开始日期" prop="beginDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.beginDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划结束日期" prop="endDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择计划结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-radio-group v-model="form.orderStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="完成日期" prop="completeDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.completeDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择完成日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否标识" prop="isFlag">
|
||||
<el-radio-group v-model="form.isFlag">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.active_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPurchaseOrder, getPurchaseOrder, delPurchaseOrder, addPurchaseOrder, updatePurchaseOrder } from "@/api/mes/purchaseOrder";
|
||||
|
||||
export default {
|
||||
name: "PurchaseOrder",
|
||||
dicts: ['active_flag', 'order_status', 'document_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 采购订单信息表格数据
|
||||
purchaseOrderList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
erpId: null,
|
||||
fentryId: null,
|
||||
poNo: null,
|
||||
documentStatus: null,
|
||||
materialId: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
orderAmount: null,
|
||||
completeAmount: null,
|
||||
approveDate: null,
|
||||
erpModifyDate: null,
|
||||
planDeliveryDate: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
orderStatus: null,
|
||||
completeDate: null,
|
||||
isFlag: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
materialCode: [
|
||||
{ required: true, message: "物料编码不能为空", trigger: "blur" }
|
||||
],
|
||||
orderAmount: [
|
||||
{ required: true, message: "订单计划数量不能为空", trigger: "blur" }
|
||||
],
|
||||
isFlag: [
|
||||
{ required: true, message: "是否标识不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
columns: [
|
||||
{ key: 0, label: `主键标识`, visible: true },
|
||||
{ key: 1, label: `ERP主键信息`, visible: true },
|
||||
{ key: 2, label: `金蝶ERP订单明细ID`, visible: true },
|
||||
{ key: 3, label: `采购订单编号`, visible: true },
|
||||
{ key: 4, label: `单据状态`, visible: true },
|
||||
{ key: 5, label: `物料ID`, visible: true },
|
||||
{ key: 6, label: `物料编码`, visible: true },
|
||||
{ key: 7, label: `物料名称`, visible: true },
|
||||
{ key: 8, label: `订单计划数量`, visible: true },
|
||||
{ key: 9, label: `完成采购数量`, visible: true },
|
||||
{ key: 10, label: `审核日期`, visible: true },
|
||||
{ key: 11, label: `ERP最后修改日期`, visible: true },
|
||||
{ key: 12, label: `计划交货日期`, visible: true },
|
||||
{ key: 13, label: `计划开始日期`, visible: true },
|
||||
{ key: 14, label: `计划结束日期`, visible: true },
|
||||
{ key: 15, label: `订单状态`, visible: true },
|
||||
{ key: 16, label: `完成日期`, visible: true },
|
||||
{ key: 17, label: `是否标识`, visible: true },
|
||||
{ key: 18, label: `备注`, visible: true },
|
||||
{ key: 19, label: `创建人`, visible: true },
|
||||
{ key: 20, label: `创建时间`, visible: true },
|
||||
{ key: 21, label: `更新人`, visible: true },
|
||||
{ key: 22, label: `更新时间`, visible: true },
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询采购订单信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPurchaseOrder(this.queryParams).then(response => {
|
||||
this.purchaseOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
purchaseOrderId: null,
|
||||
erpId: null,
|
||||
fentryId: null,
|
||||
poNo: null,
|
||||
documentStatus: null,
|
||||
materialId: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
orderAmount: null,
|
||||
completeAmount: null,
|
||||
approveDate: null,
|
||||
erpModifyDate: null,
|
||||
planDeliveryDate: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
orderStatus: null,
|
||||
completeDate: null,
|
||||
isFlag: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.purchaseOrderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加采购订单信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const purchaseOrderId = row.purchaseOrderId || this.ids
|
||||
getPurchaseOrder(purchaseOrderId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改采购订单信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.purchaseOrderId != null) {
|
||||
updatePurchaseOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPurchaseOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const purchaseOrderIds = row.purchaseOrderId || this.ids;
|
||||
this.$modal.confirm('是否确认删除采购订单信息编号为"' + purchaseOrderIds + '"的数据项?').then(function() {
|
||||
return delPurchaseOrder(purchaseOrderIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/purchaseOrder/export', {
|
||||
...this.queryParams
|
||||
}, `purchaseOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue