changeApply.js 82 KB

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