优化添加耗材
This commit is contained in:
parent
f6b0bcc5f1
commit
ea8c0021db
|
|
@ -108,11 +108,9 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="耗材类型" prop="conTypeId" v-if="dialogtitle == '添加'">
|
||||
<el-select v-model="ruleForm.conTypeId" placeholder="请选择">
|
||||
<el-option v-for="item in this.tableData.data" :key="item.conTypeId" :label="item.conTypeName"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in consTypeList" :key="item.conTypeId" :label="item.conTypeName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
label="耗材类型"
|
||||
|
|
@ -256,6 +254,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
dayjs,
|
||||
consTypeList: [],
|
||||
query: {
|
||||
conTypeId: "",
|
||||
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() {
|
||||
this.tableDatatype.loading = true;
|
||||
try {
|
||||
|
|
@ -493,6 +505,7 @@ export default {
|
|||
if (type == "add") {
|
||||
// 添加
|
||||
this.dialogtitle = "添加";
|
||||
this.gettbConsType()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.refruleForm.resetFields();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue