修改bug
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-08 13:46:17
|
||||
* @LastEditTime: 2024-03-15 14:54:38
|
||||
* @LastEditTime: 2024-03-21 10:40:52
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="false" class="drawer" size="50%">
|
||||
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="true" class="drawer" size="50%">
|
||||
<small-title slot="title" :no-padding="true" @close="handleClose">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title>
|
||||
@@ -114,7 +114,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="原料等级" prop="materialGrade">
|
||||
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择" style="width: 100%;">
|
||||
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择">
|
||||
<el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -122,14 +122,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注" style="width: 100%;">
|
||||
<el-input @input="onInput" :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- </div> -->
|
||||
<div class="attr-list" v-if="idAttrShow">
|
||||
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
<!-- <div class="attr-list" v-if="idAttrShow"> -->
|
||||
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
设备物料明细
|
||||
</small-title>
|
||||
|
||||
@@ -147,9 +147,9 @@
|
||||
</base-table>
|
||||
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" /> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="drawer-body__footer">
|
||||
<div v-if="!isdetail" class="drawer-body__footer">
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</div>
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
checkValueList: [],
|
||||
checkResult: '',
|
||||
materialGrade: undefined,
|
||||
remark:null,
|
||||
remark:undefined,
|
||||
},
|
||||
productAttrList: [],
|
||||
visible: false,
|
||||
@@ -257,6 +257,9 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
onInput() {
|
||||
this.$forceUpdate();
|
||||
},
|
||||
judgeValue(val, minValue, maxValue, index) {
|
||||
if (val >= minValue && val <= maxValue) {
|
||||
console.log(val)
|
||||
@@ -268,7 +271,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleClose() {
|
||||
this.ingredientList = undefined
|
||||
this.ingredientList = []
|
||||
console.log(222222222);
|
||||
},
|
||||
dataFormSubmit() {
|
||||
@@ -454,17 +457,17 @@ export default {
|
||||
// });
|
||||
// },
|
||||
init(id, isdetail) {
|
||||
this.initData()
|
||||
// this.initData()
|
||||
this.getDict()
|
||||
this.ingredientList = []
|
||||
this.isdetail = isdetail || false;
|
||||
this.dataForm.id = id || undefined;
|
||||
this.visible = true;
|
||||
if (id) {
|
||||
this.idAttrShow = true
|
||||
} else {
|
||||
this.idAttrShow = false
|
||||
}
|
||||
// if (id) {
|
||||
// this.idAttrShow = true
|
||||
// } else {
|
||||
// this.idAttrShow = false
|
||||
// }
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
@@ -537,9 +540,9 @@ export default {
|
||||
// 获取产品属性列表
|
||||
// this.getList();
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
this.getCode()
|
||||
}
|
||||
// if (this.urlOptions.isGetCode) {
|
||||
// this.getCode()
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -553,12 +556,12 @@ export default {
|
||||
this.isdetail = false;
|
||||
},
|
||||
// 新增 / 修改
|
||||
addNew(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id,this.dataForm.id);
|
||||
});
|
||||
}
|
||||
// addNew(id) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(id,this.dataForm.id);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user