From 5e31103125cb1ff33be29ec400c9c8d007448462 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期二, 27 五月 2025 14:50:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/tms/requirement/ToolSharpeningList .vue |  249 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 249 insertions(+), 0 deletions(-)

diff --git a/src/views/tms/requirement/ToolSharpeningList .vue b/src/views/tms/requirement/ToolSharpeningList .vue
new file mode 100644
index 0000000..cf8841a
--- /dev/null
+++ b/src/views/tms/requirement/ToolSharpeningList .vue
@@ -0,0 +1,249 @@
+<template>
+  <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="4" :lg="7" :md="8" :sm="24">
+            <a-form-item label="鍒�鍏风紪鍙�">
+              <a-input placeholder="璇疯緭鍏ュ垁鍏风紪鍙�" v-model="queryParam.toolId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="4" :lg="7" :md="8" :sm="24">
+            <a-form-item label="鍒冪(缁撴灉">
+              <a-input placeholder="璇疯緭鍏ュ垉纾ㄧ粨鏋�" v-model="queryParam.sharpeningResult"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="鍒冪(鏃堕棿">
+              <a-range-picker v-model="queryParam.sharpeningTime" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+            </a-form-item>
+          </a-col>
+          <a-col :xl="4" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <div class="table-operator">
+        <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+      </div>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="null"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDetail(record)">璇︽儏</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleEdit(record)">缂栬緫</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <tools-sharpening-modal ref="modalForm"  @ok="modalFormOk"></tools-sharpening-modal>
+  </a-card>
+</template>
+
+<script>
+
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import ToolsSharpeningModal from './modules/ToolsSharpeningModal'
+import { getAction, putAction, deleteAction } from '../../../api/manage'
+
+export default {
+  name: 'ToolSharpeningList ',
+  mixins:[JeecgListMixin, mixinDevice],
+  components: {
+    ToolsSharpeningModal
+  },
+  data () {
+    return {
+      description: '鍒�鍏峰垉纾�',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key:'rowIndex',
+          width:60,
+          align:"center",
+          customRender:function (t,r,index) {
+            return parseInt(index)+1;
+          }
+        },
+        {
+          title:'鍒�鍏峰垎绫�',
+          align:"center",
+          dataIndex: 'paramaTableName_dictText'
+        },
+        {
+          title:'鍒�鍏风紪鍙�',
+          align:"center",
+          dataIndex: 'toolId'
+        },
+        {
+          title:'鍒�鍏峰悕绉�',
+          align:"center",
+          dataIndex: 'typeName'
+        },
+
+        {
+          title:'鍘傚',
+          align:"center",
+          dataIndex: 'supplierId',
+        },
+        {
+          title:'鍒冪(鏃堕棿',
+          align:"center",
+          dataIndex: 'sharpeningTime'
+        },
+        {
+          title:'鍒冪(缁撴灉鍙婂缓璁�',
+          align:"center",
+          dataIndex: 'sharpeningResult'
+        },
+        {
+          title:'璐d换浜�',
+          align:"center",
+          dataIndex: 'responsiblePerson_dictText'
+        },
+
+        {
+          title:'鍒涘缓浜�',
+          align:"center",
+          dataIndex: 'createBy'
+        },
+
+        {
+          title:'鍒涘缓鏃堕棿',
+          align:"center",
+          dataIndex: 'createTime'
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align:"center",
+          fixed:"right",
+          width:147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: "/tms/toolSharpening/listToolSharpening",
+        add: "/tms/toolSharpening/add",
+        delete: "/tms/toolSharpening/delete",
+        edit: "/tms/toolSharpening/edit",
+        deleteBatch: "/tms/toolSharpening/deleteBatch",
+        exportXlsUrl: "/tms/toolSharpening/exportXls",
+        importExcelUrl: "tms/toolSharpening/importExcel",
+      },
+      dictOptions:{},
+      superFieldList:[],
+
+    }
+  },
+  created() {},
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    },
+  },
+
+  methods: {
+    onInspectionDateChange: function(value, dateString) {
+      this.queryParam.sharpeningTimeBegin = dateString[0]
+      this.queryParam.sharpeningTimeEnd = dateString[1]
+    },
+
+
+    handleEdit: function (record) {
+      console.log('record:', record)
+      this.$refs.modalForm.title = '缂栬緫'
+      this.$refs.modalForm.disableSubmit = false
+      this.$refs.modalForm.edit(record)
+
+    },
+    handleDetail:function(record){
+      this.$refs.modalForm.title="璇︽儏";
+      this.$refs.modalForm.disableSubmit = true;
+      this.$refs.modalForm.edit(record);
+    },
+
+
+    handleDelete: function (id) {
+      if (!this.url.delete) {
+        this.$message.error('璇疯缃畊rl.delete灞炴��!')
+        return
+      }
+      deleteAction(this.url.delete, { id: id }).then((res) => {
+        if (res.success) {
+          //閲嶆柊璁$畻鍒嗛〉闂
+          this.$message.success(res.message)
+          this.ipagination.current = 1
+          this.loadData() // 寮哄埗浠庣涓�椤靛姞杞�
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
+    searchReset() {
+      this.loadData(1)
+    },
+    modalFormOk() {
+      this.loadData()
+    },
+
+
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+.enable {
+  color: green;
+}
+.disable {
+  color: red;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3