reject.jsx 84 KB

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