123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986 |
- import React, { Component } from "react";
- import { Form, Input, Button, message, Modal, Spin, Table } from "antd";
- import { ShowModal, splitUrl, getAccountName, getVehicleName, getTypeName, commonAdd, dealBigMoney } from "../../../tools"
- import ImgList from "../../../common/imgList";
- import ReactToPrint from "react-to-print";
- import moment from "moment";
- import $ from "jquery/src/ajax";
- import './accountReview.less';
- const FormItem = Form.Item;
- class AccountDetails extends Component {
- constructor(props) {
- super(props);
- this.state = {
- isTable: true,
- loading: false,
- visible: "",
- data: {},
- logvisible: false,
- logdataSour: [],
- 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>
- )
- }
- }
- ],
- };
- }
- componentDidMount() {
- const { id } = this.props
- !!id && this.getDetails(id)
- }
- // 报销信息详情
- getDetails(id) {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/selectById",
- data: { id, },
- success: function (data) {
- ShowModal(this);
- this.setState({
- loading: false,
- });
- if (data.error.length === 0) {
- this.setState({
- data: data.data,
- imgs: data.data.attachmentUrl
- ? splitUrl(data.data.attachmentUrl, ",", globalConfig.avatarHost + "/upload")
- : [],
- })
- this.getAccountList(id)
- this.getLogData(id)
- } else {
- message.warning(data.error[0].message)
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- }
- // 报销费用详情
- getAccountList(eaid) {
- const { data } = this.state
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expenseAccount/details/list",
- data: { eaid, },
- success: function (datas) {
- if (datas.error.length === 0) {
- let sum = 0
- for (var i = 0; i < datas.data.length; i++) {
- sum = commonAdd(sum, datas.data[i].amount)
- }
- let leftList = JSON.parse(JSON.stringify(datas.data)) || []
- let jsonArray = []
- if (data.type != 4 && data.type != 5 && data.debitTotalAmount) {
- leftList.push({ "other": "预借支", "amount": data.debitTotalAmount },)
- }
- if (data.type != 4 && data.type != 5) {
- leftList.push(
- { "other": "总金额", "amount": sum },
- { "other": "实报金额", "amount": (sum > data.debitTotalAmount) ? commonAdd(sum, -data.debitTotalAmount) : 0 })
- }
- if (data.type == 1) {
- // 差旅费
- jsonArray = [
- { "head": `支付公司:${data.payDepName}` },
- { "head": `事由:${data.remarks}` },
- { "head": `公出企业:${data.userNames}` },
- { "head": `公出地点:${data.districtName}` },
- { "head": `时间:${moment(data.releaseStartStr).format('YYYY-MM-DD HH:mm') + " 至 " + moment(data.releaseEndStr).format('YYYY-MM-DD HH:mm')}` },
- { "head": `公出时长:${data.duration}` },
- ]
- } else if (data.type == 3) {
- // 第三方付款
- jsonArray = [
- { "head": `支付公司:${data.payDepName}` },
- { "head": `事由:${data.remarks}` },
- ]
- } else {
- // 通用
- jsonArray = [
- { "head": `事由:${data.remarks}` },
- ]
- }
- let newArray = []
- if (jsonArray.length >= leftList.length) {
- for (var i = 0; i < leftList.length; i++) {
- jsonArray[i] = Object.assign(jsonArray[i], leftList[i])
- }
- newArray = jsonArray
- } else {
- for (var i = 0; i < jsonArray.length; i++) {
- leftList[i] = Object.assign(jsonArray[i], leftList[i])
- }
- newArray = leftList
- }
- newArray.push({}, {})
- this.setState({
- list: datas.data || [],
- newList: newArray,
- total: sum,
- })
- } else {
- message.warning(datas.error[0].message);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- }
- isHere(list = []) {
- for (var i = 0; i < list.length; i++) {
- if (!list[i].id) {
- this.setState({
- processStatus: list[i].processStatus
- })
- return
- }
- }
- }
- // 日志
- 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)
- );
- }
- // 审核
- 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)
- );
- }
- distinct(arr, key) {
- let hash = {};
- let result = [];
- for (let i = arr.length - 1; i >= 0; i--) {
- let value = arr[i][key];
- if (!hash[value]) {
- hash[value] = true;
- result.unshift(arr[i]);
- }
- }
- return result;
- }
- render() {
- const { TextArea } = Input
- const { data, visible, list = [], newList, total, logdataSour, } = this.state
- const { onCancel } = this.props
- const formItemLayout = {
- labelCol: { span: 5 },
- wrapperCol: { span: 18 },
- };
- const logArray = this.distinct(logdataSour, "auditorName")
- // const logArray = logdataSour.filter((item, index, arr) => {
- // return arr.findLastIndex((t) => t.auditorName === item.auditorName) === index;
- // });
- const reimbursement = [
- {
- title: !!data.contractNo ? `报销至订单:${data.contractNo}` : `报销至部门`,
- dataIndex: "head",
- key: "head",
- width: 275,
- render: (text, row, index) => {
- if (index < newList.length - 2) {
- return <span>{text}</span>;
- } else if (index == newList.length - 2) {
- return {
- children: <div style={{ display: "flex", justifyContent: "space-between" }}>
- <span>金额合计(大写):{data.type == 5 ? dealBigMoney(total) : (dealBigMoney((total > data.debitTotalAmount) ? commonAdd(total, -data.debitTotalAmount) : 0))}</span>
- <span>¥ {data.type == 5 ? total : (total > data.debitTotalAmount) ? commonAdd(total, -data.debitTotalAmount) : 0} </span>
- </div>,
- props: {
- colSpan: 3,
- },
- };
- } else if (index == newList.length - 1) {
- return {
- children: <div>
- <div>
- {data.type == 3 && newList.map((item, index) => !!item.invoiceNo && <div key={index}>付款方式:{"公对公转账"} 发票类型:{["普票", "专票"][item.invoiceType]} 发票号:{item.invoiceNo}</div>)}
- {data.type == 3
- ? newList.map((item, index) => !!item.payerName && <div key={index}>收款方式:{item.payerName} {item.openBank} {item.bankAccounts} {item.openBankAddress}</div>)
- : data.type != 5 && <div>收款方式:{data.bank} {data.accounts} {data.name}</div>}
- </div>
- </div>,
- props: {
- colSpan: 3,
- },
- };
- }
- },
- },
- {
- title: '报销数',
- children: [
- {
- title: '付款项目',
- dataIndex: "type",
- key: "type",
- width: 120,
- render: (value, row, index) => {
- if (index == newList.length - 2) {
- return {
- props: {
- rowSpan: 0,
- },
- };
- } else if (index == newList.length - 1) {
- return {
- props: {
- rowSpan: 0,
- },
- };
- } else {
- return <div>
- {data.type == 1 &&
- // 差旅费显示
- <div>
- {!!row.other
- ? row.other
- : value == 1
- ? <span>{`交通费(${getVehicleName(row.vehicle, row.vehicleOther)})`}</span>
- : <span>{getTypeName(row.type)}</span>}
- </div>}
- {(data.type == 0 || data.type == 2 || data.type == 4 || data.type == 5) &&
- <span>{value == 4 ? "预借支金额" : value == 5 ? "抵扣金额" : !!row.other ? row.other : "申请金额"}</span>
- }
- {data.type == 3 &&
- <span>{!!row.other ? row.other : "申请金额"}</span>
- }
- </div>;
- }
- },
- },
- {
- title: '金额(元)',
- dataIndex: "amount",
- key: "amount",
- width: 80,
- render: (value, row, index) => {
- if (index == newList.length - 2) {
- return {
- props: {
- rowSpan: 0,
- },
- };
- } else if (index == newList.length - 1) {
- return {
- props: {
- rowSpan: 0,
- },
- };
- } else {
- return <span>{value}</span>;
- }
- },
- }
- ],
- },
- {
- title: '审核意见',
- dataIndex: "shyj",
- key: "shyj",
- width: 270,
- render: (value, row, index) => {
- if (index == 0) {
- return {
- children: <div>
- <ul
- style={{
- overflow: "hidden",
- position: "relative",
- }}
- >{logArray.map((item, index) => {
- return (
- // 要求只显示通过的审核
- (item.status == 1 || item.status == 2) &&
- <li
- key={item.auditorName}
- style={{
- height: "auto",
- wordBreak: "break-all",
- }}
- >
- <span>{item.auditorName}:</span>
- <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][item.status] }}>
- {["【发起】,", "【通过】,", "【完成】,", "【驳回】,", "【重新发起】,"][item.status]}
- {this.state.processStatus == item.processStatus && !item.id && data.status != 0 &&
- <span style={{ color: "#FFA500" }}> 审核中...</span>}
- </span>
- <span>{item.remarks}</span>
- {/* <span> {item.createTimeStr}</span> */}
- </li>
- )
- })}
- </ul>
- </div>,
- props: {
- rowSpan: newList.length - 2,
- },
- };
- } else if (index == newList.length - 2) {
- return data.type != 0 && <span>要求付款时间:{data.type == 1 ? moment(data.agreeTimeStr).format('YYYY-MM-DD') : moment(newList[0].agreeTimeStr).format('YYYY-MM-DD')}</span>;
- } else if (index < newList.length - 1) {
- return {
- props: {
- rowSpan: 0,
- },
- };
- }
- },
- },
- ]
- return (
- <Modal
- maskClosable={false}
- visible={true}
- onOk={false}
- onCancel={onCancel}
- width="790px"
- title={<span style={{ fontWeight: "bold" }}>{"报销详情-" + getAccountName(data.type, data.typeOther)}
- <Button
- type="primary"
- style={{ marginLeft: 30 }}
- onClick={() => { this.setState({ isTable: !this.state.isTable }) }}
- >{this.state.isTable ? "切换列表显示" : "切换表格显示"}</Button>
- </span>}
- footer=""
- >
- <Spin spinning={this.state.loading}>
- <div className="m_body"
- ref={(e) => {
- this.refs.all = e;
- }}
- >
- {this.state.isTable
- ? <div className="m_table">
- <div className="m_title">
- {getAccountName(data.type, data.typeOther)}
- {getAccountName(data.type, data.typeOther).indexOf("报销") == -1 ? "报销清单" : "清单"}
- </div>
- <div className="m_head">
- <div>申请部门:{data.appDepName}</div>
- <div>报销日期:{moment(data.createTimeStr).format('YYYY年MM月DD日')}</div>
- </div>
- <Table
- columns={reimbursement}
- dataSource={newList}
- bordered
- size="middle"
- pagination={false}
- />
- <div className="m_head">
- <div>报销公司:{data.appDepName}</div>
- <div>报销人:{data.aname}</div>
- </div>
- </div>
- : <Form layout="horizontal" id="demand-form">
- <Spin spinning={this.state.loading}>
- {data.type == 1 &&
- <div>
- <div style={{ fontSize: 13, fontWeight: "bold" }}>公出信息</div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="公出企业"
- >
- <span>{data.userNames}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="公出地点"
- >
- <span>{data.districtName}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="时间"
- >
- <span>{data.releaseStartStr} 至 {data.releaseEndStr}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="公出时长"
- >
- <span>{data.duration}小时</span>
- </FormItem>
- </div>
- </div>}
- <div style={{ fontSize: 13, fontWeight: "bold" }}>申请类型</div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="申请类型"
- >
- <span>{getAccountName(data.type, data.typeOther)}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="报销至订单"
- >
- <div>
- <div>{data.buyerName}</div>
- <div>{data.contractNo}</div>
- </div>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="报销人"
- >
- <span>{data.aname}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="报销公司"
- >
- <span>{data.appDepName}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...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>
- <div style={{ fontSize: 13, fontWeight: "bold" }}>费用详细</div>
- {/* 差旅费显示 */}
- {data.type == 1 &&
- list.length > 0 && list.map(item =>
- item.type == 1
- ? <div>
- <div className="clearfix" >
- <FormItem
- {...formItemLayout}
- label="交通工具"
- >
- <span>
- {getVehicleName(item.vehicle, item.vehicleOther)}
- {/* */}
- {/* {!!item.startDistrict && <span>({item.startDistrict} ⇀ {item.endDistrict})</span>} */}
- </span>
- </FormItem>
- </div>
- <div className="clearfix" >
- <FormItem
- {...formItemLayout}
- label="地点"
- >
- <span>{item.startDistrict}
- <span> ⇀ </span>
- {item.endDistrict}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 18 }}
- label="时间"
- >
- <span>{item.startTimeStr} 至 {item.endTimeStr}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="交通费"
- >
- <span>{item.amount}(元)</span>
- </FormItem>
- </div>
- </div>
- : <div className="clearfix" >
- <FormItem
- {...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" >
- {!!item.agreeTimeStr &&
- <FormItem
- {...formItemLayout}
- label={data.type == 5 ? "支付时间:" : "需付款时间:"}
- >
- <span>{item.agreeTimeStr.slice(0, 10)}</span>
- </FormItem>}
- <FormItem
- {...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" >
- {!!item.agreeTimeStr &&
- <FormItem
- {...formItemLayout}
- label="需付款时间"
- >
- <span>{item.agreeTimeStr.slice(0, 10)}</span>
- </FormItem>
- }
- <FormItem
- {...formItemLayout}
- label="付款方式"
- >
- <span>{["公对公转账"][item.payType]}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="发票类型"
- >
- <span>{["普票", "专票"][item.invoiceType]}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="发票号"
- >
- <span>{item.invoiceNo}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="付款单位"
- >
- <span>{item.payerName}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户银行"
- >
- <span>{item.openBank}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="银行账户"
- >
- <span>{item.bankAccounts}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户行地址"
- >
- <span>{item.openBankAddress}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="金额(元)"
- >
- <span>{item.amount}</span>
- </FormItem>
- </div>
- )
- }
- {data.type != 4 && data.debitTotalAmount &&
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="预借支"
- >
- <span style={{ color: "red" }}>{data.debitTotalAmount}(元)</span>
- </FormItem>
- </div>}
- {data.type != 4 && data.type != 5 &&
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="总金额"
- >
- <span style={{ color: "red" }}>{total}(元)</span>
- </FormItem>
- </div>}
- {data.type != 4 && data.type != 5 &&
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="实报金额"
- >
- <span style={{ color: "red" }}>{(total > data.debitTotalAmount) ? commonAdd(total, -data.debitTotalAmount) : 0}(元)</span>
- </FormItem>
- </div>}
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="附件"
- >
- <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
- {this.state.imgs ? <ImgList fileList={this.state.imgs} ItemWidth={'96px'} /> : <div />}
- </div>
- </FormItem>
- </div>
- <div style={{ fontSize: 13, fontWeight: "bold" }}>收款详情</div>
- {data.type != 3 && data.type != 5 &&
- <div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="收款人"
- >
- <span>{data.name}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="收款银行"
- >
- <span>{data.bank}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- label="收款账户"
- >
- <span>{data.accounts}</span>
- </FormItem>
- </div>
- </div>}
- <div style={{ fontSize: 13, fontWeight: "bold" }}>审核意见</div>
- <ul
- style={{
- width: "560px",
- overflow: "hidden",
- paddingLeft: "90px",
- position: "relative",
- }}
- >
- {logdataSour.map((item, index) => {
- return (
- <li
- key={index}
- style={{
- width: "100%",
- height: "auto",
- wordBreak: "break-all",
- marginBottom: "10px",
- }}
- >
- {/* {item.auditorName + ":" + item.status + item.remarks + "(" + item.createTimeStr + ")"} */}
- <span>{item.auditorName}:</span>
- <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][item.status] }}>
- {["【发起】,", "【通过】,", "【完成】,", "【驳回】,", "【重新发起】,"][item.status]}
- {this.state.processStatus == item.processStatus && !item.id && data.status != 0 &&
- <span style={{ color: "#FFA500" }}> 审核中...</span>}
- </span>
- <span>{item.remarks}</span>
- <span> {item.createTimeStr}</span>
- </li>
- );
- })}
- </ul>
- <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>
- </Spin>
- <ReactToPrint
- trigger={() => (
- <Button
- type="primary"
- style={{
- float: "right",
- marginTop: 10,
- position: "absolute",
- top: 0,
- right: 50,
- }}
- >
- 打印
- </Button>
- )}
- content={() => this.refs.all}
- bodyClass="print-body"
- />
- {
- //审核弹窗
- 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.logvisible &&
- <Modal
- visible={this.state.logvisible}
- className="admin-desc-content"
- width="800px"
- maskClosable={false}
- title="审核日志"
- footer={null}
- onCancel={() => {
- this.setState({
- logvisible: false,
- })
- }}
- >
- <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>
- }
- </Modal>
- );
- }
- }
- export default AccountDetails;
|