reject.jsx 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668
  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 text + "-" + record.id
  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. this.setState({
  1405. flag: true,
  1406. });
  1407. let theorgCodeUrl = [];
  1408. if (this.state.orgCodeUrl.length) {
  1409. let picArr = [];
  1410. this.state.orgCodeUrl.map(function (item) {
  1411. if (
  1412. item.response &&
  1413. item.response.data &&
  1414. item.response.data.length
  1415. ) {
  1416. picArr.push(item.response.data);
  1417. }
  1418. });
  1419. theorgCodeUrl = picArr.join(",");
  1420. }
  1421. let theReplenishUrl = [];
  1422. if (this.state.replenishUrl.length) {
  1423. let picArr = [];
  1424. this.state.replenishUrl.map(function (item) {
  1425. if (
  1426. item.response &&
  1427. item.response.data &&
  1428. item.response.data.length
  1429. ) {
  1430. picArr.push(item.response.data);
  1431. }
  1432. });
  1433. theReplenishUrl = picArr.join(",");
  1434. }
  1435. // 服务内容上传图片
  1436. let contentUrl = [];
  1437. if (this.state.contentUrl.length) {
  1438. let picArr = [];
  1439. this.state.contentUrl.map(function (item) {
  1440. if (
  1441. item.response &&
  1442. item.response.data &&
  1443. item.response.data.length
  1444. ) {
  1445. picArr.push(item.response.data);
  1446. }
  1447. });
  1448. contentUrl = picArr.join(",");
  1449. } else {
  1450. message.info("请上传服务内容图片")
  1451. return
  1452. }
  1453. if (moneyVerify(this.state.totalAmount)) {
  1454. this.setState({
  1455. flag: false,
  1456. });
  1457. return;
  1458. }
  1459. if (moneyVerify(this.state.firstAmount)) {
  1460. this.setState({
  1461. flag: false,
  1462. });
  1463. return;
  1464. }
  1465. if (!this.state.totalAmount) {
  1466. message.warning("签单金额不能为空");
  1467. this.refs.signFirstPayment.focus();
  1468. this.setState({
  1469. flag: false,
  1470. });
  1471. return false;
  1472. }
  1473. if (!this.state.firstAmount) {
  1474. message.warning("首付金额不能为空");
  1475. this.refs.signFirstPayment.focus();
  1476. this.setState({
  1477. flag: false,
  1478. });
  1479. return false;
  1480. }
  1481. if (!theorgCodeUrl) {
  1482. message.warning("企业负责人不能为空");
  1483. this.refs.signFirstPayment.focus();
  1484. this.setState({
  1485. flag: false,
  1486. });
  1487. return false;
  1488. }
  1489. if (
  1490. this.state.approval == "特批通过" ||
  1491. this.state.approval == "特批驳回"
  1492. ) {
  1493. message.warning("特批状态不正确,请重新填写");
  1494. this.setState({
  1495. flag: false,
  1496. });
  1497. return false;
  1498. }
  1499. const arr = this.state.contactListNew || [];
  1500. for (let i = 0; i < arr.length; i++) {
  1501. if (
  1502. arr[i].dunType == 1 &&
  1503. arr[i].waitDay != null &&
  1504. this.state.approval == 0
  1505. ) {
  1506. message.warning(
  1507. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1508. );
  1509. this.setState({
  1510. flag: false,
  1511. });
  1512. return false;
  1513. } else if (
  1514. arr[i].dunType == 1 &&
  1515. arr[i].waitDay == null &&
  1516. this.state.approval == 1
  1517. ) {
  1518. message.warning(
  1519. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1520. );
  1521. this.setState({
  1522. flag: false,
  1523. });
  1524. return false;
  1525. }
  1526. if (!this.state.contactListNew[i].id) {
  1527. message.warning("请保存催款节点");
  1528. this.setState({
  1529. flag: false,
  1530. });
  1531. return false;
  1532. }
  1533. }
  1534. $.ajax({
  1535. method: "post",
  1536. dataType: "json",
  1537. crossDomain: false,
  1538. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1539. data: {
  1540. orderNo: this.state.orderNo, //订单编号
  1541. totalAmount: this.state.totalAmount, //总金额
  1542. firstAmount: this.state.firstAmount, //首付
  1543. isSubmit: 1, //保存草稿还是提交
  1544. signDate: this.state.signDate, //签单日期
  1545. contacts: this.state.contacts, //企业负责人
  1546. contactMobile: this.state.contactMobile, //负责人联系方式
  1547. legalPerson: this.state.legalPerson, //企业法人
  1548. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1549. approval: this.state.approval, //特批状态
  1550. contractNo: this.state.contractNo, //合同编号
  1551. orderRemarks: this.state.orderRemarks, //订单备注
  1552. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1553. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1554. serviceContent: contentUrl.length ? contentUrl : "",
  1555. orderDep: this.state.organizationSearch,
  1556. },
  1557. success: function (data) {
  1558. if (data.error.length || data.data.list == "") {
  1559. if (data.error && data.error.length) {
  1560. message.warning(data.error[0].message);
  1561. this.setState({
  1562. flag: false,
  1563. });
  1564. }
  1565. } else {
  1566. message.success("该订单已重新提交~");
  1567. this.setState({
  1568. visible: false,
  1569. flag: false,
  1570. });
  1571. this.loadData(this.state.pageNo);
  1572. }
  1573. }.bind(this),
  1574. }).always(
  1575. function () {
  1576. this.setState({
  1577. loading: false,
  1578. });
  1579. }.bind(this)
  1580. );
  1581. },
  1582. //重新提交
  1583. examOks() {
  1584. if (this.state.flag) return;
  1585. this.setState({
  1586. flag: true,
  1587. });
  1588. $.ajax({
  1589. method: "post",
  1590. dataType: "json",
  1591. crossDomain: false,
  1592. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1593. data: {
  1594. orderNo: this.state.orderNo, //订单编号
  1595. },
  1596. success: function (data) {
  1597. if (data.error.length || data.data.list == "") {
  1598. if (data.error && data.error.length) {
  1599. message.warning(data.error[0].message);
  1600. }
  1601. } else {
  1602. message.success("该订单已作废~");
  1603. this.setState({
  1604. visible: false,
  1605. flag: false,
  1606. });
  1607. this.loadData(this.state.pageNo);
  1608. }
  1609. }.bind(this),
  1610. }).always(
  1611. function () {
  1612. this.setState({
  1613. loading: false,
  1614. });
  1615. }.bind(this)
  1616. );
  1617. },
  1618. departmentList() {
  1619. this.setState({
  1620. loading: true,
  1621. });
  1622. $.ajax({
  1623. method: "get",
  1624. dataType: "json",
  1625. crossDomain: false,
  1626. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1627. data: {},
  1628. success: function (data) {
  1629. let thedata = data.data;
  1630. let theArr = [];
  1631. if (!thedata) {
  1632. if (data.error && data.error.length) {
  1633. message.warning(data.error[0].message);
  1634. }
  1635. thedata = {};
  1636. } else {
  1637. thedata.map(function (item, index) {
  1638. theArr.push({
  1639. key: index,
  1640. name: item.name,
  1641. id: item.id,
  1642. depNo: item.depNo,
  1643. });
  1644. });
  1645. }
  1646. this.setState({
  1647. departmentArr: theArr,
  1648. });
  1649. }.bind(this),
  1650. }).always(
  1651. function () {
  1652. this.setState({
  1653. loading: false,
  1654. });
  1655. }.bind(this)
  1656. );
  1657. },
  1658. rizhi() {
  1659. this.setState({
  1660. loading: true,
  1661. });
  1662. $.ajax({
  1663. method: "get",
  1664. dataType: "json",
  1665. crossDomain: false,
  1666. url: "/api/admin/newOrder/selectOrderLog",
  1667. data: {
  1668. orderNo: this.state.orderNo,
  1669. },
  1670. success: function (data) {
  1671. let theArr = [];
  1672. let thisData = data.data;
  1673. if (!thisData.length) {
  1674. if (data.error && data.error.length) {
  1675. message.warning(data.error[0].message);
  1676. }
  1677. thisData = {};
  1678. } else {
  1679. for (let i = 0; i < data.data.length; i++) {
  1680. let thisdata = data.data[i];
  1681. theArr.push({
  1682. processName: thisdata.processName,
  1683. adminName: thisdata.adminName,
  1684. createDate: thisdata.createDate,
  1685. remarks: thisdata.remarks,
  1686. });
  1687. }
  1688. }
  1689. this.setState({
  1690. dataSourcerizhi: theArr,
  1691. });
  1692. }.bind(this),
  1693. }).always(
  1694. function () {
  1695. this.setState({
  1696. loading: false,
  1697. });
  1698. }.bind(this)
  1699. );
  1700. },
  1701. //查看订单日志
  1702. getOrderLog() {
  1703. this.setState({
  1704. rizhivisible: true,
  1705. });
  1706. this.rizhi();
  1707. },
  1708. closeOrderLog() {
  1709. this.setState({
  1710. rizhivisible: false,
  1711. });
  1712. },
  1713. //点击签单
  1714. handleCancels() {
  1715. this.setState({
  1716. isSubmit: 1,
  1717. });
  1718. },
  1719. //点击签单
  1720. handleCancelq() {
  1721. this.setState({
  1722. isSubmit: 0,
  1723. });
  1724. },
  1725. resets() {
  1726. this.state.orderNoSearch = "";
  1727. this.state.customerName = "";
  1728. this.state.releaseDate[0] = undefined;
  1729. this.state.releaseDate[1] = undefined;
  1730. this.loadData();
  1731. },
  1732. //点击添加项目明细
  1733. addDetailed() {
  1734. this.setState({
  1735. projectOperationVisible: true,
  1736. });
  1737. },
  1738. //搜索
  1739. search() {
  1740. this.setState({
  1741. //signBillVisible:false
  1742. });
  1743. this.loadData();
  1744. },
  1745. getOrgCodeUrl(e) {
  1746. this.setState({ orgCodeUrl: e });
  1747. },
  1748. getReplenishUrl(e) {
  1749. this.setState({ replenishUrl: e });
  1750. },
  1751. getContentUrl(e) {
  1752. this.setState({ contentUrl: e });
  1753. },
  1754. //关闭详情
  1755. visitCancel() {
  1756. this.setState({
  1757. visible: false,
  1758. cuiFlag: false,
  1759. addFlag: false,
  1760. boFlag: false,
  1761. });
  1762. this.loadData(this.state.pageNo);
  1763. },
  1764. visitOk() {
  1765. this.setState({
  1766. visible: false,
  1767. });
  1768. this.resets();
  1769. },
  1770. //客户
  1771. selectAutoCUT(value) {
  1772. let autoIds;
  1773. let fwList = this.state.customerArr;
  1774. fwList.map(function (item) {
  1775. if (value == item.name) {
  1776. autoIds = item.id;
  1777. }
  1778. });
  1779. this.setState({
  1780. customerName: value,
  1781. autoId: autoIds,
  1782. });
  1783. },
  1784. getpatentTypeList() {
  1785. $.ajax({
  1786. method: "get",
  1787. dataType: "json",
  1788. crossDomain: false,
  1789. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  1790. success: function (data) {
  1791. if (data.error.length === 0) {
  1792. this.setState({
  1793. patentTypeList: data.data
  1794. })
  1795. } else {
  1796. message.warning(data.error[0].message);
  1797. };
  1798. }.bind(this)
  1799. });
  1800. },
  1801. //加载(自动补全)
  1802. supervisor(e, state) {
  1803. //客户名称与服务名称自动补全
  1804. let api = state
  1805. ? "/api/admin/customer/getCustomerByName"
  1806. : "/api/admin/order/getBusinessProjectByName";
  1807. $.ajax({
  1808. method: "get",
  1809. dataType: "json",
  1810. crossDomain: false,
  1811. url: globalConfig.context + api,
  1812. data: state
  1813. ? {
  1814. name: e,
  1815. type: this.state.customType,
  1816. }
  1817. : {
  1818. businessName: e,
  1819. },
  1820. success: function (data) {
  1821. let thedata = data.data;
  1822. if (!thedata) {
  1823. if (data.error && data.error.length) {
  1824. message.warning(data.error[0].message);
  1825. }
  1826. thedata = {};
  1827. }
  1828. this.setState({
  1829. states: state,
  1830. customerArr: thedata,
  1831. });
  1832. }.bind(this),
  1833. }).always(
  1834. function () {
  1835. this.setState({
  1836. loading: false,
  1837. });
  1838. }.bind(this)
  1839. );
  1840. },
  1841. //上级主管输入框失去焦点是判断客户是否存在
  1842. selectAuto(value) {
  1843. let kid = [];
  1844. let fwList = this.state.customerArr;
  1845. fwList.map(function (item) {
  1846. if (value == item.bname) {
  1847. kid = item;
  1848. }
  1849. });
  1850. if (kid.type == "1") {
  1851. this.setState({
  1852. displayFees: "block",
  1853. });
  1854. } else {
  1855. this.setState({
  1856. displayFees: "none",
  1857. });
  1858. }
  1859. this.setState({
  1860. commodityName: value,
  1861. gid: kid.id,
  1862. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1863. commodityFirstPayment:
  1864. kid.firstPayment == 0
  1865. ? kid.firstPayment.toString()
  1866. : kid.firstPayment,
  1867. });
  1868. },
  1869. //服务值改变时请求客户名称
  1870. httpChange(e) {
  1871. this.state.gid = "";
  1872. if (e.length >= 1) {
  1873. this.supervisor(e, false);
  1874. }
  1875. this.setState({
  1876. commodityName: e,
  1877. });
  1878. },
  1879. changeList(arr) {
  1880. const newArr = [];
  1881. this.state.columns.forEach(item => {
  1882. arr.forEach(val => {
  1883. if (val === item.title) {
  1884. newArr.push(item);
  1885. }
  1886. });
  1887. });
  1888. this.setState({
  1889. changeList: newArr
  1890. });
  1891. },
  1892. render() {
  1893. const formItemLayout = {
  1894. labelCol: { span: 8 },
  1895. wrapperCol: { span: 14 },
  1896. };
  1897. const FormItem = Form.Item;
  1898. const { RangePicker } = DatePicker;
  1899. const rowSelection = {
  1900. selectedRowKeys: this.state.selectedRowKeys,
  1901. onChange: (selectedRowKeys, selectedRows) => {
  1902. this.setState({
  1903. modalVisible: false,
  1904. selectedRows: selectedRows.slice(-1),
  1905. selectedRowKeys: selectedRowKeys.slice(-1),
  1906. });
  1907. },
  1908. onSelect: (recordt) => {
  1909. this.setState({
  1910. modalVisible: false,
  1911. recordt: recordt.id,
  1912. });
  1913. },
  1914. };
  1915. const cuiDataList = this.state.contactList || [];
  1916. const dataSources = this.state.customerArr || [];
  1917. let departmentArr = this.state.departmentArr || [];
  1918. const options = this.state.states
  1919. ? dataSources.map((group) => (
  1920. <Select.Option key={group.id} value={group.name}>
  1921. {group.name}
  1922. </Select.Option>
  1923. ))
  1924. : dataSources.map((group, index) => (
  1925. <Select.Option key={index} value={group.bname}>
  1926. {group.bname}
  1927. </Select.Option>
  1928. ));
  1929. const { TabPane } = Tabs;
  1930. return (
  1931. <div className="user-content">
  1932. {this.state.resVisible ? (
  1933. <ResolutionDetail
  1934. cancel={this.resCancel}
  1935. detail={this.state.resRecord}
  1936. visible={this.state.resVisible}
  1937. id={this.state.resRecord.orderNo}
  1938. />
  1939. ) : (
  1940. ""
  1941. )}
  1942. <ShowModalDiv ShowModal={this.state.showModal} />
  1943. <div className="content-title" style={{ marginBottom: 10 }}>
  1944. <span style={{ fontWeight: 900, fontSize: 16 }}>订单审核</span>
  1945. </div>
  1946. <div className="user-search">
  1947. <Tabs
  1948. defaultActiveKey="1"
  1949. onChange={this.callback}
  1950. className="test"
  1951. >
  1952. <TabPane tab="搜索" key="1">
  1953. <Input
  1954. placeholder="客户名称"
  1955. style={{
  1956. width: "150px",
  1957. marginBottom: "10px",
  1958. marginTop: 10,
  1959. marginLeft: 10,
  1960. marginRight: 10,
  1961. }}
  1962. value={this.state.customerName}
  1963. onChange={(e) => {
  1964. this.setState({ customerName: e.target.value });
  1965. }}
  1966. />
  1967. <Input
  1968. placeholder="订单编号"
  1969. style={{ width: "150px", marginRight: 10 }}
  1970. value={this.state.orderNoSearch}
  1971. onChange={(e) => {
  1972. this.setState({ orderNoSearch: e.target.value });
  1973. }}
  1974. />
  1975. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1976. <RangePicker
  1977. value={[
  1978. this.state.releaseDate[0]
  1979. ? moment(this.state.releaseDate[0])
  1980. : null,
  1981. this.state.releaseDate[1]
  1982. ? moment(this.state.releaseDate[1])
  1983. : null,
  1984. ]}
  1985. onChange={(data, dataString) => {
  1986. this.setState({ releaseDate: dataString });
  1987. }}
  1988. />
  1989. <Button
  1990. type="primary"
  1991. onClick={this.search}
  1992. style={{ marginLeft: "10px", marginRight: 10 }}
  1993. >
  1994. 搜索
  1995. </Button>
  1996. <Button onClick={this.resets}>重置</Button>
  1997. </TabPane>
  1998. <TabPane tab="更改表格显示数据" key="2">
  1999. <div style={{ marginLeft: 10 }}>
  2000. <ChooseList
  2001. columns={this.state.columns}
  2002. changeFn={this.changeList}
  2003. changeList={this.state.changeList}
  2004. top={55}
  2005. margin={11}
  2006. />
  2007. </div>
  2008. </TabPane>
  2009. </Tabs>
  2010. <div className="patent-table">
  2011. <Spin spinning={this.state.loading}>
  2012. <Table
  2013. columns={
  2014. this.state.changeList
  2015. ? this.state.changeList
  2016. : this.state.columns
  2017. }
  2018. dataSource={this.state.dataSource}
  2019. rowSelection={rowSelection}
  2020. pagination={this.state.pagination}
  2021. onRowClick={this.tableRowClick}
  2022. bordered
  2023. size="small"
  2024. />
  2025. </Spin>
  2026. </div>
  2027. {this.state.visible ? <Modal
  2028. maskClosable={false}
  2029. className="customeDetails"
  2030. footer=""
  2031. title="订单详情"
  2032. width="1000px"
  2033. visible={this.state.visible}
  2034. onOk={this.visitOk}
  2035. onCancel={this.visitCancel}
  2036. >
  2037. <Form
  2038. layout="horizontal"
  2039. onSubmit={this.handleSubmit}
  2040. id="demand-form"
  2041. style={{ paddingBottom: "40px" }}
  2042. >
  2043. <Spin spinning={this.state.loading}>
  2044. <div className="clearfix">
  2045. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  2046. <OrderItemStatus deleteSign={this.state.deleteSign} />
  2047. </div>
  2048. <FormItem
  2049. className="half-item"
  2050. {...formItemLayout}
  2051. label="订单编号"
  2052. >
  2053. <span>{this.state.orderNo}</span>
  2054. </FormItem>
  2055. <FormItem
  2056. className="half-item"
  2057. {...formItemLayout}
  2058. label="合同编号"
  2059. >
  2060. <span>{this.state.contractNo}</span>
  2061. </FormItem>
  2062. <FormItem
  2063. className="half-item"
  2064. {...formItemLayout}
  2065. label="客户名称"
  2066. >
  2067. <span>{this.state.userName}</span>
  2068. <EnterpriseNameChange
  2069. type='journal'
  2070. style={{ marginLeft: 10 }}
  2071. enterpriseId={this.state.orderUid} />
  2072. </FormItem>
  2073. <FormItem
  2074. className="half-item"
  2075. {...formItemLayout}
  2076. label="销售类型"
  2077. >
  2078. <span>{(["私有客户", "签单客户"][this.state.userType] || " ") + "-" +
  2079. (salesList[this.state.salesType] || "")}</span>
  2080. <UpdateSales
  2081. orderNo={this.state.orderNo}
  2082. updatas={this.state.updatas}
  2083. onRefresh={this.xiangqing.bind(this, this.state.orderNo)}
  2084. />
  2085. </FormItem>
  2086. <FormItem
  2087. className="half-item"
  2088. {...formItemLayout}
  2089. label="流程状态"
  2090. >
  2091. <span>{getProcessStatus(this.state.processStatus)}</span>
  2092. </FormItem>
  2093. <FormItem
  2094. className="half-item"
  2095. {...formItemLayout}
  2096. label="结算状态"
  2097. >
  2098. <span>
  2099. {getLiquidationStatus(this.state.liquidationStatus)}
  2100. </span>
  2101. </FormItem>
  2102. <FormItem
  2103. className="half-item"
  2104. {...formItemLayout}
  2105. label="已收款项(万元)"
  2106. >
  2107. <span>{this.state.settlementAmount}</span>
  2108. </FormItem>
  2109. <FormItem
  2110. className="half-item"
  2111. {...formItemLayout}
  2112. label="企业联系人"
  2113. >
  2114. <Input
  2115. placeholder="请输入联系人"
  2116. ref="signTotalAmount"
  2117. value={this.state.contacts}
  2118. onChange={(e) => {
  2119. this.setState({ contacts: e.target.value });
  2120. }}
  2121. style={{ width: "240px" }}
  2122. />
  2123. </FormItem>
  2124. <FormItem
  2125. className="half-item"
  2126. {...formItemLayout}
  2127. label="联系人电话"
  2128. >
  2129. <Input
  2130. placeholder="请输入联系人电话"
  2131. ref="signTotalAmount"
  2132. value={this.state.contactMobile}
  2133. onChange={(e) => {
  2134. this.setState({ contactMobile: e.target.value });
  2135. }}
  2136. style={{ width: "240px" }}
  2137. />
  2138. </FormItem>
  2139. <FormItem
  2140. className="half-item"
  2141. {...formItemLayout}
  2142. label="企业法人"
  2143. >
  2144. <Input
  2145. placeholder="请输入法人"
  2146. ref="signTotalAmount"
  2147. value={this.state.legalPerson}
  2148. onChange={(e) => {
  2149. this.setState({ legalPerson: e.target.value });
  2150. }}
  2151. style={{ width: "240px" }}
  2152. />
  2153. </FormItem>
  2154. <FormItem
  2155. className="half-item"
  2156. {...formItemLayout}
  2157. label="法人电话"
  2158. >
  2159. <Input
  2160. placeholder="请输入法人电话"
  2161. ref="signTotalAmount"
  2162. value={this.state.legalPersonTel}
  2163. onChange={(e) => {
  2164. this.setState({ legalPersonTel: e.target.value });
  2165. }}
  2166. style={{ width: "240px" }}
  2167. />
  2168. </FormItem>
  2169. <FormItem
  2170. className="half-item"
  2171. {...formItemLayout}
  2172. label={
  2173. <span>
  2174. <strong style={{ color: "#f00" }}>*</strong>
  2175. 签单金额(万元)
  2176. </span>
  2177. }
  2178. >
  2179. <Input
  2180. placeholder="签单金额"
  2181. ref="signTotalAmount"
  2182. value={this.state.totalAmount}
  2183. onChange={(e) => {
  2184. this.setState({ totalAmount: e.target.value });
  2185. }}
  2186. style={{ width: "240px" }}
  2187. />
  2188. </FormItem>
  2189. <FormItem
  2190. className="half-item"
  2191. {...formItemLayout}
  2192. label={
  2193. <span>
  2194. <strong style={{ color: "#f00" }}>*</strong>
  2195. 首付金额(万元)
  2196. </span>
  2197. }
  2198. >
  2199. <Input
  2200. placeholder="请输入实签首款金额"
  2201. ref="signFirstPayment"
  2202. value={this.state.firstAmount}
  2203. onChange={(e) => {
  2204. this.setState({ firstAmount: e.target.value });
  2205. }}
  2206. style={{ width: "240px" }}
  2207. />
  2208. </FormItem>
  2209. <FormItem
  2210. className="half-item"
  2211. {...formItemLayout}
  2212. label="特批立项"
  2213. >
  2214. <Select
  2215. placeholder="请选择客户所属类型"
  2216. style={{ width: "240px" }}
  2217. value={this.state.approval}
  2218. onChange={(e) => {
  2219. this.setState({ approval: e });
  2220. }}
  2221. >
  2222. {/* {tepi.map(function(item) {
  2223. return (
  2224. <Select.Option key={item.value}>
  2225. {item.key}
  2226. </Select.Option>
  2227. );
  2228. })} */}
  2229. <Select.Option key={0}>非特批</Select.Option>
  2230. <Select.Option key={1}>特批</Select.Option>
  2231. </Select>
  2232. </FormItem>
  2233. <FormItem
  2234. className="half-item"
  2235. {...formItemLayout}
  2236. label="合同签订时间"
  2237. >
  2238. <DatePicker
  2239. style={{
  2240. marginTop: "2px",
  2241. width: "240px",
  2242. height: "32px",
  2243. }}
  2244. showTime
  2245. format="YYYY-MM-DD"
  2246. onOk={() => { }}
  2247. value={
  2248. this.state.signDate
  2249. ? moment(this.state.signDate)
  2250. : null
  2251. }
  2252. onChange={(data, dataString) => {
  2253. this.setState({ signDate: dataString });
  2254. }}
  2255. />
  2256. </FormItem>
  2257. <FormItem
  2258. className="half-item"
  2259. {...formItemLayout}
  2260. label="订单部门"
  2261. >
  2262. <Select
  2263. placeholder="请输入订单部门"
  2264. style={{ width: 240 }}
  2265. value={this.state.organizationSearch}
  2266. onChange={(e) => {
  2267. this.setState({ organizationSearch: e });
  2268. }}
  2269. >
  2270. {departmentArr.map(function (item) {
  2271. return (
  2272. <Select.Option key={item.id}>
  2273. {item.name}
  2274. </Select.Option>
  2275. );
  2276. })}
  2277. </Select>
  2278. </FormItem>
  2279. <FormItem
  2280. className="half-item"
  2281. {...formItemLayout}
  2282. label="是否外包"
  2283. >
  2284. {this.state.outsource}
  2285. </FormItem>
  2286. <div className="clearfix">
  2287. <FormItem
  2288. labelCol={{ span: 4 }}
  2289. wrapperCol={{ span: 18 }}
  2290. label={
  2291. <span>
  2292. <strong style={{ color: "#f00" }}>*</strong>
  2293. 合同扫描件
  2294. </span>
  2295. }
  2296. >
  2297. <PicturesWall
  2298. domId={'reject1'}
  2299. fileList={this.getOrgCodeUrl}
  2300. pictureUrl={this.state.orgCodeUrl}
  2301. />
  2302. <p>图片建议:要清晰。</p>
  2303. </FormItem>
  2304. <FormItem
  2305. labelCol={{ span: 4 }}
  2306. wrapperCol={{ span: 18 }}
  2307. label={
  2308. <span>
  2309. 补充协议
  2310. </span>
  2311. }
  2312. >
  2313. <PicturesWall
  2314. domId={'reject2'}
  2315. fileList={this.getReplenishUrl}
  2316. pictureUrl={this.state.replenishUrl}
  2317. />
  2318. <p>图片建议:要清晰。</p>
  2319. <Button
  2320. style={{
  2321. float: "right",
  2322. marginRight: "140px",
  2323. marginTop: "20px",
  2324. }}
  2325. onClick={this.getOrderLog}
  2326. >
  2327. 查看订单 日志
  2328. </Button>
  2329. </FormItem>
  2330. </div>
  2331. <ContentUrl
  2332. processStatus={this.state.processStatus}
  2333. domId={"rejectContent"}
  2334. contentUrl={this.state.contentUrl}
  2335. getContentUrl={this.getContentUrl}
  2336. imgId={"rejectImg1"}
  2337. />
  2338. <div className="clearfix">
  2339. <FormItem
  2340. labelCol={{ span: 4 }}
  2341. wrapperCol={{ span: 16 }}
  2342. label={
  2343. <span>
  2344. <strong style={{ color: "#f00" }}>*</strong>
  2345. 订单留言
  2346. </span>
  2347. }
  2348. >
  2349. <Input
  2350. type="textarea"
  2351. placeholder="请输入订单留言"
  2352. rows={4}
  2353. value={this.state.orderRemarks}
  2354. onChange={(e) => {
  2355. this.setState({ orderRemarks: e.target.value });
  2356. }}
  2357. />
  2358. </FormItem>
  2359. </div>
  2360. <div className="clearfix">
  2361. <FormItem
  2362. className="half-item"
  2363. {...formItemLayout}
  2364. label="订单负责人"
  2365. >
  2366. <span>{this.state.salesmanName}</span>
  2367. </FormItem>
  2368. <FormItem
  2369. className="half-item"
  2370. {...formItemLayout}
  2371. label="订单负责人电话"
  2372. >
  2373. <span>{this.state.salesmanMobile}</span>
  2374. </FormItem>
  2375. </div>
  2376. <div className="clearfix">
  2377. <FormItem
  2378. className="half-item"
  2379. {...formItemLayout}
  2380. label="当前财务负责人"
  2381. >
  2382. <span>{this.state.nowFinance}</span>
  2383. </FormItem>
  2384. <FormItem
  2385. className="half-item"
  2386. {...formItemLayout}
  2387. label="当前财务负责人电话"
  2388. >
  2389. <span>{this.state.nowFinanceMobile}</span>
  2390. </FormItem>
  2391. </div>
  2392. <div className="clearfix">
  2393. <FormItem
  2394. className="half-item"
  2395. {...formItemLayout}
  2396. style={{ opacity: ".5" }}
  2397. label="原订单负责人"
  2398. >
  2399. <span>{this.state.oldSalesmanName}</span>
  2400. </FormItem>
  2401. <FormItem
  2402. className="half-item"
  2403. {...formItemLayout}
  2404. style={{ opacity: ".5" }}
  2405. label="原订单负责人电话"
  2406. >
  2407. <span>{this.state.oldSalesmanMobile}</span>
  2408. </FormItem>
  2409. </div>
  2410. <div className="clearfix">
  2411. <FormItem
  2412. className="half-item"
  2413. style={{ opacity: ".5" }}
  2414. {...formItemLayout}
  2415. label="实际财务操作人"
  2416. >
  2417. <span>{this.state.financeName}</span>
  2418. </FormItem>
  2419. <FormItem
  2420. className="half-item"
  2421. {...formItemLayout}
  2422. style={{ opacity: ".5" }}
  2423. label="实际财务操作人电话"
  2424. >
  2425. <span>{this.state.financeMobile}</span>
  2426. </FormItem>
  2427. </div>
  2428. <div className="clearfix">
  2429. <FormItem
  2430. className="half-item"
  2431. {...formItemLayout}
  2432. label="驳回人"
  2433. >
  2434. <span>{this.state.initiateName}</span>
  2435. </FormItem>
  2436. <FormItem
  2437. className="half-item"
  2438. {...formItemLayout}
  2439. label="驳回时间"
  2440. >
  2441. <span>{this.state.backDate}</span>
  2442. </FormItem>
  2443. </div>
  2444. <div className="clearfix">
  2445. <FormItem
  2446. labelCol={{ span: 4 }}
  2447. wrapperCol={{ span: 16 }}
  2448. label="驳回原因"
  2449. >
  2450. <span>{this.state.reason}</span>
  2451. </FormItem>
  2452. </div>
  2453. {/* 协单人员 */}
  2454. <OrderCoor orderNo={this.state.orderNos} processStatus={this.state.processStatus} orderStatus={this.state.orderStatus} />
  2455. <div>
  2456. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2457. 项目业务
  2458. </span>
  2459. <Button
  2460. type="primary"
  2461. onClick={this.addDetailed}
  2462. style={{
  2463. float: "right",
  2464. marginRight: "50px",
  2465. marginBottom: "15px",
  2466. }}
  2467. >
  2468. 添加项目明细
  2469. </Button>
  2470. </div>
  2471. <div className="patent-table">
  2472. <Spin spinning={this.state.loading}>
  2473. <Table
  2474. columns={this.state.columnsX}
  2475. dataSource={this.state.dataSourceX}
  2476. pagination={this.state.paginations}
  2477. onRowClick={this.tableRowClickX}
  2478. bordered
  2479. size="small"
  2480. />
  2481. </Spin>
  2482. </div>
  2483. <div
  2484. style={{ display: cuiDataList.length ? "block" : "none" }}
  2485. >
  2486. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2487. 旧催款节点
  2488. </span>
  2489. <Button
  2490. type="primary"
  2491. // onClick={this.addcontact}
  2492. disabled
  2493. onClick={(e) => {
  2494. cuiDataList.length
  2495. ? this.addcontact()
  2496. : this.addcontactNew();
  2497. }}
  2498. style={{
  2499. float: "right",
  2500. marginRight: "50px",
  2501. marginBottom: "15px",
  2502. }}
  2503. >
  2504. 添加催款节点
  2505. </Button>
  2506. </div>
  2507. <div
  2508. className="clearfix"
  2509. style={{ display: cuiDataList.length ? "block" : "none" }}
  2510. >
  2511. <Spin spinning={this.state.loading}>
  2512. <Form layout="horizontal" id="demand-form">
  2513. <Table
  2514. pagination={false}
  2515. columns={this.state.ContactsLists}
  2516. dataSource={this.state.contactList}
  2517. bordered
  2518. size="small"
  2519. scroll={{ x: "max-content", y: 0 }}
  2520. />
  2521. <Col
  2522. span={24}
  2523. offset={9}
  2524. style={{ marginTop: "15px" }}
  2525. ></Col>
  2526. </Form>
  2527. </Spin>
  2528. </div>
  2529. <div>
  2530. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2531. 新催款节点
  2532. </span>
  2533. <span
  2534. style={{
  2535. display: cuiDataList.length ? "none" : "inline-block",
  2536. marginLeft: 10,
  2537. color: "red",
  2538. }}
  2539. >
  2540. 金额总计(万元): {this.state.totalCui}
  2541. </span>
  2542. <Button
  2543. type="primary"
  2544. disabled={
  2545. cuiDataList.length || this.state.addFlag
  2546. ? true
  2547. : false
  2548. }
  2549. // onClick={this.addcontact}
  2550. onClick={(e) => {
  2551. this.setState({ addFlag: true });
  2552. this.addcontactNew();
  2553. }}
  2554. style={{
  2555. float: "right",
  2556. marginRight: "50px",
  2557. marginBottom: "15px",
  2558. }}
  2559. >
  2560. 添加催款节点
  2561. </Button>
  2562. </div>
  2563. <div className="clearfix">
  2564. <Spin spinning={this.state.loading}>
  2565. <Form layout="horizontal" id="demand-form">
  2566. <Table
  2567. pagination={false}
  2568. columns={this.state.ContactsListsNew}
  2569. dataSource={this.state.contactListNew}
  2570. scroll={{ x: "max-content", y: 0 }}
  2571. bordered
  2572. size="small"
  2573. />
  2574. <Col
  2575. span={24}
  2576. offset={9}
  2577. style={{ marginTop: "15px" }}
  2578. />
  2579. </Form>
  2580. </Spin>
  2581. </div>
  2582. <div className="addSave" style={{ marginTop: "15px" }}>
  2583. <Button
  2584. className="cancel"
  2585. type="primary"
  2586. onClick={this.examOk}
  2587. style={{ marginLeft: "200px" }}
  2588. htmlType="submit"
  2589. >
  2590. 重新提交
  2591. </Button>
  2592. <Button
  2593. className="cancel"
  2594. type="primary"
  2595. onClick={this.examOks}
  2596. style={{ marginLeft: "50px" }}
  2597. htmlType="submit"
  2598. >
  2599. 订单作废
  2600. </Button>
  2601. <Button
  2602. className="cancel"
  2603. type="ghost"
  2604. onClick={this.visitCancel}
  2605. style={{ marginLeft: "50px" }}
  2606. >
  2607. 取消
  2608. </Button>
  2609. </div>
  2610. </div>
  2611. </Spin>
  2612. </Form>
  2613. </Modal> : <div />}
  2614. {/* <Modal
  2615. visible={this.state.rizhivisible}
  2616. className="admin-desc-content"
  2617. width="800px"
  2618. maskClosable={false}
  2619. title="订单日志"
  2620. footer={null}
  2621. onCancel={this.closeOrderLog}
  2622. >
  2623. <div className="patent-table">
  2624. <Spin spinning={this.state.loading}>
  2625. <Table
  2626. columns={this.state.columnsrizhi}
  2627. dataSource={this.state.dataSourcerizhi}
  2628. pagination={false}
  2629. />
  2630. </Spin>
  2631. </div>
  2632. </Modal> */}
  2633. <OrderRiZi
  2634. dataSourcerizhi={this.state.dataSourcerizhi}
  2635. closeOrderLog={this.closeOrderLog}
  2636. visible={this.state.rizhivisible}
  2637. loading={this.state.loading}
  2638. />
  2639. </div>
  2640. {this.state.projectOperationVisible ? <ProjectOperation
  2641. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  2642. orderNo={this.state.orderNo}
  2643. visible={this.state.projectOperationVisible}
  2644. dataInfor={this.state.dataInfor}
  2645. onCancel={this.nextCancel}
  2646. /> : null}
  2647. </div>
  2648. );
  2649. },
  2650. })
  2651. );
  2652. export default IntentionCustomer;