loulijun2021
2023-11-02 77aab033bca84f1f4ed186689644e4c72b57d7fc
src/views/makeModel/processRoute.vue
@@ -41,7 +41,7 @@
            <el-form-item label="工艺描述" style=" display: flex;">
              <el-input v-model="form.description" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;">
            <el-form-item v-if="isExpandForm" label="创建人员" style=" display: flex;">
              <el-input v-model="form.createuser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
          </div>
@@ -273,7 +273,7 @@
              :popper-append-to-body="false"
              style="width: 220px"
              placeholder="请选择"
              @change="wkshopcodeChange"
              @change="getStepSelectArr"
            >
              <el-option
                v-for="item in WorkShopArr"
@@ -606,13 +606,11 @@
        return (res.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1)
      }
    },
    wkshopcodeChange() {
      this.getStepSelectArr()
    },
    // 工艺设置 下拉获取所有
    async getStepSelectArr() {
      const { data: res } = await StepSelect({ WorkShop: this.dialogForm.wkshopcode })
      this.routeArr = res
      console.log('执行了!')
    },
    // 处理下拉选择
    handleSelect(item, tag) {
@@ -843,9 +841,9 @@
      this.operation = operation
      this.dialogVisible = true
      if (this.$store.state.settings.orgType === 'W') {
        this.getStepSelectArr()
      }
      // if (this.$store.state.settings.orgType === 'W') {
      this.getStepSelectArr()
      // }
    },
    // 工艺路线预览
    async edit(operation, row) {
@@ -895,20 +893,23 @@
      this.operation = operation
      this.dialogVisible = true
      if (this.$store.state.settings.orgType === 'W') {
        await this.getStepSelectArr()
      }
      // if (this.$store.state.settings.orgType === 'W') {
      // }
      const { data: res } = await ViewRoute({ routecode: row.code })
      // 待改
      this.dynamicTags = []
      this.routeSelectedArr = []
      this.dialogForm.code = res[0].code
      this.dialogForm.name = res[0].name
      this.dialogForm.enable = res[0].enable
      this.dialogForm.description = res[0].description
      this.dialogForm.wkshopcode = res[0].wkshopcode
      await this.getStepSelectArr()
      this.$nextTick(() => {
        this.dialogForm.code = res[0].code
        this.dialogForm.name = res[0].name
        this.dialogForm.enable = res[0].enable
        this.dialogForm.description = res[0].description
        this.dialogForm.wkshopcode = res[0].wkshopcode
        res[0].Data.forEach((item, index) => {
          this.dynamicTags.push(
            { seq: item.seq, stepname: item.stepname, stepcode: item.stepcode, editDisabled: true, effect: index === res[0].Data.length - 1 ? 'dark' : 'light' }
@@ -931,7 +932,7 @@
      this.dialogForm.name = ''
      this.dialogForm.enable = 'Y'
      this.dialogForm.description = ''
      this.dialogForm.wkshopcode = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode'), // 所属车间
      this.dialogForm.wkshopcode = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode') // 所属车间
      this.dialogForm.Data = []
      this.dynamicTags = [