This commit is contained in:
曹辉 2022-11-18 12:49:07 +08:00
parent cbc01aa0c8
commit 420543a6bf
11 changed files with 1282 additions and 1415 deletions

View File

@ -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;
});
},

View File

@ -7,514 +7,501 @@ import {
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 {
} 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" },
],
},
};
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();
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;
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,
};
}
});
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: [
{
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: "",
},
],
},
];
},
// 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);
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;
}
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {
console.log(res);
});
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();
});
}
}
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
// this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => {
});
},
/** 删除按钮操作 */
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.$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);
this.goodsCategorylist = res.rows;
});
delGoodsInfo(row.goodsInfoId).then((res) => {
this.$message.success("删除成功");
this.getList();
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
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()
});
})
.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;
});
},
},
infos() {
var queryFor = {
pageNum: 1,
pageSize: 9999,
};
getListByUser(queryFor).then((res) => {
console.log(res)
this.handstationlist = res.rows;
});
},
},
};
};

View File

@ -12,7 +12,6 @@
<el-select
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,8 +465,8 @@
</template>
<script>
import goodsInfojs from './goodsInfojs'
export default goodsInfojs
import goodsInfojs from "./goodsInfojs";
export default goodsInfojs;
</script>
<style lang="scss" scoped>
</style>

View File

@ -56,13 +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>
@ -180,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

View File

