loulijun2021
2023-06-07 a93255e0a0334b51ecbaf3d8f496ad0fae1ed747
src/views/makeModel/meterPrice.vue
@@ -16,7 +16,7 @@
          style="display: flex;"
        >
          <div class="elForm">
            <el-form-item label="产品名称" style=" display: flex;">
            <el-form-item label="产品名称/编码" style=" display: flex;">
              <el-select
                v-model="form.partcode"
                filterable
@@ -30,7 +30,7 @@
                <el-option
                  v-for="item in partArr"
                  :key="item.partcode"
                  :label="item.partname"
                  :label="item.partname+'/'+item.partcode"
                  :value="item.partcode"
                />
              </el-select>
@@ -289,10 +289,10 @@
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="100px">
        <div style="display: flex;align-items: center">
          <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px" />
          <el-form-item prop="partcode" label="产品名称">
          <el-form-item prop="partcode" label="产品名称/编码">
            <el-select
              v-show="operation==='add'"
              v-model="dialogForm.partcode"
@@ -306,7 +306,7 @@
              <el-option
                v-for="item in partArr2"
                :key="item.partcode"
                :label="item.partname"
                :label="item.partname+'/'+item.partcode"
                :value="item.partcode"
              />
            </el-select>
@@ -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