Browse Source

外呼开发

dev01 2 days ago
parent
commit
15d1c99fb6

+ 232 - 232
js/component/common/enterpriseNameChange/index.jsx

@@ -6,250 +6,250 @@ import './index.less';
 import $ from "jquery/src/ajax";
 
 class EnterpriseNameChange extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            visible: false,
-            enterpriseName: '',
-            loading: false,
-            colunmn: [
-                {
-                    title: "操作人名称",
-                    dataIndex: "adminName",
-                    key: "adminName",
-                },
-                {
-                    title: "客户名称",
-                    dataIndex: "name",
-                    key: "name",
-                    render: (text) => {
-                        return (
-                            <Tooltip title={text}>
-                                <div 
-                                // style={{
-                                //     maxWidth: '150px',
-                                //     overflow: 'hidden',
-                                //     textOverflow: "ellipsis",
-                                //     whiteSpace: 'nowrap',
-                                // }}
-                                >{text}</div>
-                            </Tooltip>
-                        )
-                    }
-                },
-                {
-                    title: "操作时间",
-                    dataIndex: "createTimes",
-                    key: "createTimes",
-                },
-            ],
-            dataSource: []
-        }
-        this.onCancel = this.onCancel.bind(this);
-        this.onOk = this.onOk.bind(this);
+  constructor(props) {
+    super(props);
+    this.state = {
+      visible: false,
+      enterpriseName: '',
+      loading: false,
+      colunmn: [
+        {
+          title: "操作人名称",
+          dataIndex: "adminName",
+          key: "adminName",
+        },
+        {
+          title: "客户名称",
+          dataIndex: "name",
+          key: "name",
+          render: (text) => {
+            return (
+              <Tooltip title={text}>
+                <div
+                // style={{
+                //     maxWidth: '150px',
+                //     overflow: 'hidden',
+                //     textOverflow: "ellipsis",
+                //     whiteSpace: 'nowrap',
+                // }}
+                >{text}</div>
+              </Tooltip>
+            )
+          }
+        },
+        {
+          title: "操作时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+        },
+      ],
+      dataSource: []
     }
+    this.onCancel = this.onCancel.bind(this);
+    this.onOk = this.onOk.bind(this);
+  }
 
-    onCancel() {
-        this.setState({
-            visible: false,
-            loading: false,
-        })
-    }
+  onCancel() {
+    this.setState({
+      visible: false,
+      loading: false,
+    })
+  }
 
-    onOk() {
-        if (!this.state.enterpriseName) {
-            message.warning('请输入企业名称!');
-            return;
-        }
-        let re = new RegExp("^[\u4e00-\u9fa5]");
-        if (!re.test(this.state.enterpriseName)) {
-            message.warning('公司名称必须以汉字开头!')
-            return
-        }
-        if (!re.test(this.state.enterpriseName.charAt(this.state.enterpriseName.length - 1))) {
-            message.warning('公司名称必须以汉字结尾!')
-            return
-        }
-        if (this.state.enterpriseName.length > 64) {
-            message.warning('公司名称字数不超过64个!')
-            return;
-        };
-        let regu = /[`~!#$%^&*'_[\]+=<>?:"{}|~!#¥%……&*=-@-!{}|/《》?:“”【】、;;‘’,,.。、\s+]/g;
-        if (regu.test(this.state.enterpriseName)) {
-            message.warning('公司名称不能存在特殊符号或空格!')
-            return false;
-        }
+  onOk() {
+    if (!this.state.enterpriseName) {
+      message.warning('请输入企业名称!');
+      return;
+    }
+    let re = new RegExp("^[\u4e00-\u9fa5]");
+    if (!re.test(this.state.enterpriseName)) {
+      message.warning('公司名称必须以汉字开头!')
+      return
+    }
+    if (!re.test(this.state.enterpriseName.charAt(this.state.enterpriseName.length - 1))) {
+      message.warning('公司名称必须以汉字结尾!')
+      return
+    }
+    if (this.state.enterpriseName.length > 64) {
+      message.warning('公司名称字数不超过64个!')
+      return;
+    };
+    let regu = /[`~!#$%^&*'_[\]+=<>?:"{}|~!#¥%……&*=-@-!{}|/《》?:“”【】、;;‘’,,.。、\s+]/g;
+    if (regu.test(this.state.enterpriseName)) {
+      message.warning('公司名称不能存在特殊符号或空格!')
+      return false;
+    }
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      url: globalConfig.context + "/api/admin/customer/updateUserName",
+      method: "post",
+      data: {
+        uid: this.props.enterpriseId,
+        userName: this.state.enterpriseName
+      }
+    }).done(
+      function (data) {
         this.setState({
-            loading: true
+          loading: false
         });
-        $.ajax({
-            url: globalConfig.context + "/api/admin/customer/updateUserName",
-            method: "post",
-            data: {
-                uid: this.props.enterpriseId,
-                userName: this.state.enterpriseName
-            }
-        }).done(
-            function (data) {
-                this.setState({
-                    loading: false
-                });
-                if (data.error.length === 0) {
-                    message.success("恭喜您,更名成功!");
-                    this.setState({
-                        visible: false
-                    })
-                    this.props.onChangeSuccess(this.state.enterpriseName);
-                } else {
-                    message.warning(data.error[0].message);
-                }
-            }.bind(this)
-        )
-    }
+        if (data.error.length === 0) {
+          message.success("恭喜您,更名成功!");
+          this.setState({
+            visible: false
+          })
+          this.props.onChangeSuccess(this.state.enterpriseName);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this)
+    )
+  }
 
