checkOutsourcing.jsx 66 KB

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