checkOutsourcing.jsx 67 KB

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