-    loadData() {
+  loadData() {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/listUserName",
+      data: {
+        uid: this.props.enterpriseId,
+      },
+      success: function (data) {
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          this.setState({
+            initialName: data.data[0] ? data.data[0].name : ''
+          })
+          data.data.splice(0, 1);
+          this.setState({
+            dataSource: data.data,
+          });
+        }
+      }.bind(this),
+    }).always(
+      function () {
         this.setState({
-            loading: true
+          loading: false,
         });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/customer/listUserName",
-            data: {
-                uid: this.props.enterpriseId,
-            },
-            success: function (data) {
-                if (data.error.length || data.data.list == "") {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    }
-                } else {
-                    this.setState({
-                        initialName: data.data[0] ? data.data[0].name : ''
-                    })
-                    data.data.splice(0, 1);
-                    this.setState({
-                        dataSource: data.data,
-                    });
-                }
-            }.bind(this),
-        }).always(
-            function () {
-                this.setState({
-                    loading: false,
-                });
-            }.bind(this)
-        );
+      }.bind(this)
+    );
 
-    }
+  }
 
-    render() {
-        return (
-            <span className='enterpriseNameChange'>
-                <Button
-                    type="primary"
-                    disabled={this.props.disabled}
-                    loading={this.state.loading}
-                    style={this.props.style}
-                    onClick={() => {
-                      if (!this.props.data.level && this.props.data.level != 0) {
-                        Modal.warning({
-                          title: '系统提示',
-                          content: (
-                            <div>
-                              <p>请先设置客户类型。操作位置:</p>
-                              <p>1.勾选客户名称</p>
-                              <p>2.点击切换至“操作”项</p>
-                              <p>3.选择相应的客户类型即可。</p>
-                            </div>
-                          ),
-                        });
-                        return
-                      }
-                        if (this.props.type === 'journal') {
-                            this.loadData();
-                        }
+  render() {
+    return (
+      <span className='enterpriseNameChange'>
+        <Button
+          type="primary"
+          disabled={this.props.disabled}
+          loading={this.state.loading}
+          style={this.props.style}
+          onClick={() => {
+            if (!this.props.data.level && this.props.data.level != 0) {
+              Modal.warning({
+                title: '系统提示',
+                content: (
+                  <div>
+                    <p>请先设置客户类型。操作位置:</p>
+                    <p>1.勾选客户名称</p>
+                    <p>2.点击切换至“操作”项</p>
+                    <p>3.选择相应的客户类型即可。</p>
+                  </div>
+                ),
+              });
+              return
+            }
+            if (this.props.type === 'journal') {
+              this.loadData();
+            }
+            this.setState({
+              visible: true
+            })
+          }}>
+          {this.props.type === 'journal' ? '更改日志' : this.props.type === 'modify' ? '企业更名' : ''}
+        </Button>
+        {
+          this.props.changeOtherInfor ?
+            <InforChange
+              enterpriseId={this.props.enterpriseId}
+              type={this.props.type}
+              data={this.props.data}
+              onCancel={this.props.onCancel}
+            /> : null
+        }
+        <Modal
+          footer={null}
+          maskClosable={false}
+          width={this.props.type === 'journal' ? '900px' : this.props.type === 'modify' ? '300px' : ''}
+          title={this.props.type === 'journal' ? '更名日志' : this.props.type === 'modify' ? '企业更名' : ''}
+          visible={this.state.visible}
+          onCancel={this.onCancel}>
+          <div>
+            {this.props.type === 'modify' ?
+              <div className='enterpriseNameContent'>
+                <div className='enterpriseNameItem'>
+                  <div className='enterpriseNameTitle'>更名前:</div>
+                  <div className='enterpriseNameValue'>{this.props.enterpriseName}</div>
+                </div>
+                <div className='enterpriseNameItem'>
+                  <div className='enterpriseNameTitle'>更名后:</div>
+                  <div className='enterpriseNameValue'>
+                    <Input
+                      value={this.state.enterpriseName}
+                      onChange={(e) => {
                         this.setState({
-                            visible: true
+                          enterpriseName: e.target.value
                         })
-                    }}>
-                    {this.props.type === 'journal' ? '更改日志' : this.props.type === 'modify' ? '企业更名' : ''}
-                </Button>
-                {
-                    this.props.changeOtherInfor ?
-                        <InforChange
-                            enterpriseId={this.props.enterpriseId}
-                            type={this.props.type}
-                            data={this.props.data}
-                            onCancel={this.props.onCancel}
-                        /> : null
-                }
-                <Modal
-                    footer={null}
-                    maskClosable={false}
-                    width={this.props.type === 'journal' ? '900px' : this.props.type === 'modify' ? '300px' : ''}
-                    title={this.props.type === 'journal' ? '更名日志' : this.props.type === 'modify' ? '企业更名' : ''}
-                    visible={this.state.visible}
-                    onCancel={this.onCancel}>
-                    <div>
-                        {this.props.type === 'modify' ?
-                            <div className='enterpriseNameContent'>
-                                <div className='enterpriseNameItem'>
-                                    <div className='enterpriseNameTitle'>更名前:</div>
-                                    <div className='enterpriseNameValue'>{this.props.enterpriseName}</div>
-                                </div>
-                                <div className='enterpriseNameItem'>
-                                    <div className='enterpriseNameTitle'>更名后:</div>
-                                    <div className='enterpriseNameValue'>
-                                        <Input
-                                            value={this.state.enterpriseName}
-                                            onChange={(e) => {
-                                                this.setState({
-                                                    enterpriseName: e.target.value
-                                                })
-                                            }} />
-                                    </div>
-                                </div>
-                            </div> : this.props.type === 'journal' ?
-                                <div>
-                                    {this.state.initialName ? <div style={{ paddingBottom: '20px' }}>
-                                        初始客户名称:{this.state.initialName}
-                                    </div> : null}
-                                    <Spin spinning={this.state.loading} >
-                                        <Table
-                                            columns={this.state.colunmn}
-                                            dataSource={this.state.dataSource}
-                                            pagination={false}
-                                            scroll={{ x: "max-content", y: 0 }}
-                                            bordered
-                                            size="small"
-                                        />
-                                    </Spin>
-                                </div> : null
-                        }
-                        {
-                            this.props.type === 'modify' ?
-                                <Popconfirm
-                                    placement="top"
-                                    title="确定要修改吗?"
-                                    onConfirm={(e) => {
-                                        e.stopPropagation();
-                                        this.onOk();
-                                    }}
-                                    okText="确定"
-                                    cancelText="取消"
-                                >
-                                    <Button type='primary' onClick={this.handleCancel}>
-                                        确定修改
-                                    </Button>
-                                </Popconfirm> : null
-                        }
-                    </div>
-                </Modal>
-            </span>
-        )
-    }
+                      }} />
+                  </div>
+                </div>
+              </div> : this.props.type === 'journal' ?
+                <div>
+                  {this.state.initialName ? <div style={{ paddingBottom: '20px' }}>
+                    初始客户名称:{this.state.initialName}
+                  </div> : null}
+                  <Spin spinning={this.state.loading} >
+                    <Table
+                      columns={this.state.colunmn}
+                      dataSource={this.state.dataSource}
+                      pagination={false}
+                      scroll={{ x: "max-content", y: 0 }}
+                      bordered
+                      size="small"
+                    />
+                  </Spin>
+                </div> : null
+            }
+            {
+              this.props.type === 'modify' ?
+                <Popconfirm
+                  placement="top"
+                  title="确定要修改吗?"
+                  onConfirm={(e) => {
+                    e.stopPropagation();
+                    this.onOk();
+                  }}
+                  okText="确定"
+                  cancelText="取消"
+                >
+                  <Button type='primary' onClick={this.handleCancel}>
+                    确定修改
+                  </Button>
+                </Popconfirm> : null
+            }
+          </div>
+        </Modal>
+      </span>
+    )
+  }
 }
 
 export default EnterpriseNameChange;

