test01 %!s(int64=3) %!d(string=hai) anos
pai
achega
8aff5e57a1

+ 2 - 0
js/component/common/projectOperation/index.jsx

@@ -31,6 +31,8 @@ class ProjectOperation extends Component{
             patentTypeList:[],
 
             loading:false,
+
+            patentTransfer:props.dataInfor.patentTransfer
         }
         this.onSubmit = this.onSubmit.bind(this);
         this.httpChange = this.httpChange.bind(this);

+ 15 - 5
js/component/common/tabelContent/autoCompleteSearch.jsx

@@ -7,23 +7,32 @@ class AutoCompleteSearch extends Component{
         super(props);
         this.state={
             contactsOption:[],
-            autoCompleteSearchLoading:false
+            autoCompleteSearchLoading:false,
+            searchValue:props.config.searchValue
         }
         this.onSelect = this.onSelect.bind(this);
         this.onSearch = this.onSearch.bind(this);
     }
 
-    onSelect(value){
-        this.props.onSelect(value)
+    onSelect(value,option){
+        let arr = this.state.contactsOption.filter(v=>v.value === value);
+        this.setState({
+            searchValue:arr[0]['value']
+        })
+        this.props.onSelect(value,option.props.children)
     }
 
     onSearch(value){
+        if(this.state.autoCompleteSearchLoading){
+            this.ajax && this.ajax.abort();
+        }
         this.setState({
-            autoCompleteSearchLoading: true
+            autoCompleteSearchLoading: true,
+            searchValue: value
         });
         let data = {};
         data[this.props.config.search] = value
-        $.ajax({
+        this.ajax = $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
@@ -64,6 +73,7 @@ class AutoCompleteSearch extends Component{
         return (
             <Spin spinning={this.state.autoCompleteSearchLoading}>
                 <AutoComplete
+                    value={this.state.searchValue}
                     dataSource={customerOptions}
                     style={{ width: 200 }}
                     onSelect={this.onSelect}

+ 107 - 103
js/component/common/tabelContent/index.jsx

@@ -30,7 +30,7 @@ class TabelContent extends Component{
                     return "共" + total + "条数据";
                 }
             },
-            searchValues:{},
+            searchValues:this.props.searchConfig || {},
             contactsOption:[]
         }
         this.loadData= this.loadData.bind(this);
@@ -43,28 +43,29 @@ class TabelContent extends Component{
         this.setState({
             loading:true
         })
-        let data = {
+        let searchInfor = {
             pageNo: pageNo || 1,
             pageSize: this.state.pagination.pageSize,
         }
         if(this.props.query){
-            data = Object.assign(data,this.props.query);
+            searchInfor = Object.assign(searchInfor,this.props.query);
         }
         if(Object.keys(this.state.searchValues).length > 0){
-            data = Object.assign(data,this.state.searchValues);
+            searchInfor = Object.assign(searchInfor,this.state.searchValues);
         }
         $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + this.props.tabelApi,
-            data,
+            data:searchInfor,
             success: function(data) {
                 ShowModal(this);
                 this.setState({
                     loading:false
                 })
                 if (data.error && data.error.length === 0) {
+                    this.props.searchOperation && this.props.searchOperation(searchInfor);
                     if(data.data.list){
                         this.state.pagination.current = data.data.pageNo;
                         this.state.pagination.total = data.data.totalCount;
@@ -206,106 +207,109 @@ class TabelContent extends Component{
                         <div className="user-search" style={{paddingTop:'10px'}}>
                             <Form layout="inline">
                                 {
-                                    (this.props.searchList || []).map((v,k)=>(
-                                        v.type === 'text' ?
-                                            <FormItem label={v.title}>
-                                                <Input
-                                                    key={k}
-                                                    placeholder={v.placeholder}
-                                                    value={searchValues[v.dataKey] ? searchValues[v.dataKey] : (v.defaultValue || undefined)}
-                                                    style={v.style ? v.style : { width: 150, marginRight: 10}}
-                                                    onChange={(e) => {
-                                                        searchValues[v.dataKey] = e.target.value
-                                                        this.setState({
-                                                            searchValues:  searchValues
-                                                        });
-                                                    }}
-                                                />
-                                            </FormItem> :
-                                            v.type === 'autoComplete' ?
-                                                <AutoCompleteSearch
-                                                    onSelect={(value)=>{
-                                                        searchValues[v.dataKey] = value
-                                                        this.setState({
-                                                            searchValues:  searchValues
-                                                        });
-                                                    }}
-                                                    config={v}
-                                                />
-                                                :
-                                            v.type === 'select' || v.type === 'departmentSelect' ?
-                                                <FormItem label={v.title} style={{marginTop:'-8px'}}>
-                                                    <Spin spinning={this.state.departmentLoading}>
-                                                        {
-                                                            <Select
-                                                                key={k}
-                                                                placeholder={v.placeholder}
-                                                                style={v.style ? v.style : { width:200,marginRight: 10}}
-                                                                value={searchValues[v.dataKey] ? searchValues[v.dataKey] : (v.defaultValue || undefined)}
-                                                                onChange={(e) => {
-                                                                    searchValues[v.dataKey] = String(e);
-                                                                    if(v.type === 'departmentSelect'){
-                                                                        let arr = this.state.contactsOption.filter(v=>String(v.value) === String(e))
-                                                                        searchValues['depName'] = arr[0].label;
-                                                                    }
-                                                                    this.setState({
-                                                                        searchValues:  searchValues
-                                                                    });
-                                                                }}>
+                                    (this.props.searchList || []).map((v,k)=>{
+                                        return (
+                                            v.type === 'text' ?
+                                                <FormItem label={v.title}>
+                                                    <Input
+                                                        key={k}
+                                                        placeholder={v.placeholder}
+                                                        value={searchValues[v.dataKey] ? searchValues[v.dataKey] : (v.defaultValue || undefined)}
+                                                        style={v.style ? v.style : { width: 150, marginRight: 10}}
+                                                        onChange={(e) => {
+                                                            searchValues[v.dataKey] = e.target.value
+                                                            this.setState({
+                                                                searchValues:  searchValues
+                                                            });
+                                                        }}
+                                                    />
+                                                </FormItem> :
+                                                v.type === 'autoComplete' ?
+                                                    <AutoCompleteSearch
+                                                        onSelect={(value,title)=>{
+                                                            searchValues[v.dataKey] = value
+                                                            if(v.dataTitle){searchValues[v.dataTitle] = title}
+                                                            this.setState({
+                                                                searchValues:  searchValues
+                                                            });
+                                                        }}
+                                                        config={v}
+                                                    />
+                                                    :
+                                                    v.type === 'select' || v.type === 'departmentSelect' ?
+                                                        <FormItem label={v.title} style={{marginTop:'-8px'}}>
+                                                            <Spin spinning={this.state.departmentLoading}>
                                                                 {
-                                                                    v.selectOptionList ?
-                                                                        v.selectOptionList():
-                                                                        (
-                                                                            v.type === 'departmentSelect' ?
-                                                                                this.state.contactsOption :
-                                                                                (v.selectList || [])
-                                                                        ).map((v)=>(
-                                                                            <Select.Option
-                                                                                key={v.value}
-                                                                                value={v.value}
-                                                                            >
-                                                                                {v.label}
-                                                                            </Select.Option>
-                                                                        ))
+                                                                    <Select
+                                                                        key={k}
+                                                                        placeholder={v.placeholder}
+                                                                        style={v.style ? v.style : { width:200,marginRight: 10}}
+                                                                        value={searchValues[v.dataKey] ? searchValues[v.dataKey] : (v.defaultValue || undefined)}
+                                                                        onChange={(e) => {
+                                                                            searchValues[v.dataKey] = String(e);
+                                                                            if(v.type === 'departmentSelect'){
+                                                                                let arr = this.state.contactsOption.filter(v=>String(v.value) === String(e))
+                                                                                searchValues['depName'] = arr[0].label;
+                                                                            }
+                                                                            this.setState({
+                                                                                searchValues:  searchValues
+                                                                            });
+                                                                        }}>
+                                                                        {
+                                                                            v.selectOptionList ?
+                                                                                v.selectOptionList():
+                                                                                (
+                                                                                    v.type === 'departmentSelect' ?
+                                                                                        this.state.contactsOption :
+                                                                                        (v.selectList || [])
+                                                                                ).map((v)=>(
+                                                                                    <Select.Option
+                                                                                        key={v.value}
+                                                                                        value={v.value}
+                                                                                    >
+                                                                                        {v.label}
+                                                                                    </Select.Option>
+                                                                                ))
+                                                                        }
+                                                                    </Select>
                                                                 }
-                                                            </Select>
-                                                        }
-                                                    </Spin>
-                                                </FormItem>: v.type === 'times' ?
-                                                <FormItem label={v.title}>
-                                                    {
-                                                        v.format === 'YYYY/MM' ?
-                                                            <MonthPicker
-                                                                value={searchValues[v.dataKey] ? moment(searchValues[v.dataKey]) : null}
-                                                                style={{marginRight:'10px',marginTop: '2px'}}
-                                                                onChange={(data, dataString) => {
-                                                                    searchValues[v.dataKey] = String(dataString);
-                                                                    this.setState({
-                                                                        searchValues:  searchValues
-                                                                    });
-                                                                }}
-                                                            />:
-                                                            <RangePicker
-                                                                style={{marginRight:'10px',marginTop: '2px'}}
-                                                                value={[
-                                                                    searchValues[v.dataKey[0]]
-                                                                        ? moment(searchValues[v.dataKey[0]])
-                                                                        : null,
-                                                                    searchValues[v.dataKey[1]]
-                                                                        ? moment(searchValues[v.dataKey[1]])
-                                                                        : null,
-                                                                ]}
-                                                                onChange={(data, dataString) => {
-                                                                    searchValues[v.dataKey[0]] = String(dataString[0]);
-                                                                    searchValues[v.dataKey[1]] = String(dataString[1]);
-                                                                    this.setState({
-                                                                        searchValues:  searchValues
-                                                                    });
-                                                                }}
-                                                            />
-                                                    }
-                                                </FormItem>: null
-                                    ))
+                                                            </Spin>
+                                                        </FormItem>: v.type === 'times' ?
+                                                        <FormItem label={v.title}>
+                                                            {
+                                                                v.format === 'YYYY/MM' ?
+                                                                    <MonthPicker
+                                                                        value={searchValues[v.dataKey] ? moment(searchValues[v.dataKey]) : null}
+                                                                        style={{marginRight:'10px',marginTop: '2px'}}
+                                                                        onChange={(data, dataString) => {
+                                                                            searchValues[v.dataKey] = String(dataString);
+                                                                            this.setState({
+                                                                                searchValues:  searchValues
+                                                                            });
+                                                                        }}
+                                                                    />:
+                                                                    <RangePicker
+                                                                        style={{marginRight:'10px',marginTop: '2px'}}
+                                                                        value={[
+                                                                            searchValues[v.dataKey[0]]
+                                                                                ? moment(searchValues[v.dataKey[0]])
+                                                                                : null,
+                                                                            searchValues[v.dataKey[1]]
+                                                                                ? moment(searchValues[v.dataKey[1]])
+                                                                                : null,
+                                                                        ]}
+                                                                        onChange={(data, dataString) => {
+                                                                            searchValues[v.dataKey[0]] = String(dataString[0]);
+                                                                            searchValues[v.dataKey[1]] = String(dataString[1]);
+                                                                            this.setState({
+                                                                                searchValues:  searchValues
+                                                                            });
+                                                                        }}
+                                                                    />
+                                                            }
+                                                        </FormItem>: null
+                                        )
+                                    })
                                 }
                                 <Button type="primary" onClick={()=>{
                                     this.loadData();

+ 148 - 129
js/component/manageCenter/customer/operationalData/signatureStatistics/detailedList.jsx

@@ -155,136 +155,144 @@ class DetailedList extends Component{
                     key: "financeName",
                 },
             ],
+            searchList:[
+                {
+                    type:'departmentSelect',
+                    dataKey:'depId',
+                    placeholder:'请选择部门'
+                },
+                {
+                    type:'times',
+                    title:'下单时间',
+                    dataKey:['startCreate','endCreate'],
+                },
+                {
+                    type:'times',
+                    title:'合同时间',
+                    dataKey:['startSign','endSign'],
+                },
+                {
+                    type:'select',
+                    dataKey:'sort',
+                    placeholder:'请选择排序',
+                    selectList:[
+                        {
+                            value:'0',
+                            label:'按总金额排序'
+                        },
+                        {
+                            value:'1',
+                            label:'按数量排序'
+                        },
+                    ]
+                },
+            ],
+            searchList1:[
+                {
+                    type:'text',
+                    dataKey:'orderNo',
+                    placeholder:'请输入订单编号'
+                },
+                {
+                    type:'text',
+                    dataKey:'name',
+                    placeholder:'请输入客户名称'
+                },
+                {
+                    type:'departmentSelect',
+                    dataKey:'depId',
+                    placeholder:'请选择部门'
+                },
+                {
+                    type:'text',
+                    dataKey:'contractNo',
+                    placeholder:'请输入合同编号'
+                },
+                {
+                    type:'select',
+                    dataKey:'liquidationStatus',
+                    placeholder:'请选择结算状态',
+                    selectList:[
+                        {
+                            value:'0',
+                            label:'首付待付请'
+                        },
+                        {
+                            value:'1',
+                            label:'尾款待付清'
+                        },
+                        {
+                            value:'2',
+                            label:'已付清'
+                        }
+                    ]
+                },
+                {
+                    type:'select',
+                    dataKey:'approval',
+                    placeholder:'请选择特批状态',
+                    selectList:[
+                        {
+                            value:'0',
+                            label:'非特批'
+                        },
+                        {
+                            value:'1',
+                            label:'特批'
+                        }
+                    ]
+                },
+                {
+                    type:'select',
+                    dataKey:'amountStatus',
+                    placeholder:'请选择签单金额',
+                    selectList:[
+                        {
+                            value:'0',
+                            label:'10万元以下'
+                        },
+                        {
+                            value:'1',
+                            label:'10~20万元'
+                        },
+                        {
+                            value:'2',
+                            label:'20~30万元'
+                        },
+                        {
+                            value:'3',
+                            label:'30~40万元'
+                        },
+                        {
+                            value:'4',
+                            label:'40万元以上'
+                        },
+                    ]
+                },
+                {
+                    type:'times',
+                    title:'下单时间',
+                    dataKey:['starTime','endTime'],
+                },
+                {
+                    type:'times',
+                    title:'合同时间',
+                    dataKey:['contractStart','contractEnd'],
+                },
+            ],
+            searchConfig:{},
         }
     }
 
-    searchList(){
-        let arr = [
-            {
-                type:'departmentSelect',
-                dataKey:'depId',
-                placeholder:'请选择部门'
-            },
-            {
-                type:'times',
-                title:'下单时间',
-                dataKey:['startCreate','endCreate'],
-            },
-            {
-                type:'times',
-                title:'合同时间',
-                dataKey:['startSign','endSign'],
-            },
-            {
-                type:'select',
-                dataKey:'sort',
-                placeholder:'请选择排序',
-                selectList:[
-                    {
-                        value:'0',
-                        label:'按总金额排序'
-                    },
-                    {
-                        value:'1',
-                        label:'按数量排序'
-                    },
-                ]
-            },
-        ]
-        return arr;
-    }
-
-    searchList1(){
-        let arr = [
-            {
-                type:'text',
-                dataKey:'orderNo',
-                placeholder:'请输入订单编号'
-            },
-            {
-                type:'text',
-                dataKey:'name',
-                placeholder:'请输入客户名称'
-            },
-            {
-                type:'departmentSelect',
-                dataKey:'depId',
-                placeholder:'请选择部门'
-            },
-            {
-                type:'text',
-                dataKey:'contractNo',
-                placeholder:'请输入合同编号'
-            },
-            {
-                type:'select',
-                dataKey:'liquidationStatus',
-                placeholder:'请选择结算状态',
-                selectList:[
-                    {
-                        value:'0',
-                        label:'首付待付请'
-                    },
-                    {
-                        value:'1',
-                        label:'尾款待付清'
-                    },
-                    {
-                        value:'2',
-                        label:'已付清'
-                    }
-                ]
-            },
-            {
-                type:'select',
-                dataKey:'approval',
-                placeholder:'请选择特批状态',
-                selectList:[
-                    {
-                        value:'0',
-                        label:'非特批'
-                    },
-                    {
-                        value:'1',
-                        label:'特批'
-                    }
-                ]
-            },
-            {
-                type:'select',
-                dataKey:'amountStatus',
-                placeholder:'请选择签单金额',
-                selectList:[
-                    {
-                        value:'0',
-                        label:'10万元以下'
-                    },
-                    {
-                        value:'1',
-                        label:'10~20万元'
-                    },
-                    {
-                        value:'2',
-                        label:'20~30万元'
-                    },
-                    {
-                        value:'3',
-                        label:'30~40万元'
-                    },
-                    {
-                        value:'4',
-                        label:'40万元以上'
-                    },
-                ]
-            },
-            {
-                type:'times',
-                title:'下单时间',
-                dataKey:['starTime','endTime'],
-            },
-        ]
-        return arr;
-    }
+    // componentWillMount() {
+    //     if(this.props.searchConfig['orderNo']){
+    //         this.state.searchList[0]['searchValue'] = this.props.searchConfig['orderNoTitle'];
+    //         console.log(this.state.searchList)
+    //         this.setState({
+    //             searchList:this.state.searchList
+    //         })
+    //     }
+    // }
 
     render() {
         return (
@@ -301,9 +309,19 @@ class DetailedList extends Component{
                     <div className="user-content">
                         <TabelContent
                             scroll={{ x: 0, y: 200}}
-                            searchList={this.searchList()}
+                            searchList={this.state.searchList}
                             columns={this.state.columns}
                             tabelApi={'/api/admin/newOrder/provinceStatisticsList'}
+                            searchConfig={this.props.searchConfig}
+                            searchOperation={(value)=>{
+                                for(let i of Object.keys(value)){
+                                    if(i === 'sort' || i === 'pageNo' || i === 'pageSize'){
+                                        delete value[i]
+                                    }
+
+                                }
+                                this.setState({searchConfig:value})}
+                            }
                             exportApi={'/api/admin/newOrder/provinceStatisticsListExprot'}
                             query={{
                                 province:this.props.recordInfor.id,
@@ -339,8 +357,9 @@ class DetailedList extends Component{
                         className="admin-desc-content">
                         <div className="user-content">
                             <TabelContent
-                                searchList={this.searchList1()}
+                                searchList={this.state.searchList1}
                                 columns={this.state.columns1}
+                                searchConfig={this.state.searchConfig}
                                 tabelApi={'/api/admin/newOrder/orderNewList'}
                                 query={{
                                     specially:7,

+ 19 - 0
js/component/manageCenter/customer/operationalData/signatureStatistics/index.jsx

@@ -66,11 +66,20 @@ class SignatureStatistics extends Component{
                     }
                 },
             ],
+            searchConfig:{}
         }
     }
 
     searchList(){
         let arr = [
+            // {
+            //     type:'autoComplete',
+            //     dataKey:'orderNo',
+            //     dataTitle:'orderNoTitle',
+            //     api:'/api/admin/customer/listAdminByName',
+            //     search:'adminName',
+            //     placeholder:'请输入客户名称'
+            // },
             {
                 type:'departmentSelect',
                 dataKey:'depId',
@@ -137,6 +146,15 @@ class SignatureStatistics extends Component{
                     scroll={{ x: 0, y: 200 }}
                     searchList={this.searchList()}
                     columns={this.state.columns}
+                    searchOperation={(value)=>{
+                        for(let i of Object.keys(value)){
+                            if(i === 'sort' || i === 'pageNo' || i === 'pageSize'){
+                                delete value[i]
+                            }
+
+                        }
+                        this.setState({searchConfig:value})}
+                    }
                     tabelApi={'/api/admin/newOrder/statisticsList'}
                     exportApi={'/api/admin/newOrder/statisticsListExprot'}
                     exportExecProcessing={(data)=>{
@@ -157,6 +175,7 @@ class SignatureStatistics extends Component{
                     }}
                 />
                 {this.state.visible ? <DetailedList
+                    searchConfig={this.state.searchConfig}
                     visible={this.state.visible}
                     recordInfor={this.state.recordInfor}
                     onCancel={()=>{