Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
1afb87bc3a
@ -426,7 +426,11 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</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">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -507,7 +511,7 @@ export default {
|
||||
datas: null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loading2:true,
|
||||
loading2: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@ -918,7 +922,7 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
@ -950,22 +954,11 @@ export default {
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
this.loading2 = true
|
||||
this.loading2 = true;
|
||||
stationList(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
console.log(res);
|
||||
// if (res.rows[0].isAdmin == "1") {
|
||||
// this.nurseStationlist = res.rows;
|
||||
// this.total2 = res.total;
|
||||
// } else {
|
||||
// this.total2 = res.total;
|
||||
// this.nurseStationlist = res.rows;
|
||||
// this.queryParams.nurseStationId = res.rows[0].id;
|
||||
// this.form.nurseStationId = res.rows[0].id;
|
||||
// this.handleQuery();
|
||||
// }
|
||||
this.loading2 = false
|
||||
this.loading2 = false;
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
@ -974,7 +967,7 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
stationList(queryFor).then((res) => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
<el-form-item
|
||||
label="护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
@ -27,21 +26,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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-input
|
||||
v-model="queryParams.departmentCode"
|
||||
@ -478,15 +463,6 @@ export default {
|
||||
departmentPerson: null,
|
||||
phone: null,
|
||||
nurseStationName: null,
|
||||
nurseStationDepartmentList: [
|
||||
{
|
||||
nurseStationId: "",
|
||||
departmentCode: "",
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
phone: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
@ -563,15 +539,12 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
// this.listinfo();
|
||||
this.info();
|
||||
this.infos();
|
||||
},
|
||||
methods: {
|
||||
// add点击护理站名称
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.stationid = row.id;
|
||||
this.innerVisible = false;
|
||||
this.form.nurseStationDepartmentList[this.index].nurseStationName =
|
||||
@ -587,7 +560,6 @@ export default {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.nurseStationDepartmentList.splice(index, 1);
|
||||
console.log(this.form.nurseStationDepartmentList);
|
||||
},
|
||||
adddisease() {
|
||||
var obj = {
|
||||
@ -632,7 +604,8 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
@ -641,8 +614,7 @@ export default {
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
nurseStationName: null,
|
||||
nurseStationId: null,
|
||||
|
||||
nurseStationDepartmentList: [
|
||||
{
|
||||
nurseStationId: "",
|
||||
@ -667,28 +639,26 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
phone: null,
|
||||
nurseStationName: null,
|
||||
};
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
this.queryParams.departmentCode = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
|
||||
// this.queryParams = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
|
||||
// departmentCode: null,
|
||||
// departmentName: null,
|
||||
// departmentPerson: null,
|
||||
// phone: null,
|
||||
// nurseStationName: null,
|
||||
// };
|
||||
if (this.nurseStationlist[0]) {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.departmentCode = null;
|
||||
this.queryParams.departmentName = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
},
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
addhd() {
|
||||
this.loading = true;
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
@ -707,15 +677,10 @@ export default {
|
||||
//权限列表
|
||||
info() {
|
||||
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.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -743,7 +708,6 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -782,7 +746,6 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
507
src/views/system/goodsInfo/goodsInfojs.js
Normal file
507
src/views/system/goodsInfo/goodsInfojs.js
Normal 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;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -12,7 +12,6 @@
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
@ -212,14 +211,6 @@
|
||||
label-width="120px"
|
||||
: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-input
|
||||
v-model="form.nurseStationName"
|
||||
@ -230,6 +221,14 @@
|
||||
/>
|
||||
</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-select
|
||||
style="width: 210px"
|
||||
@ -295,6 +294,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.goodsPrice"
|
||||
type="number"
|
||||
min="0"
|
||||
oninput=" if(value.length>7){value=value.slice(0,7)}"
|
||||
></el-input>
|
||||
</template>
|
||||
@ -304,6 +304,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.goodsStock"
|
||||
type="number"
|
||||
min="0"
|
||||
oninput="if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
@ -464,534 +465,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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.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;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
import goodsInfojs from "./goodsInfojs";
|
||||
export default goodsInfojs;
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@ -21,7 +21,7 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
@ -31,7 +31,6 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select
|
||||
v-model="queryParams.orderStatus"
|
||||
@ -57,9 +56,6 @@
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="success" icon="el-icon-refresh-right" size="mini" @click="resetQuery"
|
||||
>刷新</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -78,17 +74,12 @@
|
||||
label="订单编号"
|
||||
align="center"
|
||||
prop="orderNo"
|
||||
width="190"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品名称"
|
||||
align="center"
|
||||
prop="goodsName"
|
||||
|
||||
width="190"
|
||||
/>
|
||||
<el-table-column label="商品名称" align="center" prop="goodsName" />
|
||||
|
||||
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<!-- {{ orderStatus(scope.row.orderStatus) }} -->
|
||||
<el-button v-if="scope.row.orderStatus == 'WAIT_PAY'"
|
||||
@ -147,7 +138,10 @@
|
||||
<el-table-column label="录入物流单号" align="center" prop="remark">
|
||||
<template slot-scope="scope">
|
||||
<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"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@ -156,7 +150,10 @@
|
||||
>修改物流单号</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"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@ -165,7 +162,10 @@
|
||||
>录入物流单号</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"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@ -173,15 +173,6 @@
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>录入物流单号</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>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -248,7 +239,7 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="orderList.goodsName"
|
||||
clearable
|
||||
@ -257,7 +248,7 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单金额" prop="totalPrice">
|
||||
<el-form-item label="订单金额" prop="totalPrice">
|
||||
<el-input
|
||||
v-model="orderList.totalPrice"
|
||||
clearable
|
||||
@ -266,7 +257,7 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货人" prop="receiveAddress">
|
||||
<el-form-item label="收货人" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="orderList.receiver"
|
||||
clearable
|
||||
@ -284,7 +275,7 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="orderList.phone"
|
||||
clearable
|
||||
@ -294,7 +285,6 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-form-item label="商品属性" prop="goodsAttributeName">
|
||||
<el-input
|
||||
v-model="orderList.goodsAttributeName"
|
||||
@ -524,7 +514,6 @@
|
||||
:rows="5"
|
||||
disabled
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item> </el-form-item>
|
||||
</el-form>
|
||||
@ -617,7 +606,7 @@ export default {
|
||||
refundlist: [],
|
||||
nurseStationlist: [],
|
||||
orderStatuslist: [
|
||||
{
|
||||
{
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
@ -671,7 +660,7 @@ export default {
|
||||
total: 0,
|
||||
// 商品订单表格数据
|
||||
goodsOrderList: [],
|
||||
handstationlist: [], //页面搜索list
|
||||
handstationlist: [], //页面搜索list
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -695,7 +684,7 @@ export default {
|
||||
id: "",
|
||||
expressNo: null,
|
||||
},
|
||||
//权限查询
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -809,7 +798,7 @@ export default {
|
||||
this.$modal.msgSuccess("录入成功");
|
||||
}
|
||||
this.queryexpressNo.expressNo = "";
|
||||
this.getList();
|
||||
this.getList();
|
||||
this.innerlogistics = false;
|
||||
|
||||
});
|
||||
@ -884,7 +873,7 @@ export default {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
// nurseStationId: null,
|
||||
patientId: null,
|
||||
orderNo: null,
|
||||
orderStatus: null,
|
||||
@ -896,8 +885,10 @@ export default {
|
||||
orderChannel: null,
|
||||
};
|
||||
this.form = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
// nurseStationId: null,
|
||||
patientId: null,
|
||||
orderNo: null,
|
||||
totalPrice: null,
|
||||
@ -923,19 +914,23 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == '1') {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
} else {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.orderNo = null
|
||||
this.queryParams.orderStatus = null
|
||||
|
||||
console.log(this.nurseStationlist)
|
||||
console.log(this.nurseStationlist)
|
||||
if (this.nurseStationlist[0]){
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.orderNo = null;
|
||||
this.queryParams.orderStatus = null;
|
||||
}
|
||||
|
||||
// this.queryParams = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
// orderNo: null,
|
||||
// orderStatus: null,
|
||||
|
||||
// }
|
||||
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
@ -993,40 +988,32 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/goodsOrder/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`goodsOrder_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//权限列表
|
||||
//权限列表
|
||||
info() {
|
||||
// goodsCategory().then((res) => {
|
||||
// console.log(this.form);
|
||||
// this.goodsCategorylist = res.rows;
|
||||
// });
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.getList()
|
||||
// this.handleQuery();
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize:9999,
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res)
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
|
||||
<el-form-item label="护理类型编码" prop="nurseTypeCode">
|
||||
<el-input
|
||||
v-model="queryParams.nurseTypeCode"
|
||||
@ -38,7 +37,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -91,7 +89,6 @@
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseTypeList"
|
||||
@ -110,17 +107,9 @@
|
||||
align="center"
|
||||
prop="nurseTypeName"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
/>
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@ -154,71 +143,74 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改护理类型信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open2" width="450px" append-to-body>
|
||||
<!-- 添加护理类型信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open2"
|
||||
width="450px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<div
|
||||
v-for="(item, index) in form.nurseTypeList"
|
||||
:key="index"
|
||||
style="margin-top:10px"
|
||||
style="margin-top: 10px"
|
||||
>
|
||||
<el-form-item label="护理类型名称"
|
||||
:rules="rules.nurseTypeList.nurseTypeName"
|
||||
:prop="`nurseTypeList.${index}.nurseTypeName`">
|
||||
<el-form-item
|
||||
label="护理类型名称"
|
||||
:rules="rules.nurseTypeList.nurseTypeName"
|
||||
:prop="`nurseTypeList.${index}.nurseTypeName`"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.nurseTypeName"
|
||||
placeholder="请输入护理类型名称"
|
||||
maxlength="50"
|
||||
style="width: 200px"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
style="margin-top: 2px;margin-left: 10px;"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
style="margin-top: 2px; margin-left: 10px"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
style="margin-top: 2px;margin-left: 10px;"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
style="margin-top: 2px; margin-left: 10px"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</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-item label="护理类型名称" prop="nurseTypeName">
|
||||
<el-input
|
||||
v-model="form.nurseTypeName"
|
||||
placeholder="请输入护理类型名称"
|
||||
maxlength="50"
|
||||
style="width: 250px"
|
||||
/>
|
||||
|
||||
<el-input
|
||||
v-model="form.nurseTypeName"
|
||||
placeholder="请输入护理类型名称"
|
||||
maxlength="50"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -245,7 +237,6 @@ export default {
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 护理类型信息表格数据
|
||||
@ -262,7 +253,6 @@ export default {
|
||||
userId: null,
|
||||
nurseTypeCode: null,
|
||||
nurseTypeName: null,
|
||||
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -278,12 +268,12 @@ export default {
|
||||
],
|
||||
},
|
||||
nurseTypeName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入护理类型名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
{
|
||||
required: true,
|
||||
message: "请输入护理类型名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -291,8 +281,8 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.nurseTypeList.splice(index, 1);
|
||||
console.log(this.form.nurseTypeList);
|
||||
},
|
||||
@ -306,7 +296,6 @@ export default {
|
||||
this.form.nurseTypeList.push(obj);
|
||||
}
|
||||
},
|
||||
|
||||
/** 查询护理类型信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -325,13 +314,11 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
|
||||
nurseTypeList:[
|
||||
nurseTypeList: [
|
||||
{
|
||||
nurseTypeName:"",
|
||||
}
|
||||
]
|
||||
|
||||
nurseTypeName: "",
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -391,7 +378,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除护理类型信息的数据项?')
|
||||
.confirm("是否确认删除护理类型信息的数据项?")
|
||||
.then(function () {
|
||||
return delNurseType(ids);
|
||||
})
|
||||
|
||||
@ -65,13 +65,6 @@
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-refresh-right"
|
||||
size="mini"
|
||||
@click="resetQuery"
|
||||
>刷新</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@ -123,7 +116,6 @@
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
|
||||
>已取消</el-button
|
||||
>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" align="center" prop="createTime" />
|
||||
@ -150,15 +142,6 @@
|
||||
v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
|
||||
>派单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
disabled
|
||||
icon="el-icon-s-promotion"
|
||||
@click="dispatch(scope.row)"
|
||||
v-else
|
||||
>派单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -168,15 +151,6 @@
|
||||
v-hasPermi="['system:appointmentOrder:confirmCancel']"
|
||||
>取消预约</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-error"
|
||||
v-else
|
||||
disabled
|
||||
v-hasPermi="['system:appointmentOrder:confirmCancel']"
|
||||
>取消预约</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -200,87 +174,74 @@
|
||||
title="查看预约订单信息"
|
||||
:visible.sync="innerVisible4"
|
||||
append-to-body
|
||||
width="1100px"
|
||||
width="1280px"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="form"
|
||||
:model="query"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
class="orderInfo"
|
||||
label-width="130px"
|
||||
>
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="query.orderNo"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
<el-input v-model="query.orderNo" disabled style="width: 250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input
|
||||
:value="switchOrderStatus(query.orderStatus)"
|
||||
style="width: 250px"
|
||||
disabled
|
||||
style="width: 180px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单总金额" prop="totalPrice">
|
||||
<el-input
|
||||
v-model="query.totalPrice"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input v-model="query.totalPrice" disabled style="width: 250px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单数量" prop="orderCount">
|
||||
<el-input
|
||||
v-model="query.orderCount"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
<el-input v-model="query.orderCount" disabled style="width: 250px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理项目名称" prop="nurseItemName">
|
||||
<el-input
|
||||
v-model="query.nurseItemName"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 180px"
|
||||
disabled
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务时间" prop="time">
|
||||
<el-input
|
||||
v-model="query.time"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input v-model="query.time" disabled style="width: 250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目时长" prop="itemServeDurationUnit">
|
||||
<el-input
|
||||
v-model="query.itemServeDurationUnit"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
disabled
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="query.nurseStationName"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 180px"
|
||||
disabled
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务地址" prop="serviceAddress">
|
||||
<el-input
|
||||
v-model="query.serviceAddress"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
disabled
|
||||
style="width: 250px"
|
||||
/>
|
||||
</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-table
|
||||
@ -291,21 +252,18 @@
|
||||
<el-table-column
|
||||
prop="orderConsumableName"
|
||||
label="耗材包名称"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderConsumableCount"
|
||||
label="耗材包数量"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderConsumablePrice"
|
||||
label="耗材包价格"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
@ -521,10 +479,12 @@ import {
|
||||
appointmentOrderDetails,
|
||||
} from "@/api/system/order";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
name: "order",
|
||||
data() {
|
||||
return {
|
||||
baseurl:null,
|
||||
orderStatuslist: [
|
||||
{
|
||||
value: "WAIT_PAY",
|
||||
@ -625,6 +585,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.baseurl = baseurl
|
||||
this.getList();
|
||||
this.info();
|
||||
this.infos();
|
||||
@ -666,7 +627,7 @@ export default {
|
||||
return "退款中";
|
||||
case "CANCEL":
|
||||
return "已取消";
|
||||
case "REFUNDED":
|
||||
case "REFUNDED":
|
||||
return "已退款";
|
||||
default:
|
||||
break;
|
||||
@ -774,42 +735,40 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
} else {
|
||||
if (this.nurseStationlist[0]) {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.orderNo = null
|
||||
this.queryParams.orderStatus = null
|
||||
this.queryParams.patientName=null
|
||||
this.queryParams.patientName = null;
|
||||
this.queryParams.orderNo = null;
|
||||
this.queryParams.orderStatus = null;
|
||||
}
|
||||
// this.queryParams = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
// // nurseStationId:null,
|
||||
// patientName:null,
|
||||
// orderNo:null,
|
||||
// orderStatus:null,
|
||||
// };
|
||||
this.handleQuery();
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.queryParams).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total = res.total;
|
||||
} else {
|
||||
this.total = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.total = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.getList();
|
||||
// this.handleQuery();
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize:9999,
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
@ -854,9 +813,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .orderInfo {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
|
||||
.img {
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -8,11 +8,7 @@
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item
|
||||
label="护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-form-item label="护理站" prop="nurseStationId">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@ -27,21 +23,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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
|
||||
label="所属科室"
|
||||
prop="departmentName"
|
||||
@ -119,7 +100,7 @@
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:person:export']"
|
||||
v-hasPermi="['system:person:importStationPerson']"
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -917,614 +898,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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.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;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
import personjs from "./personjs";
|
||||
export default personjs;
|
||||
</script>
|
||||
|
||||
570
src/views/system/person/personjs.js
Normal file
570
src/views/system/person/personjs.js
Normal 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();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,41 +1,29 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
:model="getListByUserquery"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
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-input
|
||||
v-model="queryParams.nurseStationCode"
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-button
|
||||
@ -52,7 +40,7 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@ -62,7 +50,7 @@
|
||||
v-hasPermi="['system:station:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@ -83,20 +71,20 @@
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handledata"
|
||||
v-hasPermi="['system:station:importData']"
|
||||
v-hasPermi="['system:station:importStationInfo']"
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
@queryTable="info"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stationList"
|
||||
:data="nurseStationlist"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
@ -112,7 +100,7 @@
|
||||
prop="nurseStationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
|
||||
<el-table-column label="所属区域" align="center" prop="area">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
@ -128,7 +116,6 @@
|
||||
prop="address"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column label="护理站经度" align="center" prop="longitude" />
|
||||
<el-table-column label="护理站纬度" align="center" prop="latitude" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
@ -163,11 +150,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="liststationinfo"
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<el-dialog
|
||||
@ -439,19 +426,17 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- station/list -->
|
||||
<script>
|
||||
import {
|
||||
listStation,
|
||||
getStation,
|
||||
delStation,
|
||||
addStation,
|
||||
updateStation,
|
||||
getFirstLevelInfo,
|
||||
getSecondaryLevelInfo,
|
||||
getInfoLists,
|
||||
updatePicture,
|
||||
} from "@/api/system/station";
|
||||
import { getInfoList } from "@/api/system/nurseItem";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import { getToken } from "@/utils/auth";
|
||||
@ -558,27 +543,6 @@ export default {
|
||||
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: {},
|
||||
ids: 1,
|
||||
@ -638,7 +602,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getaddress();
|
||||
this.info();
|
||||
this.infos();
|
||||
@ -682,7 +645,7 @@ export default {
|
||||
}
|
||||
console.log(this.looknurseStationLabel);
|
||||
},
|
||||
|
||||
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.areaCode = item.areaCode;
|
||||
@ -721,10 +684,6 @@ export default {
|
||||
this.provincelist = res.data;
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
this.liststationinfo();
|
||||
this.loading = true;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
@ -768,48 +727,36 @@ export default {
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
this.loading = true;
|
||||
listStation(this.queryParams).then((response) => {
|
||||
this.stationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.info();
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.liststationinfo();
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
userId: null,
|
||||
nurseStationCode: null,
|
||||
nurseStationName: null,
|
||||
nurseStationType: null,
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
sort: null,
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
} else {
|
||||
// console.log(1);
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseStationCode = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
userId: null,
|
||||
nurseStationCode: null,
|
||||
nurseStationName: null,
|
||||
nurseStationType: null,
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
sort: null,
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@ -869,14 +816,14 @@ export default {
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
});
|
||||
} else {
|
||||
addStation(this.form).then((response) => {
|
||||
if (response.code) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
} else {
|
||||
this.form.nurseStationType = obj;
|
||||
}
|
||||
@ -900,7 +847,7 @@ export default {
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.getList();
|
||||
this.info();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
@ -910,7 +857,7 @@ export default {
|
||||
this.download(
|
||||
"system/station/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
@ -944,33 +891,30 @@ export default {
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
//权限列表
|
||||
//护理站限列表
|
||||
info() {
|
||||
//加个所属区域
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.id = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
// 页面
|
||||
// /所属区域
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize:9999,
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
@ -8,27 +8,7 @@
|
||||
v-show="showSearch"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item
|
||||
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-form-item label="护理站名称" prop="">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@ -50,10 +30,10 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包详情" prop="consumableDetail">
|
||||
<el-form-item label="耗材包名称" prop="consumableDetail">
|
||||
<el-input
|
||||
v-model="queryParams.consumableDetail"
|
||||
placeholder="请输入服务项目耗材包详情"
|
||||
placeholder="请输入耗材包名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
@ -131,6 +111,7 @@
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleport"
|
||||
v-hasPermi="['system:stationConsumable:importStationConsumable']"
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -158,7 +139,7 @@
|
||||
prop="consumableCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="耗材包详情"
|
||||
label="耗材包名称"
|
||||
align="center"
|
||||
prop="consumableDetail"
|
||||
/>
|
||||
@ -234,10 +215,10 @@
|
||||
{{ form.nurseStationName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包详情" prop="consumableDetail">
|
||||
<el-form-item label="耗材包名称" prop="consumableDetail">
|
||||
<el-input
|
||||
v-model="form.consumableDetail"
|
||||
placeholder="请输入服务项目耗材包详情"
|
||||
placeholder="请输入耗材包名称"
|
||||
maxlength="100"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -324,13 +305,13 @@
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="耗材包详情"
|
||||
label="耗材包名称"
|
||||
:rules="rules.nurseStationConsumables.consumableDetail"
|
||||
:prop="`nurseStationConsumables.${index}.consumableDetail`"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.consumableDetail"
|
||||
placeholder="请输入服务项目耗材包详情"
|
||||
placeholder="请输入服务项目耗材包名称"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -743,7 +724,7 @@ export default {
|
||||
consumableDetail: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入耗材包详情",
|
||||
message: "请输入耗材包名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -772,7 +753,7 @@ export default {
|
||||
consumableDetail: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入耗材包详情",
|
||||
message: "请输入耗材包名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -809,7 +790,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.infos();
|
||||
// this.listinfo();
|
||||
@ -847,7 +827,6 @@ export default {
|
||||
},
|
||||
delnurseStationConsumables(index) {
|
||||
this.form.nurseStationConsumables.splice(index, 1);
|
||||
console.log(this.form.nurseStationConsumables);
|
||||
},
|
||||
addnurseStationConsumables() {
|
||||
var obj = {
|
||||
@ -865,7 +844,6 @@ export default {
|
||||
}
|
||||
},
|
||||
choicenurseStation(item, index) {
|
||||
console.log(item);
|
||||
this.index = index;
|
||||
this.open2 = true;
|
||||
},
|
||||
@ -878,9 +856,6 @@ export default {
|
||||
this.reset2();
|
||||
},
|
||||
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].nurseStationName =
|
||||
item.nurseStationName;
|
||||
@ -928,10 +903,11 @@ export default {
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id: null,
|
||||
consumablePrice: null,
|
||||
sort: null,
|
||||
nurseStationId: "",
|
||||
nurseStationConsumables: [
|
||||
{
|
||||
nurseStationId: "",
|
||||
@ -947,7 +923,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
listStationConsumableinfo() {
|
||||
this.loading=true;
|
||||
this.loading = true;
|
||||
listStationConsumable(this.queryParams).then((response) => {
|
||||
this.stationConsumableList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -959,14 +935,7 @@ export default {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.listStationConsumableinfo();
|
||||
},
|
||||
//护理站分页
|
||||
// listinfo() {
|
||||
// list(this.nurseStationqueryParams).then((res) => {
|
||||
// this.nurseStationlist2 = res.rows;
|
||||
// console.log(this.nurseStationlist2);
|
||||
// this.total2 = res.total;
|
||||
// });
|
||||
// },
|
||||
|
||||
//护理站搜索
|
||||
handleQuery2() {
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
@ -977,28 +946,12 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
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.consumableCode = null;
|
||||
this.queryParams.consumableDetail = null;
|
||||
this.queryParams.consumableUnit = null;
|
||||
this.queryParams.consumablePrice = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.consumableCode = null;
|
||||
this.queryParams.consumableDetail = null;
|
||||
this.queryParams.consumableUnit = null;
|
||||
this.queryParams.consumablePrice = null;
|
||||
this.handleQuery();
|
||||
},
|
||||
//护理站重置
|
||||
resetQuery() {
|
||||
@ -1032,7 +985,6 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -1084,17 +1036,8 @@ export default {
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
console.log(res);
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
console.log(true);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total3 = res.total;
|
||||
} else {
|
||||
this.total3 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total3 = res.total;
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
@ -1103,8 +1046,9 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@ -12,28 +12,6 @@
|
||||
label="护理站名称"
|
||||
prop="nurseStationId"
|
||||
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
|
||||
v-model="queryParams.nurseStationId"
|
||||
@ -48,7 +26,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理项目编号" prop="nurseItemCode">
|
||||
<el-input
|
||||
v-model="queryParams.nurseItemCode"
|
||||
@ -121,6 +98,7 @@
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:stationItem:importStationItem']"
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -340,6 +318,7 @@
|
||||
v-model="scope.row.price"
|
||||
placeholder="小数点后两位(元)"
|
||||
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)}"
|
||||
></el-input>
|
||||
</template>
|
||||
@ -403,6 +382,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.consumableCount"
|
||||
placeholder="不可输入小数点"
|
||||
min="0"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
||||
type="number"
|
||||
></el-input>
|
||||
@ -475,7 +455,7 @@
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="stationlist"
|
||||
@click="handleQuery2"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
|
||||
@ -535,7 +515,7 @@
|
||||
:total="total4"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="stationlist"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 耗材弹框 -->
|
||||
@ -552,10 +532,10 @@
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="耗材包详情" prop="nurseStationId">
|
||||
<el-form-item label="耗材包名称" prop="nurseStationId">
|
||||
<el-input
|
||||
v-model="StationConsumablequeryParams.consumableDetail"
|
||||
placeholder="请输入耗材包详情"
|
||||
placeholder="请输入耗材包名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -612,7 +592,7 @@
|
||||
prop="consumableCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="服务项目耗材包详情"
|
||||
label="耗材包名称"
|
||||
align="center"
|
||||
prop="consumableDetail"
|
||||
/>
|
||||
@ -698,8 +678,6 @@ import {
|
||||
delNurseItem,
|
||||
addNurseItem,
|
||||
updateNurseItem,
|
||||
getInfoList,
|
||||
liststation,
|
||||
updatePicture,
|
||||
} from "@/api/system/nurseItem";
|
||||
import { getToken } from "@/utils/auth";
|
||||
@ -747,8 +725,6 @@ export default {
|
||||
stationConsumableList: [],
|
||||
// 护理站护理项目表格数据
|
||||
nurseItemList: [],
|
||||
//护理站类型表
|
||||
typelist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -783,7 +759,6 @@ export default {
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationItem: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: "",
|
||||
nurseItemContent: "",
|
||||
@ -825,14 +800,12 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.getInfoListinfo();
|
||||
this.infos();
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
this.form.nurseStationItem.itemPictureUrl = imgUrl;
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
@ -883,20 +856,15 @@ export default {
|
||||
//双击耗材包
|
||||
cellchoiceConsumable(item) {
|
||||
if (this.form.nurseStationItemConsumables.find((e) => e.id == item.id)) {
|
||||
console.log(1);
|
||||
this.form.nurseStationItemConsumables =
|
||||
this.form.nurseStationItemConsumables.filter((e) => e.id != item.id);
|
||||
} else {
|
||||
console.log(2);
|
||||
this.form.nurseStationItemConsumables.push(item);
|
||||
}
|
||||
console.log(this.form.nurseStationItemConsumables);
|
||||
},
|
||||
//选择耗材宝
|
||||
choiceConsumable(item) {
|
||||
console.log(item);
|
||||
this.form.nurseStationItemConsumables.push(item);
|
||||
console.log(this.form.nurseStationItemConsumables);
|
||||
},
|
||||
//护理站页面选择护理站
|
||||
choicestationid(item) {
|
||||
@ -904,7 +872,6 @@ export default {
|
||||
// this.form.nurseStationId = item.id;
|
||||
this.form.nurseStationItem.nurseStationName = item.nurseStationName;
|
||||
this.StationConsumablequeryParams.nurseStationId = item.id;
|
||||
// console.log(item);
|
||||
this.nurseStationshow = false;
|
||||
this.stationcancel();
|
||||
},
|
||||
@ -931,22 +898,13 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.stationlist();
|
||||
this.info();
|
||||
},
|
||||
//下拉框
|
||||
stationlist() {
|
||||
//护理站搜索
|
||||
handleQuery2() {
|
||||
this.loading = true;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.total4 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
//护理类型
|
||||
getInfoListinfo() {
|
||||
getInfoList().then((res) => {
|
||||
this.typelist = res.data;
|
||||
});
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
/** 耗材列表 */
|
||||
listStationConsumable() {
|
||||
@ -974,13 +932,6 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
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.total = response.total;
|
||||
this.loading = false;
|
||||
@ -988,15 +939,12 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
console.log(this.form.nurseStationItem);
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
|
||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
|
||||
this.open = false;
|
||||
@ -1039,8 +987,9 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationItem: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: null,
|
||||
nurseItemContent: null,
|
||||
@ -1074,27 +1023,13 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
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 {
|
||||
if (this.nurseStationlist[0]) {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseTypeId = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.nurseItemCode = null;
|
||||
this.queryParams.nurseItemName = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@ -1115,7 +1050,13 @@ export default {
|
||||
this.StationConsumablequeryParams.nurseStationId = null;
|
||||
const id = row.id || this.ids;
|
||||
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.StationConsumablequeryParams.nurseStationId =
|
||||
response.data.nurseStationItem.nurseStationId;
|
||||
@ -1155,26 +1096,20 @@ export default {
|
||||
e.nurseStationConsumableId = e.id;
|
||||
});
|
||||
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
|
||||
// this.form.nurseStationItem.nurseStationId = this.form.nurseStationId;
|
||||
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
console.log(valid);
|
||||
if (valid) {
|
||||
if (this.form.nurseStationItem.id != null) {
|
||||
this.form.nurseStationItemPrices.forEach((e) => {
|
||||
e.nurseStationItemId = this.form.nurseStationItem.id;
|
||||
});
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
updateNurseItem(this.form).then((response) => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
|
||||
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();
|
||||
@ -1196,8 +1131,9 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
@ -1210,10 +1146,8 @@ export default {
|
||||
})
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.nurseStationItem.itemPictureUrl);
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
obj.pictureUrlList.push(row.itemPictureUrl);
|
||||
updatePicture(obj).then((res) => {});
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
@ -1228,17 +1162,8 @@ export default {
|
||||
//权限列表
|
||||
info() {
|
||||
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.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.total4 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user