1
李喆(开发组)
2025-06-13 8114dfc5411e69cc43057c7aa10b7a846ead46ad
1
已添加1个文件
147 ■■■■■ 文件已修改
src/views/flowmgr/taskassign.vue 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowmgr/taskassign.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,147 @@
<!--
 * @Author: æŽå–†(开发组) lzhe@yxqiche.com
 * @Date: 2025-05-28 12:03:55
 * @LastEditors: æŽå–†(开发组) lzhe@yxqiche.com
 * @LastEditTime: 2025-06-13 14:50:38
 * @FilePath: /mdmweb/src/views/flowmgr/taskassign.vue
 * @Description: è¿™æ˜¯é»˜è®¤è®¾ç½®,请设置`customMade`, æ‰“å¼€koroFileHeader查看配置 è¿›è¡Œè®¾ç½®: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <basic-container>
    <avue-form ref="form" :option="attachOption" v-model="attachForm" @submit="formSubmit"></avue-form>
  </basic-container>
</template>
<script>
export default {
  data() {
    var that = this;
    return {
      form: {},
      machineCodeList: [],
      attachOption: {
        labelWidth: 160,
        submitBtn: true,
        emptyBtn: false,
        tip: false,
        column: [
          {
            label: '图号',
            prop: 'drawingNo',
            type: 'input',
            span: 12,
            dataType: 'string',
          },
          {
            label: '图号版次',
            prop: 'drawingNoEdition',
            type: 'input',
            span: 12,
            dataType: 'string',
          },
          {
            label: '产品型号',
            prop: 'productType',
            type: 'input',
            span: 12,
            dataType: 'string',
            // rules: [
            //   {
            //     required: true,
            //     message: '请选择流程类型',
            //     trigger: 'blur',
            //   },
            // ],
          },
          {
            label: '工序号',
            prop: 'processNo',
            type: 'input',
            span: 12,
            dataType: 'string',
          },
          {
            label: '工序名称',
            prop: 'processName',
            type: 'input',
            span: 12,
            dataType: 'string',
          },
          {
            label: '工艺版次',
            prop: 'craftEdition',
            type: 'input',
            span: 12,
            dataType: 'string',
          },
          {
            label: '加工机床',
            prop: 'machineCode',
            type: 'select',
            dicUrl: `/blade-mdm/machine/page`,
            dicFormatter: function(res) {
              that.machineCodeList = res.data.records;
              return res.data.records;
            },
            props: {
              label: 'name',
              value: 'code',
            },
            span: 12
          },
          {
            label: '计划锁定时间(天)',
            prop: 'planLockDays',
            type: 'input',
            span: 12,
            dataType: 'string',
          },
          {
            label: '计划开工时间',
            prop: 'planStartTime',
            type: 'date',
            format: "YYYY-MM-DD",
            valueFormat: "YYYY-MM-DD",
            span: 12,
            dataType: 'string',
          },
        ],
      },
      attachForm: {},
    };
  },
  methods: {
    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();
        },
        error => {
            window.console.log(error);
            done();
        }
      );
    }
  },
};
</script>
<style lang="scss">
</style>