outsourcingList.jsx 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826
  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. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  433. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  434. financeName: thisdata.financeName, //财务名称
  435. financeMobile: thisdata.financeMobile, //财务电话
  436. nowFinance: thisdata.nowFinance, //财务名称
  437. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  438. depName: thisdata.depName
  439. });
  440. }
  441. }.bind(this)
  442. }).always(
  443. function() {
  444. this.setState({
  445. loading: false
  446. });
  447. }.bind(this)
  448. );
  449. },
  450. //项目列表
  451. xiangmu(orderNos) {
  452. $.ajax({
  453. method: "get",
  454. dataType: "json",
  455. crossDomain: false,
  456. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  457. data: {
  458. orderNo: orderNos
  459. },
  460. success: function(data) {
  461. let theArr = [];
  462. if (data.error.length || data.data.list == "") {
  463. if (data.error && data.error.length) {
  464. message.warning(data.error[0].message);
  465. }
  466. } else {
  467. for (let i = 0; i < data.data.length; i++) {
  468. let thisdata = data.data[i];
  469. theArr.push({
  470. key: i,
  471. id: thisdata.id,
  472. orderNo: thisdata.orderNo, //订单编号
  473. commodityId: thisdata.commodityId, //项目ID
  474. commodityName: thisdata.commodityName, //项目名称
  475. cname: thisdata.cname, //项目类别
  476. commodityPrice: thisdata.commodityPrice, //项目价格
  477. commodityQuantity: thisdata.commodityQuantity, //项目数量
  478. main: thisdata.main, //是否为主要任务
  479. taskComment: thisdata.taskComment, //任务说明
  480. contacts: thisdata.contacts, //联系人
  481. contactsMobile: thisdata.contactsMobile, //联系人电话
  482. projectStatus: thisdata.projectStatus //项目状态
  483. });
  484. }
  485. }
  486. this.setState({
  487. dataSourceX: theArr
  488. });
  489. }.bind(this)
  490. }).always(
  491. function() {
  492. this.setState({
  493. loading: false
  494. });
  495. }.bind(this)
  496. );
  497. },
  498. rizhi() {
  499. this.setState({
  500. loading: true
  501. });
  502. $.ajax({
  503. method: "get",
  504. dataType: "json",
  505. crossDomain: false,
  506. url: "/api/admin/newOrder/selectOrderLog",
  507. data: {
  508. orderNo: this.state.orderNo
  509. },
  510. success: function(data) {
  511. let theArr = [];
  512. let thisData = data.data;
  513. if (!thisData.length) {
  514. if (data.error && data.error.length) {
  515. message.warning(data.error[0].message);
  516. }
  517. thisData = {};
  518. } else {
  519. for (let i = 0; i < data.data.length; i++) {
  520. let thisdata = data.data[i];
  521. theArr.push({
  522. processName: thisdata.processName,
  523. adminName: thisdata.adminName,
  524. createDate: thisdata.createDate
  525. });
  526. }
  527. }
  528. this.setState({
  529. dataSourcerizhi: theArr
  530. });
  531. }.bind(this)
  532. }).always(
  533. function() {
  534. this.setState({
  535. loading: false
  536. });
  537. }.bind(this)
  538. );
  539. },
  540. getOrderLog() {
  541. this.setState({
  542. rizhivisible: true
  543. });
  544. this.rizhi();
  545. },
  546. closeOrderLog() {
  547. this.setState({
  548. rizhivisible: false
  549. });
  550. },
  551. //节点列表
  552. jiedian(orderNos) {
  553. $.ajax({
  554. method: "get",
  555. dataType: "json",
  556. crossDomain: false,
  557. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  558. data: {
  559. orderNo: orderNos
  560. },
  561. success: function(data) {
  562. let theArr = [];
  563. let thisData = [];
  564. if (data.error.length || data.data.list == "") {
  565. if (data.error && data.error.length) {
  566. message.warning(data.error[0].message);
  567. }
  568. } else {
  569. for (let i = 0; i < data.data.length; i++) {
  570. thisData = data.data[i];
  571. theArr.push({
  572. key: i,
  573. dunSubject: thisData.dunSubject
  574. ? thisData.dunSubject.toString()
  575. : "", //催款科目
  576. id: thisData.id, //节点Id
  577. money: thisData.money, //催款金额
  578. dunStatus: thisData.dunStatus //催款状态
  579. });
  580. }
  581. this.setState({
  582. contactList: theArr
  583. });
  584. }
  585. }.bind(this)
  586. }).always(
  587. function() {
  588. this.setState({
  589. loading: false
  590. });
  591. }.bind(this)
  592. );
  593. },
  594. //审核通过
  595. examOk() {
  596. $.ajax({
  597. method: "post",
  598. dataType: "json",
  599. crossDomain: false,
  600. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  601. data: {
  602. orderNo: this.state.orderNo,
  603. orderStatus: 2
  604. },
  605. success: function(data) {
  606. if (data.error.length || data.data.list == "") {
  607. if (data.error && data.error.length) {
  608. message.warning(data.error[0].message);
  609. }
  610. } else {
  611. message.success("该订单已通过审核~");
  612. this.setState({
  613. visible: false
  614. });
  615. this.reset();
  616. }
  617. }.bind(this)
  618. }).always(
  619. function() {
  620. this.setState({
  621. loading: false
  622. });
  623. }.bind(this)
  624. );
  625. },
  626. //通过发给外包
  627. outsourcing() {
  628. $.ajax({
  629. method: "post",
  630. dataType: "json",
  631. crossDomain: false,
  632. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  633. data: {
  634. orderNo: this.state.orderNo,
  635. orderStatus: 2,
  636. outsource: 1
  637. },
  638. success: function(data) {
  639. if (data.error.length || data.data.list == "") {
  640. if (data.error && data.error.length) {
  641. message.warning(data.error[0].message);
  642. }
  643. } else {
  644. message.success("该订单已通过审核~");
  645. this.setState({
  646. visible: false
  647. });
  648. this.reset();
  649. }
  650. }.bind(this)
  651. }).always(
  652. function() {
  653. this.setState({
  654. loading: false
  655. });
  656. }.bind(this)
  657. );
  658. },
  659. //审核不通过
  660. examOks() {
  661. this.setState({
  662. aloading: true
  663. });
  664. $.ajax({
  665. method: "post",
  666. dataType: "json",
  667. crossDomain: false,
  668. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  669. data: {
  670. orderNo: this.state.orderNo,
  671. orderStatus: 3,
  672. reason: this.state.reason
  673. },
  674. success: function(data) {
  675. if (data.error.length || data.data.list == "") {
  676. if (data.error && data.error.length) {
  677. message.warning(data.error[0].message);
  678. this.setState({
  679. aloading: true
  680. });
  681. }
  682. } else {
  683. message.success("该订单已被拒绝~");
  684. this.setState({
  685. visible: false,
  686. aloading: false,
  687. noVisible: false,
  688. reason: ""
  689. });
  690. this.reset();
  691. }
  692. }.bind(this)
  693. }).always(
  694. function() {
  695. this.setState({
  696. loading: false
  697. });
  698. }.bind(this)
  699. );
  700. },
  701. //点击拒绝
  702. examNo() {
  703. this.setState({
  704. noVisible: true
  705. });
  706. },
  707. load() {
  708. if (this.state.attachmentUrl) {
  709. let url = window.location.href.substring(7);
  710. this.state.fileUrl.forEach(e => {
  711. window.location.href =
  712. "http://" +
  713. url.substring(0, url.indexOf("/")) +
  714. "/api/admin/outsourceOrg//downloadFile?path=" +
  715. e.response.data;
  716. });
  717. } else {
  718. message.error("此订单无上传文件");
  719. }
  720. },
  721. callback(key) {
  722. let url = window.location.href.substring(7);
  723. this.setState({
  724. activeKey: key
  725. });
  726. if (this.state.pictureUrl.length) {
  727. let picArr = [];
  728. this.state.pictureUrl.map(function(item) {
  729. if (
  730. item.response &&
  731. item.response.data &&
  732. item.response.data.length
  733. ) {
  734. picArr.push(item.response.data);
  735. }
  736. });
  737. }
  738. if (key === "2") {
  739. this.setState({
  740. loading: true
  741. });
  742. $.ajax({
  743. method: "get",
  744. dataType: "json",
  745. crossDomain: false,
  746. url:
  747. globalConfig.context +
  748. "/api/admin/outsourceOrg/orderOutsourceDtails",
  749. data: {
  750. orderNo: this.state.orderNo
  751. },
  752. success: function(data) {
  753. let thisdata = data.data;
  754. this.setState({
  755. id: thisdata.id,
  756. createTimes: thisdata.createTimes,
  757. auditTimes: thisdata.auditTimes,
  758. remarks: thisdata.remarks,
  759. attachmentUrl: thisdata.attachmentUrl
  760. ? splitUrl(
  761. thisdata.attachmentUrl,
  762. ",",
  763. globalConfig.avatarHost + "/upload",
  764. url
  765. )
  766. : [],
  767. fileUrl: thisdata.attachmentUrl
  768. ? splitUrl(
  769. thisdata.attachmentUrl,
  770. ",",
  771. globalConfig.avatarHost + "/upload",
  772. url
  773. )
  774. : [],
  775. pictureUrl: thisdata.pictureUrl
  776. ? splitUrl(
  777. thisdata.pictureUrl,
  778. ",",
  779. globalConfig.avatarHost + "/upload",
  780. url
  781. )
  782. : [], //图片地址
  783. amount: thisdata.amount,
  784. companyName: thisdata.companyName,
  785. outsourceRemarks: thisdata.outsourceRemarks,
  786. unitNumber: thisdata.unitNumber,
  787. unitPrice: thisdata.unitPrice
  788. });
  789. }.bind(this)
  790. }).always(
  791. function() {
  792. this.setState({
  793. loading: false
  794. });
  795. }.bind(this)
  796. );
  797. }
  798. },
  799. getUrl(url) {
  800. let theorgCodeUrl = [];
  801. if (url.length) {
  802. let picArr = [];
  803. url.map(function(item) {
  804. if (
  805. item.response &&
  806. item.response.data &&
  807. item.response.data.length
  808. ) {
  809. picArr.push(item.response.data);
  810. }
  811. });
  812. theorgCodeUrl = picArr.join(",");
  813. }
  814. return theorgCodeUrl;
  815. },
  816. sureOut() {
  817. if (!this.state.companyName) {
  818. message.warning("公司名称不能为空");
  819. return;
  820. }
  821. if (!this.state.unitPrice) {
  822. message.warning("单价不能为空");
  823. return;
  824. }
  825. if (!this.state.unitNumber) {
  826. message.warning("数量不能为空");
  827. return;
  828. }
  829. if (!this.state.amount) {
  830. message.warning("总金额不能为空");
  831. return;
  832. }
  833. if (!this.state.outsourceRemarks) {
  834. message.warning("备注不能为空");
  835. return;
  836. }
  837. if (this.state.pictureUrl.length === 0) {
  838. message.warning("合同扫描件不能为空");
  839. return;
  840. }
  841. $.ajax({
  842. method: "POST",
  843. dataType: "json",
  844. crossDomain: false,
  845. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  846. data: {
  847. id: this.state.id,
  848. orderNo: this.state.orderNo,
  849. companyName: this.state.companyName,
  850. amount: this.state.amount,
  851. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  852. ? this.getUrl(this.state.attachmentUrl)
  853. : "",
  854. orderStatus: 2,
  855. pictureUrl: this.getUrl(this.state.pictureUrl).length
  856. ? this.getUrl(this.state.pictureUrl)
  857. : "",
  858. outsourceRemarks: this.state.outsourceRemarks,
  859. unitNumber: this.state.unitNumber,
  860. unitPrice: this.state.unitPrice
  861. }
  862. }).done(
  863. function(data) {
  864. this.setState({
  865. loading: false
  866. });
  867. if (!data.error.length) {
  868. message.success("提交成功!");
  869. this.visitCancel();
  870. } else {
  871. message.warning(data.error[0].message);
  872. }
  873. }.bind(this)
  874. );
  875. },
  876. //关闭输入理由框
  877. noCancel() {
  878. this.setState({
  879. noVisible: false,
  880. aloading: false,
  881. reason: ""
  882. });
  883. },
  884. //搜索
  885. search() {
  886. this.loadData();
  887. },
  888. //重置
  889. reset() {
  890. this.state.nameSearch = "";
  891. this.state.contractNoSearch = "";
  892. this.state.releaseDate[0] = undefined;
  893. this.state.releaseDate[1] = undefined;
  894. this.state.refundStatusSearch = undefined;
  895. this.loadData(1);
  896. },
  897. resets() {
  898. this.state.orderNo = "";
  899. this.state.customerName = "";
  900. this.state.releaseDate[0] = undefined;
  901. this.state.releaseDate[1] = undefined;
  902. },
  903. getOrgCodeUrl(e) {
  904. this.setState({ pictureUrl: e });
  905. },
  906. //关闭详情
  907. visitCancel() {
  908. this.setState(
  909. {
  910. visible: false
  911. },
  912. () => {
  913. this.setState({
  914. activeKey: "1"
  915. });
  916. }
  917. );
  918. this.resets();
  919. this.loadData();
  920. },
  921. visitOk() {
  922. this.setState({
  923. visible: false
  924. });
  925. this.resets();
  926. },
  927. render() {
  928. const formItemLayout = {
  929. labelCol: { span: 8 },
  930. wrapperCol: { span: 14 }
  931. };
  932. const FormItem = Form.Item;
  933. const { TextArea } = Input;
  934. const { TabPane } = Tabs;
  935. const { RangePicker } = DatePicker;
  936. return (
  937. <div className="user-content">
  938. <div className="content-title">
  939. <span>外包订单列表</span>
  940. </div>
  941. <div className="user-search">
  942. <Input
  943. placeholder="客户名称"
  944. style={{ width: "150px", marginBottom: "10px" }}
  945. value={this.state.nameSearch}
  946. onChange={e => {
  947. this.setState({ nameSearch: e.target.value });
  948. }}
  949. />
  950. <Input
  951. placeholder="合同编号"
  952. style={{ width: "150px" }}
  953. value={this.state.contractNoSearch}
  954. onChange={e => {
  955. this.setState({ contractNoSearch: e.target.value });
  956. }}
  957. />
  958. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  959. <RangePicker
  960. value={[
  961. this.state.releaseDate[0]
  962. ? moment(this.state.releaseDate[0])
  963. : null,
  964. this.state.releaseDate[1]
  965. ? moment(this.state.releaseDate[1])
  966. : null
  967. ]}
  968. onChange={(data, dataString) => {
  969. this.setState({ releaseDate: dataString });
  970. }}
  971. />
  972. <Select
  973. value={this.state.refundStatusSearch}
  974. style={{ width: 150, marginLeft: "10px" }}
  975. onChange={e => {
  976. this.setState({
  977. refundStatusSearch: e
  978. });
  979. }}
  980. placeholder="审核状态"
  981. >
  982. <Option value={0}>待审核</Option>
  983. <Option value={1}>审核通过</Option>
  984. <Option value={2}>审核驳回</Option>
  985. </Select>
  986. <Button
  987. type="primary"
  988. onClick={this.search}
  989. style={{ marginLeft: "10px" }}
  990. >
  991. 搜索
  992. </Button>
  993. <Button onClick={this.reset}>重置</Button>
  994. <div className="patent-table">
  995. <Spin spinning={this.state.loading}>
  996. <Table
  997. columns={this.state.columns}
  998. dataSource={this.state.dataSource}
  999. pagination={this.state.pagination}
  1000. onRowClick={this.tableRowClick}
  1001. />
  1002. </Spin>
  1003. </div>
  1004. <Modal
  1005. className="customeDetails"
  1006. footer=""
  1007. width="900px"
  1008. visible={this.state.visible}
  1009. onOk={this.visitOk}
  1010. onCancel={this.visitCancel}
  1011. >
  1012. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1013. <TabPane tab="订单详情" key="1">
  1014. <Form
  1015. layout="horizontal"
  1016. onSubmit={this.handleSubmit}
  1017. id="demand-form"
  1018. style={{ paddingBottom: "40px" }}
  1019. >
  1020. <Spin spinning={this.state.loading}>
  1021. <div className="clearfix">
  1022. <FormItem
  1023. className="half-item"
  1024. {...formItemLayout}
  1025. label="订单编号"
  1026. >
  1027. <span>{this.state.orderNo}</span>
  1028. </FormItem>
  1029. <FormItem
  1030. className="half-item"
  1031. {...formItemLayout}
  1032. label="合同编号"
  1033. >
  1034. <span>{this.state.contractNo}</span>
  1035. </FormItem>
  1036. <FormItem
  1037. className="half-item"
  1038. {...formItemLayout}
  1039. label="客户名称"
  1040. >
  1041. <span>{this.state.userName}</span>
  1042. </FormItem>
  1043. <FormItem
  1044. className="half-item"
  1045. {...formItemLayout}
  1046. label="合同签订时间"
  1047. >
  1048. <span>{this.state.signDate}</span>
  1049. </FormItem>
  1050. <FormItem
  1051. className="half-item"
  1052. {...formItemLayout}
  1053. label="流程状态"
  1054. >
  1055. <span>
  1056. {getProcessStatus(this.state.processStatus)}
  1057. </span>
  1058. </FormItem>
  1059. <FormItem
  1060. className="half-item"
  1061. {...formItemLayout}
  1062. label="结算状态"
  1063. >
  1064. <span>
  1065. {getLiquidationStatus(this.state.liquidationStatus)}
  1066. </span>
  1067. </FormItem>
  1068. <FormItem
  1069. className="half-item"
  1070. {...formItemLayout}
  1071. label="企业联系人"
  1072. >
  1073. <span>{this.state.contacts}</span>
  1074. </FormItem>
  1075. <FormItem
  1076. className="half-item"
  1077. {...formItemLayout}
  1078. label="联系人电话"
  1079. >
  1080. <span>{this.state.contactMobile}</span>
  1081. </FormItem>
  1082. <FormItem
  1083. className="half-item"
  1084. {...formItemLayout}
  1085. label="企业法人"
  1086. >
  1087. <span>{this.state.legalPerson}</span>
  1088. </FormItem>
  1089. <FormItem
  1090. className="half-item"
  1091. {...formItemLayout}
  1092. label="法人电话"
  1093. >
  1094. <span>{this.state.legalPersonTel}</span>
  1095. </FormItem>
  1096. <FormItem
  1097. className="half-item"
  1098. {...formItemLayout}
  1099. label="签单金额(万元)"
  1100. >
  1101. <span>{this.state.totalAmount}</span>
  1102. </FormItem>
  1103. <FormItem
  1104. className="half-item"
  1105. {...formItemLayout}
  1106. label="首付金额(万元)"
  1107. >
  1108. <span>{this.state.firstAmount}</span>
  1109. </FormItem>
  1110. <FormItem
  1111. className="half-item"
  1112. {...formItemLayout}
  1113. label="特批立项"
  1114. >
  1115. <span>{getApprovedState(this.state.approval)}</span>
  1116. </FormItem>
  1117. <FormItem
  1118. className="half-item"
  1119. {...formItemLayout}
  1120. label="已收款项(万元)"
  1121. >
  1122. <span>{this.state.settlementAmount}</span>
  1123. </FormItem>
  1124. <FormItem
  1125. className="half-item"
  1126. {...formItemLayout}
  1127. label="订单部门"
  1128. >
  1129. <span>{this.state.depName}</span>
  1130. </FormItem>
  1131. <div className="clearfix">
  1132. <FormItem
  1133. labelCol={{ span: 4 }}
  1134. wrapperCol={{ span: 16 }}
  1135. label="订单留言"
  1136. >
  1137. <p style={{ width: 500, wordWrap: "break-word" }}>
  1138. {this.state.orderRemarks}
  1139. </p>
  1140. </FormItem>
  1141. </div>
  1142. <div className="clearfix">
  1143. <FormItem
  1144. labelCol={{ span: 4 }}
  1145. wrapperCol={{ span: 18 }}
  1146. label="合同扫描件"
  1147. >
  1148. <Upload
  1149. className="demandDetailShow-upload"
  1150. listType="picture-card"
  1151. fileList={this.state.orgCodeUrl}
  1152. onPreview={file => {
  1153. this.setState({
  1154. previewImage: file.url || file.thumbUrl,
  1155. previewVisible: true
  1156. });
  1157. }}
  1158. ></Upload>
  1159. <Modal
  1160. maskClosable={false}
  1161. footer={null}
  1162. visible={this.state.previewVisible}
  1163. onCancel={() => {
  1164. this.setState({ previewVisible: false });
  1165. }}
  1166. >
  1167. <img
  1168. alt=""
  1169. style={{ width: "100%" }}
  1170. src={this.state.previewImage || ""}
  1171. />
  1172. </Modal>
  1173. <Button
  1174. style={{
  1175. float: "right",
  1176. marginRight: "140px",
  1177. marginTop: "20px"
  1178. }}
  1179. onClick={this.getOrderLog}
  1180. >
  1181. 查看订单日志
  1182. </Button>
  1183. </FormItem>
  1184. </div>
  1185. <div className="clearfix">
  1186. <FormItem
  1187. className="half-item"
  1188. {...formItemLayout}
  1189. label="订单负责人"
  1190. >
  1191. <span>{this.state.salesmanName}</span>
  1192. </FormItem>
  1193. <FormItem
  1194. className="half-item"
  1195. {...formItemLayout}
  1196. label="订单负责人电话"
  1197. >
  1198. <span>{this.state.salesmanMobile}</span>
  1199. </FormItem>
  1200. </div>
  1201. <div className="clearfix">
  1202. <FormItem
  1203. className="half-item"
  1204. {...formItemLayout}
  1205. label="当前财务负责人"
  1206. >
  1207. <span>{this.state.nowFinance}</span>
  1208. </FormItem>
  1209. <FormItem
  1210. className="half-item"
  1211. {...formItemLayout}
  1212. label="当前财务负责人电话"
  1213. >
  1214. <span>{this.state.nowFinanceMobile}</span>
  1215. </FormItem>
  1216. </div>
  1217. <div className="clearfix">
  1218. <FormItem
  1219. className="half-item"
  1220. {...formItemLayout}
  1221. style={{ opacity: ".5" }}
  1222. label="原订单负责人"
  1223. >
  1224. <span>{this.state.oldSalesmanName}</span>
  1225. </FormItem>
  1226. <FormItem
  1227. className="half-item"
  1228. {...formItemLayout}
  1229. style={{ opacity: ".5" }}
  1230. label="原订单负责人电话"
  1231. >
  1232. <span>{this.state.oldSalesmanMobile}</span>
  1233. </FormItem>
  1234. </div>
  1235. <div className="clearfix">
  1236. <FormItem
  1237. className="half-item"
  1238. style={{ opacity: ".5" }}
  1239. {...formItemLayout}
  1240. label="实际财务操作人"
  1241. >
  1242. <span>{this.state.financeName}</span>
  1243. </FormItem>
  1244. <FormItem
  1245. className="half-item"
  1246. {...formItemLayout}
  1247. style={{ opacity: ".5" }}
  1248. label="实际财务操作人电话"
  1249. >
  1250. <span>{this.state.financeMobile}</span>
  1251. </FormItem>
  1252. </div>
  1253. <div>
  1254. <span
  1255. style={{ marginLeft: "50px", fontSize: "20px" }}
  1256. >
  1257. 催款节点
  1258. </span>
  1259. {this.state.processStatus == 0 ? (
  1260. <Button
  1261. type="primary"
  1262. onClick={this.addcontact}
  1263. style={{
  1264. float: "right",
  1265. marginRight: "50px",
  1266. marginBottom: "15px"
  1267. }}
  1268. >
  1269. 添加催款节点
  1270. </Button>
  1271. ) : (
  1272. ""
  1273. )}
  1274. </div>
  1275. <div className="clearfix">
  1276. <Spin spinning={this.state.loading}>
  1277. <Form layout="horizontal" id="demand-form">
  1278. <Table
  1279. pagination={false}
  1280. columns={this.state.ContactsLists}
  1281. dataSource={this.state.contactList}
  1282. />
  1283. <Col
  1284. span={24}
  1285. offset={9}
  1286. style={{ marginTop: "15px" }}
  1287. ></Col>
  1288. </Form>
  1289. </Spin>
  1290. </div>
  1291. <div>
  1292. <span
  1293. style={{ marginLeft: "50px", fontSize: "20px" }}
  1294. >
  1295. 项目业务
  1296. </span>
  1297. {this.state.processStatus == 0 ? (
  1298. <Button
  1299. type="primary"
  1300. onClick={this.addDetailed}
  1301. style={{
  1302. float: "right",
  1303. marginRight: "50px",
  1304. marginBottom: "15px"
  1305. }}
  1306. >
  1307. 添加项目明细
  1308. </Button>
  1309. ) : (
  1310. ""
  1311. )}
  1312. </div>
  1313. <div className="patent-table">
  1314. <Spin spinning={this.state.loading}>
  1315. <Table
  1316. columns={this.state.columnsX}
  1317. dataSource={this.state.dataSourceX}
  1318. pagination={this.state.paginations}
  1319. onRowClick={this.tableRowClickX}
  1320. />
  1321. </Spin>
  1322. </div>
  1323. {this.state.refundStatus === 2 ? (
  1324. <div
  1325. className="addSave"
  1326. style={{ marginTop: "15px" }}
  1327. >
  1328. <Button
  1329. type="primary"
  1330. onClick={this.examOk}
  1331. style={{ marginLeft: "200px" }}
  1332. htmlType="submit"
  1333. >
  1334. 通过
  1335. </Button>
  1336. <Button
  1337. type="primary"
  1338. onClick={this.examNo}
  1339. style={{ marginLeft: "50px" }}
  1340. htmlType="submit"
  1341. >
  1342. 驳回
  1343. </Button>
  1344. <Button
  1345. type="ghost"
  1346. onClick={this.visitCancel}
  1347. style={{ marginLeft: "50px" }}
  1348. >
  1349. 取消
  1350. </Button>
  1351. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1352. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1353. </div>
  1354. ) : (
  1355. ""
  1356. )}
  1357. </div>
  1358. </Spin>
  1359. </Form>
  1360. </TabPane>
  1361. <TabPane tab="外包(不走总部)" key="2">
  1362. {this.state.refundStatus === 2 ? (
  1363. <div>
  1364. <div className="clearfix">
  1365. <FormItem
  1366. className="half-item"
  1367. {...formItemLayout}
  1368. label={
  1369. <span>
  1370. <strong style={{ color: "#f00" }}>*</strong>
  1371. 外包公司
  1372. </span>
  1373. }
  1374. >
  1375. <Input
  1376. value={this.state.companyName}
  1377. onChange={e => {
  1378. this.setState({
  1379. companyName: e.target.value
  1380. });
  1381. }}
  1382. placeholder="请填写外包公司名称"
  1383. />
  1384. </FormItem>
  1385. <span className="tip">如多个公司,请用间隔</span>
  1386. </div>
  1387. <div className="clearfix">
  1388. <FormItem
  1389. className="half-item"
  1390. {...formItemLayout}
  1391. label={
  1392. <span>
  1393. <strong style={{ color: "#f00" }}>*</strong>
  1394. 单价(万元)
  1395. </span>
  1396. }
  1397. >
  1398. <Input
  1399. value={this.state.unitPrice}
  1400. onChange={e => {
  1401. this.setState({
  1402. unitPrice: e.target.value
  1403. });
  1404. }}
  1405. placeholder="请填写本次外包公司的价格"
  1406. />
  1407. </FormItem>
  1408. </div>
  1409. <div className="clearfix">
  1410. <FormItem
  1411. className="half-item"
  1412. {...formItemLayout}
  1413. label={
  1414. <span>
  1415. <strong style={{ color: "#f00" }}>*</strong>
  1416. 数量(万元)
  1417. </span>
  1418. }
  1419. >
  1420. <Input
  1421. value={this.state.unitNumber}
  1422. onChange={e => {
  1423. this.setState({
  1424. unitNumber: e.target.value
  1425. });
  1426. }}
  1427. placeholder="请填写本次外包公司的价格"
  1428. />
  1429. </FormItem>
  1430. </div>
  1431. <div className="clearfix">
  1432. <FormItem
  1433. className="half-item"
  1434. {...formItemLayout}
  1435. label={
  1436. <span>
  1437. <strong style={{ color: "#f00" }}>*</strong>
  1438. 总金额(万元)
  1439. </span>
  1440. }
  1441. >
  1442. <Input
  1443. value={this.state.amount}
  1444. onChange={e => {
  1445. this.setState({
  1446. amount: e.target.value
  1447. });
  1448. }}
  1449. placeholder="请填写本次外包公司的价格"
  1450. />
  1451. </FormItem>
  1452. </div>
  1453. <div className="clearfix">
  1454. <FormItem
  1455. className="half-item"
  1456. {...formItemLayout}
  1457. label={
  1458. <span>
  1459. <strong style={{ color: "#f00" }}>*</strong>备注
  1460. </span>
  1461. }
  1462. >
  1463. <TextArea
  1464. rows={4}
  1465. value={this.state.outsourceRemarks}
  1466. onChange={e => {
  1467. this.setState({
  1468. outsourceRemarks: e.target.value
  1469. });
  1470. }}
  1471. placeholder="请输入备注"
  1472. />
  1473. </FormItem>
  1474. </div>
  1475. {/*<div className="clearfix">
  1476. <FormItem className="half-item"
  1477. {...formItemLayout}
  1478. label="上传协议文件" style={{height:"auto"}}>
  1479. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1480. data={(e)=>{
  1481. return {
  1482. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1483. }
  1484. }}
  1485. fileList={this.state.fileUrl}
  1486. onChange={(e)=>{
  1487. this.setState({
  1488. attachmentUrl:e.fileList,
  1489. fileUrl:e.fileList
  1490. })
  1491. }}>
  1492. {fileUrl.length>1?null:<Button>
  1493. <Icon type="upload" /> 点击上传
  1494. </Button>}
  1495. </Upload>
  1496. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1497. </FormItem>
  1498. </div>*/}
  1499. <p
  1500. className="tip"
  1501. style={{
  1502. paddingBottom: "12px",
  1503. width: "240px",
  1504. marginLeft: "145px"
  1505. }}
  1506. >
  1507. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1508. </p>
  1509. <div className="clearfix">
  1510. <FormItem
  1511. labelCol={{ span: 4 }}
  1512. wrapperCol={{ span: 18 }}
  1513. label={
  1514. <span>
  1515. <strong style={{ color: "#f00" }}>*</strong>
  1516. 合同/协议扫描件
  1517. </span>
  1518. }
  1519. >
  1520. <PicturesWall
  1521. fileList={this.getOrgCodeUrl}
  1522. pictureUrl={this.state.pictureUrl}
  1523. />
  1524. <p>图片建议:要清晰。</p>
  1525. </FormItem>
  1526. </div>
  1527. <div className="clearfix">
  1528. <div
  1529. style={{
  1530. display: "inline-black",
  1531. textAlign: "center"
  1532. }}
  1533. >
  1534. <Button type="primary" onClick={this.sureOut}>
  1535. 确认发起外包,不通过总部
  1536. </Button>
  1537. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1538. </div>
  1539. </div>
  1540. </div>
  1541. ) : (
  1542. <div>
  1543. <div className="clearfix">
  1544. <FormItem
  1545. className="half-item"
  1546. {...formItemLayout}
  1547. label="外包公司"
  1548. >
  1549. <span>{this.state.companyName}</span>
  1550. </FormItem>
  1551. </div>
  1552. <div className="clearfix">
  1553. <FormItem
  1554. className="half-item"
  1555. {...formItemLayout}
  1556. label="单价(万元)"
  1557. >
  1558. <span>{this.state.unitPrice}</span>
  1559. </FormItem>
  1560. </div>
  1561. <div className="clearfix">
  1562. <FormItem
  1563. className="half-item"
  1564. {...formItemLayout}
  1565. label="数量(个)"
  1566. >
  1567. <span>{this.state.unitNumber}</span>
  1568. </FormItem>
  1569. </div>
  1570. <div className="clearfix">
  1571. <FormItem
  1572. className="half-item"
  1573. {...formItemLayout}
  1574. label="总金额(万元)"
  1575. >
  1576. <span>{this.state.amount}</span>
  1577. </FormItem>
  1578. </div>
  1579. <div className="clearfix">
  1580. <FormItem
  1581. className="half-item"
  1582. {...formItemLayout}
  1583. label="备注"
  1584. >
  1585. <span>{this.state.outsourceRemarks}</span>
  1586. </FormItem>
  1587. </div>
  1588. {/*<div className="clearfix">
  1589. <FormItem className="half-item" style={{height:'auto'}}
  1590. {...formItemLayout}
  1591. label="上传协议文件" >
  1592. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1593. data={(e)=>{
  1594. return {
  1595. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1596. }
  1597. }}
  1598. fileList={this.state.fileUrl}
  1599. showUploadList={{showRemoveIcon:false}}
  1600. onPreview={(e)=>{
  1601. let url = window.location.href.substring(7)
  1602. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  1603. }}
  1604. >
  1605. </Upload>
  1606. </FormItem>
  1607. </div>*/}
  1608. <div className="clearfix">
  1609. <FormItem
  1610. labelCol={{ span: 4 }}
  1611. wrapperCol={{ span: 18 }}
  1612. label="合同/协议扫描件"
  1613. >
  1614. <Upload
  1615. className="demandDetailShow-upload"
  1616. listType="picture-card"
  1617. fileList={this.state.pictureUrl}
  1618. onPreview={file => {
  1619. this.setState({
  1620. previewImage: file.url || file.thumbUrl,
  1621. previewVisible: true
  1622. });
  1623. }}
  1624. ></Upload>
  1625. <Modal
  1626. maskClosable={false}
  1627. footer={null}
  1628. visible={this.state.previewVisible}
  1629. onCancel={() => {
  1630. this.setState({ previewVisible: false });
  1631. }}
  1632. >
  1633. <img
  1634. alt=""
  1635. style={{ width: "100%" }}
  1636. src={this.state.previewImage || ""}
  1637. />
  1638. </Modal>
  1639. </FormItem>
  1640. </div>
  1641. </div>
  1642. )}
  1643. {this.state.refundStatus ? (
  1644. <div className="clearfix">
  1645. <hr className="division" />
  1646. <div className="clearfix">
  1647. <FormItem
  1648. className="half-item"
  1649. {...formItemLayout}
  1650. label="审核意见"
  1651. >
  1652. <span>{this.state.remarks}</span>
  1653. </FormItem>
  1654. </div>
  1655. <div className="clearfix">
  1656. <FormItem
  1657. className="half-item"
  1658. {...formItemLayout}
  1659. label="审核结果"
  1660. >
  1661. <span>
  1662. {getRefundStatus(this.state.refundStatus)}
  1663. </span>
  1664. </FormItem>
  1665. </div>
  1666. <div className="clearfix">
  1667. <FormItem
  1668. className="half-item"
  1669. {...formItemLayout}
  1670. label="审核时间"
  1671. >
  1672. <span>{this.state.auditTimes}</span>
  1673. </FormItem>
  1674. </div>
  1675. </div>
  1676. ) : (
  1677. ""
  1678. )}
  1679. </TabPane>
  1680. </Tabs>
  1681. </Modal>
  1682. <Modal
  1683. maskClosable={false}
  1684. visible={this.state.addnextVisible}
  1685. onOk={this.nextCancel}
  1686. onCancel={this.nextCancel}
  1687. confirmLoading={this.state.confirmLoading}
  1688. width="800px"
  1689. title={"项目任务详情"}
  1690. footer=""
  1691. className="admin-desc-content"
  1692. >
  1693. <Form layout="horizontal" id="demand-form">
  1694. <Spin spinning={this.state.loading}>
  1695. <div className="clearfix">
  1696. <FormItem
  1697. className="half-item"
  1698. {...formItemLayout}
  1699. label="项目名称"
  1700. >
  1701. <span>{this.state.commodityName}</span>
  1702. </FormItem>
  1703. <FormItem
  1704. className="half-item"
  1705. {...formItemLayout}
  1706. label="项目数量"
  1707. >
  1708. <span>{this.state.commodityQuantity}</span>
  1709. </FormItem>
  1710. <FormItem
  1711. className="half-item"
  1712. {...formItemLayout}
  1713. label="金额(万元)"
  1714. >
  1715. <span>{this.state.commodityPrice}</span>
  1716. </FormItem>
  1717. <FormItem
  1718. className="half-item"
  1719. {...formItemLayout}
  1720. label="主要项目"
  1721. >
  1722. <span>{getboutique(this.state.main)}</span>
  1723. </FormItem>
  1724. <div className="clearfix">
  1725. <FormItem
  1726. labelCol={{ span: 4 }}
  1727. wrapperCol={{ span: 16 }}
  1728. label="服务说明"
  1729. >
  1730. <span>{this.state.taskComment}</span>
  1731. </FormItem>
  1732. </div>
  1733. </div>
  1734. </Spin>
  1735. </Form>
  1736. </Modal>
  1737. <Modal
  1738. maskClosable={false}
  1739. visible={this.state.noVisible}
  1740. onOk={this.handleOk}
  1741. onCancel={this.noCancel}
  1742. width="400px"
  1743. title={"拒绝理由"}
  1744. footer=""
  1745. className="admin-desc-content"
  1746. confirmLoading={this.state.confirmLoading}
  1747. >
  1748. <Form layout="horizontal" id="demand-form">
  1749. <Spin spinning={this.state.loading}>
  1750. <div className="clearfix">
  1751. <FormItem
  1752. labelCol={{ span: 4 }}
  1753. wrapperCol={{ span: 16 }}
  1754. label="拒绝理由"
  1755. >
  1756. <Input
  1757. type="textarea"
  1758. placeholder="请输入拒绝理由"
  1759. rows={4}
  1760. value={this.state.reason}
  1761. onChange={e => {
  1762. this.setState({ reason: e.target.value });
  1763. }}
  1764. />
  1765. </FormItem>
  1766. </div>
  1767. <div className="clearfix">
  1768. <Button
  1769. className="cancel"
  1770. type="primary"
  1771. onClick={this.examOks}
  1772. style={{ marginLeft: "50px" }}
  1773. htmlType="submit"
  1774. loading={this.state.aloading}
  1775. >
  1776. 确定
  1777. </Button>
  1778. <Button
  1779. className="cancel"
  1780. type="ghost"
  1781. onClick={this.noCancel}
  1782. style={{ marginLeft: "50px" }}
  1783. >
  1784. 取消
  1785. </Button>
  1786. </div>
  1787. </Spin>
  1788. </Form>
  1789. </Modal>
  1790. <Modal
  1791. visible={this.state.rizhivisible}
  1792. className="admin-desc-content"
  1793. width="800px"
  1794. maskClosable={false}
  1795. title="订单日志"
  1796. footer={null}
  1797. onCancel={this.closeOrderLog}
  1798. >
  1799. <div className="patent-table">
  1800. <Spin spinning={this.state.loading}>
  1801. <Table
  1802. columns={this.state.columnsrizhi}
  1803. dataSource={this.state.dataSourcerizhi}
  1804. pagination={false}
  1805. />
  1806. </Spin>
  1807. </div>
  1808. </Modal>
  1809. </div>
  1810. </div>
  1811. );
  1812. }
  1813. })
  1814. );
  1815. export default outsourcingList;