添加护理站权限

This commit is contained in:
闫晓茹 2022-11-11 10:34:10 +08:00
parent 6b3cab39ec
commit 8c4908bb74
2 changed files with 171 additions and 291 deletions

View File

@ -8,6 +8,21 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="所属护理站" prop="nurseStationName">
<el-select
v-model="queryParams.nurseStationId"
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="商品名称" prop="goodsName">
<el-input
v-model="queryParams.goodsName"
@ -34,7 +49,7 @@
/>
</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"
@ -94,29 +109,7 @@
>修改</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:goodsInfo:remove']"
>删除</el-button
>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:goodsInfo:export']"
>导出</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
@ -199,14 +192,6 @@
v-hasPermi="['system:operateGoodInfo:remove']"
>删除</el-button
>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-search"
@click="reference(scope.row)"
v-hasPermi="['system:goodsInfo:remove']"
>查询商品信息</el-button
> -->
</template>
</el-table-column>
</el-table>
@ -266,20 +251,6 @@
"
>{{ StationName }}</el-button
>
<!-- <el-select
style="width: 210px"
v-model="form.nurseStationId"
clearable
placeholder="请选择护理站"
>
<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="商品分类名称" prop="goodsCategoryId">
<el-select
@ -296,16 +267,11 @@
>
</el-option>
</el-select>
<!-- <el-input
v-model="form.goodsCategoryName"
placeholder="请输入商品分类名称"
style="width: 210px"
/> -->
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select
v-model="form.goodsPurpose"
placeholder="请选择"
placeholder="请选择商品用途"
style="width: 210px"
>
<el-option
@ -426,7 +392,7 @@
>
<el-form
ref="queryForm"
:model="nurseStationqueryParams"
:model="getListByUserquery"
:rules="rules"
label-width="80px"
:inline="true"
@ -437,7 +403,7 @@
label-width="120"
>
<el-input
v-model="nurseStationqueryParams.nurseStationCode"
v-model="getListByUserquery.nurseStationCode"
placeholder="请输入护理站编码"
clearable
/>
@ -448,7 +414,7 @@
label-width="120"
>
<el-input
v-model="nurseStationqueryParams.nurseStationName"
v-model="getListByUserquery.nurseStationName"
placeholder="请输入护理站名称"
clearable
/>
@ -509,157 +475,13 @@
</el-table-column>
</el-table>
<pagination
v-show="nursetotal > 0"
:total="nursetotal"
:page.sync="nurseStationqueryParams.pageNum"
:limit.sync="nurseStationqueryParams.pageSize"
@pagination="getList2"
v-show="total2 > 0"
:total="total2"
:page.sync="getListByUserquery.pageNum"
:limit.sync="getListByUserquery.pageSize"
@pagination="handleQuery2"
/>
</el-dialog>
<!-- 查看商品详情 -->
<!-- <el-dialog
:title="title"
:visible.sync="open2"
width="1000px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="120px"
:inline="true"
>
<el-form-item label="商品名称" prop="goodsName">
<el-input
v-model="form.goodsName"
placeholder="请输入商品名称"
style="width: 210px"
:disabled="true"
/>
</el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName">
<el-select
style="width: 210px"
clearable
v-model="form.nurseStationId"
placeholder="请选择护理站"
:disabled="true"
>
<el-option
v-for="item in nurseStationlist"
:key="item.nurseStationId"
:label="item.nurseStationName"
:value="item.nurseStationId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品分类名称" prop="goodsCategoryName">
<el-select
style="width: 210px"
v-model="form.goodsCategoryId"
clearable
placeholder="请选择商品分类名称"
:disabled="true"
>
<el-option
v-for="item in goodsCategorylist"
:key="item.id"
:label="item.goodsCategoryName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select
v-model="form.goodsPurpose"
placeholder="请选择"
style="width: 210px"
:disabled="true"
>
<el-option
v-for="item in goods"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品度量单位" prop="goodsUnit">
<el-input
v-model="form.goodsUnit"
placeholder="请输入商品度量单位"
style="width: 210px"
:disabled="true"
/>
</el-form-item>
<el-form-item label="商品图片" prop="goodsPictureUrl">
<img
:src="form.goodsPictureUrl"
alt=""
style="width: 150px; height: 150px"
/>
</el-form-item>
<el-table
ref="goodDetailsLists"
:data="goodDetailsLists"
label-width="50px"
style="margin-top: 20px"
>
<el-table-column
label="商品属性名称"
align="center"
prop="attributeName"
>
</el-table-column>
<el-table-column label="商品单价" align="center" prop="goodsPrice">
</el-table-column>
<el-table-column label="库存" align="center" prop="goodsStock">
</el-table-column>
<el-table-column
label="显示顺序"
align="center"
prop="attributeDetailsSort"
>
</el-table-column>
<el-table-column label="商品属性图片" align="center">
<template slot-scope="scope">
<img
:src="scope.row.attributePitureUrl"
alt=""
style="width: 100px; height: 100px"
/>
</template>
</el-table-column>
</el-table>
<el-form-item
label="商品概述"
prop="goodsRemark"
style="margin-top: 20px"
>
<textarea
style="margin-left: 30px"
v-model="form.goodsRemark"
name=""
id=""
cols="130"
rows="10"
:disabled="true"
></textarea>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open2 = false">确定</el-button>
</div>
</el-dialog> -->
</div>
</template>
@ -669,21 +491,21 @@ import {
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
updatePicture,
goodsInfoList,
goodsCategory,
editGoodsWhetherShelf,
updatePicture,
} 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";
export default {
components: { stationAcatar, editor },
name: "OperateGoodsInfo",
data() {
return {
imgone:"",
imgone: "",
imageUrl: "", //
value: "",
datas: null,
@ -699,6 +521,8 @@ export default {
showSearch: true,
//
total: 0,
total2: 0,
//
goodsInfoList: [],
//
@ -742,7 +566,7 @@ export default {
id: null,
whetherShelf: null,
},
nurseStationqueryParams: {
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
@ -754,7 +578,7 @@ export default {
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
goodsCode: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
@ -796,7 +620,7 @@ export default {
created() {
this.getList();
this.info();
this.getList2()
// this.getList2();
},
methods: {
upwhetherShelf(row) {
@ -882,7 +706,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) {
@ -906,19 +730,9 @@ export default {
],
},
];
// this.goodDetailsLists = [{
// attributeName: "",
// attributePitureUrl: "",
// goodsPrice: "",
// goodsStock: "",
// sort: "",
// ids: 1,
// }]
},
clickinnerVisible() {
this.innerVisible = true
this.innerVisible = true;
},
nurseclick(row) {
console.log(this.form);
@ -927,39 +741,30 @@ export default {
this.StationName = row.nurseStationName;
this.innerVisible = false;
},
handleQuery2(){
this.queryParams.pageNum = 1;
this.getList2()
handleQuery2() {
this.getListByUserquery.pageNum = 1;
this.info();
},
getList2(){
getListByUser(this.nurseStationqueryParams).then((res) => {
this.nursetotal = res.total;
this.nurseStationlist = res.rows; //
});
},
resetQuery2() {
this.resetForm("queryForm");
this.nurseStationqueryParams={
pageNum:1,
pageSize:10
},
this.handleQuery2();
},
addcancel() {
this.innerVisible = false;
// this.innerVisiblexg = false;
this.resetQuery2();
},
// getList2() {
// //
// this.loading = true;
// getListByUser(this.nurseStationqueryParams).then((res) => {
// getList2(){
// getListByUser(this.nurseStationqueryParams).then((res) => {
// this.nursetotal = res.total;
// this.nurseStationlist = res.rows;
// });
// },
resetQuery2() {
this.resetForm("queryForm");
(this.getListByUserquery = {
pageNum: 1,
pageSize: 10,
}),
this.handleQuery2();
},
addcancel() {
this.innerVisible = false;
// this.innerVisiblexg = false;
this.resetQuery2();
},
//
reset() {
this.form = {
@ -968,7 +773,7 @@ export default {
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
goodsCode: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
@ -999,8 +804,19 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
// if(this.nurseStationlist2)
this.resetForm("queryForm");
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.handleQuery();
},
//
@ -1013,26 +829,26 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.nurseStationId=""
this.nurseStationId = "";
this.title = "商品基本信息";
// this.nurseName = "";
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
},
];
this.goodDetailsLists = [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
},
];
this.open = true;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.goodsInfoId || this.ids;
this.StationName = row.nurseStationName;
this.StationName = row.nurseStationName;
getGoodsInfo(id).then((response) => {
this.form = response.data[0];
this.imgone = this.form.goodsPictureUrl;
@ -1043,18 +859,7 @@ export default {
this.title = "修改商品基本信息";
});
},
// reference(row) {
// getGoodsInfo(row.goodsInfoId).then((response) => {
// response.data[0].goodsPictureUrl =
// baseurl + response.data[0].goodsPictureUrl;
// this.form = response.data[0];
// response.data[0].goodAttributeDetailsLists.forEach((e) => {
// e.attributePitureUrl = baseurl + e.attributePitureUrl;
// });
// this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
// this.open2 = true;
// });
// },
/** 提交按钮 */
submitForm() {
console.log(this.form);
@ -1156,10 +961,14 @@ export default {
this.goodsCategorylist = res.rows;
});
getListByUser(this.getListByUserquery).then((res) => {
this.nurseStationlist2 = res.rows;
if (res.rows[0].isAdmin == "1") {
this.nurseStationlist = res.rows;
this.total2 = res.total;
} else {
this.queryParams.id = res.rows[0].id;
this.total2 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
});
},

View File

@ -8,6 +8,21 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="所属护理站" prop="nurseStationName">
<el-select
v-model="queryParams.nurseStationId"
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="客户" prop="patientName">
<el-input
v-model="queryParams.patientName"
@ -85,7 +100,7 @@
>待派单</el-button
>
<el-button type="primary" v-if="scope.row.orderStatus == 'NOT_FINISH'"
>完成</el-button
>完成</el-button
>
<el-button type="success" v-if="scope.row.orderStatus == 'COMPLETE'"
>服务完成</el-button
@ -372,7 +387,7 @@
:disabled="true"
/>
</el-form-item>
<el-form-item label="退款原因" prop="cancelAppointmentReason">
<el-form-item label="退款原因" prop="cancelAppointmentReason">
<el-input
style="width: 260px"
v-model="query.cancelAppointmentReason"
@ -382,7 +397,7 @@
:rows="5"
disabled
/>
</el-form-item>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cencelbtn"> </el-button>
@ -407,7 +422,6 @@
v-model="querynursePersonname.nursePersonName"
placeholder="请输入姓名"
clearable
/>
</el-form-item>
@ -501,6 +515,7 @@ import {
xylWeChatRefundNotify,
appointmentOrderDetails,
} from "@/api/system/order";
import { getListByUser } from "@/api/system/userlist.js";
import { weChatRefundOrderApply } from "@/api/system/goodsOrder";
export default {
name: "order",
@ -519,22 +534,32 @@ export default {
value: "CANCEL",
label: "已取消",
},
{
value: "WAIT_RECEIVED_GOODS",
label: "待收货",
},
// {
// value: "WAIT_RECEIVED_GOODS",
// label: "",
// },
// {
// value: "RECEIVED_GOODS",
// label: "",
// },
{
value: "RECEIVED_GOODS",
label: "已收货",
value: "WAIT_DISPATCH",
label: "待派单",
},
{
value: "WAIT_REFUND",
label: "退款中",
},
{
value: "REFUNDED",
label: "已退款",
label: "退款成功",
},
{
value: "COMPLETE",
label: "服务完成",
},
{
value: "WAIT_RETURNED_GOODS",
@ -544,6 +569,10 @@ export default {
value: "RETURNED_GOODS",
label: "已退货",
},
{
value: "NOT_FINISH",
label: "未完成",
},
],
value: "",
//
@ -576,6 +605,7 @@ export default {
appointmentOrderId: "",
nurseStationPersonId: "",
total2: 0,
nurseStationlist: [],
//
title: "",
//
@ -585,6 +615,7 @@ export default {
queryParams: {
patientName: null,
orderNo: null,
nurseStationId: null,
// orderStatus: null,
orderStatus: "",
pageNum: 1,
@ -608,6 +639,7 @@ export default {
},
created() {
this.getList();
this.info()
},
methods: {
//
@ -747,8 +779,47 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
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.handleQuery();
},
//
info() {
getListByUser(this.queryParams).then((res) => {
if (res.rows[0].isAdmin == "1") {
this.nurseStationlist = res.rows;
this.total = res.total;
} else {
this.total = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
});
},
//
loadMore() {
var a = Math.ceil(this.total / 10);
if (this.nurseStationlist.length + 1 >= this.total) {
} else {
if (this.queryParams.pageNum >= a) {
} else {
this.queryParams.pageNum++;
getListByUser(this.queryParams).then((res) => {
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
resetQuery2() {
this.resetForm("queryForm");
@ -791,7 +862,7 @@ export default {
</script>
<style scoped>
::v-deep .orderInfo{
::v-deep .orderInfo {
height: 350px;
overflow-y: scroll;
}