apt:输送线任务改成异步调用/刻字空框送回不做点位校验;
This commit is contained in:
@@ -73,4 +73,11 @@ public interface WmsToAcsService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONObject request(JSONObject arr,String url);
|
JSONObject request(JSONObject arr,String url);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异步入库
|
||||||
|
* @param arr
|
||||||
|
* @param url
|
||||||
|
*/
|
||||||
|
void asyncRequest(JSONObject arr,String url);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
package org.nl.wms.ext_manage.acs.service.impl;
|
package org.nl.wms.ext_manage.acs.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
|
import org.nl.common.enums.StatusEnum;
|
||||||
import org.nl.common.utils.AcsUtil;
|
import org.nl.common.utils.AcsUtil;
|
||||||
|
import org.nl.common.utils.AsyncHttpRequest;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.MapOf;
|
import org.nl.common.utils.MapOf;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
||||||
|
import org.nl.wms.system_manage.service.param.impl.SysParamServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -145,5 +154,16 @@ public class WmsToAcsServiceImpl implements WmsToAcsService{
|
|||||||
public JSONObject request(JSONObject arr, String url) {
|
public JSONObject request(JSONObject arr, String url) {
|
||||||
return AcsUtil.notifyAcs(url, arr);
|
return AcsUtil.notifyAcs(url, arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void asyncRequest(JSONObject arr, String api) {
|
||||||
|
String isConnect = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_ACS").getValue();
|
||||||
|
if (StrUtil.equals(StatusEnum.STATUS_FLASE.getCode(), isConnect)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String acsUrl = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("acs_url").getValue();
|
||||||
|
Future<HttpResponse> execute = AsyncHttpRequest.post(acsUrl + api, arr.toString()).execute(null);
|
||||||
|
log.info("异步下发ACS参数----------------------------------------+"+acsUrl+",---"+arr.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.wms.mps_manage.other.service.orderExt.IMpsSaleOrderIcExtService;
|
import org.nl.wms.mps_manage.other.service.orderExt.IMpsSaleOrderIcExtService;
|
||||||
import org.nl.wms.mps_manage.other.service.orderExt.dao.MpsSaleOrderIcExt;
|
import org.nl.wms.mps_manage.other.service.orderExt.dao.MpsSaleOrderIcExt;
|
||||||
|
import org.nl.wms.mps_manage.saleorder.service.IMpsSaleOrderService;
|
||||||
|
import org.nl.wms.mps_manage.saleorder.service.dao.MpsSaleOrder;
|
||||||
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
|
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -21,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -37,7 +41,7 @@ public class MpsSaleOrderIcExtController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMpsSaleOrderIcExtService extService;
|
private IMpsSaleOrderIcExtService extService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPdmProduceWorkorderService workorderService;
|
private IMpsSaleOrderService saleOrderService;
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Log("新增订单扩展表")
|
@Log("新增订单扩展表")
|
||||||
@@ -51,9 +55,13 @@ public class MpsSaleOrderIcExtController {
|
|||||||
@Log("新增订单扩展表")
|
@Log("新增订单扩展表")
|
||||||
//("新增订单扩展表")
|
//("新增订单扩展表")
|
||||||
public ResponseEntity<Object> query(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> query(@RequestBody JSONObject whereJson) {
|
||||||
MpsSaleOrderIcExt one = extService.getOne(new QueryWrapper<MpsSaleOrderIcExt>()
|
Map<String, Object> map = extService.getMap(new QueryWrapper<MpsSaleOrderIcExt>()
|
||||||
.eq("sale_id", whereJson.getString("sale_id")).eq("material_code", whereJson.getString("material_code")));
|
.eq("sale_id", whereJson.getString("sale_id")).eq("material_code", whereJson.getString("material_code")));
|
||||||
return new ResponseEntity<>(one,HttpStatus.OK);
|
if (map==null){
|
||||||
|
MpsSaleOrder saleOrder = saleOrderService.getById(whereJson.getString("sale_id"));
|
||||||
|
map= MapOf.of("sale_code",saleOrder.getSale_code(),"material_code",whereJson.getString("material_code"),"bar_code","","print_no",0,"orderext_id","");
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(map,HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getExtList")
|
@PostMapping("/getExtList")
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.nl.common.TableDataInfo;
|
|||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
import org.nl.common.enums.AcsTaskEnum;
|
import org.nl.common.enums.AcsTaskEnum;
|
||||||
import org.nl.common.enums.StatusEnum;
|
import org.nl.common.enums.StatusEnum;
|
||||||
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.common.utils.RedissonUtils;
|
import org.nl.common.utils.RedissonUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
||||||
@@ -38,10 +39,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@@ -191,14 +190,48 @@ public class TmpKZController {
|
|||||||
@Log("手动送空框")
|
@Log("手动送空框")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> sendVechile(@RequestBody JSONObject param){
|
public ResponseEntity<Object> sendVechile(@RequestBody JSONObject param){
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/kz/resend")
|
@PostMapping("/kz/resend")
|
||||||
@Log("刻字任务重新下发")
|
@Log("刻字任务重新下发")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> resend(@RequestBody JSONObject param){
|
public ResponseEntity<Object> resend(@RequestBody JSONObject param){
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
SchBaseTask baseTask = taskService.getById(param.getString("task_id"));
|
||||||
|
if (baseTask.getTask_status().equals(StatusEnum.TASK_FINISH.getCode())){
|
||||||
|
throw new BadRequestException("任务已经完成");
|
||||||
|
};
|
||||||
|
if (baseTask.getTask_type().equals(AcsTaskEnum.TASK_Engrave_CALL.getCode())){
|
||||||
|
//下发
|
||||||
|
Map<String,String> qtyArr = JSONObject.parseObject(baseTask.getQtyArr(), Map.class);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("start_point_code", baseTask.getPoint_code1());
|
||||||
|
jo.put("task_code", baseTask.getTask_code());
|
||||||
|
jo.put("all_weight", baseTask.getMaterial_qty().intValue());
|
||||||
|
String[] to_sort_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
|
String[] to_devices_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
|
String[] to_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
|
List<String> sort = qtyArr.keySet().stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
||||||
|
for (int i1 = 0; i1 < sort.size(); i1++) {
|
||||||
|
String key = sort.get(i1);
|
||||||
|
to_sort_array[i1] = String.valueOf(i1+1);
|
||||||
|
to_devices_array[i1] = String.valueOf(key);
|
||||||
|
to_weight_array[i1] = String.valueOf(new BigDecimal(qtyArr.get(key)));
|
||||||
|
}
|
||||||
|
jo.put("to_sort_array", Arrays.stream(to_sort_array).collect(Collectors.joining(",")));
|
||||||
|
jo.put("to_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
||||||
|
jo.put("to_weight_array", Arrays.stream(to_weight_array).collect(Collectors.joining(",")));
|
||||||
|
JSONObject result = wmsToAcsService.request(jo, "api/wms/engravingIn");
|
||||||
|
if (!result.getString("status").equals("200")){
|
||||||
|
log.error("刻字上料输送线任务下发异常:{}",result.getString("message"));
|
||||||
|
baseTask.setRemark(result.getString("message"));
|
||||||
|
taskService.updateById(baseTask);
|
||||||
|
throw new BadRequestException(result.getString("message"));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
taskService.operation(MapOf.of("method_name","immediateNotifyAcs","task_id",param.getString("task_id")));
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,12 +98,7 @@ public class EngraveSendEmpTask extends AbstractAcsTask {
|
|||||||
String start_point_code = param.getString("device_code");
|
String start_point_code = param.getString("device_code");
|
||||||
//?刻字满料请求:可以存在多个任务?
|
//?刻字满料请求:可以存在多个任务?
|
||||||
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||||
.lt("task_status", StatusEnum.TASK_FINISH.getCode())
|
.lt("task_status", StatusEnum.TASK_FINISH.getCode()).eq("task_type",AcsTaskEnum.TASK_Engrave_EMPTY.getCode()));
|
||||||
.and(wa->wa
|
|
||||||
.eq("point_code1", param.getString("device_code"))
|
|
||||||
.or()
|
|
||||||
.eq("point_code3", param.getString("device_code")))
|
|
||||||
);
|
|
||||||
if (!CollectionUtils.isEmpty(list)){
|
if (!CollectionUtils.isEmpty(list)){
|
||||||
throw new BadRequestException(String.format("设备%s存在未完成任务"+list.stream().map(SchBaseTask::getTask_id).collect(Collectors.toList()).toString(), param.getString("device_code")));
|
throw new BadRequestException(String.format("设备%s存在未完成任务"+list.stream().map(SchBaseTask::getTask_id).collect(Collectors.toList()).toString(), param.getString("device_code")));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ public class EngraveTranSportTask extends AbstractAcsTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISchBaseTaskService taskService;
|
private ISchBaseTaskService taskService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPdmProduceWorkorderService workorderService;
|
|
||||||
@Autowired
|
|
||||||
private IMdMeMaterialbaseService materialbaseService;
|
private IMdMeMaterialbaseService materialbaseService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WmsToAcsService wms;
|
private WmsToAcsService wms;
|
||||||
@@ -94,22 +92,17 @@ public class EngraveTranSportTask extends AbstractAcsTask {
|
|||||||
String[] to_sort_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
String[] to_sort_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
String[] to_devices_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
String[] to_devices_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
String[] to_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
String[] to_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||||
int i=0;
|
|
||||||
List<String> sort = qtyArr.keySet().stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
List<String> sort = qtyArr.keySet().stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
||||||
for (int i1 = 0; i1 < sort.size(); i1++) {
|
for (int i1 = 0; i1 < sort.size(); i1++) {
|
||||||
String key = sort.get(i1);
|
String key = sort.get(i1);
|
||||||
to_sort_array[i] = String.valueOf(i1+1);
|
to_sort_array[i1] = String.valueOf(i1+1);
|
||||||
to_devices_array[i] = String.valueOf(key);
|
to_devices_array[i1] = String.valueOf(key);
|
||||||
to_weight_array[i] = String.valueOf(new BigDecimal(qtyArr.get(key)));
|
to_weight_array[i1] = String.valueOf(new BigDecimal(qtyArr.get(key)));
|
||||||
}
|
}
|
||||||
jo.put("to_sort_array", Arrays.stream(to_sort_array).collect(Collectors.joining(",")));
|
jo.put("to_sort_array", Arrays.stream(to_sort_array).collect(Collectors.joining(",")));
|
||||||
jo.put("to_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
jo.put("to_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
||||||
jo.put("to_weight_array", Arrays.stream(to_weight_array).collect(Collectors.joining(",")));
|
jo.put("to_weight_array", Arrays.stream(to_weight_array).collect(Collectors.joining(",")));
|
||||||
JSONObject result = wms.request(jo, "api/wms/engravingIn");
|
wms.asyncRequest(jo, "api/wms/engravingIn");
|
||||||
if (!result.getString("status").equals("200")){
|
|
||||||
log.error("刻字上料输送线任务下发异常:{}",result.getString("message"));
|
|
||||||
throw new BadRequestException(result.getString("message"));
|
|
||||||
}
|
|
||||||
taskService.save(baseTask);
|
taskService.save(baseTask);
|
||||||
return baseTask.getTask_id();
|
return baseTask.getTask_id();
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
|
|||||||
@@ -268,29 +268,34 @@
|
|||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
width="400px"
|
width="600px"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
@open="printFormm()"
|
@open="printFormm()"
|
||||||
@close="close()"
|
@close="close()"
|
||||||
>
|
>
|
||||||
<el-form>
|
<el-card class="box-card" shadow="never">
|
||||||
<el-form-item label="订单号" prop="pwd">
|
<el-form ref="form" :inline="true" :model="form" size="mini" label-width="160px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
|
||||||
<el-input v-model="printForm.sale_code" type="text" style="width: 200px" />
|
<el-form-item label="订单号" prop="pwd">
|
||||||
</el-form-item>
|
<el-input v-model="printForm.sale_code" disabled type="text" style="width: 200px" />
|
||||||
<el-form-item label="物料编号" prop="pwd">
|
</el-form-item>
|
||||||
<el-input v-model="printForm.material_code" type="text" style="width: 200px" />
|
<el-form-item label="物料编号" prop="pwd">
|
||||||
</el-form-item>
|
<el-input v-model="printForm.material_code" disabled type="text" style="width: 200px" />
|
||||||
<el-form-item label="当前箱标签" prop="pwd">
|
</el-form-item>
|
||||||
<el-input v-model="printForm.bar_code" type="text" style="width: 200px" />
|
<el-form-item label="当前箱标签" prop="pwd">
|
||||||
</el-form-item>
|
<el-input v-model="printForm.bar_code" disabled type="text" style="width: 200px" />
|
||||||
<el-form-item label="当前打印箱号" prop="pwd">
|
</el-form-item>
|
||||||
<el-input v-model="printForm.print_no" type="text" style="width: 100px" />
|
<el-form-item label="当前打印箱号" prop="pwd">
|
||||||
<el-button type="primary" @click="submit">重置箱号</el-button>
|
<el-input v-model="printForm.print_no" type="text" style="width: 100px" />
|
||||||
</el-form-item>
|
<el-button type="primary" @click="resetno">重置箱号</el-button>
|
||||||
</el-form>
|
</el-form-item>
|
||||||
|
<el-form-item label="打印标签数量" prop="pwd">
|
||||||
|
<el-input-number v-model="printForm.print_number" type="text" style="width: 100px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="submit">确 定</el-button>
|
<el-button type="primary" @click="submit">打 印</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -489,6 +494,7 @@ export default {
|
|||||||
form.cascader = val
|
form.cascader = val
|
||||||
},
|
},
|
||||||
submit() {},
|
submit() {},
|
||||||
|
resetno() {},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
if (val.length > 1) {
|
if (val.length > 1) {
|
||||||
this.$refs.table.clearSelection()
|
this.$refs.table.clearSelection()
|
||||||
@@ -579,12 +585,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
printFormm(){
|
printFormm(){
|
||||||
const param ={"sale_id":this.form.sale_id,"material_code":this.form.material_code}
|
const param ={"sale_id":this.currentRow.sale_id,"material_code":this.currentRow.material_code}
|
||||||
orderExt.getQuery(param).then(res => {
|
orderExt.getQuery(param).then(res => {
|
||||||
if (res.length == 0 || !res) {
|
this.printForm = res
|
||||||
this.crud.notify('该工单需要打印的箱数为0', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
close(){
|
close(){
|
||||||
@@ -593,34 +596,32 @@ export default {
|
|||||||
},
|
},
|
||||||
print(){
|
print(){
|
||||||
this.dialogVisible =true
|
this.dialogVisible =true
|
||||||
// if (!this.currentRow.workorder_code) {
|
},
|
||||||
// this.crud.notify('请选择一条工单记录进行打印', CRUD.NOTIFICATION_TYPE.INFO)
|
printNumber(){
|
||||||
// return
|
orderExt.getExtList(this.currentRow).then(res => {
|
||||||
// }
|
if (res.length == 0 || !res) {
|
||||||
// orderExt.getExtList(this.currentRow).then(res => {
|
this.crud.notify('该工单需要打印的箱数为0', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
// if (res.length == 0 || !res) {
|
return
|
||||||
// this.crud.notify('该工单需要打印的箱数为0', CRUD.NOTIFICATION_TYPE.INFO)
|
}
|
||||||
// return
|
res.forEach((item) => {
|
||||||
// }
|
const LODOP = getLodop()
|
||||||
// res.forEach((item) => {
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||||
// const LODOP = getLodop()
|
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||||
// LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '50mm', '')
|
||||||
// // 打印纸张大小设置https://www.it610.com/article/2094844.html
|
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '48mm', '28mm', 0, 1)
|
||||||
// LODOP.SET_PRINT_PAGESIZE(1, '80mm', '50mm', '')
|
LODOP.ADD_PRINT_BARCODE('10mm', '12mm', '60mm', '25mm', '128Auto', item.bar_code)
|
||||||
// // LODOP.ADD_PRINT_RECT('0mm', '0mm', '48mm', '28mm', 0, 1)
|
LODOP.SET_PRINT_STYLEA(0, 'ShowBarText', 0)
|
||||||
// LODOP.ADD_PRINT_BARCODE('10mm', '12mm', '60mm', '25mm', '128Auto', item.bar_code)
|
LODOP.ADD_PRINT_TEXT('35mm', '22mm', '40mm', '20mm', item.bar_code.substring(0, 9))
|
||||||
// LODOP.SET_PRINT_STYLEA(0, 'ShowBarText', 0)
|
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
||||||
// LODOP.ADD_PRINT_TEXT('35mm', '22mm', '40mm', '20mm', item.bar_code.substring(0, 9))
|
LODOP.ADD_PRINT_TEXT('42mm', '25mm', '40mm', '20mm', item.bar_code.substring(9, 16))
|
||||||
// LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
console.log(item.barcode)
|
||||||
// LODOP.ADD_PRINT_TEXT('42mm', '25mm', '40mm', '20mm', item.bar_code.substring(9, 16))
|
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
||||||
// console.log(item.barcode)
|
LODOP.PRINT()// 打印
|
||||||
// LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
// LODOP.PREVIEW()
|
||||||
// LODOP.PRINT()// 打印
|
})
|
||||||
// // LODOP.PREVIEW()
|
})
|
||||||
// })
|
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
// })
|
this.crud.toQuery()
|
||||||
// this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
// this.crud.toQuery()
|
|
||||||
},
|
},
|
||||||
// 改变状态
|
// 改变状态
|
||||||
format_is_used(is_used) {
|
format_is_used(is_used) {
|
||||||
|
|||||||
Reference in New Issue
Block a user