checkOutsourcing.jsx 70 KB

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