lyh
2025-06-16 e48436b9c5dd3f0365f77339f84b37eea95b56e2
提取刀具选择刀具 修改文件名称展示
已修改6个文件
116 ■■■■■ 文件已修改
src/api/dnc.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/baseTools/DncToolsSelectModal.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/dnc.js
@@ -29,6 +29,8 @@
  assignDocumentToDeviceApi: params => postAction('/nc/activit/assign/file/apply', params),
  // 提取刀具
  extractToolsApi: ({ docId,attributionType, attributionId}) => getAction(`/nc/cutter/extractCutterInfo/${docId}/${attributionType}/${attributionId}`),
  // 发送刀具系统
  sendToolsApi: ({ docId,attributionType, attributionId}) => getAction(`/nc/cutter/sendCutterInfo/${docId}/${attributionType}/${attributionId}`),
  // 下载文档
  downloadDocumentApi: ({ docId, docName }) => requestGetDownLoad(`/nc/doc/download/${docId}`, docName),
  // 删除文档
src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue
@@ -2,7 +2,10 @@
  <div>
    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" :loading="loading"
             :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
      <!-- 字符串超长截取省略号显示-->
      <span slot="docName" slot-scope="text">
          <j-ellipsis :value="text"/>
        </span>
    </a-table>
    <DocumentModal ref="modalForm" @ok="modalFormOk"/>
@@ -48,6 +51,7 @@
            dataIndex: 'docName',
            key: 'docName',
            align: 'center',
            scopedSlots: {customRender: 'docName'},
            width: 300,
            sorter: true
          },
src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue
@@ -2,7 +2,10 @@
  <div>
    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" :loading="loading"
             :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
      <!-- 字符串超长截取省略号显示-->
      <span slot="docName" slot-scope="text">
          <j-ellipsis :value="text"/>
        </span>
    </a-table>
    <DocumentModal ref="modalForm" @ok="modalFormOk"/>
@@ -48,6 +51,7 @@
            dataIndex: 'docName',
            key: 'docName',
            align: 'center',
            scopedSlots: {customRender: 'docName'},
            width: 300,
            sorter: true
          },
src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue
@@ -20,7 +20,7 @@
            <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-button type="primary" @click="handleSend()" icon="export">发送刀具系统</a-button>
            </a-space>
          </a-col>
        </a-row>
@@ -31,7 +31,7 @@
             @change="handleTableChange" :scroll="{y:189}">
      <template slot="action" slot-scope="text, record">
        <a @click="handleEdit(record)">选择刀具</a>
        <a @click="handleChoose(record)">选择刀具</a>
        <a-divider type="vertical"/>
@@ -56,16 +56,21 @@
    </a-table>
    <CutterModal ref="cutterModalRef" :currentTreeNodeInfo="currentLevelInfo" @submitSuccess="loadData"/>
    <DncToolsSelectModal ref="dncToolsSelectModal" @submitSuccess="loadData"/>
  </div>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CutterModal from '@views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue'
import DncToolsSelectModal from '@views/tms/modules/baseTools/DncToolsSelectModal.vue'
import { getAction, httpAction } from '@api/manage'
import dncApi from '@api/dnc'
export default {
  name: 'CutterTableList',
  components: { CutterModal },
  components: { DncToolsSelectModal, CutterModal },
  mixins: [JeecgListMixin],
  props: {
    currentLevelInfo: {
@@ -89,7 +94,7 @@
            return parseInt(index) + 1
          }
        },
        { title: '刀具编号', dataIndex: 'cutterCode', width: 100, align: 'center' },
        { title: '刀具编号', dataIndex: 'cutterCode', width: 200, align: 'center' },
        { title: '刀具名称', dataIndex: 'cutterName', width: 100, align: 'center' },
        { title: '刀具简称', dataIndex: 'cutterType', width: 80, align: 'center' },
        { title: '刀具规格', dataIndex: 'cutterSpec', align: 'center' },
@@ -103,7 +108,8 @@
        list: '/nc/cutter/getByBusinessId',
        delete: '/nc/cutter/delete',
        exportXlsUrl: '/nc/cutter/exportXls',
        importExcelUrl: '/nc/cutter/importExcel'
        importExcelUrl: '/nc/cutter/importExcel',
        sendCutterUrl: '/nc/cutter/sendCutterUrl',
      }
    }
  },
