1
李喆(开发组)
2025-08-11 32d659432b0e6627758faf39380fc569e56b9799
src/views/flowmgr/taskassign.vue
@@ -2,7 +2,7 @@
 * @Author: 李喆(开发组) lzhe@yxqiche.com
 * @Date: 2025-05-28 12:03:55
 * @LastEditors: gaoshp
 * @LastEditTime: 2025-08-02 21:38:13
 * @LastEditTime: 2025-08-10 13:05:56
 * @FilePath: /mdmweb/src/views/flowmgr/taskassign.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -14,6 +14,19 @@
<script>
export default {
  watch: {
    'attachForm.drawingNo': function (val) {
      if(val && this.attachForm.processNo) {
        this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`;
      }
    },
    'attachForm.processNo': function (val) {
      if(val && this.attachForm.drawingNo) {
        //this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`;
      this.attachForm.title = `${this.attachForm.drawingNo}-${val}-数控程序编制`;
      }
    },
  },
  data() {
    var that = this;
    return {
@@ -26,6 +39,14 @@
        tip: false,
        column: [
          {
            label: '流程标题',
            prop: 'title',
            type: 'input',
            span: 24,
            dataType: 'string',
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
            label: '图号',
            prop: 'drawingNo',
            type: 'input',
@@ -35,7 +56,7 @@
          },
          {
            label: '图号版次',
            prop: 'partNoEdition',
            prop: 'drawingNoEdition',
            type: 'input',
            span: 12,
            dataType: 'string',
@@ -61,10 +82,9 @@
            prop: 'processNo',
            type: 'input',
            span: 12,
            type: 'number',
            step: 1,
            precision: 0,
            dataType: 'number',
            dataType: 'string',
            max: 999,
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
@@ -74,7 +94,6 @@
            type: 'input',
            span: 12,
            dataType: 'string',
            maxlength: 2,
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
@@ -91,6 +110,7 @@
            type: 'input',
            span: 12,
            dataType: 'string',
            maxlength: 2,
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
@@ -98,13 +118,13 @@
            prop: 'machineCode',
            type: 'select',
            dicUrl: `/blade-mdm/machine/page`,
            dicFormatter: function(res) {
            dicFormatter: function (res) {
              that.machineCodeList = res.data.records;
              return res.data.records;
            },
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
            props: {
              label: 'name',
              label: 'code',
              value: 'code',
            },
            span: 12
@@ -127,36 +147,44 @@
            dataType: 'string',
            rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
          {
            label: '偏离单号',
            prop: 'deviation',
            type: 'input',
            span: 12,
            dataType: 'string',
            // rules: [{ required: true, message: '必填', trigger: 'blur' }],
          },
        ],
      },
      attachForm: {},
    };
  },
  methods: {
    formSubmit(form,done) {
      var form = {...form};
      this.machineCodeList.forEach(item=> {
        if(form.machineCode == item.code) {
    formSubmit(form, done) {
      var form = { ...form };
      this.machineCodeList.forEach(item => {
        if (form.machineCode == item.code) {
          form.machineMode = item.name;
        }
      })
      form.producePlanId = "1932411828915224578";
      axios({
        url: '/blade-mdm/flow/dispatch/start',
        method: 'post',
        data: form,
      }).then(
        res => {
            this.$message({
              type: 'success',
              message: '操作成功!',
            });
            this.$refs.form.resetForm();
            done();
          this.$message({
            type: 'success',
            message: '操作成功!',
          });
          this.$refs.form.resetForm();
          done();
        },
        error => {
            window.console.log(error);
            done();
          window.console.log(error);
          done();
        }
      );
    }
@@ -164,6 +192,4 @@
};
</script>
<style lang="scss">
</style>
<style lang="scss"></style>