yangys
2025-09-22 b311b3cfee0a4635c236eea6c5870d805a29a160
src/views/flowmgr/taskassigntemp.vue
@@ -107,11 +107,9 @@
            prop: 'productModel',
            type: 'input',
            span: 12,
            disabled:true,
            placeholder:'选择零组件号自动填充',
            dataType: 'string',
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
            blur: (col) => {
              this.handleTrim(col)
            },
          },
          {
            label: '工序号',
@@ -126,6 +124,15 @@
            blur: (col) => {
              this.handleTrim(col)
            },
          },
          {
            label: '零组件名称',
            prop: 'drawingName',
            type: 'input',
            placeholder:'选择零组件号自动填充',
            span: 12,
            disabled:true,
            dataType: 'string',
          },
          {
            label: '工序名称',
@@ -152,7 +159,7 @@
          {
            label: '批次号',
            prop: 'craftEdition',
            placeholder:'如"A"',
            placeholder:'如"2S24001"',
            type: 'input',
            span: 12,
            dataType: 'string',
@@ -191,7 +198,25 @@
            dataType: 'string',
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
            label: '主管工艺',
            prop: 'producePlanId',
            type: 'select',//column 12
            remote: true,
            placeholder:'无法匹配人员职责表时请选择主管工艺',
            dicUrl: `/blade-mdm/producedivision/select-programmer?programmer={{key}}`,
            dicFormatter:(res)=>{
              return res.data.map(obj => {
                let item = new Object();
                item.value = obj.id;
                item.label = obj.programmerName;
                item.desc = `专业组长:${obj.teamLeaderName},校对:${obj.checkerName},审核:${obj.seniorName}`
                return item;
              }); ;
            },
            span: 12,
            dataType: 'string',
          },
          {
            type:'hidden',
            prop:'isTempFlow',
@@ -259,6 +284,7 @@
        params: {drawingNo: query},
      }).then(
        res => {
          this.attachForm.productModel = '';
          if(res.data.code == 200){
            let list = res.data.data;
            for(let i of list){
@@ -280,6 +306,7 @@
    },
    handleSelect(item) {
      this.attachForm.productModel = item.cph;
      this.attachForm.drawingName = item.ljmc;
    },
    handleTrim(col){
      //console.log(col)
@@ -299,7 +326,44 @@
          form.machineMode = item.name;
        }
      })
      if(this.attachForm.producePlanId){
        //手动指定了人员职责表id,不用继续从服务端验证
         this.startDispatch(form,done);
      }else{
        axios({
          url: '/blade-mdm/producedivision/select-by-drawingno',
          method: 'get',
          params: {drawingNo:this.attachForm.drawingNo},
        }).then(
          res => {
            if(res.data.code == 200){
              this.$message({
                type: 'success',
                message: '操作成功!',
              });
              this.attachForm.producePlanId = res.data.data.id;
              console.log('planid',this.attachForm.productPlanId)
              this.startDispatch(form,done);
            }else{
              this.$alert(res.data.msg+".重新输入或者手动选择主管工艺。", '发起任务失败',{type:'error',confirmButtonText:'关闭'});
            }
            done();
          },
          error => {
            console.log(error);
            done();
          }
        );
      }
    },
    startDispatch(form,done){
      axios({
        url: '/blade-mdm/flow/dispatch/start',
        method: 'post',