Browse Source

(*)合同明细+开票明细页面布局,待操作逻辑,数据填充

master
zmh 2 years ago
parent
commit
817d71d103
  1. 13
      web/client/src/components/setup.jsx
  2. 69
      web/client/src/sections/business/constants/index.js
  3. 199
      web/client/src/sections/business/containers/performanceReport/contractDetails.jsx
  4. 175
      web/client/src/sections/business/containers/performanceReport/importContractDetailsModal.js
  5. 175
      web/client/src/sections/business/containers/performanceReport/importInvoicingDetailsModal.js
  6. 197
      web/client/src/sections/business/containers/performanceReport/invoicingDetails.jsx

13
web/client/src/components/setup.jsx

@ -5,12 +5,13 @@ import {
Checkbox,
} from "@douyinfe/semi-ui";
function Setup (props) {
function Setup(props) {
const {
close,
tableType,
tableList,
length
length,
objWidth
} = props;
const [check, setCheck] = useState([]);
@ -22,7 +23,7 @@ function Setup (props) {
setCheck(checkItem ? JSON.parse(checkItem) : [])
ischeck();
}, []);
function ischeck (value) {
function ischeck(value) {
if (check.length >= length) {
if (check.includes(value)) {
return false;
@ -57,7 +58,7 @@ function Setup (props) {
</div>
}
visible={true}
style={{ width: 600 }}
style={{ width: objWidth?.modalWidth || 600 }}
onOk={() => {
localStorage.setItem(tableType, JSON.stringify(check));
close();
@ -82,7 +83,7 @@ function Setup (props) {
<div
key={index}
style={{
width: 550,
width: objWidth?.tableListWidth || 550,
border: "1px solid #EAEAEA",
padding: "0px 5px",
borderRadius: 4,
@ -98,7 +99,7 @@ function Setup (props) {
>
{item.title}
</div>
<div style={{ padding: "15px 12px", width: 530 }}>
<div style={{ padding: "15px 12px", width: objWidth?.listWidth || 530 }}>
{item.list?.map((itm) => {
return (
<Checkbox

69
web/client/src/sections/business/constants/index.js

@ -2,4 +2,73 @@ export const RESERVEITEM_TYPE = {
periodicStatistics: 1, //周期统计
depSummary: 2,
lostStatistic: 3
}
export const contractDetailsColumnKeys = {
a1: '年度',
a2: '序号',
a3: '编号',
a4: '简介',
a5: '合同编号',
a6: '申请日期',
a7: '收到合同日期',
a8: '合同纸质版情况',
a9: '合同电子版情况',
a10: '部门',
a11: '业务线',
a12: '销售人员',
a13: '客户名称',
a14: '项目名称',
a15: '项目类型',
a16: '合同金额',
a17: '变更后合同金额',
a18: '累计开票金额',
a19: '累计回款金额',
a20: '开票-回款',
a21: '未开票金额',
a22: '剩余合同金额',
a23: '回款率',
a24: '质保金',
a25: '质保金比例',
a26: '质保期',
a27: '发票税率金额13%',
a28: '发票税率金额9%',
a29: '发票税率金额6%',
a30: '合同付款方式',
a31: '预支提成及委外费用',
a32: '业绩折算比例',
a33: '实际业绩',
a34: '考核业绩',
a35: '验收日期',
a36: '收入确认时间',
a37: '接单年份',
a38: '接单月份',
a39: '客户属性',
a40: '客户类型',
a41: '行业',
a42: '信息来源',
a43: '客户省份',
a44: '项目所在地',
a45: '备注',
}
export const invoicingDetailsColumnKeys = {
a1: '年度',
a2: '序号',
a3: '编号',
a4: '部门',
a5: '销售人员',
a6: '合同编号',
a7: '客户名称',
a8: '项目名称',
a9: '合同金额',
a10: '变更后合同金额',
a11: '发票号码',
a12: '开票类型',
a13: '开票日期',
a14: '开票金额',
a15: '销项税额',
a16: '合计',
a17: '税率13%',
a18: '税率9%',
a19: '税率6%'
}

199
web/client/src/sections/business/containers/performanceReport/contractDetails.jsx

@ -1,18 +1,86 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { connect } from 'react-redux';
import { Table } from '@douyinfe/semi-ui';
import { Select, Input, Button, Table, Pagination, Skeleton } from '@douyinfe/semi-ui';
import { SkeletonScreen, Setup } from "$components";
import { IconSearch } from '@douyinfe/semi-icons';
import ImportContractDetailsModal from './importContractDetailsModal';
import { contractDetailsColumnKeys } from '../../constants/index';
import '../../style.less';
import moment from 'moment'
const ContractDetails = (props) => {
const { dispatch, actions } = props
const { } = actions;
const [keywordTarget, setKeywordTarget] = useState('contractNo');
const [keyword, setKeyword] = useState('');//
const [limits, setLimits] = useState()//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [tableData, setTableData] = useState([]);
const [importModalV, setImportModalV] = useState(false);
const columns = [
{
title: '序号',
dataIndex: 'index',
render: (text, record, index) => index + 1
},
];
const data = [];
const [setup, setSetup] = useState(false);//
const [setupp, setSetupp] = useState([]);//
const CONTRACTDETAILS = "contractDetails";
const renderColumns = (columnKeys) => {
let columns = [];
Object.keys(columnKeys).map(key => {
tableList[0].list.push({ name: columnKeys[key], value: key });
switch (key) {
default:
columns.push({
title: columnKeys[key], dataIndex: key, key: key,
render: (text, record) => text === 0 ? text : text ? text : '—', width: 32 + columnKeys[key].length * 16
});
break;
}
})
return columns;
}
const tableList = [{
title: '基础信息',
list: []
}];
const columns = renderColumns(contractDetailsColumnKeys);
function seachValueChange(value) {
setKeyword(value)
}
useEffect(() => {
localStorage.getItem(CONTRACTDETAILS) == null
? localStorage.setItem(
CONTRACTDETAILS,
JSON.stringify(['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a10', 'a11', 'a12', 'a13', 'a14', 'a15', 'a16'])
)
: "";
attribute();
}, []);
//
function attribute() {
const arr = localStorage.getItem(CONTRACTDETAILS)
? JSON.parse(localStorage.getItem(CONTRACTDETAILS))
: [];
let newColumns = [];
for (let i = 0; i < columns.length; i++) {
if (arr.indexOf(columns[i].key) > -1) {
newColumns.push(columns[i]);
}
}
setSetupp(newColumns);
}
useEffect(() => {
}, [query])
function handleRow(record, index) {//
if (index % 2 === 0) {
return {
style: {
background: '#FAFCFF',
}
};
} else {
return {};
}
}
const scroll = useMemo(() => ({}), []);
return (
<>
<div style={{ padding: '0px 12px' }}>
@ -23,11 +91,116 @@ const ContractDetails = (props) => {
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>合同明细表</div>
</div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px ', marginTop: 9 }}>
<Table columns={columns} dataSource={data} pagination={false} />
</div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'baseline' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>合同明细表</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>CONTRACT DETAILS</div>
</div>
</div>
<div style={{ margin: '18px 0px' }}>
<div style={{ display: 'flex', margin: '16px 0px', justifyContent: 'space-between' }}>
<div style={{ display: 'flex' }}>
<div>
<Select value={keywordTarget} onChange={setKeywordTarget} style={{ width: 150 }} >
<Select.Option value='contractNo'>合同编号</Select.Option>
<Select.Option value='department'>部门</Select.Option>
<Select.Option value='businessLine'>业务线</Select.Option>
</Select>
</div>
<div style={{ margin: '0px 18px' }}>
<Input suffix={<IconSearch />}
showClear
placeholder='请输入关键词搜索'
value={keyword}
style={{ width: 346 }}
onChange={seachValueChange}>
</Input>
</div>
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
onClick={() => {
setQuery({ limit: 10, page: 0 })
}}>查询</Button>
</div>
<div style={{ display: 'flex', marginRight: 20 }}>
<img src="/assets/images/hrImg/newsetup.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15, marginTop: 6 }}
onClick={() => setSetup(true)}
/>
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, cursor: "pointer" }}
onClick={() => { setImportModalV(true); }}>
导入
</div>
<div style={{ padding: '6px 20px', background: '#00BA85', color: '#FFFFFF', fontSize: 14, marginLeft: 18 }}>
导出全部
</div>
</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
columns={setupp.filter((s) => s)}
dataSource={tableData}
bordered={false}
empty="暂无数据"
pagination={false}
onRow={handleRow}
scroll={scroll}
/>
</Skeleton>
<div style={{
display: "flex",
justifyContent: "space-between",
padding: "20px 20px",
}}>
<div>
</div>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条信息
</span>
<Pagination
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
}}
/>
</div>
</div>
</div>
</div>
</div>
{
importModalV ? <ImportContractDetailsModal
onCancel={() => {
setImportModalV(false);
}} /> : ''
}
</div>
{setup ? (
<Setup
tableType={CONTRACTDETAILS}
tableList={tableList}
length={45}
objWidth={{ modalWidth: 720, tableListWidth: 670, listWidth: 650 }}
close={() => {
setSetup(false);
attribute();
}}
/>
) : (
""
)}
</>
)
}

175
web/client/src/sections/business/containers/performanceReport/importContractDetailsModal.js

@ -0,0 +1,175 @@
'use strict';
import React, { useState, useEffect } from 'react';
import { connect } from 'react-redux';
import { Modal, Form, Button, Notification } from '@douyinfe/semi-ui';
import { IconUpload } from '@douyinfe/semi-icons';
import XLSX from 'xlsx';
import { contractDetailsColumnKeys } from '../../constants/index';
//下载模板和上传文件读取
const ImportContractDetailsModal = props => {
const { dispatch, actions, onCancel } = props;
const { humanAffairs } = actions;
const [msg, setMsg] = useState('');
const [loading, setLoading] = useState('');
const [postData, setPostData] = useState([]);
//初始化
useEffect(() => {
}, []);
const confirm = () => {
if (postData.length) {
setLoading(true)
// dispatch(humanAffairs.addSalesMemberBulk(postData)).then(res => {
// if (res.success) {
// onCancel()
// }
// setLoading(false)
// })
} else {
Notification.warning({ content: '没有数据可以提交,请上传数据文件', duration: 2 })
}
}
const dldCsvMb = () => {
//表头
let head = [];
Object.keys(contractDetailsColumnKeys).map(key => {
head.push(contractDetailsColumnKeys[key]);
})
head = head.join(',') + "\n";
//数据
//let data = 1 + ',' + 2 + ',' + 3 + ',' + 4 + ',' + 5
let templateCsv = "data:text/csv;charset=utf-8,\ufeff" + head;
//创建一个a标签
let link = document.createElement("a");
//为a标签设置属性
link.setAttribute("href", templateCsv);
link.setAttribute("download", "合同明细表导入模板.csv");
//点击a标签
link.click();
}
const download = () => {
dldCsvMb();
}
const fileLimit = '.csv';
const getFileBlob = (url) => {
return new Promise((resolve, reject) => {
let request = new XMLHttpRequest()
request.open("GET", url, true)
request.responseType = "blob"
request.onreadystatechange = e => {
if (request.readyState == 4) {
if (request.status == 200) {
if (window.FileReader) {
let reader = new FileReader();
reader.readAsBinaryString(request.response);
reader.onload = event => {
try {
const { result } = event.target;
// 以二进制流方式读取得到整份excel表格对象
const workbook = XLSX.read(result, {
type: "binary",
cellDates: true,//设为true,将天数的时间戳转为时间格式
codepage: 936//解决了乱码问题
});
let data = []; // 存储获取到的数据
// 遍历每张工作表进行读取(这里默认只读取第一张表)
for (const sheet in workbook.Sheets) {
if (workbook.Sheets.hasOwnProperty(sheet)) {
data = data.concat(XLSX.utils.sheet_to_json(workbook.Sheets[sheet]));
}
}
resolve(data);//导出数据
} catch (e) {
reject("失败");
}
}
}
}
}
}
request.send();
})
}
const judgeNull = (value) => {
return value ? String(value).trim().replace(/\s*/g, "") : null;
}
return (
<Modal
title="导入" visible={true}
onOk={confirm} width={620}
confirmLoading={loading}
onCancel={() => {
setMsg('')
setLoading(false)
setPostData([])
onCancel()
}}
>
<div style={{ borderBottom: '1px solid #DCDEE0', margin: '0px -24px' }}></div>
<Form>
<Form.Upload
label={'合同明细表'} labelPosition='left'
action={'/'} accept={fileLimit}
maxSize={200} limit={1}
onRemove={(currentFile, fileList, fileItem) => {
setMsg('');
setPostData([]);
}}
customRequest={(data) => {
const { file, onSuccess, onError } = data
getFileBlob(file.url).then(res => {
const error = (msg) => {
setMsg(msg)
onError({ message: msg })
}
if (res.length > 1000) {
error('一次性上传数据行数应小于1000行,请分批上传')
return
}
if (!res.length) {
error('请填写至少一行数据')
return
}
let postData = [];
for (let i = 0; i < res.length; i++) {
let d = res[i];
let obj = {};
Object.keys(contractDetailsColumnKeys).map(key => {
obj[key] = d[contractDetailsColumnKeys[key]] || '';
})
postData.push(obj);
}
setPostData(postData)
let msg = '文件解析完成,点击确定按钮上传保存!'
setMsg(msg)
onSuccess({ message: msg })
})
}}>
<Button icon={<IconUpload />} theme="light">
请选择文件
</Button>
</Form.Upload>
<span>{msg}</span>
<div style={{ color: '#ccc' }}>最大不超过200M导入文件需与
<span onClick={() => download()} style={{ cursor: 'pointer', color: '#0066FF' }}>导入模板</span>
一致</div>
</Form>
</Modal >
)
}
function mapStateToProps(state) {
const { auth, global } = state;
return {
user: auth.user,
actions: global.actions,
}
}
export default connect(mapStateToProps)(ImportContractDetailsModal);

175
web/client/src/sections/business/containers/performanceReport/importInvoicingDetailsModal.js

@ -0,0 +1,175 @@
'use strict';
import React, { useState, useEffect } from 'react';
import { connect } from 'react-redux';
import { Modal, Form, Button, Notification } from '@douyinfe/semi-ui';
import { IconUpload } from '@douyinfe/semi-icons';
import XLSX from 'xlsx';
import { invoicingDetailsColumnKeys } from '../../constants/index';
//下载模板和上传文件读取
const ImportInvoicingDetailsModal = props => {
const { dispatch, actions, onCancel } = props;
const { humanAffairs } = actions;
const [msg, setMsg] = useState('');
const [loading, setLoading] = useState('');
const [postData, setPostData] = useState([]);
//初始化
useEffect(() => {
}, []);
const confirm = () => {
if (postData.length) {
setLoading(true)
dispatch(humanAffairs.addSalesMemberBulk(postData)).then(res => {
if (res.success) {
onCancel()
}
setLoading(false)
})
} else {
Notification.warning({ content: '没有数据可以提交,请上传数据文件', duration: 2 })
}
}
const dldCsvMb = () => {
//表头
let head = [];
Object.keys(invoicingDetailsColumnKeys).map(key => {
head.push(invoicingDetailsColumnKeys[key]);
})
head = head.join(',') + "\n";
//数据
//let data = 1 + ',' + 2 + ',' + 3 + ',' + 4 + ',' + 5
let templateCsv = "data:text/csv;charset=utf-8,\ufeff" + head;
//创建一个a标签
let link = document.createElement("a");
//为a标签设置属性
link.setAttribute("href", templateCsv);
link.setAttribute("download", "开票明细表导入模板.csv");
//点击a标签
link.click();
}
const download = () => {
dldCsvMb();
}
const fileLimit = '.csv';
const getFileBlob = (url) => {
return new Promise((resolve, reject) => {
let request = new XMLHttpRequest()
request.open("GET", url, true)
request.responseType = "blob"
request.onreadystatechange = e => {
if (request.readyState == 4) {
if (request.status == 200) {
if (window.FileReader) {
let reader = new FileReader();
reader.readAsBinaryString(request.response);
reader.onload = event => {
try {
const { result } = event.target;
// 以二进制流方式读取得到整份excel表格对象
const workbook = XLSX.read(result, {
type: "binary",
cellDates: true,//设为true,将天数的时间戳转为时间格式
codepage: 936//解决了乱码问题
});
let data = []; // 存储获取到的数据
// 遍历每张工作表进行读取(这里默认只读取第一张表)
for (const sheet in workbook.Sheets) {
if (workbook.Sheets.hasOwnProperty(sheet)) {
data = data.concat(XLSX.utils.sheet_to_json(workbook.Sheets[sheet]));
}
}
resolve(data);//导出数据
} catch (e) {
reject("失败");
}
}
}
}
}
}
request.send();
})
}
const judgeNull = (value) => {
return value ? String(value).trim().replace(/\s*/g, "") : null;
}
return (
<Modal
title="导入" visible={true}
onOk={confirm} width={620}
confirmLoading={loading}
onCancel={() => {
setMsg('')
setLoading(false)
setPostData([])
onCancel()
}}
>
<div style={{ borderBottom: '1px solid #DCDEE0', margin: '0px -24px' }}></div>
<Form>
<Form.Upload
label={'开票明细表'} labelPosition='left'
action={'/'} accept={fileLimit}
maxSize={200} limit={1}
onRemove={(currentFile, fileList, fileItem) => {
setMsg('');
setPostData([]);
}}
customRequest={(data) => {
const { file, onSuccess, onError } = data
getFileBlob(file.url).then(res => {
const error = (msg) => {
setMsg(msg)
onError({ message: msg })
}
if (res.length > 1000) {
error('一次性上传数据行数应小于1000行,请分批上传')
return
}
if (!res.length) {
error('请填写至少一行数据')
return
}
let postData = [];
for (let i = 0; i < res.length; i++) {
let d = res[i];
let obj = {};
Object.keys(invoicingDetailsColumnKeys).map(key => {
obj[key] = d[invoicingDetailsColumnKeys[key]] || '';
})
postData.push(obj);
}
setPostData(postData)
let msg = '文件解析完成,点击确定按钮上传保存!'
setMsg(msg)
onSuccess({ message: msg })
})
}}>
<Button icon={<IconUpload />} theme="light">
请选择文件
</Button>
</Form.Upload>
<span>{msg}</span>
<div style={{ color: '#ccc' }}>最大不超过200M导入文件需与
<span onClick={() => download()} style={{ cursor: 'pointer', color: '#0066FF' }}>导入模板</span>
一致</div>
</Form>
</Modal >
)
}
function mapStateToProps(state) {
const { auth, global } = state;
return {
user: auth.user,
actions: global.actions,
}
}
export default connect(mapStateToProps)(ImportInvoicingDetailsModal);

197
web/client/src/sections/business/containers/performanceReport/invoicingDetails.jsx

@ -1,18 +1,86 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { connect } from 'react-redux';
import { Table } from '@douyinfe/semi-ui';
import { Select, Input, Button, Table, Pagination, Skeleton } from '@douyinfe/semi-ui';
import { SkeletonScreen, Setup } from "$components";
import { IconSearch } from '@douyinfe/semi-icons';
import ImportInvoicingDetailsModal from './importInvoicingDetailsModal';
import { invoicingDetailsColumnKeys } from '../../constants/index';
import '../../style.less';
import moment from 'moment'
const InvoicingDetails = (props) => {
const { dispatch, actions } = props
const { } = actions;
const [keywordTarget, setKeywordTarget] = useState('contractNo');
const [keyword, setKeyword] = useState('');//
const [limits, setLimits] = useState()//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [tableData, setTableData] = useState([]);
const [importModalV, setImportModalV] = useState(false);
const columns = [
{
title: '序号',
dataIndex: 'index',
render: (text, record, index) => index + 1
},
];
const data = [];
const [setup, setSetup] = useState(false);//
const [setupp, setSetupp] = useState([]);//
const INVOICINGDETAILS = "invoicingDetails";
const renderColumns = (columnKeys) => {
let columns = [];
Object.keys(columnKeys).map(key => {
tableList[0].list.push({ name: columnKeys[key], value: key });
switch (key) {
default:
columns.push({
title: columnKeys[key], dataIndex: key, key: key,
render: (text, record) => text === 0 ? text : text ? text : '—', width: 32 + columnKeys[key].length * 16
});
break;
}
})
return columns;
}
const tableList = [{
title: '基础信息',
list: []
}];
const columns = renderColumns(invoicingDetailsColumnKeys);
function seachValueChange(value) {
setKeyword(value)
}
useEffect(() => {
localStorage.getItem(INVOICINGDETAILS) == null
? localStorage.setItem(
INVOICINGDETAILS,
JSON.stringify(['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a10', 'a11', 'a13'])
)
: "";
attribute();
}, []);
//
function attribute() {
const arr = localStorage.getItem(INVOICINGDETAILS)
? JSON.parse(localStorage.getItem(INVOICINGDETAILS))
: [];
let newColumns = [];
for (let i = 0; i < columns.length; i++) {
if (arr.indexOf(columns[i].key) > -1) {
newColumns.push(columns[i]);
}
}
setSetupp(newColumns);
}
useEffect(() => {
}, [query])
function handleRow(record, index) {//
if (index % 2 === 0) {
return {
style: {
background: '#FAFCFF',
}
};
} else {
return {};
}
}
const scroll = useMemo(() => ({}), []);
return (
<>
<div style={{ padding: '0px 12px' }}>
@ -23,11 +91,114 @@ const InvoicingDetails = (props) => {
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>开票明细表</div>
</div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px ', marginTop: 9 }}>
<Table columns={columns} dataSource={data} pagination={false} />
</div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'baseline' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>开票明细表</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>INVOICING DETAILS</div>
</div>
</div>
<div style={{ margin: '18px 0px' }}>
<div style={{ display: 'flex', margin: '16px 0px', justifyContent: 'space-between' }}>
<div style={{ display: 'flex' }}>
<div>
<Select value={keywordTarget} onChange={setKeywordTarget} style={{ width: 150 }} >
<Select.Option value='contractNo'>合同编号</Select.Option>
<Select.Option value='invoiceNo'>发票号码</Select.Option>
</Select>
</div>
<div style={{ margin: '0px 18px' }}>
<Input suffix={<IconSearch />}
showClear
placeholder='请输入关键词搜索'
value={keyword}
style={{ width: 346 }}
onChange={seachValueChange}>
</Input>
</div>
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
onClick={() => {
setQuery({ limit: 10, page: 0 })
}}>查询</Button>
</div>
<div style={{ display: 'flex', marginRight: 20 }}>
<img src="/assets/images/hrImg/newsetup.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15, marginTop: 6 }}
onClick={() => setSetup(true)}
/>
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, cursor: "pointer" }}
onClick={() => { setImportModalV(true); }}>
导入
</div>
<div style={{ padding: '6px 20px', background: '#00BA85', color: '#FFFFFF', fontSize: 14, marginLeft: 18 }}>
导出全部
</div>
</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
columns={setupp.filter((s) => s)}
dataSource={tableData}
bordered={false}
empty="暂无数据"
pagination={false}
onRow={handleRow}
scroll={scroll}
/>
</Skeleton>
<div style={{
display: "flex",
justifyContent: "space-between",
padding: "20px 20px",
}}>
<div>
</div>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条信息
</span>
<Pagination
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
}}
/>
</div>
</div>
</div>
</div>
</div>
{
importModalV ? <ImportInvoicingDetailsModal
onCancel={() => {
setImportModalV(false);
}} /> : ''
}
</div>
{setup ? (
<Setup
tableType={INVOICINGDETAILS}
tableList={tableList}
length={19}
close={() => {
setSetup(false);
attribute();
}}
/>
) : (
""
)}
</>
)
}

Loading…
Cancel
Save