|
@@ -28,7 +28,8 @@ import {
|
|
|
splitUrl,
|
|
|
getprovince,
|
|
|
getRefundStatus,
|
|
|
- getTransactionProject
|
|
|
+ getTransactionProject,
|
|
|
+ getTaskStatus
|
|
|
} from "@/tools";
|
|
|
import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
|
|
|
const FormItem = Form.Item;
|
|
@@ -75,8 +76,6 @@ const approvedOutsourcing = React.createClass({
|
|
|
loadData(pageNo, pageSize) {
|
|
|
this.state.data = [];
|
|
|
this.setState({
|
|
|
- selectedRowKeys: [],
|
|
|
- selectedRowKey: [],
|
|
|
page: pageNo,
|
|
|
loading: true
|
|
|
});
|
|
@@ -132,7 +131,10 @@ const approvedOutsourcing = React.createClass({
|
|
|
invoiceAmount: thisdata.invoiceAmount,
|
|
|
finalReceivables: thisdata.finalReceivables,
|
|
|
finalReceivablesTime: thisdata.finalReceivablesTime,
|
|
|
- signTotalAmount: thisdata.signTotalAmount
|
|
|
+ signTotalAmount: thisdata.signTotalAmount,
|
|
|
+ outsourceAmount: thisdata.outsourceAmount,
|
|
|
+ financeName: thisdata.financeName,
|
|
|
+ outsourceAmount: thisdata.outsourceAmount
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -228,12 +230,24 @@ const approvedOutsourcing = React.createClass({
|
|
|
className: "title-table"
|
|
|
},
|
|
|
{
|
|
|
+ title: "财务负责人",
|
|
|
+ dataIndex: "financeName",
|
|
|
+ key: "financeName",
|
|
|
+ className: "title-table"
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "外包公司",
|
|
|
dataIndex: "outsourceName",
|
|
|
key: "outsourceName",
|
|
|
className: "title-table"
|
|
|
},
|
|
|
{
|
|
|
+ title: "外包成本",
|
|
|
+ dataIndex: "outsourceAmount",
|
|
|
+ key: "outsourceAmount",
|
|
|
+ className: "title-table"
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "签单日期",
|
|
|
dataIndex: "signTime",
|
|
|
key: "signTime",
|
|
@@ -374,6 +388,158 @@ const approvedOutsourcing = React.createClass({
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
+ timeColumns: [
|
|
|
+ {
|
|
|
+ title: "序号",
|
|
|
+ dataIndex: "key",
|
|
|
+ key: "key"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "合同编号",
|
|
|
+ dataIndex: "contractNo",
|
|
|
+ key: "contractNo"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "订单编号",
|
|
|
+ dataIndex: "orderNo",
|
|
|
+ key: "orderNo"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "客户名称",
|
|
|
+ dataIndex: "userName",
|
|
|
+ key: "userName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目负责人",
|
|
|
+ dataIndex: "receiverName",
|
|
|
+ key: "receiverName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目类别",
|
|
|
+ dataIndex: "cname",
|
|
|
+ key: "cname"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目编号",
|
|
|
+ dataIndex: "id",
|
|
|
+ key: "id"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目名称",
|
|
|
+ dataIndex: "taskName",
|
|
|
+ key: "taskName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目状态",
|
|
|
+ dataIndex: "taskStatus",
|
|
|
+ key: "taskStatus",
|
|
|
+ render: text => {
|
|
|
+ return getTaskStatus(text);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "工时",
|
|
|
+ dataIndex: "hours",
|
|
|
+ key: "hours"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "分配时间",
|
|
|
+ dataIndex: "taskDistributionTime",
|
|
|
+ key: "taskDistributionTime"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "完成时间",
|
|
|
+ dataIndex: "taskEndTime",
|
|
|
+ key: "taskEndTime"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ printColumns: [
|
|
|
+ {
|
|
|
+ title: "合同编号",
|
|
|
+ dataIndex: "contractNo",
|
|
|
+ key: "contractNo"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "订单编号",
|
|
|
+ dataIndex: "orderNo",
|
|
|
+ key: "orderNo"
|
|
|
+ // fixed: "left"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "客户名称",
|
|
|
+ dataIndex: "buyerName",
|
|
|
+ key: "buyerName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "订单部门",
|
|
|
+ dataIndex: "departmentName",
|
|
|
+ key: "departmentName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "订单负责人",
|
|
|
+ dataIndex: "sellerName",
|
|
|
+ key: "sellerName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "签单日期",
|
|
|
+ dataIndex: "signTime",
|
|
|
+ key: "signTime"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "下单日期",
|
|
|
+ dataIndex: "createTime",
|
|
|
+ key: "createTime"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "签单金额(万元)",
|
|
|
+ dataIndex: "signTotalAmount",
|
|
|
+ key: "signTotalAmount"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "开票金额(万元)",
|
|
|
+ dataIndex: "invoiceAmount",
|
|
|
+ key: "invoiceAmount"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "已收款(万元)",
|
|
|
+ dataIndex: "actuallyTotalAmount",
|
|
|
+ key: "actuallyTotalAmount"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "最近收款(万元)",
|
|
|
+ dataIndex: "finalReceivables",
|
|
|
+ key: "finalReceivables"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "最近收款时间",
|
|
|
+ dataIndex: "finalReceivablesTime",
|
|
|
+ key: "finalReceivablesTime"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "结算状态",
|
|
|
+ dataIndex: "liquidationStatus",
|
|
|
+ key: "liquidationStatus",
|
|
|
+ render: text => {
|
|
|
+ return getLiquidationStatus(text);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "流程状态",
|
|
|
+ dataIndex: "processStatus",
|
|
|
+ key: "processStatus",
|
|
|
+ render: text => {
|
|
|
+ return getProcessStatus(text);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "特批状态",
|
|
|
+ dataIndex: "approval",
|
|
|
+ key: "approval",
|
|
|
+ render: text => {
|
|
|
+ return getApproval(text);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
columnsX: [
|
|
|
{
|
|
|
title: "业务项目名称",
|
|
@@ -1152,6 +1318,8 @@ const approvedOutsourcing = React.createClass({
|
|
|
this.state.departmenttList = undefined;
|
|
|
this.state.processStatus = [];
|
|
|
this.state.contractNoSearch = "";
|
|
|
+ this.state.liquidationStatus = []
|
|
|
+ this.state.contractNo = ""
|
|
|
this.loadData();
|
|
|
},
|
|
|
boHuiCo() {
|
|
@@ -1233,7 +1401,8 @@ const approvedOutsourcing = React.createClass({
|
|
|
globalConfig.context +
|
|
|
"/api/admin/orderInvoice/salesmanOrderInvoiceList",
|
|
|
data: {
|
|
|
- orderNo: this.state.selectedRowKeys[0]
|
|
|
+ orderNo: this.state.selectedRowKeys[0],
|
|
|
+ pageSize: 9999
|
|
|
},
|
|
|
success: function(data) {
|
|
|
let theArr = [];
|
|
@@ -1285,7 +1454,8 @@ const approvedOutsourcing = React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/financial/myBillList",
|
|
|
data: {
|
|
|
- orderNo: this.state.selectedRowKeys[0]
|
|
|
+ orderNo: this.state.selectedRowKeys[0],
|
|
|
+ pageSize: 9999,
|
|
|
},
|
|
|
success: function(data) {
|
|
|
let theArr = [];
|
|
@@ -1335,9 +1505,24 @@ const approvedOutsourcing = React.createClass({
|
|
|
});
|
|
|
},
|
|
|
exportAll() {
|
|
|
+ const data = {
|
|
|
+ pageSize: 9999,
|
|
|
+ buyerName: this.state.nameSearch, //客户名称
|
|
|
+ orderNo: this.state.orderNoSearch,
|
|
|
+ startTime: this.state.releaseDate[0],
|
|
|
+ endTime: this.state.releaseDate[1],
|
|
|
+ startFinalReceivablesTime: this.state.shouKuanDate[0],
|
|
|
+ endFinalReceivablesTime: this.state.shouKuanDate[1],
|
|
|
+ departmentId: this.state.departmenttList,
|
|
|
+ processStatus: this.state.processStatusSearch,
|
|
|
+ contractNo: this.state.contractNoSearch,
|
|
|
+ outsource: 1,
|
|
|
+ liquidationStatus: this.state.liquidationStatus
|
|
|
+ };
|
|
|
window.location.href =
|
|
|
globalConfig.context +
|
|
|
- "/api/admin/receivables/exportReceivables?outsource=1";
|
|
|
+ "/api/admin/receivables/exportReceivables?" +
|
|
|
+ $.param(data);
|
|
|
},
|
|
|
exportKaip() {
|
|
|
window.location.href =
|
|
@@ -1356,25 +1541,7 @@ const approvedOutsourcing = React.createClass({
|
|
|
dvisible: true
|
|
|
// loading: true
|
|
|
});
|
|
|
-
|
|
|
this.loadData(1, 9999);
|
|
|
- this.state.pagination.pageSize = 9999;
|
|
|
- this.setState({
|
|
|
- pagination: this.state.pagination
|
|
|
- });
|
|
|
- window.setTimeout(() => {
|
|
|
- document.querySelectorAll(
|
|
|
- ".ant-pagination.ant-table-pagination.mini"
|
|
|
- )[0].style.display = "none";
|
|
|
- // let tr = document.querySelectorAll(".patent-table tr");
|
|
|
- // for(let i = 0; i < tr.length; i++) {
|
|
|
- // tr[i].style.fontSize = "6px"
|
|
|
- // }
|
|
|
- // let td = document.querySelectorAll(".patent-table tr td");
|
|
|
- // for (let i = 0; i < td.length; i++) {
|
|
|
- // td[i].style.padding = "0 0 0 0";
|
|
|
- // }
|
|
|
- }, 100);
|
|
|
},
|
|
|
downImg() {
|
|
|
let num = 0;
|
|
@@ -1414,6 +1581,56 @@ const approvedOutsourcing = React.createClass({
|
|
|
rotateDeg
|
|
|
});
|
|
|
},
|
|
|
+ timeData() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
|
|
|
+ data: {
|
|
|
+ orderNo: this.state.selectedRowKeys[0],
|
|
|
+ pageSize: 9999
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+ if (!data.data || !data.data.list) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ theArr.push({
|
|
|
+ key: i + 1,
|
|
|
+ orderNo: thisdata.orderNo,
|
|
|
+ contractNo: thisdata.contractNo,
|
|
|
+ userName: thisdata.userName,
|
|
|
+ receiverName: thisdata.receiverName,
|
|
|
+ taskStatus: thisdata.taskStatus,
|
|
|
+ cname: thisdata.cname,
|
|
|
+ id: thisdata.id,
|
|
|
+ taskName: thisdata.taskName,
|
|
|
+ hours: thisdata.hours,
|
|
|
+ taskDistributionTime: thisdata.taskDistributionTime,
|
|
|
+ taskEndTime: thisdata.taskEndTime
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ timeDataList: theArr
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ }).always(
|
|
|
+ function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
render() {
|
|
|
const { TextArea } = Input;
|
|
|
const { RangePicker } = DatePicker;
|
|
@@ -1428,7 +1645,8 @@ const approvedOutsourcing = React.createClass({
|
|
|
const rowSelection = {
|
|
|
selectedRowKeys,
|
|
|
onChange: this.onSelectChange,
|
|
|
- hideDefaultSelections: true
|
|
|
+ hideDefaultSelections: true,
|
|
|
+ type: "radio"
|
|
|
};
|
|
|
const jsDate = this.state.jsDate || [];
|
|
|
return (
|
|
@@ -1583,6 +1801,45 @@ const approvedOutsourcing = React.createClass({
|
|
|
>
|
|
|
打印收款流水
|
|
|
</Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.timeData();
|
|
|
+ this.setState({
|
|
|
+ timeVisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 打印工时信息
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.waterData();
|
|
|
+ this.setState({
|
|
|
+ cuiVisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 打印催款信息
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={this.state.selectedRowKeys.length != 1}
|
|
|
+ style={{ margin: "11px 0px 10px 10px" }}
|
|
|
+ onClick={() => {
|
|
|
+ this.waterData();
|
|
|
+ this.setState({
|
|
|
+ proVisible: true
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 打印项目信息
|
|
|
+ </Button>
|
|
|
</TabPane>
|
|
|
<TabPane tab="导出Excel" key="4">
|
|
|
<Button
|
|
@@ -2345,10 +2602,6 @@ const approvedOutsourcing = React.createClass({
|
|
|
className="admin-desc-content"
|
|
|
width="1300px"
|
|
|
onCancel={() => {
|
|
|
- this.state.pagination.pageSize = 10;
|
|
|
- this.setState({
|
|
|
- pagination: this.state.pagination
|
|
|
- });
|
|
|
this.loadData();
|
|
|
this.setState({
|
|
|
dvisible: false
|
|
@@ -2372,7 +2625,65 @@ const approvedOutsourcing = React.createClass({
|
|
|
<Table
|
|
|
columns={this.state.printColumns}
|
|
|
dataSource={this.state.dataSource}
|
|
|
- pagination={this.state.pagination}
|
|
|
+ pagination={false}
|
|
|
+ bordered
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+
|
|
|
+ <ReactToPrint
|
|
|
+ trigger={() => (
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ marginTop: 10,
|
|
|
+ position: "absolute",
|
|
|
+ top: 0,
|
|
|
+ right: 30
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 打印
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
+ content={() => this.refs.all}
|
|
|
+ />
|
|
|
+ </Modal>
|
|
|
+ <Modal
|
|
|
+ visible={this.state.timeVisible}
|
|
|
+ footer=""
|
|
|
+ title="工时详情"
|
|
|
+ className="admin-desc-content"
|
|
|
+ width="1300px"
|
|
|
+ pagination={false}
|
|
|
+ onCancel={() => {
|
|
|
+ this.loadData();
|
|
|
+ this.setState({
|
|
|
+ timeVisible: false
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div
|
|
|
+ className="patent-table"
|
|
|
+ style={
|
|
|
+ {
|
|
|
+ // width: 900,
|
|
|
+ // position: "relative",
|
|
|
+ // left: "50%",
|
|
|
+ // transform: "translate(-50%)",
|
|
|
+ // padding: "25px 0 30px 30px"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ref={e => {
|
|
|
+ this.refs.all = e;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Table
|
|
|
+ columns={this.state.timeColumns}
|
|
|
+ dataSource={this.state.timeDataList}
|
|
|
+ pagination={false}
|
|
|
bordered
|
|
|
size="small"
|
|
|
/>
|