checkOutsourcing.jsx 68 KB

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