import React from 'react';
import { observer } from 'mobx-react';
import { WeaDialog, WeaNewScroll, WeaLocaleProvider, WeaRightMenu } from 'ecCom';
import { WeaScope, WeaInput, WeaInputNumber, WeaSearchGroup, WeaTab, WeaError, WeaHelpfulTip } from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;
import { Button, Table, Modal, message } from 'antd';
import { observable, toJS, } from "mobx";
import { WeaForm } from 'comsMobx';
import $ from 'jquery';
@observer
export default class QuickSearchDetail extends React.Component {
constructor(props) {
super(props);
}
onSelectChange = (keys, rows) => {
let keyarr = [];
rows.map(row => {
keyarr.push(row.key);
});
const { quickSearch } = this.props;
quickSearch.qcDetailRowKeys = keyarr;
}
save = () => {
const { quickSearch } = this.props;
quickSearch.saveQuickSearchDetailInfo();
}
closeDialog = () => {
const { quickSearch } = this.props;
quickSearch.quickSearchDetailVisable = false;
}
getSearchButton = () => {
const { quickSearch } = this.props;
const buttons = new Array();
buttons.push();
buttons.push();
return buttons;
}
addRow = () => {
// const { CubeListStore } = this.props;
// let { quickSearchDetailData } = CubeListStore;
// let datas = quickSearchDetailData;
// let time = new Date().getTime();
// let obj = {
// key: "new_" + time,
// customname: '',
// orderid: 0,
// minnum: '',
// maxnum: '',
// type: CubeListStore.qcData.qcType,
// fieldid: CubeListStore.qcData.fieldid,
// customid: CubeListStore.customid
// }
// datas = toJS(datas);
// datas.push(obj);
// CubeListStore.setQuickSearchDetailData(datas);
}
delRow = () => {
// const { CubeListStore } = this.props;
// let { qcDetailRowKeys } = CubeListStore;
// if (qcDetailRowKeys.length <= 0) {
// message.error(getLabel(22346, '请选择要删除的信息', 'label'));
// return;
// }
// const that = this;
// Modal.confirm({
// title: getLabel(83601, '您确认要删除选中的记录吗?'),
// onOk() {
// let datas = CubeListStore.quickSearchDetailData;
// datas = toJS(datas);
// datas = that.delFromArray(datas, qcDetailRowKeys);
// CubeListStore.qcDetailRowKeys = [];
// CubeListStore.setQuickSearchDetailData(datas);
// },
// onCancel() { },
// });
}
render() {
const { quickSearch: store } = this.props, {
qcDetailRowKeys
} = store;
const rowSelection = {
qcDetailRowKeys,
onChange: this.onSelectChange,
}
const Height = $(".wea-dialog-body")[0] && $(".wea-dialog-body")[0].style.height;
const buttons = [
,
]
return (