Merge remote-tracking branch 'origin/master' into aps_0918
This commit is contained in:
@@ -76,6 +76,11 @@ public class AutoCreateLubricate {
|
||||
if (num <= 3) {
|
||||
this.createMain(param);
|
||||
}
|
||||
// 周期为周 :当前日期-保养计划日期 <= 1 天时,新增保养单
|
||||
} else if (StrUtil.equals(maintenancecycle,"04")) {
|
||||
if (num <= 1) {
|
||||
this.createMain(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -114,6 +119,11 @@ public class AutoCreateLubricate {
|
||||
if (num >= 3) {
|
||||
this.createMain(param);
|
||||
}
|
||||
// 周期为日 :当前日期-保养实际结束 <= 1 天时,新增保养单
|
||||
} else if (StrUtil.equals(maintenancecycle,"04")) {
|
||||
if (num >= 1) {
|
||||
this.createMain(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,11 @@ public class AutoCreateRepair {
|
||||
if (num <= 3) {
|
||||
this.createRepair(param);
|
||||
}
|
||||
// 周期为日 : 维修计划日期 - 当前日期 <= 1 天时,新增维修单
|
||||
} else if (StrUtil.equals(maintenancecycle,"05")) {
|
||||
if (num <= 1) {
|
||||
this.createRepair(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -122,6 +127,11 @@ public class AutoCreateRepair {
|
||||
if (num >= 3) {
|
||||
this.createRepair(param);
|
||||
}
|
||||
// 周期为日 :当前日期-维修实际结束 <= 1 天时,新增维修单
|
||||
} else if (StrUtil.equals(maintenancecycle,"05")) {
|
||||
if (num >= 1) {
|
||||
this.createRepair(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,10 @@ public class AutoCreateSportCheck {
|
||||
if (num <= 3) {
|
||||
this.createMain(param);
|
||||
}
|
||||
} else if (StrUtil.equals(maintenancecycle,"04")) {
|
||||
if (num <= 1) {
|
||||
this.createMain(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -114,6 +118,10 @@ public class AutoCreateSportCheck {
|
||||
if (num >= 3) {
|
||||
this.createMain(param);
|
||||
}
|
||||
} else if (StrUtil.equals(maintenancecycle,"04")) {
|
||||
if (num >= 1) {
|
||||
this.createMain(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,10 @@ public class AutoCreateUpkeep {
|
||||
if (num <= 3) {
|
||||
this.createMain(param);
|
||||
}
|
||||
} else if (StrUtil.equals(maintenancecycle,"04")) {
|
||||
if (num <= 1) {
|
||||
this.createMain(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -114,6 +118,10 @@ public class AutoCreateUpkeep {
|
||||
if (num >= 3) {
|
||||
this.createMain(param);
|
||||
}
|
||||
} else if (StrUtil.equals(maintenancecycle,"04")) {
|
||||
if (num >= 1) {
|
||||
this.createMain(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,11 @@ public class DevicelubricateplanmstServiceImpl implements Devicelubricateplanmst
|
||||
Date next_end_date = DateUtil.offsetWeek(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
}else{
|
||||
}else if (maintenancecycle2.equals("04")) { // 日
|
||||
Date next_end_date = DateUtil.offsetDay(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
} else{
|
||||
jo.put("next_end_date","");
|
||||
ja2.add(jo);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,11 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
||||
Date next_end_date = DateUtil.offsetWeek(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
}else{
|
||||
}else if (maintenancecycle2.equals("05")) { // 日
|
||||
Date next_end_date = DateUtil.offsetDay(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
} else{
|
||||
jo.put("next_end_date","");
|
||||
ja2.add(jo);
|
||||
}
|
||||
|
||||
@@ -100,6 +100,10 @@ public class DevicesportcheckplanmstServiceImpl implements Devicesportcheckplanm
|
||||
Date next_end_date = DateUtil.offsetWeek(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
}else if (maintenancecycle2.equals("04")) { // 日
|
||||
Date next_end_date = DateUtil.offsetDay(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
}else{
|
||||
jo.put("next_end_date","");
|
||||
ja2.add(jo);
|
||||
|
||||
@@ -100,7 +100,11 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
Date next_end_date = DateUtil.offsetWeek(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
}else{
|
||||
} else if (maintenancecycle2.equals("04")) { // 日
|
||||
Date next_end_date = DateUtil.offsetDay(real_end_date2,1);
|
||||
jo.put("next_end_date", DateUtil.formatDate(next_end_date));
|
||||
ja2.add(jo);
|
||||
} else{
|
||||
jo.put("next_end_date","");
|
||||
ja2.add(jo);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
package org.nl.wms.masterdata_manage.controller.em;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.jsonwebtoken.lang.Assert;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.device_manage.service.userdevice.dto.DeviceUserQuery;
|
||||
import org.nl.wms.masterdata_manage.service.em.EmBiRepairDeviceService;
|
||||
import org.nl.wms.masterdata_manage.service.em.dao.EmBiRepairDevice;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Liu xy
|
||||
* @date 2022-05-26
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "维修人与设备档案维护")
|
||||
@RequestMapping("/api/embirepairdevice")
|
||||
@Slf4j
|
||||
public class EmBiRepairDeviceController {
|
||||
|
||||
@Autowired
|
||||
private EmBiRepairDeviceService emBiRepairDeviceService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询人员设备维护")
|
||||
public ResponseEntity<Object> query(DeviceUserQuery query, PageQuery page){
|
||||
Page<Object> result = PageHelper.startPage(page.getPage() + 1, page.getSize());
|
||||
List<Map> list = emBiRepairDeviceService.queryAll(query);
|
||||
TableDataInfo build = TableDataInfo.build(list);
|
||||
build.setTotalElements(result.getTotal());
|
||||
return new ResponseEntity<>(build,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/device")
|
||||
@Log("查询设备")
|
||||
//("查询设备")
|
||||
public ResponseEntity<Object> device(DeviceUserQuery query, PageQuery page){
|
||||
Page<Object> result = PageHelper.startPage(page.getPage() + 1, page.getSize());
|
||||
List<Map> list = emBiRepairDeviceService.queryAllDevice(query);
|
||||
TableDataInfo build = TableDataInfo.build(list);
|
||||
build.setTotalElements(result.getTotal());
|
||||
return new ResponseEntity<>(build,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增人员设备维护")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject entity){
|
||||
Assert.notNull(entity,"请求参数不能为空");
|
||||
|
||||
EmBiRepairDevice one = emBiRepairDeviceService.getOne(
|
||||
new QueryWrapper<EmBiRepairDevice>().lambda()
|
||||
.eq(EmBiRepairDevice::getUser_id, entity.getString("user_id"))
|
||||
.eq(EmBiRepairDevice::getDevice_code, entity.getString("device_code"))
|
||||
);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(one)) throw new BadRequestException("设备重复");
|
||||
|
||||
EmBiRepairDevice emBiRepairDevice = entity.toJavaObject(EmBiRepairDevice.class);
|
||||
emBiRepairDevice.setPerson_id(IdUtil.getStringId());
|
||||
emBiRepairDeviceService.save(emBiRepairDevice);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改人员设备维护")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject entity){
|
||||
|
||||
EmBiRepairDevice one = emBiRepairDeviceService.getOne(
|
||||
new QueryWrapper<EmBiRepairDevice>().lambda()
|
||||
.eq(EmBiRepairDevice::getUser_id, entity.getString("user_id"))
|
||||
.eq(EmBiRepairDevice::getDevice_code, entity.getString("device_code"))
|
||||
);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(one)) throw new BadRequestException("设备重复");
|
||||
|
||||
EmBiRepairDevice emBiRepairDevice = emBiRepairDeviceService.getById(entity.getString("person_id"));
|
||||
emBiRepairDevice.setDevice_code(entity.getString("device_code"));
|
||||
emBiRepairDeviceService.updateById(emBiRepairDevice);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
|
||||
@Log("删除人员设备维护")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||
if (ids != null && ids.length>0){
|
||||
emBiRepairDeviceService.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,8 +9,10 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.wms.masterdata_manage.service.master.IMdPbMeasureunitService;
|
||||
import org.nl.wms.masterdata_manage.service.master.dao.MdPbMeasureunit;
|
||||
import org.nl.wms.masterdata_manage.service.master.dto.UnitQuery;
|
||||
@@ -22,7 +24,9 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author loujf
|
||||
@@ -45,6 +49,17 @@ public class MdPbMeasureunitController {
|
||||
return new ResponseEntity<>(measureunitService.pageQuery(query, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/select")
|
||||
@Log("查询单位下拉列表设备")
|
||||
public ResponseEntity<Object> selectAll(){
|
||||
List<MdPbMeasureunit> list = measureunitService.list();
|
||||
List<Map> result = new ArrayList<>();
|
||||
for (MdPbMeasureunit item : list) {
|
||||
result.add(MapOf.of("label",item.getUnit_name(),"value",item.getMeasure_unit_id()));
|
||||
}
|
||||
return new ResponseEntity<>(TableDataInfo.build(result),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@Log("新增计量单位")
|
||||
//("新增计量单位")
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.wms.masterdata_manage.service.em;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.device_manage.service.userdevice.dto.DeviceUserQuery;
|
||||
import org.nl.wms.masterdata_manage.service.em.dao.EmBiRepairDevice;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 人员设备关系表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-06-06
|
||||
*/
|
||||
public interface EmBiRepairDeviceService extends IService<EmBiRepairDevice> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
List<Map> queryAll(DeviceUserQuery whereJson);
|
||||
|
||||
List<Map> queryAllDevice(DeviceUserQuery whereJson);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.nl.wms.masterdata_manage.service.em.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 人员设备关系表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-06-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("em_bi_repairpersondevice")
|
||||
public class EmBiRepairDevice implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private String person_id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String user_id;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String device_code;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.masterdata_manage.service.em.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.device_manage.service.userdevice.dto.DeviceUserQuery;
|
||||
import org.nl.wms.masterdata_manage.service.em.dao.EmBiRepairDevice;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 人员设备关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-06-06
|
||||
*/
|
||||
public interface EmBiRepairDeviceMapper extends BaseMapper<EmBiRepairDevice> {
|
||||
|
||||
List<Map> queryAll(@Param("query") DeviceUserQuery query);
|
||||
|
||||
List<Map> queryAllDevice(@Param("query") DeviceUserQuery query);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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="org.nl.wms.masterdata_manage.service.em.dao.mapper.EmBiRepairDeviceMapper">
|
||||
|
||||
<select id="queryAll" resultType="java.util.Map">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sys_user
|
||||
<where>
|
||||
is_used = '1'
|
||||
<if test="query.username != null and query.username != ''">
|
||||
and username = #{query.username}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryAllDevice" resultType="java.util.Map">
|
||||
SELECT
|
||||
device.device_code,
|
||||
device.device_name,
|
||||
use1.person_name,
|
||||
mps.person_id
|
||||
FROM
|
||||
em_bi_repairpersondevice mps
|
||||
LEFT JOIN em_bi_equipmentfile device ON device.device_code = mps.device_code
|
||||
LEFT JOIN sys_user use1 ON use1.user_id = mps.user_id
|
||||
<where>
|
||||
mps.user_id = #{query.user_id}
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.nl.wms.masterdata_manage.service.em.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.device_manage.service.userdevice.dto.DeviceUserQuery;
|
||||
import org.nl.wms.masterdata_manage.service.em.EmBiRepairDeviceService;
|
||||
import org.nl.wms.masterdata_manage.service.em.dao.EmBiRepairDevice;
|
||||
import org.nl.wms.masterdata_manage.service.em.dao.mapper.EmBiRepairDeviceMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 人员设备关系表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-06-06
|
||||
*/
|
||||
@Service
|
||||
public class EmBiRepairDeviceServiceImpl extends ServiceImpl<EmBiRepairDeviceMapper, EmBiRepairDevice> implements EmBiRepairDeviceService {
|
||||
|
||||
@Override
|
||||
public List<Map> queryAll(DeviceUserQuery query) {
|
||||
return this.baseMapper.queryAll(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> queryAllDevice(DeviceUserQuery query) {
|
||||
return this.baseMapper.queryAllDevice(query);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.nl.wms.masterdata_manage.storage.controller.dailyStructivt;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.IStIvtStructivtDailyService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dto.DailyStructivtQuery;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dto.SectattrQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 日库存统计表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/structivtDaily")
|
||||
@SaIgnore
|
||||
public class StIvtStructivtDailyController {
|
||||
|
||||
@Autowired
|
||||
private IStIvtStructivtDailyService stIvtStructivtDailyService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询日库区")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> query(DailyStructivtQuery query, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(stIvtStructivtDailyService.page(page.build(),query.build())),HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/sync")
|
||||
@Log("同步日库区")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> sync(String[] structivts){
|
||||
stIvtStructivtDailyService.dailyStructivt(structivts);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.masterdata_manage.storage.service.dailyStructivt;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.StIvtStructivtDaily;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 日库存统计表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
public interface IStIvtStructivtDailyService extends IService<StIvtStructivtDaily> {
|
||||
|
||||
/**
|
||||
* 统计日常数据
|
||||
*/
|
||||
void dailyStructivt(String...structivts);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 日库存统计表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_structivt_daily")
|
||||
public class StIvtStructivtDaily implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 库存记录标识
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 仓库标识
|
||||
*/
|
||||
private String stor_id;
|
||||
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String stor_name;
|
||||
|
||||
/**
|
||||
* 库区标识
|
||||
*/
|
||||
private String sect_id;
|
||||
/**
|
||||
* 库区名称
|
||||
*/
|
||||
private String sect_name;
|
||||
|
||||
/**
|
||||
* 仓库表
|
||||
*/
|
||||
private String table_name;
|
||||
|
||||
/**
|
||||
* 车间标识
|
||||
*/
|
||||
private String product_area;
|
||||
|
||||
/**
|
||||
* 货位集合
|
||||
*/
|
||||
private String struct_code;
|
||||
|
||||
/**
|
||||
* 计量单位标识
|
||||
*/
|
||||
private String qty_unit_id;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_spec;
|
||||
|
||||
/**
|
||||
* 可用数
|
||||
*/
|
||||
private BigDecimal canuse_qty;
|
||||
|
||||
/**
|
||||
* 冻结数
|
||||
*/
|
||||
private BigDecimal frozen_qty;
|
||||
|
||||
/**
|
||||
* 库存数
|
||||
*/
|
||||
private BigDecimal ivt_qty;
|
||||
|
||||
/**
|
||||
* 待入数
|
||||
*/
|
||||
private BigDecimal warehousing_qty;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.StIvtStructivtDaily;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 日库存统计表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
public interface StIvtStructivtDailyMapper extends BaseMapper<StIvtStructivtDaily> {
|
||||
|
||||
@Select("SELECT #{table} AS table_name,GROUP_CONCAT(a.struct_code) struct_code, 'A1' AS product_area, st_ivt_structattr.stor_id,st_ivt_structattr.stor_name , st_ivt_structattr.sect_id,st_ivt_structattr.sect_name , UUID_SHORT( ) id,a.material_id,md_me_materialbase.material_code,md_me_materialbase.material_spec, sum( canuse_qty ) canuse_qty, sum( frozen_qty ) frozen_qty, sum( ivt_qty ) ivt_qty, sum( warehousing_qty ) warehousing_qty, qty_unit_id, CURDATE( ) create_time FROM ${table} as a left join st_ivt_structattr on a.struct_code = st_ivt_structattr.struct_code left join md_me_materialbase on a.material_id = md_me_materialbase.material_id GROUP BY material_id")
|
||||
List<Map> selectStructivt(@Param("table") String table);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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="org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.mapper.StIvtStructivtDailyMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.StIvtStructivtDaily;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/14 17:13
|
||||
*/
|
||||
@Data
|
||||
public class DailyStructivtQuery extends BaseQuery<StIvtStructivtDaily> {
|
||||
|
||||
|
||||
private String stor_id;
|
||||
private String sect_id;
|
||||
private String struct_code;
|
||||
private String blurry;
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("blurry", QParam.builder().k(new String[]{"material_code","material_spec"}).type(QueryTEnum.ORLK).build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.nl.wms.masterdata_manage.storage.service.dailyStructivt.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.IStIvtStructivtDailyService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.StIvtStructivtDaily;
|
||||
import org.nl.wms.masterdata_manage.storage.service.dailyStructivt.dao.mapper.StIvtStructivtDailyMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 日库存统计表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-09-18
|
||||
*/
|
||||
@Service
|
||||
public class StIvtStructivtDailyServiceImpl extends ServiceImpl<StIvtStructivtDailyMapper, StIvtStructivtDaily> implements IStIvtStructivtDailyService {
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void dailyStructivt(String... structivts) {
|
||||
if (structivts.length == 0){
|
||||
return;
|
||||
}
|
||||
ArrayList<StIvtStructivtDaily> list = new ArrayList<>();
|
||||
for (String structivt : structivts) {
|
||||
List<Map> maps = this.baseMapper.selectStructivt(structivt);
|
||||
if (!CollectionUtils.isEmpty(maps)){
|
||||
List<StIvtStructivtDaily> dailyList = JSONArray.parseArray(JSON.toJSONString(maps), StIvtStructivtDaily.class);
|
||||
list.addAll(dailyList);
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
List<StIvtStructivtDaily> errorData = list.stream().filter(stIvtStructivtDaily -> StringUtils.isEmpty(stIvtStructivtDaily.getStor_id()) || StringUtils.isEmpty(stIvtStructivtDaily.getMaterial_id())).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(errorData)){
|
||||
throw new BadRequestException("表存在异常数据没有仓库跟物料信息:"+errorData
|
||||
.stream()
|
||||
.map(stIvtStructivtDaily-> stIvtStructivtDaily.getTable_name()+".仓位:"+stIvtStructivtDaily.getStruct_code()+".物料"+stIvtStructivtDaily.getMaterial_id())
|
||||
.distinct().collect(Collectors.joining(",")));
|
||||
}
|
||||
Set<String> collect = list.stream().map(StIvtStructivtDaily::getStor_id).collect(Collectors.toSet());
|
||||
this.remove(new QueryWrapper<StIvtStructivtDaily>().in("stor_id",collect).eq("create_time", DateUtil.now()));
|
||||
this.saveBatch(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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="org.nl.wms.masterdata_manage.storage.service.storage.dao.mapper.StIvtStructivtDailyMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -134,8 +134,8 @@ public class QlTestInspectionsheetmstServiceImpl extends ServiceImpl<QlTestInspe
|
||||
ylmst.put("total_qty",mst.getQty());
|
||||
ylmst.put("detail_count",1);
|
||||
ylmst.put("stor_id",IOSEnum.STOR_CODE.code("原材料仓"));
|
||||
ylmst.put("bill_type",IOSEnum.BILL_TYPE.code("手工入库"));
|
||||
ylmst.put("buss_type",IOSEnum.BILL_TYPE.code("手工入库"));
|
||||
ylmst.put("bill_type",IOSEnum.BILL_TYPE.code("采购入库"));
|
||||
ylmst.put("buss_type",IOSEnum.BILL_TYPE.code("采购入库"));
|
||||
ylmst.put("biz_date",DateUtil.today());
|
||||
ylmst.put("tableData",tableData);
|
||||
iostorinvYlService.create(ylmst);
|
||||
|
||||
@@ -37,9 +37,11 @@ public enum IOSEnum {
|
||||
//锁定类型
|
||||
LOCK_TYPE(MapOf.of("未锁定", "0", "入库锁", "1", "出库锁", "2","盘点锁", "3","损溢锁", "4","拼盘锁","5","移库锁","10","其他锁","99")),
|
||||
// 海柔半成品出入库类型
|
||||
BILL_TYPE_HR(MapOf.of("生产出库", "1001", "盘点出库", "1002", "手工出库", "1009","生产入库","0001")),
|
||||
BILL_TYPE_HR(MapOf.of("生产出库", "1001", "盘点出库", "1002", "手工出库", "1009","生产入库","0001","手工入库", "0009")),
|
||||
// 半成品出入类型
|
||||
BILL_TYPE_BCP(MapOf.of("清洗入库", "0001", "手工入库", "0009","生产出库","1001","手工出库","1009")),
|
||||
|
||||
ST_INV_CP_TYPE(MapOf.of("生产出库", "1001", "盘点出库", "1002", "移库出库", "1003","手工出库", "1009","生产入库","0001","移库入库","0003","手工入库", "0009")),
|
||||
;
|
||||
private Map<String, String> code;
|
||||
|
||||
|
||||
@@ -284,7 +284,8 @@ public class StIvtMoveinvCpServiceImpl extends ServiceImpl<StIvtMoveinvCpMapper,
|
||||
ivtOutParam.put("sale_id", dtl.getSale_id());
|
||||
ivtOutParam.put("bill_code",mst.getBill_code());
|
||||
ivtOutParam.put("inv_id",mst.getMoveinv_id());
|
||||
ivtOutParam.put("bill_type_scode",mst.getBill_type());
|
||||
ivtOutParam.put("bill_type_scode",IOSEnum.ST_INV_CP_TYPE.code("移库出库"));
|
||||
ivtOutParam.put("stor_id",mst.getStor_id());
|
||||
iStIvtStructivtCpService.UpdateIvt(ivtOutParam);
|
||||
//加入库
|
||||
JSONObject ivtInParam = new JSONObject();
|
||||
@@ -298,7 +299,8 @@ public class StIvtMoveinvCpServiceImpl extends ServiceImpl<StIvtMoveinvCpMapper,
|
||||
ivtInParam.put("sale_id", dtl.getSale_id());
|
||||
ivtInParam.put("bill_code",mst.getBill_code());
|
||||
ivtInParam.put("inv_id",mst.getMoveinv_id());
|
||||
ivtInParam.put("bill_type_scode",mst.getBill_type());
|
||||
ivtInParam.put("bill_type_scode",IOSEnum.ST_INV_CP_TYPE.code("移库入库"));
|
||||
ivtInParam.put("product_area",mst.getProduct_area());
|
||||
iStIvtStructivtCpService.UpdateIvt(ivtInParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
package org.nl.wms.storage_manage.rawmanage.controller.structIvt;
|
||||
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.device_manage.ios.service.structIvt.dto.StructIvtEmQuery;
|
||||
import org.nl.wms.storage_manage.productmanage.util.ChangeIvtUtil;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.iostorInv.IStIvtIostorinvOutYlService;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.IStIvtStructivtYlService;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dao.StIvtStructivtYl;
|
||||
import org.nl.wms.storage_manage.rawmanage.service.structIvt.dto.StructIvtYLQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -29,31 +36,29 @@ public class StIvtStructivtYlController {
|
||||
|
||||
@Autowired
|
||||
private IStIvtStructivtYlService structivtYlService;
|
||||
@Autowired
|
||||
private IStIvtIostorinvOutYlService iostorinvOutYlService;
|
||||
|
||||
@GetMapping("/getRawIvt")
|
||||
@Log("查询可用的原料库存")
|
||||
//("查询可用的原料库存")
|
||||
public ResponseEntity<Object> getRawIvt(StructIvtYLQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(structivtYlService.getRawIvt(query, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getProductIvt")
|
||||
@Log("查询可用的成品库存")
|
||||
//("查询可用的成品库存")
|
||||
public ResponseEntity<Object> getProductIvt(StructIvtYLQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(structivtYlService.getProductIvt(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getStructIvt")
|
||||
@Log("查询库存")
|
||||
//("查询库存")
|
||||
public ResponseEntity<Object> getStructIvt(StructIvtYLQuery query) {
|
||||
return new ResponseEntity<>(structivtYlService.getStructIvt(query), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getSemiProductIvt")
|
||||
@Log("查询可用的半成品库存")
|
||||
//("查询可用的半成品库存")
|
||||
public ResponseEntity<Object> getSemiProductIvt(StructIvtYLQuery query) {
|
||||
return new ResponseEntity<>(structivtYlService.getSemiProductIvt(query), HttpStatus.OK);
|
||||
}
|
||||
@@ -61,16 +66,22 @@ public class StIvtStructivtYlController {
|
||||
|
||||
@GetMapping("/getSemiProductIvt2")
|
||||
@Log("查询可用的半成品库存")
|
||||
//("查询可用的半成品库存")
|
||||
public ResponseEntity<Object> getSemiProductIvt2(StructIvtYLQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(structivtYlService.getSemiProductIvt(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getAllRawIvt")
|
||||
@Log("查询原料库存")
|
||||
//("查询原料库存")
|
||||
public ResponseEntity<Object> getAllRawIvt(StructIvtYLQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(structivtYlService.getAllRawIvt(query, page), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/update")
|
||||
@Log("更新原料库存")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject form) {
|
||||
|
||||
iostorinvOutYlService.updateIvt(form);
|
||||
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,4 +63,10 @@ public interface IStIvtIostorinvOutYlService extends IService<StIvtIostorinvYl>
|
||||
*/
|
||||
void confirm(JSONObject form);
|
||||
|
||||
/**
|
||||
* 手动修改库存
|
||||
* @param form
|
||||
*/
|
||||
void updateIvt(JSONObject form);
|
||||
|
||||
}
|
||||
|
||||
@@ -299,4 +299,35 @@ public class StIvtIostorinvOutYlServiceImpl extends ServiceImpl<StIvtIostorinvOu
|
||||
|
||||
return stIvtIostorinvYl;
|
||||
}
|
||||
|
||||
//aps_sale_type"I"canuse_qty660class_name"紫铜管件S"frozen_qty0instorage_time"2023-09-13 17:29:55"is_activetrueivt_level"1"ivt_qty660material_code"24010638S"material_id"1684134849134333952"material_name"三通\\T7/8墨西哥\\MSNA0201002"pcsn"2023-09-13"qty_unit_id"1"qty_unit_name"KG"quality_scode"01"sect_code"RCK001"sect_id"1528631043903590400"sect_name"原材料区"stockrecord_id"1701890944963579904"stor_id"1528627964823080960"stor_name"紫铜原材料仓库"struct_code"YCL001"struct_id"1528636861080276992"struct_name"原材料仓位"warehousing_qty0
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateIvt(JSONObject form) {
|
||||
StIvtStructivtYl ivt = structivtYlService.getOne(new QueryWrapper<StIvtStructivtYl>()
|
||||
.eq("material_id", form.getString("material_id"))
|
||||
.eq("stor_id", form.getString("stor_id"))
|
||||
.eq("canuse_qty", form.getBigDecimal("old_qty"))
|
||||
);
|
||||
if (ivt==null){
|
||||
throw new BadRequestException("当前物料库存已变更,请重新操作");
|
||||
}
|
||||
double change_qty = NumberUtil.sub(form.getBigDecimal("ivt_qty"),form.getBigDecimal("old_qty")).doubleValue();
|
||||
if (change_qty==0){
|
||||
return;
|
||||
}
|
||||
ivt.setCanuse_qty(form.getBigDecimal("ivt_qty"));
|
||||
ivt.setIvt_qty(ivt.getCanuse_qty());
|
||||
structivtYlService.updateById(ivt);
|
||||
// 插入库存变动记
|
||||
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivt));
|
||||
param.put("change_type", change_qty>0?ChangeIvtUtil.SUBWAREHOUSING_ADDIVT_QTY:ChangeIvtUtil.SUBFROZEN_SUBIVT_QTY);
|
||||
param.put("change_qty",Math.abs(change_qty));
|
||||
param.put("result_qty", form.getBigDecimal("ivt_qty"));
|
||||
param.put("bill_code","");
|
||||
param.put("inv_id","");
|
||||
param.put("bill_type_scode","");
|
||||
iStIvtStructivtflowYlService.insetIvtChange(param);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ public class StIvtIostorinvYlServiceImpl extends ServiceImpl<StIvtIostorinvYlMap
|
||||
if (ObjectUtil.isNotEmpty(structivtYl)) {
|
||||
structivtYl.setCanuse_qty(NumberUtil.add(structivtYl.getCanuse_qty(), dis.getPlan_qty()));
|
||||
structivtYl.setIvt_qty(structivtYl.getCanuse_qty());
|
||||
structivtYl.setInstorage_time(DateUtil.now());
|
||||
structivtYlService.updateById(structivtYl);
|
||||
|
||||
// 插入库存变动记录
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
and sa.stor_id = #{query.stor_id}
|
||||
</if>
|
||||
</where>
|
||||
order by instorage_time desc
|
||||
</select>
|
||||
|
||||
<select id="getProductIvt" resultType="java.util.Map">
|
||||
|
||||
@@ -324,7 +324,7 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
||||
mst.setPcsn(StringUtils.isNotEmpty(form.getString("pcsn")) ? form.getString("pcsn") : DateUtil.today());
|
||||
mst.setPlan_qty(stIvtStructivtBcp.getCanuse_qty());
|
||||
mst.setQuality_scode(stIvtStructivtBcp.getQuality_scode());
|
||||
mst.setQty_unit_id(stIvtStructivtBcp.getQty_unit_id());
|
||||
mst.setQty_unit_id("2");
|
||||
mst.setBase_bill_code("");
|
||||
mst.setQty_unit_name(" ");
|
||||
mst.setUnit_weight(material.getNet_weight());
|
||||
|
||||
@@ -219,7 +219,7 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
||||
.pcsn(DateUtil.today())
|
||||
.ivt_level(IVTEnum.IVT_LEVEL.code("一级"))
|
||||
.is_active(true)
|
||||
.qty_unit_id(mdMeMaterialbase.getBase_unit_id())
|
||||
.qty_unit_id("2")
|
||||
.instorage_time(DateUtil.now())
|
||||
.stor_id(form.getString("stor_id"))
|
||||
.canuse_qty(form.getBigDecimal("qty"))
|
||||
@@ -273,7 +273,7 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
|
||||
.pcsn(mst.getPcsn())
|
||||
.ivt_level(mst.getIvt_level())
|
||||
.is_active(mst.getIs_active())
|
||||
.qty_unit_id(mst.getQty_unit_id())
|
||||
.qty_unit_id("2")
|
||||
.instorage_time(DateUtil.now())
|
||||
.stor_id(mst.getStor_id())
|
||||
.canuse_qty(mst.getPlan_qty())
|
||||
|
||||
@@ -288,7 +288,7 @@ public class StIvtMoveinvBcpServiceImpl extends ServiceImpl<StIvtMoveinvBcpMappe
|
||||
.pcsn(dtl.getPcsn())
|
||||
.ivt_level(dtl.getIvt_level())
|
||||
.is_active(dtl.getIs_active())
|
||||
.qty_unit_id(dtl.getQty_unit_id())
|
||||
.qty_unit_id("2")
|
||||
.instorage_time(DateUtil.now())
|
||||
.stor_id(mst.getStor_id())
|
||||
.canuse_qty(dtl.getQty())
|
||||
|
||||
@@ -235,7 +235,7 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
||||
.ivt_level(dtl.getIvt_level())
|
||||
.is_active(dtl.getIs_active())
|
||||
.canuse_qty(mol_qty)
|
||||
.qty_unit_id(dtl.getQty_unit_id())
|
||||
.qty_unit_id("2")
|
||||
.instorage_time(DateUtil.now())
|
||||
.stor_id(mst.getStor_id())
|
||||
.workshop_id(mst.getProduct_area())
|
||||
|
||||
@@ -72,9 +72,21 @@ public class StIvtStructivtBcp implements Serializable {
|
||||
* 库存数
|
||||
*/
|
||||
private BigDecimal canuse_qty;
|
||||
/**
|
||||
* 库存数
|
||||
*/
|
||||
private BigDecimal frozen_qty;
|
||||
/**
|
||||
* 库存数
|
||||
*/
|
||||
private BigDecimal ivt_qty;
|
||||
/**
|
||||
* 库存数
|
||||
*/
|
||||
private BigDecimal warehousing_qty;
|
||||
|
||||
/**
|
||||
* 计量单位标识
|
||||
* 计量单位标识:2/g
|
||||
*/
|
||||
private String qty_unit_id;
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ public class StIvtIostorinvHrBcpOutServiceImpl extends ServiceImpl<StIvtIostorin
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,form.getString("storagevehicle_code"))
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ public class StIvtIostorinvHrBcpOutServiceImpl extends ServiceImpl<StIvtIostorin
|
||||
mst.setPcsn(StringUtils.isNotEmpty(form.getString("pcsn")) ? form.getString("pcsn") : DateUtil.today());
|
||||
mst.setPlan_qty(stIvtStructivtBcp.getCanuse_qty());
|
||||
mst.setQuality_scode(stIvtStructivtBcp.getQuality_scode());
|
||||
mst.setQty_unit_id(stIvtStructivtBcp.getQty_unit_id());
|
||||
mst.setQty_unit_id("2");
|
||||
mst.setBase_bill_code("");
|
||||
mst.setQty_unit_name(" ");
|
||||
mst.setUnit_weight(material.getNet_weight());
|
||||
|
||||
24
mes/hd/nladmin-system/src/main/resources/sql/日库存.sql
Normal file
24
mes/hd/nladmin-system/src/main/resources/sql/日库存.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE `st_ivt_structivt_daily` (
|
||||
`id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '库存记录标识',
|
||||
`stor_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '仓库标识',
|
||||
`struct_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '仓位标识',
|
||||
`struct_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '仓位编码',
|
||||
`struct_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '仓位名称',
|
||||
`material_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '物料标识',
|
||||
`canuse_qty` decimal(18,6) NOT NULL DEFAULT '0.000000' COMMENT '可用数',
|
||||
`frozen_qty` decimal(18,6) DEFAULT '0.000000' COMMENT '冻结数',
|
||||
`ivt_qty` decimal(18,6) NOT NULL DEFAULT '0.000000' COMMENT '库存数',
|
||||
`warehousing_qty` decimal(18,6) DEFAULT '0.000000' COMMENT '待入数',
|
||||
`qty_unit_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '计量单位标识',
|
||||
`create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '创建时间',
|
||||
`product_area` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT '车间标识',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin COMMENT='日库存统计表';
|
||||
|
||||
ALTER TABLE st_ivt_structivt_bcp
|
||||
ADD COLUMN `frozen_qty` decimal(18,3) DEFAULT '0.000' COMMENT '冻结数',
|
||||
ADD COLUMN `ivt_qty` decimal(18,3) NOT NULL DEFAULT '0.000' COMMENT '库存数',
|
||||
ADD COLUMN `warehousing_qty` decimal(18,3) DEFAULT '0.000' COMMENT '待入数';
|
||||
-- CP移库类型
|
||||
INSERT INTO `hl_one_mes`.`sys_dict`(`dict_id`, `code`, `name`, `label`, `value`, `dict_sort`, `dict_type`, `para1`, `para2`, `para3`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`) VALUES ('1703954832731279360', 'ST_INV_CP_IN_TYPE', '成品入库单据类型', '移库入库', '0003', 3, NULL, NULL, NULL, NULL, '1694303357524643840', '管理员', '2023-09-19 10:11:04', '1694303357524643840', '管理员', '2023-09-19 10:11:04');
|
||||
INSERT INTO `hl_one_mes`.`sys_dict`(`dict_id`, `code`, `name`, `label`, `value`, `dict_sort`, `dict_type`, `para1`, `para2`, `para3`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`) VALUES ('1703955348920078336', 'ST_INV_CP_OUT_TYPE', '成品出库单据类型', '移库出库', '1003', 3, NULL, NULL, NULL, NULL, '1694303357524643840', '管理员', '2023-09-19 10:13:07', '1694303357524643840', '管理员', '2023-09-19 10:13:16');
|
||||
@@ -31,5 +31,11 @@ export function getUnit(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getSelect() {
|
||||
return request({
|
||||
url: 'api/mdPbMeasureunit/select',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getUnit }
|
||||
export default { add, edit, del, getUnit, getSelect }
|
||||
|
||||
@@ -445,7 +445,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
debugger
|
||||
|
||||
this.crud.delAllLoading = true
|
||||
this.crud.doDelete(datas)
|
||||
}).catch(() => {
|
||||
@@ -583,7 +583,7 @@ export default {
|
||||
},
|
||||
// 切换部门
|
||||
handleNodeClick(data) {
|
||||
debugger
|
||||
|
||||
this.query.dept_id = data.dept_id
|
||||
this.query.needAll = true
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -315,7 +315,7 @@ export default {
|
||||
})
|
||||
},
|
||||
inv_typeFormat(row) {
|
||||
debugger
|
||||
|
||||
if (row.invcode.includes('WXD')) {
|
||||
return this.dict.label.EM_DEVICE_WX_INVTYPE[row.invtype]
|
||||
} else {
|
||||
|
||||
@@ -144,7 +144,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
|
||||
const data = {
|
||||
'repair_id': this.form.repair_id
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
|
||||
const data = {
|
||||
'maint_id': this.form.maint_id
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ export default {
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
debugger
|
||||
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
|
||||
@@ -360,7 +360,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.sect_id = val[0]
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
const data = this.form1
|
||||
if (data.maint_plan_name === null) {
|
||||
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -196,7 +196,7 @@ export default {
|
||||
this.openBom = row
|
||||
},
|
||||
tableChanged2(row) {
|
||||
debugger
|
||||
|
||||
// const arr = this.fileBom
|
||||
// for (let i = 0; i < arr.length; i++) {
|
||||
// if (i === this.fileBomindex) {
|
||||
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
|
||||
this.material_id = this.openParam.material_id
|
||||
this.query.material_id = this.material_id
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
this.form3.device_id = row.device_id
|
||||
},
|
||||
tableChanged(rows) {
|
||||
debugger
|
||||
|
||||
const arr = rows
|
||||
arr.forEach((item) => {
|
||||
this.tableData.push(item)
|
||||
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
this.form3.device_id = row.device_id
|
||||
},
|
||||
tableChanged(rows) {
|
||||
debugger
|
||||
|
||||
const arr = rows
|
||||
arr.forEach((item) => {
|
||||
this.tableData.push(item)
|
||||
|
||||
@@ -319,7 +319,7 @@ export default {
|
||||
},
|
||||
// 下发按钮禁用条件
|
||||
is_disabled(rows) {
|
||||
debugger
|
||||
|
||||
this.checkrows = rows
|
||||
if (this.checkrows.length == 0){
|
||||
return true
|
||||
@@ -417,7 +417,7 @@ export default {
|
||||
})
|
||||
},
|
||||
Picconfirm(index, row) {
|
||||
debugger
|
||||
|
||||
this.$refs.child.setForm(row.request_code)
|
||||
this.PicDialog = true
|
||||
},
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
const data = this.form1
|
||||
if (data.maint_plan_name === null) {
|
||||
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
const data = this.form1
|
||||
if (data.maint_plan_name === null) {
|
||||
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.device_faultclass_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -227,9 +227,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -302,7 +302,7 @@ export default {
|
||||
},
|
||||
getSubTypes(id) {
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -301,9 +301,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -226,9 +226,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -302,7 +302,7 @@ export default {
|
||||
},
|
||||
getSubTypes(id) {
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="设备选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">设备搜索</label>
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入设备编码或名称"
|
||||
style="width: 220px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;margin-top: 15px"
|
||||
size="mini"
|
||||
border
|
||||
:cell-style="{'text-align':'center'}"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" />
|
||||
<el-table-column prop="device_name" label="设备名称" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import equipmentfile from '@/views/wms/device_manage/deviceFile/equipmentfile/equipmentfile'
|
||||
|
||||
export default {
|
||||
name: 'SelectDeviceDialog',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '设备选择', url: 'api/equipmentfile', crudMethod: { ...equipmentfile }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableRadio: null,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
},
|
||||
setForm(user_id) {
|
||||
this.user_id = user_id
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.afterRefresh]() {
|
||||
return true
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
if (this.tableRadio === null) {
|
||||
this.$message('至少选择一条设备信息')
|
||||
return
|
||||
}
|
||||
console.log(this.crud.selections)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged3', this.tableRadio)
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="query.user_id === ''">
|
||||
<div class="my-code">点击查看设备详情</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.label"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="输入字典标签查询"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
</div>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="设备编码" prop="device_code">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.device_code" disabled style="width: 250px;" clearable >
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryDevice(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column label="所属人员" min-width="100" show-overflow-tooltip>
|
||||
{{ query.person_name }}
|
||||
</el-table-column>
|
||||
<el-table-column prop="device_code" label="设备编码" align="center" width="120" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
v-permission="['admin','dict:edit','dict:del']"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="115px"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<SelectDeviceDialog ref="selectDeviceDialog" :dialog-show.sync="deviceShow" @tableChanged3="tableChanged3" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPersoncorrdevice from '@/views/wms/masterdata_manage/em/repairpersondevice/repairpersondevice'
|
||||
import CRUD, { form, header, presenter } from '@crud/crud'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import SelectDeviceDialog from './SelectDeviceDialog'
|
||||
|
||||
const defaultForm = {
|
||||
device_code: null
|
||||
}
|
||||
|
||||
export default {
|
||||
components: { pagination, rrOperation, udOperation, SelectDeviceDialog },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({
|
||||
title: '设备详情',
|
||||
url: 'api/embirepairdevice/device',
|
||||
query: { code: '' },
|
||||
idField: 'person_id',
|
||||
sort: ['person_id,asc', 'person_id,desc'],
|
||||
crudMethod: { ...crudPersoncorrdevice },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
del: true,
|
||||
reset: false
|
||||
},
|
||||
queryOnPresenterCreated: false
|
||||
})
|
||||
]
|
||||
},
|
||||
mixins: [
|
||||
presenter(),
|
||||
header(),
|
||||
form(function() {
|
||||
return Object.assign({}, defaultForm)
|
||||
})],
|
||||
data() {
|
||||
return {
|
||||
dictId: null,
|
||||
deviceShow: false,
|
||||
rules: {
|
||||
device_code: [
|
||||
{ required: true, message: '请输入设备号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryDevice() {
|
||||
this.deviceShow = true
|
||||
},
|
||||
tableChanged3(row) {
|
||||
this.form.device_code = row.device_code
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 字典列表 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :xs="13" :sm="13" :md="13" :lg="13" :xl="13" style="margin-bottom: 10px">
|
||||
<el-card class="box-card">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input v-model="query.username" clearable size="mini" placeholder="输入人员名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation />
|
||||
</div>
|
||||
<crudOperation :permission="permission" />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange">
|
||||
<el-table-column prop="username" label="用户名" />
|
||||
<el-table-column prop="person_name" label="名称" />
|
||||
<el-table-column prop="gender" label="性别" />
|
||||
<el-table-column prop="phone" label="手机号码" width="110" />
|
||||
<el-table-column prop="email" label="邮箱" width="140" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- 字典详情列表 -->
|
||||
<el-col :xs="11" :sm="11" :md="11" :lg="11" :xl="11">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设备详情</span>
|
||||
<el-button
|
||||
v-if="this.rowDtl !== null"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
style="float: right;padding: 4px 10px"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="$refs.dictDetail && $refs.dictDetail.crud.toAdd()"
|
||||
>新增</el-button>
|
||||
</div>
|
||||
<dictDetail ref="dictDetail" :permission="permission" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission'
|
||||
import dictDetail from './dictDetail.vue'
|
||||
import crudPersoncorrdevice from '@/views/wms/masterdata_manage/em/repairpersondevice/repairpersondevice'
|
||||
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = {}
|
||||
|
||||
export default {
|
||||
name: 'Repairpersondevice',
|
||||
components: { crudOperation, pagination, rrOperation, udOperation, dictDetail },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({
|
||||
title: '维修人与设备档案维护',
|
||||
url: 'api/embirepairdevice',
|
||||
idField: 'jockey_id',
|
||||
crudMethod: { ...crudPersoncorrdevice },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
data() {
|
||||
return {
|
||||
rowDtl: null,
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '字典名称' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
],
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入编码', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
// 获取数据前设置好接口地址
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.$refs.dictDetail) {
|
||||
this.$refs.dictDetail.query.user_id = ''
|
||||
this.rowDtl = null
|
||||
this.$refs.dictDetail.crud.toQuery()
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 选中字典后,设置字典详情数据
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
this.rowDtl = val
|
||||
this.$refs.dictDetail.query.user_id = val.user_id
|
||||
this.$refs.dictDetail.query.person_name = val.person_name
|
||||
this.$refs.dictDetail.form.user_id = val.user_id
|
||||
this.$refs.dictDetail.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,67 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addPersons(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/addPersons',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getHeader(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/getHeader',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeviceIdByUserId(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/getDeviceIdByUserId',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addDevices(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/addDevices',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRow(data) {
|
||||
return request({
|
||||
url: 'api/embirepairdevice/deleteRow',
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, addPersons, getHeader, deleteRow, addDevices }
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -236,7 +236,7 @@ export default {
|
||||
let optType = null
|
||||
|
||||
const isCopyAdd = this.$parent.isCopyAdd
|
||||
debugger
|
||||
|
||||
if (isCopyAdd === '1') {
|
||||
optType = '01' // 复制新增
|
||||
} else if (this.crud.status.add === 1) {
|
||||
@@ -251,7 +251,7 @@ export default {
|
||||
const that = this
|
||||
const errMsgList = []
|
||||
const data = arr.map(function(item) {
|
||||
debugger
|
||||
|
||||
// 合格上下限同时为填入的数字或同时为空
|
||||
if ((!isNaN(item.up_limit) && !isNaN(item.down_limit)) || (isNaN(item.up_limit) && isNaN(item.down_limit))) {
|
||||
// 临界上下限同时为填入的数字或同时为空
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/structivtDaily',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/structivtDaily',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/structivtDaily',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del }
|
||||
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码,规格"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<!--
|
||||
<el-table-column type="selection" width="55" />
|
||||
-->
|
||||
<el-table-column prop="stor_name" label="所属仓库" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="sect_name" label="所属库区" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_code" label="所属仓位" width="120" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="150" />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="150" />
|
||||
<el-table-column prop="material_id" label="物料id" width="150" />
|
||||
<el-table-column prop="canuse_qty" label="可用总数" width="150" />
|
||||
<el-table-column prop="ivt_qty" label="库存总数" width="150" />
|
||||
<el-table-column prop="frozen_qty" label="冻结总数" width="150" />
|
||||
<el-table-column prop="warehousing_qty" label="待入总数" width="150" />
|
||||
<el-table-column prop="qty_unit_id" label="单位" width="150" :formatter="formatUnit"/>
|
||||
<el-table-column prop="create_time" label="统计日期" width="150" fixed="right" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dailyStructivt from '@/views/wms/masterdata_manage/st/dailyStructivt/dailyStructivt'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudMdPbMeasureunit from '@/api/wms/basedata/master/mdPbMeasureunit'
|
||||
|
||||
const defaultForm = {
|
||||
struct_id: null,
|
||||
cascader: null,
|
||||
struct_code: null,
|
||||
struct_name: null,
|
||||
simple_name: null,
|
||||
sect_id: null,
|
||||
sect_code: null,
|
||||
sect_name: null,
|
||||
stor_id: null,
|
||||
material_code: null,
|
||||
stor_code: null,
|
||||
stor_name: null,
|
||||
stor_type: null,
|
||||
capacity: null,
|
||||
width: null,
|
||||
height: null,
|
||||
zdepth: null,
|
||||
weight: null,
|
||||
xqty: null,
|
||||
yqty: null,
|
||||
zqty: null,
|
||||
is_tempstruct: '0',
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
back_ground_color: null,
|
||||
front_ground_color: null,
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
is_used: true,
|
||||
is_zdepth: null,
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
storagevehicle_type: null,
|
||||
is_emptyvehicle: null,
|
||||
storagevehicle_qty: null,
|
||||
lock_type: null,
|
||||
material_height_type: null,
|
||||
ext_id: null,
|
||||
remark: null
|
||||
}
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_INV_BCP_IN_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '仓位',
|
||||
optShow: { add: false, reset: true },
|
||||
url: 'api/structivtDaily',
|
||||
idField: 'id',
|
||||
crudMethod: { ...dailyStructivt }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
const numberOne = (rule, value, callback) => {
|
||||
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
|
||||
const numRe = new RegExp(numReg)
|
||||
if (value) {
|
||||
if (!numRe.test(value)) {
|
||||
callback(new Error('只能输入数字'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
measure_unit:[],
|
||||
sects: [],
|
||||
permission: {
|
||||
add: ['admin', 'dept:add'],
|
||||
edit: ['admin', 'dept:edit'],
|
||||
del: ['admin', 'dept:del']
|
||||
},
|
||||
trueorfalse: [ { value: true, label: '是' }, { value: false, label: '否' }]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({}).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
crudMdPbMeasureunit.getSelect().then(res => {
|
||||
this.measure_unit = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
sectChange(val) {
|
||||
this.form.sect_id = val[1]
|
||||
},
|
||||
formatUnit(row, column) {
|
||||
const values = this.measure_unit.filter(v => {
|
||||
return v.value === row.qty_unit_id
|
||||
})
|
||||
return values[0].label
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -274,7 +274,7 @@ export default {
|
||||
crud.downloadLoading = true
|
||||
download('/api/pcsIfPurchaseorder/download', this.crud.query
|
||||
).then(result => {
|
||||
debugger
|
||||
|
||||
downloadFile(result, '原料需求', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
|
||||
@@ -307,7 +307,7 @@ export default {
|
||||
this.deviceList.forEach(row => {
|
||||
res.check_list.forEach(selected => {
|
||||
if (selected.device_code === row.device_code) {
|
||||
debugger
|
||||
|
||||
this.$refs.multipleTable.toggleRowSelection(row, true)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
}).catch(err => {
|
||||
debugger
|
||||
|
||||
const list = err.response.data.message
|
||||
download2('/api/produceWorkorder/download', list).then(result => {
|
||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
var formdata = new FormData()
|
||||
formdata.append('file', this.file1.raw)
|
||||
crudbucketrecord.excelImport(formdata).then((res) => {
|
||||
debugger
|
||||
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$emit('tableChanged3', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
|
||||
@@ -372,7 +372,7 @@ export default {
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
rows.forEach((row) => {
|
||||
debugger
|
||||
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.base_bill_code === row.sale_code && item.base_bill_table === row.seq_no) {
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
this.form.dtl_row = row
|
||||
this.form.storage_qty = this.form.dtl_row.plan_qty
|
||||
crudProductIn.getIosInvDis({ 'iostorinv_id': row.iostorinv_id, 'iostorinvdtl_id': row.iostorinvdtl_id }).then(res => {
|
||||
debugger
|
||||
|
||||
if (res.length !== 0) {
|
||||
this.form.tableMater = res
|
||||
}
|
||||
@@ -379,7 +379,7 @@ export default {
|
||||
})
|
||||
},
|
||||
changeQty(val) {
|
||||
debugger
|
||||
|
||||
if (parseFloat(this.form.dtl_row.plan_qty) < parseFloat(val)) {
|
||||
this.crud.notify('放入数量不能大于明细数量!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.$set(this.form, 'storage_qty', parseFloat(this.form.dtl_row.plan_qty))
|
||||
@@ -544,7 +544,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.stor_id = val[0]
|
||||
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
this.queryTableDdis()
|
||||
},
|
||||
clcikDisRow(row) {
|
||||
debugger
|
||||
|
||||
this.dis_row = row
|
||||
if (this.dis_row.task_status < 5) {
|
||||
this.dis_del = false
|
||||
|
||||
@@ -323,7 +323,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -386,7 +386,7 @@ export default {
|
||||
this.form.sect_name = row.sect_name
|
||||
this.form.struct_name = row.struct_name
|
||||
crudMoreOrless.getStructIvt({'struct_id': row.struct_id}).then(res => {
|
||||
debugger
|
||||
|
||||
this.form.tableData = res
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
|
||||
@@ -213,7 +213,7 @@ export default {
|
||||
'data': this.rows
|
||||
}
|
||||
productOut.queryStructAll(data).then(res => {
|
||||
debugger
|
||||
|
||||
this.rows = res
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openStructIvt() {
|
||||
debugger
|
||||
|
||||
if (this.currentRow.iostorinv_id === undefined) {
|
||||
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
this.queryTableDdis()
|
||||
},
|
||||
clcikDisRow(row) {
|
||||
debugger
|
||||
|
||||
this.dis_row = row
|
||||
if (this.dis_row.task_status < 5) {
|
||||
this.dis_del = false
|
||||
|
||||
@@ -278,7 +278,7 @@ export default {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
toView(row) {
|
||||
debugger
|
||||
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CP_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl, BillDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -455,7 +455,7 @@ export default {
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
debugger
|
||||
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('setMaterValue', this.rows)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
v-for="item in dict.ST_INV_RAW_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -144,7 +144,7 @@ export default {
|
||||
name: 'ViewDialog',
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
dicts: ['ST_INV_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
|
||||
dicts: ['ST_INV_RAW_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -65,6 +65,66 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--编辑详情-->
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
title="仓位物料设置"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="700px"
|
||||
close="closeView"
|
||||
>
|
||||
<el-form ref="form" :model="ivtForm" :rules="rules" size="mini" label-suffix=":" label-width="90px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库名称" prop="stor_name">
|
||||
<el-input v-model="ivtForm.stor_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库区名称" prop="struct_name">
|
||||
<el-input v-model="ivtForm.sect_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位编码">
|
||||
<el-input v-model="ivtForm.struct_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位名称">
|
||||
<el-input v-model="ivtForm.struct_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="ivtForm.material_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="ivtForm.material_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库存数数量">
|
||||
<el-input v-model="ivtForm.ivt_qty" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="closeView">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="updateIvt">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -87,6 +147,12 @@
|
||||
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click="updateMaterial(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -102,7 +168,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
|
||||
import ProductIvt from '@/views/wms/storage_manage/rawproduct/rawProductIvt/productivt'
|
||||
|
||||
export default {
|
||||
name: 'RawProductIvt',
|
||||
@@ -122,6 +188,8 @@ export default {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
ivtForm: {},
|
||||
dialogVisible: false,
|
||||
storlist: [],
|
||||
storId: null
|
||||
}
|
||||
@@ -138,6 +206,24 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
closeView(){
|
||||
this.ivtForm={}
|
||||
this.dialogVisible = false
|
||||
},
|
||||
updateMaterial(row){
|
||||
this.dialogVisible = true
|
||||
this.ivtForm = row
|
||||
this.ivtForm.old_qty = row.canuse_qty
|
||||
|
||||
},
|
||||
updateIvt(){
|
||||
ProductIvt.edit(this.ivtForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.closeView()
|
||||
}).catch(err => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp',
|
||||
url: '/api/stIvtStructivtYl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/delete',
|
||||
url: '/api/stIvtStructivtYl/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtStructivtCp/update',
|
||||
url: '/api/stIvtStructivtYl/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -382,7 +382,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.sect_id = val[0]
|
||||
|
||||
@@ -316,7 +316,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -358,7 +358,7 @@ export default {
|
||||
downloadButton() {
|
||||
this.downloading = true
|
||||
download('/api/in/semiproductIn/download', this.query).then(result => {
|
||||
debugger
|
||||
|
||||
downloadFile(result, '半成品入库单', 'xlsx')
|
||||
this.downloading = false
|
||||
}).catch(() => {
|
||||
|
||||
@@ -322,7 +322,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -285,7 +285,7 @@ export default {
|
||||
this.materShow = true
|
||||
},
|
||||
tableChanged(row) {
|
||||
debugger
|
||||
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_id = row.material_id
|
||||
this.tableData1 = []
|
||||
@@ -298,11 +298,11 @@ export default {
|
||||
})
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
debugger
|
||||
|
||||
const row = this.form.tableData[index]
|
||||
const nowList = []
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
debugger
|
||||
|
||||
if (this.form.tableData[i].storagevehicle_code === row.storagevehicle_code) {
|
||||
this.tableData1.push(this.form.tableData[i])
|
||||
} else {
|
||||
@@ -313,7 +313,7 @@ export default {
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
deleteRow1(index, rows) {
|
||||
debugger
|
||||
|
||||
const tablemap = new Map()
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
tablemap.set(this.form.tableData[i].storagevehicle_code, this.form.tableData[i].storagevehicle_code)
|
||||
|
||||
Reference in New Issue
Block a user