checkOutsourcing.jsx 67 KB

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