jg-waiwang-pro
胡川虎 5 months ago
parent e51072eb20
commit 4eaf4f3c58

@ -9,7 +9,7 @@
:style="{'background-color':item.iconColor||item.iconBgColor || '#008cff'}"></view> :style="{'background-color':item.iconColor||item.iconBgColor || '#008cff'}"></view>
<u-badge type="error" :offset="offset" :count="item.num" show-zero <u-badge type="error" :offset="offset" :count="item.num" show-zero
:bgColor="option.valueFontBgColor" :bgColor="option.valueFontBgColor"
:style="{'color':option.valueFontColor,'font-weight':option.valueFontWeight?700:400}"> :style="{'color':option.valueFontColor,'font-weight':option.valueFontWeight?700:400}" v-if="item.fullName != '已办事宜'">
</u-badge> </u-badge>
</view> </view>
<view class="u-line-1 title" <view class="u-line-1 title"
@ -113,6 +113,7 @@
this.key = +new Date() this.key = +new Date()
}, },
jump(item) { jump(item) {
debugger
if (this.config.platform === 'mp') return if (this.config.platform === 'mp') return
let url = item.id === 'toBeReviewed' ? '/workFlow/flowTodo' : item.id === 'flowDone' ? let url = item.id === 'toBeReviewed' ? '/workFlow/flowTodo' : item.id === 'flowDone' ?
"/workFlow/flowDone" : item.id === 'flowCirculate' ? "/workFlow/flowCopy" : "/workFlow/entrust" "/workFlow/flowDone" : item.id === 'flowCirculate' ? "/workFlow/flowCopy" : "/workFlow/entrust"

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('bomCode')" :required="requiredList.bomCode" label="BOM编号" prop="bomCode"> <u-form-item v-if="judgeShow('bomCode')" :required="requiredList.bomCode" label="BOM编号" prop="bomCode">
<u-input v-model="dataForm.bomCode" disabled @change="changeData('bomCode',-1)" input-align='right' <u-input v-model="dataForm.bomCode" disabled @change="changeData('bomCode',-1)" input-align='right'
@ -278,7 +278,7 @@
"value": "spec" "value": "spec"
}, },
], ],
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -301,7 +301,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -270,7 +270,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<jnpf-group value="订单类型" content="订单类型" contentPosition="left"> <jnpf-group value="订单类型" content="订单类型" contentPosition="left">
@ -1100,7 +1100,7 @@
"label": "fullName", "label": "fullName",
"value": "id" "value": "id"
}, },
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<jnpf-group value="订单类型" content="订单类型" contentPosition="left"> <jnpf-group value="订单类型" content="订单类型" contentPosition="left">
@ -1056,7 +1056,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item> <u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;"> <view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;"> <view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
@ -553,7 +553,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 130 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: {}, ruleList: {},

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
@ -74,19 +74,19 @@
</u-form-item> </u-form-item>
</view> </view>
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('applyAmount')" :required="requiredList.applyAmount" label="申请金额" <u-form-item v-if="judgeShow('paymentAmount')" :required="requiredList.paymentAmount" label="申请金额"
prop="applyAmount"> prop="paymentAmount">
<u-input v-model="dataForm.applyAmount" :disabled="judgeWrite('applyAmount')" <u-input v-model="dataForm.paymentAmount" :disabled="judgeWrite('paymentAmount')"
@change="changeData('applyAmount',-1)" input-align='right' addonAfter="元" clearable @change="changeData('paymentAmount',-1)" input-align='right' addonAfter="元" clearable
placeholder="请输入" :style='{"width":"100%"}'> placeholder="请输入" :style='{"width":"100%"}'>
</u-input> </u-input>
</u-form-item> </u-form-item>
</view> </view>
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('paymentAmount')" :required="requiredList.paymentAmount" label="付款金额" <u-form-item v-if="judgeShow('applyAmount')" :required="requiredList.applyAmount" label="实际付款金额"
prop="paymentAmount"> prop="applyAmount">
<u-input v-model="dataForm.paymentAmount" :disabled="judgeWrite('paymentAmount')" <u-input v-model="dataForm.applyAmount" :disabled="judgeWrite('applyAmount')"
@change="changeData('paymentAmount',-1)" input-align='right' addonAfter="元" clearable @change="changeData('applyAmount',-1)" input-align='right' addonAfter="元" clearable
placeholder="请输入" :style='{"width":"100%"}'> placeholder="请输入" :style='{"width":"100%"}'>
</u-input> </u-input>
</u-form-item> </u-form-item>
@ -511,7 +511,7 @@
"value": "settlable_amount" "value": "settlable_amount"
}, },
], ],
labelwidth: 130 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;"> <view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
@ -1449,7 +1449,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 130 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('code')" :required="requiredList.code" label="编号" prop="code"> <u-form-item v-if="judgeShow('code')" :required="requiredList.code" label="编号" prop="code">
<u-input v-model="dataForm.code" disabled @change="changeData('code',-1)" input-align='right' <u-input v-model="dataForm.code" disabled @change="changeData('code',-1)" input-align='right'
@ -134,7 +134,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: {}, ruleList: {},

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item> <u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;"></view>商品类型 <view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;"></view>商品类型
@ -727,7 +727,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 130 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<jnpf-group value="客户分类" content="客户分类" contentPosition="left"> <jnpf-group value="客户分类" content="客户分类" contentPosition="left">
@ -1621,7 +1621,7 @@
"label": "商品名称", "label": "商品名称",
"value": "name" "value": "name"
}, ], }, ],
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<jnpf-group value="服务商分类" content="服务商分类" contentPosition="left"> <jnpf-group value="服务商分类" content="服务商分类" contentPosition="left">
@ -1624,7 +1624,7 @@
"label": "商品名称", "label": "商品名称",
"value": "name" "value": "name"
}, ], }, ],
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<jnpf-group value="供应商分类" content="供应商分类" contentPosition="left"> <jnpf-group value="供应商分类" content="供应商分类" contentPosition="left">
@ -1624,7 +1624,7 @@
"label": "商品名称", "label": "商品名称",
"value": "name" "value": "name"
}, ], }, ],
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 "> <view class="u-p-l-20 u-p-r-20 ">
<u-form-item> <u-form-item>
<jnpf-group value="基础信息" content="基础信息" contentPosition="left"> <jnpf-group value="基础信息" content="基础信息" contentPosition="left">
@ -458,7 +458,7 @@
"multiple": false, "multiple": false,
"children": "" "children": ""
}, },
labelwidth: 100 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -1,7 +1,7 @@
<template> <template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading"> <view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left" <u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="right" :label-width="labelwidth" class="jnpf-form"> label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 form-item-box"> <view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item> <u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;"> <view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
@ -330,7 +330,7 @@
"value": "name" "value": "name"
}, },
], ],
labelwidth: 130 * 1.5, labelwidth: 210 * 1.5,
menuId: '', menuId: '',
jurisdictionType: '', jurisdictionType: '',
ruleList: { ruleList: {

@ -166,6 +166,7 @@ public class GatewayWhite {
//在线表单外链触发接口 //在线表单外链触发接口
whiteUrl.add("/api/visualdev/ShortLink/**"); whiteUrl.add("/api/visualdev/ShortLink/**");
whiteUrl.add("/api/scm/Cwpaymentreceipt/downloadPdf/**");
} }
private void excludePath(){ private void excludePath(){

@ -1,7 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.CwpaymentreceiptMapper"> <mapper namespace="jnpf.mapper.CwpaymentreceiptMapper">
<resultMap id="getPaymentDocNodeInfoMap" type="map">
<!--审核人员-->
<result property="realName" column="realName"/>
<!--审核节点-->
<result property="nodeName" column="nodeName"/>
<!--审核意见-->
<result property="handleOpinion" column="handleOpinion"/>
<!--节点时间-->
<result property="handleTime" column="handleTime"/>
<!--节点信息-->
<result property="node" column="node"/>
</resultMap>
<select id="getPaymentDocNodeInfo" parameterType="String" resultMap="getPaymentDocNodeInfoMap">
SELECT
CONCAT( b.F_Account, '/', b.F_Real_Name ) realName,
a.F_Node_Name nodeName,
a.F_Handle_Opinion handleOpinion,
DATE_FORMAT(a.F_Handle_Time, '%Y-%m-%d %T') handleTime,
( CASE a.F_Node_Name WHEN '开始' THEN 'first' WHEN '最终审批' THEN 'last' ELSE 'node' END ) node
FROM
`flow_task_operator_record` a
LEFT JOIN base_user b ON a.F_Handle_Id = b.F_Account
WHERE
a.F_Task_Id = #{id}
ORDER BY
a.F_Handle_Time
</select>
</mapper> </mapper>

File diff suppressed because one or more lines are too long

@ -39,5 +39,58 @@
<version>3.5.0-RELEASE</version> <version>3.5.0-RELEASE</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
</dependency>
<!--freemarker-->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.27-incubating</version>
</dependency>
<!--html 转 pdf-->
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>9.0.7</version>
</dependency>
<!-- PDF -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13.3</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<!-- PDF end-->
<dependency>
<groupId>com.jnpf</groupId>
<artifactId>jnpf-workflow-engine-controller</artifactId>
<version>3.5.0-RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jnpf</groupId>
<artifactId>jnpf-workflow-engine-controller</artifactId>
<version>3.5.0-RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jnpf</groupId>
<artifactId>jnpf-workflow-engine-controller</artifactId>
<version>3.5.0-RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.jnpf</groupId>
<artifactId>jnpf-workflow-engine-controller</artifactId>
<version>3.5.0-RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -3,6 +3,10 @@ package jnpf.mapper;
import jnpf.entity.CwpaymentreceiptEntity; import jnpf.entity.CwpaymentreceiptEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* Cwpaymentreceipt * Cwpaymentreceipt
@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface CwpaymentreceiptMapper extends BaseMapper<CwpaymentreceiptEntity> { public interface CwpaymentreceiptMapper extends BaseMapper<CwpaymentreceiptEntity> {
List<Map<String, Object>> getPaymentDocNodeInfo(@Param("id") String id);
} }

@ -3,6 +3,10 @@ package jnpf.mapper;
import jnpf.entity.CwsettlementpaymentreceiptEntity; import jnpf.entity.CwsettlementpaymentreceiptEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* Cwsettlement * Cwsettlement

@ -2,6 +2,8 @@ package jnpf.service;
import jnpf.model.cwpaymentreceipt.*; import jnpf.model.cwpaymentreceipt.*;
import jnpf.entity.*; import jnpf.entity.*;
import java.io.IOException;
import java.util.*; import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -40,4 +42,5 @@ public interface CwpaymentreceiptService extends IService<CwpaymentreceiptEntity
void saveOrUpdate(CwpaymentreceiptForm cwpaymentreceiptForm,String id, boolean isSave) throws Exception; void saveOrUpdate(CwpaymentreceiptForm cwpaymentreceiptForm,String id, boolean isSave) throws Exception;
void getPaymentDocPdf(String id) throws IOException;
} }

@ -1,23 +1,41 @@
package jnpf.service.impl; package jnpf.service.impl;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONArray;
import jnpf.base.ActionResult;
import jnpf.engine.controller.FlowBeforeController;
import jnpf.engine.model.flowbefore.FlowBeforeInfoVO;
import jnpf.engine.model.flowbefore.FlowTaskOperatorRecordModel;
import jnpf.engine.model.flowengine.FlowModel;
import jnpf.entity.*; import jnpf.entity.*;
import jnpf.exception.WorkFlowException;
import jnpf.mapper.CwpaymentreceiptMapper; import jnpf.mapper.CwpaymentreceiptMapper;
import jnpf.mapper.CwsettlementpaymentreceiptMapper;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.permission.service.UserService;
import jnpf.service.*; import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.cwpaymentreceipt.*; import jnpf.model.cwpaymentreceipt.*;
import java.math.BigDecimal;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.util.GeneraterSwapUtil; import jnpf.util.GeneraterSwapUtil;
import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.database.model.superQuery.ConditionJsonModel;
import jnpf.database.model.superQuery.SuperQueryConditionModel;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import java.net.URLEncoder;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import jnpf.model.QueryModel; import jnpf.model.QueryModel;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel; import jnpf.base.model.ColumnDataModel;
import jnpf.util.context.SpringContext;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel; import jnpf.database.model.superQuery.SuperJsonModel;
@ -30,6 +48,9 @@ import jnpf.util.*;
import java.util.*; import java.util.*;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import javax.servlet.http.HttpServletResponse;
/** /**
* *
* Cwpaymentreceipt * Cwpaymentreceipt
@ -50,6 +71,17 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
private CwpaymentsummaryService cwpaymentsummaryService; private CwpaymentsummaryService cwpaymentsummaryService;
@Autowired @Autowired
private CwpaymentlastsummaryService cwpaymentlastsummaryService; private CwpaymentlastsummaryService cwpaymentlastsummaryService;
@Autowired
private UserService userService;
@Autowired
private OrganizeService organizeService;
@Autowired
private CwsettlementService cwsettlementService;
@Autowired
private CwsettlementpaymentreceiptService cwsettlementpaymentreceiptService;
@Autowired
private CwpaymentreceiptMapper cwpaymentreceiptMapper;
@Override @Override
public List<CwpaymentreceiptEntity> getList(CwpaymentreceiptPagination cwpaymentreceiptPagination){ public List<CwpaymentreceiptEntity> getList(CwpaymentreceiptPagination cwpaymentreceiptPagination){
return getTypeList(cwpaymentreceiptPagination,cwpaymentreceiptPagination.getDataType()); return getTypeList(cwpaymentreceiptPagination,cwpaymentreceiptPagination.getDataType());
@ -512,4 +544,138 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
} }
} }
} }
@Override
public void getPaymentDocPdf(String id) throws IOException {
List<Map<String, Object>> paymentDocNodeInfo = cwpaymentreceiptMapper.getPaymentDocNodeInfo(id);
String stringtime = null;
if (paymentDocNodeInfo != null && paymentDocNodeInfo.size() > 0) {
System.out.println( paymentDocNodeInfo.get(0).get("handleTime"));
stringtime=paymentDocNodeInfo.get(0).get("handleTime").toString();
}
PaymentdocMessage paymentdocMessage =new PaymentdocMessage();
CwpaymentreceiptEntity cwpaymentreceiptEntity = this.getById(id);
//根据收付款单查找结算单
CwsettlementEntity cwsettlementEntity = cwsettlementService.getById(cwpaymentreceiptEntity.getSettlementId());
//根据结算单查询收款信息
QueryWrapper<CwsettlementpaymentreceiptEntity> cwsettlementpaymentreceiptqueryWrapper = new QueryWrapper<>();
cwsettlementpaymentreceiptqueryWrapper.lambda().eq(CwsettlementpaymentreceiptEntity::getSettlementId, cwsettlementEntity.getId());
cwsettlementpaymentreceiptqueryWrapper.lambda().eq(CwsettlementpaymentreceiptEntity::getType, "2");
CwsettlementpaymentreceiptEntity cwsettlementpaymentreceiptEntity = cwsettlementpaymentreceiptService.getOne(cwsettlementpaymentreceiptqueryWrapper);
UserEntity userEntity = userService.getInfo(cwpaymentreceiptEntity.getCreatorUserId());
paymentdocMessage.setRealName(userEntity.getRealName());
paymentdocMessage.setMobilePhone(userEntity.getAccount());
paymentdocMessage.setNowTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(cwpaymentreceiptEntity.getCreatorTime()));
OrganizeEntity companyEntity = organizeService.getById(cwpaymentreceiptEntity.getCompanyId());
paymentdocMessage.setCustomerName(companyEntity.getFullName() + "请示");
paymentdocMessage.setDocumentNo(cwpaymentreceiptEntity.getCode());
paymentdocMessage.setSupplierName(cwpaymentreceiptEntity.getPayee());
paymentdocMessage.setRamout(cwpaymentreceiptEntity.getPaymentAmount().toString());
paymentdocMessage.setPaymentAmout(cwsettlementEntity.getSettledAmount().toString());
paymentdocMessage.setCollectionAccout(cwsettlementpaymentreceiptEntity.getBankAccount());
paymentdocMessage.setColletionBank(cwsettlementpaymentreceiptEntity.getBankBranchName());
paymentdocMessage.setRemark(cwpaymentreceiptEntity.getRemark());
paymentdocMessage.setEnclosure(null);
paymentdocMessage.setPayType("货款");
OrganizeEntity departmentEntity = organizeService.getById(cwpaymentreceiptEntity.getDepartmentId());
paymentdocMessage.setFullName(companyEntity.getFullName() + "/" + departmentEntity.getFullName());
StringBuilder payEnclosureStr = new StringBuilder();
if (paymentdocMessage.getEnclosure() != null) {//附件不为空
String enclosure = paymentdocMessage.getEnclosure();
JSONArray jsonToJsonArray = JsonUtil.getJsonToJsonArray(enclosure);
for (int i = 0; i < jsonToJsonArray.size(); i++) {
Map o = (Map) jsonToJsonArray.get(i);
Object name = o.get("name");
if (i == 0) {
payEnclosureStr.append(name);
} else {
payEnclosureStr.append("<br/>" + name);
}
}
paymentdocMessage.setEnclosure(payEnclosureStr.toString());
}
// StringUtil.indexOf()
// String templateFilePath = configValueUtil.getTemplateFilePath() +"paymentDocPdf//";
Map<String, Object> map = JsonUtil.stringToMap(JSONUtil.toJsonStr(paymentdocMessage));
map.put("substring", companyEntity.getFullName());
map.put("substring1", departmentEntity.getFullName());
// map.put("reportList",paymentDocNodeInfo);
FlowBeforeController bean = SpringContext.getBean(FlowBeforeController.class);
ActionResult info = null;
try {
info = bean.info(id, new FlowModel());
} catch (WorkFlowException e) {
throw new RuntimeException(e);
}
FlowBeforeInfoVO data = (FlowBeforeInfoVO) info.getData();
List<FlowTaskOperatorRecordModel> recordList = data.getFlowTaskOperatorRecordList();
List<Map<String, Object>> maps = new ArrayList<>();
for (int i = 0; i < recordList.size(); i++) {
Map<String, Object> map1 = new HashMap<String, Object>();
FlowTaskOperatorRecordModel model = recordList.get(i);
Map<String, Object> map2 = paymentDocNodeInfo.get(i);
map1.put("realName", model.getUserName());
map1.put("nodeName", model.getNodeName());
map1.put("handleOpinion", model.getHandleOpinion());
map1.put("handleTime", DateUtil.daFormat(model.getHandleTime()));
map1.put("node", map2.get("node"));
maps.add(map1);
}
ArrayList<Map<String, Object>> maps1 = new ArrayList<Map<String, Object>>();
int num = 6;
if (maps.size() > num) {
for (int i = 0; i < maps.size(); i++) {
Map<String, Object> map1 = maps.get(i);
if (i >= num) {
maps1.add(map1);
}
}
while (maps.size() > num) {
maps.remove(num);
}
}
map.put("reportList", maps);
map.put("reportList1", maps1);
byte[] bytes = null;
ByteArrayOutputStream out = null;
ExportPdf exportPdf = new ExportPdf();
// word模板
try {
out = exportPdf.createPdf(map, "paymentDoc.ftl", "/templates/export");
bytes = out.toByteArray();
out.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
String fileName = paymentdocMessage.getCustomerName() == null ? companyEntity.getFullName() + "请示.pdf" : companyEntity.getFullName() + "请示(" + paymentdocMessage.getCustomerName() + ").pdf";
HttpServletResponse response = ServletUtil.getResponse();
response.reset();
String excelTitle = fileName;
String filen = null;
try {
filen = URLEncoder.encode(excelTitle, "UTF-8").replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
// 设置response的Header
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + filen);
response.setContentType("application/x-download;charset=utf-8");
BufferedOutputStream toClient = null;
try {
toClient = new BufferedOutputStream(response.getOutputStream());
toClient.write(out.toByteArray());
toClient.flush();
toClient.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
log.warn("pdf文件生成成功");
}
} }

@ -0,0 +1,74 @@
package jnpf.util;
import freemarker.template.Configuration;
import freemarker.template.Template;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.itextpdf.text.pdf.BaseFont;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.StringWriter;
import java.util.Locale;
import java.util.Map;
/**
* @Author: WangChuang
* @Date: 15/2/2023 10:03
* @Description //注释:
* @Version 1.0
*/
public class ExportPdf {
/**
* pdf
*
* @param data
* @param templateFileName
* @throws Exception SIMSUN.TTC
*/
public ByteArrayOutputStream createPdf(Map data, String templateFileName, String basePackagePath) throws Exception {
OutputStream out = new ByteArrayOutputStream();
StringWriter writer = new StringWriter();
try{
// 创建一个FreeMarker实例, 负责管理FreeMarker模板的Configuration实例
Configuration cfg = new Configuration();
cfg.setDefaultEncoding("UTF-8");
// 指定FreeMarker模板文件的位置
cfg.setClassForTemplateLoading(this.getClass(), basePackagePath);
ITextRenderer renderer = new ITextRenderer();
// 设置 css中 的字体样式(暂时仅支持宋体和黑体) 必须,不然中文不显示
//String path = ExportPdf.class.getResource("").getPath();
//String path = ExportPdf.class.getResource("/").getPath() + "templates/export/";
String path = "/templates/export/";
renderer.getFontResolver().addFont(path + "simsun.ttc", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
// 设置模板的编码格式
cfg.setEncoding(Locale.CHINA, "UTF-8");
// 获取模板文件
Template template = cfg.getTemplate(templateFileName, "UTF-8");
// 将数据输出到html中
template.process(data, writer);
writer.flush();
String html = writer.toString();
// 把html代码传入渲染器中
renderer.setDocumentFromString(html);
// 设置模板中的图片路径 这里的images在resources目录下 模板中img标签src路径需要相对路径加图片名 如<img src="images/xh.jpg"/>
// String url = ImportExcelUtil.class.getClassLoader().getResource("images").toURI().toString();
// renderer.getSharedContext().setBaseURL(url);
renderer.layout();
renderer.createPDF(out, false);
renderer.finishPDF();}
finally {
out.flush();
writer.close();
}
return (ByteArrayOutputStream) out;
}
}

@ -15,6 +15,8 @@ import jnpf.model.cwpaymentreceipt.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
@ -535,4 +537,13 @@ public class CwpaymentreceiptController {
return ActionResult.success(cwpaymentreceiptMap); return ActionResult.success(cwpaymentreceiptMap);
} }
/**
*
* @param id id
* @throws Exception
*/
@GetMapping(value = "/downloadPdf/{id}/{token}")
public void downloadPdf(HttpServletResponse response,@PathVariable("id") String id,@PathVariable("token")String token) throws IOException {
cwpaymentreceiptService.getPaymentDocPdf(id);
}
} }

