changeApply.js 100 KB

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