9f7fc23d9c90d333f67604d0be0576b44a2cbca6..28df70b5ec05560be482efa594303b9ce81faf0f
3 天以前 hyingbo
设备台账统计-去除分页
28df70 对比 | 目录
3 天以前 hyingbo
设备台账统计
4ba27c 对比 | 目录
3 天以前 cuijian
刀具刃磨功能,增加刃磨后刀具信息变更
88a019 对比 | 目录
已添加2个文件
已修改4个文件
506 ■■■■■ 文件已修改
src/views/eam/equipment/EamEquipmentList.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/inbound/ChangeClassifyModal.vue 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/inbound/InboundModel.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/outBound/OutboundListRight.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/requirement/ToolSharpeningList .vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/equipment/EamEquipmentList.vue
@@ -243,6 +243,11 @@
        @click="handleTemplateXlsDownload"
      >导入模板下载
      </a-button>
      <a-button
        @click="EquipmentCategoryStatistics"
        type="primary"
        icon="area-chart"
      >台账统计</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <!--          <a-menu-item key="1" @click="handleOpenNameplateModal(selectionRows)">-->
@@ -369,6 +374,9 @@
    <nameplate-modal ref="nameplateModalRef" :printedRows="printedRows"/>
    <!--履历弹窗-->
    <resume-drawer ref="resumeDrawerRef" :currentTableRowRecord="currentTableRowRecord"/>
    <!--台账统计-->
    <equipment-category-statistics-list ref="EquipmentCategoryStatistics"/>
  </a-card>
