patentDetails.jsx 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. import React,{Component} from "react";
  2. import {Modal, Form, Row, Col, Tabs, Table, Spin, message, Button} from "antd";
  3. import $ from "jquery/src/ajax";
  4. import ReminderLog from './reminderLog';
  5. const FormItem = Form.Item;
  6. const TabPane = Tabs.TabPane;
  7. const formItemLayout = {
  8. labelCol: { span: 10 },
  9. wrapperCol: { span: 14 },
  10. };
  11. class PatentDetails extends Component{
  12. constructor(props) {
  13. super(props);
  14. this.state={
  15. columns:[
  16. {
  17. title: "序号",
  18. dataIndex: "key",
  19. key: "key",
  20. },
  21. {
  22. title: "费用种类",
  23. dataIndex: "status",
  24. key: "status",
  25. },
  26. {
  27. title: "金额",
  28. dataIndex: "patentAmount",
  29. key: "patentAmount",
  30. },
  31. {
  32. title: "缴费日",
  33. dataIndex: "createTime",
  34. key: "createTime",
  35. },
  36. ],
  37. dataSource:[],
  38. loading:false,
  39. detailsInfor:{},
  40. }
  41. this.payLoadData = this.payLoadData.bind(this);
  42. }
  43. componentDidMount() {
  44. this.payLoadData();
  45. }
  46. payLoadData() {
  47. this.setState({
  48. loading: true,
  49. });
  50. const {detailsInfor} = this.props;
  51. $.ajax({
  52. method: "get",
  53. dataType: "json",
  54. crossDomain: false,
  55. url: globalConfig.context + "/api/admin/patentNew/patentPaymentDetails",
  56. data: {
  57. id:detailsInfor.id
  58. },
  59. success: function (data) {
  60. if(data.error.length === 0){
  61. for(let i =0;i<data.data.length;i++){
  62. data.data[i].key = i+1;
  63. }
  64. console.log(data.data,'data.data')
  65. this.setState({
  66. dataSource: data.data,
  67. });
  68. }else{
  69. message.warning(data.error[0].message);
  70. }
  71. }.bind(this),
  72. }).always(
  73. function () {
  74. this.setState({
  75. loading: false,
  76. });
  77. }.bind(this)
  78. );
  79. }
  80. render() {
  81. const {detailsInfor} = this.props;
  82. return (
  83. <Modal
  84. title='年费数据'
  85. className='payRecordComponent'
  86. width={800}
  87. maskClosable={false}
  88. footer={null}
  89. visible={this.props.visible}
  90. onCancel={this.props.onCancel}
  91. >
  92. <Form layout="horizontal">
  93. <Row gutter={40}>
  94. <Col span={8}>
  95. <FormItem
  96. {...formItemLayout}
  97. label='专利号'
  98. >
  99. {detailsInfor.patentNo}
  100. </FormItem>
  101. </Col>
  102. <Col span={8}>
  103. <FormItem
  104. {...formItemLayout}
  105. label='专利名称'
  106. >
  107. {detailsInfor.name}
  108. </FormItem>
  109. </Col>
  110. <Col span={8}>
  111. <FormItem
  112. {...formItemLayout}
  113. label='专利类型'
  114. >
  115. {
  116. detailsInfor.type === 0 ? '发明专利':
  117. detailsInfor.type === 1 ? '实用新型':
  118. detailsInfor.type === 2 ? '外观设计': ''
  119. }
  120. </FormItem>
  121. </Col>
  122. <Col span={8}>
  123. <FormItem
  124. {...formItemLayout}
  125. label='申请日期'
  126. >
  127. {detailsInfor.applyDates}
  128. </FormItem>
  129. </Col>
  130. <Col span={16}>
  131. <FormItem
  132. labelCol={{span: 5}}
  133. wrapperCol={{span: 19}}
  134. label='授权日期'
  135. >
  136. {detailsInfor.authorizationDates}
  137. </FormItem>
  138. </Col>
  139. <Col span={8}>
  140. <FormItem
  141. {...formItemLayout}
  142. label='年费'
  143. >
  144. {detailsInfor.authorizationDates}
  145. </FormItem>
  146. </Col>
  147. <Col span={8}>
  148. <FormItem
  149. {...formItemLayout}
  150. label='滞纳金'
  151. >
  152. {detailsInfor.delayingAmount}
  153. </FormItem>
  154. </Col>
  155. <Col span={8}>
  156. <FormItem
  157. {...formItemLayout}
  158. label='权利恢复费'
  159. >
  160. {detailsInfor.recoveryAmount}
  161. </FormItem>
  162. </Col>
  163. <Col span={8}>
  164. <FormItem
  165. {...formItemLayout}
  166. label='年费状态'
  167. >
  168. {
  169. detailsInfor.annualFeeStatus === 0 ? '无代缴' :
  170. detailsInfor.annualFeeStatus === 1 ? '已代缴' : ''
  171. }
  172. </FormItem>
  173. </Col>
  174. <Col span={16}>
  175. <FormItem
  176. labelCol={{span: 5}}
  177. wrapperCol={{span: 19}}
  178. label='通知'
  179. >
  180. <div style={{display:'flex',alignItems:'center'}}>
  181. {
  182. detailsInfor.salesmanRemind === 0 ? '未提醒' :
  183. detailsInfor.salesmanRemind === 1 ? '已提醒' : ''
  184. }
  185. <Button
  186. onClick={()=>{
  187. this.setState({
  188. visible:true,
  189. id:detailsInfor.id
  190. })
  191. }}
  192. style={{marginLeft:"15px"}}
  193. type='primary'>
  194. 查看提醒日志
  195. </Button>
  196. </div>
  197. </FormItem>
  198. </Col>
  199. </Row>
  200. </Form>
  201. <Spin spinning={this.state.loading}>
  202. <Table
  203. columns={this.state.columns}
  204. dataSource={this.state.dataSource}
  205. pagination={false}
  206. bordered
  207. size="small"
  208. />
  209. </Spin>
  210. {this.state.visible ? <ReminderLog
  211. visible={this.state.visible}
  212. id={this.state.id}
  213. onCancel={()=>{
  214. this.setState({
  215. visible: false,
  216. id: undefined,
  217. })
  218. }}
  219. /> : null}
  220. </Modal>
  221. )
  222. }
  223. }
  224. export default PatentDetails;