商品信息管理 所属护理站权限
This commit is contained in:
parent
b073a45809
commit
c8d32cab71
@ -8,6 +8,14 @@ export function goodsInfoList(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//所属护理站
|
||||
export function stationList(query) {
|
||||
return request({
|
||||
url: '/system/station/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品基本信息详细
|
||||
export function getGoodsInfo(id) {
|
||||
|
||||
@ -42,7 +42,10 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
|
||||
<el-select
|
||||
v-model="queryParams.goodsPurpose"
|
||||
placeholder="请选择商品用途"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
@ -52,7 +55,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否上架" prop="whetherShelf">
|
||||
<el-select v-model="queryParams.whetherShelf" placeholder="请选择">
|
||||
<el-option
|
||||
@ -381,7 +383,7 @@
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="addcancel"
|
||||
:before-close="addcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
@ -488,9 +490,9 @@ import {
|
||||
goodsInfoList,
|
||||
goodsCategory,
|
||||
editGoodsWhetherShelf,
|
||||
stationList
|
||||
} from "@/api/system/OperateGoodsInfo";
|
||||
import editor from "@/components/Editor";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
|
||||
@ -589,7 +591,7 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationId:null,
|
||||
nurseStationId: null,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
@ -701,7 +703,7 @@ export default {
|
||||
cancel() {
|
||||
console.log(this.form);
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone!= this.form.goodsPictureUrl) {
|
||||
if (this.imgone != this.form.goodsPictureUrl) {
|
||||
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
@ -738,14 +740,14 @@ export default {
|
||||
},
|
||||
handleQuery2() {
|
||||
// this.getListByUserquery.pageNum = 1;
|
||||
this.getList2();
|
||||
},
|
||||
getList2(){
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
this.info();
|
||||
},
|
||||
// getList2() {
|
||||
// stationList(this.getListByUserquery).then((res) => {
|
||||
// this.total2 = res.total;
|
||||
// this.nurseStationlist = res.rows;
|
||||
// });
|
||||
// },
|
||||
resetQuery2() {
|
||||
this.resetForm("queryForm");
|
||||
(this.getListByUserquery = {
|
||||
@ -756,7 +758,6 @@ export default {
|
||||
},
|
||||
addcancel() {
|
||||
this.innerVisible = false;
|
||||
// this.innerVisiblexg = false;
|
||||
this.resetQuery2();
|
||||
},
|
||||
|
||||
@ -799,19 +800,17 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == '1') {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
} else {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.goodsName = null
|
||||
this.queryParams.goodsCategoryName = null
|
||||
this.queryParams.goodsPurpose = null
|
||||
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
goodsName: null,
|
||||
goodsCategoryName: null,
|
||||
goodsPurpose: null,
|
||||
}
|
||||
|
||||
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -858,7 +857,7 @@ export default {
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
console.log(this.form);
|
||||
console.log(this.goodDetailsLists);
|
||||
this.form.goodAttributeDetailsLists = [];
|
||||
this.form.goodDetailsLists = this.goodDetailsLists;
|
||||
@ -877,9 +876,8 @@ export default {
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
console.log(this.form);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
|
||||
this.StationName = "请选择所属护理站";
|
||||
this.open = false;
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
@ -898,34 +896,10 @@ export default {
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
// handleDelete(row) {
|
||||
// const ids = row.id || this.ids;
|
||||
// this.$modal
|
||||
// .confirm("是否确认删除?")
|
||||
// .then(function () {
|
||||
// return delGoodsInfo(ids);
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// /** 导出按钮操作 */
|
||||
// handleExport() {
|
||||
// this.download(
|
||||
// "system/goodsInfo/export",
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// },
|
||||
// `goodsInfo_${new Date().getTime()}.xlsx`
|
||||
// );
|
||||
// },
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
this.form.goodsPictureUrl = imgUrl;
|
||||
@ -956,17 +930,10 @@ export default {
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
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.nurseStationId = res.rows[0].id;
|
||||
this.form.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
stationList(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
console.log(res)
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
@ -977,7 +944,7 @@ export default {
|
||||
if (this.getListByUserquery.pageNum >= a) {
|
||||
} else {
|
||||
this.getListByUserquery.pageNum++;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
stationList(this.getListByUserquery).then((res) => {
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user