</template>
@@ -389,11 +397,13 @@
  import EamSecondMaintenanceOrderList from '@views/eam/maintenance/EamSecondMaintenanceOrderList.vue'
  import EamThirdMaintenanceOrderList from '@views/eam/maintenance/EamThirdMaintenanceOrderList.vue'
  import EamEquipmentFluidList from '@views/eam/equipment/modules/EamEquipmentFluidList.vue'
  import EquipmentCategoryStatisticsList from '@views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue'
  export default {
    name: 'EamEquipmentList',
    mixins: [JeecgListMixin],
    components: {
      EquipmentCategoryStatisticsList,
      EamInspectionOrderList,
      EamRepairOrderList,
      EamMaintenanceStandardList,
@@ -820,6 +830,11 @@
        templateXlsDownload(this.url.templateXlsDownloadUrl)
      },
      EquipmentCategoryStatistics() {
        this.$refs.EquipmentCategoryStatistics.visible = true; // æ˜¾ç¤ºå¼¹çª—
        this.$refs.EquipmentCategoryStatistics.loadData()
      },
      loadAppHomeUrlConfigValue() {
        let params = { settingKey: 'app_home_url' }
        getSystemConfigValue(params).then(res => {
src/views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,196 @@
<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    cancelText="关闭"
    @cancel="handleCancel"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <div class="table-operator">
      <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('台账统计')"
      >导出</a-button>
    </div>
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        class="j-table-force-nowrap"
        :scroll="{x:true}"
        @change="handleTableChange"
        :columns="columns"
        :dataSource="dataSource"
        :loading="loading"
        :pagination="false"
      >
      </a-table>
    </div>
    <div slot="footer">
      <a-button @click="handleCancel">关闭</a-button>
    </div>
  </j-modal>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { downFile, getAction } from '@/api/manage'
import '@/assets/less/TableExpand.less'
export default {
  name: "EquipmentCategoryStatisticsList",
  mixins:[JeecgListMixin],
  components: {},
  data() {
    return {
      title: '台账统计',
      width: 1200,
      visible: false,
      confirmLoading: false,
      // è¡¨å¤´
      columns: [
        {
          title: '设备种类',
          align: "center",
          dataIndex: 'equipmentType',
        },
        {
          title: '设备总数',
          align: "left",
          dataIndex: 'equipmentCount'
        },
        {
          title: '总原值',
          align: "center",
          dataIndex: 'originalValue',
          // æ ¼å¼åŒ–数值显示
          render: (text) => {
            return text.toFixed(2)
          }
        },
        {
          title: '高精度总数',
          align: "center",
          dataIndex: 'highPrecisionCount'
        },
        {
          title: '高精度原值',
          align: "center",
          dataIndex: 'highPrecisionOriginalValue',
          render: (text) => {
            return text.toFixed(2)
          }
        },
        {
          title: '国产总数',
          align: "left",
          dataIndex: 'domesticCount'
        },
        {
          title: '国产原值',
          align: "left",
          dataIndex: 'domesticOriginalValue',
          render: (text) => {
            return text.toFixed(2)
          }
        },
        {
          title: '进口总数',
          align: "left",
          dataIndex: 'importCount'
        },
        {
          title: '进口原值',
          align: "left",
          dataIndex: 'importOriginalValue',
          render: (text) => {
            return text.toFixed(2)
          }
        },
        {
          title: '完好总数',
          align: "left",
          dataIndex: 'intactCount'
        },
        {
          title: '完好原值',
          align: "left",
          dataIndex: 'intactOriginalValue',
          render: (text) => {
            return text.toFixed(2)
          }
        }
      ],
      url: {
        list: "/eam/equipment/queryLedgerStatistics",
        exportXlsUrl: "/eam/equipment/exportLedgerStatisticsXls"
      },
    }
  },
  created() {
  },
  computed: {},
  methods: {
    handleExportXls(fileName) {
      if (!fileName || typeof fileName != "string") {
        fileName = "导出文件"
      }
      downFile(this.url.exportXlsUrl).then((data) => {
        if (!data) {
          this.$message.warning("文件下载失败")
          return
        }
        if (typeof window.navigator.msSaveBlob !== 'undefined') {
          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
        } else {
          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
          let link = document.createElement('a')
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', fileName + '.xls')
          document.body.appendChild(link)
          link.click()
          document.body.removeChild(link); //下载完成移除元素
          window.URL.revokeObjectURL(url); //释放掉blob对象
        }
      })
    },
    loadData() {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      this.onClearSelected()
      this.loading = true;
      getAction(this.url.list).then((res) => {
        if (res.success) {
          // ä¿®å¤æ•°æ®è®¿é—®è·¯å¾„,直接使用res.result而非res.result.records
          this.dataSource = res.result;
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false;
      })
    },
    handleCancel() {
      this.$emit('close');
      this.visible = false;
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
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>
src/views/tms/modules/inbound/InboundModel.vue
@@ -86,6 +86,8 @@
        </div>
      </template>
      <span slot="action" slot-scope="text, record, index">
        <a @click="handleChangeClassify(record)" v-if="sharpenShow && !disableSubmit">变更工具分类</a>
        <a-divider type="vertical" v-if="sharpenShow && !disableSubmit"/>
        <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record, index)" :disabled="disableSubmit">
          <a>删除</a>
        </a-popconfirm>
@@ -102,6 +104,7 @@
    <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-tooling-modal>
    <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-return-list-modal>
    <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-sharpen-list-modal>
    <change-classify-modal ref="changeClassifyModalForm" @ok="modalFormOk" :classifyId="classifyId"></change-classify-modal>
  
    <div id="printArea" style="display: block;">
      <div v-for="(item, index) in qrList" :key="index" class="qrcode-item">
@@ -117,6 +120,7 @@
<script>
import pick from 'lodash.pick'
import JSelectToolingModal from '.././inboundOrder/JSelectToolingModal'
import ChangeClassifyModal from './ChangeClassifyModal'
import { ajaxGetDictItems } from '@/api/api'
import moment from 'moment'
import { getAction, postAction, requestPut } from '@/api/manage'
@@ -137,6 +141,7 @@
    JSelectReturnListModal,
    JSearchSelectTag,
    JSelectSharpenListModal,
    ChangeClassifyModal
  },
  data() {
    return {
@@ -259,6 +264,11 @@
          align: 'center',
          dataIndex: 'inStorageQuantity',
          scopedSlots: { customRender: 'inStorageQuantity' },
        },
        {
          title: '新工具编码',
          align: 'center',
          dataIndex: 'newToolCode',
        },
        {
          title: '操作',
@@ -460,6 +470,12 @@
          scanStyles: false
        });
      });
    },
    //刃磨后变更工具分类
    handleChangeClassify(record){
      this.$refs.changeClassifyModalForm.showModal(record.id)
      this.$refs.changeClassifyModalForm.title = '选择工具分类'
      this.$refs.changeClassifyModalForm.disableSubmit = false
    }
  },
  watch: {},
@@ -483,6 +499,21 @@
      }
      //this.ipaginationm.total = this.dataSource.length
    })
    this.$bus.$on('selectionToolCode', (data) => {
      //getCurrSelected äº‹ä»¶ æŽ¥æ”¶ç»„件传递的参数
      for (let i = 0; i < this.dataSource.length; i++) {
        console.log("1111",this.dataSource.length,data,this.dataSource[i])
        if(this.dataSource[i].id == data.oldId){
          this.dataSource[i].newToolCode = data.toolCode
          this.dataSource[i].newToolCodeId = data.toolCodeId
          this.dataSource[i].goodsShelvesId = data.positionCode
          this.$set(this.dataSource[i],'newToolClassify',data.toolCode)
        }
      }
      // å¼ºåˆ¶æ›´æ–°è§†å›¾
      this.$forceUpdate();
      //this.ipaginationm.total = this.dataSource.length
    })
  },
}
</script>
src/views/tms/modules/outBound/OutboundListRight.vue
@@ -357,7 +357,7 @@
      onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys;
        this.selectionRows = selectionRows;
        const toolCode = this.selectionRows[0].toolCode
        const toolCode = this.selectionRows[0].toolCodeId
        //通过id查询管理参数和参数数据
        getAction(this.url.queryParaByToolCode, { toolCode: toolCode,paraTypeFlag:this.paraTypeFlag}).then((res) => {
          if (res.success) {
src/views/tms/requirement/ToolSharpeningList .vue
@@ -142,6 +142,11 @@
          dataIndex: 'supplierId',
        },
        {
          title:'刃磨状态',
          align:"center",
          dataIndex: 'sharpeningStatus_dictText'
        },
        {
          title:'刃磨时间',
          align:"center",
          dataIndex: 'sharpeningTime'