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
cfc39d86
Commit
cfc39d86
authored
Dec 08, 2023
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报价单打印预览
parent
28ea8694
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
224 additions
and
28 deletions
+224
-28
taskExecutionPrint.ftl
...-xt/src/main/webapp/template/print/taskExecutionPrint.ftl
+1
-5
quotationDetail.js
...t/src/main/webapp/biz/topsun/quotation/quotationDetail.js
+7
-4
quotationDetail.jsp
.../src/main/webapp/biz/topsun/quotation/quotationDetail.jsp
+4
-1
quotationList.js
...-xt/src/main/webapp/biz/topsun/quotation/quotationList.js
+24
-1
technologyDetail.js
...src/main/webapp/biz/topsun/technology/technologyDetail.js
+5
-14
taskNotice.ftl
topsun-xt/src/main/webapp/template/email/taskNotice.ftl
+1
-1
factoryQuotation.ftl
...rc/main/webapp/template/print/topsun/factoryQuotation.ftl
+99
-0
QuotationApplication.java
...ou/topsun/quotation/application/QuotationApplication.java
+2
-0
QuotationApplicationImpl.java
.../quotation/application/impl/QuotationApplicationImpl.java
+73
-0
QuotationController.java
...igou/topsun/quotation/controller/QuotationController.java
+8
-2
No files found.
huigou-xt/src/main/webapp/template/print/taskExecutionPrint.ftl
View file @
cfc39d86
...
...
@@ -27,11 +27,7 @@
<td class="left">${task.handlerName?html}</td><#rt/>
<#if taskHandledDate?default(true)>
<td class="title">办理时间 :</td><#rt/>
<#if task.procUnitName=='用款申请审批'>
<td class="left">${task.handledDate?string("yyyy-MM-dd")}</td><#rt/>
<#else >
<td class="left">${task.handledDate?html}</td><#rt/>
</#if>
<td class="left">${task.handledDate?html}</td><#rt/>
<#else>
<td style="border-right:0px;"> </td><#rt/>
<td> </td><#rt/>
...
...
topsun-xt/src/main/webapp/biz/topsun/quotation/quotationDetail.js
View file @
cfc39d86
...
...
@@ -15,11 +15,14 @@ function initializateUI() {
function
initializateBomGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(){
UICtrl
.
addGridRow
(
bomGridManager
);
UICtrl
.
addGridRow
(
bomGridManager
,{
sequence
:
bomGridManager
.
getData
().
length
+
1
}
);
},
});
bomGridManager
=
UICtrl
.
grid
(
"#bomGrid"
,
{
columns
:
[
{
display
:
"序号"
,
name
:
"sequence"
,
width
:
80
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'spinner'
,
min
:
1
,
max
:
100
,
mask
:
'nnn'
}
},
{
display
:
"产品编码"
,
name
:
"productCode"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -39,15 +42,15 @@ function initializateBomGrid() {
},
{
display
:
"产品名称"
,
name
:
"productName"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"单位"
,
name
:
"productUnit"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
/*
{
display: "币别", name: "currency", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
required: true,
type: 'text'
}
},
},
*/
{
display
:
"
单价
"
,
name
:
"price"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"
用量
"
,
name
:
"price"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
true
,
type
:
'text'
,
...
...
topsun-xt/src/main/webapp/biz/topsun/quotation/quotationDetail.jsp
View file @
cfc39d86
...
...
@@ -8,7 +8,7 @@
</head>
<body>
<div
class=
"container-fluid"
>
<x:billTitle
title=
"报价
需求
单"
needStatus=
"false"
needPerson=
"true"
/>
<x:billTitle
title=
"报价
申请
单"
needStatus=
"false"
needPerson=
"true"
/>
<div
class=
"blank_div clearfix"
></div>
<form
class=
"hg-form"
method=
"post"
action=
""
id=
"submitForm"
>
<x:hidden
name=
"id"
id=
"quotationId"
/>
...
...
@@ -30,6 +30,9 @@
<x:inputC
name=
"quotationNo"
label=
"报价单号"
readonly=
"true"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerManagerId"
label=
"客户名称"
labelCol=
"1"
fieldCol=
"2"
/>
</div>
<div
class=
"hg-form-row"
>
<x:textareaC
rows=
"3"
name=
"quotationRemark"
label=
"备注"
labelCol=
"1"
fieldCol=
"8"
/>
</div>
</div>
<x:title
title=
"BOM信息"
name=
"group"
hideTable=
"#info"
/>
<div
id=
"bomGrid"
style=
"margin: 2px;"
></div>
...
...
topsun-xt/src/main/webapp/biz/topsun/quotation/quotationList.js
View file @
cfc39d86
...
...
@@ -15,6 +15,9 @@ function loadQuotationListGrid() {
addHandler
:
function
()
{
addHandler
();
},
printHandler
:
function
(){
printHandler
();
}
/*updateHandler: function(){
updateHandler();
},
...
...
@@ -55,7 +58,7 @@ function loadQuotationListGrid() {
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
update
Handler
(
data
);
view
Handler
(
data
);
}
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
...
...
@@ -69,6 +72,26 @@ function addHandler(){
});
}
function
viewHandler
(
data
){
UICtrl
.
addTabItem
({
tabid
:
'addQuotation'
+
data
.
quotationId
,
text
:
"查看报价需求单"
,
url
:
web_app
.
name
+
'/quotation/showQuotation.job?bizId='
+
data
.
quotationId
});
}
function
printHandler
(){
var
row
=
DataUtil
.
getUpdateRow
(
gridManager
);
if
(
!
row
)
{
return
;
}
if
(
row
.
status
!=
3
){
Public
.
tip
(
"请审批完成再打印!"
);
return
;
}
Public
.
openPostWindow
(
web_app
.
name
+
'/quotation/print.load'
,{
quotationId
:
row
.
quotationId
});
}
function
query
(
obj
)
{
var
param
=
$
(
obj
).
formToJSON
();
UICtrl
.
gridSearch
(
gridManager
,
param
);
...
...
topsun-xt/src/main/webapp/biz/topsun/technology/technologyDetail.js
View file @
cfc39d86
...
...
@@ -174,26 +174,17 @@ function bindEvent() {
function
getTechnologyDetail
(
processAction
)
{
//采购订单保存时数据不进行必填验证,提交时数据才进行必填验证
var
op
=
{};
var
check
=
true
;
var
processList
=
[];
if
(
processAction
==
"save"
)
{
op
=
{
check
:
false
};
}
else
if
(
processAction
==
"submit"
)
{
op
=
{
check
:
true
};
}
else
{
op
=
{
check
:
true
};
check
=
false
;
}
op
=
{
check
:
check
};
var
technology
=
$
(
'#submitForm'
).
formToJSON
(
op
);
if
(
!
technology
)
{
return
false
;
}
var
processList
=
[];
if
(
processAction
==
"save"
)
{
processList
=
DataUtil
.
getGridData
({
gridManager
:
processGridManager
,
isAllData
:
true
,
onCheck
:
false
})
}
else
if
(
processAction
==
"submit"
)
{
processList
=
DataUtil
.
getGridData
({
gridManager
:
processGridManager
,
isAllData
:
true
,
onCheck
:
true
})
}
else
{
processList
=
DataUtil
.
getGridData
({
gridManager
:
processGridManager
,
isAllData
:
true
,
onCheck
:
true
})
}
processList
=
DataUtil
.
getGridData
({
gridManager
:
processGridManager
,
isAllData
:
true
,
onCheck
:
check
})
if
(
!
processList
)
{
return
false
;
}
...
...
topsun-xt/src/main/webapp/template/email/taskNotice.ftl
View file @
cfc39d86
...
...
@@ -19,7 +19,7 @@
<td>
</td>
</tr>
<tr>
<
td>
请您登录
<a
href=
"https://ssrfpm.ssrf.ac.cn:8080/SSRF/Login.jsp"
style=
"text-decoration: none;"
>
上海光源项目管理系统
</a>
进行批阅查看。
<b>
此邮件由系统自动发出,请勿直接回复本邮件。
</b></td
>
<
#
--
<
td
>
请您登录
<a
href=
"https://ssrfpm.ssrf.ac.cn:8080/SSRF/Login.jsp"
style=
"text-decoration: none;"
>
BPM流程管理系统
</a>
进行批阅查看。
<b>
此邮件由系统自动发出,请勿直接回复本邮件。
</b></td>
--
>
</tr>
</table>
</div>
...
...
topsun-xt/src/main/webapp/template/print/topsun/factoryQuotation.ftl
0 → 100644
View file @
cfc39d86
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<head>
<title>
工厂报价单
</title>
<
#
include
"/
print
/
commonStyleTemplate
.
ftl
"
/>
<style
type=
"text/css"
>
td
{
font-size
:
13px
;
}
</style>
</head>
<body>
<div
class=
"billTitle"
>
${companyName?default("")?html}
</div>
<div
style=
"text-align: center"
>
${companyName?default("")?html}
</div>
<div
style=
"text-align: center"
>
${address?default("")?html}
</div>
<div
style=
"text-align: center"
>
tel:${tel?default("")?html} fax: ${fax?default("")?html}
</div>
<div
style=
"text-align: center"
>
email: ${email?default("")?html}
</div>
<div
style=
"text-align: center"
>
————————————————————————————
</div>
<div
class=
"billTitle"
>
报价单
</div>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"50%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
客户名称:${customerManagerId?default("")?html}
</td>
<td
class=
"right"
>
报价单号:${quotationNo?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tablePrint"
>
<colgroup>
<col
width=
'50%'
/>
<col
width=
"50%"
/>
</colgroup>
<tr>
<td
class=
"left"
>
联系人:${personMemberName?default("")?html}
</td>
<td
class=
"right"
>
报价日期:${fillinDate?default("")?html}
</td>
</tr>
</table>
<table
cellspacing=
"0px"
cellpadding=
"0px"
class=
"tableBorder"
>
<colgroup>
<col
width=
'10%'
/>
<col
width=
'20%'
/>
<col
width=
'40%'
/>
<col
width=
'5%'
/>
<col
width=
'10%'
/>
<col
width=
'6%'
/>
<col
width=
'9%'
/>
</colgroup>
<tr>
<td
class=
"center"
>
序号
</td>
<td
class=
"center"
>
产品名称
</td>
<td
class=
"center"
>
产品名称及规格
</td>
<td
class=
"center"
>
单位
</td>
<td
class=
"center"
>
币别
</td>
<td
class=
"center"
>
单价
</td>
<td
class=
"center"
>
备注
</td>
</tr>
<
#
if
gridData
??
&&
gridData
?
size
gt
0
>
<
#
list
gridData
as
detail
>
<tr>
<td
class=
"center"
>
${detail.sequence?default("")?html}
</td>
<td
class=
"center"
>
${detail.productCode?default("")?html}
</td>
<td
class=
"center"
>
${detail.productName?default("")?html}
</td>
<td
class=
"center"
>
${detail.productUnit?default("")?html}
</td>
<td
class=
"center"
>
${detail.currency?default("")?html}
</td>
<td
class=
"center"
>
${detail.price?default("")?html}
</td>
<td
class=
"center"
>
${detail.remark?default("")?html}
</td>
</tr>
</
#
list>
<
#
else
>
<tr>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
<td
class=
"center"
>
</td>
</tr>
</
#
if>
<tr
style=
"height: 70px"
>
<td
class=
"center"
>
备注
</td>
<td
class=
"left"
colspan=
"7"
>
${quotationRemark?default("")?html}
</td>
</tr>
<tr
style=
"height: 70px"
>
<td
class=
"left"
colspan=
"7"
>
${quotationNote?default("")?html}
</td>
</tr>
</table>
<div
class=
"blank_div"
></div>
<div
class=
"fontBold"
>
审批明细
</div>
<
#
include
"/
print
/
taskExecutionPrint
.
ftl
"
/>
</body>
</html>
topsun/src/main/java/com/huigou/topsun/quotation/application/QuotationApplication.java
View file @
cfc39d86
...
...
@@ -21,4 +21,6 @@ public interface QuotationApplication {
Quotation
saveQuotation
(
Quotation
quotation
);
Map
<
String
,
Object
>
slicedQuotationList
(
QuotationQueryRequest
queryRequest
);
Map
<
String
,
Object
>
loadPrintData
(
String
quotationId
);
}
topsun/src/main/java/com/huigou/topsun/quotation/application/impl/QuotationApplicationImpl.java
View file @
cfc39d86
package
com
.
huigou
.
topsun
.
quotation
.
application
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.topsun.product.domain.Product
;
import
com.huigou.topsun.product.repository.ProductRepository
;
import
com.huigou.topsun.quotation.application.QuotationItemApplication
;
import
com.huigou.topsun.quotation.domain.model.Quotation
;
import
com.huigou.topsun.quotation.application.QuotationApplication
;
import
com.huigou.topsun.quotation.domain.model.QuotationItem
;
import
com.huigou.topsun.quotation.domain.query.QuotationQueryRequest
;
import
com.huigou.topsun.quotation.repository.QuotationRepository
;
import
com.huigou.topsun.quotation.vo.QuotationItemVo
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
...
...
@@ -17,6 +22,9 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
org
.
activiti
.
engine
.
impl
.
util
.
CollectionUtil
.
map
;
/**
* @author 16508
...
...
@@ -29,6 +37,8 @@ public class QuotationApplicationImpl extends FlowBroker implements QuotationApp
private
QuotationRepository
quotationRepository
;
@Resource
private
QuotationItemApplication
quotationItemApplication
;
@Resource
private
ProductRepository
productRepository
;
@Override
protected
String
saveBizAndApprovalData
()
{
...
...
@@ -106,6 +116,69 @@ public class QuotationApplicationImpl extends FlowBroker implements QuotationApp
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"slicedQuotationList"
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryDescriptor
,
queryRequest
);
}
@Override
public
Map
<
String
,
Object
>
loadPrintData
(
String
quotationId
)
{
Quotation
quotation
=
quotationRepository
.
findOne
(
quotationId
);
Map
<
String
,
Object
>
map
=
ClassHelper
.
beanToMap
(
quotation
);
List
<
QuotationItem
>
itemList
=
quotationItemApplication
.
findQuotationItemByQuotationId
(
quotationId
);
List
<
QuotationItemVo
>
quotationItemVoList
=
itemList
.
stream
()
.
map
(
quotationItem
->
{
QuotationItemVo
quotationItemVo
=
new
QuotationItemVo
();
BeanUtil
.
copyProperties
(
quotationItem
,
quotationItemVo
);
Product
product
=
productRepository
.
findOne
(
quotationItem
.
getProductId
());
quotationItemVo
.
setProductCode
(
product
.
getProductSampleCode
());
quotationItemVo
.
setProductName
(
product
.
getProductName
());
quotationItemVo
.
setProductUnit
(
product
.
getProductUnit
());
return
quotationItemVo
;
})
.
collect
(
Collectors
.
toList
());
map
.
put
(
"gridData"
,
quotationItemVoList
);
String
templateUrl
=
""
;
if
(
"factory"
.
equals
(
quotation
.
getQuotationType
())){
//工厂客户
templateUrl
=
"/print/topsun/factoryQuotation.ftl"
;
getBSNFactoryMessage
(
map
);
}
else
{
//品牌客户
templateUrl
=
"/print/topsun/brandQuotation.ftl"
;
getBSNBrandMessage
(
map
);
}
map
.
put
(
"url"
,
templateUrl
);
return
map
;
}
public
Map
<
String
,
Object
>
getBSNFactoryMessage
(
Map
<
String
,
Object
>
map
){
String
companyName
=
SystemCache
.
getParameter
(
"bsn.factory.companyName"
,
String
.
class
);
String
companyNameEn
=
SystemCache
.
getParameter
(
"bsn.factory.companyName.en"
,
String
.
class
);
String
address
=
SystemCache
.
getParameter
(
"bsn.factory.address"
,
String
.
class
);
String
email
=
SystemCache
.
getParameter
(
"bsn.factory.email"
,
String
.
class
);
String
fax
=
SystemCache
.
getParameter
(
"bsn.factory.fax"
,
String
.
class
);
String
tel
=
SystemCache
.
getParameter
(
"bsn.factory.tel"
,
String
.
class
);
map
.
put
(
"companyName"
,
companyName
);
map
.
put
(
"companyNameEn"
,
companyNameEn
);
map
.
put
(
"address"
,
address
);
map
.
put
(
"email"
,
email
);
map
.
put
(
"fax"
,
fax
);
map
.
put
(
"tel"
,
tel
);
return
map
;
}
public
Map
<
String
,
Object
>
getBSNBrandMessage
(
Map
<
String
,
Object
>
map
){
String
companyName
=
SystemCache
.
getParameter
(
"bsn.brand.companyName"
,
String
.
class
);
String
companyNameEn
=
SystemCache
.
getParameter
(
"bsn.brand.companyName.en"
,
String
.
class
);
String
address
=
SystemCache
.
getParameter
(
"bsn.brand.address"
,
String
.
class
);
String
email
=
SystemCache
.
getParameter
(
"bsn.brand.email"
,
String
.
class
);
String
fax
=
SystemCache
.
getParameter
(
"bsn.brand.fax"
,
String
.
class
);
String
tel
=
SystemCache
.
getParameter
(
"bsn.brand.tel"
,
String
.
class
);
map
.
put
(
"companyName"
,
companyName
);
map
.
put
(
"companyNameEn"
,
companyNameEn
);
map
.
put
(
"address"
,
address
);
map
.
put
(
"email"
,
email
);
map
.
put
(
"fax"
,
fax
);
map
.
put
(
"tel"
,
tel
);
return
map
;
}
}
...
...
topsun/src/main/java/com/huigou/topsun/quotation/controller/QuotationController.java
View file @
cfc39d86
...
...
@@ -2,8 +2,6 @@ package com.huigou.topsun.quotation.controller;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.proofing.application.ProofingApplyApplication
;
import
com.huigou.topsun.proofing.domain.model.ProofingApply
;
import
com.huigou.topsun.quotation.application.QuotationApplication
;
import
com.huigou.topsun.quotation.domain.model.Quotation
;
import
com.huigou.topsun.quotation.domain.query.QuotationQueryRequest
;
...
...
@@ -14,6 +12,7 @@ import com.huigou.util.SDO;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
java.util.Map
;
/**
* @Auther: xin.lu
...
...
@@ -58,4 +57,11 @@ public class QuotationController extends CommonController {
QuotationQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
QuotationQueryRequest
.
class
);
return
toResult
(
quotationApplication
.
slicedQuotationList
(
queryRequest
));
}
public
String
print
(){
SDO
sdo
=
this
.
getSDO
();
String
quotationId
=
sdo
.
getString
(
"quotationId"
);
Map
<
String
,
Object
>
map
=
quotationApplication
.
loadPrintData
(
quotationId
);
return
outputAndProcUnitHandlerPDF
((
String
)
map
.
get
(
"url"
),
quotationId
,
map
);
}
}
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