zouyu
2024-01-05 0bb5181e9ec648a2aaf374570ed6ace99edc0520
销售订单-下载
已修改3个文件
93 ■■■■■ 文件已修改
src/api/plan/customerorder.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/index.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/packageInspect-form.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/customerorder.js
@@ -396,3 +396,26 @@
    params: contractNo
  })
}
export function downloadWordFile(data) {
    return request({
      url: '/mes/plan/customerOrder/package',
      method: 'post',
      params: data,
      responseType: 'blob'
    }).then((response) => {
      // 处理返回的文件流
      const blob = response.data
      const link = document.createElement('a')
      link.href = URL.createObjectURL(blob)
      link.download = data.originalFileName
      document.body.appendChild(link)
      link.click()
      window.setTimeout(function() {
        URL.revokeObjectURL(blob)
        document.body.removeChild(link)
      }, 0)
    })
  }
src/views/plan/customerorder/index.vue
@@ -53,8 +53,12 @@
            style="margin-left:10px;"
            type="primary"
            @click="()=>exportDialogVisible=true"
            >导出台账</el-button
          >
            >导出台账</el-button>
          <el-button
            style="margin-left:10px;"
            type="primary"
            @click="downloadWord"
            >下载</el-button>
        </template>
      </ttable>
      <!-- 弹窗, 日期选择 -->
@@ -273,7 +277,8 @@
  exportCustomerOrder,
  exportCustomerOrderSplit,
  syncOrder,
  dropByContractNo
  dropByContractNo,
  downloadWordFile
} from '../../../api/plan/customerorder'
import DocumentTable from '@/views/common/document.vue'
import { remote } from '@/api/admin/dict'
@@ -819,36 +824,6 @@
  created() {
    // this.getManufactureAttrs()
    this.getTitles()
    /**
     * {
            text: '获取销售订单',
            type: 'primary',
            fun: this.pullCustomerOrder,
            disabled: false,
            permitArr: []
          },
          {
            text: '获取IFS行号',
            type: 'primary',
            fun: this.pullIfsLineNo,
            disabled: false,
            permitArr: [],
            loading: false
          },
          {
            text: '提交审核',
            type: 'primary',
            fun: this.auditCustomerOrder,
            disabled: false,
            permitArr: [],
            loading: false
          },
          {
            text: '主生产计划',
            disabled: false,
            fun: this.masterPlanHandle
          }
     */
    this.table.toolbar.push({
      text: '新增销售订单',
      type: 'primary',
@@ -856,14 +831,6 @@
      disabled: false,
      permitArr: []
    })
    // this.table.toolbar.push({
    //   text: '同步ERP',
    //   type: 'primary',
    //   fun: this.syncERP,
    //   loading: false,
    //   disabled: false,
    //   permitArr: []
    // })
    if (this.permissions.customerorder_from_otc) {
      this.table.toolbar.push({
        text: '获取销售订单',
@@ -873,16 +840,6 @@
        permitArr: []
      })
    }
    // if (this.permissions.customerorder_ifs_line) {
    //   this.table.toolbar.push({
    //     text: '获取ERP行号',
    //     type: 'primary',
    //     fun: this.pullIfsLineNo,
    //     disabled: false,
    //     permitArr: [],
    //     loading: false
    //   })
    // }
    if (this.permissions.customerorder_submit_oa) {
      this.table.toolbar.push({
        text: '提交审核',
@@ -910,6 +867,15 @@
    }
  },
  methods: {
    //下载word
    downloadWord(){
        let ids = this.multipleSelection.map(ele=>ele.id)
        if(ids.length<1){
            this.$message.error("请选择一条数据")
            return
        }
        downloadWordFile(ids)
    },
    getOtcPartSyncOptionList() {
      return this.otcPartSyncOptionList
    },
src/views/quality/packageinspect/packageInspect-form.vue
@@ -66,7 +66,7 @@
        <el-row :gutter="10" style="width:100%;z-index: 10;height:30px;">
            <el-col :span="12">检验项目</el-col>
            <el-col :span="12" style="text-align: right;">
                <el-dropdown @command="handleCommand" v-if="!isShow">
                <el-dropdown @command="handleCommand" v-if="!isShow && resultVal==null">
                    <el-button size="mini" style="margin-right: 10px;" type="primary" >
                        切换默认检验项<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>