reject.jsx 87 KB

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