outsourcingList.jsx 60 KB

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