diff --git a/web/client/src/sections/fillion/components/highways/highwaysdata.js b/web/client/src/sections/fillion/components/highways/highwaysdata.js index e25fb43b..70d10754 100644 --- a/web/client/src/sections/fillion/components/highways/highwaysdata.js +++ b/web/client/src/sections/fillion/components/highways/highwaysdata.js @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Form, Spin, Table } from 'antd'; import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form'; -import { putOperaTional,putHighways } from "../../actions/infor" +import { putOperaTional,putHighways,putShippingList } from "../../actions/infor" import _ from 'lodash' const HightModal = (props) => { @@ -32,6 +32,14 @@ const HightModal = (props) => { }) return true + } if (rewkeys === 'freight') { + setDelet(values) + const query = { ...values, id:recortd?.id } + dispatch(putShippingList(query)).then((res) => { + setSuccess(res.success) + }) + return true + } if (rewkeys === 'highways') { setDelet(values) diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js index 39f2dbe1..17cae8d8 100644 --- a/web/client/src/sections/fillion/components/operationalTable.js +++ b/web/client/src/sections/fillion/components/operationalTable.js @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { Spin, Button, Popconfirm, Badge } from 'antd'; import ProTable from '@ant-design/pro-table'; import './protable.less' -import { getOperaTional, getSpecificVehicle, getHouseholds, delSpecificVehicle, delHouseholds,getShippingList } from "../actions/infor" +import { getOperaTional, getSpecificVehicle, getHouseholds, delSpecificVehicle, delHouseholds, getShippingList } from "../actions/infor" import UserModal from './infor/details'; import HightModal from './highways/highwaysdata'; @@ -62,22 +62,6 @@ const OperaTionalTable = (props) => { setModalRecord(null); } } - //批量导出 - const exports = (ids, counts) => { - // console.log(user); - let reportIds = []; - if (ids.length) - reportIds = ids - else - reportIds = (counts || {}).ids || []; - superagent.post('/_report/http') - .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { - const resTextIs = res.text.split('/').pop() - window.open( - '/_api/' + - `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) - }) - } const columns = { tab1: [ { @@ -185,7 +169,7 @@ const OperaTionalTable = (props) => { }, ], - tab3: [ + tab3: [ { title: '业户名称', dataIndex: 'placeName', @@ -1914,7 +1898,7 @@ const OperaTionalTable = (props) => { { setRewkeys('keyun') }}>客运{activeKey === 'tab1'}, }, - { + { key: 'tab2', label: { setRewkeys('huoyun') @@ -1970,7 +1954,7 @@ const OperaTionalTable = (props) => { rowKey='id' // alwaysShowAlert // tableAlertRender={true} - rowSelection={rewkeys == 'keyun'||rewkeys == 'huoyun' ? false : { + rowSelection={rewkeys == 'keyun' || rewkeys == 'huoyun' ? false : { selectedRowKeys: rowSelected, onChange: (selectedRowKeys) => { setRowSelected(selectedRowKeys); @@ -1992,7 +1976,7 @@ const OperaTionalTable = (props) => { ...res, total: res.payload.data ? res.payload.data.count : 0 } - }if (rewkeys == 'huoyun') { + } if (rewkeys == 'huoyun') { const query = {} setRowSelected([]); const res = await dispatch(getShippingList(query)); @@ -2074,7 +2058,7 @@ const OperaTionalTable = (props) => { onVisibleChange={setModalVisibleyilan} modalRecord={modalRecord} typecard={typecard} - rewkeys={'passenger'} + rewkeys={rewkeys=='keyun'?'passenger':'freight'} recortd={recortd} setDelet={setDelet} setRecortd={setRecortd}