reject.jsx 96 KB

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