reject.jsx 98 KB

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