This commit is contained in:
曹辉 2022-11-07 13:35:12 +08:00
parent d5ef77538c
commit a250fabd4e
2 changed files with 65 additions and 13 deletions

View File

@ -239,7 +239,23 @@
style="width: 210px; margin-left: 10px" style="width: 210px; margin-left: 10px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="护理站名称" prop="nurseStationId"> <el-form-item label="护理站名称" prop="nurseStationName">
<el-select
v-model="queryParams.id"
clearable
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="护理站名称">
<el-select <el-select
style="width: 210px" style="width: 210px"
v-model="form.nurseStationId" v-model="form.nurseStationId"
@ -550,6 +566,7 @@ import {
editGoodsWhetherShelf, editGoodsWhetherShelf,
} from "@/api/system/goodsInfo"; } from "@/api/system/goodsInfo";
import editor from "@/components/Editor"; import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js"; import baseurl from "@/api/baseurl.js";
export default { export default {
@ -628,6 +645,11 @@ export default {
goodsPurpose: null, goodsPurpose: null,
sort: null, sort: null,
}, },
//
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
// //
form: {}, form: {},
// //
@ -655,7 +677,7 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.list(); this.info();
}, },
methods: { methods: {
upwhetherShelf(row) { upwhetherShelf(row) {
@ -698,16 +720,16 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
list() { // list() {
listStation().then((res) => { // listStation().then((res) => {
console.log(res); // console.log(res);
this.nurseStationlist = res.data; // this.nurseStationlist = res.data;
}); // });
goodsCategory().then((res) => { // goodsCategory().then((res) => {
console.log(this.form); // console.log(this.form);
this.goodsCategorylist = res.rows; // this.goodsCategorylist = res.rows;
}); // });
}, // },
// //
addgoodAttributeDetail() { addgoodAttributeDetail() {
console.log(this.goodDetailsLists); console.log(this.goodDetailsLists);
@ -953,6 +975,36 @@ export default {
}); });
} }
}, },
//
info() {
getListByUser(this.getListByUserquery).then((res) => {
if (res.rows[0].isAdmin == "1") {
this.nurseStationlist = res.rows;
this.total2 = res.total;
} else {
this.total2 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.id = res.rows[0].id;
this.handleQuery();
}
});
},
//
loadMore() {
var a = Math.ceil(this.total2 / 10);
if (this.nurseStationlist.length + 1 >= this.total2) {
} else {
if (this.getListByUserquery.pageNum >= a) {
} else {
this.getListByUserquery.pageNum++;
getListByUser(this.getListByUserquery).then((res) => {
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
}, },
}; };
</script> </script>

View File

@ -230,7 +230,7 @@
:before-close="cancel" :before-close="cancel"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="所属护理站" prop="nurseStationId"> <el-form-item label="所属护理站" >
<el-button <el-button
disabled disabled
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc" style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"