YLouie
2025-09-19 47cf5518f0f61dbf8066c2273b9f77c2cd7b1751
src/views/plan/customerorder/index.vue
@@ -18,7 +18,7 @@
            @command="documentHandle"
            style="margin-left: 10px"
          >
            <el-button>
            <el-button style="padding: 9px 14px;">
              工艺文件<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
@@ -38,7 +38,7 @@
            @command="handleCommitCommand"
            style="margin-left: 10px"
          >
            <el-button>
            <el-button style="padding: 9px 14px;">
              审核状态改变<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
@@ -52,10 +52,24 @@
            </el-dropdown-menu>
          </el-dropdown>
          <el-button
            style="margin-left: 10px"
            style="margin-left: 10px;padding: 9px 14px;"
            type="primary"
            @click="() => (exportDialogVisible = true)"
            >导出台账</el-button
          >
          <el-button
            style="margin-left: 10px;padding: 9px 14px;"
            type="primary"
            v-if="permissions.plan_customerorder_check"
            @click="handleCheck"
            >审核</el-button
          >
          <el-button
            style="margin-left: 10px;padding: 9px 14px;"
            type="primary"
            v-if="permissions.plan_customerorder_check"
            @click="syncPLM"
            >同步PLM</el-button
          >
          <!-- <el-button
            style="margin-left: 10px"
@@ -361,7 +375,7 @@
import {
  interrelatedOrder,
  getInterrelatedOrder,
  checkHanderOrder,
  checkHanderOrder
} from '@/api/plan/customerOrderInterrelated'
import ConfirmPullCustomerorder from './confirm-pull-customerorder'
import TableForm from './customerorder-form'
@@ -393,7 +407,8 @@
  syncOrder,
  dropByContractNo,
  downloadProduct,
  downloadWordFile
  downloadWordFile,
  syncPlm
} from '../../../api/plan/customerorder'
import DocumentTable from '@/views/common/document.vue'
import { remote } from '@/api/admin/dict'
@@ -408,16 +423,16 @@
      interrelatedOrderId: null,
      interrelatedOrderData: [],
      showInterrelatedOrderDialog: false,
      technologyDialog:true,
      technologyDialog: true,
      uniqueStateArr: [],
      dataForm: {
        selectTime: null,
        exportTime: null,
        exportTime: null
      },
      dataRule: {
        exportTime: [
          { required: true, message: '导出日期不能为空', trigger: 'change' },
        ],
          { required: true, message: '导出日期不能为空', trigger: 'change' }
        ]
      },
      pickerOptions: {
        onPick: ({ maxDate, minDate }) => {
@@ -435,7 +450,7 @@
            )
          }
          return false
        },
        }
      },
      exportDialogVisible: false,
      syncDateVisible: false,
@@ -448,58 +463,58 @@
          label: '标记零件待选',
          command: '01partUnCheck',
          disabled: false,
          permitArr: [],
          permitArr: []
        },
        {
          label: '标记工艺文件待选',
          command: '02technologyUnCheck',
          disabled: false,
          permitArr: [],
          permitArr: []
        },
        {
          label: '标记待计划',
          command: '03plan',
          disabled: false,
          permitArr: [],
          permitArr: []
        },
        {
          label: '标记已下发',
          command: '04planed',
          disabled: false,
          permitArr: [],
          permitArr: []
        },
        {
          label: '标记已作废',
          command: '05cancel',
          disabled: false,
          permitArr: [],
        },
          permitArr: []
        }
      ],
      documentTagArr: [
        {
          label: '关联工艺文件',
          command: 'RELEVANCE',
          disabled: false,
          disabled: false
        },
        {
          label: '移除工艺文件',
          command: 'NORELEVANCE',
          disabled: false,
        },
          disabled: false
        }
      ],
      commitStateTagArr: [
        {
          label: '标记通过',
          command: 'PROCESSED',
          disabled: false,
          permitArr: ['01draft'],
          permitArr: ['01draft']
        },
        {
          label: '标记取消',
          command: 'CANCELED',
          disabled: false,
          permitArr: ['01draft'],
        },
          permitArr: ['01draft']
        }
      ],
      ajaxFun: fetchListCustomerOrder,
      events: '',
