reject.jsx 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737
  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. let percent = Number(record.appropriationRatio * 100);
  614. percent += "%";
  615. return <span>{percent}(拨款比例)</span>;
  616. } else {
  617. return <span>{text}</span>;
  618. }
  619. }
  620. return (
  621. <div>
  622. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  623. <Select
  624. placeholder="选择"
  625. defaultValue={"金额"}
  626. onChange={(e) => {
  627. record.boStatus = e;
  628. }}
  629. >
  630. <Select.Option key={true}>比例</Select.Option>
  631. <Select.Option key={false}>金额</Select.Option>
  632. </Select>
  633. </div>
  634. <div style={{ float: "right" }}>
  635. <Input
  636. value={record.money}
  637. key={record.id}
  638. required="required"
  639. onChange={(e) => {
  640. record.money = e.target.value;
  641. this.setState({
  642. contactList: this.state.contactList,
  643. });
  644. }}
  645. style={{ width: "120px" }}
  646. />
  647. </div>
  648. </div>
  649. );
  650. // if (this.state.boFlag) {
  651. // return (
  652. // <div>
  653. // <div style={{ width: 70, float: "left", marginRight: 5 }}>
  654. // <Select
  655. // placeholder="选择"
  656. // defaultValue={"金额"}
  657. // onChange={(e) => {
  658. // record.boStatus = e;
  659. // }}
  660. // >
  661. // <Select.Option key={true}>比例</Select.Option>
  662. // <Select.Option key={false}>金额</Select.Option>
  663. // </Select>
  664. // </div>
  665. // <div style={{ float: "right" }}>
  666. // <Input
  667. // value={record.money}
  668. // key={record.id}
  669. // required="required"
  670. // onChange={(e) => {
  671. // record.money = e.target.value;
  672. // this.setState({
  673. // contactList: this.state.contactList,
  674. // });
  675. // }}
  676. // style={{ width: "120px" }}
  677. // />
  678. // </div>
  679. // </div>
  680. // );
  681. // } else {
  682. // return (
  683. // <div>
  684. // <Input
  685. // value={record.money}
  686. // placeholder="请输入金额(必填项)"
  687. // key={record.id}
  688. // required="required"
  689. // onChange={(e) => {
  690. // record.money = e.target.value;
  691. // this.setState({ contactList: this.state.contactList });
  692. // }}
  693. // style={{ width: "120px" }}
  694. // />
  695. // </div>
  696. // );
  697. // }
  698. },
  699. },
  700. {
  701. title: "服务年限",
  702. dataIndex: "startDate",
  703. key: "startDate",
  704. render: (text, record) => {
  705. if (record.dunTypeName) {
  706. return <span>{text}</span>;
  707. }
  708. return (
  709. <div>
  710. {
  711. record.dunType != 0 ?
  712. <Select
  713. placeholder="请选择年限"
  714. style={{ width: "150px" }}
  715. disabled={this.state.yearFlag ? true : false}
  716. onChange={(e) => {
  717. record.effectiveCount = e;
  718. }}
  719. >
  720. {/* <Select.Option key={null}>无</Select.Option> */}
  721. <Select.Option key={1}>一年</Select.Option>
  722. <Select.Option key={3}>两年</Select.Option>
  723. <Select.Option key={5}>三年</Select.Option>
  724. <Select.Option key={7}>四年</Select.Option>
  725. <Select.Option key={9}>五年</Select.Option>
  726. </Select> : <div />
  727. }
  728. </div>
  729. );
  730. },
  731. },
  732. {
  733. title: "催款状态",
  734. dataIndex: "status",
  735. key: "status",
  736. render: (text) => {
  737. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  738. },
  739. },
  740. {
  741. title: "操作",
  742. dataIndex: "dels",
  743. key: "dels",
  744. render: (text, record, index) => {
  745. return (
  746. <div>
  747. {this.state.processStatus == 0 ? (
  748. <Popconfirm
  749. title="是否删除?"
  750. onConfirm={() => {
  751. this.confirmDeletNew(record);
  752. }}
  753. okText="删除"
  754. cancelText="不删除"
  755. >
  756. <Button
  757. style={{
  758. marginRight: "10px",
  759. color: "#ffffff",
  760. background: "#f00",
  761. border: "none",
  762. }}
  763. >
  764. 删除
  765. </Button>
  766. </Popconfirm>
  767. ) : (
  768. ""
  769. )}
  770. {record.isSave ? (
  771. <Button
  772. type="primary"
  773. onClick={(e) => {
  774. this.contactSaveNew(record);
  775. this.setState({
  776. addFlag: false,
  777. });
  778. }}
  779. >
  780. 保存
  781. </Button>
  782. ) : (
  783. ""
  784. )}
  785. </div>
  786. );
  787. },
  788. },
  789. ],
  790. ContactsLists: [
  791. {
  792. title: "催款科目",
  793. dataIndex: "dunSubject",
  794. key: "dunSubject",
  795. render: (text, record) => {
  796. return (
  797. <Select
  798. placeholder="请选择催款科目"
  799. value={record.dunSubject}
  800. disabled
  801. style={{ width: "150px" }}
  802. onChange={(e) => {
  803. record.dunSubject = e;
  804. this.setState({ contactList: this.state.contactList });
  805. }}
  806. >
  807. {jiedian.map(function (item) {
  808. return (
  809. <Select.Option key={item.value}>{item.key}</Select.Option>
  810. );
  811. })}
  812. </Select>
  813. );
  814. },
  815. },
  816. {
  817. title: "金额(万元)",
  818. dataIndex: "money",
  819. key: "money",
  820. render: (text, record) => {
  821. return (
  822. <Input
  823. value={record.money}
  824. disabled
  825. placeholder="请输入金额(必填项)"
  826. key={record.id}
  827. required="required"
  828. onChange={(e) => {
  829. record.money = e.target.value;
  830. this.setState({ contactList: this.state.contactList });
  831. }}
  832. style={{ width: "120px" }}
  833. />
  834. );
  835. },
  836. },
  837. {
  838. title: "催款状态",
  839. dataIndex: "dunStatus",
  840. key: "dunStatus",
  841. render: (text) => {
  842. return getCuikuan(text);
  843. },
  844. },
  845. {
  846. title: "操作",
  847. dataIndex: "dels",
  848. key: "dels",
  849. render: (text, record) => {
  850. return (
  851. <div>
  852. {
  853. <Popconfirm
  854. title="是否删除?"
  855. onConfirm={() => {
  856. this.confirmDelet(record.key);
  857. }}
  858. okText="删除"
  859. cancelText="不删除"
  860. >
  861. <Button
  862. style={{
  863. marginRight: "10px",
  864. color: "#ffffff",
  865. background: "#f00",
  866. border: "none",
  867. }}
  868. >
  869. 删除
  870. </Button>
  871. </Popconfirm>
  872. }
  873. {record.id ? (
  874. ""
  875. ) : (
  876. <Button type="primary" onClick={this.contactSave} disabled>
  877. 保存
  878. </Button>
  879. )}
  880. </div>
  881. );
  882. },
  883. },
  884. ],
  885. updatas: {},
  886. };
  887. },
  888. //删除
  889. delectRow(record) {
  890. this.setState({
  891. loading: true,
  892. });
  893. $.ajax({
  894. method: "post",
  895. dataType: "json",
  896. crossDomain: false,
  897. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  898. data: {
  899. id: record.id,
  900. },
  901. }).done(
  902. function (data) {
  903. if (!data.error.length) {
  904. message.success("删除成功!");
  905. this.setState({
  906. loading: false,
  907. });
  908. this.xiangmu(this.state.orderNo);
  909. this.jiedianNew(this.state.orderNo);
  910. this.jiedian(this.state.orderNo);
  911. this.loadData(this.state.pageNo);
  912. } else {
  913. message.warning(data.error[0].message);
  914. }
  915. }.bind(this)
  916. );
  917. },
  918. //页面加载函数
  919. componentWillMount() {
  920. this.loadData();
  921. },
  922. //整行点击
  923. tableRowClick(record) {
  924. this.setState({
  925. visible: true,
  926. orderNos: record.orderNo,
  927. orderStatus: record.orderStatus,
  928. processStatus: record.orderStatus
  929. });
  930. this.xiangqing(record.orderNo);
  931. this.xiangmu(record.orderNo);
  932. this.jiedian(record.orderNo);
  933. this.jiedianNew(record.orderNo);
  934. this.departmentList();
  935. this.getpatentTypeList();
  936. },
  937. //点击打卡项目详情
  938. tableRowClickX(record) {
  939. this.setState({
  940. projectOperationVisible: true,
  941. dataInfor: record,
  942. })
  943. },
  944. //项目详情关闭
  945. nextCancel() {
  946. this.setState({
  947. projectOperationVisible: false,
  948. gid: "",
  949. dataInfor: {},
  950. }, () => {
  951. this.xiangmu(this.state.orderNo);
  952. });
  953. },
  954. //订单详情
  955. xiangqing(orderNos) {
  956. $.ajax({
  957. method: "get",
  958. dataType: "json",
  959. crossDomain: false,
  960. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  961. data: {
  962. orderNo: orderNos,
  963. },
  964. success: function (data) {
  965. if (data.error.length || data.data.list == "") {
  966. if (data.error && data.error.length) {
  967. message.warning(data.error[0].message);
  968. }
  969. } else {
  970. let thisdata = data.data;
  971. if (thisdata.approval == 0) {
  972. thisdata.approval = 0;
  973. } else {
  974. thisdata.approval = 1;
  975. }
  976. // if (thisdata.approval == 2) {
  977. // thisdata.approval = "特批通过";
  978. // } else if (thisdata.approval == 3) {
  979. // thisdata.approval = "特批驳回";
  980. // }
  981. this.setState({
  982. id: thisdata.id,
  983. orderUid: thisdata.uid,
  984. kehuId: thisdata.buyerId,
  985. orderNo: thisdata.orderNo, //订单编号
  986. contractNo: thisdata.contractNo, //合同编号
  987. userName: thisdata.userName, //客户名称
  988. signDate: thisdata.signDate, //签单时间
  989. processStatus: thisdata.processStatus, //流程状态
  990. liquidationStatus: thisdata.liquidationStatus, //结算状态
  991. contacts: thisdata.contacts, //企业联系人
  992. contactMobile: thisdata.contactMobile, //联系人电话
  993. legalPerson: thisdata.legalPerson, //法人
  994. legalPersonTel: thisdata.legalPersonTel, //法人电话
  995. firstAmount: thisdata.firstAmount + "", //签单金额
  996. totalAmount: thisdata.totalAmount + "", //首付金额
  997. settlementAmount: thisdata.settlementAmount, //已收款项
  998. orderRemarks: thisdata.orderRemarks, //订单留言
  999. orgCodeUrl: thisdata.contractPictureUrl
  1000. ? splitUrl(
  1001. thisdata.contractPictureUrl,
  1002. ",",
  1003. globalConfig.avatarHost + "/upload"
  1004. )
  1005. : [], //图片地址
  1006. replenishUrl: thisdata.agreementUrl
  1007. ? splitUrl(
  1008. thisdata.agreementUrl,
  1009. ",",
  1010. globalConfig.avatarHost + "/upload"
  1011. )
  1012. : [], //图片地址
  1013. contentUrl: thisdata.serviceContent
  1014. ? splitUrl(
  1015. thisdata.serviceContent,
  1016. ",",
  1017. globalConfig.avatarHost + "/upload"
  1018. )
  1019. : [], //图片地址
  1020. salesmanName: thisdata.salesmanName, //营销员名称
  1021. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  1022. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  1023. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  1024. financeName: thisdata.financeName, //财务名称
  1025. financeMobile: thisdata.financeMobile, //财务电话
  1026. nowFinance: thisdata.nowFinance, //财务名称
  1027. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  1028. initiateName: thisdata.initiateName, //驳回人
  1029. backDate: thisdata.backDate, //驳回时间
  1030. reason: thisdata.reason, //驳回原因
  1031. approval: thisdata.approval, //特批状态
  1032. organizationSearch: thisdata.orderDep,
  1033. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  1034. outsource: thisdata.outsource == 0 ? "否" : "是",
  1035. deleteSign: thisdata.deleteSign,
  1036. updatas: {
  1037. salesType: thisdata.salesType,//销售类型
  1038. userType: thisdata.userType,//客户所属类型
  1039. other: thisdata.other,//3渠道名 4,5描述
  1040. },
  1041. channelName: thisdata.salesType == "3" ? thisdata.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  1042. });
  1043. }
  1044. }.bind(this),
  1045. }).always(
  1046. function () {
  1047. this.setState({
  1048. loading: false,
  1049. });
  1050. }.bind(this)
  1051. );
  1052. },
  1053. // 拆分详细
  1054. showRes(record) {
  1055. this.setState({
  1056. resVisible: true,
  1057. resRecord: record,
  1058. });
  1059. },
  1060. resCancel() {
  1061. this.setState({
  1062. resVisible: false,
  1063. });
  1064. },
  1065. //项目列表
  1066. xiangmu(orderNos) {
  1067. $.ajax({
  1068. method: "get",
  1069. dataType: "json",
  1070. crossDomain: false,
  1071. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1072. data: {
  1073. orderNo: orderNos,
  1074. },
  1075. success: function (data) {
  1076. let theArr = [];
  1077. if (data.error.length || data.data.list == "") {
  1078. if (data.error && data.error.length) {
  1079. message.warning(data.error[0].message);
  1080. }
  1081. } else {
  1082. for (let i = 0; i < data.data.length; i++) {
  1083. let thisdata = data.data[i];
  1084. thisdata.key = i;
  1085. thisdata.sort = thisdata.cSort;
  1086. theArr.push(thisdata);
  1087. }
  1088. }
  1089. this.setState({
  1090. dataSourceX: theArr,
  1091. paginations: false,
  1092. });
  1093. }.bind(this),
  1094. }).always(
  1095. function () {
  1096. this.setState({
  1097. loading: false,
  1098. });
  1099. }.bind(this)
  1100. );
  1101. },
  1102. //节点列表
  1103. jiedian(orderNos) {
  1104. $.ajax({
  1105. method: "get",
  1106. dataType: "json",
  1107. crossDomain: false,
  1108. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1109. data: {
  1110. orderNo: orderNos,
  1111. },
  1112. success: function (data) {
  1113. let theArr = [];
  1114. let thisData = [];
  1115. if (data.error.length || data.data.list == "") {
  1116. if (data.error && data.error.length) {
  1117. message.warning(data.error[0].message);
  1118. }
  1119. } else {
  1120. for (let i = 0; i < data.data.length; i++) {
  1121. thisData = data.data[i];
  1122. theArr.push({
  1123. key: i,
  1124. dunSubject: thisData.dunSubject
  1125. ? thisData.dunSubject.toString()
  1126. : "", //催款科目
  1127. id: thisData.id, //节点Id
  1128. money: thisData.money, //催款金额
  1129. dunStatus: thisData.dunStatus, //催款状态
  1130. orderNo: thisData.orderNo,
  1131. });
  1132. }
  1133. this.setState({
  1134. contactList: theArr,
  1135. });
  1136. }
  1137. }.bind(this),
  1138. }).always(
  1139. function () {
  1140. this.setState({
  1141. loading: false,
  1142. });
  1143. }.bind(this)
  1144. );
  1145. },
  1146. //查看催款节点
  1147. jiedianNew(orderNos) {
  1148. $.ajax({
  1149. method: "get",
  1150. dataType: "json",
  1151. crossDomain: false,
  1152. url:
  1153. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1154. data: {
  1155. orderNo: orderNos,
  1156. },
  1157. success: function (data) {
  1158. if (data.error && data.error.length) {
  1159. message.warning(data.error[0].message);
  1160. } else {
  1161. let theArr = [];
  1162. let thisData = [];
  1163. let arr = data.data || [];
  1164. let totalCui = 0;
  1165. for (let i = 0; i < arr.length; i++) {
  1166. thisData = arr[i];
  1167. totalCui += +thisData.money;
  1168. theArr.push({
  1169. key: i,
  1170. dunSubject: thisData.dunSubject
  1171. ? thisData.dunSubject.toString()
  1172. : "", //催款科目
  1173. id: thisData.id, //节点Id
  1174. money: thisData.money, //催款金额
  1175. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1176. commodityName: thisData.commodityName,
  1177. projectType: thisData.projectType,
  1178. dunTypeName: thisData.dunTypeName,
  1179. status: thisData.status,
  1180. waitDay: thisData.waitDay,
  1181. effectiveCount: thisData.effectiveCount,
  1182. startDate: thisData.startDate,
  1183. dunType: thisData.dunType,
  1184. appropriationRatio: thisData.appropriationRatio,
  1185. customizeName: thisData.customizeName,
  1186. customizeTimes: thisData.customizeTimes,
  1187. tid: thisData.tid,
  1188. });
  1189. }
  1190. if (!totalCui) {
  1191. totalCui = 0;
  1192. }
  1193. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1194. this.setState({
  1195. contactListNew: theArr,
  1196. totalCui: parseFloat(totalCui),
  1197. });
  1198. }
  1199. }.bind(this),
  1200. }).always(
  1201. function () {
  1202. this.setState({
  1203. loading: false,
  1204. });
  1205. }.bind(this)
  1206. );
  1207. },
  1208. //催款节点保存
  1209. contactSave() {
  1210. for (let i = 0; i < this.state.contactList.length; i++) {
  1211. if (moneyVerify(this.state.contactList[i].money)) {
  1212. return;
  1213. }
  1214. }
  1215. this.setState({
  1216. loading: true,
  1217. });
  1218. $.ajax({
  1219. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1220. method: "post",
  1221. data: {
  1222. orderNo: this.state.orderNo,
  1223. orderDun: JSON.stringify(this.state.contactList),
  1224. },
  1225. }).done(
  1226. function (data) {
  1227. this.setState({
  1228. loading: false,
  1229. });
  1230. if (!data.error.length) {
  1231. message.success("保存成功!");
  1232. this.jiedian(this.state.orderNo);
  1233. } else {
  1234. message.warning(data.error[0].message);
  1235. }
  1236. }.bind(this)
  1237. );
  1238. },
  1239. //催款节点保存
  1240. contactSaveNew(record) {
  1241. if (record.dunType == 0) {
  1242. if (!record.customizeTimes) {
  1243. message.warning("请输入自定义时间");
  1244. return;
  1245. } else if (!record.customizeName) {
  1246. message.warning("请输入自定义科目");
  1247. return;
  1248. }
  1249. }
  1250. if (record.boStatus == "false") {
  1251. record.boStatus = false;
  1252. } else if (record.boStatus == "true") {
  1253. record.boStatus = true;
  1254. }
  1255. if (!this.state.yearFlag) {
  1256. if (!record.effectiveCount && !record.dunTypeCustom) {
  1257. message.warning("请选择服务年限");
  1258. return;
  1259. }
  1260. } else {
  1261. record.effectiveCount = "";
  1262. }
  1263. if (record.money == "") {
  1264. message.warning("请填写金额");
  1265. return;
  1266. }
  1267. if (record.boStatus) {
  1268. if (
  1269. typeof +record.money == "number" &&
  1270. +record.money >= 0 &&
  1271. +record.money <= 1
  1272. ) {
  1273. record.appropriationRatio = record.money;
  1274. } else {
  1275. message.warning("金额比例填写错误,比例范围0~1");
  1276. return;
  1277. }
  1278. }
  1279. if (!record.dunType && record.dunType != 0) {
  1280. message.warning("请选择对应科目");
  1281. return;
  1282. }
  1283. if (record.dunType != 1) {
  1284. record.waitDay = "";
  1285. }
  1286. this.setState({
  1287. loading: true,
  1288. });
  1289. if (record.boStatus) {
  1290. $.ajax({
  1291. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1292. method: "post",
  1293. data: {
  1294. orderNo: record.orderNo,
  1295. tid: record.tid,
  1296. projectType: record.sort,
  1297. dunType: record.dunType,
  1298. appropriationRatio: record.appropriationRatio,
  1299. waitDay: record.waitDay,
  1300. effectiveCount: record.effectiveCount,
  1301. customizeTimes:
  1302. record.dunType == 0 ? record.customizeTimes : undefined,
  1303. customizeName:
  1304. record.dunType == 0 ? record.customizeName : undefined,
  1305. },
  1306. }).done(
  1307. function (data) {
  1308. this.setState({
  1309. loading: false,
  1310. });
  1311. if (!data.error.length) {
  1312. message.success("保存成功!");
  1313. this.setState({
  1314. cuiFlag: false,
  1315. boFlag: false,
  1316. });
  1317. this.jiedianNew(record.orderNo);
  1318. } else {
  1319. message.warning(data.error[0].message);
  1320. }
  1321. }.bind(this)
  1322. );
  1323. } else {
  1324. $.ajax({
  1325. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1326. method: "post",
  1327. data: {
  1328. orderNo: record.orderNo,
  1329. tid: record.tid,
  1330. projectType: record.sort,
  1331. dunType: record.dunType,
  1332. money: record.money,
  1333. waitDay: record.waitDay,
  1334. effectiveCount: record.effectiveCount,
  1335. customizeTimes:
  1336. record.dunType == 0 ? record.customizeTimes : undefined,
  1337. customizeName:
  1338. record.dunType == 0 ? record.customizeName : undefined,
  1339. },
  1340. }).done(
  1341. function (data) {
  1342. this.setState({
  1343. loading: false,
  1344. });
  1345. if (!data.error.length) {
  1346. message.success("保存成功!");
  1347. this.setState({
  1348. cuiFlag: false,
  1349. boFlag: false,
  1350. });
  1351. this.jiedianNew(record.orderNo);
  1352. } else {
  1353. message.warning(data.error[0].message);
  1354. }
  1355. }.bind(this)
  1356. );
  1357. }
  1358. },
  1359. //点击新增催款节点
  1360. addcontact() {
  1361. this.state.contactList.push({
  1362. key: this.state.contactList.length,
  1363. money: "",
  1364. dunSubject: undefined,
  1365. orderNo: this.state.orderNo,
  1366. dunTarget: this.state.kehuId,
  1367. });
  1368. this.setState({
  1369. contactList: this.state.contactList,
  1370. });
  1371. },
  1372. //点击新增催款节点
  1373. addcontactNew() {
  1374. this.state.contactListNew.push({
  1375. key: this.state.contactListNew.length,
  1376. money: "",
  1377. dunSubject: undefined,
  1378. orderNo: this.state.orderNo,
  1379. dunTarget: this.state.kehuId,
  1380. });
  1381. this.setState({
  1382. contactListNew: this.state.contactListNew,
  1383. cuiFlag: true,
  1384. });
  1385. },
  1386. //删除收款节点
  1387. confirmDelet(index) {
  1388. this.state.contactList.splice(index, 1);
  1389. this.setState({
  1390. contactList: this.state.contactList,
  1391. });
  1392. this.contactSave();
  1393. },
  1394. //删除收款节点
  1395. confirmDeletNew(index) {
  1396. if (index.id) {
  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. $.ajax({
  1405. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1406. method: "post",
  1407. data: {
  1408. id: index.id,
  1409. },
  1410. }).done(
  1411. function (data) {
  1412. this.setState({
  1413. loading: false,
  1414. });
  1415. if (!data.error.length) {
  1416. message.success("删除成功!");
  1417. this.setState({
  1418. cuiFlag: false,
  1419. });
  1420. this.jiedianNew(this.state.orderNo);
  1421. } else {
  1422. message.warning(data.error[0].message);
  1423. }
  1424. }.bind(this)
  1425. );
  1426. } else {
  1427. this.state.contactListNew.splice(index.key, 1);
  1428. this.setState({
  1429. contactListNew: this.state.contactListNew,
  1430. cuiFlag: false,
  1431. addFlag: false,
  1432. boFlag: false,
  1433. });
  1434. }
  1435. },
  1436. //重新提交
  1437. examOk() {
  1438. let theorgCodeUrl = [];
  1439. if (this.state.orgCodeUrl.length) {
  1440. let picArr = [];
  1441. this.state.orgCodeUrl.map(function (item) {
  1442. if (
  1443. item.response &&
  1444. item.response.data &&
  1445. item.response.data.length
  1446. ) {
  1447. picArr.push(item.response.data);
  1448. }
  1449. });
  1450. theorgCodeUrl = picArr.join(",");
  1451. }
  1452. let theReplenishUrl = [];
  1453. if (this.state.replenishUrl.length) {
  1454. let picArr = [];
  1455. this.state.replenishUrl.map(function (item) {
  1456. if (
  1457. item.response &&
  1458. item.response.data &&
  1459. item.response.data.length
  1460. ) {
  1461. picArr.push(item.response.data);
  1462. }
  1463. });
  1464. theReplenishUrl = picArr.join(",");
  1465. }
  1466. // 服务内容上传图片
  1467. let contentUrl = [];
  1468. if (this.state.contentUrl.length) {
  1469. let picArr = [];
  1470. this.state.contentUrl.map(function (item) {
  1471. if (
  1472. item.response &&
  1473. item.response.data &&
  1474. item.response.data.length
  1475. ) {
  1476. picArr.push(item.response.data);
  1477. }
  1478. });
  1479. contentUrl = picArr.join(",");
  1480. } else {
  1481. message.warning("请上传服务内容图片")
  1482. return
  1483. }
  1484. if (moneyVerify(this.state.totalAmount)) {
  1485. return;
  1486. }
  1487. if (moneyVerify(this.state.firstAmount)) {
  1488. return;
  1489. }
  1490. if (!this.state.totalAmount) {
  1491. message.warning("签单金额不能为空");
  1492. this.refs.signFirstPayment.focus();
  1493. return false;
  1494. }
  1495. if (!this.state.firstAmount) {
  1496. message.warning("首付金额不能为空");
  1497. this.refs.signFirstPayment.focus();
  1498. return false;
  1499. }
  1500. if (!theorgCodeUrl) {
  1501. message.warning("企业负责人不能为空");
  1502. this.refs.signFirstPayment.focus();
  1503. return false;
  1504. }
  1505. if (
  1506. this.state.approval == "特批通过" ||
  1507. this.state.approval == "特批驳回"
  1508. ) {
  1509. message.warning("特批状态不正确,请重新填写");
  1510. return false;
  1511. }
  1512. const arr = this.state.contactListNew || [];
  1513. for (let i = 0; i < arr.length; i++) {
  1514. if (
  1515. arr[i].dunType == 1 &&
  1516. arr[i].waitDay != null &&
  1517. this.state.approval == 0
  1518. ) {
  1519. message.warning(
  1520. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1521. );
  1522. return false;
  1523. } else if (
  1524. arr[i].dunType == 1 &&
  1525. arr[i].waitDay == null &&
  1526. this.state.approval == 1
  1527. ) {
  1528. message.warning(
  1529. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1530. );
  1531. return false;
  1532. }
  1533. if (!this.state.contactListNew[i].id) {
  1534. message.warning("请保存催款节点");
  1535. return false;
  1536. }
  1537. }
  1538. if (this.state.updatas.salesType == null) {
  1539. message.warning("请选择销售类型!");
  1540. return
  1541. }
  1542. this.setState({
  1543. flag: true,
  1544. });
  1545. $.ajax({
  1546. method: "post",
  1547. dataType: "json",
  1548. crossDomain: false,
  1549. // url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1550. url: globalConfig.context + "/api/admin/newOrder/submitOrder",
  1551. data: {
  1552. orderNo: this.state.orderNo, //订单编号
  1553. totalAmount: this.state.totalAmount, //总金额
  1554. firstAmount: this.state.firstAmount, //首付
  1555. isSubmit: 1, //保存草稿还是提交
  1556. signDate: this.state.signDate, //签单日期
  1557. contacts: this.state.contacts, //企业负责人
  1558. contactMobile: this.state.contactMobile, //负责人联系方式
  1559. legalPerson: this.state.legalPerson, //企业法人
  1560. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1561. approval: this.state.approval, //特批状态
  1562. contractNo: this.state.contractNo, //合同编号
  1563. orderRemarks: this.state.orderRemarks, //订单备注
  1564. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1565. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  1566. serviceContent: contentUrl.length ? contentUrl : "",
  1567. orderDep: this.state.organizationSearch,
  1568. },
  1569. success: function (data) {
  1570. if (data.error.length || data.data.list == "") {
  1571. if (data.error && data.error.length) {
  1572. message.warning(data.error[0].message);
  1573. this.setState({
  1574. flag: false,
  1575. });
  1576. }
  1577. } else {
  1578. message.success("该订单已重新提交~");
  1579. this.setState({
  1580. visible: false,
  1581. flag: false,
  1582. });
  1583. this.loadData(this.state.pageNo);
  1584. }
  1585. }.bind(this),
  1586. }).always(
  1587. function () {
  1588. this.setState({
  1589. loading: false,
  1590. });
  1591. }.bind(this)
  1592. );
  1593. },
  1594. //订单作废
  1595. examOks() {
  1596. this.setState({
  1597. flag: true,
  1598. });
  1599. $.ajax({
  1600. method: "post",
  1601. dataType: "json",
  1602. crossDomain: false,
  1603. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1604. data: {
  1605. orderNo: this.state.orderNo, //订单编号
  1606. },
  1607. success: function (data) {
  1608. if (data.error.length || data.data.list == "") {
  1609. if (data.error && data.error.length) {
  1610. message.warning(data.error[0].message);
  1611. }
  1612. } else {
  1613. message.success("该订单已作废~");
  1614. this.setState({
  1615. visible: false,
  1616. flag: false,
  1617. });
  1618. this.loadData(this.state.pageNo);
  1619. }
  1620. }.bind(this),
  1621. }).always(
  1622. function () {
  1623. this.setState({
  1624. loading: false,
  1625. flag: false,
  1626. });
  1627. }.bind(this)
  1628. );
  1629. },
  1630. departmentList() {
  1631. this.setState({
  1632. loading: true,
  1633. });
  1634. $.ajax({
  1635. method: "get",
  1636. dataType: "json",
  1637. crossDomain: false,
  1638. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1639. data: {},
  1640. success: function (data) {
  1641. let thedata = data.data;
  1642. let theArr = [];
  1643. if (!thedata) {
  1644. if (data.error && data.error.length) {
  1645. message.warning(data.error[0].message);
  1646. }
  1647. thedata = {};
  1648. } else {
  1649. thedata.map(function (item, index) {
  1650. theArr.push({
  1651. key: index,
  1652. name: item.name,
  1653. id: item.id,
  1654. depNo: item.depNo,
  1655. });
  1656. });
  1657. }
  1658. this.setState({
  1659. departmentArr: theArr,
  1660. });
  1661. }.bind(this),
  1662. }).always(
  1663. function () {
  1664. this.setState({
  1665. loading: false,
  1666. });
  1667. }.bind(this)
  1668. );
  1669. },
  1670. rizhi() {
  1671. this.setState({
  1672. loading: true,
  1673. });
  1674. $.ajax({
  1675. method: "get",
  1676. dataType: "json",
  1677. crossDomain: false,
  1678. url: "/api/admin/newOrder/selectOrderLog",
  1679. data: {
  1680. orderNo: this.state.orderNo,
  1681. },
  1682. success: function (data) {
  1683. let theArr = [];
  1684. let thisData = data.data;
  1685. if (!thisData.length) {
  1686. if (data.error && data.error.length) {
  1687. message.warning(data.error[0].message);
  1688. }
  1689. thisData = {};
  1690. } else {
  1691. for (let i = 0; i < data.data.length; i++) {
  1692. let thisdata = data.data[i];
  1693. theArr.push({
  1694. processName: thisdata.processName,
  1695. adminName: thisdata.adminName,
  1696. createDate: thisdata.createDate,
  1697. remarks: thisdata.remarks,
  1698. });
  1699. }
  1700. }
  1701. this.setState({
  1702. dataSourcerizhi: theArr,
  1703. });
  1704. }.bind(this),
  1705. }).always(
  1706. function () {
  1707. this.setState({
  1708. loading: false,
  1709. });
  1710. }.bind(this)
  1711. );
  1712. },
  1713. //查看订单日志
  1714. getOrderLog() {
  1715. this.setState({
  1716. rizhivisible: true,
  1717. });
  1718. this.rizhi();
  1719. },
  1720. closeOrderLog() {
  1721. this.setState({
  1722. rizhivisible: false,
  1723. });
  1724. },
  1725. //点击签单
  1726. handleCancels() {
  1727. this.setState({
  1728. isSubmit: 1,
  1729. });
  1730. },
  1731. //点击签单
  1732. handleCancelq() {
  1733. this.setState({
  1734. isSubmit: 0,
  1735. });
  1736. },
  1737. resets() {
  1738. this.state.orderNoSearch = "";
  1739. this.state.customerName = "";
  1740. this.state.releaseDate[0] = undefined;
  1741. this.state.releaseDate[1] = undefined;
  1742. this.loadData();
  1743. },
  1744. //点击添加项目明细
  1745. addDetailed() {
  1746. this.setState({
  1747. projectOperationVisible: true,
  1748. });
  1749. },
  1750. //搜索
  1751. search() {
  1752. this.setState({
  1753. //signBillVisible:false
  1754. });
  1755. this.loadData();
  1756. },
  1757. getOrgCodeUrl(e) {
  1758. this.setState({ orgCodeUrl: e });
  1759. },
  1760. getReplenishUrl(e) {
  1761. this.setState({ replenishUrl: e });
  1762. },
  1763. getContentUrl(e) {
  1764. this.setState({ contentUrl: e });
  1765. },
  1766. //关闭详情
  1767. visitCancel() {
  1768. this.setState({
  1769. visible: false,
  1770. cuiFlag: false,
  1771. addFlag: false,
  1772. boFlag: false,
  1773. });
  1774. this.loadData(this.state.pageNo);
  1775. },
  1776. visitOk() {
  1777. this.setState({
  1778. visible: false,
  1779. });
  1780. this.resets();
  1781. },
  1782. //客户
  1783. selectAutoCUT(value) {
  1784. let autoIds;
  1785. let fwList = this.state.customerArr;
  1786. fwList.map(function (item) {
  1787. if (value == item.name) {
  1788. autoIds = item.id;
  1789. }
  1790. });
  1791. this.setState({
  1792. customerName: value,
  1793. autoId: autoIds,
  1794. });
  1795. },
  1796. getpatentTypeList() {
  1797. $.ajax({
  1798. method: "get",
  1799. dataType: "json",
  1800. crossDomain: false,
  1801. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  1802. success: function (data) {
  1803. if (data.error.length === 0) {
  1804. this.setState({
  1805. patentTypeList: data.data
  1806. })
  1807. } else {
  1808. message.warning(data.error[0].message);
  1809. };
  1810. }.bind(this)
  1811. });
  1812. },
  1813. //加载(自动补全)
  1814. supervisor(e, state) {
  1815. //客户名称与服务名称自动补全
  1816. let api = state
  1817. ? "/api/admin/customer/getCustomerByName"
  1818. : "/api/admin/order/getBusinessProjectByName";
  1819. $.ajax({
  1820. method: "get",
  1821. dataType: "json",
  1822. crossDomain: false,
  1823. url: globalConfig.context + api,
  1824. data: state
  1825. ? {
  1826. name: e,
  1827. type: this.state.customType,
  1828. }
  1829. : {
  1830. businessName: e,
  1831. },
  1832. success: function (data) {
  1833. let thedata = data.data;
  1834. if (!thedata) {
  1835. if (data.error && data.error.length) {
  1836. message.warning(data.error[0].message);
  1837. }
  1838. thedata = {};
  1839. }
  1840. this.setState({
  1841. states: state,
  1842. customerArr: thedata,
  1843. });
  1844. }.bind(this),
  1845. }).always(
  1846. function () {
  1847. this.setState({
  1848. loading: false,
  1849. });
  1850. }.bind(this)
  1851. );
  1852. },
  1853. //上级主管输入框失去焦点是判断客户是否存在
  1854. selectAuto(value) {
  1855. let kid = [];
  1856. let fwList = this.state.customerArr;
  1857. fwList.map(function (item) {
  1858. if (value == item.bname) {
  1859. kid = item;
  1860. }
  1861. });
  1862. if (kid.type == "1") {
  1863. this.setState({
  1864. displayFees: "block",
  1865. });
  1866. } else {
  1867. this.setState({
  1868. displayFees: "none",
  1869. });
  1870. }
  1871. this.setState({
  1872. commodityName: value,
  1873. gid: kid.id,
  1874. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1875. commodityFirstPayment:
  1876. kid.firstPayment == 0
  1877. ? kid.firstPayment.toString()
  1878. : kid.firstPayment,
  1879. });
  1880. },
  1881. //服务值改变时请求客户名称
  1882. httpChange(e) {
  1883. this.state.gid = "";
  1884. if (e.length >= 1) {
  1885. this.supervisor(e, false);
  1886. }
  1887. this.setState({
  1888. commodityName: e,
  1889. });
  1890. },
  1891. changeList(arr) {
  1892. const newArr = [];
  1893. this.state.columns.forEach(item => {
  1894. arr.forEach(val => {
  1895. if (val === item.title) {
  1896. newArr.push(item);
  1897. }
  1898. });
  1899. });
  1900. this.setState({
  1901. changeList: newArr
  1902. });
  1903. },
  1904. render() {
  1905. const formItemLayout = {
  1906. labelCol: { span: 8 },
  1907. wrapperCol: { span: 14 },
  1908. };
  1909. const FormItem = Form.Item;
  1910. const { RangePicker } = DatePicker;
  1911. const rowSelection = {
  1912. selectedRowKeys: this.state.selectedRowKeys,
  1913. onChange: (selectedRowKeys, selectedRows) => {
  1914. this.setState({
  1915. modalVisible: false,
  1916. selectedRows: selectedRows.slice(-1),
  1917. selectedRowKeys: selectedRowKeys.slice(-1),
  1918. });
  1919. },
  1920. onSelect: (recordt) => {
  1921. this.setState({
  1922. modalVisible: false,
  1923. recordt: recordt.id,
  1924. });
  1925. },
  1926. };
  1927. const cuiDataList = this.state.contactList || [];
  1928. const dataSources = this.state.customerArr || [];
  1929. let departmentArr = this.state.departmentArr || [];
  1930. const options = this.state.states
  1931. ? dataSources.map((group) => (
  1932. <Select.Option key={group.id} value={group.name}>
  1933. {group.name}
  1934. </Select.Option>
  1935. ))
  1936. : dataSources.map((group, index) => (
  1937. <Select.Option key={index} value={group.bname}>
  1938. {group.bname}
  1939. </Select.Option>
  1940. ));
  1941. const { TabPane } = Tabs;
  1942. return (
  1943. <div className="user-content">
  1944. {this.state.resVisible ? (
  1945. <ResolutionDetail
  1946. cancel={this.resCancel}
  1947. detail={this.state.resRecord}
  1948. visible={this.state.resVisible}
  1949. id={this.state.resRecord.orderNo}
  1950. />
  1951. ) : (
  1952. ""
  1953. )}
  1954. <ShowModalDiv ShowModal={this.state.showModal} />
  1955. <div className="content-title" style={{ marginBottom: 10 }}>
  1956. <span style={{ fontWeight: 900, fontSize: 16 }}>驳回订单列表</span>
  1957. </div>
  1958. <div className="user-search">
  1959. <Tabs
  1960. defaultActiveKey="1"
  1961. onChange={this.callback}
  1962. className="test"
  1963. >
  1964. <TabPane tab="搜索" key="1">
  1965. <Input
  1966. placeholder="客户名称"
  1967. style={{
  1968. width: "150px",
  1969. marginBottom: "10px",
  1970. marginTop: 10,
  1971. marginLeft: 10,
  1972. marginRight: 10,
  1973. }}
  1974. value={this.state.customerName}
  1975. onChange={(e) => {
  1976. this.setState({ customerName: e.target.value });
  1977. }}
  1978. />
  1979. <Input
  1980. placeholder="订单编号"
  1981. style={{ width: "150px", marginRight: 10 }}
  1982. value={this.state.orderNoSearch}
  1983. onChange={(e) => {
  1984. this.setState({ orderNoSearch: e.target.value });
  1985. }}
  1986. />
  1987. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1988. <RangePicker
  1989. value={[
  1990. this.state.releaseDate[0]
  1991. ? moment(this.state.releaseDate[0])
  1992. : null,
  1993. this.state.releaseDate[1]
  1994. ? moment(this.state.releaseDate[1])
  1995. : null,
  1996. ]}
  1997. onChange={(data, dataString) => {
  1998. this.setState({ releaseDate: dataString });
  1999. }}
  2000. />
  2001. <Button
  2002. type="primary"
  2003. onClick={this.search}
  2004. style={{ marginLeft: "10px", marginRight: 10 }}
  2005. >
  2006. 搜索
  2007. </Button>
  2008. <Button onClick={this.resets}>重置</Button>
  2009. </TabPane>
  2010. <TabPane tab="更改表格显示数据" key="2">
  2011. <div style={{ marginLeft: 10 }}>
  2012. <ChooseList
  2013. columns={this.state.columns}
  2014. changeFn={this.changeList}
  2015. changeList={this.state.changeList}
  2016. top={55}
  2017. margin={11}
  2018. />
  2019. </div>
  2020. </TabPane>
  2021. </Tabs>
  2022. <div className="patent-table">
  2023. <Spin spinning={this.state.loading}>
  2024. <Table
  2025. columns={
  2026. this.state.changeList
  2027. ? this.state.changeList
  2028. : this.state.columns
  2029. }
  2030. dataSource={this.state.dataSource}
  2031. rowSelection={rowSelection}
  2032. pagination={this.state.pagination}
  2033. onRowClick={this.tableRowClick}
  2034. bordered
  2035. size="small"
  2036. />
  2037. </Spin>
  2038. </div>
  2039. {this.state.visible ? <Modal
  2040. maskClosable={false}
  2041. className="customeDetails"
  2042. footer=""
  2043. title="订单详情"
  2044. width="1000px"
  2045. visible={this.state.visible}
  2046. onOk={this.visitOk}
  2047. onCancel={this.visitCancel}
  2048. >
  2049. <Form
  2050. layout="horizontal"
  2051. onSubmit={this.handleSubmit}
  2052. id="demand-form"
  2053. style={{ paddingBottom: "40px" }}
  2054. >
  2055. <Spin spinning={this.state.loading}>
  2056. <div className="clearfix">
  2057. <div style={{ position: "absolute", top: '-52px', left: '81px', zIndex: 10000 }}>
  2058. <OrderItemStatus deleteSign={this.state.deleteSign} />
  2059. </div>
  2060. <FormItem
  2061. className="half-item"
  2062. {...formItemLayout}
  2063. label="订单编号"
  2064. >
  2065. <span>{this.state.orderNo}</span>
  2066. </FormItem>
  2067. <FormItem
  2068. className="half-item"
  2069. {...formItemLayout}
  2070. label="合同编号"
  2071. >
  2072. <span>{this.state.contractNo}</span>
  2073. </FormItem>
  2074. <FormItem
  2075. className="half-item"
  2076. {...formItemLayout}
  2077. label="客户名称"
  2078. >
  2079. <span>{this.state.userName}</span>
  2080. <EnterpriseNameChange
  2081. type='journal'
  2082. style={{ marginLeft: 10 }}
  2083. enterpriseId={this.state.orderUid} />
  2084. </FormItem>
  2085. <FormItem
  2086. className="half-item"
  2087. {...formItemLayout}
  2088. label="销售类型"
  2089. >
  2090. <span>
  2091. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  2092. (salesList[this.state.updatas.salesType] || "")}
  2093. {/* {
  2094. this.state.updatas.other != null && this.state.updatas.other != "" &&
  2095. <Tooltip title={this.state.updatas.other}>
  2096. <span>
  2097. {"(" + this.state.updatas.other.toString().slice(0, 10) + (this.state.updatas.other.toString().length > 9 ? "...)" : ")")}
  2098. </span>
  2099. </Tooltip>
  2100. } */}
  2101. </span>
  2102. <UpdateSales
  2103. orderNo={this.state.orderNo}
  2104. updatas={this.state.updatas}
  2105. onRefresh={
  2106. e => {
  2107. let ups = this.state.updatas
  2108. ups.salesType = e.salesType
  2109. if (e.salesType == "3") {
  2110. ups.channelId = e.channelId
  2111. ups.other = e.other
  2112. } else if (e.salesType == "4" || e.salesType == "5") {
  2113. ups.other = e.other
  2114. }
  2115. this.setState({
  2116. updatas: ups
  2117. })
  2118. }
  2119. //this.xiangqing.bind(this, this.state.orderNo)
  2120. }
  2121. />
  2122. </FormItem>
  2123. <FormItem
  2124. className="half-item"
  2125. {...formItemLayout}
  2126. label="流程状态"
  2127. >
  2128. <span>{getProcessStatus(this.state.processStatus)}</span>
  2129. </FormItem>
  2130. <FormItem
  2131. className="half-item"
  2132. {...formItemLayout}
  2133. label="结算状态"
  2134. >
  2135. <span>
  2136. {getLiquidationStatus(this.state.liquidationStatus)}
  2137. </span>
  2138. </FormItem>
  2139. <FormItem
  2140. className="half-item"
  2141. {...formItemLayout}
  2142. label="已收款项(万元)"
  2143. >
  2144. <span>{this.state.settlementAmount}</span>
  2145. </FormItem>
  2146. <FormItem
  2147. className="half-item"
  2148. {...formItemLayout}
  2149. label="企业联系人"
  2150. >
  2151. <Input
  2152. placeholder="请输入联系人"
  2153. ref="signTotalAmount"
  2154. value={this.state.contacts}
  2155. onChange={(e) => {
  2156. this.setState({ contacts: e.target.value });
  2157. }}
  2158. style={{ width: "240px" }}
  2159. />
  2160. </FormItem>
  2161. <FormItem
  2162. className="half-item"
  2163. {...formItemLayout}
  2164. label="联系人电话"
  2165. >
  2166. <Input
  2167. placeholder="请输入联系人电话"
  2168. ref="signTotalAmount"
  2169. value={this.state.contactMobile}
  2170. onChange={(e) => {
  2171. this.setState({ contactMobile: e.target.value });
  2172. }}
  2173. style={{ width: "240px" }}
  2174. />
  2175. </FormItem>
  2176. <FormItem
  2177. className="half-item"
  2178. {...formItemLayout}
  2179. label="企业法人"
  2180. >
  2181. <Input
  2182. placeholder="请输入法人"
  2183. ref="signTotalAmount"
  2184. value={this.state.legalPerson}
  2185. onChange={(e) => {
  2186. this.setState({ legalPerson: e.target.value });
  2187. }}
  2188. style={{ width: "240px" }}
  2189. />
  2190. </FormItem>
  2191. <FormItem
  2192. className="half-item"
  2193. {...formItemLayout}
  2194. label="法人电话"
  2195. >
  2196. <Input
  2197. placeholder="请输入法人电话"
  2198. ref="signTotalAmount"
  2199. value={this.state.legalPersonTel}
  2200. onChange={(e) => {
  2201. this.setState({ legalPersonTel: e.target.value });
  2202. }}
  2203. style={{ width: "240px" }}
  2204. />
  2205. </FormItem>
  2206. <FormItem
  2207. className="half-item"
  2208. {...formItemLayout}
  2209. label={
  2210. <span>
  2211. <strong style={{ color: "#f00" }}>*</strong>
  2212. 签单金额(万元)
  2213. </span>
  2214. }
  2215. >
  2216. <Input
  2217. placeholder="签单金额"
  2218. ref="signTotalAmount"
  2219. value={this.state.totalAmount}
  2220. onChange={(e) => {
  2221. this.setState({ totalAmount: e.target.value });
  2222. }}
  2223. style={{ width: "240px" }}
  2224. />
  2225. </FormItem>
  2226. <FormItem
  2227. className="half-item"
  2228. {...formItemLayout}
  2229. label={
  2230. <span>
  2231. <strong style={{ color: "#f00" }}>*</strong>
  2232. 首付金额(万元)
  2233. </span>
  2234. }
  2235. >
  2236. <Input
  2237. placeholder="请输入实签首款金额"
  2238. ref="signFirstPayment"
  2239. value={this.state.firstAmount}
  2240. onChange={(e) => {
  2241. this.setState({ firstAmount: e.target.value });
  2242. }}
  2243. style={{ width: "240px" }}
  2244. />
  2245. </FormItem>
  2246. <FormItem
  2247. className="half-item"
  2248. {...formItemLayout}
  2249. label="特批立项"
  2250. >
  2251. <Select
  2252. placeholder="请选择客户所属类型"
  2253. style={{ width: "240px" }}
  2254. value={this.state.approval}
  2255. onChange={(e) => {
  2256. this.setState({ approval: e });
  2257. }}
  2258. >
  2259. {
  2260. [{ id: 0, name: "非特批" },
  2261. { id: 1, name: "特批" }].map(function (item) {
  2262. return (
  2263. <Select.Option key={item.id} value={item.id}>
  2264. {item.name}
  2265. </Select.Option>
  2266. );
  2267. })
  2268. }
  2269. </Select>
  2270. </FormItem>
  2271. <FormItem
  2272. className="half-item"
  2273. {...formItemLayout}
  2274. label="合同签订时间"
  2275. >
  2276. <DatePicker
  2277. style={{
  2278. marginTop: "2px",
  2279. width: "240px",
  2280. height: "27px",
  2281. }}
  2282. showTime
  2283. format="YYYY-MM-DD"
  2284. onOk={() => { }}
  2285. value={
  2286. this.state.signDate
  2287. ? moment(this.state.signDate)
  2288. : null
  2289. }
  2290. onChange={(data, dataString) => {
  2291. this.setState({ signDate: dataString });
  2292. }}
  2293. />
  2294. </FormItem>
  2295. <FormItem
  2296. className="half-item"
  2297. {...formItemLayout}
  2298. label="订单部门"
  2299. >
  2300. <Select
  2301. placeholder="请输入订单部门"
  2302. style={{ width: 240 }}
  2303. value={this.state.organizationSearch}
  2304. onChange={(e) => {
  2305. this.setState({ organizationSearch: e });
  2306. }}
  2307. >
  2308. {departmentArr.map(function (item) {
  2309. return (
  2310. <Select.Option key={item.id}>
  2311. {item.name}
  2312. </Select.Option>
  2313. );
  2314. })}
  2315. </Select>
  2316. </FormItem>
  2317. <FormItem
  2318. className="half-item"
  2319. {...formItemLayout}
  2320. label="是否外包"
  2321. >
  2322. {this.state.outsource}
  2323. </FormItem>
  2324. <div className="clearfix">
  2325. <FormItem
  2326. labelCol={{ span: 4 }}
  2327. wrapperCol={{ span: 18 }}
  2328. label={
  2329. <span>
  2330. <strong style={{ color: "#f00" }}>*</strong>
  2331. 合同扫描件
  2332. </span>
  2333. }
  2334. >
  2335. <PicturesWall
  2336. domId={'reject1'}
  2337. fileList={this.getOrgCodeUrl}
  2338. pictureUrl={this.state.orgCodeUrl}
  2339. />
  2340. <p>图片建议:要清晰。</p>
  2341. </FormItem>
  2342. <FormItem
  2343. labelCol={{ span: 4 }}
  2344. wrapperCol={{ span: 18 }}
  2345. label={
  2346. <span>
  2347. 补充协议
  2348. </span>
  2349. }
  2350. >
  2351. <PicturesWall
  2352. domId={'reject2'}
  2353. fileList={this.getReplenishUrl}
  2354. pictureUrl={this.state.replenishUrl}
  2355. />
  2356. <p>图片建议:要清晰。</p>
  2357. <Button
  2358. style={{
  2359. float: "right",
  2360. marginRight: "140px",
  2361. marginTop: "20px",
  2362. }}
  2363. onClick={this.getOrderLog}
  2364. >
  2365. 查看订单 日志
  2366. </Button>
  2367. </FormItem>
  2368. </div>
  2369. {/* 服务内容 */}
  2370. {/* <ContentUrl
  2371. processStatus={this.state.processStatus}
  2372. domId={"rejectContent"}
  2373. contentUrl={this.state.contentUrl}
  2374. getContentUrl={this.getContentUrl}
  2375. imgId={"rejectImg1"}
  2376. /> */}
  2377. <div className="clearfix">
  2378. <FormItem
  2379. labelCol={{ span: 4 }}
  2380. wrapperCol={{ span: 18 }}
  2381. label={
  2382. <span>
  2383. <strong style={{ color: "#f00" }}>*</strong>
  2384. 服务内容
  2385. </span>
  2386. }
  2387. >
  2388. <PicturesWall
  2389. domId={'rejectContent'}
  2390. fileList={this.getContentUrl}
  2391. pictureUrl={this.state.contentUrl}
  2392. />
  2393. <p><span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  2394. </FormItem>
  2395. <FormItem
  2396. labelCol={{ span: 4 }}
  2397. wrapperCol={{ span: 16 }}
  2398. label={
  2399. <span>
  2400. <strong style={{ color: "#f00" }}>*</strong>
  2401. 订单留言
  2402. </span>
  2403. }
  2404. >
  2405. <Input
  2406. type="textarea"
  2407. placeholder="请输入订单留言"
  2408. rows={4}
  2409. value={this.state.orderRemarks}
  2410. onChange={(e) => {
  2411. this.setState({ orderRemarks: e.target.value });
  2412. }}
  2413. />
  2414. </FormItem>
  2415. </div>
  2416. <div className="clearfix">
  2417. <FormItem
  2418. className="half-item"
  2419. {...formItemLayout}
  2420. label="订单负责人"
  2421. >
  2422. <span>{this.state.salesmanName}</span>
  2423. </FormItem>
  2424. <FormItem
  2425. className="half-item"
  2426. {...formItemLayout}
  2427. label="订单负责人电话"
  2428. >
  2429. <span>{this.state.salesmanMobile}</span>
  2430. </FormItem>
  2431. </div>
  2432. <div className="clearfix">
  2433. <FormItem
  2434. className="half-item"
  2435. {...formItemLayout}
  2436. label="当前财务负责人"
  2437. >
  2438. <span>{this.state.nowFinance}</span>
  2439. </FormItem>
  2440. <FormItem
  2441. className="half-item"
  2442. {...formItemLayout}
  2443. label="当前财务负责人电话"
  2444. >
  2445. <span>{this.state.nowFinanceMobile}</span>
  2446. </FormItem>
  2447. </div>
  2448. <div className="clearfix">
  2449. <FormItem
  2450. className="half-item"
  2451. {...formItemLayout}
  2452. style={{ opacity: ".5" }}
  2453. label="原订单负责人"
  2454. >
  2455. <span>{this.state.oldSalesmanName}</span>
  2456. </FormItem>
  2457. <FormItem
  2458. className="half-item"
  2459. {...formItemLayout}
  2460. style={{ opacity: ".5" }}
  2461. label="原订单负责人电话"
  2462. >
  2463. <span>{this.state.oldSalesmanMobile}</span>
  2464. </FormItem>
  2465. </div>
  2466. <div className="clearfix">
  2467. <FormItem
  2468. className="half-item"
  2469. style={{ opacity: ".5" }}
  2470. {...formItemLayout}
  2471. label="实际财务操作人"
  2472. >
  2473. <span>{this.state.financeName}</span>
  2474. </FormItem>
  2475. <FormItem
  2476. className="half-item"
  2477. {...formItemLayout}
  2478. style={{ opacity: ".5" }}
  2479. label="实际财务操作人电话"
  2480. >
  2481. <span>{this.state.financeMobile}</span>
  2482. </FormItem>
  2483. </div>
  2484. <div className="clearfix">
  2485. <FormItem
  2486. className="half-item"
  2487. {...formItemLayout}
  2488. label="驳回人"
  2489. >
  2490. <span>{this.state.initiateName}</span>
  2491. </FormItem>
  2492. <FormItem
  2493. className="half-item"
  2494. {...formItemLayout}
  2495. label="驳回时间"
  2496. >
  2497. <span>{this.state.backDate}</span>
  2498. </FormItem>
  2499. </div>
  2500. <div className="clearfix">
  2501. <FormItem
  2502. labelCol={{ span: 4 }}
  2503. wrapperCol={{ span: 16 }}
  2504. label="驳回原因"
  2505. >
  2506. <span>{this.state.reason}</span>
  2507. </FormItem>
  2508. </div>
  2509. {/* 协单人员 */}
  2510. <OrderCoor orderNo={this.state.orderNos} processStatus={this.state.processStatus} orderStatus={this.state.orderStatus} />
  2511. <div>
  2512. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2513. 项目业务
  2514. </span>
  2515. <Button
  2516. type="primary"
  2517. onClick={this.addDetailed}
  2518. style={{
  2519. float: "right",
  2520. marginRight: "50px",
  2521. marginBottom: "15px",
  2522. }}
  2523. >
  2524. 添加项目明细
  2525. </Button>
  2526. </div>
  2527. <div className="patent-table">
  2528. <Spin spinning={this.state.loading}>
  2529. <Table
  2530. columns={this.state.columnsX}
  2531. dataSource={this.state.dataSourceX}
  2532. pagination={this.state.paginations}
  2533. onRowClick={this.tableRowClickX}
  2534. bordered
  2535. size="small"
  2536. />
  2537. </Spin>
  2538. </div>
  2539. <div
  2540. style={{ display: cuiDataList.length ? "block" : "none" }}
  2541. >
  2542. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2543. 旧催款节点
  2544. </span>
  2545. <Button
  2546. type="primary"
  2547. // onClick={this.addcontact}
  2548. disabled
  2549. onClick={(e) => {
  2550. cuiDataList.length
  2551. ? this.addcontact()
  2552. : this.addcontactNew();
  2553. }}
  2554. style={{
  2555. float: "right",
  2556. marginRight: "50px",
  2557. marginBottom: "15px",
  2558. }}
  2559. >
  2560. 添加催款节点
  2561. </Button>
  2562. </div>
  2563. <div
  2564. className="clearfix"
  2565. style={{ display: cuiDataList.length ? "block" : "none" }}
  2566. >
  2567. <Spin spinning={this.state.loading}>
  2568. <Form layout="horizontal" id="demand-form">
  2569. <Table
  2570. pagination={false}
  2571. columns={this.state.ContactsLists}
  2572. dataSource={this.state.contactList}
  2573. bordered
  2574. size="small"
  2575. scroll={{ x: "max-content", y: 0 }}
  2576. />
  2577. <Col
  2578. span={24}
  2579. offset={9}
  2580. style={{ marginTop: "15px" }}
  2581. ></Col>
  2582. </Form>
  2583. </Spin>
  2584. </div>
  2585. <div>
  2586. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2587. 新催款节点
  2588. </span>
  2589. <span
  2590. style={{
  2591. display: cuiDataList.length ? "none" : "inline-block",
  2592. marginLeft: 10,
  2593. color: "red",
  2594. }}
  2595. >
  2596. 金额总计(万元): {this.state.totalCui}
  2597. </span>
  2598. <Button
  2599. type="primary"
  2600. disabled={
  2601. cuiDataList.length || this.state.addFlag
  2602. ? true
  2603. : false
  2604. }
  2605. // onClick={this.addcontact}
  2606. onClick={(e) => {
  2607. this.setState({ addFlag: true });
  2608. this.addcontactNew();
  2609. }}
  2610. style={{
  2611. float: "right",
  2612. marginRight: "50px",
  2613. marginBottom: "15px",
  2614. }}
  2615. >
  2616. 添加催款节点
  2617. </Button>
  2618. </div>
  2619. <div className="clearfix">
  2620. <Spin spinning={this.state.loading}>
  2621. <Form layout="horizontal" id="demand-form">
  2622. <Table
  2623. pagination={false}
  2624. columns={this.state.ContactsListsNew}
  2625. dataSource={this.state.contactListNew}
  2626. scroll={{ x: "max-content", y: 0 }}
  2627. bordered
  2628. size="small"
  2629. />
  2630. <Col
  2631. span={24}
  2632. offset={9}
  2633. style={{ marginTop: "15px" }}
  2634. />
  2635. </Form>
  2636. </Spin>
  2637. </div>
  2638. <div className="addSave" style={{ marginTop: "15px" }}>
  2639. <Button
  2640. className="cancel"
  2641. type="primary"
  2642. onClick={this.examOk}
  2643. style={{ marginLeft: "200px" }}
  2644. htmlType="submit"
  2645. loading={this.state.flag}
  2646. >
  2647. 重新提交
  2648. </Button>
  2649. <Popconfirm
  2650. title="请确认您是否作废此订单??"
  2651. onConfirm={(e) => {
  2652. this.examOks()
  2653. }}
  2654. okText="确认"
  2655. cancelText="取消"
  2656. >
  2657. <Button
  2658. className="cancel"
  2659. type="danger"
  2660. // onClick={this.examOks}
  2661. style={{ marginLeft: "50px" }}
  2662. loading={this.state.flag}
  2663. >
  2664. 订单作废
  2665. </Button>
  2666. </Popconfirm>
  2667. <Button
  2668. className="cancel"
  2669. type="ghost"
  2670. onClick={this.visitCancel}
  2671. style={{ marginLeft: "50px" }}
  2672. >
  2673. 取消
  2674. </Button>
  2675. </div>
  2676. </div>
  2677. </Spin>
  2678. </Form>
  2679. </Modal> : <div />}
  2680. {/* <Modal
  2681. visible={this.state.rizhivisible}
  2682. className="admin-desc-content"
  2683. width="800px"
  2684. maskClosable={false}
  2685. title="订单日志"
  2686. footer={null}
  2687. onCancel={this.closeOrderLog}
  2688. >
  2689. <div className="patent-table">
  2690. <Spin spinning={this.state.loading}>
  2691. <Table
  2692. columns={this.state.columnsrizhi}
  2693. dataSource={this.state.dataSourcerizhi}
  2694. pagination={false}
  2695. />
  2696. </Spin>
  2697. </div>
  2698. </Modal> */}
  2699. <OrderRiZi
  2700. dataSourcerizhi={this.state.dataSourcerizhi}
  2701. closeOrderLog={this.closeOrderLog}
  2702. visible={this.state.rizhivisible}
  2703. loading={this.state.loading}
  2704. />
  2705. </div>
  2706. {this.state.projectOperationVisible ? <ProjectOperation
  2707. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  2708. orderNo={this.state.orderNo}
  2709. visible={this.state.projectOperationVisible}
  2710. dataInfor={this.state.dataInfor}
  2711. onCancel={this.nextCancel}
  2712. /> : null}
  2713. </div>
  2714. );
  2715. },
  2716. })
  2717. );
  2718. export default IntentionCustomer;