+ 413 - 0
js/component/manageCenter/customer/NEW/components/outbound/index.jsx

@@ -0,0 +1,413 @@
+import React, { Component } from "react";
+import { Table, Spin, Button, message, Select, Modal, Icon } from "antd";
+import $ from "jquery/src/ajax";
+import "./index.less";
+
+class Outbound extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      loading: false,
+      pVisible: false,
+      rVisible: false,
+      tVisible: false,
+      uList: [],
+      tList: [],
+      transAgent: "",
+      mobile: '',
+      info: {},
+      dataSource: [],
+      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: 'adminName',
+          key: 'adminName',
+        },
+        {
+          title: '联系人',
+          dataIndex: 'contacts',
+          key: 'contacts',
+        },
+        {
+          title: '电话(尾号)',
+          dataIndex: 'mobileLastDigits',
+          key: 'mobileLastDigits',
+          width: 100,
+        },
+        {
+          title: '时长(秒)',
+          dataIndex: 'duration',
+          key: 'duration',
+        },
+        {
+          title: '时间',
+          dataIndex: 'createTime',
+          key: 'createTime',
+        },
+      ],
+    };
+    this.onOk = this.onOk.bind(this);
+    this.onCancel = this.onCancel.bind(this);
+    this.blindTransferByAgent = this.blindTransferByAgent.bind(this);
+    this.webSocket = null;
+  }
+
+  componentDidMount() {
+    this.webSocket = new WebSocket('wss://uat.jishutao.com/webSocketServer');
+
+    // 处理WebSocket打开事件
+    this.webSocket.onopen = () => {
+      console.log('WebSocket connection opened');
+    };
+
+    // 处理收到消息的事件
+    this.webSocket.onmessage = (event) => {
+      const newMessage = event.data;
+      this.setState((prevState) => ({
+        messages: [...prevState.messages, newMessage],
+      }));
+    };
+
+    // 处理WebSocket关闭事件
+    this.webSocket.onclose = () => {
+      console.log('WebSocket connection closed');
+    };
+
+    // 处理WebSocket错误事件
+    this.webSocket.onerror = (error) => {
+      console.error('WebSocket error:', error);
+    };
+  }
+
+  componentWillUnmount() {
+    // 在组件卸载前关闭WebSocket连接
+    if (this.webSocket) {
+      this.webSocket.close();
+    }
+  }
+
+  onOk() {
+    this.callNumber()
+  }
+
+  onCancel() {
+    this.setState({
+      pVisible: false
+    })
+  }
+  // 公共库-默认联系人
+  getDefaultMobile() {
+    const { uid } = this.props
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/userOutbound/getDefaultMobile",
+      data: {
+        uid,
+      }
+    }).done(function (data) {
+      if (!data.error.length) {
+        if (data.data) {
+          let mobile = data.data.mobile
+          this.setState({
+            pVisible: true,
+            mobile,
+          })
+        } else {
+          message.warning("暂无查询到联系人号码~")
+        }
+      } else {
+        message.warning(data.error[0].message);
+      };
+
+    }.bind(this));
+  }
+  // 私有-客户联系方式列表
+  findCustomerContacts() {
+    const { uid } = this.props
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
+      data: {
+        uid,
+      }
+    }).done(function (data) {
+      if (!data.error.length) {
+        let list = data.data || [];
+        let mobile = "";
+        if (list && list.length > 0) {
+          for (var i = 0; i < list.length; i++) {
+            if (list[i].major == 1) {
+              mobile = list[i].mobile
+            }
+          }
+        }
+        this.setState({
+          pVisible: true,
+          mobile: mobile,
+          uList: list,
+        })
+      } else {
+        message.warning(data.error[0].message);
+      };
+
+    }.bind(this));
+  }
+  // 转移列表
+  agentList() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/userOutbound/agentList",
+      data: {}
+    }).done(function (data) {
+      if (!data.error.length) {
+        let newList = data.data || []
+        this.setState({
+          transAgent: newList[0].callNo,
+          tList: newList
+        })
+      } else {
+        message.warning(data.error[0].message);
+      };
+
+    }.bind(this));
+  }
+  // 呼叫
+  callNumber() {
+    const { uid } = this.props
+    const { mobile } = this.state
+    $.ajax({
+      method: "post",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/userOutbound/callNumber",
+      data: {
+        uid,
+        callee: mobile,
+      }
+    }).done(function (data) {
+      if (!data.error.length) {
+        this.setState({
+          pVisible: false
+        })
+        message.success(data.data)
+      } else {
+        message.warning(data.error[0].message);
+      };
+
+    }.bind(this));
+  }
+  // 呼叫转移
+  blindTransferByAgent() {
+    const { transAgent } = this.state
+    $.ajax({
+      method: "post",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admblindTransferByAgentin/userOutbound",
+      data: {
+        transAgent,
+      }
+    }).done(function (data) {
+      if (!data.error.length) {
+        message.success(data.data)
+      } else {
+        message.warning(data.error[0].message);
+      };
+
+    }.bind(this));
+  }
+  // 通话记录
+  userCallList(pageNo) {
+    const { pagination } = this.state;
+    const { uid } = this.props
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/userOutbound/userCallList",
+      data: {
+        uid,
+        pageNo: pageNo || 1,
+        pageSize: pagination.pageSize,
+      },
+      success: function (data) {
+        this.setState({
+          loading: false,
+        });
+        if (data.error && data.error.length === 0) {
+          if (data.data.page.list) {
+            pagination.current = data.data.page.pageNo;
+            pagination.total = data.data.page.totalCount;
+            if (data.data.page && data.data.page.list && !data.data.page.list.length) {
+              pagination.current = 0;
+              pagination.total = 0;
+            }
+            this.setState({
+              dataSource: data.data.page.list,
+              pagination: this.state.pagination,
+              pageNo: data.data.pageNo,
+              info: data.data.sum
+            });
+          } 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)
+    );
+  }
+
+  render() {
+    const { pVisible, rVisible, tVisible, transAgent, tList, mobile, uList } = this.state
+    const { type, } = this.props
+
+    return (
+      <span>
+        {type != "history" &&
+          <Button
+            style={{ background: !pVisible ? "green" : "red", border: 0 }}
+            type="primary"
+            loading={pVisible}
+            onClick={() => {
+              type == "public"
+                ? this.getDefaultMobile()
+                : this.findCustomerContacts()
+            }}
+          >{!pVisible && <Icon type="phone" />} {!pVisible ? '呼叫' : '正在通话中'}</Button>}
+        {type == "private" &&
+          <Button
+            style={{ background: "green", border: 0, marginLeft: 20 }}
+            type="primary"
+            onClick={() => {
+              this.agentList();
+              this.setState({ tVisible: true })
+            }}
+          ><Icon type="phone" /> 呼叫转移</Button>}
+        <Button
+          style={{ background: "green", border: 0, marginLeft: 20 }}
+          type="primary"
+          onClick={() => {
+            this.userCallList();
+            this.setState({ rVisible: true })
+          }}
+        ><Icon type="phone" /> 历史记录</Button>
+        <Modal
+          title="联系人电话"
+          width={420}
+          visible={pVisible}
+          maskClosable={false}
+          okText="呼叫"
+          onOk={this.onOk}
+          onCancel={this.onCancel}
+        >
+          <div className="contacts">
+            <Select
+              style={{ width: 200 }}
+              value={mobile}
+              onChange={e => {
+                this.setState({
+                  mobile: e
+                })
+              }}
+            >
+              {
+                uList.map(item =>
+                  <Select.Option value={item.mobile} key={item.id}>{item.mobile}</Select.Option>
+                )
+              }
+            </Select>
+          </div>
+        </Modal>
+        <Modal
+          title="呼叫转移"
+          width={420}
+          visible={tVisible}
+          maskClosable={false}
+          okText="呼叫转移"
+          onOk={this.blindTransferByAgent}
+          onCancel={() => {
+            this.setState({
+              tVisible: false
+            })
+          }}
+        >
+          <div className="contacts">
+            <Select
+              style={{ width: 200 }}
+              value={transAgent}
+              onChange={(e) => {
+                this.setState({
+                  transAgent: e
+                })
+              }}
+            >
+              {
+                tList.map(item =>
+                  <Select.Option value={item.callNo} key={item.id}>{item.name}</Select.Option>
+                )
+              }
+            </Select>
+          </div>
+        </Modal>
+        <Modal
+          title="历史记录"
+          width={600}
+          visible={rVisible}
+          maskClosable={false}
+          onCancel={() => {
+            this.setState({
+              rVisible: false
+            })
+          }}
+          footer={null}
+        >
+          <div>
+            <div style={{ marginBottom: 5 }}>公司名称:{this.state.info.name}</div>
+            <div style={{ marginBottom: 10 }}>累计通话次数:{this.state.info.callCount}次&nbsp;&nbsp;&nbsp;&nbsp;通话时长:{this.state.info.callDuration}秒</div>
+            <Spin spinning={this.state.loading}>
+              <Table
+                size="middle"
+                columns={this.state.columns}
+                dataSource={this.state.dataSource}
+                pagination={this.state.pagination}
+              />
+            </Spin>
+          </div>
+        </Modal>
+      </span>
+    );
+  }
+}
+
+export default Outbound;

