businessProject.jsx 93 KB

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