护理站商品 权限

This commit is contained in:
shidongli 2022-11-11 15:05:27 +08:00
parent 173f7132a2
commit ab2ce7ad54

View File

@ -40,7 +40,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
<el-option
@ -217,34 +217,16 @@
style="width: 210px"
/>
</el-form-item>
<el-form-item label="护理站名称" prop="nurseStationId">
<el-button
type=""
@click="clickinnerVisible"
v-if="StationName == '请选择所属护理站'"
style="
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ StationName }}</el-button
>
<el-button
type=""
@click="clickinnerVisible"
v-else
style="
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ StationName }}</el-button
>
<el-form-item label="护理站名称" prop="nurseStationName">
<el-input
v-model="form.nurseStationName"
placeholder="请输入商品名称"
max="40"
style="width: 210px"
disabled
/>
</el-form-item>
<el-form-item label="商品分类名称" prop="goodsCategoryId">
<el-select
style="width: 210px"
@ -376,7 +358,7 @@
</div>
</el-dialog>
<!-- 新增护理站名称弹框 -->
<el-dialog
<!-- <el-dialog
:title="title"
:visible.sync="innerVisible"
width="1000px"
@ -474,7 +456,7 @@
:limit.sync="getListByUserquery.pageSize"
@pagination="handleQuery2"
/>
</el-dialog>
</el-dialog> -->
</div>
</template>
@ -530,7 +512,7 @@ export default {
open: false,
// open2: false,
innerVisible: false,
StationName: "请选择所属护理站",
// StationName: "",
nursetotal: 0,
nurseStationId: null,
goods: [
@ -581,6 +563,7 @@ export default {
goodsUnit: null,
goodsPurpose: null,
sort: null,
// mame:null,
},
//
getListByUserquery: {
@ -588,7 +571,10 @@ export default {
pageSize: 10,
},
//
form: {},
form: {
nurseStationName:"",
nurseStationId:"",
},
//
rules: {
goodsName: [
@ -726,16 +712,16 @@ export default {
},
];
},
clickinnerVisible() {
this.innerVisible = true;
},
nurseclick(row) {
console.log(this.form);
console.log(row);
this.form.nurseStationId = row.id;
this.StationName = row.nurseStationName;
this.innerVisible = false;
},
// clickinnerVisible() {
// this.innerVisible = true;
// },
// nurseclick(row) {
// console.log(this.form);
// console.log(row);
// this.form.nurseStationId = row.id;
// this.StationName = row.nurseStationName;
// this.innerVisible = false;
// },
handleQuery2() {
// this.getListByUserquery.pageNum = 1;
this.getList2();
@ -755,7 +741,7 @@ export default {
this.handleQuery2();
},
addcancel() {
this.innerVisible = false;
// this.innerVisible = false;
// this.innerVisiblexg = false;
this.resetQuery2();
},
@ -823,10 +809,10 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.nurseStationId = "";
this.reset()
this.form.nurseStationName=this.nurseStationlist[0].nurseStationName
this.form.nurseStationId =this.nurseStationlist[0].id;
this.title = "商品基本信息";
// this.nurseName = "";
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [
{
@ -841,11 +827,13 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row)
this.reset();
const id = row.goodsInfoId || this.ids;
this.StationName = row.nurseStationName;
getGoodsInfo(id).then((response) => {
console.log(response)
this.form = response.data[0];
this.form.nurseStationName = row.nurseStationName
this.imgone = this.form.goodsPictureUrl;
if (response.data[0].goodAttributeDetailsLists) {
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
@ -877,7 +865,7 @@ export default {
console.log(this.form);
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
// this.StationName = "";
this.open = false;
this.getList();
});
@ -956,8 +944,10 @@ export default {
this.goodsCategorylist = res.rows;
});
getListByUser(this.getListByUserquery).then((res) => {
console.log(res)
if (res.rows[0].isAdmin == "1") {
this.nurseStationlist = res.rows;
// console.log(this.queryParams)
this.total2 = res.total;
} else {
this.total2 = res.total;