zss
2023-11-17 2518e47a3ac999978fbf14612c967c3bbf421d25
src/views/plan/customerorder/index.vue
@@ -342,6 +342,13 @@
      showCustomerorderReturn: false,
      scheduleVisible: false,
      showDocument: false,
      sourceIdList: [{
        label: '外部',
        value: '0',
      },{
        label: '内部',
        value: '1',
      }],
      stateTagArr: [
        {
          label: '标记零件待选',
@@ -661,18 +668,18 @@
        ],
        toolbar: [],
        operator: [
          {
            text: '订单说明',
            type: 'text',
            size: 'small',
            fun: this.openCustomerOrder
          },
          {
            text: '查看库存',
            type: 'text',
            size: 'small',
            fun: this.stockHandle
          },
          // {
          //   text: '订单说明',
          //   type: 'text',
          //   size: 'small',
          //   fun: this.openCustomerOrder
          // },
          // {
          //   text: '查看库存',
          //   type: 'text',
          //   size: 'small',
          //   fun: this.stockHandle
          // },
          {
            text: '作废',
            type: 'text',
@@ -683,7 +690,6 @@
                '01partUnCheck',
                '02technologyUnCheck',
                '03plan'
                // '04planed'
              ],
              key: 'coState'
            }
@@ -692,7 +698,7 @@
        operatorConfig: {
          fixed: 'right',
          label: '操作',
          width: 260,
          width: 100,
          minWidth: 100
        }
      },
@@ -809,7 +815,7 @@
        }
      },
      immediate: true
    }
    },
  },
  mounted() {
    this.initQueryParams()
@@ -835,7 +841,7 @@
    }
    if (this.permissions.customerorder_submit_oa) {
      this.table.toolbar.push({
        text: '提交审核',
        text: '提交OA审核',
        type: 'primary',
        fun: this.auditCustomerOrder,
        disabled: false,
@@ -860,6 +866,14 @@
    }
  },
  methods: {
    getSourceId(row, column, cellValue) {
      this.sourceIdList.forEach((obj) => {
        if (obj.value === cellValue) {
          cellValue = obj.label
        }
      })
      return cellValue
    },
    getOtcPartSyncOptionList() {
      return this.otcPartSyncOptionList
    },
@@ -870,7 +884,6 @@
          prop: 'coState',
          searchInfoType: 'select',
          // propVal: '01partUnCheck'
          propVal: '02technologyUnCheck'
        })
      )
      this.$refs.customerOrderTable.setQueryParam(queryParam)
@@ -914,6 +927,7 @@
            }
          }
          this.scheduleVisible = true
          console.log(this.multipleSelection);
          this.$nextTick(() => {
            this.$refs.schedule.init(this.multipleSelection)
          })
@@ -1099,13 +1113,13 @@
    },
    // 作废
    cancelHandle(row) {
      this.$confirm('是否确认作废销售订单号为' + row.customerOrderNo + '提示', {
      this.$confirm('确认作废销售订单号为【' + row.contractNo + '】的数据?','提示' , {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        closeOnClickModal: false,
        type: 'warning'
      }).then(() => {
        dropByContractNo(row.customerOrderNo).then((res) => {
        dropByContractNo({id:row.id}).then((res) => {
          if (res.data.code === 0) {
            this.$message.success('作废成功')
            this.getData()
@@ -1113,22 +1127,7 @@
            this.$message.error('作废失败')
          }
        })
      })
      // .then(() => {
      //   markPlanned([row.id], '05cancel').then((response) => {
      //     var data = response.data
      //     if (data.code === 0) {
      //       this.$message.success('作废成功')
      //       this.getData()
      //     } else {
      //       this.$message.error('作废失败')
      //     }
      //   })
      // })
      // .then((data) => {
      //   this.$message.success('作废成功')
      //   this.getData()
      // })
      }).catch(()=>{ })
    },
    // 删除
    deleteHandle(row) {
@@ -1353,10 +1352,10 @@
                  '存在销售订单已关联工艺文件,如需更改,请先解除关联'
                )
              }
              if (item.salesPartNo == null || item.salesPartNo === '') {
                status = true
                this.$message.error('存在销售订单未绑定销售件,请先绑定')
              }
              // if (item.salesPartNo == null || item.salesPartNo === '') {
              //   status = true
              //   this.$message.error('存在销售订单未绑定销售件,请先绑定')
              // }
              if (item.partNo != firstPartNo) {
                status = true
                this.$message.error('订单零件号不一致')