import 'antd/es/button/style';
import _Button from 'antd/es/button';
import { b as __awaiter, c as __generator } from './index.js';
import { BF_Wrap2, MyBaseList } from '@lm_fe/pages';
import { getMomentRange, formatDate, request } from '@lm_fe/utils';
import React__default from 'react';
import { defineFormConfig } from '@lm_fe/service';
import '@lm_fe/env';
import 'antd/es/tabs/style';
import 'antd/es/tabs';
import 'lodash/size';
import 'lodash/get';
import 'lodash/orderBy';
import 'lodash/map';
import '@lm_fe/components';
import 'antd/es/collapse/style';
import 'antd/es/collapse';
import 'antd/es/badge/style';
import 'antd/es/badge';
import 'lodash/assign';
import '@ant-design/icons';
import '@lm_fe/components_m';
var form_config = defineFormConfig([{
  title: '就诊卡号',
  dataIndex: 'outpatientNO'
}, {
  title: '姓名',
  dataIndex: 'name'
}, {
  title: '电话',
  dataIndex: 'telephone'
}, {
  title: '登记日期',
  dataIndex: 'registerDate'
}, {
  title: '上报时间',
  dataIndex: 'uploadDate'
}, {
  title: '上报状态',
  dataIndex: 'uploadState',
  inputType: 'MS',
  inputProps: {
    optionKey: '上报状态',
    marshal: 0
  }
}, {
  title: '结案状态',
  dataIndex: 'jaFlag',
  inputType: 'MS',
  inputProps: {
    options: '结案,未结案',
    marshal: 0
  }
}, {
  title: '上报说明',
  dataIndex: 'uploadMsg'
}]);
function BreastCancerDataReport(prop) {
  var _this = this;
  var _a = BF_Wrap2({
      default_conf: {
        title: '数据上报-乳腺癌上报',
        tableColumns: form_config,
        searchConfig: [{
          label: '登记日期',
          name: 'registerDate',
          inputType: 'rangeDate'
        }, {
          label: '就诊卡号',
          name: 'outpatientNO',
          inputType: 'Input'
        }, {
          label: '姓名',
          name: 'name',
          inputType: 'Input'
        }, {
          label: '上报状态',
          name: 'uploadState',
          inputType: 'MS',
          inputProps: {
            optionKey: '上报状态'
          }
        }]
      }
    }),
    config = _a.config,
    Wrap = _a.Wrap;
  return /*#__PURE__*/React__default.createElement(Wrap, null, /*#__PURE__*/React__default.createElement(MyBaseList, {
    name: "/api/two/cancer/screening/findAllBreastCancerReportedDataLog",
    searchParams: {},
    needChecked: true,
    useListSourceCount: true,
    initialSearchValue: {
      validateDate: getMomentRange().近一周.map(formatDate)
    },
    searchConfig: config === null || config === void 0 ? void 0 : config.searchConfig,
    showAction: false,
    showAdd: false,
    RenderBtns: function RenderBtns(ctx) {
      var selectRows = ctx.getCheckRows();
      return /*#__PURE__*/React__default.createElement(_Button.Group, null, /*#__PURE__*/React__default.createElement(_Button, {
        disabled: !selectRows.length,
        onClick: function onClick() {
          return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
              request.post('/api/dataReport/reportBreastCancerRecordFlow', {
                ids: selectRows.map(function (_) {
                  return _.id;
                })
              });
              ctx.handleSearch();
              return [2];
            });
          });
        }
      }, "\u7ED3\u6848"), /*#__PURE__*/React__default.createElement(_Button, {
        disabled: !selectRows.length,
        onClick: function onClick() {
          return __awaiter(_this, void 0, void 0, function () {
            return __generator(this, function (_a) {
              request.post('/api/dataReport/reportBreastCancerRecord', {
                ids: selectRows.map(function (_) {
                  return _.id;
                })
              });
              ctx.handleSearch();
              return [2];
            });
          });
        }
      }, "\u4E0A\u62A5"));
    },
    tableColumns: config === null || config === void 0 ? void 0 : config.tableColumns
  }));
}
export { BreastCancerDataReport as default };
//# sourceMappingURL=pages.data-report.breast-cancer.js.map
