businessProject.jsx 94 KB

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