outsourcingList.jsx 63 KB

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