diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js
index 4b008d2b..cbc91000 100644
--- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js
+++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js
@@ -36,8 +36,8 @@ class FieldSlide extends Component {
componentDidMount() {
const { taxAgentStore } = this.props;
this.commonEnumList();
- const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
- getTaxAgentSelectListAsAdmin();
+ const { fetchTaxAgentOption } = taxAgentStore;
+ fetchTaxAgentOption();
}
componentWillReceiveProps(nextProps, nextContext) {
@@ -171,7 +171,7 @@ class FieldSlide extends Component {
};
render() {
- const { title, visible, editId, taxAgentStore: { showOperateBtn, taxAgentAdminOption }, onCancel } = this.props;
+ const { title, visible, editId, taxAgentStore: { taxAgentOption }, onCancel } = this.props;
const {
loading,
name,
@@ -199,7 +199,7 @@ class FieldSlide extends Component {
subtitle={title}
tabs={[]}
loading={loading}
- showOperateBtn={showOperateBtn}
+ showOperateBtn={true}
editable={true}
onSave={this.saveFieldInfo}
/>
@@ -249,7 +249,7 @@ class FieldSlide extends Component {
multiple
viewAttr={3}
value={taxAgentIds}
- options={taxAgentAdminOption}
+ options={taxAgentOption}
onChange={value => this.handleChangeFields("taxAgentIds", value)}
/>
diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js
index 47ec7569..42dd5199 100644
--- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js
+++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js
@@ -7,7 +7,7 @@
import React, { Component } from "react";
import { WeaTable } from "ecCom";
import { inject, observer } from "mobx-react";
-import { message, Modal, Switch } from "antd";
+import { Switch } from "antd";
import { salaryFieldList } from "../../../apis/fieldManage";
@inject("taxAgentStore")
@@ -70,11 +70,11 @@ class FieldTable extends Component {
item.render = (text, record) => {
return
;
};
} else {
diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/index.js b/pc4mobx/hrmSalary/pages/fieldManagement/index.js
index be149e71..04b177b1 100644
--- a/pc4mobx/hrmSalary/pages/fieldManagement/index.js
+++ b/pc4mobx/hrmSalary/pages/fieldManagement/index.js
@@ -42,7 +42,7 @@ class FieldManagement extends Component {
deleteSalaryField(filedIds).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
- this.setState({ doSearch: !this.state.doSearch })
+ this.setState({ doSearch: !this.state.doSearch });
} else {
message.error(errormsg || "删除失败");
}
@@ -83,7 +83,8 @@ class FieldManagement extends Component {
icon={}
iconBgcolor="#F14A2D"
showDropIcon={false}
- buttons={showOperateBtn ? btns : btns.slice(-1)}
+ // buttons={showOperateBtn ? btns : btns.slice(-1)}
+ buttons={btns}
>
{
if (status) {
- const { baseForm } = this.state;
this.setState({
- baseForm: _.map(baseForm, it => {
+ baseForm: _.map(baseSettingFormItem, it => {
if (it.key === "taxAgentId") {
return {
...it,
@@ -109,11 +111,11 @@ class LedgerBaseSetting extends Component {
}
return { ...it };
})
- });
+ }, () => this.commonEenumList());
}
});
};
- commonEenumList= ()=>{
+ commonEenumList = () => {
const payload = {
enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum"
};
@@ -133,7 +135,7 @@ class LedgerBaseSetting extends Component {
});
}
});
- }
+ };
handleChangeField = (key, value) => {
const { onSaveParams } = this.props;
const { settingBaseInfo } = this.state;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
index 153a05ec..65e3f32b 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
@@ -175,7 +175,6 @@ class LedgerSalaryItemNormal extends Component {
>
onDropCategoryItem(field, data)}
onHandleItemhide={(data) => onHandleItemhide(field, data)}
onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)}
@@ -216,7 +215,7 @@ const TitleNormalComp = (props) => {
name, onEditCategory, onDeleteCategory,
sortedIndex, dataSourceLen, uuid, onUpgo,
onDowngo, selectedRowKeys = [], onDeleteCategoryItems,
- onAddCategoryItems
+ onAddCategoryItems, items
} = props;
return
@@ -226,7 +225,7 @@ const TitleNormalComp = (props) => {
onEditCategory(name, uuid)}/>
}
{
- name !== "未分类" &&
+ name !== "未分类" && _.isEmpty(items) &&
onDeleteCategory(uuid)}/>
}
{
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 5ea4e38e..dc79d451 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -21,21 +21,39 @@ export default class MobilePayroll extends React.Component {
}
componentWillMount() {
+ const type = getQueryString("type");
this.id = getQueryString("id");
const { mySalaryStore: { init } } = this.props;
- init();
+ type !== "phone" && init(false);
this.getMySalaryBill(this.id);
}
- getMySalaryBill = (id) => {
+ getMySalaryBill = (salaryInfoId) => {
const { mySalaryStore: { getMySalaryBill } } = this.props;
- getMySalaryBill(id).then(result => {
+ const params = this.getUrlkey();
+ const payload = {
+ salaryInfoId,
+ ..._.omit(params, ["id", "_key", "type"])
+ };
+ getMySalaryBill(payload).then(result => {
this.setState({
mySalaryBillData: result
});
});
};
-
+ getUrlkey = () => {
+ let url = window.location.href;
+ let params = {},
+ arr = url.split("?");
+ if (arr.length <= 1)
+ return params;
+ arr = arr[1].split("&");
+ for (var i = 0, l = arr.length; i < l; i++) {
+ var a = arr[i].split("=");
+ params[a[0]] = a[1];
+ }
+ return params;
+ };
render() {
const { mySalaryBillData } = this.state;
@@ -48,29 +66,33 @@ export default class MobilePayroll extends React.Component {
overflowY: "hidden",
paddingBottom: "20px"
}}>
-
-
-
-
- {
- type === "phone" ?
-
:
+ {
+ type === "phone" ?
+
+ :
+
+
-
+
+
+
+ }
);
}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js
index 4276155c..07fa0ae5 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js
@@ -51,8 +51,8 @@ export default class SalaryItem extends React.Component {
componentWillMount() { // 初始化渲染页面
const { salaryItemStore: { getTableDatas }, salaryFileStore, taxAgentStore } = this.props;
const { commonEnumList } = salaryFileStore;
- const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
- getTaxAgentSelectListAsAdmin();
+ const { fetchTaxAgentOption } = taxAgentStore;
+ fetchTaxAgentOption();
commonEnumList("user", { enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" });
getTableDatas({}).then(res => {
this.setState({
@@ -132,7 +132,7 @@ export default class SalaryItem extends React.Component {
}
});
{
- showOperateBtn &&
+ // showOperateBtn &&
columns.push({
title: "",
key: "moreOperate",
@@ -142,7 +142,7 @@ export default class SalaryItem extends React.Component {
return (
- {
+ {
this.handleDeleteItem(record);
}}>删除
@@ -206,11 +206,11 @@ export default class SalaryItem extends React.Component {
const {
salaryItemStore,
salaryFileStore,
- taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentAdminOption }
+ taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentOption }
} = this.props;
const { userStatusList } = salaryFileStore;
const { selectedRowKeys } = this.state;
- const { loading, deleteItemRequest, getTableDatas, initRequest } = salaryItemStore;
+ const { loading, deleteItemRequest, getTableDatas } = salaryItemStore;
const {
tableDataSource,
tableColumns,
@@ -252,7 +252,7 @@ export default class SalaryItem extends React.Component {
新增
}
{
- showOperateBtn &&
+ (showOperateBtn || showSalaryItemBtn) &&