+ 5 - 0
js/component/manageCenter/customer/NEW/components/outbound/index.less

@@ -0,0 +1,5 @@
+.contacts{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}

+ 16 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/intentionDetail.jsx

@@ -9,6 +9,7 @@ import Account from './detail/account.jsx';  //账户信息
 import Visit from './detail/visit.jsx';
 import Business from './detail/business.jsx';
 import BasicPerson from './detail/basicPerson.jsx';
+import Outbound from '../../components/outbound';
 
 const IntentionDetail = React.createClass({
   getInitialState() {
@@ -114,7 +115,21 @@ const IntentionDetail = React.createClass({
       <div>
         {this.state.modalVisible ? <Modal
           className="customeDetails"
-          title="意向客户详情"
+          title={<div
+            style={{
+              display: "flex",
+              flexDirection: "row",
+              justifyContent: "space-between",
+            }}
+          >
+            <span>意向客户详情</span>
+            <span style={{ marginRight: 100 }}>
+              <Outbound
+                type="private"
+                uid={this.props.IntentionData.id}
+              />
+            </span>
+          </div>}
           width='92%'
           visible={this.state.modalVisible}
           onOk={this.detailsModal}

+ 13 - 1
js/component/manageCenter/customer/NEW/publicCustomer/publicCustomer.jsx

@@ -1,9 +1,10 @@
 import React from 'react';
-import { Button, Cascader, Input, Select, Spin, Table, message, Form, Tabs, Modal } from 'antd';
+import { Button, Cascader, Input, Select, Spin, Table, message, Form, Tabs, Modal, Icon } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import { citySelect, provinceList } from '@/NewDicProvinceList';
 import { ShowModal, onReplace } from '../../../../tools.js'
+import Outbound from '../../NEW/components/outbound';
 import ShowModalDiv from "@/showModal.jsx";
 import { ChooseList } from "../../../order/orderNew/chooseList";
 
@@ -133,6 +134,17 @@ const QueryCustomer = React.createClass({
         title: '转换时间',
         dataIndex: 'transferTime',
         key: 'transferTime',
+        width: 500,
+        render: (text, record) => {
+          return <div>
+            <span style={{ marginRight: 20 }}>{text}</span>
+            {!this.props.intentionState &&
+              <Outbound
+                type="public"
+                uid={record.id}
+              />}
+          </div>
+        }
       },
       {
         title: '操作',

+ 18 - 1
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/intentionDetail.jsx

@@ -10,6 +10,7 @@ import Visit from './detail/visit.jsx';
 import Business from './detail/business.jsx';
 import LockBusiness from './detail/lockBusiness.jsx';
 import BasicPerson from './detail/basicPerson.jsx';//基本信息
+import Outbound from '../../components/outbound';
 
 const IntentionDetail = React.createClass({
   getInitialState() {
@@ -117,7 +118,23 @@ const IntentionDetail = React.createClass({
       <div>
         {this.state.modalVisible ? <Modal
           className="customeDetails"
-          title="签单客户详情"
+          title={
+            <div
+              style={{
+                display: "flex",
+                flexDirection: "row",
+                justifyContent: "space-between",
+              }}
+            >
+              <span>签单客户详情</span>
+              <span style={{ marginRight: 100 }}>
+                <Outbound
+                  type="history"
+                  uid={this.props.IntentionData.id}
+                />
+              </span>
+            </div>
+          }
           width="1300px"
           maskClosable={false}
           visible={this.state.modalVisible}