护理站商品 权限

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