Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -316,8 +316,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
instructionService.update(instruction);
|
instructionService.update(instruction);
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
||||||
writing("to_onset", String.valueOf(start_addrIndex));
|
writing("to_onset", String.valueOf(start_addrIndex + 1));
|
||||||
writing("to_target", String.valueOf(next_addrIndex));
|
writing("to_target", String.valueOf(next_addrIndex + 1));
|
||||||
writing("to_task", instruction.getInstruction_code());
|
writing("to_task", instruction.getInstruction_code());
|
||||||
writing("to_command", "1");
|
writing("to_command", "1");
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
@@ -373,8 +373,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
|
//根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
||||||
writing("to_onset", String.valueOf(start_addrIndex));
|
writing("to_onset", String.valueOf(start_addrIndex + 1));
|
||||||
writing("to_target", String.valueOf(next_addrIndex));
|
writing("to_target", String.valueOf(next_addrIndex + 1));
|
||||||
writing("to_task", instdto.getInstruction_code());
|
writing("to_task", instdto.getInstruction_code());
|
||||||
writing("to_command", "1");
|
writing("to_command", "1");
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
|
|||||||
@@ -341,21 +341,21 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
log.debug("设备运转模式:等待工作");
|
log.debug("设备运转模式:等待工作");
|
||||||
return;
|
return;
|
||||||
case 2:
|
case 2:
|
||||||
//前工位申请任务 取空放空
|
//后工位申请任务 取空放空
|
||||||
if (move1 == 0 && action1 == 0 && !requireHeadSucess) {
|
if (move2 == 0 && action2 == 0 && task2 == 0 && !requireHeadSucess) {
|
||||||
instruction_require();
|
instruction_require2();
|
||||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move1:" + move1 + ",action1:" + action1 + ",move2:" + move2 + ",task1:" + task1 + ",requireHeadSucess:" + requireHeadSucess);
|
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move1:" + move1 + ",action1:" + action1 + ",move2:" + move2 + ",task1:" + task1 + ",requireHeadSucess:" + requireHeadSucess);
|
||||||
}
|
}
|
||||||
//后工位申请任务 取满放满
|
//前工位申请任务 取满放满
|
||||||
if (move2 == 0 && action2 == 0 && task2 == 0 && move1 == 0 && task1 > 0 && !requireBackSucess) {
|
if (move1 == 0 && action1 == 0 && task1 == 0 && move2 == 0 && task2 > 0 && !requireBackSucess) {
|
||||||
instruction_require2();
|
instruction_require();
|
||||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//后工位申请任务 取满放满
|
//前工位申请任务 取满放满
|
||||||
if (task1 > 0 && move1 == 1 && action1 == 1 && move2 == 0 && action2 == 0 && !requireBackSucess) {
|
if (task2 > 0 && move2 == 1 && action2 == 1 && move1 == 0 && action1 == 0 && !requireBackSucess) {
|
||||||
instruction_require2();
|
instruction_require();
|
||||||
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
logServer.deviceExecuteLog(device_code, "", String.valueOf(task1), "move2:" + move2 + ",action2:" + action2 + ",move1:" + move1 + ",task2:" + task2 + ",requireBackSucess:" + requireBackSucess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,8 +397,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
instructionService.update(instruction);
|
instructionService.update(instruction);
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
||||||
this.writing("to_onset1", String.valueOf(start_addrIndex));
|
this.writing("to_onset1", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target1", String.valueOf(next_addrIndex));
|
this.writing("to_target1", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task1", instruction.getInstruction_code());
|
this.writing("to_task1", instruction.getInstruction_code());
|
||||||
this.writing("to_command1", "1");
|
this.writing("to_command1", "1");
|
||||||
requireHeadSucess = true;
|
requireHeadSucess = true;
|
||||||
@@ -457,8 +457,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
||||||
this.writing("to_onset1", String.valueOf(start_addrIndex));
|
this.writing("to_onset1", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target1", String.valueOf(next_addrIndex));
|
this.writing("to_target1", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task1", instdto.getInstruction_code());
|
this.writing("to_task1", instdto.getInstruction_code());
|
||||||
this.writing("to_command1", "1");
|
this.writing("to_command1", "1");
|
||||||
requireHeadSucess = true;
|
requireHeadSucess = true;
|
||||||
@@ -493,8 +493,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
instructionService.update(instruction);
|
instructionService.update(instruction);
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
int start_addrIndex = getDeviceCodeList.indexOf(instruction.getStart_device_code());
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
int next_addrIndex = putDeviceCodeList.indexOf(instruction.getNext_device_code());
|
||||||
this.writing("to_onset2", String.valueOf(start_addrIndex));
|
this.writing("to_onset2", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target2", String.valueOf(next_addrIndex));
|
this.writing("to_target2", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task2", instruction.getInstruction_code());
|
this.writing("to_task2", instruction.getInstruction_code());
|
||||||
this.writing("to_command2", "1");
|
this.writing("to_command2", "1");
|
||||||
requireBackSucess = true;
|
requireBackSucess = true;
|
||||||
@@ -552,8 +552,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
//根据查询的任务起始点位 得出取放工位的索引值 写入后工位电气中
|
||||||
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
int start_addrIndex = getDeviceCodeList.indexOf(start_device_code);
|
||||||
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
int next_addrIndex = putDeviceCodeList.indexOf(next_device_code);
|
||||||
this.writing("to_onset2", String.valueOf(start_addrIndex));
|
this.writing("to_onset2", String.valueOf(start_addrIndex + 1));
|
||||||
this.writing("to_target2", String.valueOf(next_addrIndex));
|
this.writing("to_target2", String.valueOf(next_addrIndex + 1));
|
||||||
this.writing("to_task2", instdto.getInstruction_code());
|
this.writing("to_task2", instdto.getInstruction_code());
|
||||||
this.writing("to_command2", "1");
|
this.writing("to_command2", "1");
|
||||||
requireBackSucess = true;
|
requireBackSucess = true;
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
mater.material_code,
|
mater.material_code,
|
||||||
mater.material_name,
|
mater.material_name,
|
||||||
unit.unit_name,
|
unit.unit_name,
|
||||||
region.region_name
|
region.region_name,
|
||||||
|
sub.sap_pcsn
|
||||||
FROM
|
FROM
|
||||||
ST_IVT_StructIvt ivt
|
ST_IVT_StructIvt ivt
|
||||||
LEFT JOIN sch_base_point point ON ivt.struct_id = point.source_id
|
LEFT JOIN sch_base_point point ON ivt.struct_id = point.source_id
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
|
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
|
||||||
LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = ivt.qty_unit_id
|
LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = ivt.qty_unit_id
|
||||||
LEFT JOIN SCH_BASE_Region region ON region.region_id = ivt.region_id
|
LEFT JOIN SCH_BASE_Region region ON region.region_id = ivt.region_id
|
||||||
|
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = ivt.pcsn
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
|
|
||||||
|
|||||||
@@ -698,8 +698,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
public JSONObject childRollPackComplete(JSONObject param) {
|
public JSONObject childRollPackComplete(JSONObject param) {
|
||||||
log.info("childRollPackComplete接口输入参数为:-------------------" + param.toString());
|
log.info("childRollPackComplete接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String is_mesTolms = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_mesTolms").getValue();
|
// String is_mesTolms = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_mesTolms").getValue();
|
||||||
if (StrUtil.equals(is_mesTolms, "1")) {
|
// if (StrUtil.equals(is_mesTolms, "1")) {
|
||||||
String isUnPlanProductionBox = param.getString("isUnPlanProductionBox"); // 生产订单
|
String isUnPlanProductionBox = param.getString("isUnPlanProductionBox"); // 生产订单
|
||||||
String QuanlityInBox = param.getString("QuanlityInBox"); // 产品编码
|
String QuanlityInBox = param.getString("QuanlityInBox"); // 产品编码
|
||||||
String QualityGuaranPeriod = param.getString("QualityGuaranPeriod"); // 分切机台编码
|
String QualityGuaranPeriod = param.getString("QualityGuaranPeriod"); // 分切机台编码
|
||||||
@@ -774,7 +774,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
map.put("box_weight", String.valueOf(BoxWeight));
|
map.put("box_weight", String.valueOf(BoxWeight));
|
||||||
tab.update(map,"package_box_sn = '"+PackageBoxSN+"'");
|
tab.update(map,"package_box_sn = '"+PackageBoxSN+"'");
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("RTYPE", "S");
|
result.put("RTYPE", "S");
|
||||||
result.put("RTMSG", "操作成功!");
|
result.put("RTMSG", "操作成功!");
|
||||||
@@ -794,8 +794,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject inventoryTransferInfoSync(JSONObject param) {
|
public JSONObject inventoryTransferInfoSync(JSONObject param) {
|
||||||
log.info("inventoryTransferInfoSync接口输入参数为:-------------------" + param.toString());
|
log.info("inventoryTransferInfoSync接口输入参数为:-------------------" + param.toString());
|
||||||
String is_mesTolms = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_mesTolms").getValue();
|
// String is_mesTolms = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_mesTolms").getValue();
|
||||||
if (StrUtil.equals(is_mesTolms, "1")) {
|
// if (StrUtil.equals(is_mesTolms, "1")) {
|
||||||
try {
|
try {
|
||||||
JSONArray rows = param.getJSONArray("details");
|
JSONArray rows = param.getJSONArray("details");
|
||||||
String SaleOrderItem = param.getString("SaleOrderItem");
|
String SaleOrderItem = param.getString("SaleOrderItem");
|
||||||
@@ -882,7 +882,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("RTYPE", "S");
|
result.put("RTYPE", "S");
|
||||||
@@ -904,8 +904,9 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
public JSONObject childRollInfoUpdate(JSONObject param) {
|
public JSONObject childRollInfoUpdate(JSONObject param) {
|
||||||
log.info("childRollInfoUpdate接口输入参数为:-------------------" + param.toString());
|
log.info("childRollInfoUpdate接口输入参数为:-------------------" + param.toString());
|
||||||
|
|
||||||
String is_mesTolms = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_mesTolms").getValue();
|
// String is_mesTolms = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("is_mesTolms").getValue();
|
||||||
if (StrUtil.equals(is_mesTolms, "1")) {
|
// if (StrUtil.equals(is_mesTolms, "1")) {
|
||||||
|
|
||||||
String ContainerName = param.getString("ContainerName");
|
String ContainerName = param.getString("ContainerName");
|
||||||
String SaleOrderName = param.getString("SaleOrderName");
|
String SaleOrderName = param.getString("SaleOrderName");
|
||||||
String isUnPlanProduction = param.getString("isUnPlanProduction");
|
String isUnPlanProduction = param.getString("isUnPlanProduction");
|
||||||
@@ -933,7 +934,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
new_sub.put("workorder_id",IdUtil.getSnowflake(1, 1).nextId() + "");
|
new_sub.put("workorder_id",IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelationChangeFlow").insert(new_sub);*/
|
WQLObject.getWQLObject("PDM_BI_SubPackageRelationChangeFlow").insert(new_sub);*/
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("RTYPE", "S");
|
result.put("RTYPE", "S");
|
||||||
|
|||||||
@@ -2443,11 +2443,17 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
// 5.单组填充
|
// 5.单组填充
|
||||||
HashMap<String, Object> oneMap = new HashMap<>();
|
HashMap<String, Object> oneMap = new HashMap<>();
|
||||||
|
|
||||||
// 送货单号
|
|
||||||
JSONObject jsonDtl = dtlTab.query("iostorinv_id = '" + jsonMst.getString("iostorinv_id") + "'").uniqueResult(0);
|
JSONObject jsonDtl = dtlTab.query("iostorinv_id = '" + jsonMst.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonDtl)) oneMap.put("vbeln",jsonDtl.getString("vbeln"));
|
if (ObjectUtil.isNotEmpty(jsonDtl)) {
|
||||||
// 页码
|
// 送货单号
|
||||||
String pageNow = String.valueOf(j + 1);
|
oneMap.put("vbeln",jsonDtl.getString("vbeln"));
|
||||||
|
// 订单号
|
||||||
|
String source_bill_code = jsonDtl.getString("source_bill_code");
|
||||||
|
if (ObjectUtil.isNotEmpty(source_bill_code)) {
|
||||||
|
oneMap.put("order_no",source_bill_code.substring(0,source_bill_code.indexOf("-")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String pageNow = String.valueOf(j + 1); // 页码
|
||||||
oneMap.put("page",pageNow+ "/" + MapUtil.getStr(whereJson,"pageNum"));
|
oneMap.put("page",pageNow+ "/" + MapUtil.getStr(whereJson,"pageNum"));
|
||||||
oneMap.put("consignee", jsonMst.getString("consignee")); // 收货单位
|
oneMap.put("consignee", jsonMst.getString("consignee")); // 收货单位
|
||||||
oneMap.put("receiver", jsonMst.getString("receiver")); // 收货人
|
oneMap.put("receiver", jsonMst.getString("receiver")); // 收货人
|
||||||
@@ -2483,6 +2489,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
WriteSheet sheet = EasyExcel.writerSheet().build();
|
WriteSheet sheet = EasyExcel.writerSheet().build();
|
||||||
for (int i = 0; i < dtlArr.size(); i++) {
|
for (int i = 0; i < dtlArr.size(); i++) {
|
||||||
JSONObject json = dtlArr.getJSONObject(i);
|
JSONObject json = dtlArr.getJSONObject(i);
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + json.getString("box_no") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("package_box_sn = '" + json.getString("box_no") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("没有查询到子卷包装");
|
if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("没有查询到子卷包装");
|
||||||
order_no = jsonSub.getString("sale_order_name");
|
order_no = jsonSub.getString("sale_order_name");
|
||||||
@@ -2509,9 +2516,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
all_qty = NumberUtil.add(String.valueOf(all_qty), json.getString("qty")).doubleValue();
|
all_qty = NumberUtil.add(String.valueOf(all_qty), json.getString("qty")).doubleValue();
|
||||||
}
|
}
|
||||||
// 订单号
|
// 订单号
|
||||||
if (ObjectUtil.isNotEmpty(order_no)) {
|
/* if (ObjectUtil.isNotEmpty(order_no)) {
|
||||||
oneMap.put("order_no",order_no.substring(0,order_no.indexOf("-")));
|
oneMap.put("order_no",order_no.substring(0,order_no.indexOf("-")));
|
||||||
}
|
}*/
|
||||||
oneMap.put("all_qty",all_qty); // 合计
|
oneMap.put("all_qty",all_qty); // 合计
|
||||||
workBook.fill(oneMap, sheet);
|
workBook.fill(oneMap, sheet);
|
||||||
workBook.fill(new FillWrapper("data", flData), sheet);
|
workBook.fill(new FillWrapper("data", flData), sheet);
|
||||||
@@ -2559,9 +2566,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// 订单号
|
// 订单号
|
||||||
if (ObjectUtil.isNotEmpty(order_no)) {
|
/* if (ObjectUtil.isNotEmpty(order_no)) {
|
||||||
oneMap.put("order_no",order_no.substring(0,order_no.indexOf("-")));
|
oneMap.put("order_no",order_no.substring(0,order_no.indexOf("-")));
|
||||||
}
|
}*/
|
||||||
oneMap.put("all_qty",all_qty); // 合计
|
oneMap.put("all_qty",all_qty); // 合计
|
||||||
WriteSheet sheet = EasyExcel.writerSheet(0).build();
|
WriteSheet sheet = EasyExcel.writerSheet(0).build();
|
||||||
workBook.fill(oneMap, sheet);
|
workBook.fill(oneMap, sheet);
|
||||||
|
|||||||
@@ -71,7 +71,9 @@
|
|||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
ios.*,
|
ios.*,
|
||||||
cu.shd_dtl_num
|
cu.shd_dtl_num,
|
||||||
|
cu.cust_name,
|
||||||
|
cu.cust_simple_name
|
||||||
FROM
|
FROM
|
||||||
ST_IVT_IOStorInv ios
|
ST_IVT_IOStorInv ios
|
||||||
LEFT JOIN md_cs_customerbase cu ON ios.cust_code = cu.cust_code
|
LEFT JOIN md_cs_customerbase cu ON ios.cust_code = cu.cust_code
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="pcsn" label="子卷号" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="pcsn" label="子卷号" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="sap_pcsn" label="sap批次" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="canuse_qty" label="可用数" :formatter="rounding" />
|
<el-table-column prop="canuse_qty" label="可用数" :formatter="rounding" />
|
||||||
<el-table-column prop="frozen_qty" label="冻结数" :formatter="rounding" />
|
<el-table-column prop="frozen_qty" label="冻结数" :formatter="rounding" />
|
||||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="rounding" />
|
<el-table-column prop="ivt_qty" label="库存数" :formatter="rounding" />
|
||||||
|
|||||||
@@ -199,6 +199,8 @@
|
|||||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
||||||
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
|
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
|
||||||
<el-table-column label="总重量" align="center" prop="total_qty" width="100" />
|
<el-table-column label="总重量" align="center" prop="total_qty" width="100" />
|
||||||
|
<el-table-column show-overflow-tooltip label="客户" align="center" prop="cust_simple_name" width="100" />
|
||||||
|
<el-table-column show-overflow-tooltip label="客户编码" align="center" prop="cust_code" width="100" />
|
||||||
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
|
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
|
||||||
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_optname" />
|
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_optname" />
|
||||||
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" />
|
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" />
|
||||||
@@ -384,171 +386,6 @@ export default {
|
|||||||
this.openParam = row
|
this.openParam = row
|
||||||
this.openMoneyDialog = true
|
this.openMoneyDialog = true
|
||||||
},
|
},
|
||||||
print(jo) {
|
|
||||||
checkoutbill.getOutBillDtl({ 'iostorinv_id': jo.iostorinv_id }).then(res => {
|
|
||||||
var total_array = []
|
|
||||||
for (var i = 0; i < res.length; i++) {
|
|
||||||
var jre = res[i]
|
|
||||||
var single_array = []
|
|
||||||
single_array.push(jre.seq_no)
|
|
||||||
single_array.push(jre.source_bill_code)
|
|
||||||
single_array.push(jre.material_name)
|
|
||||||
single_array.push(jre.material_spec)
|
|
||||||
single_array.push(jre.qty_unit_name)
|
|
||||||
single_array.push(jre.plan_qty)
|
|
||||||
single_array.push(jre.remark)
|
|
||||||
total_array.push(single_array)
|
|
||||||
}
|
|
||||||
// 对total_array进行分页,每40条数据分为一页
|
|
||||||
var page = Math.ceil(total_array.length / 10) // 页数,向上取整
|
|
||||||
var left = parseInt(total_array.length % 10) // 最后一页条数
|
|
||||||
// 组织打印格式
|
|
||||||
var jastr = []
|
|
||||||
jastr[0] = this.print_getTableHtml({
|
|
||||||
heads: [{ width: '50px', name: '序号', colname: '0' },
|
|
||||||
{ width: '135px', name: '订单号', colname: '1' },
|
|
||||||
{ width: '250px', name: '物料名称', colname: '2' },
|
|
||||||
{ width: '60px', name: '型号规格', colname: '3' },
|
|
||||||
{ width: '60px', name: '单位', colname: '4' },
|
|
||||||
{ width: '100px', name: '数量', colname: '5' },
|
|
||||||
{ width: '50px', name: '备注', colname: '6' }
|
|
||||||
],
|
|
||||||
rows: total_array
|
|
||||||
})
|
|
||||||
jo.lastSize = left + 2 // 最后一页的数据量加2个单位,显示生成人等字段
|
|
||||||
this.print2(jastr, jo)
|
|
||||||
alert('打印成功!')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
print2(jastr, jo) {
|
|
||||||
debugger
|
|
||||||
var LODOP = getLodop()
|
|
||||||
// for循环
|
|
||||||
var num = jastr.length
|
|
||||||
LODOP.ADD_PRINT_TABLE('28%', 0, '100%', '100%', jastr[0])
|
|
||||||
LODOP.ADD_PRINT_HTM('10%', '5%', '100%', '100%', '地址:' + jo.deliveryaddress)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -1)
|
|
||||||
LODOP.ADD_PRINT_HTM('10%', '40%', '100%', '100%', '联系人:' + jo.deliveryname)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -2)
|
|
||||||
LODOP.ADD_PRINT_HTM('10%', '70%', '100%', '100%', '联系电话:' + jo.deliveryphone)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -3)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('15%', '5%', '100%', '100%', '仓储:______________')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -4)
|
|
||||||
LODOP.ADD_PRINT_HTM('15%', '40%', '100%', '100%', '财务部:______________')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -5)
|
|
||||||
LODOP.ADD_PRINT_HTM('15%', '70%', '100%', '100%', '司机签字:______________')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -6)
|
|
||||||
LODOP.ADD_PRINT_HTM('20%', '5%', '100%', '100%', '客户(签字盖章):______________')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', -7)
|
|
||||||
|
|
||||||
// 另起一页
|
|
||||||
LODOP.SET_PRINT_STYLE('FontSize', 17)
|
|
||||||
LODOP.SET_PRINT_STYLE('Bold', 1)
|
|
||||||
LODOP.ADD_PRINT_TEXT('-7%', '30%', '100%', '100%', '甘肃海亮新能源材料有限公司')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.SET_PRINT_STYLE('FontSize', 15)
|
|
||||||
LODOP.SET_PRINT_STYLE('Bold', 1)
|
|
||||||
LODOP.ADD_PRINT_TEXT('-1%', '45%', '100%', '100%', '送货单')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
// 画线
|
|
||||||
// LODOP.ADD_PRINT_LINE('0%', '10%', '10%', '100%', 0, 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('3%', '5%', '100%', '100%', '实际发货日期:' + jo.biz_date)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('3%', '70%', '100%', '100%', '送货单号:' + jo.bill_code)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('7%', '5%', '100%', '100%', '收货单位:' + jo.consignee)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
LODOP.ADD_PRINT_HTM('7%', '70%', '100%', '100%', '收货人:' + jo.receiver)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('11%', '5%', '100%', '100%', '收货地址:' + jo.receiptaddress)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
LODOP.ADD_PRINT_HTM('11%', '70%', '100%', '100%', '联系电话:' + jo.receiptphone)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('15%', '5%', '100%', '100%', '物流公司:' + jo.logisticscompany)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
LODOP.ADD_PRINT_HTM('15%', '70%', '100%', '100%', '司机:' + jo.drivername)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('19%', '5%', '100%', '100%', '车牌号:' + jo.carno)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
LODOP.ADD_PRINT_HTM('19%', '70%', '100%', '100%', '联系电话:' + jo.driverphone)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM('23%', '5%', '100%', '100%', '合同号:' + jo.contractno)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
LODOP.ADD_PRINT_HTM('23%', '45%', '100%', '100%', '总箱数:' + jo.num)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
LODOP.ADD_PRINT_HTM('23%', '70%', '100%', '100%', '总毛重:' + jo.total_qty)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
|
|
||||||
|
|
||||||
LODOP.NEWPAGE()
|
|
||||||
LODOP.SET_PRINT_STYLE('FontSize', 12)
|
|
||||||
LODOP.SET_PRINT_STYLE('Bold', 0)
|
|
||||||
LODOP.ADD_PRINT_TEXT('6%', '69%', 165, 22, '页码:[第#页/共&页]')
|
|
||||||
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 2)
|
|
||||||
//
|
|
||||||
// LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
|
|
||||||
// LODOP.PRINT();
|
|
||||||
LODOP.PREVIEWA()
|
|
||||||
},
|
|
||||||
print_getTableHtml(jparam) {
|
|
||||||
var _heads = jparam.heads
|
|
||||||
var _rows = jparam.rows
|
|
||||||
var _foothtml = jparam.foothtml
|
|
||||||
|
|
||||||
var strStyle = '<style> table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>'
|
|
||||||
var arr = []
|
|
||||||
arr.push('<table border=1 cellSpacing=0 cellPadding=1 width=\'100%\' style=\'border-collapse:collapse;font-size:13px\' bordercolor=\'#333333\'>')
|
|
||||||
arr.push(' <thead>')
|
|
||||||
arr.push(' <tr>')
|
|
||||||
for (var i = 0; i < _heads.length; i++) {
|
|
||||||
var head = _heads[i]
|
|
||||||
arr.push(' <td width=\'' + head.width + '\'>')
|
|
||||||
arr.push(' <div align=center><b>' + head.name + '</b></div>')
|
|
||||||
arr.push(' </td>')
|
|
||||||
}
|
|
||||||
arr.push(' </tr>')
|
|
||||||
arr.push(' </thead>')
|
|
||||||
arr.push(' <tbody>')
|
|
||||||
for (var i = 0; i < _rows.length; i++) {
|
|
||||||
var row = _rows[i]
|
|
||||||
arr.push(' <tr>')
|
|
||||||
for (var j = 0; j < _heads.length; j++) {
|
|
||||||
var head = _heads[j]
|
|
||||||
arr.push(' <td align=center>' + row[head.colname] + '</td>')
|
|
||||||
}
|
|
||||||
arr.push(' </tr>')
|
|
||||||
}
|
|
||||||
arr.push(' </tbody>')
|
|
||||||
if (_foothtml) {
|
|
||||||
arr.push(' <tfoot>' + _foothtml + '</tfoot>')
|
|
||||||
}
|
|
||||||
arr.push('</table>')
|
|
||||||
return strStyle + arr.join('')
|
|
||||||
},
|
|
||||||
printExcel(jo) {
|
printExcel(jo) {
|
||||||
if (jo.shd_dtl_num === '') {
|
if (jo.shd_dtl_num === '') {
|
||||||
return this.crud.notify('客户为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
return this.crud.notify('客户为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
|||||||
Reference in New Issue
Block a user