checkOutsourcing.jsx 66 KB

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