|
@@ -10,8 +10,7 @@ import {
|
|
|
Select,
|
|
|
message,
|
|
|
Tabs,
|
|
|
- Tag,
|
|
|
- Tooltip,
|
|
|
+ AutoComplete,
|
|
|
DatePicker,
|
|
|
Modal,
|
|
|
} from "antd";
|
|
@@ -36,6 +35,7 @@ const AccountReview = React.createClass({
|
|
|
visible: "",
|
|
|
reason: "",
|
|
|
checkData: {},
|
|
|
+ aname: "",
|
|
|
searchValues: {}, // 列表筛选条件
|
|
|
loading: false, //加载动画
|
|
|
changeList: undefined, // 更改后的表格显示数据
|
|
@@ -61,7 +61,7 @@ const AccountReview = React.createClass({
|
|
|
render: (text, record) => {
|
|
|
return (
|
|
|
<span>
|
|
|
- {accountType.find(item => item.value === text).label}
|
|
|
+ {text == 0 ? record.typeOther : accountType.find(item => item.value === text).label}
|
|
|
</span>
|
|
|
);
|
|
|
},
|
|
@@ -486,6 +486,51 @@ const AccountReview = React.createClass({
|
|
|
);
|
|
|
},
|
|
|
|
|
|
+ // 查询负责人
|
|
|
+ followUp(e) {
|
|
|
+ this.setState({
|
|
|
+ aname: e
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/listAdminByName",
|
|
|
+ data: {
|
|
|
+ adminName: e,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thedata = data.data || [];
|
|
|
+ if (!thedata) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ thedata = {};
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ fjlist: thedata,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
+ // 选中负责人
|
|
|
+ selectF(value) {
|
|
|
+ const { searchValues, fjlist } = this.state;
|
|
|
+ const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
|
|
|
+ this.setState({
|
|
|
+ searchValues: Object.assign(searchValues, {
|
|
|
+ aid: newdataSources.find((item) => item.name == value).id,
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
// 搜索
|
|
|
search() {
|
|
|
this.loadData();
|
|
@@ -494,6 +539,7 @@ const AccountReview = React.createClass({
|
|
|
// 重置
|
|
|
reset() {
|
|
|
this.setState({
|
|
|
+ aname: "",
|
|
|
searchValues: JSON.parse(JSON.stringify({})),
|
|
|
}, () => {
|
|
|
this.loadData();
|
|
@@ -517,11 +563,17 @@ const AccountReview = React.createClass({
|
|
|
|
|
|
render() {
|
|
|
const { TextArea } = Input
|
|
|
- const { searchValues, data, visible, list = [], total } = this.state
|
|
|
+ const { searchValues, data, visible, list = [], total, } = this.state
|
|
|
const formItemLayout = {
|
|
|
labelCol: { span: 10 },
|
|
|
wrapperCol: { span: 14 },
|
|
|
};
|
|
|
+ const dataSources = this.state.fjlist || [];
|
|
|
+ const options = dataSources.map((group) => (
|
|
|
+ <Select.Option key={group.id} value={group.name}>
|
|
|
+ {group.name}
|
|
|
+ </Select.Option>
|
|
|
+ ));
|
|
|
return (
|
|
|
<div className="user-content">
|
|
|
<ShowModalDiv ShowModal={this.state.showModal} />
|
|
@@ -531,7 +583,6 @@ const AccountReview = React.createClass({
|
|
|
<Tabs defaultActiveKey="2" className="test">
|
|
|
<TabPane tab="搜索" key="2">
|
|
|
<div className="user-search" style={{ marginLeft: 10 }}>
|
|
|
-
|
|
|
<Input
|
|
|
placeholder="合同编号"
|
|
|
value={searchValues["contractNo"]
|
|
@@ -544,7 +595,6 @@ const AccountReview = React.createClass({
|
|
|
});
|
|
|
}}
|
|
|
/>
|
|
|
-
|
|
|
<Input
|
|
|
placeholder="客户名称"
|
|
|
value={searchValues["username"]
|
|
@@ -558,6 +608,40 @@ const AccountReview = React.createClass({
|
|
|
}}
|
|
|
/>
|
|
|
<Select
|
|
|
+ style={{ width: 140 }}
|
|
|
+ placeholder="报销类型"
|
|
|
+ value={searchValues["type"]
|
|
|
+ ? searchValues["type"]
|
|
|
+ : undefined}
|
|
|
+ onChange={(e) => {
|
|
|
+ searchValues["type"] = e;
|
|
|
+ this.setState({
|
|
|
+ searchValues: searchValues,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Option value="1">差旅费</Option>
|
|
|
+ <Option value="2">非业务报销</Option>
|
|
|
+ <Option value="3">第三方付款</Option>
|
|
|
+ <Option value="4">申请借支</Option>
|
|
|
+ <Option value="5">申请抵扣</Option>
|
|
|
+ <Option value="0">其他</Option>
|
|
|
+ </Select>
|
|
|
+ <AutoComplete
|
|
|
+ className="certain-category-search"
|
|
|
+ dropdownClassName="certain-category-search-dropdown"
|
|
|
+ dropdownMatchSelectWidth={false}
|
|
|
+ style={{ width: 140 }}
|
|
|
+ dataSource={options}
|
|
|
+ placeholder="报销人"
|
|
|
+ value={this.state.aname}
|
|
|
+ onChange={this.followUp.bind(this)}
|
|
|
+ filterOption={true}
|
|
|
+ onSelect={this.selectF.bind(this)}
|
|
|
+ >
|
|
|
+ <Input />
|
|
|
+ </AutoComplete>
|
|
|
+ <Select
|
|
|
placeholder="所属部门"
|
|
|
style={{ width: 200, marginRight: 10 }}
|
|
|
value={searchValues["depId"]
|
|
@@ -608,9 +692,8 @@ const AccountReview = React.createClass({
|
|
|
return <Select.Option key={item.id}>{item.name}</Select.Option>;
|
|
|
})}
|
|
|
</Select>
|
|
|
-
|
|
|
<Select
|
|
|
- style={{ width: 120 }}
|
|
|
+ style={{ width: 140 }}
|
|
|
placeholder="审核状态"
|
|
|
value={searchValues["examineStatus"]
|
|
|
? searchValues["examineStatus"]
|
|
@@ -625,30 +708,32 @@ const AccountReview = React.createClass({
|
|
|
<Option value="0">待审核</Option>
|
|
|
<Option value="1">已审核</Option>
|
|
|
</Select>
|
|
|
- <span>报销时间:</span>
|
|
|
- <RangePicker
|
|
|
- style={{ width: 300 }}
|
|
|
- value={[
|
|
|
- searchValues.startTime ? moment(searchValues.startTime) : null,
|
|
|
- searchValues.endTime ? moment(searchValues.endTime) : null,
|
|
|
- ]}
|
|
|
- onChange={(data, dataString) => {
|
|
|
- this.setState({
|
|
|
- searchValues: Object.assign(searchValues, {
|
|
|
- startTime: dataString[0],
|
|
|
- endTime: dataString[1],
|
|
|
- }),
|
|
|
- });
|
|
|
- }}
|
|
|
- />
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- onClick={this.search}
|
|
|
- style={{ marginLeft: 10 }}
|
|
|
- >
|
|
|
- 搜索
|
|
|
- </Button>
|
|
|
- <Button onClick={this.reset}>重置</Button>
|
|
|
+ <div style={{ marginTop: 10 }}>
|
|
|
+ <span>报销时间:</span>
|
|
|
+ <RangePicker
|
|
|
+ style={{ width: 300 }}
|
|
|
+ value={[
|
|
|
+ searchValues.startTime ? moment(searchValues.startTime) : null,
|
|
|
+ searchValues.endTime ? moment(searchValues.endTime) : null,
|
|
|
+ ]}
|
|
|
+ onChange={(data, dataString) => {
|
|
|
+ this.setState({
|
|
|
+ searchValues: Object.assign(searchValues, {
|
|
|
+ startTime: dataString[0],
|
|
|
+ endTime: dataString[1],
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ onClick={this.search}
|
|
|
+ style={{ margin: "0 10px" }}
|
|
|
+ >
|
|
|
+ 搜索
|
|
|
+ </Button>
|
|
|
+ <Button onClick={this.reset}>重置</Button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</TabPane>
|
|
|
<TabPane tab="更改表格显示数据" key="1">
|