reject.jsx 98 KB

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