rev:优化修改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.basedata_manage.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
@@ -61,4 +62,10 @@ public class DeviceInfoController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getDevice")
|
||||
@Log("查询设备")
|
||||
public ResponseEntity<Object> getDevice(@RequestBody JSONObject jsonObject) {
|
||||
return new ResponseEntity<>(iEmBiDeviceinfoService.getDevice(jsonObject),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.basedata_manage.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -13,8 +14,10 @@ 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.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -101,4 +104,11 @@ public class GroupController {
|
||||
iMdPbGroupplateService.printDelete(dto);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/importExcel")
|
||||
@Log("导入数据")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> importExcel(@RequestParam("file") MultipartFile file, HttpServletRequest request) {
|
||||
return new ResponseEntity<>(iMdPbGroupplateService.importExcel(file, request),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package org.nl.wms.basedata_manage.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dao.EmBiDeviceinfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -44,4 +46,10 @@ public interface IEmBiDeviceinfoService extends IService<EmBiDeviceinfo> {
|
||||
*/
|
||||
void delete(Set<String> ids);
|
||||
|
||||
/**
|
||||
* 查询设备
|
||||
* @param jsonObject {}
|
||||
* @return List<EmBiDeviceinfo>
|
||||
*/
|
||||
List<EmBiDeviceinfo> getDevice(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,12 @@ public interface IMdCsSupplierbaseService extends IService<MdCsSupplierbase> {
|
||||
*/
|
||||
void update(MdCsSupplierbase dto);
|
||||
|
||||
/**
|
||||
* 根据编码获取供应商
|
||||
* @param supp_code 供应商编码
|
||||
*/
|
||||
MdCsSupplierbase getByCode(String supp_code);
|
||||
|
||||
/**
|
||||
* 删除供应商
|
||||
* @param ids 供应商标识集合
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface MdPbStoragevehicleextMapper extends BaseMapper<MdPbStoragevehic
|
||||
* @param material_id
|
||||
* @return
|
||||
*/
|
||||
BigDecimal queryCanuseSum(@Param("pcsn") String pcsn, @Param("material_id") String material_id, @Param("sect_code") String sect_code);
|
||||
BigDecimal queryCanuseSum(@Param("pcsn") String pcsn, @Param("material_id") String material_id, @Param("sect_code") String sect_code, @Param("device_code") String device_code);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -71,7 +71,7 @@ public interface MdPbStoragevehicleextMapper extends BaseMapper<MdPbStoragevehic
|
||||
* @param material_id
|
||||
* @return
|
||||
*/
|
||||
List<MdPbStoragevehicleextDto> queryOutAllocation(@Param("pcsn") String pcsn,@Param("material_id") String material_id,@Param("sect_code") String sect_code);
|
||||
List<MdPbStoragevehicleextDto> queryOutAllocation(@Param("pcsn") String pcsn,@Param("material_id") String material_id,@Param("sect_code") String sect_code, @Param("device_code") String device_code);
|
||||
|
||||
/**
|
||||
* 手持出库确认查询明细
|
||||
|
||||
@@ -183,11 +183,15 @@
|
||||
SUM(canuse_qty)
|
||||
FROM
|
||||
md_pb_storagevehicleext ex
|
||||
LEFT JOIN st_ivt_structattr st on ex.storagevehicle_code = st.storagevehicle_code
|
||||
INNER JOIN md_pb_groupplate late on late.material_id = ex.material_id and late.storagevehicle_code = ex.storagevehicle_code
|
||||
AND ex.pcsn = late.pcsn
|
||||
INNER JOIN st_ivt_structattr st on ex.storagevehicle_code = st.storagevehicle_code
|
||||
<where>
|
||||
ex.material_id = #{material_id}
|
||||
AND
|
||||
st.lock_type = 0
|
||||
AND
|
||||
late.status = '2'
|
||||
<if test="pcsn!= null and pcsn!= ''">
|
||||
AND
|
||||
ex.pcsn = #{pcsn}
|
||||
@@ -197,6 +201,11 @@
|
||||
AND
|
||||
st.sect_id = #{sect_code}
|
||||
</if>
|
||||
|
||||
<if test="device_code!= null and device_code!= ''">
|
||||
AND
|
||||
late.device_code = #{device_code}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -229,6 +238,10 @@
|
||||
AND
|
||||
st.sect_id = #{sect_code}
|
||||
</if>
|
||||
<if test="device_code!= null and device_code!= ''">
|
||||
AND
|
||||
late.device_code = #{device_code}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY quality_day,ex.insert_time,ex.canuse_qty
|
||||
</select>
|
||||
@@ -322,13 +335,16 @@
|
||||
attr.struct_code,
|
||||
attr.struct_name,
|
||||
mater.material_code,
|
||||
mater.material_name
|
||||
mater.material_name,
|
||||
late.device_code
|
||||
FROM
|
||||
md_pb_storagevehicleext ext
|
||||
INNER JOIN st_ivt_structattr attr ON ext.storagevehicle_code = attr.storagevehicle_code
|
||||
INNER JOIN md_me_materialbase mater ON mater.material_id = ext.material_id
|
||||
INNER JOIN md_pb_groupplate late ON ext.storagevehicle_code = late.storagevehicle_code
|
||||
AND late.material_id = ext.material_id AND late.pcsn = ext.pcsn
|
||||
<where>
|
||||
1 = 1
|
||||
late.status = '2'
|
||||
<if test="params.stor_id != null and params.stor_id != ''">
|
||||
AND
|
||||
attr.stor_id = #{params.stor_id}
|
||||
@@ -353,6 +369,11 @@
|
||||
AND
|
||||
ext.pcsn LIKE #{params.pcsn}
|
||||
</if>
|
||||
|
||||
<if test="params.device_code != null and params.device_code != ''">
|
||||
AND
|
||||
late.device_code = #{params.device_code}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY ext.insert_time
|
||||
</select>
|
||||
|
||||
@@ -45,4 +45,9 @@ public class MdPbStoragevehicleextDto extends MdPbStoragevehicleext{
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* 机台拜纳姆
|
||||
*/
|
||||
private String device_code;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.basedata_manage.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -16,9 +17,11 @@ import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.basedata_manage.service.IEmBiDeviceinfoService;
|
||||
import org.nl.wms.basedata_manage.service.dao.EmBiDeviceinfo;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.EmBiDeviceinfoMapper;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -93,4 +96,15 @@ public class EmBiDeviceinfoServiceImpl extends ServiceImpl<EmBiDeviceinfoMapper,
|
||||
public void delete(Set<String> ids) {
|
||||
this.baseMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EmBiDeviceinfo> getDevice(JSONObject jsonObject) {
|
||||
String device_code = jsonObject.getString("device_code");
|
||||
return this.baseMapper.selectList(
|
||||
new QueryWrapper<EmBiDeviceinfo>().lambda()
|
||||
.eq(EmBiDeviceinfo::getIs_delete, IOSConstant.ZERO)
|
||||
.eq(EmBiDeviceinfo::getIs_used, IOSConstant.ONE)
|
||||
.eq(ObjectUtil.isNotEmpty(device_code), EmBiDeviceinfo::getDevice_code, device_code)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.basedata_manage.service.IMdCsSupplierbaseService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdCsSupplierbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdCsSupplierbaseMapper;
|
||||
import org.nl.wms.warehouse_management.enums.IOSConstant;
|
||||
import org.nl.wms.warehouse_management.enums.IOSEnum;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -88,6 +90,21 @@ public class MdCsSupplierbaseServiceImpl extends ServiceImpl<MdCsSupplierbaseMap
|
||||
this.updateById(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MdCsSupplierbase getByCode(String supp_code) {
|
||||
MdCsSupplierbase mdCsSupplierbase = this.baseMapper.selectOne(
|
||||
new QueryWrapper<MdCsSupplierbase>().lambda()
|
||||
.eq(MdCsSupplierbase::getSupp_code, supp_code)
|
||||
.eq(MdCsSupplierbase::getIs_delete, IOSConstant.ZERO)
|
||||
.eq(MdCsSupplierbase::getIs_used, IOSConstant.ONE)
|
||||
);
|
||||
|
||||
if (ObjectUtil.isEmpty(mdCsSupplierbase)) {
|
||||
throw new BadRequestException("供应商编码为【"+supp_code+"】不存在!");
|
||||
}
|
||||
return mdCsSupplierbase;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(Set<String> ids) {
|
||||
|
||||
@@ -205,6 +205,9 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
IOSEnum.SECT_CODE.code("待检区"),IOSEnum.SECT_CODE.code("大料箱区"),
|
||||
IOSEnum.SECT_CODE.code("不合格区")
|
||||
)
|
||||
.in(bill_type.equals(IOSEnum.OUT_BILL_TYPE.code("质检出库")),Sectattr::getSect_code,
|
||||
IOSEnum.SECT_CODE.code("待检区"),IOSEnum.SECT_CODE.code("大料箱区")
|
||||
)
|
||||
);
|
||||
|
||||
if (!sectattrList.isEmpty()) {
|
||||
|
||||
@@ -53,4 +53,11 @@ public class PdaInGroupBoxController {
|
||||
return new ResponseEntity<>(pdaInGroupBoxService.queryPcsn(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryDevice")
|
||||
@Log("入库组盘查设备编码下拉框")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryDevice() {
|
||||
return new ResponseEntity<>(pdaInGroupBoxService.queryDevice(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,4 +53,10 @@ public interface PdaInGroupBoxService {
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryPcsn();
|
||||
|
||||
/**
|
||||
* 入库组盘查设备编码下拉框
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryDevice();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.basedata_manage.service.IEmBiDeviceinfoService;
|
||||
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
|
||||
import org.nl.wms.basedata_manage.service.dao.EmBiDeviceinfo;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.pda.general_management.service.PdaInGroupBoxService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
@@ -52,6 +54,12 @@ public class PdaInGroupBoxServiceImpl implements PdaInGroupBoxService {
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
|
||||
|
||||
/**
|
||||
* 设备服务
|
||||
*/
|
||||
@Autowired
|
||||
private IEmBiDeviceinfoService iEmBiDeviceinfoService;
|
||||
|
||||
@Override
|
||||
public PdaResponse confirmBox(JSONObject whereJson) {
|
||||
GroupPlate groupPlate = JSONObject.parseObject(JSON.toJSONString(whereJson), GroupPlate.class);
|
||||
@@ -134,4 +142,20 @@ public class PdaInGroupBoxServiceImpl implements PdaInGroupBoxService {
|
||||
|
||||
return PdaResponse.requestParamOk(resultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse queryDevice() {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
||||
List<EmBiDeviceinfo> deviceList = iEmBiDeviceinfoService.getDevice(jsonObject);
|
||||
|
||||
List<JSONObject> resultList = new ArrayList<>();
|
||||
deviceList.forEach(row -> {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("text", row.getDevice_code());
|
||||
json.put("value", row.getDevice_code());
|
||||
resultList.add(json);
|
||||
});
|
||||
return PdaResponse.requestParamOk(resultList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,5 +124,5 @@ public class IOSConstant {
|
||||
/**
|
||||
* 物料id:焊丝(盘状)
|
||||
*/
|
||||
public final static String MATERIAL_HS_PZ = "19456870186461192161";
|
||||
public final static String MATERIAL_HS_PZ = "1999384605630795776";
|
||||
}
|
||||
|
||||
@@ -7,7 +7,10 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdCsSupplierbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.warehouse_management.service.dao.GroupPlate;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -93,4 +96,11 @@ public interface IMdPbGroupplateService extends IService<GroupPlate> {
|
||||
*/
|
||||
void printDelete(GroupPlate dto);
|
||||
|
||||
/**
|
||||
* 导入excel
|
||||
* @param file : 文件
|
||||
* @param request post请求
|
||||
* @return ArrayList<JSONObject>
|
||||
*/
|
||||
ArrayList<JSONObject> importExcel(MultipartFile file, HttpServletRequest request);
|
||||
}
|
||||
|
||||
@@ -129,4 +129,9 @@ public class GroupPlate implements Serializable {
|
||||
* 打印标签后是否删除
|
||||
*/
|
||||
private String is_need_delete;
|
||||
|
||||
/**
|
||||
* 机台编码
|
||||
*/
|
||||
private String device_code;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.nl.wms.warehouse_management.service.impl;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.poi.excel.ExcelReader;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -30,11 +32,13 @@ import org.nl.wms.warehouse_management.service.dto.GroupPlateDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -173,4 +177,62 @@ public class MdPbGroupplateServiceImpl extends ServiceImpl<MdPbGroupplateMapper,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ArrayList<JSONObject> importExcel(MultipartFile file, HttpServletRequest request) {
|
||||
// 1.获取上传文件输入流
|
||||
InputStream inputStream = null;
|
||||
|
||||
try {
|
||||
inputStream = file.getInputStream();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
ExcelReader excelReader = ExcelUtil.getReader(inputStream);
|
||||
List<List<Object>> read = excelReader.read(0, excelReader.getRowCount());
|
||||
|
||||
for (int i = 0; i < read.size(); i++) {
|
||||
List list = read.get(i);
|
||||
// 载具编码
|
||||
String storagevehicle_code = list.get(0).toString();
|
||||
// 物料编码
|
||||
String material_code = list.get(1).toString();
|
||||
// 批次
|
||||
String pcsn = list.get(2).toString();
|
||||
// 组盘数量
|
||||
String qty = list.get(3).toString();
|
||||
// 备注
|
||||
String remark = list.get(4).toString();
|
||||
// 供应商编码
|
||||
String supp_code = list.get(5).toString();
|
||||
// 生产日期
|
||||
String produce_time = list.get(6).toString();
|
||||
// 烘干次数
|
||||
String bake_num = list.get(7).toString();
|
||||
// 品质类型
|
||||
String quality_type = list.get(8).toString();
|
||||
// 料箱类型
|
||||
String box_type = list.get(9).toString();
|
||||
// 机台编码
|
||||
String device_code = list.get(10).toString();
|
||||
|
||||
GroupPlate groupPlate = new GroupPlate();
|
||||
groupPlate.setStoragevehicle_code(storagevehicle_code);
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getByCode(material_code);
|
||||
groupPlate.setMaterial_id(materDao.getMaterial_id());
|
||||
groupPlate.setPcsn(pcsn);
|
||||
groupPlate.setQty(BigDecimal.valueOf(Double.parseDouble(qty)));
|
||||
groupPlate.setRemark(remark);
|
||||
MdCsSupplierbase suppDao = iMdCsSupplierbaseService.getByCode(supp_code);
|
||||
groupPlate.setSupp_code(suppDao.getSupp_code());
|
||||
groupPlate.setProduce_time(produce_time);
|
||||
groupPlate.setBake_num(Integer.parseInt(bake_num));
|
||||
groupPlate.setQuality_type(quality_type);
|
||||
groupPlate.setBox_type(box_type);
|
||||
groupPlate.setDevice_code(device_code);
|
||||
this.create(groupPlate);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,11 @@ import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
|
||||
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
|
||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
||||
import org.nl.wms.basedata_manage.service.dao.BsrealStorattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicleextMapper;
|
||||
import org.nl.wms.basedata_manage.service.dto.MdPbStoragevehicleextDto;
|
||||
@@ -158,6 +160,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
@Resource
|
||||
private IPdmBomCallMaterialDtlService iPdmBomCallMaterialDtlService;
|
||||
|
||||
/**
|
||||
* 物料服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
|
||||
|
||||
@Override
|
||||
public IPage<IOStorInv> pageQuery(Map whereJson, PageQuery page, String[] stor_id, String[] bill_status, String[] bill_type) {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
@@ -437,7 +445,19 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
sect_code = IOSConstant.SECT_CODE_HG;
|
||||
}
|
||||
|
||||
BigDecimal canuseSum = mdPbStoragevehicleextMapper.queryCanuseSum(pcsn, material_id, sect_code);
|
||||
String device_code = "";
|
||||
if (ObjectUtil.isNotEmpty(dtl.getSource_billdtl_id())) {
|
||||
if (ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("领料出库"))
|
||||
|| ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("烘干出库"))
|
||||
) {
|
||||
// 查询工单信息
|
||||
PdmBomCallMaterial callDao = iPdmBomCallMaterialService.getById(dtl.getSource_billdtl_id());
|
||||
if (ObjectUtil.isNotEmpty(callDao)) {
|
||||
device_code = callDao.getDevice_code();
|
||||
}
|
||||
}
|
||||
}
|
||||
BigDecimal canuseSum = mdPbStoragevehicleextMapper.queryCanuseSum(pcsn, material_id, sect_code, device_code);
|
||||
|
||||
if (ObjectUtil.isEmpty(canuseSum) || canuseSum.doubleValue() < unassign_qty) {
|
||||
throw new BadRequestException("物料编号:" + dtl.getMaterial_code() + "出库分配数量不满足");
|
||||
@@ -451,7 +471,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
*/
|
||||
|
||||
//出库分配查询货位信息
|
||||
List<MdPbStoragevehicleextDto> outAllocationList = mdPbStoragevehicleextMapper.queryOutAllocation(pcsn, material_id, sect_code);
|
||||
List<MdPbStoragevehicleextDto> outAllocationList = mdPbStoragevehicleextMapper.queryOutAllocation(pcsn, material_id, sect_code, device_code);
|
||||
|
||||
int seq_no = 1;
|
||||
double allocation_canuse_qty = 0;
|
||||
@@ -465,7 +485,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
// 判断是否领料出库
|
||||
if (ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("领料出库"))) {
|
||||
// 判断是否是盘丝(焊状)
|
||||
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(dtl.getMaterial_id());
|
||||
if (!materDao.getMaterial_type_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
||||
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||
@@ -680,9 +701,22 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
if (ObjectUtil.isEmpty(sect_code)) {
|
||||
sect_code = IOSConstant.SECT_CODE_HG;
|
||||
}
|
||||
BigDecimal canuseSum = mdPbStoragevehicleextMapper.queryCanuseSum(pcsn, material_id, sect_code);
|
||||
|
||||
if (canuseSum.doubleValue() < unassign_qty) {
|
||||
String device_code = "";
|
||||
if (ObjectUtil.isNotEmpty(dtl.getSource_billdtl_id())) {
|
||||
if (ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("领料出库"))
|
||||
|| ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("烘干出库"))
|
||||
) {
|
||||
// 查询工单信息
|
||||
PdmBomCallMaterial callDao = iPdmBomCallMaterialService.getById(dtl.getSource_billdtl_id());
|
||||
if (ObjectUtil.isNotEmpty(callDao)) {
|
||||
device_code = callDao.getDevice_code();
|
||||
}
|
||||
}
|
||||
}
|
||||
BigDecimal canuseSum = mdPbStoragevehicleextMapper.queryCanuseSum(pcsn, material_id, sect_code, device_code);
|
||||
|
||||
if (ObjectUtil.isEmpty(canuseSum) || canuseSum.doubleValue() < unassign_qty) {
|
||||
throw new BadRequestException("物料编号:" + dtl.getMaterial_code() + "出库分配数量不满足");
|
||||
}
|
||||
|
||||
@@ -693,7 +727,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
*/
|
||||
|
||||
//出库分配查询货位信息
|
||||
List<MdPbStoragevehicleextDto> outAllocationList = mdPbStoragevehicleextMapper.queryOutAllocation(pcsn, material_id, sect_code);
|
||||
List<MdPbStoragevehicleextDto> outAllocationList = mdPbStoragevehicleextMapper.queryOutAllocation(pcsn, material_id, sect_code, device_code);
|
||||
|
||||
int seq_no = 1;
|
||||
double allocation_canuse_qty = 0;
|
||||
@@ -707,7 +741,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
// 判断是否领料出库
|
||||
if (ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("领料出库"))) {
|
||||
// 判断是否是盘丝(焊状)
|
||||
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(dtl.getMaterial_id());
|
||||
if (!materDao.getMaterial_type_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||
ioStorInvDis.setCheck_qty(outAllocation.getCanuse_qty());
|
||||
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||
@@ -891,6 +926,20 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
|
||||
@Override
|
||||
public List<MdPbStoragevehicleextDto> queryAvailableInv(Map whereJson) {
|
||||
String source_billdtl_id = MapUtil.getStr(whereJson, "source_billdtl_id");
|
||||
IOStorInv ioStorInv = this.getById(MapUtil.getStr(whereJson, "iostorinv_id"));
|
||||
|
||||
if (ObjectUtil.isNotEmpty(source_billdtl_id)) {
|
||||
if (ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("领料出库"))
|
||||
|| ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("烘干出库"))
|
||||
) {
|
||||
// 查询工单信息
|
||||
PdmBomCallMaterial callDao = iPdmBomCallMaterialService.getById(source_billdtl_id);
|
||||
if (ObjectUtil.isNotEmpty(callDao)) {
|
||||
whereJson.put("device_code",callDao.getDevice_code());
|
||||
}
|
||||
}
|
||||
}
|
||||
return mdPbStoragevehicleextMapper.queryAvailableInv(whereJson);
|
||||
}
|
||||
|
||||
@@ -940,7 +989,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv>
|
||||
// 判断是否领料出库
|
||||
if (ioStorInv.getBill_type().equals(IOSEnum.OUT_BILL_TYPE.code("领料出库"))) {
|
||||
// 判断是否是盘丝(焊状)
|
||||
if (!dtl.getMaterial_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(dtl.getMaterial_id());
|
||||
if (!materDao.getMaterial_type_id().equals(IOSConstant.MATERIAL_HS_PZ)) {
|
||||
ioStorInvDis.setIs_check(IOSConstant.ONE);
|
||||
ioStorInvDis.setCheck_qty(ivt.getBigDecimal("canuse_qty"));
|
||||
play_qty = NumberUtil.add(play_qty, unassign_qty);
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
title: '徐工汉云WMS系统',
|
||||
logo: Logo,
|
||||
logo: '',
|
||||
title_param: 'platform'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -32,4 +32,12 @@ export function changeActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive }
|
||||
export function getDevice(data) {
|
||||
return request({
|
||||
url: 'api/deviceinfo/getDevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, getDevice }
|
||||
|
||||
113
wms/nladmin-ui/src/views/wms/basedata/group/UploadDialog.vue
Normal file
113
wms/nladmin-ui/src/views/wms/basedata/group/UploadDialog.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="导入Excel文件"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="400px"
|
||||
:show-close="true"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
class="upload-demo"
|
||||
action=""
|
||||
drag
|
||||
:on-exceed="is_one"
|
||||
:limit="1"
|
||||
:auto-upload="false"
|
||||
:multiple="false"
|
||||
:show-file-list="true"
|
||||
:on-change="uploadByJsqd"
|
||||
:file-list="fileList"
|
||||
accept=".xlsx,.xls"
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip">只能上传Excel文件,且不超过10MB</div>
|
||||
</el-upload>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
|
||||
export default {
|
||||
name: 'UploadDialog',
|
||||
mixins: [crud()],
|
||||
components: {},
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
fileList: [],
|
||||
file1: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
openParam: {
|
||||
handler(newValue, oldValue) {
|
||||
this.opendtlParam = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
is_one() {
|
||||
this.crud.notify('只能上传一个excel文件!', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
},
|
||||
// 文件校验方法
|
||||
beforeAvatarUpload(file) {
|
||||
// 不能导入大小超过2Mb的文件
|
||||
if (file.size > 10 * 1024 * 1024) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 文件发生改变就会触发的事件
|
||||
uploadByJsqd(file) {
|
||||
this.file1 = file
|
||||
},
|
||||
submit() {
|
||||
if (this.beforeAvatarUpload(this.file1)) {
|
||||
this.fileList.name = this.file1.name
|
||||
this.fileList.url = ''
|
||||
var formdata = new FormData()
|
||||
formdata.append('file', this.file1.raw)
|
||||
// excelImport:请求接口 formdata:传递参数
|
||||
crudGroup.excelImport(formdata).then((res) => {
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$emit('tableChanged', res)
|
||||
this.$emit('update:dialogShow', false)
|
||||
})
|
||||
} else {
|
||||
this.crud.notify('文件过大,请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -72,4 +72,12 @@ export function printDelete(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryMater, queryMaterList, checkVehicle, querySupp, copySave, printDelete }
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: 'api/group/importExcel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryMater, queryMaterList, checkVehicle, querySupp, copySave, printDelete, excelImport }
|
||||
|
||||
@@ -77,10 +77,20 @@
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="printTable"
|
||||
@click="printVisible = true"
|
||||
>
|
||||
物料标签
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-arrow-down"
|
||||
size="mini"
|
||||
@click="Import"
|
||||
>
|
||||
组盘信息导入
|
||||
</el-button>-->
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -215,6 +225,25 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机台编码" prop="device_code">
|
||||
<el-select
|
||||
v-model="form.device_code"
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.device_code"
|
||||
:label="item.device_code"
|
||||
:value="item.device_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -238,6 +267,29 @@
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="打印次数"
|
||||
append-to-body
|
||||
:visible.sync="printVisible"
|
||||
width="500px"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form ref="form3" :model="formPrint" :rules="rules" size="mini" label-width="130px">
|
||||
<el-form-item label="打印次数" prop="print_num">
|
||||
<el-input-number v-model="formPrint.print_num" :precision="0" :controls="false" :min="0" :max="3" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="18">
|
||||
<el-col :span="18" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="printTable">打印</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -261,6 +313,7 @@
|
||||
<el-table-column prop="bake_num" label="烘干次数" :min-width="flexWidth('bake_num',crud.data,'烘干次数')" />
|
||||
<el-table-column prop="quality_type" label="品质类型" :formatter="formattQuality" :min-width="flexWidth('quality_type',crud.data,'品质类型')" />
|
||||
<el-table-column prop="box_type" label="料箱类型" :formatter="formattBoxType" :min-width="flexWidth('box_type',crud.data,'料箱类型')" />
|
||||
<el-table-column prop="device_code" label="机台编码" :min-width="flexWidth('device_code',crud.data,'机台编码')" />
|
||||
<el-table-column prop="execution_stand" label="执行标准" :min-width="flexWidth('execution_stand',crud.data,'执行标准')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="create_name" label="组盘人" :min-width="flexWidth('create_name',crud.data,'组盘人')" />
|
||||
@@ -286,18 +339,21 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDtl :dialog-show.sync="openAddDtlDialog" :open-param="openParam" />
|
||||
<UploadDialog :dialog-show.sync="viewShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
import AddDtl from '@/views/wms/basedata/group/AddDtl'
|
||||
import UploadDialog from '@/views/wms/basedata/group/UploadDialog'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import crudDeviceinfo from '@/views/wms/basedata/deviceInfo/deviceinfo'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
@@ -324,7 +380,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Group',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDtl },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDtl, UploadDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
dicts: ['is_used', 'GROUP_STATUS', 'storagevehicle_type', 'QUALITY_TYPE'],
|
||||
@@ -349,8 +405,14 @@ export default {
|
||||
permission: {},
|
||||
openParam: {},
|
||||
openAddDtlDialog: false,
|
||||
printVisible: false,
|
||||
viewShow: false,
|
||||
suppList: [],
|
||||
deviceList: [],
|
||||
materList: [],
|
||||
formPrint: {
|
||||
print_num: 1
|
||||
},
|
||||
rules: {
|
||||
material_code: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
@@ -380,6 +442,9 @@ export default {
|
||||
crudGroup.queryMaterList({}).then(res => {
|
||||
this.materList = res
|
||||
})
|
||||
crudDeviceinfo.getDevice({}).then(res => {
|
||||
this.deviceList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -423,63 +488,45 @@ export default {
|
||||
if (row.out_type === '1004') {
|
||||
bake_num += 1
|
||||
}
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
/* LODOP.PRINT_INIT('')
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '100mm', '80mm', '')
|
||||
LODOP.ADD_PRINT_RECT('1mm', '3mm', '94mm', '74mm', 0, 1)
|
||||
LODOP.SET_PRINT_STYLE('FontSize', 11)
|
||||
LODOP.SET_PRINT_STYLE('Bold', 1)
|
||||
LODOP.ADD_PRINT_BARCODE('5mm', '5mm', '40mm', '40mm', 'QRCode', row.material_code + '##' + row.material_name + '##' +
|
||||
row.material_spec + '##' + row.material_model + '##' + row.quality_time_day + '##' + row.produce_time + '##' +
|
||||
row.supp_name + '##' + row.bake_num + '##' + row.supp_code + '##' + row.pcsn + '##' + row.execution_stand
|
||||
)
|
||||
LODOP.ADD_PRINT_TEXT('7mm', '48mm', '80mm', '15mm', '物料编码:' + row.material_code + '')
|
||||
LODOP.ADD_PRINT_TEXT('16mm', '48mm', '80mm', '15mm', '物料名称:' + row.material_name + '')
|
||||
LODOP.ADD_PRINT_TEXT('25mm', '48mm', '80mm', '15mm', '规格:' + row.material_spec + '')
|
||||
LODOP.ADD_PRINT_TEXT('34mm', '48mm', '80mm', '15mm', '型号:' + row.material_model + '')
|
||||
LODOP.ADD_PRINT_TEXT('43mm', '48mm', '80mm', '15mm', '有效期(天):' + row.quality_time_day + '')
|
||||
LODOP.ADD_PRINT_TEXT('52mm', '48mm', '80mm', '15mm', '生产日期:' + row.produce_time + '')
|
||||
LODOP.ADD_PRINT_TEXT('61mm', '48mm', '80mm', '15mm', '供应商名称:' + row.supp_name + '')
|
||||
|
||||
LODOP.ADD_PRINT_TEXT('43mm', '5mm', '80mm', '15mm', '烘干次数:' + bake_num + '')
|
||||
LODOP.ADD_PRINT_TEXT('52mm', '5mm', '80mm', '15mm', '供应商编码:' + row.supp_code + '')
|
||||
LODOP.ADD_PRINT_TEXT('61mm', '5mm', '80mm', '15mm', '批号:' + row.pcsn + '')
|
||||
LODOP.ADD_PRINT_TEXT('69mm', '5mm', '80mm', '15mm', '执行标准:' + row.execution_stand + '')*/
|
||||
|
||||
LODOP.PRINT_INIT('')
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '')
|
||||
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '54mm', 0, 1)
|
||||
LODOP.SET_PRINT_STYLE('FontSize', 8)
|
||||
LODOP.SET_PRINT_STYLE('Bold', 1)
|
||||
LODOP.ADD_PRINT_BARCODE('5mm', '7mm', '30mm', '30mm', 'QRCode', row.material_code + '##' + row.material_name + '##' +
|
||||
row.material_spec + '##' + row.material_model + '##' + row.quality_time_day + '##' + row.produce_time + '##' +
|
||||
row.supp_name + '##' + row.bake_num + '##' + row.supp_code + '##' + row.pcsn + '##' + row.execution_stand
|
||||
)
|
||||
LODOP.ADD_PRINT_TEXT('5mm', '38mm', '60mm', '10mm', '物料编码:' + row.material_code + '')
|
||||
LODOP.ADD_PRINT_TEXT('12mm', '38mm', '60mm', '10mm', '物料名称:' + row.material_name + '')
|
||||
LODOP.ADD_PRINT_TEXT('19mm', '38mm', '60mm', '10mm', '规格:' + row.material_spec + '')
|
||||
LODOP.ADD_PRINT_TEXT('26mm', '38mm', '60mm', '10mm', '型号:' + row.material_model + '')
|
||||
LODOP.ADD_PRINT_TEXT('33mm', '38mm', '60mm', '10mm', '有效期(天):' + row.quality_time_day + '')
|
||||
LODOP.ADD_PRINT_TEXT('40mm', '38mm', '60mm', '10mm', '生产日期:' + row.produce_time + '')
|
||||
LODOP.ADD_PRINT_TEXT('47mm', '38mm', '60mm', '10mm', '供应商:' + row.supp_name + '')
|
||||
|
||||
LODOP.ADD_PRINT_TEXT('33mm', '7mm', '60mm', '10mm', '烘干次数:' + bake_num + '')
|
||||
LODOP.ADD_PRINT_TEXT('40mm', '7mm', '60mm', '10mm', '批号:' + row.pcsn + '')
|
||||
LODOP.ADD_PRINT_TEXT('47mm', '7mm', '60mm', '10mm', '执行标准:' + row.execution_stand + '')
|
||||
LODOP.SET_PRINT_MODE('PRINT_SCALE', 0)
|
||||
|
||||
LODOP.PRINT()// 打印
|
||||
// LODOP.PREVIEW()// 预览
|
||||
for (let i = 0; i < this.formPrint.print_num; i++) {
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.PRINT_INIT('')
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '60mm', '')
|
||||
LODOP.ADD_PRINT_RECT('1mm', '3mm', '74mm', '54mm', 0, 1)
|
||||
LODOP.SET_PRINT_STYLE('FontSize', 8)
|
||||
LODOP.SET_PRINT_STYLE('Bold', 1)
|
||||
LODOP.ADD_PRINT_BARCODE('5mm', '7mm', '30mm', '30mm', 'QRCode', row.material_code + '##' + row.material_name + '##' +
|
||||
row.material_spec + '##' + row.material_model + '##' + row.quality_time_day + '##' + row.produce_time + '##' +
|
||||
row.supp_name + '##' + row.bake_num + '##' + row.supp_code + '##' + row.pcsn + '##' + row.execution_stand
|
||||
)
|
||||
LODOP.ADD_PRINT_TEXT('5mm', '38mm', '60mm', '10mm', '物料编码:' + row.material_code + '')
|
||||
LODOP.ADD_PRINT_TEXT('12mm', '38mm', '60mm', '10mm', '物料名称:' + row.material_name + '')
|
||||
LODOP.ADD_PRINT_TEXT('19mm', '38mm', '60mm', '10mm', '规格:' + row.material_spec + '')
|
||||
LODOP.ADD_PRINT_TEXT('26mm', '38mm', '60mm', '10mm', '型号:' + row.material_model + '')
|
||||
LODOP.ADD_PRINT_TEXT('33mm', '38mm', '60mm', '10mm', '有效期(天):' + row.quality_time_day + '')
|
||||
LODOP.ADD_PRINT_TEXT('40mm', '38mm', '60mm', '10mm', '生产日期:' + row.produce_time + '')
|
||||
LODOP.ADD_PRINT_TEXT('47mm', '38mm', '60mm', '10mm', '供应商:' + row.supp_name + '')
|
||||
|
||||
LODOP.ADD_PRINT_TEXT('33mm', '7mm', '60mm', '10mm', '烘干次数:' + bake_num + '')
|
||||
LODOP.ADD_PRINT_TEXT('40mm', '7mm', '60mm', '10mm', '批号:' + row.pcsn + '')
|
||||
LODOP.ADD_PRINT_TEXT('47mm', '7mm', '60mm', '10mm', '执行标准:' + row.execution_stand + '')
|
||||
LODOP.SET_PRINT_MODE('PRINT_SCALE', 0)
|
||||
LODOP.PRINT()// 打印
|
||||
// LODOP.PREVIEW()// 预览
|
||||
}
|
||||
// 烘干出库且需要删除的 调用删除接口
|
||||
if (row.out_type === '1004' && row.is_need_delete === '1') {
|
||||
crudGroup.printDelete(row).then(res => {
|
||||
})
|
||||
}
|
||||
this.printVisible = false
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
Import() {
|
||||
this.viewShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,13 +147,28 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机台编码" prop="device_code">
|
||||
<el-input v-model="form.device_code" style="width: 200px;" />
|
||||
<el-select
|
||||
v-model="form.device_code"
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
filterable
|
||||
@change="queryDevice"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceList"
|
||||
:key="item.device_code"
|
||||
:label="item.device_code"
|
||||
:value="item.device_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机台名称" prop="device_name">
|
||||
<el-input v-model="form.device_name" style="width: 200px;" />
|
||||
<el-input v-model="form.device_name" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -252,6 +267,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudGroup from '@/views/wms/basedata/group/group'
|
||||
import crudDeviceinfo from '@/views/wms/basedata/deviceInfo/deviceinfo'
|
||||
|
||||
const defaultForm = {
|
||||
bom_code: null,
|
||||
@@ -299,6 +315,7 @@ export default {
|
||||
openParam: null,
|
||||
permission: {},
|
||||
materList: [],
|
||||
deviceList: [],
|
||||
rules: {
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'blur' }
|
||||
@@ -319,6 +336,9 @@ export default {
|
||||
crudGroup.queryMaterList({}).then(res => {
|
||||
this.materList = res
|
||||
})
|
||||
crudDeviceinfo.getDevice({}).then(res => {
|
||||
this.deviceList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -337,6 +357,13 @@ export default {
|
||||
this.form.material_id = ''
|
||||
})
|
||||
},
|
||||
queryDevice(value) {
|
||||
crudDeviceinfo.getDevice({ 'device_code': value }).then(res => {
|
||||
this.form.device_name = res[0].device_name
|
||||
}).catch(() => {
|
||||
this.form.device_name = ''
|
||||
})
|
||||
},
|
||||
formattStatus(row) {
|
||||
return this.dict.label.BOM_STATUS[row.bom_status]
|
||||
},
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="批次号" align="center" width="150px" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip sortable prop="device_code" label="机台编码" align="center" width="150px" />
|
||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||
|
||||
Reference in New Issue
Block a user