reject.jsx 91 KB

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