checkOutsourcing.jsx 68 KB

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