Commit 12768af3 authored by 鲁鑫's avatar 鲁鑫

工序外协打印

parent 245c9c9d
......@@ -114,5 +114,33 @@ ADD COLUMN `comments` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai
--2024-10-15 EP销售订单修改/取消增加单价和总价
ALTER TABLE `topsun_dev`.`ep_sale_order_cancel_item`
ADD COLUMN `PRICE` decimal(10, 3) NULL COMMENT '单价' AFTER `PROCESS`,
ADD COLUMN `AMOUNT` decimal(10, 3) NULL COMMENT '总价' AFTER `PRICE`;
\ No newline at end of file
ADD COLUMN `PRICE` decimal(15, 3) NULL COMMENT '单价' AFTER `PROCESS`,
ADD COLUMN `AMOUNT` decimal(15, 3) NULL COMMENT '总价' AFTER `PRICE`;
--2024-10-22 放行条增加车牌号
ALTER TABLE `topsun_dev`.`sap_permit`
ADD COLUMN `car_no` varchar(32) NULL COMMENT '车牌号' AFTER `apply_person_name`;
--2024-10-22 采购信息记录运输费
ALTER TABLE `topsun_dev`.`sap_purchase_info_record_item`
ADD COLUMN `FREIGHT` decimal(10, 2) NULL COMMENT '运输费' AFTER `KBETR5`;
--2024-10-24 外协工序下道工序,印张LOSS
ALTER TABLE `topsun_dev`.`sap_process_outsource_order_item`
ADD COLUMN `TXZ02` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下道工序' AFTER `LGORT_NAME`,
ADD COLUMN `PRINT_LOSS` decimal(10, 2) NULL DEFAULT NULL COMMENT '印张LOSS' AFTER `TXZ02`;
--2024-10-24 采购订单明细字段
ALTER TABLE `topsun_dev`.`sap_purchase_order_item`
ADD COLUMN `VBELN` varchar(32) NULL COMMENT '销售单号' AFTER `UMSON`,
ADD COLUMN `POSNR` varchar(10) NULL COMMENT '销售单行项目' AFTER `VBELN`,
ADD COLUMN `TELF1` varchar(32) NULL COMMENT '联系人电话' AFTER `POSNR`,
ADD COLUMN `KWMENG` varchar(32) NULL COMMENT '订单数量(成名数量)' AFTER `TELF1`,
ADD COLUMN `ZINSTNUM` varchar(32) NULL COMMENT '指令号' AFTER `KWMENG`,
ADD COLUMN `MATNR2` varchar(32) NULL COMMENT '产品编号' AFTER `ZINSTNUM`,
ADD COLUMN `MAKTX` varchar(255) NULL COMMENT '产品描述' AFTER `MATNR2`,
ADD COLUMN `STR_SUPPL` varchar(255) NULL COMMENT '交货地址' AFTER `MAKTX`,
ADD COLUMN `KBETR2` decimal(10, 2) NULL COMMENT '运输费用' AFTER `STR_SUPPL`;
ALTER TABLE `topsun_dev`.`sap_purchase_order`
ADD COLUMN `LIFNR` varchar(32) NULL COMMENT '供应商编码' AFTER `NAMEL`;
\ No newline at end of file
......@@ -42,6 +42,7 @@
<x:inputC name="permitDate" required="true" label="放行日期" wrapper="datetime" labelCol="2" fieldCol="2"/>
<x:inputC name="company" required="true" label="公司" labelCol="2" maxLength="64" fieldCol="2"/>
<x:inputC name="belongPerson" required="true" label="携出人" labelCol="2" fieldCol="2"/>
<x:inputC name="carNo" required="false" label="车牌号" labelCol="2" fieldCol="2"/>
</div>
</div>
......
......@@ -124,6 +124,25 @@ function getOrderColumns(){
type: "text", required: true
}
},);
columns.push({
display: "下道工序", name: "txz02", width: 200, minWidth: 60, type: "string", align: "left",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {
fieldName: "AUFNR",
paramValue: item.aufnr
}
},
back: {
LTXA1: "txz02"
}
}
}
},);
columns.push({
display: "补数工单", name: "ablad", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
......@@ -136,6 +155,12 @@ function getOrderColumns(){
type: "text", mask: '9999999.999', required: true
}
},);
columns.push({
display: "印张LOSS", name: "printLoss", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
type: "text", mask: '9999999.999', required: true
}
},);
columns.push({
display: "单位", name: "meinsName", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
......
......@@ -7,7 +7,7 @@
<x:script src='/biz/topsun/sap/processOutsource/processOutsourceDetail.js'/>
</head>
<body>
<x:billTitle title="工序外协申请" needStatus="false" needPerson="true"/>
<x:billTitle title="临时工序外协申请" needStatus="false" needPerson="true"/>
<form class="hg-form" method="post" action="" id="submitForm">
<x:hidden name="id"/>
<x:hidden name="sId"/>
......
......@@ -77,7 +77,7 @@ function resetForm(obj) {
function addHandler() {
UICtrl.addTabItem({
tabid: 'processOutsourceApply',
text: "工序外协申请",
text: "临时工序外协申请",
url: web_app.name + '/processOutsource/forwardProcessOutsourceDetail.job'
});
}
......@@ -85,7 +85,7 @@ function addHandler() {
function doView(processOutsourceId) {
UICtrl.addTabItem({
tabid: 'processOutsource'+processOutsourceId,
text: "工序外协申请明细",
text: "临时工序外协申请明细",
url: web_app.name + '/processOutsource/showProcessOutsourceDetail.job?isReadOnly=true&bizId='+processOutsourceId
});
}
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@taglib uri="/WEB-INF/taglib.tld" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<x:base include="layout,dialog,grid,tree,combox,commonTree,date,attachment"/>
</head>
<body>
<form class="hg-form" method="post" action="" id="submitForm">
<div class="hg-form-cols">
<div class="hg-form-row">
<x:inputC name="no" label="单号" labelCol="2" fieldCol="10" required="true" />
</div>
<div class="hg-form-row">
<x:textareaC name="remark" label="备注" labelCol="2" fieldCol="10" required="true" rows="3"/>
</div>
</div>
</form>
</body>
</html>
......@@ -37,6 +37,7 @@
<x:inputC name="ekgrpName" label="采购组" labelCol="1" fieldCol="2" wrapper="select" required="true" />
<x:inputC name="netpr" label="净价" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
<x:inputC name="freight" label="运输费" labelCol="1" fieldCol="2" required="false" mask="99999999.99"/>
<x:hidden name="matkl"/>
<x:inputC name="matklName" label="物料组" labelCol="1" fieldCol="2" wrapper="select" />
......
......@@ -244,6 +244,9 @@ function getGridColumns() {
{display: "净价", name: "netpr", width: "100", align: "left", type: "string"
//,editor: {required: true,type: 'text', mask: '9999999.99'}
},
{display: "运输费", name: "freight", width: "100", align: "left", type: "string"
//,editor: {required: true,type: 'text', mask: '9999999.99'}
},
{display: "货币码编号", name: "waers", width: "20", align: "left", type: "string",hide:true},
{display: "货币码", name: "waersTextView", width: "100", align: "left", type: "string"
/*,editor: {
......
......@@ -62,6 +62,7 @@ function initPurchaseListGrid() {
{display: "采购信息记录分类", name: "esokzTextView", width: "140", align: "left", type: "string"},
{display: "采购组", name: "ekgrpName", width: "200", align: "left", type: "string"},
{display: "净价", name: "netpr", width: "100", align: "left", type: "string"},
{display: "运输费", name: "freight", width: "100", align: "left", type: "string"},
{display: "货币码", name: "waersTextView", width: "100", align: "left", type: "string",},
{display: "价格单位", name: "peinh", width: "100", align: "left", type: "string"},
{display: "订单价格单位(采购)", name: "bprmeName", width: "90", align: "left", type: "string"},
......@@ -108,8 +109,8 @@ function initPurchaseListGrid() {
height: '100%',
pageSize: 100,
heightDiff: -4,
//sortName: 'lastModifiedDate',
//sortOrder: 'desc',
sortName: 'fillinDate',
sortOrder: 'desc',
checkbox: true,
usePager: true,
rownumbers: true,
......
......@@ -11,6 +11,11 @@ function initUI() {
function loadGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
sapPrintHandler: {
id: 'sapPrintHandler', text: 'SAP外协单打印', img:'fa-clipboard', click: function(){
printHandler();
}
},
// revokeApproveHandler: {
// id: 'revokeApproveHandler', text: '撤销审批', img: 'fa-trash', click: function () {
// var rows = purchaseOrderGridManager.getSelectedRows();
......@@ -106,3 +111,12 @@ function resetForm(obj) {
$(obj).formClean();
}
function printHandler(){
var row = DataUtil.getUpdateRow(purchaseOrderGridManager);
if (!row) {
return;
}
var url='/sapPurchaseOrder/print.load';
Public.openPostWindow(web_app.name+url,{id: row.id});
}
......@@ -36,11 +36,11 @@
<col width="28%"/>
</colgroup>
<tr>
<td class="left">${changeNo?default("")?html}</td>
<td class="left" style="font-size: 14px;font-weight:bold;">${changeNo?default("")?html}</td>
<td class="right">
<div style="text-align:right;font-weight:bold;font-size: 25px">Engineering Change Notice</div>
</td>
<td class="right">变更编号:${billCode?default("")?html}</td>
<td class="right" style="font-size: 14px;font-weight:bold;">变更编号:${billCode?default("")?html}</td>
</tr>
</table>
</div>
......
package com.huigou.topsun.ep.epApplication;
import com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo;
import java.util.List;
import java.util.Map;
......@@ -14,4 +16,11 @@ public interface EpApplication {
List<Map<String, String>> queryEpPd(String brandCode);
List<Map<String, String>> queryProductAndBom(String itemCode);
/**
*
* @param matnr2 产品编码
* @return
*/
EpProductInfoVo queryEpProductInfo(String matnr2);
}
package com.huigou.topsun.ep.epApplication.EpVo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Auther: xin.lu
* @Date: 2024/10/18/14:39
* @Description:
*/
@Data
public class EpProductInfoVo implements Serializable {
/**
* 印张规格
*/
private String sheetSpecifications;
/**
* 生产制程
*/
private String productionProcess;
/**
* 印刷反面颜色
*/
private String oppositeColor;
/**
* 印刷正面颜色
*/
private String frontColor;
/**
* 排版数量
*/
private BigDecimal model;
/**
* 反面图片地址
*/
private String backImg;
/**
* 正面图片地址
*/
private String frontImg;
/**
* 印刷色数
*/
private String printColor;
}
......@@ -4,12 +4,15 @@ import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.topsun.ep.epApplication.EpApplication;
import com.huigou.topsun.ep.epApplication.EpVo.EpProductInfoVo;
import com.huigou.topsun.sap.common.HttpClient;
import com.huigou.topsun.util.SAPUtils;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
/**
......@@ -83,4 +86,24 @@ public class EpApplicationImpl implements EpApplication {
}
return mapList;
}
@Override
public EpProductInfoVo queryEpProductInfo(String matnr2) {
String message = "";
EpProductInfoVo epProductInfoVo = new EpProductInfoVo();
try {
///api/pro/productionSolution/getPicture?groupCounter=02&groupKey=50000407
String executeForEp = httpClient.executeForEp(new HashMap<>(), "md/mdItem/getUrl?itemCode="+matnr2);
Map<String, Object> resultMap = JSONObject.parseObject(executeForEp, Map.class);
if ("200".equals(resultMap.get("code").toString())) {
ObjectMapper objectMapper = SAPUtils.objectMapper();
epProductInfoVo = objectMapper.readValue(com.huigou.util.JSONUtil.toString(resultMap.get("data")), new TypeReference<EpProductInfoVo>() {});
}else {
message =(String) resultMap.get("msg");
}
} catch (IOException e) {
throw new RuntimeException("查询生产版本正反面图片出错:" + message);
}
return epProductInfoVo;
}
}
......@@ -58,6 +58,12 @@ public class SapPermit extends FlowBillAbstractEntity {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date permitDate;
/**
* 车牌号
*/
@Column(name = "car_no")
private String carNo;
@Override
protected String getCodeRuleId() {
return "sapPermit";
......
......@@ -41,5 +41,10 @@ public class SapPermitVo {
*/
private Date permitDate;
/**
* 车牌号
*/
private String carNo;
List<SapPermitItemVo> itemVos;
}
......@@ -58,6 +58,12 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column(name = "TXZ01")
private String txz01;
/**
* 下道工序
*/
@Column(name = "TXZ02")
private String txz02;
/**
* 同一工序外发次数
* 自动计数器,匹配条件为“如果之前状态为通过的申请中有相同工单+工序,则计数器+1,起始为1”
......@@ -71,6 +77,12 @@ public class ProcessOutsourceOrderItem extends AbstractEntity {
@Column(name = "MENGE")
private BigDecimal menge;
/**
* 印张LOSS
*/
@Column(name = "print_loss")
private BigDecimal printLoss;
/**
* 单位
*/
......
......@@ -14,4 +14,6 @@ public interface ProcessOutsourceOrderItemRepository extends JpaRepository<Proce
List<ProcessOutsourceOrderItem> findByProcessOutsourceId(String processOutsourceId);
List<ProcessOutsourceOrderItem> findByAufnrAndWempf(String aufnr,String wempf);
ProcessOutsourceOrderItem findByEbeln(String ebeln);
}
......@@ -342,6 +342,12 @@ public class SapPurchaseInfoRecordItem extends AbstractEntity {
@Column(name = "KBETR5")
private BigDecimal kbetr5;
/**
* 运输费
*/
@Column(name = "FREIGHT")
private BigDecimal freight;
/**
* 消息类型
*/
......
......@@ -236,4 +236,10 @@ public class SapPurchaseInfoRecordItemVo implements Serializable {
@JsonProperty("APLFZ")
private Date aplfz;
/**
* 运输费
*/
@JsonProperty("KBETR2")
private BigDecimal freight;
}
......@@ -27,4 +27,6 @@ public interface SapPurchaseOrderApplication {
void sendSapDate(SapPurchaseOrder sapPurchaseOrder,String flag);
String revokeApproval(String id);
Map<String, Object> print(String id);
}
......@@ -95,4 +95,16 @@ public class SapPurchaseOrderController extends CommonController {
String newId=sapPurchaseOrderApplication.revokeApproval(id);
return success();
}
/**
* 打印
* @return
*/
public String print() {
SDO sdo = this.getSDO();
String id = sdo.getId();
Map<String,Object> map = this.sapPurchaseOrderApplication.print(id);
String pintPage = String.format("/print/topsun/processOuter.ftl");
return outputAndProcUnitHandlerPDF(pintPage, id, map);
}
}
......@@ -160,6 +160,12 @@ public class SapPurchaseOrder extends FlowBillAbstractEntity {
@Column(name = "NAMEL")
private String namel;
/**
* 供应商编码
*/
@Column(name = "LIFNR")
private String lifnr;
@Override
protected String getCodeRuleId() {
return "sapPurchaseOrder";
......
......@@ -196,4 +196,58 @@ public class SapPurchaseOrderItem extends AbstractEntity {
@Column(name = "ANLN2")
private String anln2;
/**
* 销售单号
*/
@Column(name = "VBELN")
private String vbeln;
/**
* 销售单行项目
*/
@Column(name = "POSNR")
private String posnr;
/**
* 联系人电话
*/
@Column(name = "TELF1")
private String telf1;
/**
* 成品数量
*/
@Column(name = "KWMENG")
private BigDecimal kwmeng;
/**
* 指令号
*/
@Column(name = "ZINSTNUM")
private String zinstnum;
/**
* 产品编码
*/
@Column(name = "MATNR2")
private String matnr2;
/**
* 产品描述
*/
@Column(name = "MAKTX")
private String maktx;
/**
* 交货地址
*/
@Column(name = "STR_SUPPL")
private String strSuppl;
/**
* 运输费用
*/
@Column(name = "KBETR2")
private BigDecimal kbetr2;
}
\ No newline at end of file
......@@ -4,6 +4,8 @@ package com.huigou.topsun.sap.purchaseOrder.domain.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
*
......@@ -95,4 +97,58 @@ public class SapPurchaseOrderItemVo {
@JsonProperty("UMSON")
private String umson;
/**
* 销售单号
*/
@JsonProperty("VBELN")
private String vbeln;
/**
* 销售单行项目
*/
@JsonProperty("POSNR")
private String posnr;
/**
* 联系人电话
*/
@JsonProperty("TELF1")
private String telf1;
/**
* 成品数量
*/
@JsonProperty("KWMENG")
private BigDecimal kwmeng;
/**
* 指令号
*/
@JsonProperty("ZINSTNUM")
private String zinstnum;
/**
* 产品编码
*/
@JsonProperty("MATNR2")
private String matnr2;
/**
* 产品描述
*/
@JsonProperty("MAKTX")
private String maktx;
/**
* 交货地址
*/
@JsonProperty("STR_SUPPL")
private String strSuppl;
/**
* 运输费用
*/
@JsonProperty("KBETR2")
private BigDecimal kbetr2;
}
\ No newline at end of file
......@@ -63,4 +63,7 @@ public class SapPurchaseOrderVo implements Serializable {
@JsonProperty("NAMEL")
private String namel;
@JsonProperty("LIFNR")
private String lifnr;
}
package com.huigou.topsun.sap.purchaseOrder.domain.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.persistence.Column;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Auther: xin.lu
* @Date: 2024/10/24/11:46
* @Description:
*/
@Data
public class SapSaleOrderVo implements Serializable {
/**
* 销售单号
*/
private String vbeln;
/**
* 成品数量
*/
private BigDecimal kwmeng;
/**
* 指令号
*/
private String zinstnum;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment