changeApply.js 97 KB

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