spring
2025-04-27 2a2d753357f4d3c26b3622513ffb6e647f64704a
src/views/technology/routing/routing-form.vue
@@ -531,8 +531,8 @@
  },
  computed: {
    editable: function () {
      if (!this.dataForm.id) {
    editable() {
      if (!this.dataForm.id && this.itemKey) {
        return true
      }
      if (this.dataForm.id && this.dataForm.state == '01draft') {
@@ -584,14 +584,48 @@
    '$route.query.id': {
      immediate: true,
      handler(newVal, oldVal) {
        this.dataForm.id = this.$route.query.id
        this.getParamType()
        this.init()
        this.itemKey = Math.random()
        this.getBomTypeDbOptions()
        this.getWorkCenterOptions()
        this.getRunTimeCodeDbOptions()
        this.getLaborClassNo()
        if (newVal) {
          this.dataForm.id = this.$route.query.id
          this.getParamType()
          this.init()
          this.itemKey = Math.random()
          this.getBomTypeDbOptions()
          this.getWorkCenterOptions()
          this.getRunTimeCodeDbOptions()
          this.getLaborClassNo()
        } else {
          this.dataForm.id = null
          this.getParamType()
          this.init()
          this.dataForm = {
            id: null,
            routingNo: null,
            name: null,
            partId: null,
            partNo: null,
            partName: null,
            description: null,
            state: null,
            master: false,
            bomId: null,
            operations: [],
            refs: [],
            bomTypeDb: 'M',
            alternativeNo: '*',
            alternativeDesc: null,
            ifsSync: false,
            phaseInDate: null,
            phaseOutDate: null,
            version: null,
            wireCore: null
          }
          this.operationPart = {}
          this.itemKey = Math.random()
          this.getBomTypeDbOptions()
          this.getWorkCenterOptions()
          this.getRunTimeCodeDbOptions()
          this.getLaborClassNo()
        }
      },
    },
  },