xingyongchun 2 years ago
parent
commit
6fc3f0d2da
  1. 10
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  2. 30
      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 { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form'; 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' import _ from 'lodash'
const HightModal = (props) => { const HightModal = (props) => {
@ -32,6 +32,14 @@ const HightModal = (props) => {
}) })
return true 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') { if (rewkeys === 'highways') {
setDelet(values) setDelet(values)

30
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 { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
import './protable.less' 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 UserModal from './infor/details';
import HightModal from './highways/highwaysdata'; import HightModal from './highways/highwaysdata';
@ -62,22 +62,6 @@ const OperaTionalTable = (props) => {
setModalRecord(null); 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 = { const columns = {
tab1: [ tab1: [
{ {
@ -185,7 +169,7 @@ const OperaTionalTable = (props) => {
}, },
], ],
tab3: [ tab3: [
{ {
title: '业户名称', title: '业户名称',
dataIndex: 'placeName', dataIndex: 'placeName',
@ -1914,7 +1898,7 @@ const OperaTionalTable = (props) => {
<ProTable <ProTable
actionRef={ref} actionRef={ref}
form={{ form={{
submitter: rewkeys === 'keyun'|| rewkeys === 'huoyun'? false : true, submitter: rewkeys === 'keyun' || rewkeys === 'huoyun' ? false : true,
}} }}
toolbar={{ toolbar={{
multipleLine: true, multipleLine: true,
@ -1930,7 +1914,7 @@ const OperaTionalTable = (props) => {
setRewkeys('keyun') setRewkeys('keyun')
}}>客运{activeKey === 'tab1'}</span>, }}>客运{activeKey === 'tab1'}</span>,
}, },
{ {
key: 'tab2', key: 'tab2',
label: <span onClick={() => { label: <span onClick={() => {
setRewkeys('huoyun') setRewkeys('huoyun')
@ -1970,7 +1954,7 @@ const OperaTionalTable = (props) => {
rowKey='id' rowKey='id'
// alwaysShowAlert // alwaysShowAlert
// tableAlertRender={true} // tableAlertRender={true}
rowSelection={rewkeys == 'keyun'||rewkeys == 'huoyun' ? false : { rowSelection={rewkeys == 'keyun' || rewkeys == 'huoyun' ? false : {
selectedRowKeys: rowSelected, selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => { onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys); setRowSelected(selectedRowKeys);
@ -1992,7 +1976,7 @@ const OperaTionalTable = (props) => {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
} }
}if (rewkeys == 'huoyun') { } if (rewkeys == 'huoyun') {
const query = {} const query = {}
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getShippingList(query)); const res = await dispatch(getShippingList(query));
@ -2074,7 +2058,7 @@ const OperaTionalTable = (props) => {
onVisibleChange={setModalVisibleyilan} onVisibleChange={setModalVisibleyilan}
modalRecord={modalRecord} modalRecord={modalRecord}
typecard={typecard} typecard={typecard}
rewkeys={'passenger'} rewkeys={rewkeys=='keyun'?'passenger':'freight'}
recortd={recortd} recortd={recortd}
setDelet={setDelet} setDelet={setDelet}
setRecortd={setRecortd} setRecortd={setRecortd}

Loading…
Cancel
Save