Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
package org.nl.wms.masterdata_manage.controller.vehicle;
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 袋记录表 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author generator
|
|
||||||
* @since 2023-05-10
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/mdPbBagrecord")
|
|
||||||
public class MdPbBagrecordController {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package org.nl.wms.masterdata_manage.controller.vehicle;
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 桶物料变动记录表 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author generator
|
|
||||||
* @since 2023-05-10
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/mdPbBucketchangeflow")
|
|
||||||
public class MdPbBucketchangeflowController {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package org.nl.wms.masterdata_manage.controller.vehicle;
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 载具扩展属性信息表 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author generator
|
|
||||||
* @since 2023-05-10
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/mdPbStoragevehicleext")
|
|
||||||
public class MdPbStoragevehicleextController {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,9 +1,22 @@
|
|||||||
package org.nl.wms.masterdata_manage.controller.vehicle;
|
package org.nl.wms.masterdata_manage.controller.vehicle;
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.nl.common.anno.Log;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
||||||
|
import org.nl.wms.masterdata_manage.备份master.service.StoragevehicleinfoService;
|
||||||
|
import org.nl.wms.masterdata_manage.备份master.service.dto.StoragevehicleinfoDto;
|
||||||
|
import org.nl.wms.storage_manage.productmanage.service.check.dto.CheckQueryMst;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -14,8 +27,79 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
* @since 2023-05-10
|
* @since 2023-05-10
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/mdPbStoragevehicleinfo")
|
@RequestMapping("api/storagevehicleinfo")
|
||||||
public class MdPbStoragevehicleinfoController {
|
public class MdPbStoragevehicleinfoController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StoragevehicleinfoService storagevehicleinfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMdPbStoragevehicleinfoService istoragevehicleinfoService;
|
||||||
|
|
||||||
|
@GetMapping("/query")
|
||||||
|
public ResponseEntity<Object> query(CheckQueryMst query, PageQuery page){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/vehicleInfo")
|
||||||
|
public ResponseEntity<Object> vehicleInfo(String vehicle_code){
|
||||||
|
return new ResponseEntity<>(istoragevehicleinfoService.vehileInfo(vehicle_code),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询载具")
|
||||||
|
@ApiOperation("查询载具")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||||
|
return new ResponseEntity<>(storagevehicleinfoService.queryAll(whereJson,page),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增载具")
|
||||||
|
@ApiOperation("新增载具")
|
||||||
|
public ResponseEntity<Object> create(@RequestBody JSONObject map){
|
||||||
|
return new ResponseEntity<>(istoragevehicleinfoService.create(map),HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改载具")
|
||||||
|
@ApiOperation("修改载具")
|
||||||
|
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:edit')")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody StoragevehicleinfoDto dto){
|
||||||
|
storagevehicleinfoService.update(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除载具")
|
||||||
|
@ApiOperation("删除载具")
|
||||||
|
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
|
storagevehicleinfoService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/changeActive")
|
||||||
|
@Log("修改点位启用状态")
|
||||||
|
@ApiOperation("修改点位启用状态")
|
||||||
|
//@PreAuthorize("@el.check('store:edit')")
|
||||||
|
public ResponseEntity<Object> changeActive(@RequestBody JSONObject json) {
|
||||||
|
storagevehicleinfoService.changeActive(json);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getVehicle/{code}")
|
||||||
|
@Log("获取起始载具号")
|
||||||
|
@ApiOperation("获取起始载具号")
|
||||||
|
//@PreAuthorize("@el.check('store:edit')")
|
||||||
|
public ResponseEntity<Object> getVehicle(@PathVariable String code) {
|
||||||
|
JSONObject json = storagevehicleinfoService.getVehicle(code);
|
||||||
|
return new ResponseEntity<>(json,HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updateVehicleMaterial")
|
||||||
|
public ResponseEntity<Object> updateVehicleInfo(@RequestBody JSONObject form){
|
||||||
|
istoragevehicleinfoService.updateVehicleMaterial(form);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package org.nl.wms.masterdata_manage.controller.vehicle;
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 载具点位对应表 前端控制器
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author generator
|
|
||||||
* @since 2023-05-10
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/mdPbStoragevehiclepoint")
|
|
||||||
public class MdPbStoragevehiclepointController {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
package org.nl.wms.masterdata_manage.service.vehicle;
|
package org.nl.wms.masterdata_manage.service.vehicle;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 载具信息表 服务类
|
* 载具信息表 服务类
|
||||||
@@ -13,4 +17,18 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface IMdPbStoragevehicleinfoService extends IService<MdPbStoragevehicleinfo> {
|
public interface IMdPbStoragevehicleinfoService extends IService<MdPbStoragevehicleinfo> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param map /
|
||||||
|
*/
|
||||||
|
JSONArray create(JSONObject map);
|
||||||
|
/**
|
||||||
|
* 获取载具上物料信息
|
||||||
|
* @param vehile_code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map vehileInfo(String vehile_code);
|
||||||
|
|
||||||
|
void updateVehicleMaterial(JSONObject vorm);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,32 +25,32 @@ import lombok.experimental.Accessors;
|
|||||||
public class MdPbStoragevehicleext implements Serializable {
|
public class MdPbStoragevehicleext implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 载具扩展标识
|
* 载具编码
|
||||||
*/
|
|
||||||
@TableId
|
|
||||||
private String storagevehicleext_id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 载具标识
|
|
||||||
*/
|
*/
|
||||||
private String storagevehicle_id;
|
private String storagevehicle_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 载具编码
|
* 载具编码
|
||||||
*/
|
*/
|
||||||
private String storagevehicle_code;
|
private String storagevehicle_code;
|
||||||
|
|
||||||
/**
|
|
||||||
* 载具类型
|
|
||||||
*/
|
|
||||||
private String storagevehicle_type;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料标识
|
* 物料标识
|
||||||
*/
|
*/
|
||||||
private String material_id;
|
private String material_id;
|
||||||
|
/**
|
||||||
|
* 物料标识
|
||||||
|
*/
|
||||||
|
private String material_code;
|
||||||
|
/**
|
||||||
|
* 物料标识
|
||||||
|
*/
|
||||||
|
private String material_name;
|
||||||
|
/**
|
||||||
|
* 物料标识
|
||||||
|
*/
|
||||||
|
private String material_spec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次
|
* 批次
|
||||||
@@ -72,6 +72,11 @@ public class MdPbStoragevehicleext implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal storage_qty;
|
private BigDecimal storage_qty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重量
|
||||||
|
*/
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工艺指令卡
|
* 工艺指令卡
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +110,7 @@ public class MdPbStoragevehicleext implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 修改时间
|
* 修改时间
|
||||||
*/
|
*/
|
||||||
private Date update_time;
|
private String update_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备标识
|
* 设备标识
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class MdPbStoragevehicleinfo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private Date create_time;
|
private String create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改人
|
* 修改人
|
||||||
@@ -83,12 +83,8 @@ public class MdPbStoragevehicleinfo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 修改时间
|
* 修改时间
|
||||||
*/
|
*/
|
||||||
private Date update_time;
|
private String update_time;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否删除
|
|
||||||
*/
|
|
||||||
private Boolean is_delete;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用
|
* 是否启用
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package org.nl.wms.masterdata_manage.service.vehicle.dao.mapper;
|
|||||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 载具信息表 Mapper 接口
|
* 载具信息表 Mapper 接口
|
||||||
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
*/
|
*/
|
||||||
public interface MdPbStoragevehicleinfoMapper extends BaseMapper<MdPbStoragevehicleinfo> {
|
public interface MdPbStoragevehicleinfoMapper extends BaseMapper<MdPbStoragevehicleinfo> {
|
||||||
|
|
||||||
|
Map vehileInfo(String vehicle_code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,10 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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.vehicle.dao.mapper.MdPbStoragevehicleinfoMapper">
|
<mapper namespace="org.nl.wms.masterdata_manage.service.vehicle.dao.mapper.MdPbStoragevehicleinfoMapper">
|
||||||
|
|
||||||
|
<select id="vehileInfo" resultType="java.util.Map">
|
||||||
|
select * from md_pb_storagevehicleinfo
|
||||||
|
left join md_pb_storagevehicleext on md_pb_storagevehicleinfo.storagevehicle_code = md_pb_storagevehicleext.storagevehicle_code
|
||||||
|
where
|
||||||
|
md_pb_storagevehicleinfo.storagevehicle_code = #{vehicle_code} and md_pb_storagevehicleinfo.is_delete = false
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,10 +1,33 @@
|
|||||||
package org.nl.wms.masterdata_manage.service.vehicle.impl;
|
package org.nl.wms.masterdata_manage.service.vehicle.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.nl.common.utils.IdUtil;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
|
||||||
|
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
||||||
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.mapper.MdPbStoragevehicleinfoMapper;
|
import org.nl.wms.masterdata_manage.service.vehicle.dao.mapper.MdPbStoragevehicleinfoMapper;
|
||||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.nl.wms.masterdata_manage.备份master.service.dto.StoragevehicleinfoDto;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -17,4 +40,93 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStoragevehicleinfoMapper, MdPbStoragevehicleinfo> implements IMdPbStoragevehicleinfoService {
|
public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStoragevehicleinfoMapper, MdPbStoragevehicleinfo> implements IMdPbStoragevehicleinfoService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MdPbStoragevehicleextServiceImpl storagevehicleextService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected IMdMeMaterialbaseService iMdMeMaterialbaseService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map vehileInfo(String vehicle_code) {
|
||||||
|
if(StringUtils.isEmpty(vehicle_code)){
|
||||||
|
return new HashMap();
|
||||||
|
}
|
||||||
|
return this.baseMapper.vehileInfo(vehicle_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray create(JSONObject map) {
|
||||||
|
MdPbStoragevehicleinfo one = this.getOne(new QueryWrapper<MdPbStoragevehicleinfo>().eq("storagevehicle_code", map.getString("storagevehicle_code")));
|
||||||
|
if (!ObjectUtil.isEmpty(one)) {
|
||||||
|
throw new BadRequestException("此载具已存在");
|
||||||
|
}
|
||||||
|
String code = "";
|
||||||
|
switch (map.getString("storagevehicle_type")) {
|
||||||
|
case "00":
|
||||||
|
code = "VEHICCLE_CODE_XMTPT";
|
||||||
|
break;
|
||||||
|
case "01":
|
||||||
|
code = "VEHICCLE_CODE_CDMTP";
|
||||||
|
break;
|
||||||
|
case "02":
|
||||||
|
code = "VEHICCLE_CODE_TLD";
|
||||||
|
break;
|
||||||
|
case "03":
|
||||||
|
code = "VEHICCLE_CODE_TTP";
|
||||||
|
break;
|
||||||
|
case "04":
|
||||||
|
code = "VEHICCLE_CODE_XMTPC";
|
||||||
|
break;
|
||||||
|
case "05":
|
||||||
|
code = "VEHICCLE_CODE_LX";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
JSONArray resultCodeArr = new JSONArray();
|
||||||
|
int num = MapUtil.getInt(map, "num");
|
||||||
|
for (int i = 0; i < num; i++) {
|
||||||
|
MdPbStoragevehicleinfo entity = new MdPbStoragevehicleinfo();
|
||||||
|
entity.setStoragevehicle_id(IdUtil.getStringId());
|
||||||
|
entity.setStoragevehicle_code(CodeUtil.getNewCode(code));
|
||||||
|
entity.setStoragevehicle_name(entity.getStoragevehicle_code());
|
||||||
|
entity.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
entity.setCreate_time(DateUtil.now());
|
||||||
|
entity.setIs_used(map.getString("is_used").equals("1"));
|
||||||
|
entity.setStoragevehicle_type(map.getString("storagevehicle_type"));
|
||||||
|
this.save(entity);
|
||||||
|
resultCodeArr.add(entity.getStoragevehicle_code());
|
||||||
|
}
|
||||||
|
return resultCodeArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void updateVehicleMaterial(JSONObject vorm) {
|
||||||
|
Assert.notNull(vorm.getString("storagevehicle_code"),"请求参数载具编号不能为空");
|
||||||
|
storagevehicleextService.remove(new QueryWrapper<MdPbStoragevehicleext>()
|
||||||
|
.eq("storagevehicle_code",vorm.getString("storagevehicle_code")));
|
||||||
|
if (StringUtils.isEmpty(vorm.getString("material_code"))){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MdMeMaterialbase one = iMdMeMaterialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>()
|
||||||
|
.eq("material_code", vorm.getString("material_code"))
|
||||||
|
.eq("is_delete",false));
|
||||||
|
if (one==null){
|
||||||
|
throw new BadRequestException("当前物料编号不存在:"+vorm.getString("material_code"));
|
||||||
|
}
|
||||||
|
MdPbStoragevehicleext vehicleMaterial = new MdPbStoragevehicleext();
|
||||||
|
vehicleMaterial.setStoragevehicle_id(vorm.getString("storagevehicle_id"));
|
||||||
|
vehicleMaterial.setStoragevehicle_code(vorm.getString("storagevehicle_code"));
|
||||||
|
vehicleMaterial.setStorage_qty(vorm.getBigDecimal("storage_qty"));
|
||||||
|
vehicleMaterial.setWeight(vorm.getBigDecimal("weight"));
|
||||||
|
vehicleMaterial.setMaterial_id(one.getMaterial_id());
|
||||||
|
vehicleMaterial.setMaterial_code(one.getMaterial_code());
|
||||||
|
vehicleMaterial.setMaterial_spec(one.getMaterial_spec());
|
||||||
|
vehicleMaterial.setQty_unit_id(one.getBase_unit_id());
|
||||||
|
vehicleMaterial.setPcsn(vorm.getString("pcsn"));
|
||||||
|
vehicleMaterial.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
vehicleMaterial.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
vehicleMaterial.setUpdate_time(DateUtil.now());
|
||||||
|
storagevehicleextService.save(vehicleMaterial);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
|
|
||||||
package org.nl.wms.masterdata_manage.备份master.rest;
|
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.nl.common.anno.Log;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.nl.wms.masterdata_manage.备份master.service.StoragevehicleinfoService;
|
|
||||||
import org.nl.wms.masterdata_manage.备份master.service.dto.StoragevehicleinfoDto;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author ldjun
|
|
||||||
* @date 2021-12-09
|
|
||||||
**/
|
|
||||||
@RestController
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@Api(tags = "载具管理")
|
|
||||||
@RequestMapping("/api/storagevehicleinfo")
|
|
||||||
@Slf4j
|
|
||||||
public class StoragevehicleinfoController {
|
|
||||||
|
|
||||||
private final StoragevehicleinfoService storagevehicleinfoService;
|
|
||||||
|
|
||||||
@GetMapping
|
|
||||||
@Log("查询载具")
|
|
||||||
@ApiOperation("查询载具")
|
|
||||||
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:list')")
|
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
|
||||||
return new ResponseEntity<>(storagevehicleinfoService.queryAll(whereJson,page),HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping
|
|
||||||
@Log("新增载具")
|
|
||||||
@ApiOperation("新增载具")
|
|
||||||
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:add')")
|
|
||||||
public ResponseEntity<Object> create(@RequestBody Map map){
|
|
||||||
return new ResponseEntity<>(storagevehicleinfoService.create(map),HttpStatus.CREATED);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping
|
|
||||||
@Log("修改载具")
|
|
||||||
@ApiOperation("修改载具")
|
|
||||||
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:edit')")
|
|
||||||
public ResponseEntity<Object> update(@Validated @RequestBody StoragevehicleinfoDto dto){
|
|
||||||
storagevehicleinfoService.update(dto);
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Log("删除载具")
|
|
||||||
@ApiOperation("删除载具")
|
|
||||||
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:del')")
|
|
||||||
@DeleteMapping
|
|
||||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
|
||||||
storagevehicleinfoService.deleteAll(ids);
|
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/changeActive")
|
|
||||||
@Log("修改点位启用状态")
|
|
||||||
@ApiOperation("修改点位启用状态")
|
|
||||||
//@PreAuthorize("@el.check('store:edit')")
|
|
||||||
public ResponseEntity<Object> changeActive(@RequestBody JSONObject json) {
|
|
||||||
storagevehicleinfoService.changeActive(json);
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/getVehicle/{code}")
|
|
||||||
@Log("获取起始载具号")
|
|
||||||
@ApiOperation("获取起始载具号")
|
|
||||||
//@PreAuthorize("@el.check('store:edit')")
|
|
||||||
public ResponseEntity<Object> getVehicle(@PathVariable String code) {
|
|
||||||
JSONObject json = storagevehicleinfoService.getVehicle(code);
|
|
||||||
return new ResponseEntity<>(json,HttpStatus.OK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -48,9 +48,9 @@ public interface StoragevehicleinfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建
|
* 创建
|
||||||
* @param map /
|
* @param map /
|
||||||
*/
|
*/
|
||||||
JSONArray create(Map map);
|
JSONArray create(JSONObject map);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -84,7 +84,7 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONArray create(Map map) {
|
public JSONArray create(JSONObject map) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
WQLObject wo = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
||||||
JSONObject jsonObject = wo.query("storagevehicle_code = '" + map.get("storagevehicle_code") + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonObject = wo.query("storagevehicle_code = '" + map.get("storagevehicle_code") + "' and is_delete = '0'").uniqueResult(0);
|
||||||
if (!ObjectUtil.isEmpty(jsonObject)) {
|
if (!ObjectUtil.isEmpty(jsonObject)) {
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
<if test="workprocedure_id != null and workprocedure_id != ''">
|
<if test="workprocedure_id != null and workprocedure_id != ''">
|
||||||
and device.workprocedure_id = #{workprocedure_id}
|
and device.workprocedure_id = #{workprocedure_id}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="product_area != null and product_area != ''">
|
||||||
|
and device.product_area = #{product_area}
|
||||||
|
</if>
|
||||||
and device.device_code not in (
|
and device.device_code not in (
|
||||||
select o.device_code as device_code
|
select o.device_code as device_code
|
||||||
from PDM_produce_workOrder o
|
from PDM_produce_workOrder o
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ public class PdmProduceWorkorder implements Serializable {
|
|||||||
private BigDecimal nok_qty;
|
private BigDecimal nok_qty;
|
||||||
private BigDecimal repare_qty;
|
private BigDecimal repare_qty;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下发人
|
* 下发人
|
||||||
*/
|
*/
|
||||||
@@ -222,4 +221,9 @@ public class PdmProduceWorkorder implements Serializable {
|
|||||||
private String confirm_time;
|
private String confirm_time;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Boolean is_used_fxx = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
|||||||
//A1_TW_+device_code 日期2023/5/30
|
//A1_TW_+device_code 日期2023/5/30
|
||||||
//material_spec='24030921S'
|
//material_spec='24030921S'
|
||||||
String name = file.getOriginalFilename();
|
String name = file.getOriginalFilename();
|
||||||
if (name.contains("推弯")){
|
if (name.contains("弯头")){
|
||||||
推弯(inputStream);
|
推弯(inputStream);
|
||||||
}
|
}
|
||||||
if (name.contains("综合")){
|
if (name.contains("综合")){
|
||||||
@@ -307,9 +307,13 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
|||||||
workorder.setShift_type_scode(col.equals("晚班") ? "2" : "1");
|
workorder.setShift_type_scode(col.equals("晚班") ? "2" : "1");
|
||||||
}
|
}
|
||||||
if (j == 1) {
|
if (j == 1) {
|
||||||
//物料
|
if (workorder.getShift_type_scode().equals("1")){
|
||||||
workorder.setPlanproduceend_date(col.substring(0, col.indexOf(" ")) + " 18:30:00");
|
workorder.setPlanproduceend_date(col.substring(0, col.indexOf(" ")) + " 18:30:00");
|
||||||
workorder.setPlanproducestart_date(col.substring(0, col.indexOf(" ")) + " 07:30:00");
|
workorder.setPlanproducestart_date(col.substring(0, col.indexOf(" ")) + " 07:30:00");
|
||||||
|
}else {
|
||||||
|
workorder.setPlanproducestart_date(col.substring(0, col.indexOf(" ")) + " 18:30:00");
|
||||||
|
workorder.setPlanproduceend_date(col.substring(0, col.indexOf(" ")) + " 07:30:00");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (j == 2) {
|
if (j == 2) {
|
||||||
//物料
|
//物料
|
||||||
@@ -367,7 +371,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
|||||||
if (workprocedure==null){
|
if (workprocedure==null){
|
||||||
errorMap.put("第"+(i+1)+"行:","工序名称:"+workorder.getWorkprocedure_id()+"不存在");
|
errorMap.put("第"+(i+1)+"行:","工序名称:"+workorder.getWorkprocedure_id()+"不存在");
|
||||||
}else {
|
}else {
|
||||||
workorder.setWorkorder_id(workprocedure.getWorkprocedure_id());
|
workorder.setWorkprocedure_id(workprocedure.getWorkprocedure_id());
|
||||||
}
|
}
|
||||||
List<MdMeMaterialbase> mdMeMaterialbases = materialspecs.get(workorder.getMaterial_id());
|
List<MdMeMaterialbase> mdMeMaterialbases = materialspecs.get(workorder.getMaterial_id());
|
||||||
if (!CollectionUtils.isEmpty(mdMeMaterialbases)){
|
if (!CollectionUtils.isEmpty(mdMeMaterialbases)){
|
||||||
@@ -446,22 +450,22 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
|||||||
//设备 A1_TW_
|
//设备 A1_TW_
|
||||||
workorder.setDevice_code(col);
|
workorder.setDevice_code(col);
|
||||||
}
|
}
|
||||||
if (j == 8) {
|
if (j == 9) {
|
||||||
//单重
|
//单重
|
||||||
BigDecimal bigDecimal = BigDecimal.valueOf(Double.valueOf(col) * 1000);
|
BigDecimal bigDecimal = BigDecimal.valueOf(Double.valueOf(col.equals("#N/A")?"0.05":col) * 1000);
|
||||||
workorder.setMaterial_weight(bigDecimal.setScale(3, RoundingMode.HALF_UP));
|
workorder.setMaterial_weight(bigDecimal.setScale(3, RoundingMode.HALF_UP));
|
||||||
}
|
}
|
||||||
if (j == 9) {
|
if (j == 10) {
|
||||||
persons.add(col);
|
persons.add(col);
|
||||||
workorder.setCurrent_produce_person_id(col);
|
workorder.setCurrent_produce_person_id(col);
|
||||||
}
|
}
|
||||||
if (j == 10) {
|
if (j == 11) {
|
||||||
workorder.setPlan_qty(new BigDecimal(Long.valueOf(col)));
|
workorder.setPlan_qty(new BigDecimal(Long.valueOf(col)));
|
||||||
}
|
}
|
||||||
if (j == 14) {
|
if (j == 15) {
|
||||||
workorder.setIs_needmove(col.equals("是") ? true : false);
|
workorder.setIs_needmove(col.equals("是") ? true : false);
|
||||||
}
|
}
|
||||||
if (j == 15) {
|
if (j == 16) {
|
||||||
workorder.setRemark(col);
|
workorder.setRemark(col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,5 +121,11 @@ public class SchBasePointController {
|
|||||||
basePointService.batchUpdateOne(form);
|
basePointService.batchUpdateOne(form);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/queryVehicle")
|
||||||
|
@Log("查询刻字点位")
|
||||||
|
@ApiOperation("查询点位")
|
||||||
|
public ResponseEntity<Object> queryVehicle(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(basePointService.queryVehicle(whereJson,page), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import java.util.Map;
|
|||||||
public interface ISchBasePointService extends IService<SchBasePoint> {
|
public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||||
|
|
||||||
Object queryAll(Map whereJson, PageQuery page);
|
Object queryAll(Map whereJson, PageQuery page);
|
||||||
|
Object queryVehicle(Map whereJson, PageQuery page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
|||||||
*/
|
*/
|
||||||
List<Map> queryAll(Map<String,Object> map);
|
List<Map> queryAll(Map<String,Object> map);
|
||||||
|
|
||||||
|
List<Map> queryVehicle(Map<String,Object> map);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点位管理页面查询
|
* 点位管理页面查询
|
||||||
* @param map
|
* @param map
|
||||||
|
|||||||
@@ -147,4 +147,58 @@
|
|||||||
AND sch_base_point.point_code IN ( ${points} )
|
AND sch_base_point.point_code IN ( ${points} )
|
||||||
GROUP BY sch_base_point.point_code
|
GROUP BY sch_base_point.point_code
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryVehicle" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
point.*,
|
||||||
|
d3.label as lock_type_name,
|
||||||
|
region.region_name,
|
||||||
|
ma.material_name,
|
||||||
|
ma.material_code,
|
||||||
|
ma.material_spec
|
||||||
|
FROM
|
||||||
|
sch_base_point point
|
||||||
|
LEFT JOIN SCH_BASE_Region region ON point.region_code = region.region_code
|
||||||
|
LEFT JOIN sys_dict d3 ON point.lock_type = d3.value and d3.code='d_lock_type'
|
||||||
|
LEFT JOIN md_pb_storagevehicleext vehicle ON vehicle.storagevehicle_code = point.vehicle_code
|
||||||
|
LEFT JOIN md_me_materialbase ma ON ma.material_id = vehicle.material_id
|
||||||
|
WHERE
|
||||||
|
point.is_delete = '0'
|
||||||
|
<if test="region_code != null and region_code != ''">
|
||||||
|
and point.region_code = #{region_code}
|
||||||
|
</if>
|
||||||
|
<if test="point_type != null and point_type != ''">
|
||||||
|
and point.point_type = #{point_type}
|
||||||
|
</if>
|
||||||
|
<if test="lock_type != null and lock_type != ''">
|
||||||
|
and point.lock_type = #{lock_type}
|
||||||
|
</if>
|
||||||
|
<if test="product_area != null and product_area != ''">
|
||||||
|
and point.product_area = #{product_area}
|
||||||
|
</if>
|
||||||
|
<if test="point_status != null and point_status != ''">
|
||||||
|
and point.point_status = #{point_status}
|
||||||
|
</if>
|
||||||
|
<if test="point_status == '00'">
|
||||||
|
and (point.vehicle_code is null or point.vehicle_code = '')
|
||||||
|
</if>
|
||||||
|
<if test="is_used != null and is_used != ''">
|
||||||
|
and point.is_used = #{is_used}
|
||||||
|
</if>
|
||||||
|
<if test="block_num != null and block_num != ''">
|
||||||
|
and point.block_num = #{block_num}
|
||||||
|
</if>
|
||||||
|
<if test="row_num != null and row_num != ''">
|
||||||
|
and point.row_num = #{row_num}
|
||||||
|
</if>
|
||||||
|
<if test="col_num != null and col_num != ''">
|
||||||
|
and point.col_num = #{col_num}
|
||||||
|
</if>
|
||||||
|
<if test="layer_num != null and layer_num != ''">
|
||||||
|
and point.layer_num = #{layer_num}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and ( point.point_code like '%${name}' or point.point_name like '%${name}' )
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import io.jsonwebtoken.lang.Assert;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.enums.StatusEnum;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
@@ -84,6 +85,24 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
|||||||
build.setTotalElements(page.getTotal());
|
build.setTotalElements(page.getTotal());
|
||||||
return build;
|
return build;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public Object queryVehicle(Map whereJson, PageQuery pageQuery) {
|
||||||
|
Page<Object> page = PageHelper.startPage(pageQuery.getPage()+1, pageQuery.getSize());
|
||||||
|
page.setOrderBy("point_code asc");
|
||||||
|
List<Map> list = schBasePointMapper.queryVehicle(whereJson);
|
||||||
|
list.forEach(a->{
|
||||||
|
a.put("point_status", StatusEnum.POINT_STATUS_EMPTY.getCode());
|
||||||
|
if (a.get("vehicle_code")!=null){
|
||||||
|
a.put("point_status",StatusEnum.POINT_STATUS_EMPTY_VEHICLE.getCode());
|
||||||
|
};
|
||||||
|
if (a.get("material_spec")!=null){
|
||||||
|
a.put("point_status",StatusEnum.POINT_STATUS_FULL.getCode());
|
||||||
|
};
|
||||||
|
});
|
||||||
|
TableDataInfo build = TableDataInfo.build(list);
|
||||||
|
build.setTotalElements(page.getTotal());
|
||||||
|
return build;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object selectPoint(Map query, PageQuery pageQuery) {
|
public Object selectPoint(Map query, PageQuery pageQuery) {
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, S
|
|||||||
.eq("region_code", region_code)
|
.eq("region_code", region_code)
|
||||||
.select("point_type_explain"));
|
.select("point_type_explain"));
|
||||||
JSONArray res = new JSONArray();
|
JSONArray res = new JSONArray();
|
||||||
if(ObjectUtil.isEmpty(region.getPoint_type_explain())) { return res; }
|
if(region==null||ObjectUtil.isEmpty(region.getPoint_type_explain())) { return res; }
|
||||||
String[] explain = region.getPoint_type_explain().split(",");
|
String[] explain = region.getPoint_type_explain().split(",");
|
||||||
for(int i = 0; i < explain.length; i++) {
|
for(int i = 0; i < explain.length; i++) {
|
||||||
String[] types = explain[i].split("-");
|
String[] types = explain[i].split("-");
|
||||||
@@ -148,7 +148,7 @@ public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, S
|
|||||||
SchBaseRegion region = this.getOne(new QueryWrapper<SchBaseRegion>()
|
SchBaseRegion region = this.getOne(new QueryWrapper<SchBaseRegion>()
|
||||||
.eq("region_code", region_code)
|
.eq("region_code", region_code)
|
||||||
.select("point_status_explain"));
|
.select("point_status_explain"));
|
||||||
if(ObjectUtil.isEmpty(region.getPoint_status_explain())) {
|
if(region==null || ObjectUtil.isEmpty(region.getPoint_status_explain())) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
String[] explain = region.getPoint_status_explain().split(",");
|
String[] explain = region.getPoint_status_explain().split(",");
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ public class StIvtMoreorlessdtlCpServiceImpl extends ServiceImpl<StIvtMoreorless
|
|||||||
new QueryWrapper<MdPbStoragevehicleinfo>().lambda()
|
new QueryWrapper<MdPbStoragevehicleinfo>().lambda()
|
||||||
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, row.getStoragevehicle_code())
|
.eq(MdPbStoragevehicleinfo::getStoragevehicle_code, row.getStoragevehicle_code())
|
||||||
.eq(MdPbStoragevehicleinfo::getIs_used, true)
|
.eq(MdPbStoragevehicleinfo::getIs_used, true)
|
||||||
.eq(MdPbStoragevehicleinfo::getIs_delete, false)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(vehicleDao)) throw new BadRequestException("载具不存在!");
|
if (ObjectUtil.isEmpty(vehicleDao)) throw new BadRequestException("载具不存在!");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -55,7 +55,6 @@
|
|||||||
highlight-current-row
|
highlight-current-row
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
|
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
|
||||||
@@ -85,8 +84,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
|
<MaterDtl
|
||||||
|
:dialog-show.sync="materialShow"
|
||||||
|
:is-single="true"
|
||||||
|
:mater-opt-code="materType"
|
||||||
|
@setMaterValue="setMaterValue"
|
||||||
|
/>
|
||||||
<pagination />
|
<pagination />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -96,12 +102,13 @@ import CRUD, { presenter, header, form } from '@crud/crud'
|
|||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
|
|
||||||
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SKdevice',
|
name: 'SKdevice',
|
||||||
components: { crudOperation, pagination, rrOperation },
|
components: { crudOperation, pagination, rrOperation, MaterDtl },
|
||||||
dicts: ['product_area'],
|
dicts: ['product_area'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return [
|
return [
|
||||||
@@ -111,6 +118,7 @@ export default {
|
|||||||
mixins: [presenter(), header(), form(defaultForm)],
|
mixins: [presenter(), header(), form(defaultForm)],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
materType: '',
|
||||||
materialShow: false,
|
materialShow: false,
|
||||||
queryTypeOptions: [
|
queryTypeOptions: [
|
||||||
{ key: 'name', display_name: '字典名称' },
|
{ key: 'name', display_name: '字典名称' },
|
||||||
@@ -129,6 +137,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setMaterValue(row) {
|
||||||
|
this.nowrow.material_id = row.material_id
|
||||||
|
this.nowrow.material_code = row.material_code
|
||||||
|
this.nowrow.material_name = row.material_name
|
||||||
|
this.nowrow.material_spec = row.material_spec
|
||||||
|
this.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||||
|
},
|
||||||
queryMater(index, row) {
|
queryMater(index, row) {
|
||||||
this.materialShow = true
|
this.materialShow = true
|
||||||
this.nowindex = index
|
this.nowindex = index
|
||||||
|
|||||||
@@ -68,6 +68,40 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync=dialogVisible
|
||||||
|
title="载具物料信息"
|
||||||
|
width="540px"
|
||||||
|
@close="materiValueCancel()"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||||
|
<el-form-item label="载具编码" prop="vehicle_code">
|
||||||
|
<el-input v-model="materialForm.storagevehicle_code" disabled style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码" prop="material_code">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="materialForm.material_code" clearable style="width: 370px">
|
||||||
|
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料规格" prop="material_spec">
|
||||||
|
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料数量" prop="storage_qty">
|
||||||
|
<el-input v-model="materialForm.storage_qty" clearable style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料重量" prop="weight">
|
||||||
|
<el-input v-model="materialForm.weight" clearable style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||||
|
<el-button type="primary" @click="materiValueSubmit()">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:before-close="crud.cancelCU"
|
:before-close="crud.cancelCU"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@@ -123,7 +157,11 @@
|
|||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识" />
|
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识" />
|
||||||
<el-table-column prop="storagevehicle_type_name" label="载具类型" />
|
<el-table-column prop="storagevehicle_type_name" label="载具类型" />
|
||||||
<el-table-column prop="storagevehicle_code" label="载具编码" />
|
<el-table-column prop="storagevehicle_code" label="载具编码" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="toView(scope.row.storagevehicle_code)">{{ scope.row.storagevehicle_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="storagevehicle_name" label="载具名称" />
|
<el-table-column prop="storagevehicle_name" label="载具名称" />
|
||||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -154,19 +192,27 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
|
<MaterDtl
|
||||||
|
:dialog-show.sync="materialShow"
|
||||||
|
:is-single="true"
|
||||||
|
:mater-opt-code="materType"
|
||||||
|
@setMaterValue="setMaterValue"
|
||||||
|
/>
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudStoragevehicleinfo from '@/api/wms/basedata/master/storagevehicleinfo'
|
import crudStoragevehicleinfo from '@/views/wms/masterdata_manage/master/storagevehicleinfo/storagevehicleinfo'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||||
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
storagevehicle_id: null,
|
storagevehicle_id: null,
|
||||||
@@ -195,7 +241,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'Storagevehicleinfo',
|
name: 'Storagevehicleinfo',
|
||||||
dicts: ['storagevehicle_type'],
|
dicts: ['storagevehicle_type'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -224,6 +270,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
materType:'',
|
||||||
|
materialShow: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
materialForm: {},
|
||||||
resultCodeArr: [],
|
resultCodeArr: [],
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
@@ -263,6 +313,30 @@ export default {
|
|||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
queryMater(index, row) {
|
||||||
|
this.materialShow = true
|
||||||
|
this.nowindex = index
|
||||||
|
this.nowrow = row
|
||||||
|
},
|
||||||
|
setMaterValue(row) {
|
||||||
|
this.materialForm.material_id = row.material_id
|
||||||
|
this.materialForm.material_code = row.material_code
|
||||||
|
this.materialForm.material_name = row.material_name
|
||||||
|
this.materialForm.material_spec = row.material_spec
|
||||||
|
},
|
||||||
|
materiValueCancel(){
|
||||||
|
this.materialForm = {}
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
materiValueSubmit(){
|
||||||
|
console.log(this.materialForm)
|
||||||
|
crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.materiValueCancel()
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
hand(value) {
|
hand(value) {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
@@ -308,6 +382,12 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
toView(row) {
|
||||||
|
crudStoragevehicleinfo.vehileInfo(row).then(data => {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.materialForm = data
|
||||||
|
})
|
||||||
|
},
|
||||||
addAndprint() {
|
addAndprint() {
|
||||||
const data = this.form
|
const data = this.form
|
||||||
if (!this.form.storagevehicle_type) {
|
if (!this.form.storagevehicle_type) {
|
||||||
|
|||||||
@@ -38,5 +38,19 @@ export function getVehicle(code) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function vehileInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/storagevehicleinfo/vehicleInfo?vehicle_code='+data,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default { add, edit, del, changeActive, getVehicle }
|
export function updateVehicleMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/storagevehicleinfo/updateVehicleMaterial',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, changeActive, getVehicle, vehileInfo, updateVehicleMaterial }
|
||||||
@@ -227,6 +227,7 @@ export default {
|
|||||||
produce_date: date,
|
produce_date: date,
|
||||||
plan_qty: '',
|
plan_qty: '',
|
||||||
real_qty: '',
|
real_qty: '',
|
||||||
|
is_used_fxx: false,
|
||||||
report_qty: '',
|
report_qty: '',
|
||||||
material_id: '',
|
material_id: '',
|
||||||
material_code: '',
|
material_code: '',
|
||||||
|
|||||||
@@ -363,6 +363,15 @@
|
|||||||
>{{ item.label }}
|
>{{ item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-show="form.workprocedure_id == '1535144822984282112'" label="是否启用封箱线" prop="is_used_fxx">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in dict.IS_OR_NOT"
|
||||||
|
:key="item.id"
|
||||||
|
v-model="form.is_used_fxx"
|
||||||
|
:label="item.value"
|
||||||
|
>{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
@@ -495,6 +504,7 @@ const defaultForm = {
|
|||||||
device_code: null,
|
device_code: null,
|
||||||
current_produce_person_id: null,
|
current_produce_person_id: null,
|
||||||
is_canupdate_update: null,
|
is_canupdate_update: null,
|
||||||
|
is_used_fxx: false,
|
||||||
workorder_status: null,
|
workorder_status: null,
|
||||||
is_needmove: null,
|
is_needmove: null,
|
||||||
sale_id: null,
|
sale_id: null,
|
||||||
@@ -604,7 +614,7 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
getNotWorkDeviceByWorkproceduceId(workprocedure_id) { // 根据工序标识获取设备列表
|
getNotWorkDeviceByWorkproceduceId(workprocedure_id) { // 根据工序标识获取设备列表
|
||||||
crudProduceshiftorder.getNotWorkDeviceByWorkproceduceId({ workprocedure_id: workprocedure_id }).then(res => {
|
crudProduceshiftorder.getNotWorkDeviceByWorkproceduceId({ workprocedure_id: workprocedure_id,product_area:this.form.product_area }).then(res => {
|
||||||
this.deviceList = res.content
|
this.deviceList = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,144 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="点位详情"
|
||||||
|
append-to-body
|
||||||
|
fullscreen
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
@open="open"
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<el-card class="box-card" shadow="never">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span style="font-weight: bold;font-size: 15px;">点位信息:</span>
|
||||||
|
<!-- <el-button style="float: right; padding: 3px 10px;" type="text">操作按钮</el-button>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form ref="form" disabled :inline="true" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||||
|
<el-form-item label="区域编码">
|
||||||
|
<el-input v-model="form.region_code" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="区域名称">
|
||||||
|
<el-input v-model="form.region_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="点位编码">
|
||||||
|
<el-input v-model="form.point_code" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位名称">
|
||||||
|
<el-input v-model="form.point_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位类型">
|
||||||
|
<el-input v-model="form.point_type_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态">
|
||||||
|
<el-input v-model="form.point_status_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="锁定类型">
|
||||||
|
<el-input v-model="form.lock_type_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具类型">
|
||||||
|
<el-input v-model="form.lock_type_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具编码">
|
||||||
|
<el-input v-model="form.vehicle_code" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="载具数量">
|
||||||
|
<el-input v-model="form.vehicle_qty" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span style="font-weight: bold;font-size: 15px;">载具物料信息:</span>
|
||||||
|
</div>
|
||||||
|
<el-form ref="form" :inline="true" :model="form2" :rules="rules" size="mini" label-width="100px">
|
||||||
|
<el-form-item label="物料编号">
|
||||||
|
<el-input v-model="form2.material_code" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称">
|
||||||
|
<el-input v-model="form2.material_name" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="物料规格">
|
||||||
|
<el-input v-model="form2.material_spec" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料批次">
|
||||||
|
<el-input v-model="form2.pcsn" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料数量">
|
||||||
|
<el-input v-model="form2.storage_qty" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料重量">
|
||||||
|
<el-input v-model="form2.weight" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { crud } from '@crud/crud'
|
||||||
|
import crudDevice from '@/views/wms/staging_manage/staging/kzStaging/kzStaging.js'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ViewDialog',
|
||||||
|
components: {},
|
||||||
|
dicts: [],
|
||||||
|
mixins: [crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
classes3: [],
|
||||||
|
parentData: {},
|
||||||
|
form: {},
|
||||||
|
form2: {},
|
||||||
|
workprocedureList: [],
|
||||||
|
tableData: [],
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
},
|
||||||
|
setParentData(parentData) {
|
||||||
|
if (parentData) {
|
||||||
|
this.form = parentData
|
||||||
|
crudDevice.vehileInfo(parentData.vehicle_code).then(data => {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.form2 = data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
::v-deep .el-card__header {
|
||||||
|
padding: 5px 0 5px 10px;
|
||||||
|
background-color: #f8f8f9;
|
||||||
|
}
|
||||||
|
::v-deep .el-card__body {
|
||||||
|
padding: 10px 0 10px 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
269
mes/qd/src/views/wms/staging_manage/staging/kzStaging/index.vue
Normal file
269
mes/qd/src/views/wms/staging_manage/staging/kzStaging/index.vue
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--表单组件-->
|
||||||
|
<!-- 字典列表 -->
|
||||||
|
<el-card class="box-card">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="90px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="生产车间">
|
||||||
|
<el-select
|
||||||
|
v-model="form.product_area"
|
||||||
|
placeholder=""
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.product_area"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="设备编号模糊查询"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编号">
|
||||||
|
<rrOperation :permission="permission" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<crudOperation v-show="false" :permission="permission" />
|
||||||
|
</div>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync=dialogVisible
|
||||||
|
title="载具物料信息"
|
||||||
|
width="540px"
|
||||||
|
@close="materiValueCancel()"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||||
|
<el-form-item label="载具编码" prop="vehicle_code">
|
||||||
|
<el-input v-model="materialForm.storagevehicle_code" disabled style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码" prop="material_code">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="materialForm.material_code" clearable style="width: 370px">
|
||||||
|
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料规格" prop="material_spec">
|
||||||
|
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料数量" prop="storage_qty">
|
||||||
|
<el-input v-model="materialForm.storage_qty" clearable style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料重量" prop="weight">
|
||||||
|
<el-input v-model="materialForm.weight" clearable style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="materiValueCancel()">取消</el-button>
|
||||||
|
<el-button type="primary" @click="materiValueSubmit()">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- <el-dialog-->
|
||||||
|
<!-- :close-on-click-modal="false"-->
|
||||||
|
<!-- :before-close="crud.cancelCU"-->
|
||||||
|
<!-- :visible.sync="crud.status.cu > 0"-->
|
||||||
|
<!-- :title="crud.status.title"-->
|
||||||
|
<!-- width="710px"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="120px">-->
|
||||||
|
<!-- <el-form-item label="载具编码">-->
|
||||||
|
<!-- <el-input v-model="form.vehicle_code" style="width: 200px;" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="点位状态">-->
|
||||||
|
<!-- <el-input v-model="form.point_status" style="width: 200px;" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="锁定状态">-->
|
||||||
|
<!-- <el-input v-model="form.lock_type" style="width: 200px;" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<!-- <div slot="footer" class="dialog-footer">-->
|
||||||
|
<!-- <el-button type="text" @click="crud.cancelCU">取消</el-button>-->
|
||||||
|
<!-- <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-dialog>-->
|
||||||
|
|
||||||
|
<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="point_code" label="点位编码" sortable width="120" show-overflow-tooltip >
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.point_code }}</el-link>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="point_name" label="点位名称" width="150" sortable show-overflow-tooltip />
|
||||||
|
<el-table-column prop="region_name" label="区域名称" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="point_status" label="点位状态" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.point_status == '2' ? '有料' : scope.row.point_status == '3'?'空载具':'空位' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="lock_type_name" label="锁定类型" />
|
||||||
|
<el-table-column prop="vehicle_code" label="载具编码" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="toView(scope.row.vehicle_code)">{{ scope.row.vehicle_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" />
|
||||||
|
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="is_used" label="是否启用">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.is_used == '1' ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="update_name" label="修改人" />
|
||||||
|
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||||
|
<!-- <el-table-column-->
|
||||||
|
<!-- v-permission="[]"-->
|
||||||
|
<!-- label="操作"-->
|
||||||
|
<!-- fixed="right"-->
|
||||||
|
<!-- width="120px"-->
|
||||||
|
<!-- align="center"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- <udOperation-->
|
||||||
|
<!-- :data="scope.row"-->
|
||||||
|
<!-- :permission="permission"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<MaterDtl
|
||||||
|
:dialog-show.sync="materialShow"
|
||||||
|
:is-single="true"
|
||||||
|
:mater-opt-code="materType"
|
||||||
|
@setMaterValue="setMaterValue"
|
||||||
|
/>
|
||||||
|
<pagination />
|
||||||
|
</el-card>
|
||||||
|
<ViewDialog ref="viewDialog" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudDevice from '@/views/wms/staging_manage/staging/kzStaging/kzStaging.js'
|
||||||
|
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'
|
||||||
|
import ViewDialog from '@/views/wms/staging_manage/staging/kzStaging/ViewDialog'
|
||||||
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
|
import crudStoragevehicleinfo from '@/views/wms/masterdata_manage/master/storagevehicleinfo/storagevehicleinfo'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const defaultForm = { product_area: 'A1', region_code: 'A1_KZHC', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SKdevice',
|
||||||
|
components: { crudOperation, pagination, udOperation, rrOperation, ViewDialog, MaterDtl },
|
||||||
|
dicts: ['product_area'],
|
||||||
|
cruds() {
|
||||||
|
return [
|
||||||
|
CRUD({ title: '刻字缓存区', url: 'api/point/queryVehicle', query: { product_area: 'A1', region_code: 'A1_KZHC' }, idField: 'device_code', crudMethod: { ...crudDevice }})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header(), form(defaultForm)],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
materialForm:{},
|
||||||
|
materType:'',
|
||||||
|
materialShow: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
queryTypeOptions: [
|
||||||
|
{ key: 'name', display_name: '字典名称' },
|
||||||
|
{ key: 'description', display_name: '描述' }
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
material_spec: [
|
||||||
|
{ required: true, message: '请输入编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
permission: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setMaterValue(row) {
|
||||||
|
this.materialForm.material_id = row.material_id
|
||||||
|
this.materialForm.material_code = row.material_code
|
||||||
|
this.materialForm.material_name = row.material_name
|
||||||
|
this.materialForm.material_spec = row.material_spec
|
||||||
|
},
|
||||||
|
mclearable(){
|
||||||
|
this.materialForm.material_id = ''
|
||||||
|
this.materialForm.material_code = ''
|
||||||
|
this.materialForm.material_name = ''
|
||||||
|
},
|
||||||
|
materiValueCancel(){
|
||||||
|
this.materialForm = {}
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
materiValueSubmit(){
|
||||||
|
console.log(this.materialForm)
|
||||||
|
crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.materiValueCancel()
|
||||||
|
this.crud.refresh()
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toView(row) {
|
||||||
|
crudStoragevehicleinfo.vehileInfo(row).then(data => {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.materialForm = data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toViewOption(row) {
|
||||||
|
if (row) {
|
||||||
|
this.$refs.viewDialog.setParentData(row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryMater(index, row) {
|
||||||
|
this.materialShow = true
|
||||||
|
this.nowindex = index
|
||||||
|
this.nowrow = row
|
||||||
|
},
|
||||||
|
updateSKMaterial(row) {
|
||||||
|
crudDevice.edit(row).then(() => {
|
||||||
|
this.notify('保存成功', 'success')
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function findPoints(area_type) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point/area_type/' + area_type
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changeActive(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point/changeActive',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPoint(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/point/getPoint',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRegion() {
|
||||||
|
return request({
|
||||||
|
url: '/api/point/getRegion',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function changeUsed(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point/changeUsed',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function vehileInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/storagevehicleinfo/vehicleInfo?vehicle_code='+data,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed, vehileInfo }
|
||||||
156
mes/qd/src/views/wms/staging_manage/staging/kzStaging/备份.vue
Normal file
156
mes/qd/src/views/wms/staging_manage/staging/kzStaging/备份.vue
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--表单组件-->
|
||||||
|
<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="code">
|
||||||
|
<el-input v-model="form.material_spec" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工序调度编号">
|
||||||
|
<el-input v-model="form.process_id" style="width: 370px;" />
|
||||||
|
</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-card class="box-card">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="设备编号模糊查询"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
<rrOperation :permission="permission" />
|
||||||
|
</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 type="selection" width="55" />
|
||||||
|
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="device_code" label="设备编码" width="100px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_id" label="物料id" width="200px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.material_id">
|
||||||
|
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="material_name" label="物料名称" width="200px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" width="200px" show-overflow-toolti />
|
||||||
|
<el-table-column prop="deviceinstor_qty" label="物料数量(个)" align="center" width="120px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.deviceinstor_qty" /></template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="deviceinstor_weight" label="物料重量(g)" align="center" width="120px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.deviceinstor_weight" /></template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="150px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="updateSKMaterial(scope.row)">提交修改</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<MaterDtl
|
||||||
|
:dialog-show.sync="materialShow"
|
||||||
|
:is-single="true"
|
||||||
|
:mater-opt-code="materType"
|
||||||
|
@setMaterValue="setMaterValue"
|
||||||
|
/>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudDevice from '@/views/wms/device_manage/deviceMaterial/deviceMaterial.js'
|
||||||
|
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 MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
|
|
||||||
|
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SKdevice',
|
||||||
|
components: { crudOperation, pagination, rrOperation, MaterDtl },
|
||||||
|
cruds() {
|
||||||
|
return [
|
||||||
|
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice }})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header(), form(defaultForm)],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
materialShow: false,
|
||||||
|
queryTypeOptions: [
|
||||||
|
{ key: 'name', display_name: '字典名称' },
|
||||||
|
{ key: 'description', display_name: '描述' }
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
material_spec: [
|
||||||
|
{ required: true, message: '请输入编码', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
permission: {
|
||||||
|
add: ['admin', 'dict:add'],
|
||||||
|
edit: ['admin', 'dict:edit'],
|
||||||
|
del: ['admin', 'dict:del']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
queryMater(index, row) {
|
||||||
|
this.materialShow = true
|
||||||
|
this.nowindex = index
|
||||||
|
this.nowrow = row
|
||||||
|
},
|
||||||
|
updateSKMaterial(row) {
|
||||||
|
crudDevice.edit(row).then(() => {
|
||||||
|
this.notify('保存成功', 'success')
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setMaterValue(row) {
|
||||||
|
this.nowrow.material_id = row.material_id
|
||||||
|
this.nowrow.material_code = row.material_code
|
||||||
|
this.nowrow.material_name = row.material_name
|
||||||
|
this.nowrow.material_spec = row.material_spec
|
||||||
|
this.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user