reject.jsx 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647
  1. import React from 'react';
  2. import {
  3. Tooltip,
  4. Button,
  5. AutoComplete,
  6. Input,
  7. Select,
  8. Spin,
  9. Popconfirm,
  10. Table,
  11. message,
  12. DatePicker,
  13. Upload,
  14. Form,
  15. Modal,
  16. Col,
  17. Tag,
  18. Tabs,
  19. Radio
  20. } from 'antd';
  21. import $ from 'jquery/src/ajax';
  22. import moment from 'moment';
  23. import { boutique, tepi, jiedian, salesList, cuiJieDian } from '@/dataDic.js';
  24. import {
  25. getLiquidationStatus,
  26. getProcessStatus,
  27. splitUrl,
  28. getCuikuan,
  29. moneyVerify,
  30. ShowModal
  31. } from "@/tools.js";
  32. import './customer.less';
  33. import ShowModalDiv from "@/showModal.jsx"
  34. import OrderRiZi from "@/orderRiZi.jsx";
  35. import ResolutionDetail from "@/resolutionDetail";
  36. import ImgList from "../../../common/imgList";
  37. import { ChooseList } from "./chooseList";
  38. import OrderItemStatus from "../../../common/orderItemStatus";
  39. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  40. import OrderCoor from './changeComponent/orderCoor';
  41. import ProjectOperation from "../../../common/projectOperation";
  42. import ContentUrl from './contentUrl';
  43. import UpdateSales from './updatesales';//修改销售类型
  44. //图片组件
  45. const PicturesWall = React.createClass({
  46. getInitialState() {
  47. return {
  48. fileList: [],
  49. }
  50. },
  51. handleChange(info) {
  52. let fileList = info.fileList;
  53. this.setState({
  54. fileList
  55. });
  56. this.props.fileList(fileList);
  57. },
  58. componentWillReceiveProps(nextProps) {
  59. this.state.fileList = nextProps.pictureUrl;
  60. this.state.pojectApplicationUrl = undefined;
  61. },
  62. render() {
  63. const { fileList } = this.state;
  64. return (
  65. <div style={{ display: "inline-block" }}>
  66. <ImgList
  67. domId={this.props.domId}
  68. uploadConfig={{
  69. action: globalConfig.context + "/api/admin/customer/uploadCustomerImg",
  70. data: { 'sign': '' },
  71. multiple: true,
  72. listType: "picture-card",
  73. }}
  74. onChange={(infor) => {
  75. this.handleChange(infor)
  76. }}
  77. fileList={fileList}
  78. />
  79. </div>
  80. );
  81. }
  82. });
  83. const IntentionCustomer = Form.create()(
  84. React.createClass({
  85. loadData(pageNo) {
  86. this.setState({
  87. visitModul: false,
  88. loading: true,
  89. ispage: pageNo,
  90. modalVisible: false,
  91. });
  92. $.ajax({
  93. method: "get",
  94. dataType: "json",
  95. crossDomain: false,
  96. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  97. data: {
  98. pageNo: pageNo || 1,
  99. pageSize: this.state.pagination.pageSize,
  100. specially: 2, //审核列表
  101. name: this.state.customerName, //名称
  102. orderNo: this.state.orderNoSearch, //订单编号
  103. starTime: this.state.releaseDate[0], //开始时间
  104. endTime: this.state.releaseDate[1], //结束时间
  105. },
  106. success: function (data) {
  107. ShowModal(this);
  108. let theArr = [];
  109. if (data.error.length || data.data.list == "") {
  110. if (data.error && data.error.length) {
  111. message.warning(data.error[0].message);
  112. }
  113. } else {
  114. for (let i = 0; i < data.data.list.length; i++) {
  115. let thisdata = data.data.list[i];
  116. thisdata.key = i;
  117. thisdata.totalAmount = thisdata.totalAmount + ""; //签单金额
  118. theArr.push(thisdata);
  119. }
  120. this.state.pagination.total = data.data.totalCount;
  121. this.state.pagination.current = data.data.pageNo;
  122. }
  123. if (data.data && data.data.list && !data.data.list.length) {
  124. this.state.pagination.total = 0;
  125. }
  126. this.setState({
  127. dataSource: theArr,
  128. pageNo: pageNo,
  129. pagination: this.state.pagination,
  130. selectedRowKeys: [],
  131. });
  132. }.bind(this),
  133. }).always(
  134. function () {
  135. this.setState({
  136. loading: false,
  137. });
  138. }.bind(this)
  139. );
  140. },
  141. getInitialState() {
  142. return {
  143. page: 1,
  144. orderNos: '',
  145. patentTypeList: [],
  146. releaseDate: [],
  147. orderStatus: 0,
  148. processStatus: 0,
  149. selectedRowKeys: [],
  150. orgCodeUrl: [],
  151. replenishUrl: [],
  152. contentUrl: [],
  153. customerArr: [],
  154. resVisible: false,
  155. pagination: {
  156. defaultCurrent: 1,
  157. defaultPageSize: 10,
  158. showQuickJumper: true,
  159. pageSize: 10,
  160. onChange: function (page) {
  161. this.loadData(page);
  162. }.bind(this),
  163. showTotal: function (total) {
  164. return "共" + total + "条数据";
  165. },
  166. },
  167. columns: [
  168. {
  169. title: "驳回编号",
  170. dataIndex: "backId",
  171. key: "backId",
  172. },
  173. {
  174. title: "驳回日期",
  175. dataIndex: "backDate",
  176. key: "backDate",
  177. },
  178. {
  179. title: "下单时间",
  180. dataIndex: "createDate",
  181. key: "createDate",
  182. },
  183. {
  184. title: "订单编号",
  185. dataIndex: "orderNo",
  186. key: "orderNo",
  187. },
  188. {
  189. title: "客户名称",
  190. dataIndex: "userName",
  191. key: "userName",
  192. render: (text) => {
  193. return (
  194. <Tooltip title={text}>
  195. <div style={{
  196. maxWidth: '150px',
  197. overflow: 'hidden',
  198. textOverflow: "ellipsis",
  199. whiteSpace: 'nowrap',
  200. }}>{text}</div>
  201. </Tooltip>
  202. )
  203. },
  204. },
  205. {
  206. title: "驳回人",
  207. dataIndex: "initiateName",
  208. key: "initiateName",
  209. },
  210. {
  211. title: "驳回原因",
  212. dataIndex: "reason",
  213. key: "reason",
  214. render: (text) => {
  215. return text && text.length > 24
  216. ? text.substr(0, 24) + "..."
  217. : text;
  218. },
  219. },
  220. ],
  221. columnsrizhi: [
  222. {
  223. title: "流程",
  224. dataIndex: "processName",
  225. key: "processName",
  226. },
  227. {
  228. title: "操作人",
  229. dataIndex: "adminName",
  230. key: "adminName",
  231. },
  232. {
  233. title: "时间",
  234. dataIndex: "createDate",
  235. key: "createDate",
  236. },
  237. ],
  238. data: [],
  239. dataSource: [],
  240. columnsX: [
  241. {
  242. title: "业务项目名称",
  243. dataIndex: "commodityName",
  244. key: "commodityName",
  245. render: (text, record) => {
  246. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  247. }
  248. },
  249. {
  250. title: "项目类别",
  251. dataIndex: "cname",
  252. key: "cname",
  253. },
  254. {
  255. title: "项目数量",
  256. dataIndex: "commodityQuantity",
  257. key: "commodityQuantity",
  258. render: (text, record) => {
  259. if (record.splitStatus == 1) {
  260. return (
  261. <span>
  262. {text}{" "}
  263. <Tag
  264. color="#108ee9"
  265. onClick={(e) => {
  266. e.stopPropagation();
  267. this.showRes(record);
  268. }}
  269. >
  270. 已拆
  271. </Tag>
  272. </span>
  273. );
  274. } else {
  275. return text;
  276. }
  277. },
  278. },
  279. {
  280. title: "金额(万元)",
  281. dataIndex: "commodityPrice",
  282. key: "commodityPrice",
  283. },
  284. {
  285. title: "负责人",
  286. dataIndex: "contacts",
  287. key: "contacts",
  288. },
  289. {
  290. title: "负责人电话",
  291. dataIndex: "contactsMobile",
  292. key: "contactsMobile",
  293. },
  294. {
  295. title: "主要项目",
  296. dataIndex: "main",
  297. key: "main",
  298. render: (text) => {
  299. return text ? "是" : "否";
  300. },
  301. },
  302. {
  303. title: "项目说明",
  304. dataIndex: "taskComment",
  305. key: "taskComment",
  306. render: (text) => {
  307. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  308. },
  309. },
  310. {
  311. title: "操作",
  312. dataIndex: "ABC",
  313. key: "ABC",
  314. render: (text, record) => {
  315. return (
  316. <div>
  317. {this.state.processStatus == 0 ? (
  318. <Popconfirm
  319. title="是否要删除?如果删除此项目业务,对应的催款节点也会删除!"
  320. onConfirm={() => {
  321. this.delectRow(record);
  322. }}
  323. okText="是"
  324. cancelText="否"
  325. >
  326. <Button
  327. onClick={(e) => {
  328. e.stopPropagation();
  329. }}
  330. type="danger"
  331. >
  332. 删除
  333. </Button>
  334. </Popconfirm>
  335. ) : (
  336. ""
  337. )}
  338. </div>
  339. );
  340. },
  341. },
  342. ],
  343. dataSourceX: [],
  344. ContactsListsNew: [
  345. {
  346. title: "项目名称",
  347. dataIndex: "commodityName",
  348. key: "commodityName",
  349. render: (text, record, index) => {
  350. let dataArr = this.state.dataSourceX || [];
  351. if (text) {
  352. return <span>{text + "-" + record.tid}</span>;
  353. }
  354. return (
  355. <Select
  356. placeholder="请选择名称"
  357. style={{ width: "150px" }}
  358. disabled={
  359. this.state.getLoad && record.sortName ? true : false
  360. }
  361. onChange={(e) => {
  362. // record.sortName = e;
  363. // dataArr.forEach((item) => {
  364. // if (item.commodityName == record.sortName) {
  365. // record.cname = item.cname;
  366. // record.tid = item.id;
  367. // record.isSave = true;
  368. // record.sort = item.sort;
  369. // console.log(record);
  370. // cuiJieDian.forEach((item) => {
  371. // if (item.value == record.sort) {
  372. // record.arr = item.children;
  373. // let yearFlag = true;
  374. // if (record.sort == 6) {
  375. // yearFlag = false;
  376. // }
  377. // this.setState({
  378. // getLoad: true,
  379. // yearFlag,
  380. // });
  381. // }
  382. // });
  383. // }
  384. // });
  385. // console.log(e);
  386. let proData = dataArr[e];
  387. record.cname = proData.cname;
  388. record.tid = proData.id;
  389. record.isSave = true;
  390. record.sort = proData.sort;
  391. cuiJieDian.forEach((item) => {
  392. if (item.value == record.sort) {
  393. record.arr = item.children;
  394. let yearFlag = true;
  395. if (record.sort == 6) {
  396. yearFlag = false;
  397. }
  398. this.setState({
  399. getLoad: true,
  400. yearFlag,
  401. });
  402. }
  403. });
  404. }}
  405. >
  406. {dataArr.map((item) => {
  407. return (
  408. <Select.Option key={item.id} value={item.key}>
  409. {item.commodityName + "-" + item.id}
  410. </Select.Option>
  411. );
  412. })}
  413. </Select>
  414. );
  415. },
  416. },
  417. {
  418. title: "项目分类",
  419. dataIndex: "projectType",
  420. key: "projectType",
  421. render: (text, record) => {
  422. if (text) {
  423. let arr = this.state.dataSourceX || [];
  424. let str = "";
  425. for (let i = 0; i < arr.length; i++) {
  426. if (this.state.dataSourceX[i].sort == text) {
  427. str = this.state.dataSourceX[i].cname;
  428. return <span>{str}</span>;
  429. }
  430. }
  431. }
  432. if (this.state.getLoad) {
  433. return (
  434. <Select
  435. style={{ width: "150px" }}
  436. placeholder="请选择分类"
  437. value={record.cname}
  438. >
  439. <Select.Option key={record.sort} value={record.cname}>
  440. {record.cname}
  441. </Select.Option>
  442. </Select>
  443. );
  444. } else {
  445. return (
  446. <Select style={{ width: "150px" }} placeholder="请选择分类">
  447. <Select.Option key={record.sort} value={record.cname}>
  448. {record.cname}
  449. </Select.Option>
  450. </Select>
  451. );
  452. }
  453. },
  454. },
  455. {
  456. title: "催款科目",
  457. dataIndex: "dunTypeName",
  458. key: "dunTypeName",
  459. render: (text, record) => {
  460. if (text) {
  461. if (record.customizeName) {
  462. return record.customizeName;
  463. }
  464. return <span>{text}</span>;
  465. }
  466. if (this.state.getLoad) {
  467. let arr = record.arr || [];
  468. return (
  469. <div>
  470. <Select
  471. style={{ width: "150px" }}
  472. placeholder="请选择分类"
  473. onChange={(e) => {
  474. record.dunType = e;
  475. if (record.dunType == 0) {
  476. record.customizeTimes = "";
  477. record.customizeName = "";
  478. }
  479. if (e == 0) {
  480. record.dunTypeCustom = true;
  481. } else {
  482. record.dunTypeCustom = false;
  483. }
  484. if (e != 1) {
  485. this.setState({
  486. timeFlag: true,
  487. });
  488. } else {
  489. this.setState({
  490. timeFlag: false,
  491. });
  492. }
  493. if (e == 1 && record.sort == 6) {
  494. this.setState({
  495. yearFlag: true,
  496. });
  497. } else if (e != 1 && record.sort == 6) {
  498. this.setState({
  499. yearFlag: false,
  500. });
  501. }
  502. if (record.sort == 3 && e == 3) {
  503. this.setState({
  504. boFlag: true,
  505. });
  506. } else {
  507. this.setState({
  508. boFlag: false,
  509. });
  510. }
  511. }}
  512. >
  513. {arr.map((item) => {
  514. record;
  515. return (
  516. <Select.Option key={item.value} value={item.value}>
  517. {item.key}
  518. </Select.Option>
  519. );
  520. })}
  521. <Select.Option key={0} value={0}>
  522. 自定义
  523. </Select.Option>
  524. </Select>
  525. {record.dunType == 0 ? (
  526. <Input
  527. value={record.customizeName}
  528. placeholder="请输入自定义名称"
  529. required="required"
  530. onChange={(e) => {
  531. record.customizeName = e.target.value;
  532. this.setState({
  533. contactList: this.state.contactList,
  534. });
  535. }}
  536. style={{ width: "120px" }}
  537. />
  538. ) : (
  539. ""
  540. )}
  541. </div>
  542. );
  543. } else {
  544. return (
  545. <Select style={{ width: "150px" }} placeholder="请选择分类">
  546. <Select.Option
  547. key={0}
  548. value={"请选择上一项"}
  549. ></Select.Option>
  550. </Select>
  551. );
  552. }
  553. },
  554. },
  555. {
  556. title: "收款时间(特批需选择时间)",
  557. dataIndex: "waitDay",
  558. key: "waitDay",
  559. render: (text, record) => {
  560. if (record.dunTypeName) {
  561. if (record.customizeTimes) {
  562. return record.customizeTimes;
  563. }
  564. if (text == 0) {
  565. var str = "当天";
  566. } else if (!text) {
  567. var str = "";
  568. } else {
  569. var str = text + "天";
  570. }
  571. return <span>{str}</span>;
  572. }
  573. return (
  574. <div>
  575. {record.dunType == 0 ? (
  576. <DatePicker
  577. style={{ width: 150 }}
  578. onChange={(e, t) => {
  579. record.customizeTimes = t;
  580. }}
  581. />
  582. ) : (
  583. <Select
  584. placeholder="请选择时间"
  585. style={{ width: "160px" }}
  586. disabled={
  587. this.state.approval != 0 && !this.state.timeFlag
  588. ? false
  589. : true
  590. }
  591. onChange={(e) => {
  592. record.waitDay = e;
  593. }}
  594. >
  595. <Select.Option key={0}>当天</Select.Option>
  596. <Select.Option key={3}>3天</Select.Option>
  597. <Select.Option key={5}>5天</Select.Option>
  598. <Select.Option key={7}>7天</Select.Option>
  599. <Select.Option key={15}>15天</Select.Option>
  600. </Select>
  601. )}
  602. </div>
  603. );
  604. },
  605. },
  606. {
  607. title: "金额(万元)",
  608. dataIndex: "money",
  609. key: "money",
  610. render: (text, record) => {
  611. if (record.dunTypeName) {
  612. if (record.appropriationRatio) {
  613. return <span>{record.appropriationRatio}(拨款比例)</span>;
  614. } else {
  615. return <span>{text}</span>;
  616. }
  617. }
  618. if (this.state.boFlag) {
  619. return (
  620. <div>
  621. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  622. <Select
  623. placeholder="选择"
  624. defaultValue={"金额"}
  625. onChange={(e) => {
  626. record.boStatus = e;
  627. }}
  628. >
  629. <Select.Option key={true}>比例</Select.Option>
  630. <Select.Option key={false}>金额</Select.Option>
  631. </Select>
  632. </div>
  633. <div style={{ float: "right" }}>
  634. <Input
  635. value={record.money}
  636. key={record.id}
  637. required="required"
  638. onChange={(e) => {
  639. record.money = e.target.value;
  640. this.setState({
  641. contactList: this.state.contactList,
  642. });
  643. }}
  644. style={{ width: "120px" }}
  645. />
  646. </div>
  647. </div>
  648. );
  649. } else {
  650. return (
  651. <div>
  652. <Input
  653. value={record.money}
  654. placeholder="请输入金额(必填项)"
  655. key={record.id}
  656. required="required"
  657. onChange={(e) => {
  658. record.money = e.target.value;
  659. this.setState({ contactList: this.state.contactList });
  660. }}
  661. style={{ width: "120px" }}
  662. />
  663. </div>
  664. );
  665. }
  666. },
  667. },
  668. {
  669. title: "服务年限",
  670. dataIndex: "startDate",
  671. key: "startDate",
  672. render: (text, record) => {
  673. if (record.dunTypeName) {
  674. return <span>{text}</span>;
  675. }
  676. return (
  677. <div>
  678. {
  679. record.dunType != 0 ?
  680. <Select
  681. placeholder="请选择年限"
  682. style={{ width: "150px" }}
  683. disabled={this.state.yearFlag ? true : false}
  684. onChange={(e) => {
  685. record.effectiveCount = e;
  686. }}
  687. >
  688. {/* <Select.Option key={null}>无</Select.Option> */}
  689. <Select.Option key={1}>一年</Select.Option>
  690. <Select.Option key={3}>两年</Select.Option>
  691. <Select.Option key={5}>三年</Select.Option>
  692. <Select.Option key={7}>四年</Select.Option>
  693. <Select.Option key={9}>五年</Select.Option>
  694. </Select> : <div />
  695. }
  696. </div>
  697. );
  698. },
  699. },
  700. {
  701. title: "催款状态",
  702. dataIndex: "status",
  703. key: "status",
  704. render: (text) => {
  705. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  706. },
  707. },
  708. {
  709. title: "操作",
  710. dataIndex: "dels",
  711. key: "dels",
  712. render: (text, record, index) => {
  713. return (
  714. <div>
  715. {this.state.processStatus == 0 ? (
  716. <Popconfirm
  717. title="是否删除?"
  718. onConfirm={() => {
  719. this.confirmDeletNew(record);
  720. }}
  721. okText="删除"
  722. cancelText="不删除"
  723. >
  724. <Button
  725. style={{
  726. marginRight: "10px",
  727. color: "#ffffff",
  728. background: "#f00",
  729. border: "none",
  730. }}
  731. >
  732. 删除
  733. </Button>
  734. </Popconfirm>
  735. ) : (
  736. ""
  737. )}
  738. {record.isSave ? (
  739. <Button
  740. type="primary"
  741. onClick={(e) => {
  742. this.contactSaveNew(record);
  743. this.setState({
  744. addFlag: false,
  745. });
  746. }}
  747. >
  748. 保存
  749. </Button>
  750. ) : (
  751. ""
  752. )}
  753. </div>
  754. );
  755. },
  756. },
  757. ],
  758. ContactsLists: [
  759. {
  760. title: "催款科目",
  761. dataIndex: "dunSubject",
  762. key: "dunSubject",
  763. render: (text, record) => {
  764. return (
  765. <Select
  766. placeholder="请选择催款科目"
  767. value={record.dunSubject}
  768. disabled
  769. style={{ width: "150px" }}
  770. onChange={(e) => {
  771. record.dunSubject = e;
  772. this.setState({ contactList: this.state.contactList });
  773. }}
  774. >
  775. {jiedian.map(function (item) {
  776. return (
  777. <Select.Option key={item.value}>{item.key}</Select.Option>
  778. );
  779. })}
  780. </Select>
  781. );
  782. },
  783. },
  784. {
  785. title: "金额(万元)",
  786. dataIndex: "money",
  787. key: "money",
  788. render: (text, record) => {
  789. return (
  790. <Input
  791. value={record.money}
  792. disabled
  793. placeholder="请输入金额(必填项)"
  794. key={record.id}
  795. required="required"
  796. onChange={(e) => {
  797. record.money = e.target.value;
  798. this.setState({ contactList: this.state.contactList });
  799. }}
  800. style={{ width: "120px" }}
  801. />
  802. );
  803. },
  804. },
  805. {
  806. title: "催款状态",
  807. dataIndex: "dunStatus",
  808. key: "dunStatus",
  809. render: (text) => {
  810. return getCuikuan(text);
  811. },
  812. },
  813. {
  814. title: "操作",
  815. dataIndex: "dels",
  816. key: "dels",
  817. render: (text, record) => {
  818. return (
  819. <div>
  820. {
  821. <Popconfirm
  822. title="是否删除?"
  823. onConfirm={() => {
  824. this.confirmDelet(record.key);
  825. }}
  826. okText="删除"
  827. cancelText="不删除"
  828. >
  829. <Button
  830. style={{
  831. marginRight: "10px",
  832. color: "#ffffff",
  833. background: "#f00",
  834. border: "none",
  835. }}
  836. >
  837. 删除
  838. </Button>
  839. </Popconfirm>
  840. }
  841. {record.id ? (
  842. ""
  843. ) : (
  844. <Button type="primary" onClick={this.contactSave} disabled>
  845. 保存
  846. </Button>
  847. )}
  848. </div>
  849. );
  850. },
  851. },
  852. ],
  853. updatas: {},
  854. };
  855. },
  856. //删除
  857. delectRow(record) {
  858. this.setState({
  859. loading: true,
  860. });
  861. $.ajax({
  862. method: "post",
  863. dataType: "json",
  864. crossDomain: false,
  865. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  866. data: {
  867. id: record.id,
  868. },
  869. }).done(
  870. function (data) {
  871. if (!data.error.length) {
  872. message.success("删除成功!");
  873. this.setState({
  874. loading: false,
  875. });
  876. this.xiangmu(this.state.orderNo);
  877. this.jiedianNew(this.state.orderNo);
  878. this.jiedian(this.state.orderNo);
  879. this.loadData(this.state.pageNo);
  880. } else {
  881. message.warning(data.error[0].message);
  882. }
  883. }.bind(this)
  884. );
  885. },
  886. //页面加载函数
  887. componentWillMount() {
  888. this.loadData();
  889. },
  890. //整行点击
  891. tableRowClick(record) {
  892. this.setState({
  893. visible: true,
  894. orderNos: record.orderNo,
  895. orderStatus: record.orderStatus,
  896. processStatus: record.orderStatus
  897. });
  898. this.xiangqing(record.orderNo);
  899. this.xiangmu(record.orderNo);
  900. this.jiedian(record.orderNo);
  901. this.jiedianNew(record.orderNo);
  902. this.departmentList();
  903. this.getpatentTypeList();
  904. },
  905. //点击打卡项目详情
  906. tableRowClickX(record) {
  907. this.setState({
  908. projectOperationVisible: true,
  909. dataInfor: record,
  910. })
  911. },
  912. //项目详情关闭
  913. nextCancel() {
  914. this.setState({
  915. projectOperationVisible: false,
  916. gid: "",
  917. dataInfor: {},
  918. }, () => {
  919. this.xiangmu(this.state.orderNo);
  920. });
  921. },
  922. //订单详情
  923. xiangqing(orderNos) {
  924. $.ajax({
  925. method: "get",
  926. dataType: "json",
  927. crossDomain: false,
  928. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  929. data: {
  930. orderNo: orderNos,
  931. },
  932. success: function (data) {
  933. if (data.error.length || data.data.list == "") {
  934. if (data.error && data.error.length) {
  935. message.warning(data.error[0].message);
  936. }
  937. } else {
  938. let thisdata = data.data;
  939. if (thisdata.approval == 2) {
  940. thisdata.approval = "特批通过";
  941. } else if (thisdata.approval == 3) {
  942. thisdata.approval = "特批驳回";
  943. }
  944. this.setState({
  945. id: thisdata.id,
  946. orderUid: thisdata.uid,
  947. kehuId: thisdata.buyerId,
  948. orderNo: thisdata.orderNo, //订单编号
  949. contractNo: thisdata.contractNo, //合同编号
  950. userName: thisdata.userName, //客户名称
  951. signDate: thisdata.signDate, //签单时间
  952. processStatus: thisdata.processStatus, //流程状态
  953. liquidationStatus: thisdata.liquidationStatus, //结算状态
  954. contacts: thisdata.contacts, //企业联系人
  955. contactMobile: thisdata.contactMobile, //联系人电话
  956. legalPerson: thisdata.legalPerson, //法人
  957. legalPersonTel: thisdata.legalPersonTel, //法人电话
  958. firstAmount: thisdata.firstAmount + "", //签单金额
  959. totalAmount: thisdata.totalAmount + "", //首付金额
  960. settlementAmount: thisdata.settlementAmount, //已收款项
  961. orderRemarks: thisdata.orderRemarks, //订单留言
  962. orgCodeUrl: thisdata.contractPictureUrl
  963. ? splitUrl(
  964. thisdata.contractPictureUrl,
  965. ",",
  966. globalConfig.avatarHost + "/upload"
  967. )
  968. : [], //图片地址
  969. replenishUrl: thisdata.agreementUrl
  970. ? splitUrl(
  971. thisdata.agreementUrl,
  972. ",",
  973. globalConfig.avatarHost + "/upload"
  974. )
  975. : [], //图片地址
  976. contentUrl: thisdata.serviceContent
  977. ? splitUrl(
  978. thisdata.serviceContent,
  979. ",",
  980. globalConfig.avatarHost + "/upload"
  981. )
  982. : [], //图片地址
  983. salesmanName: thisdata.salesmanName, //营销员名称
  984. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  985. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  986. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  987. financeName: thisdata.financeName, //财务名称
  988. financeMobile: thisdata.financeMobile, //财务电话
  989. nowFinance: thisdata.nowFinance, //财务名称
  990. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  991. initiateName: thisdata.initiateName, //驳回人
  992. backDate: thisdata.backDate, //驳回时间
  993. reason: thisdata.reason, //驳回原因
  994. approval: thisdata.approval.toString(), //特批状态
  995. organizationSearch: thisdata.orderDep,
  996. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  997. outsource: thisdata.outsource == 0 ? "否" : "是",
  998. deleteSign: thisdata.deleteSign,
  999. salesType: thisdata.salesType,//销售类型
  1000. userType: thisdata.userType,//客户所属类型
  1001. updatas: {
  1002. salesType: thisdata.salesType,//销售类型
  1003. userType: thisdata.userType,//客户所属类型
  1004. other: thisdata.other,//3渠道名 4,5描述
  1005. },
  1006. channelName: thisdata.salesType == "3" ? thisdata.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  1007. });
  1008. }
  1009. }.bind(this),
  1010. }).always(
  1011. function () {
  1012. this.setState({
  1013. loading: false,
  1014. });
  1015. }.bind(this)
  1016. );
  1017. },
  1018. // 拆分详细
  1019. showRes(record) {
  1020. this.setState({
  1021. resVisible: true,
  1022. resRecord: record,
  1023. });
  1024. },
  1025. resCancel() {
  1026. this.setState({
  1027. resVisible: false,
  1028. });
  1029. },
  1030. //项目列表
  1031. xiangmu(orderNos) {
  1032. $.ajax({
  1033. method: "get",
  1034. dataType: "json",
  1035. crossDomain: false,
  1036. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1037. data: {
  1038. orderNo: orderNos,
  1039. },
  1040. success: function (data) {
  1041. let theArr = [];
  1042. if (data.error.length || data.data.list == "") {
  1043. if (data.error && data.error.length) {
  1044. message.warning(data.error[0].message);
  1045. }
  1046. } else {
  1047. for (let i = 0; i < data.data.length; i++) {
  1048. let thisdata = data.data[i];
  1049. thisdata.key = i;
  1050. thisdata.sort = thisdata.cSort;
  1051. theArr.push(thisdata);
  1052. }
  1053. }
  1054. this.setState({
  1055. dataSourceX: theArr,
  1056. paginations: false,
  1057. });
  1058. }.bind(this),
  1059. }).always(
  1060. function () {
  1061. this.setState({
  1062. loading: false,
  1063. });
  1064. }.bind(this)
  1065. );
  1066. },
  1067. //节点列表
  1068. jiedian(orderNos) {
  1069. $.ajax({
  1070. method: "get",
  1071. dataType: "json",
  1072. crossDomain: false,
  1073. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1074. data: {
  1075. orderNo: orderNos,
  1076. },
  1077. success: function (data) {
  1078. let theArr = [];
  1079. let thisData = [];
  1080. if (data.error.length || data.data.list == "") {
  1081. if (data.error && data.error.length) {
  1082. message.warning(data.error[0].message);
  1083. }
  1084. } else {
  1085. for (let i = 0; i < data.data.length; i++) {
  1086. thisData = data.data[i];
  1087. theArr.push({
  1088. key: i,
  1089. dunSubject: thisData.dunSubject
  1090. ? thisData.dunSubject.toString()
  1091. : "", //催款科目
  1092. id: thisData.id, //节点Id
  1093. money: thisData.money, //催款金额
  1094. dunStatus: thisData.dunStatus, //催款状态
  1095. orderNo: thisData.orderNo,
  1096. });
  1097. }
  1098. this.setState({
  1099. contactList: theArr,
  1100. });
  1101. }
  1102. }.bind(this),
  1103. }).always(
  1104. function () {
  1105. this.setState({
  1106. loading: false,
  1107. });
  1108. }.bind(this)
  1109. );
  1110. },
  1111. //查看催款节点
  1112. jiedianNew(orderNos) {
  1113. $.ajax({
  1114. method: "get",
  1115. dataType: "json",
  1116. crossDomain: false,
  1117. url:
  1118. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1119. data: {
  1120. orderNo: orderNos,
  1121. },
  1122. success: function (data) {
  1123. if (data.error && data.error.length) {
  1124. message.warning(data.error[0].message);
  1125. } else {
  1126. let theArr = [];
  1127. let thisData = [];
  1128. let arr = data.data || [];
  1129. let totalCui = 0;
  1130. for (let i = 0; i < arr.length; i++) {
  1131. thisData = arr[i];
  1132. totalCui += +thisData.money;
  1133. theArr.push({
  1134. key: i,
  1135. dunSubject: thisData.dunSubject
  1136. ? thisData.dunSubject.toString()
  1137. : "", //催款科目
  1138. id: thisData.id, //节点Id
  1139. money: thisData.money, //催款金额
  1140. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1141. commodityName: thisData.commodityName,
  1142. projectType: thisData.projectType,
  1143. dunTypeName: thisData.dunTypeName,
  1144. status: thisData.status,
  1145. waitDay: thisData.waitDay,
  1146. effectiveCount: thisData.effectiveCount,
  1147. startDate: thisData.startDate,
  1148. dunType: thisData.dunType,
  1149. appropriationRatio: thisData.appropriationRatio,
  1150. customizeName: thisData.customizeName,
  1151. customizeTimes: thisData.customizeTimes,
  1152. tid: thisData.tid,
  1153. });
  1154. }
  1155. if (!totalCui) {
  1156. totalCui = 0;
  1157. }
  1158. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1159. this.setState({
  1160. contactListNew: theArr,
  1161. totalCui: parseFloat(totalCui),
  1162. });
  1163. }
  1164. }.bind(this),
  1165. }).always(
  1166. function () {
  1167. this.setState({
  1168. loading: false,
  1169. });
  1170. }.bind(this)
  1171. );
  1172. },
  1173. //催款节点保存
  1174. contactSave() {
  1175. for (let i = 0; i < this.state.contactList.length; i++) {
  1176. if (moneyVerify(this.state.contactList[i].money)) {
  1177. return;
  1178. }
  1179. }
  1180. this.setState({
  1181. loading: true,
  1182. });
  1183. $.ajax({
  1184. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1185. method: "post",
  1186. data: {
  1187. orderNo: this.state.orderNo,
  1188. orderDun: JSON.stringify(this.state.contactList),
  1189. },
  1190. }).done(
  1191. function (data) {
  1192. this.setState({
  1193. loading: false,
  1194. });
  1195. if (!data.error.length) {
  1196. message.success("保存成功!");
  1197. this.jiedian(this.state.orderNo);
  1198. } else {
  1199. message.warning(data.error[0].message);
  1200. }
  1201. }.bind(this)
  1202. );
  1203. },
  1204. //催款节点保存
  1205. contactSaveNew(record) {
  1206. if (record.dunType == 0) {
  1207. if (!record.customizeTimes) {
  1208. message.warning("请输入自定义时间");
  1209. return;
  1210. } else if (!record.customizeName) {
  1211. message.warning("请输入自定义科目");
  1212. return;
  1213. }
  1214. }
  1215. if (record.boStatus == "false") {
  1216. record.boStatus = false;
  1217. } else if (record.boStatus == "true") {
  1218. record.boStatus = true;
  1219. }
  1220. if (!this.state.yearFlag) {
  1221. if (!record.effectiveCount && !record.dunTypeCustom) {
  1222. message.warning("请选择服务年限");
  1223. return;
  1224. }
  1225. } else {
  1226. record.effectiveCount = "";
  1227. }
  1228. if (record.money == "") {
  1229. message.warning("请填写金额");
  1230. return;
  1231. }
  1232. if (record.boStatus) {
  1233. if (
  1234. typeof +record.money == "number" &&
  1235. +record.money >= 0 &&
  1236. +record.money <= 1
  1237. ) {
  1238. record.appropriationRatio = record.money;
  1239. } else {
  1240. message.warning("金额比例填写错误,比例范围0~1");
  1241. return;
  1242. }
  1243. }
  1244. if (!record.dunType && record.dunType != 0) {
  1245. message.warning("请选择对应科目");
  1246. return;
  1247. }
  1248. if (record.dunType != 1) {
  1249. record.waitDay = "";
  1250. }
  1251. this.setState({
  1252. loading: true,
  1253. });
  1254. if (record.boStatus) {
  1255. $.ajax({
  1256. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1257. method: "post",
  1258. data: {
  1259. orderNo: record.orderNo,
  1260. tid: record.tid,
  1261. projectType: record.sort,
  1262. dunType: record.dunType,
  1263. appropriationRatio: record.appropriationRatio,
  1264. waitDay: record.waitDay,
  1265. effectiveCount: record.effectiveCount,
  1266. customizeTimes:
  1267. record.dunType == 0 ? record.customizeTimes : undefined,
  1268. customizeName:
  1269. record.dunType == 0 ? record.customizeName : undefined,
  1270. },
  1271. }).done(
  1272. function (data) {
  1273. this.setState({
  1274. loading: false,
  1275. });
  1276. if (!data.error.length) {
  1277. message.success("保存成功!");
  1278. this.setState({
  1279. cuiFlag: false,
  1280. boFlag: false,
  1281. });
  1282. this.jiedianNew(record.orderNo);
  1283. } else {
  1284. message.warning(data.error[0].message);
  1285. }
  1286. }.bind(this)
  1287. );
  1288. } else {
  1289. $.ajax({
  1290. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1291. method: "post",
  1292. data: {
  1293. orderNo: record.orderNo,
  1294. tid: record.tid,
  1295. projectType: record.sort,
  1296. dunType: record.dunType,
  1297. money: record.money,
  1298. waitDay: record.waitDay,
  1299. effectiveCount: record.effectiveCount,
  1300. customizeTimes:
  1301. record.dunType == 0 ? record.customizeTimes : undefined,
  1302. customizeName:
  1303. record.dunType == 0 ? record.customizeName : undefined,
  1304. },
  1305. }).done(
  1306. function (data) {
  1307. this.setState({
  1308. loading: false,
  1309. });
  1310. if (!data.error.length) {
  1311. message.success("保存成功!");
  1312. this.setState({
  1313. cuiFlag: false,
  1314. boFlag: false,
  1315. });
  1316. this.jiedianNew(record.orderNo);
  1317. } else {
  1318. message.warning(data.error[0].message);
  1319. }
  1320. }.bind(this)
  1321. );
  1322. }
  1323. },
  1324. //点击新增催款节点
  1325. addcontact() {
  1326. this.state.contactList.push({
  1327. key: this.state.contactList.length,
  1328. money: "",
  1329. dunSubject: undefined,
  1330. orderNo: this.state.orderNo,
  1331. dunTarget: this.state.kehuId,
  1332. });
  1333. this.setState({
  1334. contactList: this.state.contactList,
  1335. });
  1336. },
  1337. //点击新增催款节点
  1338. addcontactNew() {
  1339. this.state.contactListNew.push({
  1340. key: this.state.contactListNew.length,
  1341. money: "",
  1342. dunSubject: undefined,
  1343. orderNo: this.state.orderNo,
  1344. dunTarget: this.state.kehuId,
  1345. });
  1346. this.setState({
  1347. contactListNew: this.state.contactListNew,
  1348. cuiFlag: true,
  1349. });
  1350. },
  1351. //删除收款节点
  1352. confirmDelet(index) {
  1353. this.state.contactList.splice(index, 1);
  1354. this.setState({
  1355. contactList: this.state.contactList,
  1356. });
  1357. this.contactSave();
  1358. },
  1359. //删除收款节点
  1360. confirmDeletNew(index) {
  1361. if (index.id) {
  1362. this.state.contactListNew.splice(index.key, 1);
  1363. this.setState({
  1364. contactListNew: this.state.contactListNew,
  1365. cuiFlag: false,
  1366. addFlag: false,
  1367. boFlag: false,
  1368. });
  1369. $.ajax({
  1370. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1371. method: "post",
  1372. data: {
  1373. id: index.id,
  1374. },
  1375. }).done(
  1376. function (data) {
  1377. this.setState({
  1378. loading: false,
  1379. });
  1380. if (!data.error.length) {
  1381. message.success("删除成功!");
  1382. this.setState({
  1383. cuiFlag: false,
  1384. });
  1385. this.jiedianNew(this.state.orderNo);
  1386. } else {
  1387. message.warning(data.error[0].message);
  1388. }
  1389. }.bind(this)
  1390. );
  1391. } else {
  1392. this.state.contactListNew.splice(index.key, 1);
  1393. this.setState({
  1394. contactListNew: this.state.contactListNew,
  1395. cuiFlag: false,
  1396. addFlag: false,
  1397. boFlag: false,
  1398. });
  1399. }
  1400. },
  1401. //重新提交
  1402. examOk() {
  1403. // if (this.state.flag) return;
  1404. let theorgCodeUrl = [];
  1405. if (this.state.orgCodeUrl.length) {
  1406. let picArr = [];
  1407. this.state.orgCodeUrl.map(function (item) {
  1408. if (
  1409. item.response &&
  1410. item.response.data &&
  1411. item.response.data.length
  1412. ) {
  1413. picArr.push(item.response.data);
  1414. }
  1415. });
  1416. theorgCodeUrl = picArr.join(",");
  1417. }
  1418. let theReplenishUrl = [];
  1419. if (this.state.replenishUrl.length) {
  1420. let picArr = [];
  1421. this.state.replenishUrl.map(function (item) {
  1422. if (
  1423. item.response &&
  1424. item.response.data &&
  1425. item.response.data.length
  1426. ) {
  1427. picArr.push(item.response.data);
  1428. }
  1429. });
  1430. theReplenishUrl = picArr.join(",");
  1431. }
  1432. // 服务内容上传图片
  1433. let contentUrl = [];
  1434. if (this.state.contentUrl.length) {
  1435. let picArr = [];
  1436. this.state.contentUrl.map(function (item) {
  1437. if (
  1438. item.response &&
  1439. item.response.data &&
  1440. item.response.data.length
  1441. ) {
  1442. picArr.push(item.response.data);
  1443. }
  1444. });
  1445. contentUrl = picArr.join(",");
  1446. } else {
  1447. message.info("请上传服务内容图片")
  1448. return
  1449. }
  1450. if (moneyVerify(this.state.totalAmount)) {
  1451. return;
  1452. }
  1453. if (moneyVerify(this.state.firstAmount)) {
  1454. return;
  1455. }
  1456. if (!this.state.totalAmount) {
  1457. message.warning("签单金额不能为空");
  1458. this.refs.signFirstPayment.focus();
  1459. return false;
  1460. }
  1461. if (!this.state.firstAmount) {
  1462. message.warning("首付金额不能为空");
  1463. this.refs.signFirstPayment.focus();
  1464. return false;
  1465. }
  1466. if (!theorgCodeUrl) {
  1467. message.warning("企业负责人不能为空");
  1468. this.refs.signFirstPayment.focus();
  1469. return false;
  1470. }
  1471. if (
  1472. this.state.approval == "特批通过" ||
  1473. this.state.approval == "特批驳回"
  1474. ) {
  1475. message.warning("特批状态不正确,请重新填写");
  1476. return false;
  1477. }
  1478. const arr = this.state.contactListNew || [];
  1479. for (let i = 0; i < arr.length; i++) {
  1480. if (
  1481. arr[i].dunType == 1 &&
  1482. arr[i].waitDay != null &&
  1483. this.state.approval == 0
  1484. ) {
  1485. message.warning(
  1486. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1487. );
  1488. return false;
  1489. } else if (
  1490. arr[i].dunType == 1 &&
  1491. arr[i].waitDay == null &&
  1492. this.state.approval == 1
  1493. ) {
  1494. message.warning(
  1495. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1496. );
  1497. return false;
  1498. }
  1499. if (!this.state.contactListNew[i].id) {
  1500. message.warning("请保存催款节点");
  1501. return false;
  1502. }
  1503. }
  1504. if (this.state.salesType == null) {
  1505. message.warning("请选择销售类型!");
  1506. return
  1507. }
  1508. this.setState({
  1509. flag: true,
  1510. });
  1511. $.ajax({
  1512. method: "post",
  1513. dataType: "json",
  1514. crossDomain: false,
  1515. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1516. data: {
  1517. orderNo: this.state.orderNo, //订单编号
  1518. totalAmount: this.state.totalAmount, //总金额
  1519. firstAmount: this.state.firstAmount, //首付
  1520. isSubmit: 1, //保存草稿还是提交
  1521. signDate: this.state.signDate, //签单日期
  1522. contacts: this.state.contacts, //企业负责人
  1523. contactMobile: this.state.contactMobile, //负责人联系方式
  1524. legalPerson: this.state.legalPerson, //企业法人
  1525. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1526. approval: this.state.approval, //特批状态
  1527. contractNo: this.state.contractNo, //合同编号
  1528. orderRemarks: this.state.orderRemarks, //订单备注
  1529. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1530. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1531. serviceContent: contentUrl.length ? contentUrl : "",
  1532. orderDep: this.state.organizationSearch,
  1533. },
  1534. success: function (data) {
  1535. if (data.error.length || data.data.list == "") {
  1536. if (data.error && data.error.length) {
  1537. message.warning(data.error[0].message);
  1538. this.setState({
  1539. flag: false,
  1540. });
  1541. }
  1542. } else {
  1543. message.success("该订单已重新提交~");
  1544. this.setState({
  1545. visible: false,
  1546. flag: false,
  1547. });
  1548. this.loadData(this.state.pageNo);
  1549. }
  1550. }.bind(this),
  1551. }).always(
  1552. function () {
  1553. this.setState({
  1554. loading: false,
  1555. });
  1556. }.bind(this)
  1557. );
  1558. },
  1559. //订单作废
  1560. examOks() {
  1561. this.setState({
  1562. flag: true,
  1563. });
  1564. $.ajax({
  1565. method: "post",
  1566. dataType: "json",
  1567. crossDomain: false,
  1568. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1569. data: {
  1570. orderNo: this.state.orderNo, //订单编号
  1571. },
  1572. success: function (data) {
  1573. if (data.error.length || data.data.list == "") {
  1574. if (data.error && data.error.length) {
  1575. message.warning(data.error[0].message);
  1576. }
  1577. } else {
  1578. message.success("该订单已作废~");
  1579. this.setState({
  1580. visible: false,
  1581. flag: false,
  1582. });
  1583. this.loadData(this.state.pageNo);
  1584. }
  1585. }.bind(this),
  1586. }).always(
  1587. function () {
  1588. this.setState({
  1589. loading: false,
  1590. flag: false,
  1591. });
  1592. }.bind(this)
  1593. );
  1594. },
  1595. departmentList() {
  1596. this.setState({
  1597. loading: true,
  1598. });
  1599. $.ajax({
  1600. method: "get",
  1601. dataType: "json",
  1602. crossDomain: false,
  1603. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1604. data: {},
  1605. success: function (data) {
  1606. let thedata = data.data;
  1607. let theArr = [];
  1608. if (!thedata) {
  1609. if (data.error && data.error.length) {
  1610. message.warning(data.error[0].message);
  1611. }
  1612. thedata = {};
  1613. } else {
  1614. thedata.map(function (item, index) {
  1615. theArr.push({
  1616. key: index,
  1617. name: item.name,
  1618. id: item.id,
  1619. depNo: item.depNo,
  1620. });
  1621. });
  1622. }
  1623. this.setState({
  1624. departmentArr: theArr,
  1625. });
  1626. }.bind(this),
  1627. }).always(
  1628. function () {
  1629. this.setState({
  1630. loading: false,
  1631. });
  1632. }.bind(this)
  1633. );
  1634. },
  1635. rizhi() {
  1636. this.setState({
  1637. loading: true,
  1638. });
  1639. $.ajax({
  1640. method: "get",
  1641. dataType: "json",
  1642. crossDomain: false,
  1643. url: "/api/admin/newOrder/selectOrderLog",
  1644. data: {
  1645. orderNo: this.state.orderNo,
  1646. },
  1647. success: function (data) {
  1648. let theArr = [];
  1649. let thisData = data.data;
  1650. if (!thisData.length) {
  1651. if (data.error && data.error.length) {
  1652. message.warning(data.error[0].message);
  1653. }
  1654. thisData = {};
  1655. } else {
  1656. for (let i = 0; i < data.data.length; i++) {
  1657. let thisdata = data.data[i];
  1658. theArr.push({
  1659. processName: thisdata.processName,
  1660. adminName: thisdata.adminName,
  1661. createDate: thisdata.createDate,
  1662. remarks: thisdata.remarks,
  1663. });
  1664. }
  1665. }
  1666. this.setState({
  1667. dataSourcerizhi: theArr,
  1668. });
  1669. }.bind(this),
  1670. }).always(
  1671. function () {
  1672. this.setState({
  1673. loading: false,
  1674. });
  1675. }.bind(this)
  1676. );
  1677. },
  1678. //查看订单日志
  1679. getOrderLog() {
  1680. this.setState({
  1681. rizhivisible: true,
  1682. });
  1683. this.rizhi();
  1684. },
  1685. closeOrderLog() {
  1686. this.setState({
  1687. rizhivisible: false,
  1688. });
  1689. },
  1690. //点击签单
  1691. handleCancels() {
  1692. this.setState({
  1693. isSubmit: 1,
  1694. });
  1695. },
  1696. //点击签单
  1697. handleCancelq() {
  1698. this.setState({
  1699. isSubmit: 0,
  1700. });
  1701. },
  1702. resets() {
  1703. this.state.orderNoSearch = "";
  1704. this.state.customerName = "";
  1705. this.state.releaseDate[0] = undefined;
  1706. this.state.releaseDate[1] = undefined;
  1707. this.loadData();
  1708. },
  1709. //点击添加项目明细
  1710. addDetailed() {
  1711. this.setState({
  1712. projectOperationVisible: true,
  1713. });
  1714. },
  1715. //搜索
  1716. search() {
  1717. this.setState({
  1718. //signBillVisible:false
  1719. });
  1720. this.loadData();
  1721. },
  1722. getOrgCodeUrl(e) {
  1723. this.setState({ orgCodeUrl: e });
  1724. },
  1725. getReplenishUrl(e) {
  1726. this.setState({ replenishUrl: e });
  1727. },
  1728. getContentUrl(e) {
  1729. this.setState({ contentUrl: e });
  1730. },
  1731. //关闭详情
  1732. visitCancel() {
  1733. this.setState({
  1734. visible: false,
  1735. cuiFlag: false,
  1736. addFlag: false,
  1737. boFlag: false,
  1738. });
  1739. this.loadData(this.state.pageNo);
  1740. },
  1741. visitOk() {
  1742. this.setState({
  1743. visible: false,
  1744. });
  1745. this.resets();
  1746. },
  1747. //客户
  1748. selectAutoCUT(value) {
  1749. let autoIds;
  1750. let fwList = this.state.customerArr;
  1751. fwList.map(function (item) {
  1752. if (value == item.name) {
  1753. autoIds = item.id;
  1754. }
  1755. });
  1756. this.setState({
  1757. customerName: value,
  1758. autoId: autoIds,
  1759. });
  1760. },
  1761. getpatentTypeList() {
  1762. $.ajax({
  1763. method: "get",
  1764. dataType: "json",
  1765. crossDomain: false,
  1766. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  1767. success: function (data) {
  1768. if (data.error.length === 0) {
  1769. this.setState({
  1770. patentTypeList: data.data
  1771. })
  1772. } else {
  1773. message.warning(data.error[0].message);
  1774. };
  1775. }.bind(this)
  1776. });
  1777. },
  1778. //加载(自动补全)
  1779. supervisor(e, state) {
  1780. //客户名称与服务名称自动补全
  1781. let api = state
  1782. ? "/api/admin/customer/getCustomerByName"
  1783. : "/api/admin/order/getBusinessProjectByName";
  1784. $.ajax({
  1785. method: "get",
  1786. dataType: "json",
  1787. crossDomain: false,
  1788. url: globalConfig.context + api,
  1789. data: state
  1790. ? {
  1791. name: e,
  1792. type: this.state.customType,
  1793. }
  1794. : {
  1795. businessName: e,
  1796. },
  1797. success: function (data) {
  1798. let thedata = data.data;
  1799. if (!thedata) {
  1800. if (data.error && data.error.length) {
  1801. message.warning(data.error[0].message);
  1802. }
  1803. thedata = {};
  1804. }
  1805. this.setState({
  1806. states: state,
  1807. customerArr: thedata,
  1808. });
  1809. }.bind(this),
  1810. }).always(
  1811. function () {
  1812. this.setState({
  1813. loading: false,
  1814. });
  1815. }.bind(this)
  1816. );
  1817. },
  1818. //上级主管输入框失去焦点是判断客户是否存在
  1819. selectAuto(value) {
  1820. let kid = [];
  1821. let fwList = this.state.customerArr;
  1822. fwList.map(function (item) {
  1823. if (value == item.bname) {
  1824. kid = item;
  1825. }
  1826. });
  1827. if (kid.type == "1") {
  1828. this.setState({
  1829. displayFees: "block",
  1830. });
  1831. } else {
  1832. this.setState({
  1833. displayFees: "none",
  1834. });
  1835. }
  1836. this.setState({
  1837. commodityName: value,
  1838. gid: kid.id,
  1839. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1840. commodityFirstPayment:
  1841. kid.firstPayment == 0
  1842. ? kid.firstPayment.toString()
  1843. : kid.firstPayment,
  1844. });
  1845. },
  1846. //服务值改变时请求客户名称
  1847. httpChange(e) {
  1848. this.state.gid = "";
  1849. if (e.length >= 1) {
  1850. this.supervisor(e, false);
  1851. }
  1852. this.setState({
  1853. commodityName: e,
  1854. });
  1855. },
  1856. changeList(arr) {
  1857. const newArr = [];
  1858. this.state.columns.forEach(item => {
  1859. arr.forEach(val => {
  1860. if (val === item.title) {
  1861. newArr.push(item);
  1862. }
  1863. });
  1864. });
  1865. this.setState({
  1866. changeList: newArr
  1867. });
  1868. },
  1869. render() {
  1870. const formItemLayout = {
  1871. labelCol: { span: 8 },
  1872. wrapperCol: { span: 14 },
  1873. };
  1874. const FormItem = Form.Item;
  1875. const { RangePicker } = DatePicker;
  1876. const rowSelection = {
  1877. selectedRowKeys: this.state.selectedRowKeys,
  1878. onChange: (selectedRowKeys, selectedRows) => {
  1879. this.setState({
  1880. modalVisible: false,
  1881. selectedRows: selectedRows.slice(-1),
  1882. selectedRowKeys: selectedRowKeys.slice(-1),
  1883. });
  1884. },
  1885. onSelect: (recordt) => {
  1886. this.setState({
  1887. modalVisible: false,
  1888. recordt: recordt.id,
  1889. });
  1890. },
  1891. };
  1892. const cuiDataList = this.state.contactList || [];
  1893. const dataSources = this.state.customerArr || [];
  1894. let departmentArr = this.state.departmentArr || [];
  1895. const options = this.state.states
  1896. ? dataSources.map((group) => (
  1897. <Select.Option key={group.id} value={group.name}>
  1898. {group.name}
  1899. </Select.Option>
  1900. ))
  1901. : dataSources.map((group, index) => (
  1902. <Select.Option key={index} value={group.bname}>
  1903. {group.bname}
  1904. </Select.Option>
  1905. ));
  1906. const { TabPane } = Tabs;
  1907. return (
  1908. <div className="user-content">
  1909. {this.state.resVisible ? (
  1910. <ResolutionDetail
  1911. cancel={this.resCancel}
  1912. detail={this.state.resRecord}
  1913. visible={this.state.resVisible}
  1914. id={this.state.resRecord.orderNo}
  1915. />
  1916. ) : (
  1917. ""
  1918. )}
  1919. <ShowModalDiv ShowModal={this.state.showModal} />
  1920. <div className="content-title" style={{ marginBottom: 10 }}>
  1921. <span style={{ fontWeight: 900, fontSize: 16 }}>订单审核</span>
  1922. </div>
  1923. <div className="user-search">
  1924. <Tabs
  1925. defaultActiveKey="1"
  1926. onChange={this.callback}
  1927. className="test"
  1928. >
  1929. <TabPane tab="搜索" key="1">
  1930. <Input
  1931. placeholder="客户名称"
  1932. style={{
  1933. width: "150px",
  1934. marginBottom: "10px",
  1935. marginTop: 10,
  1936. marginLeft: 10,
  1937. marginRight: 10,
  1938. }}
  1939. value={this.state.customerName}
  1940. onChange={(e) => {
  1941. this.setState({ customerName: e.target.value });
  1942. }}
  1943. />
  1944. <Input
  1945. placeholder="订单编号"
  1946. style={{ width: "150px", marginRight: 10 }}
  1947. value={this.state.orderNoSearch}
  1948. onChange={(e) => {
  1949. this.setState({ orderNoSearch: e.target.value });
  1950. }}
  1951. />
  1952. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1953. <RangePicker
  1954. value={[
  1955. this.state.releaseDate[0]
  1956. ? moment(this.state.releaseDate[0])
  1957. : null,
  1958. this.state.releaseDate[1]
  1959. ? moment(this.state.releaseDate[1])
  1960. : null,
  1961. ]}
  1962. onChange={(data, dataString) => {
  1963. this.setState({ releaseDate: dataString });
  1964. }}
  1965. />
  1966. <Button
  1967. type="primary"
  1968. onClick={this.search}
  1969. style={{ marginLeft: "10px", marginRight: 10 }}
  1970. >
  1971. 搜索
  1972. </Button>
  1973. <Button onClick={this.resets}>重置</Button>
  1974. </TabPane>
  1975. <TabPane tab="更改表格显示数据" key="2">
  1976. <div style={{ marginLeft: 10 }}>
  1977. <ChooseList
  1978. columns={this.state.columns}
  1979. changeFn={this.changeList}
  1980. changeList={this.state.changeList}
  1981. top={55}
  1982. margin={11}
  1983. />
  1984. </div>
  1985. </TabPane>
  1986. </Tabs>
  1987. <div className="patent-table">
  1988. <Spin spinning={this.state.loading}>
  1989. <Table
  1990. columns={
  1991. this.state.changeList
  1992. ? this.state.changeList
  1993. : this.state.columns
  1994. }
  1995. dataSource={this.state.dataSource}
  1996. rowSelection={rowSelection}
  1997. pagination={this.state.pagination}
  1998. onRowClick={this.tableRowClick}
  1999. bordered
  2000. size="small"
  2001. />
  2002. </Spin>
  2003. </div>
  2004. {this.state.visible ? <Modal
  2005. maskClosable={false}
  2006. className="customeDetails"
  2007. footer=""
  2008. title="订单详情"
  2009. width="1000px"
  2010. visible={this.state.visible}
  2011. onOk={this.visitOk}
  2012. onCancel={this.visitCancel}
  2013. >
  2014. <Form
  2015. layout="horizontal"
  2016. onSubmit={this.handleSubmit}
  2017. id="demand-form"
  2018. style={{ paddingBottom: "40px" }}
  2019. >
  2020. <Spin spinning={this.state.loading}>
  2021. <div className="clearfix">
  2022. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  2023. <OrderItemStatus deleteSign={this.state.deleteSign} />
  2024. </div>
  2025. <FormItem
  2026. className="half-item"
  2027. {...formItemLayout}
  2028. label="订单编号"
  2029. >
  2030. <span>{this.state.orderNo}</span>
  2031. </FormItem>
  2032. <FormItem
  2033. className="half-item"
  2034. {...formItemLayout}
  2035. label="合同编号"
  2036. >
  2037. <span>{this.state.contractNo}</span>
  2038. </FormItem>
  2039. <FormItem
  2040. className="half-item"
  2041. {...formItemLayout}
  2042. label="客户名称"
  2043. >
  2044. <span>{this.state.userName}</span>
  2045. <EnterpriseNameChange
  2046. type='journal'
  2047. style={{ marginLeft: 10 }}
  2048. enterpriseId={this.state.orderUid} />
  2049. </FormItem>
  2050. <FormItem
  2051. className="half-item"
  2052. {...formItemLayout}
  2053. label="销售类型"
  2054. >
  2055. <span>{(["私有客户-", "签单客户-"][this.state.userType] || " ") +
  2056. (salesList[this.state.salesType] || "")}</span>
  2057. <UpdateSales
  2058. orderNo={this.state.orderNo}
  2059. updatas={this.state.updatas}
  2060. onRefresh={this.xiangqing.bind(this, this.state.orderNo)}
  2061. />
  2062. </FormItem>
  2063. <FormItem
  2064. className="half-item"
  2065. {...formItemLayout}
  2066. label="流程状态"
  2067. >
  2068. <span>{getProcessStatus(this.state.processStatus)}</span>
  2069. </FormItem>
  2070. <FormItem
  2071. className="half-item"
  2072. {...formItemLayout}
  2073. label="结算状态"
  2074. >
  2075. <span>
  2076. {getLiquidationStatus(this.state.liquidationStatus)}
  2077. </span>
  2078. </FormItem>
  2079. <FormItem
  2080. className="half-item"
  2081. {...formItemLayout}
  2082. label="已收款项(万元)"
  2083. >
  2084. <span>{this.state.settlementAmount}</span>
  2085. </FormItem>
  2086. <FormItem
  2087. className="half-item"
  2088. {...formItemLayout}
  2089. label="企业联系人"
  2090. >
  2091. <Input
  2092. placeholder="请输入联系人"
  2093. ref="signTotalAmount"
  2094. value={this.state.contacts}
  2095. onChange={(e) => {
  2096. this.setState({ contacts: e.target.value });
  2097. }}
  2098. style={{ width: "240px" }}
  2099. />
  2100. </FormItem>
  2101. <FormItem
  2102. className="half-item"
  2103. {...formItemLayout}
  2104. label="联系人电话"
  2105. >
  2106. <Input
  2107. placeholder="请输入联系人电话"
  2108. ref="signTotalAmount"
  2109. value={this.state.contactMobile}
  2110. onChange={(e) => {
  2111. this.setState({ contactMobile: e.target.value });
  2112. }}
  2113. style={{ width: "240px" }}
  2114. />
  2115. </FormItem>
  2116. <FormItem
  2117. className="half-item"
  2118. {...formItemLayout}
  2119. label="企业法人"
  2120. >
  2121. <Input
  2122. placeholder="请输入法人"
  2123. ref="signTotalAmount"
  2124. value={this.state.legalPerson}
  2125. onChange={(e) => {
  2126. this.setState({ legalPerson: e.target.value });
  2127. }}
  2128. style={{ width: "240px" }}
  2129. />
  2130. </FormItem>
  2131. <FormItem
  2132. className="half-item"
  2133. {...formItemLayout}
  2134. label="法人电话"
  2135. >
  2136. <Input
  2137. placeholder="请输入法人电话"
  2138. ref="signTotalAmount"
  2139. value={this.state.legalPersonTel}
  2140. onChange={(e) => {
  2141. this.setState({ legalPersonTel: e.target.value });
  2142. }}
  2143. style={{ width: "240px" }}
  2144. />
  2145. </FormItem>
  2146. <FormItem
  2147. className="half-item"
  2148. {...formItemLayout}
  2149. label={
  2150. <span>
  2151. <strong style={{ color: "#f00" }}>*</strong>
  2152. 签单金额(万元)
  2153. </span>
  2154. }
  2155. >
  2156. <Input
  2157. placeholder="签单金额"
  2158. ref="signTotalAmount"
  2159. value={this.state.totalAmount}
  2160. onChange={(e) => {
  2161. this.setState({ totalAmount: e.target.value });
  2162. }}
  2163. style={{ width: "240px" }}
  2164. />
  2165. </FormItem>
  2166. <FormItem
  2167. className="half-item"
  2168. {...formItemLayout}
  2169. label={
  2170. <span>
  2171. <strong style={{ color: "#f00" }}>*</strong>
  2172. 首付金额(万元)
  2173. </span>
  2174. }
  2175. >
  2176. <Input
  2177. placeholder="请输入实签首款金额"
  2178. ref="signFirstPayment"
  2179. value={this.state.firstAmount}
  2180. onChange={(e) => {
  2181. this.setState({ firstAmount: e.target.value });
  2182. }}
  2183. style={{ width: "240px" }}
  2184. />
  2185. </FormItem>
  2186. <FormItem
  2187. className="half-item"
  2188. {...formItemLayout}
  2189. label="特批立项"
  2190. >
  2191. <Select
  2192. placeholder="请选择客户所属类型"
  2193. style={{ width: "240px" }}
  2194. value={this.state.approval}
  2195. onChange={(e) => {
  2196. this.setState({ approval: e });
  2197. }}
  2198. >
  2199. {/* {tepi.map(function(item) {
  2200. return (
  2201. <Select.Option key={item.value}>
  2202. {item.key}
  2203. </Select.Option>
  2204. );
  2205. })} */}
  2206. <Select.Option key={0}>非特批</Select.Option>
  2207. <Select.Option key={1}>特批</Select.Option>
  2208. </Select>
  2209. </FormItem>
  2210. <FormItem
  2211. className="half-item"
  2212. {...formItemLayout}
  2213. label="合同签订时间"
  2214. >
  2215. <DatePicker
  2216. style={{
  2217. marginTop: "2px",
  2218. width: "240px",
  2219. height: "32px",
  2220. }}
  2221. showTime
  2222. format="YYYY-MM-DD"
  2223. onOk={() => { }}
  2224. value={
  2225. this.state.signDate
  2226. ? moment(this.state.signDate)
  2227. : null
  2228. }
  2229. onChange={(data, dataString) => {
  2230. this.setState({ signDate: dataString });
  2231. }}
  2232. />
  2233. </FormItem>
  2234. <FormItem
  2235. className="half-item"
  2236. {...formItemLayout}
  2237. label="订单部门"
  2238. >
  2239. <Select
  2240. placeholder="请输入订单部门"
  2241. style={{ width: 240 }}
  2242. value={this.state.organizationSearch}
  2243. onChange={(e) => {
  2244. this.setState({ organizationSearch: e });
  2245. }}
  2246. >
  2247. {departmentArr.map(function (item) {
  2248. return (
  2249. <Select.Option key={item.id}>
  2250. {item.name}
  2251. </Select.Option>
  2252. );
  2253. })}
  2254. </Select>
  2255. </FormItem>
  2256. <FormItem
  2257. className="half-item"
  2258. {...formItemLayout}
  2259. label="是否外包"
  2260. >
  2261. {this.state.outsource}
  2262. </FormItem>
  2263. <div className="clearfix">
  2264. <FormItem
  2265. labelCol={{ span: 4 }}
  2266. wrapperCol={{ span: 18 }}
  2267. label={
  2268. <span>
  2269. <strong style={{ color: "#f00" }}>*</strong>
  2270. 合同扫描件
  2271. </span>
  2272. }
  2273. >
  2274. <PicturesWall
  2275. domId={'reject1'}
  2276. fileList={this.getOrgCodeUrl}
  2277. pictureUrl={this.state.orgCodeUrl}
  2278. />
  2279. <p>图片建议:要清晰。</p>
  2280. </FormItem>
  2281. <FormItem
  2282. labelCol={{ span: 4 }}
  2283. wrapperCol={{ span: 18 }}
  2284. label={
  2285. <span>
  2286. 补充协议
  2287. </span>
  2288. }
  2289. >
  2290. <PicturesWall
  2291. domId={'reject2'}
  2292. fileList={this.getReplenishUrl}
  2293. pictureUrl={this.state.replenishUrl}
  2294. />
  2295. <p>图片建议:要清晰。</p>
  2296. <Button
  2297. style={{
  2298. float: "right",
  2299. marginRight: "140px",
  2300. marginTop: "20px",
  2301. }}
  2302. onClick={this.getOrderLog}
  2303. >
  2304. 查看订单 日志
  2305. </Button>
  2306. </FormItem>
  2307. </div>
  2308. <ContentUrl
  2309. processStatus={this.state.processStatus}
  2310. domId={"rejectContent"}
  2311. contentUrl={this.state.contentUrl}
  2312. getContentUrl={this.getContentUrl}
  2313. imgId={"rejectImg1"}
  2314. />
  2315. <div className="clearfix">
  2316. <FormItem
  2317. labelCol={{ span: 4 }}
  2318. wrapperCol={{ span: 16 }}
  2319. label={
  2320. <span>
  2321. <strong style={{ color: "#f00" }}>*</strong>
  2322. 订单留言
  2323. </span>
  2324. }
  2325. >
  2326. <Input
  2327. type="textarea"
  2328. placeholder="请输入订单留言"
  2329. rows={4}
  2330. value={this.state.orderRemarks}
  2331. onChange={(e) => {
  2332. this.setState({ orderRemarks: e.target.value });
  2333. }}
  2334. />
  2335. </FormItem>
  2336. </div>
  2337. <div className="clearfix">
  2338. <FormItem
  2339. className="half-item"
  2340. {...formItemLayout}
  2341. label="订单负责人"
  2342. >
  2343. <span>{this.state.salesmanName}</span>
  2344. </FormItem>
  2345. <FormItem
  2346. className="half-item"
  2347. {...formItemLayout}
  2348. label="订单负责人电话"
  2349. >
  2350. <span>{this.state.salesmanMobile}</span>
  2351. </FormItem>
  2352. </div>
  2353. <div className="clearfix">
  2354. <FormItem
  2355. className="half-item"
  2356. {...formItemLayout}
  2357. label="当前财务负责人"
  2358. >
  2359. <span>{this.state.nowFinance}</span>
  2360. </FormItem>
  2361. <FormItem
  2362. className="half-item"
  2363. {...formItemLayout}
  2364. label="当前财务负责人电话"
  2365. >
  2366. <span>{this.state.nowFinanceMobile}</span>
  2367. </FormItem>
  2368. </div>
  2369. <div className="clearfix">
  2370. <FormItem
  2371. className="half-item"
  2372. {...formItemLayout}
  2373. style={{ opacity: ".5" }}
  2374. label="原订单负责人"
  2375. >
  2376. <span>{this.state.oldSalesmanName}</span>
  2377. </FormItem>
  2378. <FormItem
  2379. className="half-item"
  2380. {...formItemLayout}
  2381. style={{ opacity: ".5" }}
  2382. label="原订单负责人电话"
  2383. >
  2384. <span>{this.state.oldSalesmanMobile}</span>
  2385. </FormItem>
  2386. </div>
  2387. <div className="clearfix">
  2388. <FormItem
  2389. className="half-item"
  2390. style={{ opacity: ".5" }}
  2391. {...formItemLayout}
  2392. label="实际财务操作人"
  2393. >
  2394. <span>{this.state.financeName}</span>
  2395. </FormItem>
  2396. <FormItem
  2397. className="half-item"
  2398. {...formItemLayout}
  2399. style={{ opacity: ".5" }}
  2400. label="实际财务操作人电话"
  2401. >
  2402. <span>{this.state.financeMobile}</span>
  2403. </FormItem>
  2404. </div>
  2405. <div className="clearfix">
  2406. <FormItem
  2407. className="half-item"
  2408. {...formItemLayout}
  2409. label="驳回人"
  2410. >
  2411. <span>{this.state.initiateName}</span>
  2412. </FormItem>
  2413. <FormItem
  2414. className="half-item"
  2415. {...formItemLayout}
  2416. label="驳回时间"
  2417. >
  2418. <span>{this.state.backDate}</span>
  2419. </FormItem>
  2420. </div>
  2421. <div className="clearfix">
  2422. <FormItem
  2423. labelCol={{ span: 4 }}
  2424. wrapperCol={{ span: 16 }}
  2425. label="驳回原因"
  2426. >
  2427. <span>{this.state.reason}</span>
  2428. </FormItem>
  2429. </div>
  2430. {/* 协单人员 */}
  2431. <OrderCoor orderNo={this.state.orderNos} processStatus={this.state.processStatus} orderStatus={this.state.orderStatus} />
  2432. <div>
  2433. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2434. 项目业务
  2435. </span>
  2436. <Button
  2437. type="primary"
  2438. onClick={this.addDetailed}
  2439. style={{
  2440. float: "right",
  2441. marginRight: "50px",
  2442. marginBottom: "15px",
  2443. }}
  2444. >
  2445. 添加项目明细
  2446. </Button>
  2447. </div>
  2448. <div className="patent-table">
  2449. <Spin spinning={this.state.loading}>
  2450. <Table
  2451. columns={this.state.columnsX}
  2452. dataSource={this.state.dataSourceX}
  2453. pagination={this.state.paginations}
  2454. onRowClick={this.tableRowClickX}
  2455. bordered
  2456. size="small"
  2457. />
  2458. </Spin>
  2459. </div>
  2460. <div
  2461. style={{ display: cuiDataList.length ? "block" : "none" }}
  2462. >
  2463. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2464. 旧催款节点
  2465. </span>
  2466. <Button
  2467. type="primary"
  2468. // onClick={this.addcontact}
  2469. disabled
  2470. onClick={(e) => {
  2471. cuiDataList.length
  2472. ? this.addcontact()
  2473. : this.addcontactNew();
  2474. }}
  2475. style={{
  2476. float: "right",
  2477. marginRight: "50px",
  2478. marginBottom: "15px",
  2479. }}
  2480. >
  2481. 添加催款节点
  2482. </Button>
  2483. </div>
  2484. <div
  2485. className="clearfix"
  2486. style={{ display: cuiDataList.length ? "block" : "none" }}
  2487. >
  2488. <Spin spinning={this.state.loading}>
  2489. <Form layout="horizontal" id="demand-form">
  2490. <Table
  2491. pagination={false}
  2492. columns={this.state.ContactsLists}
  2493. dataSource={this.state.contactList}
  2494. bordered
  2495. size="small"
  2496. scroll={{ x: "max-content", y: 0 }}
  2497. />
  2498. <Col
  2499. span={24}
  2500. offset={9}
  2501. style={{ marginTop: "15px" }}
  2502. ></Col>
  2503. </Form>
  2504. </Spin>
  2505. </div>
  2506. <div>
  2507. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2508. 新催款节点
  2509. </span>
  2510. <span
  2511. style={{
  2512. display: cuiDataList.length ? "none" : "inline-block",
  2513. marginLeft: 10,
  2514. color: "red",
  2515. }}
  2516. >
  2517. 金额总计(万元): {this.state.totalCui}
  2518. </span>
  2519. <Button
  2520. type="primary"
  2521. disabled={
  2522. cuiDataList.length || this.state.addFlag
  2523. ? true
  2524. : false
  2525. }
  2526. // onClick={this.addcontact}
  2527. onClick={(e) => {
  2528. this.setState({ addFlag: true });
  2529. this.addcontactNew();
  2530. }}
  2531. style={{
  2532. float: "right",
  2533. marginRight: "50px",
  2534. marginBottom: "15px",
  2535. }}
  2536. >
  2537. 添加催款节点
  2538. </Button>
  2539. </div>
  2540. <div className="clearfix">
  2541. <Spin spinning={this.state.loading}>
  2542. <Form layout="horizontal" id="demand-form">
  2543. <Table
  2544. pagination={false}
  2545. columns={this.state.ContactsListsNew}
  2546. dataSource={this.state.contactListNew}
  2547. scroll={{ x: "max-content", y: 0 }}
  2548. bordered
  2549. size="small"
  2550. />
  2551. <Col
  2552. span={24}
  2553. offset={9}
  2554. style={{ marginTop: "15px" }}
  2555. />
  2556. </Form>
  2557. </Spin>
  2558. </div>
  2559. <div className="addSave" style={{ marginTop: "15px" }}>
  2560. <Button
  2561. className="cancel"
  2562. type="primary"
  2563. onClick={this.examOk}
  2564. style={{ marginLeft: "200px" }}
  2565. htmlType="submit"
  2566. loading={this.state.flag}
  2567. >
  2568. 重新提交
  2569. </Button>
  2570. <Button
  2571. className="cancel"
  2572. type="danger"
  2573. onClick={this.examOks}
  2574. style={{ marginLeft: "50px" }}
  2575. htmlType="submit"
  2576. loading={this.state.flag}
  2577. >
  2578. 订单作废
  2579. </Button>
  2580. <Button
  2581. className="cancel"
  2582. type="ghost"
  2583. onClick={this.visitCancel}
  2584. style={{ marginLeft: "50px" }}
  2585. >
  2586. 取消
  2587. </Button>
  2588. </div>
  2589. </div>
  2590. </Spin>
  2591. </Form>
  2592. </Modal> : <div />}
  2593. {/* <Modal
  2594. visible={this.state.rizhivisible}
  2595. className="admin-desc-content"
  2596. width="800px"
  2597. maskClosable={false}
  2598. title="订单日志"
  2599. footer={null}
  2600. onCancel={this.closeOrderLog}
  2601. >
  2602. <div className="patent-table">
  2603. <Spin spinning={this.state.loading}>
  2604. <Table
  2605. columns={this.state.columnsrizhi}
  2606. dataSource={this.state.dataSourcerizhi}
  2607. pagination={false}
  2608. />
  2609. </Spin>
  2610. </div>
  2611. </Modal> */}
  2612. <OrderRiZi
  2613. dataSourcerizhi={this.state.dataSourcerizhi}
  2614. closeOrderLog={this.closeOrderLog}
  2615. visible={this.state.rizhivisible}
  2616. loading={this.state.loading}
  2617. />
  2618. </div>
  2619. {this.state.projectOperationVisible ? <ProjectOperation
  2620. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  2621. orderNo={this.state.orderNo}
  2622. visible={this.state.projectOperationVisible}
  2623. dataInfor={this.state.dataInfor}
  2624. onCancel={this.nextCancel}
  2625. /> : null}
  2626. </div>
  2627. );
  2628. },
  2629. })
  2630. );
  2631. export default IntentionCustomer;