businessProject.jsx 94 KB

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