gaoshp
3 天以前 0867327d337ea6e30d1363a776e276d7a32e1db8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!--
 * @Author: 李喆(开发组) lzhe@yxqiche.com
 * @Date: 2025-05-28 12:03:55
 * @LastEditors: 李喆(开发组) lzhe@yxqiche.com
 * @LastEditTime: 2025-07-10 12:16:15
 * @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: 'partNoEdition',
            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>