yangys
2025-08-22 a3e3b7564d4d5cea245b57248b186248a169b7ac
src/views/flowmgr/taskassign.vue
@@ -13,23 +13,38 @@
</template>
<script>
import {
  getQueryString,
} from '@/utils/util';
export default {
  watch: {
    'attachForm.drawingNo': function (val) {
      if(val && this.attachForm.processNo) {
        this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`;
      if(val && this.attachForm.processNo && this.attachForm.processEdition) {
        this.attachForm.title = `${val}-${this.attachForm.processNo}-${this.attachForm.processEdition}-数控程序编制`;
      }
    },
    'attachForm.processNo': function (val) {
      if(val && this.attachForm.drawingNo) {
      if(val && this.attachForm.drawingNo && this.attachForm.processEdition) {
        //this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`;
      this.attachForm.title = `${this.attachForm.drawingNo}-${val}-数控程序编制`;
          this.attachForm.title = `${this.attachForm.drawingNo}-${val}-${this.attachForm.processEdition}-数控程序编制`;
      }
    },
    'attachForm.processEdition': function (val) {
      if(val && this.attachForm.drawingNo && this.attachForm.processNo ) {
        //this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`;
          this.attachForm.title = `${this.attachForm.drawingNo}-${this.attachForm.processNo}-${val}-数控程序编制`;
      }
    },
  },
  data() {
    var isTempFlow = getQueryString("isTempFlow");
    isTempFlow = isTempFlow === 'Y'?'Y':'N';
    console.log('isTempFlow='+isTempFlow);
    var that = this;
    return {
      isTempFlow:isTempFlow,//是否临时流程
      form: {},
      machineCodeList: [],
      attachOption: {
@@ -47,7 +62,7 @@
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
            label: '图号',
            label: '零组件号',
            prop: 'drawingNo',
            type: 'input',
            span: 12,
@@ -69,13 +84,6 @@
            span: 12,
            dataType: 'string',
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
            // rules: [
            //   {
            //     required: true,
            //     message: '请选择流程类型',
            //     trigger: 'blur',
            //   },
            // ],
          },
          {
            label: '工序号',
@@ -107,6 +115,7 @@
          {
            label: '工艺版次',
            prop: 'craftEdition',
            placeholder:'如"A"',
            type: 'input',
            span: 12,
            dataType: 'string',
@@ -117,7 +126,8 @@
            label: '加工机床',
            prop: 'machineCode',
            type: 'select',
            dicUrl: `/blade-mdm/machine/page`,
               filterable: true,
            dicUrl: `/blade-mdm/machine/page?size=10000`,
            dicFormatter: function (res) {
              that.machineCodeList = res.data.records;
              return res.data.records;
@@ -132,9 +142,13 @@
          {
            label: '计划锁定时间(天)',
            prop: 'planLockDays',
            type: 'input',
            type: 'number',
            min:0,
            max:30,
            span: 12,
            dataType: 'string',
            controls:true,
            dataType: 'number',
            controlsPosition:'right',
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
@@ -154,10 +168,10 @@
            span: 12,
            dataType: 'string',
            // rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          }
        ],
      },
      attachForm: {},
      attachForm: {planLockDays:7},//默认7天
    };
  },
  methods: {