|
@@ -12,9 +12,11 @@ import {
|
|
|
Tabs,
|
|
|
DatePicker,
|
|
|
Modal,
|
|
|
+ Tooltip,
|
|
|
+ Tag,
|
|
|
} from "antd";
|
|
|
import { ChooseList } from "../../order/orderNew/chooseList";
|
|
|
-import { ShowModal, getAccountName, getSecondaryAccountName } from "../../../tools"
|
|
|
+import { ShowModal, getAccountName, getSecondaryAccountName, getClockState } from "../../../tools"
|
|
|
import { accountType, accountStatus } from "@/dataDic";
|
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
import OrderDetail from '../../order/orderNew/changeComponent/orderDetail';
|
|
@@ -56,13 +58,35 @@ const AccountTotal = React.createClass({
|
|
|
return (
|
|
|
this.state.searchValues["targetType"] == 1 ?
|
|
|
<span>
|
|
|
- {text + " / " + record.buyerName}
|
|
|
+ <span style={{ color: record.bidType == 1 && 'red' }}>{text}</span>
|
|
|
+ {" / " + record.buyerName}
|
|
|
</span>
|
|
|
: <span>{record.depName}</span>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ title: "公出/实际/超出(时)",
|
|
|
+ dataIndex: "maxDuration",
|
|
|
+ key: "maxDuration",
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div className='receiveCount'
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.getListC(record.contractNo)
|
|
|
+ this.setState({
|
|
|
+ visibleC: true
|
|
|
+ })
|
|
|
+ // this.tableRowClick(record)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {text + " / " + record.actualDuration + " / " + record.exceedDuration}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "合同总额/已收款(万元)",
|
|
|
dataIndex: "totalAmount",
|
|
|
key: "totalAmount",
|
|
@@ -270,6 +294,222 @@ const AccountTotal = React.createClass({
|
|
|
},
|
|
|
],
|
|
|
dataSourceA: [],
|
|
|
+ columnsC: [
|
|
|
+ {
|
|
|
+ title: "编号",
|
|
|
+ dataIndex: "key",
|
|
|
+ key: "key",
|
|
|
+ width: 45,
|
|
|
+ fixed: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "客户名称",
|
|
|
+ dataIndex: "userName",
|
|
|
+ key: "userName",
|
|
|
+ width: 150,
|
|
|
+ fixed: "left",
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <div>{text}</div>
|
|
|
+ <div style={{ color: ["red", "green"][record.signBills] }}>
|
|
|
+ {["未签单", "已签单"][record.signBills]}
|
|
|
+ {record.signBills == 1 && `(${record.signTime})`}
|
|
|
+ </div>
|
|
|
+ </div >
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出地点",
|
|
|
+ dataIndex: "districtName",
|
|
|
+ key: "districtName",
|
|
|
+ width: 120,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div>{text}</div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "跟单人",
|
|
|
+ dataIndex: "sname",
|
|
|
+ key: "sname",
|
|
|
+ width: 90,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <Tooltip title={text}>
|
|
|
+ <div>{text}</div>
|
|
|
+ </Tooltip>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出人员",
|
|
|
+ dataIndex: "aname",
|
|
|
+ key: "aname",
|
|
|
+ width: 190,
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <Tooltip title={text}>
|
|
|
+ <div>
|
|
|
+ <p style={{ color: "red" }}>[ 打卡人:{text} ]</p>
|
|
|
+ {record.assist !== 0 && <p style={{ color: "#8552A1" }} >[ 协单人:{record.assistAidName}]</p>}
|
|
|
+ {!!record.assistantName && <p style={{ color: "#228fbd" }} >[ 协单助手:{record.assistantName}]</p>}
|
|
|
+ </div>
|
|
|
+ </Tooltip>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "申请时间",
|
|
|
+ dataIndex: "createTimes",
|
|
|
+ key: "createTimes",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出时间",
|
|
|
+ dataIndex: "releaseStarts",
|
|
|
+ key: "releaseStarts",
|
|
|
+ width: 130,
|
|
|
+ render: (text, record) => (
|
|
|
+ <div>
|
|
|
+ <div>{text}</div>
|
|
|
+ <div style={{ paddingLeft: "44px" }}>至</div>
|
|
|
+ <div>{record.releaseEnds}</div>
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出时长(时)",
|
|
|
+ dataIndex: "duration",
|
|
|
+ key: "duration",
|
|
|
+ width: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "打卡时间",
|
|
|
+ dataIndex: "clockInTimes",
|
|
|
+ key: "clockInTimes",
|
|
|
+ width: 80,
|
|
|
+ render: (text, record) => (
|
|
|
+ <span>
|
|
|
+ <div style={{ width: 70 }}>{text}</div>
|
|
|
+ <Tag color={["#F21212", "#34DE38", "#ffd400"][record.clockIn]}>{["未打卡", "已打卡", "异常打卡"][record.clockIn]}</Tag>
|
|
|
+ </span>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "标签",
|
|
|
+ dataIndex: "status",
|
|
|
+ key: "status",
|
|
|
+ width: 200,
|
|
|
+ render: (text, record) => (
|
|
|
+ <div>
|
|
|
+ <div style={{ display: "flex", flexDirection: "row" }}>
|
|
|
+ <Tag
|
|
|
+ color={["#45b97c", "#69541b", "#f47920", "#8552a1", "#228fbd"][record.type]}
|
|
|
+ >
|
|
|
+ {
|
|
|
+ record.type === 0
|
|
|
+ ? "业务公出" : record.type === 1
|
|
|
+ ? "技术公出" : record.type === 2
|
|
|
+ ? "行政公出" : record.type === 3
|
|
|
+ ? "技术协单" : record.type === 4
|
|
|
+ ? "协单助手" : ""
|
|
|
+ }
|
|
|
+ </Tag>
|
|
|
+ <Tag color={getClockState(text).color}>
|
|
|
+ {getClockState(text).title}
|
|
|
+ </Tag>
|
|
|
+ {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
|
|
|
+ </div>
|
|
|
+ {record.type === 1 && <div style={{ marginTop: 5 }}>{record.contractNo}</div>}
|
|
|
+ {record.type === 1 && <div>{record.totalAmout + "(万元)"}</div>}
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出目标",
|
|
|
+ dataIndex: "remarks",
|
|
|
+ key: "remarks",
|
|
|
+ width: 280,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div>{text}</div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "公出计划",
|
|
|
+ dataIndex: "plan",
|
|
|
+ key: "plan",
|
|
|
+ width: 280,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div>{text}</div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "预计效果",
|
|
|
+ dataIndex: "expectedEffect",
|
|
|
+ key: "expectedEffect",
|
|
|
+ width: 280,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div>{text}</div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "本次公出目标总结",
|
|
|
+ dataIndex: "supplement",
|
|
|
+ key: "supplement",
|
|
|
+ width: 280,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div>{text}</div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "下一次公出计划",
|
|
|
+ dataIndex: "nextPlan",
|
|
|
+ key: "nextPlan",
|
|
|
+ width: 280,
|
|
|
+ render: (text) => {
|
|
|
+ return (
|
|
|
+ <div>{text}</div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "审核/指导",
|
|
|
+ dataIndex: "auditInfo",
|
|
|
+ key: "auditInfo",
|
|
|
+ width: 200,
|
|
|
+ render: (text, record) => {
|
|
|
+ return <div style={{ wordBreak: "break-all" }} >
|
|
|
+ {record.auditTimes && `审核时间:${record.auditTimes}`}
|
|
|
+ {text}
|
|
|
+ </div >;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ dataSourceC: [],
|
|
|
+ paginationC: {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 9999,
|
|
|
+ showQuickJumper: true,
|
|
|
+ pageSize: 9999,
|
|
|
+ onChange: function (page) {
|
|
|
+ this.getListC(page);
|
|
|
+ }.bind(this),
|
|
|
+ showTotal: function (total) {
|
|
|
+ return "共" + total + "条数据";
|
|
|
+ },
|
|
|
+ },
|
|
|
+ visibleC: false,
|
|
|
visibleD: false,
|
|
|
};
|
|
|
},
|
|
@@ -328,6 +568,66 @@ const AccountTotal = React.createClass({
|
|
|
);
|
|
|
},
|
|
|
|
|
|
+ // 公出信息
|
|
|
+ getListC(contractNo) {
|
|
|
+ const { paginationC, } = this.state;
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ });
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/release/publicReleaseAndCount",
|
|
|
+ data: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: paginationC.pageSize,
|
|
|
+ statusType: 1,
|
|
|
+ contractNo,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ }, 300);
|
|
|
+ if (data.error && data.error.length === 0) {
|
|
|
+ if (data.data.list) {
|
|
|
+ paginationC.current = data.data.pageNo;
|
|
|
+ paginationC.total = data.data.totalCount;
|
|
|
+ if (data.data && data.data.list && !data.data.list.length) {
|
|
|
+ paginationC.current = 0;
|
|
|
+ paginationC.total = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ dataSourceC: data.data.list,
|
|
|
+ paginationC: this.state.paginationC,
|
|
|
+ pageNoC: data.data.pageNo,
|
|
|
+ peopleCount: data.data.peopleCount,
|
|
|
+ count: data.data.count,
|
|
|
+ durationCount: data.data.durationCount,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
+ addRowColor(record) {
|
|
|
+ if (record.assist === 1 || record.assist === 2 || record.assist === 3) {
|
|
|
+ return 'light'
|
|
|
+ } else {
|
|
|
+ return 'dark'
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
departmentList() {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -882,6 +1182,26 @@ const AccountTotal = React.createClass({
|
|
|
/>
|
|
|
</Modal>
|
|
|
}
|
|
|
+ <Modal
|
|
|
+ title="公出详情"
|
|
|
+ visible={this.state.visibleC}
|
|
|
+ maskClosable={false}
|
|
|
+ footer={false}
|
|
|
+ width={1400}
|
|
|
+ onCancel={() => { this.setState({ visibleC: false }) }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table
|
|
|
+ scroll={{ x: "120%" }}
|
|
|
+ columns={this.state.columnsC}
|
|
|
+ dataSource={this.state.dataSourceC}
|
|
|
+ bordered
|
|
|
+ size="middle"
|
|
|
+ pagination={false}
|
|
|
+ rowClassName={this.addRowColor}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
);
|
|
|
},
|