|
|
@@ -16,12 +16,10 @@
|
|
|
<el-form-item label="工艺路线组编码:" prop="code">
|
|
|
<el-input
|
|
|
clearable
|
|
|
+ disabled
|
|
|
v-model="form.code"
|
|
|
- maxlength="5"
|
|
|
- placeholder="工艺路线组编码"
|
|
|
- >
|
|
|
- <template slot="prepend">501</template>
|
|
|
- </el-input>
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
@@ -43,7 +41,6 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="产品名称:" prop="categoryName">
|
|
|
<el-input @click.native="chooseProduct" v-model="form.categoryName" readonly/>
|
|
|
@@ -96,7 +93,7 @@
|
|
|
<script>
|
|
|
import ProductModal from './ProductModal.vue';
|
|
|
import route from '@/api/technology/route';
|
|
|
- import { addUsers, putUsers } from '@/api/system/user';
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
components:{
|
|
|
@@ -140,11 +137,7 @@
|
|
|
{ required: true, message: '请输入工艺路线名称', trigger: 'blur' }
|
|
|
],
|
|
|
code: [
|
|
|
- { required: true, message: '请输入工艺路线编码', trigger: 'blur' },
|
|
|
- {
|
|
|
- pattern: /^\d{5}$/,
|
|
|
- message: '请输入五位数的数字'
|
|
|
- }
|
|
|
+ { required: true, message: '请输入工艺路线编码', trigger: 'blur' }
|
|
|
],
|
|
|
factoryId: [
|
|
|
{ required: true, message: '请输入工艺路线', trigger: 'blur' }
|
|
|
@@ -198,8 +191,8 @@
|
|
|
|
|
|
this.loading = true;
|
|
|
let title = this.isUpdate ? '修改' : '新建'; // 提交的名称或编号是否有效率有用的标识,
|
|
|
+
|
|
|
|
|
|
-
|
|
|
route
|
|
|
.save(this.form)
|
|
|
.then((msg) => {
|
|
|
@@ -241,6 +234,8 @@
|
|
|
});
|
|
|
this.isUpdate = true;
|
|
|
} else {
|
|
|
+ const res = await route.getCode();
|
|
|
+ this.form.code = res;
|
|
|
this.isUpdate = false;
|
|
|
}
|
|
|
} else {
|
|
|
@@ -250,4 +245,4 @@
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
-</script>
|
|
|
+</script>
|