newAddProject.jsx 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705
  1. import React, { Component } from "react";
  2. import {
  3. AutoComplete, Button, Form, Input, message,
  4. Modal, Radio, Select, Spin, Tag, DatePicker,
  5. Checkbox
  6. } from "antd";
  7. import { boutique } from "../../dataDic";
  8. import $ from "jquery";
  9. import { getboutique, splitUrl } from "../../tools";
  10. import moment from "moment";
  11. import { vipYear } from "../../dataDic";
  12. import ImgList from "../imgList";
  13. const FormItem = Form.Item;
  14. const Option = Select.Option;
  15. const RadioGroup = Radio.Group;
  16. const confirm = Modal.confirm;
  17. const CheckboxGroup = Checkbox.Group;
  18. const formItemLayout = {
  19. labelCol: { span: 8 },
  20. wrapperCol: { span: 14 },
  21. };
  22. const PicturesWall = React.createClass({
  23. getInitialState() {
  24. return {
  25. previewVisible: false,
  26. previewImage: "",
  27. fileList: this.props.pictureUrl,
  28. };
  29. },
  30. getDefaultProps() {
  31. return {
  32. changeClick: this.modifyChange,
  33. };
  34. },
  35. handleCancel() {
  36. this.setState({ previewVisible: false });
  37. },
  38. handlePreview(file) {
  39. this.setState({
  40. previewImage: file.url || file.thumbUrl,
  41. previewVisible: true,
  42. });
  43. },
  44. handleChange(info) {
  45. let fileList = info.fileList;
  46. this.setState({ fileList });
  47. this.props.fileList(fileList);
  48. },
  49. componentWillReceiveProps(nextProps) {
  50. this.state.fileList = nextProps.pictureUrl;
  51. },
  52. render() {
  53. const { fileList } = this.state;
  54. return (
  55. <div style={{ display: "inline-block" }}>
  56. <ImgList
  57. domId={this.props.domId}
  58. uploadConfig={{
  59. action: globalConfig.context + "/api/admin/orderProject/uploadMemberFile",
  60. data: { sign: "memberFile" },
  61. multiple: true,
  62. listType: "picture-card",
  63. }}
  64. onChange={(infor) => {
  65. this.handleChange(infor);
  66. }}
  67. fileList={fileList}
  68. />
  69. </div>
  70. );
  71. },
  72. });
  73. /**
  74. * 新增项目
  75. */
  76. class NewAddProject extends Component {
  77. constructor(props) {
  78. super(props);
  79. this.state = {
  80. commodityName: '',//项目名称
  81. commodityQuantity: '',//项目数量
  82. patentType: 0,
  83. officialCost: '',
  84. costReduction: '',
  85. commodityPrice: '',//项目价格
  86. main: '',//主要项目 0否 1是
  87. lastYearCapital: '',//上年度总资本
  88. lastYearIncome: '',//上年度总资本
  89. taskComment: '',//项目说明
  90. declarationBatch: '',
  91. ifCertificationFee: '',
  92. displayFees: "none",
  93. customerArr: [],
  94. patentTypeList: [],
  95. loading: false,
  96. orgCodeUrl: [],
  97. patentTransfer: 0, //是否为专利转让 0 否 1 是
  98. serviceLife: [],//服务年份
  99. isVip: undefined,
  100. histYear: [],
  101. editName: false,
  102. isEdit: false,//是否可编辑
  103. contractTerm: [],//合同期
  104. addyear: undefined,//
  105. isGive: undefined,//是否赠送
  106. splitList: [],//子集
  107. addFrom: false,
  108. serviceYear: '',
  109. checkType: [], //会员项目勾选的类型
  110. newCheck: [], // 子项勾选的类型
  111. }
  112. this.onSubmit = this.onSubmit.bind(this);
  113. this.httpChange = this.httpChange.bind(this);
  114. this.selectAuto = this.selectAuto.bind(this);
  115. this.getpatentTypeList = this.getpatentTypeList.bind(this);
  116. this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
  117. }
  118. componentDidMount() {
  119. this.getpatentTypeList();
  120. this.props.type == "vipAdd" && this.setValue();
  121. }
  122. setValue() {
  123. const { newData } = this.props;
  124. if (!!newData && newData.length > 0) {
  125. let list = []
  126. for (var i = 0; i < newData.length; i++) {
  127. if (newData[i].cSort == 6) {
  128. list.push({
  129. bname: newData[i].commodityName,
  130. type: newData[i].type,
  131. id: newData[i].commodityId,
  132. cSort: newData[i].cSort,
  133. patentTransfer: newData[i].patentTransfer,
  134. })
  135. }
  136. }
  137. this.setState({
  138. commodityName: undefined,
  139. customerArr: list
  140. })
  141. }
  142. }
  143. onSubmit() {
  144. if (this.state.gid === undefined || !this.state.gid) {
  145. message.warning("服务名称不匹配!");
  146. return false;
  147. }
  148. let reg = /^([0]|[1-9][0-9]*)$/;
  149. if (
  150. !this.state.commodityQuantity ||
  151. !reg.test(this.state.commodityQuantity)
  152. ) {
  153. message.warning("请输入正确服务数量!");
  154. return false;
  155. }
  156. if (this.state.displayFees === 'block') {
  157. if (this.state.patentType === "" && !this.state.patentTransfer) {
  158. message.warning("请选择专利类型!");
  159. return false;
  160. }
  161. if (this.state.officialCost === '') {
  162. message.warning("请选择官费!");
  163. return false;
  164. }
  165. if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2)) {
  166. message.warning("请选择费减!");
  167. return false;
  168. }
  169. }
  170. if (isNaN(parseFloat(this.state.commodityPrice))) {
  171. message.warning("请输入正确的金额!");
  172. return false;
  173. }
  174. // 3审计
  175. if (this.state.addProjectType == "3") {
  176. if (this.state.serviceLife.length === 0) {
  177. message.warning("请选择服务年限!");
  178. return
  179. }
  180. if (this.state.serviceLife.length != this.state.commodityQuantity) {
  181. message.warning("服务数量与服务年限不符!");
  182. return
  183. }
  184. if (isNaN(parseFloat(this.state.lastYearCapital))) {
  185. message.warning("请输入正确的企业上年度总资本!");
  186. return
  187. }
  188. if (isNaN(parseFloat(this.state.lastYearIncome))) {
  189. message.warning("请输入正确的企业上年度总收入!");
  190. return
  191. }
  192. }
  193. if (!this.state.main) {
  194. message.warning("请选择是否为主要项目!");
  195. return false;
  196. }
  197. // 5高新
  198. if (this.state.addProjectType === 5) {
  199. if (!this.state.declarationBatch) {
  200. message.warning("请选择企业要求申报批次!");
  201. return
  202. }
  203. if (!this.state.serviceYear) {
  204. message.warning("请选择申报年份!");
  205. return
  206. }
  207. }
  208. if (this.state.isIso && !this.state.ifCertificationFee) {
  209. message.warning("请选择是否包含认证费用!");
  210. return false;
  211. }
  212. if (this.state.isVip == 6) {
  213. // if (this.state.yearSum === undefined) {
  214. // message.warning("请选择会员总服务年限!");
  215. // return
  216. // }
  217. if (this.state.serviceLife.length === 0) {
  218. message.warning("请添加会员服务年限!");
  219. return
  220. }
  221. // if (this.state.serviceLife.length != this.state.yearSum) {
  222. // message.warning("会员服务年限与总年限不符合!");
  223. // return
  224. // }
  225. // if (this.state.serviceYear === undefined) {
  226. // message.warning("请选择本次派单年份!");
  227. // return
  228. // }
  229. // if (this.state.projectType == 1 && !this.state.checkType.includes(1)) {
  230. // message.warning("请勾选高新会员");
  231. // return
  232. // }
  233. if (this.state.contractTerm.length === 0 || this.state.contractTerm[1] == "") {
  234. message.warning("请填写合同期!");
  235. return
  236. }
  237. }
  238. if (this.state.isVip == 3) { //科技项目
  239. if (!this.state.technologyProjectType && this.state.technologyProjectType != 0) {
  240. message.warning("请选择科技项目!");
  241. return
  242. }
  243. }
  244. if (this.state.isVip == 8 && this.state.addProjectType != 2) { //知识产权
  245. if (!this.state.ordinaryRisk && this.state.ordinaryRisk != 0) {
  246. message.warning("请选择申请类型!");
  247. return
  248. }
  249. }
  250. if (this.state.addProjectType == 2) {
  251. if (!this.state.days && this.state.days != 0) {//天数
  252. message.warning("请选择是否加急!");
  253. return
  254. }
  255. if (!this.state.scheme && this.state.scheme != 0) {//方案
  256. message.warning("请选择是否有方案!");
  257. return
  258. }
  259. }
  260. this.setState({
  261. loading: true,
  262. });
  263. let infor = {
  264. commodityId: this.state.gid, //商品ID
  265. orderNo: this.props.orderNo, //订单编号
  266. commodityName: this.state.commodityName, //商品名称
  267. commodityQuantity: this.state.isVip == 6 ? this.state.yearSum : this.state.commodityQuantity, //商品数量
  268. commodityPrice: this.state.commodityPrice, //签单总价
  269. taskComment: this.state.taskComment, //服务说明
  270. main: this.state.main, //是否为主要项目
  271. }
  272. // 变更添加 this.props.type == "change"
  273. let type = 0;
  274. if (this.props.typeChange == 4 || this.props.typeChange == 5) {
  275. type = 1;
  276. }
  277. if (this.props.type == "change") {
  278. infor.cid = this.props.cid
  279. infor.type = type
  280. }
  281. if (this.state.displayFees === 'block') {
  282. infor.officialCost = this.state.officialCost //是否有官费
  283. infor.costReduction = (this.state.patentType === 0 || this.state.patentType === 2) ? this.state.costReduction : 0//是否有费减
  284. infor.patentType = this.state.patentType //专利类型
  285. }
  286. if (this.state.isIso) {
  287. infor.ifCertificationFee = this.state.ifCertificationFee || undefined;//是否包含认证费用
  288. }
  289. if (this.state.addProjectType == "3") {//审计
  290. infor.serviceLife = JSON.stringify(this.state.serviceLife) //服务年限
  291. infor.lastYear = new Date().getFullYear() - 1 //上年度年份
  292. infor.lastYearCapital = this.state.lastYearCapital //上年度总资本
  293. infor.lastYearIncome = this.state.lastYearIncome //上年度总收入
  294. }
  295. if (this.state.addProjectType == "5") {//高新
  296. infor.declarationBatch = this.state.declarationBatch || 1//申报批次
  297. infor.serviceYear = this.state.serviceYear //申报年份
  298. }
  299. if (this.state.isVip == 6) {//会员
  300. infor.yearSum = this.state.yearSum //会员总服务年限
  301. infor.serviceLife = JSON.stringify(this.state.serviceLife) //会员服务年限
  302. // infor.serviceYear = this.state.serviceYear //本次派单年份
  303. infor.contractTerm = JSON.stringify(this.state.contractTerm)//合同期
  304. if (this.state.projectType == 1) {
  305. infor.htMember = this.state.checkType.includes(1) ? 1 : 0
  306. infor.additionalDeduction = this.state.checkType.includes(2) ? 1 : 0
  307. infor.rdAwardsubsidy = this.state.checkType.includes(3) ? 1 : 0
  308. }
  309. }
  310. if (this.state.isVip == 3) { //科技项目
  311. infor.technologyProjectType = this.state.technologyProjectType
  312. }
  313. if (this.state.isVip == 8 && this.state.addProjectType != 2) { //知识产权
  314. infor.ordinaryRisk = this.state.ordinaryRisk
  315. }
  316. if (this.state.addProjectType == 2) {
  317. infor.days = this.state.days //天数
  318. infor.scheme = this.state.scheme //方案
  319. }
  320. $.ajax({
  321. method: "POST",
  322. dataType: "json",
  323. crossDomain: false,
  324. url: globalConfig.context +
  325. this.props.type == "change"
  326. ? "/api/admin/orderChange/addChangeTask"
  327. : "/api/admin/newOrder/addOrderTask",
  328. data: infor,
  329. }).done(
  330. function (data) {
  331. this.setState({
  332. loading: false,
  333. });
  334. if (!data.error.length) {
  335. message.success("保存成功!");
  336. if (this.state.isVip == 6) {
  337. this.setState({
  338. isEdit: true,
  339. editName: true,
  340. tid: data.data.id,
  341. })
  342. } else {
  343. this.props.onCancel();
  344. }
  345. if (this.props.type == "change") {
  346. this.setState({
  347. tid: data.data.id
  348. })
  349. }
  350. } else {
  351. message.warning(data.error[0].message);
  352. }
  353. }.bind(this)
  354. );
  355. }
  356. httpChange(e) {
  357. this.setState({
  358. commodityName: e,
  359. });
  360. if (e.length >= 1) {
  361. this.supervisor(e, false);
  362. }
  363. }
  364. //加载(自动补全)
  365. supervisor(e, state) {
  366. //客户名称与服务名称自动补全
  367. let api = state
  368. ? "/api/admin/customer/getCustomerByName"
  369. : "/api/admin/order/getBusinessProjectByName";
  370. $.ajax({
  371. method: "get",
  372. dataType: "json",
  373. crossDomain: false,
  374. url: globalConfig.context + api,
  375. data: state
  376. ? {
  377. name: e,
  378. type: this.state.customType,
  379. }
  380. : {
  381. businessName: e,
  382. },
  383. success: function (data) {
  384. let thedata = data.data;
  385. if (!thedata) {
  386. if (data.error && data.error.length) {
  387. message.warning(data.error[0].message);
  388. }
  389. thedata = {};
  390. }
  391. this.setState({
  392. states: state,
  393. customerArr: thedata,
  394. });
  395. }.bind(this),
  396. }).always(
  397. function () {
  398. }.bind(this)
  399. );
  400. }
  401. //上级主管输入框失去焦点是判断客户是否存在
  402. selectAuto(value) {
  403. const { newData, children = "splitList" } = this.props
  404. let kid = {};
  405. let fwList = this.state.customerArr;
  406. fwList.map(function (item) {
  407. if (value == item.bname) {
  408. kid = item;
  409. }
  410. });
  411. if (kid.type == "1") {
  412. this.setState({
  413. displayFees: "block",
  414. patentTransfer: kid.patentTransfer,
  415. });
  416. } else {
  417. this.setState({
  418. displayFees: "none",
  419. });
  420. }
  421. //0通用 1专利 2软著 3审计 4双软 5高新 6商标
  422. this.setState({
  423. commodityName: value,
  424. gid: kid.id,
  425. addProjectType: kid.type,
  426. isIso: value.indexOf("贯标") !== -1,// 是否为贯标项目
  427. isVip: kid.cSort,//暂时判断等于6的时候会员
  428. commodityQuantity: kid.cSort == 6 ? 1 : undefined,//服务数量
  429. histYear: [],
  430. projectType: kid.projectType, // 会员项目类型
  431. });
  432. if (newData && newData.length > 0 && kid.cSort == 6) {
  433. for (var i = newData.length - 1; i >= 0; i--) {
  434. if (newData[i].commodityId == kid.id) {
  435. if (!!newData[i][children]) {
  436. let list = []
  437. for (var j = 0; j < newData[i][children].length; j++) {
  438. list.push(newData[i][children][j].serviceYear)
  439. }
  440. this.setState({
  441. histYear: list, // 已派单
  442. })
  443. }
  444. let newCheckType = []
  445. if (newData[i].projectType == 1) {
  446. if (newData[i].htMember == 1) {
  447. newCheckType.push(1)
  448. }
  449. if (newData[i].additionalDeduction == 1) {
  450. newCheckType.push(2)
  451. }
  452. if (newData[i].rdAwardsubsidy == 1) {
  453. newCheckType.push(3)
  454. }
  455. }
  456. this.setState({
  457. commodityPrice: newData[i].commodityPrice, // 实签价格
  458. main: newData[i].main.toString(), // 是否为主要项目
  459. yearSum: !newData[i].yearSum ? "" : newData[i].yearSum, // 会员总服务年限
  460. serviceLife: !newData[i].serviceLife ? [] : JSON.parse(newData[i].serviceLife), // 会员服务年限
  461. contractTerm: (!newData[i].contractTerm || (newData[i].contractTerm.indexOf("-") == -1)) ? [] : JSON.parse(newData[i].contractTerm), // 合同期
  462. // taskComment: kid.cSort == 6 ? undefined : newData[i].taskComment, // 项目说明
  463. isEdit: true, // 不可编辑
  464. splitList: newData[i][children] || [],
  465. tid: newData[i].id, // 父级项目id
  466. projectType: newData[i].projectType, // 项目类型
  467. checkType: newCheckType, // 会员项目勾选类型
  468. })
  469. return
  470. } else {
  471. this.setState({
  472. commodityPrice: undefined,
  473. main: undefined,
  474. yearSum: undefined,
  475. serviceLife: [],
  476. contractTerm: [],
  477. taskComment: undefined,
  478. isEdit: false, // 可编辑
  479. splitList: [],
  480. })
  481. }
  482. }
  483. }
  484. }
  485. getpatentTypeList() {
  486. $.ajax({
  487. method: "get",
  488. dataType: "json",
  489. crossDomain: false,
  490. url: globalConfig.context + '/api/admin/orderProject/getPatentType',
  491. success: function (data) {
  492. if (data.error.length === 0) {
  493. this.setState({
  494. patentTypeList: data.data
  495. })
  496. } else {
  497. message.warning(data.error[0].message);
  498. };
  499. }.bind(this)
  500. });
  501. }
  502. deleteMemberSonProject(id) {
  503. const { splitList, serviceLife } = this.state
  504. $.ajax({
  505. method: "POST",
  506. dataType: "json",
  507. crossDomain: false,
  508. url: globalConfig.context + '/api/admin/orderProject/deleteMemberSonProject',
  509. data: {
  510. id,
  511. },
  512. success: function (data) {
  513. if (data.error.length === 0) {
  514. let splList = splitList
  515. for (var i = 0; i < splitList.length; i++) {
  516. if (id == splitList[i].id) {
  517. splList.splice(i, 1)
  518. }
  519. }
  520. this.setState({
  521. splitList: splList
  522. })
  523. } else {
  524. message.warning(data.error[0].message);
  525. };
  526. }.bind(this)
  527. });
  528. }
  529. handleClose(removedTag) {
  530. let serviceLife = this.state.serviceLife.filter(tag => { return tag !== removedTag });
  531. this.setState({
  532. serviceLife,
  533. commodityQuantity: serviceLife.length == 0 ? undefined : serviceLife.length,
  534. yearSum: serviceLife.length == 0 ? undefined : serviceLife.length.toString(),
  535. serviceYear: undefined
  536. });
  537. }
  538. // 添加会员子项目
  539. addMemberFirstSonProject() {
  540. // type=="change" 变更项目
  541. const { type = "" } = this.props
  542. // type=="vipAdd" 需审批的会员项目
  543. let pictureUrl = [];
  544. if (type == "vipAdd") {
  545. if (this.state.orgCodeUrl.length) {
  546. let picArr = [];
  547. this.state.orgCodeUrl.map(function (item) {
  548. if (
  549. item.response &&
  550. item.response.data &&
  551. item.response.data.length
  552. ) {
  553. picArr.push(item.response.data);
  554. }
  555. });
  556. pictureUrl = picArr.join(",");
  557. }
  558. if (this.state.memberType === undefined) {
  559. message.warning("请选择付款情况!");
  560. return
  561. }
  562. if (this.state.memberType == "1" || this.state.memberType == "2") {
  563. if (typeof pictureUrl !== "string") {
  564. message.warning("请上传附件!");
  565. return
  566. }
  567. }
  568. }
  569. if (this.state.serviceYear === undefined) {
  570. message.warning("请选择本次派单年份!");
  571. return
  572. }
  573. this.setState({
  574. loading: true,
  575. });
  576. let info = {
  577. tid: this.state.tid,
  578. serviceYear: this.state.serviceYear,
  579. taskComment: this.state.taskComment,
  580. }
  581. let changeInfo = {
  582. id: this.state.tid,
  583. serviceYear: this.state.serviceYear,
  584. taskComment: this.state.taskComment,
  585. }
  586. if (this.state.projectType == 1) {
  587. info.htMember = this.state.newCheck.includes(1) ? 1 : 0
  588. info.additionalDeduction = this.state.newCheck.includes(2) ? 1 : 0
  589. info.rdAwardsubsidy = this.state.newCheck.includes(3) ? 1 : 0
  590. changeInfo.htMember = this.state.newCheck.includes(1) ? 1 : 0
  591. changeInfo.additionalDeduction = this.state.newCheck.includes(2) ? 1 : 0
  592. changeInfo.rdAwardsubsidy = this.state.newCheck.includes(3) ? 1 : 0
  593. }
  594. let vipAddInfo = {
  595. tid: this.state.tid,
  596. serviceYear: this.state.serviceYear,//本次派单
  597. taskComment: this.state.taskComment,//服务说明
  598. memberType: this.state.memberType,//会员付款状态
  599. pictureUrl: pictureUrl.length ? pictureUrl : undefined,//附件
  600. }
  601. $.ajax({
  602. method: "POST",
  603. dataType: "json",
  604. crossDomain: false,
  605. url: globalConfig.context +
  606. type == "change"
  607. ? "/api/admin/orderChange/addMemberSonProject" : type == "vipAdd"
  608. ? "/api/admin/orderProject/addMemberSonProject" : "/api/admin/orderProject/addMemberFirstSonProject",
  609. data: type == "change" ? changeInfo : type == "vipAdd" ? vipAddInfo : info,
  610. }).done(
  611. function (data) {
  612. this.setState({
  613. loading: false,
  614. });
  615. if (!data.error.length) {
  616. message.success("添加成功!");
  617. let list = this.state.splitList
  618. let histList = this.state.histYear
  619. list.push(data.data)
  620. histList.push(data.data.serviceYear)
  621. this.setState({
  622. addFrom: false,
  623. splitList: list,
  624. histYear: histList,
  625. serviceYear: undefined,
  626. taskComment: undefined,
  627. memberType: undefined,
  628. orgCodeUrl: [],
  629. newCheck: [],
  630. checkType: this.getNewCheckType(data.data, this.state.checkType), // 临时显示
  631. })
  632. } else {
  633. message.warning(data.error[0].message);
  634. }
  635. }.bind(this)
  636. );
  637. }
  638. // 图片添加
  639. getOrgCodeUrl(e) {
  640. this.setState({ orgCodeUrl: e });
  641. }
  642. getNewCheckType(item, list = []) {
  643. let newCheckType = list
  644. if (item.htMember == 1) {
  645. newCheckType.push(1)
  646. }
  647. if (item.additionalDeduction == 1) {
  648. newCheckType.push(2)
  649. }
  650. if (item.rdAwardsubsidy == 1) {
  651. newCheckType.push(3)
  652. }
  653. return [...new Set(newCheckType)]
  654. }
  655. render() {
  656. let newOptions = this.state.customerArr.map((group, index) => (
  657. <Select.Option key={index} value={group.bname}>
  658. {group.bname}
  659. </Select.Option>
  660. ));
  661. let options = this.state.states
  662. ? this.state.customerArr.map((group) => (
  663. <Select.Option key={group.id} value={group.name}>
  664. {group.name}
  665. </Select.Option>
  666. ))
  667. : this.state.customerArr.map((group, index) => (
  668. <Select.Option key={index} value={group.bname}>
  669. {group.bname}
  670. </Select.Option>
  671. ));
  672. let children = vipYear.map(its => (
  673. <Option key={its}>{its}</Option>
  674. ));
  675. let plainOptions = this.state.projectType == 3
  676. ? [{ label: '仅提供单变会员', value: 1 },] : this.state.projectType == 2
  677. ? [{ label: '仅填报表,仅咨询,不出备查资料', value: 1 }] : this.state.projectType == 1
  678. ? [
  679. { label: '高新会员', value: 1 },
  680. { label: '加计扣除', value: 2 },
  681. { label: '研发奖补', value: 3 }
  682. ] : []
  683. const { RangePicker } = DatePicker;
  684. const { type = "" } = this.props;
  685. const { isVip, histYear, isEdit } = this.state
  686. return (
  687. <Modal
  688. maskClosable={false}
  689. visible={this.props.visible}
  690. onOk={this.props.onCancel}
  691. onCancel={this.props.onCancel}
  692. width="920px"
  693. title={"新增项目任务"}
  694. footer=""
  695. className="admin-desc-content"
  696. >
  697. <Form
  698. layout="horizontal"
  699. >
  700. <Spin spinning={this.state.loading}>
  701. <div>
  702. <div className="clearfix">
  703. {
  704. type == "vipAdd" ?
  705. <FormItem
  706. className="half-item"
  707. {...formItemLayout}
  708. label="服务名称"
  709. >
  710. <Select
  711. style={{ width: '200px' }}
  712. placeholder="请选择服务名称"
  713. value={this.state.commodityName}
  714. onChange={this.selectAuto}
  715. >
  716. {newOptions}
  717. </Select>
  718. </FormItem> :
  719. <FormItem
  720. className="half-item"
  721. {...formItemLayout}
  722. label="服务名称"
  723. >
  724. {this.state.jid ? this.state.commodityName :
  725. <AutoComplete
  726. disabled={(isVip == 6 && this.state.editName)}
  727. className="certain-category-search"
  728. dropdownClassName="certain-category-search-dropdown"
  729. dropdownMatchSelectWidth={false}
  730. style={{ width: "200px" }}
  731. dataSource={options}
  732. placeholder="输入服务名称"
  733. value={this.state.commodityName}
  734. onChange={this.httpChange}
  735. filterOption={true}
  736. onSelect={this.selectAuto}
  737. >
  738. <Input />
  739. </AutoComplete>}
  740. {<span className="mandatory">*</span>}
  741. </FormItem>
  742. }
  743. {
  744. isVip != 6 &&
  745. <FormItem
  746. className="half-item"
  747. {...formItemLayout}
  748. label="服务数量"
  749. >
  750. {
  751. <Input
  752. placeholder="请输入服务数量"
  753. disabled={isVip == 6}
  754. value={this.state.commodityQuantity}
  755. style={{ width: "200px" }}
  756. onChange={(e) => {
  757. this.setState({ commodityQuantity: e.target.value });
  758. }}
  759. ref="commodityQuantity"
  760. />
  761. }
  762. {<span className="mandatory">*</span>}
  763. </FormItem>
  764. }
  765. </div>
  766. <FormItem
  767. className="half-item"
  768. {...formItemLayout}
  769. label="实签价格(万元)"
  770. >
  771. {
  772. <Input
  773. type='number'
  774. placeholder="请输入实签价格"
  775. disabled={isEdit}
  776. value={this.state.commodityPrice}
  777. style={{ width: "200px" }}
  778. onChange={(e) => {
  779. this.setState({ commodityPrice: e.target.value });
  780. }}
  781. ref="commodityPrice"
  782. />
  783. }
  784. {<span className="mandatory">*</span>}
  785. </FormItem>
  786. <FormItem
  787. className="half-item"
  788. {...formItemLayout}
  789. label="主要业务"
  790. >
  791. {
  792. <Select
  793. placeholder="选择是否为主要业务"
  794. disabled={isEdit}
  795. style={{ width: "200px" }}
  796. value={this.state.main}
  797. onChange={(e) => {
  798. this.setState({ main: e });
  799. }}
  800. >
  801. {boutique.map(function (item) {
  802. return (
  803. <Select.Option key={item.value}>
  804. {item.key}
  805. </Select.Option>
  806. );
  807. })}
  808. </Select>
  809. }
  810. {<span className="mandatory">*</span>}
  811. </FormItem>
  812. {!this.state.patentTransfer &&
  813. <FormItem
  814. className="half-item"
  815. {...formItemLayout}
  816. label="专利类型:"
  817. style={{
  818. display: this.state.displayFees,
  819. }}
  820. >
  821. {
  822. <Select
  823. placeholder="请选择专利类型"
  824. style={{ width: "200px" }}
  825. value={this.state.patentType}
  826. onChange={(e) => {
  827. this.setState({ patentType: e });
  828. if (e !== 0 && e !== 2) {
  829. this.setState({
  830. costReduction: ''
  831. })
  832. }
  833. }}
  834. >
  835. {this.state.patentTypeList.map(function (v, k) {
  836. return (
  837. <Select.Option key={k} value={v.id}>{v.name}</Select.Option>
  838. );
  839. })}
  840. </Select>
  841. }
  842. <span style={{ color: "red", marginLeft: "8px" }}>
  843. *
  844. </span>
  845. </FormItem>}
  846. {
  847. // 知识产权
  848. isVip == 8 && this.state.addProjectType != 2 &&
  849. <div className="clearfix">
  850. <FormItem
  851. className="half-item"
  852. {...formItemLayout}
  853. label="申请"
  854. >
  855. {
  856. <Radio.Group
  857. value={this.state.ordinaryRisk}
  858. onChange={(e) => {
  859. this.setState({ ordinaryRisk: e.target.value });
  860. }}
  861. >
  862. <Radio value={0}>普通申请</Radio>
  863. <Radio value={1}>风险代理</Radio>
  864. </Radio.Group>
  865. }
  866. </FormItem>
  867. </div>
  868. }
  869. {
  870. // 软著
  871. this.state.addProjectType == 2 &&
  872. <div className="clearfix">
  873. <FormItem
  874. className="half-item"
  875. {...formItemLayout}
  876. label="天数"
  877. >
  878. {
  879. <Radio.Group
  880. value={this.state.days}
  881. onChange={(e) => {
  882. this.setState({ days: e.target.value });
  883. }}
  884. >
  885. <Radio value={0}>普通</Radio>
  886. <Radio value={1}>加急</Radio>
  887. </Radio.Group>
  888. }
  889. </FormItem>
  890. </div>
  891. }
  892. {
  893. // 软著
  894. this.state.addProjectType == 2 &&
  895. <div className="clearfix">
  896. <FormItem
  897. className="half-item"
  898. {...formItemLayout}
  899. label="方案"
  900. >
  901. {
  902. <Radio.Group
  903. value={this.state.scheme}
  904. onChange={(e) => {
  905. this.setState({ scheme: e.target.value });
  906. }}
  907. >
  908. <Radio value={0}>无方案</Radio>
  909. <Radio value={1}>有方案</Radio>
  910. </Radio.Group>
  911. }
  912. </FormItem>
  913. </div>
  914. }
  915. <div className="clearfix">
  916. <FormItem
  917. className="half-item"
  918. {...formItemLayout}
  919. label="官费:"
  920. style={{
  921. display: this.state.displayFees,
  922. }}
  923. >
  924. {
  925. <Radio.Group
  926. value={this.state.officialCost}
  927. onChange={(e) => {
  928. this.setState({ officialCost: e.target.value });
  929. if (e.target.value === 0) {
  930. this.setState({
  931. costReduction: ''
  932. })
  933. }
  934. }}
  935. >
  936. <Radio value={1}>含官费</Radio>
  937. <Radio value={0}>不含官费</Radio>
  938. </Radio.Group>
  939. }
  940. <span style={{ color: "red", marginLeft: "8px" }}>
  941. *
  942. </span>
  943. </FormItem>
  944. </div>
  945. {
  946. (this.state.patentType === 0 || this.state.patentType === 2) &&
  947. <div className="clearfix">
  948. <FormItem
  949. className="half-item"
  950. {...formItemLayout}
  951. label="费减:"
  952. style={{
  953. display: this.state.displayFees,
  954. }}
  955. >
  956. {/*专利类型不为复审或者申请时置灰*/}
  957. <Radio.Group
  958. disabled={this.state.patentType !== 0 && this.state.patentType !== 2}
  959. value={this.state.costReduction}
  960. onChange={(e) => {
  961. this.setState({ costReduction: e.target.value });
  962. }}
  963. >
  964. <Radio value={1}>有费减</Radio>
  965. <Radio value={0}>无费减</Radio>
  966. </Radio.Group>
  967. <span style={{ color: "red", marginLeft: "8px" }}>
  968. *
  969. </span>
  970. </FormItem>
  971. </div>
  972. }
  973. {
  974. //审计
  975. this.state.addProjectType == "3" &&
  976. <FormItem
  977. className="half-item"
  978. {...formItemLayout}
  979. label="服务年限"
  980. >
  981. {
  982. <Select
  983. mode="multiple"
  984. style={{ width: '200px' }}
  985. placeholder="请选择服务年限"
  986. value={this.state.serviceLife}
  987. onChange={(e) => {
  988. this.setState({
  989. serviceLife: e,
  990. })
  991. }}
  992. >
  993. {children}
  994. </Select>
  995. }
  996. {<span className="mandatory">*</span>}
  997. </FormItem>
  998. }
  999. {
  1000. // 会员合同期
  1001. isVip == 6 &&
  1002. <div className="clearfix">
  1003. <FormItem
  1004. className="half-item"
  1005. {...formItemLayout}
  1006. label="会员服务年限"
  1007. >
  1008. {
  1009. <div>
  1010. {
  1011. this.state.serviceLife.map((tag) =>
  1012. <Tag closable={!isEdit} key={tag}
  1013. afterClose={() => this.handleClose(tag)}
  1014. >{tag}</Tag>
  1015. )
  1016. }
  1017. {
  1018. !isEdit && (this.state.serviceLife.length < 10) &&
  1019. <Button
  1020. size="small"
  1021. type="primary"
  1022. style={{ marginLeft: 0 }}
  1023. onClick={() => {
  1024. this.setState({
  1025. addYears: true,
  1026. addyear: undefined,
  1027. isGive: undefined,
  1028. })
  1029. }}>
  1030. + 添加服务年限
  1031. </Button>
  1032. }
  1033. </div>
  1034. }
  1035. </FormItem>
  1036. <FormItem
  1037. className="half-item"
  1038. {...formItemLayout}
  1039. label="会员总服务年限"
  1040. >
  1041. {
  1042. !this.state.yearSum ? "" :
  1043. [
  1044. { value: "0", key: "" },
  1045. { value: "1", key: "一年" },
  1046. { value: "2", key: "二年" },
  1047. { value: "3", key: "三年" },
  1048. { value: "4", key: "四年" },
  1049. { value: "5", key: "五年" },
  1050. { value: "6", key: "六年" },
  1051. { value: "7", key: "七年" },
  1052. { value: "8", key: "八年" },
  1053. { value: "9", key: "九年" },
  1054. { value: "10", key: "十年" },
  1055. ][this.state.yearSum]["key"]
  1056. }
  1057. </FormItem>
  1058. </div>
  1059. }
  1060. {
  1061. isVip == 6 &&
  1062. <div className="clearfix">
  1063. <FormItem
  1064. className="half-item"
  1065. {...formItemLayout}
  1066. label={this.state.projectType == 3
  1067. ? '单边会员' : this.state.projectType == 2
  1068. ? '简单会员' : this.state.projectType == 1
  1069. ? '高新会员' : this.state.projectType == 0
  1070. ? '其他' : ' '}
  1071. >
  1072. <CheckboxGroup
  1073. // disabled={this.state.projectType == 3 || this.state.projectType == 2 || isEdit}
  1074. disabled
  1075. style={{ width: 200 }}
  1076. options={plainOptions}
  1077. value={this.state.checkType}
  1078. onChange={e => {
  1079. this.setState({
  1080. checkType: e
  1081. })
  1082. }}
  1083. />
  1084. </FormItem>
  1085. <FormItem
  1086. className="half-item"
  1087. {...formItemLayout}
  1088. label="合同期"
  1089. >
  1090. {
  1091. <RangePicker
  1092. style={{ width: 200 }}
  1093. disabled={isEdit}
  1094. value={[
  1095. this.state.contractTerm[0]
  1096. ? moment(this.state.contractTerm[0])
  1097. : null,
  1098. this.state.contractTerm[1]
  1099. ? moment(this.state.contractTerm[1])
  1100. : null,
  1101. ]}
  1102. onChange={(data, dataString) => {
  1103. this.setState({ contractTerm: dataString });
  1104. }}
  1105. />
  1106. }
  1107. {<span className="mandatory">*</span>}
  1108. </FormItem>
  1109. </div>
  1110. }
  1111. {
  1112. // 科技项目
  1113. isVip == 3 &&
  1114. <div className="clearfix">
  1115. <FormItem
  1116. labelCol={{ span: 4 }}
  1117. wrapperCol={{ span: 16 }}
  1118. label='科技项目'
  1119. >
  1120. <RadioGroup
  1121. onChange={e => {
  1122. this.setState({
  1123. technologyProjectType: e.target.value
  1124. })
  1125. }}
  1126. value={this.state.technologyProjectType}
  1127. >
  1128. <Radio value={3}>国家级</Radio>
  1129. <Radio value={2}>省级</Radio>
  1130. <Radio value={1}>市区级</Radio>
  1131. <Radio value={0}>简易项目</Radio>
  1132. </RadioGroup>
  1133. </FormItem>
  1134. </div>
  1135. }
  1136. {
  1137. // 审计
  1138. this.state.addProjectType == "3" &&
  1139. <div className="clearfix">
  1140. <FormItem
  1141. labelCol={{ span: 4 }}
  1142. wrapperCol={{ span: 16 }}
  1143. label=""
  1144. >
  1145. <span style={{ color: "red" }}>注:派单年度的上年度总资产和收入。如,当前为2022年,那么需要填写2021年的总资产和收入!</span>
  1146. </FormItem>
  1147. <FormItem
  1148. className="half-item"
  1149. label="企业上年度总资产(万元)"
  1150. {...formItemLayout}
  1151. >
  1152. <Input
  1153. type='number'
  1154. placeholder=""
  1155. value={this.state.lastYearCapital}
  1156. style={{ width: "200px" }}
  1157. onChange={(e) => {
  1158. this.setState({ lastYearCapital: e.target.value });
  1159. }}
  1160. />
  1161. {<span className="mandatory">*</span>}
  1162. </FormItem>
  1163. <FormItem
  1164. className="half-item"
  1165. label="企业上年度总收入(万元)"
  1166. {...formItemLayout}
  1167. >
  1168. <Input
  1169. type='number'
  1170. placeholder=""
  1171. value={this.state.lastYearIncome}
  1172. style={{ width: "200px" }}
  1173. onChange={(e) => {
  1174. this.setState({ lastYearIncome: e.target.value });
  1175. }}
  1176. />
  1177. {<span className="mandatory">*</span>}
  1178. </FormItem>
  1179. </div>
  1180. }
  1181. {
  1182. // 普通项目说明
  1183. isVip != 6 &&
  1184. <div className="clearfix">
  1185. <FormItem
  1186. labelCol={{ span: 4 }}
  1187. wrapperCol={{ span: 16 }}
  1188. label="项目说明"
  1189. >
  1190. {
  1191. <Input
  1192. type="textarea"
  1193. placeholder=""
  1194. autosize={{ minRows: 3 }}
  1195. value={this.state.taskComment}
  1196. onChange={(e) => {
  1197. this.setState({ taskComment: e.target.value });
  1198. }}
  1199. />
  1200. }
  1201. </FormItem>
  1202. </div>
  1203. }
  1204. {/*0通用 1专利 2软著 3审计 4双软 5高新 6商标*/}
  1205. {this.state.addProjectType === 5 &&
  1206. <div className="clearfix">
  1207. <FormItem
  1208. className="half-item"
  1209. {...formItemLayout}
  1210. label="企业要求申报批次"
  1211. >
  1212. {
  1213. <Select
  1214. placeholder="请选择企业要求申报批次"
  1215. style={{ width: "200px" }}
  1216. value={this.state.declarationBatch}
  1217. onChange={(e) => {
  1218. this.setState({ declarationBatch: e });
  1219. }}
  1220. >
  1221. <Select.Option value={1}>
  1222. 第一批
  1223. </Select.Option>
  1224. <Select.Option value={2}>
  1225. 第二批
  1226. </Select.Option>
  1227. <Select.Option value={3}>
  1228. 第三批
  1229. </Select.Option>
  1230. <Select.Option value={4}>
  1231. 第四批
  1232. </Select.Option>
  1233. </Select>
  1234. }
  1235. {<span className="mandatory">*</span>}
  1236. </FormItem>
  1237. <FormItem
  1238. className="half-item"
  1239. {...formItemLayout}
  1240. label="申报年份"
  1241. >
  1242. {
  1243. <Select
  1244. style={{ width: '200px' }}
  1245. placeholder="请选择申报年份"
  1246. value={this.state.serviceYear}
  1247. onChange={e => {
  1248. this.setState({
  1249. serviceYear: e,
  1250. })
  1251. }}
  1252. >
  1253. {
  1254. vipYear.map(its => (
  1255. <Option key={its}>{its}</Option>
  1256. ))
  1257. }
  1258. </Select>
  1259. }
  1260. {<span className="mandatory">*</span>}
  1261. </FormItem>
  1262. </div>
  1263. }
  1264. {
  1265. this.props.isIso || this.state.isIso ?
  1266. <div className="clearfix">
  1267. <FormItem
  1268. className="half-item"
  1269. {...formItemLayout}
  1270. label="是否包含认证费用"
  1271. >
  1272. {
  1273. <Select
  1274. placeholder="请选择是否包含认证费用"
  1275. style={{ width: "200px" }}
  1276. value={this.state.ifCertificationFee}
  1277. onChange={(e) => {
  1278. this.setState({ ifCertificationFee: e });
  1279. }}
  1280. >
  1281. <Select.Option value={"0"}>否</Select.Option>
  1282. <Select.Option value={"1"}>是</Select.Option>
  1283. </Select>
  1284. }
  1285. {<span className="mandatory">*</span>}
  1286. </FormItem>
  1287. </div> : null
  1288. }
  1289. {((isVip != 6) || (isVip == 6 && !isEdit)) &&
  1290. <div className="clearfix">
  1291. <FormItem
  1292. wrapperCol={{ span: 12, offset: 8 }}
  1293. className="half-middle"
  1294. >
  1295. <Button
  1296. className="submitSave"
  1297. type="primary"
  1298. onClick={() => {
  1299. this.onSubmit();
  1300. }}
  1301. >
  1302. 保存
  1303. </Button>
  1304. <Button
  1305. className="submitSave"
  1306. type="ghost"
  1307. onClick={this.props.onCancel}
  1308. >
  1309. 取消
  1310. </Button>
  1311. </FormItem>
  1312. </div>
  1313. }
  1314. {
  1315. // 会员项目子集列表
  1316. isEdit &&
  1317. !!this.state.splitList && this.state.splitList.length > 0 &&
  1318. this.state.splitList.map((item) =>
  1319. <div
  1320. key={item.id}
  1321. className="clearfix"
  1322. style={{
  1323. width: "100%",
  1324. borderTop: "1px dashed #000000",
  1325. padding: "10px 0"
  1326. }}
  1327. >
  1328. <FormItem
  1329. className="half-item"
  1330. {...formItemLayout}
  1331. label="本次派单"
  1332. >
  1333. {item.serviceYear}
  1334. </FormItem>
  1335. <FormItem
  1336. className="half-item"
  1337. {...formItemLayout}
  1338. label="服务数量"
  1339. >
  1340. {item.commodityQuantity}
  1341. </FormItem>
  1342. {
  1343. this.state.projectType == 1 &&
  1344. <FormItem
  1345. className="half-item"
  1346. {...formItemLayout}
  1347. label="高新会员"
  1348. >
  1349. <CheckboxGroup
  1350. disabled
  1351. style={{ width: 200 }}
  1352. options={[
  1353. { label: '高新会员', value: 1 },
  1354. { label: '加计扣除', value: 2 },
  1355. { label: '研发奖补', value: 3 }
  1356. ]}
  1357. value={this.getNewCheckType(item)}
  1358. />
  1359. </FormItem>
  1360. }
  1361. {
  1362. type == "vipAdd" &&
  1363. <FormItem
  1364. className="half-item"
  1365. {...formItemLayout}
  1366. label="付款情况"
  1367. >
  1368. {item.memberType == "0"
  1369. ? "已付会员节点全款" : item.memberType == "1"
  1370. ? "已付部分期款,需特批" : item.memberType == "2"
  1371. ? "未付款,需特批" : ""}
  1372. </FormItem>
  1373. }
  1374. {
  1375. type == "vipAdd" &&
  1376. (item.memberType == "1" || item.memberType == "2") &&
  1377. <div className="clearfix">
  1378. <FormItem
  1379. labelCol={{ span: 4 }}
  1380. wrapperCol={{ span: 16 }}
  1381. label="附件"
  1382. >
  1383. {item.pictureUrl ?
  1384. <div>
  1385. <ImgList fileList={splitUrl(item.pictureUrl, ",", globalConfig.avatarHost + "/upload")} ItemWidth={'96px'} />
  1386. </div> : <div />}
  1387. </FormItem>
  1388. </div>
  1389. }
  1390. <div className="clearfix">
  1391. <FormItem
  1392. labelCol={{ span: 4 }}
  1393. wrapperCol={{ span: 16 }}
  1394. label="项目说明"
  1395. >
  1396. {item.taskComment}
  1397. </FormItem>
  1398. </div>
  1399. </div>
  1400. )
  1401. }
  1402. {
  1403. this.state.splitList.length < this.state.yearSum &&
  1404. <div
  1405. className="clearfix"
  1406. style={{
  1407. width: "100%",
  1408. borderTop: "1px dashed #000000",
  1409. padding: "30px 0 10px 0"
  1410. }}
  1411. >
  1412. {
  1413. isEdit &&
  1414. !this.state.addFrom &&
  1415. this.state.splitList.length < this.state.yearSum &&
  1416. <div className="clearfix">
  1417. <FormItem
  1418. wrapperCol={{ span: 19, offset: 8 }}
  1419. className="half-middle"
  1420. >
  1421. <Button
  1422. type="primary"
  1423. onClick={() => {
  1424. this.setState({
  1425. addFrom: true
  1426. })
  1427. }}
  1428. >
  1429. + 添加本次派单
  1430. </Button>
  1431. <span style={{ color: "#61BBE2", marginLeft: 10 }}>请填写本次派单的年份,派单表示立即安排人员开始相关的工作!!!</span>
  1432. </FormItem>
  1433. </div>
  1434. }
  1435. {
  1436. this.state.addFrom &&
  1437. <div>
  1438. <FormItem
  1439. className="half-item"
  1440. {...formItemLayout}
  1441. label="本次派单"
  1442. >
  1443. <Select
  1444. placeholder="请选择本次派单年份"
  1445. style={{ width: "200px" }}
  1446. value={this.state.serviceYear}
  1447. onChange={(e) => {
  1448. this.setState({ serviceYear: e });
  1449. }}
  1450. >
  1451. {this.state.serviceLife.length > 0 && this.state.serviceLife.map(function (item) {
  1452. return (
  1453. <Select.Option key={item} disabled={histYear.includes(item)}>
  1454. {item}
  1455. </Select.Option>
  1456. );
  1457. })}
  1458. </Select>
  1459. {<span className="mandatory">*</span>}
  1460. </FormItem>
  1461. <FormItem
  1462. className="half-item"
  1463. {...formItemLayout}
  1464. label="服务数量"
  1465. >
  1466. <Input
  1467. placeholder="请输入服务数量"
  1468. disabled={isVip == 6}
  1469. value={1}
  1470. style={{ width: "200px" }}
  1471. // onChange={(e) => {
  1472. // this.setState({ commodityQuantity: e.target.value });
  1473. // }}
  1474. ref="commodityQuantity"
  1475. />
  1476. {<span className="mandatory">*</span>}
  1477. </FormItem>
  1478. {
  1479. this.state.projectType == 1 &&
  1480. <div className="clearfix">
  1481. <FormItem
  1482. className="half-item"
  1483. {...formItemLayout}
  1484. label={'高新会员'}
  1485. >
  1486. <CheckboxGroup
  1487. style={{ width: 200 }}
  1488. options={[
  1489. { label: '高新会员', value: 1 },
  1490. { label: '加计扣除', value: 2 },
  1491. { label: '研发奖补', value: 3 }
  1492. ]}
  1493. value={this.state.newCheck}
  1494. onChange={e => {
  1495. this.setState({
  1496. newCheck: e
  1497. })
  1498. }}
  1499. />
  1500. </FormItem>
  1501. </div>
  1502. }
  1503. {
  1504. this.props.type == "vipAdd" &&
  1505. <FormItem
  1506. className="half-item"
  1507. {...formItemLayout}
  1508. label="付款情况"
  1509. >
  1510. {
  1511. <Select
  1512. placeholder="选择付款情况"
  1513. style={{ width: "200px" }}
  1514. value={this.state.memberType}
  1515. onChange={(e) => {
  1516. this.setState({ memberType: e });
  1517. }}
  1518. >
  1519. {[
  1520. { value: "0", key: "已付会员节点全款" },
  1521. { value: "1", key: "已付部分期款,需特批" },
  1522. { value: "2", key: "未付款,需特批" }].map(function (item) {
  1523. return (
  1524. <Select.Option key={item.value}>
  1525. {item.key}
  1526. </Select.Option>
  1527. );
  1528. })}
  1529. </Select>
  1530. }
  1531. <span className="mandatory">*</span>
  1532. </FormItem>
  1533. }
  1534. {
  1535. (this.state.memberType == "1" || this.state.memberType == "2") && this.props.type == "vipAdd" &&
  1536. <div className="clearfix">
  1537. <FormItem
  1538. labelCol={{ span: 4 }}
  1539. wrapperCol={{ span: 16 }}
  1540. label="上传附件"
  1541. >
  1542. <PicturesWall
  1543. domId={'vip'}
  1544. fileList={this.getOrgCodeUrl}
  1545. pictureUrl={this.state.orgCodeUrl}
  1546. />
  1547. {<span className="mandatory">*</span>}
  1548. </FormItem>
  1549. <div style={{ color: "red", marginLeft: 144, marginBottom: 15 }}>
  1550. 特批需上传附件图,请上传客户同意我方继续服务并安排给我司付款的聊天记录截图,
  1551. <p>若没有客户同意继续服务及会安排付款的截图,特派流程将无法走下去,以免造成派单耽搁</p>
  1552. </div>
  1553. </div>
  1554. }
  1555. <div className="clearfix">
  1556. <FormItem
  1557. labelCol={{ span: 4 }}
  1558. wrapperCol={{ span: 16 }}
  1559. label="项目说明"
  1560. >
  1561. <Input
  1562. type="textarea"
  1563. placeholder=""
  1564. autosize={{ minRows: 2 }}
  1565. value={this.state.taskComment}
  1566. onChange={(e) => {
  1567. this.setState({ taskComment: e.target.value });
  1568. }}
  1569. />
  1570. </FormItem>
  1571. </div>
  1572. <div className="clearfix">
  1573. <FormItem
  1574. wrapperCol={{ span: 12, offset: 8 }}
  1575. className="half-middle"
  1576. >
  1577. <Button
  1578. className="submitSave"
  1579. type="primary"
  1580. onClick={() => { this.addMemberFirstSonProject() }}
  1581. >
  1582. 保存
  1583. </Button>
  1584. <Button
  1585. className="submitSave"
  1586. type="ghost"
  1587. onClick={() => {
  1588. this.setState({
  1589. addFrom: false
  1590. })
  1591. }}
  1592. >
  1593. 取消
  1594. </Button>
  1595. </FormItem>
  1596. </div>
  1597. </div>
  1598. }
  1599. </div>
  1600. }
  1601. </div>
  1602. </Spin>
  1603. </Form>
  1604. {
  1605. this.state.addYears &&
  1606. <Modal
  1607. title="添加服务年限"
  1608. visible={this.state.addYears}
  1609. okText="添加"
  1610. onOk={() => {
  1611. if (!this.state.addyear) {
  1612. message.warn("请选择年份!")
  1613. return
  1614. }
  1615. if (this.state.isGive == undefined) {
  1616. message.warn("请选择是否赠送!")
  1617. return
  1618. }
  1619. let slist = this.state.serviceLife
  1620. if (this.state.isGive == 0) {
  1621. slist.push(this.state.addyear)
  1622. } else if (this.state.isGive == 1) {
  1623. let newYear = this.state.addyear + "(赠)"
  1624. slist.push(newYear)
  1625. }
  1626. this.setState({
  1627. serviceLife: slist,
  1628. yearSum: slist.length.toString(),
  1629. addYears: false
  1630. })
  1631. }}
  1632. onCancel={() => {
  1633. this.setState({
  1634. addYears: false
  1635. })
  1636. }}
  1637. >
  1638. <Select
  1639. style={{ width: '200px', marginRight: 50 }}
  1640. placeholder="请选择年份"
  1641. onChange={e => {
  1642. this.setState({
  1643. addyear: e,
  1644. })
  1645. }}
  1646. >
  1647. {
  1648. vipYear.map(its => (
  1649. <Option
  1650. key={its}
  1651. disabled={this.state.serviceLife.toString().includes(its)}
  1652. >{its}</Option>
  1653. ))
  1654. }
  1655. </Select>
  1656. <RadioGroup
  1657. onChange={e => {
  1658. this.setState({
  1659. isGive: e.target.value
  1660. })
  1661. }}
  1662. value={this.state.isGive}
  1663. >
  1664. <Radio value={0}>非赠送</Radio>
  1665. <Radio value={1}>赠送</Radio>
  1666. </RadioGroup>
  1667. </Modal>
  1668. }
  1669. </Modal >
  1670. )
  1671. }
  1672. }
  1673. export default NewAddProject;