changeApply.js 99 KB

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