changeApply.js 94 KB

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