reject.jsx 96 KB

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