zouyu
2024-01-05 0bb5181e9ec648a2aaf374570ed6ace99edc0520
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)
    })
  }