|
@@ -15,7 +15,7 @@ import {
|
|
|
Modal,
|
|
|
} from "antd";
|
|
|
import { ChooseList } from "../../order/orderNew/chooseList";
|
|
|
-import { ShowModal,getVehicleName, getTypeName, commonAdd, dealBigMoney } from "../../../tools"
|
|
|
+import { ShowModal, getVehicleName, getTypeName, commonAdd, dealBigMoney } from "../../../tools"
|
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
import AccountDetails from "./accountDetails";
|
|
|
import { accountType, accountStatus } from "@/dataDic";
|
|
@@ -502,7 +502,7 @@ const AccountReview = React.createClass({
|
|
|
|
|
|
render() {
|
|
|
const { TextArea } = Input
|
|
|
- const { searchValues, data, visible, list = [], newList, total, logdataSour, } = this.state
|
|
|
+ const { searchValues, visible, } = this.state
|
|
|
const formItemLayout = {
|
|
|
labelCol: { span: 5 },
|
|
|
wrapperCol: { span: 18 },
|
|
@@ -513,167 +513,6 @@ const AccountReview = React.createClass({
|
|
|
{group.name}
|
|
|
</Select.Option>
|
|
|
));
|
|
|
- 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 (
|
|
|
<div className="user-content">
|