checkOutsourcing.jsx 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107
  1. import React from 'react'
  2. import {
  3. Button,
  4. Input,
  5. Select,
  6. Spin,
  7. Table,
  8. message,
  9. DatePicker,
  10. Tooltip,
  11. Form,
  12. Modal,
  13. Tabs,
  14. Col,
  15. Tag,
  16. } from 'antd'
  17. import $ from 'jquery/src/ajax'
  18. import moment from 'moment'
  19. import {
  20. getLiquidationStatus,
  21. getApprovedState,
  22. getProcessStatus,
  23. splitUrl,
  24. getjiedian,
  25. getboutique,
  26. getCuikuan,
  27. getProjectStatus,
  28. getRefundStatus,
  29. } from '@/tools.js'
  30. import './customer.less'
  31. import ResolutionDetail from '@/resolutionDetail'
  32. import ImgList from "../../../common/imgList";
  33. import { ChooseList } from "./chooseList";
  34. import { getProjectName } from "../../../tools";
  35. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  36. import NewEditProject from "../../../common/projectOperation/newEditProject";
  37. import OrderItemStatus from "../../../common/orderItemStatus";
  38. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  39. import OrderCoor from './changeComponent/orderCoor'
  40. import ContentUrl from './contentUrl'
  41. const checkOutsourcing = Form.create()(
  42. React.createClass({
  43. loadData(pageNo) {
  44. this.setState({
  45. visitModul: false,
  46. loading: true,
  47. ispage: pageNo,
  48. modalVisible: false,
  49. })
  50. $.ajax({
  51. method: 'get',
  52. dataType: 'json',
  53. crossDomain: false,
  54. url:
  55. globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceList',
  56. data: {
  57. pageNo: pageNo || 1,
  58. pageSize: this.state.pagination.pageSize,
  59. contractNo: this.state.contractNoSearch,
  60. name: this.state.nameSearch, //名称
  61. starTime: this.state.releaseDate[0], //开始时间
  62. endTime: this.state.releaseDate[1], //结束时间
  63. refundStatus: this.state.refundStatusSearch, //外包审核状态
  64. type: 0,
  65. },
  66. success: function (data) {
  67. let theArr = []
  68. if (data.error.length || data.data.list == '') {
  69. if (data.error && data.error.length) {
  70. message.warning(data.error[0].message)
  71. }
  72. } else {
  73. for (let i = 0; i < data.data.list.length; i++) {
  74. let thisdata = data.data.list[i];
  75. thisdata.key = i;
  76. theArr.push(thisdata);
  77. }
  78. this.state.pagination.total = data.data.totalCount
  79. this.state.pagination.current = data.data.pageNo
  80. }
  81. if (data.data && data.data.list && !data.data.list.length) {
  82. this.state.pagination.total = 0
  83. }
  84. this.setState({
  85. dataSource: theArr,
  86. pageNo: pageNo,
  87. pagination: this.state.pagination,
  88. selectedRowKeys: [],
  89. })
  90. }.bind(this),
  91. }).always(
  92. function () {
  93. this.setState({
  94. loading: false,
  95. })
  96. }.bind(this)
  97. )
  98. },
  99. getInitialState() {
  100. return {
  101. rotateDeg: 0,
  102. orderNos: '',
  103. page: 1,
  104. releaseDate: [],
  105. declarationBatch: 1,
  106. dataInfor: {},
  107. selectedRowKeys: [],
  108. pictureUrl: [],
  109. attachmentUrl: [],
  110. paginations: false,
  111. activeKey: '1',
  112. confirmLoading: false,
  113. aloading: false,
  114. pagination: {
  115. defaultCurrent: 1,
  116. defaultPageSize: 10,
  117. showQuickJumper: true,
  118. pageSize: 10,
  119. onChange: function (page) {
  120. this.loadData(page)
  121. }.bind(this),
  122. showTotal: function (total) {
  123. return '共' + total + '条数据'
  124. },
  125. },
  126. columns: [
  127. {
  128. title: '订单编号',
  129. dataIndex: 'orderNo',
  130. key: 'orderNo',
  131. },
  132. {
  133. title: '合同编号',
  134. dataIndex: 'contractNo',
  135. key: 'contractNo',
  136. },
  137. {
  138. title: '创建时间',
  139. dataIndex: 'createTime',
  140. key: 'createTime',
  141. },
  142. {
  143. title: '签单时间',
  144. dataIndex: 'signTime',
  145. key: 'signTime',
  146. },
  147. {
  148. title: '客户名称',
  149. dataIndex: 'userName',
  150. key: 'userName',
  151. render: text => {
  152. return (
  153. <Tooltip title={text}>
  154. <div style={{
  155. // maxWidth: '150px',
  156. // overflow: 'hidden',
  157. // textOverflow: "ellipsis",
  158. // whiteSpace: 'nowrap',
  159. }}>{text}</div>
  160. </Tooltip>
  161. )
  162. }
  163. },
  164. {
  165. title: '订单部门',
  166. dataIndex: 'depName',
  167. key: 'depName',
  168. },
  169. {
  170. title: '签单金额(万元)',
  171. dataIndex: 'totalAmount',
  172. key: 'totalAmount',
  173. },
  174. {
  175. title: '结算状态',
  176. dataIndex: 'liquidationStatus',
  177. key: 'liquidationStatus',
  178. render: (text) => {
  179. return getLiquidationStatus(text)
  180. },
  181. },
  182. {
  183. title: '外包审核',
  184. dataIndex: 'refundStatus',
  185. key: 'refundStatus',
  186. render: (text) => {
  187. if (text == 0) {
  188. return <Tag color="#f50">待审核</Tag>
  189. } else if (text == 1) {
  190. return <Tag color="#87d068">审核通过</Tag>
  191. } else if (text == 2) {
  192. return <Tag color="#2db7f5">审核驳回</Tag>
  193. }
  194. },
  195. },
  196. {
  197. title: '营销负责人',
  198. dataIndex: 'adminName',
  199. key: 'adminName',
  200. },
  201. {
  202. title: '财务负责人',
  203. dataIndex: 'financeName',
  204. key: 'financeName',
  205. },
  206. ],
  207. data: [],
  208. dataSource: [],
  209. columnsX: [
  210. {
  211. title: '业务项目名称',
  212. dataIndex: 'commodityName',
  213. key: 'commodityName',
  214. render: (text, record) => {
  215. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  216. }
  217. },
  218. {
  219. title: '项目类别',
  220. dataIndex: 'cname',
  221. key: 'cname',
  222. },
  223. {
  224. title: '项目数量',
  225. dataIndex: 'commodityQuantity',
  226. key: 'commodityQuantity',
  227. render: (text, record) => {
  228. if (record.splitStatus == 1) {
  229. return (
  230. <span>
  231. {text}{' '}
  232. <Tag
  233. color="#108ee9"
  234. onClick={(e) => {
  235. e.stopPropagation()
  236. this.showRes(record)
  237. }}
  238. >
  239. 已拆
  240. </Tag>
  241. </span>
  242. )
  243. } else {
  244. return text
  245. }
  246. },
  247. },
  248. {
  249. title: '金额(万元)',
  250. dataIndex: 'commodityPrice',
  251. key: 'commodityPrice',
  252. },
  253. {
  254. title: '负责人',
  255. dataIndex: 'contacts',
  256. key: 'contacts',
  257. },
  258. {
  259. title: '负责人电话',
  260. dataIndex: 'contactsMobile',
  261. key: 'contactsMobile',
  262. },
  263. {
  264. title: '项目状态',
  265. dataIndex: 'projectStatus',
  266. key: 'projectStatus',
  267. render: (text) => {
  268. return getProjectName(text)
  269. },
  270. },
  271. {
  272. title: '主要项目',
  273. dataIndex: 'main',
  274. key: 'main',
  275. render: (text) => {
  276. return text ? '是' : '否'
  277. },
  278. },
  279. {
  280. title: "总年限",
  281. dataIndex: "yearSum",
  282. key: "yearSum",
  283. render: (text, record) => {
  284. return (
  285. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  286. );
  287. }
  288. },
  289. {
  290. title: "年限",
  291. dataIndex: "serviceLife",
  292. key: "serviceLife",
  293. render: (text, record) => {
  294. return (
  295. <div>{!!text && JSON.parse(text).toString()}</div>
  296. );
  297. }
  298. },
  299. {
  300. title: "本次派单",
  301. dataIndex: "serviceYear",
  302. key: "serviceYear",
  303. render: (text, record) => {
  304. return (
  305. <div>{!text ? "" : text}</div>
  306. );
  307. }
  308. },
  309. {
  310. title: '项目说明',
  311. dataIndex: 'taskComment',
  312. key: 'taskComment',
  313. render: (text) => {
  314. return (
  315. <Tooltip title={text}>
  316. <div
  317. style={{
  318. width: 100,
  319. overflow: "hidden",
  320. whiteSpace: "nowrap",
  321. textOverflow: "ellipsis",
  322. }}
  323. >{text}</div>
  324. </Tooltip>
  325. )
  326. },
  327. },
  328. ],
  329. columnsrizhi: [
  330. {
  331. title: '流程',
  332. dataIndex: 'processName',
  333. key: 'processName',
  334. },
  335. {
  336. title: '操作人',
  337. dataIndex: 'adminName',
  338. key: 'adminName',
  339. },
  340. {
  341. title: '时间',
  342. dataIndex: 'createDate',
  343. key: 'createDate',
  344. },
  345. {
  346. title: '备注',
  347. dataIndex: 'remarks',
  348. key: 'remarks',
  349. },
  350. ],
  351. dataSourceX: [],
  352. ContactsListsNew: [
  353. {
  354. title: '项目名称',
  355. dataIndex: 'commodityName',
  356. key: 'commodityName',
  357. render: (text, record) => {
  358. return <span>{text + '-' + record.tid}</span>
  359. },
  360. },
  361. {
  362. title: '项目分类',
  363. dataIndex: 'projectType',
  364. key: 'projectType',
  365. render: (text) => {
  366. let arr = this.state.dataSourceX || []
  367. let str = ''
  368. for (let i = 0; i < arr.length; i++) {
  369. if (this.state.dataSourceX[i].sort == text) {
  370. str = this.state.dataSourceX[i].cname
  371. return <span>{str}</span>
  372. }
  373. }
  374. },
  375. },
  376. {
  377. title: '催款科目',
  378. dataIndex: 'dunTypeName',
  379. key: 'dunTypeName',
  380. render: (text, record) => {
  381. if (record.customizeName) {
  382. return text + record.customizeName
  383. }
  384. return <span>{text}</span>
  385. },
  386. },
  387. {
  388. title: '时间(天)',
  389. dataIndex: 'waitDay',
  390. key: 'waitDay',
  391. render: (text, record) => {
  392. if (record.dunTypeName) {
  393. if (record.customizeTimes) {
  394. return record.customizeTimes
  395. }
  396. return <span>{text}</span>
  397. }
  398. },
  399. },
  400. {
  401. title: '金额(万元)',
  402. dataIndex: 'money',
  403. key: 'money',
  404. render: (text, record) => {
  405. if (record.dunTypeName) {
  406. if (record.appropriationRatio) {
  407. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  408. percent += "%";
  409. return <span>{percent}(拨款比例)</span>;
  410. } else {
  411. return <span>{text}</span>;
  412. }
  413. }
  414. },
  415. },
  416. {
  417. title: '服务年限',
  418. dataIndex: 'startDate',
  419. key: 'startDate',
  420. render: (text, record) => {
  421. if (record.dunTypeName) {
  422. return <span>{text}</span>
  423. }
  424. },
  425. },
  426. {
  427. title: '催款状态',
  428. dataIndex: 'status',
  429. key: 'status',
  430. render: (text) => {
  431. return <span>{text == 1 ? '已启动' : '未启动'}</span>
  432. },
  433. },
  434. ],
  435. ContactsLists: [
  436. {
  437. title: '催款科目',
  438. dataIndex: 'dunSubject',
  439. key: 'dunSubject',
  440. render: (text) => {
  441. return getjiedian(text)
  442. },
  443. },
  444. {
  445. title: '金额(万元)',
  446. dataIndex: 'money',
  447. key: 'money',
  448. },
  449. {
  450. title: '催款状态',
  451. dataIndex: 'dunStatus',
  452. key: 'dunStatus',
  453. render: (text) => {
  454. return getCuikuan(text)
  455. },
  456. },
  457. ],
  458. resVisible: false,
  459. }
  460. },
  461. //页面加载函数
  462. componentWillMount() {
  463. this.loadData()
  464. },
  465. //整行点击
  466. tableRowClick(record) {
  467. this.setState({
  468. visible: true,
  469. refundStatus: record.refundStatus,
  470. orderNos: record.orderNo
  471. })
  472. this.xiangqing(record.orderNo)
  473. this.xiangmu(record.orderNo)
  474. this.jiedian(record.orderNo)
  475. this.jiedianNew(record.orderNo)
  476. },
  477. // 拆分详细
  478. showRes(record) {
  479. this.setState({
  480. resVisible: true,
  481. resRecord: record,
  482. })
  483. },
  484. resCancel() {
  485. this.setState({
  486. resVisible: false,
  487. })
  488. },
  489. //点击打卡项目详情
  490. tableRowClickX(record) {
  491. this.setState({
  492. jid: record.id, //项目ID
  493. kid: record.commodityId, //商品ID
  494. commodityName: record.commodityName, //金额
  495. commodityPrice: record.commodityPrice, //金额
  496. commodityQuantity: record.commodityQuantity, //数量
  497. taskComment: record.taskComment, //备注
  498. main: record.main.toString(), //是否为主要
  499. addnextVisible: true,
  500. dataInfor: record,
  501. addState: 0,
  502. })
  503. },
  504. //项目详情关闭
  505. nextCancel() {
  506. this.setState({
  507. addnextVisible: false,
  508. })
  509. },
  510. //订单详情
  511. xiangqing(orderNos) {
  512. $.ajax({
  513. method: 'get',
  514. dataType: 'json',
  515. crossDomain: false,
  516. url: globalConfig.context + '/api/admin/newOrder/getOrderNewDetail',
  517. data: {
  518. orderNo: orderNos,
  519. },
  520. success: function (data) {
  521. if (data.error.length || data.data.list == '') {
  522. if (data.error && data.error.length) {
  523. message.warning(data.error[0].message)
  524. }
  525. } else {
  526. let thisdata = data.data
  527. this.setState({
  528. orderUid: thisdata.uid,
  529. orderNo: thisdata.orderNo, //订单编号
  530. contractNo: thisdata.contractNo, //合同编号
  531. userName: thisdata.userName, //客户名称
  532. signDate: thisdata.signDate, //签单时间
  533. examineName: thisdata.examineName,
  534. processStatus: thisdata.processStatus, //流程状态
  535. liquidationStatus: thisdata.liquidationStatus, //结算状态
  536. contacts: thisdata.contacts, //企业联系人
  537. contactMobile: thisdata.contactMobile, //联系人电话
  538. legalPerson: thisdata.legalPerson, //法人
  539. legalPersonTel: thisdata.legalPersonTel, //法人电话
  540. firstAmount: thisdata.firstAmount, //签单金额
  541. totalAmount: thisdata.totalAmount, //首付金额
  542. approval: thisdata.approval, //特批状态
  543. settlementAmount: thisdata.settlementAmount, //已收款项
  544. orderRemarks: thisdata.orderRemarks, //订单留言
  545. orgCodeUrl: thisdata.contractPictureUrl
  546. ? splitUrl(
  547. thisdata.contractPictureUrl,
  548. ',',
  549. globalConfig.avatarHost + '/upload'
  550. )
  551. : [], //图片地址
  552. replenishUrl: thisdata.agreementUrl
  553. ? splitUrl(
  554. thisdata.agreementUrl,
  555. ',',
  556. globalConfig.avatarHost + '/upload'
  557. )
  558. : [],
  559. contentUrl: thisdata.serviceContent
  560. ? splitUrl(
  561. thisdata.serviceContent,
  562. ",",
  563. globalConfig.avatarHost + "/upload"
  564. )
  565. : [], //图片地址
  566. salesmanName: thisdata.salesmanName, //营销员名称
  567. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  568. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  569. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  570. financeName: thisdata.financeName, //财务名称
  571. financeMobile: thisdata.financeMobile, //财务电话
  572. nowFinance: thisdata.nowFinance, //财务名称
  573. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  574. depName: thisdata.depName,
  575. outsource: thisdata.outsource == 0 ? '否' : '是',
  576. deleteSign: thisdata.deleteSign,
  577. })
  578. }
  579. }.bind(this),
  580. }).always(
  581. function () {
  582. this.setState({
  583. loading: false,
  584. })
  585. }.bind(this)
  586. )
  587. },
  588. //项目列表
  589. xiangmu(orderNos) {
  590. $.ajax({
  591. method: 'get',
  592. dataType: 'json',
  593. crossDomain: false,
  594. url: globalConfig.context + '/api/admin/newOrder/getOrderTask',
  595. data: {
  596. orderNo: orderNos,
  597. },
  598. success: function (data) {
  599. let theArr = []
  600. if (data.error.length || data.data.list == '') {
  601. if (data.error && data.error.length) {
  602. message.warning(data.error[0].message)
  603. }
  604. } else {
  605. for (let i = 0; i < data.data.length; i++) {
  606. let thisdata = data.data[i]
  607. thisdata.key = i;
  608. thisdata.sort = thisdata.cSort;
  609. theArr.push(thisdata);
  610. }
  611. }
  612. this.setState({
  613. dataSourceX: theArr,
  614. })
  615. }.bind(this),
  616. }).always(
  617. function () {
  618. this.setState({
  619. loading: false,
  620. })
  621. }.bind(this)
  622. )
  623. },
  624. rizhi() {
  625. this.setState({
  626. loading: true,
  627. })
  628. $.ajax({
  629. method: 'get',
  630. dataType: 'json',
  631. crossDomain: false,
  632. url: '/api/admin/newOrder/selectOrderLog',
  633. data: {
  634. orderNo: this.state.orderNo,
  635. },
  636. success: function (data) {
  637. let theArr = []
  638. let thisData = data.data
  639. if (!thisData.length) {
  640. if (data.error && data.error.length) {
  641. message.warning(data.error[0].message)
  642. }
  643. thisData = {}
  644. } else {
  645. for (let i = 0; i < data.data.length; i++) {
  646. let thisdata = data.data[i]
  647. theArr.push({
  648. processName: thisdata.processName,
  649. adminName: thisdata.adminName,
  650. createDate: thisdata.createDate,
  651. remarks: thisdata.remarks,
  652. })
  653. }
  654. }
  655. this.setState({
  656. dataSourcerizhi: theArr,
  657. })
  658. }.bind(this),
  659. }).always(
  660. function () {
  661. this.setState({
  662. loading: false,
  663. })
  664. }.bind(this)
  665. )
  666. },
  667. getOrderLog() {
  668. this.setState({
  669. rizhivisible: true,
  670. })
  671. this.rizhi()
  672. },
  673. closeOrderLog() {
  674. this.setState({
  675. rizhivisible: false,
  676. })
  677. },
  678. //节点列表
  679. jiedian(orderNos) {
  680. $.ajax({
  681. method: 'get',
  682. dataType: 'json',
  683. crossDomain: false,
  684. url: globalConfig.context + '/api/admin/newOrder/selectOrderDun',
  685. data: {
  686. orderNo: orderNos,
  687. },
  688. success: function (data) {
  689. let theArr = []
  690. let thisData = []
  691. if (data.error.length || data.data.list == '') {
  692. if (data.error && data.error.length) {
  693. message.warning(data.error[0].message)
  694. }
  695. } else {
  696. for (let i = 0; i < data.data.length; i++) {
  697. thisData = data.data[i]
  698. theArr.push({
  699. key: i,
  700. dunSubject: thisData.dunSubject
  701. ? thisData.dunSubject.toString()
  702. : '', //催款科目
  703. id: thisData.id, //节点Id
  704. money: thisData.money, //催款金额
  705. dunStatus: thisData.dunStatus, //催款状态
  706. })
  707. }
  708. this.setState({
  709. contactList: theArr,
  710. })
  711. }
  712. }.bind(this),
  713. }).always(
  714. function () {
  715. this.setState({
  716. loading: false,
  717. })
  718. }.bind(this)
  719. )
  720. },
  721. jiedianNew(orderNos) {
  722. $.ajax({
  723. method: 'get',
  724. dataType: 'json',
  725. crossDomain: false,
  726. url:
  727. globalConfig.context + '/api/admin/newOrderDun/selectListNewOrderDun',
  728. data: {
  729. orderNo: orderNos,
  730. },
  731. success: function (data) {
  732. if (data.error && data.error.length) {
  733. message.warning(data.error[0].message)
  734. } else {
  735. let theArr = []
  736. let thisData = []
  737. let arr = data.data || []
  738. let totalCui = 0
  739. for (let i = 0; i < arr.length; i++) {
  740. thisData = arr[i]
  741. totalCui += +thisData.money
  742. theArr.push({
  743. key: i,
  744. dunSubject: thisData.dunSubject
  745. ? thisData.dunSubject.toString()
  746. : '', //催款科目
  747. id: thisData.id, //节点Id
  748. money: thisData.money, //催款金额
  749. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  750. commodityName: thisData.commodityName,
  751. projectType: thisData.projectType,
  752. dunTypeName: thisData.dunTypeName,
  753. status: thisData.status,
  754. waitDay: thisData.waitDay,
  755. effectiveCount: thisData.effectiveCount,
  756. startDate: thisData.startDate,
  757. dunType: thisData.dunType,
  758. appropriationRatio: thisData.appropriationRatio,
  759. customizeName: thisData.customizeName,
  760. customizeTimes: thisData.customizeTimes,
  761. tid: thisData.tid,
  762. })
  763. }
  764. if (!totalCui) {
  765. totalCui = 0
  766. }
  767. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6)
  768. this.setState({
  769. contactListNew: theArr,
  770. totalCui,
  771. })
  772. }
  773. }.bind(this),
  774. }).always(
  775. function () {
  776. this.setState({
  777. loading: false,
  778. })
  779. }.bind(this)
  780. )
  781. },
  782. //审核通过
  783. examOk() {
  784. $.ajax({
  785. method: 'post',
  786. dataType: 'json',
  787. crossDomain: false,
  788. url: globalConfig.context + '/api/admin/newOrder/auditOrderNew',
  789. data: {
  790. orderNo: this.state.orderNo,
  791. orderStatus: 2,
  792. },
  793. success: function (data) {
  794. if (data.error.length || data.data.list == '') {
  795. if (data.error && data.error.length) {
  796. message.warning(data.error[0].message)
  797. }
  798. } else {
  799. message.success('该订单已通过审核~')
  800. this.setState({
  801. visible: false,
  802. })
  803. this.reset()
  804. }
  805. }.bind(this),
  806. }).always(
  807. function () {
  808. this.setState({
  809. loading: false,
  810. })
  811. }.bind(this)
  812. )
  813. },
  814. //通过发给外包
  815. outsourcing() {
  816. $.ajax({
  817. method: 'post',
  818. dataType: 'json',
  819. crossDomain: false,
  820. url: globalConfig.context + '/api/admin/newOrder/auditOrderNew',
  821. data: {
  822. orderNo: this.state.orderNo,
  823. orderStatus: 2,
  824. outsource: 1,
  825. },
  826. success: function (data) {
  827. if (data.error.length || data.data.list == '') {
  828. if (data.error && data.error.length) {
  829. message.warning(data.error[0].message)
  830. }
  831. } else {
  832. message.success('该订单已通过审核~')
  833. this.setState({
  834. visible: false,
  835. })
  836. this.reset()
  837. }
  838. }.bind(this),
  839. }).always(
  840. function () {
  841. this.setState({
  842. loading: false,
  843. })
  844. }.bind(this)
  845. )
  846. },
  847. //审核不通过
  848. examOks() {
  849. this.setState({
  850. aloading: true,
  851. })
  852. $.ajax({
  853. method: 'post',
  854. dataType: 'json',
  855. crossDomain: false,
  856. url: globalConfig.context + '/api/admin/newOrder/auditOrderNew',
  857. data: {
  858. orderNo: this.state.orderNo,
  859. orderStatus: 3,
  860. reason: this.state.reason,
  861. },
  862. success: function (data) {
  863. if (data.error.length || data.data.list == '') {
  864. if (data.error && data.error.length) {
  865. message.warning(data.error[0].message)
  866. this.setState({
  867. aloading: true,
  868. })
  869. }
  870. } else {
  871. message.success('该订单已被拒绝~')
  872. this.setState({
  873. visible: false,
  874. aloading: false,
  875. noVisible: false,
  876. reason: '',
  877. })
  878. this.reset()
  879. }
  880. }.bind(this),
  881. }).always(
  882. function () {
  883. this.setState({
  884. loading: false,
  885. })
  886. }.bind(this)
  887. )
  888. },
  889. //点击拒绝
  890. examNo() {
  891. this.setState({
  892. noVisible: true,
  893. })
  894. },
  895. load() {
  896. if (this.state.attachmentUrl) {
  897. let url = window.location.href.substring(7)
  898. this.state.attachmentUrl.forEach((e) => {
  899. window.location.href =
  900. 'http://' +
  901. url.substring(0, url.indexOf('/')) +
  902. '/api/admin/outsourceOrg//downloadFile?path=' +
  903. e.response.data
  904. })
  905. } else {
  906. message.error('此订单无上传文件')
  907. }
  908. },
  909. callback(key) {
  910. this.setState({
  911. activeKey: key,
  912. })
  913. if (this.state.pictureUrl.length) {
  914. let picArr = []
  915. this.state.pictureUrl.map(function (item) {
  916. if (
  917. item.response &&
  918. item.response.data &&
  919. item.response.data.length
  920. ) {
  921. picArr.push(item.response.data)
  922. }
  923. })
  924. }
  925. if (key === '2') {
  926. // console.log(
  927. // typeof this.state.refundStatus,
  928. // !(this.state.refundStatus === 1)
  929. // )
  930. this.setState({
  931. loading: true,
  932. })
  933. $.ajax({
  934. method: 'get',
  935. dataType: 'json',
  936. crossDomain: false,
  937. url:
  938. globalConfig.context +
  939. '/api/admin/outsourceOrg/orderOutsourceDtails',
  940. data: {
  941. orderNo: this.state.orderNo,
  942. },
  943. success: function (data) {
  944. let thisdata = data.data
  945. this.setState({
  946. id: thisdata.id,
  947. createTimes: thisdata.createTimes,
  948. auditTimes: thisdata.auditTimes,
  949. remarks: thisdata.remarks,
  950. attachmentUrl: thisdata.attachmentUrl
  951. ? splitUrl(
  952. thisdata.attachmentUrl,
  953. ',',
  954. globalConfig.avatarHost + '/upload'
  955. )
  956. : [],
  957. pictureUrl: thisdata.pictureUrl
  958. ? splitUrl(
  959. thisdata.pictureUrl,
  960. ',',
  961. globalConfig.avatarHost + '/upload'
  962. )
  963. : [], //图片地址
  964. amount: thisdata.amount,
  965. companyName: thisdata.companyName,
  966. outsourceRemarks: thisdata.outsourceRemarks,
  967. unitNumber: thisdata.unitNumber,
  968. unitPrice: thisdata.unitPrice,
  969. })
  970. }.bind(this),
  971. }).always(
  972. function () {
  973. this.setState({
  974. loading: false,
  975. })
  976. }.bind(this)
  977. )
  978. }
  979. },
  980. pass() {
  981. if (!this.state.remarks) {
  982. message.warning('审核意见不能为空')
  983. return
  984. }
  985. this.setState({
  986. adoptLoading: true
  987. })
  988. $.ajax({
  989. method: 'post',
  990. dataType: 'json',
  991. crossDomain: false,
  992. url: globalConfig.context + '/api/admin/outsourceOrg/auditOutsourceNew',
  993. data: {
  994. id: this.state.id,
  995. remarks: this.state.remarks,
  996. refundStatus: 1,
  997. orderNo: this.state.orderNo,
  998. type: 0,
  999. },
  1000. success: function (data) {
  1001. if (data.error && data.error.length) {
  1002. message.warning(data.error[0].message)
  1003. } else {
  1004. message.success('已通过!')
  1005. }
  1006. },
  1007. }).done(
  1008. function () {
  1009. this.setState({
  1010. adoptLoading: false,
  1011. remarks: '',
  1012. })
  1013. this.visitCancel()
  1014. }.bind(this)
  1015. )
  1016. },
  1017. refuse() {
  1018. this.setState({
  1019. operationLoading: true
  1020. })
  1021. $.ajax({
  1022. method: 'post',
  1023. dataType: 'json',
  1024. crossDomain: false,
  1025. url: globalConfig.context + '/api/admin/outsourceOrg/auditOutsourceNew',
  1026. data: {
  1027. id: this.state.id,
  1028. remarks: this.state.remarks,
  1029. refundStatus: 2,
  1030. orderNo: this.state.orderNo,
  1031. },
  1032. success: function (data) {
  1033. if (data.error && data.error.length) {
  1034. message.warning(data.error[0].message)
  1035. } else {
  1036. message.success('已驳回!')
  1037. }
  1038. },
  1039. }).done(
  1040. function () {
  1041. this.setState({
  1042. operationLoading: false,
  1043. remarks: '',
  1044. })
  1045. this.visitCancel()
  1046. }.bind(this)
  1047. )
  1048. },
  1049. //关闭输入理由框
  1050. noCancel() {
  1051. this.setState({
  1052. noVisible: false,
  1053. aloading: false,
  1054. reason: '',
  1055. })
  1056. },
  1057. //搜索
  1058. search() {
  1059. this.setState({
  1060. //signBillVisible:false
  1061. })
  1062. this.loadData()
  1063. },
  1064. //重置
  1065. reset() {
  1066. this.state.nameSearch = ''
  1067. this.state.contractNoSearch = ''
  1068. this.state.releaseDate[0] = undefined
  1069. this.state.releaseDate[1] = undefined
  1070. this.state.refundStatusSearch = undefined
  1071. this.loadData(1)
  1072. },
  1073. resets() {
  1074. this.state.orderNo = ''
  1075. this.state.customerName = ''
  1076. this.state.releaseDate[0] = undefined
  1077. this.state.releaseDate[1] = undefined
  1078. },
  1079. getOrgCodeUrl(e) {
  1080. this.setState({ pictureUrl: e })
  1081. },
  1082. //关闭详情
  1083. visitCancel() {
  1084. this.setState(
  1085. {
  1086. visible: false,
  1087. },
  1088. () => {
  1089. this.setState({
  1090. activeKey: '1',
  1091. })
  1092. }
  1093. )
  1094. this.resets()
  1095. this.loadData(this.state.pagination.current)
  1096. },
  1097. visitOk() {
  1098. this.setState({
  1099. visible: false,
  1100. })
  1101. this.resets()
  1102. },
  1103. downImg() {
  1104. let num = 0
  1105. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1106. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1107. num = i
  1108. }
  1109. }
  1110. if (num == this.state.orgCodeUrl.length - 1) {
  1111. return message.warning('已经是最后一张了哦')
  1112. }
  1113. this.state.previewImage = this.state.orgCodeUrl[num + 1].url
  1114. this.setState({
  1115. previewImage: this.state.previewImage,
  1116. rotateDeg: 0,
  1117. })
  1118. },
  1119. upImg() {
  1120. let num = 0
  1121. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1122. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1123. num = i
  1124. }
  1125. }
  1126. if (num == 0) {
  1127. return message.warning('已经是第一张了哦')
  1128. }
  1129. this.state.previewImage = this.state.orgCodeUrl[num - 1].url
  1130. this.setState({
  1131. previewImage: this.state.previewImage,
  1132. rotateDeg: 0,
  1133. })
  1134. },
  1135. rotate() {
  1136. let rotateDeg = this.state.rotateDeg + 90
  1137. this.setState({
  1138. rotateDeg,
  1139. })
  1140. },
  1141. downImgs() {
  1142. let num = 0
  1143. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1144. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1145. num = i
  1146. }
  1147. }
  1148. if (num == this.state.replenishUrl.length - 1) {
  1149. return message.warning('已经是最后一张了哦')
  1150. }
  1151. this.state.previewImage = this.state.replenishUrl[num + 1].url
  1152. this.setState({
  1153. previewImage: this.state.previewImage,
  1154. rotateDeg: 0,
  1155. })
  1156. },
  1157. upImgs() {
  1158. let num = 0
  1159. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1160. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1161. num = i
  1162. }
  1163. }
  1164. if (num == 0) {
  1165. return message.warning('已经是第一张了哦')
  1166. }
  1167. this.state.previewImage = this.state.replenishUrl[num - 1].url
  1168. this.setState({
  1169. previewImage: this.state.previewImage,
  1170. rotateDeg: 0,
  1171. })
  1172. },
  1173. rotates() {
  1174. let rotateDeg = this.state.rotateDeg + 90
  1175. this.setState({
  1176. rotateDeg,
  1177. })
  1178. },
  1179. changeList(arr) {
  1180. const newArr = [];
  1181. this.state.columns.forEach(item => {
  1182. arr.forEach(val => {
  1183. if (val === item.title) {
  1184. newArr.push(item);
  1185. }
  1186. });
  1187. });
  1188. this.setState({
  1189. changeList: newArr
  1190. });
  1191. },
  1192. render() {
  1193. const formItemLayout = {
  1194. labelCol: { span: 8 },
  1195. wrapperCol: { span: 14 },
  1196. }
  1197. const FormItem = Form.Item
  1198. const { TabPane } = Tabs
  1199. const { RangePicker } = DatePicker
  1200. const cuiDataList = this.state.contactList || []
  1201. return (
  1202. <div className="user-content">
  1203. {this.state.resVisible ? (
  1204. <ResolutionDetail
  1205. cancel={this.resCancel}
  1206. detail={this.state.resRecord}
  1207. visible={this.state.resVisible}
  1208. id={this.state.resRecord.orderNo}
  1209. />
  1210. ) : (
  1211. ''
  1212. )}
  1213. <div className="content-title">
  1214. <span>外包审核列表</span>
  1215. </div>
  1216. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  1217. <TabPane tab="搜索" key="1">
  1218. <div className="user-search">
  1219. <Input
  1220. placeholder="客户名称"
  1221. style={{
  1222. width: '150px',
  1223. marginBottom: '10px',
  1224. marginLeft: 10,
  1225. }}
  1226. value={this.state.nameSearch}
  1227. onChange={(e) => {
  1228. this.setState({ nameSearch: e.target.value })
  1229. }}
  1230. />
  1231. <Input
  1232. placeholder="合同编号"
  1233. style={{ width: '150px' }}
  1234. value={this.state.contractNoSearch}
  1235. onChange={(e) => {
  1236. this.setState({ contractNoSearch: e.target.value })
  1237. }}
  1238. />
  1239. <span style={{ marginRight: '10px' }}>下单时间 :</span>
  1240. <RangePicker
  1241. value={[
  1242. this.state.releaseDate[0]
  1243. ? moment(this.state.releaseDate[0])
  1244. : null,
  1245. this.state.releaseDate[1]
  1246. ? moment(this.state.releaseDate[1])
  1247. : null,
  1248. ]}
  1249. onChange={(data, dataString) => {
  1250. this.setState({ releaseDate: dataString })
  1251. }}
  1252. />
  1253. <Select
  1254. value={this.state.refundStatusSearch}
  1255. style={{ width: 150, marginLeft: '10px' }}
  1256. onChange={(e) => {
  1257. this.setState({
  1258. refundStatusSearch: e,
  1259. })
  1260. }}
  1261. placeholder="审核状态"
  1262. >
  1263. <Option value={0}>待审核</Option>
  1264. <Option value={1}>审核通过</Option>
  1265. <Option value={2}>审核驳回</Option>
  1266. </Select>
  1267. <Button
  1268. type="primary"
  1269. onClick={this.search}
  1270. style={{ marginLeft: '10px' }}
  1271. >
  1272. 搜索
  1273. </Button>
  1274. <Button onClick={this.reset}>重置</Button>
  1275. </div>
  1276. </TabPane>
  1277. <TabPane tab="更改表格显示数据" key="ChooseList">
  1278. <div style={{ marginLeft: 10 }}>
  1279. <ChooseList
  1280. columns={this.state.columns}
  1281. changeFn={this.changeList}
  1282. changeList={this.state.changeList}
  1283. top={55}
  1284. margin={11}
  1285. />
  1286. </div>
  1287. </TabPane>
  1288. </Tabs>
  1289. <div className="patent-table">
  1290. <Spin spinning={this.state.loading}>
  1291. <Table
  1292. columns={
  1293. this.state.changeList
  1294. ? this.state.changeList
  1295. : this.state.columns
  1296. }
  1297. dataSource={this.state.dataSource}
  1298. pagination={this.state.pagination}
  1299. onRowClick={this.tableRowClick}
  1300. bordered
  1301. size="small"
  1302. />
  1303. </Spin>
  1304. </div>
  1305. {this.state.visible ? <Modal
  1306. className="customeDetails"
  1307. maskClosable={false}
  1308. footer=""
  1309. width="1200px"
  1310. visible={this.state.visible}
  1311. onOk={this.visitOk}
  1312. onCancel={this.visitCancel}
  1313. >
  1314. <Tabs
  1315. activeKey={this.state.activeKey}
  1316. onChange={this.callback}
  1317. tabBarExtraContent={
  1318. <div style={{ fontWeight: 'bold', paddingRight: '15px' }}>
  1319. <OrderItemStatus deleteSign={this.state.deleteSign} />
  1320. </div>
  1321. }>
  1322. <TabPane tab="订单详情" key="1">
  1323. {this.state.activeKey === '1' ? <Form
  1324. layout="horizontal"
  1325. onSubmit={this.handleSubmit}
  1326. id="demand-form"
  1327. style={{ paddingBottom: '40px' }}
  1328. >
  1329. <Spin spinning={this.state.loading}>
  1330. <div className="clearfix">
  1331. <FormItem
  1332. className="half-item"
  1333. {...formItemLayout}
  1334. label="订单编号"
  1335. >
  1336. <span>{this.state.orderNo}</span>
  1337. </FormItem>
  1338. <FormItem
  1339. className="half-item"
  1340. {...formItemLayout}
  1341. label="合同编号"
  1342. >
  1343. <span>{this.state.contractNo}</span>
  1344. </FormItem>
  1345. <FormItem
  1346. className="half-item"
  1347. {...formItemLayout}
  1348. label="客户名称"
  1349. >
  1350. <span>{this.state.userName}</span>
  1351. <EnterpriseNameChange
  1352. type='journal'
  1353. style={{ marginLeft: 10 }}
  1354. enterpriseId={this.state.orderUid} />
  1355. </FormItem>
  1356. <FormItem
  1357. className="half-item"
  1358. {...formItemLayout}
  1359. label="合同签订时间"
  1360. >
  1361. <span>{this.state.signDate}</span>
  1362. </FormItem>
  1363. <FormItem
  1364. className="half-item"
  1365. {...formItemLayout}
  1366. label="流程状态"
  1367. >
  1368. <span>
  1369. {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
  1370. </span>
  1371. </FormItem>
  1372. <FormItem
  1373. className="half-item"
  1374. {...formItemLayout}
  1375. label="结算状态"
  1376. >
  1377. <span>
  1378. {getLiquidationStatus(this.state.liquidationStatus)}
  1379. </span>
  1380. </FormItem>
  1381. <FormItem
  1382. className="half-item"
  1383. {...formItemLayout}
  1384. label="企业联系人"
  1385. >
  1386. <span>{this.state.contacts}</span>
  1387. </FormItem>
  1388. <FormItem
  1389. className="half-item"
  1390. {...formItemLayout}
  1391. label="联系人电话"
  1392. >
  1393. <span>{this.state.contactMobile}</span>
  1394. </FormItem>
  1395. <FormItem
  1396. className="half-item"
  1397. {...formItemLayout}
  1398. label="企业法人"
  1399. >
  1400. <span>{this.state.legalPerson}</span>
  1401. </FormItem>
  1402. <FormItem
  1403. className="half-item"
  1404. {...formItemLayout}
  1405. label="法人电话"
  1406. >
  1407. <span>{this.state.legalPersonTel}</span>
  1408. </FormItem>
  1409. <FormItem
  1410. className="half-item"
  1411. {...formItemLayout}
  1412. label="签单金额(万元)"
  1413. >
  1414. <span>{this.state.totalAmount}</span>
  1415. </FormItem>
  1416. <FormItem
  1417. className="half-item"
  1418. {...formItemLayout}
  1419. label="首付金额(万元)"
  1420. >
  1421. <span>{this.state.firstAmount}</span>
  1422. </FormItem>
  1423. <FormItem
  1424. className="half-item"
  1425. {...formItemLayout}
  1426. label="特批立项"
  1427. >
  1428. <span>{getApprovedState(this.state.approval)}</span>
  1429. </FormItem>
  1430. <FormItem
  1431. className="half-item"
  1432. {...formItemLayout}
  1433. label="已收款项(万元)"
  1434. >
  1435. <span>{this.state.settlementAmount}</span>
  1436. </FormItem>
  1437. <FormItem
  1438. className="half-item"
  1439. {...formItemLayout}
  1440. label="订单部门"
  1441. >
  1442. <span>{this.state.depName}</span>
  1443. </FormItem>
  1444. <FormItem
  1445. className="half-item"
  1446. {...formItemLayout}
  1447. label="是否外包"
  1448. >
  1449. <span>{this.state.outsource}</span>
  1450. </FormItem>
  1451. <div className="clearfix">
  1452. <FormItem
  1453. labelCol={{ span: 4 }}
  1454. wrapperCol={{ span: 16 }}
  1455. label="订单留言"
  1456. >
  1457. <span>{this.state.orderRemarks}</span>
  1458. </FormItem>
  1459. </div>
  1460. <div className="clearfix">
  1461. <FormItem
  1462. labelCol={{ span: 4 }}
  1463. wrapperCol={{ span: 18 }}
  1464. label="合同扫描件"
  1465. >
  1466. {/*<Upload*/}
  1467. {/* className="demandDetailShow-upload"*/}
  1468. {/* listType="picture-card"*/}
  1469. {/* fileList={this.state.orgCodeUrl}*/}
  1470. {/* onPreview={(file) => {*/}
  1471. {/* this.setState({*/}
  1472. {/* previewImage: file.url || file.thumbUrl,*/}
  1473. {/* previewVisible: true,*/}
  1474. {/* })*/}
  1475. {/* }}*/}
  1476. {/*/>*/}
  1477. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1478. {this.state.orgCodeUrl && this.state.visible ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'} /> : <div />}
  1479. </div>
  1480. <Modal
  1481. maskClosable={false}
  1482. footer={null}
  1483. width={'50%'}
  1484. visible={this.state.previewVisible}
  1485. onCancel={() => {
  1486. this.setState({
  1487. previewVisible: false,
  1488. rotateDeg: 0,
  1489. })
  1490. }}
  1491. >
  1492. <img
  1493. alt=""
  1494. style={{
  1495. width: '100%',
  1496. transform: `rotate(${this.state.rotateDeg}deg)`,
  1497. }}
  1498. src={this.state.previewImage || ''}
  1499. />
  1500. <Button
  1501. onClick={this.rotate}
  1502. style={{
  1503. position: 'relative',
  1504. left: '50%',
  1505. transform: 'translateX(-50%)',
  1506. }}
  1507. >
  1508. 旋转
  1509. </Button>
  1510. <Button
  1511. onClick={this.upImg}
  1512. style={{
  1513. position: 'absolute',
  1514. left: -81,
  1515. top: '50%',
  1516. transform: 'translateY(-50%)',
  1517. }}
  1518. >
  1519. 上一张
  1520. </Button>
  1521. <Button
  1522. onClick={this.downImg}
  1523. style={{
  1524. position: 'absolute',
  1525. right: -81,
  1526. top: '50%',
  1527. transform: 'translateY(-50%)',
  1528. }}
  1529. >
  1530. 下一张
  1531. </Button>
  1532. </Modal>
  1533. <Button
  1534. style={{
  1535. float: 'right',
  1536. marginRight: '140px',
  1537. marginTop: '20px',
  1538. }}
  1539. onClick={this.getOrderLog}
  1540. >
  1541. 查看订单日志
  1542. </Button>
  1543. </FormItem>
  1544. <FormItem
  1545. labelCol={{ span: 4 }}
  1546. wrapperCol={{ span: 18 }}
  1547. label="补充协议"
  1548. >
  1549. {/*<Upload*/}
  1550. {/* className="demandDetailShow-upload"*/}
  1551. {/* listType="picture-card"*/}
  1552. {/* fileList={this.state.replenishUrl}*/}
  1553. {/* onPreview={(file) => {*/}
  1554. {/* this.setState({*/}
  1555. {/* previewImage: file.url || file.thumbUrl,*/}
  1556. {/* previewVisibles: true,*/}
  1557. {/* })*/}
  1558. {/* }}*/}
  1559. {/*/>*/}
  1560. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1561. {this.state.replenishUrl && this.state.visible ? <ImgList domId={'checkOutsourcing1'} fileList={this.state.replenishUrl} ItemWidth={'96px'} /> : <div />}
  1562. </div>
  1563. <Modal
  1564. maskClosable={false}
  1565. footer={null}
  1566. width={'50%'}
  1567. visible={this.state.previewVisibles}
  1568. onCancel={() => {
  1569. this.setState({
  1570. previewVisibles: false,
  1571. rotateDeg: 0,
  1572. })
  1573. }}
  1574. >
  1575. <img
  1576. alt=""
  1577. style={{
  1578. width: '100%',
  1579. transform: `rotate(${this.state.rotateDeg}deg)`,
  1580. }}
  1581. src={this.state.previewImage || ''}
  1582. />
  1583. <Button
  1584. onClick={this.rotates}
  1585. style={{
  1586. position: 'relative',
  1587. left: '50%',
  1588. transform: 'translateX(-50%)',
  1589. }}
  1590. >
  1591. 旋转
  1592. </Button>
  1593. <Button
  1594. onClick={this.upImgs}
  1595. style={{
  1596. position: 'absolute',
  1597. left: -81,
  1598. top: '50%',
  1599. transform: 'translateY(-50%)',
  1600. }}
  1601. >
  1602. 上一张
  1603. </Button>
  1604. <Button
  1605. onClick={this.downImgs}
  1606. style={{
  1607. position: 'absolute',
  1608. right: -81,
  1609. top: '50%',
  1610. transform: 'translateY(-50%)',
  1611. }}
  1612. >
  1613. 下一张
  1614. </Button>
  1615. </Modal>
  1616. </FormItem>
  1617. </div>
  1618. <ContentUrl
  1619. processStatus={2}
  1620. domId={"checkContents"}
  1621. contentUrl={this.state.contentUrl}
  1622. imgId={"checkContentsImg"}
  1623. />
  1624. <div className="clearfix">
  1625. <FormItem
  1626. className="half-item"
  1627. {...formItemLayout}
  1628. label="订单负责人"
  1629. >
  1630. <span>{this.state.salesmanName}</span>
  1631. </FormItem>
  1632. <FormItem
  1633. className="half-item"
  1634. {...formItemLayout}
  1635. label="订单负责人电话"
  1636. >
  1637. <span>{this.state.salesmanMobile}</span>
  1638. </FormItem>
  1639. </div>
  1640. <div className="clearfix">
  1641. <FormItem
  1642. className="half-item"
  1643. {...formItemLayout}
  1644. label="当前财务负责人"
  1645. >
  1646. <span>{this.state.nowFinance}</span>
  1647. </FormItem>
  1648. <FormItem
  1649. className="half-item"
  1650. {...formItemLayout}
  1651. label="当前财务负责人电话"
  1652. >
  1653. <span>{this.state.nowFinanceMobile}</span>
  1654. </FormItem>
  1655. </div>
  1656. <div className="clearfix">
  1657. <FormItem
  1658. className="half-item"
  1659. {...formItemLayout}
  1660. style={{ opacity: '.5' }}
  1661. label="原订单负责人"
  1662. >
  1663. <span>{this.state.oldSalesmanName}</span>
  1664. </FormItem>
  1665. <FormItem
  1666. className="half-item"
  1667. {...formItemLayout}
  1668. style={{ opacity: '.5' }}
  1669. label="原订单负责人电话"
  1670. >
  1671. <span>{this.state.oldSalesmanMobile}</span>
  1672. </FormItem>
  1673. </div>
  1674. <div className="clearfix">
  1675. <FormItem
  1676. className="half-item"
  1677. style={{ opacity: '.5' }}
  1678. {...formItemLayout}
  1679. label="实际财务操作人"
  1680. >
  1681. <span>{this.state.financeName}</span>
  1682. </FormItem>
  1683. <FormItem
  1684. className="half-item"
  1685. {...formItemLayout}
  1686. style={{ opacity: '.5' }}
  1687. label="实际财务操作人电话"
  1688. >
  1689. <span>{this.state.financeMobile}</span>
  1690. </FormItem>
  1691. </div>
  1692. {/* 协单人员 */}
  1693. <OrderCoor orderNo={this.state.orderNos} />
  1694. <div>
  1695. <span style={{ marginLeft: '50px', fontSize: '20px' }}>
  1696. 项目业务
  1697. </span>
  1698. {this.state.processStatus == 0 ? (
  1699. <Button
  1700. type="primary"
  1701. onClick={this.addDetailed}
  1702. style={{
  1703. float: 'right',
  1704. marginRight: '50px',
  1705. marginBottom: '15px',
  1706. }}
  1707. >
  1708. 添加项目明细
  1709. </Button>
  1710. ) : (
  1711. ''
  1712. )}
  1713. </div>
  1714. <div className="patent-table">
  1715. <Spin spinning={this.state.loading}>
  1716. <Table
  1717. columns={this.state.columnsX}
  1718. dataSource={this.state.dataSourceX}
  1719. pagination={this.state.paginations}
  1720. onRowClick={this.tableRowClickX}
  1721. bordered
  1722. size="small"
  1723. />
  1724. </Spin>
  1725. </div>
  1726. <div>
  1727. <span style={{ marginLeft: 20, fontSize: '18px' }}>
  1728. 催款节点
  1729. </span>
  1730. <span
  1731. style={{
  1732. display: cuiDataList.length
  1733. ? 'none'
  1734. : 'inline-block',
  1735. marginLeft: 10,
  1736. color: 'red',
  1737. }}
  1738. >
  1739. 金额总计(万元): {this.state.totalCui}
  1740. </span>
  1741. </div>
  1742. <div className="clearfix">
  1743. <Spin spinning={this.state.loading}>
  1744. <Form layout="horizontal" id="demand-form">
  1745. <Table
  1746. pagination={false}
  1747. bordered
  1748. size="small"
  1749. columns={
  1750. cuiDataList.length
  1751. ? this.state.ContactsLists
  1752. : this.state.ContactsListsNew
  1753. }
  1754. dataSource={
  1755. cuiDataList.length
  1756. ? this.state.contactList
  1757. : this.state.contactListNew
  1758. }
  1759. />
  1760. <Col
  1761. span={24}
  1762. offset={9}
  1763. style={{ marginTop: '15px' }}
  1764. />
  1765. </Form>
  1766. </Spin>
  1767. </div>
  1768. </div>
  1769. </Spin>
  1770. </Form> : <div />}
  1771. </TabPane>
  1772. <TabPane tab="外包(不走总部)" key="2">
  1773. {this.state.activeKey === '2' ? <div>
  1774. <div className="clearfix">
  1775. <FormItem
  1776. className="half-item"
  1777. {...formItemLayout}
  1778. label="外包公司"
  1779. >
  1780. <span>{this.state.companyName}</span>
  1781. </FormItem>
  1782. </div>
  1783. <div className="clearfix">
  1784. <FormItem
  1785. className="half-item"
  1786. {...formItemLayout}
  1787. label="单价(万元)"
  1788. >
  1789. <span>{this.state.unitPrice}</span>
  1790. </FormItem>
  1791. </div>
  1792. <div className="clearfix">
  1793. <FormItem
  1794. className="half-item"
  1795. {...formItemLayout}
  1796. label="数量(个)"
  1797. >
  1798. <span>{this.state.unitNumber}</span>
  1799. </FormItem>
  1800. </div>
  1801. <div className="clearfix">
  1802. <FormItem
  1803. className="half-item"
  1804. {...formItemLayout}
  1805. label="总金额(万元)"
  1806. >
  1807. <span>{this.state.amount}</span>
  1808. </FormItem>
  1809. </div>
  1810. <div className="clearfix">
  1811. <FormItem
  1812. className="half-item"
  1813. {...formItemLayout}
  1814. label="备注"
  1815. >
  1816. <span>{this.state.outsourceRemarks}</span>
  1817. </FormItem>
  1818. </div>
  1819. {/*<div className="clearfix">
  1820. <FormItem className="half-item" style={{height:'auto'}}
  1821. {...formItemLayout}
  1822. label="上传协议文件" >
  1823. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1824. data={(e)=>{
  1825. return {
  1826. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1827. }
  1828. }}
  1829. fileList={this.state.attachmentUrl}
  1830. showUploadList={{showRemoveIcon:false}}
  1831. onPreview={(e)=>{
  1832. let url = window.location.href.substring(7)
  1833. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1834. }}
  1835. >
  1836. </Upload>
  1837. </FormItem>
  1838. </div>*/}
  1839. <div className="clearfix">
  1840. <FormItem
  1841. labelCol={{ span: 4 }}
  1842. wrapperCol={{ span: 18 }}
  1843. label="合同/协议扫描件"
  1844. >
  1845. {/*<Upload*/}
  1846. {/* className="demandDetailShow-upload"*/}
  1847. {/* listType="picture-card"*/}
  1848. {/* fileList={this.state.pictureUrl}*/}
  1849. {/* onPreview={(file) => {*/}
  1850. {/* this.setState({*/}
  1851. {/* previewImage: file.url || file.thumbUrl,*/}
  1852. {/* previewVisible: true,*/}
  1853. {/* })*/}
  1854. {/* }}*/}
  1855. {/*/>*/}
  1856. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1857. {this.state.pictureUrl && this.state.visible ? <ImgList domId={'checkOutsourcing2'} fileList={this.state.pictureUrl} ItemWidth={'96px'} /> : <div />}
  1858. </div>
  1859. <Modal
  1860. maskClosable={false}
  1861. footer={null}
  1862. width={'50%'}
  1863. visible={this.state.previewVisible}
  1864. onCancel={() => {
  1865. this.setState({ previewVisible: false, rotateDeg: 0 })
  1866. }}
  1867. >
  1868. <img
  1869. alt=""
  1870. style={{
  1871. width: '100%',
  1872. transform: `rotate(${this.state.rotateDeg}deg)`,
  1873. }}
  1874. src={this.state.previewImage || ''}
  1875. />
  1876. <Button
  1877. onClick={this.rotate}
  1878. style={{
  1879. position: 'relative',
  1880. left: '50%',
  1881. transform: 'translateX(-50%)',
  1882. }}
  1883. >
  1884. 旋转
  1885. </Button>
  1886. <Button
  1887. onClick={this.upImg}
  1888. style={{
  1889. position: 'absolute',
  1890. left: -81,
  1891. top: '50%',
  1892. transform: 'translateY(-50%)',
  1893. }}
  1894. >
  1895. 上一张
  1896. </Button>
  1897. <Button
  1898. onClick={this.downImg}
  1899. style={{
  1900. position: 'absolute',
  1901. right: -81,
  1902. top: '50%',
  1903. transform: 'translateY(-50%)',
  1904. }}
  1905. >
  1906. 下一张
  1907. </Button>
  1908. </Modal>
  1909. </FormItem>
  1910. </div>
  1911. {!this.state.refundStatus ? (
  1912. <div>
  1913. <hr className="division" />
  1914. <div className="clearfix" style={{ marginTop: '20px' }}>
  1915. <FormItem
  1916. labelCol={{ span: 4 }}
  1917. wrapperCol={{ span: 18 }}
  1918. label={
  1919. <span>
  1920. <strong style={{ color: '#f00' }}>*</strong>
  1921. 审核意见
  1922. </span>
  1923. }
  1924. >
  1925. <Input
  1926. type="textarea"
  1927. placeholder="请输入备注"
  1928. rows={4}
  1929. value={this.state.remarks}
  1930. onChange={(e) => {
  1931. this.setState({ remarks: e.target.value })
  1932. }}
  1933. style={{ width: '440px' }}
  1934. />
  1935. <span
  1936. className="tip"
  1937. style={{
  1938. width: '160px',
  1939. verticalAlign: 'top',
  1940. display: 'inline-block',
  1941. marginLeft: '10px',
  1942. }}
  1943. >
  1944. 通过或驳回都必须填写审核意见!
  1945. </span>
  1946. </FormItem>
  1947. </div>
  1948. <div className="clearfix fa">
  1949. <Button
  1950. type="danger"
  1951. onClick={this.refuse}
  1952. loading={this.state.operationLoading}
  1953. style={{ color: '#fff', backgroundColor: '#f04134' }}
  1954. >
  1955. 驳回
  1956. </Button>
  1957. <Button
  1958. loading={this.state.adoptLoading}
  1959. type="primary"
  1960. onClick={this.pass}>
  1961. 通过
  1962. </Button>
  1963. </div>
  1964. </div>
  1965. ) : (
  1966. <div className="clearfix">
  1967. <hr className="division" />
  1968. <div className="clearfix">
  1969. <FormItem
  1970. className="half-item"
  1971. {...formItemLayout}
  1972. label="审核意见"
  1973. >
  1974. <span>{this.state.remarks}</span>
  1975. </FormItem>
  1976. </div>
  1977. <div className="clearfix">
  1978. <FormItem
  1979. className="half-item"
  1980. {...formItemLayout}
  1981. label="审核结果"
  1982. >
  1983. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1984. </FormItem>
  1985. </div>
  1986. <div className="clearfix">
  1987. <FormItem
  1988. className="half-item"
  1989. {...formItemLayout}
  1990. label="审核时间"
  1991. >
  1992. <span>{this.state.auditTimes}</span>
  1993. </FormItem>
  1994. </div>
  1995. </div>
  1996. )}
  1997. </div> : <div />}
  1998. </TabPane>
  1999. </Tabs>
  2000. </Modal> : <div />}
  2001. <Modal
  2002. maskClosable={false}
  2003. visible={this.state.noVisible}
  2004. onOk={this.handleOk}
  2005. onCancel={this.noCancel}
  2006. width="400px"
  2007. title={'拒绝理由'}
  2008. footer=""
  2009. className="admin-desc-content"
  2010. confirmLoading={this.state.confirmLoading}
  2011. >
  2012. <Form layout="horizontal" id="demand-form">
  2013. <Spin spinning={this.state.loading}>
  2014. <div className="clearfix">
  2015. <FormItem
  2016. labelCol={{ span: 4 }}
  2017. wrapperCol={{ span: 16 }}
  2018. label="拒绝理由"
  2019. >
  2020. <Input
  2021. type="textarea"
  2022. placeholder="请输入拒绝理由"
  2023. rows={4}
  2024. value={this.state.reason}
  2025. onChange={(e) => {
  2026. this.setState({ reason: e.target.value })
  2027. }}
  2028. />
  2029. </FormItem>
  2030. </div>
  2031. <div className="clearfix">
  2032. <Button
  2033. className="cancel"
  2034. type="primary"
  2035. onClick={this.examOks}
  2036. style={{ marginLeft: '50px' }}
  2037. htmlType="submit"
  2038. loading={this.state.aloading}
  2039. >
  2040. 确定
  2041. </Button>
  2042. <Button
  2043. className="cancel"
  2044. type="ghost"
  2045. onClick={this.noCancel}
  2046. style={{ marginLeft: '50px' }}
  2047. >
  2048. 取消
  2049. </Button>
  2050. </div>
  2051. </Spin>
  2052. </Form>
  2053. </Modal>
  2054. {this.state.rizhivisible ? <Modal
  2055. visible={this.state.rizhivisible}
  2056. className="admin-desc-content"
  2057. width="800px"
  2058. maskClosable={false}
  2059. title="订单日志"
  2060. footer={null}
  2061. onCancel={this.closeOrderLog}
  2062. >
  2063. <div className="patent-table">
  2064. <Spin spinning={this.state.loading}>
  2065. <Table
  2066. columns={this.state.columnsrizhi}
  2067. dataSource={this.state.dataSourcerizhi}
  2068. pagination={false}
  2069. bordered
  2070. size="small"
  2071. />
  2072. </Spin>
  2073. </div>
  2074. </Modal> : <div />}
  2075. {/* {this.state.addnextVisible && <ProjectDetailsReadOnly
  2076. infor={this.state.dataInfor}
  2077. visible={this.state.addnextVisible}
  2078. onCancel={this.nextCancel}
  2079. />} */}
  2080. {
  2081. // 项目业务详情
  2082. this.state.addnextVisible &&
  2083. <NewEditProject
  2084. readOnly={true}
  2085. visible={this.state.addnextVisible}
  2086. dataInfor={this.state.dataInfor}
  2087. onCancel={this.nextCancel}
  2088. />
  2089. }
  2090. </div>
  2091. )
  2092. },
  2093. })
  2094. )
  2095. export default checkOutsourcing