changeApply.js 99 KB

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