YLouie
2025-09-28 32477dff99d0ed1d8acee453861be96428d8befc
销售订单plm同步
已修改2个文件
49 ■■■■ 文件已修改
src/api/plan/customerorder.js 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/customerorder.js
@@ -11,7 +11,7 @@
export function getCustomerMainAndOrderBycNo(contractNo) {
  return request({
    url: '/mes/plan/customerOrder/getCustomerMainAndOrderBycNo/' + contractNo,
    method: 'get',
    method: 'get'
  })
}
@@ -264,13 +264,13 @@
  })
}
export function downloadProduct(data){
    return request({
        url: '/mes/plan/customerOrder/getProduct',
        method: 'post',
        responseType: 'blob',
        data: data
      })
export function downloadProduct(data) {
  return request({
    url: '/mes/plan/customerOrder/getProduct',
    method: 'post',
    responseType: 'blob',
    data: data
  })
}
export function downloadProcessConfigFile(filename, bucket, originalFileName) {
@@ -414,20 +414,19 @@
}
export function downloadWordFile(data) {
    return request({
      url: '/mes/plan/customerOrder/package',
      method: 'post',
      data: data,
      responseType: 'blob'
    })
  }
  return request({
    url: '/mes/plan/customerOrder/package',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}
// 同步PLM数据
export function syncPlm(obj) {
    return request({
        url: '/mes/document/syncPlm',
        method: 'post',
        data: obj
    })
  return request({
    url: '/mes/plan/customerOrder/syncPlm',
    method: 'post',
    data: obj
  })
}
src/views/plan/customerorder/index.vue
@@ -2000,7 +2000,6 @@
    },
    syncPLM() {
      console.log(this.multipleSelection)
      if (this.multipleSelection.length > 0) {
        this.$confirm('确认同步选中的销售订单吗?', '提示', {
          confirmButtonText: '确定',
@@ -2008,7 +2007,12 @@
          type: 'warning'
        })
          .then(() => {
            syncPlm(this.multipleSelection.map((item) => item.partNo))
            syncPlm(
              this.multipleSelection.map((item) => ({
                id: item.id, // 传递id字段
                partNo: item.partNo // 传递partNo字段
              }))
            )
              .then((res) => {
                if (res.status === 200) {
                  this.$message.success('同步成功')