xingyongchun 2 years ago
parent
commit
6fc3f0d2da
  1. 10
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  2. 26
      web/client/src/sections/fillion/components/operationalTable.js

10
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)

26
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: [
{
@ -1914,7 +1898,7 @@ const OperaTionalTable = (props) => {
<ProTable
actionRef={ref}
form={{
submitter: rewkeys === 'keyun'|| rewkeys === 'huoyun'? false : true,
submitter: rewkeys === 'keyun' || rewkeys === 'huoyun' ? false : true,
}}
toolbar={{
multipleLine: true,
@ -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}

Loading…
Cancel
Save