reject.jsx 92 KB

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