reject.jsx 86 KB

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