1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147 |
- import React from "react";
- import $ from "jquery/src/ajax";
- import moment from "moment";
- import {
- Button,
- Form,
- Input,
- Spin,
- Table,
- Select,
- message,
- Tabs,
- Tag,
- Tooltip,
- DatePicker,
- Modal,
- } from "antd";
- import { ChooseList } from "../../order/orderNew/chooseList";
- import { ShowModal, splitUrl, getAccountName, getVehicleName, getTypeName, commonAdd } from "../../../tools"
- import ShowModalDiv from "@/showModal.jsx";
- import ImgList from "../../../common/imgList";
- import { accountType, accountStatus } from "@/dataDic";
- const FormItem = Form.Item;
- const { RangePicker } = DatePicker;
- const { TabPane } = Tabs;
- const AccountReview = React.createClass({
- getInitialState() {
- return {
- showDetails: false,
- data: {},
- logvisible: false,
- logdataSour: [],
- visible: "",
- reason: "",
- checkData: {},
- searchValues: {}, // 列表筛选条件
- loading: false, //加载动画
- changeList: undefined, // 更改后的表格显示数据
- dataSource: [], // 列表数据
- departmentArr: [],
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return "共" + total + "条数据";
- },
- },
- columns: [
- {
- title: "类型",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- return (
- <span>
- {accountType.find(item => item.value === text).label}
- </span>
- );
- },
- },
- {
- title: "报销金额(元)",
- dataIndex: "totalAmount",
- key: "totalAmount",
- },
- {
- title: "报销至订单",
- dataIndex: "buyerName",
- key: "buyerName",
- render: (text, record) => {
- return (
- record.targetType == 0
- ? <div>固定费用</div>
- : <div>
- <div>{text || ""}</div>
- <div>{record.contractNo || ""}</div>
- </div>
- );
- },
- },
- {
- title: "报销至部门",
- dataIndex: "appDepName",
- key: "appDepName",
- render: (text, record) => {
- return (
- <span>{record.targetType == 0 && text}</span>
- );
- },
- },
- {
- title: "报销人",
- dataIndex: "aname",
- key: "aname",
- },
- {
- title: "财务负责人",
- dataIndex: "financeName",
- key: "financeName",
- },
- {
- title: "状态",
- dataIndex: "status",
- key: "status",
- render: (text, record) => {
- return (
- <span style={{ color: accountStatus[text].color }}>
- {accountStatus[text].label}
- </span>
- );
- },
- },
- {
- title: "报销公司/支付公司",
- dataIndex: "payDepName",
- key: "payDepName",
- render: (text, record) => {
- return (
- <div>
- <div>{record.appDepName || ""}</div>
- <div>{text || ""}</div>
- </div>
- );
- },
- },
- {
- title: "报销时间",
- dataIndex: "createTimeStr",
- key: "createTimeStr",
- },
- {
- title: "操作",
- dataIndex: "operate",
- key: "operate",
- render: (text, record) => {
- return (
- <div>
- {this.props.isOperate &&
- <div>
- <Button type="primary"
- style={{ margin: 4 }}
- onClick={() => { this.download(record.attachmentUrl) }}
- >下载附件</Button>
- </div>}
- <div>
- {this.props.isOperate && record.examine == 1 &&
- <Button type="primary"
- style={{ margin: 4 }}
- onClick={(e) => {
- e.stopPropagation();
- this.setState({
- visible: "adopt",
- checkData: record,
- })
- }}
- >同意</Button>}
- {this.props.isOperate && record.examine == 1 &&
- <Button type="danger"
- style={{ margin: 4 }}
- onClick={(e) => {
- e.stopPropagation();
- this.setState({
- visible: "reject",
- checkData: record,
- })
- }}
- >驳回</Button>}
- {record.status != 0 && <Button
- style={{ margin: 4 }}
- onClick={() => {
- this.setState({
- logvisible: true
- })
- this.getLogData(record.id)
- }}>日志</Button>}
- </div>
- </div>
- )
- }
- },
- ],
- logcolumns: [
- {
- title: "审核人",
- dataIndex: "auditorName",
- key: "auditorName"
- },
- {
- title: "操作",
- dataIndex: "status",
- key: "status",
- width: 120,
- render: (text, record) => {
- return (
- <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][text] }}>
- {["【发起】", "【通过】", "【完成】", "【驳回】", "【重新发起】"][text]}
- {this.state.processStatus == record.processStatus && !record.id &&
- <span style={{ color: "#FFA500" }}> 审核中...</span>}
- </span>
- );
- },
- },
- {
- title: "操作时间",
- dataIndex: "createTimeStr",
- key: "createTimeStr",
- width: 88,
- },
- {
- title: "备注",
- dataIndex: "remarks",
- key: "remarks",
- render: (text, record) => {
- return (
- <div style={{ minWidth: 250 }}>{text}</div>
- )
- }
- }
- ]
- };
- },
- componentWillMount() {
- this.departmentList();
- this.loadData();
- },
- // 列表接口
- loadData(pageNo) {
- const { searchValues, pagination } = this.state;
- this.setState({
- loading: true,
- });
- let datas = Object.assign(searchValues, {
- pageNo: pageNo || 1,
- pageSize: pagination.pageSize,
- processStatus: this.props.isOperate ? 1 : undefined,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/pageList",
- data: datas,
- success: function (data) {
- ShowModal(this);
- this.setState({
- loading: false,
- });
- if (data.error && data.error.length === 0) {
- if (data.data.list) {
- pagination.current = data.data.pageNo;
- pagination.total = data.data.totalCount;
- if (data.data && data.data.list && !data.data.list.length) {
- pagination.current = 0;
- pagination.total = 0;
- }
- this.setState({
- dataSource: data.data.list,
- pagination: this.state.pagination,
- pageNo: data.data.pageNo,
- totalAmount: data.data.totalAmount,
- });
- } else {
- this.setState({
- dataSource: data.data,
- pagination: false,
- });
- }
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 日志
- getLogData(eaid) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/log/list",
- data: { eaid },
- success: function (data) {
- if (data.error.length === 0) {
- this.setState({
- logdataSour: data.data || []
- });
- this.isHere(data.data || [])
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- }).always(
- function () {
- }.bind(this)
- );
- },
- //
- isHere(list = []) {
- for (var i = 0; i < list.length; i++) {
- if (!list[i].id) {
- this.setState({
- processStatus: list[i].processStatus
- })
- return
- }
- }
- },
- download(urls) {
- if (!urls) {
- message.error("暂无可下载的附件!");
- } else {
- let list = urls.split(',') || []
- list.forEach(e => {
- var aLink = document.createElement('a');
- aLink.download = e;
- aLink.href = globalConfig.context + `/open/download?fileName=${e}&delete=false`;
- document.body.appendChild(aLink);
- aLink.click();
- document.body.removeChild(aLink);
- });
- }
- },
- departmentList() {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectSuperId",
- data: {},
- success: function (data) {
- let thedata = data.data;
- let theArr = [];
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- thedata.map(function (item, index) {
- theArr.push({
- key: index,
- name: item.name,
- id: item.id
- });
- });
- }
- this.setState({
- departmentArr: theArr
- });
- }.bind(this)
- }).always(
- function () {
- }.bind(this)
- );
- },
- // 审核
- toExamine(num) {
- const { checkData, reason } = this.state
- if (!reason) {
- message.warning("请填写审核说明~");
- return;
- }
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/examine",
- data: {
- id: checkData.id,
- reason,
- status: num,//1同意 3驳回
- },
- }).done(
- function (data) {
- if (!data.error.length) {
- message.success("审核成功!");
- this.setState({
- visible: "",
- reason: "",
- showDetails: false,
- checkData: {},
- });
- this.loadData()
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- tableRowClick(e) {
- this.setState({
- showDetails: true
- })
- this.getDetails(e.id)
- this.getAccountList(e.id)
- },
- // 报销信息详情
- getDetails(id) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/selectById",
- data: { id, },
- success: function (data) {
- if (data.error.length === 0) {
- this.setState({
- data: data.data,
- imgs: data.data.attachmentUrl
- ? splitUrl(data.data.attachmentUrl, ",", globalConfig.avatarHost + "/upload")
- : [],
- })
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 报销费用详情
- getAccountList(eaid) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/details/list",
- data: { eaid, },
- success: function (data) {
- if (data.error.length === 0) {
- let sum = 0
- for (var i = 0; i < data.data.length; i++) {
- sum = commonAdd(sum, data.data[i].amount)
- }
- this.setState({
- list: data.data,
- total: sum,
- })
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 搜索
- search() {
- this.loadData();
- },
- // 重置
- reset() {
- this.setState({
- searchValues: JSON.parse(JSON.stringify({})),
- }, () => {
- this.loadData();
- })
- },
- changeList(arr) {
- const newArr = [];
- this.state.columns.forEach((item) => {
- arr.forEach((val) => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr,
- });
- },
- render() {
- const { TextArea } = Input
- const { searchValues, data, visible, list = [], total } = this.state
- const formItemLayout = {
- labelCol: { span: 10 },
- wrapperCol: { span: 14 },
- };
- return (
- <div className="user-content">
- <ShowModalDiv ShowModal={this.state.showModal} />
- <div className="content-title" style={{ marginBottom: 10 }}>
- <span style={{ fontWeight: 900, fontSize: 16 }}>{this.props.isOperate ? "报销审核" : "报销列表"}</span>
- </div>
- <Tabs defaultActiveKey="2" className="test">
- <TabPane tab="搜索" key="2">
- <div className="user-search" style={{ marginLeft: 10 }}>
- <Input
- placeholder="合同编号"
- value={searchValues["contractNo"]
- ? searchValues["contractNo"]
- : ""}
- onChange={(e) => {
- searchValues["contractNo"] = e.target.value;
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- <Input
- placeholder="客户名称"
- value={searchValues["username"]
- ? searchValues["username"]
- : ""}
- onChange={(e) => {
- searchValues["username"] = e.target.value;
- this.setState({
- searchValues: searchValues,
- });
- }}
- />
- <Select
- placeholder="所属部门"
- style={{ width: 200, marginRight: 10 }}
- value={searchValues["depId"]
- ? searchValues["depId"]
- : undefined}
- onChange={e => {
- searchValues["depId"] = e;
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {this.state.departmentArr.map(function (item) {
- return <Select.Option key={item.id}>{item.name}</Select.Option>;
- })}
- </Select>
- <Select
- placeholder="申请部门"
- style={{ width: 200, marginRight: 10 }}
- value={searchValues["applyDep"]
- ? searchValues["applyDep"]
- : undefined}
- onChange={e => {
- searchValues["applyDep"] = e;
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {this.state.departmentArr.map(function (item) {
- return <Select.Option key={item.id}>{item.name}</Select.Option>;
- })}
- </Select>
- <Select
- placeholder="支付部门"
- style={{ width: 200, marginRight: 10 }}
- value={searchValues["payDep"]
- ? searchValues["payDep"]
- : undefined}
- onChange={e => {
- searchValues["payDep"] = e;
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- {this.state.departmentArr.map(function (item) {
- return <Select.Option key={item.id}>{item.name}</Select.Option>;
- })}
- </Select>
- <Select
- style={{ width: 120 }}
- placeholder="审核状态"
- value={searchValues["examineStatus"]
- ? searchValues["examineStatus"]
- : undefined}
- onChange={(e) => {
- searchValues["examineStatus"] = e;
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="0">待审核</Option>
- <Option value="1">已审核</Option>
- </Select>
- <span>报销时间:</span>
- <RangePicker
- style={{ width: 300 }}
- value={[
- searchValues.startTime ? moment(searchValues.startTime) : null,
- searchValues.endTime ? moment(searchValues.endTime) : null,
- ]}
- onChange={(data, dataString) => {
- this.setState({
- searchValues: Object.assign(searchValues, {
- startTime: dataString[0],
- endTime: dataString[1],
- }),
- });
- }}
- />
- <Button
- type="primary"
- onClick={this.search}
- style={{ marginLeft: 10 }}
- >
- 搜索
- </Button>
- <Button onClick={this.reset}>重置</Button>
- </div>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="1">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- />
- </div>
- </TabPane>
- </Tabs>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table
- bordered
- columns={
- this.state.changeList == undefined
- ? this.state.columns
- : this.state.changeList
- }
- dataSource={this.state.dataSource}
- pagination={this.state.pagination}
- onRowDoubleClick={this.tableRowClick.bind(this)}
- size="small"
- />
- </Spin>
- <p
- style={{ display: "inline-block", fontSize: "14px", color: "red" }}
- >
- {
- <span style={{ marginRight: 10 }}>
- {`金额总计(元):${this.state.totalAmount}`}
- </span>
- }
- </p>
- </div>
- {
- //审核弹窗
- this.state.visible != "" &&
- <Modal
- width="400px"
- maskClosable={false}
- title="审核"
- confirmLoading={this.state.loading}
- visible={this.state.visible != ""}
- onOk={() => { this.toExamine(visible == "adopt" ? 1 : visible == "reject" && 3) }}
- okText={this.state.visible == "adopt" ? "通过" : this.state.visible == "reject" && "驳回"}
- onCancel={() => {
- this.setState({
- visible: '',
- reason: "",
- checkData: {},
- })
- }}
- >
- <TextArea
- rows={4}
- value={this.state.reason}
- onChange={(e) => {
- this.setState({
- reason: e.target.value,
- })
- }}
- placeholder="请填写审核内容"
- />
- </Modal>
- }
- {
- // 报销详情
- this.state.showDetails &&
- <Modal
- maskClosable={false}
- visible={this.state.showDetails}
- onOk={false}
- onCancel={() => { this.setState({ showDetails: false }) }}
- width="800px"
- title='报销详情'
- footer=""
- >
- <div>
- <Form layout="horizontal" id="demand-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- {data.type == 1 &&
- <div>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="公出企业"
- >
- <span>{data.userNames}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="公出地点"
- >
- <span>{data.districtName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="时间"
- >
- <span>{data.releaseStartStr} 至 {data.releaseEndStr}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="公出时长"
- >
- <span>{data.duration}小时</span>
- </FormItem>
- </div>}
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="申请类型"
- >
- <span>{getAccountName(data.type, data.typeOther)}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="报销至订单"
- >
- <div>
- <div>{data.buyerName}</div>
- <div>{data.contractNo}</div>
- </div>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="报销人"
- >
- <span>{data.aname}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="报销公司"
- >
- <span>{data.appDepName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="支付公司"
- >
- <span>{data.payDepName}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 18 }}
- label="报销事由"
- >
- <p style={{ maxWidth: 500, wordWrap: "break-word" }}>
- {data.remarks}
- </p>
- </FormItem>
- </div>
- {/* 差旅费显示 */}
- {data.type == 1 &&
- list.length > 0 && list.map(item =>
- item.type == 1
- ? <div className="clearfix" style={{ border: "1px solid #333", marginBottom: 1 }}>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="交通工具"
- >
- <span>
- {getVehicleName(item.vehicle, item.vehicleOther)}
-
- {!!item.startDistrict && <span>({item.startDistrict} ⇀ {item.endDistrict})</span>}
- </span>
- </FormItem>
- {/* <FormItem
- className="half-item"
- {...formItemLayout}
- label="地点"
- >
- <span>{item.startDistrict}
- <span> ⇀ </span>
- {item.endDistrict}</span>
- </FormItem> */}
- <div className="clearfix" style={{ marginBottom: "-10px" }}>
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 18 }}
- label="时间"
- >
- <span>{item.startTimeStr} 至 {item.endTimeStr}</span>
- </FormItem>
- </div>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="交通费"
- >
- <span>{item.amount}(元)</span>
- </FormItem>
- </div>
- : <div className="clearfix" style={{ border: "1px solid #333", marginBottom: 1 }}>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={getTypeName(item.type)}
- >
- <span>{item.amount}(元)</span>
- </FormItem>
- </div>
- )
- }
- {/* 通用 */}
- {(data.type == 0 || data.type == 2 || data.type == 4 || data.type == 5) &&
- list.length > 0 && list.map(item =>
- <div className="clearfix" style={{ border: "1px solid #333", marginBottom: 1 }}>
- {!!item.agreeTimeStr &&
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={data.type == 5 ? "支付时间:" : "需付款时间:"}
- >
- <span>{item.agreeTimeStr.slice(0, 10)}</span>
- </FormItem>}
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={data.type == 4
- ? "预借支金额:" : data.type == 5
- ? "抵扣金额:" : "金额:"}
- >
- <span>{item.amount}(元)</span>
- </FormItem>
- </div>
- )
- }
- {/* 第三方付款 */}
- {data.type == 3 &&
- list.length > 0 && list.map(item =>
- <div className="clearfix" style={{ border: "1px solid #333", marginBottom: 1 }}>
- {!!item.agreeTimeStr &&
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="需付款时间"
- >
- <span>{item.agreeTimeStr.slice(0, 10)}</span>
- </FormItem>
- }
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="付款方式"
- >
- <span>{["公对公转账"][item.payType]}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="发票类型"
- >
- <span>{["普票", "专票"][item.invoiceType]}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="发票号"
- >
- <span>{item.invoiceNo}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="付款单位"
- >
- <span>{item.payerName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="开户银行"
- >
- <span>{item.openBank}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="银行账户"
- >
- <span>{item.bankAccounts}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="开户行地址"
- >
- <span>{item.openBankAddress}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="金额(元)"
- >
- <span>{item.amount}</span>
- </FormItem>
- </div>
- )
- }
- {data.type != 4 && data.debitTotalAmount &&
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="预借支"
- >
- <span style={{ color: "red" }}>{data.debitTotalAmount}(元)</span>
- </FormItem>
- </div>}
- {data.type != 4 && data.type != 5 &&
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="总金额"
- >
- <span style={{ color: "red" }}>{total}(元)</span>
- </FormItem>
- </div>}
- {data.type != 4 && data.type != 5 &&
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="实报金额"
- >
- <span style={{ color: "red" }}>{(total > data.debitTotalAmount) ? commonAdd(total, -data.debitTotalAmount) : 0}(元)</span>
- </FormItem>
- </div>}
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 18 }}
- label="附件"
- >
- <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
- {this.state.imgs ? <ImgList fileList={this.state.imgs} ItemWidth={'96px'} /> : <div />}
- </div>
- </FormItem>
- </div>
- {data.type != 3 && data.type != 5 &&
- <div className="clearfix" style={{ border: "1px dashed #000" }}>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="收款人"
- >
- <span>{data.name}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="收款银行"
- >
- <span>{data.bank}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="收款账户"
- >
- <span>{data.accounts}</span>
- </FormItem>
- </div>}
- <div className="clearfix" style={{ marginTop: 20 }}>
- <Button
- type="primary"
- style={{
- float: "right",
- }}
- onClick={() => {
- this.setState({
- logvisible: true
- })
- this.getLogData(data.id)
- }}
- >
- 查看日志
- </Button>
- </div>
- {this.props.isOperate && data.examine == 1 &&
- <div className="clearfix"
- style={{ width: 500, margin: "20px auto" }}>
- <TextArea
- rows={4}
- value={this.state.reason}
- onChange={(e) => {
- this.setState({
- reason: e.target.value,
- })
- }}
- placeholder="请填写审核内容"
- />
- <div
- style={{
- width: 250,
- display: "flex",
- justifyContent: "space-between",
- margin: "20px auto 0"
- }}
- >
- <Button type="primary"
- style={{ margin: 4 }}
- onClick={(e) => {
- this.setState({
- checkData: data
- }, () => {
- this.toExamine(1)
- })
- }}
- >同意</Button>
- <Button type="danger"
- style={{ margin: 4 }}
- onClick={(e) => {
- this.setState({
- checkData: data
- }, () => {
- this.toExamine(3)
- })
- }}
- >驳回</Button>
- </div>
- </div>
- }
- </Spin>
- </Form>
- </div>
- </Modal>
- }
- {
- // 审核日志
- this.state.logvisible &&
- <Modal
- visible={this.state.logvisible}
- className="admin-desc-content"
- width="800px"
- maskClosable={false}
- title="审核日志"
- footer={null}
- onCancel={() => {
- this.setState({
- logvisible: false,
- logdataSour: []
- })
- }}
- >
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.logcolumns}
- dataSource={this.state.logdataSour}
- pagination={false}
- bordered
- size="small"
- />
- </Spin>
- </div>
- </Modal>
- }
- </div>
- );
- },
- });
- export default AccountReview;
|