myTask.jsx 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699
  1. import React,{Component} from 'react';
  2. import ajax from 'jquery/src/ajax/xhr.js';
  3. import $ from 'jquery';
  4. import moment from 'moment';
  5. import Picture from '@/manageCenter/publicComponent/picture';
  6. import '@/manageCenter/financialManage/distribute/public.less';
  7. import { Icon, Button, Form, Input, Select, Upload, Col, Spin, Table, Switch, message, DatePicker, Modal, Radio, InputNumber, Cascader, Popconfirm} from 'antd';
  8. import OrderDesc from '@/manageCenter/financialManage/orderDetail/orderDesc'
  9. import Assign from '@/manageCenter/publicComponent/assign';
  10. import {areaSelect, getProvince} from '@/NewDicProvinceList';
  11. import './table.less';
  12. import {getProcessStatus,getApproval,getTaskStatus,getLiquidationStatus,getApprovedState,getProjectStatus,splitUrl,getjiedian,getboutique} from '@/tools';
  13. import {projectStates,taskStatus ,projectStatus} from '@/dataDic.js';
  14. const FormItem =Form.Item;
  15. const PicturesWall = React.createClass({
  16. getInitialState() {
  17. return {
  18. previewVisible: false,
  19. previewImage: '',
  20. fileList: this.props.pictureUrl,
  21. }
  22. },
  23. getDefaultProps(){
  24. return{
  25. changeClick:this.modifyChange
  26. }
  27. },
  28. handleCancel() {
  29. this.setState({ previewVisible: false })
  30. },
  31. handlePreview(file) {
  32. this.setState({
  33. previewImage: file.url || file.thumbUrl,
  34. previewVisible: true,
  35. });
  36. },
  37. handleChange(info) {
  38. let fileList = info.fileList;
  39. this.setState({ fileList });
  40. this.props.fileList(fileList);
  41. },
  42. componentWillReceiveProps(nextProps) {
  43. this.state.fileList = nextProps.pictureUrl;
  44. },
  45. render() {
  46. const { previewVisible, previewImage, fileList } = this.state;
  47. const uploadButton = (
  48. <div>
  49. <Icon type="plus" />
  50. <div className="ant-upload-text">点击上传</div>
  51. </div>
  52. );
  53. return (
  54. <div style={{display:"inline-block"}}>
  55. <Upload
  56. action={globalConfig.context + "/api/admin/patentNew/uploadFile"}
  57. data={{ 'sign': '' }}
  58. listType="picture-card"
  59. fileList={fileList}
  60. onPreview={this.handlePreview}
  61. onChange={this.handleChange} >
  62. {uploadButton}
  63. </Upload>
  64. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  65. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  66. </Modal>
  67. </div>
  68. );
  69. }
  70. });
  71. const Task = React.createClass({
  72. loadData(pageNo) {
  73. this.state.data = [];
  74. this.setState({
  75. page:pageNo,
  76. loading: true
  77. });
  78. $.ajax({
  79. method: "get",
  80. dataType: "json",
  81. crossDomain: false,
  82. url: globalConfig.context + "/api/admin/orderProject/orderTaskList",
  83. data: {
  84. pageNo: pageNo || 1,
  85. pageSize: this.state.pagination.pageSize,
  86. specially:0,//个人
  87. name: this.state.nameSearch,//客户名称
  88. depId: this.state.departmenttSearch,//订单部门
  89. orderNo:this.state.orderNoSearch,//订单编号
  90. taskId:this.state.taskNoSearch, //任务编号
  91. taskStatus:this.state.taskStatus,//任务状态
  92. adminName:this.state.adminName,//任务受理人
  93. },
  94. success: function (data) {
  95. let theArr = [];
  96. if (!data.data || !data.data.list) {
  97. if (data.error && data.error.length) {
  98. message.warning(data.error[0].message);
  99. };
  100. } else {
  101. for (let i = 0; i < data.data.list.length; i++) {
  102. let thisdata = data.data.list[i];
  103. theArr.push({
  104. key: i,
  105. orderNo: thisdata.orderNo,//订单编号
  106. id:thisdata.id,//任务ID
  107. taskName:thisdata.taskName,//名称
  108. cname:thisdata.cname,//项目品类
  109. receiverName:thisdata.receiverName,//受理人
  110. projectStatus:thisdata.projectStatus,//项目状态
  111. taskStatus:thisdata.taskStatus,//任务状态
  112. taskDate:thisdata.taskDate,//分配时间
  113. userName:thisdata.taskName === '软著认证'?thisdata.userName+'('+thisdata.commodityQuantity.toString()+'/'+thisdata.alreadyNumber+')':thisdata.userName,//用户名
  114. depName:thisdata.depName,//部门名称
  115. commodityQuantity:thisdata.commodityQuantity//任务数量
  116. });
  117. };
  118. }
  119. this.state.pagination.current = data.data.pageNo;
  120. this.state.pagination.total = data.data.totalCount;
  121. if(data.data&&data.data.list&&!data.data.list.length){
  122. this.state.pagination.current=0
  123. this.state.pagination.total=0
  124. }
  125. this.setState({
  126. dataSource: theArr,
  127. pagination: this.state.pagination
  128. });
  129. }.bind(this),
  130. }).always(function () {
  131. this.setState({
  132. loading: false
  133. });
  134. }.bind(this));
  135. },
  136. getInitialState() {
  137. return {
  138. searchMore: true,
  139. assignVisible:false,
  140. releaseDate: [],
  141. roleName:'',
  142. testFlag:true,
  143. boHuivisible:false,
  144. selectedRowKeys: [],
  145. departmentArr: [],
  146. selectedRows: [],
  147. attachmentUrl:[],
  148. contactList: [],
  149. paginations:false,
  150. loading: false,
  151. pagination: {
  152. defaultCurrent: 1,
  153. defaultPageSize: 10,
  154. showQuickJumper: true,
  155. pageSize: 10,
  156. onChange: function (page) {
  157. this.loadData(page);
  158. }.bind(this),
  159. showTotal: function (total) {
  160. return '共' + total + '条数据';
  161. }
  162. },
  163. columns: [
  164. {
  165. title: '任务编号',
  166. dataIndex: 'id',
  167. key: 'id',
  168. }, {
  169. title: '任务名称',
  170. dataIndex: 'taskName',
  171. key: 'taskName',
  172. render:(text)=>{
  173. return (text&&text.length>8?text.substr(0,8)+'…':text)
  174. }
  175. }, {
  176. title: '订单编号',
  177. dataIndex: 'orderNo',
  178. key: 'orderNo',
  179. },
  180. {
  181. title: '业务类别',
  182. dataIndex: 'cname',
  183. key: 'cname',
  184. },
  185. {
  186. title: '客户名称',
  187. dataIndex: 'userName',
  188. key: 'userName',
  189. className:'userName'
  190. },
  191. {
  192. title: '任务状态',
  193. dataIndex: 'taskStatus',
  194. key: 'taskStatus',
  195. render: text => { return getTaskStatus(text)}
  196. },
  197. {
  198. title: '项目状态',
  199. dataIndex: 'projectStatus',
  200. key: 'projectStatus',
  201. render: text => { return getProjectStatus(text)}
  202. },
  203. {
  204. title: '分配时间',
  205. dataIndex: 'taskDate',
  206. key: 'taskDate',
  207. },{
  208. title: '订单部门',
  209. dataIndex: 'depName',
  210. key: 'depName'
  211. },
  212. {
  213. title:'操作',
  214. dataIndex: 'caozuo',
  215. key: 'caozuo',
  216. render:(text,record)=>{
  217. return <div>
  218. <Button type="primary" onClick={(e)=>{e.stopPropagation(),this.evaluate(record,'咨询师')}}>转交</Button>
  219. <Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.okCancel(record)}}>添加工时</Button>
  220. </div>
  221. }
  222. }
  223. ],
  224. dataSource: [],
  225. searchTime: [],
  226. columnsX: [
  227. {
  228. title: '业务项目名称',
  229. dataIndex: 'commodityName',
  230. key: 'commodityName'
  231. }, {
  232. title: '项目类别',
  233. dataIndex: 'cname',
  234. key: 'cname',
  235. },{
  236. title: '项目数量',
  237. dataIndex: 'commodityQuantity',
  238. key: 'commodityQuantity'
  239. }, {
  240. title: '金额(万元)',
  241. dataIndex: 'commodityPrice',
  242. key: 'commodityPrice'
  243. }, {
  244. title: '负责人',
  245. dataIndex: 'contacts',
  246. key: 'contacts'
  247. }, {
  248. title: '负责人电话',
  249. dataIndex: 'contactsMobile',
  250. key: 'contactsMobile'
  251. }, {
  252. title: '主要项目',
  253. dataIndex: 'main',
  254. key: 'main',
  255. render:(text)=>{
  256. return (text?'是':'否')
  257. }
  258. }, {
  259. title: '项目说明',
  260. dataIndex: 'taskComment',
  261. key: 'taskComment',
  262. render:(text)=>{
  263. return (text&&text.length>8?text.substr(0,8)+'…':text)
  264. }
  265. },
  266. ],
  267. columnsA: [
  268. {
  269. title: '流程',
  270. dataIndex: 'content',
  271. key: 'content',
  272. align:'center'
  273. }, {
  274. title: '操作人',
  275. dataIndex: 'aName',
  276. key: 'aName',
  277. align:'center'
  278. }, {
  279. title: '时间',
  280. dataIndex: 'createTimes',
  281. key: 'createTimes',
  282. align:'center'
  283. }
  284. ],
  285. dataSourceX: [],
  286. dataSourceA: [],
  287. ContactsLists: [{
  288. title: '批次',
  289. dataIndex: 'num',
  290. key: 'num',
  291. },{
  292. title: '下证时间',
  293. dataIndex: 'licenceTimes',
  294. key: 'licenceTimes',
  295. render: (text, record, index) => {
  296. return <div>
  297. <DatePicker style={{marginTop:'5px'}}
  298. showTime
  299. format="YYYY-MM-DD"
  300. onOk={(e)=>{}}
  301. value={record.licenceTimes ? moment(record.licenceTimes) : null}
  302. onChange={(data, dataString) => {record.licenceTimes = dataString ;this.setState({ contactList: this.state.contactList }); }} />
  303. </div>
  304. }
  305. }, {
  306. title: '下证数量',
  307. dataIndex: 'alreadyNumber',
  308. key: 'alreadyNumber',
  309. render: (text, record, index) => {
  310. return <div>
  311. {<Input value={record.alreadyNumber} placeholder="请输入金额(必填项)" key={record.id} required="required"
  312. onChange={(e) => { record.alreadyNumber = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>}
  313. </div>
  314. }
  315. },
  316. {
  317. title: '未下证数量',
  318. dataIndex: 'notCount',
  319. key: 'notCount',
  320. },{
  321. title: '操作',
  322. dataIndex: 'dels',
  323. key: 'dels',
  324. render: (text, record, index) => {
  325. return <div>
  326. {<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
  327. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  328. </Popconfirm>}
  329. {record.flag?'':<Button type="primary" onClick={(e)=>{ e.stopPropagation(),this.contactSave(record,index)}}>保存</Button>}
  330. </div>
  331. }
  332. }
  333. ],
  334. }
  335. },
  336. /* 分派 */
  337. evaluate(record,nub){
  338. this.state.assignData=record;
  339. this.setState({
  340. nub,
  341. assignVisible:true
  342. })
  343. },
  344. componentWillMount() {
  345. this.departmentList();
  346. this.loadData();
  347. },
  348. componentDidMount(){
  349. this.setColor()
  350. },
  351. setColor(){
  352. var arr = []
  353. console.log($(".userName span"))
  354. $(".userName span").after("(<span class='ruanzhu'>软著数</span>/<span class='xiazheng'>下证数</span>)")
  355. },
  356. tableRowClick(record, index) {
  357. this.state.RowData = record;
  358. if(record.taskName === '软著认证'){
  359. this.setState({
  360. speVisible: true,
  361. id: record.id,
  362. dataArr:record,
  363. commodityQuantity:record.commodityQuantity
  364. });
  365. }else{
  366. this.setState({
  367. visible: true,
  368. });
  369. }
  370. this.xiangqing(record.id,record.taskName);
  371. this.xiangqings(record.orderNo);
  372. this.xiangmu(record.orderNo);
  373. this.loaduserss(record);
  374. },
  375. //点击修改任务详情
  376. tijiaoOk(){
  377. let attachmentUrls = [];
  378. if (this.state.attachmentUrl.length) {
  379. let picArr = [];
  380. this.state.attachmentUrl.map(function (item) {
  381. if ( item.response && item.response.data && item.response.data.length ){
  382. picArr.push(item.response.data);
  383. }
  384. });
  385. attachmentUrls = picArr.join(",");
  386. };
  387. $.ajax({
  388. method: "POST",
  389. dataType: "json",
  390. crossDomain: false,
  391. url: globalConfig.context +'/api/admin/orderProject/updateOrderTask' ,
  392. data: {
  393. id:this.state.id,//任务编号
  394. orderNo:this.state.orderNo,//订单编号
  395. projectStatus:this.state.projectStatus,//项目状态
  396. taskStatus:this.state.taskStatus,//任务状态
  397. taskComment:this.state.taskComment,//说明
  398. startDate:this.state.startDate,//启动日期
  399. endDate:this.state.endDate,//结束日期
  400. acceptDate:this.state.acceptDate,//受理日期
  401. reviewDate:this.state.reviewDate,//评审日期
  402. publicityDate:this.state.publicityDate,//公示日期
  403. licenceDate:this.state.licenceDate,//发证日期
  404. attachmentUrl:attachmentUrls.length?attachmentUrls:'',//附件
  405. contacts:this.state.contacts,//联系人
  406. contactMobile:this.state.contactMobile,//联系人电话
  407. legalPerson:this.state.legalPerson,//法人
  408. legalPersonTel:this.state.legalPersonTel,//法人电话
  409. certificateNumber:this.state.certificateNumber,//证书编号
  410. status:this.state.status,//状态
  411. formRetrieve:this.state.formRetrieve,//满意度表格
  412. taskRefund:this.state.taskRefund,//退单
  413. refundContent:this.state.refundContent,//退单信息
  414. retrieveContent:this.state.retrieveContent,//回收信息
  415. locationProvince:this.state.ProvinceCity[0],
  416. locationCity:this.state.ProvinceCity[1],
  417. locationArea:this.state.ProvinceCity[2],
  418. postalAddress:this.state.postalAddress,//详细地址
  419. arrivalMoney:this.state.arrivalMoney,//是否到款
  420. setUpAmount:this.state.setUpAmount,//立项金额
  421. declareUser:this.state.declareUser,//账号
  422. declarePwd:this.state.declarePwd//密码
  423. }
  424. }).done(function(data) {
  425. this.setState({
  426. loading: false
  427. });
  428. if(!data.error.length) {
  429. message.success('保存成功!');
  430. this.visitCancel();
  431. } else {
  432. message.warning(data.error[0].message);
  433. }
  434. }.bind(this));
  435. },
  436. //点击修改任务详情
  437. tianjiaOk(){
  438. let attachmentUrls = [];
  439. if (this.state.attachmentUrl.length) {
  440. let picArr = [];
  441. this.state.attachmentUrl.map(function (item) {
  442. if ( item.response && item.response.data && item.response.data.length ){
  443. picArr.push(item.response.data);
  444. }
  445. });
  446. attachmentUrls = picArr.join(",");
  447. };
  448. $.ajax({
  449. method: "POST",
  450. dataType: "json",
  451. crossDomain: false,
  452. url: globalConfig.context +'/api/admin/orderProject/addTaskHours' ,
  453. data: {
  454. taskId:this.state.taskId,//任务编号
  455. hours:this.state.hours,//工时
  456. remarks:this.state.remarks,//说明
  457. taskDate:this.state.taskDate,//日期
  458. taskComment:this.state.taskComment,//说明
  459. }
  460. }).done(function(data) {
  461. this.setState({
  462. loading: false
  463. });
  464. if(!data.error.length) {
  465. message.success('保存成功!');
  466. this.noCancel();
  467. } else {
  468. message.warning(data.error[0].message);
  469. }
  470. }.bind(this));
  471. },
  472. //订单详情
  473. xiangqing(id,taskName) {
  474. $.ajax({
  475. method: "get",
  476. dataType: "json",
  477. crossDomain: false,
  478. url: globalConfig.context +"/api/admin/orderProject/orderTaskDetail",
  479. data: {
  480. id:id
  481. },
  482. success: function(data) {
  483. let theArr = [];
  484. let thisdata=data.data;
  485. if(data.error.length || data.data.list == "") {
  486. if(data.error && data.error.length) {
  487. message.warning(data.error[0].message);
  488. };
  489. } else {
  490. this.setState({
  491. id: thisdata.id,//ID
  492. orderNo: thisdata.orderNo,//订单编号
  493. userName:thisdata.userName,//客户名称
  494. taskName: thisdata.taskName,//任务名称
  495. cname:thisdata.cname,//项目品类
  496. contractNo:thisdata.contractNo,//合同编号
  497. projectStatus:thisdata.projectStatus.toString(),//项目状态
  498. taskStatus:thisdata.taskStatus.toString(),//任务状态
  499. taskDate:thisdata.taskDate,//分配时间
  500. taskComment:thisdata.taskComment,//说明
  501. attachmentUrl: thisdata.attachmentUrl ? splitUrl(thisdata.attachmentUrl, ',', globalConfig.avatarHost + '/upload') : [],//图片地址
  502. salesmanName:thisdata.salesmanName,//订单负责人
  503. startDate:thisdata.startDate,//启动日期
  504. endDate:thisdata.endDate,//结束日期
  505. acceptDate:thisdata.acceptDate,//受理日期
  506. reviewDate:thisdata.reviewDate,//评审日期
  507. publicityDate:thisdata.publicityDate,//公示日期
  508. licenceDate:thisdata.licenceDate,//发证日期
  509. contacts:thisdata.contacts,//联系人
  510. contactMobile:thisdata.contactMobile,//联系人电话
  511. legalPerson:thisdata.legalPerson,//法人
  512. legalPersonTel:thisdata.legalPersonTel,//法人电话
  513. certificateNumber:thisdata.certificateNumber,//证书编号
  514. status:thisdata.status,//状态
  515. formRetrieve:thisdata.formRetrieve,//满意度表格
  516. taskRefund:thisdata.taskRefund,//退单
  517. refundContent:thisdata.refundContent,//退单信息
  518. retrieveContent:thisdata.retrieveContent,//回收信息
  519. arrivalMoney:thisdata.arrivalMoney,//是否到款
  520. setUpAmount:thisdata.setUpAmount,//立项金额
  521. declareUser:thisdata.declareUser,//账号
  522. declarePwd:thisdata.declarePwd//密码
  523. })
  524. };
  525. }.bind(this),
  526. }).always(function() {
  527. this.setState({
  528. loading: false
  529. });
  530. }.bind(this));
  531. },
  532. //订单详情
  533. xiangqings(orderNos) {
  534. $.ajax({
  535. method: "get",
  536. dataType: "json",
  537. crossDomain: false,
  538. url: globalConfig.context +"/api/admin/newOrder/getOrderNewDetail",
  539. data: {
  540. orderNo:orderNos
  541. },
  542. success: function(data) {
  543. let theArr = [];
  544. let thisdata=data.data;
  545. let ProvinceCityArr = [];
  546. let ProvinceS = thisdata.locationProvince; //省
  547. let citys = thisdata.locationCity;//市
  548. let Areas = thisdata.locationArea;//区
  549. ProvinceCityArr.push(ProvinceS, citys, Areas);
  550. if(data.error.length || data.data.list == "") {
  551. if(data.error && data.error.length) {
  552. message.warning(data.error[0].message);
  553. };
  554. } else {
  555. this.setState({
  556. processStatus:thisdata.processStatus,//流程状态
  557. liquidationStatus:thisdata.liquidationStatus,//结算状态
  558. approval:thisdata.approval,//特批状态
  559. orderRemarks:thisdata.orderRemarks,//订单留言
  560. salesmanName:thisdata.salesmanName,//营销员名称
  561. salesmanMobile:thisdata.salesmanMobile,//营销员电话
  562. financeName:thisdata.financeName,//财务名称
  563. financeMobile:thisdata.financeMobile,//财务电话
  564. depName:thisdata.depName,//订单部门
  565. ProvinceCity:ProvinceCityArr,
  566. postalAddress:thisdata.postalAddress,//详细地址
  567. })
  568. };
  569. console.log(this.state.ProvinceCity)
  570. }.bind(this),
  571. }).always(function() {
  572. this.setState({
  573. loading: false
  574. });
  575. }.bind(this));
  576. },
  577. //项目列表
  578. xiangmu(orderNos) {
  579. $.ajax({
  580. method: "get",
  581. dataType: "json",
  582. crossDomain: false,
  583. url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
  584. data: {
  585. orderNo:orderNos
  586. },
  587. success: function(data) {
  588. let theArr = [];
  589. if(data.error.length || data.data.list == "") {
  590. if(data.error && data.error.length) {
  591. message.warning(data.error[0].message);
  592. };
  593. } else {
  594. for (let i = 0; i < data.data.length; i++) {
  595. let thisdata = data.data[i];
  596. theArr.push({
  597. key: i,
  598. id:thisdata.id,
  599. orderNo:thisdata.orderNo,//订单编号
  600. commodityId:thisdata.commodityId,//项目ID
  601. commodityName:thisdata.commodityName,//项目名称
  602. cname:thisdata.cname,//项目类别
  603. commodityPrice:thisdata.commodityPrice,//项目价格
  604. commodityQuantity:thisdata.commodityQuantity,//项目数量
  605. main:thisdata.main,//是否为主要任务
  606. taskComment:thisdata.taskComment,//任务说明
  607. contacts:thisdata.contacts,//联系人
  608. contactsMobile:thisdata.contactsMobile,//联系人电话
  609. taskStatus:thisdata.taskStatus,//是否分配
  610. contractNo:thisdata.contractNo,//合同编号
  611. certificateNumber:thisdata.certificateNumber
  612. });
  613. };
  614. };
  615. this.setState({
  616. dataSourceX: theArr,
  617. });
  618. }.bind(this),
  619. }).always(function() {
  620. this.setState({
  621. loading: false
  622. });
  623. }.bind(this));
  624. },
  625. //导出
  626. exportExec(){
  627. let departmentName='',
  628. depart =this.state.departmentArr || [];
  629. depart.map(item=>{
  630. if(this.state.departmentId==item.id){
  631. departmentName=item.name;
  632. return;
  633. }
  634. });
  635. let data = {
  636. departmentId:this.state.departmentId,
  637. departmentName:departmentName,
  638. salesName: this.state.orderRefundSearch,//订单负责人
  639. startTime: this.state.releaseDate[0],
  640. endTime: this.state.releaseDate[1],
  641. grantStatus:this.state.grantStatus,
  642. }
  643. window.location.href=(globalConfig.context+'/api/admin/orderProject/exportMyTaskList?'+$.param(data));
  644. },
  645. //关闭详情
  646. visitCancel(e){
  647. this.setState({
  648. visible:false,
  649. speVisible:false,
  650. })
  651. this.reset();
  652. },
  653. visitOk(e){
  654. this.setState({
  655. visible:false,
  656. speVisible:false,
  657. })
  658. this.reset();
  659. },
  660. closeDesc(e, s) {
  661. this.state.showDesc = e;
  662. if (s) {
  663. this.loadData(this.state.page);
  664. };
  665. },
  666. closeAssign(e, s) {
  667. this.state.roleName='';
  668. this.state.assignVisible = e;
  669. if (s) {
  670. this.loadData(this.state.page);
  671. };
  672. },
  673. //添加工时
  674. okCancel(record){
  675. this.setState({
  676. lookVisible:true,
  677. taskId:record.id
  678. })
  679. },
  680. //测试
  681. getOrgCodeUrl(e) {
  682. this.setState({ orgCodeUrl: e });
  683. },
  684. //查看下证信息
  685. loaduserss(record){
  686. $.ajax({
  687. method: "get",
  688. dataType: "json",
  689. crossDomain: false,
  690. url: globalConfig.context + '/api/admin/orderProject/selectTaskProgress',
  691. data: {
  692. tid:record.id
  693. },
  694. success: function (data) {
  695. let theArr=[];
  696. let thisData=[];
  697. if (!thisData) {
  698. if (data.error && data.error.length) {
  699. message.warning(data.error[0].message);
  700. };
  701. thisData = {};
  702. }else{
  703. for(let i = 0; i < data.data.length; i++) {
  704. thisData= data.data[i];
  705. theArr.push({
  706. num:i+1,
  707. key:i,
  708. id:thisData.id,//编号
  709. alreadyNumber:thisData.alreadyNumber,//下证数
  710. licenceTimes:thisData.licenceTimes,//下证时间
  711. notCount:thisData.notCount,//未下证数
  712. flag:true
  713. })
  714. }
  715. this.setState({
  716. contactList:theArr
  717. })
  718. };
  719. }.bind(this),
  720. }).always(function () {
  721. this.setState({
  722. loading: false
  723. });
  724. }.bind(this));
  725. },
  726. //下证信息保存
  727. contactSave(record,index){
  728. if(!record.licenceTimes){
  729. message.warning('下证日期不能为空');
  730. return
  731. }
  732. if(!record.alreadyNumber){
  733. message.warning('下证数量不能为空');
  734. return
  735. }
  736. this.setState({
  737. loading: true
  738. });
  739. $.ajax({
  740. url: globalConfig.context + '/api/admin/orderProject/createTaskProgress',
  741. method: 'post',
  742. data: {
  743. taskId: this.state.id,
  744. licenceTimes:record.licenceTimes,
  745. alreadyNumber:record.alreadyNumber
  746. }
  747. }).done(function(data) {
  748. this.setState({
  749. loading: false
  750. });
  751. if(!data.error.length) {
  752. message.success('保存成功!');
  753. record.flag = true
  754. this.loaduserss(this.state.dataArr);
  755. } else {
  756. message.warning(data.error[0].message);
  757. }
  758. }.bind(this));
  759. },
  760. //下证信息删除
  761. contactDele(record){
  762. this.setState({
  763. loading: true
  764. });
  765. $.ajax({
  766. url: globalConfig.context + '/api/admin/orderProject/delectTaskProgress',
  767. method: 'post',
  768. data: {
  769. id: record.id,
  770. }
  771. }).done(function(data) {
  772. this.setState({
  773. loading: false
  774. });
  775. if(!data.error.length) {
  776. this.loaduserss(this.state.dataArr);
  777. } else {
  778. message.warning(data.error[0].message);
  779. }
  780. }.bind(this));
  781. },
  782. //点击新增下证信息
  783. addcontact(record) {
  784. this.state.contactList.push({
  785. num:this.state.contactList.length+1,
  786. key:this.state.contactList.length,
  787. licenceTimes:'',
  788. alreadyNumber: '',
  789. notCount: '',
  790. dels:'',
  791. flag:false,
  792. aflag:false
  793. });
  794. this.setState({
  795. contactList: this.state.contactList,
  796. })
  797. },
  798. //删除下证信息
  799. confirmDelet(record) {
  800. this.state.contactList.splice(record.key,1);
  801. this.setState({
  802. contactList: this.state.contactList
  803. })
  804. if(record.id){
  805. this.contactDele(record)
  806. }
  807. },
  808. caozuorizhi(){
  809. this.setState({
  810. visibleA:true
  811. })
  812. $.ajax({
  813. method: "get",
  814. dataType: "json",
  815. crossDomain: false,
  816. url: globalConfig.context +"/api/admin/orderProject/TaskLogList",
  817. data: {
  818. id:this.state.id
  819. },
  820. success: function(data) {
  821. let theArr = [];
  822. if(data.error.length || data.data.list == "") {
  823. if(data.error && data.error.length) {
  824. message.warning(data.error[0].message);
  825. };
  826. } else {
  827. for (let i = 0; i < data.data.length; i++) {
  828. let thisdata = data.data[i];
  829. theArr.push({
  830. key: i,
  831. id:thisdata.id,//日志ID
  832. content:thisdata.content,//流程
  833. taskId:thisdata.taskId,//任务ID
  834. aName:thisdata.aName,//负责人
  835. createTimes:thisdata.createTimes,//时间
  836. });
  837. };
  838. };
  839. this.setState({
  840. dataSourceA: theArr,
  841. });
  842. }.bind(this),
  843. }).always(function() {
  844. this.setState({
  845. loading: false
  846. });
  847. }.bind(this));
  848. },
  849. //关闭操作工时
  850. visitCancelA(){
  851. this.setState({
  852. visibleA:false
  853. })
  854. },
  855. foo2(){
  856. this.setState({
  857. testFlag1:false
  858. })
  859. },
  860. foo1(){
  861. this.setState({
  862. testFlag1:true
  863. })
  864. },
  865. foo(){
  866. this.setState({
  867. testFlag:false
  868. })
  869. },
  870. nextCancel() {
  871. this.setState({
  872. addnextVisible: false
  873. })
  874. },
  875. //点击打卡项目详情
  876. tableRowClickX(record, index) {
  877. this.setState({
  878. jid:record.id,//项目ID
  879. kid:record.commodityId,//商品ID
  880. commodityName:record.commodityName,//金额
  881. commodityPrice:record.commodityPrice,//金额
  882. commodityQuantity:record.commodityQuantity,//数量
  883. taskComment:record.taskComment,//备注
  884. main:record.main.toString(),//是否为主要
  885. addnextVisible:true,
  886. addState:0,
  887. });
  888. },
  889. //关闭添加工时
  890. noCancel(){
  891. this.setState({
  892. lookVisible:false
  893. })
  894. this.reset();
  895. },
  896. search() {
  897. this.loadData();
  898. },
  899. reset() {
  900. this.state.id='';//任务编号
  901. this.state.orderNo='';//订单编号
  902. this.state.projectStatus=undefined;//项目状态
  903. this.state.taskStatus=undefined;//任务状态
  904. this.state.taskComment='';//说明
  905. this.state.startDate='';//启动日期
  906. this.state.endDate='';//结束日期
  907. this.state.acceptDate='';//受理日期
  908. this.state.reviewDate='';//评审日期
  909. this.state.publicityDate='';//公示日期
  910. this.state.licenceDate='';//发证日期
  911. attachmentUrl:[];//附件
  912. this.state.contacts='';//联系人
  913. this.state.contactMobile='';//联系人电话
  914. this.state.legalPerson='';//法人
  915. this.state.legalPersonTel='';//法人电话
  916. this.state.taskId='';//任务编号
  917. this.state.hours='';//工时
  918. this.state.remarks='';//说明
  919. this.state.taskDate='';//日期
  920. this.state.taskComment='';//说明
  921. this.state.nameSearch = '';
  922. this.state.releaseDate = [];
  923. this.state.orderNoSearch='';
  924. this.state.taskNoSearch='';
  925. this.state.distribution=undefined;
  926. this.state.departmenttSearch=undefined;
  927. this.loadData(this.state.page);
  928. },
  929. searchSwitch() {
  930. this.setState({
  931. searchMore: !this.state.searchMore
  932. });
  933. },
  934. //部门
  935. departmentList() {
  936. this.setState({
  937. loading: true
  938. });
  939. $.ajax({
  940. method: "get",
  941. dataType: "json",
  942. crossDomain: false,
  943. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  944. data: {
  945. },
  946. success: function(data) {
  947. let thedata = data.data;
  948. let theArr = [];
  949. if(!thedata) {
  950. if(data.error && data.error.length) {
  951. message.warning(data.error[0].message);
  952. };
  953. thedata = {};
  954. } else {
  955. thedata.map(function(item, index) {
  956. theArr.push({
  957. key: index,
  958. name: item.name,
  959. id: item.id,
  960. })
  961. })
  962. }
  963. this.setState({
  964. departmentArr: theArr,
  965. })
  966. }.bind(this),
  967. }).always(function() {
  968. this.setState({
  969. loading: false
  970. });
  971. }.bind(this));
  972. },
  973. render() {
  974. const rowSelection = {
  975. selectedRowKeys: this.state.selectedRowKeys,
  976. onChange: (selectedRowKeys, selectedRows) => {
  977. this.setState({
  978. selectedRows: selectedRows.slice(-1),
  979. selectedRowKeys: selectedRowKeys.slice(-1)
  980. });
  981. }
  982. };
  983. const formItemLayout = {
  984. labelCol: { span: 8 },
  985. wrapperCol: { span: 14 },
  986. };
  987. const formItemLayout1 = {
  988. labelCol: { span: 6 },
  989. wrapperCol: { span: 8 },
  990. };
  991. const hasSelected = this.state.selectedRowKeys.length > 0;
  992. const { RangePicker } = DatePicker;
  993. let departmentArr = this.state.departmentArr || [];
  994. return ( <div className="user-content">
  995. <div className="content-title">
  996. <span>任务派单管理</span>
  997. </div>
  998. <div className="user-search">
  999. <Input placeholder="客户名称"
  1000. value={this.state.nameSearch}
  1001. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  1002. <Input placeholder="订单编号"
  1003. value={this.state.orderNoSearch}
  1004. onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />
  1005. <Input placeholder="任务编号"
  1006. value={this.state.taskNoSearch}
  1007. onChange={(e) => { this.setState({ taskNoSearch: e.target.value }); }} />
  1008. <Select placeholder="选择部门"
  1009. style={{ width: 150 ,marginRight:'10px'}}
  1010. value={this.state.departmenttSearch}
  1011. onChange={(e) => { this.setState({ departmenttSearch: e }) }}>
  1012. {
  1013. departmentArr.map(function (item) {
  1014. return <Select.Option key={item.id} >{item.name}</Select.Option>
  1015. })
  1016. }
  1017. </Select>
  1018. <Button type="primary" onClick={this.search}>搜索</Button>
  1019. <Button onClick={this.reset}>重置</Button>
  1020. <Button type='primary' style={{marginLeft:'10px'}} onClick={this.exportExec}>导出Excel</Button>
  1021. {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  1022. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  1023. <span>订单时间 :</span>
  1024. <RangePicker
  1025. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  1026. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  1027. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  1028. </div> */}
  1029. </div>
  1030. <div className="patent-table">
  1031. <Spin spinning={this.state.loading}>
  1032. <Table columns={this.state.columns}
  1033. dataSource={this.state.dataSource}
  1034. rowSelection={rowSelection}
  1035. pagination={this.state.pagination}
  1036. onRowClick={this.tableRowClick.bind(this)} />
  1037. </Spin>
  1038. </div>
  1039. <Assign
  1040. title="任务"
  1041. selApi={"/api/admin/orderProject/projectDistribution"}
  1042. data={this.state.assignData}
  1043. showDesc={this.state.assignVisible}
  1044. closeDesc={this.closeAssign.bind(this)}
  1045. fenpaiData={8}
  1046. specially={0}
  1047. roleName={this.state.nub}
  1048. requestMethod = {"post"}
  1049. />
  1050. <Modal
  1051. className="customeDetails"
  1052. footer=''
  1053. title="订单详情"
  1054. width='900px'
  1055. visible={this.state.visible}
  1056. onOk={this.visitOk}
  1057. onCancel={this.visitCancel}
  1058. >
  1059. <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'00px'}} >
  1060. <Spin spinning={this.state.loading}>
  1061. <div className="clearfix">
  1062. <FormItem className="half-item"
  1063. {...formItemLayout}
  1064. label="任务编号" >
  1065. <span>{this.state.id}</span>
  1066. </FormItem>
  1067. <FormItem className="half-item"
  1068. {...formItemLayout}
  1069. label="任务名称" >
  1070. <span>{this.state.taskName}</span>
  1071. </FormItem>
  1072. <FormItem className="half-item"
  1073. {...formItemLayout}
  1074. label="订单编号" >
  1075. <span>{this.state.orderNo}</span>
  1076. </FormItem>
  1077. <FormItem className="half-item"
  1078. {...formItemLayout}
  1079. label="业务类别" >
  1080. <span>{this.state.cname}</span>
  1081. </FormItem>
  1082. <FormItem className="half-item"
  1083. {...formItemLayout}
  1084. label="客户名称" >
  1085. <span>{this.state.userName}</span>
  1086. </FormItem>
  1087. <FormItem className="half-item"
  1088. {...formItemLayout}
  1089. label="特批立项" >
  1090. <span>{getApprovedState(this.state.approval)}</span>
  1091. </FormItem>
  1092. <FormItem className="half-item"
  1093. {...formItemLayout}
  1094. label="流程状态" >
  1095. <span>{getProcessStatus(this.state.processStatus)}</span>
  1096. </FormItem>
  1097. <FormItem className="half-item"
  1098. {...formItemLayout}
  1099. label="结算状态" >
  1100. <span>{getLiquidationStatus(this.state.liquidationStatus)}</span>
  1101. </FormItem>
  1102. <FormItem className="half-item"
  1103. {...formItemLayout}
  1104. label="订单负责人" >
  1105. <span>{this.state.salesmanName}</span>
  1106. </FormItem>
  1107. <FormItem className="half-item"
  1108. {...formItemLayout}
  1109. label="订单负责人电话" >
  1110. <span>{this.state.salesmanMobile}</span>
  1111. </FormItem>
  1112. <FormItem className="half-item"
  1113. {...formItemLayout}
  1114. label="财务负责人" >
  1115. <span>{this.state.financeName}</span>
  1116. </FormItem>
  1117. <FormItem className="half-item"
  1118. {...formItemLayout}
  1119. label="财务负责人电话" >
  1120. <span>{this.state.financeMobile}</span>
  1121. </FormItem>
  1122. <FormItem className="half-item"
  1123. {...formItemLayout}
  1124. label="证书编号" >
  1125. <Input placeholder="请输入证书编号" value={this.state.certificateNumber} style={{width:'200px'}}
  1126. onChange={(e)=>{this.setState({certificateNumber:e.target.value})}} ref="commodityQuantity"/>
  1127. </FormItem>
  1128. <FormItem className="half-item"
  1129. {...formItemLayout}
  1130. label="客户联系人" >
  1131. <Input placeholder="请输入联系人名称" value={this.state.contacts} style={{width:'200px'}}
  1132. onChange={(e)=>{this.setState({contacts:e.target.value})}} ref="commodityQuantity"/>
  1133. </FormItem>
  1134. <FormItem className="half-item"
  1135. {...formItemLayout}
  1136. label="联系人电话" >
  1137. <Input placeholder="请输入联系人电话" value={this.state.contactMobile} style={{width:'200px'}}
  1138. onChange={(e)=>{this.setState({contactMobile:e.target.value})}} ref="commodityQuantity"/>
  1139. </FormItem>
  1140. <FormItem className="half-item"
  1141. {...formItemLayout}
  1142. label="企业法人" >
  1143. <Input placeholder="请输入法人名称" value={this.state.legalPerson} style={{width:'200px'}}
  1144. onChange={(e)=>{this.setState({legalPerson:e.target.value})}} ref="commodityQuantity"/>
  1145. </FormItem>
  1146. <FormItem className="half-item"
  1147. {...formItemLayout}
  1148. label="企业地址">
  1149. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'200px'}}
  1150. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  1151. </FormItem>
  1152. <FormItem className="half-item"
  1153. {...formItemLayout}
  1154. label="法人电话" >
  1155. <Input placeholder="请输入法人电话" value={this.state.legalPersonTel} style={{width:'200px'}}
  1156. onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}} ref="commodityQuantity"/>
  1157. </FormItem>
  1158. <FormItem className="half-item"
  1159. {...formItemLayout}
  1160. label="项目状态" >
  1161. <Select placeholder="选择项目状态"
  1162. style={{ width:'200px'}}
  1163. value={this.state.projectStatus}
  1164. onChange={(e)=>{this.setState({projectStatus:e})}}>
  1165. {
  1166. projectStatus.map(function (item) {
  1167. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1168. })
  1169. }
  1170. </Select>
  1171. </FormItem>
  1172. <FormItem className="half-item"
  1173. {...formItemLayout}
  1174. label="任务状态" >
  1175. <Select placeholder="选择任务状态"
  1176. style={{ width:'200px'}}
  1177. value={this.state.taskStatus}
  1178. onChange={(e)=>{this.setState({taskStatus:e})}}>
  1179. {
  1180. taskStatus.map(function (item) {
  1181. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1182. })
  1183. }
  1184. </Select>
  1185. </FormItem>
  1186. <FormItem className="half-item"
  1187. {...formItemLayout}
  1188. label="立项金额(万元)" >
  1189. <Input placeholder="请输入立项金额" value={this.state.setUpAmount} style={{width:'200px'}}
  1190. onChange={(e)=>{this.setState({setUpAmount:e.target.value})}} ref="commodityQuantity"/>
  1191. </FormItem>
  1192. <FormItem className="half-item"
  1193. {...formItemLayout}
  1194. label="是否到款">
  1195. <Radio.Group value={this.state.arrivalMoney}
  1196. onChange={(e)=>{this.setState({arrivalMoney:e.target.value})}}>
  1197. <Radio value={0}>未到企业</Radio>
  1198. <Radio value={1}>已到企业</Radio>
  1199. </Radio.Group>
  1200. </FormItem>
  1201. <div className="clearfix">
  1202. <h3 className='sub-title'>申报系统账户信息</h3>
  1203. {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}
  1204. <FormItem className="half-item"
  1205. {...formItemLayout}
  1206. label="用户名" >
  1207. <Input placeholder="请输入用户名" value={this.state.declareUser} style={{width:'200px'}}
  1208. onChange={(e)=>{this.setState({declareUser:e.target.value})}}/>
  1209. </FormItem>
  1210. <FormItem className="half-item"
  1211. {...formItemLayout}
  1212. label="密码" >
  1213. <Input placeholder="请输入密码" value={this.state.declarePwd} style={{width:'200px'}}
  1214. onChange={(e)=>{this.setState({declarePwd:e.target.value})}}/>
  1215. </FormItem>
  1216. </div>
  1217. <div className="clearfix">
  1218. <h3 className='sub-title'>项目申报进度</h3>
  1219. <FormItem className="half-item" {...formItemLayout} label="启动时间">
  1220. <DatePicker
  1221. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1222. showTime
  1223. format="YYYY-MM-DD"
  1224. onOk={(e)=>{}}
  1225. value={this.state.startDate ? moment(this.state.startDate) : null}
  1226. onChange={(data, dataString) => { this.setState({ startDate: dataString }); }} />
  1227. </FormItem>
  1228. <FormItem className="half-item" {...formItemLayout} label="完成时间">
  1229. <DatePicker
  1230. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1231. showTime
  1232. format="YYYY-MM-DD"
  1233. onOk={(e)=>{}}
  1234. value={this.state.endDate ? moment(this.state.endDate) : null}
  1235. onChange={(data, dataString) => { this.setState({ endDate: dataString }); }} />
  1236. </FormItem>
  1237. <FormItem className="half-item" {...formItemLayout} label="受理时间">
  1238. <DatePicker
  1239. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1240. showTime
  1241. format="YYYY-MM-DD"
  1242. onOk={(e)=>{}}
  1243. value={this.state.acceptDate ? moment(this.state.acceptDate) : null}
  1244. onChange={(data, dataString) => { this.setState({ acceptDate: dataString }); }} />
  1245. </FormItem>
  1246. <FormItem className="half-item" {...formItemLayout} label="评审时间">
  1247. <DatePicker
  1248. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1249. showTime
  1250. format="YYYY-MM-DD"
  1251. onOk={(e)=>{}}
  1252. value={this.state.reviewDate ? moment(this.state.reviewDate) : null}
  1253. onChange={(data, dataString) => { this.setState({ reviewDate: dataString }); }} />
  1254. </FormItem>
  1255. <FormItem className="half-item" {...formItemLayout} label="公示时间">
  1256. <DatePicker
  1257. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1258. showTime
  1259. format="YYYY-MM-DD"
  1260. onOk={(e)=>{}}
  1261. value={this.state.publicityDate ? moment(this.state.publicityDate) : null}
  1262. onChange={(data, dataString) => { this.setState({ publicityDate: dataString }); }} />
  1263. </FormItem>
  1264. <FormItem className="half-item" {...formItemLayout} label="发证时间">
  1265. <DatePicker
  1266. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1267. showTime
  1268. format="YYYY-MM-DD"
  1269. onOk={(e)=>{}}
  1270. value={this.state.licenceDate ? moment(this.state.licenceDate) : null}
  1271. onChange={(data, dataString) => { this.setState({ licenceDate: dataString }); }} />
  1272. </FormItem>
  1273. </div>
  1274. <div className='clearfix'>
  1275. <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 16 }} label="附件">
  1276. <Picture
  1277. fileList={(e)=>{this.setState({attachmentUrl:e})}}
  1278. pictureUrl={this.state.attachmentUrl}
  1279. visible={this.props.visible}
  1280. data={{'sign':'order_task_file',url:'/api/admin/orderProject/uploadOrderTaskFile',number:8}}
  1281. />
  1282. </FormItem>
  1283. </div>
  1284. <div className='clearfix'>
  1285. <FormItem
  1286. labelCol={{ span: 3 }}
  1287. wrapperCol={{ span: 16 }}
  1288. label="备注" >
  1289. <Input type="textarea" placeholder="请输入备注" rows={4} value={this.state.taskComment}
  1290. onChange={(e)=>{this.setState({taskComment:e.target.value})}}/>
  1291. </FormItem>
  1292. </div>
  1293. <div>
  1294. <span style={{marginLeft:'50px',fontSize:'20px'}}>项目业务</span>
  1295. {this.state.processStatus==0?<Button type='primary' onClick={this.addDetailed} style={{float:'right',marginRight:'50px',marginBottom:'15px'}}>添加项目明细</Button>:""}
  1296. </div>
  1297. <div className="patent-table">
  1298. <Spin spinning={this.state.loading}>
  1299. <Table columns={this.state.columnsX}
  1300. dataSource={this.state.dataSourceX}
  1301. pagination={this.state.paginations}
  1302. onRowClick={this.tableRowClickX}
  1303. />
  1304. </Spin>
  1305. </div>
  1306. <div className='clearfix'>
  1307. <Button className="cancel" type="primary" onClick={this.tijiaoOk} style={{marginLeft:"200px",marginTop:'10px'}} htmlType="submit">保存</Button>
  1308. <Button className="cancel" type="ghost" onClick={this.visitCancel} style={{marginLeft:"50px",marginTop:'10px'}}>取消</Button>
  1309. </div>
  1310. </div>
  1311. </Spin>
  1312. </Form>
  1313. </Modal>
  1314. <Modal maskClosable={false} visible={this.state.lookVisible}
  1315. onOk={this.noCancel} onCancel={this.noCancel}
  1316. width='500px'
  1317. title={'添加工时'}
  1318. footer=''
  1319. className="admin-desc-content">
  1320. <Form layout="horizontal" id="demand-form">
  1321. <Spin spinning={this.state.loading}>
  1322. <div className='clearfix'>
  1323. <FormItem {...formItemLayout} label="工作日期">
  1324. <DatePicker
  1325. style={{marginTop:"2px",width: '200px',height:"32px" }}
  1326. showTime
  1327. format="YYYY-MM-DD"
  1328. onOk={(e)=>{}}
  1329. value={this.state.taskDate ? moment(this.state.taskDate) : null}
  1330. onChange={(data, dataString) => { this.setState({ taskDate: dataString }); }} />
  1331. </FormItem>
  1332. </div>
  1333. <div className='clearfix'>
  1334. <FormItem
  1335. {...formItemLayout}
  1336. label="工作时长" >
  1337. <Input placeholder="请输入工作时长" value={this.state.hours} style={{width:'200px'}}
  1338. onChange={(e)=>{this.setState({hours:e.target.value})}} ref="commodityQuantity"/>
  1339. </FormItem>
  1340. </div>
  1341. <div className='clearfix'>
  1342. <FormItem
  1343. {...formItemLayout}
  1344. label="工作内容" >
  1345. <Input type="textarea" placeholder="请输入备注" rows={4} value={this.state.remarks}
  1346. onChange={(e)=>{this.setState({remarks:e.target.value})}}/>
  1347. </FormItem>
  1348. </div>
  1349. <div className='clearfix'>
  1350. <Button className="cancel" type="primary" onClick={this.tianjiaOk} style={{marginLeft:"100px",marginTop:'10px'}} htmlType="submit">确定</Button>
  1351. <Button className="cancel" type="ghost" onClick={this.noCancel} style={{marginLeft:"50px"}}>取消</Button>
  1352. </div>
  1353. </Spin>
  1354. </Form >
  1355. </Modal>
  1356. <Modal maskClosable={false} visible={this.state.addnextVisible}
  1357. onOk={this.nextCancel} onCancel={this.nextCancel}
  1358. width='800px'
  1359. title='项目任务详情'
  1360. footer=''
  1361. className="admin-desc-content">
  1362. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  1363. <Spin spinning={this.state.loading}>
  1364. <div className='clearfix'>
  1365. <FormItem className="half-item"
  1366. {...formItemLayout}
  1367. label="项目名称" >
  1368. <span>{this.state.commodityName}</span>
  1369. </FormItem>
  1370. <FormItem className="half-item"
  1371. {...formItemLayout}
  1372. label="项目数量" >
  1373. <span>{this.state.commodityQuantity}</span>
  1374. </FormItem>
  1375. <FormItem className="half-item"
  1376. {...formItemLayout}
  1377. label="金额(万元)" >
  1378. <span>{this.state.commodityPrice}</span>
  1379. </FormItem>
  1380. <FormItem className="half-item"
  1381. {...formItemLayout}
  1382. label="主要项目" >
  1383. <span>{getboutique(this.state.main)}</span>
  1384. </FormItem>
  1385. <div className='clearfix'>
  1386. <FormItem
  1387. labelCol={{ span: 3 }}
  1388. wrapperCol={{ span: 18 }}
  1389. label="服务说明" >
  1390. <span>{this.state.taskComment}</span>
  1391. </FormItem>
  1392. </div>
  1393. </div>
  1394. </Spin>
  1395. </Form >
  1396. </Modal>
  1397. <Modal maskClosable={false} visible={this.state.speVisible}
  1398. onOk={this.visitOk} onCancel={this.visitCancel}
  1399. width='900px'
  1400. title='项目概况'
  1401. footer=''
  1402. className="admin-desc-content">
  1403. <div className="clearfix">
  1404. <FormItem className="half-item"
  1405. {...formItemLayout}
  1406. label="当前项目情况">
  1407. <Radio.Group value={this.state.status}
  1408. onChange={(e)=>{this.setState({status:e.target.value})}}>
  1409. <Radio value={0}>开启</Radio>
  1410. <Radio value={1}>暂停</Radio>
  1411. </Radio.Group>
  1412. <Button type='primary' size='small' style={{marginTop:'5px',position:'absolute'}} onClick={this.caozuorizhi}>操作日志</Button>
  1413. </FormItem>
  1414. <FormItem className="half-item"
  1415. {...formItemLayout}
  1416. label="合同编号">
  1417. <span>{this.state.contractNo}</span>
  1418. </FormItem>
  1419. </div>
  1420. <div className="clearfix">
  1421. <FormItem className="half-item"
  1422. {...formItemLayout}
  1423. label="项目状态">
  1424. <Select placeholder="选择项目状态"
  1425. style={{ width:'200px'}}
  1426. value={this.state.projectStatus}
  1427. onChange={(e)=>{this.setState({projectStatus:e})}}>
  1428. {
  1429. projectStatus.map(function (item) {
  1430. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1431. })
  1432. }
  1433. </Select>
  1434. </FormItem>
  1435. <FormItem className="half-item"
  1436. {...formItemLayout}
  1437. label="是否特批">
  1438. <span>{getApproval(this.state.approval)}</span>
  1439. </FormItem>
  1440. <FormItem className="half-item"
  1441. {...formItemLayout}
  1442. label="结算状态">
  1443. <span>{getLiquidationStatus(this.state.liquidationStatus)}</span>
  1444. </FormItem>
  1445. <FormItem className="half-item"
  1446. {...formItemLayout}
  1447. label="流程状态">
  1448. <span>{getProcessStatus(this.state.processStatus)}</span>
  1449. </FormItem>
  1450. <FormItem className="half-item"
  1451. {...formItemLayout}
  1452. label="订单编号">
  1453. <span>{this.state.orderNo}</span>
  1454. </FormItem>
  1455. </div>
  1456. <div className="clearfix">
  1457. <FormItem className="half-item"
  1458. {...formItemLayout}
  1459. label="满意度表格">
  1460. <Radio.Group value={this.state.formRetrieve}
  1461. onChange={(e)=>{this.setState({formRetrieve:e.target.value})}}>
  1462. <Radio value={0}>未收回</Radio>
  1463. <Radio value={1}>已收回</Radio>
  1464. <Radio value={2}>其他</Radio>
  1465. </Radio.Group>
  1466. </FormItem>
  1467. <FormItem className="half-item"
  1468. {...formItemLayout}
  1469. label="退单">
  1470. <Radio.Group value={this.state.taskRefund}
  1471. onChange={(e)=>{this.setState({taskRefund:e.target.value})}}>
  1472. <Radio value={0}>已完成</Radio>
  1473. <Radio value={1}>未完成</Radio>
  1474. <Radio value={2}>其他</Radio>
  1475. </Radio.Group>
  1476. </FormItem>
  1477. </div>
  1478. <div className="clearfix">
  1479. {<FormItem className='half-item'
  1480. {...formItemLayout}
  1481. label="(满意度)备注">
  1482. <Input type="textarea" placeholder="请输入备注" rows={2} value={this.state.retrieveContent}
  1483. onChange={(e)=>{this.setState({retrieveContent:e.target.value})}}/>
  1484. </FormItem>}
  1485. {<FormItem className='half-item'
  1486. {...formItemLayout}
  1487. label="(退单)备注">
  1488. <Input type="textarea" placeholder="请输入备注" rows={2} value={this.state.refundContent}
  1489. onChange={(e)=>{this.setState({refundContent:e.target.value})}}/>
  1490. </FormItem>}
  1491. </div>
  1492. <div className="clearfix">
  1493. <h3 className='sub-title'>任务信息</h3>
  1494. <FormItem className="half-item"
  1495. {...formItemLayout}
  1496. label="任务编号">
  1497. <span>{this.state.id}</span>
  1498. </FormItem>
  1499. <FormItem className="half-item"
  1500. {...formItemLayout}
  1501. label="任务名称">
  1502. <span>{this.state.taskName}</span>
  1503. </FormItem>
  1504. <FormItem className="half-item"
  1505. {...formItemLayout}
  1506. label="任务状态">
  1507. <Select placeholder="选择任务状态"
  1508. style={{ width:'200px'}}
  1509. value={this.state.taskStatus}
  1510. onChange={(e)=>{this.setState({taskStatus:e})}}>
  1511. {
  1512. taskStatus.map(function (item) {
  1513. return <Select.Option key={item.value} >{item.key}</Select.Option>
  1514. })
  1515. }
  1516. </Select>
  1517. </FormItem>
  1518. <FormItem className="half-item"
  1519. {...formItemLayout}
  1520. label="任务类别">
  1521. <span>{this.state.cname}</span>
  1522. </FormItem>
  1523. <FormItem className="half-item"
  1524. {...formItemLayout}
  1525. label="证书编号" >
  1526. <Input placeholder="请输入证书编号" value={this.state.certificateNumber} style={{width:'200px'}}
  1527. onChange={(e)=>{this.setState({certificateNumber:e.target.value})}} ref="commodityQuantity"/>
  1528. </FormItem>
  1529. </div>
  1530. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  1531. <div className="clearfix">
  1532. <h3 className='sub-title'>联系信息</h3>
  1533. <FormItem className="half-item"
  1534. {...formItemLayout}
  1535. label="客户名称">
  1536. <span>{this.state.userName}</span>
  1537. </FormItem>
  1538. <FormItem className="half-item"
  1539. {...formItemLayout}
  1540. label="企业法人">
  1541. <Input placeholder="请输入法人名称" value={this.state.legalPerson} style={{width:'200px'}}
  1542. onChange={(e)=>{this.setState({legalPerson:e.target.value})}} ref="commodityQuantity"/>
  1543. </FormItem>
  1544. <FormItem className="half-item"
  1545. {...formItemLayout}
  1546. label="法人电话">
  1547. <Input placeholder="请输入法人电话" value={this.state.legalPersonTel} style={{width:'200px'}}
  1548. onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}} ref="commodityQuantity"/>
  1549. </FormItem>
  1550. <FormItem className="half-item"
  1551. {...formItemLayout}
  1552. label="客户联系人">
  1553. <Input placeholder="请输入联系人名称" value={this.state.contacts} style={{width:'200px'}}
  1554. onChange={(e)=>{this.setState({contacts:e.target.value})}} ref="commodityQuantity"/>
  1555. </FormItem>
  1556. <FormItem className="half-item"
  1557. {...formItemLayout}
  1558. label="联系人电话">
  1559. <Input placeholder="请输入联系人电话" value={this.state.contactMobile} style={{width:'200px'}}
  1560. onChange={(e)=>{this.setState({contactMobile:e.target.value})}} ref="commodityQuantity"/>
  1561. </FormItem>
  1562. <FormItem className="half-item"
  1563. {...formItemLayout}
  1564. label="企业地址">
  1565. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'200px'}}
  1566. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }}/>
  1567. </FormItem>
  1568. <FormItem className="half-item"
  1569. {...formItemLayout}
  1570. label="">
  1571. </FormItem>
  1572. <FormItem className="half-item"
  1573. {...formItemLayout}
  1574. label="详细地址">
  1575. <Input placeholder="请输入详细地址" value={this.state.postalAddress} style={{width:'200px'}}
  1576. onChange={(e)=>{this.setState({postalAddress:e.target.value})}} ref="commodityQuantity"/>
  1577. </FormItem>
  1578. </div>
  1579. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  1580. <div className="clearfix">
  1581. <h3 className='sub-title'>订单负责人信息</h3>
  1582. <FormItem className="half-item"
  1583. {...formItemLayout}
  1584. label="负责人">
  1585. <span>{this.state.salesmanName+'(湖南科德)'}</span>
  1586. </FormItem>
  1587. <FormItem className="half-item"
  1588. {...formItemLayout}
  1589. label="负责人电话">
  1590. <span>{this.state.salesmanMobile}</span>
  1591. </FormItem>
  1592. <FormItem className="half-item"
  1593. {...formItemLayout}
  1594. label="财务负责人">
  1595. <span>{this.state.financeName}</span>
  1596. </FormItem>
  1597. <FormItem className="half-item"
  1598. {...formItemLayout}
  1599. label="财务负责人电话">
  1600. <span>{this.state.financeMobile}</span>
  1601. </FormItem>
  1602. </div>
  1603. <div className="clearfix" style={{marginTop:'10px'}}>
  1604. <FormItem
  1605. labelCol={{ span: 3 }}
  1606. wrapperCol={{ span: 14 }}
  1607. label="附件">
  1608. <Picture
  1609. fileList={(e)=>{this.setState({attachmentUrl:e})}}
  1610. pictureUrl={this.state.attachmentUrl}
  1611. visible={this.props.visible}
  1612. data={{'sign':'order_task_file',url:'/api/admin/orderProject/uploadOrderTaskFile',number:8}}
  1613. />
  1614. </FormItem>
  1615. </div>
  1616. <div className="clearfix">
  1617. <FormItem
  1618. labelCol={{ span: 3 }}
  1619. wrapperCol={{ span: 16 }}
  1620. label="备注">
  1621. <Input type="textarea" placeholder="请输入备注" rows={4} value={this.state.taskComment}
  1622. onChange={(e)=>{this.setState({taskComment:e.target.value})}}/>
  1623. </FormItem>
  1624. </div>
  1625. <div className="clearfix">
  1626. <h3 className='sub-title'>项目申报进度</h3>
  1627. <FormItem className="half-item"
  1628. {...formItemLayout}
  1629. label="启动时间">
  1630. <DatePicker style={{marginTop:'5px'}}
  1631. showTime
  1632. format="YYYY-MM-DD"
  1633. onOk={(e)=>{}}
  1634. value={this.state.startDate ? moment(this.state.startDate) : null}
  1635. onChange={(data, dataString) => {this.setState({ startDate: dataString }); }}/>
  1636. </FormItem>
  1637. <FormItem className="half-item"
  1638. {...formItemLayout}
  1639. label="软著派单数量">
  1640. <span>{this.state.commodityQuantity}</span>
  1641. <Button type='primary' size='small' style={{marginLeft:'45px'}} onClick={this.addcontact}>+增加下证信息</Button>
  1642. </FormItem>
  1643. <div className="patent-table patent-table-center">
  1644. <Spin spinning={this.state.loading}>
  1645. <Table columns={this.state.ContactsLists}
  1646. dataSource={this.state.contactList}
  1647. pagination={false}/>
  1648. </Spin>
  1649. </div>
  1650. </div>
  1651. <div className="clearfix">
  1652. <h3 className='sub-title'>项目业务</h3>
  1653. <div className="patent-table">
  1654. <Spin spinning={this.state.loading}>
  1655. <Table columns={this.state.columnsX}
  1656. dataSource={this.state.dataSourceX}
  1657. pagination={this.state.paginations}
  1658. onRowClick={this.tableRowClickX}
  1659. />
  1660. </Spin>
  1661. </div>
  1662. </div>
  1663. <div className='clearfix'>
  1664. <Button className="cancel" type="primary" onClick={this.tijiaoOk} style={{marginLeft:"200px",marginTop:'10px'}} htmlType="submit">保存</Button>
  1665. <Button className="cancel" type="ghost" onClick={this.visitCancel} style={{marginLeft:"50px",marginTop:'10px'}}>取消</Button>
  1666. </div>
  1667. </Modal>
  1668. <Modal width='800px' visible={this.state.visibleA}
  1669. onCancel={this.visitCancelA}
  1670. title='操作日志'
  1671. footer=''
  1672. className="admin-desc-content">
  1673. <div className="patent-table patent-table-center">
  1674. <Spin spinning={this.state.loading}>
  1675. <Table columns={this.state.columnsA}
  1676. dataSource={this.state.dataSourceA}
  1677. pagination={false}/>
  1678. </Spin>
  1679. </div>
  1680. </Modal>
  1681. </div> )
  1682. }
  1683. })
  1684. export default Task;