checkOutsourcing.jsx 67 KB

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