reject.jsx 84 KB

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