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"
/>
</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
style="width: 210px"
v-model="form.nurseStationId"
@ -550,6 +566,7 @@ import {
editGoodsWhetherShelf,
} from "@/api/system/goodsInfo";
import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js";
export default {
@ -628,6 +645,11 @@ export default {
goodsPurpose: null,
sort: null,
},
//
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
//
@ -655,7 +677,7 @@ export default {
},
created() {
this.getList();
this.list();
this.info();
},
methods: {
upwhetherShelf(row) {
@ -698,16 +720,16 @@ export default {
this.loading = false;
});
},
list() {
listStation().then((res) => {
console.log(res);
this.nurseStationlist = res.data;
});
goodsCategory().then((res) => {
console.log(this.form);
this.goodsCategorylist = res.rows;
});
},
// list() {
// listStation().then((res) => {
// console.log(res);
// this.nurseStationlist = res.data;
// });
// goodsCategory().then((res) => {
// console.log(this.form);
// this.goodsCategorylist = res.rows;
// });
// },
//
addgoodAttributeDetail() {
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>

View File

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