|
@@ -4,6 +4,7 @@ import "@/manageCenter/financialManage/distribute/public.less";
|
|
|
import { Button, Form, Input, Select, Spin, Table, message, Modal, Tabs, Tag } from "antd";
|
|
|
import Assign from "@/manageCenter/publicComponent/assign";
|
|
|
import ResolutionDetail from "@/resolutionDetail"
|
|
|
+import OrderRiZi from "@/orderRiZi.jsx";
|
|
|
import {
|
|
|
getProcessStatus,
|
|
|
getLiquidationStatus,
|
|
@@ -50,9 +51,9 @@ const Task = React.createClass({
|
|
|
} else {
|
|
|
for (let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
|
- if(thisdata.splitList) {
|
|
|
+ if (thisdata.splitList) {
|
|
|
thisdata.splitList.forEach(item => {
|
|
|
- item.key = item.id
|
|
|
+ item.key = item.id;
|
|
|
});
|
|
|
}
|
|
|
theArr.push({
|
|
@@ -163,7 +164,10 @@ const Task = React.createClass({
|
|
|
if (record.splitStatus == 1) {
|
|
|
return (
|
|
|
<span>
|
|
|
- {text} <Tag color="#108ee9" style={{ float: "right" }}>已拆</Tag>
|
|
|
+ {text}{" "}
|
|
|
+ <Tag color="#108ee9" style={{ float: "right" }}>
|
|
|
+ 已拆
|
|
|
+ </Tag>
|
|
|
</span>
|
|
|
);
|
|
|
} else {
|
|
@@ -324,7 +328,7 @@ const Task = React.createClass({
|
|
|
tableRowClick(record) {
|
|
|
this.state.RowData = record;
|
|
|
this.setState({
|
|
|
- visible: true,
|
|
|
+ visible: true
|
|
|
});
|
|
|
this.xiangqing(record.orderNo);
|
|
|
this.xiangmu(record.orderNo);
|
|
@@ -334,12 +338,12 @@ const Task = React.createClass({
|
|
|
this.setState({
|
|
|
resVisible: true,
|
|
|
resRecord: record
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
resCancel() {
|
|
|
this.setState({
|
|
|
resVisible: false
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
//订单详情
|
|
|
xiangqing(orderNos) {
|
|
@@ -435,7 +439,7 @@ const Task = React.createClass({
|
|
|
contacts: thisdata.contacts, //联系人
|
|
|
contactsMobile: thisdata.contactsMobile, //联系人电话
|
|
|
taskStatus: thisdata.taskStatus, //是否分配
|
|
|
- splitStatus: thisdata.splitStatus
|
|
|
+ splitStatus: thisdata.splitStatus
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -556,129 +560,183 @@ const Task = React.createClass({
|
|
|
resolutionCancel() {
|
|
|
this.setState({
|
|
|
resolutionVisible: false
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- render() {
|
|
|
- const expandedRowRender = (e) => {
|
|
|
- const data = e.splitList
|
|
|
- let columns = []
|
|
|
- if (e.splitList instanceof Array && e.splitList.length) {
|
|
|
- columns = [
|
|
|
- {
|
|
|
- title: "任务编号",
|
|
|
- dataIndex: "splitSuper",
|
|
|
- key: "splitSuper",
|
|
|
- render: (text, record) => {
|
|
|
- return text + "-" + record.splitId;
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: "任务名称",
|
|
|
- dataIndex: "taskName",
|
|
|
- key: "taskName"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "订单编号",
|
|
|
- dataIndex: "orderNo",
|
|
|
- key: "orderNo"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "业务类别",
|
|
|
- dataIndex: "cname",
|
|
|
- key: "cname"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "客户名称",
|
|
|
- dataIndex: "userName",
|
|
|
- key: "userName"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "项目状态",
|
|
|
- dataIndex: "projectStatus",
|
|
|
- key: "projectStatus",
|
|
|
- render: text => {
|
|
|
- return getProjectStatus(text);
|
|
|
+ rizhi() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: "/api/admin/newOrder/selectOrderLog",
|
|
|
+ data: {
|
|
|
+ orderNo: this.state.orderNo
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+ let thisData = data.data;
|
|
|
+ if (!thisData.length) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
}
|
|
|
- },
|
|
|
- {
|
|
|
- title: "分配时间",
|
|
|
- dataIndex: "taskDate",
|
|
|
- key: "taskDate"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "任务数量",
|
|
|
- dataIndex: "commodityQuantity",
|
|
|
- key: "commodityQuantity",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "订单部门",
|
|
|
- dataIndex: "depName",
|
|
|
- key: "depName"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "拆分操作人",
|
|
|
- dataIndex: "splitAname",
|
|
|
- key: "splitAname"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "项目负责人",
|
|
|
- dataIndex: "receiverName",
|
|
|
- key: "receiverName"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "拆分时间",
|
|
|
- dataIndex: "splitTimes",
|
|
|
- key: "splitTimes"
|
|
|
- },
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- dataIndex: "caozuo",
|
|
|
- key: "caouzo",
|
|
|
- render: (text, record) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- style={{ margin: "0 10px" }}
|
|
|
- disabled={record.distributeSign == 1 ? true : false}
|
|
|
- onClick={e => {
|
|
|
- e.stopPropagation(), this.evaluate(record, "咨询师经理");
|
|
|
- }}
|
|
|
- >
|
|
|
- 转交
|
|
|
- </Button>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- style={{ margin: "0 10px" }}
|
|
|
- disabled={record.distributeSign == 1 ? true : false}
|
|
|
- onClick={e => {
|
|
|
- e.stopPropagation(), this.evaluate(record, "咨询师");
|
|
|
- }}
|
|
|
- >
|
|
|
- 分配任务
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- );
|
|
|
+ thisData = {};
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.length; i++) {
|
|
|
+ let thisdata = data.data[i];
|
|
|
+ theArr.push({
|
|
|
+ processName: thisdata.processName,
|
|
|
+ adminName: thisdata.adminName,
|
|
|
+ createDate: thisdata.createDate,
|
|
|
+ remarks: thisdata.remarks
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- ];
|
|
|
- return (
|
|
|
- <Table
|
|
|
- columns={columns}
|
|
|
- dataSource={data}
|
|
|
- pagination={false}
|
|
|
- onRowClick={this.tableRowClick.bind(this)}
|
|
|
- />
|
|
|
- );
|
|
|
- } else {
|
|
|
- columns = [];
|
|
|
- return (
|
|
|
- <p style={{ fontWeight: "bold", color: "red", textAlign: "center" }}>
|
|
|
- 此项目暂未拆分
|
|
|
- </p>
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
+ this.setState({
|
|
|
+ dataSourceY: theArr
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ }).always(
|
|
|
+ function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ closeOrderLog() {
|
|
|
+ this.setState({
|
|
|
+ avisible: false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getOrderLog() {
|
|
|
+ this.setState({
|
|
|
+ avisible: true
|
|
|
+ });
|
|
|
+ this.rizhi();
|
|
|
+ },
|
|
|
+ render() {
|
|
|
+ const expandedRowRender = e => {
|
|
|
+ const data = e.splitList;
|
|
|
+ let columns = [];
|
|
|
+ if (e.splitList instanceof Array && e.splitList.length) {
|
|
|
+ columns = [
|
|
|
+ {
|
|
|
+ title: "任务编号",
|
|
|
+ dataIndex: "splitSuper",
|
|
|
+ key: "splitSuper",
|
|
|
+ render: (text, record) => {
|
|
|
+ return text + "-" + record.splitId;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "任务名称",
|
|
|
+ dataIndex: "taskName",
|
|
|
+ key: "taskName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "订单编号",
|
|
|
+ dataIndex: "orderNo",
|
|
|
+ key: "orderNo"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "业务类别",
|
|
|
+ dataIndex: "cname",
|
|
|
+ key: "cname"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "客户名称",
|
|
|
+ dataIndex: "userName",
|
|
|
+ key: "userName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目状态",
|
|
|
+ dataIndex: "projectStatus",
|
|
|
+ key: "projectStatus",
|
|
|
+ render: text => {
|
|
|
+ return getProjectStatus(text);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "分配时间",
|
|
|
+ dataIndex: "taskDate",
|
|
|
+ key: "taskDate"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "任务数量",
|
|
|
+ dataIndex: "commodityQuantity",
|
|
|
+ key: "commodityQuantity"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "订单部门",
|
|
|
+ dataIndex: "depName",
|
|
|
+ key: "depName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "拆分操作人",
|
|
|
+ dataIndex: "splitAname",
|
|
|
+ key: "splitAname"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "项目负责人",
|
|
|
+ dataIndex: "receiverName",
|
|
|
+ key: "receiverName"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "拆分时间",
|
|
|
+ dataIndex: "splitTimes",
|
|
|
+ key: "splitTimes"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ dataIndex: "caozuo",
|
|
|
+ key: "caouzo",
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ margin: "0 10px" }}
|
|
|
+ disabled={record.distributeSign == 1 ? true : false}
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation(), this.evaluate(record, "咨询师经理");
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 转交
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ style={{ margin: "0 10px" }}
|
|
|
+ disabled={record.distributeSign == 1 ? true : false}
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation(), this.evaluate(record, "咨询师");
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 分配任务
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ return (
|
|
|
+ <Table
|
|
|
+ columns={columns}
|
|
|
+ dataSource={data}
|
|
|
+ pagination={false}
|
|
|
+ onRowClick={this.tableRowClick.bind(this)}
|
|
|
+ />
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ columns = [];
|
|
|
+ return (
|
|
|
+ <p style={{ fontWeight: "bold", color: "red", textAlign: "center" }}>
|
|
|
+ 此项目暂未拆分
|
|
|
+ </p>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ };
|
|
|
const rowSelection = {
|
|
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
@@ -695,16 +753,16 @@ const Task = React.createClass({
|
|
|
let departmentArr = this.state.departmentArr || [];
|
|
|
return (
|
|
|
<div className="user-content">
|
|
|
- {
|
|
|
- this.state.resVisible ? (
|
|
|
- <ResolutionDetail
|
|
|
- cancel={this.resCancel}
|
|
|
- detail={this.state.resRecord}
|
|
|
- visible={this.state.resVisible}
|
|
|
- id={this.state.resRecord.orderNo}
|
|
|
- />
|
|
|
- ) : ("")
|
|
|
- }
|
|
|
+ {this.state.resVisible ? (
|
|
|
+ <ResolutionDetail
|
|
|
+ cancel={this.resCancel}
|
|
|
+ detail={this.state.resRecord}
|
|
|
+ visible={this.state.resVisible}
|
|
|
+ id={this.state.resRecord.orderNo}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ ""
|
|
|
+ )}
|
|
|
<ResolutionPro
|
|
|
resolutionVisible={this.state.resolutionVisible}
|
|
|
number={this.state.resolutionNumber}
|
|
@@ -1001,6 +1059,24 @@ const Task = React.createClass({
|
|
|
<span>{this.state.financeMobile}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单留言"
|
|
|
+ >
|
|
|
+ <span>{this.state.orderRemarks}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item" {...formItemLayout} label="">
|
|
|
+ <Button onClick={this.getOrderLog}>查看订单日志</Button>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <OrderRiZi
|
|
|
+ dataSourcerizhi={this.state.dataSourceY}
|
|
|
+ closeOrderLog={this.closeOrderLog}
|
|
|
+ visible={this.state.avisible}
|
|
|
+ loading={this.state.loading}
|
|
|
+ />
|
|
|
<div>
|
|
|
<span style={{ marginLeft: "50px", fontSize: "20px" }}>
|
|
|
项目业务
|