-
{children}
+ {children}
{/*导入弹框*/}
- }
+ title={this.renderTitle()}
content={slideChildren}
onClose={onClose}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
index e693c017..ef7f4489 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
@@ -1,70 +1,3 @@
-export const columns = [
- {
- title: "姓名",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "部门",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "手机号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "工号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "证件号码",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "入职日期",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计子女教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计继续教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房贷款利息",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房租金",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计赡养老人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "操作",
- dataIndex: "title",
- key: "title"
- }
-];
export const dataCollectCondition = [
{
items: [
@@ -74,7 +7,7 @@ export const dataCollectCondition = [
fieldcol: 12,
label: "税款所属期",
lanId: 542240,
- labelcol: 4,
+ labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
@@ -84,7 +17,7 @@ export const dataCollectCondition = [
domkey: ["taxAgentId"],
fieldcol: 12,
label: "个税扣缴义务人",
- labelcol: 4,
+ labelcol: 8,
lanId: 537996,
value: "",
options: [],
@@ -118,7 +51,7 @@ export const dataCollectCondition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
@@ -129,9 +62,22 @@ export const dataCollectCondition = [
},
{
items: [
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["freeIncome"],
+ dataType: "freeIncome",
+ fieldcol: 14,
+ label: "免税收入",
+ labelcol: 8,
+ value: "",
+ precision: 2,
+ viewAttr: 2,
+ extraDom: null
+ },
{
conditionType: "INPUTNUMBER",
domkey: ["businessHealthyInsurance"],
+ dataType: "healthInsurance",
fieldcol: 14,
label: "商业健康保险",
labelcol: 8,
@@ -142,6 +88,7 @@ export const dataCollectCondition = [
{
conditionType: "INPUTNUMBER",
domkey: ["taxDelayEndowmentInsurance"],
+ dataType: "endowmentInsurance",
fieldcol: 14,
label: "税延养老保险",
labelcol: 8,
@@ -149,19 +96,10 @@ export const dataCollectCondition = [
precision: 2,
viewAttr: 2
},
- {
- conditionType: "INPUTNUMBER",
- domkey: ["otherDeduction"],
- fieldcol: 14,
- label: "其他",
- labelcol: 8,
- value: "",
- precision: 2,
- viewAttr: 2
- },
{
conditionType: "INPUTNUMBER",
domkey: ["deductionAllowedDonation"],
+ dataType: "grantDonation",
fieldcol: 14,
label: "准予扣除的捐赠额",
labelcol: 8,
@@ -169,9 +107,32 @@ export const dataCollectCondition = [
precision: 2,
viewAttr: 2
},
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["derateDeduction"],
+ dataType: "derateDeduction",
+ fieldcol: 14,
+ label: "减免税额",
+ labelcol: 8,
+ value: "",
+ precision: 2,
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["otherDeduction"],
+ dataType: "otherDerateDeduction",
+ fieldcol: 14,
+ label: "其他",
+ labelcol: 8,
+ value: "",
+ precision: 2,
+ viewAttr: 2
+ },
{
conditionType: "INPUTNUMBER",
domkey: ["privatePension"],
+ dataType: "personalPension",
fieldcol: 14,
label: "个人养老金",
labelcol: 8,
@@ -185,8 +146,493 @@ export const dataCollectCondition = [
col: 2
}
];
-
-
-
-
-
+export const taxDetailSettingsConditions = {
+ freeIncome: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["freeItem"],
+ fieldcol: 14,
+ label: "免税事项",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["freeProperty"],
+ fieldcol: 14,
+ label: "免税性质",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["freeAmount"],
+ fieldcol: 14,
+ label: "免税金额",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }],
+ healthInsurance: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["identificationNumber"],
+ fieldcol: 14,
+ label: "税优识别码",
+ lanId: 111,
+ helpfulTip: "为确保税收优惠商业健康保险保单的唯一性、真实性和有效性,由商业健康保险信息平台按照“一人一单一码”的原则进行核发,填写个人保单凭证上打印的数字识别码。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "DATEPICKER",
+ domkey: ["effectiveDate"],
+ fieldcol: 14,
+ label: "保单生效日期",
+ lanId: 111,
+ helpfulTip: "该商业健康保险保单生效的日期。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["yearPremium"],
+ fieldcol: 14,
+ label: "年度保费",
+ lanId: 111,
+ helpfulTip: "商业健康保险保单年度内该保单的总保费。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["monthPremium"],
+ fieldcol: 14,
+ label: "月度保费",
+ lanId: 111,
+ helpfulTip: "月缴费的保单填写每月所缴保费,按年一次性缴费的保单填写年度保费除以12后的金额。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["currentDeduction"],
+ fieldcol: 14,
+ label: "本期扣除金额",
+ lanId: 111,
+ helpfulTip: "根据国家有关政策对个人购买或单位统一购买符合规定的商业健康保险产品的支出,扣除限额为2400。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }],
+ endowmentInsurance: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "MONTHPICKER",
+ domkey: ["deductionMonth"],
+ fieldcol: 14,
+ label: "申报扣除月份",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["accountNumber"],
+ fieldcol: 14,
+ label: "税延养老账户编号",
+ lanId: 111,
+ helpfulTip: "按照中国保险信息技术管理有限责任公司相关信息平台出具的《个人税收递延型商业养老保险扣除凭证》载明的对应项目填写。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["checkCode"],
+ fieldcol: 14,
+ label: "报税校验码",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["yearPremium"],
+ fieldcol: 14,
+ label: "年度保费",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["monthPremium"],
+ fieldcol: 14,
+ label: "月度保费",
+ lanId: 111,
+ helpfulTip: "取得工资薪金所得、连续性劳务报酬所得(特定行业除外)的个人,填写《个人税收递延型商业养老保险扣除凭证》载明的月度保费金额,一次性缴费的保单填写月平均保费金额。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["currentDeduction"],
+ fieldcol: 14,
+ label: "本期扣除金额",
+ lanId: 111,
+ helpfulTip: "取得工资薪金所得的个人,应按税延养老保险扣除凭证记载的当月金额和扣除限额孰低的方法计算可扣除额。扣除限额按照申报扣除当月的工资薪金的 6%和1000元孰低的办法确定。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }],
+ grantDonation: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["recipientName"],
+ fieldcol: 14,
+ label: "受赠单位名称",
+ lanId: 111,
+ helpfulTip: "受赠单位名称填写受赠单位的法定名称全称。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["taxCode"],
+ fieldcol: 14,
+ label: "受赠单位纳税人识别号",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["donationNumber"],
+ fieldcol: 14,
+ label: "捐赠凭证号",
+ lanId: 111,
+ helpfulTip: "捐赠凭证",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "DATEPICKER",
+ domkey: ["donateDate"],
+ fieldcol: 14,
+ label: "捐赠日期",
+ lanId: 111,
+ helpfulTip: "填写个人发生的公益慈善事业捐赠的具体日期。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["donateAmount"],
+ fieldcol: 14,
+ label: "捐赠金额",
+ lanId: 111,
+ helpfulTip: "填写个人发生的公益慈善事业捐赠的具体金额。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["deductionProportion"],
+ fieldcol: 14,
+ label: "扣除比例",
+ lanId: 111,
+ helpfulTip: "填写税法规定的可以公益慈善事业捐赠支出税前扣除比例。如:0.3(30%)或者1(100%),请注意,必须是小数形式的百分比。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["actualDeduction"],
+ fieldcol: 14,
+ label: "实际扣除金额",
+ lanId: 111,
+ helpfulTip: "填写个人取得“扣除所得项目”对应收入办理扣缴申报或者自行申报时,实际扣除的公益慈善事业捐赠支出金额。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }],
+ derateDeduction: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["derateItem"],
+ fieldcol: 14,
+ label: "减免事项",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["derateProperty"],
+ fieldcol: 14,
+ label: "减免性质",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["derateAmount"],
+ fieldcol: 14,
+ label: "减免金额",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }],
+ otherDerateDeduction: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["otherDeduction"],
+ fieldcol: 14,
+ label: "减免税额",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["remark"],
+ fieldcol: 14,
+ label: "备注",
+ lanId: 111,
+ helpfulTip: "根据政策要求,一定要在备注中写明具体扣除项目名称,备注不超过20个字符。",
+ helpfulTipLanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }],
+ personalPension: [{
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["incomeCategory"],
+ fieldcol: 14,
+ label: "所得项目",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["voucherTypeName"],
+ fieldcol: 14,
+ label: "凭证类型",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["voucherNo"],
+ fieldcol: 14,
+ label: "凭证编码",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["payAmount"],
+ fieldcol: 14,
+ label: "缴费金额",
+ lanId: 111,
+ labelcol: 8,
+ value: "",
+ rules: "required",
+ precision: 2,
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true,
+ col: 1
+ }]
+};
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js
new file mode 100644
index 00000000..3fd2e1e4
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js
@@ -0,0 +1,181 @@
+/*
+ * 数据采集-其他免税扣除
+ * 明细设置弹框
+ * @Author: 黎永顺
+ * @Date: 2024/12/24
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaHelpfulTip, WeaLocaleProvider, WeaTools } from "ecCom";
+import { WeaSwitch } from "comsMobx";
+import FormInfo from "../../../components/FormInfo";
+import { taxDetailSettingsConditions } from "./columns";
+import { Button, message } from "antd";
+import { getDomkes, toDecimal_n } from "../../../util";
+import { postFetch } from "../../../util/request";
+import { getIncomeCategoryList } from "../../../apis/ledger"; //获取薪资类型
+import cs from "classnames";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("otherDeductStore")
+@observer
+class DetailSettingsDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false, conditions: []
+ };
+ }
+
+ async componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ const { data } = await getIncomeCategoryList();
+ this.setState({
+ conditions: _.map(taxDetailSettingsConditions[nextProps.dataType], item => ({
+ ...item, items: _.map(item.items, o => ({
+ ...o, options: getKey(o) === "voucherTypeName" ?
+ [{ key: "MONTH", showname: "月度" }, { key: "YEAR", showname: "年度" }] :
+ getKey(o) === "incomeCategory" ? _.map(data, it => ({
+ key: it.value.toString(),
+ showname:
+ {it.defaultLabel}
+
+ {it.reportTypeName}
+
+
+ })) : []
+ }))
+ }))
+ }, () => {
+ this.props.otherDeductStore.settingsForm.initFormFields(this.state.conditions);
+ if (nextProps.id) _.map(getDomkes(this.state.conditions), domkey => {
+ this.props.otherDeductStore.settingsForm.updateFields({ [domkey]: { value: nextProps.record[domkey].toString() } });
+ });
+ });
+ } else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ this.props.otherDeductStore.initSettingsForm();
+ }
+ }
+
+ save = () => {
+ const { otherDeductStore: { settingsForm }, mainId, id, dataType } = this.props;
+ settingsForm.validateForm().then(f => {
+ if (f.isValid) {
+ let { deductionMonth, incomeCategory, ...payload } = settingsForm.getFormParams();
+ deductionMonth && (payload = { ...payload, deductionMonth: deductionMonth + "-01" });
+ this.setState({ loading: true });
+ postFetch(`/api/bs/hrmsalary/otherDeduction/save${_.upperFirst(dataType)}`, {
+ ...payload, mainId, id,
+ incomeCategory: Number(incomeCategory)
+ }).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(111, "操作成功!"));
+ this.props.onCancel(this.props.onSuccess);
+ } else {
+ message.error(errormsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { otherDeductStore: { settingsForm } } = this.props, { loading, conditions } = this.state;
+ const itemRender = {
+ freeAmount: (field, textAreaProps, form, formParams) => {
+ return (
v && form.updateFields({ freeAmount: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ identificationNumber: (field, textAreaProps, form, formParams) => {
+ return ();
+ },
+ effectiveDate: (field, textAreaProps, form, formParams) => {
+ return ();
+ },
+ donateDate: (field, textAreaProps, form, formParams) => {
+ return ();
+ },
+ yearPremium: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ yearPremium: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ monthPremium: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ monthPremium: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ currentDeduction: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ currentDeduction: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ donateAmount: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ donateAmount: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ deductionProportion: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ deductionProportion: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ actualDeduction: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ actualDeduction: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ derateAmount: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ derateAmount: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ otherDeduction: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ otherDeduction: { value: toDecimal_n(v, 2) } })}/>);
+ },
+ payAmount: (field, textAreaProps, form, formParams) => {
+ return ( v && form.updateFields({ payAmount: { value: toDecimal_n(v, 2) } })}/>);
+ }
+ };
+ if (_.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 === 33) return null;
+ return (
+ (pre += cur.items.length), 0) * 47 + 33 }}
+ buttons={[
+ ,
+
+ ]}
+ >
+
+
+ );
+ }
+}
+
+export default DetailSettingsDialog;
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index e9e61438..b7785f38 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -29,6 +29,8 @@ import { dataCollectCondition } from "./columns";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url";
+import { getDomkes } from "../../../util";
+import TaxSetDialog from "./taxSetDialog";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -63,7 +65,8 @@ class Index extends Component {
exportPayloadUrl: "",
exportPayloadType: false,
advanceCondition: null,
- targetid: ""
+ targetid: "",
+ taxSetDialog: { visible: false, dataType: "", id: "" }
};
this.tableRef = null;
this.addItemRef = null;
@@ -293,7 +296,17 @@ class Index extends Component {
return {
...it, title: getLabel(83871, "数据采集"),
items: _.map(it.items, o => ({
- ...o, label: getLabel(o.lanId, o.label)
+ ...o, label: getLabel(o.lanId, o.label),
+ extraDom: !_.isEmpty(editId) &&
+ this.setState({
+ taxSetDialog: {
+ visible: true, dataType: o.dataType, id: editId.id,
+ label: getLabel(o.lanId, o.label)
+ }
+ })}>
+
+
}))
};
}
@@ -394,7 +407,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
- chidren: null,
+ children: null,
data: {}
}
});
@@ -407,6 +420,7 @@ class Index extends Component {
addForm.validateForm().then(f => {
if (f.isValid) {
const payload = {
+ ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
};
@@ -515,7 +529,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
- importPayload, exportPayloadType, targetid
+ importPayload, exportPayloadType, targetid, taxSetDialog
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
@@ -538,6 +552,8 @@ class Index extends Component {
onViewDetails={(record) => this.handleAddData("其他免税扣除记录", record)}
form={form}
/>
+ this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js
new file mode 100644
index 00000000..1848f4a9
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/taxSetDialog.js
@@ -0,0 +1,143 @@
+/*
+ * 其他免税扣除设置
+ *
+ * @Author: 黎永顺
+ * @Date: 2024/12/24
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
+import { message, Modal, Spin } from "antd";
+import { postFetch } from "../../../util/request";
+import DetailSettingsDialog from "./detailSettingsDialog";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class TaxSetDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
+ selectedRowKeys: [], detailSettingsDialog: { visible: false, dataType: "", mainId: "", id: "", record: {} }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ this.setState({
+ detailSettingsDialog: { ...this.state.detailSettingsDialog, dataType: nextProps.dataType, mainId: nextProps.id }
+ }, () => this.getList(nextProps));
+ } else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ this.setState({
+ dataSource: [],
+ columns: [],
+ loading: false,
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ selectedRowKeys: [],
+ detailSettingsDialog: { visible: false }
+ });
+ }
+ }
+
+ getList = (props) => {
+ const { id, dataType, viewParams = {} } = props || this.props, { pageInfo, detailSettingsDialog } = this.state;
+ this.setState({ loading: true });
+ postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, ...viewParams, id })
+ .then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
+ this.setState({
+ dataSource, pageInfo: { current, pageSize, total }, columns: _.map(columns, o => ({
+ ...o,
+ width: o.dataIndex === "operate" && 120,
+ render: (text, record) => o.dataIndex === "operate" ? () : ({text})
+ }))
+ });
+ }
+ });
+ };
+ handleDelete = (ids = []) => {
+ const { selectedRowKeys } = this.state, { dataType, id: mainId } = this.props;
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(388758, "确认要删除吗?"),
+ onOk: () => {
+ postFetch(`/api/bs/hrmsalary/otherDeduction/delete${_.upperFirst(dataType)}`, { ids, mainId })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(502230, "删除成功!"));
+ this.setState({ selectedRowKeys: _.difference(selectedRowKeys, ids) }, () => this.getList());
+ } else {
+ message.error(errormsg);
+ }
+ });
+ }
+ });
+ };
+
+ render() {
+ const { pageInfo, dataSource, loading, columns, selectedRowKeys, detailSettingsDialog } = this.state;
+ const { viewParams } = this.props;
+ const pagination = {
+ ...pageInfo,
+ showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
+ showQuickJumper: true,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({ pageInfo: { ...pageInfo, current: 1, pageSize } }, () => this.getList());
+ },
+ onChange: current => {
+ this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getList());
+ }
+ };
+ const rowSelection = {
+ selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
+ };
+ return ( this.taxSetRef = dom}
+ title={`${getLabel(111, "附表明细")}(${this.props.label})`}
+ style={{
+ width: "60vw", height: 600, minHeight: 200, minWidth: 380, maxHeight: "90%",
+ maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
+ }}>
+
+
+ {
+ _.isEmpty(viewParams) &&
+ this.setState({
+ detailSettingsDialog: { ...detailSettingsDialog, visible: true }
+ })}/>
+ {
+ if (_.isEmpty(selectedRowKeys)) {
+ message.warning(getLabel(111, "请选择要删除的数据!"));
+ return;
+ }
+ this.handleDelete(selectedRowKeys);
+ }}/>
+
+ }
+ o.dataIndex !== "operate") : columns}
+ dataSource={dataSource} pagination={pagination} bordered
+ rowSelection={rowSelection} loading={loading} rowKey="id"
+ scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 164 : 600 }}/>
+ this.setState({
+ detailSettingsDialog: { ...detailSettingsDialog, visible: false, id: "" }
+ }, () => callback && callback())} onSuccess={this.getList}/>
+
+
+ );
+ }
+}
+
+export default TaxSetDialog;
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
index 241efd93..1e009b70 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
@@ -7,7 +7,7 @@ export const condition = [
fieldcol: 12,
label: "个税扣缴义务人",
lanId: 537996,
- labelcol: 4,
+ labelcol: 8,
value: "",
options: [],
rules: "required|string",
@@ -40,7 +40,7 @@ export const condition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
index fe79d45f..5986baae 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
@@ -20,6 +20,7 @@ import { condition } from "./components/condition";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url";
+import { getDomkes } from "../../../util";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -332,7 +333,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
- chidren: null,
+ children: null,
data: {}
}
});
@@ -345,6 +346,7 @@ class Index extends Component {
addForm.validateForm().then(f => {
if (f.isValid) {
const payload = {
+ ..._.reduce(getDomkes(condition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
};
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
index 59f8f28d..d1dce632 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
@@ -12,6 +12,7 @@ import { getSearchs } from "../../../../util";
import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent";
import { saveDeclare, taxdeclarationGetRate } from "../../../../apis/declare";
import { declareConditions } from "./condition";
+import * as API from "../../../../apis/ruleconfig";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -31,7 +32,8 @@ class Index extends Component {
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initDeclareForm();
}
- getTaxAgentSelectListAsAdmin = (props) => {
+ getTaxAgentSelectListAsAdmin = async (props) => {
+ const { data: sysinfo } = await API.sysinfo();
const { declareStore: { declareForm } } = props;
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
if (status) {
@@ -44,6 +46,11 @@ class Index extends Component {
...o, options: _.map(data, g => ({ key: g.id, showname: g.content }))
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
};
+ } else if (getKey(o) === "salaryMonth") {
+ return {
+ ...o,
+ label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
+ };
}
return { ...o };
})
@@ -58,8 +65,11 @@ class Index extends Component {
if (f.isValid) {
const { salaryMonth, ...payload } = declareForm.getFormParams();
this.setState({ loading: true });
- saveDeclare({ ...payload, salaryMonth: salaryMonth + "-01" })
- .then(async ({ status, data, errormsg }) => {
+ saveDeclare({
+ ...payload, salaryMonth: salaryMonth + "-01",
+ taxCycle: `${salaryMonth}-01`,
+ salaryDate: `${salaryMonth}-01`
+ }).then(async ({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.destroy();
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
index f5627a0c..e85383ca 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
@@ -17,7 +17,7 @@ class Index extends Component {
return (
- {getLabel(543549, "薪资所属月:")}
+ {getLabel(111, "税款所属期:")}
this.props.onChange({ dateRange: v })}/>
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
index 142b53a7..aac92a3f 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
@@ -8,7 +8,7 @@ import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu, message, Modal, Tag } from "antd";
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
-import { sysConfCodeRule } from "../../../../apis/ruleconfig";
+import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
@@ -36,9 +36,9 @@ class Index extends Component {
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
});
};
- getDeclareList = (props) => {
- const { pageInfo } = this.state;
- const { queryParams } = props;
+ getDeclareList = async (props) => {
+ const { data: sysData } = await sysinfo();
+ const { pageInfo } = this.state, { queryParams } = props;
const { dateRange, ...extra } = queryParams;
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
@@ -47,7 +47,8 @@ class Index extends Component {
getDeclareList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
- const { columns, list: dataSource, pageNum, pageSize, total } = data;
+ let { columns, list: dataSource, pageNum, pageSize, total } = data;
+ sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(columns, o => {
diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
index cdfe5a73..22d1c5ea 100644
--- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
+++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
@@ -1,31 +1,35 @@
import React from "react";
-import CustomTab from "../../components/customTab";
import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { getQueryString } from "../../util/url";
+import { sysinfo } from "../../apis/ruleconfig";
import * as API from "../../apis/declare";
import { Button } from "antd";
-import UnifiedTable from "../../components/UnifiedTable";
import "./index.less";
+const { getLabel } = WeaLocaleProvider;
@inject("taxAgentStore")
@observer
export default class GenerateDeclarationDetail extends React.Component {
constructor(props) {
super(props);
this.state = {
- loading: false,
- dataSource: [],
- columns: [],
- pageInfo: { current: 1, pageSize: 10, total: 0 },
- declareInfo: {}
+ loading: false, dataSource: [], columns: [], declareInfo: {},
+ pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
};
}
- componentWillMount() {
+ componentDidMount() {
this.getDetailList();
this.getDeclareInfo();
+ this.getSysinfo();
}
+ getSysinfo = () => {
+ sysinfo().then(({ status, data: sysinfo }) => {
+ if (status) this.setState({ sysinfo });
+ });
+ };
getDetailList = () => {
const { pageInfo } = this.state;
const payload = {
@@ -37,31 +41,19 @@ export default class GenerateDeclarationDetail extends React.Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- dataSource,
- pageInfo: {
- ...pageInfo,
- current, pageSize, total
- },
+ dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => {
if (item.dataIndex === "username") {
return {
- ...item,
- render: (text, record) => {
- return
window.pointerXY(e)}
- title={text}
- >
- {text}
- ;
- }
+ ...item, width: 180,
+ render: (text, record) => (
window.pointerXY(e)}
+ title={text}>{text})
};
}
return {
- ...item,
- render: (text) => {
- return
{text};
- }
+ ...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100,
+ render: (text) => (
{text})
};
})
});
@@ -78,26 +70,20 @@ export default class GenerateDeclarationDetail extends React.Component {
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`;
window.open(url, "_self");
};
+ renderTitle = () => {
+ const { declareInfo, sysinfo } = this.state;
+ const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
+ return (
+ {title}:{declareInfo.salaryMonth}
+ {getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}
+ );
+ };
render() {
- const { declareInfo, loading, pageInfo, columns, dataSource } = this.state;
+ const { loading, pageInfo, columns, dataSource } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
-
- const renderRightOperation = () => {
- return (
-
-
-
- );
- };
- const renderLeftOperation = () => {
- return (
-
- 薪资所属月:{declareInfo.salaryMonth}
- 个税扣缴义务人:{declareInfo.taxAgentName}
-
- );
- };
+ const buttons = showOperateBtn ? [
] : [];
const pagination = {
...pageInfo,
showTotal: (total) => `共 ${total} 条`,
@@ -115,23 +101,12 @@ export default class GenerateDeclarationDetail extends React.Component {
}, () => this.getDetailList());
}
};
- return (
-
-
-
-
-
+ return (
} iconBgcolor="#F14A2D"
+ buttons={buttons}>
+
+
- );
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less
index 767de3dc..11e4bf8a 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.less
+++ b/pc4mobx/hrmSalary/pages/declare/index.less
@@ -1,11 +1,10 @@
-.generateDeclarationDetail {
- .tabWrapper {
- padding-left: 10px
- }
+.declare-detail-table-container {
+ height: 100%;
+ background: #f6f6f6;
+ padding: 8px 16px;
- .tableWrapper {
- height: calc(100vh - 48px);
- overflow: auto;
+ .wea-new-table {
+ background: #FFF;
}
}
@@ -35,7 +34,8 @@
.declare-body {
height: 100%;
width: 100%;
- padding: 16px;
+ padding: 8px 16px 0 16px;
+ background: #F6F6F6;
overflow-y: auto;
.wea-new-table {
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js
index 7a9046ba..fa58142b 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/constants.js
@@ -169,3 +169,13 @@ export const taxTabConditions = [
title: ""
}
];
+// 查看附表对应字段
+export const appendixFields = [
+ { dataIndex: "taxFreeIncome", dataType: "freeIncome" },
+ { dataIndex: "commercialHealthInsurance", dataType: "healthInsurance" },
+ { dataIndex: "taxDeferredEndowmentInsurance", dataType: "endowmentInsurance" },
+ { dataIndex: "allowedDonation", dataType: "grantDonation" },
+ { dataIndex: "taxDeduction", dataType: "derateDeduction" },
+ { dataIndex: "other", dataType: "otherDerateDeduction" },
+ { dataIndex: "", dataType: "personalPension" }
+];
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js
index 6fca282a..4523d1b0 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js
@@ -5,7 +5,7 @@
* Date: 2023/8/22
*/
import React, { Component } from "react";
-import { WeaLocaleProvider, WeaLoadingGlobal } from "ecCom";
+import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import { inject, observer } from "mobx-react";
import { Button, message, Modal } from "antd";
import PaymentDialog from "./paymentDialog";
@@ -46,7 +46,7 @@ class PaymentBtn extends Component {
style={{ textAlign: "center" }}>{getLabel(111, "若申请过银行缴款,点击确定,将自动作废银行缴款凭证。并进行三方缴款。 ")}
,
onOk: () => {
- taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") })
+ taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id"), reportType: this.props.reportType })
.then(({ status, data, errormsg }) => {
if (status) {
const { paymentDialog } = this.state;
@@ -82,7 +82,8 @@ class PaymentBtn extends Component {
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
- taxAgentId, taxYearMonth: taxYearMonth + "-01"
+ taxAgentId, taxYearMonth: taxYearMonth + "-01",
+ reportType: this.props.reportType
};
this.setState({
paymentDialog: {
@@ -122,7 +123,7 @@ class PaymentBtn extends Component {
};
getBankAccountInfo = (payload) => {
let loop = () => {
- WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
+ WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
clearTimeout(this.timer);
this.timer = setTimeout(async () => {
let response = await taxPaymentgetAgreementFeedback(payload);
@@ -236,7 +237,7 @@ class PaymentBtn extends Component {
};
handleMenuChange = ({ key }) => {
if (key === "bank_voucher_payment") {
- taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") })
+ taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id"), reportType: this.props.reportType })
.then(({ status, data, errormsg }) => {
if (status) {
const { paymentDialog } = this.state;
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js
index b3afe5e3..9dbb3b03 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js
@@ -53,7 +53,8 @@ class PaymentFeedbackBtn extends Component {
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
- taxAgentId, taxYearMonth: taxYearMonth + "-01"
+ taxAgentId, taxYearMonth: taxYearMonth + "-01",
+ reportType: this.props.reportType
};
this.setState({
paymentDialog: {
@@ -152,7 +153,7 @@ class PaymentFeedbackBtn extends Component {
return {
...it,
options: [
- { key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true },
+ { key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true }
// { key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") }
]
};
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclareDetailImportDialog.js b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclareDetailImportDialog.js
index bbda7660..6553f6e4 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclareDetailImportDialog.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclareDetailImportDialog.js
@@ -5,7 +5,7 @@
* Date: 2023/12/28
*/
import React, { Component } from "react";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
import { message } from "antd";
import ImportDialog from "../../../components/importDialog";
import * as API from "../../../apis/declare";
@@ -17,7 +17,7 @@ class TaxDeclareDetailImportDialog extends Component {
super(props);
this.state = {
importDialog: {
- visible: false, title: "", nextloading: false,
+ visible: false, title: "", nextloading: false, hasData: "0",
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview",
extraPreview: { taxDeclarationId: "" }
@@ -49,16 +49,16 @@ class TaxDeclareDetailImportDialog extends Component {
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
};
handleExportTemp = () => {
- const { importDialog: { taxDeclarationId } } = this.state;
+ const { importDialog: { taxDeclarationId, hasData } } = this.state;
message.destroy();
message.loading(getLabel(111, "下载中"), 0);
- const promise = API.taxdeclarationExportTemplate({ taxDeclarationId });
+ const promise = API.taxdeclarationExportTemplate({ taxDeclarationId, hasData: hasData === "1" });
message.destroy();
};
handleCancel = () => {
this.setState({
importDialog: {
- visible: false, title: "", nextloading: false,
+ visible: false, title: "", nextloading: false, hasData: "0",
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview"
}
@@ -71,10 +71,17 @@ class TaxDeclareDetailImportDialog extends Component {
this.setState(({
- importDialog: { ...importDialog, importResult: {}, imageId: "" }
+ importDialog: { ...importDialog, importResult: {}, imageId: "", hasData: "0" }
}))}
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
nextUplaodCallback={imageId => this.handleImport({ imageId })}
+ exportDataDom={
+ this.setState({ importDialog: { ...importDialog, hasData: val } })}
+ />
+ }
/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js
index cfedcd29..c1dffb77 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/index.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js
@@ -33,7 +33,9 @@ import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDia
import TabEditDialog from "./components/tabEditDialog";
import LeftTab from "./components/leftTab";
import { confirmDialog } from "./confirm";
+import { appendixFields } from "./components/constants";
import "./index.less";
+import TaxSetDialog from "../dataAcquisition/otherDeduct/taxSetDialog";
const { getLabel } = WeaLocaleProvider;
@@ -61,7 +63,8 @@ class Index extends Component {
},
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 },
- reportType: "", showLeft: false
+ reportType: "", showLeft: false,
+ taxSetDialog: { visible: false, dataType: "", viewParams: {} }//查看附表
};
this.timer = null;
this.taxDeclareRef = null;
@@ -143,6 +146,15 @@ class Index extends Component {
});
}
});
+ } else if (id === "APPENDIX") {
+ const { taxAgentId, taxCycle } = this.state.declareInfo;
+ this.setState({
+ taxSetDialog: {
+ visible: true, viewParams: { employeeId: params.employeeId, taxAgentId, taxCycle: taxCycle + "-01" },
+ dataType: _.find(appendixFields, o => o.dataIndex === params.dataIndex).dataType,
+ label: params.title
+ }
+ });
}
}
};
@@ -151,7 +163,8 @@ class Index extends Component {
const i18n = {
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
"操作": getLabel(30585, "操作"), "共": getLabel(83698, "共"),
- "条": getLabel(18256, "条"), "删除": getLabel(535052, "删除")
+ "条": getLabel(18256, "条"), "删除": getLabel(535052, "删除"),
+ "查看附表": getLabel(111, "查看附表")
};
const declareStatus = intelCalcSalaryStatus ? declareInfo.declareStatus : "";
const childFrameObj = document.getElementById("atdTable");
@@ -175,7 +188,10 @@ class Index extends Component {
if (idx <= 1) {
return { ...it, width: 150, fixed: "left", ellipsis: true };
}
- return { ...it, width: 150, ellipsis: true };
+ return {
+ ...it, width: 150, ellipsis: true,
+ isAppendix: _.findIndex(appendixFields, o => o.dataIndex === it.dataIndex) !== -1
+ };
})
}, () => {
const payload = {
@@ -346,7 +362,7 @@ class Index extends Component {
render() {
const {
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide,
- editTabVisible, reportType, showLeft
+ editTabVisible, reportType, showLeft, taxSetDialog
} = this.state;
const [__, taxDeclarationId] = selectedKey.split("%%");
let btns = [
@@ -387,7 +403,7 @@ class Index extends Component {
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")},
,
+ onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}
//
@@ -414,7 +430,7 @@ class Index extends Component {
if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) {
btns.push(
,
-
+
);
}
if (intelCalcSalaryStatus && declareInfo.taxPaidAmount && parseFloat(declareInfo.taxPaidAmount) > 0) {
@@ -453,6 +469,9 @@ class Index extends Component {
this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
+ {/*查看附表*/}
+