changeApply.js 70 KB

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