buyList.jsx 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import "react-quill/dist/quill.bubble.css";
  4. import moment from "moment";
  5. import {
  6. Form,
  7. Icon,
  8. Button,
  9. Input,
  10. Select,
  11. Table,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Upload,
  16. Popconfirm,
  17. Cascader,
  18. InputNumber,
  19. Radio,
  20. TimePicker,
  21. Tabs,
  22. Tag
  23. } from "antd";
  24. import { areaSelect, getProvince } from "@/NewDicProvinceList"; //省市区
  25. import {
  26. getGameState,
  27. splitUrl,
  28. getprovince,
  29. getStatuslist,
  30. getLvl,
  31. beforeUploadFile,
  32. getSecretType,
  33. getBuyAuditType,
  34. placeList,
  35. province,
  36. provinceStatus,
  37. getPicPath
  38. } from "@/tools.js";
  39. const { Option } = Select;
  40. import Img01 from "./image/cgg.jpg";
  41. import Img02 from "./image/ttt.jpg";
  42. import Img03 from "./image/xxxd.jpg";
  43. import Img04 from "./image/bbb.jpg";
  44. import SpinContainer from "../../SpinContainer";
  45. //上传图片组件
  46. const PicturesWall = React.createClass({
  47. getInitialState() {
  48. return {
  49. previewVisible: false,
  50. previewImage: "",
  51. fileList: this.props.pictureUrl,
  52. imgflag: this.props.flagimg
  53. };
  54. },
  55. getDefaultProps() {
  56. return {
  57. changeClick: this.modifyChange
  58. };
  59. },
  60. handleCancel() {
  61. this.setState({ previewVisible: false });
  62. },
  63. handlePreview(file) {
  64. this.setState({
  65. previewImage: file.url || file.thumbUrl,
  66. previewVisible: true
  67. });
  68. },
  69. handleChange(info) {
  70. let fileList = info.fileList;
  71. this.setState({ fileList });
  72. this.props.fileList(fileList);
  73. },
  74. componentWillReceiveProps(nextProps) {
  75. this.state.fileList = nextProps.pictureUrl;
  76. },
  77. render() {
  78. const { previewVisible, previewImage, fileList, flagimg } = this.state;
  79. const uploadButton = (
  80. <div>
  81. <Icon type="plus" />
  82. <div className="ant-upload-text">点击上传</div>
  83. </div>
  84. );
  85. return (
  86. <div style={{ display: "inline-block" }} className={flagimg}>
  87. <Upload
  88. beforeUpload={beforeUploadFile}
  89. action={globalConfig.context + "/api/admin/customerCase/uploadFile"}
  90. data={{ sign: "purchase_picture" }}
  91. listType="picture-card"
  92. fileList={fileList}
  93. onPreview={this.handlePreview}
  94. onChange={this.handleChange}
  95. >
  96. {fileList && fileList.length >= 1 ? null : uploadButton}
  97. </Upload>
  98. <Modal
  99. maskClosable={false}
  100. visible={previewVisible}
  101. footer={null}
  102. onCancel={this.handleCancel}
  103. >
  104. <img alt="" style={{ width: "100%" }} src={previewImage} />
  105. </Modal>
  106. </div>
  107. );
  108. }
  109. });
  110. //主体
  111. const BuyList = Form.create()(
  112. React.createClass({
  113. loadData(pageNo) {
  114. this.state.data = [];
  115. this.setState({
  116. loading: true,
  117. page: pageNo
  118. });
  119. $.ajax({
  120. method: "get",
  121. dataType: "json",
  122. crossDomain: false,
  123. url: globalConfig.context + "/api/admin/customerCase/listCustomerCase",
  124. data: {
  125. pageNo: pageNo || this.state.pagination.current || 1,
  126. pageSize: this.state.pagination.pageSize,
  127. name: this.state.nameSearch
  128. },
  129. success: function (data) {
  130. let theArr = [];
  131. if (!data.data || !data.data.list) {
  132. if (data.error && data.error.length) {
  133. message.warning(data.error[0].message);
  134. }
  135. } else {
  136. for (let i = 0; i < data.data.list.length; i++) {
  137. let thisdata = data.data.list[i];
  138. theArr.push({
  139. key: i + 1,
  140. id: thisdata.id,
  141. name: thisdata.name,
  142. pictureUrl: thisdata.pictureUrl,
  143. status: thisdata.status,
  144. releaseStatus: thisdata.releaseStatus,
  145. province: thisdata.province,
  146. region: thisdata.region,
  147. sort: thisdata.sort,
  148. releaseTimeConvert: thisdata.releaseTimeConvert,
  149. createTimeConvert: thisdata.createTimeConvert
  150. });
  151. }
  152. this.state.pagination.current = data.data.pageNo;
  153. this.state.pagination.total = data.data.totalCount;
  154. }
  155. this.setState({
  156. dataSource: theArr,
  157. pagination: this.state.pagination
  158. });
  159. }.bind(this)
  160. }).always(
  161. function () {
  162. this.setState({
  163. loading: false
  164. });
  165. }.bind(this)
  166. );
  167. },
  168. getInitialState() {
  169. return {
  170. loading: false,
  171. flag: true,
  172. timesArr: [],
  173. totalData: {
  174. mark: false
  175. },
  176. purchaseImg: [],
  177. pagination: {
  178. defaultCurrent: 1,
  179. defaultPageSize: 10,
  180. showQuickJumper: true,
  181. pageSize: 10,
  182. onChange: function (page) {
  183. this.loadData(page);
  184. this.setState({
  185. selectedRowKeys: []
  186. });
  187. }.bind(this),
  188. showTotal: function (total) {
  189. return "共" + total + "条数据";
  190. }
  191. },
  192. //数据类型
  193. columns: [
  194. {
  195. title: "序号",
  196. dataIndex: "key",
  197. key: "key"
  198. },
  199. {
  200. title: "省份",
  201. dataIndex: "province",
  202. key: "province",
  203. render: e => {
  204. let str = "";
  205. provinceStatus.forEach(item => {
  206. if (item.value == e) {
  207. str = item.key;
  208. }
  209. });
  210. return str;
  211. }
  212. },
  213. {
  214. title: "公司名字",
  215. dataIndex: "name",
  216. key: "name"
  217. },
  218. {
  219. title: "是否首页",
  220. dataIndex: "status",
  221. key: "status",
  222. render: s => {
  223. return s ? (
  224. <Tag color="#87d068">是</Tag>
  225. ) : (
  226. <Tag color="#f50">否</Tag>
  227. );
  228. }
  229. },
  230. {
  231. title: "LOGO缩率图",
  232. dataIndex: "pictureUrl",
  233. key: "pictureUrl",
  234. render: url => {
  235. let path = getPicPath(globalConfig.avatarUploadHost, url);
  236. return (
  237. <div style={{ textAlign: "center" }}>
  238. <img src={path} style={{ width: "100px", height: 50 }} />
  239. <Button
  240. className="buttonimg"
  241. style={{ marginLeft: 10 }}
  242. onClick={e => {
  243. e.stopPropagation();
  244. this.maximg(path);
  245. }}
  246. >
  247. 查看大图
  248. </Button>
  249. </div>
  250. );
  251. }
  252. },
  253. {
  254. title: "排序",
  255. dataIndex: "sort",
  256. key: "sort"
  257. },
  258. {
  259. title: "操作",
  260. dataIndex: "ads",
  261. key: "ads",
  262. render: (text, record, index) => {
  263. return (
  264. <div>
  265. {
  266. <Button
  267. type="primary"
  268. onClick={event => {
  269. this.stopPropagation(event);
  270. this.edit(record);
  271. }}
  272. >
  273. 编辑
  274. </Button>
  275. }
  276. {
  277. <Popconfirm
  278. okText="确定"
  279. cancelText="取消"
  280. title="您确定删除客户服务信息吗?"
  281. onConfirm={() => {
  282. this.delete(record.id);
  283. }}
  284. >
  285. <Button
  286. type="danger"
  287. style={{ marginLeft: "10px" }}
  288. onClick={event => {
  289. this.stopPropagation(event);
  290. }}
  291. >
  292. 删除
  293. </Button>
  294. </Popconfirm>
  295. }
  296. {
  297. <Button
  298. type="primary"
  299. style={{ marginLeft: "10px" }}
  300. onClick={e => {
  301. e.stopPropagation();
  302. if (record.status) {
  303. this.toTop(record, 0);
  304. } else {
  305. this.toTop(record, 1);
  306. }
  307. }}
  308. >
  309. {record.status ? "从首页撤下" : "推荐至首页"}
  310. </Button>
  311. }
  312. </div>
  313. );
  314. }
  315. }
  316. ],
  317. //数据列表
  318. dataSource: []
  319. };
  320. },
  321. //点击大图
  322. maximg(url) {
  323. this.setState({
  324. imgeditvisible: true,
  325. maximg: url
  326. });
  327. },
  328. componentWillMount() {
  329. this.loadData();
  330. },
  331. detailes(record) {
  332. this.setState({
  333. loading: true
  334. });
  335. $.ajax({
  336. method: "get",
  337. dataType: "json",
  338. crossDomain: false,
  339. url: globalConfig.context + "/api/admin/purchase/details",
  340. data: {
  341. id: record.id
  342. },
  343. success: function (data) {
  344. let theArr = [];
  345. let thisdata = data.data;
  346. if (!data.data || !data.data.list) {
  347. if (data.error && data.error.length) {
  348. message.warning(data.error[0].message);
  349. }
  350. }
  351. this.setState({
  352. purchaseImg: thisdata.purchaseImg
  353. ? splitUrl(
  354. thisdata.purchaseImg,
  355. ",",
  356. globalConfig.avatarUploadHost + "/upload"
  357. )
  358. : []
  359. });
  360. Object.assign(
  361. this.state.totalData,
  362. {
  363. content: thisdata.content,
  364. contacts: thisdata.contacts,
  365. contactsMobile: thisdata.contactsMobile,
  366. orgName: thisdata.orgName
  367. },
  368. this.state.RowData
  369. );
  370. }.bind(this)
  371. }).always(
  372. function () {
  373. this.setState({
  374. loading: false
  375. });
  376. }.bind(this)
  377. );
  378. },
  379. stopPropagation(e) {
  380. e.stopPropagation();
  381. e.nativeEvent.stopImmediatePropagation();
  382. },
  383. //删除按钮
  384. delete(id) {
  385. $.ajax({
  386. method: "post",
  387. dataType: "json",
  388. crossDomain: false,
  389. url:
  390. globalConfig.context + "/api/admin/customerCase/deleteCustomerCase",
  391. data: {
  392. id
  393. },
  394. success: function (data) {
  395. let theArr = [];
  396. if (data.error && data.error.length) {
  397. message.warning(data.error[0].message);
  398. } else {
  399. this.loadData();
  400. }
  401. }.bind(this)
  402. }).always(
  403. function () {
  404. this.setState({
  405. loading: false
  406. });
  407. }.bind(this)
  408. );
  409. },
  410. //项目列表整行点击
  411. tableRowClick(record, index) {
  412. this.state.RowData = record;
  413. this.setState({
  414. editvisible: true
  415. });
  416. this.edit(record);
  417. },
  418. edithandleCancel(e) {
  419. this.setState(
  420. {
  421. editvisible: false
  422. },
  423. () => {
  424. this.addReset();
  425. }
  426. );
  427. this.loadData();
  428. },
  429. search() {
  430. this.loadData();
  431. },
  432. add() {
  433. this.setState({
  434. editvisible: true,
  435. flag: false
  436. });
  437. },
  438. toTop(record, num) {
  439. this.setState({
  440. loading: true
  441. });
  442. $.ajax({
  443. method: "post",
  444. dataType: "json",
  445. crossDomain: false,
  446. url:
  447. globalConfig.context + "/api/admin/customerCase/updateCustomerCase",
  448. data: {
  449. id: record.id,
  450. status: num
  451. },
  452. success: function (data) {
  453. let theArr = [];
  454. if (data.error && data.error.length) {
  455. message.warning(data.error[0].message);
  456. } else {
  457. this.loadData();
  458. }
  459. }.bind(this)
  460. }).always(
  461. function () {
  462. this.setState({
  463. loading: false
  464. });
  465. }.bind(this)
  466. );
  467. },
  468. addNew(flag) {
  469. this.setState({
  470. loading: true
  471. });
  472. if (this.state.flag) {
  473. $.ajax({
  474. method: "post",
  475. dataType: "json",
  476. crossDomain: false,
  477. url:
  478. globalConfig.context + "/api/admin/customerCase/updateCustomerCase",
  479. data: {
  480. id: this.state.id,
  481. name: this.state.name,
  482. pictureUrl: this.state.pictureUrl
  483. ? this.state.pictureUrl[0].response.data
  484. : undefined,
  485. status: this.state.status ? this.state.status : 0,
  486. releaseStatus: flag,
  487. province: this.state.province,
  488. region: this.state.region,
  489. sort: this.state.sort
  490. },
  491. success: function (data) {
  492. this.setState({
  493. loading: false
  494. });
  495. let theArr = [];
  496. if (data.error && data.error.length) {
  497. message.warning(data.error[0].message);
  498. } else {
  499. this.loadData();
  500. this.cancelAdd();
  501. }
  502. }.bind(this)
  503. }).always(
  504. function () {
  505. this.setState({
  506. loading: false
  507. });
  508. }.bind(this)
  509. );
  510. } else {
  511. $.ajax({
  512. method: "post",
  513. dataType: "json",
  514. crossDomain: false,
  515. url: globalConfig.context + "/api/admin/customerCase/addCustomerCase",
  516. data: {
  517. name: this.state.name,
  518. pictureUrl: this.state.pictureUrl
  519. ? this.state.pictureUrl[0].response.data
  520. : undefined,
  521. status: this.state.status ? this.state.status : 0,
  522. releaseStatus: flag,
  523. province: this.state.province,
  524. region: this.state.region,
  525. sort: this.state.sort
  526. },
  527. success: function (data) {
  528. this.setState({
  529. loading: false
  530. });
  531. let theArr = [];
  532. if (data.error && data.error.length) {
  533. message.warning(data.error[0].message);
  534. } else {
  535. this.loadData();
  536. this.cancelAdd();
  537. }
  538. }.bind(this)
  539. }).always(
  540. function () {
  541. this.setState({
  542. loading: false
  543. });
  544. }.bind(this)
  545. );
  546. }
  547. },
  548. issueNew() {
  549. this.change("releaseStatus", 1, () => {
  550. this.addNew();
  551. });
  552. },
  553. //编辑按钮操作
  554. edit(record) {
  555. this.setState({
  556. flag: true,
  557. editvisible: true
  558. });
  559. this.setState({
  560. loading: true
  561. });
  562. $.ajax({
  563. method: "get",
  564. dataType: "json",
  565. crossDomain: false,
  566. url:
  567. globalConfig.context + "/api/admin/customerCase/selectCustomerCase",
  568. data: {
  569. id: record.id
  570. },
  571. success: function (data) {
  572. let thisdata = data.data;
  573. let str = "";
  574. if (data.error && data.error.length) {
  575. message.warning(data.error[0].message);
  576. }
  577. placeList.forEach(item => {
  578. if (item.value == thisdata.region) {
  579. str = item.place;
  580. }
  581. });
  582. this.setState({
  583. id: thisdata.id,
  584. name: thisdata.name,
  585. pictureUrl: thisdata.pictureUrl
  586. ? splitUrl(
  587. thisdata.pictureUrl,
  588. ",",
  589. globalConfig.avatarUploadHost
  590. )
  591. : [],
  592. status: thisdata.status,
  593. releaseStatus: thisdata.releaseStatus,
  594. province: thisdata.province + "",
  595. region: thisdata.region,
  596. regionStr: str,
  597. sort: thisdata.sort,
  598. releaseTimeConvert: thisdata.releaseTimeConvert,
  599. createTimeConvert: thisdata.createTimeConvert
  600. });
  601. }.bind(this)
  602. }).always(
  603. function () {
  604. this.setState({
  605. loading: false
  606. });
  607. }.bind(this)
  608. );
  609. },
  610. cancelAdd() {
  611. this.setState(
  612. {
  613. editvisible: false
  614. },
  615. () => {
  616. this.setState({
  617. flag: true
  618. });
  619. this.addReset();
  620. }
  621. );
  622. this.loadData();
  623. },
  624. //新增框的清零
  625. addReset() {
  626. this.setState({
  627. name: undefined,
  628. pictureUrl: undefined,
  629. status: 0,
  630. province: undefined,
  631. region: undefined,
  632. sort: undefined,
  633. regionStr: undefined
  634. });
  635. },
  636. imghandleCancel() {
  637. this.setState({
  638. imgeditvisible: false
  639. });
  640. },
  641. //搜索部分的清零
  642. reset() {
  643. this.state.nameSearch = undefined;
  644. this.loadData();
  645. },
  646. getOrgCodeUrl(e) {
  647. this.setState({ pictureUrl: e });
  648. },
  649. change(key, e, f) {
  650. if (f === undefined) {
  651. this.state.totalData[key] = e;
  652. this.setState({
  653. totalData: this.state.totalData
  654. });
  655. } else if (typeof f === "function") {
  656. this.state.totalData[key] = e;
  657. this.setState(
  658. {
  659. totalData: this.state.totalData
  660. },
  661. f
  662. );
  663. }
  664. },
  665. render() {
  666. const FormItem = Form.Item;
  667. const rowSelection = {
  668. selectedRowKeys: this.state.selectedRowKeys,
  669. onChange: (selectedRowKeys, selectedRows) => {
  670. this.setState({
  671. selectedRows: selectedRows.slice(-1),
  672. selectedRowKeys: selectedRowKeys.slice(-1)
  673. });
  674. }
  675. };
  676. let data = this.state.totalData;
  677. const { TextArea } = Input; //文本域
  678. const { TabPane } = Tabs; //标签页
  679. const { MonthPicker, RangePicker, WeekPicker } = DatePicker; //日期输入框
  680. return (
  681. <div className="user-content">
  682. <div className="content-title">
  683. <span>服务客户</span>
  684. <div className="user-search">
  685. <Input
  686. placeholder="请输入公司关键字"
  687. style={{
  688. width: "150px",
  689. marginRight: "10px",
  690. marginBottom: "10px"
  691. }}
  692. value={this.state.nameSearch}
  693. onChange={e => {
  694. this.setState({ nameSearch: e.target.value });
  695. }}
  696. />
  697. <Button
  698. type="primary"
  699. onClick={this.search}
  700. style={{ marginRight: "10px" }}
  701. >
  702. 搜索
  703. </Button>
  704. <Button onClick={this.reset} style={{ marginRight: "10px" }}>
  705. 重置
  706. </Button>
  707. <Button
  708. type="primary"
  709. onClick={this.add}
  710. style={{ marginLeft: "100px" }}
  711. >
  712. 新增客户
  713. </Button>
  714. </div>
  715. <div className="patent-table">
  716. <SpinContainer spinning={this.state.loading}>
  717. <Table
  718. columns={this.state.columns}
  719. dataSource={this.state.dataSource}
  720. pagination={this.state.pagination}
  721. onRowClick={this.tableRowClick}
  722. bordered
  723. size="small"
  724. />
  725. </SpinContainer>
  726. </div>
  727. </div>
  728. <div className="patent-desc">
  729. <Modal
  730. className="customeDetails"
  731. title={this.state.flag ? "客户服务详情" : "新增案例信息"}
  732. width="340px"
  733. visible={this.state.editvisible}
  734. onOk={this.edithandleCancel}
  735. onCancel={
  736. this.state.flag ? this.edithandleCancel : this.cancelAdd
  737. }
  738. footer=""
  739. >
  740. <SpinContainer spinning={this.state.loading}>
  741. <div className="clearfix">
  742. <FormItem
  743. labelCol={{ span: 7 }}
  744. wrapperCol={{ span: 13 }}
  745. label="服务客户名称:"
  746. >
  747. <Input
  748. placeholder="请输入服务客户名称"
  749. value={this.state.name}
  750. onChange={e => {
  751. this.setState({
  752. name: e.target.value
  753. });
  754. }}
  755. style={{ width: "140px" }}
  756. />
  757. </FormItem>
  758. </div>
  759. <div className="clearfix">
  760. <FormItem
  761. labelCol={{ span: 7 }}
  762. wrapperCol={{ span: 13 }}
  763. label="所属省份"
  764. >
  765. <Select
  766. style={{ width: 120 }}
  767. placeholder="请选择省份"
  768. value={this.state.province}
  769. onChange={e => {
  770. this.setState({
  771. province: e
  772. });
  773. let str = "";
  774. provinceStatus.forEach(item => {
  775. if (item.value == e) {
  776. str = item.key;
  777. }
  778. });
  779. placeList.forEach(item => {
  780. item.children.forEach(key => {
  781. if (key == str) {
  782. this.setState({
  783. regionStr: item.place,
  784. region: item.value
  785. });
  786. }
  787. });
  788. });
  789. }}
  790. >
  791. {provinceStatus.map(item => {
  792. return <Option value={item.value}>{item.key}</Option>;
  793. })}
  794. </Select>
  795. </FormItem>
  796. </div>
  797. <div className="clearfix">
  798. <FormItem
  799. labelCol={{ span: 7 }}
  800. wrapperCol={{ span: 13 }}
  801. label="所属区域"
  802. >
  803. <Input
  804. value={this.state.regionStr}
  805. disabled
  806. style={{ width: "140px" }}
  807. />
  808. </FormItem>
  809. </div>
  810. <div className="clearfix">
  811. <FormItem
  812. labelCol={{ span: 7 }}
  813. wrapperCol={{ span: 13 }}
  814. label="排序"
  815. >
  816. <Input
  817. value={this.state.sort}
  818. placeholder="请输入数字"
  819. onChange={e => {
  820. this.setState({
  821. sort: e.target.value
  822. });
  823. }}
  824. style={{ width: "140px" }}
  825. />
  826. </FormItem>
  827. </div>
  828. <div className="clearfix">
  829. <FormItem
  830. labelCol={{ span: 7 }}
  831. wrapperCol={{ span: 13 }}
  832. label="客户logo"
  833. >
  834. <PicturesWall
  835. flagimg={this.state.flag}
  836. fileList={this.getOrgCodeUrl}
  837. pictureUrl={this.state.pictureUrl}
  838. />
  839. <p><div>建议尺寸:248X189</div> 图片建议:要清晰。</p>
  840. </FormItem>
  841. </div>
  842. <div className="clearfix">
  843. <Button
  844. type="primary"
  845. size="large"
  846. onClick={e => {
  847. this.addNew(0);
  848. }}
  849. style={{
  850. float: "right",
  851. marginRight: "80px",
  852. marginTop: "20px"
  853. }}
  854. >
  855. 保存
  856. </Button>
  857. <Button
  858. type="primary"
  859. size="large"
  860. onClick={e => {
  861. this.addNew(1);
  862. }}
  863. style={{
  864. float: "right",
  865. marginRight: "20px",
  866. marginTop: "20px"
  867. }}
  868. >
  869. 保存并发布
  870. </Button>
  871. </div>
  872. </SpinContainer>
  873. </Modal>
  874. <Modal
  875. visible={this.state.imgeditvisible}
  876. onCancel={this.imghandleCancel}
  877. onOk={this.imgOk}
  878. >
  879. <img style={{ width: "100%" }} src={this.state.maximg} />
  880. </Modal>
  881. </div>
  882. </div>
  883. );
  884. }
  885. })
  886. );
  887. export default BuyList;