reject.jsx 89 KB

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