addorders.js 97 KB

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