businessProject.jsx 92 KB

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