|
@@ -1,29 +1,22 @@
|
|
|
import React from 'react';
|
|
|
-import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form ,Modal,Tabs} from 'antd';
|
|
|
-import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
+import { Icon, Button, AutoComplete,Input, Select, Spin, Table, Switch, message, DatePicker, Form ,Modal,Tabs} from 'antd';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import moment from 'moment';
|
|
|
-import TechAchievementDesc from '@/manageCenter/achievement/crmAchievement.jsx';
|
|
|
-import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
|
|
|
-import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade,cityArr,patentTypeList} from '@/dataDic.js';
|
|
|
+
|
|
|
+import { cityArr,patentTypeList} from '@/dataDic.js';
|
|
|
import {
|
|
|
- getSocialAttribute,
|
|
|
beforeUploadFile,
|
|
|
splitUrl,
|
|
|
- getSlcRedit,
|
|
|
- getDataGrade,
|
|
|
- getAchievementCategory,
|
|
|
- getTechAuditStatus,
|
|
|
- getboutique,
|
|
|
getPatentType,
|
|
|
getcityArr,
|
|
|
- getPatentTypeva,
|
|
|
- ShowModal
|
|
|
+ ShowModal,
|
|
|
+ getMessageReminderStart
|
|
|
} from "@/tools.js";
|
|
|
import './customer.less';
|
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
import ImgList from "../../../../common/imgList";
|
|
|
import {ChooseList} from "../../../order/orderNew/chooseList";
|
|
|
+import ReminderLog from "./reminderLog";
|
|
|
const Option = AutoComplete.Option;
|
|
|
const { TabPane } = Tabs;
|
|
|
//图片组件
|
|
@@ -170,6 +163,8 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
certificateUrl:thisdata.certificateUrl,
|
|
|
aname:thisdata.aname,
|
|
|
depName:thisdata.depName,
|
|
|
+ userName:thisdata.userName,
|
|
|
+ uid:thisdata.uid
|
|
|
});
|
|
|
};
|
|
|
this.state.pagination.current = data.data.pageNo;
|
|
@@ -240,9 +235,12 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
dataIndex: 'patentAmount',
|
|
|
key: 'patentAmount'
|
|
|
},{
|
|
|
- title: '授权公司',
|
|
|
- dataIndex: 'applicant',
|
|
|
- key: 'applicant'
|
|
|
+ title: '客户名称',
|
|
|
+ dataIndex: 'userName',
|
|
|
+ key: 'userName',
|
|
|
+ render:(text, record)=>(
|
|
|
+ record.uid ? text : record.applicant
|
|
|
+ )
|
|
|
},{
|
|
|
title: '录入人',
|
|
|
dataIndex: 'aname',
|
|
@@ -263,14 +261,31 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
title: '状态',
|
|
|
dataIndex: 'status',
|
|
|
key: 'status',
|
|
|
+ //状态 0 未提醒 1 剩余90天 2剩余30天 3剩余20天 4剩余10天 5剩余3天 6剩余2天 7剩余1天
|
|
|
render:text=>{
|
|
|
- if (text === 1) {
|
|
|
- return '已提醒'
|
|
|
- }else{
|
|
|
- return '待提醒'
|
|
|
- }
|
|
|
+ return (getMessageReminderStart(text,true))
|
|
|
}
|
|
|
- }]
|
|
|
+ }, {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'id',
|
|
|
+ key: 'id',
|
|
|
+ render: (text) => (
|
|
|
+ <Button
|
|
|
+ type={"primary"}
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+ this.setState({
|
|
|
+ reminderLogVisible:true,
|
|
|
+ reminderLogId:text
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看日志
|
|
|
+ </Button>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ customerServiceList:[]
|
|
|
}
|
|
|
},
|
|
|
componentWillMount(){
|
|
@@ -313,10 +328,22 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
message.warning('专利名称不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.state.appDate) {
|
|
|
+ message.warning('申请日期不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
if(this.state.patentType === ''){
|
|
|
message.warning('专利类型不能为空');
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.state.authDate) {
|
|
|
+ message.warning('授权日期不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.state.customerUid) {
|
|
|
+ message.warning('客户名称不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
|
|
|
if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
|
|
|
message.warning('电话格式不正确');
|
|
@@ -345,11 +372,12 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
type:this.state.patentType,
|
|
|
applyDates:this.state.appDate,
|
|
|
authorizationDates:this.state.authDate,
|
|
|
- applicant:this.state.proposer,
|
|
|
+ // applicant:this.state.proposer,
|
|
|
province:this.state.province,
|
|
|
contactMobile:this.state.contactPhone,
|
|
|
email:this.state.email,
|
|
|
certificateUrl:theorgCodeUrl.length?theorgCodeUrl:'',
|
|
|
+ uid:this.state.customerUid,
|
|
|
}
|
|
|
}).done(function(data) {
|
|
|
this.setState({
|
|
@@ -380,6 +408,8 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
email:record.email,
|
|
|
certificateUrl:record.certificateUrl,
|
|
|
orgCodeUrl: record.certificateUrl ? splitUrl(record.certificateUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
|
+ customerUid:record.uid,
|
|
|
+ customerName:record.userName
|
|
|
})
|
|
|
localStorage.setItem('newData','{}');
|
|
|
},
|
|
@@ -403,10 +433,22 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
message.warning('专利名称不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.state.appDate) {
|
|
|
+ message.warning('申请时间不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
if(this.state.patentType === ''){
|
|
|
message.warning('专利类型不能为空');
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.state.authDate) {
|
|
|
+ message.warning('授权日期不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.state.customerUid) {
|
|
|
+ message.warning('客户名称不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
let mobile = /^1[0-9]{10}$/ , phone = /^([0-9]{3,4}-)?[0-9]{7,8}$/ , phone1 = /^\d{3,4}-\d{3,4}-\d{3,4}$/;
|
|
|
if(this.state.contactPhone && !(mobile.test(this.state.contactPhone) || phone.test(this.state.contactPhone) || phone1.test(this.state.contactPhone))){
|
|
|
message.warning('电话格式不正确');
|
|
@@ -436,12 +478,13 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
type:this.state.patentType,
|
|
|
applyDates:this.state.appDate,
|
|
|
authorizationDates:this.state.authDate,
|
|
|
- applicant:this.state.proposer,
|
|
|
+ // applicant:this.state.proposer,
|
|
|
province:this.state.province,
|
|
|
contactMobile:this.state.contactPhone,
|
|
|
email:this.state.email,
|
|
|
status:this.state.status,
|
|
|
certificateUrl:theorgCodeUrl.length?theorgCodeUrl:'',
|
|
|
+ uid:this.state.customerUid,
|
|
|
},
|
|
|
success: function (data) {
|
|
|
}.bind(this),
|
|
@@ -465,7 +508,8 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
|
|
|
avisitCancel(){
|
|
|
this.setState({
|
|
|
- avisible:false
|
|
|
+ avisible:false,
|
|
|
+ customerServiceList:[]
|
|
|
})
|
|
|
},
|
|
|
reset(){
|
|
@@ -479,7 +523,10 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
proposer:'',
|
|
|
province:undefined,
|
|
|
contactPhone:'',
|
|
|
- email:''
|
|
|
+ email:'',
|
|
|
+ customerUid:undefined,
|
|
|
+ customerName:undefined,
|
|
|
+ customerServiceList:[],
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -522,6 +569,40 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
changeList: newArr
|
|
|
});
|
|
|
},
|
|
|
+ //获取渠道专员列表
|
|
|
+ getAdminList(value = '') {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/getUserByName",
|
|
|
+ data: {
|
|
|
+ name: value,
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theArr = [];
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }else{
|
|
|
+ if(data.data){
|
|
|
+ data.data.map(function (item, _) {
|
|
|
+ theArr.push({
|
|
|
+ value: item.id,
|
|
|
+ label: item.name,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ customerServiceList: theArr,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function () {
|
|
|
+
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
|
|
|
render(){
|
|
|
const theData = this.state.RowData || {};
|
|
@@ -769,7 +850,11 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="申请日期"
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: "#f00" }}>*</strong>申请日期
|
|
|
+ </span>
|
|
|
+ }
|
|
|
>
|
|
|
{
|
|
|
!this.props.isOnlyRead ?
|
|
@@ -788,7 +873,11 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="授权日期"
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: "#f00" }}>*</strong>授权日期
|
|
|
+ </span>
|
|
|
+ }
|
|
|
>
|
|
|
{
|
|
|
!this.props.isOnlyRead ?
|
|
@@ -826,30 +915,52 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
{!this.props.isOnlyRead ? <p>图片建议:要清晰。</p> : null}
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <FormItem
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: "#f00" }}>*</strong>客户名称
|
|
|
+ </span>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {
|
|
|
+ !this.props.isOnlyRead ?
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ value={this.state.customerServiceList.length === 0 ? (this.state.customerName || undefined) : this.state.customerUid}
|
|
|
+ style={{ width: 150,marginLeft:'10px' }}
|
|
|
+ onSearch={this.getAdminList}
|
|
|
+ onSelect={(v)=>{
|
|
|
+ this.setState({
|
|
|
+ customerUid:v
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ filterOption={false}
|
|
|
+ placeholder="请输入客户名称"
|
|
|
+ >
|
|
|
+ {this.state.customerServiceList.map((v,k)=>(
|
|
|
+ <Option title={v.label} key={k} value={v.value}>{v.label}</Option>
|
|
|
+ ))}
|
|
|
+ </Select> : <div>{this.state.customerName}</div>
|
|
|
+ }
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ {this.state.proposer ? <FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="申请人"
|
|
|
>
|
|
|
- {
|
|
|
- !this.props.isOnlyRead ?
|
|
|
- <Input
|
|
|
- placeholder="请输入申请人/公司"
|
|
|
- value={this.state.proposer}
|
|
|
- onChange={e => {
|
|
|
- this.setState({ proposer: e.target.value });
|
|
|
- }}
|
|
|
- style={{ width: "240px" }}
|
|
|
- /> : <div>{this.state.proposer}</div>
|
|
|
- }
|
|
|
- </FormItem>
|
|
|
+ <div>{this.state.proposer}</div>
|
|
|
+ </FormItem> : null}
|
|
|
<FormItem className="half-item" {...formItemLayout} label="省份">
|
|
|
{
|
|
|
!this.props.isOnlyRead ?
|
|
|
<Select
|
|
|
placeholder="请选择省份"
|
|
|
style={{ width: "240px" }}
|
|
|
- value={getcityArr(this.state.province)}
|
|
|
+ value={this.state.province ? String(this.state.province) : ''}
|
|
|
onChange={e => {
|
|
|
this.setState({ province: e });
|
|
|
}}
|
|
@@ -902,9 +1013,14 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label={"状态"}
|
|
|
+ label="状态"
|
|
|
>
|
|
|
- <span>{this.state.status ? "已提醒" : "待提醒"}</span>
|
|
|
+ <span>
|
|
|
+ {/*状态 0 未提醒 1 剩余90天 2剩余30天 3剩余20天 4剩余10天 5剩余3天 6剩余2天 7剩余1天*/}
|
|
|
+ {
|
|
|
+ getMessageReminderStart(this.state.status,true)
|
|
|
+ }
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
{!this.props.isOnlyRead ? <div style={{ overflow: "hidden" }}>
|
|
@@ -976,7 +1092,11 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="申请日期"
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: "#f00" }}>*</strong>申请日期
|
|
|
+ </span>
|
|
|
+ }
|
|
|
>
|
|
|
<DatePicker
|
|
|
style={{ marginTop: "2px", width: "240px", height: "32px" }}
|
|
@@ -1020,7 +1140,11 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
<FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="授权日期"
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: "#f00" }}>*</strong>授权日期
|
|
|
+ </span>
|
|
|
+ }
|
|
|
>
|
|
|
<DatePicker
|
|
|
style={{ marginTop: "2px", width: "240px", height: "32px" }}
|
|
@@ -1049,27 +1173,56 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
<p>图片建议:要清晰。</p>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: "#f00" }}>*</strong>客户名称
|
|
|
+ </span>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ value={this.state.customerUid}
|
|
|
+ style={{ width: 150,marginLeft:'10px' }}
|
|
|
+ onSearch={this.getAdminList}
|
|
|
+ onSelect={(v)=>{
|
|
|
+ this.setState({
|
|
|
+ customerUid:v
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ filterOption={false}
|
|
|
+ placeholder="请输入客户名称"
|
|
|
+ >
|
|
|
+ {this.state.customerServiceList.map((v,k)=>(
|
|
|
+ <Option key={k} value={v.value}>{v.label}</Option>
|
|
|
+ ))}
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
<div>
|
|
|
<span style={{ marginLeft: "50px", fontSize: "20px" }}>
|
|
|
申请人资料
|
|
|
</span>
|
|
|
</div>
|
|
|
- <FormItem
|
|
|
- className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="申请人/公司"
|
|
|
- >
|
|
|
- {
|
|
|
- <Input
|
|
|
- placeholder="请输入申请人/公司"
|
|
|
- value={this.state.proposer}
|
|
|
- onChange={e => {
|
|
|
- this.setState({ proposer: e.target.value });
|
|
|
- }}
|
|
|
- style={{ width: "240px" }}
|
|
|
- />
|
|
|
- }
|
|
|
- </FormItem>
|
|
|
+ {/*<FormItem*/}
|
|
|
+ {/* className="half-item"*/}
|
|
|
+ {/* {...formItemLayout}*/}
|
|
|
+ {/* label="申请人/公司"*/}
|
|
|
+ {/*>*/}
|
|
|
+ {/* {*/}
|
|
|
+ {/* <Input*/}
|
|
|
+ {/* placeholder="请输入申请人/公司"*/}
|
|
|
+ {/* value={this.state.proposer}*/}
|
|
|
+ {/* onChange={e => {*/}
|
|
|
+ {/* this.setState({ proposer: e.target.value });*/}
|
|
|
+ {/* }}*/}
|
|
|
+ {/* style={{ width: "240px" }}*/}
|
|
|
+ {/* />*/}
|
|
|
+ {/* }*/}
|
|
|
+ {/*</FormItem>*/}
|
|
|
<FormItem className="half-item" {...formItemLayout} label="省份">
|
|
|
<Select
|
|
|
placeholder="请选择省份"
|
|
@@ -1138,6 +1291,16 @@ const PatentPayment = Form.create()(React.createClass({
|
|
|
</div>
|
|
|
</Modal> : <div/>}
|
|
|
</div>
|
|
|
+ {this.state.reminderLogVisible ? <ReminderLog
|
|
|
+ id={this.state.reminderLogId}
|
|
|
+ visible={this.state.reminderLogVisible}
|
|
|
+ cancel={()=>{
|
|
|
+ this.setState({
|
|
|
+ reminderLogVisible:false,
|
|
|
+ reminderLogId:''
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ /> : null}
|
|
|
</div>
|
|
|
);
|
|
|
}
|