|
@@ -100,6 +100,40 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
+ userList:[
|
|
|
+ {
|
|
|
+ title: '用户编号',
|
|
|
+ dataIndex: 'userNo',
|
|
|
+ key: 'userNo'
|
|
|
+ }, {
|
|
|
+ title: '用户姓名',
|
|
|
+ dataIndex: 'name',
|
|
|
+ key: 'name'
|
|
|
+ },{
|
|
|
+ title: '部门机构',
|
|
|
+ dataIndex: 'departmentName',
|
|
|
+ key: 'departmentName'
|
|
|
+ }, {
|
|
|
+ title: '职务',
|
|
|
+ dataIndex: 'position',
|
|
|
+ key: 'position'
|
|
|
+ },{
|
|
|
+ title: '联系手机',
|
|
|
+ dataIndex: 'mobile',
|
|
|
+ key: 'mobile'
|
|
|
+ }, {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'abc',
|
|
|
+ key: 'abc',
|
|
|
+ render:(text,record,index)=>{
|
|
|
+ return (
|
|
|
+ <Popconfirm title={'您确认指定【'+record.departmentName+'-'+record.name+'】为项目负责人?'} onConfirm={(e)=>{this.confirmSelect(record)}} okText="确认" cancelText="取消">
|
|
|
+ <Button style={{marginRight:'5px'}} type="primary">选定</Button>
|
|
|
+ </Popconfirm>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
flowList:[
|
|
|
{
|
|
|
title: '平台流水号',
|
|
@@ -163,7 +197,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + '/api/admin/order/getServiceOrderDetail',
|
|
|
data: {
|
|
|
- orderNo: record.orderNo
|
|
|
+ orderNo: record
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let thisData = data.data;
|
|
@@ -278,18 +312,158 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
addnextVisible:true,
|
|
|
});
|
|
|
},
|
|
|
+ /*
|
|
|
+ * 选择负责人
|
|
|
+ */
|
|
|
+ //转交
|
|
|
+ confirmDelet(index){
|
|
|
+ this.setState({
|
|
|
+ showDesc:false,
|
|
|
+ distributionVisible:true
|
|
|
+ });
|
|
|
+ this.departmentList()
|
|
|
+ },
|
|
|
+ distributionCancel(){
|
|
|
+ this.setState({
|
|
|
+ distributionVisible:false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //分配对象列表
|
|
|
+ contactList(){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/superviser/adminList',
|
|
|
+ data: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 99,
|
|
|
+ departmentId:this.state.departmenttList,
|
|
|
+ name:this.state.financeNameSearch,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theArr = [];
|
|
|
+ if (!data.data) {
|
|
|
+ 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,
|
|
|
+ id: thisdata.id,
|
|
|
+ userNo: thisdata.userNo,
|
|
|
+ name:thisdata.name,
|
|
|
+ departmentName:thisdata.departmentName,
|
|
|
+ departmentId:thisdata.departmentId,
|
|
|
+ position:thisdata.position,
|
|
|
+ mobile:thisdata.mobile,
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ distributionList: theArr,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //选定对象
|
|
|
+ confirmSelect(record){
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/order/transferOrder",
|
|
|
+ data: {
|
|
|
+ orderNo:this.state.orderNo,
|
|
|
+ aid:record.id,
|
|
|
+ targetType:2
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('转交成功!');
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ this.distributionCancel();
|
|
|
+ this.loaduser(this.state.orderNo);
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //部门
|
|
|
+ departmentList() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/organization/selectSuperId",
|
|
|
+ data: {
|
|
|
+
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let thedata = data.data;
|
|
|
+ let theArr=[];
|
|
|
+ if(!thedata) {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thedata = {};
|
|
|
+ }else{
|
|
|
+ thedata.map(function(item,index){
|
|
|
+ theArr.push({
|
|
|
+ key:index,
|
|
|
+ name:item.name,
|
|
|
+ id:item.id,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ departmentArr:theArr,
|
|
|
+ })
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ searchOrder(){
|
|
|
+ this.contactList();
|
|
|
+ },
|
|
|
+ resetOrder(){
|
|
|
+ this.state.departmenttList=undefined;
|
|
|
+ this.state.financeNameSearch='';
|
|
|
+ this.setState({
|
|
|
+ distributionList:[]
|
|
|
+ });
|
|
|
+ },
|
|
|
componentWillMount() {
|
|
|
|
|
|
},
|
|
|
componentWillReceiveProps(nextProps) { //props改变时触发
|
|
|
this.state.visible = nextProps.showDesc;
|
|
|
if(nextProps.userDetaile && nextProps.showDesc ) {
|
|
|
- this.loaduser(nextProps.datauser);
|
|
|
+ this.loaduser(nextProps.datauser.orderNo);
|
|
|
this.loadData(nextProps.datauser);
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
|
- const FormItem = Form.Item
|
|
|
+ const FormItem = Form.Item;
|
|
|
+ let departmentArr = this.state.departmentArr || [];
|
|
|
const formItemLayout = {
|
|
|
labelCol: { span: 8 },
|
|
|
wrapperCol: { span: 14 },
|
|
@@ -422,6 +596,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="项目负责人" >
|
|
|
<span>{orderDetaiel.technicianName}</span>
|
|
|
+ {!orderDetaiel.technicianName?<Button onClick={this.confirmDelet} style={{float:'right'}}>选择负责人</Button>:''}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -518,6 +693,42 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
</Spin>
|
|
|
</Form >
|
|
|
</Modal>
|
|
|
+ <Modal maskClosable={false} visible={this.state.distributionVisible}
|
|
|
+ onOk={this.distributionCancel} onCancel={this.distributionCancel}
|
|
|
+ width='800px'
|
|
|
+ title='请选择'
|
|
|
+ footer=''
|
|
|
+ className="admin-desc-content">
|
|
|
+ <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div>
|
|
|
+ <Select placeholder="订单部门"
|
|
|
+ style={{ width: 150 ,marginRight:'10px',marginLeft:'10px'}}
|
|
|
+ value={this.state.departmenttList}
|
|
|
+ onChange={(e) => { this.setState({ departmenttList: e }) }}>
|
|
|
+ {
|
|
|
+ departmentArr.map(function (item) {
|
|
|
+ return <Select.Option key={item.id} >{item.name}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ <Input placeholder="项目负责人" style={{width:'150px',marginLeft:'10px'}}
|
|
|
+ value={this.state.financeNameSearch}
|
|
|
+ onChange={(e) => { this.setState({ financeNameSearch: e.target.value }); }} />
|
|
|
+ <Button type="primary" onClick={this.searchOrder} style={{marginLeft:'10px',marginRight:'10px'}}>搜索</Button>
|
|
|
+ <Button onClick={this.resetOrder}>重置</Button>
|
|
|
+ </div>
|
|
|
+ <div className="patent-table" style={{marginTop:'10px'}}>
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table columns={this.state.userList}
|
|
|
+ dataSource={this.state.distributionList}
|
|
|
+ pagination={false}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
)
|
|
|
}
|