qushaowei
2025-05-30 e56be6e04cc6bfd106a354a5419f8a86f31f4003
src/views/eam/spare/EamSparePartsList.vue
@@ -98,6 +98,12 @@
        type="primary"
        icon="plus"
      >新增</a-button>
      <a-button
        @click="handleInto"
        type="primary"
        icon="plus"
      >入库</a-button>
      <!-- <a-button
        type="primary"
        icon="download"
@@ -198,6 +204,11 @@
      ref="modalForm"
      @ok="modalFormOk"
    ></eamSpareParts-modal>
    <eamSpare-part-into-modal
      ref="intoModalForm"
      @ok="modalFormOk"
    ></eamSpare-part-into-modal>
  </a-card>
</template>
@@ -205,6 +216,7 @@
import '@assets/less/TableExpand.less'
import EamSparePartsModal from './modules/EamSpareParts/EamSparePartsModal.vue'
import EamSparePartInventoryList from './modules/EamSpareParts/EamSparePartInventoryList.vue'
import EamSparePartIntoModal from './modules/EamSpareParts/EamSparePartIntoModal.vue'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
@@ -212,7 +224,8 @@
  mixins: [JeecgListMixin],
  components: {
    EamSparePartsModal,
    EamSparePartInventoryList
    EamSparePartInventoryList,
    EamSparePartIntoModal
  },
  data() {
    return {
@@ -220,6 +233,16 @@
      sparePartId: '-1',
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '备件编码',
          align: "center",
@@ -281,6 +304,11 @@
          dataIndex: 'inventoryWarning'
        },
        {
          title: '库存总数',
          align: "center",
          dataIndex: 'totalQuantity'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: "center",
@@ -302,11 +330,20 @@
    }
  },
  methods: {
    handleInto() {
      this.$refs.intoModalForm.add();
      this.$refs.intoModalForm.title = "入库";
    },
    searchReset() {
      this.queryParam = {}
      this.onClearSelected()
      this.loadData(1);
    },
    searchQuery() {
      this.onClearSelected()
      this.loadData(1);
    },
    clickThenSelect(record) {
      return {
        on: {