Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/business/materialOrder/index.vue
@@ -67,7 +67,7 @@
            </ul>
          </div>
          <div>
            <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary"
            <el-button v-show="tabIndex === 3" :loading="outLoading" size="small" type="primary"
              @click="handleOut">导出</el-button>
            <el-button v-if="tabIndex === 0" size="small" type="primary" @click="copper">铜材料下单</el-button>
            <el-button v-if="tabIndex !== 0" size="small" type="primary" @click="openPrint">标签打印</el-button>
@@ -1350,10 +1350,14 @@
    },
    // 导出
    handleOut() {
      let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, }
      delete entity.orderBy
      this.outLoading = true
      rawAllExport({ entity: entity }).then(res => {
      let params = {}
      if (this.multipleSelection.length > 0) {
        params.ids = this.multipleSelection.map(item => item.id).join(',');
      } else {
        params = {...this.entity}
      }
      rawAllExport(params).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '原材料检测信息导出.xlsx');
@@ -1381,6 +1385,7 @@
    // 切换下单tab表格
    handleTab(m) {
      this.tabIndex = m;
      this.multipleSelection = []
      this.refreshTable()
    },
    // 表格选择方法