|
|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="产品名称:" prop="categoryName">
|
|
|
- <el-input @click.native="chooseProduct" v-model="form.categoryName" readonly />
|
|
|
+ <el-input @click.native="chooseProduct" v-model="form.categoryName" :disabled="isProduct" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
@@ -27,11 +27,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="牌号:" prop="categoryBrandNum">
|
|
|
- <el-input disabled v-model="form.categoryBrandNum" placeholder="自动带入" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
@@ -40,10 +36,15 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="牌号:" prop="categoryBrandNum">
|
|
|
+ <el-input disabled v-model="form.categoryBrandNum" placeholder="自动带入" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="生产版本:" prop="produceVersionId" >
|
|
|
- <el-select v-model="form.produceVersionId" filterable placeholder="清选择" :style="{ width: '100%' }" >
|
|
|
+ <el-form-item label="生产版本:" prop="produceVersionId">
|
|
|
+ <el-select v-model="form.produceVersionId" filterable placeholder="清选择" :style="{ width: '100%' }">
|
|
|
<el-option v-for="item in versionList" :key="item.id" :label="item.code + '-' + item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -74,7 +75,7 @@
|
|
|
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="舟皿规格:" prop="palletSpecification ">
|
|
|
- <el-input disabled placeholder="自动带入" v-model="form.palletSpecification " />
|
|
|
+ <el-input disabled placeholder="自动带入" v-model="form.palletSpecification" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
@@ -190,7 +191,7 @@ import ProductModal from './ProductModal.vue';
|
|
|
import Process from './process.vue'
|
|
|
import ParamModal from './ParamModal.vue'
|
|
|
|
|
|
-import { pageList } from '@/api/technology/version/version.js';
|
|
|
+import { pageList } from '@/api/technology/version/version.js';
|
|
|
export default {
|
|
|
components: {
|
|
|
ProductModal,
|
|
|
@@ -201,11 +202,13 @@ export default {
|
|
|
// 弹窗是否打开
|
|
|
visible: Boolean,
|
|
|
// 修改回显的数据
|
|
|
- data: Object
|
|
|
+ data: Object,
|
|
|
+ paramData: Object
|
|
|
},
|
|
|
data() {
|
|
|
const defaultForm = {
|
|
|
id: null,
|
|
|
+ categoryId: '',
|
|
|
categoryName: '',
|
|
|
categoryCode: '',
|
|
|
categoryModelType: '',
|
|
|
@@ -214,7 +217,8 @@ export default {
|
|
|
produceVersionId: '',
|
|
|
moldingAgent: '',
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
palletId: '',
|
|
|
palletName: '',
|
|
|
@@ -322,6 +326,7 @@ export default {
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
],
|
|
|
+ isProduct: false
|
|
|
|
|
|
};
|
|
|
},
|
|
|
@@ -375,7 +380,7 @@ export default {
|
|
|
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where }) {
|
|
|
- return []
|
|
|
+ return []
|
|
|
},
|
|
|
|
|
|
remove(row) {
|
|
|
@@ -434,7 +439,7 @@ export default {
|
|
|
size: 100
|
|
|
});
|
|
|
this.paramList = res.list
|
|
|
-
|
|
|
+
|
|
|
|
|
|
},
|
|
|
|
|
|
@@ -457,18 +462,35 @@ export default {
|
|
|
this.getParamList()
|
|
|
this.getVersionList()
|
|
|
|
|
|
+ // 产品工艺参数
|
|
|
if (this.data) {
|
|
|
const res = await parameter.getById(this.data.id);
|
|
|
|
|
|
this.$util.assignObject(this.form, {
|
|
|
...res
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
this.$refs.table.setData(res.produceParam)
|
|
|
this.taskParam = res.taskParam
|
|
|
this.isUpdate = true;
|
|
|
- } else {
|
|
|
+ } else if (this.paramData) {
|
|
|
+ this.isProduct = true
|
|
|
+ let param = {
|
|
|
+ categoryId: this.paramData.id,
|
|
|
+ categoryName:this.paramData.name,
|
|
|
+ categoryCode: this.paramData.code,
|
|
|
+ categoryModelType:this.paramData.modelType,
|
|
|
+ categoryBrandNum: this.paramData.brandNum,
|
|
|
+ categorySpecification: this.paramData.specification,
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$util.assignObject(this.form, {
|
|
|
+ ...param
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
+ else {
|
|
|
this.isUpdate = false;
|
|
|
}
|
|
|
|