@@ -511,7 +526,7 @@
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: false,
        url: '',
        url: ''
      },
      prelang: 'operation',
      options: {
@@ -528,6 +543,7 @@
        isSearch: true, // 高级查询按钮
        defaultOrderBy: { column: 'placeOrderDate', direction: 'desc' },
        cancelRunCreated: true,
        reserveSelection: true // 是否保留之前选择的数据
      },
      table: {
        total: 0,
@@ -545,7 +561,7 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            render: { fun: this.addOrUpdateHandle },
            render: { fun: this.addOrUpdateHandle }
          },
          {
            minWidth: '120',
@@ -553,7 +569,7 @@
            label: '工程名称',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -562,7 +578,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '100',
@@ -575,7 +591,7 @@
            formatter: this.getSourceId,
            optList: () => {
              return this.sourceIdList
            },
            }
          },
          {
            minWidth: '200',
@@ -586,7 +602,7 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'datetimerange',
            formatter: this.formatDutyDate,
            formatter: this.formatDutyDate
          },
          {
            minWidth: '120',
@@ -595,8 +611,8 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'date',
            formatter: this.formatDutyDate,
            searchInfoType: 'datetimerange',
            formatter: this.formatDutyDate
          },
          {
            minWidth: '120',
@@ -605,7 +621,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -618,7 +634,7 @@
            formatter: this.getCustomerCoState,
            optList: () => {
              return this.coStateList
            },
            }
          },
          {
            minWidth: '120',
@@ -631,7 +647,7 @@
            formatter: this.getIsAudit,
            optList: () => {
              return this.isAuditList
            },
            }
          },
          {
            minWidth: '120',
@@ -644,7 +660,7 @@
            formatter: this.checkIsPass,
            optList: () => {
              return this.isPassList
            },
            }
          },
          {
            minWidth: '120',
@@ -657,7 +673,7 @@
            formatter: this.checkIsOa,
            optList: () => {
              return this.isOaList
            },
            }
          },
          {
            minWidth: '120',
@@ -667,7 +683,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -677,7 +693,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -686,7 +702,7 @@
            label: '隶属品牌',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -695,7 +711,7 @@
            label: '单位',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -705,7 +721,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
@@ -714,7 +730,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
@@ -727,7 +743,7 @@
            formatter: this.getManufactureAttr,
            optList: () => {
              return this.manufactureAttrList
            },
            }
          },
          {
            minWidth: '140',
@@ -736,7 +752,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
@@ -745,7 +761,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
@@ -754,7 +770,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
@@ -763,7 +779,7 @@
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
@@ -774,8 +790,8 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'datetimerange',
            formatter: this.formatDutyDate,
          },
            formatter: this.formatDutyDate
          }
        ],
        toolbar: [],
        operator: [
@@ -797,24 +813,24 @@
          //   size: 'small',
          //   fun: this.packageExportHandle
          // },
          {
            text: '审核',
            type: 'text',
            size: 'small',
            fun: this.checkHandOrder,
            showFun: (row) => {
              return row.sourceId === '1'
            },
            show: {
              val: [false],
              key: 'isPass',
            },
          },
          //   {
          //     text: '审核',
          //     type: 'text',
          //     size: 'small',
          //     fun: this.checkHandOrder,
          //     showFun: (row) => {
          //       return row.sourceId === '1'
          //     },
          //     show: {
          //       val: [false],
          //       key: 'isPass',
          //     },
          //   },
          {
            text: '已关联订单',
            type: 'text',
            size: 'small',
            fun: this.showInterrelatedOrder,
            fun: this.showInterrelatedOrder
          },
          {
            text: '删除',
@@ -825,88 +841,88 @@
              val: [
                '01partUnCheck',
                '02technologyUnCheck',
                '03plan',
                '03plan'
                // '04planed'
              ],
              key: 'coState',
            },
          },
              key: 'coState'
            }
          }
        ],
        operatorConfig: {
          fixed: 'right',
          label: '操作',
          width: 200,
          minWidth: 200,
        },
          minWidth: 200
        }
      },
      addOrUpdateVisible: false,
      coStateList: [
        {
          value: '01partUnCheck',
          label: '零件待选',
          label: '零件待选'
        },
        {
          value: '02technologyUnCheck',
          label: '工艺文件待选',
          label: '工艺文件待选'
        },
        {
          value: '03plan',
          label: '待计划',
          label: '待计划'
        },
        {
          value: '04planed',
          label: '已下发',
          label: '已下发'
        },
        {
          value: '05cancel',
          label: '已作废',
          label: '已作废'
        },
        {
          value: '06unedit',
          label: '订单编辑',
        },
          label: '订单编辑'
        }
      ],
      manufactureAttrList: [
        {
          label: '普通',
          value: 'N',
          value: 'N'
        },
        {
          label: '样品',
          value: 'S',
          value: 'S'
        },
        {
          label: '研发',
          value: 'D',
        },
          value: 'D'
        }
      ],
      isAuditList: [
        {
          value: '01draft',
          label: '草稿',
          label: '草稿'
        },
        {
          value: '02pending',
          label: '审核中',
          label: '审核中'
        },
        {
          value: '03accepted',
          label: '通过',
          label: '通过'
        },
        {
          value: '04reject',
          label: '退回',
        },
          label: '退回'
        }
      ],
      sourceIdList: [
        {
          label: '同步',
          value: '0',
          value: '0'
        },
        {
          label: '手动',
          value: '1',
        },
          value: '1'
        }
      ],
      stockVisible: false,
      partName: null,
@@ -919,20 +935,20 @@
          id: '',
          customerOrderNo: '',
          splitQuantity: '',
          title: '',
          title: ''
        },
        rules: {
          splitQuantity: [
            { required: true, message: '数量不能为空', trigger: 'blur' },
            { validator: validateSixDecimal, trigger: 'blur' },
            { validator: validateSixDecimal, trigger: 'blur' }
          ],
          title: [{ required: true, message: '抬头不能为空', trigger: 'blur' }],
          title: [{ required: true, message: '抬头不能为空', trigger: 'blur' }]
        },
        titleList: [],
        buttonDisable: false,
        buttonDisable: false
      },
      headers: {
        Authorization: 'Bearer ' + getStore({ name: 'access_token' }),
        Authorization: 'Bearer ' + getStore({ name: 'access_token' })
      },
      fileList: [],
      outBatchUploadUrl: '/mes/operationTaskProduce/upload',
@@ -941,23 +957,23 @@
      otcPartSyncOptionList: [
        {
          value: true,
          label: '已同步',
          label: '已同步'
        },
        {
          value: false,
          label: '未同步',
        },
          label: '未同步'
        }
      ],
      showSalesPartBatch: false,
      addOrUpdateEescVisible: false,
      isPassList: [
        { label: '未通过', value: false },
        { label: '通过', value: true },
        { label: '通过', value: true }
      ],
      isOaList: [
        { label: '未提交', value: false },
        { label: '已提交', value: true },
      ],
        { label: '已提交', value: true }
      ]
    }
  },
  components: {
@@ -972,10 +988,10 @@
    SalesPartBatchDialog,
    TableFormDEesc,
    CustomerorderReturnDialog,
    TechnologyForm,
    TechnologyForm
  },
  computed: {
    ...mapGetters(['permissions']),
    ...mapGetters(['permissions'])
  },
  watch: {
    exportDialogVisible(newVal) {
@@ -989,7 +1005,7 @@
          this.getData()
        }
      },
      immediate: true,
      immediate: true
    },
    interrelatedOrderId(newVal) {
      if (newVal) {
@@ -1003,7 +1019,7 @@
            console.error(error)
          })
      }
    },
    }
  },
  mounted() {
    this.initQueryParams()
@@ -1012,13 +1028,13 @@
    // this.getManufactureAttrs()
    this.getTitles()
    if (this.permissions.plan_customerorder_add) {
    this.table.toolbar.push({
      text: '新增销售订单',
      type: 'primary',
      fun: this.addSampleCustomerOrder,
      disabled: false,
      permitArr: [],
    })
      this.table.toolbar.push({
        text: '新增销售订单',
        type: 'primary',
        fun: this.addSampleCustomerOrder,
        disabled: false,
        permitArr: []
      })
    }
    if (this.permissions.customerorder_from_otc) {
      this.table.toolbar.push({
@@ -1026,7 +1042,7 @@
        type: 'primary',
        fun: this.syncERP,
        disabled: false,
        permitArr: [],
        permitArr: []
      })
    }
    if (this.permissions.customerorder_submit_oa) {
@@ -1036,7 +1052,7 @@
        fun: this.auditCustomerOrder,
        disabled: false,
        permitArr: [],
        loading: false,
        loading: false
      })
    }
    if (this.permissions.customerorder_set_salesparts) {
@@ -1045,42 +1061,42 @@
        type: 'primary',
        fun: this.setSalesPart,
        disabled: false,
        permitArr: [],
        permitArr: []
      })
    }
    if(this.permissions.plan_download_process_file){
        this.table.toolbar.push({
            text: '下载工艺文件',
            disabled: false,
            type: 'primary',
            fun: this.downloadWord,
            permitArr: ['03plan','04planed'],
        })
    if (this.permissions.plan_download_process_file) {
      this.table.toolbar.push({
        text: '下载工艺文件',
        disabled: false,
        type: 'primary',
        fun: this.downloadWord,
        permitArr: ['03plan', '04planed']
      })
    }
    if(this.permissions.plan_download_product_file){
        this.table.toolbar.push({
            text: '下载排产单',
            disabled: false,
            type: 'primary',
            permitArr: [],
            fun: this.downloadProductionScheduling,
        })
    if (this.permissions.plan_download_product_file) {
      this.table.toolbar.push({
        text: '下载排产单',
        disabled: false,
        type: 'primary',
        permitArr: [],
        fun: this.downloadProductionScheduling
      })
    }
    if(this.permissions.plan_relevance_order){
    this.table.toolbar.push({
      text: '关联订单',
      disabled: false,
      type: 'primary',
      fun: this.interrelatedOrderFun,
      permitArr: [],
    })
    if (this.permissions.plan_relevance_order) {
      this.table.toolbar.push({
        text: '关联订单',
        disabled: false,
        type: 'primary',
        fun: this.interrelatedOrderFun,
        permitArr: []
      })
    }
    if (this.permissions.customerorder_create_masterplan) {
      this.table.toolbar.push({
        text: '主生产计划',
        disabled: false,
        fun: this.masterPlanHandle,
        permitArr: [],
        permitArr: []
      })
    }
  },
@@ -1089,7 +1105,7 @@
      this.$confirm('确认审核通过该销售订单吗?', '提示', {
        confirmButtonText: '通过',
        cancelButtonText: '取消',
        type: 'warning',
        type: 'warning'
      })
        .then(() => {
          checkHanderOrder(val)
@@ -1125,7 +1141,7 @@
      }
      interrelatedOrder({
        customerOrderAutoId: autoId,
        customerOrderHandId: handId,
        customerOrderHandId: handId
      })
        .then((res) => {
          if (res.status === 200) {
@@ -1136,44 +1152,47 @@
          console.error(error)
        })
    },
    //展示已关联订单
    // 展示已关联订单
    showInterrelatedOrder(currentOrder) {
      this.interrelatedOrderId = currentOrder.id
      this.showInterrelatedOrderDialog = true
    },
    //下载排产通知单
    downloadProductionScheduling(){
        let ids = this.multipleSelection.map(obj => obj.id)
        if(ids.length<1){
            this.$message.error("请选择一条数据")
            return
        }
        downloadProduct(ids).then(res=>{
            if(res.status===200){
                transform(res)
            }
        }).catch(error=>{
            console.error(error)
    // 下载排产通知单
    downloadProductionScheduling() {
      const ids = this.multipleSelection.map((obj) => obj.id)
      if (ids.length < 1) {
        this.$message.error('请选择一条数据')
        return
      }
      downloadProduct(ids)
        .then((res) => {
          if (res.status === 200) {
            transform(res)
          }
        })
        .catch((error) => {
          console.error(error)
        })
    },
    //下载工艺文件
    downloadWord(){
        let ids = this.multipleSelection.map(ele=>ele.id)
        if(ids.length<1){
            this.$message.error("请选择一条数据")
            return
        }
        downloadWordFile(ids).then(response=>{
    // 下载工艺文件
    downloadWord() {
      const ids = this.multipleSelection.map((ele) => ele.id)
      if (ids.length < 1) {
        this.$message.error('请选择一条数据')
        return
      }
      downloadWordFile(ids)
        .then((response) => {
          // 处理返回的文件流
          const blob = response.data
          const link = document.createElement('a')
          link.href = URL.createObjectURL(blob)
          const disposition = response.headers['content-disposition']
          let temp = disposition.substring(disposition.lastIndexOf('=') + 1)
          const temp = disposition.substring(disposition.lastIndexOf('=') + 1)
          link.download = decodeURI(temp)
          document.body.appendChild(link)
          link.click()
          window.setTimeout(function () {
          window.setTimeout(function() {
            URL.revokeObjectURL(blob)
            document.body.removeChild(link)
          }, 0)
@@ -1190,7 +1209,7 @@
      queryParam.push(
        Object.assign({
          prop: 'coState',
          searchInfoType: 'select',
          searchInfoType: 'select'
          // propVal: '01partUnCheck'
          // propVal: '02technologyUnCheck'
        })
@@ -1353,15 +1372,15 @@
          }
        })
        if (flag) {
          checkOA(
            this.multipleSelection.map((e) => e.id)
          ).then((res) => {
            if (res.data.data.success) {
              this.auditCustomerOrderSure(ids)
            }
          }).catch(error=>{
            this.$message.error(error.message)
          })
          checkOA(this.multipleSelection.map((e) => e.id))
            .then((res) => {
              if (res.data.data.success) {
                this.auditCustomerOrderSure(ids)
              }
            })
            .catch((error) => {
              this.$message.error(error.message)
            })
        } else {
          this.$message.error('存在销售订单未绑定零件号!')
        }
@@ -1398,7 +1417,7 @@
          id: row.id,
          customerOrderNo: row.customerOrderNo,
          splitQuantity: '',
          title: '',
          title: ''
        }
        this.$nextTick(() => {
          this.$refs.packageExportForm.resetFields()
@@ -1414,7 +1433,7 @@
          exportCustomerOrderSplit({
            id: this.packageExport.form.id,
            splitQuantity: this.packageExport.form.splitQuantity,
            title: this.packageExport.form.title,
            title: this.packageExport.form.title
          })
            .then((response) => {
              transform(response)
@@ -1432,7 +1451,7 @@
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        closeOnClickModal: false,
        type: 'warning',
        type: 'warning'
      }).then(() => {
        dropByContractNo({ id: row.id }).then((res) => {
          if (res.data.code === 0) {
@@ -1469,7 +1488,7 @@
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        closeOnClickModal: false,
        type: 'warning',
        type: 'warning'
      })
        .then(() => {
          return delCustomerOrder(row.id)
@@ -1483,7 +1502,7 @@
    handleSelectionChange(val) {
      // 根据状态,禁用表头按钮
      // 筛选出选中记录的状态
      var stateArr = val.map(function (value, index) {
      var stateArr = val.map(function(value, index) {
        return value.coState
      })
      // 选中状态数组元素去重
@@ -1801,7 +1820,7 @@
      if (!isLt10M) {
        this.$message({
          message: '文件大小',
          type: 'warning',
          type: 'warning'
        })
      }
      return isLt10M
@@ -1813,7 +1832,7 @@
      } else {
        this.$message({
          message: '上传成功',
          type: 'success',
          type: 'success'
        })
        this.getData()
      }
@@ -1831,7 +1850,7 @@
    downDataTemplate() {
      uploadBatchTemplate().then((response) => {
        const blob = new Blob([response.data], {
          type: 'application/force-download',
          type: 'application/force-download'
        })
        const filename = decodeURI('模板文件.xlsx')
        // 创建一个超链接,将文件流赋进去,然后实现这个超链接的单击事件
@@ -1871,10 +1890,10 @@
      // } else {
      //   this.$message.error('请选择至少一条销售订单')
      // }
      this.$refs['exportForm'].validate((valid) => {
      this.$refs.exportForm.validate((valid) => {
        if (valid) {
          const exportTime = this.dataForm.exportTime
          let queryParam = this.$refs.customerOrderTable.getQueryParam()
          const queryParam = this.$refs.customerOrderTable.getQueryParam()
          queryParam.selectTime = exportTime
          exportCustomerOrder(queryParam)
            .then((response) => {
@@ -1916,7 +1935,7 @@
      if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') {
        otcCustomerOrderSync({
          selectTime: this.dataForm.selectTime,
          pathCode: '1',
          pathCode: '1'
        })
          .then((response) => {
            this.table.toolbar.find(
@@ -1945,6 +1964,66 @@
        this.$message.error('请先选择日期')
      }
    },
  },
    handleCheck() {
      if (this.multipleSelection.length > 0) {
        for (let i = 0; i < this.multipleSelection.length; i++) {
          if (this.multipleSelection[i].sourceId == 0) {
            this.$message.error('请选择手动输入的销售订单')
            return
          }
          if (this.multipleSelection[i].isPass) {
            this.$message.error('请选择未审核通过的销售订单')
            return
          }
        }
        this.$confirm('确认审核通过选中的销售订单吗?', '提示', {
          confirmButtonText: '通过',
          cancelButtonText: '取消',
          type: 'warning'
        })
          .then(() => {
            checkHanderOrder(this.multipleSelection)
              .then((res) => {
                if (res.status === 200) {
                  this.$message.success('审核通过')
                  this.getData()
                }
              })
              .catch((error) => {
                console.error(error)
              })
          })
          .catch(() => {})
      } else {
        this.$message.error('请选择至少一条销售订单')
      }
    },
    syncPLM() {
      console.log(this.multipleSelection)
      if (this.multipleSelection.length > 0) {
        this.$confirm('确认同步选中的销售订单吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        })
          .then(() => {
            syncPlm(this.multipleSelection.map((item) => item.partNo))
              .then((res) => {
                if (res.status === 200) {
                  this.$message.success('同步成功')
                  this.getData()
                }
              })
              .catch((error) => {
                console.error(error)
              })
          })
          .catch(() => {})
      } else {
        this.$message.error('请选择至少一条销售订单')
      }
    }
  }
}
</script>