@ -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"
@ -156,69 +145,73 @@
/>
<!-- 添加或修改护理类型信息对话框 -->
<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>
@ -262,7 +255,6 @@ export default {
userId: null,
nurseTypeCode: null,
nurseTypeName: null,
},
//
form: {},
@ -278,12 +270,12 @@ export default {
],
},
nurseTypeName: [
{
required: true,
message: "请输入护理类型名称",
trigger: "blur",
},
],
{
required: true,
message: "请输入护理类型名称",
trigger: "blur",
},
],
},
};
},
@ -291,8 +283,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 +298,6 @@ export default {
this.form.nurseTypeList.push(obj);
}
},
/** 查询护理类型信息列表 */
getList() {
this.loading = true;
@ -325,13 +316,11 @@ export default {
//
reset() {
this.form = {
nurseTypeList:[
nurseTypeList: [
{
nurseTypeName:"",
}
]
nurseTypeName: "",
},
],
};
this.resetForm("form");
},
@ -391,7 +380,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除护理类型信息的数据项?')
.confirm("是否确认删除护理类型信息的数据项?")
.then(function () {
return delNurseType(ids);
})

View File

@ -21,7 +21,6 @@
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="会员名称" prop="patientName">
<el-input
@ -66,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
@ -124,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" />
@ -151,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"
@ -169,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"
@ -201,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
@ -292,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>
@ -522,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",
@ -626,6 +585,7 @@ export default {
};
},
created() {
this.baseurl = baseurl
this.getList();
this.info();
this.infos();
@ -667,7 +627,7 @@ export default {
return "退款中";
case "CANCEL":
return "已取消";
case "REFUNDED":
case "REFUNDED":
return "已退款";
default:
break;
@ -775,41 +735,40 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
if (this.nurseStationlist[0]){
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
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,
// };
if (this.nurseStationlist[0]) {
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
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) => {
this.total = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList()
// 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>

View File

@ -8,10 +8,7 @@
v-show="showSearch"
label-width="68px"
>
<el-form-item
label="护理站"
prop="nurseStationId"
>
<el-form-item label="护理站" prop="nurseStationId">
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
@ -103,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>
@ -901,7 +898,6 @@
</template>
<script>
import personjs from './personjs'
export default personjs
import personjs from "./personjs";
export default personjs;
</script>

File diff suppressed because it is too large Load Diff

View File

@ -8,14 +8,6 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="所属护理站" prop="nurseStationName">
<el-input
v-model="getListByUserquery.nurseStationName"
placeholder="请输入护理站"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="护理站编号" prop="nurseStationCode">
<el-input
v-model="getListByUserquery.nurseStationCode"
@ -24,6 +16,14 @@
@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
@ -40,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
@ -50,7 +50,7 @@
v-hasPermi="['system:station:add']"
>新增</el-button
>
</el-col>
</el-col> -->
<el-col :span="1.5">
<el-button
type="success"
@ -71,7 +71,7 @@
icon="el-icon-upload2"
size="mini"
@click="handledata"
v-hasPermi="['system:station:importData']"
v-hasPermi="['system:station:importStationInfo']"
>导入</el-button
>
</el-col>
@ -100,7 +100,7 @@
prop="nurseStationName"
:show-overflow-tooltip="true"
/>
<el-table-column label="所属区域" align="center" prop="area">
<template slot-scope="scope">
<span>{{
@ -116,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" />
@ -646,7 +645,7 @@ export default {
}
console.log(this.looknurseStationLabel);
},
//
clickstreet(item) {
this.form.areaCode = item.areaCode;
@ -728,7 +727,7 @@ export default {
/** 搜索按钮操作 */
liststationinfo() {
this.loading = true;
this.info()
this.info();
},
handleQuery() {
this.loading = true;
@ -737,28 +736,27 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
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();
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) {
@ -903,20 +901,20 @@ export default {
info() {
//
getListByUser(this.getListByUserquery).then((res) => {
//
//
// /
this.nurseStationlist = res.rows;
this.total2 = res.total;
this.loading=false
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;
});
},

View File

@ -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();
@ -943,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;
@ -966,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() {
@ -1070,12 +1034,10 @@ export default {
this.upload.open = true;
},
//
info () {
info() {
getListByUser(this.getListByUserquery).then((res) => {
this.nurseStationlist = res.rows;
this.total3 = res.total;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList();
this.nurseStationlist = res.rows;
this.total3 = res.total;
});
},
infos() {
@ -1085,6 +1047,8 @@ export default {
};
getListByUser(queryFor).then((res) => {
this.handstationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList();
});
},
},

View File

@ -15,7 +15,6 @@
>
<el-select
v-model="queryParams.nurseStationId"
clearable
placeholder="请选择护理站"
>
<el-option
@ -99,6 +98,7 @@
icon="el-icon-upload2"
size="mini"
@click="handleExport"
v-hasPermi="['system:stationItem:importStationItem']"
>导入</el-button
>
</el-col>
@ -318,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>
@ -381,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>
@ -530,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>
@ -590,7 +592,7 @@
prop="consumableCode"
/>
<el-table-column
label="服务项目耗材包详情"
label="耗材包名称"
align="center"
prop="consumableDetail"
/>
@ -800,7 +802,7 @@ export default {
created() {
this.info();
this.infos();
this.getList();
// this.getList();
},
methods: {
imgUrl(imgUrl) {
@ -964,19 +966,21 @@ export default {
}
},
delnurseStationItemPrices(item) {
if (item.ids && !item.id) {
if (item.ids && !item.nurseItemPriceId) {
if (this.form.nurseStationItemPrices.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.form.nurseStationItemPrices =
this.form.nurseStationItemPrices.filter((e) => e.ids != item.ids);
}
} else if (!item.ids && item.id) {
} else if (!item.ids && item.nurseItemPriceId) {
if (this.form.nurseStationItemPrices.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.form.nurseStationItemPrices =
this.form.nurseStationItemPrices.filter((e) => e.id != item.id);
this.form.nurseStationItemPrices.filter(
(e) => e.nurseItemPriceId != item.nurseItemPriceId
);
}
}
},
@ -994,19 +998,23 @@ export default {
sort: null,
nurseStationName: "请选择所属护理站",
},
// nurseStationItemConsumables: [],
// nurseStationItemPrices: [
// {
// serveDurationUnit: null,
// price: null,
// description: null,
// ids: this.ids,
// },
// ],
nurseStationItemConsumables: [
// {
// nurseStationConsumableId: "",
// consumableCount: "",
// consumablePrice: "",
// },
],
nurseStationItemPrices: [
{
serveDurationUnit: null,
price: null,
description: null,
ids: this.ids,
},
],
};
this.resetForm("form");
console.log(this.form);
},
/** 搜索按钮操作 */
handleQuery() {
@ -1042,6 +1050,13 @@ export default {
this.StationConsumablequeryParams.nurseStationId = null;
const id = row.id || this.ids;
getNurseItem(id).then((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;
@ -1084,14 +1099,17 @@ export default {
this.$refs["form"].validate((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) => {});
}
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
@ -1106,7 +1124,6 @@ export default {
}
}
});
totaln;
},
infos() {
var queryFor = {
@ -1115,9 +1132,10 @@ export default {
};
getListByUser(queryFor).then((res) => {
this.handstationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList();
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
@ -1143,13 +1161,9 @@ export default {
//
info() {
//station /list //
//getListByUser //if // nurseStationlist --if
getListByUser(this.getListByUserquery).then((res) => {
this.total4 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.getList();
});
},
},