checkOutsourcing.jsx 71 KB

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