outsourcingList.jsx 63 KB

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