reject.jsx 87 KB

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