checkOutsourcing.jsx 67 KB

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