reject.jsx 100 KB

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