checkOutsourcing.jsx 68 KB

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