rev:新增老车间工单下发和打印功能
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package org.nl.wms.mps.controller.oderExt;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.wms.mps.service.orderExt.IMpsSaleOrderIcExtService;
|
||||
import org.nl.wms.mps.service.orderExt.dao.MpsSaleOrderIcExt;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产订单扩展表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mpsSaleOrderIcExt")
|
||||
public class MpsSaleOrderIcExtController {
|
||||
|
||||
@Autowired
|
||||
private IMpsSaleOrderIcExtService extService;
|
||||
|
||||
@PostMapping
|
||||
@Log("新增订单扩展表")
|
||||
@ApiOperation("新增订单扩展表")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject whereJson) {
|
||||
extService.create(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getExtList")
|
||||
@Log("根据工单获取条码")
|
||||
@ApiOperation("根据工单获取条码")
|
||||
public ResponseEntity<Object> getExtList(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(extService.list(new QueryWrapper<MpsSaleOrderIcExt>().eq("remark1",whereJson.getString("workorder_code"))),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
<if test="query.shift_type_scode != null and query.shift_type_scode != ''">
|
||||
and ShiftOrder.shift_type_scode = #{query.shift_type_scode}
|
||||
</if>
|
||||
<if test="query.workprocedure_code != null and query.workprocedure_code != ''">
|
||||
and pro.workprocedure_code = #{query.workprocedure_code}
|
||||
</if>
|
||||
<if test="query.product_area != null and query.product_area != ''">
|
||||
and ShiftOrder.product_area = #{query.product_area}
|
||||
</if>
|
||||
|
||||
@@ -20,6 +20,7 @@ public class WorkorderQuery extends BaseQuery<PdmProduceWorkorder> {
|
||||
private String workorder_code;
|
||||
private String material;
|
||||
private String workorder_status;
|
||||
private String workprocedure_code;
|
||||
private String sale_id;
|
||||
private String shift_type_scode;
|
||||
private String product_series;
|
||||
|
||||
@@ -67,26 +67,26 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
@Autowired
|
||||
private IMdPbClassstandardService classstandardService;
|
||||
@Autowired
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
private ISysUserService userService;
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService materialbaseService;
|
||||
@Autowired
|
||||
private IPdmBiDeviceService deviceService;
|
||||
@Resource
|
||||
private PdmProduceWorkorderMapper pdmProduceWorkorderMapper;
|
||||
private PdmProduceWorkorderMapper pdmProduceWorkorderMapper;
|
||||
@Resource
|
||||
private IPdmProduceWorkorderrecordService reportRecordService;
|
||||
private IPdmProduceWorkorderrecordService reportRecordService;
|
||||
|
||||
@Override
|
||||
public Object queryAll(WorkorderQuery query, PageQuery pageQuery) {
|
||||
if (!StringUtils.isEmpty(query.getProduct_series())){
|
||||
if (!StringUtils.isEmpty(query.getProduct_series())) {
|
||||
String collect = classstandardService.getChildIdStr(query.getProduct_series())
|
||||
.stream().collect(Collectors.joining("','"));
|
||||
query.setProduct_series("('"+collect+"')");
|
||||
query.setProduct_series("('" + collect + "')");
|
||||
}
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage()+1, pageQuery.getSize());
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
List result = pdmProduceWorkorderMapper.pageQuery(query);
|
||||
TableDataInfo build = TableDataInfo.build(result);
|
||||
build.setTotalElements(page.getTotal());
|
||||
@@ -95,7 +95,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
|
||||
@Override
|
||||
public Object queryAll(Map whereJson) {
|
||||
return this.list();
|
||||
return this.list();
|
||||
}
|
||||
|
||||
|
||||
@@ -112,12 +112,12 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
entity.setWorkorder_status(WorkerOrderEnum.CREATE.getCode());
|
||||
this.save(entity);
|
||||
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE,entity.getWorkorder_id());
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE, entity.getWorkorder_id());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateForm(JSONObject form) {
|
||||
Assert.notNull(form,"参数不能为空");
|
||||
Assert.notNull(form, "参数不能为空");
|
||||
PdmProduceWorkorder one = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", form.getString("workorder_id")));
|
||||
if (one == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
@@ -128,48 +128,48 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
entity.setDown_name(SecurityUtils.getCurrentNickName());
|
||||
this.updateById(entity);
|
||||
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE,entity.getWorkorder_id());
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE, entity.getWorkorder_id());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> getDtl(JSONObject param) {
|
||||
return this.baseMapper.getworkOrderDtl(param.getString("workorder_id"));
|
||||
return this.baseMapper.getworkOrderDtl(param.getString("workorder_id"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down(List<String> ids) {
|
||||
if (ids == null || ids.size()==0){
|
||||
if (ids == null || ids.size() == 0) {
|
||||
return;
|
||||
}
|
||||
this.update(new UpdateWrapper<PdmProduceWorkorder>()
|
||||
.set("workorder_status",WorkerOrderEnum.SEND.getCode())
|
||||
.set("workorder_status", WorkerOrderEnum.SEND.getCode())
|
||||
.set("down_id", SecurityUtils.getCurrentUserId())
|
||||
.set("down_name",SecurityUtils.getCurrentNickName())
|
||||
.set("down_time",new Date())
|
||||
.set("down_name", SecurityUtils.getCurrentNickName())
|
||||
.set("down_time", new Date())
|
||||
.in("workorder_id", ids));
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE,ids.toArray(new String[0]));
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE, ids.toArray(new String[0]));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unDown(List<String> ids) {
|
||||
if (ids == null || ids.size()==0){
|
||||
if (ids == null || ids.size() == 0) {
|
||||
return;
|
||||
}
|
||||
List<PdmProduceWorkorder> list = this.list(new QueryWrapper<PdmProduceWorkorder>()
|
||||
.ne("workorder_status", WorkerOrderEnum.SEND.getCode())
|
||||
.in("workorder_id", ids));
|
||||
if (list.size()>0){
|
||||
if (list.size() > 0) {
|
||||
throw new BadRequestException("只有下发状态的工单才能取消下发");
|
||||
}
|
||||
this.update(new UpdateWrapper<PdmProduceWorkorder>()
|
||||
.set("workorder_status",WorkerOrderEnum.CREATE.getCode())
|
||||
.set("workorder_status", WorkerOrderEnum.CREATE.getCode())
|
||||
.set("down_id", SecurityUtils.getCurrentUserId())
|
||||
.set("down_name",SecurityUtils.getCurrentNickName())
|
||||
.set("down_time",new Date())
|
||||
.set("down_name", SecurityUtils.getCurrentNickName())
|
||||
.set("down_time", new Date())
|
||||
.in("workorder_id", ids));
|
||||
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE,ids.toArray(new String[0]));
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE, ids.toArray(new String[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -178,10 +178,10 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
//强制完成时修改工单状态
|
||||
String workorder_id = param.getJSONObject("row").getString("workorder_id");
|
||||
this.update(new UpdateWrapper<PdmProduceWorkorder>()
|
||||
.set("workorder_status",WorkerOrderEnum.FORCE_COMPLETE.getCode())
|
||||
.set("workorder_status", WorkerOrderEnum.FORCE_COMPLETE.getCode())
|
||||
.set("update_id", SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time",new Date())
|
||||
.set("update_name", SecurityUtils.getCurrentNickName())
|
||||
.set("update_time", new Date())
|
||||
.in("workorder_id", workorder_id));
|
||||
JSONArray array = new JSONArray();
|
||||
JSONObject map = new JSONObject();
|
||||
@@ -190,13 +190,13 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
array.add(map);
|
||||
Map<String, Object> result = wmsToAcsService.orderStatusUpdate(array);
|
||||
if (!HttpStatus.OK.equals(result.get("status"))) {
|
||||
throw new BadRequestException((String) result.get("message"));
|
||||
throw new BadRequestException((String) result.get("message"));
|
||||
}
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE,workorder_id);
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE, workorder_id);
|
||||
}
|
||||
|
||||
|
||||
public void recordWorkOrder(OptionRecord.OptionEnum optionEnum, String...ids) {
|
||||
public void recordWorkOrder(OptionRecord.OptionEnum optionEnum, String... ids) {
|
||||
List<PdmProduceWorkorder> workorders = this.list(new QueryWrapper<PdmProduceWorkorder>().in("workorder_id", ids));
|
||||
for (PdmProduceWorkorder one : workorders) {
|
||||
WorkorderRecord record = WorkorderRecord.builder()
|
||||
@@ -209,7 +209,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
.operatetime_end(DateUtil.now())
|
||||
.shift_type_scode(one.getShift_type_scode())
|
||||
.product_area(one.getProduct_area()).build();
|
||||
OptionRecord.recordAsync(optionEnum, one.getWorkorder_status(),OptionRecord.Buss.WORKORDER, one.getWorkorder_id(),record);
|
||||
OptionRecord.recordAsync(optionEnum, one.getWorkorder_status(), OptionRecord.Buss.WORKORDER, one.getWorkorder_id(), record);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (ObjectUtil.isEmpty(material)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "物料规格对应物料信息不存在,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("material_id", material.getMaterial_id());
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (ObjectUtil.isEmpty(idByName)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "工序名称是否正确,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("workprocedure_id", idByName.getId());
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (StrUtil.isEmpty(col)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "工单计划数量为空,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("plan_qty", col);
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (!workprocedure_id.equals(device.getWorkprocedure_id())) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "设备与所属工序不匹配,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("device_code", device.getDevice_code());
|
||||
}
|
||||
}
|
||||
@@ -326,7 +326,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (ObjectUtil.isEmpty(jsonUser)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "生产人员编码不存在!";
|
||||
}else {
|
||||
} else {
|
||||
param.put("current_produce_person_id", jsonUser.getUser_id());
|
||||
}
|
||||
}
|
||||
@@ -407,7 +407,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (ObjectUtil.isEmpty(material)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "物料规格对应物料信息不存在,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("material_id", material.getMaterial_id());
|
||||
}
|
||||
}
|
||||
@@ -420,7 +420,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (ObjectUtil.isEmpty(idByName)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "工序名称是否正确,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("workprocedure_id", idByName.getId());
|
||||
}
|
||||
}
|
||||
@@ -432,7 +432,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (StrUtil.isEmpty(col)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "工单计划数量为空,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("plan_qty", col);
|
||||
}
|
||||
}
|
||||
@@ -454,7 +454,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (!workprocedure_id.equals(device.getWorkprocedure_id())) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "设备与所属工序不匹配,";
|
||||
}else {
|
||||
} else {
|
||||
param.put("device_code", device.getDevice_code());
|
||||
}
|
||||
}
|
||||
@@ -463,7 +463,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if (ObjectUtil.isEmpty(jsonUser)) {
|
||||
is_error = "1";
|
||||
error_message = error_message + "生产人员编码不存在!";
|
||||
}else {
|
||||
} else {
|
||||
param.put("current_produce_person_id", jsonUser.getUser_id());
|
||||
}
|
||||
}
|
||||
@@ -489,13 +489,13 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
param.put("create_type", WorkerOrderEnum.EXCELINTO.getCode());
|
||||
param.put("planproducestart_date", produce_date + "18:30:00");
|
||||
DateTime dateTime = DateUtil.offsetDay(DateUtil.parse(produce_date), 1);
|
||||
param.put("planproduceend_date", DateUtil.format(dateTime,"yyyy-MM-dd") + " 07:30:00");
|
||||
param.put("planproduceend_date", DateUtil.format(dateTime, "yyyy-MM-dd") + " 07:30:00");
|
||||
param.put("create_id", currentUserId);
|
||||
param.put("create_name", nickName);
|
||||
param.put("create_time", DateUtil.now());
|
||||
entitys.add(param.toJavaObject(PdmProduceWorkorder.class));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(entitys)){
|
||||
if (!CollectionUtils.isEmpty(entitys)) {
|
||||
this.saveBatch(entitys);
|
||||
}
|
||||
}
|
||||
@@ -509,73 +509,78 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
//判断该工单状态
|
||||
PdmProduceWorkorder result = this.getOne(new QueryWrapper<PdmProduceWorkorder>()
|
||||
.eq("device_code", param.getString("device_code"))
|
||||
.in("workorder_status","2","3","4")
|
||||
.ne("workorder_id",param.getString("workorder_id")));
|
||||
if(ObjectUtil.isNotEmpty(result)) {
|
||||
.in("workorder_status", "2", "3", "4")
|
||||
.ne("workorder_id", param.getString("workorder_id")));
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
throw new BadRequestException("已有工单选择该设备开工,请更换开工设备!");
|
||||
}
|
||||
JSONArray array = new JSONArray();
|
||||
result = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", param.getString("workorder_id")));
|
||||
JSONObject order = packageForm(result);
|
||||
|
||||
JSONObject order = packageForm(param);
|
||||
array.add(order);
|
||||
//下发acs
|
||||
result.setWorkorder_status(WorkerOrderEnum.PRODUCTING.getCode());
|
||||
Map<String,Object> resp = wmsToAcsService.order(array);
|
||||
if (((int)resp.get("status")) == (HttpStatus.BAD_REQUEST.value())){
|
||||
Map<String, Object> resp = wmsToAcsService.order(array);
|
||||
PdmProduceWorkorder workOrder = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", param.getString("workorder_id")));
|
||||
workOrder.setWorkorder_status(WorkerOrderEnum.PRODUCTING.getCode());
|
||||
if (((int) resp.get("status")) == (HttpStatus.BAD_REQUEST.value())) {
|
||||
throw new BadRequestException(String.valueOf(resp.get("message")));
|
||||
}
|
||||
this.update(result,new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", param.getString("workorder_id")));
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE,result.getWorkorder_id());
|
||||
this.update(workOrder, new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", param.getString("workorder_id")));
|
||||
this.recordWorkOrder(OptionRecord.OptionEnum.UPDATE, result.getWorkorder_id());
|
||||
|
||||
return RestBusinessTemplate.execute(() -> resp);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private JSONObject packageForm(PdmProduceWorkorder workOrder) {
|
||||
private JSONObject packageForm(JSONObject param) {
|
||||
PdmProduceWorkorder workOrder = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", param.getString("workorder_id")));
|
||||
JSONObject form = new JSONObject();
|
||||
MdMeMaterialbase material = materialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_id", workOrder.getMaterial_id()));
|
||||
PdmBiDevice device = deviceService.getOne(new QueryWrapper<PdmBiDevice>().eq("device_code", workOrder.getDevice_code()));
|
||||
form.put("workorder_id",workOrder.getWorkorder_id());
|
||||
form.put("workorder_code",workOrder.getWorkorder_code());
|
||||
form.put("workorder_id", workOrder.getWorkorder_id());
|
||||
form.put("workorder_code", workOrder.getWorkorder_code());
|
||||
form.put("qty", workOrder.getPlan_qty());
|
||||
form.put("outupperlimit_qty",device.getOutupperlimit_qty());
|
||||
form.put("material_id",workOrder.getMaterial_id());
|
||||
form.put("material_name",material.getMaterial_name());
|
||||
form.put("material_code",material.getMaterial_code());
|
||||
form.put("material_spec",material.getMaterial_spec());
|
||||
form.put("device_code",workOrder.getDevice_code());
|
||||
form.put("is_needmove",workOrder.getIs_needmove());
|
||||
form.put("outupperlimit_qty", device.getOutupperlimit_qty());
|
||||
form.put("material_id", workOrder.getMaterial_id());
|
||||
form.put("material_name", material.getMaterial_name());
|
||||
form.put("material_code", material.getMaterial_code());
|
||||
form.put("material_spec", material.getMaterial_spec());
|
||||
form.put("device_code", workOrder.getDevice_code());
|
||||
form.put("is_needmove", workOrder.getIs_needmove() ? 1 : 0);
|
||||
if (param.containsKey("extra_map")) {
|
||||
form.put("extra_map", param.getJSONObject("extra_map"));
|
||||
}
|
||||
return form;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Object report(JSONObject param) {
|
||||
Assert.notNull(new Object[]{param,param.get("report_qty"),param.get("nok_qty"),param.getBigDecimal("repare_qty")},"请求参数不能为空");
|
||||
Assert.notNull(new Object[]{param, param.get("report_qty"), param.get("nok_qty"), param.getBigDecimal("repare_qty")}, "请求参数不能为空");
|
||||
|
||||
PdmProduceWorkorder workorder = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", param.getString("workorder_id")));
|
||||
if (workorder.getWorkorder_status().equals(WorkerOrderEnum.COMPLETE.getCode())||workorder.getWorkorder_status().equals(WorkerOrderEnum.FORCE_COMPLETE.getCode())){
|
||||
throw new BadRequestException(param.getString("workorder_id")+"当前工单已经完工不允许报工");
|
||||
if (workorder.getWorkorder_status().equals(WorkerOrderEnum.COMPLETE.getCode()) || workorder.getWorkorder_status().equals(WorkerOrderEnum.FORCE_COMPLETE.getCode())) {
|
||||
throw new BadRequestException(param.getString("workorder_id") + "当前工单已经完工不允许报工");
|
||||
}
|
||||
PdmProduceWorkorderrecord one = reportRecordService.getOne(new QueryWrapper<PdmProduceWorkorderrecord>()
|
||||
.eq("workorder_id", param.getString("workorder_id")).eq("report_status", ReportRecordStatus.CREATE.getCode()));
|
||||
if ( one == null) {
|
||||
throw new BadRequestException(param.getString("workorder_id")+"当前工单没有生成状态的报工记录");
|
||||
if (one == null) {
|
||||
throw new BadRequestException(param.getString("workorder_id") + "当前工单没有生成状态的报工记录");
|
||||
}
|
||||
workorder.setReport_qty(workorder.getReport_qty().add(param.getBigDecimal("report_qty")));
|
||||
workorder.setNok_qty(workorder.getReport_qty().add(param.getBigDecimal("nok_qty")));
|
||||
workorder.setRepare_qty(workorder.getReport_qty().add(param.getBigDecimal("repare_qty")));
|
||||
if (workorder.getPlan_qty().doubleValue() <= workorder.getReport_qty().doubleValue()){
|
||||
if (workorder.getPlan_qty().doubleValue() <= workorder.getReport_qty().doubleValue()) {
|
||||
workorder.setWorkorder_status(WorkerOrderEnum.COMPLETE.getCode());
|
||||
}
|
||||
this.updateById(workorder);
|
||||
|
||||
reportRecordService.update(new UpdateWrapper<PdmProduceWorkorderrecord>()
|
||||
.set("report_qty",param.getBigDecimal("report_qty"))
|
||||
.set("nok_qty",param.getBigDecimal("nok_qty"))
|
||||
.set("repare_qty",param.getBigDecimal("repare_qty"))
|
||||
.set("needproduct_qty",workorder.getPlan_qty().doubleValue()-workorder.getReport_qty().doubleValue())
|
||||
.eq("macoperate_id",one.getMacoperate_id()));
|
||||
.set("report_qty", param.getBigDecimal("report_qty"))
|
||||
.set("nok_qty", param.getBigDecimal("nok_qty"))
|
||||
.set("repare_qty", param.getBigDecimal("repare_qty"))
|
||||
.set("needproduct_qty", workorder.getPlan_qty().doubleValue() - workorder.getReport_qty().doubleValue())
|
||||
.eq("macoperate_id", one.getMacoperate_id()));
|
||||
return one.getMacoperate_id();
|
||||
}
|
||||
|
||||
@@ -584,7 +589,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
@Transactional
|
||||
public void reportApprove(JSONArray param) {
|
||||
List<PdmProduceWorkorderrecord> workreportRecords = param.toJavaList(PdmProduceWorkorderrecord.class);
|
||||
if (!CollectionUtils.isEmpty(workreportRecords)){
|
||||
if (!CollectionUtils.isEmpty(workreportRecords)) {
|
||||
List<String> macoperate_ids = workreportRecords.stream().map(PdmProduceWorkorderrecord::getMacoperate_id).collect(Collectors.toList());
|
||||
List<PdmProduceWorkorderrecord> record = reportRecordService.list(new QueryWrapper<PdmProduceWorkorderrecord>()
|
||||
.in("macoperate_id", macoperate_ids));
|
||||
@@ -598,7 +603,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
item.setConfirm_time(DateUtil.now());
|
||||
});
|
||||
List<Map> list = packageWorkorderQty(record, itemRecord);
|
||||
this.baseMapper.batchUpdateByParam(list,entry.getKey());
|
||||
this.baseMapper.batchUpdateByParam(list, entry.getKey());
|
||||
reportRecordService.updateBatchById(itemRecord);
|
||||
}
|
||||
}
|
||||
@@ -616,19 +621,19 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
long new_report_qty = itemRecord.stream().map(PdmProduceWorkorderrecord::getReport_qty).count();
|
||||
List<Map> list = new ArrayList<>();
|
||||
Map<String, Object> nok_qty = new HashMap<>();
|
||||
nok_qty.put("field","nok_qty");
|
||||
nok_qty.put("value",Math.abs(new_nok_qty-old_nok_qty));
|
||||
nok_qty.put("add",new_nok_qty>old_nok_qty);
|
||||
nok_qty.put("field", "nok_qty");
|
||||
nok_qty.put("value", Math.abs(new_nok_qty - old_nok_qty));
|
||||
nok_qty.put("add", new_nok_qty > old_nok_qty);
|
||||
list.add(nok_qty);
|
||||
Map<String, Object> repare_qty = new HashMap<>();
|
||||
repare_qty.put("field","repare_qty");
|
||||
repare_qty.put("value",Math.abs(new_repare_qty-old_repare_qty));
|
||||
repare_qty.put("add",new_repare_qty>old_repare_qty);
|
||||
repare_qty.put("field", "repare_qty");
|
||||
repare_qty.put("value", Math.abs(new_repare_qty - old_repare_qty));
|
||||
repare_qty.put("add", new_repare_qty > old_repare_qty);
|
||||
list.add(repare_qty);
|
||||
Map<String, Object> report_qty = new HashMap<>();
|
||||
report_qty.put("field","report_qty");
|
||||
report_qty.put("value",Math.abs(new_report_qty-old_report_qty));
|
||||
report_qty.put("add",new_report_qty>old_report_qty);
|
||||
report_qty.put("field", "report_qty");
|
||||
report_qty.put("value", Math.abs(new_report_qty - old_report_qty));
|
||||
report_qty.put("add", new_report_qty > old_report_qty);
|
||||
list.add(report_qty);
|
||||
return list;
|
||||
}
|
||||
@@ -646,16 +651,16 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
produceshiftorderDto.setUpdate_name(nickName);
|
||||
produceshiftorderDto.setUpdate_time(DateUtil.now());
|
||||
String order_status = produceshiftorderDto.getOrder_status();
|
||||
if(!order_status.equals("03") && !order_status.equals("01") && !order_status.equals("00")) {
|
||||
if (!order_status.equals("03") && !order_status.equals("01") && !order_status.equals("00")) {
|
||||
JSONArray array = new JSONArray();
|
||||
JSONObject acsObj = new JSONObject();
|
||||
acsObj.put("order_code", produceorder_code);
|
||||
acsObj.put("device_code", device_code);
|
||||
array.add(acsObj);
|
||||
Map<String,Object> resp = wmsToAcsService.replaceDevice(array);
|
||||
Map<String, Object> resp = wmsToAcsService.replaceDevice(array);
|
||||
String status = String.valueOf(resp.get("status"));
|
||||
String message = (String) resp.get("message");
|
||||
if(!status.equals("200")) {
|
||||
if (!status.equals("200")) {
|
||||
throw new BadRequestException(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,50 +6,119 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-width="120px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定类型">
|
||||
<el-select
|
||||
v-model="query.lock_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="锁定类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.d_lock_type"
|
||||
: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="仓位编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<!--每箱袋数、每袋数量、箱数、箱型、目标巷道、是否翻转、托盘满托数量、袋数-->
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="每箱袋数">
|
||||
<el-input-number
|
||||
v-model="query.one_box_package_qty"
|
||||
clearable
|
||||
size="small"
|
||||
precision="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="每袋数量">
|
||||
<el-input-number
|
||||
v-model="query.one_package_qty"
|
||||
clearable
|
||||
precision="0"
|
||||
size="small"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="托盘满托数量">
|
||||
<el-input-number
|
||||
v-model="query.tray_full_num"
|
||||
clearable
|
||||
size="small"
|
||||
precision="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="箱型">
|
||||
<el-input
|
||||
v-model="query.box_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="箱型"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="目标巷道">
|
||||
<el-select
|
||||
v-model="query.target_roadway"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in roadList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否翻转">
|
||||
<el-select
|
||||
v-model="query.is_flip"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IS_OR_NOT"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<rrOperation />
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="confirm_flag"
|
||||
@click="startWork()"
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
@click="print"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -197,51 +266,64 @@
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<!--
|
||||
<el-table-column type="selection" width="55" />
|
||||
-->
|
||||
<el-table-column prop="struct_code" label="仓位编码" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="simple_name" label="仓位简称" width="100" />
|
||||
<el-table-column prop="sect_name" label="所属库区" width="150" />
|
||||
<el-table-column prop="stor_name" label="所属仓库" width="150" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="lock_type" label="锁定类型" min-width="120" show-overflow-tooltip>
|
||||
<el-table-column v-if="false" prop="workorder_id" label="生产班次工单标识" />
|
||||
<el-table-column prop="workorder_code" label="工单编号" width="140px" />
|
||||
<el-table-column prop="shift_type_scode" label="班次类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.d_lock_type[scope.row.lock_type] }}
|
||||
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sect_name" label="库区名称" />
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<!-- <el-table-column prop="workprocedure_code" label="工序编码" />-->
|
||||
<el-table-column prop="product_area" label="生产车间" />
|
||||
<el-table-column prop="plan_qty" label="计划数量" />
|
||||
<el-table-column prop="real_qty" label="实际数量" />
|
||||
<el-table-column prop="person_name" label="生产人员" />
|
||||
<el-table-column prop="person_real_qty" label="人员实际数量" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="dq_real_qty" label="电气实际数量" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="workprocedure_name" label="工序名称" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="material_weight" label="物料单重" width="100" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="planproducestart_date" label="计划开始时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="planproduceend_date" label="计划结束时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="realproducestart_date" label="实际开始时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="realproduceend_date" label="实际结束时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="当前设备编码" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="is_canupdate_update" label="操作工是否允许修改报工数量" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row)"
|
||||
/>
|
||||
{{ dict.label.IS_OR_NOT[scope.row.is_canupdate_update] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taskdtl_type" label="锁定任务类型" width="150" :formatter="taskdtl_typeFormat" />
|
||||
<el-table-column prop="task_code" label="锁定任务编码" width="150" />
|
||||
<el-table-column prop="inv_code" label="锁定单据编码" width="150" />
|
||||
<el-table-column prop="inv_type" label="锁定单据类型" width="150" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
v-permission="['admin','structattr:edit','structattr:del']"
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="120px"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column prop="workorder_status" label="工单状态">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
{{ dict.label.MPS_BD_ORDERSTATUS[scope.row.workorder_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_needmove" label="是否搬运">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.IS_OR_NOT[scope.row.is_needmove] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_type" label="创建类型" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.WORKORDER_CREATE_TYPE[scope.row.create_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_error" label="是否异常">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.IS_OR_NOT[scope.row.is_error] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="error_info" label="异常信息" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_name" label="创建人" show-overflow-tooltip />
|
||||
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip />
|
||||
<el-table-column prop="update_name" label="修改人" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -257,7 +339,9 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
|
||||
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import orderExt from '@/views/wms/product_manage/workorder/orderExt'
|
||||
|
||||
const defaultForm = {
|
||||
struct_id: null,
|
||||
@@ -306,14 +390,22 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
|
||||
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL', 'IS_OR_NOT', 'MPS_BD_ORDERSTATUS', 'WORKORDER_CREATE_TYPE', 'PDM_BI_SHIFTTYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '仓位',
|
||||
optShow: { add: true, reset: true },
|
||||
url: 'api/structattr',
|
||||
optShow: {
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
workorder_status: '2',
|
||||
product_area: 'A2',
|
||||
workprocedure_code: 'BZ',
|
||||
is_error: '0'
|
||||
},
|
||||
url: 'api/produceWorkorder',
|
||||
idField: 'struct_id',
|
||||
crudMethod: { ...crudStructattr }
|
||||
})
|
||||
@@ -334,7 +426,10 @@ export default {
|
||||
}
|
||||
return {
|
||||
sects: [],
|
||||
currentRow: null,
|
||||
invtypelist: [],
|
||||
roadList: ['1', '2', '3', '4', '5', '6', '7'],
|
||||
confirm_flag: true,
|
||||
permission: {},
|
||||
rules: {
|
||||
struct_id: [
|
||||
@@ -382,13 +477,11 @@ export default {
|
||||
crudSectattr.getSect({}).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
/* checkoutbill.getInvTypes().then(res => {
|
||||
this.invtypelist = res
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.currentRow = {}
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit](crud, form) {
|
||||
@@ -397,6 +490,33 @@ export default {
|
||||
val[1] = form.sect_id
|
||||
form.cascader = val
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
} else {
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
this.confirm_flag = false
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.confirm_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
sectChange(val) {
|
||||
this.form.sect_id = val[1]
|
||||
},
|
||||
@@ -410,6 +530,23 @@ export default {
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
startWork() {
|
||||
if (!this.crud.query.one_box_package_qty || !this.crud.query.one_package_qty || !this.crud.query.box_type ||
|
||||
!this.crud.query.target_roadway || !this.crud.query.is_flip ||
|
||||
!this.crud.query.tray_full_num) {
|
||||
this.crud.notify('缺少开工必要参数,保证输入框内不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
debugger
|
||||
this.currentRow.extra_map = this.crud.query
|
||||
this.currentRow.extra_map.package_qty = Math.ceil(this.currentRow.plan_qty / this.currentRow.extra_map.one_package_qty)
|
||||
this.currentRow.extra_map.box_num = Math.ceil(this.currentRow.extra_map.package_qty / this.currentRow.extra_map.one_box_package_qty)
|
||||
orderExt.add(this.currentRow).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
})
|
||||
crudProduceshiftorder.openStart(this.currentRow).then(res => {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
@@ -425,6 +562,33 @@ export default {
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
print() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条工单记录进行打印', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
orderExt.getExtList(this.currentRow).then(res => {
|
||||
debugger
|
||||
const item = res[0]
|
||||
// res.forEach((item) => {
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '50mm', '')
|
||||
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '48mm', '28mm', 0, 1)
|
||||
LODOP.ADD_PRINT_BARCODE('10mm', '12mm', '60mm', '25mm', '128Auto', item.bar_code)
|
||||
LODOP.SET_PRINT_STYLEA(0, 'ShowBarText', 0)
|
||||
LODOP.ADD_PRINT_TEXT('35mm', '22mm', '40mm', '20mm', item.bar_code.substring(0, 9))
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
||||
LODOP.ADD_PRINT_TEXT('42mm', '25mm', '40mm', '20mm', item.bar_code.substring(9, 16))
|
||||
console.log(item.barcode)
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
||||
// LODOP.PRINT()// 打印
|
||||
// LODOP.PREVIEW()
|
||||
})
|
||||
// })
|
||||
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 改变状态
|
||||
format_is_used(is_used) {
|
||||
return is_used === true
|
||||
|
||||
19
mes/qd/src/views/wms/product_manage/workorder/orderExt.js
Normal file
19
mes/qd/src/views/wms/product_manage/workorder/orderExt.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/mpsSaleOrderIcExt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getExtList(data) {
|
||||
return request({
|
||||
url: 'api/mpsSaleOrderIcExt/getExtList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, getExtList }
|
||||
@@ -65,7 +65,7 @@ export function getTable(data) {
|
||||
|
||||
export function openStart(data) {
|
||||
return request({
|
||||
url: 'api/produceWorkorder/openStart',
|
||||
url: 'api/produceshiftorder/openStart',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user