@ -0,0 +1,57 @@
package jnpf.model.cwpaymentreceipt;
import lombok.Data;
/**
* @Author: huchuanhu
* @Date: 11/4/2023 10:14
* @Description //注释:
* @Version 1.0
*/
@Data
public class PaymentdocMessage {
/**付款请示**/
private String customerName;
/**单据编号**/
private String documentNo;
/**供应商名称**/
private String supplierName;
/**申请金额**/
private String ramout;
/**已支付金额**/
private String paymentAmout;
/**账号**/
private String collectionAccout;
/**银行**/
private String colletionBank;
/**报告要点及备注**/
private String remark;
/**附件**/
private String enclosure;
/**付款类型**/
private String payType;
/**姓名**/
private String realName;
/**手机号**/
private String mobilePhone;
/**时间**/
private String nowTime;
/**拟稿单位**/
private String fullName;
}

@ -22,4 +22,26 @@
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.doc.free</artifactId>
<version>5.2.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
</dependencies>
</dependencyManagement>
</project> </project>

@ -50,7 +50,7 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<!-- <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()"> <!-- <el-button type="primary" icon="el-icon-download" @click="downPayment()">
</el-button> --> </el-button> -->
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'"> <el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'">
</el-button> </el-button>
@ -122,6 +122,8 @@
</el-button> --> </el-button> -->
<el-button size="mini" type="text" :disabled="!scope.row.flowState" <el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button> @click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
<el-button size="mini" type="text" :disabled="scope.row.flowState !=2 && ((scope.row.businessType == 1 && scope.row.type == 1) || (scope.row.businessType == 4 && scope.row.type == 2))"
@click="downPayment(scope.row.id)">下载</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
@ -185,6 +187,7 @@
} from "@/components/Generator/utils/index" } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery' import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson' import superQueryJson from './superQueryJson'
import {getToken} from "@/utils/auth";
export default { export default {
components: { components: {
@ -283,6 +286,12 @@
}) })
}, },
methods: { methods: {
downPayment(id) {
let url = "/api/scm/Cwpaymentreceipt/downloadPdf/" + id +"/"+getToken();
debugger
// console.log(url);
this.jnpf.downloadFile(url);
},
toDetail(defaultValue, modelId) { toDetail(defaultValue, modelId) {
if (!defaultValue) return if (!defaultValue) return
getConfigData(modelId).then(res => { getConfigData(modelId).then(res => {

Loading…
Cancel
Save