ItdmSampleExpireRealList.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="样品条码">
  9. <a-input placeholder="请输入样品条码" v-model="queryParam.barCode"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  14. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  16. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  17. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  18. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  19. <!-- </a>-->
  20. </span>
  21. </a-col>
  22. </a-row>
  23. </a-form>
  24. </div>
  25. <!-- 查询区域-END -->
  26. <!-- 操作按钮区域 -->
  27. <div class="table-operator">
  28. <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
  29. <a-button type="primary" icon="download" @click="handleExportXls('样品过期审核通过表')">导出</a-button>
  30. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  31. <!-- <a-button type="primary" icon="import">导入</a-button>-->
  32. </a-upload>
  33. <!-- 高级查询区域 -->
  34. <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
  35. <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
  36. <!-- <a-menu slot="overlay">-->
  37. <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
  38. <!-- </a-menu>-->
  39. <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
  40. <!-- </a-dropdown>-->
  41. </div>
  42. <!-- table区域-begin -->
  43. <div>
  44. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  45. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  46. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  47. </div>
  48. <a-table
  49. ref="table"
  50. size="middle"
  51. :scroll="{x:true}"
  52. bordered
  53. rowKey="id"
  54. :columns="columns"
  55. :dataSource="dataSource"
  56. :pagination="ipagination"
  57. :loading="loading"
  58. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  59. class="j-table-force-nowrap"
  60. @change="handleTableChange">
  61. <template slot="htmlSlot" slot-scope="text">
  62. <div v-html="text"></div>
  63. </template>
  64. <template slot="imgSlot" slot-scope="text,record">
  65. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  66. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  67. </template>
  68. <template slot="fileSlot" slot-scope="text">
  69. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  70. <a-button
  71. v-else
  72. :ghost="true"
  73. type="primary"
  74. icon="download"
  75. size="small"
  76. @click="downloadFile(text)">
  77. 下载
  78. </a-button>
  79. </template>
  80. <!-- <span slot="action" slot-scope="text, record">-->
  81. <!-- <a @click="handleEdit(record)">编辑</a>-->
  82. <!-- <a-divider type="vertical" />-->
  83. <!-- <a-dropdown>-->
  84. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  85. <!-- <a-menu slot="overlay">-->
  86. <!-- <a-menu-item>-->
  87. <!-- <a @click="handleDetail(record)">详情</a>-->
  88. <!-- </a-menu-item>-->
  89. <!-- <a-menu-item>-->
  90. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  91. <!-- <a>删除</a>-->
  92. <!-- </a-popconfirm>-->
  93. <!-- </a-menu-item>-->
  94. <!-- </a-menu>-->
  95. <!-- </a-dropdown>-->
  96. <!-- </span>-->
  97. </a-table>
  98. </div>
  99. <itdm-sample-expire-real-modal ref="modalForm" @ok="modalFormOk"></itdm-sample-expire-real-modal>
  100. </a-card>
  101. </template>
  102. <script>
  103. import '@/assets/less/TableExpand.less'
  104. import { mixinDevice } from '@/utils/mixin'
  105. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  106. import ItdmSampleExpireRealModal from './modules/ItdmSampleExpireRealModal'
  107. export default {
  108. name: 'ItdmSampleExpireRealList',
  109. mixins:[JeecgListMixin, mixinDevice],
  110. components: {
  111. ItdmSampleExpireRealModal
  112. },
  113. data () {
  114. return {
  115. description: '样品过期审核通过表管理页面',
  116. // 表头
  117. columns: [
  118. {
  119. title: '#',
  120. dataIndex: '',
  121. key:'rowIndex',
  122. width:60,
  123. align:"center",
  124. customRender:function (t,r,index) {
  125. return parseInt(index)+1;
  126. }
  127. },
  128. // {
  129. // title:'样品过期申请表id',
  130. // align:"center",
  131. // dataIndex: 'expireId'
  132. // },
  133. {
  134. title:'样品条码',
  135. align:"center",
  136. dataIndex: 'barCode'
  137. },
  138. {
  139. title:'样品名称',
  140. align:"center",
  141. dataIndex: 'sampleName'
  142. },
  143. {
  144. title:'样品规格',
  145. align:"center",
  146. dataIndex: 'sampleSpecifications'
  147. },
  148. {
  149. title:'生产厂家',
  150. align:"center",
  151. dataIndex: 'sampleManufacturer'
  152. },
  153. {
  154. title:'批次号',
  155. align:"center",
  156. dataIndex: 'batchNumber'
  157. },
  158. {
  159. title:'处理方式',
  160. align:"center",
  161. dataIndex: 'handlingMethod'
  162. },
  163. // {
  164. // title:'备注',
  165. // align:"center",
  166. // dataIndex: 'remark'
  167. // },
  168. // {
  169. // title: '操作',
  170. // dataIndex: 'action',
  171. // align:"center",
  172. // fixed:"right",
  173. // width:147,
  174. // scopedSlots: { customRender: 'action' }
  175. // }
  176. ],
  177. url: {
  178. list: "/inventory/itdmSampleExpireReal/list",
  179. delete: "/inventory/itdmSampleExpireReal/delete",
  180. deleteBatch: "/inventory/itdmSampleExpireReal/deleteBatch",
  181. exportXlsUrl: "/inventory/itdmSampleExpireReal/exportXls",
  182. importExcelUrl: "inventory/itdmSampleExpireReal/importExcel",
  183. },
  184. dictOptions:{},
  185. superFieldList:[],
  186. }
  187. },
  188. created() {
  189. this.getSuperFieldList();
  190. },
  191. computed: {
  192. importExcelUrl: function(){
  193. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  194. },
  195. },
  196. methods: {
  197. initDictConfig(){
  198. },
  199. getSuperFieldList(){
  200. let fieldList=[];
  201. fieldList.push({type:'string',value:'expireId',text:'样品过期申请表id',dictCode:''})
  202. fieldList.push({type:'sel_search',value:'barCode',text:'过期的样品条码id',dictTable:"", dictText:'', dictCode:''})
  203. fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
  204. this.superFieldList = fieldList
  205. }
  206. }
  207. }
  208. </script>
  209. <style scoped>
  210. @import '~@assets/less/common.less';
  211. </style>