loulijun2021
2023-04-14 313a31b8b5e5ad448967d765d793c8e20b490cc4
src/views/makeModel/meterPrice.vue
@@ -869,7 +869,11 @@
    radioChange(val) {
      this.isEqpTableEdit = true
      this.eqpTable.page = 1
      this.eqpTable.rows = 10
      this.radioChangeTempValue = val
      console.log(val, 'val')
      // this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code
      this.getEqpTable(val)
    },
@@ -886,12 +890,21 @@
      this.getEqpTable()
    },
    async getEqpTable(val) {
      console.log(val)
      console.log(typeof val)
      if (typeof val === 'string') {
        this.eqpTable.steptype = this.stepDialogArr.find(item => item.name === val).flag
        this.eqpTable.partcode = this.dialogForm.partcode
        this.eqpTable.routecode = this.dialogForm.routecode
        this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code
        // } else if (typeof val === 'number') {
      } else if (typeof val === 'object') {
        const index = this.stepDialogArr.findIndex(i => i.name === this.radioChangeTempValue)
        this.eqpTable.steptype = this.stepDialogArr[index].flag
        this.eqpTable.partcode = this.dialogForm.partcode
        this.eqpTable.routecode = this.dialogForm.routecode
        this.eqpTable.stepcode = this.stepDialogArr[index].code
        this.dialogForm.stepcode = this.stepDialogArr[index].name
      } else {
        this.eqpTable.steptype = this.stepDialogArr[0].flag
        this.eqpTable.partcode = this.dialogForm.partcode