Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
66d81ce0
Commit
66d81ce0
authored
Mar 18, 2025
by
1650842865
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料维护图片;领料增加导出功能;
parent
79ed561a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
229 additions
and
7 deletions
+229
-7
materialApplyNext.js
...n/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.js
+74
-0
materialApplyNext.jsp
.../webapp/biz/topsun/sap/nonProdApply/materialApplyNext.jsp
+21
-4
materialNameElement.jsp
...ebapp/biz/topsun/sap/nonProdApply/materialNameElement.jsp
+29
-0
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+9
-2
nonProducePickList.js
...ebapp/biz/topsun/sap/nonProducePick/nonProducePickList.js
+7
-0
nonProducePick.ftl
.../src/main/webapp/template/print/topsun/nonProducePick.ftl
+1
-1
NonProdApplyController.java
...n/sap/nonProdApply/controller/NonProdApplyController.java
+22
-0
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+17
-0
MaterialNameElement.java
...u/topsun/sap/nonProdApply/domain/MaterialNameElement.java
+28
-0
MaterialNameElementRepository.java
...onProdApply/repository/MaterialNameElementRepository.java
+14
-0
NonProducePickController.java
...p/nonProducePick/controller/NonProducePickController.java
+7
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.js
View file @
66d81ce0
...
...
@@ -618,6 +618,80 @@ function bindEvent() {
$
(
"#eklas"
).
val
(
data
.
eklas
)
}
});
//正面图片
var
_img
=
$
(
'#showFrontPicture'
);
var
_frontPicturePath
=
$
(
'#frontPicturePath'
).
val
();
if
(
Public
.
isNotBlank
(
_frontPicturePath
))
{
_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachment/downFileBySavePath.ajax'
,{
file
:
_frontPicturePath
});
}
$
(
'#addFrontPicture'
).
uploadButton
({
filetype
:
[
'jpg'
,
'gif'
,
'jpeg'
,
'png'
,
'bmp'
],
afterUpload
:
function
(
data
){
_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachmentDownFile.ajax'
,{
id
:
data
.
id
});
},
param
:
function
(){
return
{
bizCode
:
'frontPicture'
,
bizId
:
$
(
"#id"
).
val
(),
flag
:
'false'
,
deleteOld
:
'true'
,
returnPath
:
'true'
};
}
});
//反面图片
var
back_img
=
$
(
'#showBackPicture'
);
var
_backPicturePath
=
$
(
'#backPicturePath'
).
val
();
if
(
Public
.
isNotBlank
(
_backPicturePath
))
{
back_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachment/downFileBySavePath.ajax'
,{
file
:
_backPicturePath
});
}
$
(
'#addBackPicture'
).
uploadButton
({
filetype
:
[
'jpg'
,
'gif'
,
'jpeg'
,
'png'
,
'bmp'
],
afterUpload
:
function
(
data
){
back_img
[
0
].
src
=
$
.
getCSRFUrl
(
'attachmentDownFile.ajax'
,{
id
:
data
.
id
});
},
param
:
function
(){
return
{
bizCode
:
'backPicture'
,
bizId
:
$
(
"#id"
).
val
(),
flag
:
'false'
,
deleteOld
:
'true'
,
returnPath
:
'true'
};
}
});
// $("#maktx").click(function () {
// if ($('#maktx').prop('readonly')) {
// return;
// }
// UICtrl.showAjaxDialog({
// title: '汉语品名维护',
// width: 400,
// height: 400,
// url: web_app.name + '/sapNonProdApply/showMaterialNameElement.load',
// param:{billCode:$("#submitForm #billCode").val()},
// init: function (){
// //initExceptionClient();
// },
// ok: function () {
// let formValues = [];
//
// $('#materialNameElement input').each(function() {
// let inputName = $(this).attr('name');
// if (inputName === 'id' || inputName === 'billCode') {
// return;
// }
// let inputValue = $(this).val();
//
// if (inputValue) {
// formValues.push(inputValue);
// }
// });
// let result = formValues.join('_');
// //限定40个字符
// result = result.substring(0,40);
// $('#materialNameElement').ajaxSubmit({
// url: web_app.name + '/sapNonProdApply/saveMaterialNameElement.ajax',
// param: "",
// success: function (data) {
// $("#maktx").val(result);
// }
// });
// this.close();
// }
// })
// })
}
function
bindEvent_raube
(
werks
,
lgort
){
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialApplyNext.jsp
View file @
66d81ce0
...
...
@@ -9,13 +9,15 @@
var
isAll
=
"${isAll}"
;
var
applyType
=
"${applyType}"
;
</script>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date"
/>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date
,attachment
"
/>
<x:script
src=
'/biz/topsun/sap/nonProdApply/materialApplyNext.js'
/>
</head>
<body>
<x:hidden
name=
"isDetailPage"
value=
"false"
/>
<!--是否是详情页-->
<x:hidden
name=
"deptCode"
value=
"false"
/>
<!--是否是详情页-->
<x:hidden
name=
"frontPicturePath"
/>
<x:hidden
name=
"backPicturePath"
/>
<div
class=
"container-fluid"
style=
"padding: 10px;"
>
<c:if
test=
"
${
applyType
==
0
||
applyType
==
3
}
"
>
...
...
@@ -123,7 +125,7 @@
<x:hidden
name=
"spart"
/>
<%--<x:selectC name="mtposMara" label="项目类别组" labelCol="1" fieldCol="2" dictionary="mtposMara"/>--%>
<x:hidden
name=
"mtposMara"
/>
<x:inputC
name=
"maktx"
label=
"汉语品名"
required=
"true"
labelCol=
"1"
fieldCol=
"5"
/>
<x:inputC
name=
"maktx"
label=
"汉语品名"
required=
"true"
labelCol=
"1"
fieldCol=
"5"
maxLength=
"40"
/>
<x:hidden
name=
"xchpf"
/>
<!--x:inputC name="magrv" label="包装物料组" labelCol="1" fieldCol="2"/-->
...
...
@@ -193,8 +195,7 @@
</div>
</c:if>
</div>
<div
class=
"hg-form-cols"
>
</div>
<div
class=
"hg-form-cols"
id=
"distributeDiv"
>
<div
class=
"hg-form-row"
>
...
...
@@ -416,6 +417,22 @@
</div>
</div>
</div>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<div
style=
"text-align: left;margin-top:10px;"
>
<img
src=
'
<c:url
value=
"/images/photo.jpg"
/>
'
height=
'200'
width=
'170'
border=
0
id=
"showFrontPicture"
onerror=
"src='
<c:url
value=
"/images/photo.jpg"
/>
';"
/>
<img
src=
'
<c:url
value=
"/images/photo.jpg"
/>
'
height=
'200'
width=
'170'
border=
0
id=
"showBackPicture"
onerror=
"src='
<c:url
value=
"/images/photo.jpg"
/>
';"
/>
</div>
<div
style=
"text-align: left;margin-top:20px;"
>
<x:button
value=
"正面图片"
id=
"addFrontPicture"
icon=
"fa-hand-o-up"
/>
<x:button
value=
"反面图片"
id=
"addBackPicture"
icon=
"fa-hand-o-up"
/>
</div>
</div>
</div>
</form>
<form
class=
"hg-form"
method=
"post"
action=
""
style=
"display: none;"
id=
"auditForm"
>
<div
class=
" border-left-top"
style=
"margin-top: 10px;"
>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/materialNameElement.jsp
0 → 100644
View file @
66d81ce0
<%@ 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"
/>
<%--<x:script src='/biz/topsun/sap/purchaseInfoRecord/addPurchaseInfoRecordDetail.js'/>--%>
</head>
<body>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"materialNameElement"
>
<x:hidden
name=
"id"
/>
<x:hidden
name=
"billCode"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"baseName"
label=
"基础信息"
labelCol=
"4"
fieldCol=
"8"
required=
"true"
maxLength=
"40"
/>
<%-- <x:inputC name="ekorgName" label="采购组织" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lifnr" label="供应商" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="name1" label="供应商名称" labelCol="1" fieldCol="2" />--%>
<%-- <x:inputC name="idnlf" label="供应商物料" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="matnr" label="物料编码" labelCol="1" fieldCol="2" />--%>
<%-- <x:inputC name="maktx" label="物料描述" labelCol="1" fieldCol="2"/>--%>
</div>
<div
class=
"hg-form-row"
>
<x:inputC
name=
"size"
label=
"尺寸"
labelCol=
"4"
fieldCol=
"8"
maxLength=
"40"
/>
</div>
</div>
</form>
</body>
</html>
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
66d81ce0
...
...
@@ -182,7 +182,10 @@ function initRaube(mtart) {
function
initSale
(
mtart
){
if
(
mtart
==
"ZZCP"
&&
$
(
"#businessUsageV"
).
prop
(
"checked"
)){
saleAndMtartRequired
(
true
);
}
else
{
}
else
if
(
mtart
==
"ZBCP"
&&
$
(
"#businessUsageV"
).
prop
(
"checked"
)){
UICtrl
.
setElRequiredFlag
(
"#tragr"
,
true
);
UICtrl
.
setElRequiredFlag
(
"#ladgrName"
,
true
);
}
else
{
saleAndMtartRequired
(
false
);
}
}
...
...
@@ -420,16 +423,20 @@ function saleMustInput(flag) { //销售必输项
UICtrl
.
setElRequiredFlag
(
"#ktgrm"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#vkorgName"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#vtwegName"
,
flag
);
var
mtart
=
$
(
"#mtart"
).
val
();
if
(
!
flag
)
{
UICtrl
.
setElRequiredFlag
(
"#umrenSale"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#umrezSale"
,
flag
);
saleAndMtartRequired
(
flag
)
}
else
{
//产成品品牌必填
var
mtart
=
$
(
"#mtart"
).
val
();
if
(
mtart
==
"ZZCP"
){
saleAndMtartRequired
(
flag
)
}
if
(
mtart
==
"ZBCP"
){
UICtrl
.
setElRequiredFlag
(
"#tragr"
,
flag
);
UICtrl
.
setElRequiredFlag
(
"#ladgrName"
,
flag
);
}
}
mtvfpMustInput
();
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProducePick/nonProducePickList.js
View file @
66d81ce0
...
...
@@ -16,6 +16,7 @@ function loadGrid() {
printHandler
();
}
},
exportExcelHandler
:
exportExcelHandler
,
// chargeOffHandler: {
// id: 'chargeOff', text: '冲销', img:'fa-edit', click: function(){
// chargeOffHandler();
...
...
@@ -124,3 +125,9 @@ function chargeOffHandler(){
reloadGrid
();
})
}
//导出Excel
function
exportExcelHandler
()
{
var
date
=
Public
.
formatDate
(
new
Date
(),
`%Y%M%D%H%I%S`
);
UICtrl
.
gridExport
(
gridManager
,{
fileName
:
"领料申请"
+
date
});
}
topsun-xt/src/main/webapp/template/print/topsun/nonProducePick.ftl
View file @
66d81ce0
...
...
@@ -34,7 +34,7 @@
<col
width=
"30%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
领料类型:${p
ersonMemberNam
e?default("")?html}
</td>
<td
class=
"left"
>
领料类型:${p
ickTyp
e?default("")?html}
</td>
<td
class=
"left"
>
列印日期:${fillinDate?default("")?html}
</td>
</tr>
</table>
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyController.java
View file @
66d81ce0
...
...
@@ -11,10 +11,12 @@ import com.huigou.topsun.common.BillStatus;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.domain.MaterialNameElement
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
import
com.huigou.topsun.sap.nonProdApply.domain.query.NonProdApplyBaseInfoQueryRequest
;
import
com.huigou.topsun.sap.nonProdApply.domain.vo.ProdApplyFromSapVO
;
import
com.huigou.topsun.sap.nonProdApply.repository.MaterialNameElementRepository
;
import
com.huigou.topsun.sap.purchaseApproval.controller.SapPurchaseApprovalController
;
import
com.huigou.topsun.sap.purchaseApproval.domain.vo.SapPurchaseApprovalDto
;
import
com.huigou.topsun.sap.suppliers.application.SuppliersDataApplication
;
...
...
@@ -52,6 +54,8 @@ public class NonProdApplyController extends CommonController {
SapMutualEpLogApplication
sapMutualEpLogApplication
;
@Autowired
RoleRepository
roleRepository
;
@Autowired
private
MaterialNameElementRepository
materialNameElementRepository
;
private
final
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
NonProdApplyController
.
class
);
...
...
@@ -291,6 +295,24 @@ public class NonProdApplyController extends CommonController {
sapMutualEpLogApplication
.
saveSapMutualEpLog
(
resultMap
);
return
messageMap
;
}
public
String
showMaterialNameElement
(){
SDO
sdo
=
this
.
getSDO
();
String
billCode
=
sdo
.
getString
(
"billCode"
);
MaterialNameElement
materialNameElement
=
materialNameElementRepository
.
findByBillCode
(
billCode
);
if
(
materialNameElement
==
null
){
materialNameElement
=
new
MaterialNameElement
();
materialNameElement
.
setBillCode
(
billCode
);
}
return
forward
(
"materialNameElement"
,
materialNameElement
);
}
public
String
saveMaterialNameElement
(){
SDO
sdo
=
this
.
getSDO
();
MaterialNameElement
materialNameElement
=
sdo
.
toObject
(
MaterialNameElement
.
class
);
materialNameElementRepository
.
save
(
materialNameElement
);
return
success
();
}
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
66d81ce0
...
...
@@ -13,8 +13,11 @@ import com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
import
com.huigou.topsun.sap.nonProdApply.domain.query.NonProdApplyBaseInfoQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.doc.attachment.application.AttachmentApplication
;
import
com.huigou.uasp.bmp.doc.attachment.domain.model.Attachment
;
import
com.huigou.uasp.bmp.opm.application.OrgApplication
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.Constants
;
import
com.huigou.util.SDO
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -44,6 +47,8 @@ public class NonProdApplyNextController extends CommonController {
OrgApplication
orgApplication
;
@Autowired
DefaultHttpClient
defaultHttpClient
;
@Autowired
private
AttachmentApplication
attachmentApplication
;
public
String
forwardNonProdApplyNext
()
{
SDO
sdo
=
this
.
getSDO
();
...
...
@@ -102,6 +107,18 @@ public class NonProdApplyNextController extends CommonController {
slen
=
nonProdApplyBaseInfo
.
getBusinessUsage
().
split
(
","
).
length
;
}
this
.
putAttribute
(
"busiLens"
,
slen
);
List
<
Attachment
>
frontAttachments
=
attachmentApplication
.
queryAttachments
(
"frontPicture"
,
id
);
List
<
Attachment
>
backAttachments
=
attachmentApplication
.
queryAttachments
(
"backPicture"
,
id
);
if
(
frontAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
frontAttachments
.
get
(
0
);
this
.
putAttribute
(
"frontPicturePath"
,
StringUtil
.
encode
(
attachment
.
getPath
()));
}
if
(
backAttachments
.
size
()
>
0
)
{
Attachment
attachment
=
backAttachments
.
get
(
0
);
this
.
putAttribute
(
"backPicturePath"
,
StringUtil
.
encode
(
attachment
.
getPath
()));
}
if
(
nonProdApplyDept
!=
null
)
{
getBaseInfoAttrs
(
nonProdApplyBaseInfo
,
nonProdApplyDept
);
if
(
nonProdApplyBaseInfo
.
getDistribute
()!=
null
){
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/domain/MaterialNameElement.java
0 → 100644
View file @
66d81ce0
package
com
.
huigou
.
topsun
.
sap
.
nonProdApply
.
domain
;
import
com.huigou.data.domain.model.AbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
/**
* @author xin.lu
* @Description:
* @date 2025/3/1717:17
*/
@Data
@Entity
@Table
(
name
=
"sap_material_name_element"
)
public
class
MaterialNameElement
extends
AbstractEntity
{
@Column
(
name
=
"bill_code"
)
private
String
billCode
;
@Column
(
name
=
"base_name"
)
private
String
baseName
;
@Column
(
name
=
"size"
)
private
String
size
;
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/repository/MaterialNameElementRepository.java
0 → 100644
View file @
66d81ce0
package
com
.
huigou
.
topsun
.
sap
.
nonProdApply
.
repository
;
import
com.huigou.topsun.sap.nonProdApply.domain.MaterialNameElement
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
* @author xin.lu
* @Description: TODO
* @date 2025/3/1717:18
*/
public
interface
MaterialNameElementRepository
extends
JpaRepository
<
MaterialNameElement
,
String
>
{
MaterialNameElement
findByBillCode
(
String
billCode
);
}
topsun/src/main/java/com/huigou/topsun/sap/nonProducePick/controller/NonProducePickController.java
View file @
66d81ce0
...
...
@@ -16,6 +16,7 @@ import com.huigou.uasp.bmp.common.BizBillStatus;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.ClassHelper
;
import
com.huigou.util.SDO
;
import
org.apache.commons.lang.StringUtils
;
import
org.krysalis.barcode4j.HumanReadablePlacement
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -92,6 +93,12 @@ public class NonProducePickController extends CommonController {
String
id
=
sdo
.
getId
();
NonProducePick
nonProducePick
=
this
.
nonProducePickApplication
.
findNonProducePickById
(
id
);
Map
<
String
,
Object
>
map
=
ClassHelper
.
beanToMap
(
nonProducePick
);
if
(
StringUtils
.
isNotBlank
(
nonProducePick
.
getKostl
()))
{
map
.
put
(
"pickType"
,
"成本中心领料"
);
}
if
(
StringUtils
.
isNotBlank
(
nonProducePick
.
getAufnr
()))
{
map
.
put
(
"pickType"
,
"内部订单领料"
);
}
// 获取Grid数据
List
<
NonProducePickItem
>
itemList
=
nonProducePickItemApplication
.
findByNonProducePickId
(
id
);
map
.
put
(
"printTime"
,
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm"
).
format
(
LocalDateTime
.
now
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment