this.setState({ selectedKey })}
+ />
- {this.state.selectItem == "个人"
+ {this.state.selectedKey === "PERSONAL"
? {
this.onEdit(record);
}}>
@@ -196,8 +199,9 @@ export default class Programme extends React.Component {
getForm({
welfareTypeEnum: selectedKey,
id
+ }).then(() => {
+ this.setState({ slideVisiable: true, customEdit: true, currentOperate: "update" });
});
- this.setState({ slideVisiable: true, customEdit: true, currentOperate: "update" });
}
onCopy(record) {
@@ -498,19 +502,22 @@ export default class Programme extends React.Component {
className="slideOuterWrapper"
visible={this.state.slideVisiable}
top={0}
- width={60}
+ measureT="%"
+ width={800}
+ measureX="px"
height={100}
+ measureY="%"
direction={"right"}
- measure={"%"}
title={
it.viewcondition === selectedKey).title}方案` :
+ `新增${_.find(topTab, it => it.viewcondition === selectedKey).title}方案`
+ }
editable={true}
showOperateBtn={showOperateBtn}
- onSave={() => {
- handleOnSave();
- }}
+ onSave={() => handleOnSave()}
/>
}
content={
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.less
index 2d49566f..4cce62b7 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.less
@@ -1,5 +1,20 @@
.defaultSlideForm {
- padding: 20px;
+ padding: 16px;
+
+ .wea-search-group {
+ padding: 0;
+ border: 1px solid #e5e5e5;
+ border-bottom: none;
+
+ .wea-content {
+ padding: 0;
+ }
+
+ .wea-form-item {
+ padding: 4px 16px;
+ border-bottom: 1px solid #e5e5e5;
+ }
+ }
.tableBar {
margin-top: 10px;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/schemeInfoForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/schemeInfoForm.js
new file mode 100644
index 00000000..2afbd1a3
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/schemeInfoForm.js
@@ -0,0 +1,97 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利方案-信息表单
+ * Description:
+ * Date: 2023/2/13
+ */
+import React, { Component } from "react";
+import { WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom";
+import { schemeFields } from "./enum";
+
+class SchemeInfoForm extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ schemeFieldsItem: schemeFields
+ };
+ }
+
+ componentDidMount() {
+ const { schemeFieldsItem } = this.state;
+ const { requestParams, salaryFileStore: { userStatusList }, taxAgentStore: { taxAgentAdminOption } } = this.props;
+ const { sharedType } = requestParams;
+ this.setState({
+ schemeFieldsItem: _.map(schemeFieldsItem, item => {
+ const { key } = item;
+ switch (key) {
+ case "sharedType":
+ return {
+ ...item,
+ options: userStatusList
+ };
+ case "taxAgentIds":
+ return {
+ ...item,
+ multiple: true,
+ display: !_.isNil(sharedType) && sharedType.toString() === "1",
+ options: taxAgentAdminOption
+ };
+ default:
+ break;
+ }
+ return { ...item };
+ })
+ });
+ }
+
+ handleChangeSchemeFiledItems = (key, v) => {
+ const { onChangeFieldsItem } = this.props;
+ const { schemeFieldsItem } = this.state;
+ this.setState({
+ schemeFieldsItem: _.map(schemeFieldsItem, item => {
+ if (key === "sharedType" && item.key === "taxAgentIds") {
+ return { ...item, display: v === "1" };
+ }
+ return { ...item };
+ })
+ }, () => {
+ onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary") ? Number(v) : v });
+ });
+ };
+
+ render() {
+ const { requestParams } = this.props;
+ const { schemeFieldsItem } = this.state;
+ return (
+
+ {
+ _.map(schemeFieldsItem, item => {
+ const { key, label, type, viewAttr, options, display = true, multiple = false } = item;
+ const value = !_.isNil(requestParams[key]) ? requestParams[key].toString() : "";
+ return
+ {
+ (type === "INPUT" && display) ?
+
+ this.handleChangeSchemeFiledItems(key, v)}/> :
+ (type === "SELECT" && display) ?
+
+ this.handleChangeSchemeFiledItems(key, v)}/>
+ :
+ (type === "TEXTAREA" && display) ?
+
+ this.handleChangeSchemeFiledItems(key, v)}/>
+ : null
+ }
+ ;
+ })
+ }
+
+ );
+ }
+}
+
+export default SchemeInfoForm;
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index b2df90d8..7ba4e492 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -1,4 +1,4 @@
-import { action, observable } from "mobx";
+import { action, observable, toJS } from "mobx";
import { message } from "antd";
import { WeaForm, WeaTableNew } from "comsMobx";
import { removePropertyCondition } from "../util/response";
@@ -166,7 +166,7 @@ export class ArchivesStore {
// 查询档案缴纳基数表单
@action
- getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "") => {
+ getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "", isChange = false) => {
API.getPaymentForm({ employeeId, welfareTypeEnum, schemeId, paymentOrganization }).then(res => {
if (res.status) {
let obj = {};
@@ -176,25 +176,67 @@ export class ArchivesStore {
_.map(baseList.items, item => {
obj = {
...obj,
- [item["domkey"][0]]: "0"
+ [item["domkey"][0]]: ""
};
});
}
- if (welfareTypeEnum == "SOCIAL_SECURITY") {
+ if (welfareTypeEnum === "SOCIAL_SECURITY") {
this.socialSecurityPaymentForm = res.data.data ? {
...res.data,
data: { ...obj, ...res.data.data }
} : { ...res.data, data: obj };
- } else if (welfareTypeEnum == "ACCUMULATION_FUND") {
+ if (isChange) {
+ const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data;
+ const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items;
+ const tmpV = socialSecurityPaymentItems.reduce((pre, cur) => {
+ const { domkey, max, min } = cur;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ const val = socialSecurityPaymentData[domkey[0]];
+ return Object.assign(pre, { [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val });
+ }, {});
+ this.setSocialSecurityPaymentForm({
+ ...toJS(this.socialSecurityPaymentForm),
+ data: { ...socialSecurityPaymentData, ...tmpV }
+ });
+ }
+ } else if (welfareTypeEnum === "ACCUMULATION_FUND") {
this.accumulationFundPaymentForm = res.data.data ? {
...res.data,
data: { ...obj, ...res.data.data }
} : { ...res.data, data: obj };
- } else if (welfareTypeEnum == "OTHER") {
+ if (isChange) {
+ const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data;
+ const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items;
+ const tmpV = accumulationFundPaymentItems.reduce((pre, cur) => {
+ const { domkey, max, min } = cur;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ const val = accumulationFundPaymentData[domkey[0]];
+ return Object.assign(pre, { [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val });
+ }, {});
+ this.setAccumulationFundPaymentForm({
+ ...toJS(this.accumulationFundPaymentForm),
+ data: { ...accumulationFundPaymentData, ...tmpV }
+ });
+ }
+ } else if (welfareTypeEnum === "OTHER") {
this.otherPaymentForm = res.data.data ? { ...res.data, data: { ...obj, ...res.data.data } } : {
...res.data,
data: obj
};
+ if (isChange) {
+ const otherPaymentData = toJS(this.otherPaymentForm).data;
+ const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;
+ const tmpV = otherPaymentItems.reduce((pre, cur) => {
+ const { domkey, max, min } = cur;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ const val = otherPaymentData[domkey[0]];
+ return Object.assign(pre, { [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val });
+ }, {});
+ this.setOtherPaymentForm({
+ ...toJS(this.otherPaymentForm),
+ data: { ...otherPaymentData, ...tmpV }
+ });
+ }
}
}
});
@@ -205,15 +247,39 @@ export class ArchivesStore {
save = (welfareType) => {
let baseForm = "";
let paymentForm = "";
- if (welfareType == "SOCIAL_SECURITY") {
+ if (welfareType === "SOCIAL_SECURITY") {
baseForm = JSON.stringify(this.socialSecurityForm.data);
- paymentForm = this.socialSecurityForm.data.socialSchemeId ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
- } else if (welfareType == "ACCUMULATION_FUND") {
+ if (this.socialSecurityForm.data.socialSchemeId) {
+ const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data;
+ const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items;
+ const payload = socialSecurityPaymentItems.reduce((pre, cur) => {
+ const { domkey } = cur;
+ return Object.assign(pre, { [domkey[0]]: socialSecurityPaymentData[domkey[0]] ? socialSecurityPaymentData[domkey[0]].toString() : "0" });
+ }, {});
+ paymentForm = JSON.stringify(payload);
+ }
+ } else if (welfareType === "ACCUMULATION_FUND") {
baseForm = JSON.stringify(this.accumulationFundForm.data);
- paymentForm = this.accumulationFundForm.data.fundSchemeId ? JSON.stringify(this.accumulationFundPaymentForm.data) : "";
- } else if (welfareType == "OTHER") {
+ if (this.accumulationFundForm.data.fundSchemeId) {
+ const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data;
+ const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items;
+ const payload = accumulationFundPaymentItems.reduce((pre, cur) => {
+ const { domkey } = cur;
+ return Object.assign(pre, { [domkey[0]]: accumulationFundPaymentData[domkey[0]] ? accumulationFundPaymentData[domkey[0]].toString() : "0" });
+ }, {});
+ paymentForm = JSON.stringify(payload);
+ }
+ } else if (welfareType === "OTHER") {
baseForm = JSON.stringify(this.otherForm.data);
- paymentForm = this.otherForm.data.otherSchemeId ? JSON.stringify(this.otherPaymentForm.data) : "";
+ if (this.otherForm.data.otherSchemeId) {
+ const otherPaymentData = toJS(this.otherPaymentForm).data;
+ const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;
+ const payload = otherPaymentItems.reduce((pre, cur) => {
+ const { domkey } = cur;
+ return Object.assign(pre, { [domkey[0]]: otherPaymentData[domkey[0]] ? otherPaymentData[domkey[0]].toString() : "0" });
+ }, {});
+ paymentForm = JSON.stringify(payload);
+ }
}
return new Promise((resolve, reject) => {
API.save({ welfareType, baseForm, paymentForm }).then(res => {
diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js
index 4a857dd9..2f4153a2 100644
--- a/pc4mobx/hrmSalary/stores/programme.js
+++ b/pc4mobx/hrmSalary/stores/programme.js
@@ -13,9 +13,9 @@ export class ProgrammeStore {
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = true; // 数据加载状态
- @observable deleteLoading = false; // 删除加载状态
+ @observable deleteLoading = false; // 删除加载状态
@observable selectedKey = "SOCIAL_SECURITY";
- @observable customSelectkey = ""
+ @observable customSelectkey = "";
@observable defaultPersonDataSource = []; // 默认新增列表DataSource
@observable defaultCompanyDataSource = [];
@observable requestParams = {
@@ -23,12 +23,12 @@ export class ProgrammeStore {
remarks: "",
paymentArea: "1",
sharedType: "",
- taxAgentIds: "",
- }
+ taxAgentIds: ""
+ };
@observable form = new WeaForm();
@observable formCondition = []; // 存储后台得到的form数据
@observable customNewVisible = false;
- @observable customRequest = {}
+ @observable customRequest = {};
// 福利方案列表
@observable tableDataSource = [];
@@ -37,10 +37,10 @@ export class ProgrammeStore {
@action
- setCustomSelectkey = customSelectkey => this.customSelectkey = customSelectkey
+ setCustomSelectkey = customSelectkey => this.customSelectkey = customSelectkey;
@action
- setCustomRequest = customRequest => this.customRequest = customRequest
+ setCustomRequest = customRequest => this.customRequest = customRequest;
@action
setCustomNewVisible = customNewVisible => this.customNewVisible = customNewVisible;
@@ -61,11 +61,11 @@ export class ProgrammeStore {
remarks: "",
paymentType: "SCHEME_TOWN",
sharedType: "",
- taxAgentIds: "",
- }
+ taxAgentIds: ""
+ };
this.defaultPersonDataSource = [];
this.defaultCompanyDataSource = [];
- }
+ };
@action
setSelectedKey = selectedKey => this.selectedKey = selectedKey;
@@ -75,7 +75,7 @@ export class ProgrammeStore {
doInit = () => {
this.getTableDatas();
// this.getCustomCategoryList();
- }
+ };
// 获得高级搜索表单数据
// @action
@@ -96,7 +96,7 @@ export class ProgrammeStore {
this.loading = true;
const formParams = this.form.getFormParams() || {};
params = params || formParams;
- params.welfareTypeEnum = selectKey
+ params.welfareTypeEnum = selectKey;
API.getTable(params).then(action(res => {
if (res.status) { // 接口请求成功/失败处理
// this.tableStore.getDatas(res.data.datas); // table 请求数据
@@ -104,11 +104,11 @@ export class ProgrammeStore {
this.tableColumns = res.data.columns;
this.tablePageInfo = res.data;
} else {
- message.error(res.errormsg || '接口调用失败!')
+ message.error(res.errormsg || "接口调用失败!");
}
this.loading = false;
}));
- }
+ };
// 渲染自定义福利
@@ -117,16 +117,16 @@ export class ProgrammeStore {
this.loading = true;
const formParams = this.form.getFormParams() || {};
params = params || formParams;
- params.welfareTypeEnum = selectKey
+ params.welfareTypeEnum = selectKey;
API.getCustomCategoryList(params).then(action(res => {
if (res.status) { // 接口请求成功/失败处理
this.tableStore.getDatas(res.data.datas, 1); // table 请求数据
} else {
- message.error(res.errormsg || '接口调用失败!')
+ message.error(res.errormsg || "接口调用失败!");
}
this.loading = false;
}));
- }
+ };
@action
setShowSearchAd = bool => this.showSearchAd = bool;
@@ -135,171 +135,176 @@ export class ProgrammeStore {
@action doSearch = () => {
this.getTableDatas();
this.showSearchAd = false;
- }
+ };
// 获取form, 获取获取详情
@action getForm = (params) => {
- API.getForm(params).then(res => {
- if(res.status) {
- let resultList = res.data.form.schemeDetailList;
- resultList= _.map(resultList, it => ({
- ...it,
- rententionRule: it.rententionRule ? it.rententionRule : "2",
- validNum: !_.isNil(it.validNum) ? it.validNum : "2"
- }))
- this.defaultPersonDataSource = resultList.filter(item => item.paymentScope == "个人")
- this.defaultCompanyDataSource = resultList.filter(item => item.paymentScope == "公司")
- let defaultRequest = {
- schemeName: "",
- remarks: "",
- paymentArea: "1"
+ return new Promise((resolve, reject) => {
+ API.getForm(params).then(res => {
+ if (res.status) {
+ let resultList = res.data.form.schemeDetailList;
+ resultList = _.map(resultList, it => ({
+ ...it,
+ rententionRule: it.rententionRule ? it.rententionRule : "2",
+ validNum: !_.isNil(it.validNum) ? it.validNum : "2"
+ }));
+ this.defaultPersonDataSource = resultList.filter(item => item.paymentScope == "个人");
+ this.defaultCompanyDataSource = resultList.filter(item => item.paymentScope == "公司");
+ let defaultRequest = {
+ schemeName: "",
+ remarks: "",
+ paymentArea: "1"
+ };
+ this.requestParams = { ...defaultRequest, ...res.data.form.schemeBatch };
+ resolve();
+ } else {
+ reject();
}
- this.requestParams = {...defaultRequest, ...res.data.form.schemeBatch}
- }
- })
- }
+ }).catch(() => reject());
+ });
+ };
valideForm(params) {
- if(!notNull(params.insuranceScheme.paymentType)) {
- message.warning("缴纳类型不能为空")
- return false
+ if (!notNull(params.insuranceScheme.paymentType)) {
+ message.warning("缴纳类型不能为空");
+ return false;
}
- if(!notNull(params.insuranceScheme.schemeName)) {
- message.warning("方案名称不能为空")
- return false
+ if (!notNull(params.insuranceScheme.schemeName)) {
+ message.warning("方案名称不能为空");
+ return false;
}
- if(this.requestParams.sharedType=== "1" && !notNull(params.insuranceScheme.taxAgentIds)) {
- message.warning("可见性范围不能为空")
- return false
+ if (this.requestParams.sharedType === "1" && !notNull(params.insuranceScheme.taxAgentIds)) {
+ message.warning("可见性范围不能为空");
+ return false;
}
return true;
}
@action createScheme = (params) => {
params.insuranceScheme.paymentArea = params.insuranceScheme.paymentType;
- return new Promise((resolve, reject)=>{
- if(!this.valideForm(params)) {
+ return new Promise((resolve, reject) => {
+ if (!this.valideForm(params)) {
reject("新建失败");
- return
+ return;
}
API.createScheme(params).then(res => {
- if(res.status) {
- resolve(res)
+ if (res.status) {
+ resolve(res);
message.success("新建成功");
this.getTableDatas(this.selectedKey);
} else {
reject("新建失败");
- message.error(res.errormsg || "新建失败")
+ message.error(res.errormsg || "新建失败");
}
- })
- })
- }
+ });
+ });
+ };
@action updateScheme = (params) => {
params.insuranceScheme.paymentArea = params.insuranceScheme.paymentType;
- return new Promise((resolve, reject)=>{
- if(!this.valideForm(params)) {
+ return new Promise((resolve, reject) => {
+ if (!this.valideForm(params)) {
reject("新建失败");
- return
+ return;
}
API.updateScheme(params).then(res => {
- if(res.status) {
- resolve(res)
+ if (res.status) {
+ resolve(res);
message.success("更新成功");
this.getTableDatas(this.selectedKey);
} else {
- reject("更新失败")
- message.error(res.errormsg || "更新失败")
+ reject("更新失败");
+ message.error(res.errormsg || "更新失败");
}
- })
- })
- }
+ });
+ });
+ };
@action("复制福利方案")
copyScheme = (params) => {
- return new Promise((resolve,reject)=>{
+ return new Promise((resolve, reject) => {
API.copyScheme(params).then(res => {
- if(res.status) {
+ if (res.status) {
resolve("复制成功");
message.success("复制成功");
this.getTableDatas(this.selectedKey);
} else {
- reject(res.errormsg || "复制失败");
- message.error(res.errormsg || "复制失败");
+ reject(res.errormsg || "复制失败");
+ message.error(res.errormsg || "复制失败");
}
- })
- })
- }
+ });
+ });
+ };
@action("删除社保数据")
deleteScheme = (params) => {
- this.deleteLoading= true;
+ this.deleteLoading = true;
API.deleteScheme(params).then(res => {
- this.deleteLoading= false;
- if(res.status) {
- message.success("刪除成功")
+ this.deleteLoading = false;
+ if (res.status) {
+ message.success("刪除成功");
this.getTableDatas(this.selectedKey);
} else {
- message.error(res.errormsg || "刪除失败")
+ message.error(res.errormsg || "刪除失败");
}
- })
- }
+ });
+ };
@action getCustomForm = (params) => {
API.getCustomCategoryForm(params).then(res => {
- if(res.status) {
+ if (res.status) {
let condition = res.data.item;
let items = Object.keys(condition).map(item => {
- return condition[item]
- })
- let fieldCondtion = items
+ return condition[item];
+ });
+ let fieldCondtion = items;
this.formCondition = fieldCondtion;
} else {
- message.error(res.errormsg || "获取失败")
+ message.error(res.errormsg || "获取失败");
}
- })
- }
+ });
+ };
validateCustomRequest() {
let flag = true;
try {
this.formCondition.forEach(item => {
- if(item.rules == "required") {
- if(!notNull(this.customRequest[item.domkey[0]])) {
- message.warning(item.label + "不能为空")
- throw new Error(item.label + "不能为空")
+ if (item.rules == "required") {
+ if (!notNull(this.customRequest[item.domkey[0]])) {
+ message.warning(item.label + "不能为空");
+ throw new Error(item.label + "不能为空");
}
}
- })
- } catch(e) {
- flag = false
-}
+ });
+ } catch (e) {
+ flag = false;
+ }
return flag;
}
// 新增自定义福利
@action createSICategory = (params) => {
return new Promise((resolve, reject) => {
- if(!this.validateCustomRequest()) {
+ if (!this.validateCustomRequest()) {
reject();
- return
+ return;
}
- API.createSICategory({...params, paymentScope: params.paymentScope.split(",")}).then(res => {
- if(res.status) {
- message.success("新增成功")
- resolve()
- this.getCustomCategoryList()
+ API.createSICategory({ ...params, paymentScope: params.paymentScope.split(",") }).then(res => {
+ if (res.status) {
+ message.success("新增成功");
+ resolve();
+ this.getCustomCategoryList();
} else {
- reject()
- message.error(res.errormsg || "新增失败")
+ reject();
+ message.error(res.errormsg || "新增失败");
}
- }).catch(()=>{
- message.error("新增失败")
- })
- })
+ }).catch(() => {
+ message.error("新增失败");
+ });
+ });
- }
+ };
// 自定义福利启用、停用
@action
@@ -307,34 +312,34 @@ export class ProgrammeStore {
let params = {
id,
isUse: isUse ? 1 : 0
- }
+ };
API.updateCustomCategoryStatus(params).then(res => {
- if(res.status) {
- message.success("修改成功")
- this.getCustomCategoryList()
+ if (res.status) {
+ message.success("修改成功");
+ this.getCustomCategoryList();
} else {
- message.error(res.errormsg || "修改失败")
+ message.error(res.errormsg || "修改失败");
}
- })
- }
+ });
+ };
// 自定义福利编辑
@action
updateCustomCategory = (params) => {
return new Promise((resolve, reject) => {
- API.updateCustomCategory(_.pick(params, ['id',"insuranceName"])).then(res => {
- if(res.status) {
- message.success("编辑成功")
- resolve()
- this.getCustomCategoryList()
+ API.updateCustomCategory(_.pick(params, ["id", "insuranceName"])).then(res => {
+ if (res.status) {
+ message.success("编辑成功");
+ resolve();
+ this.getCustomCategoryList();
} else {
- reject()
- message.error(res.errormsg || "编辑失败")
+ reject();
+ message.error(res.errormsg || "编辑失败");
}
- })
- })
+ });
+ });
- }
+ };
}