examine.jsx 63 KB

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