{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
index f4645d1f..fa82e777 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
@@ -545,6 +545,7 @@ export default class Programme extends React.Component {
subtitle={this.state.customEdit ? "修改" : "新增"}
subTabs={[{ title: "基础设置" }]}
editable={true}
+ showOperateBtn={showOperateBtn}
onSave={() => {
handleOnSave();
}}
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js
index 571923ad..0e914a82 100644
--- a/pc4mobx/hrmSalary/stores/payroll.js
+++ b/pc4mobx/hrmSalary/stores/payroll.js
@@ -1,10 +1,10 @@
-import { observable, action, toJS } from 'mobx';
-import { message } from 'antd';
-import { WeaForm, WeaTableNew } from 'comsMobx';
+import { observable, action, toJS } from "mobx";
+import { message } from "antd";
+import { WeaForm, WeaTableNew } from "comsMobx";
-import * as API from '../apis/payroll'; // 引入API接口文件
-import { notNull } from '../util/validate';
-import { removePropertyCondition } from '../util/response';
+import * as API from "../apis/payroll"; // 引入API接口文件
+import { notNull } from "../util/validate";
+import { removePropertyCondition } from "../util/response";
const { TableStore } = WeaTableNew;
@@ -16,20 +16,19 @@ export class payrollStore {
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = true; // 数据加载状态
- // **** 模板页面 ****
+ // **** 模板页面 ****
@observable templateStore = new TableStore(); // 模板设置列表
// 基础设置表单
- @observable templateBaseData = {} // 基础信息表单数据
- @observable salarySobOptions = [] // 账套列表
+ @observable templateBaseData = {}; // 基础信息表单数据
+ @observable salarySobOptions = []; // 账套列表
// 显示设置表单
- @observable salaryTemplateShowSet = {} // 显示设置基础表单
- @observable salaryItemSet = [] // 显示设置薪资项
-
+ @observable salaryTemplateShowSet = {}; // 显示设置基础表单
+ @observable salaryItemSet = []; // 显示设置薪资项
// **** 工资单页面 ****
@observable salarySendTableStore = new TableStore(); // 工资单列表
@observable salarySendDataSource = [];
- @observable pageInfo = {}
+ @observable pageInfo = {};
// **** 工资单详情页 ****
@observable salarySendDetailBaseInfo = {}; // 工资单详情基础信息
@@ -38,483 +37,503 @@ export class payrollStore {
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
@observable detailListCondition = []; // 详情页搜索条件
- @observable salarySendDetailPageInfo ={}
+ @observable salarySendDetailPageInfo = {};
// **** 工资单发放页 ****
@observable salaryGrantDataSource = [];
- @observable salaryGrantPageInfo ={};
- @observable salaryGrantTableStore = new TableStore();
+ @observable salaryGrantPageInfo = {};
+ @observable salaryGrantTableStore = [];
@observable grantListConditionForm = new WeaForm(); // 详情页搜索条件
@observable grantListShowSearchAd = false; // 详情页是否展开搜索面板
@observable grantListCondition = []; // 详情页搜索条件
@observable canGrantDataSource = []; // 可以发送的列表
- @observable canGrantColumns = []; // 可以发送的列名
+ @observable canGrantColumns = []; // 可以发送的列名
@observable canGrantPageInfo = {}; // 可以发送列表分页对象
@observable canWithdrawDataSource = []; // 可以撤回的列表
@observable canWidthdrawColumns = []; // 可以撤回的列表列名
@observable canWithdrawPageInfo = {}; // 可以撤回列表分页对象
@action
- setGrantListShowSearchAd = (grantListShowSearchAd) => this.grantListShowSearchAd = grantListShowSearchAd
+ setGrantListShowSearchAd = grantListShowSearchAd =>
+ (this.grantListShowSearchAd = grantListShowSearchAd);
// 详情页是否展开搜索面板
@action
- setDetailListShowSearchAd = (detailListShowSearchAd) => this.detailListShowSearchAd = detailListShowSearchAd
+ setDetailListShowSearchAd = detailListShowSearchAd =>
+ (this.detailListShowSearchAd = detailListShowSearchAd);
// 基础信息表单数据
@action
- setTemplateBaseData = (templateBaseData) => this.templateBaseData = templateBaseData
+ setTemplateBaseData = templateBaseData =>
+ (this.templateBaseData = templateBaseData);
// 显示设置基础表单
@action
- setSalaryTemplateShowSet = (salaryTemplateShowSet) => this.salaryTemplateShowSet = salaryTemplateShowSet
+ setSalaryTemplateShowSet = salaryTemplateShowSet =>
+ (this.salaryTemplateShowSet = salaryTemplateShowSet);
@action
- setSalaryItemSet = (salaryItemSet) => this.salaryItemSet = salaryItemSet
+ setSalaryItemSet = salaryItemSet => (this.salaryItemSet = salaryItemSet);
// 初始化操作
@action
doInit = () => {
// this.getCondition();
// this.getTableDatas();
- }
+ };
// 获得高级搜索表单数据
@action
getCondition = () => {
- API.getCondition().then(action(res => {
- if (res.api_status) { // 接口请求成功/失败处理
- let condition = removePropertyCondition(res.condition);
- this.form.initFormFields(condition); // 渲染高级搜索form表单
- } else {
- message.error(res.msg || '接口调用失败!')
- }
- }));
- }
+ API.getCondition().then(
+ action(res => {
+ if (res.api_status) {
+ // 接口请求成功/失败处理
+ let condition = removePropertyCondition(res.condition);
+ this.form.initFormFields(condition); // 渲染高级搜索form表单
+ } else {
+ message.error(res.msg || "接口调用失败!");
+ }
+ })
+ );
+ };
// 渲染table数据
@action
- getTableDatas = (params) => {
+ getTableDatas = params => {
this.loading = true;
const formParams = this.form.getFormParams() || {};
params = params || formParams;
- API.getTableDatas(params).then(action(res => {
- if (res.api_status) { // 接口请求成功/失败处理
- this.tableStore.getDatas(res.datas); // table 请求数据
- this.hasRight = res.hasRight;
- } else {
- message.error(res.msg || '接口调用失败!')
- }
- this.loading = false;
- }));
- }
+ API.getTableDatas(params).then(
+ action(res => {
+ if (res.api_status) {
+ // 接口请求成功/失败处理
+ this.tableStore.getDatas(res.datas); // table 请求数据
+ this.hasRight = res.hasRight;
+ } else {
+ message.error(res.msg || "接口调用失败!");
+ }
+ this.loading = false;
+ })
+ );
+ };
- @action
- setShowSearchAd = bool => this.showSearchAd = bool;
+ @action setShowSearchAd = bool => (this.showSearchAd = bool);
// 高级搜索 - 搜索
- @action doSearch = () => {
+ @action
+ doSearch = () => {
this.getTableDatas();
this.showSearchAd = false;
- }
+ };
// 工资单模板-工资单模板列表
@action
getPayrollTemplateList = (params = {}) => {
- this.loading = true
+ this.loading = true;
API.getPayrollTemplateList(params).then(res => {
- if(res.status) {
+ if (res.status) {
this.templateStore.getDatas(res.data.datas);
} else {
message.error(res.errormsg || "获取失败");
}
this.loading = false;
- })
- }
+ });
+ };
// 工资单模板-获取工资单模板基础设置表单
@action
getPayrollBaseForm = (id = "") => {
let params = {
id
- }
+ };
return new Promise((resolve, reject) => {
API.getPayrollBaseForm(params).then(res => {
- if(res.status) {
- let response = res.data.salaryTemplateBaseSet
- let templateBaseData = response.data
- templateBaseData.salarySob = templateBaseData.salarySob != undefined ? templateBaseData.salarySob + "": null;
- this.templateBaseData = templateBaseData // 基础信息表单数据
-
- this.salarySobOptions = response.salarySobOptions ?
- response.salarySobOptions.map(item => {
- let result = {}
- result.showname = item.name;
- result.key = item.id + "";
- result.selected = false;
- return result;
- }) : []
+ if (res.status) {
+ let response = res.data.salaryTemplateBaseSet;
+ let templateBaseData = response.data;
+ templateBaseData.salarySob =
+ templateBaseData.salarySob != undefined
+ ? templateBaseData.salarySob + ""
+ : null;
+ this.templateBaseData = templateBaseData; // 基础信息表单数据
+
+ this.salarySobOptions = response.salarySobOptions
+ ? response.salarySobOptions.map(item => {
+ let result = {};
+ result.showname = item.name;
+ result.key = item.id + "";
+ result.selected = false;
+ return result;
+ })
+ : [];
resolve({
templateBaseData: this.templateBaseData,
salarySobOptions: this.salarySobOptions
});
} else {
message.errro(res.errormsg || "获取失败");
- reject()
+ reject();
}
- })
- })
- }
-
+ });
+ });
+ };
// 工资单模板-获取工资单模板显示设置表单
@action
getPayrollShowForm = (id = "") => {
let params = {
id
- }
+ };
API.getPayrollShowForm(params).then(res => {
- if(res.status) {
- if(id !== "") {
- this.salaryItemSet = res.data.salaryTemplateSalaryItemSet
+ if (res.status) {
+ if (id !== "") {
+ this.salaryItemSet = res.data.salaryTemplateSalaryItemSet;
}
- this.salaryTemplateShowSet = res.data.salaryTemplateShowSet.data
+ this.salaryTemplateShowSet = res.data.salaryTemplateShowSet.data;
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
// 工资单模板-获取薪资项目设置
@action
getPayrollItemList = (salarySobId = "") => {
let params = {
salarySobId
- }
+ };
API.getPayrollItemList(params).then(res => {
- if(res.status) {
- this.salaryItemSet = res.data
+ if (res.status) {
+ this.salaryItemSet = res.data;
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
// 初始化显示设置表单
@action
initShowSettingForm = (id = "") => {
this.getPayrollShowForm(id);
- if(id == "") {
- this.getPayrollItemList(this.templateBaseData.salarySob)
+ if (id == "") {
+ this.getPayrollItemList(this.templateBaseData.salarySob);
}
- }
-
+ };
+
// 校验显示设置表单
validateSalaryTemplateShowSet = () => {
- if(!notNull(this.salaryTemplateShowSet.theme)) {
+ if (!notNull(this.salaryTemplateShowSet.theme)) {
message.warning("工资单主题不能为空");
return false;
}
return true;
- }
+ };
// 拼装保存参数
convertParams = () => {
- let params = {...this.templateBaseData, ...this.salaryTemplateShowSet}
- params.salarySobId = params.salarySob
+ let params = { ...this.templateBaseData, ...this.salaryTemplateShowSet };
+ params.salarySobId = params.salarySob;
params.emailStatus = params.emailStatus ? params.emailStatus : false;
- params.msgStatus = params.msgStatus ? params.msgStatus : false
- params.salaryItemNullStatus = params.salaryItemNullStatus ? params.salaryItemNullStatus : false;
- params.salaryItemZeroStatus = params.salaryItemZeroStatus ? params.salaryItemZeroStatus : false;
- params.salaryItemSetting = this.salaryItemSet
- return params
- }
-
+ params.msgStatus = params.msgStatus ? params.msgStatus : false;
+ params.salaryItemNullStatus = params.salaryItemNullStatus
+ ? params.salaryItemNullStatus
+ : false;
+ params.salaryItemZeroStatus = params.salaryItemZeroStatus
+ ? params.salaryItemZeroStatus
+ : false;
+ params.salaryItemSetting = this.salaryItemSet;
+ return params;
+ };
// 工资单模板-新建工资单模板
@action
fetchSavePayroll = () => {
- if(!(this.validateSalaryTemplateShowSet())) {
- return false
+ if (!this.validateSalaryTemplateShowSet()) {
+ return false;
}
- let params = this.convertParams()
+ let params = this.convertParams();
return new Promise((resolve, reject) => {
API.savePayroll(params).then(res => {
- if(res.status) {
+ if (res.status) {
message.success("保存成功");
this.getPayrollTemplateList();
resolve();
- } else {
- message.error(res.errormsg || "保存失败")
- reject()
+ } else {
+ message.error(res.errormsg || "保存失败");
+ reject();
}
- })
- })
- }
+ });
+ });
+ };
// 工资单模板-更新工资单模板
@action
- fetchUpdatePayroll = (id) => {
- if(!(this.validateSalaryTemplateShowSet())) {
- return false
+ fetchUpdatePayroll = id => {
+ if (!this.validateSalaryTemplateShowSet()) {
+ return false;
}
- let params = this.convertParams()
- params.id = id
+ let params = this.convertParams();
+ params.id = id;
return new Promise((resolve, reject) => {
API.updatePayroll(params).then(res => {
- if(res.status) {
+ if (res.status) {
message.success("保存成功");
this.getPayrollTemplateList();
resolve();
- } else {
- message.error(res.errormsg || "保存失败")
- reject()
+ } else {
+ message.error(res.errormsg || "保存失败");
+ reject();
}
- })
- })
- }
+ });
+ });
+ };
//工资单-获取薪资账套下拉列表
@action
getPayrollTemplateLedgerList = () => {
return new Promise((resolve, reject) => {
API.getPayrollTemplateLedgerList().then(res => {
- if(res.status) {
+ if (res.status) {
this.payrollTemplateLedgerList = res.data.map(item => {
- let result = {}
+ let result = {};
result.showname = item.content;
result.selected = false;
- result.key = item.id
+ result.key = item.id;
return result;
- })
- resolve(this.payrollTemplateLedgerList)
+ });
+ resolve(this.payrollTemplateLedgerList);
} else {
message.error(res.errormsg || "获取失败");
- reject()
+ reject();
}
- })
- })
- }
+ });
+ });
+ };
// 工资单模板-工资单模板默认使用
@action
changePayrollDefaultUse(id = "") {
- if(id == "") {
+ if (id == "") {
message.warning("id必填");
- return
+ return;
}
let params = {
id
- }
+ };
return new Promise((resolve, reject) => {
API.changePayrollDefaultUse(params).then(res => {
- if(res.status) {
+ if (res.status) {
message.success("设置成功");
- resolve()
+ resolve();
} else {
- message.success(res.errormsg || "设置失败")
- reject()
+ message.success(res.errormsg || "设置失败");
+ reject();
}
- })
- })
+ });
+ });
}
// 工资单模板-复制工资单模板
@action
duplicatePayroll = (id, name) => {
let params = {
- id, name
- }
+ id,
+ name
+ };
return new Promise((resolve, reject) => {
API.duplicatePayroll(params).then(res => {
- if(res.status) {
- message.success("复制成功")
- this.getPayrollTemplateList()
- resolve()
+ if (res.status) {
+ message.success("复制成功");
+ this.getPayrollTemplateList();
+ resolve();
} else {
- message.error(res.errormsg || "复制失败")
+ message.error(res.errormsg || "复制失败");
reject();
}
- })
- })
- }
+ });
+ });
+ };
// 工资单模板-删除工资单模板
@action
- deletePayroll = (ids) => {
+ deletePayroll = ids => {
API.deletePayroll(ids).then(res => {
- if(res.status) {
+ if (res.status) {
message.success("删除成功");
- this.getPayrollTemplateList()
+ this.getPayrollTemplateList();
} else {
message.error(res.errormsg || "删除失败");
}
- })
- }
+ });
+ };
// 工资单-工资单发放列表
@action
- getPayrollList = (parmas = {salaryYearMonth: []}) => {
- this.loading = true
+ getPayrollList = (parmas = { salaryYearMonth: [] }) => {
+ this.loading = true;
API.getPayrollList(parmas).then(res => {
- if(res.status) {
- this.salarySendDataSource = res.data.datas
- this.salarySendTableStore.getDatas(res.data.dataKey.datas)
- this.pageInfo = res.data.pageInfo
+ if (res.status) {
+ this.salarySendDataSource = res.data.datas;
+ this.salarySendTableStore.getDatas(res.data.dataKey.datas);
+ this.pageInfo = res.data.pageInfo;
} else {
message.error(res.errormsg || "获取失败");
}
- this.loading = false
- })
- }
-
+ this.loading = false;
+ });
+ };
+
// 工资单发放-工资单发放基本信息
@action
- getPayrollInfo = (id) => {
- API.getPayrollInfo({id}).then(res => {
- if(res.status) {
- this.salarySendDetailBaseInfo = res.data
+ getPayrollInfo = id => {
+ API.getPayrollInfo({ id }).then(res => {
+ if (res.status) {
+ this.salarySendDetailBaseInfo = res.data;
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
// 工资单发放-工资单发放信息列表
@action
getInfoList = (params = {}) => {
let form = this.grantListConditionForm.getFormParams();
- params = {...form, ...params}
+ params = { ...form, ...params };
API.getInfoList(params).then(res => {
- if(res.status) {
- this.salaryGrantTableStore.getDatas(res.data.dataKey.datas)
- this.salaryGrantDataSource = res.data.datas
- this.salaryGrantPageInfo = res.data.pageInfo
+ if (res.status) {
+ this.salaryGrantTableStore = res.data.columns;
+ this.salaryGrantDataSource = res.data.list;
+ this.salaryGrantPageInfo = {
+ total: res.data.total,
+ pageNum: res.data.pageNum
+ };
+ this.getPayrollInfo(params.salarySendId);
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
// 工资单-工资单发放详情列表
@action
- getPayrollDetailList = (params) => {
- let form = this.detailListConditionForm.getFormParams() || {}
- params = {...form, ...params}
+ getPayrollDetailList = params => {
+ let form = this.detailListConditionForm.getFormParams() || {};
+ params = { ...form, ...params };
API.getPayrollDetailList(params).then(res => {
- if(res.status) {
- this.salarySendDetailTableStore.getDatas(res.data.dataKey.datas)
- this.salarySendDetailDataSource = res.data.datas
- this.salarySendDetailPageInfo = res.data.pageInfo
+ if (res.status) {
+ this.salarySendDetailTableStore.getDatas(res.data.dataKey.datas);
+ this.salarySendDetailDataSource = res.data.datas;
+ this.salarySendDetailPageInfo = res.data.pageInfo;
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
-
+ });
+ };
// 工资单详情页 - 获得高级搜索表单数据
@action
getPayrollDetailSa = (params = {}) => {
API.getPayrollDetailSa(params).then(res => {
- if (res.status) { // 接口请求成功/失败处理
+ if (res.status) {
+ // 接口请求成功/失败处理
let condition = removePropertyCondition(res.data.condition);
- this.detailListCondition = condition
+ this.detailListCondition = condition;
this.detailListConditionForm.initFormFields(condition); // 渲染高级搜索form表单
} else {
- message.error(res.errormsg || '接口调用失败!')
+ message.error(res.errormsg || "接口调用失败!");
}
});
- }
+ };
// 工资单发放-导出-工资单发放详情列表
@action
exportDetailList = (params = {}) => {
- API.exportDetailList(params)
- }
+ API.exportDetailList(params);
+ };
// 工资单-获取工资单发放高级搜索
@action
getPaySa = (params = {}) => {
API.getPaySa(params).then(res => {
- if(res.status) {
- let condition = removePropertyCondition(res.data.condition)
+ if (res.status) {
+ let condition = removePropertyCondition(res.data.condition);
this.grantListCondition = condition;
- this.grantListConditionForm.initFormFields(condition);
+ this.grantListConditionForm.initFormFields(condition);
} else {
- message.error(res.errormsg || "接口调用失败")
+ message.error(res.errormsg || "接口调用失败");
}
- })
- }
+ });
+ };
// 工资单发放-工资单批量发放信息列表
@action
batchSendInfoList = (params = {}) => {
API.batchSendInfoList(params).then(res => {
- if(res.status) {
- let datas = res.data.datas || [];
- datas.map(item => {
- item.key = item.id
- })
- this.canGrantDataSource = datas
+ if (res.status) {
+ this.canGrantDataSource = res.data.list;
this.canGrantColumns = res.data.columns;
- this.canGrantPageInfo = res.data.pageInfo
- // alert("this.canGrantColumns:" + JSON.stringify(this.canGrantColumns))
+ this.canGrantPageInfo = {
+ total: res.data.total,
+ pageNum: res.data.pageNum
+ };
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
// 工资单发放-工资单批量撤回信息列表
@action
batchWithdrawInfoList = (params = {}) => {
API.batchWithdrawInfoList(params).then(res => {
- if(res.status) {
- let datas = res.data.datas || [];
+ if (res.status) {
+ let datas = res.data.list || [];
datas.map(item => {
- item.key = item.id
- })
- this.canWithdrawDataSource = datas
- this.canWidthdrawColumns = res.data.columns
- this.canWithdrawPageInfo = res.data.pageInfo
+ item.key = item.id;
+ });
+ this.canWithdrawDataSource = datas;
+ this.canWidthdrawColumns = res.data.columns;
+ this.canWithdrawPageInfo = {
+ total: res.data.total,
+ pageNum: res.data.pageNum
+ };
} else {
message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
//工资单-工资单发放
@action
grantPayroll = (params = {}) => {
return new Promise((resolve, reject) => {
API.grantPayroll(params).then(res => {
- if(res.status) {
+ if (res.status) {
message.success("发送成功");
resolve();
} else {
- message.error(res.errormsg || "发送失败")
+ message.error(res.errormsg || "发送失败");
reject();
}
- })
- })
- }
+ });
+ });
+ };
// 工资单-工资单撤回
@action
withdrawPayroll = (params = {}) => {
return new Promise((resolve, reject) => {
API.withdrawPayroll(params).then(res => {
- if(res.status) {
+ if (res.status) {
message.success("撤回成功");
- resolve()
+ resolve();
} else {
- message.error(res.errormsg || "撤回失败")
+ message.error(res.errormsg || "撤回失败");
reject();
}
- })
- })
- }
-
-
-}
\ No newline at end of file
+ });
+ });
+ };
+}
From 9a6344dae14340890b5cfdc763cc7a4e3790d02e Mon Sep 17 00:00:00 2001
From: liyongshun <971387674@qq.com>
Date: Thu, 23 Jun 2022 16:20:49 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/calculateDetail/salaryDetail.js | 5 +-
.../attendance/editSlideContent.js | 157 +++++++++++-------
.../pages/dataAcquisition/attendance/index.js | 11 +-
.../pages/dataAcquisition/cumDeduct/index.js | 3 +-
.../dataAcquisition/cumDeduct/index.less | 12 +-
.../dataAcquisition/cumSituation/index.js | 1 +
.../dataAcquisition/otherDeduct/index.js | 1 +
pc4mobx/hrmSalary/pages/ledger/index.js | 1 +
.../pages/payroll/payrollDetail/index.js | 13 +-
.../standingBook/index.js | 9 +-
pc4mobx/hrmSalary/pages/taxAgent/index.js | 1 +
11 files changed, 141 insertions(+), 73 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
index 858e2d90..390841ad 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
@@ -13,7 +13,7 @@ import { inject, observer } from 'mobx-react';
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
-@inject('calculateStore')
+@inject('calculateStore', 'taxAgentStore')
@observer
export default class SalaryDetail extends React.Component {
constructor(props) {
@@ -128,7 +128,7 @@ export default class SalaryDetail extends React.Component {
render() {
const { slideVisiable } = this.state;
- const { calculateStore } = this.props;
+ const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props;
const { acctResultListDateSource, acctResultListColumns, baseSalarySobCycle, acctResultListPageInfo, loading } = calculateStore
return (
@@ -181,6 +181,7 @@ export default class SalaryDetail extends React.Component {
this.handleEditSlideSave()}
/>
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/editSlideContent.js
index 8fb10562..95bb437e 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/editSlideContent.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/editSlideContent.js
@@ -1,72 +1,115 @@
-import React from 'react';
-import { Row, Col, Table, DatePicker } from "antd"
-import { inject, observer } from 'mobx-react';
-import { WeaInput, WeaTextarea, WeaSearchGroup, WeaSelect, WeaCheckbox, WeaTable } from "ecCom";
-import { slideColumns, slideDataSource, columns } from './columns';
-import "./editSlideContent.less"
+import React from "react";
+import { Row, Col, Table, DatePicker } from "antd";
+import { inject, observer } from "mobx-react";
+import {
+ WeaInput,
+ WeaTextarea,
+ WeaSearchGroup,
+ WeaSelect,
+ WeaCheckbox,
+ WeaTable
+} from "ecCom";
+import { slideColumns, slideDataSource, columns } from "./columns";
+import "./editSlideContent.less";
// import { WeaTableNew } from "comsMobx"
// const WeaTable = WeaTableNew.WeaTable;
-import moment from 'moment'
+import moment from "moment";
const { MonthPicker } = DatePicker;
-
let emptyItem = {
- incomeLowerLimit: "0.00",
- incomeUpperLimit: "0.00",
- dutyFreeValue: "0.00",
- dutyFreeRate: "0.00",
- taxableIncomeLl: "0.00",
- taxableIncomeUl: "0.00",
- taxRate: "0.00",
- taxDeduction: "0.00"
-}
+ incomeLowerLimit: "0.00",
+ incomeUpperLimit: "0.00",
+ dutyFreeValue: "0.00",
+ dutyFreeRate: "0.00",
+ taxableIncomeLl: "0.00",
+ taxableIncomeUl: "0.00",
+ taxRate: "0.00",
+ taxDeduction: "0.00"
+};
-@inject('attendanceStore')
+@inject("attendanceStore")
@observer
export default class EditSlideContent extends React.Component {
+ constructor(props) {
+ super(props);
+ }
- constructor(props) {
- super(props);
- }
+ componentWillMount() {
+ // 初始化渲染页面
+ const { attendanceStore: { viewAttendQuote } } = this.props;
+ viewAttendQuote({ attendQuoteId: this.props.id });
+ }
- componentWillMount() { // 初始化渲染页面
- const {attendanceStore: {viewAttendQuote}} = this.props;
- viewAttendQuote({attendQuoteId: this.props.id})
- }
+ getColumns(columns) {
+ let result = [...columns];
+ return result.filter(item => item.hide == "false");
+ }
- getColumns(columns) {
- let result = [...columns]
- return result.filter(item => item.hide == "false")
- }
+ getScrollWidth() {
+ const { attendanceStore } = this.props;
+ const { attendQuoteDetailTableStore } = attendanceStore;
+ return (
+ this.getColumns(
+ attendQuoteDetailTableStore.columns
+ ? attendQuoteDetailTableStore.columns
+ : []
+ ).length * 150
+ );
+ }
- getScrollWidth() {
- const { attendanceStore } = this.props;
- const { attendQuoteDetailTableStore} = attendanceStore;
- return this.getColumns(attendQuoteDetailTableStore.columns ? attendQuoteDetailTableStore.columns : []).length * 150
- }
+ render() {
+ const {
+ attendanceStore,
+ attendanceStore: { viewAttendQuote }
+ } = this.props;
+ const {
+ attendQuoteDetailPageInfo,
+ attendQuoteDetailTableStore
+ } = attendanceStore;
-
- render() {
- const { attendanceStore } = this.props;
- const { attendQuoteDetailPageInfo, attendQuoteDetailTableStore} = attendanceStore;
- return (
-
-
- {
- this.props.salaryYearMonth != "" &&
-
考勤周期: {this.props.salaryYearMonth}
- }
-
-
-
-
-
- )
- }
-}
\ No newline at end of file
+ const pagination = {
+ total: attendQuoteDetailPageInfo.total,
+ showTotal: total => `共 ${total} 条`,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ viewAttendQuote({ attendQuoteId: this.props.id, current, pageSize });
+ },
+ onChange: current => {
+ viewAttendQuote({
+ attendQuoteId: this.props.id,
+ current,
+ pageSize: attendQuoteDetailPageInfo.pageSize
+ });
+ }
+ };
+ return (
+
+
+ {this.props.salaryYearMonth != "" &&
+
+ 考勤周期: {this.props.salaryYearMonth}
+
}
+
+
+
+
+
+ );
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
index e6e3927b..40c9dca3 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
@@ -223,6 +223,11 @@ export default class Attendance extends React.Component {
viewAttendQuote(request)
}
+ handleExportAttendQuote= ()=>{
+ const url= `${window.location.origin}/api/bs/hrmsalary/attendQuote/export?attendQuoteId=${this.recordId}`
+ window.open(url, '_self');
+ }
+
render() {
const { attendanceStore, taxAgentStore: {showOperateBtn} } = this.props;
const { modalParam } = this.state;
@@ -354,9 +359,11 @@ export default class Attendance extends React.Component {
{
showOperateBtn &&
-
导出
+
+ //
导出全部
}
{this.setState({searchValue: v})}}
onSearch={(v) => {this.handleSearch({keyword: v})}}
@@ -394,7 +401,7 @@ export default class Attendance extends React.Component {
const menu = (
);
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index 40af681a..94b7c438 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -429,6 +429,7 @@ export default class CumDeduct extends React.Component {
const pagination = {
total: pageObj.total,
showTotal: (total) => `共 ${total} 条`,
+ pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
onShowSizeChange(current, pageSize) {
setPageObj({ ...pageObj, current, pageSize });
@@ -487,7 +488,7 @@ export default class CumDeduct extends React.Component {
),
};
} else {
- return { ...item };
+ return { ...item, width: 150 };
}
});
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less
index ef51e77f..ca63e917 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less
@@ -43,5 +43,15 @@
text-decoration: none;
}
}
+}
-}
\ No newline at end of file
+.wea-new-table {
+ .ant-table-tbody {
+ tr {
+ td {
+ height: 41px !important;
+ border-bottom: 1px solid #e2e2e2 !important;
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
index 06d09be7..8d0a954f 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
@@ -436,6 +436,7 @@ export default class CumSituation extends React.Component {
total: pageObj.total,
showTotal: (total) => `共 ${total} 条`,
showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
setPageObj({ ...pageObj, current, pageSize });
getTableDatas({
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index 9d7b5a15..e7bf3332 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -432,6 +432,7 @@ export default class OtherDeduct extends React.Component {
total: pageObj.total,
showTotal: (total) => `共 ${total} 条`,
showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
setPageObj({ ...pageObj, current, pageSize });
getTableDatas({
diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js
index 26e5104f..eb1a61b1 100644
--- a/pc4mobx/hrmSalary/pages/ledger/index.js
+++ b/pc4mobx/hrmSalary/pages/ledger/index.js
@@ -363,6 +363,7 @@ export default class Ledger extends React.Component {
total: pageObj.total,
showTotal: (total) => `共 ${total} 条`,
showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
setPageObj({ ...pageObj, current, pageSize });
getTableDatas({ current, pageSize, name: this.state.searchValue });
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js
index be353c75..e64933e2 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js
@@ -92,10 +92,12 @@ export default class PayrollDetail extends React.Component {
}
// 导出全部
- handleExportAll() {
- const { payrollStore } = this.props;
- const { exportDetailList } = payrollStore
- exportDetailList({salarySendId: this.state.currentId})
+ handleExportAll=()=> {
+ // const { payrollStore } = this.props;
+ // const { exportDetailList } = payrollStore
+ // exportDetailList({salarySendId: this.state.currentId})
+ const url= `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${this.state.currentId}`
+ window.open(url, '_self');
}
getSearchsAdQuick() {
@@ -112,7 +114,8 @@ export default class PayrollDetail extends React.Component {
);
return (
- {this.handleExportAll()}}>导出全部
+ // {this.handleExportAll()}}>导出全部
+
)
// return ()
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js
index f8580d31..3862e5a1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js
@@ -62,7 +62,6 @@ export default class StandingBook extends React.Component {
const { taxAgentStore: {getPermission}, standingBookStore: {getAdminTaxAgentList}} = this.props
getPermission().then(({status, data}) => {
if(status) {
- console.log("data:", data);
this.setState({adminData : data})
if(data.isAdminEnable) {
getAdminTaxAgentList().then((data) => {
@@ -328,7 +327,7 @@ export default class StandingBook extends React.Component {
}
render() {
- const { standingBookStore } = this.props;
+ const { standingBookStore, taxAgentStore: { showOperateBtn } } = this.props;
const {
inspectLoading,
loading,
@@ -353,7 +352,7 @@ export default class StandingBook extends React.Component {
return renderNoright();
}
- const rightBtns = (!this.state.adminData.isDefaultOpen || this.state.adminData.isDefaultOpen && this.state.adminData.isAdminEnable) ? [
+ const rightBtns = [
// 右键菜单
- ] : [];
+ ];
const rightMenu = [
// 右键菜单
{
@@ -428,7 +427,7 @@ export default class StandingBook extends React.Component {
title="社保福利台账" // 文字
icon={} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
- buttons={rightBtns}
+ buttons={showOperateBtn ? rightBtns : []}
// showDropIcon={true} // 是否显示下拉按钮
// dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
// dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js
index 85012f8e..c7c34293 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/index.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js
@@ -305,6 +305,7 @@ export default class TaxAgent extends React.Component {
total: pageObj.total,
showTotal: total => `共 ${total} 条`,
showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
doInit({ current, pageSize });
},