Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
|
||||
package org.nl.wms.pda.st.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.pda.st.service.PdaCheckService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "手持盘点")
|
||||
@RequestMapping("/api/pda/check")
|
||||
@Slf4j
|
||||
public class PdaCheckController {
|
||||
|
||||
private final PdaCheckService pdaCheckService;
|
||||
|
||||
@PostMapping("/checkQuery")
|
||||
@Log("盘点单查询")
|
||||
@ApiOperation("盘点单查询")
|
||||
public ResponseEntity<Object> checkQuery(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(pdaCheckService.checkQuery(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/checkQueryDtl")
|
||||
@Log("盘点单明细查询")
|
||||
@ApiOperation("盘点单明细查询")
|
||||
public ResponseEntity<Object> checkQueryDtl(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(pdaCheckService.checkQueryDtl(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/saveCheck")
|
||||
@Log("保存")
|
||||
@ApiOperation("保存")
|
||||
public ResponseEntity<Object> saveCheck(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(pdaCheckService.saveCheck(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmCheck")
|
||||
@Log("确认")
|
||||
@ApiOperation("确认")
|
||||
public ResponseEntity<Object> confirmCheck(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(pdaCheckService.confirmCheck(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
package org.nl.wms.pda.st.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author liuxy
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
public interface PdaCheckService {
|
||||
|
||||
/**
|
||||
* 盘点单查询
|
||||
* @param whereJson /
|
||||
* @return JSONObject /
|
||||
*/
|
||||
JSONObject checkQuery(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 盘点单明细查询
|
||||
* @param whereJson /
|
||||
* @return JSONObject /
|
||||
*/
|
||||
JSONObject checkQueryDtl(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* @param whereJson /
|
||||
* @return JSONObject /
|
||||
*/
|
||||
JSONObject saveCheck(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 确认
|
||||
* @param whereJson /
|
||||
* @return JSONObject /
|
||||
*/
|
||||
JSONObject confirmCheck(JSONObject whereJson);
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
|
||||
package org.nl.wms.pda.st.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.pda.st.service.PdaCheckService;
|
||||
import org.nl.wms.st.instor.service.CheckService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author liuxy
|
||||
* @description 服务实现
|
||||
* @date 2022-05-25
|
||||
**/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class PdaCheckServiceImpl implements PdaCheckService {
|
||||
|
||||
private final CheckService checkService;
|
||||
|
||||
@Override
|
||||
public JSONObject checkQuery(JSONObject whereJson) {
|
||||
|
||||
String check_code = whereJson.getString("check_code");
|
||||
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
if (ObjectUtil.isNotEmpty(check_code)) map.put("check_code","%"+check_code+"%");
|
||||
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data", resultJSONArray);
|
||||
jo.put("message", "查询成功!");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "2");
|
||||
map.put("check_code", whereJson.getString("check_code"));
|
||||
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data", resultJSONArray);
|
||||
jo.put("message", "查询成功!");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject saveCheck(JSONObject whereJson) {
|
||||
//主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_CheckMst");
|
||||
//明细表
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
||||
|
||||
JSONObject jsonMst = wo_mst.query("check_code = '" + whereJson.getString("check_code") + "'").uniqueResult(0);
|
||||
JSONArray dtlArr = wo_dtl.query("check_code = '" + whereJson.getString("check_code") + "'").getResultJSONArray(0);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("form",jsonMst);
|
||||
param.put("rows",dtlArr);
|
||||
|
||||
checkService.saveCheck(param);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "保存成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject confirmCheck(JSONObject whereJson) {
|
||||
//主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_CheckMst");
|
||||
//明细表
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
||||
|
||||
JSONObject jsonMst = wo_mst.query("check_code = '" + whereJson.getString("check_code") + "'").uniqueResult(0);
|
||||
JSONArray dtlArr = wo_dtl.query("check_code = '" + whereJson.getString("check_code") + "'").getResultJSONArray(0);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("form",jsonMst);
|
||||
param.put("rows",dtlArr);
|
||||
|
||||
checkService.confirm(param);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "确认成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
[交易说明]
|
||||
交易名: 手持盘点
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.check_code TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT
|
||||
check_code,
|
||||
(
|
||||
CASE
|
||||
check_type
|
||||
WHEN '1' THEN '计划盘点'
|
||||
WHEN '2' THEN '临时盘点'
|
||||
END
|
||||
) AS check_type,
|
||||
stor_name,
|
||||
dtl_num,
|
||||
(
|
||||
CASE
|
||||
status
|
||||
WHEN '1' THEN '生成'
|
||||
WHEN '2' THEN '审核'
|
||||
WHEN '3' THEN '盘点中'
|
||||
WHEN '99' THEN '完成'
|
||||
END
|
||||
) AS status,
|
||||
(
|
||||
CASE
|
||||
is_nok
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN '异常'
|
||||
END
|
||||
) AS status,
|
||||
input_optname,
|
||||
input_time,
|
||||
confirm_optname,
|
||||
confirm_time,
|
||||
|
||||
check_id
|
||||
FROM
|
||||
ST_IVT_CheckMst
|
||||
WHERE
|
||||
is_delete = '0'
|
||||
AND status in ('1','3')
|
||||
|
||||
OPTION 输入.check_code <> ""
|
||||
check_code like 输入.check_code
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
dtl.check_code,
|
||||
(
|
||||
CASE
|
||||
dtl.status
|
||||
WHEN '1' THEN '生成'
|
||||
WHEN '2' THEN '盘点中'
|
||||
WHEN '3' THEN '已盘点'
|
||||
WHEN '4' THEN '异常处理中'
|
||||
WHEN '5' THEN '异常处理完成'
|
||||
WHEN '99' THEN '确认完成'
|
||||
END
|
||||
) AS status,
|
||||
dtl.sect_name,
|
||||
dtl.struct_name,
|
||||
dtl.storagevehicle_code,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
dtl.base_qty,
|
||||
dtl.fac_qty,
|
||||
dtl.qty_unit_name,
|
||||
(
|
||||
CASE
|
||||
dtl.check_result
|
||||
WHEN '1' THEN '正常'
|
||||
WHEN '2' THEN '盘亏'
|
||||
WHEN '3' THEN '盘盈'
|
||||
END
|
||||
) AS check_result,
|
||||
dtl.check_optname,
|
||||
dtl.check_time,
|
||||
|
||||
dtl.check_id,
|
||||
dtl.checkdtl_id
|
||||
FROM
|
||||
ST_IVT_CheckDtl dtl
|
||||
LEFT JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
OPTION 输入.check_code <> ""
|
||||
dtl.check_code = 输入.check_code
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -16,6 +16,7 @@ import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.service.TaskService;
|
||||
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
||||
import org.nl.wms.st.inbill.service.impl.InbillServiceImpl;
|
||||
import org.nl.wms.st.inbill.service.impl.RawAssistIStorServiceImpl;
|
||||
import org.nl.wms.st.outbill.service.impl.CheckOutBillServiceImpl;
|
||||
@@ -87,7 +88,7 @@ public class OutTask extends AbstractAcsTask {
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
// 调用标识完成
|
||||
CheckOutBillServiceImpl checkOutBillService = new CheckOutBillServiceImpl(null);
|
||||
CheckOutBillServiceImpl checkOutBillService = new CheckOutBillServiceImpl(null,null,null);
|
||||
checkOutBillService.finishTask(jsonTask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,4 +163,9 @@ public interface CheckOutBillService {
|
||||
* 获取全部出入库业务类型
|
||||
*/
|
||||
JSONArray getType();
|
||||
|
||||
/**
|
||||
* 发货信息保存
|
||||
*/
|
||||
void moneySubmit(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -305,9 +305,9 @@ public class CheckServiceImpl implements CheckService {
|
||||
} else if (fac_qty < base_qty) {
|
||||
jo.put("check_result", "2");
|
||||
} else {
|
||||
jo.put("status", "99");
|
||||
jo.put("check_result", "1");
|
||||
}
|
||||
jo.put("status", "99");
|
||||
wo_dtl.insert(jo);
|
||||
}
|
||||
jo_mst.put("dtl_num", rows.size());
|
||||
|
||||
@@ -194,4 +194,11 @@ public class CheckOutBillController {
|
||||
public ResponseEntity<Object> getType() {
|
||||
return new ResponseEntity<>(checkOutBillService.getType(),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/moneySubmit")
|
||||
@Log("发货信息保存")
|
||||
@ApiOperation("发货信息保存")
|
||||
public ResponseEntity<Object> moneySubmit(@RequestBody JSONObject whereJson) {
|
||||
checkOutBillService.moneySubmit(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,16 @@ import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.service.dto.TaskDto;
|
||||
import org.nl.wms.sch.tasks.OutTask;
|
||||
import org.nl.wms.st.inbill.service.CheckOutBillService;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -35,8 +40,9 @@ import java.util.*;
|
||||
@Slf4j
|
||||
public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
|
||||
@Autowired
|
||||
private final StorPublicService storPublicService;
|
||||
private final RawAssistIStorService rawAssistIStorService;
|
||||
private final HandMoveStorService handMoveStorService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
||||
@@ -962,6 +968,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
//仓位表
|
||||
WQLObject attrTab = WQLObject.getWQLObject("ST_IVT_StructAttr");
|
||||
// 库存表
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt");
|
||||
|
||||
String struct_id = whereJson.getString("struct_id");
|
||||
String point_code = whereJson.getString("point_code"); // 终点
|
||||
@@ -1112,9 +1120,52 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
|
||||
}
|
||||
|
||||
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
|
||||
JSONArray table = new JSONArray(); // 明细参数
|
||||
mapParam.put("bill_status", "99");
|
||||
mapParam.put("bill_type", "21");
|
||||
mapParam.put("buss_type", "21");
|
||||
mapParam.put("biz_date", DateUtil.today());
|
||||
mapParam.put("stor_code", "CP01");
|
||||
mapParam.put("stor_id", "1582991156504039424");
|
||||
mapParam.put("stor_name", "成品仓库");
|
||||
|
||||
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
|
||||
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
|
||||
// TODO 创建移库单
|
||||
|
||||
// 查询移入货位
|
||||
JSONObject moveParam = new JSONObject();
|
||||
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
||||
moveParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
|
||||
JSONObject jsonMove = rawAssistIStorService.autoDis(moveParam);
|
||||
// 查询移出货位的库存物料
|
||||
JSONObject jsonMoveIvt = WQL.getWO("ST_OUTIVT03")
|
||||
.addParam("flag","6")
|
||||
.addParam("struct_id",json.getString("struct_id"))
|
||||
.process().uniqueResult(0);
|
||||
|
||||
// 移库单明细
|
||||
JSONObject jsonMoveDtl = new JSONObject();
|
||||
jsonMoveDtl.put("is_task", "2");
|
||||
jsonMoveDtl.put("turnout_sect_id", json.getLongValue("sect_id"));
|
||||
jsonMoveDtl.put("turnout_sect_code", json.getString("sect_code"));
|
||||
jsonMoveDtl.put("turnout_sect_name", json.getString("sect_name"));
|
||||
jsonMoveDtl.put("turnout_struct_id", json.getLongValue("struct_id"));
|
||||
jsonMoveDtl.put("turnout_struct_code", json.getString("struct_code"));
|
||||
jsonMoveDtl.put("turnout_struct_name", json.getString("struct_name"));
|
||||
jsonMoveDtl.put("material_id", jsonMoveIvt.getLongValue("material_id"));
|
||||
jsonMoveDtl.put("pcsn", jsonMoveIvt.getString("pcsn"));
|
||||
jsonMoveDtl.put("quality_scode", "01");
|
||||
jsonMoveDtl.put("qty_unit_id", jsonMoveIvt.getLongValue("qty_unit_id"));
|
||||
jsonMoveDtl.put("qty_unit_name", jsonMoveIvt.getString("unit_name"));
|
||||
jsonMoveDtl.put("qty", jsonMoveIvt.getDoubleValue("canuse_qty"));
|
||||
jsonMoveDtl.put("turnin_sect_id", jsonMove.getLongValue("sect_id"));
|
||||
jsonMoveDtl.put("turnin_sect_code", jsonMove.getString("sect_code"));
|
||||
jsonMoveDtl.put("turnin_sect_name", jsonMove.getString("sect_name"));
|
||||
jsonMoveDtl.put("turnin_struct_id", jsonMove.getLongValue("struct_id"));
|
||||
jsonMoveDtl.put("turnin_struct_code", jsonMove.getString("struct_code"));
|
||||
jsonMoveDtl.put("turnin_struct_name", jsonMove.getString("struct_name"));
|
||||
jsonMoveDtl.put("source_billdtl_id", dis.getLongValue("iostorinvdis_id"));
|
||||
|
||||
// 生成任务
|
||||
JSONObject param2 = new JSONObject();
|
||||
@@ -1122,12 +1173,22 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
param2.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||
param2.put("task_name", "task_name");
|
||||
param2.put("point_code1", json.getString("point_code"));
|
||||
param2.put("point_code2", ""); // TODO 移入仓位
|
||||
param2.put("point_code2", jsonMove.getString("struct_code"));
|
||||
param2.put("task_group_id", jsonTask.getLongValue("task_group_id")); // 任务组
|
||||
param2.put("sort_seq", jsonTask.getIntValue("sort_seq") + i + 1); // 任务组顺序号
|
||||
outTask.createTask(param2);
|
||||
}
|
||||
String move_task_id = outTask.createTask(param2);
|
||||
|
||||
// 回显移库明细任务id
|
||||
jsonMoveDtl.put("task_id", move_task_id);
|
||||
table.add(jsonMoveDtl);
|
||||
// 更新任务处理类
|
||||
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
|
||||
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
|
||||
wo_Task.update(jsonTaskMove);
|
||||
}
|
||||
mapParam.put("tableData", table);
|
||||
// 调用移库单新增方法
|
||||
handMoveStorService.insertDtl2(mapParam);
|
||||
}
|
||||
} else {
|
||||
JSONObject map = new JSONObject();
|
||||
@@ -1172,9 +1233,52 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
|
||||
JSONArray table = new JSONArray(); // 明细参数
|
||||
mapParam.put("bill_status", "99");
|
||||
mapParam.put("bill_type", "21");
|
||||
mapParam.put("buss_type", "21");
|
||||
mapParam.put("biz_date", DateUtil.today());
|
||||
mapParam.put("stor_code", "CP01");
|
||||
mapParam.put("stor_id", "1582991156504039424");
|
||||
mapParam.put("stor_name", "成品仓库");
|
||||
|
||||
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
|
||||
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
|
||||
// TODO 创建移库单
|
||||
|
||||
// 查询移入货位
|
||||
JSONObject moveParam = new JSONObject();
|
||||
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
||||
moveParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
|
||||
JSONObject jsonMove = rawAssistIStorService.autoDis(moveParam);
|
||||
// 查询移出货位的库存物料
|
||||
JSONObject jsonMoveIvt = WQL.getWO("ST_OUTIVT03")
|
||||
.addParam("flag","6")
|
||||
.addParam("struct_id",json.getString("struct_id"))
|
||||
.process().uniqueResult(0);
|
||||
|
||||
// 移库单明细
|
||||
JSONObject jsonMoveDtl = new JSONObject();
|
||||
jsonMoveDtl.put("is_task", "2");
|
||||
jsonMoveDtl.put("turnout_sect_id", json.getLongValue("sect_id"));
|
||||
jsonMoveDtl.put("turnout_sect_code", json.getString("sect_code"));
|
||||
jsonMoveDtl.put("turnout_sect_name", json.getString("sect_name"));
|
||||
jsonMoveDtl.put("turnout_struct_id", json.getLongValue("struct_id"));
|
||||
jsonMoveDtl.put("turnout_struct_code", json.getString("struct_code"));
|
||||
jsonMoveDtl.put("turnout_struct_name", json.getString("struct_name"));
|
||||
jsonMoveDtl.put("material_id", jsonMoveIvt.getLongValue("material_id"));
|
||||
jsonMoveDtl.put("pcsn", jsonMoveIvt.getString("pcsn"));
|
||||
jsonMoveDtl.put("quality_scode", "01");
|
||||
jsonMoveDtl.put("qty_unit_id", jsonMoveIvt.getLongValue("qty_unit_id"));
|
||||
jsonMoveDtl.put("qty_unit_name", jsonMoveIvt.getString("unit_name"));
|
||||
jsonMoveDtl.put("qty", jsonMoveIvt.getDoubleValue("canuse_qty"));
|
||||
jsonMoveDtl.put("turnin_sect_id", jsonMove.getLongValue("sect_id"));
|
||||
jsonMoveDtl.put("turnin_sect_code", jsonMove.getString("sect_code"));
|
||||
jsonMoveDtl.put("turnin_sect_name", jsonMove.getString("sect_name"));
|
||||
jsonMoveDtl.put("turnin_struct_id", jsonMove.getLongValue("struct_id"));
|
||||
jsonMoveDtl.put("turnin_struct_code", jsonMove.getString("struct_code"));
|
||||
jsonMoveDtl.put("turnin_struct_name", jsonMove.getString("struct_name"));
|
||||
jsonMoveDtl.put("source_billdtl_id", dis.getLongValue("iostorinvdis_id"));
|
||||
|
||||
// 生成任务
|
||||
JSONObject param2 = new JSONObject();
|
||||
@@ -1182,15 +1286,25 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
param2.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||
param2.put("task_name", "task_name");
|
||||
param2.put("point_code1", json.getString("point_code"));
|
||||
param2.put("point_code2", ""); // TODO 移入仓位
|
||||
param2.put("point_code2", jsonMove.getString("struct_code"));
|
||||
param2.put("task_group_id", jsonTask.getLongValue("task_group_id")); // 任务组
|
||||
param2.put("sort_seq", jsonTask.getIntValue("sort_seq") + i + 1); // 任务组顺序号
|
||||
outTask.createTask(param2);
|
||||
String move_task_id = outTask.createTask(param2);
|
||||
|
||||
// 回显移库明细任务id
|
||||
jsonMoveDtl.put("task_id", move_task_id);
|
||||
table.add(jsonMoveDtl);
|
||||
// 更新任务处理类
|
||||
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
|
||||
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
|
||||
wo_Task.update(jsonTaskMove);
|
||||
}
|
||||
mapParam.put("tableData", table);
|
||||
// 调用移库单新增方法
|
||||
handMoveStorService.insertDtl2(mapParam);
|
||||
}
|
||||
// 下发
|
||||
outTask.immediateNotifyAcs();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1719,6 +1833,15 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
return jsonArr;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void moneySubmit(JSONObject whereJson) {
|
||||
|
||||
WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
mstTab.update(whereJson);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新主表状态
|
||||
*
|
||||
|
||||
@@ -67,9 +67,20 @@
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios.*
|
||||
ios.*,
|
||||
dis.num
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
count(d.struct_id) AS num,
|
||||
d.iostorinv_id
|
||||
FROM
|
||||
ST_IVT_IOStorInvDis d
|
||||
WHERE
|
||||
1=1
|
||||
group by d.struct_id
|
||||
) AS dis ON ios.iostorinv_id = dis.iostorinv_id
|
||||
WHERE
|
||||
io_type = '1'
|
||||
and ios.is_delete='0'
|
||||
@@ -116,7 +127,9 @@
|
||||
iosdtl.*,
|
||||
ios.bill_code,
|
||||
mb.material_code,
|
||||
mb.material_name
|
||||
mb.material_name,
|
||||
mb.material_spec,
|
||||
mb.material_model
|
||||
FROM
|
||||
ST_IVT_IOStorInvDtl iosdtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = iosdtl.material_id
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.struct_id TYPEAS s_string
|
||||
输入.struct_code TYPEAS s_string
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.out_order_seq TYPEAS s_string
|
||||
@@ -248,3 +249,28 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "6"
|
||||
QUERY
|
||||
SELECT
|
||||
ivt.struct_id,
|
||||
ivt.material_id,
|
||||
sum(ivt.canuse_qty) AS canuse_qty,
|
||||
max(ivt.pcsn) AS pcsn,
|
||||
ivt.qty_unit_id,
|
||||
unit.unit_name
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt
|
||||
LEFT JOIN md_pb_measureunit unit ON ivt.qty_unit_id = unit.measure_unit_id
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
OPTION 输入.struct_id <> ""
|
||||
ivt.struct_id = 输入.struct_id
|
||||
ENDOPTION
|
||||
|
||||
group by ivt.struct_id
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
176
lms/nladmin-ui/src/views/wms/st/outbill/MoneyDialog.vue
Normal file
176
lms/nladmin-ui/src/views/wms/st/outbill/MoneyDialog.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="发货信息"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
v-if="dialogShow"
|
||||
@close="close"
|
||||
>
|
||||
<el-form ref="form" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收货单位:">
|
||||
<el-input v-model="formMst.consignee" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收货人:">
|
||||
<el-input v-model="formMst.receiver" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收货地址:">
|
||||
<el-input v-model="formMst.receiptaddress" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收货人联系电话:">
|
||||
<el-input v-model="formMst.receiptphone" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物流公司:">
|
||||
<el-input v-model="formMst.logisticscompany" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="司机:">
|
||||
<el-input v-model="formMst.drivername" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车牌号:">
|
||||
<el-input v-model="formMst.carno" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="司机联系电话:">
|
||||
<el-input v-model="formMst.driverphone" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同号:">
|
||||
<el-input v-model="formMst.contractno" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送货单位:">
|
||||
<el-input v-model="formMst.deliveryunit" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送货方地址:">
|
||||
<el-input v-model="formMst.deliveryaddress" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送货方联系人:">
|
||||
<el-input v-model="formMst.deliveryname" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送货联系电话:">
|
||||
<el-input v-model="formMst.deliveryphone" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物流公司编码:">
|
||||
<el-input v-model="formMst.trans_code" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预估运费:">
|
||||
<el-input v-model="formMst.estimated_freight" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="moneySubmit">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||
export default {
|
||||
name: 'SunShowDialog',
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.formMst = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formMst: {},
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs['form'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.crud.resetQuery(true)
|
||||
},
|
||||
moneySubmit() {
|
||||
checkoutbill.moneySubmit(this.formMst).then(res => {
|
||||
this.crud.notify('保存成功!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.crud.toQuery()
|
||||
this.close()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -162,4 +162,11 @@ export function getType() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne }
|
||||
export function moneySubmit(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/moneySubmit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit }
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
<el-table-column
|
||||
v-permission="['admin','checkoutbill:del','checkoutbill:edit']"
|
||||
label="操作"
|
||||
width="115"
|
||||
width="200"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -169,6 +169,20 @@
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-upload"
|
||||
@click="openMoney(scope.row)"
|
||||
>
|
||||
发货信息
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-upload"
|
||||
@click="print(scope.row)"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
@@ -201,6 +215,7 @@
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :rowmst="mstrow" @DivChanged="querytable" />
|
||||
<TaskDialog :dialog-show.sync="taskShow" :open-array="openParam" :rowmst="mstrow" @TaskChanged="querytable" />
|
||||
<MoneyDialog :dialog-show.sync="openMoneyDialog" :open-param="openParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -212,15 +227,17 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/st/outbill/AddDialog'
|
||||
import MoneyDialog from '@/views/wms/st/outbill/MoneyDialog'
|
||||
import DivDialog from '@/views/wms/st/outbill/DivDialog'
|
||||
import TaskDialog from '@/views/wms/st/outbill/TaskDialog'
|
||||
import ViewDialog from '@/views/wms/st/outbill/ViewDialog'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
|
||||
export default {
|
||||
name: 'Checkoutbill',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog },
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog, MoneyDialog },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', idField: 'iostorinv_id', url: 'api/checkoutbill', crudMethod: { ...checkoutbill },
|
||||
optShow: {
|
||||
@@ -233,7 +250,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE','ST_INV_OUT_TYPE'],
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -242,6 +259,7 @@ export default {
|
||||
edit: ['admin', 'checkoutbill:edit'],
|
||||
del: ['admin', 'checkoutbill:del']
|
||||
},
|
||||
openMoneyDialog: false,
|
||||
divShow: false,
|
||||
taskShow: false,
|
||||
dis_flag: true,
|
||||
@@ -359,6 +377,173 @@ export default {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
openMoney(row) {
|
||||
this.openParam = row
|
||||
this.openMoneyDialog = true
|
||||
},
|
||||
print(jo) {
|
||||
checkoutbill.getOutBillDtl({ 'iostorinv_id': jo.iostorinv_id }).then(res => {
|
||||
debugger
|
||||
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_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('')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user