changeApply.js 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354
  1. import React, { Component } from "react";
  2. import {
  3. Form,
  4. Select,
  5. Input,
  6. Button,
  7. message,
  8. Spin,
  9. Tag,
  10. Table,
  11. Col,
  12. Popconfirm,
  13. Modal,
  14. AutoComplete,
  15. } from "antd";
  16. import $ from "jquery/src/ajax";
  17. import ResolutionDetail from "@/resolutionDetail";
  18. import PicturesWall from "./picturesWall";
  19. import Rizhi from "./rizhi";
  20. import {
  21. cuiJieDian,
  22. orderTypes,
  23. customerType,
  24. jiedian,
  25. tepi,
  26. boutique
  27. } from "@/dataDic.js";
  28. import { moneyVerify } from "@/tools.js"
  29. const FormItem = Form.Item;
  30. const confirm = Modal.confirm;
  31. const Option = AutoComplete.Option;
  32. const formItemLayout = {
  33. labelCol: { span: 8 },
  34. wrapperCol: { span: 14 }
  35. };
  36. class ChangeApply extends Component {
  37. constructor(props) {
  38. super(props);
  39. this.state = {
  40. data: {},
  41. voucherUrl: [],
  42. dataSource: [],
  43. cuiDataSource: [],
  44. loading: false,
  45. changeCuiList: [
  46. {
  47. title: "变更状态",
  48. dataIndex: "type",
  49. key: "type",
  50. render: (text) => {
  51. let str = "";
  52. let color = "";
  53. if (text == 1) {
  54. str = "增";
  55. color = "#87d068";
  56. } else if (text == 2) {
  57. str = "改";
  58. color = "#108ee9";
  59. } else if (text == 3) {
  60. str = "删";
  61. color = "#f50";
  62. }
  63. return (
  64. <Tag
  65. color={color}
  66. style={{ display: text == 0 ? "none" : "inline-block" }}
  67. >
  68. {str}
  69. </Tag>
  70. );
  71. },
  72. },
  73. {
  74. title: "项目名称",
  75. dataIndex: "commodityName",
  76. key: "commodityName",
  77. render: (text, record, index) => {
  78. let dataArr = this.state.proDataSource || [];
  79. if (text) {
  80. if (record.ctid) {
  81. return <span>{text + "-" + record.ctid}</span>;
  82. } else {
  83. let tid = record.tid;
  84. let ctid = "";
  85. dataArr.forEach((item, index) => {
  86. if (item.tid == tid) {
  87. ctid = item.id;
  88. }
  89. });
  90. return <span>{text + "-" + ctid}</span>;
  91. }
  92. }
  93. return (
  94. <Select
  95. placeholder="请选择名称"
  96. style={{ width: "150px" }}
  97. disabled={this.state.getLoad && record.sortName ? true : false}
  98. onChange={(e) => {
  99. let num = e.lastIndexOf("-");
  100. let ctid = e.substr(num + 1);
  101. record.sortName = e.substring(0, num);
  102. dataArr.forEach((item) => {
  103. if (
  104. item.commodityName == record.sortName &&
  105. ctid == item.id
  106. ) {
  107. record.cname = item.cname;
  108. record.ctid = item.id;
  109. record.isSave = true;
  110. record.sort = item.cSort;
  111. cuiJieDian.forEach((item) => {
  112. if (item.value == record.sort) {
  113. record.arr = item.children;
  114. let yearFlag = true;
  115. if (record.sort == 6) {
  116. yearFlag = false;
  117. }
  118. this.setState({
  119. getLoad: true,
  120. yearFlag,
  121. });
  122. }
  123. });
  124. }
  125. });
  126. }}
  127. >
  128. {dataArr.map((item, index) => {
  129. if (item.type == 3) {
  130. return (
  131. <Select.Option
  132. key={item.id}
  133. value={item.commodityName + "-" + item.id}
  134. disabled
  135. >
  136. {item.commodityName + "-" + item.id}
  137. </Select.Option>
  138. );
  139. } else {
  140. return (
  141. <Select.Option
  142. key={item.id}
  143. value={item.commodityName + "-" + item.id}
  144. >
  145. {item.commodityName + "-" + item.id}
  146. </Select.Option>
  147. );
  148. }
  149. })}
  150. </Select>
  151. );
  152. },
  153. },
  154. {
  155. title: "项目分类",
  156. dataIndex: "projectType",
  157. key: "projectType",
  158. render: (text, record) => {
  159. if (text) {
  160. let arr = this.state.proDataSource || [];
  161. let str = "";
  162. for (let i = 0; i < arr.length; i++) {
  163. if (this.state.proDataSource[i].cSort == text) {
  164. str = this.state.proDataSource[i].cname;
  165. return <span>{str}</span>;
  166. }
  167. }
  168. }
  169. if (this.state.getLoad) {
  170. return (
  171. <Select
  172. style={{ width: "150px" }}
  173. placeholder="请选择分类"
  174. value={record.cname}
  175. >
  176. <Select.Option key={record.sort} value={record.cname}>
  177. {record.cname}
  178. </Select.Option>
  179. </Select>
  180. );
  181. } else {
  182. return (
  183. <Select style={{ width: "150px" }} placeholder="请选择分类">
  184. <Select.Option key={record.sort} value={record.cname}>
  185. {record.cname}
  186. </Select.Option>
  187. </Select>
  188. );
  189. }
  190. },
  191. },
  192. {
  193. title: "催款科目",
  194. dataIndex: "dunTypeName",
  195. key: "dunTypeName",
  196. render: (text, record) => {
  197. if (text) {
  198. return <span>{text}</span>;
  199. }
  200. if (this.state.getLoad) {
  201. let arr = record.arr || [];
  202. return (
  203. <Select
  204. style={{ width: "150px" }}
  205. placeholder="请选择分类"
  206. onChange={(e) => {
  207. record.dunType = e;
  208. if (e != 1) {
  209. this.setState({
  210. timeFlag: true,
  211. });
  212. } else {
  213. this.setState({
  214. timeFlag: false,
  215. });
  216. }
  217. if (e == 1 && record.sort == 6) {
  218. this.setState({
  219. yearFlag: true,
  220. });
  221. } else if (e != 1 && record.sort == 6) {
  222. this.setState({
  223. yearFlag: false,
  224. });
  225. }
  226. if (record.sort == 3 && e == 3) {
  227. this.setState({
  228. boFlag: true,
  229. });
  230. } else {
  231. this.setState({
  232. boFlag: false,
  233. });
  234. }
  235. }}
  236. >
  237. {arr.map((item) => {
  238. record;
  239. return (
  240. <Select.Option key={item.value} value={item.value}>
  241. {item.key}
  242. </Select.Option>
  243. );
  244. })}
  245. </Select>
  246. );
  247. } else {
  248. return (
  249. <Select style={{ width: "150px" }} placeholder="请选择分类">
  250. <Select.Option key={0} value={"请选择上一项"}></Select.Option>
  251. </Select>
  252. );
  253. }
  254. },
  255. },
  256. {
  257. title: "首付时间(特批需选择时间)",
  258. dataIndex: "waitDay",
  259. key: "waitDay",
  260. render: (text, record) => {
  261. if (record.dunTypeName) {
  262. if (text == 0) {
  263. var str = "当天";
  264. } else if (!text) {
  265. var str = "";
  266. } else {
  267. var str = text + "天";
  268. }
  269. return <span>{str}</span>;
  270. }
  271. return (
  272. <Select
  273. placeholder="请选择时间"
  274. style={{ width: "150px" }}
  275. disabled={
  276. this.state.approval != 0 && !this.state.timeFlag
  277. ? false
  278. : true
  279. }
  280. onChange={(e) => {
  281. record.waitDay = e;
  282. }}
  283. >
  284. <Select.Option key={0}>当天</Select.Option>
  285. <Select.Option key={3}>3天</Select.Option>
  286. <Select.Option key={5}>5天</Select.Option>
  287. <Select.Option key={7}>7天</Select.Option>
  288. <Select.Option key={15}>15天</Select.Option>
  289. </Select>
  290. );
  291. },
  292. },
  293. {
  294. title: "金额(万元)",
  295. dataIndex: "money",
  296. key: "money",
  297. render: (text, record) => {
  298. if (record.dunTypeName) {
  299. if (record.appropriationRatio && !record.money) {
  300. return <span>{record.appropriationRatio}(拨款比例)</span>;
  301. } else if (record.appropriationRatio && record.money) {
  302. return (
  303. <span>
  304. {text}(比例:{record.appropriationRatio})
  305. </span>
  306. );
  307. } else {
  308. return <span>{text}</span>;
  309. }
  310. }
  311. if (this.state.boFlag) {
  312. return (
  313. <div>
  314. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  315. <Select
  316. placeholder="选择"
  317. defaultValue={"金额"}
  318. onChange={(e) => {
  319. record.boStatus = e;
  320. }}
  321. >
  322. <Select.Option key={true}>比例</Select.Option>
  323. <Select.Option key={false}>金额</Select.Option>
  324. </Select>
  325. </div>
  326. <div style={{ float: "right" }}>
  327. <Input
  328. value={record.money}
  329. placeholder="请根据左侧类型填写"
  330. key={record.id}
  331. required="required"
  332. onChange={(e) => {
  333. record.money = e.target.value;
  334. this.setState({
  335. contactList: this.state.contactList,
  336. });
  337. }}
  338. style={{ width: "120px" }}
  339. />
  340. </div>
  341. </div>
  342. );
  343. } else {
  344. return (
  345. <div>
  346. <Input
  347. value={record.money}
  348. placeholder="请输入金额(必填项)"
  349. key={record.id}
  350. required="required"
  351. onChange={(e) => {
  352. record.money = e.target.value;
  353. this.setState({ contactList: this.state.contactList });
  354. }}
  355. style={{ width: "120px" }}
  356. />
  357. </div>
  358. );
  359. }
  360. },
  361. },
  362. {
  363. title: "服务年限",
  364. dataIndex: "startDate",
  365. key: "startDate",
  366. render: (text, record) => {
  367. if (record.dunTypeName) {
  368. return <span>{text}</span>;
  369. }
  370. return (
  371. <Select
  372. placeholder="请选择年限"
  373. style={{ width: "150px" }}
  374. disabled={this.state.yearFlag ? true : false}
  375. onChange={(e) => {
  376. record.effectiveCount = e;
  377. }}
  378. >
  379. {/* <Select.Option key={null}>无</Select.Option> */}
  380. <Select.Option key={1}>一年</Select.Option>
  381. <Select.Option key={3}>两年</Select.Option>
  382. <Select.Option key={5}>三年</Select.Option>
  383. <Select.Option key={7}>四年</Select.Option>
  384. <Select.Option key={9}>五年</Select.Option>
  385. </Select>
  386. );
  387. },
  388. },
  389. {
  390. title: "催款状态",
  391. dataIndex: "status",
  392. key: "status",
  393. render: (text) => {
  394. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  395. },
  396. },
  397. {
  398. title: "操作",
  399. dataIndex: "dels",
  400. key: "dels",
  401. render: (text, record, index) => {
  402. return (
  403. <div>
  404. <Popconfirm
  405. title="是否删除?"
  406. onConfirm={() => {
  407. this.changeDeleteCui(record);
  408. }}
  409. okText="删除"
  410. cancelText="不删除"
  411. >
  412. <Button
  413. disabled={this.state.listCuiFlag}
  414. style={{
  415. marginRight: "10px",
  416. display: this.state.displayList ? "none" : "block",
  417. }}
  418. >
  419. 删除
  420. </Button>
  421. </Popconfirm>
  422. {record.isSave ? (
  423. <Button
  424. type="primary"
  425. style={{ marginTop: 5 }}
  426. onClick={(e) => {
  427. this.changeSaveCui(record);
  428. }}
  429. >
  430. 保存
  431. </Button>
  432. ) : (
  433. ""
  434. )}
  435. </div>
  436. );
  437. },
  438. },
  439. ],
  440. resVisible: false,
  441. proColumns: [
  442. {
  443. title: "变更状态",
  444. dataIndex: "type",
  445. key: "type",
  446. render: (text, record) => {
  447. let str = "";
  448. let color = "";
  449. if (text == 1) {
  450. str = "增";
  451. color = "#87d068";
  452. } else if (text == 2) {
  453. str = "改";
  454. color = "#108ee9";
  455. } else if (text == 3) {
  456. str = "删";
  457. color = "#f50";
  458. }
  459. return (
  460. <span>
  461. <Tag
  462. color={color}
  463. style={{ display: text == 0 ? "none" : "inline-block" }}
  464. >
  465. {str}
  466. </Tag>
  467. {record.splitStatus == 1 ? (
  468. <Tag
  469. color="#108ee9"
  470. >
  471. 父项目
  472. </Tag>
  473. ) : (
  474. ""
  475. )}
  476. {record.splitStatus == 2 ? (
  477. <Tag
  478. color="#108ee9"
  479. >
  480. 子项目
  481. </Tag>
  482. ) : (
  483. ""
  484. )}
  485. </span>
  486. );
  487. },
  488. },
  489. {
  490. title: "业务项目名称",
  491. dataIndex: "commodityName",
  492. key: "commodityName",
  493. render: (text, record) => {
  494. return text + "-" + record.id;
  495. },
  496. },
  497. {
  498. title: "项目类别",
  499. dataIndex: "cname",
  500. key: "cname",
  501. },
  502. {
  503. title: "项目数量",
  504. dataIndex: "commodityQuantity",
  505. key: "commodityQuantity",
  506. },
  507. {
  508. title: "金额(万元)",
  509. dataIndex: "commodityPrice",
  510. key: "commodityPrice",
  511. render: (text, record) => {
  512. if (record.splitStatus == 2) {
  513. return "/";
  514. } else {
  515. return text;
  516. }
  517. },
  518. },
  519. {
  520. title: "主要项目",
  521. dataIndex: "main",
  522. key: "main",
  523. render: (text) => {
  524. return text ? "是" : "否";
  525. },
  526. },
  527. {
  528. title: "项目负责人",
  529. dataIndex: "receiverName",
  530. key: "receiverName",
  531. },
  532. {
  533. title: "项目说明",
  534. dataIndex: "taskComment",
  535. key: "taskComment",
  536. render: (text) => {
  537. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  538. },
  539. },
  540. {
  541. title: "操作",
  542. dataIndex: "ABC",
  543. key: "ABC",
  544. render: (text, record) => {
  545. return (
  546. <div>
  547. <Button
  548. onClick={(e) => {
  549. e.stopPropagation();
  550. this.showConfirm(this.changeDeletePro, record);
  551. }}
  552. disabled={this.state.listFlag}
  553. style={{
  554. display: this.state.displayList ? "none" : "block",
  555. }}
  556. >
  557. 删除
  558. </Button>
  559. </div>
  560. );
  561. },
  562. },
  563. ],
  564. };
  565. this.departmentList = this.departmentList.bind(this);
  566. this.changeApply = this.changeApply.bind(this);
  567. this.getVoucherUrl = this.getVoucherUrl.bind(this);
  568. this.proList = this.proList.bind(this);
  569. this.cuiList = this.cuiList.bind(this);
  570. this.showConfirm = this.showConfirm.bind(this);
  571. this.showConfirmChange = this.showConfirmChange.bind(this);
  572. this.changeAddPro = this.changeAddPro.bind(this);
  573. this.changeProSubmit = this.changeProSubmit.bind(this);
  574. this.changeDeletePro = this.changeDeletePro.bind(this);
  575. this.changeAddCui = this.changeAddCui.bind(this);
  576. this.changeDeleteCui = this.changeDeleteCui.bind(this);
  577. this.changeSaveCui = this.changeSaveCui.bind(this);
  578. this.submitChange = this.submitChange.bind(this);
  579. this.editCui = this.editCui.bind(this);
  580. this.editPro = this.editPro.bind(this);
  581. this.submitEditCui = this.submitEditCui.bind(this);
  582. this.submitEditPro = this.submitEditPro.bind(this);
  583. this.nextCancel = this.nextCancel.bind(this);
  584. this.customerChange = this.customerChange.bind(this);
  585. this.selectAuto = this.selectAuto.bind(this);
  586. this.supervisor = this.supervisor.bind(this);
  587. this.httpChange = this.httpChange.bind(this);
  588. this.showRes = this.showRes.bind(this);
  589. this.resCancel = this.resCancel.bind(this);
  590. this.deleteChange = this.deleteChange.bind(this);
  591. this.not = this.not.bind(this);
  592. }
  593. componentDidMount() {
  594. }
  595. nextCancel() {
  596. this.setState({
  597. addnextVisible: false,
  598. changeVisible: false
  599. });
  600. }
  601. showConfirm(fn, record) {
  602. confirm({
  603. title: "确定删除此项目吗?",
  604. content: (
  605. <span style={{ color: "red" }}>
  606. 删除后会将该项目下的所有催款节点自动清除!!!
  607. </span>
  608. ),
  609. onOk() {
  610. fn(record);
  611. },
  612. onCancel() { }
  613. });
  614. }
  615. showConfirmChange(fn, record) {
  616. confirm({
  617. title: "确定取消本次变更吗?",
  618. content: (
  619. <span style={{ color: "red" }}>
  620. 取消后本次变更将作废!!!
  621. </span>
  622. ),
  623. onOk() {
  624. fn();
  625. },
  626. onCancel() { }
  627. });
  628. }
  629. //服务值改变时请求客户名称
  630. httpChange(e) {
  631. this.state.gid = "";
  632. if (e.length >= 1) {
  633. this.supervisor(e, false);
  634. }
  635. this.setState({
  636. commodityName: e
  637. });
  638. }
  639. //客户名称自动补全
  640. customerChange(e) {
  641. if (this.state.customType) {
  642. this.state.autoId = "";
  643. if (e.length >= 2) {
  644. this.supervisor(e, true);
  645. }
  646. this.setState({
  647. customerName: e
  648. });
  649. } else {
  650. this.setState({
  651. customerName: ""
  652. });
  653. message.warning("客户所属类型必须指定");
  654. }
  655. }
  656. //上级主管输入框失去焦点是判断客户是否存在
  657. selectAuto(value) {
  658. let kid = [];
  659. let fwList = this.state.customerArr;
  660. fwList.map(function (item) {
  661. if (value == item.bname) {
  662. kid = item;
  663. }
  664. });
  665. this.setState({
  666. commodityName: value,
  667. gid: kid.id,
  668. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  669. commodityFirstPayment:
  670. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  671. });
  672. }
  673. //加载(自动补全)
  674. supervisor(e, state) {
  675. //客户名称与服务名称自动补全
  676. let api = state
  677. ? "/api/admin/customer/getCustomerByName"
  678. : "/api/admin/order/getBusinessProjectByName";
  679. $.ajax({
  680. method: "get",
  681. dataType: "json",
  682. crossDomain: false,
  683. url: globalConfig.context + api,
  684. data: state
  685. ? {
  686. name: e,
  687. type: this.state.customType
  688. }
  689. : {
  690. businessName: e
  691. },
  692. success: function (data) {
  693. let thedata = data.data;
  694. if (!thedata) {
  695. if (data.error && data.error.length) {
  696. message.warning(data.error[0].message);
  697. }
  698. thedata = {};
  699. }
  700. this.setState({
  701. states: state,
  702. customerArr: thedata
  703. });
  704. }.bind(this)
  705. }).always(
  706. function () {
  707. this.setState({
  708. loading: false
  709. });
  710. }.bind(this)
  711. );
  712. }
  713. //变更申请
  714. changeApply() {
  715. if (moneyVerify(this.state.data.totalAmount)) {
  716. return false;
  717. }
  718. if (moneyVerify(this.state.data.changeAmount)) {
  719. return false;
  720. }
  721. if (
  722. this.state.data.type == 0 ||
  723. this.state.data.type == 1 ||
  724. this.state.data.type == 3
  725. ) {
  726. if (this.state.data.settlementAmount < this.state.data.changeAmount) {
  727. message.warning("退款金额大于已收款金额");
  728. return;
  729. }
  730. }
  731. this.setState({
  732. loading: true
  733. })
  734. let theorgCodeUrl = [];
  735. if (this.state.voucherUrl.length) {
  736. let picArr = [];
  737. this.state.voucherUrl.map(function (item) {
  738. if (item.response && item.response.data && item.response.data.length) {
  739. picArr.push(item.response.data);
  740. }
  741. });
  742. theorgCodeUrl = picArr.join(",");
  743. }
  744. Object.assign(this.state.data, {
  745. id: this.props.orderData.id, //订单编号
  746. changeType: 0,
  747. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  748. consultantExamine: [],
  749. managerExamine: []
  750. });
  751. $.ajax({
  752. method: "post",
  753. dataType: "json",
  754. crossDomain: false,
  755. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  756. data: this.state.data
  757. }).done(
  758. function (data) {
  759. if (!data.error.length) {
  760. message.success("变更成功!");
  761. this.props.onCancel();
  762. this.setState({
  763. loading: false
  764. });
  765. } else {
  766. message.warning(data.error[0].message);
  767. this.setState({
  768. loading: false
  769. });
  770. }
  771. }.bind(this)
  772. );
  773. }
  774. // componentDidMount() {
  775. // window.setTimeout(() => {
  776. // this.loadDataChange();
  777. // }, 10);
  778. // }
  779. // loadDataChange() {
  780. // console.log(this.props);
  781. // $.ajax({
  782. // method: "get",
  783. // dataType: "json",
  784. // crossDomain: false,
  785. // url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  786. // data: {
  787. // changeId: this.props.data.id
  788. // },
  789. // success: function(data) {
  790. // if (data.error.length || data.data.list == "") {
  791. // if (data.error && data.error.length) {
  792. // message.warning(data.error[0].message);
  793. // }
  794. // } else {
  795. // this.setState({
  796. // dataSource: data.data
  797. // });
  798. // }
  799. // }.bind(this)
  800. // });
  801. // }
  802. // 拆分详细
  803. showRes(record) {
  804. this.setState({
  805. resVisible: true,
  806. resRecord: record
  807. })
  808. }
  809. resCancel() {
  810. this.setState({
  811. resVisible: false
  812. })
  813. }
  814. cuiList(id) {
  815. this.setState({
  816. loading: true,
  817. });
  818. $.ajax({
  819. method: "get",
  820. dataType: "json",
  821. crossDomain: false,
  822. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  823. data: {
  824. id: id || this.state.data.id
  825. },
  826. success: function (data) {
  827. this.setState({
  828. cuiDataSource: data.data,
  829. loading: false,
  830. });
  831. if (data.data && data.data.length) {
  832. if (id) {
  833. this.setState({
  834. listCuiFlag: true,
  835. });
  836. }
  837. this.setState({
  838. cuiDataSource: data.data,
  839. });
  840. this.setState({
  841. loading: false,
  842. });
  843. } else if (data.error && data.error.length) {
  844. message.warning(data.error[0].message);
  845. this.setState({
  846. loading: false,
  847. });
  848. }
  849. }.bind(this)
  850. });
  851. }
  852. proList(id) {
  853. this.setState({
  854. loading: true
  855. })
  856. $.ajax({
  857. method: "get",
  858. dataType: "json",
  859. crossDomain: false,
  860. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  861. data: {
  862. id: id || this.state.data.id
  863. },
  864. success: function (data) {
  865. this.setState({
  866. loading:false
  867. })
  868. if (data.data && data.data.length) {
  869. if (id) {
  870. this.setState({
  871. listFlag: true
  872. });
  873. }
  874. data.data.forEach(item => {
  875. item.key = item.id
  876. })
  877. this.setState({
  878. proDataSource: data.data
  879. });
  880. this.setState({
  881. loading: false,
  882. });
  883. }else if(data.error && data.error.length) {
  884. message.warning(data.error[0].message)
  885. this.setState({
  886. loading: false,
  887. });
  888. }
  889. }.bind(this)
  890. });
  891. }
  892. departmentList() {
  893. $.ajax({
  894. method: "get",
  895. dataType: "json",
  896. crossDomain: false,
  897. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  898. data: {},
  899. success: function (data) {
  900. let thedata = data.data;
  901. let theArr = [];
  902. if (!thedata) {
  903. if (data.error && data.error.length) {
  904. message.warning(data.error[0].message);
  905. }
  906. } else {
  907. thedata.map(function (item, index) {
  908. theArr.push({
  909. key: index,
  910. name: item.name,
  911. id: item.id
  912. });
  913. });
  914. }
  915. this.setState({
  916. departmentArr: theArr
  917. });
  918. }.bind(this)
  919. });
  920. }
  921. getVoucherUrl(e) {
  922. this.setState({
  923. voucherUrl: e
  924. });
  925. }
  926. changeAddPro() {
  927. this.setState({
  928. changeVisible: true,
  929. gid: "",
  930. customerArr: [],
  931. commodityName: "",
  932. commodityQuantity: "",
  933. commodityId: "",
  934. taskComment: "",
  935. main: undefined,
  936. commodityPrice: ""
  937. });
  938. }
  939. changeProSubmit() {
  940. if (this.state.gid == undefined || !this.state.gid) {
  941. message.warning("服务名称不匹配!");
  942. return false;
  943. }
  944. if (!this.state.commodityPrice) {
  945. message.warning("请输入金额!");
  946. this.refs.commodityPrice.focus();
  947. return false;
  948. }
  949. let reg = /^([0]|[1-9][0-9]*)$/;
  950. if (
  951. !this.state.commodityQuantity ||
  952. !reg.test(this.state.commodityQuantity)
  953. ) {
  954. message.warning("请输入正确商品数量!");
  955. this.refs.commodityQuantity.focus();
  956. return false;
  957. }
  958. if (!this.state.main) {
  959. message.warning("请选择是否为主要项目!");
  960. this.refs.commodityQuantity.focus();
  961. return false;
  962. }
  963. this.setState({
  964. loading: true
  965. });
  966. let type = 0;
  967. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  968. type = 1;
  969. }
  970. $.ajax({
  971. method: "post",
  972. dataType: "json",
  973. crossDomain: false,
  974. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  975. data: {
  976. commodityId: this.state.gid, //商品ID
  977. orderNo: this.state.data.orderNo, //订单编号
  978. commodityName: this.state.commodityName, //商品名称
  979. commodityQuantity: this.state.commodityQuantity, //商品数量
  980. commodityPrice: this.state.commodityPrice, //签单总价
  981. taskComment: this.state.taskComment, //服务说明
  982. main: this.state.main, //是否为主要项目
  983. cid: this.state.data.id, //变更ID
  984. type
  985. },
  986. success: function (data) {
  987. let theArr = [];
  988. if (data.error && data.error.length) {
  989. message.warning(data.error[0].message);
  990. } else {
  991. message.success("保存成功");
  992. this.nextCancel();
  993. this.proList();
  994. }
  995. }.bind(this)
  996. }).always(
  997. function () {
  998. this.setState({
  999. loading: false
  1000. });
  1001. }.bind(this)
  1002. );
  1003. }
  1004. changeDeletePro(record) {
  1005. this.setState({
  1006. loading: true
  1007. });
  1008. $.ajax({
  1009. method: "post",
  1010. dataType: "json",
  1011. crossDomain: false,
  1012. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  1013. data: {
  1014. id: record.id,
  1015. type: 3,
  1016. tid: record.tid,
  1017. splitStatus: record.splitStatus
  1018. },
  1019. success: function (data) {
  1020. let theArr = [];
  1021. if (data.error && data.error.length) {
  1022. message.warning(data.error[0].message);
  1023. } else {
  1024. message.success("删除成功");
  1025. this.proList();
  1026. this.cuiList();
  1027. }
  1028. }.bind(this)
  1029. }).always(
  1030. function () {
  1031. this.setState({
  1032. loading: false
  1033. });
  1034. }.bind(this)
  1035. );
  1036. }
  1037. //点击新增变更催款节点
  1038. changeAddCui() {
  1039. this.state.cuiDataSource.push({
  1040. key: this.state.cuiDataSource.length,
  1041. money: "",
  1042. dunSubject: undefined,
  1043. orderNo: this.state.data.orderNo,
  1044. dunTarget: this.state.kehuId
  1045. });
  1046. this.setState({
  1047. cuiDataSource: this.state.cuiDataSource,
  1048. cuiFlag: true
  1049. });
  1050. }
  1051. //删除变更收款节点
  1052. changeDeleteCui(index) {
  1053. if (index.id) {
  1054. this.state.cuiDataSource.splice(index.id, 1);
  1055. this.setState({
  1056. contactListNew: this.state.cuiDataSource,
  1057. cuiFlag: false,
  1058. addFlag: false,
  1059. boFlag: false
  1060. });
  1061. $.ajax({
  1062. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  1063. method: "post",
  1064. data: {
  1065. id: index.id,
  1066. type: 3,
  1067. tid: index.tid,
  1068. did: index.did
  1069. }
  1070. }).done(
  1071. function (data) {
  1072. this.setState({
  1073. loading: false
  1074. });
  1075. if (!data.error.length) {
  1076. message.success("删除成功!");
  1077. this.setState({
  1078. cuiFlag: false
  1079. });
  1080. this.cuiList();
  1081. } else {
  1082. message.warning(data.error[0].message);
  1083. }
  1084. }.bind(this)
  1085. );
  1086. } else {
  1087. this.state.cuiDataSource.splice(index.key, 1);
  1088. this.setState({
  1089. cuiDataSource: this.state.cuiDataSource,
  1090. cuiFlag: false,
  1091. addFlag: false,
  1092. boFlag: false
  1093. });
  1094. }
  1095. }
  1096. changeSaveCui(record) {
  1097. if (record.boStatus == "false") {
  1098. record.boStatus = false;
  1099. } else if (record.boStatus == "true") {
  1100. record.boStatus = true;
  1101. }
  1102. if (!this.state.yearFlag) {
  1103. if (!record.effectiveCount) {
  1104. message.warning("请选择服务年限");
  1105. return;
  1106. }
  1107. } else {
  1108. record.effectiveCount = "";
  1109. }
  1110. if (record.money == "") {
  1111. message.warning("请填写金额");
  1112. return;
  1113. }
  1114. if (record.boStatus) {
  1115. if (
  1116. typeof +record.money == "number" &&
  1117. +record.money >= 0 &&
  1118. +record.money <= 1
  1119. ) {
  1120. record.appropriationRatio = record.money;
  1121. } else {
  1122. message.warning("金额比例填写错误,比例范围0~1");
  1123. return;
  1124. }
  1125. }
  1126. if (!record.dunType) {
  1127. message.warning("请选择对应科目");
  1128. return;
  1129. }
  1130. if (record.dunType != 1) {
  1131. record.waitDay = "";
  1132. }
  1133. this.setState({
  1134. loading: true
  1135. });
  1136. if (record.boStatus) {
  1137. $.ajax({
  1138. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  1139. method: "post",
  1140. data: {
  1141. orderNo: record.orderNo,
  1142. ctid: record.ctid,
  1143. projectType: record.sort,
  1144. dunType: record.dunType,
  1145. appropriationRatio: record.appropriationRatio,
  1146. waitDay: record.waitDay,
  1147. effectiveCount: record.effectiveCount,
  1148. cid: this.state.data.id //变更ID
  1149. }
  1150. }).done(
  1151. function (data) {
  1152. this.setState({
  1153. loading: false
  1154. });
  1155. if (!data.error.length) {
  1156. message.success("保存成功!");
  1157. this.setState({
  1158. cuiFlag: false,
  1159. boFlag: false,
  1160. addFlag: false
  1161. });
  1162. this.cuiList();
  1163. } else {
  1164. message.warning(data.error[0].message);
  1165. }
  1166. }.bind(this)
  1167. );
  1168. } else {
  1169. $.ajax({
  1170. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  1171. method: "post",
  1172. data: {
  1173. orderNo: record.orderNo,
  1174. ctid: record.ctid,
  1175. projectType: record.sort,
  1176. dunType: record.dunType,
  1177. money: record.money,
  1178. waitDay: record.waitDay,
  1179. effectiveCount: record.effectiveCount,
  1180. cid: this.state.data.id //变更ID
  1181. }
  1182. }).done(
  1183. function (data) {
  1184. this.setState({
  1185. loading: false
  1186. });
  1187. if (!data.error.length) {
  1188. message.success("保存成功!");
  1189. this.setState({
  1190. cuiFlag: false,
  1191. boFlag: false,
  1192. addFlag: false
  1193. });
  1194. this.cuiList();
  1195. } else {
  1196. message.warning(data.error[0].message);
  1197. }
  1198. }.bind(this)
  1199. );
  1200. }
  1201. }
  1202. submitChange() {
  1203. if (
  1204. this.state.typeChange == undefined ||
  1205. (this.state.typeChange == "" && this.state.typeChange != 0)
  1206. ) {
  1207. message.warning("请选择变更类型");
  1208. return false;
  1209. }
  1210. if (
  1211. this.state.typeChange == 0 ||
  1212. this.state.typeChange == 1 ||
  1213. this.state.typeChange == 3
  1214. ) {
  1215. if (this.state.settlementAmount < this.state.changeAmount) {
  1216. message.warning("退款金额大于已收款金额");
  1217. return;
  1218. }
  1219. }
  1220. if (this.state.processStatus != 5 || this.state.processStatus != 6) {
  1221. message.warning("当前订单流程不能发起变更!");
  1222. return false;
  1223. }
  1224. if (this.state.changeAmount === "") {
  1225. message.warning("申请退款金额不能为空!");
  1226. return false;
  1227. }
  1228. if (this.state.remarksC.trim() == "") {
  1229. message.warning("请正确填写变更原因");
  1230. return false;
  1231. }
  1232. if (this.state.startRemarks.trim() == "") {
  1233. message.warning("请正确填写备注信息");
  1234. return false;
  1235. }
  1236. let theorgCodeUrl = [];
  1237. if (this.state.voucherUrl.length) {
  1238. let picArr = [];
  1239. this.state.voucherUrl.map(function (item) {
  1240. if (item.response && item.response.data && item.response.data.length) {
  1241. picArr.push(item.response.data);
  1242. }
  1243. });
  1244. theorgCodeUrl = picArr.join(",");
  1245. }
  1246. this.setState({
  1247. loading: true
  1248. });
  1249. $.ajax({
  1250. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  1251. method: "post",
  1252. data: {
  1253. id: this.state.changeId,
  1254. changeType: 0,
  1255. orderNo: this.state.orderNo, //订单编号
  1256. processState: 0,
  1257. startRemarks: this.state.startRemarks,
  1258. remarks: this.state.remarksC,
  1259. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1260. totalAmount: this.state.totalAmount,
  1261. settlementAmount: this.state.settlementAmount,
  1262. changeAmount: this.state.changeAmount,
  1263. applicant: this.state.salesmanName,
  1264. depName: this.state.depName,
  1265. type: this.state.typeChange
  1266. }
  1267. }).done(
  1268. function (data) {
  1269. if (!data.error.length) {
  1270. this.setState({
  1271. loading: false
  1272. });
  1273. message.success("发起变更成功");
  1274. this.handleCancelclose();
  1275. } else {
  1276. message.warning(data.error[0].message);
  1277. this.setState({
  1278. loading: false
  1279. });
  1280. }
  1281. }.bind(this)
  1282. );
  1283. }
  1284. editCui(record) {
  1285. this.setState({
  1286. editCuiVisible: true,
  1287. editCuiMoney: record.money,
  1288. editCuiTid: record.tid,
  1289. editCuiId: record.id
  1290. });
  1291. }
  1292. editPro(record) {
  1293. this.setState({
  1294. editProVisible: true,
  1295. editSplitStatus: record.splitStatus,
  1296. editProMoney: record.commodityPrice,
  1297. editProCommodityQuantity: record.commodityQuantity,
  1298. editProTid: record.tid,
  1299. editProId: record.id
  1300. });
  1301. }
  1302. submitEditCui() {
  1303. this.setState({
  1304. loading: true
  1305. });
  1306. $.ajax({
  1307. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  1308. method: "post",
  1309. data: {
  1310. id: this.state.editCuiId,
  1311. type: this.state.editCuiTid ? 2 : 1,
  1312. money: this.state.editCuiMoney,
  1313. tid: this.state.editCuiTid,
  1314. }
  1315. }).done(
  1316. function (data) {
  1317. this.setState({
  1318. loading: false
  1319. });
  1320. if (!data.error.length) {
  1321. message.success("修改成功!");
  1322. this.cuiList();
  1323. this.proList()
  1324. this.setState({
  1325. editCuiVisible: false
  1326. });
  1327. } else {
  1328. message.warning(data.error[0].message);
  1329. }
  1330. }.bind(this)
  1331. );
  1332. }
  1333. submitEditPro() {
  1334. this.setState({
  1335. loading: true
  1336. });
  1337. $.ajax({
  1338. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  1339. method: "post",
  1340. data: {
  1341. id: this.state.editProId,
  1342. type: this.state.editProTid ? 2 : 1,
  1343. commodityPrice: this.state.editProMoney,
  1344. commodityQuantity: this.state.editProCommodityQuantity,
  1345. tid: this.state.editProTid
  1346. }
  1347. }).done(
  1348. function (data) {
  1349. this.setState({
  1350. loading: false
  1351. });
  1352. if (!data.error.length) {
  1353. message.success("修改成功!");
  1354. this.proList();
  1355. this.cuiList()
  1356. this.setState({
  1357. editProVisible: false
  1358. });
  1359. } else {
  1360. message.warning(data.error[0].message);
  1361. }
  1362. }.bind(this)
  1363. );
  1364. }
  1365. componentWillMount() {
  1366. this.departmentList();
  1367. this.state.data = this.props.orderData;
  1368. this.state.data.oldPrice = this.props.orderData.totalAmount;
  1369. this.setState({
  1370. data: this.state.data,
  1371. voucherUrl: this.props.voucherUrl
  1372. });
  1373. this.proList();
  1374. this.cuiList();
  1375. let e = this.props.orderData.type;
  1376. if (e == 1) {
  1377. this.setState({
  1378. hetongFlag: false,
  1379. listFlag: false,
  1380. listCuiFlag: false,
  1381. tuiKuanFlag: false,
  1382. displayList: false
  1383. });
  1384. } else if (e == 2) {
  1385. this.setState({
  1386. hetongFlag: true,
  1387. listFlag: false,
  1388. listCuiFlag: false,
  1389. tuiKuanFlag: true,
  1390. displayList: false
  1391. });
  1392. } else if (e == 3) {
  1393. this.setState({
  1394. listFlag: false,
  1395. hetongFlag: false,
  1396. listCuiFlag: false,
  1397. tuiKuanFlag: false,
  1398. displayList: true
  1399. });
  1400. } else if (e == 4) {
  1401. this.setState({
  1402. listFlag: false,
  1403. listCuiFlag: false,
  1404. hetongFlag: false,
  1405. tuiKuanFlag: true,
  1406. displayList: false
  1407. });
  1408. } else if (e == 5) {
  1409. this.setState({
  1410. listFlag: false,
  1411. listCuiFlag: false,
  1412. hetongFlag: true,
  1413. tuiKuanFlag: true,
  1414. displayList: false
  1415. });
  1416. } else {
  1417. this.setState({
  1418. listFlag: true,
  1419. hetongFlag: true,
  1420. listCuiFlag: true,
  1421. tuiKuanFlag: false,
  1422. displayList: false
  1423. });
  1424. }
  1425. }
  1426. componentWillReceiveProps(nextProps) {
  1427. this.state.data = nextProps.orderData;
  1428. this.state.data.oldPrice = nextProps.orderData.totalAmount;
  1429. this.setState({
  1430. data: this.state.data,
  1431. voucherUrl: nextProps.voucherUrl
  1432. });
  1433. this.proList();
  1434. this.cuiList();
  1435. let e = nextProps.orderData.type;
  1436. if (e == 1) {
  1437. this.setState({
  1438. hetongFlag: false,
  1439. listFlag: false,
  1440. listCuiFlag: false,
  1441. tuiKuanFlag: false,
  1442. displayList: false
  1443. });
  1444. } else if (e == 2) {
  1445. this.setState({
  1446. hetongFlag: true,
  1447. listFlag: false,
  1448. listCuiFlag: false,
  1449. tuiKuanFlag: true,
  1450. displayList: false
  1451. });
  1452. } else if (e == 3) {
  1453. this.setState({
  1454. listFlag: false,
  1455. hetongFlag: false,
  1456. listCuiFlag: false,
  1457. tuiKuanFlag: false,
  1458. displayList: true
  1459. });
  1460. } else if (e == 4) {
  1461. this.setState({
  1462. listFlag: false,
  1463. listCuiFlag: false,
  1464. hetongFlag: false,
  1465. tuiKuanFlag: true,
  1466. displayList: false
  1467. });
  1468. } else if (e == 5) {
  1469. this.setState({
  1470. listFlag: false,
  1471. listCuiFlag: false,
  1472. hetongFlag: true,
  1473. tuiKuanFlag: true,
  1474. displayList: false
  1475. });
  1476. } else {
  1477. this.setState({
  1478. listFlag: true,
  1479. hetongFlag: true,
  1480. listCuiFlag: true,
  1481. tuiKuanFlag: false,
  1482. displayList: false
  1483. });
  1484. }
  1485. // }
  1486. }
  1487. // componentWillMount() {
  1488. // this.departmentList();
  1489. // }
  1490. not() {
  1491. }
  1492. deleteChange() {
  1493. this.setState({
  1494. loading: true,
  1495. });
  1496. $.ajax({
  1497. url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
  1498. method: "post",
  1499. data: {
  1500. id: this.state.data.id,
  1501. status: this.state.data.status,
  1502. processState: this.state.data.processState,
  1503. orderNo: this.state.data.orderNo
  1504. },
  1505. }).done(
  1506. function (data) {
  1507. this.setState({
  1508. loading: false,
  1509. });
  1510. if (!data.error.length) {
  1511. message.success("取消成功!");
  1512. this.props.onCancel()
  1513. } else {
  1514. message.warning(data.error[0].message);
  1515. }
  1516. }.bind(this)
  1517. );
  1518. }
  1519. render() {
  1520. const expandedRowRender = e => {
  1521. const data = e.list;
  1522. data.forEach((item) => {
  1523. item.key = item.id
  1524. })
  1525. let columns = [];
  1526. if (e.list instanceof Array && e.list.length) {
  1527. columns = [
  1528. {
  1529. title: "变更状态",
  1530. dataIndex: "type",
  1531. key: "type",
  1532. render: (text, record) => {
  1533. let str = "";
  1534. let color = "";
  1535. if (text == 1) {
  1536. str = "增";
  1537. color = "#87d068";
  1538. } else if (text == 2) {
  1539. str = "改";
  1540. color = "#108ee9";
  1541. } else if (text == 3) {
  1542. str = "删";
  1543. color = "#f50";
  1544. }
  1545. return (
  1546. <span>
  1547. <Tag
  1548. color={color}
  1549. style={{ display: text == 0 ? "none" : "inline-block" }}
  1550. >
  1551. {str}
  1552. </Tag>
  1553. {record.splitStatus == 1 ? (
  1554. <Tag
  1555. color="#108ee9"
  1556. // onClick={e => {
  1557. // e.stopPropagation();
  1558. // this.showRes(record);
  1559. // }}
  1560. >
  1561. 父项目
  1562. </Tag>
  1563. ) : (
  1564. ""
  1565. )}
  1566. {record.splitStatus == 2 ? (
  1567. <Tag
  1568. color="#108ee9"
  1569. // onClick={e => {
  1570. // e.stopPropagation();
  1571. // this.showRes(record);
  1572. // }}
  1573. >
  1574. 子项目
  1575. </Tag>
  1576. ) : (
  1577. ""
  1578. )}
  1579. </span>
  1580. );
  1581. },
  1582. },
  1583. {
  1584. title: "业务项目名称",
  1585. dataIndex: "commodityName",
  1586. key: "commodityName",
  1587. render: (text, record) => {
  1588. return text + "-" + record.id;
  1589. },
  1590. },
  1591. {
  1592. title: "项目类别",
  1593. dataIndex: "cname",
  1594. key: "cname",
  1595. },
  1596. {
  1597. title: "项目数量",
  1598. dataIndex: "commodityQuantity",
  1599. key: "commodityQuantity",
  1600. },
  1601. {
  1602. title: "金额(万元)",
  1603. dataIndex: "commodityPrice",
  1604. key: "commodityPrice",
  1605. render: (text, record) => {
  1606. if (record.splitStatus == 2) {
  1607. return "/";
  1608. } else {
  1609. return text;
  1610. }
  1611. },
  1612. },
  1613. {
  1614. title: "主要项目",
  1615. dataIndex: "main",
  1616. key: "main",
  1617. render: (text) => {
  1618. return text ? "是" : "否";
  1619. },
  1620. },
  1621. {
  1622. title: "项目负责人",
  1623. dataIndex: "receiverName",
  1624. key: "receiverName",
  1625. },
  1626. {
  1627. title: "项目说明",
  1628. dataIndex: "taskComment",
  1629. key: "taskComment",
  1630. render: (text) => {
  1631. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  1632. },
  1633. },
  1634. {
  1635. title: "操作",
  1636. dataIndex: "ABC",
  1637. key: "ABC",
  1638. render: (text, record) => {
  1639. return (
  1640. <div>
  1641. <Button
  1642. onClick={(e) => {
  1643. e.stopPropagation();
  1644. this.showConfirm(this.changeDeletePro, record);
  1645. }}
  1646. disabled={this.state.listFlag}
  1647. style={{
  1648. display: this.state.displayList ? "none" : "block",
  1649. }}
  1650. >
  1651. 删除
  1652. </Button>
  1653. </div>
  1654. );
  1655. },
  1656. },
  1657. ];
  1658. return (
  1659. <Table
  1660. columns={columns}
  1661. dataSource={data}
  1662. scroll={{ x: "max-content", y: 0 }}
  1663. pagination={false}
  1664. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  1665. />
  1666. );
  1667. } else {
  1668. columns = [];
  1669. return (
  1670. <p style={{ fontWeight: "bold", color: "red", textAlign: "center" }}>
  1671. 此项目暂未拆分
  1672. </p>
  1673. );
  1674. }
  1675. };
  1676. const { TextArea } = Input;
  1677. const data = this.state.data;
  1678. // let departmentArr = this.state.departmentArr || [];
  1679. const dataSources = this.state.customerArr || [];
  1680. const cuiDataList = this.state.contactList || [];
  1681. let departmentArr = this.state.departmentArr || [];
  1682. const options = this.state.states
  1683. ? dataSources.map(group => (
  1684. <Select.Option key={group.id} value={group.name}>
  1685. {group.name}
  1686. </Select.Option>
  1687. ))
  1688. : dataSources.map((group, index) => (
  1689. <Select.Option key={index} value={group.bname}>
  1690. {group.bname}
  1691. </Select.Option>
  1692. ));
  1693. return (
  1694. <div>
  1695. <Spin spinning={this.state.loading}>
  1696. {this.state.resVisible ? (
  1697. <ResolutionDetail
  1698. cancel={this.resCancel}
  1699. detail={this.state.resRecord}
  1700. visible={this.state.resVisible}
  1701. id={this.state.resRecord.orderNo}
  1702. />
  1703. ) : (
  1704. ""
  1705. )}
  1706. <div className="clearfix">
  1707. <FormItem
  1708. className="half-item"
  1709. {...formItemLayout}
  1710. label="客户名称"
  1711. >
  1712. <span>{data.userName}</span>
  1713. </FormItem>
  1714. </div>
  1715. <div className="clearfix">
  1716. <FormItem
  1717. className="half-item"
  1718. {...formItemLayout}
  1719. label="合同编号"
  1720. >
  1721. <span>{data.contractNo}</span>
  1722. </FormItem>
  1723. </div>
  1724. <div className="clearfix">
  1725. <FormItem
  1726. className="half-item"
  1727. {...formItemLayout}
  1728. label="申请变更部门"
  1729. >
  1730. <span>{this.state.data.depName}</span>
  1731. </FormItem>
  1732. <FormItem className="half-item" {...formItemLayout} label="申请人">
  1733. {/* <Input
  1734. placeholder="请输入申请人"
  1735. ref="signTotalAmount"
  1736. value={data.applicant}
  1737. onChange={e => {
  1738. let data = this.state.data;
  1739. data.applicant = e.target.value;
  1740. this.setState({ data });
  1741. }}
  1742. style={{ width: "240px" }}
  1743. /> */}
  1744. <span>{data.applicant}</span>
  1745. </FormItem>
  1746. </div>
  1747. <div className="clearfix">
  1748. <FormItem
  1749. labelCol={{ span: 4 }}
  1750. wrapperCol={{ span: 18 }}
  1751. label="变更类型"
  1752. >
  1753. <Select
  1754. placeholder="选择合同变更类型"
  1755. style={{ width: 200 }}
  1756. disabled={this.state.changeFlag}
  1757. onChange={(e) => {
  1758. let data = this.state.data;
  1759. data.type = e;
  1760. this.setState({ data, changeFlag: true });
  1761. if (e == 1) {
  1762. this.setState({
  1763. hetongFlag: false,
  1764. listFlag: false,
  1765. listCuiFlag: false,
  1766. tuiKuanFlag: false,
  1767. displayList: false,
  1768. });
  1769. } else if (e == 2) {
  1770. this.setState({
  1771. hetongFlag: true,
  1772. listFlag: false,
  1773. listCuiFlag: false,
  1774. tuiKuanFlag: true,
  1775. displayList: false,
  1776. });
  1777. } else if (e == 3) {
  1778. this.setState({
  1779. listFlag: false,
  1780. hetongFlag: false,
  1781. listCuiFlag: false,
  1782. tuiKuanFlag: false,
  1783. displayList: true,
  1784. });
  1785. } else if (e == 4) {
  1786. this.setState({
  1787. listFlag: false,
  1788. listCuiFlag: false,
  1789. hetongFlag: false,
  1790. tuiKuanFlag: true,
  1791. displayList: false,
  1792. });
  1793. } else if (e == 5) {
  1794. this.setState({
  1795. listFlag: false,
  1796. listCuiFlag: false,
  1797. hetongFlag: true,
  1798. tuiKuanFlag: true,
  1799. displayList: false,
  1800. });
  1801. } else {
  1802. this.setState({
  1803. listFlag: true,
  1804. hetongFlag: true,
  1805. listCuiFlag: true,
  1806. tuiKuanFlag: false,
  1807. displayList: false,
  1808. });
  1809. }
  1810. }}
  1811. value={data.type}
  1812. >
  1813. <Option value={0}>退单退款</Option>
  1814. <Option value={1}>项目及金额变更</Option>
  1815. <Option value={2}>仅项目变更</Option>
  1816. <Option value={3}>仅金额变更</Option>
  1817. <Option value={4}>重报</Option>
  1818. <Option value={5}>赠送</Option>
  1819. </Select>
  1820. <Button
  1821. style={{ marginLeft: 10 }}
  1822. onClick={(e) => {
  1823. this.state.data.startRemarks = "";
  1824. this.state.data.remarks = "";
  1825. this.state.data.changeAmount = "0";
  1826. this.state.data.depNameChange = undefined;
  1827. this.state.data.typeChange = undefined;
  1828. this.state.data.totalAmount = this.state.data.oldPrice;
  1829. this.setState({
  1830. listFlag: false,
  1831. hetongFlag: false,
  1832. listCuiFlag: false,
  1833. tuiKuanFlag: false,
  1834. displayList: false,
  1835. startRemarks: "",
  1836. data: this.state.data,
  1837. changeFlag: false,
  1838. voucherUrl: [],
  1839. // changeAmount: "0",
  1840. // applicant: undefined,
  1841. // depNameChange: undefined,
  1842. // typeChange: [],
  1843. // changeFlag: false
  1844. });
  1845. }}
  1846. >
  1847. 重置
  1848. </Button>
  1849. {this.state.data.status == 3 ? (
  1850. <Button
  1851. type="danger"
  1852. style={{
  1853. float: "right",
  1854. backgroundColor: "red",
  1855. color: "white",
  1856. position: "absolute",
  1857. right: 0,
  1858. height: 50,
  1859. borderRadius: 20,
  1860. }}
  1861. onClick={(e) => {
  1862. e.stopPropagation();
  1863. this.showConfirmChange(this.deleteChange);
  1864. }}
  1865. >
  1866. 取消本次变更
  1867. </Button>
  1868. ) : (
  1869. ""
  1870. )}
  1871. </FormItem>
  1872. </div>
  1873. <div className="clearfix">
  1874. <FormItem
  1875. labelCol={{ span: 4 }}
  1876. wrapperCol={{ span: 18 }}
  1877. label="合同额(万元)"
  1878. >
  1879. <Input
  1880. placeholder="请输入合同额"
  1881. ref="signTotalAmount"
  1882. disabled={this.state.hetongFlag}
  1883. value={data.totalAmount}
  1884. onChange={(e) => {
  1885. let data = this.state.data;
  1886. data.totalAmount = e.target.value;
  1887. this.setState({ data });
  1888. }}
  1889. style={{ width: "240px" }}
  1890. />
  1891. </FormItem>
  1892. <FormItem
  1893. labelCol={{ span: 4 }}
  1894. wrapperCol={{ span: 18 }}
  1895. label="已收款(万元)"
  1896. >
  1897. {/* <Input
  1898. placeholder="请输入已收款"
  1899. ref="signTotalAmount"
  1900. value={data.settlementAmount}
  1901. onChange={e => {
  1902. let data = this.state.data;
  1903. data.settlementAmount = e.target.value;
  1904. this.setState({ data });
  1905. }}
  1906. style={{ width: "240px" }}
  1907. /> */}
  1908. <span>
  1909. {this.state.data.settlementAmount}&nbsp;&nbsp;&nbsp;&nbsp;
  1910. <span style={{ color: "red" }}>
  1911. (注:已收款与现实收款不符,请与财务专员联系)
  1912. </span>
  1913. </span>
  1914. </FormItem>
  1915. <FormItem
  1916. labelCol={{ span: 4 }}
  1917. wrapperCol={{ span: 18 }}
  1918. label="申请退款(万元)"
  1919. >
  1920. <Input
  1921. placeholder="请输入申请退款"
  1922. ref="signTotalAmount"
  1923. disabled={this.state.tuiKuanFlag}
  1924. value={data.changeAmount}
  1925. onChange={(e) => {
  1926. let data = this.state.data;
  1927. data.changeAmount = e.target.value;
  1928. this.setState({ data });
  1929. }}
  1930. style={{ width: "240px" }}
  1931. />
  1932. </FormItem>
  1933. </div>
  1934. <div>
  1935. <div>
  1936. <span
  1937. style={{
  1938. marginLeft: "50px",
  1939. fontSize: "20px",
  1940. }}
  1941. >
  1942. 项目业务
  1943. </span>
  1944. <span style={{ color: "red" }}>
  1945. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!双击可修改对应金额数量!)
  1946. </span>
  1947. <Button
  1948. type="primary"
  1949. onClick={this.changeAddPro}
  1950. disabled={this.state.listFlag}
  1951. style={{
  1952. float: "right",
  1953. marginRight: "50px",
  1954. marginBottom: "15px",
  1955. display: this.state.displayList ? "none" : "block",
  1956. }}
  1957. >
  1958. 添加项目明细
  1959. </Button>
  1960. </div>
  1961. <div className="patent-table" style={{ marginBottom: 10 }}>
  1962. {/* <Spin spinning={this.state.loading}> */}
  1963. <Table
  1964. columns={this.state.proColumns}
  1965. dataSource={this.state.proDataSource}
  1966. scroll={{ x: "max-content", y: 0 }}
  1967. expandedRowRender={expandedRowRender}
  1968. pagination={false}
  1969. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  1970. bordered
  1971. size="small"
  1972. />
  1973. {/* </Spin> */}
  1974. </div>
  1975. <div>
  1976. <span
  1977. style={{
  1978. marginLeft: "50px",
  1979. fontSize: "20px",
  1980. }}
  1981. >
  1982. 催款节点
  1983. </span>
  1984. <span style={{ color: "red" }}>
  1985. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  1986. </span>
  1987. <Button
  1988. type="primary"
  1989. onClick={(e) => {
  1990. this.changeAddCui();
  1991. }}
  1992. disabled={this.state.listCuiFlag}
  1993. style={{
  1994. float: "right",
  1995. marginRight: "50px",
  1996. marginBottom: "15px",
  1997. display: this.state.displayList ? "none" : "block",
  1998. }}
  1999. >
  2000. 添加催款节点
  2001. </Button>
  2002. </div>
  2003. <div className="clearfix">
  2004. {/* <Spin spinning={this.state.loading}> */}
  2005. <Form layout="horizontal">
  2006. <Table
  2007. pagination={false}
  2008. columns={this.state.changeCuiList}
  2009. dataSource={this.state.cuiDataSource}
  2010. scroll={{ x: "max-content", y: 0 }}
  2011. onRowDoubleClick={
  2012. this.state.listCuiFlag ? this.not : this.editCui
  2013. }
  2014. bordered
  2015. size="small"
  2016. />
  2017. <Col span={24} offset={9} style={{ marginTop: "15px" }}></Col>
  2018. </Form>
  2019. {/* </Spin> */}
  2020. </div>
  2021. </div>
  2022. <div className="clearfix">
  2023. <FormItem
  2024. style={{ height: "auto" }}
  2025. labelCol={{ span: 4 }}
  2026. wrapperCol={{ span: 18 }}
  2027. label="变更原因"
  2028. >
  2029. <TextArea
  2030. rows={4}
  2031. placeholder="因企业政府补助费用与营销员签单承诺费用不一"
  2032. ref="signTotalAmount"
  2033. style={{ width: "95%" }}
  2034. value={data.remarks}
  2035. onChange={(e) => {
  2036. let data = this.state.data;
  2037. data.remarks = e.target.value;
  2038. this.setState({ data });
  2039. }}
  2040. />
  2041. </FormItem>
  2042. </div>
  2043. {/* 备注 */}
  2044. <div className="clearfix">
  2045. <FormItem
  2046. style={{ height: "auto" }}
  2047. labelCol={{ span: 4 }}
  2048. wrapperCol={{ span: 18 }}
  2049. label="备注"
  2050. >
  2051. <TextArea
  2052. rows={4}
  2053. placeholder="请输入备注信息"
  2054. ref="signTotalAmount"
  2055. style={{ width: "95%" }}
  2056. value={data.startRemarks}
  2057. onChange={(e) => {
  2058. let data = this.state.data;
  2059. data.startRemarks = e.target.value;
  2060. this.setState({ data });
  2061. }}
  2062. />
  2063. </FormItem>
  2064. </div>
  2065. <div className="clearfix">
  2066. <FormItem
  2067. labelCol={{ span: 4 }}
  2068. wrapperCol={{ span: 18 }}
  2069. label="变更凭证"
  2070. >
  2071. <PicturesWall
  2072. fileList={this.getVoucherUrl}
  2073. pictureUrl={this.state.voucherUrl}
  2074. url="/api/admin/orderChange/uploadFile"
  2075. sign="order_change_file"
  2076. />
  2077. <Rizhi changeId={data.id} />
  2078. <p>图片建议:要清晰。</p>
  2079. </FormItem>
  2080. </div>
  2081. {/* <ul
  2082. style={{
  2083. width: "868px",
  2084. overflow: "hidden",
  2085. paddingLeft: "90px",
  2086. marginBottom: "20px"
  2087. }}
  2088. >
  2089. {this.state.dataSource.map((item, index) => (
  2090. <li
  2091. key={index}
  2092. style={{
  2093. width: "100%",
  2094. height: "auto",
  2095. wordBreak: "break-all",
  2096. color: "black",
  2097. marginBottom: "10px"
  2098. }}
  2099. >{`${item.aname}: ${item.remarks}`}</li>
  2100. ))}
  2101. </ul> */}
  2102. <div className="clearfix">
  2103. <Button
  2104. type="primary"
  2105. style={{ float: "right", marginRight: 40 }}
  2106. onClick={this.changeApply}
  2107. >
  2108. 发起变更申请
  2109. </Button>
  2110. </div>
  2111. <Modal
  2112. title="修改项目金额及数量"
  2113. visible={this.state.editProVisible}
  2114. onOk={this.submitEditPro}
  2115. width={300}
  2116. okText={"保存"}
  2117. onCancel={() => {
  2118. this.setState({
  2119. editProVisible: false,
  2120. });
  2121. }}
  2122. >
  2123. <div className="clearfix">
  2124. <FormItem
  2125. labelCol={{ span: 6 }}
  2126. wrapperCol={{ span: 14 }}
  2127. label="项目金额"
  2128. style={{
  2129. display: this.state.editSplitStatus == 2 ? "none" : "block",
  2130. }}
  2131. >
  2132. <Input
  2133. placeholder="请输入金额"
  2134. rows={4}
  2135. value={this.state.editProMoney}
  2136. onChange={(e) => {
  2137. this.setState({ editProMoney: e.target.value });
  2138. }}
  2139. />
  2140. </FormItem>
  2141. <FormItem
  2142. labelCol={{ span: 6 }}
  2143. wrapperCol={{ span: 14 }}
  2144. label="项目数量"
  2145. >
  2146. <Input
  2147. placeholder="请输入数量"
  2148. rows={4}
  2149. value={this.state.editProCommodityQuantity}
  2150. onChange={(e) => {
  2151. this.setState({ editProCommodityQuantity: e.target.value });
  2152. }}
  2153. />
  2154. </FormItem>
  2155. </div>
  2156. </Modal>
  2157. <Modal
  2158. title="修改催款节点金额"
  2159. visible={this.state.editCuiVisible}
  2160. onOk={this.submitEditCui}
  2161. okText={"保存"}
  2162. width={300}
  2163. onCancel={(e) => {
  2164. this.setState({
  2165. editCuiVisible: false,
  2166. });
  2167. }}
  2168. >
  2169. <div className="clearfix">
  2170. <FormItem
  2171. labelCol={{ span: 6 }}
  2172. wrapperCol={{ span: 14 }}
  2173. label="催款金额"
  2174. >
  2175. <Input
  2176. placeholder="请输入金额"
  2177. rows={4}
  2178. value={this.state.editCuiMoney}
  2179. onChange={(e) => {
  2180. this.setState({ editCuiMoney: e.target.value });
  2181. }}
  2182. />
  2183. </FormItem>
  2184. </div>
  2185. </Modal>
  2186. <Modal
  2187. maskClosable={false}
  2188. visible={this.state.changeVisible}
  2189. onOk={this.nextCancel}
  2190. onCancel={this.nextCancel}
  2191. width="800px"
  2192. title={"添加变更项目"}
  2193. footer=""
  2194. className="admin-desc-content"
  2195. >
  2196. <Form
  2197. layout="horizontal"
  2198. // id="demand-form"
  2199. >
  2200. {/* <Spin spinning={this.state.loading}> */}
  2201. <div className="clearfix">
  2202. <FormItem
  2203. className="half-item"
  2204. {...formItemLayout}
  2205. label="服务名称"
  2206. >
  2207. <AutoComplete
  2208. className="certain-category-search"
  2209. dropdownClassName="certain-category-search-dropdown"
  2210. dropdownMatchSelectWidth={false}
  2211. dropdownStyle={{ width: 200 }}
  2212. style={{ width: "200px" }}
  2213. dataSource={options}
  2214. placeholder="输入服务名称"
  2215. value={this.state.commodityName}
  2216. onChange={this.httpChange}
  2217. filterOption={true}
  2218. onSelect={this.selectAuto}
  2219. >
  2220. <Input />
  2221. </AutoComplete>
  2222. <span className="mandatory">*</span>
  2223. </FormItem>
  2224. <FormItem
  2225. className="half-item"
  2226. {...formItemLayout}
  2227. label="服务数量"
  2228. >
  2229. <Input
  2230. placeholder="请输入服务数量"
  2231. value={this.state.commodityQuantity}
  2232. style={{ width: "200px" }}
  2233. onChange={(e) => {
  2234. this.setState({ commodityQuantity: e.target.value });
  2235. }}
  2236. ref="commodityQuantity"
  2237. />
  2238. <span className="mandatory">*</span>
  2239. </FormItem>
  2240. <FormItem
  2241. className="half-item"
  2242. {...formItemLayout}
  2243. label="实签价格(万元)"
  2244. >
  2245. <Input
  2246. placeholder="请输入实签价格"
  2247. value={this.state.commodityPrice}
  2248. style={{ width: "200px" }}
  2249. onChange={(e) => {
  2250. this.setState({ commodityPrice: e.target.value });
  2251. }}
  2252. ref="commodityPrice"
  2253. />
  2254. <span className="mandatory">*</span>
  2255. </FormItem>
  2256. <FormItem
  2257. className="half-item"
  2258. {...formItemLayout}
  2259. label="主要业务"
  2260. >
  2261. <Select
  2262. placeholder="选择是否为主要业务"
  2263. style={{ width: "200px" }}
  2264. value={this.state.main}
  2265. onChange={(e) => {
  2266. this.setState({ main: e });
  2267. }}
  2268. >
  2269. {boutique.map(function (item) {
  2270. return (
  2271. <Select.Option key={item.value}>
  2272. {item.key}
  2273. </Select.Option>
  2274. );
  2275. })}
  2276. </Select>
  2277. <span className="mandatory">*</span>
  2278. </FormItem>
  2279. <div className="clearfix">
  2280. <FormItem
  2281. labelCol={{ span: 4 }}
  2282. wrapperCol={{ span: 16 }}
  2283. label="服务说明"
  2284. >
  2285. <Input
  2286. type="textarea"
  2287. placeholder="请输入服务说明"
  2288. value={this.state.taskComment}
  2289. onChange={(e) => {
  2290. this.setState({ taskComment: e.target.value });
  2291. }}
  2292. />
  2293. </FormItem>
  2294. </div>
  2295. <FormItem
  2296. wrapperCol={{ span: 12, offset: 4 }}
  2297. className="half-middle"
  2298. >
  2299. <Button
  2300. className="submitSave"
  2301. type="primary"
  2302. onClick={this.changeProSubmit}
  2303. >
  2304. 保存
  2305. </Button>
  2306. <Button
  2307. className="submitSave"
  2308. type="ghost"
  2309. onClick={this.nextCancel}
  2310. >
  2311. 取消
  2312. </Button>
  2313. </FormItem>
  2314. </div>
  2315. {/* </Spin> */}
  2316. </Form>
  2317. </Modal>
  2318. </Spin>
  2319. </div>
  2320. );
  2321. }
  2322. }
  2323. export default ChangeApply;