checkOutsourcing.jsx 67 KB

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