From 78dda90119b6ba8ed6c16f7bc05568b68fac8b03 Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Mon, 18 Apr 2022 09:31:06 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=88=9D=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/importModal/modalStep1.js | 2 +-
pc4mobx/hrmSalary/index.js | 2 +
pc4mobx/hrmSalary/pages/payroll/index.js | 69 +++++++++++++++---
.../pages/payroll/stepForm/showSettingForm.js | 2 +-
.../payroll/templatePreview/computer.png | Bin 0 -> 2524 bytes
.../templatePreview/computerTemplate/index.js | 21 ++++++
.../pages/payroll/templatePreview/index.js | 39 ++++++++++
.../pages/payroll/templatePreview/index.less | 27 +++++++
.../payroll/templatePreview/phone_new.png | Bin 0 -> 2450 bytes
9 files changed, 150 insertions(+), 12 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/payroll/templatePreview/computer.png
create mode 100644 pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js
create mode 100644 pc4mobx/hrmSalary/pages/payroll/templatePreview/index.js
create mode 100644 pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
create mode 100644 pc4mobx/hrmSalary/pages/payroll/templatePreview/phone_new.png
diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep1.js b/pc4mobx/hrmSalary/components/importModal/modalStep1.js
index 3c810b47..16bf8b7b 100644
--- a/pc4mobx/hrmSalary/components/importModal/modalStep1.js
+++ b/pc4mobx/hrmSalary/components/importModal/modalStep1.js
@@ -28,7 +28,7 @@ export default class ModalStep1 extends React.Component {
const dragger = {
name: 'file',
multiple: false,
- action: "handleCancel", //上传地址
+ action: "/api/doc/upload/uploadFile", //上传地址
onChange: (info) => {
const { status } = info.file;
if (status !== 'uploading') {
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 55ccf955..091a8b90 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -24,6 +24,7 @@ import PlaceOnFileDetail from './pages/calculateDetail/placeOnFileDetail';
import CompareDetail from './pages/calculateDetail/compareDetail'
import GenerateDeclarationDetail from './pages/declare/generateDeclarationDetail'
import BaseForm from './components';
+import TemplatePreview from './pages/payroll/templatePreview'
import stores from './stores';
@@ -93,6 +94,7 @@ const Routes = (
+
diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js
index 3ffac0c0..bcc5aaa4 100644
--- a/pc4mobx/hrmSalary/pages/payroll/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/index.js
@@ -32,10 +32,8 @@ export default class Payroll extends React.Component {
this.state = {
value: "",
selectedKey: "0",
- startDate: moment(new Date()).format("YYYY-MM"),
- endDate: moment(new Date()).format("YYYY-MM"),
- selectedKey: "0",
- stepSlideVisible: false,
+ startDate: "",
+ endDate: "",
currentStep: 0,
stepSlideVisible: false,
selectedTab: 0,
@@ -49,12 +47,12 @@ export default class Payroll extends React.Component {
}
columns.map(item => {
if(item.dataIndex == "cz") {
- item.render = () => {
+ item.render = (text, record) => {
return (
)
}
@@ -83,6 +81,17 @@ export default class Payroll extends React.Component {
})
}
+ // 更新模板
+ handleUpdateTemplate(record) {
+ alert(JSON.stringify(record))
+ this.setState({
+ selectedKey: "1",
+ editSlideVisible: true,
+ templateCurrentId: record.templateId
+
+ })
+ }
+
// 工资单模板-新建表单变化监听
handleBaseInfoChange(request) {
const { payrollStore: {setTemplateBaseData}} = this.props;
@@ -167,6 +176,46 @@ export default class Payroll extends React.Component {
},
});
}
+
+ // 开始日期修改
+ handleStartDateChange(value) {
+ this.setState({
+ startDate: value
+ })
+
+ const { payrollStore } = this.props;
+ const { getPayrollList } = payrollStore;
+ let salaryYearMonth = []
+ if(value != "") {
+ salaryYearMonth.push(value)
+ }
+ if(this.state.endDate != "") {
+ salaryYearMonth.push(this.state.endDate);
+ }
+ getPayrollList({salaryYearMonth})
+
+ }
+
+ // 结束日期修改
+ handleEndDateChange(value) {
+ this.setState({endDate: value})
+ const { payrollStore } = this.props;
+ const { getPayrollList } = payrollStore;
+ let salaryYearMonth = []
+ if(this.state.startDate != "") {
+ salaryYearMonth.push(this.state.startDate)
+ }
+ if(value != "") {
+ salaryYearMonth.push(value)
+ }
+ getPayrollList({salaryYearMonth})
+ }
+
+
+ // 预览
+ handlePreview() {
+ window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/templatePreview")
+ }
render() {
@@ -219,13 +268,13 @@ export default class Payroll extends React.Component {
this.props.onStartDateChange(value)}
+ onChange={value => this.handleStartDateChange(value)}
/>
至
this.props.onEndDateChange(value)}
+ onChange={value => this.handleEndDateChange(value)}
/>
@@ -330,7 +379,7 @@ export default class Payroll extends React.Component {
currentStep == 1 &&
-
+
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js
index 07d3eefd..345de372 100644
--- a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js
+++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js
@@ -82,7 +82,7 @@ export default class ShowSettingForm extends React.Component {
- 工资单主题
+ 工资单背景
{this.handleChange({background: value})}}/>
{/*
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computer.png b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computer.png
new file mode 100644
index 0000000000000000000000000000000000000000..535b91b90a1ef9112aa76a9f4fa35897e4e7d80f
GIT binary patch
literal 2524
zcmeH}`B#%y8pq#+R|u;KL5L_2lCa4xDq9eOfslw&u$4`aLIhh84PaS9A-qL+;UI)G
z1XM%@5<49*EMi3vjT!_uWGQ%HC@5>A1_p%$WSewm{)9Pm`osKi?{m)Qhv&KHp8NgY
zZ{Zh5X}Vg*S^xm((gUa=s@n6%LaD3vn_=Q=RY9bL(0l=L?`|0YXbR|5%9rWU@@vnZ
zi;v-+G_ohnVmPGQX|B$0-)Bdy4G4ULom{8$xR^(h1dZu#o{v7)O+7aawW1q{>1@TSQ0CYah
zCq@H_dL&06z_+Fx9}~nlVM^jRu
z*tl4-z{@UM5(!-ilRrJ|RW7jd4TSvUE5Z&^6nT$Z?+{;dhGz=HrB}tHG0ks58_`$?
zZ;GS-sadK(ucTN!{dLQ!@h>V&wwCpN{rh>YDL7sPYqJyY-SH~G2>BoH3vba7kKNn#
z(+?2D?=zvH*+ZxhMn>4cSt9UO=P|m?k(odgo8?DVTo!&vO*x3X-luGI`tc=EHcFuu?
zI9}5He)3wSN-AND3UO__%HM|FZ(};NSs_#p*=nOQf+2*=|&2q
z
zZa&+Q6ZH0M;j4qY7~FDF!QuAE0bMWS*jGtlHLul^kp262P-h~!3cpp=%umi09wtTY
zk=2ydumtg7cKOmhp^`8ukFP&);&d2g(=*Oy#)n?OxU%`;WAX#*etFu(SHOB2-J2#|
zn(J%4iDsUL$_s2o26F>&jjcvlon7Cq+|&vRx+3g48CrUK&@1+_XMmNW_ZQS;-?x>1
z+fNALg8PC8
zYOmwTaf-*{+1vI|qE8Dy84{*g9Pz$>zDK%_y!5qxus-;F$
zvN}c4pKUW!H55dSXPbW5PQOEw4jwj)IeClNqnF398SH*ZZg+$uH@6yLxZ+M${zyqF
z{!E`Bq(rbJPn_OB<{dy{7I2%)@R6
zxd`<~S1d2d_|5EZX0&t
+
+ 测试标题
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.js
new file mode 100644
index 00000000..25a04f85
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.js
@@ -0,0 +1,39 @@
+import React from 'react'
+import phone from './phone_new.png'
+import computer from './computer.png'
+import './index.less'
+
+export default class TemplatePreview extends React.Component {
+ constructor(props) {
+ super(props)
+ this.state = {
+ selectKey: "0"
+ }
+ }
+
+ handleSelectClick(selectKey) {
+ this.setState({selectKey})
+ }
+
+ render() {
+ const { selectKey } = this.state;
+ return (
+
+
+
+
{this.handleSelectClick("0")}} className={selectKey == "0" ? "iconWrapper activeIconWrapper" : "iconWrapper" }>
+

+
+
{this.handleSelectClick("1")}} className={selectKey == "1" ? "iconWrapper activeIconWrapper" : "iconWrapper"}>
+

+
+
+
+
+
+
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
new file mode 100644
index 00000000..3d4c23ca
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/index.less
@@ -0,0 +1,27 @@
+.templatePreview {
+ .headerWrapper {
+ background-color: #0270c1;
+ height: 55px;
+ line-height: 55px;
+ text-align: center;
+ .iconsWrapper {
+ display: inline-block;
+ width: 150px;
+ height: 55px;
+ .iconWrapper {
+ display: inline-block;
+ width: 50px;
+ height: 55px;
+ line-height: 75px;
+ text-align: center;
+ img {
+ width: 30px;
+ height: 30px;
+ }
+ }
+ .activeIconWrapper {
+ background-color: #1c87d3;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phone_new.png b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phone_new.png
new file mode 100644
index 0000000000000000000000000000000000000000..4a1acf818fbc0308bed065255723b8e4983d4732
GIT binary patch
literal 2450
zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k4M?tyST_$yF%}28J29*~C-ahlfz!v+#WAEJ
z?(N)zeIltMt?z3YB4@qe6aT=V);3q@+NS0o47&uI)poIeo3%pF{1XFP*)FvQeKUSA
zY`8F2P3J3PU9iREo)Zb>zH^PY=he>jVY+*D`M=+De|_?=;!8#IQZ|e%
z4_`GL@a9n9n9j~3(2~u-^qFHr^O?uTcAGgdIGP2SB%f1mQ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