|
@@ -4,7 +4,7 @@ import $ from 'jquery/src/ajax';
|
|
|
import moment from 'moment';
|
|
|
import '../distribute/public.less';
|
|
|
import { Button, Input, Spin, Table,Select, Switch, message, DatePicker,Modal ,Form } from 'antd';
|
|
|
-import {getProjectStatus,getPaymentType,getBonusState,getLiquidationStatus,getJsyPaymentType} from '@/tools';
|
|
|
+import {getProjectStatus,getTaskStatus,getBonusState,getLiquidationStatus,getJsyPaymentType} from '@/tools';
|
|
|
import JsBonuseDetail from './jsBonusDetail';
|
|
|
const FormItem= Form.Item;
|
|
|
|
|
@@ -14,23 +14,18 @@ const JsBonus = React.createClass({
|
|
|
loading: true
|
|
|
});
|
|
|
$.ajax({
|
|
|
- method: "post",
|
|
|
+ method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/organization/listOrganizationManagement",
|
|
|
- data: {
|
|
|
- pageNo:1,
|
|
|
- pageSize:999,
|
|
|
- type:1
|
|
|
- },
|
|
|
+ url: globalConfig.context + "/api/admin/organization/selectSuperId",
|
|
|
+ data: {},
|
|
|
success: function(data) {
|
|
|
- let thedata = data.data.list;
|
|
|
+ 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({
|
|
@@ -59,17 +54,18 @@ const JsBonus = React.createClass({
|
|
|
loading: true
|
|
|
});
|
|
|
$.ajax({
|
|
|
- method: "post",
|
|
|
+ method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/order/listAllSettlement",
|
|
|
+ url: globalConfig.context + "/api/admin/bonus/technicianBonusStatistics",
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize:this.state.pagination.pageSize,
|
|
|
- ownerName: this.state.nameSearch,//客户名称
|
|
|
+ salesName: this.state.orderRefundSearch,//订单负责人
|
|
|
+ targetName: this.state.projectMenSearch,//项目负责人
|
|
|
departmentId:this.state.departmenttList,
|
|
|
- startDate: this.state.releaseDate[0],
|
|
|
- endDate: this.state.releaseDate[1],
|
|
|
+ startTime: this.state.releaseDate[0],
|
|
|
+ endTime: this.state.releaseDate[1],
|
|
|
},
|
|
|
success: function (data) {
|
|
|
let theArr = [];
|
|
@@ -82,15 +78,22 @@ const JsBonus = React.createClass({
|
|
|
let thisdata = data.data.list[i];
|
|
|
theArr.push({
|
|
|
key: i,
|
|
|
- orderNo: thisdata.orderNo,
|
|
|
- orderType:thisdata.orderType,
|
|
|
- orderStatus:thisdata.orderStatus,
|
|
|
- processStatus:thisdata.processStatus,
|
|
|
- projectStage:thisdata.projectStage,
|
|
|
- approval:thisdata.approval,
|
|
|
- creater:thisdata.creater,
|
|
|
- createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
|
|
|
- signTime:thisdata.signTime?(new Date(thisdata.signTime)).toLocaleString():''
|
|
|
+ id:thisdata.id,
|
|
|
+ tid:thisdata.tid,
|
|
|
+ orderNo:thisdata.orderNo,
|
|
|
+ taskReceiver:thisdata.taskReceiver,
|
|
|
+ taskStatus:thisdata.taskStatus,
|
|
|
+ commodityQuantity:thisdata.commodityQuantity,
|
|
|
+ projectStatus:thisdata.projectStatus,
|
|
|
+ byName:thisdata.byName,
|
|
|
+ bonusSubject:thisdata.bonusSubject,
|
|
|
+ grantStatus:thisdata.grantStatus,
|
|
|
+ grantTime:thisdata.grantTime,
|
|
|
+ targetName:thisdata.targetName,
|
|
|
+ liquidationStatus:thisdata.liquidationStatus,
|
|
|
+ licenceTime:thisdata.licenceTime?(new Date(thisdata.licenceTime)).toLocaleString():'',
|
|
|
+ acceptTime:thisdata.acceptTime?(new Date(thisdata.acceptTime)).toLocaleString():'',
|
|
|
+ reviewTime:thisdata.reviewTime?(new Date(thisdata.reviewTime)).toLocaleString():''
|
|
|
});
|
|
|
};
|
|
|
}
|
|
@@ -136,8 +139,8 @@ const JsBonus = React.createClass({
|
|
|
columns: [
|
|
|
{
|
|
|
title: '任务编号',
|
|
|
- dataIndex: 'id',
|
|
|
- key: 'id',
|
|
|
+ dataIndex: 'tid',
|
|
|
+ key: 'tid',
|
|
|
},
|
|
|
{
|
|
|
title: '订单编号',
|
|
@@ -146,52 +149,44 @@ const JsBonus = React.createClass({
|
|
|
},
|
|
|
{
|
|
|
title: '任务负责人',
|
|
|
- dataIndex: 'orderNo',
|
|
|
- key: 'orderNo',
|
|
|
+ dataIndex: 'taskReceiver',
|
|
|
+ key: 'taskReceiver',
|
|
|
},
|
|
|
{
|
|
|
title: '任务状态',
|
|
|
- dataIndex: 'category',
|
|
|
- key: 'category',
|
|
|
+ dataIndex: 'taskStatus',
|
|
|
+ key: 'taskStatus',
|
|
|
render:text=>{
|
|
|
- return text&&text>8?text.substr(0,8)+'...':text
|
|
|
+ return getTaskStatus(text)
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '任务数量',
|
|
|
- dataIndex: 'orderStatus',
|
|
|
- key: 'orderStatus'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '流水科目',
|
|
|
- dataIndex: 'creater',
|
|
|
- key: 'creater'
|
|
|
+ dataIndex: 'commodityQuantity',
|
|
|
+ key: 'commodityQuantity'
|
|
|
},
|
|
|
{
|
|
|
title: '项目状态',
|
|
|
- dataIndex: 'creater1112',
|
|
|
- key: 'creater1112',
|
|
|
+ dataIndex: 'projectStatus',
|
|
|
+ key: 'projectStatus',
|
|
|
render:(text)=>{
|
|
|
return getProjectStatus(text)
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '受理日期',
|
|
|
- dataIndex: 'creater11',
|
|
|
- key: 'creater11'
|
|
|
+ dataIndex: 'acceptTime',
|
|
|
+ key: 'acceptTime'
|
|
|
},
|
|
|
{
|
|
|
title: '评审日期',
|
|
|
- dataIndex: 'creater11t',
|
|
|
- key: 'creater11t',
|
|
|
- render:text=>{
|
|
|
- return getPaymentType(text)
|
|
|
- }
|
|
|
+ dataIndex: 'reviewTime',
|
|
|
+ key: 'reviewTime'
|
|
|
},
|
|
|
{
|
|
|
title: '下证日期',
|
|
|
- dataIndex: 'creater225',
|
|
|
- key: 'creater225'
|
|
|
+ dataIndex: 'licenceTime',
|
|
|
+ key: 'licenceTime'
|
|
|
},{
|
|
|
title: '订单结算状态',
|
|
|
dataIndex: 'liquidationStatus',
|
|
@@ -202,15 +197,15 @@ const JsBonus = React.createClass({
|
|
|
},
|
|
|
{
|
|
|
title: '发放类型',
|
|
|
- dataIndex: 'creater22',
|
|
|
- key: 'creater22',
|
|
|
+ dataIndex: 'bonusSubject',
|
|
|
+ key: 'bonusSubject',
|
|
|
render:text=>{
|
|
|
return getJsyPaymentType(text)
|
|
|
}
|
|
|
},{
|
|
|
title: '发放状态',
|
|
|
- dataIndex: 'creater33',
|
|
|
- key: 'creater33',
|
|
|
+ dataIndex: 'grantStatus',
|
|
|
+ key: 'grantStatus',
|
|
|
render:text=>{
|
|
|
return getBonusState(text)
|
|
|
}
|
|
@@ -221,7 +216,7 @@ const JsBonus = React.createClass({
|
|
|
key: 'state11',
|
|
|
render:(text,recard)=>{
|
|
|
return <div>
|
|
|
- <Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.proofread(recard)}}>发放</Button>
|
|
|
+ {!recard.grantStatus&&<Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.proofread(recard)}}>发放</Button>}
|
|
|
</div>
|
|
|
}
|
|
|
},
|
|
@@ -230,9 +225,8 @@ const JsBonus = React.createClass({
|
|
|
searchTime: [,]
|
|
|
}
|
|
|
},
|
|
|
- proofread(recard,index){
|
|
|
+ proofread(recard){
|
|
|
this.setState({
|
|
|
- proofreadState:index,
|
|
|
boHuiVisible:true,
|
|
|
proofData: recard,
|
|
|
})
|
|
@@ -281,9 +275,10 @@ const JsBonus = React.createClass({
|
|
|
let data = {
|
|
|
departmentId:this.state.departmentId,
|
|
|
departmentName:departmentName,
|
|
|
- ownerName: this.state.nameSearch,//订单负责人
|
|
|
- startDate: this.state.releaseDate[0],
|
|
|
- endDate: this.state.releaseDate[1],
|
|
|
+ salesName: this.state.orderRefundSearch,//订单负责人
|
|
|
+ targetName: this.state.projectMenSearch,//项目负责人
|
|
|
+ startTime: this.state.releaseDate[0],
|
|
|
+ endTime: this.state.releaseDate[1],
|
|
|
}
|
|
|
window.location.href=(globalConfig.context+'/api/admin/financial/exportBillData?'+$.param(data));
|
|
|
},
|
|
@@ -297,14 +292,13 @@ const JsBonus = React.createClass({
|
|
|
method: "POST",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/user/achievement/delete",
|
|
|
+ url: globalConfig.context + "/api/admin/bonus/changeBonus",
|
|
|
data: {
|
|
|
id: this.state.proofData.id,
|
|
|
- result:this.state.result //校对结果
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
|
- message.success('操作成功!');
|
|
|
+ message.success('发放成功!');
|
|
|
this.boHuiOk();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
@@ -316,9 +310,9 @@ const JsBonus = React.createClass({
|
|
|
},
|
|
|
reset() {
|
|
|
this.state.orderRefundSearch='';
|
|
|
+ this.state.projectMenSearch='';
|
|
|
this.state.releaseDate = [];
|
|
|
this.state.departmenttList=undefined;
|
|
|
- this.state.orderNoSearch='';
|
|
|
this.loadData();
|
|
|
},
|
|
|
searchSwitch() {
|
|
@@ -378,7 +372,7 @@ const JsBonus = React.createClass({
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Table columns={this.state.columns}
|
|
|
dataSource={this.state.dataSource}
|
|
|
- rowSelection={rowSelection}
|
|
|
+ rowSelection={false}
|
|
|
pagination={this.state.pagination}
|
|
|
onRowClick={this.tableRowClick}
|
|
|
/>
|
|
@@ -391,7 +385,7 @@ const JsBonus = React.createClass({
|
|
|
/>
|
|
|
<Modal visible={this.state.boHuiVisible}
|
|
|
width="400px"
|
|
|
- title={this.state.proofreadState?"校对":'发放'}
|
|
|
+ title='发放'
|
|
|
footer=''
|
|
|
onOk={this.boHuiOk}
|
|
|
onCancel={this.boHuiCancel}
|
|
@@ -399,13 +393,13 @@ const JsBonus = React.createClass({
|
|
|
<Form layout="horizontal" onSubmit={this.boHuiSubmit}>
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='应收人'>
|
|
|
- <span>{this.state.proofData.name}</span>
|
|
|
+ <span>{this.state.proofData.targetName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放人'>
|
|
|
- <span>{this.state.proofData.name}</span>
|
|
|
+ <span>{this.state.proofData.byName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放日期'>
|
|
|
- <span>{this.state.proofData.time}</span>
|
|
|
+ <span>{this.state.proofData.grantTime}</span>
|
|
|
</FormItem>
|
|
|
<FormItem wrapperCol={{ span: 12, offset:8 }}>
|
|
|
<Button type="primary" htmlType="submit" style={{marginRight:20}}>保存</Button>
|