Merge remote-tracking branch 'origin/dev'

This commit is contained in:
纪寒 2022-11-18 14:36:58 +08:00
commit 1afb87bc3a
12 changed files with 1419 additions and 1791 deletions

View File

@ -426,7 +426,11 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick" v-loading="loading2"> <el-table
:data="nurseStationlist"
@cell-dblclick="nurseclick"
v-loading="loading2"
>
<el-table-column label="请选择" width="100" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -507,7 +511,7 @@ export default {
datas: null, datas: null,
// //
loading: true, loading: true,
loading2:true, loading2: true,
// //
ids: [], ids: [],
// //
@ -918,7 +922,7 @@ export default {
this.getList(); this.getList();
}); });
}) })
.catch(() => { }); .catch(() => {});
}, },
imgUrl(imgUrl) { imgUrl(imgUrl) {
console.log(imgUrl); console.log(imgUrl);
@ -950,22 +954,11 @@ export default {
console.log(this.form); console.log(this.form);
this.goodsCategorylist = res.rows; this.goodsCategorylist = res.rows;
}); });
this.loading2 = true this.loading2 = true;
stationList(this.getListByUserquery).then((res) => { stationList(this.getListByUserquery).then((res) => {
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.total2 = res.total; this.total2 = res.total;
console.log(res); this.loading2 = false;
// 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();
// }
this.loading2 = false
}); });
}, },
infos() { infos() {
@ -974,7 +967,7 @@ export default {
pageSize: 9999, pageSize: 9999,
}; };
stationList(queryFor).then((res) => { stationList(queryFor).then((res) => {
console.log(res) console.log(res);
this.handstationlist = res.rows; this.handstationlist = res.rows;
}); });
}, },

View File

