businessProject.jsx 91 KB

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