historyModal.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <div id="declareElementsModal">
  3. <a-modal
  4. title="审批历史"
  5. v-model="histiryModVis"
  6. :confirmLoading="confirmLoading"
  7. @cancel="handleCancel"
  8. width="80%"
  9. style="top:330px;left:100px;"
  10. >
  11. <!-- 増行 子表 -->
  12. <a-card :bordered="false" style="margin:10px 0">
  13. <!-- 子表 -->
  14. <a-spin :spinning="confirmLoading">
  15. <a-form-model ref="formRef">
  16. <a-table
  17. v-if="historyData"
  18. bordered
  19. rowKey="id"
  20. :columns="historyColumns"
  21. :data-source="historyData"
  22. :loading="loading"
  23. :pagination="false"
  24. :scroll="{y: 500}"
  25. >
  26. </a-table>
  27. </a-form-model>
  28. </a-spin>
  29. </a-card>
  30. <!-- 页面底部保存取消 -->
  31. <div
  32. :style="{
  33. position: 'absolute',
  34. right: 0,
  35. bottom: 0,
  36. width: '100%',
  37. borderTop: '1px solid #e9e9e9',
  38. padding: '10px 16px',
  39. background: '#fff',
  40. textAlign: 'right',
  41. zIndex: 1
  42. }"
  43. >
  44. <!-- <a-popconfirm title="确定放弃?" @confirm="handleCancel" okText="确定" cancelText="取消"> -->
  45. <a-button :style="{ marginRight: '8px' }" @click="handleCancel">返回</a-button>
  46. <!-- </a-popconfirm>
  47. <a-button type="primary" @click="addSave">
  48. 保存
  49. </a-button> -->
  50. </div>
  51. </a-modal>
  52. </div>
  53. </template>
  54. <script>
  55. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  56. import JEllipsis from '@/components/jeecg/JEllipsis'
  57. import moment from 'moment'
  58. import {historyApproval } from '@api/document/fabricLossesSummary.js'
  59. export default {
  60. name: 'DeclareElementsModal', // 报关要素
  61. mixins: [JeecgListMixin],
  62. components: { JEllipsis, moment },
  63. data() {
  64. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  65. return {
  66. loading: false, // 表格加载
  67. pushState: false, //是否推送
  68. query:'1',//是否查询
  69. // 子表表头
  70. historyColumns: [
  71. {
  72. title: '序号',
  73. width: 30,
  74. dataIndex: 'index',
  75. customRender: (text, record, index) => `${index + 1}`,
  76. className: 'replacecolor'
  77. },
  78. {
  79. title: '状态',
  80. dataIndex: 'stuta',
  81. width: 250,
  82. className: 'replacecolor'
  83. },
  84. {
  85. title: '计划号',
  86. dataIndex: 'planNo',
  87. width: 250,
  88. className: 'replacecolor'
  89. },
  90. {
  91. title: '处理人',
  92. dataIndex: 'processedBy',
  93. width: 200,
  94. className: 'replacecolor'
  95. },
  96. {
  97. title: '处理时间',
  98. dataIndex: 'processingTime',
  99. width: 200,
  100. className: 'replacecolor'
  101. },
  102. {
  103. title: '处理意见',
  104. dataIndex: 'processingOpinion',
  105. width: 200,
  106. className: 'replacecolor'
  107. }
  108. ],
  109. declareElements: {}, // 主表信息
  110. historyData: [], // 子表信息
  111. confirmLoading: false,
  112. histiryModVis: false,
  113. }
  114. },
  115. // 接收父组件 方法
  116. props: {},
  117. created() {
  118. },
  119. methods: {
  120. getHistoryList(data){
  121. historyApproval({code:data}).then(res => {
  122. if (res.success) {
  123. this.historyData = res.result
  124. }else{
  125. this.$message.error(res.message);
  126. }
  127. })
  128. },
  129. handleCancel(){
  130. this.histiryModVis = false
  131. }
  132. },
  133. computed: {}
  134. }
  135. </script>
  136. <style lang="less" scoped>
  137. @import '~@assets/less/common.less';
  138. @import '~@assets/less/overwriter.less';
  139. /deep/ .ant-table-thead > tr > th {
  140. text-align: center;
  141. // font-weight: 700;
  142. }
  143. /deep/ .ant-table-tbody {
  144. text-align: center;
  145. }
  146. // th.replacecolor {
  147. // background-color: #ccc;
  148. // }
  149. // 对话框里的card样式
  150. /deep/ .ant-modal-content {
  151. background-color: #f0f2f5;
  152. }
  153. /deep/ .ant-modal-body {
  154. padding: 10px;
  155. }
  156. /deep/.ant-form-item{
  157. margin-bottom: 0px !important;
  158. }
  159. // /deep/.ant-table-tbody .ant-table-row td{
  160. // padding-top: 2px;
  161. // padding-bottom: 2px;
  162. // }
  163. // /deep/ .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
  164. // padding: 9px 16px
  165. // }
  166. </style>