@ -11,7 +11,6 @@
<el-form-item <el-form-item
label="护理站" label="护理站"
prop="nurseStationId" prop="nurseStationId"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
> >
<el-select <el-select
v-model="queryParams.nurseStationId" v-model="queryParams.nurseStationId"
@ -27,21 +26,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="护理站" prop="nurseStationId" v-else>
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in handstationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="科室编码" prop="departmentCode"> <el-form-item label="科室编码" prop="departmentCode">
<el-input <el-input
v-model="queryParams.departmentCode" v-model="queryParams.departmentCode"
@ -478,15 +463,6 @@ export default {
departmentPerson: null, departmentPerson: null,
phone: null, phone: null,
nurseStationName: null, nurseStationName: null,
nurseStationDepartmentList: [
{
nurseStationId: "",
departmentCode: "",
departmentName: "",
departmentPerson: "",
phone: "",
},
],
}, },
nurseStationqueryParams: { nurseStationqueryParams: {
pageNum: 1, pageNum: 1,
@ -563,15 +539,12 @@ export default {
}; };
}, },
created() { created() {
this.getList();
// this.listinfo();
this.info(); this.info();
this.infos(); this.infos();
}, },
methods: { methods: {
// add // add
nurseclick(row) { nurseclick(row) {
console.log(row);
this.stationid = row.id; this.stationid = row.id;
this.innerVisible = false; this.innerVisible = false;
this.form.nurseStationDepartmentList[this.index].nurseStationName = this.form.nurseStationDepartmentList[this.index].nurseStationName =
@ -587,7 +560,6 @@ export default {
//deldisease //deldisease
deldisease(index) { deldisease(index) {
this.form.nurseStationDepartmentList.splice(index, 1); this.form.nurseStationDepartmentList.splice(index, 1);
console.log(this.form.nurseStationDepartmentList);
}, },
adddisease() { adddisease() {
var obj = { var obj = {
@ -632,7 +604,8 @@ export default {
reset() { reset() {
this.form = { this.form = {
id: null, id: null,
nurseStationId: null, pageNum: 1,
pageSize: 10,
departmentCode: null, departmentCode: null,
departmentName: null, departmentName: null,
departmentPerson: null, departmentPerson: null,
@ -641,8 +614,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
nurseStationName: null,
nurseStationId: null,
nurseStationDepartmentList: [ nurseStationDepartmentList: [
{ {
nurseStationId: "", nurseStationId: "",
@ -667,28 +639,26 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") {
this.resetForm("queryForm"); // this.queryParams = {
this.queryParams = { // pageNum: 1,
pageNum: 1, // pageSize: 10,
pageSize: 10,
nurseStationId: null, // departmentCode: null,
departmentCode: null, // departmentName: null,
departmentName: null, // departmentPerson: null,
departmentPerson: null, // phone: null,
phone: null, // nurseStationName: null,
nurseStationName: null, // };
}; if (this.nurseStationlist[0]) {
this.handleQuery();
} else {
console.log(1);
this.queryParams.departmentCode = null;
this.queryParams.pageSize = 10;
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.queryParams.departmentCode = null;
this.queryParams.departmentName = null; this.queryParams.departmentName = null;
this.handleQuery();
} }
this.handleQuery();
}, },
addhd() { addhd() {
this.loading = true; this.loading = true;
getListByUser(this.nurseStationqueryParams).then((res) => { getListByUser(this.nurseStationqueryParams).then((res) => {
@ -707,15 +677,10 @@ export default {
// //
info() { info() {
getListByUser(this.nurseStationqueryParams).then((res) => { getListByUser(this.nurseStationqueryParams).then((res) => {
if (res.rows[0].isAdmin == "1") {
this.nurseStationlist = res.rows;
this.total2 = res.total;
} else {
this.total2 = res.total; this.total2 = res.total;
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id; this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery(); this.getList();
}
}); });
}, },
// //
@ -743,7 +708,6 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form);
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
@ -782,7 +746,6 @@ export default {
pageSize: 9999, pageSize: 9999,
}; };
getListByUser(queryFor).then((res) => { getListByUser(queryFor).then((res) => {
console.log(res);
this.handstationlist = res.rows; this.handstationlist = res.rows;
}); });
}, },

View File

@ -0,0 +1,507 @@
import {
getGoodsInfo,
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
updatePicture,
goodsInfoList,
goodsCategory,
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 {
components: { stationAcatar, editor },
name: "OperateGoodsInfo",
data() {
return {
imgone: "",
imageUrl: "", //商品图片
value: "",
datas: null,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
total2: 0,
// 商品基本信息表格数据
goodsInfoList: [],
// 护理站列表
nurseStationlist: [],
handstationlist: [], //页面搜索list
// 查询商品分类列表
goodsCategorylist: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// open2: false,
innerVisible: false,
// StationName: "请选择所属护理站",
nursetotal: 0,
nurseStationId: null,
goods: [{
value: "BUSINESS",
label: "买卖",
},
{
value: "LEASE",
label: "租赁",
},
],
options: [{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
// goodAttributeDetailsLists:[],
goodDetailsLists: [],
ids: 9999999,
// 查询参数
shangjia: {
id: null,
whetherShelf: null,
},
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
queryParams: {
id: null,
pageNum: 1,
pageSize: 10,
storeInfoId: null,
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
goodsRemark: null,
goodsUnit: null,
goodsPurpose: null,
sort: null,
// mame:null,
},
//权限查询
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
// 表单参数
form: {
nurseStationName: "",
nurseStationId: "",
},
// 表单校验
rules: {
goodsName: [
{ required: true, message: "请输入商品名称", trigger: "blur" },
],
goodsCategoryId: [
{ required: true, message: "请选择商品分类名称", trigger: "blur" },
],
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
goodsPurpose: [
{ required: true, message: "请选择商品用途", trigger: "blur" },
],
goodsUnit: [
{ required: true, message: "请输入商品度量单位", trigger: "blur" },
],
goodsPictureUrl: [
{ required: true, message: "请输入选择图片", trigger: "blur" },
],
},
};
},
created() {
this.info();
this.infos();
},
methods: {
upwhetherShelf(row) {
console.log(row);
if (row.whetherShelf == false) {
var obj = {
id: row.goodsInfoId,
whetherShelf: 0,
};
} else if (row.whetherShelf == true) {
var obj = {
id: row.goodsInfoId,
whetherShelf: 1,
};
}
editGoodsWhetherShelf(obj).then((res) => {
console.log(obj);
if (obj.whetherShelf == 0) {
this.$modal.msgSuccess("已修改上架状态为未上架");
} else {
this.$modal.msgSuccess("已修改上架状态为上架");
}
this.getList();
});
},
/** 查询商品基本信息列表 */
getList() {
this.loading = true;
goodsInfoList(this.queryParams).then((response) => {
response.rows.forEach((e) => {
if (e.whetherShelf == 1) {
e.whetherShelf = true;
} else if (e.whetherShelf == 0) {
e.whetherShelf = false;
}
});
this.goodsInfoList = response.rows;
console.log(this.goodsInfoList);
this.total = response.total;
this.loading = false;
});
},
// 添加
addgoodAttributeDetail() {
console.log(this.goodDetailsLists);
if (this.goodDetailsLists.length == 5) {
this.$message.error("最多只能5条");
} else {
this.ids++;
var obj = {
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: this.ids,
};
this.goodDetailsLists.push(obj);
}
},
// 删除
delgoodAttributeDetail(item) {
console.log(item);
if (item.ids && !item.attributeDetailsId) {
if (this.goodDetailsLists.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.goodDetailsLists = this.goodDetailsLists.filter(
(e) => e.ids != item.ids
);
}
} else if (!item.ids && item.attributeDetailsId) {
if (this.goodDetailsLists.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.goodDetailsLists = this.goodDetailsLists.filter(
(e) => e.attributeDetailsId != item.attributeDetailsId
);
}
}
console.log(this.goodDetailsLists);
},
// 取消按钮
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
if (this.imgone != this.form.goodsPictureUrl) {
obj.pictureUrlList.push(this.form.goodsPictureUrl);
}
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {
console.log(res);
});
}
this.open = false;
this.reset();
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [{
attributeName: "",
goodAttributeDetailsLists: [{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
}, ],
}, ];
},
// 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();
},
getList2() {
getListByUser(this.getListByUserquery).then((res) => {
this.total2 = 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 = {
id: null,
storeInfoId: null,
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
goodsRemark: null,
goodsUnit: null,
goodsPurpose: null,
sort: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.goodDetailsLists = [{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
}, ];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
if (this.nurseStationlist[0]) {
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.queryParams.goodsName = null;
this.queryParams.goodsCategoryName = null;
this.queryParams.goodsPurpose = null;
this.queryParams.whetherShelf = null;
// this.resetForm("queryForm");
}
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.goodsInfoId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.form.nurseStationName = this.nurseStationlist[0].nurseStationName;
this.form.nurseStationId = this.nurseStationlist[0].id;
this.title = "商品基本信息";
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
}, ];
this.open = true;
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row);
// this.reset();
const id = row.goodsInfoId || this.ids;
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;
}
this.open = true;
this.title = "修改商品基本信息";
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
console.log(this.goodDetailsLists);
this.form.goodAttributeDetailsLists = [];
this.form.goodDetailsLists = this.goodDetailsLists;
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.goodsInfoId != null) {
this.form.id = this.form.goodsInfoId;
updateGoodsInfo(this.form).then((response) => {
var obj = { pictureUrlList: [] };
if (this.imgone != this.form.goodsPictureUrl) {
obj.pictureUrlList.push(this.imgone);
}
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {
console.log(res);
});
}
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
// this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => {
console.log(this.form);
this.$modal.msgSuccess("新增成功");
// this.StationName = "请选择所属护理站";
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
console.log("row :>> ", row);
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(row.goodsPictureUrl);
updatePicture(obj).then((res) => {
console.log(res);
});
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;
},
attributePitureUrl(imgUrl) {
console.log(imgUrl);
// this.form.attributePitureUrl = imgUrl;
},
attributePitureitem(item) {
let items = JSON.parse(item);
if (items.ids && !items.id) {
this.goodDetailsLists.forEach((e) => {
if (e.ids == items.ids) {
e.attributePitureUrl = items.attributePitureUrl;
}
});
} else if (!items.ids && items.attributeDetailsId) {
this.goodDetailsLists.forEach((e) => {
if (e.attributeDetailsId == items.attributeDetailsId) {
e.attributePitureUrl = items.attributePitureUrl;
}
});
}
},
//权限列表
info() {
goodsCategory().then((res) => {
console.log(res);
console.log(this.form);
this.goodsCategorylist = res.rows;
});
getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
this.total2 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
// this.handleQuery();
this.getList()
});
},
infos() {
var queryFor = {
pageNum: 1,
pageSize: 9999,
};
getListByUser(queryFor).then((res) => {
console.log(res)
this.handstationlist = res.rows;
});
},
},
};

View File

@ -12,7 +12,6 @@
<el-select <el-select
v-model="queryParams.nurseStationId" v-model="queryParams.nurseStationId"
placeholder="请选择护理站" placeholder="请选择护理站"
> >
<el-option <el-option
v-for="item in handstationlist" v-for="item in handstationlist"
@ -212,14 +211,6 @@
label-width="120px" label-width="120px"
:inline="true" :inline="true"
> >
<el-form-item label="商品名称" prop="goodsName">
<el-input
v-model="form.goodsName"
placeholder="请输入商品名称"
maxlength="40"
style="width: 210px"
/>
</el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName"> <el-form-item label="护理站名称" prop="nurseStationName">
<el-input <el-input
v-model="form.nurseStationName" v-model="form.nurseStationName"
@ -230,6 +221,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="商品名称" prop="goodsName">
<el-input
v-model="form.goodsName"
placeholder="请输入商品名称"
maxlength="40"
style="width: 210px"
/>
</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"
@ -295,6 +294,7 @@
<el-input <el-input
v-model="scope.row.goodsPrice" v-model="scope.row.goodsPrice"
type="number" type="number"
min="0"
oninput=" if(value.length>7){value=value.slice(0,7)}" oninput=" if(value.length>7){value=value.slice(0,7)}"
></el-input> ></el-input>
</template> </template>
@ -304,6 +304,7 @@
<el-input <el-input
v-model="scope.row.goodsStock" v-model="scope.row.goodsStock"
type="number" type="number"
min="0"
oninput="if(value.length>9){value=value.slice(0,9)}" oninput="if(value.length>9){value=value.slice(0,9)}"
></el-input> ></el-input>
</template> </template>
@ -464,534 +465,8 @@
</template> </template>
<script> <script>
import { import goodsInfojs from "./goodsInfojs";
getGoodsInfo, export default goodsInfojs;
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
updatePicture,
goodsInfoList,
goodsCategory,
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 {
components: { stationAcatar, editor },
name: "OperateGoodsInfo",
data() {
return {
imgone: "",
imageUrl: "", //
value: "",
datas: null,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
total2: 0,
//
goodsInfoList: [],
//
nurseStationlist: [],
handstationlist: [], //list
//
goodsCategorylist: [],
//
title: "",
//
open: false,
// open2: false,
innerVisible: false,
// StationName: "",
nursetotal: 0,
nurseStationId: null,
goods: [
{
value: "BUSINESS",
label: "买卖",
},
{
value: "LEASE",
label: "租赁",
},
],
options: [
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
// goodAttributeDetailsLists:[],
goodDetailsLists: [],
ids: 9999999,
//
shangjia: {
id: null,
whetherShelf: null,
},
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
queryParams: {
id: null,
pageNum: 1,
pageSize: 10,
storeInfoId: null,
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
goodsRemark: null,
goodsUnit: null,
goodsPurpose: null,
sort: null,
// mame:null,
},
//
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
//
form: {
nurseStationName: "",
nurseStationId: "",
},
//
rules: {
goodsName: [
{ required: true, message: "请输入商品名称", trigger: "blur" },
],
goodsCategoryId: [
{ required: true, message: "请选择商品分类名称", trigger: "blur" },
],
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
goodsPurpose: [
{ required: true, message: "请选择商品用途", trigger: "blur" },
],
goodsUnit: [
{ required: true, message: "请输入商品度量单位", trigger: "blur" },
],
goodsPictureUrl: [
{ required: true, message: "请输入选择图片", trigger: "blur" },
],
},
};
},
created() {
this.getList();
this.info();
this.infos();
// this.getList2();
},
methods: {
upwhetherShelf(row) {
console.log(row);
if (row.whetherShelf == false) {
var obj = {
id: row.goodsInfoId,
whetherShelf: 0,
};
} else if (row.whetherShelf == true) {
var obj = {
id: row.goodsInfoId,
whetherShelf: 1,
};
}
editGoodsWhetherShelf(obj).then((res) => {
console.log(obj);
if (obj.whetherShelf == 0) {
this.$modal.msgSuccess("已修改上架状态为未上架");
} else {
this.$modal.msgSuccess("已修改上架状态为上架");
}
this.getList();
});
},
/** 查询商品基本信息列表 */
getList() {
this.loading = true;
goodsInfoList(this.queryParams).then((response) => {
response.rows.forEach((e) => {
if (e.whetherShelf == 1) {
e.whetherShelf = true;
} else if (e.whetherShelf == 0) {
e.whetherShelf = false;
}
});
this.goodsInfoList = response.rows;
console.log(this.goodsInfoList);
this.total = response.total;
this.loading = false;
});
},
//
addgoodAttributeDetail() {
console.log(this.goodDetailsLists);
if (this.goodDetailsLists.length == 5) {
this.$message.error("最多只能5条");
} else {
this.ids++;
var obj = {
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: this.ids,
};
this.goodDetailsLists.push(obj);
}
},
//
delgoodAttributeDetail(item) {
console.log(item);
if (item.ids && !item.attributeDetailsId) {
if (this.goodDetailsLists.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.goodDetailsLists = this.goodDetailsLists.filter(
(e) => e.ids != item.ids
);
}
} else if (!item.ids && item.attributeDetailsId) {
if (this.goodDetailsLists.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.goodDetailsLists = this.goodDetailsLists.filter(
(e) => e.attributeDetailsId != item.attributeDetailsId
);
}
}
console.log(this.goodDetailsLists);
},
//
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
if (this.imgone != this.form.goodsPictureUrl) {
obj.pictureUrlList.push(this.form.goodsPictureUrl);
}
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {
console.log(res);
});
}
this.open = false;
this.reset();
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [
{
attributeName: "",
goodAttributeDetailsLists: [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
},
],
},
];
},
// 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();
},
getList2() {
getListByUser(this.getListByUserquery).then((res) => {
this.total2 = 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 = {
id: null,
storeInfoId: null,
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
goodsRemark: null,
goodsUnit: null,
goodsPurpose: null,
sort: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.goodDetailsLists = [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
},
];
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
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.queryParams.whetherShelf = null;
}
this.handleQuery();
},
//
handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.goodsInfoId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.form.nurseStationName = this.nurseStationlist[0].nurseStationName;
this.form.nurseStationId = this.nurseStationlist[0].id;
this.title = "商品基本信息";
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
},
];
this.open = true;
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row);
// this.reset();
const id = row.goodsInfoId || this.ids;
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;
}
this.open = true;
this.title = "修改商品基本信息";
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
console.log(this.goodDetailsLists);
this.form.goodAttributeDetailsLists = [];
this.form.goodDetailsLists = this.goodDetailsLists;
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.goodsInfoId != null) {
this.form.id = this.form.goodsInfoId;
updateGoodsInfo(this.form).then((response) => {
var obj = { pictureUrlList: [] };
if (this.imgone != this.form.goodsPictureUrl) {
obj.pictureUrlList.push(this.imgone);
}
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {
console.log(res);
});
}
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
// this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => {
console.log(this.form);
this.$modal.msgSuccess("新增成功");
// this.StationName = "";
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
console.log("row :>> ", row);
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(row.goodsPictureUrl);
updatePicture(obj).then((res) => {
console.log(res);
});
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;
},
attributePitureUrl(imgUrl) {
console.log(imgUrl);
// this.form.attributePitureUrl = imgUrl;
},
attributePitureitem(item) {
let items = JSON.parse(item);
if (items.ids && !items.id) {
this.goodDetailsLists.forEach((e) => {
if (e.ids == items.ids) {
e.attributePitureUrl = items.attributePitureUrl;
}
});
} else if (!items.ids && items.attributeDetailsId) {
this.goodDetailsLists.forEach((e) => {
if (e.attributeDetailsId == items.attributeDetailsId) {
e.attributePitureUrl = items.attributePitureUrl;
}
});
}
},
//
info() {
goodsCategory().then((res) => {
console.log(res);
console.log(this.form);
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;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
});
},
infos() {
var queryFor = {
pageNum: 1,
pageSize:9999,
};
getListByUser(queryFor).then((res) => {
console.log(res)
this.handstationlist = res.rows;
});
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

View File

@ -31,7 +31,6 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="订单状态" prop="orderStatus"> <el-form-item label="订单状态" prop="orderStatus">
<el-select <el-select
v-model="queryParams.orderStatus" v-model="queryParams.orderStatus"
@ -57,9 +56,6 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button >重置</el-button
> >
<el-button type="success" icon="el-icon-refresh-right" size="mini" @click="resetQuery"
>刷新</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -80,12 +76,7 @@
prop="orderNo" prop="orderNo"
width="190" width="190"
/> />
<el-table-column <el-table-column label="商品名称" align="center" prop="goodsName" />
label="商品名称"
align="center"
prop="goodsName"
/>
<el-table-column label="订单总金额" align="center" prop="totalPrice" /> <el-table-column label="订单总金额" align="center" prop="totalPrice" />
<el-table-column label="订单状态" align="center" prop="orderStatus"> <el-table-column label="订单状态" align="center" prop="orderStatus">
@ -147,7 +138,10 @@
<el-table-column label="录入物流单号" align="center" prop="remark"> <el-table-column label="录入物流单号" align="center" prop="remark">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo" v-if="
scope.row.orderStatus == 'WAIT_RECEIVED_GOODS' &&
scope.row.expressNo
"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@ -156,7 +150,10 @@
>修改物流单号</el-button >修改物流单号</el-button
> >
<el-button <el-button
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo==''" v-if="
scope.row.orderStatus == 'WAIT_RECEIVED_GOODS' &&
scope.row.expressNo == ''
"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@ -165,7 +162,10 @@
>录入物流单号</el-button >录入物流单号</el-button
> >
<el-button <el-button
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo==null" v-if="
scope.row.orderStatus == 'WAIT_RECEIVED_GOODS' &&
scope.row.expressNo == null
"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@ -173,15 +173,6 @@
v-hasPermi="['system:goodsOrder:editExpressNo']" v-hasPermi="['system:goodsOrder:editExpressNo']"
>录入物流单号</el-button >录入物流单号</el-button
> >
<!-- <el-button
v-if="scope.row.orderStatus != 'WAIT_RECEIVED_GOODS'"
size="mini"
type="text"
icon="el-icon-edit"
disabled
v-hasPermi="['system:goodsOrder:editExpressNo']"
>不可录入物流单号</el-button
> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -294,7 +285,6 @@
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="商品属性" prop="goodsAttributeName"> <!-- <el-form-item label="商品属性" prop="goodsAttributeName">
<el-input <el-input
v-model="orderList.goodsAttributeName" v-model="orderList.goodsAttributeName"
@ -524,7 +514,6 @@
:rows="5" :rows="5"
disabled disabled
/> />
</el-form-item> </el-form-item>
<el-form-item> </el-form-item> <el-form-item> </el-form-item>
</el-form> </el-form>
@ -884,7 +873,7 @@ export default {
this.queryParams = { this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
nurseStationId: null, // nurseStationId: null,
patientId: null, patientId: null,
orderNo: null, orderNo: null,
orderStatus: null, orderStatus: null,
@ -896,8 +885,10 @@ export default {
orderChannel: null, orderChannel: null,
}; };
this.form = { this.form = {
pageNum: 1,
pageSize: 10,
id: null, id: null,
nurseStationId: null, // nurseStationId: null,
patientId: null, patientId: null,
orderNo: null, orderNo: null,
totalPrice: null, totalPrice: null,
@ -923,19 +914,23 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == '1') { console.log(this.nurseStationlist)
this.resetForm("queryForm"); console.log(this.nurseStationlist)
this.queryParams = { if (this.nurseStationlist[0]){
pageNum: 1,
pageSize: 10
}
} else {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10 this.queryParams.pageSize = 10;
this.queryParams.orderNo = null this.queryParams.orderNo = null;
this.queryParams.orderStatus = null this.queryParams.orderStatus = null;
} }
// this.queryParams = {
// pageNum: 1,
// pageSize: 10,
// orderNo: null,
// orderStatus: null,
// }
this.handleQuery(); this.handleQuery();
}, },
@ -993,40 +988,32 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}); .catch(() => { });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
"system/goodsOrder/export", "system/goodsOrder/export",
{ {
...this.queryParams, ...this.getListByUserquery,
}, },
`goodsOrder_${new Date().getTime()}.xlsx` `goodsOrder_${new Date().getTime()}.xlsx`
); );
}, },
// //
info() { info() {
// goodsCategory().then((res) => {
// console.log(this.form);
// this.goodsCategorylist = res.rows;
// });
getListByUser(this.getListByUserquery).then((res) => { 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.total2 = res.total;
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id; this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery(); this.getList()
} // this.handleQuery();
}); });
}, },
infos() { infos() {
var queryFor = { var queryFor = {
pageNum: 1, pageNum: 1,
pageSize:9999, pageSize: 9999,
}; };
getListByUser(queryFor).then((res) => { getListByUser(queryFor).then((res) => {
console.log(res) console.log(res)

View File

@ -8,7 +8,6 @@
v-show="showSearch" v-show="showSearch"
label-width="100px" label-width="100px"
> >
<el-form-item label="护理类型编码" prop="nurseTypeCode"> <el-form-item label="护理类型编码" prop="nurseTypeCode">
<el-input <el-input
v-model="queryParams.nurseTypeCode" v-model="queryParams.nurseTypeCode"
@ -38,7 +37,6 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -91,7 +89,6 @@
@queryTable="getList" @queryTable="getList"
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="nurseTypeList" :data="nurseTypeList"
@ -111,16 +108,8 @@
prop="nurseTypeName" prop="nurseTypeName"
/> />
<el-table-column <el-table-column label="创建时间" align="center" prop="createTime" />
label="创建时间" <el-table-column label="创建人" align="center" prop="createBy" />
align="center"
prop="createTime"
/>
<el-table-column
label="创建人"
align="center"
prop="createBy"
/>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -154,18 +143,24 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加护理类型信息对话框 -->
<!-- 添加或修改护理类型信息对话框 --> <el-dialog
<el-dialog :title="title" :visible.sync="open2" width="450px" append-to-body> :title="title"
:visible.sync="open2"
width="450px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" label-width="110px">
<div <div
v-for="(item, index) in form.nurseTypeList" v-for="(item, index) in form.nurseTypeList"
:key="index" :key="index"
style="margin-top:10px" style="margin-top: 10px"
> >
<el-form-item label="护理类型名称" <el-form-item
label="护理类型名称"
:rules="rules.nurseTypeList.nurseTypeName" :rules="rules.nurseTypeList.nurseTypeName"
:prop="`nurseTypeList.${index}.nurseTypeName`"> :prop="`nurseTypeList.${index}.nurseTypeName`"
>
<el-input <el-input
v-model="item.nurseTypeName" v-model="item.nurseTypeName"
placeholder="请输入护理类型名称" placeholder="请输入护理类型名称"
@ -179,7 +174,7 @@
icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline"
@click="adddisease" @click="adddisease"
v-if="index == 0" v-if="index == 0"
style="margin-top: 2px;margin-left: 10px;" style="margin-top: 2px; margin-left: 10px"
></el-button> ></el-button>
<el-button <el-button
@ -188,7 +183,7 @@
circle circle
plain plain
@click="deldisease(index)" @click="deldisease(index)"
style="margin-top: 2px;margin-left: 10px;" style="margin-top: 2px; margin-left: 10px"
v-if="index != 0" v-if="index != 0"
></el-button> ></el-button>
</el-form-item> </el-form-item>
@ -199,7 +194,7 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 修改疾病信息字典对话框 --> <!-- 修改护理类型信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="护理类型名称" prop="nurseTypeName"> <el-form-item label="护理类型名称" prop="nurseTypeName">
@ -209,16 +204,13 @@
maxlength="50" maxlength="50"
style="width: 250px" style="width: 250px"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -245,7 +237,6 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
@ -262,7 +253,6 @@ export default {
userId: null, userId: null,
nurseTypeCode: null, nurseTypeCode: null,
nurseTypeName: null, nurseTypeName: null,
}, },
// //
form: {}, form: {},
@ -306,7 +296,6 @@ export default {
this.form.nurseTypeList.push(obj); this.form.nurseTypeList.push(obj);
} }
}, },
/** 查询护理类型信息列表 */ /** 查询护理类型信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -325,13 +314,11 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
nurseTypeList: [
nurseTypeList:[
{ {
nurseTypeName:"", nurseTypeName: "",
} },
] ],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -391,7 +378,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal this.$modal
.confirm('是否确认删除护理类型信息的数据项?') .confirm("是否确认删除护理类型信息的数据项?")
.then(function () { .then(function () {
return delNurseType(ids); return delNurseType(ids);
}) })

View File

@ -65,13 +65,6 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button >重置</el-button
> >
<el-button
type="success"
icon="el-icon-refresh-right"
size="mini"
@click="resetQuery"
>刷新</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -123,7 +116,6 @@
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'" <el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
>已取消</el-button >已取消</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下单时间" align="center" prop="createTime" /> <el-table-column label="下单时间" align="center" prop="createTime" />
@ -150,15 +142,6 @@
v-if="scope.row.orderStatus == 'WAIT_DISPATCH'" v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
>派单</el-button >派单</el-button
> >
<el-button
size="mini"
type="text"
disabled
icon="el-icon-s-promotion"
@click="dispatch(scope.row)"
v-else
>派单</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -168,15 +151,6 @@
v-hasPermi="['system:appointmentOrder:confirmCancel']" v-hasPermi="['system:appointmentOrder:confirmCancel']"
>取消预约</el-button >取消预约</el-button
> >
<el-button
size="mini"
type="text"
icon="el-icon-error"
v-else
disabled
v-hasPermi="['system:appointmentOrder:confirmCancel']"
>取消预约</el-button
>
<!-- <el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
@ -200,87 +174,74 @@
title="查看预约订单信息" title="查看预约订单信息"
:visible.sync="innerVisible4" :visible.sync="innerVisible4"
append-to-body append-to-body
width="1100px" width="1280px"
> >
<el-form <el-form
:inline="true" :inline="true"
ref="form" ref="form"
:model="query" :model="query"
:rules="rules" :rules="rules"
label-width="120px" label-width="130px"
class="orderInfo"
> >
<el-form-item label="订单编号" prop="orderNo"> <el-form-item label="订单编号" prop="orderNo">
<el-input <el-input v-model="query.orderNo" disabled style="width: 250px" />
v-model="query.orderNo"
:disabled="true"
style="width: 190px"
/>
</el-form-item> </el-form-item>
<el-form-item label="订单状态" prop="orderStatus"> <el-form-item label="订单状态" prop="orderStatus">
<el-input <el-input
:value="switchOrderStatus(query.orderStatus)" :value="switchOrderStatus(query.orderStatus)"
style="width: 250px"
disabled disabled
style="width: 180px"
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单总金额" prop="totalPrice"> <el-form-item label="订单总金额" prop="totalPrice">
<el-input <el-input v-model="query.totalPrice" disabled style="width: 250px" />
v-model="query.totalPrice"
clearable
:disabled="true"
style="width: 240px"
/>
</el-form-item> </el-form-item>
<el-form-item label="订单数量" prop="orderCount"> <el-form-item label="订单数量" prop="orderCount">
<el-input <el-input v-model="query.orderCount" disabled style="width: 250px" />
v-model="query.orderCount"
clearable
:disabled="true"
style="width: 190px"
/>
</el-form-item> </el-form-item>
<el-form-item label="护理项目名称" prop="nurseItemName"> <el-form-item label="护理项目名称" prop="nurseItemName">
<el-input <el-input
v-model="query.nurseItemName" v-model="query.nurseItemName"
clearable disabled
:disabled="true" style="width: 250px"
style="width: 180px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="服务时间" prop="time"> <el-form-item label="服务时间" prop="time">
<el-input <el-input v-model="query.time" disabled style="width: 250px" />
v-model="query.time"
clearable
:disabled="true"
style="width: 240px"
/>
</el-form-item> </el-form-item>
<el-form-item label="护理项目时长" prop="itemServeDurationUnit"> <el-form-item label="护理项目时长" prop="itemServeDurationUnit">
<el-input <el-input
v-model="query.itemServeDurationUnit" v-model="query.itemServeDurationUnit"
clearable disabled
:disabled="true" style="width: 250px"
style="width: 190px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName"> <el-form-item label="护理站名称" prop="nurseStationName">
<el-input <el-input
v-model="query.nurseStationName" v-model="query.nurseStationName"
clearable disabled
:disabled="true" style="width: 250px"
style="width: 180px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="服务地址" prop="serviceAddress"> <el-form-item label="服务地址" prop="serviceAddress">
<el-input <el-input
v-model="query.serviceAddress" v-model="query.serviceAddress"
clearable disabled
:disabled="true" style="width: 250px"
style="width: 240px" />
</el-form-item>
<el-form-item label="服务到岗照片" prop="onDutyPictureUrl" v-if="query.orderStatus == 'COMPLETE'">
<img class="img" :src="baseurl + query.onDutyPictureUrl" alt="" />
</el-form-item>
<el-form-item label="服务结束照片" prop="serviceEndPictureUrl" v-if="query.orderStatus == 'COMPLETE'">
<img class="img" :src="baseurl + query.serviceEndPictureUrl" alt="" />
</el-form-item>
<el-form-item label="用户确认签名" prop="userSignaturePictureUrl" v-if="query.orderStatus == 'COMPLETE'">
<img
class="img"
:src="baseurl + query.userSignaturePictureUrl"
alt=""
/> />
</el-form-item> </el-form-item>
<el-table <el-table
@ -291,21 +252,18 @@
<el-table-column <el-table-column
prop="orderConsumableName" prop="orderConsumableName"
label="耗材包名称" label="耗材包名称"
width="200"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="orderConsumableCount" prop="orderConsumableCount"
label="耗材包数量" label="耗材包数量"
width="200"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="orderConsumablePrice" prop="orderConsumablePrice"
label="耗材包价格" label="耗材包价格"
width="200"
align="center" align="center"
> >
</el-table-column> </el-table-column>
@ -521,10 +479,12 @@ import {
appointmentOrderDetails, appointmentOrderDetails,
} from "@/api/system/order"; } from "@/api/system/order";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import baseurl from '@/api/baseurl.js'
export default { export default {
name: "order", name: "order",
data() { data() {
return { return {
baseurl:null,
orderStatuslist: [ orderStatuslist: [
{ {
value: "WAIT_PAY", value: "WAIT_PAY",
@ -625,6 +585,7 @@ export default {
}; };
}, },
created() { created() {
this.baseurl = baseurl
this.getList(); this.getList();
this.info(); this.info();
this.infos(); this.infos();
@ -774,42 +735,40 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") { if (this.nurseStationlist[0]) {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
};
} else {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10; this.queryParams.pageSize = 10;
this.queryParams.orderNo = null this.queryParams.patientName = null;
this.queryParams.orderStatus = null this.queryParams.orderNo = null;
this.queryParams.patientName=null this.queryParams.orderStatus = null;
} }
// this.queryParams = {
// pageNum: 1,
// pageSize: 10,
// // nurseStationId:null,
// patientName:null,
// orderNo:null,
// orderStatus:null,
// };
this.handleQuery(); this.handleQuery();
}, },
// //
info() { info() {
getListByUser(this.queryParams).then((res) => { 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.total = res.total;
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id; this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery(); this.getList();
} // this.handleQuery();
}); });
}, },
infos() { infos() {
var queryFor = { var queryFor = {
pageNum: 1, pageNum: 1,
pageSize:9999, pageSize: 9999,
}; };
getListByUser(queryFor).then((res) => { getListByUser(queryFor).then((res) => {
console.log(res) console.log(res);
this.handstationlist = res.rows; this.handstationlist = res.rows;
}); });
}, },
@ -854,9 +813,10 @@ export default {
</script> </script>
<style scoped> <style scoped>
::v-deep .orderInfo {
height: 350px; .img {
overflow-y: scroll; width: 250px;
height: 250px;
} }
</style> </style>

View File

@ -8,11 +8,7 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item <el-form-item label="护理站" prop="nurseStationId">
label="护理站"
prop="nurseStationId"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select <el-select
v-model="queryParams.nurseStationId" v-model="queryParams.nurseStationId"
placeholder="请选择护理站" placeholder="请选择护理站"
@ -27,21 +23,6 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="护理站" prop="nurseStationId" v-else>
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
>
<el-option
v-for="item in handstationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item <el-form-item
label="所属科室" label="所属科室"
prop="departmentName" prop="departmentName"
@ -119,7 +100,7 @@
icon="el-icon-upload2" icon="el-icon-upload2"
size="mini" size="mini"
@click="handleImport" @click="handleImport"
v-hasPermi="['system:person:export']" v-hasPermi="['system:person:importStationPerson']"
>导入</el-button >导入</el-button
> >
</el-col> </el-col>
@ -917,614 +898,6 @@
</template> </template>
<script> <script>
import { import personjs from "./personjs";
listPerson, export default personjs;
getPerson,
delPerson,
addPerson,
updatePerson,
stationList,
StationDepartmentList,
} from "@/api/system/person";
import { getToken } from "@/utils/auth";
import { getListByUser } from "@/api/system/userlist.js";
export default {
name: "Person",
data() {
//
var checkMobile = (rule, value, cb) => {
//
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
//
var checkMobile2 = (rule, value, cb) => {
//
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
return {
//
sexs: [
{
label: "男",
value: "MALE",
},
{
label: "女",
value: "FEMALE",
},
],
nursePersonTypes: [
{
label: "护士",
value: "NURSE",
},
{
label: "护理师",
value: "NURSE_TEACHER",
},
],
innerVisible: false,
innerVisible2: false,
innerVisiblexg: false,
innerVisiblexg2: false,
//
loading: true,
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
headers: { Authorization: "Bearer " + getToken() },
//
url:
process.env.VUE_APP_BASE_API +
"/system/person/insertNurseStationPersonImportList",
},
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
departtotal: 0,
nursetotal: 0,
//
nurseStationPersonList: [],
//
stationLists: [],
//
StationDepartmentLists: [],
nurseStationlist: [],
handstationlist: [], //list
stationid: "",
stationid2: "",
departid: "",
nurseStationName: "请选择所属护理站",
departmentName: "请选择所属科室",
//
title: "",
title2: "",
title3: "",
//
open: false,
//
open2: false,
//
//
queryParams: {
pageNum: 1,
pageSize: 10,
nurseStationId: null,
departmentCode: null,
userId: null,
departmentName: null,
nursePersonCode: null,
nursePersonName: null,
nursePersonType: null,
phone: null,
address: null,
},
queryParams2: {
pageNum: 1,
pageSize: 10,
nurseStationName: null,
departmentName: null,
id: null,
nurseStationId: null,
},
queryParams3: {
pageNum: 1,
pageSize: 10,
nurseStationName: null,
id: null,
departmentCode: null,
departmentName: null,
nurseStationId: null,
},
nurseStationqueryParams: {
pageNum: 1,
pageSize: 10,
},
StationqueryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
index: "",
//
rules: {
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
departmentName: [
{ required: true, message: "所属科室不能为空", trigger: "blur" },
],
nursePersonName: [
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
],
nursePersonType: [
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
],
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
phone: [
{
required: true,
validator: checkMobile2,
message: "",
trigger: "blur",
},
],
address: [
{ required: true, message: "居住地址不能为空", trigger: "blur" },
],
nurseStationPersonList: {
nursePersonName: [
{
required: true,
message: "请选择所属护理站",
trigger: "blur",
},
],
departmentCode: [
{ required: true, message: "所属科室不能为空", trigger: "blur" },
],
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
nursePersonName: [
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
],
nursePersonType: [
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
],
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
phone: [
{
required: true,
validator: checkMobile,
message: "",
trigger: "blur",
},
],
address: [
{ required: true, message: "居住地址不能为空", trigger: "blur" },
],
},
},
};
},
created() {
this.infos();
this.getList();
this.info();
},
methods: {
// //
departclick(item, index) {
if (this.form.nurseStationId != null) {
this.getList3();
console.log(item);
this.departid = item.departmentCode;
this.innerVisible2 = true;
this.index = index;
} else {
// this.innerVisible2 = false;
this.$message.error("请先选择所属护理站");
}
},
// //
departclick2() {
console.log(this.form.nurseStationId);
if (this.form.nurseStationId != null) {
this.getList3();
this.departid2 = this.form.departmentCode;
this.innerVisiblexg2 = true;
} else {
// this.innerVisible2 = false;
this.$message.error("请先选择所属护理站");
}
},
//
departclickxg() {
this.info();
this.stationid2 = this.form.nurseStationId;
this.innerVisiblexg = true;
// this.index = index;
},
//
clickinnerVisible(item, index) {
this.info();
this.stationid = item.nurseStationId;
this.innerVisible = true;
this.index = index;
},
//
nurseclick2(row) {
console.log(row);
this.nurseStationName = row.nurseStationName;
this.stationid2 = row.id;
this.form.nurseStationId = row.id;
this.queryParams3.nurseStationId = row.id;
this.innerVisiblexg = false;
this.form.nursename = row.nurseStationName;
},
//
nurseclick(row) {
console.log(row);
this.nursename = row.nurseStationName;
this.stationid = row.id;
this.form.nurseStationId = row.id;
this.queryParams3.nurseStationId = row.id;
console.log(this.form.nurseStationId);
console.log(this.form);
this.innerVisible = false;
this.form.nursename = row.nurseStationName;
this.form.nurseStationPersonList[this.index].nurseStationName =
row.nurseStationName;
this.form.nurseStationPersonList[this.index].nurseStationId = row.id;
},
//
StationDepartmentclick(row) {
console.log(row);
this.departname = row.departmentName;
this.departid = row.departmentCode;
console.log(this.departid);
this.departmentCode = row.departmentCode;
// this.form.nurseStationId = row.id;
this.innerVisible2 = false;
this.form.departname = row.departmentName;
this.form.nurseStationPersonList[this.index].departmentName =
row.departmentName;
this.form.nurseStationPersonList[this.index].departmentCode =
row.departmentCode;
console.log(this.form);
},
//
StationDepartmentclick2(row) {
console.log(row);
this.departmentName = row.departmentName;
this.form.departmentCode = row.departmentCode;
this.departid2 = row.departmentCode;
this.form.departmentName = row.id;
this.innerVisiblexg2 = false;
},
/** 查询护理站人员信息列表 */
getList() {
//
this.loading = true;
listPerson(this.queryParams).then((response) => {
this.nurseStationPersonList = response.rows;
this.total = response.total;
this.loading = false;
});
},
getList3() {
this.loading = true;
StationDepartmentList(this.queryParams3).then((res) => {
this.StationDepartmentLists = res.rows;
this.departtotal = res.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.open2 = false;
this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室";
// this.upload.open=false;
this.reset();
},
//
reset() {
this.form = {
id: null,
nurseStationId: null,
departmentCode: null,
userId: null,
nursePersonCode: null,
nursePersonName: null,
nursePersonType: null,
phone: null,
address: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
nurseStationName: "请选择所属护理站",
departmentName: "请选择所属科室",
nurseStationPersonList: [
{
id: "",
nurseStationId: "",
departmentCode: "",
nursePersonCode: "",
nursePersonName: "",
nursePersonType: "",
nurseStationName: "请选择所属护理站",
phone: "",
address: "",
sex: "",
departmentName: "请选择所属科室",
},
],
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery2() {
this.nurseStationqueryParams.pageNum = 1;
this.info();
},
//
handleQuery4() {
this.nurseStationqueryParams.pageNum = 1;
this.info();
},
//
handleQuery3() {
this.queryParams3.pageNum = 1;
this.getList3();
},
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
addcancel() {
this.innerVisible = false;
this.innerVisiblexg = false;
this.resetQuery2();
},
departcancel() {
this.innerVisible2 = false;
this.innerVisiblexg2 = false;
// this.resetQuery3();
},
resetQuery2() {
this.resetForm("queryForm");
this.nurseStationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.handleQuery2();
},
resetQuery4() {
this.resetForm("queryForm");
this.nurseStationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.handleQuery4();
},
resetQuery3() {
this.queryParams3.pageNum = 1;
this.queryParams3.pageSize = 10;
this.queryParams3.departmentName = null;
this.queryParams3.departmentCode = null;
this.handleQuery3();
},
resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
nurseStationId: null,
departmentCode: null,
userId: null,
nursePersonCode: null,
nursePersonName: null,
nursePersonType: null,
phone: null,
address: null,
};
this.handleQuery();
} else {
console.log(1);
console.log(this.nurseStationlist);
this.queryParams.departmentName = null;
this.queryParams.pageSize = 10;
this.queryParams.pageNum = 1;
this.queryParams.nursePersonName = null;
this.handleQuery();
}
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.queryParams3.nurseStationId = null;
this.reset();
this.open2 = true;
this.title = "添加护理站人员信息";
this.title2 = "请选择所属护理站";
this.title3 = "请选择科室";
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids;
getPerson(id).then((response) => {
console.log(response);
this.departmentName = response.data.departmentName;
this.nurseStationName = response.data.nurseStationName;
this.form = response.data;
this.queryParams3.nurseStationId = response.data.nurseStationId;
this.open = true;
this.title = "修改护理站人员信息";
if (this.departmentName == null && this.departmentName == undefined) {
this.departmentName = "请选择所属科室";
} else {
this.departmentName = response.data.departmentName;
}
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updatePerson(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPerson(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open2 = false;
this.getList();
this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室";
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm("是否确认删除护理站人员信息的数据项?")
.then(function () {
return delPerson(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导入按钮操作 */
handleImport() {
this.upload.open = true;
this.upload.title = "护理站人员导入";
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/system/station/downloadTemplate?fileType=nurseStationPerson",
{},
`护理站人员基本信息导入模板.xlsx`
);
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.getList();
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 导出按钮操作 */
handleExport() {
this.download(
"system/person/export",
{
...this.queryParams,
},
`person_${new Date().getTime()}.xlsx`
);
},
//
info() {
this.loading = true;
getListByUser(this.nurseStationqueryParams).then((res) => {
console.log(res);
if (res.rows[0].isAdmin == "1") {
console.log(true);
this.nurseStationlist = res.rows;
this.nursetotal = res.total;
} else {
this.nursetotal = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.queryParams3.nurseStationId = res.rows[0].id;
}
});
this.loading = false;
},
infos() {
var queryFor = {
pageNum: 1,
pageSize: 999,
};
getListByUser(queryFor).then((res) => {
console.log(res);
this.handstationlist = res.rows;
});
},
},
};
</script> </script>

View File

@ -0,0 +1,570 @@
import {
listPerson,
getPerson,
delPerson,
addPerson,
updatePerson,
stationList,
StationDepartmentList,
} from "@/api/system/person";
import { getToken } from "@/utils/auth";
import { getListByUser } from "@/api/system/userlist.js";
export default {
name: "Person",
data() {
// 验证手机号的规则
var checkMobile = (rule, value, cb) => {
// 验证手机号的正则表达式
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
// 验证手机号的规则
var checkMobile2 = (rule, value, cb) => {
// 验证手机号的正则表达式
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
return {
//男女选择
sexs: [{
label: "男",
value: "MALE",
},
{
label: "女",
value: "FEMALE",
},
],
nursePersonTypes: [{
label: "护士",
value: "NURSE",
},
{
label: "护理师",
value: "NURSE_TEACHER",
},
],
innerVisible: false,
innerVisible2: false,
innerVisiblexg: false,
innerVisiblexg2: false,
// 遮罩层
loading: true,
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: "",
// 是否禁用上传
isUploading: false,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API +
"/system/person/insertNurseStationPersonImportList",
},
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
departtotal: 0,
nursetotal: 0,
// 护理站人员信息表格数据
nurseStationPersonList: [],
// 护理站名称
stationLists: [],
// 所属科室
StationDepartmentLists: [],
nurseStationlist: [],
handstationlist: [], //页面搜索list
stationid: "",
stationid2: "",
departid: "",
nurseStationName: "请选择所属护理站",
departmentName: "请选择所属科室",
// 弹出层标题
title: "",
title2: "",
title3: "",
// 修改弹出层
open: false,
// 添加弹出层
open2: false,
//权限查询
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
nurseStationId: null,
departmentCode: null,
userId: null,
departmentName: null,
nursePersonCode: null,
nursePersonName: null,
nursePersonType: null,
phone: null,
address: null,
},
queryParams2: {
pageNum: 1,
pageSize: 10,
nurseStationName: null,
departmentName: null,
id: null,
nurseStationId: null,
},
queryParams3: {
pageNum: 1,
pageSize: 10,
nurseStationName: null,
id: null,
departmentCode: null,
departmentName: null,
nurseStationId: null,
},
nurseStationqueryParams: {
pageNum: 1,
pageSize: 10,
},
StationqueryParams: {
pageNum: 1,
pageSize: 10,
},
// 表单参数
form: {},
index: "",
// 表单校验
rules: {
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
departmentName: [
{ required: true, message: "所属科室不能为空", trigger: "blur" },
],
nursePersonName: [
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
],
nursePersonType: [
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
],
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
phone: [{
required: true,
validator: checkMobile2,
message: "",
trigger: "blur",
}, ],
address: [
{ required: true, message: "居住地址不能为空", trigger: "blur" },
],
nurseStationPersonList: {
nursePersonName: [{
required: true,
message: "请选择所属护理站",
trigger: "blur",
}, ],
departmentCode: [
{ required: true, message: "所属科室不能为空", trigger: "blur" },
],
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
nursePersonName: [
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
],
nursePersonType: [
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
],
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
phone: [{
required: true,
validator: checkMobile,
message: "",
trigger: "blur",
}, ],
address: [
{ required: true, message: "居住地址不能为空", trigger: "blur" },
],
},
},
};
},
created() {
this.infos();
this.info();
},
methods: {
// // 新增所属科室按钮
departclick(item, index) {
if (this.form.nurseStationId != null) {
this.getList3();
console.log(item);
this.departid = item.departmentCode;
this.innerVisible2 = true;
this.index = index;
} else {
// this.innerVisible2 = false;
this.$message.error("请先选择所属护理站");
}
},
// // 修改所属科室按钮
departclick2() {
console.log(this.form.nurseStationId);
if (this.form.nurseStationId != null) {
this.getList3();
this.departid2 = this.form.departmentCode;
this.innerVisiblexg2 = true;
} else {
// this.innerVisible2 = false;
this.$message.error("请先选择所属护理站");
}
},
//修改护理站按钮
departclickxg() {
this.info();
this.stationid2 = this.form.nurseStationId;
this.innerVisiblexg = true;
// this.index = index;
},
// 新增护理站按钮
clickinnerVisible(item, index) {
this.info();
this.stationid = item.nurseStationId;
this.innerVisible = true;
this.index = index;
},
// 修改护理站
nurseclick2(row) {
console.log(row);
this.nurseStationName = row.nurseStationName;
this.stationid2 = row.id;
this.form.nurseStationId = row.id;
this.queryParams3.nurseStationId = row.id;
this.innerVisiblexg = false;
this.form.nursename = row.nurseStationName;
},
// 护理站名称
nurseclick(row) {
this.nursename = row.nurseStationName;
this.stationid = row.id;
this.form.nurseStationId = row.id;
this.queryParams3.nurseStationId = row.id;
this.innerVisible = false;
this.form.nursename = row.nurseStationName;
this.form.nurseStationPersonList[this.index].nurseStationName =
row.nurseStationName;
this.form.nurseStationPersonList[this.index].nurseStationId = row.id;
},
// 所属科室
StationDepartmentclick(row) {
console.log(row);
this.departname = row.departmentName;
this.departid = row.departmentCode;
console.log(this.departid);
this.departmentCode = row.departmentCode;
// this.form.nurseStationId = row.id;
this.innerVisible2 = false;
this.form.departname = row.departmentName;
this.form.nurseStationPersonList[this.index].departmentName =
row.departmentName;
this.form.nurseStationPersonList[this.index].departmentCode =
row.departmentCode;
console.log(this.form);
},
// 修改科室
StationDepartmentclick2(row) {
console.log(row);
this.departmentName = row.departmentName;
this.form.departmentCode = row.departmentCode;
this.departid2 = row.departmentCode;
this.form.departmentName = row.id;
this.innerVisiblexg2 = false;
},
/** 查询护理站人员信息列表 */
getList() {
// 护理站名称
this.loading = true;
listPerson(this.queryParams).then((response) => {
this.nurseStationPersonList = response.rows;
this.total = response.total;
this.loading = false;
});
},
getList3() {
this.loading = true;
StationDepartmentList(this.queryParams3).then((res) => {
this.StationDepartmentLists = res.rows;
this.departtotal = res.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.open2 = false;
this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室";
// this.upload.open=false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
pageNum: 1,
pageSize: 10,
departmentCode: null,
userId: null,
nursePersonCode: null,
nursePersonName: null,
nursePersonType: null,
phone: null,
address: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
nurseStationName: "请选择所属护理站",
departmentName: "请选择所属科室",
nurseStationPersonList: [{
id: "",
nurseStationId: "",
departmentCode: "",
nursePersonCode: "",
nursePersonName: "",
nursePersonType: "",
nurseStationName: "请选择所属护理站",
phone: "",
address: "",
sex: "",
departmentName: "请选择所属科室",
}, ],
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery2() {
this.nurseStationqueryParams.pageNum = 1;
this.info();
},
// 修改护理站弹框的搜索
handleQuery4() {
this.nurseStationqueryParams.pageNum = 1;
this.info();
},
//修改所属科室
handleQuery3() {
this.queryParams3.pageNum = 1;
this.getList3();
},
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
addcancel() {
this.innerVisible = false;
this.innerVisiblexg = false;
this.resetQuery2();
},
departcancel() {
this.innerVisible2 = false;
this.innerVisiblexg2 = false;
// this.resetQuery3();
},
resetQuery2() {
this.resetForm("queryForm");
this.nurseStationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.handleQuery2();
},
resetQuery4() {
this.resetForm("queryForm");
this.nurseStationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.handleQuery4();
},
resetQuery3() {
this.queryParams3.pageNum = 1;
this.queryParams3.pageSize = 10;
this.queryParams3.departmentName = null;
this.queryParams3.departmentCode = null;
this.handleQuery3();
},
resetQuery() {
if (this.nurseStationlist[0]) {
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.queryParams.departmentName = null;
this.queryParams.nursePersonName = null;
}
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.queryParams3.nurseStationId = null;
this.reset();
this.open2 = true;
this.title = "添加护理站人员信息";
this.title2 = "请选择所属护理站";
this.title3 = "请选择科室";
},
/** 修改按钮操作 */
handleUpdate(row) {
const id = row.id || this.ids;
getPerson(id).then((response) => {
console.log(response);
this.departmentName = response.data.departmentName;
this.nurseStationName = response.data.nurseStationName;
this.form = response.data;
this.queryParams3.nurseStationId = response.data.nurseStationId;
this.open = true;
this.title = "修改护理站人员信息";
if (this.departmentName == null && this.departmentName == undefined) {
this.departmentName = "请选择所属科室";
} else {
this.departmentName = response.data.departmentName;
}
});
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updatePerson(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPerson(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open2 = false;
this.getList();
this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室";
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm("是否确认删除护理站人员信息的数据项?")
.then(function() {
return delPerson(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导入按钮操作 */
handleImport() {
this.upload.open = true;
this.upload.title = "护理站人员导入";
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/system/station/downloadTemplate?fileType=nurseStationPerson", {},
`护理站人员基本信息导入模板.xlsx`
);
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果", { dangerouslyUseHTMLString: true }
);
this.getList();
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 导出按钮操作 */
handleExport() {
this.download(
"system/person/export", {
...this.queryParams,
},
`person_${new Date().getTime()}.xlsx`
);
},
//权限列表
info() {
this.loading = true;
getListByUser(this.nurseStationqueryParams).then((res) => {
this.nursetotal = res.total;
this.nurseStationlist = res.rows;
});
this.loading = false;
},
infos() {
var queryFor = {
pageNum: 1,
pageSize: 999,
};
getListByUser(queryFor).then((res) => {
this.handstationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.queryParams3.nurseStationId = res.rows[0].id;
this.getList();
});
},
},
};

View File

@ -1,41 +1,29 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form
:model="queryParams" :model="getListByUserquery"
ref="queryForm" ref="queryForm"
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" v-show="showSearch"
label-width="100px" label-width="100px"
> >
<el-form-item
label="护理站名称"
prop="nurseStationName"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-input
v-model="queryParams.nurseStationName"
placeholder="请输入护理站"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属护理站" prop="nurseStationName" v-else>
<el-input
v-model="queryParams.nurseStationName"
placeholder="请输入护理站"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="护理站编号" prop="nurseStationCode"> <el-form-item label="护理站编号" prop="nurseStationCode">
<el-input <el-input
v-model="queryParams.nurseStationCode" v-model="getListByUserquery.nurseStationCode"
placeholder="请输入护理站编号" placeholder="请输入护理站编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="所属护理站" prop="nurseStationName">
<el-input
v-model="getListByUserquery.nurseStationName"
placeholder="请输入护理站"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
@ -52,7 +40,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
@ -62,7 +50,7 @@
v-hasPermi="['system:station:add']" v-hasPermi="['system:station:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -83,20 +71,20 @@
icon="el-icon-upload2" icon="el-icon-upload2"
size="mini" size="mini"
@click="handledata" @click="handledata"
v-hasPermi="['system:station:importData']" v-hasPermi="['system:station:importStationInfo']"
>导入</el-button >导入</el-button
> >
</el-col> </el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="info"
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="stationList" :data="nurseStationlist"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
@ -128,7 +116,6 @@
prop="address" prop="address"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="护理站经度" align="center" prop="longitude" /> <el-table-column label="护理站经度" align="center" prop="longitude" />
<el-table-column label="护理站纬度" align="center" prop="latitude" /> <el-table-column label="护理站纬度" align="center" prop="latitude" />
<el-table-column label="联系电话" align="center" prop="phone" /> <el-table-column label="联系电话" align="center" prop="phone" />
@ -163,11 +150,11 @@
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total2 > 0"
:total="total" :total="total2"
:page.sync="queryParams.pageNum" :page.sync="getListByUserquery.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="getListByUserquery.pageSize"
@pagination="liststationinfo" @pagination="info"
/> />
<!-- 新增护理站信息对话框 --> <!-- 新增护理站信息对话框 -->
<el-dialog <el-dialog
@ -439,19 +426,17 @@
</div> </div>
</template> </template>
<!-- station/list -->
<script> <script>
import { import {
listStation,
getStation, getStation,
delStation, delStation,
addStation, addStation,
updateStation, updateStation,
getFirstLevelInfo, getFirstLevelInfo,
getSecondaryLevelInfo, getSecondaryLevelInfo,
getInfoLists,
updatePicture, updatePicture,
} from "@/api/system/station"; } from "@/api/system/station";
import { getInfoList } from "@/api/system/nurseItem";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
@ -558,27 +543,6 @@ export default {
pageSize: 10, pageSize: 10,
}, },
// //
queryParams: {
pageNum: 1,
pageSize: 10,
areaCode: null,
userId: null,
nurseStationCode: null,
nurseStationName: null,
id: null,
nurseStationType: null,
agencyIntroduce: null,
nurseStationDescription: null,
longitude: null,
latitude: null,
phone: null,
address: null,
dutyPerson: null,
dutyPhone: null,
stationPictureUrl: null,
sort: null,
},
// //
form: {}, form: {},
ids: 1, ids: 1,
@ -638,7 +602,6 @@ export default {
}; };
}, },
created() { created() {
this.getList();
this.getaddress(); this.getaddress();
this.info(); this.info();
this.infos(); this.infos();
@ -721,10 +684,6 @@ export default {
this.provincelist = res.data; this.provincelist = res.data;
}); });
}, },
getList() {
this.liststationinfo();
this.loading = true;
},
// //
cancel() { cancel() {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
@ -768,21 +727,16 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
liststationinfo() { liststationinfo() {
this.loading = true; this.loading = true;
listStation(this.queryParams).then((response) => { this.info();
this.stationList = response.rows;
this.total = response.total;
this.loading = false;
});
}, },
handleQuery() { handleQuery() {
this.loading = true; this.loading = true;
this.queryParams.pageNum = 1; this.getListByUserquery.pageNum = 1;
this.liststationinfo(); this.info();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") { this.getListByUserquery = {
this.queryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
areaCode: null, areaCode: null,
@ -803,13 +757,6 @@ export default {
}; };
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
} else {
// console.log(1);
this.queryParams.pageSize = 10;
this.queryParams.pageNum = 1;
this.queryParams.nurseStationCode = null;
this.handleQuery();
}
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -869,14 +816,14 @@ export default {
} }
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.info();
}); });
} else { } else {
addStation(this.form).then((response) => { addStation(this.form).then((response) => {
if (response.code) { if (response.code) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.info();
} else { } else {
this.form.nurseStationType = obj; this.form.nurseStationType = obj;
} }
@ -900,7 +847,7 @@ export default {
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {}); updatePicture(obj).then((res) => {});
} }
this.getList(); this.info();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}); .catch(() => {});
@ -910,7 +857,7 @@ export default {
this.download( this.download(
"system/station/export", "system/station/export",
{ {
...this.queryParams, ...this.getListByUserquery,
}, },
`station_${new Date().getTime()}.xlsx` `station_${new Date().getTime()}.xlsx`
); );
@ -944,33 +891,30 @@ export default {
"导入结果", "导入结果",
{ dangerouslyUseHTMLString: true } { dangerouslyUseHTMLString: true }
); );
this.getList(); this.info();
}, },
// //
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true; this.upload.isUploading = true;
}, },
// //
info() { info() {
//
getListByUser(this.getListByUserquery).then((res) => { getListByUser(this.getListByUserquery).then((res) => {
if (res.rows[0].isAdmin == "1") { //
// /
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.total2 = res.total; this.total2 = res.total;
} else { this.loading = false;
this.total2 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.id = res.rows[0].id;
this.handleQuery();
}
}); });
}, },
infos() { infos() {
var queryFor = { var queryFor = {
pageNum: 1, pageNum: 1,
pageSize:9999, pageSize: 9999,
}; };
getListByUser(queryFor).then((res) => { getListByUser(queryFor).then((res) => {
console.log(res) console.log(res);
this.handstationlist = res.rows; this.handstationlist = res.rows;
}); });
}, },

View File

@ -8,27 +8,7 @@
v-show="showSearch" v-show="showSearch"
label-width="110px" label-width="110px"
> >
<el-form-item <el-form-item label="护理站名称" prop="">
label="护理站名称"
prop=""
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select
v-model="queryParams.nurseStationId"
clearable
placeholder="请选择护理站"
>
<el-option
v-for="item in handstationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="护理站名称" prop="" v-else>
<el-select <el-select
v-model="queryParams.nurseStationId" v-model="queryParams.nurseStationId"
placeholder="请选择护理站" placeholder="请选择护理站"
@ -50,10 +30,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="耗材包详情" prop="consumableDetail"> <el-form-item label="耗材包名称" prop="consumableDetail">
<el-input <el-input
v-model="queryParams.consumableDetail" v-model="queryParams.consumableDetail"
placeholder="请输入服务项目耗材包详情" placeholder="请输入耗材包名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -131,6 +111,7 @@
icon="el-icon-upload2" icon="el-icon-upload2"
size="mini" size="mini"
@click="handleport" @click="handleport"
v-hasPermi="['system:stationConsumable:importStationConsumable']"
>导入</el-button >导入</el-button
> >
</el-col> </el-col>
@ -158,7 +139,7 @@
prop="consumableCode" prop="consumableCode"
/> />
<el-table-column <el-table-column
label="耗材包详情" label="耗材包名称"
align="center" align="center"
prop="consumableDetail" prop="consumableDetail"
/> />
@ -234,10 +215,10 @@
{{ form.nurseStationName }} {{ form.nurseStationName }}
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item label="耗材包详情" prop="consumableDetail"> <el-form-item label="耗材包名称" prop="consumableDetail">
<el-input <el-input
v-model="form.consumableDetail" v-model="form.consumableDetail"
placeholder="请输入服务项目耗材包详情" placeholder="请输入耗材包名称"
maxlength="100" maxlength="100"
/> />
</el-form-item> </el-form-item>
@ -324,13 +305,13 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="耗材包详情" label="耗材包名称"
:rules="rules.nurseStationConsumables.consumableDetail" :rules="rules.nurseStationConsumables.consumableDetail"
:prop="`nurseStationConsumables.${index}.consumableDetail`" :prop="`nurseStationConsumables.${index}.consumableDetail`"
> >
<el-input <el-input
v-model="item.consumableDetail" v-model="item.consumableDetail"
placeholder="请输入服务项目耗材包详情" placeholder="请输入服务项目耗材包名称"
maxlength="50" maxlength="50"
/> />
</el-form-item> </el-form-item>
@ -743,7 +724,7 @@ export default {
consumableDetail: [ consumableDetail: [
{ {
required: true, required: true,
message: "请输入耗材包详情", message: "请输入耗材包名称",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -772,7 +753,7 @@ export default {
consumableDetail: [ consumableDetail: [
{ {
required: true, required: true,
message: "请输入耗材包详情", message: "请输入耗材包名称",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -809,7 +790,6 @@ export default {
}; };
}, },
created() { created() {
this.getList();
this.info(); this.info();
this.infos(); this.infos();
// this.listinfo(); // this.listinfo();
@ -847,7 +827,6 @@ export default {
}, },
delnurseStationConsumables(index) { delnurseStationConsumables(index) {
this.form.nurseStationConsumables.splice(index, 1); this.form.nurseStationConsumables.splice(index, 1);
console.log(this.form.nurseStationConsumables);
}, },
addnurseStationConsumables() { addnurseStationConsumables() {
var obj = { var obj = {
@ -865,7 +844,6 @@ export default {
} }
}, },
choicenurseStation(item, index) { choicenurseStation(item, index) {
console.log(item);
this.index = index; this.index = index;
this.open2 = true; this.open2 = true;
}, },
@ -878,9 +856,6 @@ export default {
this.reset2(); this.reset2();
}, },
clicknurseStation(item) { clicknurseStation(item) {
console.log(item);
console.log(this.index);
console.log(this.form);
this.form.nurseStationConsumables[this.index].nurseStationId = item.id; this.form.nurseStationConsumables[this.index].nurseStationId = item.id;
this.form.nurseStationConsumables[this.index].nurseStationName = this.form.nurseStationConsumables[this.index].nurseStationName =
item.nurseStationName; item.nurseStationName;
@ -928,10 +903,11 @@ export default {
}, },
reset() { reset() {
this.form = { this.form = {
pageNum: 1,
pageSize: 10,
id: null, id: null,
consumablePrice: null, consumablePrice: null,
sort: null, sort: null,
nurseStationId: "",
nurseStationConsumables: [ nurseStationConsumables: [
{ {
nurseStationId: "", nurseStationId: "",
@ -947,7 +923,7 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
listStationConsumableinfo() { listStationConsumableinfo() {
this.loading=true; this.loading = true;
listStationConsumable(this.queryParams).then((response) => { listStationConsumable(this.queryParams).then((response) => {
this.stationConsumableList = response.rows; this.stationConsumableList = response.rows;
this.total = response.total; this.total = response.total;
@ -959,14 +935,7 @@ export default {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.listStationConsumableinfo(); this.listStationConsumableinfo();
}, },
//
// listinfo() {
// list(this.nurseStationqueryParams).then((res) => {
// this.nurseStationlist2 = res.rows;
// console.log(this.nurseStationlist2);
// this.total2 = res.total;
// });
// },
// //
handleQuery2() { handleQuery2() {
this.getListByUserquery.pageNum = 1; this.getListByUserquery.pageNum = 1;
@ -977,28 +946,12 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
sresetQuery() { sresetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
nurseStationId: "",
userId: null,
consumableCode: null,
consumableDetail: null,
consumableUnit: null,
consumablePrice: null,
sort: null,
};
this.handleQuery();
} else {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.consumableCode = null; this.queryParams.consumableCode = null;
this.queryParams.consumableDetail = null; this.queryParams.consumableDetail = null;
this.queryParams.consumableUnit = null; this.queryParams.consumableUnit = null;
this.queryParams.consumablePrice = null; this.queryParams.consumablePrice = null;
this.handleQuery(); this.handleQuery();
}
}, },
// //
resetQuery() { resetQuery() {
@ -1032,7 +985,6 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form);
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
@ -1084,17 +1036,8 @@ export default {
// //
info() { info() {
getListByUser(this.getListByUserquery).then((res) => { getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
if (res.rows[0].isAdmin == "1") {
console.log(true);
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.total3 = res.total; this.total3 = res.total;
} else {
this.total3 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
}); });
}, },
infos() { infos() {
@ -1103,8 +1046,9 @@ export default {
pageSize: 9999, pageSize: 9999,
}; };
getListByUser(queryFor).then((res) => { getListByUser(queryFor).then((res) => {
console.log(res);
this.handstationlist = res.rows; this.handstationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList();
}); });
}, },
}, },

View File

@ -12,28 +12,6 @@
label="护理站名称" label="护理站名称"
prop="nurseStationId" prop="nurseStationId"
label-width="100px" label-width="100px"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select
v-model="queryParams.nurseStationId"
clearable
placeholder="请选择护理站"
>
<el-option
v-for="item in handstationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="所属护理站"
prop="nurseStationId"
label-width="100px"
v-else
> >
<el-select <el-select
v-model="queryParams.nurseStationId" v-model="queryParams.nurseStationId"
@ -48,7 +26,6 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="护理项目编号" prop="nurseItemCode"> <el-form-item label="护理项目编号" prop="nurseItemCode">
<el-input <el-input
v-model="queryParams.nurseItemCode" v-model="queryParams.nurseItemCode"
@ -121,6 +98,7 @@
icon="el-icon-upload2" icon="el-icon-upload2"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:stationItem:importStationItem']"
>导入</el-button >导入</el-button
> >
</el-col> </el-col>
@ -340,6 +318,7 @@
v-model="scope.row.price" v-model="scope.row.price"
placeholder="小数点后两位(元)" placeholder="小数点后两位(元)"
type="number" type="number"
min="0"
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>6){value=value.slice(0,6)}" oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>6){value=value.slice(0,6)}"
></el-input> ></el-input>
</template> </template>
@ -403,6 +382,7 @@
<el-input <el-input
v-model="scope.row.consumableCount" v-model="scope.row.consumableCount"
placeholder="不可输入小数点" placeholder="不可输入小数点"
min="0"
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}" oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
type="number" type="number"
></el-input> ></el-input>
@ -475,7 +455,7 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="stationlist" @click="handleQuery2"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel" <el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
@ -535,7 +515,7 @@
:total="total4" :total="total4"
:page.sync="getListByUserquery.pageNum" :page.sync="getListByUserquery.pageNum"
:limit.sync="getListByUserquery.pageSize" :limit.sync="getListByUserquery.pageSize"
@pagination="stationlist" @pagination="getList"
/> />
</el-dialog> </el-dialog>
<!-- 耗材弹框 --> <!-- 耗材弹框 -->
@ -552,10 +532,10 @@
label-width="110px" label-width="110px"
:inline="true" :inline="true"
> >
<el-form-item label="耗材包详情" prop="nurseStationId"> <el-form-item label="耗材包名称" prop="nurseStationId">
<el-input <el-input
v-model="StationConsumablequeryParams.consumableDetail" v-model="StationConsumablequeryParams.consumableDetail"
placeholder="请输入耗材包详情" placeholder="请输入耗材包名称"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -612,7 +592,7 @@
prop="consumableCode" prop="consumableCode"
/> />
<el-table-column <el-table-column
label="服务项目耗材包详情" label="耗材包名称"
align="center" align="center"
prop="consumableDetail" prop="consumableDetail"
/> />
@ -698,8 +678,6 @@ import {
delNurseItem, delNurseItem,
addNurseItem, addNurseItem,
updateNurseItem, updateNurseItem,
getInfoList,
liststation,
updatePicture, updatePicture,
} from "@/api/system/nurseItem"; } from "@/api/system/nurseItem";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
@ -747,8 +725,6 @@ export default {
stationConsumableList: [], stationConsumableList: [],
// //
nurseItemList: [], nurseItemList: [],
//
typelist: [],
// //
title: "", title: "",
// //
@ -783,7 +759,6 @@ export default {
// //
form: { form: {
nurseStationItem: { nurseStationItem: {
nurseStationId: null,
nurseTypeId: null, nurseTypeId: null,
nurseItemName: "", nurseItemName: "",
nurseItemContent: "", nurseItemContent: "",
@ -825,14 +800,12 @@ export default {
}; };
}, },
created() { created() {
this.getList();
this.info(); this.info();
this.getInfoListinfo();
this.infos(); this.infos();
// this.getList();
}, },
methods: { methods: {
imgUrl(imgUrl) { imgUrl(imgUrl) {
console.log(imgUrl);
this.form.nurseStationItem.itemPictureUrl = imgUrl; this.form.nurseStationItem.itemPictureUrl = imgUrl;
}, },
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
@ -883,20 +856,15 @@ export default {
// //
cellchoiceConsumable(item) { cellchoiceConsumable(item) {
if (this.form.nurseStationItemConsumables.find((e) => e.id == item.id)) { if (this.form.nurseStationItemConsumables.find((e) => e.id == item.id)) {
console.log(1);
this.form.nurseStationItemConsumables = this.form.nurseStationItemConsumables =
this.form.nurseStationItemConsumables.filter((e) => e.id != item.id); this.form.nurseStationItemConsumables.filter((e) => e.id != item.id);
} else { } else {
console.log(2);
this.form.nurseStationItemConsumables.push(item); this.form.nurseStationItemConsumables.push(item);
} }
console.log(this.form.nurseStationItemConsumables);
}, },
// //
choiceConsumable(item) { choiceConsumable(item) {
console.log(item);
this.form.nurseStationItemConsumables.push(item); this.form.nurseStationItemConsumables.push(item);
console.log(this.form.nurseStationItemConsumables);
}, },
// //
choicestationid(item) { choicestationid(item) {
@ -904,7 +872,6 @@ export default {
// this.form.nurseStationId = item.id; // this.form.nurseStationId = item.id;
this.form.nurseStationItem.nurseStationName = item.nurseStationName; this.form.nurseStationItem.nurseStationName = item.nurseStationName;
this.StationConsumablequeryParams.nurseStationId = item.id; this.StationConsumablequeryParams.nurseStationId = item.id;
// console.log(item);
this.nurseStationshow = false; this.nurseStationshow = false;
this.stationcancel(); this.stationcancel();
}, },
@ -931,22 +898,13 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}; };
this.stationlist(); this.info();
}, },
// //
stationlist() { handleQuery2() {
this.loading = true; this.loading = true;
getListByUser(this.getListByUserquery).then((res) => { this.getListByUserquery.pageNum = 1;
this.total4 = res.total; this.info();
this.nurseStationlist = res.rows;
});
this.loading = false;
},
//
getInfoListinfo() {
getInfoList().then((res) => {
this.typelist = res.data;
});
}, },
/** 耗材列表 */ /** 耗材列表 */
listStationConsumable() { listStationConsumable() {
@ -974,13 +932,6 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
list(this.queryParams).then((response) => { list(this.queryParams).then((response) => {
response.rows.forEach((e) => {
this.typelist.forEach((el) => {
if (e.nurseTypeId == el.id) {
e.nurseTypeName = el.nurseTypeName;
}
});
});
this.nurseItemList = response.rows; this.nurseItemList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -988,15 +939,12 @@ export default {
}, },
// //
cancel() { cancel() {
console.log(this.form.nurseStationItem);
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) { if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl); obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => { updatePicture(obj).then((res) => {});
console.log(res);
});
} }
this.open = false; this.open = false;
@ -1039,8 +987,9 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
pageNum: 1,
pageSize: 10,
nurseStationItem: { nurseStationItem: {
nurseStationId: null,
nurseTypeId: null, nurseTypeId: null,
nurseItemName: null, nurseItemName: null,
nurseItemContent: null, nurseItemContent: null,
@ -1074,27 +1023,13 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") { if (this.nurseStationlist[0]) {
this.queryParams = {
pageNum: 1,
pageSize: 10,
nurseStationId: null,
nurseTypeId: null,
userId: null,
nurseItemCode: null,
nurseItemName: null,
nurseItemContent: null,
advanceAppointDuration: null,
sort: null,
};
this.handleQuery();
} else {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.queryParams.nurseTypeId = null; this.queryParams.pageSize = 10;
this.queryParams.nurseItemCode = null; this.queryParams.nurseItemCode = null;
this.queryParams.nurseItemName = null; this.queryParams.nurseItemName = null;
this.handleQuery();
} }
this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -1115,7 +1050,13 @@ export default {
this.StationConsumablequeryParams.nurseStationId = null; this.StationConsumablequeryParams.nurseStationId = null;
const id = row.id || this.ids; const id = row.id || this.ids;
getNurseItem(id).then((response) => { getNurseItem(id).then((response) => {
console.log(response); if (response.data.nurseStationItemConsumables) {
response.data.nurseStationItemConsumables.forEach((e) => {
e.id = e.nurseStationConsumableId;
});
} else {
response.data.nurseStationItemConsumables = [];
}
this.form = response.data; this.form = response.data;
this.StationConsumablequeryParams.nurseStationId = this.StationConsumablequeryParams.nurseStationId =
response.data.nurseStationItem.nurseStationId; response.data.nurseStationItem.nurseStationId;
@ -1155,26 +1096,20 @@ export default {
e.nurseStationConsumableId = e.id; e.nurseStationConsumableId = e.id;
}); });
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId; this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
// this.form.nurseStationItem.nurseStationId = this.form.nurseStationId;
console.log(this.form);
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
console.log(valid);
if (valid) { if (valid) {
if (this.form.nurseStationItem.id != null) { if (this.form.nurseStationItem.id != null) {
this.form.nurseStationItemPrices.forEach((e) => { this.form.nurseStationItemPrices.forEach((e) => {
e.nurseStationItemId = this.form.nurseStationItem.id; e.nurseStationItemId = this.form.nurseStationItem.id;
}); });
updateNurseItem(this.form).then((response) => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) { if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
obj.pictureUrlList.push(this.imgone); obj.pictureUrlList.push(this.imgone);
} }
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => { updatePicture(obj).then((res) => {});
console.log(res);
});
} }
updateNurseItem(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -1196,8 +1131,9 @@ export default {
pageSize: 9999, pageSize: 9999,
}; };
getListByUser(queryFor).then((res) => { getListByUser(queryFor).then((res) => {
console.log(res);
this.handstationlist = res.rows; this.handstationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList();
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -1210,10 +1146,8 @@ export default {
}) })
.then(() => { .then(() => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
obj.pictureUrlList.push(row.nurseStationItem.itemPictureUrl); obj.pictureUrlList.push(row.itemPictureUrl);
updatePicture(obj).then((res) => { updatePicture(obj).then((res) => {});
console.log(res);
});
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
@ -1228,17 +1162,8 @@ export default {
// //
info() { info() {
getListByUser(this.getListByUserquery).then((res) => { getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
if (res.rows[0].isAdmin == "1") {
console.log(true);
this.nurseStationlist = res.rows;
this.total4 = res.total;
} else {
this.total4 = res.total; this.total4 = res.total;
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
}); });
}, },
}, },