From 91678e5bf6c81ab5da30e8c2cb713b6e57ee229f Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 13 六月 2025 15:48:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 177 insertions(+), 0 deletions(-)
diff --git a/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue b/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue
new file mode 100644
index 0000000..451c5bb
--- /dev/null
+++ b/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue
@@ -0,0 +1,177 @@
+<template>
+ <div>
+ <!-- 鏌ヨ鍖哄煙 -->
+ <div class="table-page-search-wrapper">
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
+ <a-row :gutter="24">
+ <a-col :md="5" :sm="5">
+ <a-form-item label="鍒�鍏风紪鍙�">
+ <a-input placeholder="璇疯緭鍏ュ垁鍏风紪鍙�" v-model="queryParam.cutterCode" allow-clear/>
+ </a-form-item>
+ </a-col>
+
+ <a-col :md="5" :sm="5">
+ <a-form-item label="鍒�鍏峰悕绉�">
+ <a-input placeholder="璇疯緭鍏ュ垁鍏峰悕绉�" v-model="queryParam.cutterName" allow-clear/>
+ </a-form-item>
+ </a-col>
+
+ <a-col :md="4" :sm="4">
+ <a-space>
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="handleAdd" icon="plus" v-has="'cutter_add'">鏂板</a-button>
+ <a-button type="primary" @click="handleAdd()" icon="export">鍙戦�佸垁鍏风郴缁�</a-button>
+ </a-space>
+ </a-col>
+ </a-row>
+ </a-form>
+ </div>
+
+ <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" :size="size" rowKey="id"
+ @change="handleTableChange" :scroll="{y:189}">
+ <template slot="action" slot-scope="text, record">
+
+ <a @click="handleEdit(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 href="javascript:;" @click="handleDetail(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>
+ </template>
+ </a-table>
+
+ <CutterModal ref="cutterModalRef" :currentTreeNodeInfo="currentLevelInfo" @submitSuccess="loadData"/>
+ </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import CutterModal from '@views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue'
+
+export default {
+ name: 'CutterTableList',
+ components: { CutterModal },
+ mixins: [JeecgListMixin],
+ props: {
+ currentLevelInfo: {
+ type: Object
+ },
+ size: {
+ type: String
+ }
+ },
+ data() {
+ return {
+ disableMixinCreated: true,
+ columns: [
+ {
+ title: '搴忓彿',
+ dataIndex: 'rowIndex',
+ key: 'rowIndex',
+ width: 65,
+ align: 'center',
+ customRender: function(t, r, index) {
+ return parseInt(index) + 1
+ }
+ },
+ { title: '鍒�鍏风紪鍙�', dataIndex: 'cutterCode', width: 100, align: 'center' },
+ { title: '鍒�鍏峰悕绉�', dataIndex: 'cutterName', width: 100, align: 'center' },
+ { title: '鍒�鍏风畝绉�', dataIndex: 'cutterType', width: 80, align: 'center' },
+ { title: '鍒�鍏疯鏍�', dataIndex: 'cutterSpec', align: 'center' },
+ { title: '棰濆畾瀵垮懡', dataIndex: 'lifetime', width: 150, align: 'center' },
+ { title: '鍒�浣�', dataIndex: 'cutterSpacing', width: 50, align: 'center' },
+ { title: '鍒�鍏锋暟閲�', dataIndex: 'quantity', width: 80, align: 'center' },
+ { title: '鎻忚堪', dataIndex: 'description', width: 200, align: 'center' },
+ { title: '鎿嶄綔', dataIndex: 'action', scopedSlots: { customRender: 'action' }, align: 'center', width: 150 }
+ ],
+ url: {
+ list: '/nc/cutter/getByBusinessId',
+ delete: '/nc/cutter/delete',
+ exportXlsUrl: '/nc/cutter/exportXls',
+ importExcelUrl: '/nc/cutter/importExcel'
+ }
+ }
+ },
+ computed: {
+ importExcelUrl: function() {
+ return `${window._CONFIG['domianURL']}${this.url.importExcelUrl}`
+ }
+ },
+ methods: {
+ setQueryParamAndLoadData(pageNo = 1) {
+ if (this.currentLevelInfo.classificationId_dictText==='nc'){
+ const {docId,attributionType,attributionId} = this.currentLevelInfo
+ this.queryParam = Object.assign({}, { docId:docId,attributionType:attributionType,attributionId:attributionId })
+ }
+ if (this.currentLevelInfo.deviceManagementId !== null && this.currentLevelInfo.deviceManagementId !== undefined){
+ const {attributionType,id} = this.currentLevelInfo
+ this.queryParam = Object.assign({}, {attributionType:attributionType,attributionId:id })
+ }
+ if (this.currentLevelInfo.id !== null && this.currentLevelInfo.type !== null && this.currentLevelInfo.type !== undefined && this.currentLevelInfo.id !== undefined){
+ const { id, type } = this.currentLevelInfo
+ this.queryParam = Object.assign({}, { attributionId: id, attributionType: type })
+ }
+ this.loadData(pageNo)
+ },
+ searchQuery(pageNo = 1) {
+ if (this.currentLevelInfo.classificationId_dictText==='nc'){
+ const {docId,attributionType,attributionId} = this.currentLevelInfo
+ this.queryParam = Object.assign({}, { docId:docId,attributionType:attributionType,attributionId:attributionId })
+ }
+ if (this.currentLevelInfo.deviceManagementId !== null && this.currentLevelInfo.deviceManagementId !== undefined){
+ const {attributionType,id} = this.currentLevelInfo
+ this.queryParam = Object.assign({}, {attributionType:attributionType,attributionId:id })
+ }
+ if (this.currentLevelInfo.id !== null && this.currentLevelInfo.type !== null && this.currentLevelInfo.type !== undefined && this.currentLevelInfo.id !== undefined){
+ const { id, type } = this.currentLevelInfo
+ this.queryParam = Object.assign({}, { attributionId: id, attributionType: type })
+ }
+ this.loadData(pageNo)
+ },
+
+ handleAdd() {
+ if (!this.$refs.cutterModalRef) return
+ this.$refs.cutterModalRef.title = '娣诲姞鍒�鍏�'
+ this.$refs.cutterModalRef.disableSubmit = false
+ this.$refs.cutterModalRef.handleCutterAdd()
+ },
+
+ /**
+ * 缂栬緫琛ㄦ牸琛屼俊鎭�
+ * @param record 琛ㄦ牸琛屼俊鎭�
+ */
+ handleEdit(record) {
+ if (!this.$refs.cutterModalRef) return
+ this.$refs.cutterModalRef.title = '缂栬緫鍒�鍏蜂俊鎭�'
+ this.$refs.cutterModalRef.disableSubmit = false
+ this.$refs.cutterModalRef.handleCutterEdit(record)
+ },
+
+ /**
+ * 鏌ョ湅琛ㄦ牸瀹屾暣琛屼俊鎭�
+ * @param record 琛ㄦ牸琛屼俊鎭�
+ */
+ handleDetail: function(record) {
+ if (!this.$refs.cutterModalRef) return
+ this.$refs.cutterModalRef.title = '鍒�鍏疯鎯�'
+ this.$refs.cutterModalRef.disableSubmit = true
+ this.$refs.cutterModalRef.handleCutterEdit(record)
+ }
+ }
+}
+</script>
\ No newline at end of file
--
Gitblit v1.9.3