ProductionPlan.js
26.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
/* eslint-disable react/jsx-indent */
import React, { Component } from 'react';
import { SearchOutlined, SettingOutlined } from '@ant-design/icons';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import {
message,
Layout,
Switch,
DatePicker,
Radio,
Input,
Button,
Select,
Row,
Col,
} from 'antd';
import moment from 'moment';
import * as thisUtils from './ProductionPlanUtils';/* 单据业务功能 */
import styles1 from './index.less';
import CommonBase from '../Common/CommonBase';/* 获取配置及数据 */
import * as commonUtils from '../../utils/utils';/* 通用方法 */
import * as commonFunc from '../Common/commonFunc';/* 通用单据方法 */ /* 通用单据方法 */
import StaticEditTable from '../Common/CommonTable';/* 可编辑表格 */
import * as commonBusiness from '../Common/commonBusiness';/* 单据业务功能 */
import AntdDraggableModal from '../Common/AntdDraggableModal';
const {
Header, Content, Footer, Sider,
} = Layout;
const { RangePicker } = DatePicker;
const RadioGroup = Radio.Group;
const { Option } = Select;
const InputGroup = Input.Group;
const FormItem = Form.Item;
// const printItem = (
// <Menu onClick={this.handlePrintChange}>
// <Menu.Item key="1">印刷排程</Menu.Item>
// <Menu.Item key="2">印后排程</Menu.Item>
// </Menu>
// )
class ProductionPlan extends Component {
constructor(props) {
super(props);
this.state = {
enabled: true,
planTop: styles1.top,
radiovalue: 0,
sSqlCondition: '',
inputCondition: '1',
inputText: '',
searchText: '',
dataFrom: moment().startOf('day').subtract(100, 'days'),
dataTo: moment().endOf('day'),
processTableVisable: false,
processTableLoding: false,
curProductName: '',
// selectedRowKeys: [], // Check here to configure the default column
// selectedMachineRowKeys: [], // Check here to configure the default column
changeMachine: true,
sChangeTeamId: '',
sChangeMachineId: '',
loading: false,
filterListData: [{
key: '1',
value: '工单号',
}, {
key: '2',
value: '订单号',
}, {
key: '3',
value: '客户名称',
}, {
key: '4',
value: '印件名称',
}],
teamData: [],
DropDownlistMachineData: [],
// ArrangeColumns: [{
// title: '工单号',
// dataIndex: 'sOrderNo',
// width: 300,
// ...this.getColumnSearchProps('sOrderNo'),
// render: (text, record) =>
// <button onClick={() => this.queryBillProcess(record.key, record.sProductName)}>{text}</button>,
// }, {
// title: '工序名称',
// dataIndex: 'sProcessName',
// width: 150,
// ...this.getColumnSearchProps('sProcessName'),
// }, {
// title: '客户',
// dataIndex: 'sCustomerName',
// width: 200,
// }, {
// title: '印件',
// dataIndex: 'sProductName',
// width: 200,
// }, {
// title: '数量',
// dataIndex: 'dProductQty',
// width: 200,
// }, {
// title: '班组',
// dataIndex: 'sTeamName',
// width: 200,
// }],
// ArrangeData: [],
};
this.dscrollY = 'calc(100vh - 423px - 35px)';
this.form = {};
this.handleList(0, 0, '', '1 = 1'); // 工作中心
// this.handleList(1, 0, '', '1 = 1'); // 排程数据
}
componentWillReceiveProps(nextProps) {
let {
workCenterColumn,
machineColumn,
arrangeColumn,
constFind,
constReset,
constScheduling,
constOutProcessing,
constRelease,
constSuspend,
constCancelSuspend,
constReturn,
constChangeTeam,
constChangeMachine,
constConfirm,
constSave,
constPrint,
constOutExcel,
constCloseDrag,
constOpenDrag,
constRdoStatus,
constCondition,
constKeyWord,
} = nextProps;
const { formData } = nextProps;
if (commonUtils.isEmptyArr(workCenterColumn) && formData.length > 0) {
const workCenterConfig = formData.filter(item => item.sTbName.toUpperCase() === 'sisworkcenter'.toUpperCase())[0];
workCenterColumn = commonFunc.getHeaderConfig(workCenterConfig, workCenterColumn);
const tableConfig = workCenterConfig.gdsconfigformslave;
const column = [];
for (const child of tableConfig) {
if (child.bVisible && child.sControlName !== '') {
let sDropDown = [];
if (child.sChineseDropDown !== '' && child.sChineseDropDown.indexOf(',') > 0) {
sDropDown = child.sChineseDropDown.split(',');
}
column.push({
sControlName: child.sControlName,
sChinese: child.sChinese,
sChineseDropDown: sDropDown,
});
}
}
constFind = commonFunc.getControlConfig('BtnFind', column);
constReset = commonFunc.getControlConfig('BtnReset', column);
constScheduling = commonFunc.getControlConfig('BtnScheduling', column);
constOutProcessing = commonFunc.getControlConfig('BtnOutProcessing', column);
constRelease = commonFunc.getControlConfig('BtnRelease', column);
constSuspend = commonFunc.getControlConfig('BtnSuspend', column);
constCancelSuspend = commonFunc.getControlConfig('BtnCancelSuspend', column);
constReturn = commonFunc.getControlConfig('BtnReturn', column);
constChangeTeam = commonFunc.getControlConfig('EdtChangeTeam', column);
constChangeMachine = commonFunc.getControlConfig('EdtChangeMachine', column);
constConfirm = commonFunc.getControlConfig('BtnConfirm', column);
constSave = commonFunc.getControlConfig('BtnSave', column);
constPrint = commonFunc.getControlConfig('BtnPrint', column);
constOutExcel = commonFunc.getControlConfig('BtnOutExcel', column);
constCloseDrag = commonFunc.getControlConfig('bCloseDrag', column);
constOpenDrag = commonFunc.getControlConfig('bOpenDrag', column);
constRdoStatus = commonFunc.getControlConfig('RdoStatus', column);
constCondition = commonFunc.getControlConfig('LstCondition', column);
constKeyWord = commonFunc.getControlConfig('EdtKeyWord', column);
// constFind = column.
// constFind: '查找',
// constReset: '重置',
// constScheduling: '生产排程',
// constOutProcessing: '发外加工',
// constRelease: '下达',
// constSuspend: '暂停',
// constCancelSuspend: '取消下达',
// constReturn: '返回重排',
// constChangeTeam: '换班组',
// constChangeMachine: '换机台',
// constConfirm: '确认更换',
// constSave: '保存',
// constPrint: '打印',
// constOutExcel: '导出',
// constDrag: '是否拖动',
// constRdoStatus: '未排程,已排程,已下达,正在生产,已暂停,冻结,已完工,全部',
// constCondition: '工单号,订单号,客户名称,印件名称',
// constKeyWord: '关键字',
const machineConfig = formData.filter(item => item.sTbName.toUpperCase() === 'elemachine'.toUpperCase())[0];
machineColumn = commonFunc.getHeaderConfig(machineConfig, machineColumn);
const arrangeConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductionplanslave'.toUpperCase())[0];
arrangeColumn = commonFunc.getHeaderConfig(arrangeConfig, arrangeColumn);
this.props.onSaveState({
workCenterConfig,
workCenterColumn,
machineConfig,
machineColumn,
arrangeConfig,
arrangeColumn,
constFind,
constReset,
constScheduling,
constOutProcessing,
constRelease,
constSuspend,
constCancelSuspend,
constReturn,
constChangeTeam,
constChangeMachine,
constConfirm,
constSave,
constPrint,
constOutExcel,
constCloseDrag,
constOpenDrag,
constRdoStatus,
constCondition,
constKeyWord,
});
}
}
componentWillUpdate() {
}
getColumnSearchProps = dataIndex => ({
filterDropdown: ({
setSelectedKeys, selectedKeys, confirm, clearFilters,
}) => (
<div style={{ padding: 8, background: '#fff', borderRadius: 4 }}>
<Input
ref={(node) => { this.searchInput = node; }}
placeholder={` ${dataIndex}`}
value={selectedKeys[0]}
onChange={e => setSelectedKeys(e.target.value ? [e.target.value] : [])}
onPressEnter={() => this.handleSearch(selectedKeys, confirm)}
style={{ width: 188, marginBottom: 8, display: 'block' }}
/>
<Button
type="primary"
onClick={() => this.handleSearch(selectedKeys, confirm)}
icon={<SearchOutlined />}
size="small"
style={{ width: 90, marginRight: 8 }}
>
查找
</Button>
<Button
onClick={() => this.handleReset(clearFilters)}
size="small"
style={{ width: 90 }}
>
重置
</Button>
</div>
),
filterIcon: filtered => <SearchOutlined style={{ color: filtered ? '#1890ff' : undefined }} />,
onFilter: (value, record) => record[dataIndex].toString().toLowerCase().includes(value.toLowerCase()),
onFilterDropdownVisibleChange: (visible) => {
if (visible) {
setTimeout(() => this.searchInput.select());
}
},
render: text => (text),
})
getInputSqlCondition = (i) => {
switch (i) {
case '1':
return 'M.sWorkOrderId like ';
case '2':
return 'M.sOrderNo like ';
case '3':
return 'EM.sCustomerName like ';
default:
return 'ET.sProductName like ';
}
}
handleSelectMachineChange = (name, selectedMachineRowKeys) => {
if (this.state.radiovalue > 0) {
this.handleList(1, -1, selectedMachineRowKeys[0], `M.sMachineId =''${selectedMachineRowKeys[0]}''`); // 排程数据
}
this.props.onSaveState({
[`${name}SelectedRowKeys`]: selectedMachineRowKeys,
sChangeTeamId: '',
teamData: [],
});
}
handleSelectChange = (name, selectedRowKeys) => {
const selectedData = this.props.arrangeData.filter(item => selectedRowKeys.indexOf(item.key) > -1);
this.props.onSaveState({
[`${name}SelectedRowKeys`]: selectedRowKeys,
});
this.setState({
changeMachine: true,
sChangeMachineId: '',
DropDownlistMachineData: [],
});
// 去重复
const res = new Map();
if (selectedData.filter(a => !res.has(a.sProcessName) && res.set(a.sProcessName, 1)).length > 1) {
this.setState({ changeMachine: false });
}
}
handleTeamChange =(value) => {
this.setState({
sChangeTeamId: value,
});
}
handleMachineChange =(value) => {
this.setState({
sChangeMachineId: value,
});
}
handleRangePickerChange=(date) => {
this.setState({
dataFrom: date[0],
dataTo: date[1],
});
}
handleListConditionChange= (value) => {
this.setState({
inputCondition: value,
});
}
handleInputChange = (e) => {
this.setState({
inputText: e.target.value,
});
}
handlePrintChange = () => {
}
queryBillProcess = (key, value) => {
this.setState({
processTableVisable: true,
curProductName: value,
processTableLoding: true,
});
this.handleList(0, -1, '', '1 = 1'); // 工作中心
}
handleUserSet = () => {
}
handleSearch = (selectedKeys, confirm) => {
confirm();
this.setState({ searchText: selectedKeys[0] });
}
handleRadioChange =(e) => {
this.setState({
radiovalue: e.target.value,
});
const radioValue = e.target.value;
if (radioValue < 6) {
this.handleList(0, radioValue, '', '1 = 1'); // 工作中心 无条件查
// this.handleList(1, radioValue, '', '1 = 1'); // 排程数据 无条件查
} else {
this.handleList(0, radioValue, '', ''); // 工作中心 根据条件查
// this.handleList(1, radioValue, '', ''); // 排程数据 根据条件查
}
}
handleReset = (clearFilters) => {
clearFilters();
this.setState({ searchText: '' });
}
async handleList(iOperType, radioValue, sWorkCenterId, sSqlCondition, sIds, sMachineIds, sTeamId) {
const { app } = this.props;
const params = {
token: app.token,
value: {
sProName: 'Sp_Manufacture_ProducttionPlan_List',
paramsMap: {
iStates: radioValue >= 0 ? radioValue + 1 : this.state.radiovalue + 1,
iOperType,
sWorkCenterId,
sIds: sIds === undefined ? [''] : sIds.toString(),
sMachineId: sMachineIds === undefined ? [''] : sMachineIds.toString(),
sTeamId: sTeamId === undefined ? '' : sTeamId,
sSqlCondition: sSqlCondition !== '' ? sSqlCondition : `M.tStartDate >= "${this.state.dataFrom.format('YYYY-MM-DD')
}" and M.tStartDate <= "${this.state.dataTo.format('YYYY-MM-DD')}" and ${this.getInputSqlCondition(this.state.inputCondition)
}"%${this.state.inputText}%"`,
},
},
};
const returnData = await thisUtils.handleGetDataSetByName(params);
const { proData, msgs } = returnData;
if (returnData !== undefined) {
if (iOperType === 0) {
this.props.onSaveState({
workCenterData: proData,
machineData: [],
arrangeData: [],
machineSelectedRowKeys: [],
arrangeSelectedRowKeys: [],
DropDownlistMachineData: [],
teamData: [],
processTableLoding: false,
});
// if (proData.length > 0) {
// this.handleList(2, -1, proData[0].sId);
// }
} else if (iOperType === 2) {
this.props.onSaveState({
machineData: proData,
selectedRowKeys: [],
DropDownlistMachineData: [],
teamData: [],
});
} else if (iOperType === 100) { // 换班组时,取班组;
this.setState({ teamData: proData });
} else if (iOperType === 101) { // 取机台时,取机台;
this.setState({ DropDownlistMachineData: proData });
} else {
this.props.onSaveState({ arrangeData: proData, selectedRowKeys: [] });
}
} else {
message.error(msgs);
}
}
handleSubmit = async (e) => {
e.preventDefault();
this.form.validateFields(async (err) => {
if (!err) {
this.handleList(1, -1, '', '');
}
});
};
handleForm = (form) => {
this.form = form;
};
handleWorkCenterClick = (record) => {
const newKey = record.key;
this.handleList(1, -1, newKey, `M.sWorkCenterId =''${newKey}''`); // 排程数据
this.handleList(2, -1, newKey, '1 = 1'); // 机器数据
this.props.onSaveState({
machineSelectedRowKeys: [],
});
};
// start = () => {
// this.setState({ loading: true });
// // ajax request after empty completing
// setTimeout(() => {
// this.setState({
// selectedRowKeys: [],
// loading: false,
// });
// }, 1000);
// }
processTableOk = () => {
this.setState({
processTableVisable: false,
});
}
processTableCancel = () => {
this.setState({
processTableVisable: false,
});
}
handleTeamDropdown = (e) => {
if (e && this.props.machineSelectedRowKeys.length > 0) {
this.handleList(100, -1, '', '', '', this.props.machineSelectedRowKeys);
}
}
handleMachineDropdown = (e) => {
if (e && this.props.arrangeSelectedRowKeys.length > 0) {
this.handleList(101, -1, '', '', this.props.arrangeSelectedRowKeys[0], '');
}
}
handleButtonClick = (e) => {
if (this.props.arrangeSelectedRowKeys.length < 1) {
message.info('排程数据不为空');
return;
}
if (e === 3 && this.props.machineSelectedRowKeys.length < 1) { // 生产排单
message.info('请选择机台');
return;
}
if (e === 11) { // 更换机台 + 班组
if (this.state.sChangeMachineId !== '' && this.state.sChangeTeamId !== '') {
this.handleList(20, 0, '', '', this.props.arrangeSelectedRowKeys, this.state.sChangeMachineId, this.state.sChangeTeamId);
} else if (this.state.sChangeMachineId !== '') {
this.handleList(21, 0, '', '', this.props.arrangeSelectedRowKeys, this.state.sChangeMachineId, '');
} else if (this.state.sChangeTeamId !== '') {
this.handleList(22, 0, '', '', this.props.arrangeSelectedRowKeys, '', this.state.sChangeTeamId);
}
} else {
this.handleList(e, 0, '', '', this.props.arrangeSelectedRowKeys, this.props.machineSelectedRowKeys);
}
}
render() {
const { workCenterColumn } = this.props;
return (
<div>
{commonUtils.isNotEmptyArr(workCenterColumn) ?
<ProductionPlanComponent
{...this.props}
{...this.state}
onSelectChange={this.handleSelectChange}
onSelectMachineChange={this.handleSelectMachineChange}
dscrollY={this.dscrollY}
printItem={this.printItem}
onRadioChange={this.handleRadioChange}
onTeamChange={this.handleTeamChange}
onRangePickerChange={this.handleRangePickerChange}
onListConditionChange={this.handleListConditionChange}
onInputChange={this.handleInputChange}
onUserSet={this.handleUserSet}
onColResize={this.handleResize}
onSubmit={this.handleSubmit}
onReturnForm={this.handleForm}
onWorkCenterClick={this.handleWorkCenterClick}
onProcessTableCancel={this.processTableCancel}
onProcessTableOk={this.processTableOk}
onButtonClick={this.handleButtonClick}
onTeamDropdown={this.handleTeamDropdown}
onMachineChange={this.handleMachineChange}
onMachineDropdown={this.handleMachineDropdown}
/>
: ''}
</div>
);
}
}
const ProductionPlanComponent = Form.create({
})((props) => {
const {
form,
planTop,
radiovalue,
dataFrom,
dataTo,
teamData,
DropDownlistMachineData,
onRadioChange,
onTeamChange,
onMachineChange,
onRangePickerChange,
onListConditionChange,
onInputChange,
onUserSet,
filterListData,
dscrollY,
onSubmit,
onReturnForm,
onWorkCenterClick,
onSelectChange,
onSelectMachineChange,
processTableVisable,
processTableLoding,
curProductName,
// processTableOk,
onProcessTableCancel,
onProcessTableOk,
onButtonClick,
changeMachine,
onTeamDropdown,
onMachineDropdown,
constFind,
// constReset,
constScheduling,
constOutProcessing,
constRelease,
constSuspend,
constCancelSuspend,
constReturn,
constChangeTeam,
constChangeMachine,
constConfirm,
constSave,
constPrint,
constOutExcel,
constCloseDrag,
constOpenDrag,
constRdoStatus,
constCondition,
constKeyWord,
} = props;
// const dscrollRight = 'calc(100vh - 193px - 35px)';
const { getFieldDecorator } = form;
/* 回带表单 */
onReturnForm(form);
const left1props = {
...commonBusiness.getTableTypes('workCenter', props),
tableProps: {
rowSelection: null,
bordered: false,
loading: processTableLoding,
className: styles1.border,
scroll: { x: 270, y: 201 },
onRow: (record) => { return { onClick: () => { onWorkCenterClick(record); } }; },
},
};
const left2props = {
...commonBusiness.getTableTypes('machine', props),
rowSelectionType: 'radio',
onSelectRowChange: onSelectMachineChange,
tableProps: {
bordered: false,
className: styles1.border,
scroll: { x: 270, y: dscrollY },
},
};
const rightprops = {
...commonBusiness.getTableTypes('arrange', props),
rowSelectionType: 'checkbox',
onSelectRowChange: onSelectChange,
tableProps: {
bordered: true,
className: styles1.border,
// scroll: { x: 3000, y: dscrollRight },
},
};
return (
<Form onSubmit={onSubmit}>
<Layout>
<Header className={styles1.header}>
<div className={planTop}>
<Row>
<Col span={12} >
<FormItem>
{getFieldDecorator('productionProcess', {
initialValue: radiovalue,
})(<RadioGroup onChange={onRadioChange}>
{ constRdoStatus.sChineseDropDown.map((o, i) =>
<Radio value={i}>{o}</Radio>)
}
</RadioGroup>)}
</FormItem>
</Col>
<Col span={5}>
<FormItem>
{getFieldDecorator('productionTime', {
initialValue: [dataFrom, dataTo],
})(<RangePicker onChange={onRangePickerChange} />)}
</FormItem>
</Col>
<Col span={5}>
<InputGroup compact>
<FormItem>
{getFieldDecorator('productionSQl', {
})(<Select placeholder={constCondition.sChinese} onChange={onListConditionChange} style={{ width: 100 }}>
{ filterListData.map(child =>
<Option value={child.key}>{child.value}</Option>)
}
</Select>)}
</FormItem>
<FormItem>
{getFieldDecorator('productionSQlKey', {
})(<Input style={{ width: 170 }} onChange={onInputChange} placeholder={constKeyWord.sChinese} />)}
</FormItem>
</InputGroup>
</Col>
<Col span={2}>
<Button type="primary" htmlType="submit" style={{ margin: 2 }}>{constFind.sChinese}</Button>
<div className={styles1.affixMenu}>
<SettingOutlined onClick={onUserSet} />
</div>
</Col>
</Row>
</div>
</Header>
<div>
{
processTableVisable ?
<AntdDraggableModal
title={`${curProductName}`}
visible={processTableVisable}
onOk={onProcessTableOk}
onCancel={onProcessTableCancel}
>
<StaticEditTable {...left1props} />
</AntdDraggableModal>
: ''
}
</div>
<Layout>
<Content className={styles1.content}>
<Layout>
<Sider className={styles1.left}>
<div className={styles1.left1}>
<StaticEditTable {...left1props} />
</div>
<div className={styles1.left2}>
<StaticEditTable {...left2props} />
</div>
</Sider>
<Content className={styles1.right}>
<StaticEditTable {...rightprops} />
</Content>
</Layout>
</Content>
<Footer className={planTop} style={{ marginTop: 0 }}>
<Row>
<Col span={4} >
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 3)} disabled={radiovalue !== 0}style={{ margin: 2 }}>{constScheduling.sChinese}</Button>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 4)} disabled={radiovalue !== 0} style={{ margin: 2 }}>{constOutProcessing.sChinese}</Button>
</Col>
<Col span={14}>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 5)} disabled={(radiovalue === 0 || radiovalue >= 3)} style={{ margin: 2, display: radiovalue !== 2 ? 'inline-block' : 'none' }}>{constRelease.sChinese}</Button>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 6)} disabled={(radiovalue === 0 || radiovalue >= 3)} style={{ margin: 2, display: radiovalue === 2 ? 'inline-block' : 'none' }}>{constCancelSuspend.sChinese}</Button>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 7)} disabled={(radiovalue === 0 || radiovalue >= 4)} style={{ margin: 2, display: radiovalue !== 4 ? 'inline-block' : 'none' }}>{constSuspend.sChinese}</Button>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 8)} disabled={radiovalue === 0} style={{ margin: 2, display: radiovalue === 5 ? 'inline-block' : 'none' }}>恢复生产</Button>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 9)} disabled={(radiovalue === 0 || radiovalue >= 3)} style={{ margin: 2 }}>{constReturn.sChinese}</Button>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 10)} disabled={(radiovalue === 0 || radiovalue >= 4)} style={{ margin: 2 }}>加工完成</Button>
<Select defaultValue={constChangeTeam.sChinese} style={{ width: 100 }} onDropdownVisibleChange={onTeamDropdown} onChange={onTeamChange}>
{ teamData.map(child =>
<Option key={child.key}>{child.sTeamName}</Option>)
}
</Select>
<Select defaultValue={constChangeMachine.sChinese} style={{ width: 140 }} onDropdownVisibleChange={onMachineDropdown} onChange={onMachineChange}>
{ DropDownlistMachineData.map(child =>
<Option key={child.key}>{child.sMachineName}</Option>)
}
</Select>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 11)} disabled={(radiovalue === 0 || !changeMachine || radiovalue >= 3)} style={{ margin: 4 }}>{constConfirm.sChinese}</Button>
</Col>
<Col span={4}>
<Button type="primary" htmlType="button" onClick={onButtonClick.bind(this, 12)} style={{ margin: 2 }}>{constSave.sChinese}</Button>
{/* <Dropdown overlay={printItem}> */}
{/* <Button> */}
{/* Actions <Icon type="down" /> */}
{/* </Button> */}
{/* </Dropdown> */}
<Button type="primary" htmlType="button" style={{ margin: 2 }}>{constPrint.sChinese}</Button>
<Button type="primary" htmlType="button" style={{ margin: 2 }}>{constOutExcel.sChinese}</Button>
</Col>
<Col span={2}>
<Switch checkedChildren={constCloseDrag.sChinese} unCheckedChildren={constOpenDrag.sChinese} defaultChecked={false} />
</Col>
</Row>
</Footer>
</Layout>
</Layout>
</Form>
);
});
export default CommonBase(ProductionPlan);