checkOutsourcing.jsx 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030
  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. <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. <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. {/* <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/>*/}
  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. {/* <ImgList fileList={this.state.replenishUrl} ItemWidth={'96px'}/>*/}
  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. ></Col>
  1653. </Form>
  1654. </Spin>
  1655. </div>
  1656. </div>
  1657. </Spin>
  1658. </Form>
  1659. </TabPane>
  1660. <TabPane tab="外包(不走总部)" key="2">
  1661. <div className="clearfix">
  1662. <FormItem
  1663. className="half-item"
  1664. {...formItemLayout}
  1665. label="外包公司"
  1666. >
  1667. <span>{this.state.companyName}</span>
  1668. </FormItem>
  1669. </div>
  1670. <div className="clearfix">
  1671. <FormItem
  1672. className="half-item"
  1673. {...formItemLayout}
  1674. label="单价(万元)"
  1675. >
  1676. <span>{this.state.unitPrice}</span>
  1677. </FormItem>
  1678. </div>
  1679. <div className="clearfix">
  1680. <FormItem
  1681. className="half-item"
  1682. {...formItemLayout}
  1683. label="数量(个)"
  1684. >
  1685. <span>{this.state.unitNumber}</span>
  1686. </FormItem>
  1687. </div>
  1688. <div className="clearfix">
  1689. <FormItem
  1690. className="half-item"
  1691. {...formItemLayout}
  1692. label="总金额(万元)"
  1693. >
  1694. <span>{this.state.amount}</span>
  1695. </FormItem>
  1696. </div>
  1697. <div className="clearfix">
  1698. <FormItem
  1699. className="half-item"
  1700. {...formItemLayout}
  1701. label="备注"
  1702. >
  1703. <span>{this.state.outsourceRemarks}</span>
  1704. </FormItem>
  1705. </div>
  1706. {/*<div className="clearfix">
  1707. <FormItem className="half-item" style={{height:'auto'}}
  1708. {...formItemLayout}
  1709. label="上传协议文件" >
  1710. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1711. data={(e)=>{
  1712. return {
  1713. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1714. }
  1715. }}
  1716. fileList={this.state.attachmentUrl}
  1717. showUploadList={{showRemoveIcon:false}}
  1718. onPreview={(e)=>{
  1719. let url = window.location.href.substring(7)
  1720. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1721. }}
  1722. >
  1723. </Upload>
  1724. </FormItem>
  1725. </div>*/}
  1726. <div className="clearfix">
  1727. <FormItem
  1728. labelCol={{ span: 4 }}
  1729. wrapperCol={{ span: 18 }}
  1730. label="合同/协议扫描件"
  1731. >
  1732. <Upload
  1733. className="demandDetailShow-upload"
  1734. listType="picture-card"
  1735. fileList={this.state.pictureUrl}
  1736. onPreview={(file) => {
  1737. this.setState({
  1738. previewImage: file.url || file.thumbUrl,
  1739. previewVisible: true,
  1740. })
  1741. }}
  1742. />
  1743. {/*<div style={{paddingTop:'10px',paddingBottom:'10px'}}>*/}
  1744. {/* <ImgList fileList={this.state.pictureUrl} ItemWidth={'96px'}/>*/}
  1745. {/*</div>*/}
  1746. <Modal
  1747. maskClosable={false}
  1748. footer={null}
  1749. width={'50%'}
  1750. visible={this.state.previewVisible}
  1751. onCancel={() => {
  1752. this.setState({ previewVisible: false, rotateDeg: 0 })
  1753. }}
  1754. >
  1755. <img
  1756. alt=""
  1757. style={{
  1758. width: '100%',
  1759. transform: `rotate(${this.state.rotateDeg}deg)`,
  1760. }}
  1761. src={this.state.previewImage || ''}
  1762. />
  1763. <Button
  1764. onClick={this.rotate}
  1765. style={{
  1766. position: 'relative',
  1767. left: '50%',
  1768. transform: 'translateX(-50%)',
  1769. }}
  1770. >
  1771. 旋转
  1772. </Button>
  1773. <Button
  1774. onClick={this.upImg}
  1775. style={{
  1776. position: 'absolute',
  1777. left: -81,
  1778. top: '50%',
  1779. transform: 'translateY(-50%)',
  1780. }}
  1781. >
  1782. 上一张
  1783. </Button>
  1784. <Button
  1785. onClick={this.downImg}
  1786. style={{
  1787. position: 'absolute',
  1788. right: -81,
  1789. top: '50%',
  1790. transform: 'translateY(-50%)',
  1791. }}
  1792. >
  1793. 下一张
  1794. </Button>
  1795. </Modal>
  1796. </FormItem>
  1797. </div>
  1798. {!this.state.refundStatus ? (
  1799. <div>
  1800. <hr className="division" />
  1801. <div className="clearfix" style={{ marginTop: '20px' }}>
  1802. <FormItem
  1803. labelCol={{ span: 4 }}
  1804. wrapperCol={{ span: 18 }}
  1805. label={
  1806. <span>
  1807. <strong style={{ color: '#f00' }}>*</strong>
  1808. 审核意见
  1809. </span>
  1810. }
  1811. >
  1812. <Input
  1813. type="textarea"
  1814. placeholder="请输入备注"
  1815. rows={4}
  1816. value={this.state.remarks}
  1817. onChange={(e) => {
  1818. this.setState({ remarks: e.target.value })
  1819. }}
  1820. style={{ width: '440px' }}
  1821. />
  1822. <span
  1823. className="tip"
  1824. style={{
  1825. width: '160px',
  1826. verticalAlign: 'top',
  1827. display: 'inline-block',
  1828. marginLeft: '10px',
  1829. }}
  1830. >
  1831. 通过或驳回都必须填写审核意见!
  1832. </span>
  1833. </FormItem>
  1834. </div>
  1835. <div className="clearfix fa">
  1836. <Button
  1837. type="danger"
  1838. onClick={this.refuse}
  1839. style={{ color: '#fff', backgroundColor: '#f04134' }}
  1840. >
  1841. 驳回
  1842. </Button>
  1843. <Button type="primary" onClick={this.pass}>
  1844. 通过
  1845. </Button>
  1846. </div>
  1847. </div>
  1848. ) : (
  1849. <div className="clearfix">
  1850. <hr className="division" />
  1851. <div className="clearfix">
  1852. <FormItem
  1853. className="half-item"
  1854. {...formItemLayout}
  1855. label="审核意见"
  1856. >
  1857. <span>{this.state.remarks}</span>
  1858. </FormItem>
  1859. </div>
  1860. <div className="clearfix">
  1861. <FormItem
  1862. className="half-item"
  1863. {...formItemLayout}
  1864. label="审核结果"
  1865. >
  1866. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1867. </FormItem>
  1868. </div>
  1869. <div className="clearfix">
  1870. <FormItem
  1871. className="half-item"
  1872. {...formItemLayout}
  1873. label="审核时间"
  1874. >
  1875. <span>{this.state.auditTimes}</span>
  1876. </FormItem>
  1877. </div>
  1878. </div>
  1879. )}
  1880. </TabPane>
  1881. </Tabs>
  1882. </Modal>
  1883. <Modal
  1884. maskClosable={false}
  1885. visible={this.state.addnextVisible}
  1886. onOk={this.nextCancel}
  1887. onCancel={this.nextCancel}
  1888. confirmLoading={this.state.confirmLoading}
  1889. width="800px"
  1890. title={'项目任务详情'}
  1891. footer=""
  1892. className="admin-desc-content"
  1893. >
  1894. <Form layout="horizontal" id="demand-form">
  1895. <Spin spinning={this.state.loading}>
  1896. <div className="clearfix">
  1897. <FormItem
  1898. className="half-item"
  1899. {...formItemLayout}
  1900. label="项目名称"
  1901. >
  1902. <span>{this.state.commodityName}</span>
  1903. </FormItem>
  1904. <FormItem
  1905. className="half-item"
  1906. {...formItemLayout}
  1907. label="项目数量"
  1908. >
  1909. <span>{this.state.commodityQuantity}</span>
  1910. </FormItem>
  1911. <FormItem
  1912. className="half-item"
  1913. {...formItemLayout}
  1914. label="金额(万元)"
  1915. >
  1916. <span>{this.state.commodityPrice}</span>
  1917. </FormItem>
  1918. <FormItem
  1919. className="half-item"
  1920. {...formItemLayout}
  1921. label="主要项目"
  1922. >
  1923. <span>{getboutique(this.state.main)}</span>
  1924. </FormItem>
  1925. <div className="clearfix">
  1926. <FormItem
  1927. labelCol={{ span: 4 }}
  1928. wrapperCol={{ span: 16 }}
  1929. label="服务说明"
  1930. >
  1931. <span>{this.state.taskComment}</span>
  1932. </FormItem>
  1933. </div>
  1934. </div>
  1935. </Spin>
  1936. </Form>
  1937. </Modal>
  1938. <Modal
  1939. maskClosable={false}
  1940. visible={this.state.noVisible}
  1941. onOk={this.handleOk}
  1942. onCancel={this.noCancel}
  1943. width="400px"
  1944. title={'拒绝理由'}
  1945. footer=""
  1946. className="admin-desc-content"
  1947. confirmLoading={this.state.confirmLoading}
  1948. >
  1949. <Form layout="horizontal" id="demand-form">
  1950. <Spin spinning={this.state.loading}>
  1951. <div className="clearfix">
  1952. <FormItem
  1953. labelCol={{ span: 4 }}
  1954. wrapperCol={{ span: 16 }}
  1955. label="拒绝理由"
  1956. >
  1957. <Input
  1958. type="textarea"
  1959. placeholder="请输入拒绝理由"
  1960. rows={4}
  1961. value={this.state.reason}
  1962. onChange={(e) => {
  1963. this.setState({ reason: e.target.value })
  1964. }}
  1965. />
  1966. </FormItem>
  1967. </div>
  1968. <div className="clearfix">
  1969. <Button
  1970. className="cancel"
  1971. type="primary"
  1972. onClick={this.examOks}
  1973. style={{ marginLeft: '50px' }}
  1974. htmlType="submit"
  1975. loading={this.state.aloading}
  1976. >
  1977. 确定
  1978. </Button>
  1979. <Button
  1980. className="cancel"
  1981. type="ghost"
  1982. onClick={this.noCancel}
  1983. style={{ marginLeft: '50px' }}
  1984. >
  1985. 取消
  1986. </Button>
  1987. </div>
  1988. </Spin>
  1989. </Form>
  1990. </Modal>
  1991. <Modal
  1992. visible={this.state.rizhivisible}
  1993. className="admin-desc-content"
  1994. width="800px"
  1995. maskClosable={false}
  1996. title="订单日志"
  1997. footer={null}
  1998. onCancel={this.closeOrderLog}
  1999. >
  2000. <div className="patent-table">
  2001. <Spin spinning={this.state.loading}>
  2002. <Table
  2003. columns={this.state.columnsrizhi}
  2004. dataSource={this.state.dataSourcerizhi}
  2005. pagination={false}
  2006. bordered
  2007. size="small"
  2008. />
  2009. </Spin>
  2010. </div>
  2011. </Modal>
  2012. </div>
  2013. )
  2014. },
  2015. })
  2016. )
  2017. export default checkOutsourcing