@@ -171,6 +177,62 @@
      this.$refs.cutterModalRef.title = '刀具详情'
      this.$refs.cutterModalRef.disableSubmit = true
      this.$refs.cutterModalRef.handleCutterEdit(record)
    },
    /**
     * 选择刀具
     */
    handleChoose(record){
      if (record.cutterName.match(/\d+(\.\d+)?/g) !== null) {
        record.cutterName = record.cutterName.match(/\d+(\.\d+)?/g)[0]
      }
      const param = {
        aliasLabel: record.cutterType,
        diameter: record.cutterName,
        cutterId: record.id
      }
      this.$refs.dncToolsSelectModal.open(param)
      this.$refs.dncToolsSelectModal.title = '选择刀具'
    },
    /**
     * 发送刀具系统
     */
    handleSend(){
      const that = this
      const { docId,attributionId, attributionType } = this.currentLevelInfo
      that.$confirm({
        title: '提示',
        content: `确认发送刀具系统吗?`,
        okText: '确认',
        cancelText: '取消',
        onOk: () => {
          dncApi.sendToolsApi({ docId, attributionId, attributionType })
            .then(res => {
              if (res.success) {
                that.$notification.success({
                  message: '消息',
                  description: res.message
                })
              } else {
                that.$notification.error({
                  message: '消息',
                  description: res.message
                })
              }
            })
            .catch(err => {
              that.$notification.error({
                message: '消息',
                description: err.message
              })
            })
            .finally(() => {
              that.$destroyAll()
            })
        },
        onCancel: () => {
          that.$destroyAll()
        }
      })
    }
  }
}
src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue
@@ -146,7 +146,8 @@
          {
            title:'流水号',
            align:"center",
            dataIndex: 'serialNumber'
            dataIndex: 'serialNumber',
            width:150,
          },
          {
            title:'夹具',
src/views/tms/modules/baseTools/DncToolsSelectModal.vue
@@ -656,7 +656,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import BaseToolsModal from './BaseToolsModal'
import Tooltip from 'ant-design-vue/es/tooltip'
import { getAction, postAction, deleteAction, requestPut } from '@api/manage'
import { getAction, postAction, deleteAction, requestPut, httpAction } from '@api/manage'
import ParaBaseModal from './ParaBaseModal.vue'
import ParaHoleToolsModal from './ParaHoleToolsModal'
import ParaMillToolModal from './ParaMillToolModal'
@@ -694,6 +694,11 @@
    ParaTurningToolsList,
    ParaCommonToolList,
    ParaBladeList
  },
  props: {
    currentTreeNodeInfo: {
      type: Object
    }
  },
  data() {
    return {
@@ -793,7 +798,8 @@
        queryToolClassifyByParam: '/tms/toolsToDnc/queryToolClassifyByParam',
        queryParaByToolCode: '/tms/baseTools/queryByToolCode',
        queryByToolCode: '/tms/toolsConfigProperty/queryByToolCode',
        queryToolsClassify: '/tms/toolsClassify/queryById'
        queryToolsClassify: '/tms/toolsClassify/queryById',
        cutterEdit: '/nc/cutter/edit'
      },
      dictOptions: {},
      nodeSelected: {}, // 当前选中的节点数据
@@ -804,7 +810,7 @@
        toolCode: '',
        toolModel: '',
        chineseName: ''
      }
      },
    }
  },
  created() {
@@ -967,6 +973,21 @@
      this.clearQueryFlag()
      this.clearPara()
      this.visible = false
      let formData = {};
      formData.id=this.param.cutterId;
      formData.cutterCode=record.toolCode;
      formData.cutterName=record.classifyName;
      formData.toolsId=record.toolId
      httpAction(this.url.cutterEdit, formData, 'put').then((res) => {
        if(res.success){
          this.$message.success(res.message);
          this.$emit('ok');
        }else{
          this.$message.warning(res.message);
        }
      }).finally(() => {
        this.confirmLoading = false;
      })
    },
    //详情
    handleDetail: function(record) {