project.jsx 48 KB

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