⚰️ removeCode: 优化代码
This commit is contained in:
parent
97fc2a64db
commit
ec5de7fbd9
|
@ -327,6 +327,7 @@ export default class addKnockGold extends Component {
|
|||
}
|
||||
return isdisabled;
|
||||
};
|
||||
|
||||
/* TODO: 生效时间控件 */
|
||||
onDisabledTime = (date, type) => {
|
||||
let step1 = JSON.parse(sessionStorage.getItem('redPackets_effectDate'));
|
||||
|
@ -424,7 +425,7 @@ export default class addKnockGold extends Component {
|
|||
const transformData = cloneDeep(model);
|
||||
transformData.begin_time = model.effect_date[0];
|
||||
transformData.end_time = model.effect_date[1];
|
||||
const { receive_num, num, early_per, early_notifier } = model;
|
||||
const { receive_num, num, early_notifier } = model;
|
||||
transformData.receive_num = Number(receive_num);
|
||||
transformData.num = Number(num);
|
||||
transformData.early_notifier = early_notifier.map(({ text, key }) => ({
|
||||
|
@ -434,28 +435,6 @@ export default class addKnockGold extends Component {
|
|||
return omit(transformData, ['effect_date']);
|
||||
}
|
||||
|
||||
/* 处理可用时间段 */
|
||||
withTimeFunction(type) {
|
||||
let obj = {};
|
||||
switch (type) {
|
||||
case 'week':
|
||||
obj.time = this.state.model.ruleDate;
|
||||
obj.week = this.state.model.ruleWeek;
|
||||
break;
|
||||
case 'irregular':
|
||||
obj.time = this.state.model.irregularTime;
|
||||
obj.day = this.state.model.irregularDate;
|
||||
break;
|
||||
default:
|
||||
obj.fiexd_time = {
|
||||
start_time: this.state.model.receive_day[0],
|
||||
end_time: this.state.model.receive_day[1]
|
||||
};
|
||||
break;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* 输入事件和选择事件统一处理 */
|
||||
onHandleChange(value, key, childrenKey) {
|
||||
let model2 = this.state.model;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import './index.less';
|
||||
import { Placeholder } from 'zent';
|
||||
import moment from 'moment/moment';
|
||||
const widths = [
|
||||
24, 100, 100, 100, 80, 100, 100, 100, 80, 100, 100, 100, 80, 100, 100, 100,
|
||||
100
|
||||
|
|
Loading…
Reference in New Issue