zenglf
2023-08-19 8611a1ba1696e76cced04ff5d658ba138a05dafd
src/views/spare/modules/sparePartScrap/SparePartScrapDetailList.vue
@@ -15,14 +15,21 @@
        size='middle'
        bordered
        rowKey='id'
        :scroll='{x:true}'
        :scroll="{ x: 'calc(1400px + 50%)', y: 900 }"
        :columns='columns'
        :dataSource='dataSource'
        :pagination='ipagination'
        :loading='loading'
        @change='handleTableChange'
      >
        <template slot="scrapReason" slot-scope="text" >
          <a-tooltip placement="top" :title="text" trigger="hover">
            <div>
              <template slot="title"> </template>
              <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p>
            </div>
          </a-tooltip>
        </template>
        <template
          slot='htmlSlot'
          slot-scope='text'
@@ -100,6 +107,10 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@api/manage'
function Tooltip(props) {
  return null
}
export default {
  name: 'SparePartScrapDetailList',
  mixins: [JeecgListMixin],
@@ -126,10 +137,12 @@
  },
  data() {
    return {
      description: '备件报废管理页面',
      disableMixinCreated: true,
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
@@ -144,82 +157,87 @@
          title: '备件编码',
          align: 'center',
          dataIndex: 'spareNum',
          width: 150
        },
        {
          title: '备件名称',
          align: 'center',
          dataIndex: 'spareName',
          width: 150
        },
        {
          title: '规格',
          align: 'center',
          dataIndex: 'specification',
          width: 130
        },
        {
          title: '型号',
          align: 'center',
          dataIndex: 'model',
          width: 150
          ellipsis: true
        },
        {
          title: '主单位',
          align: 'center',
          dataIndex: 'mainUnitIdName',
          width: 100
        },
        {
          title: '库存主数量',
          align: 'center',
          dataIndex: 'mainQuantity',
          width: 100
        },
        {
          title: '辅单位',
          align: 'center',
          dataIndex: 'auxiliaryUnitIdName',
          width: 100
          ellipsis: true
        },
        {
          title: '库存辅数量',
          align: 'center',
          dataIndex: 'auxiliaryQuantity',
          width: 100
        },
        {
          title: '报废主数量',
          align: 'center',
          dataIndex: 'scrapMainQuantity',
          width: 100
        },
        {
          title: '报废辅数量',
          align: 'center',
          dataIndex: 'scrapAuxiliaryQuantity',
          width: 100
        },
        {
          title: '库区',
          align: 'center',
          dataIndex: 'warehouseAreaIdName',
          width: 100
        },
        {
          title: '库位',
          align: 'center',
          dataIndex: 'warehouseLocationIdName',
          width: 100
        },
        {
          title: '报废原因',
          align: 'center',
          dataIndex: 'scrapReason',
          width: 100
        }
          scopedSlots: { customRender: 'scrapReason' },  //必写
          ellipsis: true,
        },
        {
          title: '库区',
          align: 'center',
          dataIndex: 'warehouseAreaIdName',
        },
        {
          title: '库位',
          align: 'center',
          dataIndex: 'warehouseLocationIdName',
        },
      ],
      url: {
@@ -239,6 +257,7 @@
    }
  },
  methods: {
    clearList() {
      this.dataSource = []
      this.selectedRowKeys = []
@@ -279,4 +298,5 @@
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>