checkOutsourcing.jsx 69 KB

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