businessProject.jsx 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488
  1. import React from 'react';
  2. import $ from 'jquery/src/ajax';
  3. import '../content.less';
  4. import { citySelect, areaSelect, provinceSelect } from '../../../NewDicProvinceListAll';
  5. import { Form, Radio, Icon, Button, Input, Tabs, Select, Spin, Table, Switch, message, DatePicker, Modal, Popconfirm, Cascader } from 'antd';
  6. import { conditionOrganization, gameState } from '../../../dataDic.js';
  7. import { getCategoryState, getGameState, splitUrl, getprovince } from '../../../tools.js';
  8. import ImgList from "../../../common/imgList";
  9. import { ChooseList } from "../../order/orderNew/chooseList";
  10. const TabPane = Tabs.TabPane;
  11. const RadioGroup = Radio.Group;
  12. //图片组件
  13. const PicturesWall = React.createClass({
  14. getInitialState() {
  15. return {
  16. previewVisible: false,
  17. previewImage: '',
  18. fileList: [],
  19. }
  20. },
  21. handleCancel() {
  22. this.setState({ previewVisible: false })
  23. },
  24. handlePreview(file) {
  25. this.setState({
  26. previewImage: file.url || file.thumbUrl,
  27. previewVisible: true,
  28. });
  29. },
  30. handleChange(info) {
  31. let fileList = info.fileList;
  32. this.setState({ fileList });
  33. this.props.fileList(fileList);
  34. },
  35. componentWillReceiveProps(nextProps) {
  36. this.state.fileList = nextProps.pictureUrl;
  37. },
  38. render() {
  39. const { previewVisible, previewImage, fileList } = this.state;
  40. const uploadButton = (
  41. <div>
  42. <Icon type="plus" />
  43. <div className="ant-upload-text">点击上传</div>
  44. </div>
  45. );
  46. return (
  47. <div style={{ display: "inline-block" }}>
  48. <ImgList
  49. domId={this.props.domId}
  50. uploadConfig={{
  51. action: globalConfig.context + "/api/admin/ProjectSize/uploadPicture",
  52. data: { 'sign': this.props.pictureSign },
  53. multiple: true,
  54. listType: "picture-card",
  55. }}
  56. onChange={(infor) => {
  57. this.handleChange(infor)
  58. }}
  59. fileList={fileList}
  60. />
  61. </div>
  62. );
  63. }
  64. });
  65. //主体
  66. const BusinessProject = Form.create()(React.createClass({
  67. //搜索功能和初始列表加载
  68. loadData(pageNo, apiUrl) {
  69. this.state.data = [];
  70. this.setState({
  71. loading: true,
  72. ispage: pageNo,
  73. });
  74. let nameText = this.state.SuperArr;
  75. let superText = (this.state.cid) ? nameText[parseInt(this.state.cid)].id : "";
  76. let isCountry = '';
  77. let pro = '';
  78. let city = '';
  79. let dis = '';
  80. if (this.state.ressSearch == undefined) {
  81. } else {
  82. switch (parseInt(this.state.ressSearch.length)) {
  83. case 1: pro = this.state.ressSearch[0]; break;
  84. case 2: pro = this.state.ressSearch[0]; city = this.state.ressSearch[1]; break;
  85. case 3: pro = this.state.ressSearch[0]; city = this.state.ressSearch[1]; dis = this.state.ressSearch[2]; break;
  86. }
  87. }
  88. if (pro === 0) {
  89. isCountry = 1;
  90. pro = '';
  91. }
  92. $.ajax({
  93. method: "post",
  94. dataType: "json",
  95. crossDomain: false,
  96. url: globalConfig.context + "/api/admin/ProjectSize/listProject",
  97. data: {
  98. pageNo: pageNo || 1,
  99. pageSize: this.state.pagination.pageSize,
  100. bname: this.state.bname, //项目名称
  101. cid: superText, //品类名称
  102. country: isCountry, //是否全国
  103. province: pro, //省
  104. city: city, //市
  105. district: dis, //区
  106. activityFlag: this.state.activityFlag, //活动生效标识
  107. status: this.state.status, //项目状态
  108. type: this.state.type,
  109. },
  110. success: function (data) {
  111. let theArr = [];
  112. if (!data.data || !data.data.list) {
  113. if (data.error && data.error.length) {
  114. message.warning(data.error[0].message);
  115. }
  116. } else {
  117. for (let i = 0; i < data.data.list.length; i++) {
  118. let thisdata = data.data.list[i];
  119. let ProvinceCity = [];
  120. let isCountry = "";
  121. if (thisdata.country == 1) {
  122. isCountry = "全国";
  123. } else {
  124. if (thisdata.city == null || thisdata.city == "") {
  125. isCountry += getprovince(parseInt(thisdata.province));
  126. } else if (
  127. thisdata.district == null ||
  128. thisdata.district == ""
  129. ) {
  130. isCountry += getprovince(parseInt(thisdata.province)) + "-";
  131. isCountry += getprovince(parseInt(thisdata.city));
  132. } else {
  133. isCountry += getprovince(parseInt(thisdata.province)) + "-";
  134. isCountry += getprovince(parseInt(thisdata.city)) + "-";
  135. isCountry += getprovince(parseInt(thisdata.district));
  136. }
  137. }
  138. theArr.push({
  139. key: i,
  140. id: thisdata.id, //业务名称
  141. bname: thisdata.bname, //业务名称
  142. cname: thisdata.cname, //业务品类
  143. area: isCountry ? isCountry : ProvinceCity,
  144. price: thisdata.price, //市场价
  145. offset: thisdata.offset, //最低折扣
  146. memberPrice: thisdata.memberPrice, //会员价
  147. activityPrice: thisdata.activityPrice, //活动价
  148. activityFlag: thisdata.activityFlag, //活动生效标识
  149. status: thisdata.status, //项目状态
  150. type: thisdata.type,
  151. arrProvinceCity: ProvinceCity,
  152. });
  153. }
  154. this.state.pagination.current = data.data.pageNo;
  155. this.state.pagination.total = data.data.totalCount;
  156. }
  157. this.setState({
  158. dataSource: theArr,
  159. pagination: this.state.pagination,
  160. });
  161. }.bind(this),
  162. }).always(
  163. function () {
  164. this.setState({
  165. loading: false,
  166. });
  167. }.bind(this)
  168. );
  169. },
  170. //项目规格列表
  171. formatLoadData(pageNo, apiUrl) {
  172. this.state.data = [];
  173. this.setState({
  174. loading: true,
  175. });
  176. $.ajax({
  177. method: "get",
  178. dataType: "json",
  179. crossDomain: false,
  180. url: globalConfig.context + '/api/admin/ProjectSize/listProjectSize',
  181. data: {
  182. pageNo: pageNo || 1,
  183. pageSize: this.state.formatPagination.pageSize,
  184. pid: this.state.editId,
  185. },
  186. success: function (data) {
  187. let theArr = [];
  188. if (!data.data || !data.data.list) {
  189. if (data.error && data.error.length) {
  190. message.warning(data.error[0].message);
  191. };
  192. } else {
  193. for (let i = 0; i < data.data.list.length; i++) {
  194. let thisdata = data.data.list[i];
  195. theArr.push({
  196. key: i,
  197. formatId: thisdata.id,//规格ID
  198. formatPname: thisdata.pname,//规格名称
  199. formatBname: thisdata.bname,//项目品类
  200. formatPrice: thisdata.price,//市场价
  201. formatOffset: thisdata.offset,//最低折扣
  202. formatActivityPrice: thisdata.activityPrice,//活动价
  203. formatActivityFlag: thisdata.activityFlag,//活动生效标识
  204. formatMemberPrice: thisdata.memberPrice,//会员价
  205. formatStatus: thisdata.status,//会员价
  206. });
  207. };
  208. this.state.formatPagination.current = data.data.pageNo;
  209. this.state.formatPagination.total = data.data.totalCount;
  210. };
  211. this.setState({
  212. formatDataSource: theArr,
  213. formatPagination: this.state.formatPagination
  214. });
  215. }.bind(this),
  216. }).always(function () {
  217. this.setState({
  218. loading: false
  219. });
  220. }.bind(this));
  221. },
  222. getInitialState() {
  223. return {
  224. searchMore: true,
  225. selectedRowKeys: [],
  226. selectedRows: [],
  227. loading: false,
  228. orgCodeUrl: [],
  229. companyLogoUrl: [],
  230. pagination: {
  231. defaultCurrent: 1,
  232. defaultPageSize: 10,
  233. showQuickJumper: true,
  234. pageSize: 10,
  235. onChange: function (page) {
  236. this.loadData(page);
  237. }.bind(this),
  238. showTotal: function (total) {
  239. return "共" + total + "条数据";
  240. },
  241. },
  242. formatPagination: {
  243. defaultCurrent: 1,
  244. defaultPageSize: 10,
  245. showQuickJumper: true,
  246. pageSize: 10,
  247. onChange: function (page) {
  248. this.loadData(page);
  249. }.bind(this),
  250. showTotal: function (total) {
  251. return "共" + total + "条数据";
  252. },
  253. },
  254. ContactsLists: [
  255. {
  256. title: "业务项目名称",
  257. dataIndex: "formatBname",
  258. key: "formatBname",
  259. },
  260. {
  261. title: "规格名称",
  262. dataIndex: "formatPname",
  263. key: "formatPname",
  264. },
  265. {
  266. title: "市场价",
  267. dataIndex: "formatPrice",
  268. key: "formatPrice",
  269. },
  270. {
  271. title: "最低折扣",
  272. dataIndex: "formatOffset",
  273. key: "formatOffset",
  274. },
  275. {
  276. title: "会员价",
  277. dataIndex: "formatMemberPrice",
  278. key: "formatMemberPrice",
  279. },
  280. {
  281. title: "活动价",
  282. dataIndex: "formatActivityPrice",
  283. key: "formatActivityPrice",
  284. },
  285. {
  286. title: "活动生效标识",
  287. dataIndex: "formatActivityFlag",
  288. key: "formatActivityFlag",
  289. render: (text) => {
  290. return getGameState(text);
  291. },
  292. },
  293. {
  294. title: "状态",
  295. dataIndex: "formatStatus",
  296. key: "formatStatus",
  297. render: (text) => {
  298. return getCategoryState(text.toString());
  299. },
  300. },
  301. ],
  302. formatDataSource: [],
  303. columns: [
  304. {
  305. title: "项目名称",
  306. dataIndex: "bname",
  307. key: "bname",
  308. },
  309. {
  310. title: "业务品类",
  311. dataIndex: "cname",
  312. key: "cname",
  313. },
  314. {
  315. title: "业务地区",
  316. dataIndex: "area",
  317. key: "area",
  318. // render: text => { return getprovince(text); }
  319. },
  320. {
  321. title: "市场价",
  322. dataIndex: "price",
  323. key: "price",
  324. },
  325. {
  326. title: "最低折扣",
  327. dataIndex: "offset",
  328. key: "offset",
  329. },
  330. {
  331. title: "会员价",
  332. dataIndex: "memberPrice",
  333. key: "memberPrice",
  334. },
  335. {
  336. title: "活动价",
  337. dataIndex: "activityPrice",
  338. key: "activityPrice",
  339. },
  340. {
  341. title: "活动生效标识",
  342. dataIndex: "activityFlag",
  343. key: "activityFlag",
  344. render: (text) => {
  345. return getGameState(text);
  346. },
  347. },
  348. {
  349. title: "业务状态",
  350. dataIndex: "status",
  351. key: "status",
  352. render: (text) => {
  353. return getCategoryState(text);
  354. },
  355. },
  356. {
  357. title: "项目分类",
  358. dataIndex: "type",
  359. key: "type",
  360. render: (text, record) => {
  361. if (record.type == 0) {
  362. return "通用";
  363. } else if (record.type == 1) {
  364. return "专利";
  365. } else if (record.type == 2) {
  366. return "软著";
  367. } else if (record.type == 3) {
  368. return "审计";
  369. } else if (record.type == 4) {
  370. return "双软"
  371. } else if (record.type == 5) {
  372. return "高新"
  373. } else if (record.type == 6) {
  374. return "商标"
  375. } else if (record.type == 7) {
  376. return "会员"
  377. }
  378. },
  379. },
  380. ],
  381. dataSource: [],
  382. };
  383. },
  384. componentWillMount() {
  385. this.selectSuperId();
  386. },
  387. //获取上级品类
  388. selectSuperId() {
  389. this.state.data = []
  390. $.ajax({
  391. method: "get",
  392. dataType: "json",
  393. crossDomain: false,
  394. url: globalConfig.context + "/api/admin/ProjectSize/getAllCname",
  395. data: {
  396. flag: 0,
  397. },
  398. success: function (data) {
  399. let theArr = [];
  400. let thedata = data.data;
  401. if (!thedata) {
  402. if (data.error && data.error.length) {
  403. message.warning(data.error[0].message);
  404. };
  405. thedata = {};
  406. };
  407. var contactIds = [];
  408. for (var i = 0; i < data.data.length; i++) {
  409. let theData = data.data[i];
  410. theArr.push(
  411. <Select.Option value={i.toString()} key={theData.cname}>{theData.cname}</Select.Option>
  412. );
  413. };
  414. this.setState({
  415. SuperArr: thedata,
  416. contactsOption: theArr,
  417. orderStatusOptions: data.data,
  418. });
  419. // console.log(theArr);
  420. }.bind(this),
  421. }).always(function () {
  422. this.loadData(this.state.ispage);
  423. this.setState({
  424. loading: false
  425. });
  426. }.bind(this));
  427. },
  428. //编辑部门,保存
  429. edithandleSubmit(e) {
  430. e.preventDefault();
  431. let offsetText;
  432. if (this.state.editOffset) {
  433. if (this.state.editOffset > 10 || this.state.editOffset < 0) {
  434. message.warning('最低折扣请输入0到10之间的数字');
  435. return false;
  436. } else {
  437. offsetText = this.state.editOffset;
  438. }
  439. }
  440. this.props.form.validateFields((err, values) => {
  441. let theorgCodeUrl = [];
  442. if (this.state.orgCodeUrl.length) {
  443. let picArr = [];
  444. this.state.orgCodeUrl.map(function (item) {
  445. if (item.response && item.response.data && item.response.data.length) {
  446. picArr.push(item.response.data);
  447. }
  448. });
  449. theorgCodeUrl = picArr.join(",");
  450. };
  451. let thecompanyLogoUrl = [];
  452. if (this.state.companyLogoUrl.length) {
  453. let picArr = [];
  454. this.state.companyLogoUrl.map(function (item) {
  455. if (item.response && item.response.data && item.response.data.length) {
  456. picArr.push(item.response.data);
  457. }
  458. });
  459. thecompanyLogoUrl = picArr.join(",");
  460. };
  461. if (!err) {
  462. this.setState({
  463. loading: true
  464. });
  465. let nameText = this.state.SuperArr
  466. // let num = 0
  467. // nameText.forEach((item,index) => {
  468. // if(item.cname == this.state.editCname) {
  469. // num = index
  470. // }
  471. // })
  472. // let superText=(this.state.editCname.length==1)?nameText[parseInt(this.state.editCname)].id:this.state.editCid;
  473. // let superText=nameText[parseInt(this.state.editCname)].id
  474. let arr = nameText.filter((v, k) => v.cname === this.state.editCname || String(k) === this.state.editCname)
  475. let superText = arr.length ? arr[0].id : "";
  476. let isCountry = 0;
  477. let pro = '';
  478. let city = '';
  479. let dis = '';
  480. if (this.state.ProvinceCity == undefined || this.state.ProvinceCity.length == 0) {
  481. message.warning('请选择项目有效范围');
  482. this.setState({
  483. loading: false
  484. });
  485. return false;
  486. } else {
  487. switch (parseInt(this.state.ProvinceCity.length)) {
  488. case 1: pro = this.state.ProvinceCity[0]; break;
  489. case 2: pro = this.state.ProvinceCity[0]; city = this.state.ProvinceCity[1]; break;
  490. case 3: pro = this.state.ProvinceCity[0]; city = this.state.ProvinceCity[1]; dis = this.state.ProvinceCity[2]; break;
  491. }
  492. }
  493. if (pro == 0) {
  494. isCountry = 1;
  495. pro = '';
  496. }
  497. $.ajax({
  498. method: "post",
  499. dataType: "json",
  500. crossDomain: false,
  501. url: globalConfig.context + '/api/admin/ProjectSize/updateProject',
  502. data: {
  503. id: this.state.editId,//项目ID
  504. cid: superText,//项目业务品类
  505. bname: this.state.editName,//业务项目名称
  506. price: this.state.editPrice,//市场价
  507. firstPayment: this.state.firstPayment,//首付金额
  508. offset: offsetText,//最低折扣
  509. activityPrice: this.state.editActivityPrice,//活动价
  510. activityFlag: this.state.editActivityFlag,//活动生效标识
  511. memberPrice: this.state.editMemberPrice,//项目ID
  512. status: this.state.editStatus,//项目状态
  513. patentTransfer: this.state.typeStatus == 1 ? this.state.patentTransfer : undefined,
  514. type: this.state.typeStatus,//项目分类
  515. country: isCountry,//是否全国
  516. province: pro ? pro : '',//省
  517. city: city ? city : '',//市
  518. district: dis ? dis : '',//区
  519. minLogo: theorgCodeUrl,
  520. maxLogo: thecompanyLogoUrl,
  521. introduce: this.state.editIntroduce,//项目介绍
  522. projectUrl: this.state.editProjectUrl,//项目地址
  523. valueEffect: this.state.editValueEffect,//项目价值及作用
  524. clientSize: this.state.editClientSize,//项目基本条件
  525. boutique: this.state.editBoutique,
  526. }
  527. }).done(function (data) {
  528. this.setState({
  529. loading: false
  530. });
  531. if (!data.error.length) {
  532. message.success('保存成功!');
  533. this.edithandleCancel();
  534. this.selectSuperId();
  535. } else {
  536. message.warning(data.error[0].message);
  537. }
  538. }.bind(this));
  539. }
  540. })
  541. },
  542. //规格列表整行点击
  543. formatTableRowClick(record, index) {
  544. this.editformatClick();
  545. this.state.RowData = record;
  546. this.setState({
  547. selectedRowKeys: [],
  548. formatId: record.formatId,//规格名称
  549. formatPname: record.formatPname,//规格名称
  550. formatPrice: record.formatPrice,//市场价
  551. formatOffset: record.formatOffset,//最低折扣
  552. formatActivityPrice: record.formatActivityPrice,//活动价
  553. formatActivityFlag: record.formatActivityFlag,//活动生效标识
  554. formatMemberPrice: record.formatMemberPrice,//会员价
  555. formatStatus: record.formatStatus.toString(),//项目状态
  556. });
  557. },
  558. //项目列表整行点击
  559. tableRowClick(record, index) {
  560. this.selectSuperId();
  561. this.state.RowData = record;
  562. this.setState({
  563. callnub: '1',
  564. editvisible: true,
  565. selectedRowKeys: [],
  566. rowId: record.businessId,
  567. });
  568. $.ajax({
  569. method: "get",
  570. dataType: "json",
  571. crossDomain: false,
  572. url: globalConfig.context + "/api/admin/ProjectSize/orgProject",
  573. data: {
  574. id: record.id
  575. },
  576. success: function (data) {
  577. let theArr = [];
  578. let ProvinceCity = [];
  579. let thisdata = data.data;
  580. if (!data) {
  581. if (data.error && data.error.length) {
  582. message.warning(data.error[0].message);
  583. };
  584. } else {
  585. if (thisdata.country == 1) {
  586. ProvinceCity.push(0);
  587. } else {
  588. ProvinceCity.push(parseInt(thisdata.province));
  589. ProvinceCity.push(parseInt(thisdata.city));
  590. ProvinceCity.push(parseInt(thisdata.district));
  591. }
  592. let str = ""
  593. if (thisdata.type == 0) {
  594. str = "通用"
  595. } else if (thisdata.type == 1) {
  596. str = "专利"
  597. } else if (thisdata.type == 2) {
  598. str = "软著"
  599. } else if (thisdata.type == 3) {
  600. str = "审计"
  601. } else if (thisdata.type == 4) {
  602. str = "双软"
  603. } else if (thisdata.type == 5) {
  604. str = "高新"
  605. } else if (thisdata.type == 6) {
  606. str = "商标"
  607. } else if (thisdata.type == 7) {
  608. str = "会员"
  609. } else if (thisdata.type == 8) {
  610. str = "投标"
  611. }
  612. theArr.push({
  613. editId: thisdata.id,//每一条记录的ID
  614. editName: thisdata.bname,//项目名称
  615. editCname: thisdata.cname,//项目分类
  616. editCid: thisdata.cid,//项目分类
  617. editCountry: thisdata.country,//是否全国
  618. editProvince: thisdata.province,//省
  619. editCity: thisdata.city,//市
  620. editDistrict: thisdata.district,//区
  621. editPrice: thisdata.price,//市场价
  622. firstPayment: thisdata.firstPayment,//首付金额
  623. editActivityPrice: thisdata.activityPrice,//活动价
  624. editOffset: thisdata.offset,//最低折扣
  625. editMemberPrice: thisdata.memberPrice,//会员价
  626. editActivityFlag: thisdata.activityFlag,//活动生效标识
  627. editStatus: thisdata.status,//品类状态
  628. patentTransfer: thisdata.patentTransfer ? 1 : 0,
  629. typeStr: str,
  630. typeStatus: thisdata.type,
  631. editCreateId: thisdata.createName,//创建人
  632. editTime: thisdata.createTimeFormattedDate,//创建时间
  633. editIntroduce: thisdata.introduce,//服务内容
  634. editProjectUrl: thisdata.projectUrl,//项目地址
  635. editValueEffect: thisdata.valueEffect,//价值及作用
  636. editClientSize: thisdata.clientSize,//基本条件
  637. editBoutique: thisdata.boutique,//是否精品
  638. orgCodeUrl: thisdata.minLogo ? splitUrl(thisdata.minLogo, ',', globalConfig.avatarHost + '/upload') : [],
  639. cditCompanyLogoUrl: thisdata.maxLogo ? splitUrl(thisdata.maxLogo, ',', globalConfig.avatarHost + '/upload') : [],
  640. });
  641. };
  642. //0 正常 1专利 2软著 3审计 4双软 5高新 6商标
  643. let str = ""
  644. if (thisdata.type == 0) {
  645. str = "通用"
  646. } else if (thisdata.type == 1) {
  647. str = "专利"
  648. } else if (thisdata.type == 2) {
  649. str = "软著"
  650. } else if (thisdata.type == 3) {
  651. str = "审计"
  652. } else if (thisdata.type == 4) {
  653. str = "双软"
  654. } else if (thisdata.type == 5) {
  655. str = "高新"
  656. } else if (thisdata.type == 6) {
  657. str = "商标"
  658. } else if (thisdata.type == 7) {
  659. str = "会员"
  660. } else if (thisdata.type == 8) {
  661. str = "投标"
  662. }
  663. this.setState({
  664. editId: thisdata.id, //每一条记录的ID
  665. editName: thisdata.bname, //项目名称
  666. editCname: thisdata.cname, //项目分类
  667. editCid: thisdata.cid, //项目分类
  668. editCountry: thisdata.country, //是否全国
  669. editProvince: thisdata.province, //省
  670. editCity: thisdata.city, //市
  671. editDistrict: thisdata.district, //区
  672. editPrice: thisdata.price, //市场价
  673. firstPayment: thisdata.firstPayment,
  674. editActivityPrice: thisdata.activityPrice, //活动价
  675. editOffset: thisdata.offset, //最低折扣
  676. editMemberPrice: thisdata.memberPrice, //会员价
  677. editActivityFlag: thisdata.activityFlag, //活动生效标识
  678. editStatus: thisdata.status, //品类状态
  679. patentTransfer: thisdata.patentTransfer ? 1 : 0,
  680. typeStr: str,
  681. typeStatus: thisdata.type,
  682. editCreateId: thisdata.createName, //创建人
  683. editTime: thisdata.createTimeFormattedDate, //创建时间
  684. editIntroduce: thisdata.introduce, //服务内容
  685. editProjectUrl: thisdata.projectUrl, //项目地址
  686. editValueEffect: thisdata.valueEffect, //价值及作用
  687. editClientSize: thisdata.clientSize, //基本条件
  688. editBoutique: thisdata.boutique, //是否精品
  689. orgCodeUrl: thisdata.minLogo
  690. ? splitUrl(
  691. thisdata.minLogo,
  692. ",",
  693. globalConfig.avatarHost + "/upload"
  694. )
  695. : [],
  696. companyLogoUrl: thisdata.maxLogo
  697. ? splitUrl(
  698. thisdata.maxLogo,
  699. ",",
  700. globalConfig.avatarHost + "/upload"
  701. )
  702. : [],
  703. editDataSource: theArr,
  704. ProvinceCity: ProvinceCity
  705. });
  706. }.bind(this),
  707. }).always(function () {
  708. this.setState({
  709. loading: false
  710. });
  711. }.bind(this));
  712. },
  713. //左侧图片地址
  714. getOrgCodeUrl(e) {
  715. this.setState({ orgCodeUrl: e });
  716. },
  717. //右侧图片地址
  718. getCompanyLogoUrl(e) {
  719. this.setState({ companyLogoUrl: e });
  720. },
  721. //编辑一个规格,保存
  722. editformathandleSubmit(e) {
  723. e.preventDefault();
  724. let offsetText;
  725. if (this.state.formatOffset) {
  726. if (this.state.formatOffset > 10 || this.state.formatOffset < 0) {
  727. message.warning('最低折扣请输入0到10之间的数字');
  728. return false;
  729. } else {
  730. offsetText = this.state.formatOffset;
  731. }
  732. }
  733. this.props.form.validateFields((err, values) => {
  734. if (!err) {
  735. this.setState({
  736. loading: true
  737. });
  738. $.ajax({
  739. method: "post",
  740. dataType: "json",
  741. crossDomain: false,
  742. url: globalConfig.context + '/api/admin/ProjectSize/orgProjectSize',
  743. data: {
  744. id: this.state.formatId,//项目ID
  745. pname: this.state.formatPname,//规格名称
  746. price: this.state.formatPrice,//市场价
  747. offset: offsetText,//最低折扣
  748. activityPrice: this.state.formatActivityPrice,//活动价
  749. activityFlag: this.state.formatActivityFlag,//活动生效标识
  750. memberPrice: this.state.formatMemberPrice,//会员价
  751. status: this.state.formatStatus,//项目状态
  752. }
  753. }).done(function (data) {
  754. this.setState({
  755. loading: false
  756. });
  757. if (!data.error.length) {
  758. message.success('修改规格成功!');
  759. this.formatLoadData();
  760. this.editformathandleCancel();
  761. } else {
  762. message.warning(data.error[0].message);
  763. }
  764. }.bind(this));
  765. }
  766. });
  767. },
  768. //新增一个规格,保存
  769. formathandleSubmit(e) {
  770. e.preventDefault();
  771. let offsetText;
  772. if (this.state.formatOffset) {
  773. if (this.state.formatOffset > 10 || this.state.formatOffset < 0) {
  774. message.warning('最低折扣请输入0到10之间的数字');
  775. return false;
  776. } else {
  777. offsetText = this.state.formatOffset;
  778. }
  779. }
  780. this.props.form.validateFields((err, values) => {
  781. if (!err) {
  782. this.setState({
  783. loading: true
  784. });
  785. $.ajax({
  786. method: "post",
  787. dataType: "json",
  788. crossDomain: false,
  789. url: globalConfig.context + '/api/admin/ProjectSize/addProjectSize',
  790. data: {
  791. pid: this.state.editId,//项目ID
  792. pname: this.state.formatPname,//规格名称
  793. price: this.state.formatPrice,//市场价
  794. offset: offsetText,//最低折扣
  795. activityPrice: this.state.formatActivityPrice,//活动价
  796. activityFlag: this.state.formatActivityFlag,//活动生效标识
  797. memberPrice: this.state.formatMemberPrice,//会员价
  798. status: this.state.formatStatus,//项目状态
  799. }
  800. }).done(function (data) {
  801. this.setState({
  802. loading: false
  803. });
  804. if (!data.error.length) {
  805. message.success('新增规格成功!');
  806. this.formathandleCancel();
  807. this.formatLoadData();
  808. } else {
  809. message.warning(data.error[0].message);
  810. }
  811. }.bind(this));
  812. }
  813. });
  814. },
  815. //新增一个项目,保存
  816. addhandleSubmit(e) {
  817. e.preventDefault();
  818. if (!this.state.categoryName) {
  819. message.warning('请输入项目名称');
  820. return false;
  821. }
  822. if (!this.state.addCid) {
  823. message.warning('请选择项目品类');
  824. return false;
  825. }
  826. let isCountry = 0;
  827. let pro = '';
  828. let city = '';
  829. let dis = '';
  830. if (this.state.ProvinceCity == undefined) {
  831. message.warning('请选择项目有效范围');
  832. return false;
  833. } else {
  834. switch (parseInt(this.state.ProvinceCity.length)) {
  835. case 1: pro = this.state.ProvinceCity[0]; break;
  836. case 2: pro = this.state.ProvinceCity[0]; city = this.state.ProvinceCity[1]; break;
  837. case 3: pro = this.state.ProvinceCity[0]; city = this.state.ProvinceCity[1]; dis = this.state.ProvinceCity[2]; break;
  838. }
  839. }
  840. if (pro == 0) {
  841. isCountry = 1;
  842. pro = '';
  843. }
  844. this.props.form.validateFields((err, values) => {
  845. if (!err) {
  846. this.setState({
  847. loading: true
  848. });
  849. //上级组织字典
  850. let nameText = this.state.SuperArr;
  851. let superText = nameText[parseInt(this.state.addCid)].id;
  852. $.ajax({
  853. method: "post",
  854. dataType: "json",
  855. crossDomain: false,
  856. url: globalConfig.context + '/api/admin/ProjectSize/addProject',
  857. data: {
  858. bname: this.state.categoryName,//项目名称
  859. cid: superText,//品类类ID
  860. boutique: this.state.boutique ? this.state.boutique : '0',
  861. country: isCountry,//是否全国
  862. province: pro,//省
  863. city: city,//市
  864. district: dis,//区
  865. }
  866. }).done(function (data) {
  867. this.setState({
  868. loading: false
  869. });
  870. if (!data.error.length) {
  871. message.success('新增项目成功!');
  872. this.handleCancel();
  873. this.selectSuperId();
  874. } else {
  875. message.warning(data.error[0].message);
  876. }
  877. }.bind(this));
  878. }
  879. });
  880. },
  881. //项目整行删除
  882. delectRow() {
  883. let deletedIds = '';
  884. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  885. let rowItem = this.state.selectedRows[idx];
  886. if (rowItem.id) {
  887. deletedIds = rowItem.id;
  888. };
  889. };
  890. this.setState({
  891. selectedRowKeys: [],
  892. loading: deletedIds.length > 0
  893. });
  894. $.ajax({
  895. method: "get",
  896. dataType: "json",
  897. crossDomain: false,
  898. url: globalConfig.context + "/api/admin/ProjectSize/deleteProject",
  899. data: {
  900. id: deletedIds
  901. }
  902. }).done(function (data) {
  903. if (!data.error.length) {
  904. message.success('删除成功!');
  905. this.setState({
  906. loading: false,
  907. });
  908. } else {
  909. message.warning(data.error[0].message);
  910. };
  911. this.selectSuperId();
  912. }.bind(this));
  913. },
  914. //项目整行停用
  915. blockRow() {
  916. let deletedIds = '';
  917. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  918. let rowItem = this.state.selectedRows[idx];
  919. if (rowItem.id) {
  920. deletedIds = rowItem.id;
  921. };
  922. };
  923. this.setState({
  924. selectedRowKeys: [],
  925. loading: deletedIds.length > 0
  926. });
  927. $.ajax({
  928. method: "get",
  929. dataType: "json",
  930. crossDomain: false,
  931. url: globalConfig.context + "/api/admin/ProjectSize/stopProject",
  932. data: {
  933. id: deletedIds
  934. }
  935. }).done(function (data) {
  936. if (!data.error.length) {
  937. message.success('该项目已成功停用!');
  938. this.setState({
  939. loading: false,
  940. });
  941. } else {
  942. message.warning(data.error[0].message);
  943. };
  944. this.selectSuperId();
  945. }.bind(this));
  946. },
  947. //规格整行删除
  948. delectRowSize() {
  949. let deletedIds = '';
  950. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  951. let rowItem = this.state.selectedRows[idx];
  952. if (rowItem.formatId) {
  953. deletedIds = rowItem.formatId;
  954. };
  955. };
  956. this.setState({
  957. selectedRowKeys: [],
  958. loading: deletedIds.length > 0
  959. });
  960. $.ajax({
  961. method: "get",
  962. dataType: "json",
  963. crossDomain: false,
  964. url: globalConfig.context + "/api/admin/ProjectSize/deleteProjectSize",
  965. data: {
  966. id: deletedIds
  967. }
  968. }).done(function (data) {
  969. if (!data.error.length) {
  970. message.success('删除成功!');
  971. this.setState({
  972. loading: false,
  973. });
  974. } else {
  975. message.warning(data.error[0].message);
  976. };
  977. this.formatLoadData();
  978. }.bind(this));
  979. },
  980. //规格整行停用
  981. blockRowSize() {
  982. let deletedIds = '';
  983. for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
  984. let rowItem = this.state.selectedRows[idx];
  985. if (rowItem.formatId) {
  986. deletedIds = rowItem.formatId;
  987. };
  988. };
  989. this.setState({
  990. selectedRowKeys: [],
  991. loading: deletedIds.length > 0
  992. });
  993. $.ajax({
  994. method: "get",
  995. dataType: "json",
  996. crossDomain: false,
  997. url: globalConfig.context + "/api/admin/ProjectSize/stopProjectSize",
  998. data: {
  999. id: deletedIds
  1000. }
  1001. }).done(function (data) {
  1002. if (!data.error.length) {
  1003. message.success('该项目已成功停用!');
  1004. this.setState({
  1005. loading: false,
  1006. });
  1007. } else {
  1008. message.warning(data.error[0].message);
  1009. };
  1010. this.formatLoadData();
  1011. }.bind(this));
  1012. },
  1013. addClick() {
  1014. this.state.RowData = {};
  1015. this.setState({
  1016. visible: true
  1017. });
  1018. this.addReset();
  1019. },
  1020. editClick(e) {
  1021. this.state.RowData = {};
  1022. this.setState({
  1023. editvisible: true
  1024. });
  1025. },
  1026. formatClick(e) {
  1027. this.formatReset();
  1028. this.state.RowData = {};
  1029. this.setState({
  1030. formatvisible: true
  1031. });
  1032. },
  1033. editformatClick(e) {
  1034. this.state.RowData = {};
  1035. this.setState({
  1036. editformatvisible: true
  1037. });
  1038. },
  1039. handleCancel() {
  1040. this.setState({ visible: false })
  1041. },
  1042. edithandleCancel(e) {
  1043. this.setState({
  1044. editvisible: false
  1045. });
  1046. },
  1047. formathandleCancel(e) {
  1048. this.setState({
  1049. formatvisible: false
  1050. });
  1051. },
  1052. editformathandleCancel(e) {
  1053. this.setState({
  1054. editformatvisible: false
  1055. });
  1056. },
  1057. search() {
  1058. this.loadData();
  1059. },
  1060. //搜索部分的清零
  1061. reset() {
  1062. this.state.bname = '';//项目名称清零
  1063. this.state.cid = undefined;//品类名称清零
  1064. this.state.ressSearch = undefined;//省市区清零
  1065. this.state.activityFlag = undefined;//活动生效清零
  1066. this.state.status = undefined;//项目状态清零
  1067. this.state.type = undefined;//项目分类清零
  1068. this.loadData();
  1069. },
  1070. //新增部分的清零
  1071. addReset() {
  1072. this.state.categoryName = '';//项目名称清零
  1073. this.state.ProvinceCity = undefined;
  1074. this.state.addCid = undefined;
  1075. this.state.boutique = '';
  1076. },
  1077. //规格新增清零
  1078. formatReset() {
  1079. this.state.formatPname = '';//规格名称清零
  1080. this.state.formatPrice = '';//市场价清零
  1081. this.state.formatOffset = '';//最低折扣清零
  1082. this.state.formatActivityPrice = '';//活动价清零
  1083. this.state.formatMemberPrice = '';//会员价清零
  1084. this.state.formatActivityFlag = undefined;//活动生效标识清零
  1085. this.state.formatStatus = undefined;//项目状态清零
  1086. this.formatLoadData();
  1087. },
  1088. //详情tab切换数据处理
  1089. callback(e) {
  1090. this.setState({
  1091. callnub: e,
  1092. })
  1093. if (e == 1) {
  1094. }
  1095. if (e == 2) {
  1096. this.formatLoadData();
  1097. }
  1098. },
  1099. //更多搜索的显示与否
  1100. searchSwitch() {
  1101. this.setState({
  1102. searchMore: !this.state.searchMore
  1103. });
  1104. },
  1105. changeList(arr) {
  1106. const newArr = [];
  1107. this.state.columns.forEach(item => {
  1108. arr.forEach(val => {
  1109. if (val === item.title) {
  1110. newArr.push(item);
  1111. }
  1112. });
  1113. });
  1114. this.setState({
  1115. changeList: newArr
  1116. });
  1117. },
  1118. render() {
  1119. const FormItem = Form.Item
  1120. const rowSelection = {
  1121. selectedRowKeys: this.state.selectedRowKeys,
  1122. onChange: (selectedRowKeys, selectedRows) => {
  1123. this.setState({
  1124. selectedRows: selectedRows.slice(-1),
  1125. selectedRowKeys: selectedRowKeys.slice(-1)
  1126. });
  1127. }
  1128. };
  1129. const formItemLayout = {
  1130. labelCol: { span: 8 },
  1131. wrapperCol: { span: 14 },
  1132. };
  1133. const { getFieldDecorator } = this.props.form;
  1134. const hasSelected = this.state.selectedRowKeys.length > 0;
  1135. const { RangePicker } = DatePicker;
  1136. return (
  1137. <div className="user-content">
  1138. <div className="content-title">
  1139. <Tabs
  1140. defaultActiveKey="1"
  1141. className="test"
  1142. >
  1143. <TabPane tab="搜索" key="1">
  1144. <div className="user-search">
  1145. <Input
  1146. placeholder="业务项目名称"
  1147. style={{
  1148. width: "150px",
  1149. marginRight: "10px",
  1150. marginBottom: "10px",
  1151. marginLeft: 10,
  1152. }}
  1153. value={this.state.bname}
  1154. onChange={(e) => {
  1155. this.setState({ bname: e.target.value });
  1156. }}
  1157. />
  1158. <Select
  1159. placeholder="业务品类"
  1160. style={{ width: "200px", marginRight: "10px" }}
  1161. value={this.state.cid}
  1162. onChange={(e) => {
  1163. this.setState({ cid: e });
  1164. }}
  1165. notFoundContent="未获取到上级品类列表"
  1166. >
  1167. {this.state.contactsOption}
  1168. </Select>
  1169. <Button
  1170. type="primary"
  1171. onClick={this.search}
  1172. style={{ marginRight: "10px" }}
  1173. >
  1174. 搜索
  1175. </Button>
  1176. <Button
  1177. onClick={this.reset}
  1178. style={{ marginRight: "10px" }}
  1179. >
  1180. 重置
  1181. </Button>
  1182. <Popconfirm
  1183. title="是否删除?"
  1184. onConfirm={this.delectRow}
  1185. okText="是"
  1186. cancelText="否"
  1187. >
  1188. <Button
  1189. style={{
  1190. background: "#ea0862",
  1191. border: "none",
  1192. color: "#fff",
  1193. marginRight: "10px",
  1194. marginLeft: "10px",
  1195. }}
  1196. disabled={!hasSelected}
  1197. >
  1198. 删除
  1199. <Icon type="minus" />
  1200. </Button>
  1201. </Popconfirm>
  1202. <Popconfirm
  1203. title="是否停用?"
  1204. onConfirm={this.blockRow}
  1205. okText="是"
  1206. cancelText="否"
  1207. >
  1208. <Button
  1209. style={{
  1210. background: "#ea0862",
  1211. border: "none",
  1212. color: "#fff",
  1213. marginRight: "10px",
  1214. marginLeft: "10px",
  1215. display: "none",
  1216. }}
  1217. disabled={!hasSelected}
  1218. >
  1219. 停用
  1220. <Icon type="minus" />
  1221. </Button>
  1222. </Popconfirm>
  1223. <span style={{ marginRight: "20px" }}>
  1224. 更多搜索{" "}
  1225. <Switch
  1226. defaultChecked={false}
  1227. onChange={this.searchSwitch}
  1228. />
  1229. </span>
  1230. <div
  1231. className="search-more"
  1232. style={
  1233. this.state.searchMore
  1234. ? { display: "none" }
  1235. : { display: "block" }
  1236. }
  1237. >
  1238. <span
  1239. style={{
  1240. marginRight: "10px",
  1241. marginBottom: "10px",
  1242. marginLeft: 10,
  1243. }}
  1244. >
  1245. <Cascader
  1246. options={provinceSelect()}
  1247. value={this.state.ressSearch}
  1248. placeholder="选择省份"
  1249. onChange={(e, pre) => {
  1250. this.setState({ ressSearch: e });
  1251. }}
  1252. />
  1253. </span>
  1254. <span
  1255. style={{ marginRight: "10px", marginBottom: "10px" }}
  1256. >
  1257. <Cascader
  1258. options={citySelect()}
  1259. value={this.state.ressSearch}
  1260. placeholder="选择城市"
  1261. onChange={(e, pre) => {
  1262. this.setState({ ressSearch: e });
  1263. }}
  1264. />
  1265. </span>
  1266. <span style={{ marginRight: "10px" }}>
  1267. <Cascader
  1268. options={areaSelect()}
  1269. value={this.state.ressSearch}
  1270. placeholder="选择地区"
  1271. onChange={(e, pre) => {
  1272. this.setState({ ressSearch: e });
  1273. }}
  1274. />
  1275. </span>
  1276. <Select
  1277. placeholder="活动生效标识"
  1278. style={{
  1279. width: "150px",
  1280. marginRight: "10px",
  1281. marginBottom: "10px",
  1282. }}
  1283. value={this.state.activityFlag}
  1284. onChange={(e) => {
  1285. this.setState({ activityFlag: e });
  1286. }}
  1287. >
  1288. <Select.Option value="0">有效</Select.Option>
  1289. <Select.Option value="1">无效</Select.Option>
  1290. </Select>
  1291. <Select
  1292. placeholder="项目状态"
  1293. style={{ width: "150px", marginRight: "10px" }}
  1294. value={this.state.status}
  1295. onChange={(e) => {
  1296. this.setState({ status: e });
  1297. }}
  1298. >
  1299. <Select.Option value="0">正常</Select.Option>
  1300. <Select.Option value="1">停用</Select.Option>
  1301. </Select>
  1302. <Select
  1303. placeholder="项目分类"
  1304. style={{ width: "150px", marginRight: "10px" }}
  1305. value={this.state.type}
  1306. onChange={(e) => {
  1307. this.setState({ type: e });
  1308. }}
  1309. >
  1310. <Select.Option value="0">通用</Select.Option>
  1311. <Select.Option value="1">专利</Select.Option>
  1312. <Select.Option value="2">软著</Select.Option>
  1313. <Select.Option value="3">审计</Select.Option>
  1314. <Select.Option value="4">双软</Select.Option>
  1315. <Select.Option value="5">高新</Select.Option>
  1316. <Select.Option value="6">商标</Select.Option>
  1317. <Select.Option value="7">会员</Select.Option>
  1318. </Select>
  1319. </div>
  1320. </div>
  1321. </TabPane>
  1322. <TabPane tab="新增项目" key="2">
  1323. <Button
  1324. type="primary"
  1325. className="addButton"
  1326. onClick={this.addClick}
  1327. style={{
  1328. float: "left",
  1329. marginRight: "50px",
  1330. marginLeft: 10,
  1331. marginBottom: 10,
  1332. }}
  1333. >
  1334. 新增项目
  1335. <Icon type="plus" />
  1336. </Button>
  1337. </TabPane>
  1338. <TabPane tab="更改表格显示数据" key="3">
  1339. <div style={{ marginLeft: 10 }}>
  1340. <ChooseList
  1341. columns={this.state.columns}
  1342. changeFn={this.changeList}
  1343. changeList={this.state.changeList}
  1344. top={55}
  1345. margin={11}
  1346. />
  1347. </div>
  1348. </TabPane>
  1349. </Tabs>
  1350. <div className="patent-table">
  1351. <Spin spinning={this.state.loading}>
  1352. <Table
  1353. size="middle"
  1354. columns={
  1355. this.state.changeList
  1356. ? this.state.changeList
  1357. : this.state.columns
  1358. }
  1359. dataSource={this.state.dataSource}
  1360. rowSelection={rowSelection}
  1361. pagination={this.state.pagination}
  1362. onRowClick={this.tableRowClick}
  1363. current={this.state.aa}
  1364. />
  1365. </Spin>
  1366. </div>
  1367. <div className="patent-desc">
  1368. <Modal
  1369. maskClosable={false}
  1370. visible={this.state.visible}
  1371. onOk={this.checkPatentProcess}
  1372. onCancel={this.handleCancel}
  1373. width="400px"
  1374. title="新增业务项目"
  1375. footer=""
  1376. className="admin-desc-content"
  1377. >
  1378. <Form
  1379. horizontal
  1380. onSubmit={this.addhandleSubmit}
  1381. id="demand-form"
  1382. >
  1383. <Spin spinning={this.state.loading}>
  1384. <div className="clearfix">
  1385. <FormItem
  1386. labelCol={{ span: 7 }}
  1387. wrapperCol={{ span: 12 }}
  1388. label="业务项目名称"
  1389. >
  1390. <Input
  1391. placeholder="业务项目名称"
  1392. value={this.state.categoryName}
  1393. style={{ width: "94%" }}
  1394. onChange={(e) => {
  1395. this.setState({ categoryName: e.target.value });
  1396. }}
  1397. required="required"
  1398. />
  1399. <span
  1400. className="mandatory"
  1401. style={{ color: "red", marginLeft: "5px" }}
  1402. >
  1403. *
  1404. </span>
  1405. </FormItem>
  1406. </div>
  1407. <div className="clearfix">
  1408. <FormItem
  1409. labelCol={{ span: 7 }}
  1410. wrapperCol={{ span: 12 }}
  1411. label="业务品类"
  1412. >
  1413. <Select
  1414. placeholder="请选择业务品类"
  1415. value={this.state.addCid}
  1416. onChange={(e) => {
  1417. this.setState({ addCid: e });
  1418. }}
  1419. notFoundContent="未获取到业务品类列表"
  1420. style={{ width: "94%" }}
  1421. required="required"
  1422. >
  1423. {this.state.contactsOption}
  1424. </Select>
  1425. <span
  1426. className="mandatory"
  1427. style={{ color: "red", marginLeft: "5px" }}
  1428. >
  1429. *
  1430. </span>
  1431. </FormItem>
  1432. </div>
  1433. <div className="clearfix">
  1434. <FormItem
  1435. labelCol={{ span: 7 }}
  1436. wrapperCol={{ span: 12 }}
  1437. label="是否精品"
  1438. >
  1439. <Radio.Group
  1440. value={this.state.boutique}
  1441. onChange={(e) => {
  1442. this.setState({ boutique: e.target.value });
  1443. }}
  1444. >
  1445. <Radio value={1}>精品</Radio>
  1446. <Radio value={0}>非精品</Radio>
  1447. </Radio.Group>
  1448. </FormItem>
  1449. </div>
  1450. <div className="clearfix">
  1451. <FormItem
  1452. labelCol={{ span: 7 }}
  1453. wrapperCol={{ span: 12 }}
  1454. label="省"
  1455. >
  1456. <Cascader
  1457. options={provinceSelect()}
  1458. value={this.state.ProvinceCity}
  1459. placeholder="选择省"
  1460. style={{ width: "94%" }}
  1461. onChange={(e, pre) => {
  1462. this.setState({ ProvinceCity: e });
  1463. }}
  1464. />
  1465. <span style={{ color: "red", marginLeft: "5px" }}>
  1466. *
  1467. </span>
  1468. </FormItem>
  1469. </div>
  1470. <div className="clearfix">
  1471. <FormItem
  1472. labelCol={{ span: 7 }}
  1473. wrapperCol={{ span: 12 }}
  1474. label="省-市"
  1475. >
  1476. <Cascader
  1477. options={citySelect()}
  1478. value={this.state.ProvinceCity}
  1479. placeholder="选择市"
  1480. style={{ width: "94%" }}
  1481. onChange={(e, pre) => {
  1482. this.setState({ ProvinceCity: e });
  1483. }}
  1484. />
  1485. <span style={{ color: "red", marginLeft: "5px" }}>
  1486. *
  1487. </span>
  1488. </FormItem>
  1489. </div>
  1490. <div className="clearfix">
  1491. <FormItem
  1492. labelCol={{ span: 7 }}
  1493. wrapperCol={{ span: 12 }}
  1494. label="省-市-区"
  1495. >
  1496. <Cascader
  1497. options={areaSelect()}
  1498. value={this.state.ProvinceCity}
  1499. placeholder="选择区"
  1500. style={{ width: "94%" }}
  1501. onChange={(e, pre) => {
  1502. this.setState({ ProvinceCity: e });
  1503. }}
  1504. />
  1505. <span style={{ color: "red", marginLeft: "5px" }}>
  1506. *
  1507. </span>
  1508. </FormItem>
  1509. </div>
  1510. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1511. <Button
  1512. className="set-submit"
  1513. type="primary"
  1514. htmlType="submit"
  1515. >
  1516. 保存
  1517. </Button>
  1518. <Button
  1519. className="set-submit"
  1520. type="ghost"
  1521. onClick={this.handleCancel}
  1522. style={{ marginLeft: "15px" }}
  1523. >
  1524. 取消
  1525. </Button>
  1526. </FormItem>
  1527. </Spin>
  1528. </Form>
  1529. </Modal>
  1530. </div>
  1531. <div className="patent-desc">
  1532. <Modal
  1533. maskClosable={false}
  1534. visible={this.state.formatvisible}
  1535. onOk={this.checkPatentProcess}
  1536. onCancel={this.formathandleCancel}
  1537. width="400px"
  1538. title="新增项目规格"
  1539. footer=""
  1540. className="admin-desc-content"
  1541. >
  1542. <Form
  1543. horizontal
  1544. onSubmit={this.formathandleSubmit}
  1545. id="demand-form"
  1546. >
  1547. <Spin spinning={this.state.loading}>
  1548. <div className="clearfix">
  1549. <FormItem
  1550. labelCol={{ span: 7 }}
  1551. wrapperCol={{ span: 12 }}
  1552. label="项目名称"
  1553. >
  1554. <span style={{ width: "94%" }}>
  1555. {this.state.editName}
  1556. </span>
  1557. </FormItem>
  1558. <FormItem
  1559. labelCol={{ span: 7 }}
  1560. wrapperCol={{ span: 12 }}
  1561. label="规格名称"
  1562. >
  1563. <Input
  1564. placeholder="规格名称"
  1565. value={this.state.formatPname}
  1566. style={{ width: "94%" }}
  1567. onChange={(e) => {
  1568. this.setState({ formatPname: e.target.value });
  1569. }}
  1570. required="required"
  1571. />
  1572. <span
  1573. className="mandatory"
  1574. style={{ color: "red", marginLeft: "5px" }}
  1575. >
  1576. *
  1577. </span>
  1578. </FormItem>
  1579. <FormItem
  1580. labelCol={{ span: 7 }}
  1581. wrapperCol={{ span: 12 }}
  1582. label="市场价"
  1583. >
  1584. <Input
  1585. placeholder="市场价"
  1586. value={this.state.formatPrice}
  1587. style={{ width: "94%" }}
  1588. onChange={(e) => {
  1589. this.setState({ formatPrice: e.target.value });
  1590. }}
  1591. />
  1592. </FormItem>
  1593. <FormItem
  1594. labelCol={{ span: 7 }}
  1595. wrapperCol={{ span: 12 }}
  1596. label="活动价"
  1597. >
  1598. <Input
  1599. placeholder="活动价"
  1600. value={this.state.formatActivityPrice}
  1601. style={{ width: "94%" }}
  1602. onChange={(e) => {
  1603. this.setState({
  1604. formatActivityPrice: e.target.value,
  1605. });
  1606. }}
  1607. />
  1608. </FormItem>
  1609. <FormItem
  1610. labelCol={{ span: 7 }}
  1611. wrapperCol={{ span: 12 }}
  1612. label="最低折扣"
  1613. >
  1614. <Input
  1615. placeholder="最低折扣"
  1616. value={this.state.formatOffset}
  1617. style={{ width: "94%" }}
  1618. onChange={(e) => {
  1619. this.setState({ formatOffset: e.target.value });
  1620. }}
  1621. />
  1622. </FormItem>
  1623. <FormItem
  1624. labelCol={{ span: 7 }}
  1625. wrapperCol={{ span: 12 }}
  1626. label="会员价"
  1627. >
  1628. <Input
  1629. placeholder="会员价"
  1630. value={this.state.formatMemberPrice}
  1631. style={{ width: "94%" }}
  1632. onChange={(e) => {
  1633. this.setState({
  1634. formatMemberPrice: e.target.value,
  1635. });
  1636. }}
  1637. />
  1638. </FormItem>
  1639. <FormItem
  1640. labelCol={{ span: 7 }}
  1641. wrapperCol={{ span: 12 }}
  1642. label="活动生效"
  1643. >
  1644. <Select
  1645. placeholder="活动生效"
  1646. value={this.state.formatActivityFlag}
  1647. style={{ width: "94%" }}
  1648. onChange={(e) => {
  1649. this.setState({ formatActivityFlag: e });
  1650. }}
  1651. >
  1652. {gameState.map(function (item) {
  1653. return (
  1654. <Select.Option key={item.value}>
  1655. {item.key}
  1656. </Select.Option>
  1657. );
  1658. })}
  1659. </Select>
  1660. </FormItem>
  1661. <FormItem
  1662. labelCol={{ span: 7 }}
  1663. wrapperCol={{ span: 12 }}
  1664. label="项目状态"
  1665. >
  1666. <Select
  1667. placeholder="项目状态"
  1668. value={this.state.formatStatus}
  1669. style={{ width: "94%" }}
  1670. onChange={(e) => {
  1671. this.setState({ formatStatus: e });
  1672. }}
  1673. >
  1674. {conditionOrganization.map(function (item) {
  1675. return (
  1676. <Select.Option key={item.value}>
  1677. {item.key}
  1678. </Select.Option>
  1679. );
  1680. })}
  1681. </Select>
  1682. </FormItem>
  1683. </div>
  1684. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1685. <Button
  1686. className="set-submit"
  1687. type="primary"
  1688. htmlType="submit"
  1689. >
  1690. 保存
  1691. </Button>
  1692. <Button
  1693. className="set-submit"
  1694. type="ghost"
  1695. onClick={this.formathandleCancel}
  1696. style={{ marginLeft: "15px" }}
  1697. >
  1698. 取消
  1699. </Button>
  1700. </FormItem>
  1701. </Spin>
  1702. </Form>
  1703. </Modal>
  1704. </div>
  1705. <div className="patent-desc">
  1706. <Modal
  1707. maskClosable={false}
  1708. visible={this.state.editformatvisible}
  1709. onOk={this.checkPatentProcess}
  1710. onCancel={this.editformathandleCancel}
  1711. width="400px"
  1712. title="编辑项目规格"
  1713. footer=""
  1714. className="admin-desc-content"
  1715. >
  1716. <Form
  1717. horizontal
  1718. onSubmit={this.editformathandleSubmit}
  1719. id="demand-form"
  1720. >
  1721. <Spin spinning={this.state.loading}>
  1722. <div className="clearfix">
  1723. <FormItem
  1724. labelCol={{ span: 7 }}
  1725. wrapperCol={{ span: 12 }}
  1726. label="规格名称"
  1727. >
  1728. <Input
  1729. placeholder="规格名称"
  1730. value={this.state.formatPname}
  1731. style={{ width: "94%" }}
  1732. onChange={(e) => {
  1733. this.setState({ formatPname: e.target.value });
  1734. }}
  1735. required="required"
  1736. />
  1737. <span
  1738. className="mandatory"
  1739. style={{ color: "red", marginLeft: "5px" }}
  1740. >
  1741. *
  1742. </span>
  1743. </FormItem>
  1744. </div>
  1745. <div className="clearfix">
  1746. <FormItem
  1747. labelCol={{ span: 7 }}
  1748. wrapperCol={{ span: 12 }}
  1749. label="创建人"
  1750. >
  1751. <span style={{ width: "94%" }}>
  1752. {this.state.editCreateId}
  1753. </span>
  1754. </FormItem>
  1755. <FormItem
  1756. labelCol={{ span: 7 }}
  1757. wrapperCol={{ span: 12 }}
  1758. label="市场价"
  1759. >
  1760. <Input
  1761. placeholder="市场价"
  1762. value={this.state.formatPrice}
  1763. style={{ width: "94%" }}
  1764. onChange={(e) => {
  1765. this.setState({ formatPrice: e.target.value });
  1766. }}
  1767. />
  1768. </FormItem>
  1769. <FormItem
  1770. labelCol={{ span: 7 }}
  1771. wrapperCol={{ span: 12 }}
  1772. label="活动价"
  1773. >
  1774. <Input
  1775. placeholder="活动价"
  1776. value={this.state.formatActivityPrice}
  1777. style={{ width: "94%" }}
  1778. onChange={(e) => {
  1779. this.setState({
  1780. formatActivityPrice: e.target.value,
  1781. });
  1782. }}
  1783. />
  1784. </FormItem>
  1785. <FormItem
  1786. labelCol={{ span: 7 }}
  1787. wrapperCol={{ span: 12 }}
  1788. label="最低折扣"
  1789. >
  1790. <Input
  1791. placeholder="最低折扣"
  1792. value={this.state.formatOffset}
  1793. style={{ width: "94%" }}
  1794. onChange={(e) => {
  1795. this.setState({ formatOffset: e.target.value });
  1796. }}
  1797. />
  1798. </FormItem>
  1799. <FormItem
  1800. labelCol={{ span: 7 }}
  1801. wrapperCol={{ span: 12 }}
  1802. label="会员价"
  1803. >
  1804. <Input
  1805. placeholder="会员价"
  1806. value={this.state.formatMemberPrice}
  1807. style={{ width: "94%" }}
  1808. onChange={(e) => {
  1809. this.setState({
  1810. formatMemberPrice: e.target.value,
  1811. });
  1812. }}
  1813. />
  1814. </FormItem>
  1815. <FormItem
  1816. labelCol={{ span: 7 }}
  1817. wrapperCol={{ span: 12 }}
  1818. label="活动生效"
  1819. >
  1820. <Select
  1821. placeholder="活动生效"
  1822. value={this.state.formatActivityFlag}
  1823. style={{ width: "94%" }}
  1824. onChange={(e) => {
  1825. this.setState({ formatActivityFlag: e });
  1826. }}
  1827. >
  1828. {gameState.map(function (item) {
  1829. return (
  1830. <Select.Option key={item.value}>
  1831. {item.key}
  1832. </Select.Option>
  1833. );
  1834. })}
  1835. </Select>
  1836. </FormItem>
  1837. <FormItem
  1838. labelCol={{ span: 7 }}
  1839. wrapperCol={{ span: 12 }}
  1840. label="项目状态"
  1841. >
  1842. <Select
  1843. placeholder="项目状态"
  1844. value={this.state.formatStatus}
  1845. style={{ width: "94%" }}
  1846. onChange={(e) => {
  1847. this.setState({ formatStatus: e });
  1848. }}
  1849. >
  1850. {conditionOrganization.map(function (item) {
  1851. return (
  1852. <Select.Option key={item.value}>
  1853. {item.key}
  1854. </Select.Option>
  1855. );
  1856. })}
  1857. </Select>
  1858. </FormItem>
  1859. </div>
  1860. <FormItem wrapperCol={{ span: 12, offset: 7 }}>
  1861. <Button
  1862. className="set-submit"
  1863. type="primary"
  1864. htmlType="submit"
  1865. >
  1866. 保存
  1867. </Button>
  1868. <Button
  1869. className="set-submit"
  1870. type="ghost"
  1871. onClick={this.editformathandleCancel}
  1872. style={{ marginLeft: "15px" }}
  1873. >
  1874. 取消
  1875. </Button>
  1876. </FormItem>
  1877. </Spin>
  1878. </Form>
  1879. </Modal>
  1880. </div>
  1881. <div className="patent-desc">
  1882. <Modal
  1883. maskClosable={false}
  1884. className="customeDetails"
  1885. title="业务项目"
  1886. width="1200px"
  1887. visible={this.state.editvisible}
  1888. onOk={this.edithandleCancel}
  1889. onCancel={this.edithandleCancel}
  1890. footer=""
  1891. >
  1892. <Tabs
  1893. defaultActiveKey="1"
  1894. onChange={this.callback}
  1895. activeKey={this.state.callnub}
  1896. >
  1897. <TabPane tab="业务项目基本资料" key="1">
  1898. <Form
  1899. horizontal
  1900. onSubmit={this.edithandleSubmit}
  1901. id="demand-form"
  1902. >
  1903. <Spin spinning={this.state.loading}>
  1904. <div
  1905. className="clearfix"
  1906. style={{ paddingLeft: "60px" }}
  1907. >
  1908. <FormItem
  1909. className="half-item"
  1910. labelCol={{ span: 4 }}
  1911. wrapperCol={{ span: 12 }}
  1912. label="项目名称"
  1913. >
  1914. <Input
  1915. placeholder="项目名称"
  1916. value={this.state.editName}
  1917. style={{ width: "94%" }}
  1918. onChange={(e) => {
  1919. this.setState({ editName: e.target.value });
  1920. }}
  1921. required="required"
  1922. />
  1923. <span
  1924. className="mandatory"
  1925. style={{ color: "red", marginLeft: "5px" }}
  1926. >
  1927. *
  1928. </span>
  1929. </FormItem>
  1930. <FormItem
  1931. className="half-item"
  1932. labelCol={{ span: 4 }}
  1933. wrapperCol={{ span: 12 }}
  1934. label="业务品类"
  1935. >
  1936. <Select
  1937. placeholder="请选择业务品类"
  1938. value={this.state.editCname}
  1939. onChange={(e) => {
  1940. // console.log(e)
  1941. this.setState({ editCname: e });
  1942. }}
  1943. notFoundContent="未获取到业务品类列表"
  1944. style={{ width: "94%" }}
  1945. required="required"
  1946. >
  1947. {this.state.contactsOption}
  1948. </Select>
  1949. <span
  1950. className="mandatory"
  1951. style={{ color: "red", marginLeft: "5px" }}
  1952. >
  1953. *
  1954. </span>
  1955. </FormItem>
  1956. </div>
  1957. <div
  1958. className="clearfix"
  1959. style={{ paddingLeft: "60px" }}
  1960. >
  1961. <FormItem
  1962. className="half-item"
  1963. labelCol={{ span: 4 }}
  1964. wrapperCol={{ span: 12 }}
  1965. label="省"
  1966. >
  1967. <Cascader
  1968. options={provinceSelect()}
  1969. value={this.state.ProvinceCity}
  1970. placeholder="选择省"
  1971. style={{ width: "94%" }}
  1972. onChange={(e, pre) => {
  1973. this.setState({ ProvinceCity: e });
  1974. }}
  1975. />
  1976. <span style={{ color: "red", marginLeft: "5px" }}>
  1977. *
  1978. </span>
  1979. </FormItem>
  1980. <FormItem
  1981. className="half-item"
  1982. labelCol={{ span: 4 }}
  1983. wrapperCol={{ span: 12 }}
  1984. label="省-市"
  1985. >
  1986. <Cascader
  1987. options={citySelect()}
  1988. value={this.state.ProvinceCity}
  1989. placeholder="选择市"
  1990. style={{ width: "94%" }}
  1991. onChange={(e, pre) => {
  1992. this.setState({ ProvinceCity: e });
  1993. }}
  1994. />
  1995. <span style={{ color: "red", marginLeft: "5px" }}>
  1996. *
  1997. </span>
  1998. </FormItem>
  1999. <FormItem
  2000. className="half-item"
  2001. labelCol={{ span: 4 }}
  2002. wrapperCol={{ span: 12 }}
  2003. label="省-市-区"
  2004. >
  2005. <Cascader
  2006. options={areaSelect()}
  2007. value={this.state.ProvinceCity}
  2008. placeholder="选择区"
  2009. style={{ width: "94%" }}
  2010. onChange={(e, pre) => {
  2011. this.setState({ ProvinceCity: e });
  2012. }}
  2013. />
  2014. <span style={{ color: "red", marginLeft: "5px" }}>
  2015. *
  2016. </span>
  2017. </FormItem>
  2018. <FormItem
  2019. className="half-item"
  2020. labelCol={{ span: 4 }}
  2021. wrapperCol={{ span: 12 }}
  2022. label="是否精品"
  2023. >
  2024. <Radio.Group
  2025. value={this.state.editBoutique}
  2026. onChange={(e) => {
  2027. this.setState({
  2028. editBoutique: e.target.value,
  2029. });
  2030. }}
  2031. >
  2032. <Radio value={1}>精品</Radio>
  2033. <Radio value={0}>非精品</Radio>
  2034. </Radio.Group>
  2035. </FormItem>
  2036. </div>
  2037. <div
  2038. className="clearfix"
  2039. style={{ paddingLeft: "60px" }}
  2040. >
  2041. <FormItem
  2042. className="half-item"
  2043. labelCol={{ span: 4 }}
  2044. wrapperCol={{ span: 12 }}
  2045. label="市场价"
  2046. >
  2047. <Input
  2048. placeholder="市场价"
  2049. value={this.state.editPrice}
  2050. style={{ width: "94%" }}
  2051. onChange={(e) => {
  2052. this.setState({ editPrice: e.target.value });
  2053. }}
  2054. required="required"
  2055. />
  2056. <span style={{ color: "red", marginLeft: "5px" }}>
  2057. *
  2058. </span>
  2059. </FormItem>
  2060. <FormItem
  2061. className="half-item"
  2062. labelCol={{ span: 4 }}
  2063. wrapperCol={{ span: 12 }}
  2064. label="首付金额"
  2065. >
  2066. <Input
  2067. placeholder="市场价"
  2068. value={this.state.firstPayment}
  2069. style={{ width: "94%" }}
  2070. onChange={(e) => {
  2071. this.setState({
  2072. firstPayment: e.target.value,
  2073. });
  2074. }}
  2075. required="required"
  2076. />
  2077. <span style={{ color: "red", marginLeft: "5px" }}>
  2078. *
  2079. </span>
  2080. </FormItem>
  2081. <FormItem
  2082. className="half-item"
  2083. labelCol={{ span: 4 }}
  2084. wrapperCol={{ span: 12 }}
  2085. label="活动价"
  2086. >
  2087. <Input
  2088. placeholder="活动价"
  2089. value={this.state.editActivityPrice}
  2090. style={{ width: "94%" }}
  2091. onChange={(e) => {
  2092. this.setState({
  2093. editActivityPrice: e.target.value,
  2094. });
  2095. }}
  2096. />
  2097. </FormItem>
  2098. <FormItem
  2099. className="half-item"
  2100. labelCol={{ span: 4 }}
  2101. wrapperCol={{ span: 12 }}
  2102. label="最低折扣"
  2103. >
  2104. <Input
  2105. placeholder="最低折扣"
  2106. value={this.state.editOffset}
  2107. style={{ width: "94%" }}
  2108. onChange={(e) => {
  2109. this.setState({ editOffset: e.target.value });
  2110. }}
  2111. />
  2112. </FormItem>
  2113. <FormItem
  2114. className="half-item"
  2115. labelCol={{ span: 4 }}
  2116. wrapperCol={{ span: 12 }}
  2117. label="会员价"
  2118. >
  2119. <Input
  2120. placeholder="会员价"
  2121. value={this.state.editMemberPrice}
  2122. style={{ width: "94%" }}
  2123. onChange={(e) => {
  2124. this.setState({
  2125. editMemberPrice: e.target.value,
  2126. });
  2127. }}
  2128. />
  2129. </FormItem>
  2130. <FormItem
  2131. className="half-item"
  2132. labelCol={{ span: 4 }}
  2133. wrapperCol={{ span: 12 }}
  2134. label="活动生效"
  2135. >
  2136. <Select
  2137. placeholder="活动生效"
  2138. value={this.state.editActivityFlag}
  2139. style={{ width: "94%" }}
  2140. onChange={(e) => {
  2141. this.setState({ editActivityFlag: e });
  2142. }}
  2143. >
  2144. {gameState.map(function (item) {
  2145. return (
  2146. <Select.Option key={item.value}>
  2147. {item.key}
  2148. </Select.Option>
  2149. );
  2150. })}
  2151. </Select>
  2152. </FormItem>
  2153. <FormItem
  2154. className="half-item"
  2155. labelCol={{ span: 4 }}
  2156. wrapperCol={{ span: 12 }}
  2157. label="项目状态"
  2158. >
  2159. <Select
  2160. placeholder="项目状态"
  2161. value={this.state.editStatus}
  2162. style={{ width: "94%" }}
  2163. onChange={(e) => {
  2164. this.setState({ editStatus: e });
  2165. }}
  2166. >
  2167. {conditionOrganization.map(function (item) {
  2168. return (
  2169. <Select.Option key={item.value}>
  2170. {item.key}
  2171. </Select.Option>
  2172. );
  2173. })}
  2174. </Select>
  2175. </FormItem>
  2176. <FormItem
  2177. className="half-item"
  2178. labelCol={{ span: 4 }}
  2179. wrapperCol={{ span: 12 }}
  2180. label="项目分类"
  2181. >
  2182. {/* 0 正常 1专利 2软著 3审计 4双软 5高新 6商标*/}
  2183. <Select
  2184. placeholder="项目分类"
  2185. value={this.state.typeStr}
  2186. style={{ width: "94%" }}
  2187. onChange={(e) => {
  2188. let str = "";
  2189. if (e == 0) {
  2190. str = "通用";
  2191. } else if (e == 1) {
  2192. str = "专利";
  2193. } else if (e == 2) {
  2194. str = "软著";
  2195. } else if (e == 3) {
  2196. str = "审计";
  2197. } else if (e == 4) {
  2198. str = "双软";
  2199. } else if (e == 5) {
  2200. str = "高新";
  2201. } else if (e == 6) {
  2202. str = "商标";
  2203. } else if (e == 7) {
  2204. str = "会员";
  2205. } else if (e == 8) {
  2206. str = "投标";
  2207. }
  2208. this.setState({
  2209. typeStatus: e,
  2210. typeStr: str,
  2211. });
  2212. }}
  2213. >
  2214. <Select.Option key={0}>通用</Select.Option>
  2215. <Select.Option key={1}>专利</Select.Option>
  2216. <Select.Option key={2}>软著</Select.Option>
  2217. <Select.Option key={3}>审计</Select.Option>
  2218. <Select.Option key={4}>双软</Select.Option>
  2219. <Select.Option key={5}>高新</Select.Option>
  2220. <Select.Option key={6}>商标</Select.Option>
  2221. <Select.Option key={7}>会员</Select.Option>
  2222. <Select.Option key={8}>投标</Select.Option>
  2223. </Select>
  2224. </FormItem>
  2225. {this.state.typeStatus == 1 && <FormItem
  2226. className="half-item"
  2227. labelCol={{ span: 4 }}
  2228. wrapperCol={{ span: 12 }}
  2229. label=""
  2230. />}
  2231. {this.state.typeStatus == 1 && <FormItem
  2232. className="half-item"
  2233. labelCol={{ span: 4 }}
  2234. wrapperCol={{ span: 12 }}
  2235. label="是否是转让"
  2236. >
  2237. <RadioGroup value={this.state.patentTransfer} onChange={(e) => {
  2238. this.setState({
  2239. patentTransfer: e.target.value
  2240. })
  2241. }}>
  2242. <Radio value={0}>否</Radio>
  2243. <Radio value={1}>是</Radio>
  2244. </RadioGroup>
  2245. </FormItem>}
  2246. <FormItem
  2247. className="half-item"
  2248. labelCol={{ span: 4 }}
  2249. wrapperCol={{ span: 12 }}
  2250. label="创建人"
  2251. >
  2252. <span style={{ width: "94%" }}>
  2253. {this.state.editCreateId}
  2254. </span>
  2255. </FormItem>
  2256. <FormItem
  2257. className="half-item"
  2258. labelCol={{ span: 4 }}
  2259. wrapperCol={{ span: 12 }}
  2260. label="创建时间"
  2261. >
  2262. <span style={{ width: "94%" }}>
  2263. {this.state.editTime}
  2264. </span>
  2265. </FormItem>
  2266. </div>
  2267. <div className="clearfix">
  2268. <FormItem
  2269. labelCol={{ span: 4 }}
  2270. wrapperCol={{ span: 12 }}
  2271. label="项目地址"
  2272. >
  2273. <Input
  2274. type="textarea"
  2275. rows={1}
  2276. placeholder="业务项目服务内容"
  2277. value={this.state.editProjectUrl}
  2278. onChange={(e) => {
  2279. this.setState({
  2280. editProjectUrl: e.target.value,
  2281. });
  2282. }}
  2283. />
  2284. </FormItem>
  2285. </div>
  2286. <div className="clearfix">
  2287. <FormItem
  2288. labelCol={{ span: 4 }}
  2289. wrapperCol={{ span: 12 }}
  2290. label="业务项目服务内容"
  2291. >
  2292. <Input
  2293. type="textarea"
  2294. rows={4}
  2295. placeholder="业务项目服务内容"
  2296. value={this.state.editIntroduce}
  2297. onChange={(e) => {
  2298. this.setState({
  2299. editIntroduce: e.target.value,
  2300. });
  2301. }}
  2302. />
  2303. </FormItem>
  2304. </div>
  2305. <div className="clearfix">
  2306. <FormItem
  2307. labelCol={{ span: 4 }}
  2308. wrapperCol={{ span: 12 }}
  2309. label="业务项目价值及作用"
  2310. >
  2311. <Input
  2312. type="textarea"
  2313. rows={4}
  2314. placeholder="业务项目价值及作用"
  2315. value={this.state.editValueEffect}
  2316. onChange={(e) => {
  2317. this.setState({
  2318. editValueEffect: e.target.value,
  2319. });
  2320. }}
  2321. />
  2322. </FormItem>
  2323. </div>
  2324. <div className="clearfix">
  2325. <FormItem
  2326. labelCol={{ span: 4 }}
  2327. wrapperCol={{ span: 12 }}
  2328. label="业务项目客户基本条件"
  2329. >
  2330. <Input
  2331. type="textarea"
  2332. rows={4}
  2333. placeholder="业务项目客户基本条件"
  2334. value={this.state.editClientSize}
  2335. onChange={(e) => {
  2336. this.setState({
  2337. editClientSize: e.target.value,
  2338. });
  2339. }}
  2340. />
  2341. </FormItem>
  2342. </div>
  2343. <div className="clearfix pictures">
  2344. <FormItem
  2345. className="half-item"
  2346. labelCol={{ span: 8 }}
  2347. wrapperCol={{ span: 10 }}
  2348. label="业务项目图标"
  2349. >
  2350. <PicturesWall
  2351. domId={'businessProject1'}
  2352. pictureSign="business_project_min_picture"
  2353. fileList={this.getOrgCodeUrl}
  2354. pictureUrl={this.state.orgCodeUrl}
  2355. />
  2356. <p>图片建议:图片要清晰。(35*35)</p>
  2357. </FormItem>
  2358. <FormItem
  2359. className="half-item"
  2360. labelCol={{ span: 4 }}
  2361. wrapperCol={{ span: 12 }}
  2362. label="业务项目图标"
  2363. >
  2364. <PicturesWall
  2365. domId={'businessProject2'}
  2366. pictureSign="business_project_max_picture"
  2367. fileList={this.getCompanyLogoUrl}
  2368. pictureUrl={this.state.companyLogoUrl}
  2369. />
  2370. <p>图片建议:图片要清晰。(200*200)</p>
  2371. </FormItem>
  2372. </div>
  2373. <Button
  2374. className="set-submit"
  2375. type="primary"
  2376. htmlType="submit"
  2377. style={{
  2378. marginLeft: "190px",
  2379. marginBottom: "20px",
  2380. marginTop: "110px",
  2381. }}
  2382. >
  2383. 保存
  2384. </Button>
  2385. <Button
  2386. className="set-submit"
  2387. type="ghost"
  2388. onClick={this.edithandleCancel}
  2389. style={{
  2390. marginLeft: "100px",
  2391. marginBottom: "20px",
  2392. }}
  2393. >
  2394. 取消
  2395. </Button>
  2396. </Spin>
  2397. </Form>
  2398. </TabPane>
  2399. <TabPane tab="业务项目规格" key="2">
  2400. <div className="clearfix">
  2401. <Popconfirm
  2402. title="是否删除?"
  2403. onConfirm={this.delectRowSize}
  2404. okText="是"
  2405. cancelText="否"
  2406. >
  2407. <Button
  2408. style={{
  2409. background: "#ea0862",
  2410. border: "none",
  2411. color: "#fff",
  2412. marginRight: "10px",
  2413. marginLeft: "10px",
  2414. }}
  2415. disabled={!hasSelected}
  2416. >
  2417. 删除
  2418. <Icon type="minus" />
  2419. </Button>
  2420. </Popconfirm>
  2421. <Popconfirm
  2422. title="是否停用?"
  2423. onConfirm={this.blockRowSize}
  2424. okText="是"
  2425. cancelText="否"
  2426. >
  2427. <Button
  2428. style={{
  2429. background: "#ea0862",
  2430. border: "none",
  2431. color: "#fff",
  2432. marginRight: "10px",
  2433. marginLeft: "10px",
  2434. display: "none",
  2435. }}
  2436. disabled={!hasSelected}
  2437. >
  2438. 停用
  2439. <Icon type="minus" />
  2440. </Button>
  2441. </Popconfirm>
  2442. <Button
  2443. className="ContactsList"
  2444. type="primary"
  2445. onClick={this.formatClick}
  2446. style={{ float: "right", marginBottom: "10px" }}
  2447. >
  2448. 新增
  2449. </Button>
  2450. </div>
  2451. <div className="clearfix">
  2452. <Spin spinning={this.state.loading}>
  2453. <Form
  2454. horizontal
  2455. id="demand-form"
  2456. onSubmit={this.contactSave}
  2457. >
  2458. <Table
  2459. size="middle"
  2460. pagination={this.state.formatPagination}
  2461. columns={this.state.ContactsLists}
  2462. dataSource={this.state.formatDataSource}
  2463. rowSelection={rowSelection}
  2464. onRowClick={this.formatTableRowClick}
  2465. />
  2466. </Form>
  2467. </Spin>
  2468. </div>
  2469. </TabPane>
  2470. </Tabs>
  2471. </Modal>
  2472. </div>
  2473. </div>
  2474. </div>
  2475. );
  2476. }
  2477. }));
  2478. export default BusinessProject;