reject.jsx 96 KB

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