From 28df70b5ec05560be482efa594303b9ce81faf0f Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期五, 05 九月 2025 11:21:24 +0800
Subject: [PATCH] 设备台账统计-去除分页

---
 src/views/tms/modules/inbound/ChangeClassifyModal.vue |  257 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 257 insertions(+), 0 deletions(-)

diff --git a/src/views/tms/modules/inbound/ChangeClassifyModal.vue b/src/views/tms/modules/inbound/ChangeClassifyModal.vue
new file mode 100644
index 0000000..6616683
--- /dev/null
+++ b/src/views/tms/modules/inbound/ChangeClassifyModal.vue
@@ -0,0 +1,257 @@
+<template>
+  <!--鏀寔鍏ㄥ睆缂╂斁-->
+  <j-modal
+    :visible="visible"
+    :title="title"
+    switchFullscreen
+    :width="1200"
+    @ok="handleSubmit"
+    @cancel="close"
+    style="top: 50px"
+    cancelText="鍏抽棴"
+  >
+    <a-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="宸ュ叿缂栫爜">
+                <a-input placeholder="璇疯緭鍏ュ伐鍏风紪鐮�,鏀寔妯$硦鏌ヨ" v-model="queryParam.toolCode"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="鏍囪">
+                <a-input placeholder="璇疯緭鍏ユ爣璁�,鏀寔妯$硦鏌ヨ" v-model="queryParam.groupCompanySign"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="宸ュ叿绠�绉�">
+                <a-input placeholder="璇疯緭鍏ュ伐鍏风畝绉�" v-model="queryParam.shortCalled"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+            <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+          </a-row>
+        </a-form>
+      </div>
+      <!--宸ュ叿鍒楄〃-->
+      <a-table
+        ref="table"
+        :scroll="scrollTrigger"
+        size="middle"
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+      </a-table>
+    </a-card>
+  </j-modal>
+</template>
+
+<script>
+import { filterObj } from '@/utils/util'
+import { getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+export default {
+  name: 'ChangeClassifyModal',
+  mixins: [JeecgListMixin],
+  components: {},
+  props: {
+    classifyId:{
+        type:String
+      }
+  },
+  data() {
+    return {
+      queryParam: {},
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 50,
+          align: 'center',
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1
+          },
+        },
+        {
+          title: '宸ュ叿缂栫爜',
+          align: 'center',
+          dataIndex: 'toolCode',
+        },
+        {
+          title: '宸ュ叿鍚嶇О',
+          align: 'center',
+          dataIndex: 'chineseName',
+        },
+        {
+          title: '宸ュ叿绠�绉�',
+          align: 'center',
+          dataIndex: 'shortCalled',
+        },
+        {
+          title: '鏍囪',
+          align: 'center',
+          dataIndex: 'groupCompanySign',
+        },
+        {
+          title: '搴撲綅鍙�',
+          align: 'center',
+          dataIndex: 'positionCode',
+        },
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          align: 'center',
+          dataIndex: 'toolModel',
+        },
+        {
+          title: '宸ュ叿绫诲瀷',
+          align: 'center',
+          dataIndex: 'applicationTypeName',
+        },
+      ],
+      selectedRowKeys: [],
+      oldSlelectRows: [],
+      scrollTrigger: {},
+      dataSource: [],
+      selectionRows: [],
+      allSelectionRows: [],
+      title: '鏍规嵁鏌ヨ缁撴灉閫夋嫨宸ュ叿缂栫爜',
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['5', '10', '20'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      isorter: {
+        column: 'toolCode',
+        order: 'desc',
+      },
+      departTree: [],
+      visible: false,
+      loading: false,
+      url: {
+        // list: '/base/tooling/list',
+         list: '/tms/baseTools/paraCommonToolList',
+      },
+      oldId:''
+    }
+  },
+  computed: {
+    
+  },
+  watch: {},
+  created() {},
+  methods: {
+    
+    
+    showModal(oldId) {
+      this.oldId = oldId
+      this.visible = true
+      this.loadData(1)
+    },
+    getQueryParams() {
+      let param = Object.assign({}, this.queryParam, this.isorter)
+      param.field = this.getQueryField()
+      param.pageNo = this.ipagination.current
+      param.pageSize = this.ipagination.pageSize
+      return filterObj(param)
+    },
+    //鏌ヨ鏉′欢澶勭悊
+    getQueryField() {
+      let str = 'id,'
+      for (let a = 0; a < this.columns.length; a++) {
+        str += ',' + this.columns[a].dataIndex
+      }
+      return str
+    },
+    async loadData(arg) {
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      let that = this
+      this.loading = true
+      let params = this.getQueryParams() //鏌ヨ鏉′欢
+      params.classifyId = this.classifyId
+      await getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records
+          this.ipagination.total = res.result.total
+        }
+        if (res.code === 510) {
+          this.$message.warning(res.message)
+        }
+        this.loading = false
+      })
+    },
+    searchReset(num) {
+      let that = this
+      if (num !== 0) {
+        that.loadData(1)
+      }
+      that.selectborrowIds = []
+    },
+    onSelectChange(selectedRowKeys, selectionRows) {
+      this.selectedRowKeys = selectedRowKeys;
+      this.selectionRows = selectionRows;
+      this.selectionRows[0].oldId = this.oldId
+    },
+    close() {
+      this.searchReset(0)
+      this.selectedRowKeys = []
+      this.visible = false
+    },
+    handleTableChange(pagination, filters, sorter) {
+      //TODO 绛涢��
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
+      }
+      this.ipagination = pagination
+      this.loadData()
+    },
+    handleSubmit() {
+      this.$bus.$emit('selectionToolCode', this.selectionRows[0]);
+      this.searchReset(0)
+      this.close()
+    },
+    onSearch() {
+      this.loadData(1)
+    },
+     searchQuery() {
+      this.loadData(1);
+    },
+    searchReset() {
+      this.queryParam = {}
+      this.loadData(1)
+    },
+  },
+}
+</script>
+
+<style scoped>
+.ant-table-tbody .ant-table-row td {
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+#components-layout-demo-custom-trigger .trigger {
+  font-size: 18px;
+  line-height: 64px;
+  padding: 0 24px;
+  cursor: pointer;
+  transition: color 0.3s;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3