businessProject.jsx 94 KB

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