checkOutsourcing.jsx 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043
  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. const checkOutsourcing = Form.create()(
  34. React.createClass({
  35. loadData(pageNo) {
  36. this.setState({
  37. visitModul: false,
  38. loading: true,
  39. ispage: pageNo,
  40. modalVisible: false,
  41. })
  42. $.ajax({
  43. method: 'get',
  44. dataType: 'json',
  45. crossDomain: false,
  46. url:
  47. globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceList',
  48. data: {
  49. pageNo: pageNo || 1,
  50. pageSize: this.state.pagination.pageSize,
  51. contractNo: this.state.contractNoSearch,
  52. name: this.state.nameSearch, //名称
  53. starTime: this.state.releaseDate[0], //开始时间
  54. endTime: this.state.releaseDate[1], //结束时间
  55. refundStatus: this.state.refundStatusSearch, //外包审核状态
  56. type: 0,
  57. },
  58. success: function (data) {
  59. let theArr = []
  60. if (data.error.length || data.data.list == '') {
  61. if (data.error && data.error.length) {
  62. message.warning(data.error[0].message)
  63. }
  64. } else {
  65. for (let i = 0; i < data.data.list.length; i++) {
  66. let thisdata = data.data.list[i]
  67. theArr.push({
  68. key: i,
  69. id: thisdata.id, //用户ID
  70. orderNo: thisdata.orderNo, //订单编号
  71. contractNo: thisdata.contractNo, //签单金额
  72. createTime: thisdata.createTime, //流程状态
  73. signTime: thisdata.signTime, //结算状态
  74. userName: thisdata.userName, //特批状态
  75. depName: thisdata.depName, //签单时间
  76. totalAmount: thisdata.totalAmount, //客户名称
  77. adminName: thisdata.adminName, //营销员名称
  78. financeName: thisdata.financeName, //财务名称
  79. liquidationStatus: thisdata.liquidationStatus, //下单时间
  80. refundStatus: thisdata.refundStatus,
  81. })
  82. }
  83. this.state.pagination.total = data.data.totalCount
  84. this.state.pagination.current = data.data.pageNo
  85. }
  86. if (data.data && data.data.list && !data.data.list.length) {
  87. this.state.pagination.total = 0
  88. }
  89. this.setState({
  90. dataSource: theArr,
  91. pageNo: pageNo,
  92. pagination: this.state.pagination,
  93. selectedRowKeys: [],
  94. })
  95. }.bind(this),
  96. }).always(
  97. function () {
  98. this.setState({
  99. loading: false,
  100. })
  101. }.bind(this)
  102. )
  103. },
  104. getInitialState() {
  105. return {
  106. rotateDeg: 0,
  107. page: 1,
  108. releaseDate: [],
  109. selectedRowKeys: [],
  110. pictureUrl: [],
  111. attachmentUrl: [],
  112. paginations: false,
  113. activeKey: '1',
  114. confirmLoading: false,
  115. aloading: false,
  116. pagination: {
  117. defaultCurrent: 1,
  118. defaultPageSize: 10,
  119. showQuickJumper: true,
  120. pageSize: 10,
  121. onChange: function (page) {
  122. this.loadData(page)
  123. }.bind(this),
  124. showTotal: function (total) {
  125. return '共' + total + '条数据'
  126. },
  127. },
  128. columns: [
  129. {
  130. title: '订单编号',
  131. dataIndex: 'orderNo',
  132. key: 'orderNo',
  133. },
  134. {
  135. title: '合同编号',
  136. dataIndex: 'contractNo',
  137. key: 'contractNo',
  138. },
  139. {
  140. title: '创建时间',
  141. dataIndex: 'createTime',
  142. key: 'createTime',
  143. },
  144. {
  145. title: '签单时间',
  146. dataIndex: 'signTime',
  147. key: 'signTime',
  148. },
  149. {
  150. title: '客户名称',
  151. dataIndex: 'userName',
  152. key: 'userName',
  153. },
  154. {
  155. title: '订单部门',
  156. dataIndex: 'depName',
  157. key: 'depName',
  158. },
  159. {
  160. title: '签单金额(万元)',
  161. dataIndex: 'totalAmount',
  162. key: 'totalAmount',
  163. },
  164. {
  165. title: '结算状态',
  166. dataIndex: 'liquidationStatus',
  167. key: 'liquidationStatus',
  168. render: (text) => {
  169. return getLiquidationStatus(text)
  170. },
  171. },
  172. {
  173. title: '外包审核',
  174. dataIndex: 'refundStatus',
  175. key: 'refundStatus',
  176. render: (text) => {
  177. if (text == 0) {
  178. return <Tag color="#f50">待审核</Tag>
  179. } else if (text == 1) {
  180. return <Tag color="#87d068">审核通过</Tag>
  181. } else if (text == 2) {
  182. return <Tag color="#2db7f5">审核驳回</Tag>
  183. }
  184. },
  185. },
  186. {
  187. title: '营销负责人',
  188. dataIndex: 'adminName',
  189. key: 'adminName',
  190. },
  191. {
  192. title: '财务负责人',
  193. dataIndex: 'financeName',
  194. key: 'financeName',
  195. },
  196. ],
  197. data: [],
  198. dataSource: [],
  199. columnsX: [
  200. {
  201. title: '业务项目名称',
  202. dataIndex: 'commodityName',
  203. key: 'commodityName',
  204. render: (text, record) => {
  205. return text + '-' + record.id
  206. },
  207. },
  208. {
  209. title: '项目类别',
  210. dataIndex: 'cname',
  211. key: 'cname',
  212. },
  213. {
  214. title: '项目数量',
  215. dataIndex: 'commodityQuantity',
  216. key: 'commodityQuantity',
  217. render: (text, record) => {
  218. if (record.splitStatus == 1) {
  219. return (
  220. <span>
  221. {text}{' '}
  222. <Tag
  223. color="#108ee9"
  224. onClick={(e) => {
  225. e.stopPropagation()
  226. this.showRes(record)
  227. }}
  228. >
  229. 已拆
  230. </Tag>
  231. </span>
  232. )
  233. } else {
  234. return text
  235. }
  236. },
  237. },
  238. {
  239. title: '金额(万元)',
  240. dataIndex: 'commodityPrice',
  241. key: 'commodityPrice',
  242. },
  243. {
  244. title: '负责人',
  245. dataIndex: 'contacts',
  246. key: 'contacts',
  247. },
  248. {
  249. title: '负责人电话',
  250. dataIndex: 'contactsMobile',
  251. key: 'contactsMobile',
  252. },
  253. {
  254. title: '项目状态',
  255. dataIndex: 'projectStatus',
  256. key: 'projectStatus',
  257. render: (text) => {
  258. return getProjectStatus(text)
  259. },
  260. },
  261. {
  262. title: '主要项目',
  263. dataIndex: 'main',
  264. key: 'main',
  265. render: (text) => {
  266. return text ? '是' : '否'
  267. },
  268. },
  269. {
  270. title: '项目说明',
  271. dataIndex: 'taskComment',
  272. key: 'taskComment',
  273. render: (text) => {
  274. return text && text.length > 8 ? text.substr(0, 8) + '…' : text
  275. },
  276. },
  277. ],
  278. columnsrizhi: [
  279. {
  280. title: '流程',
  281. dataIndex: 'processName',
  282. key: 'processName',
  283. },
  284. {
  285. title: '操作人',
  286. dataIndex: 'adminName',
  287. key: 'adminName',
  288. },
  289. {
  290. title: '时间',
  291. dataIndex: 'createDate',
  292. key: 'createDate',
  293. },
  294. {
  295. title: '备注',
  296. dataIndex: 'remarks',
  297. key: 'remarks',
  298. },
  299. ],
  300. dataSourceX: [],
  301. ContactsListsNew: [
  302. {
  303. title: '项目名称',
  304. dataIndex: 'commodityName',
  305. key: 'commodityName',
  306. render: (text, record) => {
  307. return <span>{text + '-' + record.tid}</span>
  308. },
  309. },
  310. {
  311. title: '项目分类',
  312. dataIndex: 'projectType',
  313. key: 'projectType',
  314. render: (text) => {
  315. let arr = this.state.dataSourceX || []
  316. let str = ''
  317. for (let i = 0; i < arr.length; i++) {
  318. if (this.state.dataSourceX[i].sort == text) {
  319. str = this.state.dataSourceX[i].cname
  320. return <span>{str}</span>
  321. }
  322. }
  323. },
  324. },
  325. {
  326. title: '催款科目',
  327. dataIndex: 'dunTypeName',
  328. key: 'dunTypeName',
  329. render: (text, record) => {
  330. if (record.customizeName) {
  331. return text + record.customizeName
  332. }
  333. return <span>{text}</span>
  334. },
  335. },
  336. {
  337. title: '时间(天)',
  338. dataIndex: 'waitDay',
  339. key: 'waitDay',
  340. render: (text, record) => {
  341. if (record.dunTypeName) {
  342. if (record.customizeTimes) {
  343. return record.customizeTimes
  344. }
  345. return <span>{text}</span>
  346. }
  347. },
  348. },
  349. {
  350. title: '金额(万元)',
  351. dataIndex: 'money',
  352. key: 'money',
  353. render: (text, record) => {
  354. if (record.dunTypeName) {
  355. if (record.appropriationRatio && !record.money) {
  356. return <span>{record.appropriationRatio}(拨款比例)</span>
  357. } else if (record.appropriationRatio && record.money) {
  358. return (
  359. <span>
  360. {text}(比例:{record.appropriationRatio})
  361. </span>
  362. )
  363. } else {
  364. return <span>{text}</span>
  365. }
  366. }
  367. },
  368. },
  369. {
  370. title: '服务年限',
  371. dataIndex: 'startDate',
  372. key: 'startDate',
  373. render: (text, record) => {
  374. if (record.dunTypeName) {
  375. return <span>{text}</span>
  376. }
  377. },
  378. },
  379. {
  380. title: '催款状态',
  381. dataIndex: 'status',
  382. key: 'status',
  383. render: (text) => {
  384. return <span>{text == 1 ? '已启动' : '未启动'}</span>
  385. },
  386. },
  387. ],
  388. ContactsLists: [
  389. {
  390. title: '催款科目',
  391. dataIndex: 'dunSubject',
  392. key: 'dunSubject',
  393. render: (text) => {
  394. return getjiedian(text)
  395. },
  396. },
  397. {
  398. title: '金额(万元)',
  399. dataIndex: 'money',
  400. key: 'money',
  401. },
  402. {
  403. title: '催款状态',
  404. dataIndex: 'dunStatus',
  405. key: 'dunStatus',
  406. render: (text) => {
  407. return getCuikuan(text)
  408. },
  409. },
  410. ],
  411. resVisible: false,
  412. }
  413. },
  414. //页面加载函数
  415. componentWillMount() {
  416. this.loadData()
  417. },
  418. //整行点击
  419. tableRowClick(record) {
  420. this.setState({
  421. visible: true,
  422. refundStatus: record.refundStatus,
  423. })
  424. this.xiangqing(record.orderNo)
  425. this.xiangmu(record.orderNo)
  426. this.jiedian(record.orderNo)
  427. this.jiedianNew(record.orderNo)
  428. },
  429. // 拆分详细
  430. showRes(record) {
  431. this.setState({
  432. resVisible: true,
  433. resRecord: record,
  434. })
  435. },
  436. resCancel() {
  437. this.setState({
  438. resVisible: false,
  439. })
  440. },
  441. //点击打卡项目详情
  442. tableRowClickX(record) {
  443. this.setState({
  444. jid: record.id, //项目ID
  445. kid: record.commodityId, //商品ID
  446. commodityName: record.commodityName, //金额
  447. commodityPrice: record.commodityPrice, //金额
  448. commodityQuantity: record.commodityQuantity, //数量
  449. taskComment: record.taskComment, //备注
  450. main: record.main.toString(), //是否为主要
  451. addnextVisible: true,
  452. addState: 0,
  453. })
  454. },
  455. //项目详情关闭
  456. nextCancel() {
  457. this.setState({
  458. addnextVisible: false,
  459. })
  460. },
  461. //订单详情
  462. xiangqing(orderNos) {
  463. $.ajax({
  464. method: 'get',
  465. dataType: 'json',
  466. crossDomain: false,
  467. url: globalConfig.context + '/api/admin/newOrder/getOrderNewDetail',
  468. data: {
  469. orderNo: orderNos,
  470. },
  471. success: function (data) {
  472. if (data.error.length || data.data.list == '') {
  473. if (data.error && data.error.length) {
  474. message.warning(data.error[0].message)
  475. }
  476. } else {
  477. let thisdata = data.data
  478. this.setState({
  479. orderNo: thisdata.orderNo, //订单编号
  480. contractNo: thisdata.contractNo, //合同编号
  481. userName: thisdata.userName, //客户名称
  482. signDate: thisdata.signDate, //签单时间
  483. processStatus: thisdata.processStatus, //流程状态
  484. liquidationStatus: thisdata.liquidationStatus, //结算状态
  485. contacts: thisdata.contacts, //企业联系人
  486. contactMobile: thisdata.contactMobile, //联系人电话
  487. legalPerson: thisdata.legalPerson, //法人
  488. legalPersonTel: thisdata.legalPersonTel, //法人电话
  489. firstAmount: thisdata.firstAmount, //签单金额
  490. totalAmount: thisdata.totalAmount, //首付金额
  491. approval: thisdata.approval, //特批状态
  492. settlementAmount: thisdata.settlementAmount, //已收款项
  493. orderRemarks: thisdata.orderRemarks, //订单留言
  494. orgCodeUrl: thisdata.contractPictureUrl
  495. ? splitUrl(
  496. thisdata.contractPictureUrl,
  497. ',',
  498. globalConfig.avatarHost + '/upload'
  499. )
  500. : [], //图片地址
  501. replenishUrl: thisdata.agreementUrl
  502. ? splitUrl(
  503. thisdata.agreementUrl,
  504. ',',
  505. globalConfig.avatarHost + '/upload'
  506. )
  507. : [],
  508. salesmanName: thisdata.salesmanName, //营销员名称
  509. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  510. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  511. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  512. financeName: thisdata.financeName, //财务名称
  513. financeMobile: thisdata.financeMobile, //财务电话
  514. nowFinance: thisdata.nowFinance, //财务名称
  515. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  516. depName: thisdata.depName,
  517. outsource: thisdata.outsource == 0 ? '否' : '是',
  518. })
  519. }
  520. }.bind(this),
  521. }).always(
  522. function () {
  523. this.setState({
  524. loading: false,
  525. })
  526. }.bind(this)
  527. )
  528. },
  529. //项目列表
  530. xiangmu(orderNos) {
  531. $.ajax({
  532. method: 'get',
  533. dataType: 'json',
  534. crossDomain: false,
  535. url: globalConfig.context + '/api/admin/newOrder/getOrderTask',
  536. data: {
  537. orderNo: orderNos,
  538. },
  539. success: function (data) {
  540. let theArr = []
  541. if (data.error.length || data.data.list == '') {
  542. if (data.error && data.error.length) {
  543. message.warning(data.error[0].message)
  544. }
  545. } else {
  546. for (let i = 0; i < data.data.length; i++) {
  547. let thisdata = data.data[i]
  548. theArr.push({
  549. key: i,
  550. id: thisdata.id,
  551. orderNo: thisdata.orderNo, //订单编号
  552. commodityId: thisdata.commodityId, //项目ID
  553. commodityName: thisdata.commodityName, //项目名称
  554. cname: thisdata.cname, //项目类别
  555. commodityPrice: thisdata.commodityPrice, //项目价格
  556. commodityQuantity: thisdata.commodityQuantity, //项目数量
  557. main: thisdata.main, //是否为主要任务
  558. taskComment: thisdata.taskComment, //任务说明
  559. contacts: thisdata.contacts, //联系人
  560. contactsMobile: thisdata.contactsMobile, //联系人电话
  561. projectStatus: thisdata.projectStatus, //项目状态
  562. splitStatus: thisdata.splitStatus,
  563. sort: thisdata.cSort,
  564. })
  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. $.ajax({
  941. method: 'post',
  942. dataType: 'json',
  943. crossDomain: false,
  944. url: globalConfig.context + '/api/admin/outsourceOrg/auditOutsourceNew',
  945. data: {
  946. id: this.state.id,
  947. remarks: this.state.remarks,
  948. refundStatus: 1,
  949. orderNo: this.state.orderNo,
  950. type: 0,
  951. },
  952. success: function (data) {
  953. if (data.error && data.error.length) {
  954. message.warning(data.error[0].message)
  955. } else {
  956. message.success('已通过!')
  957. }
  958. },
  959. }).done(
  960. function () {
  961. this.setState({
  962. loading: false,
  963. remarks: '',
  964. })
  965. this.visitCancel()
  966. }.bind(this)
  967. )
  968. },
  969. refuse() {
  970. $.ajax({
  971. method: 'post',
  972. dataType: 'json',
  973. crossDomain: false,
  974. url: globalConfig.context + '/api/admin/outsourceOrg/auditOutsourceNew',
  975. data: {
  976. id: this.state.id,
  977. remarks: this.state.remarks,
  978. refundStatus: 2,
  979. orderNo: this.state.orderNo,
  980. },
  981. success: function (data) {
  982. if (data.error && data.error.length) {
  983. message.warning(data.error[0].message)
  984. } else {
  985. message.success('已驳回!')
  986. }
  987. },
  988. }).done(
  989. function () {
  990. this.setState({
  991. loading: false,
  992. remarks: '',
  993. })
  994. this.visitCancel()
  995. }.bind(this)
  996. )
  997. },
  998. //关闭输入理由框
  999. noCancel() {
  1000. this.setState({
  1001. noVisible: false,
  1002. aloading: false,
  1003. reason: '',
  1004. })
  1005. },
  1006. //搜索
  1007. search() {
  1008. this.setState({
  1009. //signBillVisible:false
  1010. })
  1011. this.loadData()
  1012. },
  1013. //重置
  1014. reset() {
  1015. this.state.nameSearch = ''
  1016. this.state.contractNoSearch = ''
  1017. this.state.releaseDate[0] = undefined
  1018. this.state.releaseDate[1] = undefined
  1019. this.state.refundStatusSearch = undefined
  1020. this.loadData(1)
  1021. },
  1022. resets() {
  1023. this.state.orderNo = ''
  1024. this.state.customerName = ''
  1025. this.state.releaseDate[0] = undefined
  1026. this.state.releaseDate[1] = undefined
  1027. },
  1028. getOrgCodeUrl(e) {
  1029. this.setState({ pictureUrl: e })
  1030. },
  1031. //关闭详情
  1032. visitCancel() {
  1033. this.setState(
  1034. {
  1035. visible: false,
  1036. },
  1037. () => {
  1038. this.setState({
  1039. activeKey: '1',
  1040. })
  1041. }
  1042. )
  1043. this.resets()
  1044. this.loadData(this.state.pagination.current)
  1045. },
  1046. visitOk() {
  1047. this.setState({
  1048. visible: false,
  1049. })
  1050. this.resets()
  1051. },
  1052. downImg() {
  1053. let num = 0
  1054. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1055. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1056. num = i
  1057. }
  1058. }
  1059. if (num == this.state.orgCodeUrl.length - 1) {
  1060. return message.warning('已经是最后一张了哦')
  1061. }
  1062. this.state.previewImage = this.state.orgCodeUrl[num + 1].url
  1063. this.setState({
  1064. previewImage: this.state.previewImage,
  1065. rotateDeg: 0,
  1066. })
  1067. },
  1068. upImg() {
  1069. let num = 0
  1070. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1071. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1072. num = i
  1073. }
  1074. }
  1075. if (num == 0) {
  1076. return message.warning('已经是第一张了哦')
  1077. }
  1078. this.state.previewImage = this.state.orgCodeUrl[num - 1].url
  1079. this.setState({
  1080. previewImage: this.state.previewImage,
  1081. rotateDeg: 0,
  1082. })
  1083. },
  1084. rotate() {
  1085. let rotateDeg = this.state.rotateDeg + 90
  1086. this.setState({
  1087. rotateDeg,
  1088. })
  1089. },
  1090. downImgs() {
  1091. let num = 0
  1092. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1093. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1094. num = i
  1095. }
  1096. }
  1097. if (num == this.state.replenishUrl.length - 1) {
  1098. return message.warning('已经是最后一张了哦')
  1099. }
  1100. this.state.previewImage = this.state.replenishUrl[num + 1].url
  1101. this.setState({
  1102. previewImage: this.state.previewImage,
  1103. rotateDeg: 0,
  1104. })
  1105. },
  1106. upImgs() {
  1107. let num = 0
  1108. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1109. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1110. num = i
  1111. }
  1112. }
  1113. if (num == 0) {
  1114. return message.warning('已经是第一张了哦')
  1115. }
  1116. this.state.previewImage = this.state.replenishUrl[num - 1].url
  1117. this.setState({
  1118. previewImage: this.state.previewImage,
  1119. rotateDeg: 0,
  1120. })
  1121. },
  1122. rotates() {
  1123. let rotateDeg = this.state.rotateDeg + 90
  1124. this.setState({
  1125. rotateDeg,
  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. </Tabs>
  1214. <div className="patent-table">
  1215. <Spin spinning={this.state.loading}>
  1216. <Table
  1217. columns={this.state.columns}
  1218. dataSource={this.state.dataSource}
  1219. pagination={this.state.pagination}
  1220. onRowClick={this.tableRowClick}
  1221. bordered
  1222. size="small"
  1223. />
  1224. </Spin>
  1225. </div>
  1226. <Modal
  1227. className="customeDetails"
  1228. footer=""
  1229. width="900px"
  1230. visible={this.state.visible}
  1231. onOk={this.visitOk}
  1232. onCancel={this.visitCancel}
  1233. >
  1234. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1235. <TabPane tab="订单详情" key="1">
  1236. <Form
  1237. layout="horizontal"
  1238. onSubmit={this.handleSubmit}
  1239. id="demand-form"
  1240. style={{ paddingBottom: '40px' }}
  1241. >
  1242. <Spin spinning={this.state.loading}>
  1243. <div className="clearfix">
  1244. <FormItem
  1245. className="half-item"
  1246. {...formItemLayout}
  1247. label="订单编号"
  1248. >
  1249. <span>{this.state.orderNo}</span>
  1250. </FormItem>
  1251. <FormItem
  1252. className="half-item"
  1253. {...formItemLayout}
  1254. label="合同编号"
  1255. >
  1256. <span>{this.state.contractNo}</span>
  1257. </FormItem>
  1258. <FormItem
  1259. className="half-item"
  1260. {...formItemLayout}
  1261. label="客户名称"
  1262. >
  1263. <span>{this.state.userName}</span>
  1264. </FormItem>
  1265. <FormItem
  1266. className="half-item"
  1267. {...formItemLayout}
  1268. label="合同签订时间"
  1269. >
  1270. <span>{this.state.signDate}</span>
  1271. </FormItem>
  1272. <FormItem
  1273. className="half-item"
  1274. {...formItemLayout}
  1275. label="流程状态"
  1276. >
  1277. <span>
  1278. {getProcessStatus(this.state.processStatus)}
  1279. </span>
  1280. </FormItem>
  1281. <FormItem
  1282. className="half-item"
  1283. {...formItemLayout}
  1284. label="结算状态"
  1285. >
  1286. <span>
  1287. {getLiquidationStatus(this.state.liquidationStatus)}
  1288. </span>
  1289. </FormItem>
  1290. <FormItem
  1291. className="half-item"
  1292. {...formItemLayout}
  1293. label="企业联系人"
  1294. >
  1295. <span>{this.state.contacts}</span>
  1296. </FormItem>
  1297. <FormItem
  1298. className="half-item"
  1299. {...formItemLayout}
  1300. label="联系人电话"
  1301. >
  1302. <span>{this.state.contactMobile}</span>
  1303. </FormItem>
  1304. <FormItem
  1305. className="half-item"
  1306. {...formItemLayout}
  1307. label="企业法人"
  1308. >
  1309. <span>{this.state.legalPerson}</span>
  1310. </FormItem>
  1311. <FormItem
  1312. className="half-item"
  1313. {...formItemLayout}
  1314. label="法人电话"
  1315. >
  1316. <span>{this.state.legalPersonTel}</span>
  1317. </FormItem>
  1318. <FormItem
  1319. className="half-item"
  1320. {...formItemLayout}
  1321. label="签单金额(万元)"
  1322. >
  1323. <span>{this.state.totalAmount}</span>
  1324. </FormItem>
  1325. <FormItem
  1326. className="half-item"
  1327. {...formItemLayout}
  1328. label="首付金额(万元)"
  1329. >
  1330. <span>{this.state.firstAmount}</span>
  1331. </FormItem>
  1332. <FormItem
  1333. className="half-item"
  1334. {...formItemLayout}
  1335. label="特批立项"
  1336. >
  1337. <span>{getApprovedState(this.state.approval)}</span>
  1338. </FormItem>
  1339. <FormItem
  1340. className="half-item"
  1341. {...formItemLayout}
  1342. label="已收款项(万元)"
  1343. >
  1344. <span>{this.state.settlementAmount}</span>
  1345. </FormItem>
  1346. <FormItem
  1347. className="half-item"
  1348. {...formItemLayout}
  1349. label="订单部门"
  1350. >
  1351. <span>{this.state.depName}</span>
  1352. </FormItem>
  1353. <FormItem
  1354. className="half-item"
  1355. {...formItemLayout}
  1356. label="是否外包"
  1357. >
  1358. <span>{this.state.outsource}</span>
  1359. </FormItem>
  1360. <div className="clearfix">
  1361. <FormItem
  1362. labelCol={{ span: 4 }}
  1363. wrapperCol={{ span: 16 }}
  1364. label="订单留言"
  1365. >
  1366. <span>{this.state.orderRemarks}</span>
  1367. </FormItem>
  1368. </div>
  1369. <div className="clearfix">
  1370. <FormItem
  1371. labelCol={{ span: 4 }}
  1372. wrapperCol={{ span: 18 }}
  1373. label="合同扫描件"
  1374. >
  1375. {/*<Upload*/}
  1376. {/* className="demandDetailShow-upload"*/}
  1377. {/* listType="picture-card"*/}
  1378. {/* fileList={this.state.orgCodeUrl}*/}
  1379. {/* onPreview={(file) => {*/}
  1380. {/* this.setState({*/}
  1381. {/* previewImage: file.url || file.thumbUrl,*/}
  1382. {/* previewVisible: true,*/}
  1383. {/* })*/}
  1384. {/* }}*/}
  1385. {/*/>*/}
  1386. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1387. <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/>
  1388. </div>
  1389. <Modal
  1390. maskClosable={false}
  1391. footer={null}
  1392. width={'50%'}
  1393. visible={this.state.previewVisible}
  1394. onCancel={() => {
  1395. this.setState({
  1396. previewVisible: false,
  1397. rotateDeg: 0,
  1398. })
  1399. }}
  1400. >
  1401. <img
  1402. alt=""
  1403. style={{
  1404. width: '100%',
  1405. transform: `rotate(${this.state.rotateDeg}deg)`,
  1406. }}
  1407. src={this.state.previewImage || ''}
  1408. />
  1409. <Button
  1410. onClick={this.rotate}
  1411. style={{
  1412. position: 'relative',
  1413. left: '50%',
  1414. transform: 'translateX(-50%)',
  1415. }}
  1416. >
  1417. 旋转
  1418. </Button>
  1419. <Button
  1420. onClick={this.upImg}
  1421. style={{
  1422. position: 'absolute',
  1423. left: -81,
  1424. top: '50%',
  1425. transform: 'translateY(-50%)',
  1426. }}
  1427. >
  1428. 上一张
  1429. </Button>
  1430. <Button
  1431. onClick={this.downImg}
  1432. style={{
  1433. position: 'absolute',
  1434. right: -81,
  1435. top: '50%',
  1436. transform: 'translateY(-50%)',
  1437. }}
  1438. >
  1439. 下一张
  1440. </Button>
  1441. </Modal>
  1442. <Button
  1443. style={{
  1444. float: 'right',
  1445. marginRight: '140px',
  1446. marginTop: '20px',
  1447. }}
  1448. onClick={this.getOrderLog}
  1449. >
  1450. 查看订单日志
  1451. </Button>
  1452. </FormItem>
  1453. <FormItem
  1454. labelCol={{ span: 4 }}
  1455. wrapperCol={{ span: 18 }}
  1456. label="补充协议"
  1457. >
  1458. {/*<Upload*/}
  1459. {/* className="demandDetailShow-upload"*/}
  1460. {/* listType="picture-card"*/}
  1461. {/* fileList={this.state.replenishUrl}*/}
  1462. {/* onPreview={(file) => {*/}
  1463. {/* this.setState({*/}
  1464. {/* previewImage: file.url || file.thumbUrl,*/}
  1465. {/* previewVisibles: true,*/}
  1466. {/* })*/}
  1467. {/* }}*/}
  1468. {/*/>*/}
  1469. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1470. <ImgList fileList={this.state.replenishUrl} ItemWidth={'96px'}/>
  1471. </div>
  1472. <Modal
  1473. maskClosable={false}
  1474. footer={null}
  1475. width={'50%'}
  1476. visible={this.state.previewVisibles}
  1477. onCancel={() => {
  1478. this.setState({
  1479. previewVisibles: false,
  1480. rotateDeg: 0,
  1481. })
  1482. }}
  1483. >
  1484. <img
  1485. alt=""
  1486. style={{
  1487. width: '100%',
  1488. transform: `rotate(${this.state.rotateDeg}deg)`,
  1489. }}
  1490. src={this.state.previewImage || ''}
  1491. />
  1492. <Button
  1493. onClick={this.rotates}
  1494. style={{
  1495. position: 'relative',
  1496. left: '50%',
  1497. transform: 'translateX(-50%)',
  1498. }}
  1499. >
  1500. 旋转
  1501. </Button>
  1502. <Button
  1503. onClick={this.upImgs}
  1504. style={{
  1505. position: 'absolute',
  1506. left: -81,
  1507. top: '50%',
  1508. transform: 'translateY(-50%)',
  1509. }}
  1510. >
  1511. 上一张
  1512. </Button>
  1513. <Button
  1514. onClick={this.downImgs}
  1515. style={{
  1516. position: 'absolute',
  1517. right: -81,
  1518. top: '50%',
  1519. transform: 'translateY(-50%)',
  1520. }}
  1521. >
  1522. 下一张
  1523. </Button>
  1524. </Modal>
  1525. </FormItem>
  1526. </div>
  1527. <div className="clearfix">
  1528. <FormItem
  1529. className="half-item"
  1530. {...formItemLayout}
  1531. label="订单负责人"
  1532. >
  1533. <span>{this.state.salesmanName}</span>
  1534. </FormItem>
  1535. <FormItem
  1536. className="half-item"
  1537. {...formItemLayout}
  1538. label="订单负责人电话"
  1539. >
  1540. <span>{this.state.salesmanMobile}</span>
  1541. </FormItem>
  1542. </div>
  1543. <div className="clearfix">
  1544. <FormItem
  1545. className="half-item"
  1546. {...formItemLayout}
  1547. label="当前财务负责人"
  1548. >
  1549. <span>{this.state.nowFinance}</span>
  1550. </FormItem>
  1551. <FormItem
  1552. className="half-item"
  1553. {...formItemLayout}
  1554. label="当前财务负责人电话"
  1555. >
  1556. <span>{this.state.nowFinanceMobile}</span>
  1557. </FormItem>
  1558. </div>
  1559. <div className="clearfix">
  1560. <FormItem
  1561. className="half-item"
  1562. {...formItemLayout}
  1563. style={{ opacity: '.5' }}
  1564. label="原订单负责人"
  1565. >
  1566. <span>{this.state.oldSalesmanName}</span>
  1567. </FormItem>
  1568. <FormItem
  1569. className="half-item"
  1570. {...formItemLayout}
  1571. style={{ opacity: '.5' }}
  1572. label="原订单负责人电话"
  1573. >
  1574. <span>{this.state.oldSalesmanMobile}</span>
  1575. </FormItem>
  1576. </div>
  1577. <div className="clearfix">
  1578. <FormItem
  1579. className="half-item"
  1580. style={{ opacity: '.5' }}
  1581. {...formItemLayout}
  1582. label="实际财务操作人"
  1583. >
  1584. <span>{this.state.financeName}</span>
  1585. </FormItem>
  1586. <FormItem
  1587. className="half-item"
  1588. {...formItemLayout}
  1589. style={{ opacity: '.5' }}
  1590. label="实际财务操作人电话"
  1591. >
  1592. <span>{this.state.financeMobile}</span>
  1593. </FormItem>
  1594. </div>
  1595. <div>
  1596. <span style={{ marginLeft: '50px', fontSize: '20px' }}>
  1597. 项目业务
  1598. </span>
  1599. {this.state.processStatus == 0 ? (
  1600. <Button
  1601. type="primary"
  1602. onClick={this.addDetailed}
  1603. style={{
  1604. float: 'right',
  1605. marginRight: '50px',
  1606. marginBottom: '15px',
  1607. }}
  1608. >
  1609. 添加项目明细
  1610. </Button>
  1611. ) : (
  1612. ''
  1613. )}
  1614. </div>
  1615. <div className="patent-table">
  1616. <Spin spinning={this.state.loading}>
  1617. <Table
  1618. columns={this.state.columnsX}
  1619. dataSource={this.state.dataSourceX}
  1620. pagination={this.state.paginations}
  1621. onRowClick={this.tableRowClickX}
  1622. bordered
  1623. size="small"
  1624. />
  1625. </Spin>
  1626. </div>
  1627. <div>
  1628. <span style={{ marginLeft: 20, fontSize: '18px' }}>
  1629. 催款节点
  1630. </span>
  1631. <span
  1632. style={{
  1633. display: cuiDataList.length
  1634. ? 'none'
  1635. : 'inline-block',
  1636. marginLeft: 10,
  1637. color: 'red',
  1638. }}
  1639. >
  1640. 金额总计(万元): {this.state.totalCui}
  1641. </span>
  1642. </div>
  1643. <div className="clearfix">
  1644. <Spin spinning={this.state.loading}>
  1645. <Form layout="horizontal" id="demand-form">
  1646. <Table
  1647. pagination={false}
  1648. bordered
  1649. size="small"
  1650. columns={
  1651. cuiDataList.length
  1652. ? this.state.ContactsLists
  1653. : this.state.ContactsListsNew
  1654. }
  1655. dataSource={
  1656. cuiDataList.length
  1657. ? this.state.contactList
  1658. : this.state.contactListNew
  1659. }
  1660. />
  1661. <Col
  1662. span={24}
  1663. offset={9}
  1664. style={{ marginTop: '15px' }}
  1665. ></Col>
  1666. </Form>
  1667. </Spin>
  1668. </div>
  1669. </div>
  1670. </Spin>
  1671. </Form>
  1672. </TabPane>
  1673. <TabPane tab="外包(不走总部)" key="2">
  1674. <div className="clearfix">
  1675. <FormItem
  1676. className="half-item"
  1677. {...formItemLayout}
  1678. label="外包公司"
  1679. >
  1680. <span>{this.state.companyName}</span>
  1681. </FormItem>
  1682. </div>
  1683. <div className="clearfix">
  1684. <FormItem
  1685. className="half-item"
  1686. {...formItemLayout}
  1687. label="单价(万元)"
  1688. >
  1689. <span>{this.state.unitPrice}</span>
  1690. </FormItem>
  1691. </div>
  1692. <div className="clearfix">
  1693. <FormItem
  1694. className="half-item"
  1695. {...formItemLayout}
  1696. label="数量(个)"
  1697. >
  1698. <span>{this.state.unitNumber}</span>
  1699. </FormItem>
  1700. </div>
  1701. <div className="clearfix">
  1702. <FormItem
  1703. className="half-item"
  1704. {...formItemLayout}
  1705. label="总金额(万元)"
  1706. >
  1707. <span>{this.state.amount}</span>
  1708. </FormItem>
  1709. </div>
  1710. <div className="clearfix">
  1711. <FormItem
  1712. className="half-item"
  1713. {...formItemLayout}
  1714. label="备注"
  1715. >
  1716. <span>{this.state.outsourceRemarks}</span>
  1717. </FormItem>
  1718. </div>
  1719. {/*<div className="clearfix">
  1720. <FormItem className="half-item" style={{height:'auto'}}
  1721. {...formItemLayout}
  1722. label="上传协议文件" >
  1723. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1724. data={(e)=>{
  1725. return {
  1726. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1727. }
  1728. }}
  1729. fileList={this.state.attachmentUrl}
  1730. showUploadList={{showRemoveIcon:false}}
  1731. onPreview={(e)=>{
  1732. let url = window.location.href.substring(7)
  1733. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1734. }}
  1735. >
  1736. </Upload>
  1737. </FormItem>
  1738. </div>*/}
  1739. <div className="clearfix">
  1740. <FormItem
  1741. labelCol={{ span: 4 }}
  1742. wrapperCol={{ span: 18 }}
  1743. label="合同/协议扫描件"
  1744. >
  1745. {/*<Upload*/}
  1746. {/* className="demandDetailShow-upload"*/}
  1747. {/* listType="picture-card"*/}
  1748. {/* fileList={this.state.pictureUrl}*/}
  1749. {/* onPreview={(file) => {*/}
  1750. {/* this.setState({*/}
  1751. {/* previewImage: file.url || file.thumbUrl,*/}
  1752. {/* previewVisible: true,*/}
  1753. {/* })*/}
  1754. {/* }}*/}
  1755. {/*/>*/}
  1756. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  1757. <ImgList fileList={this.state.pictureUrl} ItemWidth={'96px'}/>
  1758. </div>
  1759. <Modal
  1760. maskClosable={false}
  1761. footer={null}
  1762. width={'50%'}
  1763. visible={this.state.previewVisible}
  1764. onCancel={() => {
  1765. this.setState({ previewVisible: false, rotateDeg: 0 })
  1766. }}
  1767. >
  1768. <img
  1769. alt=""
  1770. style={{
  1771. width: '100%',
  1772. transform: `rotate(${this.state.rotateDeg}deg)`,
  1773. }}
  1774. src={this.state.previewImage || ''}
  1775. />
  1776. <Button
  1777. onClick={this.rotate}
  1778. style={{
  1779. position: 'relative',
  1780. left: '50%',
  1781. transform: 'translateX(-50%)',
  1782. }}
  1783. >
  1784. 旋转
  1785. </Button>
  1786. <Button
  1787. onClick={this.upImg}
  1788. style={{
  1789. position: 'absolute',
  1790. left: -81,
  1791. top: '50%',
  1792. transform: 'translateY(-50%)',
  1793. }}
  1794. >
  1795. 上一张
  1796. </Button>
  1797. <Button
  1798. onClick={this.downImg}
  1799. style={{
  1800. position: 'absolute',
  1801. right: -81,
  1802. top: '50%',
  1803. transform: 'translateY(-50%)',
  1804. }}
  1805. >
  1806. 下一张
  1807. </Button>
  1808. </Modal>
  1809. </FormItem>
  1810. </div>
  1811. {!this.state.refundStatus ? (
  1812. <div>
  1813. <hr className="division" />
  1814. <div className="clearfix" style={{ marginTop: '20px' }}>
  1815. <FormItem
  1816. labelCol={{ span: 4 }}
  1817. wrapperCol={{ span: 18 }}
  1818. label={
  1819. <span>
  1820. <strong style={{ color: '#f00' }}>*</strong>
  1821. 审核意见
  1822. </span>
  1823. }
  1824. >
  1825. <Input
  1826. type="textarea"
  1827. placeholder="请输入备注"
  1828. rows={4}
  1829. value={this.state.remarks}
  1830. onChange={(e) => {
  1831. this.setState({ remarks: e.target.value })
  1832. }}
  1833. style={{ width: '440px' }}
  1834. />
  1835. <span
  1836. className="tip"
  1837. style={{
  1838. width: '160px',
  1839. verticalAlign: 'top',
  1840. display: 'inline-block',
  1841. marginLeft: '10px',
  1842. }}
  1843. >
  1844. 通过或驳回都必须填写审核意见!
  1845. </span>
  1846. </FormItem>
  1847. </div>
  1848. <div className="clearfix fa">
  1849. <Button
  1850. type="danger"
  1851. onClick={this.refuse}
  1852. style={{ color: '#fff', backgroundColor: '#f04134' }}
  1853. >
  1854. 驳回
  1855. </Button>
  1856. <Button type="primary" onClick={this.pass}>
  1857. 通过
  1858. </Button>
  1859. </div>
  1860. </div>
  1861. ) : (
  1862. <div className="clearfix">
  1863. <hr className="division" />
  1864. <div className="clearfix">
  1865. <FormItem
  1866. className="half-item"
  1867. {...formItemLayout}
  1868. label="审核意见"
  1869. >
  1870. <span>{this.state.remarks}</span>
  1871. </FormItem>
  1872. </div>
  1873. <div className="clearfix">
  1874. <FormItem
  1875. className="half-item"
  1876. {...formItemLayout}
  1877. label="审核结果"
  1878. >
  1879. <span>{getRefundStatus(this.state.refundStatus)}</span>
  1880. </FormItem>
  1881. </div>
  1882. <div className="clearfix">
  1883. <FormItem
  1884. className="half-item"
  1885. {...formItemLayout}
  1886. label="审核时间"
  1887. >
  1888. <span>{this.state.auditTimes}</span>
  1889. </FormItem>
  1890. </div>
  1891. </div>
  1892. )}
  1893. </TabPane>
  1894. </Tabs>
  1895. </Modal>
  1896. <Modal
  1897. maskClosable={false}
  1898. visible={this.state.addnextVisible}
  1899. onOk={this.nextCancel}
  1900. onCancel={this.nextCancel}
  1901. confirmLoading={this.state.confirmLoading}
  1902. width="800px"
  1903. title={'项目任务详情'}
  1904. footer=""
  1905. className="admin-desc-content"
  1906. >
  1907. <Form layout="horizontal" id="demand-form">
  1908. <Spin spinning={this.state.loading}>
  1909. <div className="clearfix">
  1910. <FormItem
  1911. className="half-item"
  1912. {...formItemLayout}
  1913. label="项目名称"
  1914. >
  1915. <span>{this.state.commodityName}</span>
  1916. </FormItem>
  1917. <FormItem
  1918. className="half-item"
  1919. {...formItemLayout}
  1920. label="项目数量"
  1921. >
  1922. <span>{this.state.commodityQuantity}</span>
  1923. </FormItem>
  1924. <FormItem
  1925. className="half-item"
  1926. {...formItemLayout}
  1927. label="金额(万元)"
  1928. >
  1929. <span>{this.state.commodityPrice}</span>
  1930. </FormItem>
  1931. <FormItem
  1932. className="half-item"
  1933. {...formItemLayout}
  1934. label="主要项目"
  1935. >
  1936. <span>{getboutique(this.state.main)}</span>
  1937. </FormItem>
  1938. <div className="clearfix">
  1939. <FormItem
  1940. labelCol={{ span: 4 }}
  1941. wrapperCol={{ span: 16 }}
  1942. label="服务说明"
  1943. >
  1944. <span>{this.state.taskComment}</span>
  1945. </FormItem>
  1946. </div>
  1947. </div>
  1948. </Spin>
  1949. </Form>
  1950. </Modal>
  1951. <Modal
  1952. maskClosable={false}
  1953. visible={this.state.noVisible}
  1954. onOk={this.handleOk}
  1955. onCancel={this.noCancel}
  1956. width="400px"
  1957. title={'拒绝理由'}
  1958. footer=""
  1959. className="admin-desc-content"
  1960. confirmLoading={this.state.confirmLoading}
  1961. >
  1962. <Form layout="horizontal" id="demand-form">
  1963. <Spin spinning={this.state.loading}>
  1964. <div className="clearfix">
  1965. <FormItem
  1966. labelCol={{ span: 4 }}
  1967. wrapperCol={{ span: 16 }}
  1968. label="拒绝理由"
  1969. >
  1970. <Input
  1971. type="textarea"
  1972. placeholder="请输入拒绝理由"
  1973. rows={4}
  1974. value={this.state.reason}
  1975. onChange={(e) => {
  1976. this.setState({ reason: e.target.value })
  1977. }}
  1978. />
  1979. </FormItem>
  1980. </div>
  1981. <div className="clearfix">
  1982. <Button
  1983. className="cancel"
  1984. type="primary"
  1985. onClick={this.examOks}
  1986. style={{ marginLeft: '50px' }}
  1987. htmlType="submit"
  1988. loading={this.state.aloading}
  1989. >
  1990. 确定
  1991. </Button>
  1992. <Button
  1993. className="cancel"
  1994. type="ghost"
  1995. onClick={this.noCancel}
  1996. style={{ marginLeft: '50px' }}
  1997. >
  1998. 取消
  1999. </Button>
  2000. </div>
  2001. </Spin>
  2002. </Form>
  2003. </Modal>
  2004. <Modal
  2005. visible={this.state.rizhivisible}
  2006. className="admin-desc-content"
  2007. width="800px"
  2008. maskClosable={false}
  2009. title="订单日志"
  2010. footer={null}
  2011. onCancel={this.closeOrderLog}
  2012. >
  2013. <div className="patent-table">
  2014. <Spin spinning={this.state.loading}>
  2015. <Table
  2016. columns={this.state.columnsrizhi}
  2017. dataSource={this.state.dataSourcerizhi}
  2018. pagination={false}
  2019. bordered
  2020. size="small"
  2021. />
  2022. </Spin>
  2023. </div>
  2024. </Modal>
  2025. </div>
  2026. )
  2027. },
  2028. })
  2029. )
  2030. export default checkOutsourcing