changeApply.js 97 KB

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