12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232 |
- import React from "react";
- import $ from "jquery/src/ajax";
- import moment from "moment";
- import {
- Button,
- Form,
- Input,
- Spin,
- Table,
- Select,
- message,
- Tabs,
- AutoComplete,
- 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: {},
- aname: "",
- 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>
- {text == 0 ? record.typeOther : 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)
- );
- },
- // 查询负责人
- followUp(e) {
- this.setState({
- aname: e
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/listAdminByName",
- data: {
- adminName: e,
- },
- success: function (data) {
- let thedata = data.data || [];
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- }
- this.setState({
- fjlist: thedata,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 选中负责人
- selectF(value) {
- const { searchValues, fjlist } = this.state;
- const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
- this.setState({
- searchValues: Object.assign(searchValues, {
- aid: newdataSources.find((item) => item.name == value).id,
- }),
- });
- },
- // 搜索
- search() {
- this.loadData();
- },
- // 重置
- reset() {
- this.setState({
- aname: "",
- 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 },
- };
- const dataSources = this.state.fjlist || [];
- const options = dataSources.map((group) => (
- <Select.Option key={group.id} value={group.name}>
- {group.name}
- </Select.Option>
- ));
- 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
- style={{ width: 140 }}
- placeholder="报销类型"
- value={searchValues["type"]
- ? searchValues["type"]
- : undefined}
- onChange={(e) => {
- searchValues["type"] = e;
- this.setState({
- searchValues: searchValues,
- });
- }}
- >
- <Option value="1">差旅费</Option>
- <Option value="2">非业务报销</Option>
- <Option value="3">第三方付款</Option>
- <Option value="4">申请借支</Option>
- <Option value="5">申请抵扣</Option>
- <Option value="0">其他</Option>
- </Select>
- <AutoComplete
- className="certain-category-search"
- dropdownClassName="certain-category-search-dropdown"
- dropdownMatchSelectWidth={false}
- style={{ width: 140 }}
- dataSource={options}
- placeholder="报销人"
- value={this.state.aname}
- onChange={this.followUp.bind(this)}
- filterOption={true}
- onSelect={this.selectF.bind(this)}
- >
- <Input />
- </AutoComplete>
- <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: 140 }}
- 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>
- <div style={{ marginTop: 10 }}>
- <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={{ margin: "0 10px" }}
- >
- 搜索
- </Button>
- <Button onClick={this.reset}>重置</Button>
- </div>
- </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;
|