project.jsx 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438
  1. import React from 'react'
  2. import $ from 'jquery'
  3. import {
  4. Spin,
  5. Button,
  6. Tabs,
  7. Table,
  8. message,
  9. Modal,
  10. Form,
  11. Upload,
  12. Tag,
  13. } from 'antd'
  14. import {
  15. getProcessStatus,
  16. getApproval,
  17. getTaskStatus,
  18. getLiquidationStatus,
  19. splitUrl,
  20. getProjectStatus,
  21. getboutique,
  22. getprovince,
  23. ShowModal,
  24. getRefundStatus,
  25. } from '@/tools'
  26. const FormItem = Form.Item
  27. import ResolutionDetail from '@/resolutionDetail'
  28. import ImgList from "./common/imgList";
  29. import CheckProject from "./manageCenter/components/checkProject";
  30. import { cuiJieDian } from '@/dataDic.js'
  31. import {getProjectName} from "./tools";
  32. const { TabPane } = Tabs
  33. const project = React.createClass({
  34. getInitialState() {
  35. return {
  36. oldInfor:{},
  37. patentNameType: -1,
  38. patentType: -1,
  39. paySubject: [],
  40. containOfficialFees:0,//官费缴费情况
  41. record: this.props.record,
  42. paginations: false,
  43. tabsKey: "1",
  44. columnsX: [
  45. {
  46. title: '业务项目名称',
  47. dataIndex: 'commodityName',
  48. key: 'commodityName',
  49. },
  50. {
  51. title: '项目类别',
  52. dataIndex: 'cname',
  53. key: 'cname',
  54. },
  55. {
  56. title: '项目数量',
  57. dataIndex: 'commodityQuantity',
  58. key: 'commodityQuantity',
  59. render: (text, record) => {
  60. if (record.splitStatus == 1) {
  61. return (
  62. <span>
  63. {text}{' '}
  64. <Tag
  65. color="#108ee9"
  66. onClick={(e) => {
  67. e.stopPropagation()
  68. this.showRes(record)
  69. }}
  70. >
  71. 已拆
  72. </Tag>
  73. </span>
  74. )
  75. } else {
  76. return text
  77. }
  78. },
  79. },
  80. {
  81. title: '金额(万元)',
  82. dataIndex: 'commodityPrice',
  83. key: 'commodityPrice',
  84. },
  85. {
  86. title: '负责人',
  87. dataIndex: 'contacts',
  88. key: 'contacts',
  89. },
  90. {
  91. title: '负责人电话',
  92. dataIndex: 'contactsMobile',
  93. key: 'contactsMobile',
  94. },
  95. {
  96. title: '主要项目',
  97. dataIndex: 'main',
  98. key: 'main',
  99. render: (text) => {
  100. return text ? '是' : '否'
  101. },
  102. },
  103. {
  104. title: '项目说明',
  105. dataIndex: 'taskComment',
  106. key: 'taskComment',
  107. render: (text) => {
  108. return text && text.length > 8 ? text.substr(0, 8) + '…' : text
  109. },
  110. },
  111. ],
  112. columnsA: [
  113. {
  114. title: '流程',
  115. dataIndex: 'content',
  116. key: 'content',
  117. align: 'center',
  118. },
  119. {
  120. title: '操作人',
  121. dataIndex: 'aName',
  122. key: 'aName',
  123. align: 'center',
  124. },
  125. {
  126. title: '时间',
  127. dataIndex: 'createTimes',
  128. key: 'createTimes',
  129. align: 'center',
  130. },
  131. ],
  132. resVisible: false,
  133. companyColumns: [
  134. {
  135. title: '公司',
  136. dataIndex: 'name',
  137. key: 'name',
  138. //fixed:'left',
  139. width: 160,
  140. },
  141. {
  142. title: '联系人',
  143. dataIndex: 'contacts',
  144. key: 'contacts',
  145. },
  146. {
  147. title: '联系人电话',
  148. dataIndex: 'contactsMobile',
  149. key: 'contactsMobile',
  150. },
  151. {
  152. title: '地址',
  153. dataIndex: 'companyProvinceArr',
  154. key: 'companyProvinceArr',
  155. width: 140,
  156. render: (test) => {
  157. return test[0] === null
  158. ? ''
  159. : getprovince(test[0]) +
  160. '/' +
  161. getprovince(test[1]) +
  162. '/' +
  163. getprovince(test[2])
  164. },
  165. },
  166. {
  167. title: '详细地址',
  168. dataIndex: 'address',
  169. key: 'address',
  170. },
  171. ],
  172. }
  173. },
  174. componentWillReceiveProps(nextProps){
  175. this.setState({
  176. record: nextProps.record,
  177. })
  178. if (nextProps.record) {
  179. this.xiangqing(nextProps.record.id)
  180. this.xiangqings(nextProps.record.orderNo)
  181. this.xiangmu(nextProps.record.orderNo)
  182. this.loaduserss(nextProps.record)
  183. }
  184. },
  185. // handleOk() {
  186. // this.setState({
  187. // newVisible: false
  188. // });
  189. // // window.setTimeout( () => {
  190. // // this.setState({
  191. // // newVisible: true
  192. // // });
  193. // // },)
  194. // },
  195. // 拆分详细
  196. showRes(record) {
  197. this.setState({
  198. resVisible: true,
  199. resRecord: record,
  200. })
  201. },
  202. resCancel() {
  203. this.setState({
  204. resVisible: false,
  205. })
  206. },
  207. xiangqing(id) {
  208. this.setState({
  209. loading: true,
  210. })
  211. $.ajax({
  212. method: 'get',
  213. dataType: 'json',
  214. crossDomain: false,
  215. url: globalConfig.context + '/api/admin/orderProject/orderTaskDetail',
  216. data: {
  217. id: id,
  218. },
  219. success: function (data) {
  220. if (data.error.length || data.data.list == '') {
  221. if (data.error && data.error.length) {
  222. message.warning(data.error[0].message)
  223. }
  224. } else {
  225. let thisdata = data.data
  226. this.setState({
  227. id: thisdata.id, //ID
  228. orderNo: thisdata.orderNo, //订单编号
  229. userName: thisdata.userName, //客户名称
  230. taskName: thisdata.taskName, //任务名称
  231. cname: thisdata.cname, //项目品类
  232. contractNo: thisdata.contractNo, //合同编号
  233. projectStatus: thisdata.projectStatus, //项目状态
  234. taskStatus: thisdata.taskStatus, //任务状态
  235. taskDate: thisdata.taskDate, //分配时间
  236. taskComment: thisdata.taskComment, //说明
  237. attachmentUrl: thisdata.attachmentUrl
  238. ? splitUrl(
  239. thisdata.attachmentUrl,
  240. ',',
  241. globalConfig.avatarHost + '/upload'
  242. )
  243. : [], //图片地址
  244. salesmanName: thisdata.salesmanName, //订单负责人
  245. startDate: thisdata.startDate, //启动日期
  246. endDate: thisdata.endDate, //结束日期
  247. acceptDate: thisdata.acceptDate, //受理日期
  248. reviewDate: thisdata.reviewDate, //评审日期
  249. publicityDate: thisdata.publicityDate, //公示日期
  250. licenceDate: thisdata.licenceDate, //发证日期
  251. contacts: thisdata.contacts, //联系人
  252. contactMobile: thisdata.contactMobile, //联系人电话
  253. legalPerson: thisdata.legalPerson, //法人
  254. legalPersonTel: thisdata.legalPersonTel, //法人电话
  255. certificateNumber: thisdata.certificateNumber, //证书编号
  256. status: thisdata.status, //状态
  257. formRetrieve: thisdata.formRetrieve, //满意度表格
  258. taskRefund: thisdata.taskRefund, //退单
  259. refundContent: thisdata.refundContent, //退单信息
  260. retrieveContent: thisdata.retrieveContent, //回收信息
  261. arrivalMoney: thisdata.arrivalMoney, //是否到款
  262. setUpAmount: thisdata.setUpAmount, //立项金额
  263. declareUser: thisdata.declareUser, //账号
  264. declarePwd: thisdata.declarePwd, //密码
  265. depName: thisdata.depName, //订单部门
  266. outsourceName: thisdata.outsourceName, //外包公司名称
  267. outsourcePrice: thisdata.outsourcePrice, //外包价格
  268. declarationBatch: thisdata.declarationBatch, //外包价格
  269. projectType: thisdata.bpType,//项目类型
  270. orderTaskOfficialCost: thisdata.officialCost, //官费 0无 1有
  271. })
  272. }
  273. }.bind(this),
  274. }).always(
  275. function () {
  276. this.setState({
  277. loading: false,
  278. })
  279. }.bind(this)
  280. )
  281. },
  282. // 获取csort下的数据
  283. getCsortData(cSort) {
  284. cuiJieDian.map((item) => {
  285. if (item.value == cSort) {
  286. this.setState({
  287. paySubject: item.children,
  288. })
  289. }
  290. })
  291. },
  292. //订单详情
  293. xiangqings(orderNos) {
  294. this.setState({
  295. loading: true,
  296. })
  297. $.ajax({
  298. method: 'get',
  299. dataType: 'json',
  300. crossDomain: false,
  301. url: globalConfig.context + '/api/admin/newOrder/getOrderNewDetail',
  302. data: {
  303. orderNo: orderNos,
  304. },
  305. success: function (data) {
  306. let thisdata = data.data
  307. let ProvinceCityArr = []
  308. let ProvinceS = thisdata.locationProvince //省
  309. let citys = thisdata.locationCity //市
  310. let Areas = thisdata.locationArea //区
  311. ProvinceCityArr.push(ProvinceS, citys, Areas)
  312. if (data.error.length || data.data.list == '') {
  313. if (data.error && data.error.length) {
  314. message.warning(data.error[0].message)
  315. }
  316. } else {
  317. this.setState({
  318. processStatus: thisdata.processStatus, //流程状态
  319. liquidationStatus: thisdata.liquidationStatus, //结算状态
  320. approval: thisdata.approval, //特批状态
  321. orderRemarks: thisdata.orderRemarks, //订单留言
  322. salesmanName: thisdata.salesmanName, //营销员名称
  323. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  324. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  325. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  326. financeName: thisdata.financeName, //财务名称
  327. financeMobile: thisdata.financeMobile, //财务电话
  328. nowFinance: thisdata.nowFinance, //财务名称
  329. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  330. depName: thisdata.depName, //订单部门
  331. locationProvince: thisdata.locationProvince,
  332. locationCity: thisdata.locationCity,
  333. locationArea: thisdata.locationArea,
  334. ProvinceCity: ProvinceCityArr,
  335. postalAddress: thisdata.postalAddress, //详细地址
  336. outsource: thisdata.outsource,
  337. })
  338. }
  339. }.bind(this),
  340. }).always(
  341. function () {
  342. this.setState({
  343. loading: false,
  344. })
  345. }.bind(this)
  346. )
  347. },
  348. //查看下证信息
  349. loaduserss(record) {
  350. this.setState({
  351. loading: true,
  352. })
  353. $.ajax({
  354. method: 'get',
  355. dataType: 'json',
  356. crossDomain: false,
  357. url: globalConfig.context + '/api/admin/orderProject/selectTaskProgress',
  358. data: {
  359. tid: record.id,
  360. },
  361. success: function (data) {
  362. let theArr = []
  363. let thisData = []
  364. if (!thisData) {
  365. if (data.error && data.error.length) {
  366. message.warning(data.error[0].message)
  367. }
  368. thisData = {}
  369. } else {
  370. for (let i = 0; i < data.data.length; i++) {
  371. thisData = data.data[i]
  372. theArr.push({
  373. num: i + 1,
  374. key: i,
  375. id: thisData.id, //编号
  376. alreadyNumber: thisData.alreadyNumber, //下证数
  377. licenceTimes: thisData.licenceTimes, //下证时间
  378. notCount: thisData.notCount, //未下证数
  379. flag: true,
  380. })
  381. }
  382. this.setState({
  383. contactList: theArr,
  384. })
  385. }
  386. }.bind(this),
  387. }).always(
  388. function () {
  389. this.setState({
  390. loading: false,
  391. })
  392. }.bind(this)
  393. )
  394. },
  395. //项目列表
  396. xiangmu(orderNos) {
  397. this.setState({
  398. loading: true,
  399. })
  400. $.ajax({
  401. method: 'get',
  402. dataType: 'json',
  403. crossDomain: false,
  404. url: globalConfig.context + '/api/admin/newOrder/getOrderTask',
  405. data: {
  406. orderNo: orderNos,
  407. },
  408. success: function (data) {
  409. let theArr = []
  410. if (data.error.length || data.data.list == '') {
  411. if (data.error && data.error.length) {
  412. message.warning(data.error[0].message)
  413. }
  414. } else {
  415. for (let i = 0; i < data.data.length; i++) {
  416. let thisdata = data.data[i];
  417. thisdata.key = i;
  418. thisdata.sort = thisdata.cSort;
  419. theArr.push(thisdata);
  420. }
  421. }
  422. this.setState({
  423. dataSourceX: theArr,
  424. })
  425. }.bind(this),
  426. }).always(
  427. function () {
  428. this.setState({
  429. loading: false,
  430. })
  431. }.bind(this)
  432. )
  433. },
  434. tableRowClickX(record) {
  435. this.setState({
  436. jid: record.id, //项目ID
  437. kid: record.commodityId, //商品ID
  438. commodityName: record.commodityName, //金额
  439. commodityPrice: record.commodityPrice, //金额
  440. commodityQuantity: record.commodityQuantity, //数量
  441. taskComment: record.taskComment, //备注
  442. main: record.main.toString(), //是否为主要
  443. addnextVisible: true,
  444. addState: 0,
  445. })
  446. },
  447. caozuorizhi() {
  448. this.setState({
  449. loading: true,
  450. })
  451. this.setState({
  452. visibleA: true,
  453. })
  454. $.ajax({
  455. method: 'get',
  456. dataType: 'json',
  457. crossDomain: false,
  458. url: globalConfig.context + '/api/admin/orderProject/TaskLogList',
  459. data: {
  460. id: this.state.id,
  461. },
  462. success: function (data) {
  463. let theArr = []
  464. if (data.error.length || data.data.list == '') {
  465. if (data.error && data.error.length) {
  466. message.warning(data.error[0].message)
  467. }
  468. } else {
  469. for (let i = 0; i < data.data.length; i++) {
  470. let thisdata = data.data[i]
  471. theArr.push({
  472. key: i,
  473. id: thisdata.id, //日志ID
  474. content: thisdata.content, //流程
  475. taskId: thisdata.taskId, //任务ID
  476. aName: thisdata.aName, //负责人
  477. createTimes: thisdata.createTimes, //时间
  478. })
  479. }
  480. }
  481. this.setState({
  482. dataSourceA: theArr,
  483. })
  484. }.bind(this),
  485. }).always(
  486. function () {
  487. this.setState({
  488. loading: false,
  489. })
  490. }.bind(this)
  491. )
  492. }, //关闭操作工时
  493. visitCancelA() {
  494. this.setState({
  495. visibleA: false,
  496. })
  497. },
  498. waiDetail() {
  499. let url = window.location.href.substring(7)
  500. this.setState({
  501. loading: true,
  502. })
  503. $.ajax({
  504. method: 'get',
  505. dataType: 'json',
  506. crossDomain: false,
  507. url:
  508. globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceDtails',
  509. data: {
  510. tid: this.props.record.id,
  511. orderNo: this.props.record.orderNo,
  512. },
  513. }).done(
  514. function (data) {
  515. this.setState({
  516. loading: false,
  517. })
  518. if (!data.error.length && data.data) {
  519. if(!isNaN(parseFloat(data.data.unitNumber))){
  520. this.setState({
  521. oldInfor: {
  522. companyName:data.data.companyName,
  523. unitPrice:data.data.unitPrice,
  524. unitNumber:data.data.unitNumber,
  525. amount:data.data.amount,
  526. outsourceRemarks:data.data.outsourceRemarks,
  527. refundStatus: data.data.refundStatus,
  528. pictureUrl: data.data.pictureUrl
  529. ? splitUrl(
  530. data.data.pictureUrl,
  531. ',',
  532. globalConfig.avatarHost + '/upload',
  533. url
  534. )
  535. : [], //图片地址
  536. },
  537. })
  538. }else{
  539. this.setState({
  540. oldInfor: {},
  541. })
  542. }
  543. this.setState({
  544. containOfficialFees: data.data.actualOfficial,//官费类型 0实际已缴费 1实际未缴费
  545. startType: data.data.startType, //类型
  546. patentType: data.data.patentType, //专利类型
  547. patentNameType: data.data.patentNameType, //专利名称类型
  548. patentName: data.data.patentName, //专利名称
  549. outsourceRemarks: data.data.outsourceRemarks,
  550. remarks: data.data.remarks,
  551. companyName: data.data.companyName,
  552. amount: data.data.amount,
  553. mid: data.data.id,
  554. unitPrice: data.data.unitPrice,
  555. refundStatus: data.data.refundStatus,
  556. unitNumber: data.data.unitNumber,
  557. pictureUrl: data.data.pictureUrl
  558. ? splitUrl(
  559. data.data.pictureUrl,
  560. ',',
  561. globalConfig.avatarHost + '/upload',
  562. url
  563. )
  564. : [], //图片地址
  565. createTimes: data.data.createTimes,
  566. auditTimes: data.data.auditTimes,
  567. })
  568. } else if (data.error && data.error.length) {
  569. message.warning(data.error[0].message)
  570. } else if (!data.data) {
  571. this.setState({
  572. refundStatus: undefined,
  573. })
  574. }
  575. }.bind(this)
  576. )
  577. },
  578. //加载外包
  579. loadCompany() {
  580. this.setState({
  581. loading: true,
  582. })
  583. $.ajax({
  584. method: 'get',
  585. dataType: 'json',
  586. crossDomain: false,
  587. url: globalConfig.context + '/api/admin/outsourceOrg/selectOutsourceOrg',
  588. data: {
  589. tid: this.props.record.id,
  590. orderNo: this.props.record.orderNo,
  591. },
  592. success: function (data) {
  593. let theArr = []
  594. if (data.error.length || data.data.list == '') {
  595. if (data.error && data.error.length) {
  596. message.warning(data.error[0].message)
  597. }
  598. } else {
  599. for (let i = 0; i < data.data.length; i++) {
  600. let thisdata = data.data[i]
  601. let ProvinceCityArr = []
  602. let ProvinceS = thisdata.province //省
  603. let citys = thisdata.city //市
  604. let Areas = thisdata.area //区
  605. ProvinceCityArr.push(ProvinceS, citys, Areas)
  606. theArr.push({
  607. key: i,
  608. id: thisdata.id, //外包Id
  609. name: thisdata.name, //名称
  610. contacts: thisdata.contacts, //联系人
  611. contactsMobile: thisdata.contactsMobile, //联系人电话
  612. companyProvinceArr: ProvinceCityArr,
  613. address: thisdata.address,
  614. remarks: thisdata.remarks,
  615. })
  616. }
  617. }
  618. this.setState({
  619. companys: theArr,
  620. })
  621. }.bind(this),
  622. }).always(
  623. function () {
  624. this.setState({
  625. loading: false,
  626. })
  627. }.bind(this)
  628. )
  629. },
  630. tabChange(e) {
  631. this.setState({
  632. tabsKey:e
  633. })
  634. if (e == 2) {
  635. this.waiDetail();
  636. this.payNodeTable();
  637. this.thirdTable();
  638. this.getCsortData();
  639. } else if (e == 3) {
  640. this.loadCompany()
  641. }
  642. },
  643. //查看第三方信息表格
  644. thirdTable() {
  645. this.setState({
  646. thirdInfoLoading: true,
  647. })
  648. let ajaxObj = $.ajax({
  649. method: 'get',
  650. dataType: 'json',
  651. crossDomain: false,
  652. url: globalConfig.context + '/api/admin/company/selectCompany',
  653. data: {
  654. tid: this.props.record.id,
  655. },
  656. success: function (data) {
  657. if (data.error && data.error.length) {
  658. message.warning(data.error[0].message)
  659. } else {
  660. let companyNameArr = [];
  661. let theArr = [];
  662. let thisData = [];
  663. let arr = data.data || [];
  664. let allTotalAmount = 0;
  665. let type = 0;
  666. let startType = 0;
  667. let patentNameType = 0;
  668. for (let i = 0; i < arr.length; i++) {
  669. thisData = arr[i]
  670. allTotalAmount =
  671. (allTotalAmount * 10000 + thisData.totalAmount * 10000) / 10000
  672. companyNameArr.push(thisData.companyName);
  673. thisData.key = i;
  674. type=thisData.patentType;
  675. thisData.patentType = thisData.type;
  676. theArr.push(thisData);
  677. startType=thisData.startType;
  678. patentNameType= thisData.patentNameType
  679. }
  680. if (!allTotalAmount) {
  681. allTotalAmount = 0
  682. }
  683. for(let d=0;d<theArr.length;d++){
  684. theArr[d].companyName = theArr[d].companyName+ '-' + theArr[d].id;
  685. companyNameArr[d] = {
  686. companyName: theArr[d].companyName,
  687. id: theArr[d].id,
  688. }
  689. }
  690. if(type === 0 || type === 1){
  691. this.setState({
  692. patentType: type === 0 ? 0 : 1, //0专利申请 1专利买卖
  693. patentNameType: patentNameType, //0实用新型 1发明专利 2外观专利 3 其他
  694. })
  695. }
  696. //设置项目类型
  697. if(arr.length >0){
  698. this.setState({
  699. startType: startType
  700. })
  701. }
  702. this.setState({
  703. thirdInfoList: theArr,
  704. })
  705. }
  706. }.bind(this),
  707. }).always(
  708. function () {
  709. this.setState({
  710. thirdInfoLoading: false,
  711. })
  712. }.bind(this)
  713. )
  714. this.setState({
  715. selectCompanyAjaxObj:ajaxObj
  716. })
  717. },
  718. payNodeTable() {
  719. this.setState({
  720. payNodeLoading: true,
  721. })
  722. let ajaxObj = $.ajax({
  723. method: 'get',
  724. dataType: 'json',
  725. crossDomain: false,
  726. url: globalConfig.context + '/api/admin/company/selectPaymentNode',
  727. data: {
  728. tid: this.props.record.id,
  729. },
  730. success: function (data) {
  731. if (data.error && data.error.length) {
  732. message.warning(data.error[0].message)
  733. } else {
  734. let payNodeArr = []
  735. let thisData = []
  736. let arr = data.data || []
  737. //对#5283自定义的补充展示
  738. this.state.paySubject.push({ key: '自定义', value: '0' })
  739. for (let i = 0; i < arr.length; i++) {
  740. thisData = arr[i]
  741. //遍历paySubject,获取当前dunType对应的key
  742. this.state.paySubject.map((item) => {
  743. if (item.value == thisData.dunType) {
  744. thisData.dunType = item.key
  745. }
  746. })
  747. payNodeArr.push({
  748. key: i,
  749. id: thisData.id, //付款节点Id
  750. nodeId: thisData.id, //付款节点Id
  751. tid: thisData.tid,
  752. companyName: thisData.companyName, //供应商名称
  753. projectType: thisData.projectType, //项目分类
  754. dunType: thisData.dunType, //催款分类
  755. unitPrice: thisData.unitPrice, //单价
  756. quantity: thisData.quantity, //数量
  757. totalAmount: thisData.totalAmount, //总价
  758. partyAmount: thisData.partyAmount, //付款
  759. partyTimes: thisData.partyTimes, //付款时间
  760. cid: thisData.cid, //机构id
  761. status: thisData.status, //催款状态 0-未支付 1-待全款 ,2已全款 status=2的时候已经全款,申请付款按钮可以去掉了
  762. })
  763. }
  764. for(let d=0;d<payNodeArr.length;d++){
  765. payNodeArr[d].companyName = payNodeArr[d].companyName+ '-' + payNodeArr[d].cid;
  766. }
  767. this.setState({
  768. payNodeList: payNodeArr,
  769. })
  770. }
  771. }.bind(this),
  772. }).always(
  773. function () {
  774. this.setState({
  775. payNodeLoading: false,
  776. })
  777. }.bind(this)
  778. )
  779. this.setState({
  780. selectPaymentNodeAjaxObj: ajaxObj
  781. })
  782. },
  783. render() {
  784. const formItemLayout = {
  785. labelCol: { span: 8 },
  786. wrapperCol: { span: 14 },
  787. }
  788. const utils = {
  789. getSatisfaction: function (num) {
  790. switch (num) {
  791. case 0:
  792. return '未收回'
  793. case 1:
  794. return '已收回'
  795. default:
  796. return '其它'
  797. }
  798. },
  799. getChargeback: function (num) {
  800. switch (num) {
  801. case 0:
  802. return '已完成'
  803. case 1:
  804. return '未完成'
  805. default:
  806. return '其它'
  807. }
  808. },
  809. }
  810. return (
  811. this.props.visible ? <Modal
  812. className="customeDetails"
  813. footer=""
  814. title=""
  815. width="900px"
  816. visible={this.props.visible}
  817. // onOk={this.visitOk}
  818. onCancel={(e) => {
  819. this.setState({
  820. tabsKey: "1"
  821. })
  822. this.props.cancel()
  823. }}
  824. >
  825. {this.state.resVisible ? (
  826. <ResolutionDetail
  827. cancel={this.resCancel}
  828. detail={this.state.resRecord}
  829. visible={this.state.resVisible}
  830. id={this.state.resRecord.orderNo}
  831. />
  832. ) : (
  833. ''
  834. )}
  835. <Tabs defaultActiveKey="1" activeKey={this.state.tabsKey} onChange={this.tabChange}>
  836. <TabPane tab="项目概况" key="1">
  837. {this.state.tabsKey === "1" ? <Form
  838. layout="horizontal"
  839. onSubmit={this.handleSubmit}
  840. id="demand-form"
  841. style={{ paddingBottom: '0px' }}
  842. >
  843. <Spin spinning={this.state.loading}>
  844. <div className="clearfix">
  845. <div className="clearfix">
  846. <FormItem
  847. className="half-item"
  848. {...formItemLayout}
  849. label="项目状态"
  850. >
  851. {/* <span>{getProcessStatus(this.state.projectStatus)}</span> */}
  852. <span>{getProjectName(this.state.projectStatus)}</span>
  853. <Button
  854. type="primary"
  855. size="small"
  856. style={{ marginTop: '5px', position: 'absolute' }}
  857. onClick={this.caozuorizhi}
  858. >
  859. 操作日志
  860. </Button>
  861. </FormItem>
  862. <FormItem
  863. className="half-item"
  864. {...formItemLayout}
  865. label="合同编号"
  866. >
  867. <span>{this.state.contractNo}</span>
  868. </FormItem>
  869. </div>
  870. <div className="clearfix">
  871. <FormItem
  872. className="half-item"
  873. {...formItemLayout}
  874. label="是否特批"
  875. >
  876. <span>{getApproval(this.state.approval)}</span>
  877. </FormItem>
  878. <FormItem
  879. className="half-item"
  880. {...formItemLayout}
  881. label="结算状态"
  882. >
  883. <span>
  884. {getLiquidationStatus(this.state.liquidationStatus)}
  885. </span>
  886. </FormItem>
  887. <FormItem
  888. className="half-item"
  889. {...formItemLayout}
  890. label="流程状态"
  891. >
  892. <span>{getProcessStatus(this.state.processStatus)}</span>
  893. </FormItem>
  894. <FormItem
  895. className="half-item"
  896. {...formItemLayout}
  897. label="订单编号"
  898. >
  899. <span>{this.state.orderNo}</span>
  900. </FormItem>
  901. <FormItem
  902. className="half-item"
  903. {...formItemLayout}
  904. label="是否外包"
  905. >
  906. <span>{this.state.outsource == 0 ? '否' : '是'}</span>
  907. </FormItem>
  908. </div>
  909. <div className="clearfix">
  910. <FormItem
  911. className="half-item"
  912. {...formItemLayout}
  913. label="满意度表格"
  914. >
  915. <span>
  916. {utils.getSatisfaction(this.state.formRetrieve)}
  917. </span>
  918. </FormItem>
  919. {/*<FormItem*/}
  920. {/* className="half-item"*/}
  921. {/* {...formItemLayout}*/}
  922. {/* label="退单"*/}
  923. {/*>*/}
  924. {/* <span>{utils.getChargeback(this.state.taskRefund)}</span>*/}
  925. {/*</FormItem>*/}
  926. </div>
  927. <div className="clearfix">
  928. {
  929. <FormItem
  930. className="half-item"
  931. {...formItemLayout}
  932. label="(满意度)备注"
  933. >
  934. <span>{this.state.retrieveContent}</span>
  935. </FormItem>
  936. }
  937. {
  938. // <FormItem
  939. // className="half-item"
  940. // {...formItemLayout}
  941. // label="(退单)备注"
  942. // >
  943. // <span>{this.state.refundContent}</span>
  944. // </FormItem>
  945. }
  946. </div>
  947. <div className="clearfix">
  948. <h3 className="sub-title">任务信息</h3>
  949. <FormItem
  950. className="half-item"
  951. {...formItemLayout}
  952. label="任务编号"
  953. >
  954. <span>{this.state.id}</span>
  955. </FormItem>
  956. <FormItem
  957. className="half-item"
  958. {...formItemLayout}
  959. label="任务名称"
  960. >
  961. <span>{this.state.taskName}</span>
  962. </FormItem>
  963. <FormItem
  964. className="half-item"
  965. {...formItemLayout}
  966. label="任务状态"
  967. >
  968. <span>{getTaskStatus(this.state.taskStatus)}</span>
  969. </FormItem>
  970. <FormItem
  971. className="half-item"
  972. {...formItemLayout}
  973. label="任务类别"
  974. >
  975. <span>{this.state.cname}</span>
  976. </FormItem>
  977. <FormItem
  978. className="half-item"
  979. {...formItemLayout}
  980. label="证书编号"
  981. >
  982. <span>{this.state.certificateNumber}</span>
  983. </FormItem>
  984. </div>
  985. {/*{this.state.outsource === 1 ? (*/}
  986. {/* <div className="clearfix">*/}
  987. {/* <h3 className="sub-title">外包信息</h3>*/}
  988. {/* <FormItem*/}
  989. {/* className="half-item"*/}
  990. {/* {...formItemLayout}*/}
  991. {/* label="外包公司"*/}
  992. {/* >*/}
  993. {/* <span>{this.state.outsourceName}</span>*/}
  994. {/* </FormItem>*/}
  995. {/* <FormItem*/}
  996. {/* className="half-item"*/}
  997. {/* {...formItemLayout}*/}
  998. {/* label="外包成本(万元)"*/}
  999. {/* >*/}
  1000. {/* <span>{this.state.outsourcePrice}</span>*/}
  1001. {/* </FormItem>*/}
  1002. {/* </div>*/}
  1003. {/*) : (*/}
  1004. {/* ''*/}
  1005. {/*)}*/}
  1006. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  1007. <div className="clearfix">
  1008. <h3 className="sub-title">联系信息</h3>
  1009. <FormItem
  1010. className="half-item"
  1011. {...formItemLayout}
  1012. label="客户名称"
  1013. >
  1014. <span>{this.state.userName}</span>
  1015. </FormItem>
  1016. <FormItem
  1017. className="half-item"
  1018. {...formItemLayout}
  1019. label="企业法人"
  1020. >
  1021. <span>{this.state.legalPerson}</span>
  1022. </FormItem>
  1023. <FormItem
  1024. className="half-item"
  1025. {...formItemLayout}
  1026. label="法人电话"
  1027. >
  1028. <span>{this.state.legalPersonTel}</span>
  1029. </FormItem>
  1030. <FormItem
  1031. className="half-item"
  1032. {...formItemLayout}
  1033. label="客户联系人"
  1034. >
  1035. <span>{this.state.contacts}</span>
  1036. </FormItem>
  1037. <FormItem
  1038. className="half-item"
  1039. {...formItemLayout}
  1040. label="联系人电话"
  1041. >
  1042. <span>{this.state.contactMobile}</span>
  1043. </FormItem>
  1044. <FormItem
  1045. className="half-item"
  1046. {...formItemLayout}
  1047. label="企业地址"
  1048. >
  1049. <span>
  1050. {getprovince(this.state.locationProvince)}/
  1051. {getprovince(this.state.locationCity)}/
  1052. {getprovince(this.state.locationArea)}
  1053. </span>
  1054. </FormItem>
  1055. <FormItem
  1056. className="half-item"
  1057. {...formItemLayout}
  1058. label=""
  1059. />
  1060. <FormItem className="half-item" {...formItemLayout}>
  1061. <span style={{ paddingLeft: '12em' }}>
  1062. {this.state.postalAddress}
  1063. </span>
  1064. </FormItem>
  1065. </div>
  1066. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  1067. <div className="clearfix">
  1068. <h3 className="sub-title">订单负责人信息</h3>
  1069. <FormItem
  1070. className="half-item"
  1071. {...formItemLayout}
  1072. label="负责人"
  1073. >
  1074. <span>
  1075. {this.state.salesmanName +
  1076. '(' +
  1077. this.state.depName +
  1078. ')'}
  1079. </span>
  1080. </FormItem>
  1081. <FormItem
  1082. className="half-item"
  1083. {...formItemLayout}
  1084. label="负责人电话"
  1085. >
  1086. <span>{this.state.salesmanMobile}</span>
  1087. </FormItem>
  1088. <FormItem
  1089. className="half-item"
  1090. {...formItemLayout}
  1091. label="当前财务负责人"
  1092. >
  1093. <span>{this.state.nowFinance}</span>
  1094. </FormItem>
  1095. <FormItem
  1096. className="half-item"
  1097. {...formItemLayout}
  1098. label="当前财务负责人电话"
  1099. >
  1100. <span>{this.state.nowFinanceMobile}</span>
  1101. </FormItem>
  1102. <FormItem
  1103. className="half-item"
  1104. {...formItemLayout}
  1105. style={{ opacity: '.5' }}
  1106. label="原负责人"
  1107. >
  1108. <span>{this.state.oldSalesmanName}</span>
  1109. </FormItem>
  1110. <FormItem
  1111. className="half-item"
  1112. {...formItemLayout}
  1113. style={{ opacity: '.5' }}
  1114. label="原负责人电话"
  1115. >
  1116. <span>{this.state.oldSalesmanMobile}</span>
  1117. </FormItem>
  1118. <FormItem
  1119. className="half-item"
  1120. {...formItemLayout}
  1121. style={{ opacity: '.5' }}
  1122. label="实际财务操作人"
  1123. >
  1124. <span>{this.state.financeName}</span>
  1125. </FormItem>
  1126. <FormItem
  1127. className="half-item"
  1128. {...formItemLayout}
  1129. style={{ opacity: '.5' }}
  1130. label="实际财务操作人电话"
  1131. >
  1132. <span>{this.state.financeMobile}</span>
  1133. </FormItem>
  1134. </div>
  1135. <div className="clearfix">
  1136. <h3 className="sub-title">申报系统账户信息</h3>
  1137. {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}
  1138. <FormItem
  1139. className="half-item"
  1140. {...formItemLayout}
  1141. label="用户名"
  1142. >
  1143. <span>{this.state.declareUser ? '****' : ''}</span>
  1144. </FormItem>
  1145. <FormItem
  1146. className="half-item"
  1147. {...formItemLayout}
  1148. label="密码"
  1149. >
  1150. <span>{this.state.declarePwd ? '****' : ''}</span>
  1151. </FormItem>
  1152. </div>
  1153. <div className="clearfix">
  1154. <h3 className="sub-title">项目申报进度</h3>
  1155. <FormItem
  1156. className="half-item"
  1157. {...formItemLayout}
  1158. label="申报批次"
  1159. >
  1160. <span>{this.state.declarationBatch}</span>
  1161. </FormItem>
  1162. <FormItem
  1163. className="half-item"
  1164. {...formItemLayout}
  1165. label="启动时间"
  1166. >
  1167. <span>{this.state.startDate}</span>
  1168. </FormItem>
  1169. <FormItem
  1170. className="half-item"
  1171. {...formItemLayout}
  1172. label="完成时间"
  1173. >
  1174. <span>{this.state.endDate}</span>
  1175. </FormItem>
  1176. <FormItem
  1177. className="half-item"
  1178. {...formItemLayout}
  1179. label="受理时间"
  1180. >
  1181. <span>{this.state.acceptDate}</span>
  1182. </FormItem>
  1183. <FormItem
  1184. className="half-item"
  1185. {...formItemLayout}
  1186. label="评审时间"
  1187. >
  1188. <span>{this.state.reviewDate}</span>
  1189. </FormItem>
  1190. <FormItem
  1191. className="half-item"
  1192. {...formItemLayout}
  1193. label="公示时间"
  1194. >
  1195. <span>{this.state.publicityDate}</span>
  1196. </FormItem>
  1197. <FormItem
  1198. className="half-item"
  1199. {...formItemLayout}
  1200. label="发证时间"
  1201. >
  1202. <span>{this.state.licenceDate}</span>
  1203. </FormItem>
  1204. <FormItem
  1205. className="half-item"
  1206. {...formItemLayout}
  1207. label="立项金额(万元)"
  1208. >
  1209. <span>{this.state.setUpAmount}</span>
  1210. </FormItem>
  1211. <FormItem
  1212. className="half-item"
  1213. {...formItemLayout}
  1214. label="是否到款"
  1215. >
  1216. <span>
  1217. {this.state.arrivalMoney ? '已到企业' : '未到企业'}
  1218. </span>
  1219. </FormItem>
  1220. </div>
  1221. <div className="clearfix">
  1222. <FormItem
  1223. labelCol={{ span: 3 }}
  1224. wrapperCol={{ span: 18 }}
  1225. label="附件"
  1226. >
  1227. {/*<Upload*/}
  1228. {/* className="demandDetailShow-upload"*/}
  1229. {/* listType="picture-card"*/}
  1230. {/* fileList={this.state.attachmentUrl}*/}
  1231. {/* onPreview={(file) => {*/}
  1232. {/* this.setState({*/}
  1233. {/* previewImage: file.url || file.thumbUrl,*/}
  1234. {/* previewVisible: true,*/}
  1235. {/* })*/}
  1236. {/* }}*/}
  1237. {/*/>*/}
  1238. {this.state.attachmentUrl && this.props.visible && this.state.tabsKey === "1" ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1239. <ImgList fileList={this.state.attachmentUrl} ItemWidth={'96px'}/>
  1240. </div> : <div/>}
  1241. <Modal
  1242. maskClosable={false}
  1243. footer={null}
  1244. visible={this.state.previewVisible}
  1245. onCancel={() => {
  1246. this.setState({ previewVisible: false })
  1247. }}
  1248. >
  1249. <img
  1250. alt=""
  1251. style={{ width: '100%' }}
  1252. src={this.state.previewImage || ''}
  1253. />
  1254. </Modal>
  1255. </FormItem>
  1256. </div>
  1257. <div className="clearfix">
  1258. <FormItem
  1259. labelCol={{ span: 3 }}
  1260. wrapperCol={{ span: 16 }}
  1261. label="备注"
  1262. >
  1263. <span>{this.state.taskComment}</span>
  1264. </FormItem>
  1265. </div>
  1266. <div>
  1267. <h3 className="sub-title">项目业务</h3>
  1268. {/* {this.state.processStatus == 0 ? (
  1269. <Button
  1270. type="primary"
  1271. onClick={this.addDetailed}
  1272. style={{
  1273. float: "right",
  1274. marginRight: "50px",
  1275. marginBottom: "15px"
  1276. }}
  1277. >
  1278. 添加项目明细
  1279. </Button>
  1280. ) : (
  1281. ""
  1282. )} */}
  1283. </div>
  1284. <div className="patent-table">
  1285. <Spin spinning={this.state.loading}>
  1286. <Table
  1287. columns={this.state.columnsX}
  1288. dataSource={this.state.dataSourceX}
  1289. pagination={this.state.paginations}
  1290. onRowClick={this.tableRowClickX}
  1291. style={{
  1292. cursor: 'pointer',
  1293. }}
  1294. bordered
  1295. size="small"
  1296. />
  1297. </Spin>
  1298. </div>
  1299. </div>
  1300. </Spin>
  1301. </Form> : <div/>}
  1302. </TabPane>
  1303. <TabPane tab="外包/供应商信息" key="2">
  1304. {this.state.tabsKey === "2" ? <Spin spinning={this.state.loading}>
  1305. <div>
  1306. {
  1307. this.props.visible && this.state.tabsKey === '2' ?
  1308. <CheckProject
  1309. {...this.props}
  1310. tid={this.props.record.id}
  1311. orderTaskOfficialCost={this.state.orderTaskOfficialCost} //是否含官费 0无1有
  1312. containOfficialFees={this.state.containOfficialFees} //0:实际已缴费 1:实际未缴费
  1313. oldInfor={this.state.oldInfor}
  1314. projectType={this.state.projectType} //0正常 1专利 2软著 3审计
  1315. patentNameType={this.state.patentNameType}
  1316. isAuditPayment={this.props.isAuditPayment} //是否为财务
  1317. isAuditPaymentGLY={this.props.isAuditPaymentGLY} //是否为财务经理或者为财务管理员
  1318. patentName={this.state.patentName}
  1319. patentType={this.state.patentType}
  1320. status={this.state.refundStatus}
  1321. mid={this.state.mid}
  1322. thirdInfoList={this.state.thirdInfoList}
  1323. dataSource={this.state.payNodeList}
  1324. outsourceRemarks={this.state.outsourceRemarks}
  1325. fileList={this.state.pictureUrl}
  1326. startType={this.state.startType}
  1327. projectStatus={this.state.projectStatus}
  1328. onRefresh={()=>{
  1329. this.waiDetail();
  1330. this.thirdTable();
  1331. this.payNodeTable()
  1332. }}
  1333. /> : <div/>
  1334. }
  1335. </div>
  1336. <div className="clearfix">
  1337. <hr className="division" />
  1338. <div
  1339. className="clearfix"
  1340. style={{
  1341. display: this.state.refundStatus == 0 ? 'none' : 'block',
  1342. }}
  1343. >
  1344. <FormItem
  1345. className="half-item"
  1346. {...formItemLayout}
  1347. label="审核意见"
  1348. >
  1349. <span>{this.state.remarks}</span>
  1350. </FormItem>
  1351. </div>
  1352. {!(this.state.oldInfor && Object.keys(this.state.oldInfor).length > 0) ? <div className="clearfix">
  1353. <FormItem
  1354. className="half-item"
  1355. {...formItemLayout}
  1356. label="审核结果"
  1357. >
  1358. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1359. </FormItem>
  1360. </div> : <div/>}
  1361. <div
  1362. className="clearfix"
  1363. style={{
  1364. display: this.state.refundStatus == 0 ? 'none' : 'block',
  1365. }}
  1366. >
  1367. <FormItem
  1368. className="half-item"
  1369. {...formItemLayout}
  1370. label="审核时间"
  1371. >
  1372. <span>{this.state.auditTimes}</span>
  1373. </FormItem>
  1374. </div>
  1375. </div>
  1376. </Spin> : <div/>}
  1377. </TabPane>
  1378. {/*{this.props.record && this.props.record.outsource == 1 ? (*/}
  1379. {/* <TabPane tab="外包公司信息" key="3">*/}
  1380. {/* <div className="patent-table" style={{ marginTop: '10px' }}>*/}
  1381. {/* <Spin spinning={this.state.loading}>*/}
  1382. {/* <Table*/}
  1383. {/* columns={this.state.companyColumns}*/}
  1384. {/* dataSource={this.state.companys}*/}
  1385. {/* scroll={{ x: 300, y: 0 }}*/}
  1386. {/* bordered*/}
  1387. {/* size="small"*/}
  1388. {/* expandedRowRender={(record) => {*/}
  1389. {/* return <p>{record.remarks}</p>*/}
  1390. {/* }}*/}
  1391. {/* pagination={false}*/}
  1392. {/* />*/}
  1393. {/* </Spin>*/}
  1394. {/* </div>*/}
  1395. {/* </TabPane>*/}
  1396. {/*) : (*/}
  1397. {/* ''*/}
  1398. {/*)}*/}
  1399. </Tabs>
  1400. <Modal
  1401. width="800px"
  1402. visible={this.state.visibleA}
  1403. onCancel={this.visitCancelA}
  1404. title="操作日志"
  1405. footer=""
  1406. className="admin-desc-content"
  1407. >
  1408. <div className="patent-table patent-table-center">
  1409. <Spin spinning={this.state.loading}>
  1410. <Table
  1411. columns={this.state.columnsA}
  1412. dataSource={this.state.dataSourceA}
  1413. pagination={false}
  1414. bordered
  1415. size="small"
  1416. />
  1417. </Spin>
  1418. </div>
  1419. </Modal>
  1420. </Modal> : <div/>
  1421. )
  1422. },
  1423. })
  1424. export default project