优化添加耗材
This commit is contained in:
@@ -108,11 +108,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="耗材类型" prop="conTypeId" v-if="dialogtitle == '添加'">
|
<el-form-item label="耗材类型" prop="conTypeId" v-if="dialogtitle == '添加'">
|
||||||
<el-select v-model="ruleForm.conTypeId" placeholder="请选择">
|
<el-select v-model="ruleForm.conTypeId" placeholder="请选择">
|
||||||
<el-option v-for="item in this.tableData.data" :key="item.conTypeId" :label="item.conTypeName"
|
<el-option v-for="item in consTypeList" :key="item.conTypeId" :label="item.conTypeName" :value="item.id">
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item
|
<!-- <el-form-item
|
||||||
label="耗材类型"
|
label="耗材类型"
|
||||||
@@ -256,6 +254,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dayjs,
|
dayjs,
|
||||||
|
consTypeList: [],
|
||||||
query: {
|
query: {
|
||||||
conTypeId: "",
|
conTypeId: "",
|
||||||
conTypeName: "",
|
conTypeName: "",
|
||||||
@@ -435,6 +434,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取类型
|
// 获取类型
|
||||||
|
async gettbConsType() {
|
||||||
|
try {
|
||||||
|
const res = await gettbConsType({
|
||||||
|
page: 0,
|
||||||
|
size: 100,
|
||||||
|
shopId: localStorage.getItem("shopId")
|
||||||
|
})
|
||||||
|
this.consTypeList = res.content
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取类型
|
||||||
async getTableDatatype() {
|
async getTableDatatype() {
|
||||||
this.tableDatatype.loading = true;
|
this.tableDatatype.loading = true;
|
||||||
try {
|
try {
|
||||||
@@ -493,6 +505,7 @@ export default {
|
|||||||
if (type == "add") {
|
if (type == "add") {
|
||||||
// 添加
|
// 添加
|
||||||
this.dialogtitle = "添加";
|
this.dialogtitle = "添加";
|
||||||
|
this.gettbConsType()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.refruleForm.resetFields();
|
this.$refs.refruleForm.resetFields();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user