小小儁爺
2024-05-30 cc4e197fe80f5c72840fc6d81e4d93ccbe6276e5
src/views/basicSettings/meterPrice.vue
@@ -57,10 +57,10 @@
                />
              </el-select>
            </el-form-item>
            <el-form-item v-if="mesSetting.route" label="关联工序" style=" display: flex;">
            <el-form-item label="关联工序" style=" display: flex;">
              <el-select
                v-model="form.stepcode"
                :disabled="form.routecode===''"
                :disabled="mesSetting.route?form.routecode==='':form.partcode===''"
                :popper-append-to-body="false"
                style="width: 200px"
                placeholder="请选择"
@@ -318,6 +318,7 @@
  directives: { elDragDialog, waves },
  data() {
    return {
      mesSetting: JSON.parse(localStorage.getItem('mesSetting')),
      mainHeight: 0,
      tableHeight: 0,
      form: {
@@ -458,9 +459,7 @@
      editPartName: '', // 编辑时产品名称
      editRouteName: '', // 编辑时工艺路线名称
      editStepName: '', // 编辑时加工工序名称
      operation: '',
      mesSetting: JSON.parse(localStorage.getItem('mesSetting'))
      operation: ''
    }
  },
@@ -471,6 +470,10 @@
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
    if (!this.mesSetting.route) {
      this.tableColumnSettingsArray = this.tableColumnSettingsArray.filter(i => i.prop !== 'route_name')
    }
  },
  methods: {
    tableColumnUpdate(val, isCopyTrue) {
@@ -524,8 +527,12 @@
    },
    async partChange(val) {
      const { data: res } = await PartSelectRpute({ partcode: val })
      this.routeArr = res
      this.form.routecode = ''
      if (this.mesSetting.route) {
        this.routeArr = res
        this.form.routecode = ''
      } else {
        this.stepArr = res
      }
      this.form.stepcode = ''
    },
    async routeChange(val) {