reject.jsx 92 KB

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