index.vue 2.43 KB
<!-- 物料列表 -->
<template>
  <d2-container>
    <el-form
      :inline="true"
      :model="searchForm"
      label-width="85px"
      slot="header"
    >
      <el-form-item label="物料">
        <el-input v-model="searchForm.keyWord" placeholder="请输入物料代码/编码/名称" clearable></el-input>
      </el-form-item>
      <el-form-item>
          <el-button type="primary"  icon="el-icon-search" :id="tableParams.btnId">查询</el-button>
      </el-form-item>
    </el-form>
     <d2-table-header title="物料列表"></d2-table-header>
     <d2-table
      :searchForm="searchForm"
      :tableParams="tableParams"
      :getListApi="getListApi"
     ></d2-table>
     <!-- <d2-table
      ref="table"
      :tableData="tableData"
      :tableTotal="tableTotal"
      :tableParams="tableParams"
      @refreshTable="getList"
     ></d2-table> -->
  </d2-container>
</template>

<script>
import { getListApi } from '@api/materialList'
// import notice from '@/common/notice'
export default {
  name: 'fimsMaterialList',
  data() {
    return {
      searchForm: {
        keyWord: ''
      },
      getListApi: getListApi,
      // 表格
      // tableData: [],
      // tableTotal: 10,
      tableParams: {
        btnId: new Date().getTime() + parseInt(Math.random() * 1000),
        listName: 'deviceList',
        tableColumns: [{
          label: '物料代码',
          prop: 'deviceNum',
          width: '170'
        }, {
          label: '物料编码',
          prop: 'deviceCode',
          width: '170'
        }, {
          label: 'CRC物料号',
          prop: 'crcCode',
          width: '170'
        }, {
          label: '图号',
          prop: 'drawNum',
          width: '170'
        }, {
          label: '物料名称',
          prop: 'deviceName',
          minWidth: '200'
        }, {
          label: '规格',
          prop: 'specifications',
          width: '140'
        }, {
          label: '责任人',
          prop: 'responsible',
          width: '120'
        }]
      }
    }
  },

  mounted() {},

  methods: {
    // getList(page) {
    //   const params = {
    //     ...(page || { pageCount: 10, pageSize: 1 }),
    //     ...this.searchForm
    //   }
    //   getListApi(params).then(res => {
    //     this.tableData = res.deviceList
    //     this.tableTotal = res.pagination.totalCount
    //   }).catch(() => {
    //     notice.errorTips()
    //   })
    // }
  }
}

</script>
<style scoped>
</style>