From f3a6a69b1e9e5a950ffda00a4ecee3614e6aff25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com>
Date: Thu, 17 Nov 2022 16:48:25 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/baseurl.js | 2 +-
src/assets/styles/xinyilu.scss | 494 ++++++------
src/directives.js | 14 -
src/main.js | 7 +-
src/views/system/OperateGoodsInfo/index.vue | 531 +------------
src/views/system/OperateGoodsInfo/indexjs.js | 471 ++++++++++++
src/views/system/StationDepartment/index.vue | 463 +-----------
src/views/system/StationDepartment/indexjs.js | 311 ++++++++
src/views/system/goodsInfo/index.vue | 573 +-------------
src/views/system/goodsInfo/indexjs.js | 431 +++++++++++
src/views/system/goodsOrder/index.vue | 613 ++++-----------
src/views/system/goodsOrder/indexjs.js | 424 +++++++++++
src/views/system/order/index.vue | 463 +++---------
src/views/system/order/indexjs.js | 335 +++++++++
src/views/system/person/index.vue | 708 +-----------------
src/views/system/person/indexjs.js | 579 ++++++++++++++
src/views/system/station/index.vue | 653 +---------------
src/views/system/station/stationjs.js | 452 +++++++++++
src/views/system/stationConsumable/index.vue | 578 +-------------
src/views/system/stationConsumable/indexjs.js | 418 +++++++++++
src/views/system/stationItem/index.vue | 641 +---------------
src/views/system/stationItem/stationItemjs.js | 506 +++++++++++++
22 files changed, 4603 insertions(+), 5064 deletions(-)
delete mode 100644 src/directives.js
create mode 100644 src/views/system/OperateGoodsInfo/indexjs.js
create mode 100644 src/views/system/StationDepartment/indexjs.js
create mode 100644 src/views/system/goodsInfo/indexjs.js
create mode 100644 src/views/system/goodsOrder/indexjs.js
create mode 100644 src/views/system/order/indexjs.js
create mode 100644 src/views/system/person/indexjs.js
create mode 100644 src/views/system/station/stationjs.js
create mode 100644 src/views/system/stationConsumable/indexjs.js
create mode 100644 src/views/system/stationItem/stationItemjs.js
diff --git a/src/api/baseurl.js b/src/api/baseurl.js
index c4f3e01..8998a23 100644
--- a/src/api/baseurl.js
+++ b/src/api/baseurl.js
@@ -1,3 +1,3 @@
-var baseurl = "http://192.168.16.76:8080";
+var baseurl = "http://192.168.16.30:8080";
export default baseurl
\ No newline at end of file
diff --git a/src/assets/styles/xinyilu.scss b/src/assets/styles/xinyilu.scss
index 1442a6b..b08588f 100644
--- a/src/assets/styles/xinyilu.scss
+++ b/src/assets/styles/xinyilu.scss
@@ -2,272 +2,300 @@
* 通用css样式布局处理
* Copyright (c) 2019 xinyilu
*/
-
/** 基础通用 **/
-.pt5 {
- padding-top: 5px;
-}
-.pr5 {
- padding-right: 5px;
-}
-.pb5 {
- padding-bottom: 5px;
-}
-.mt5 {
- margin-top: 5px;
-}
-.mr5 {
- margin-right: 5px;
-}
-.mb5 {
- margin-bottom: 5px;
-}
-.mb8 {
- margin-bottom: 8px;
-}
-.ml5 {
- margin-left: 5px;
-}
-.mt10 {
- margin-top: 10px;
-}
-.mr10 {
- margin-right: 10px;
-}
-.mb10 {
- margin-bottom: 10px;
-}
-.ml10 {
- margin-left: 10px;
-}
-.mt20 {
- margin-top: 20px;
-}
-.mr20 {
- margin-right: 20px;
-}
-.mb20 {
- margin-bottom: 20px;
-}
-.ml20 {
- margin-left: 20px;
-}
-.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
- font-family: inherit;
- font-weight: 500;
- line-height: 1.1;
- color: inherit;
-}
+ .pt5 {
+ padding-top: 5px;
+ }
-.el-dialog:not(.is-fullscreen) {
- margin-top: 6vh !important;
-}
+ .pr5 {
+ padding-right: 5px;
+ }
-.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
- overflow: auto;
- overflow-x: hidden;
- max-height: 70vh;
- padding: 10px 20px 0;
-}
+ .pb5 {
+ padding-bottom: 5px;
+ }
-.el-table {
- .el-table__header-wrapper, .el-table__fixed-header-wrapper {
- th {
- word-break: break-word;
- background-color: #f8f8f9;
- color: #515a6e;
- height: 40px;
- font-size: 13px;
- }
- }
- .el-table__body-wrapper {
- .el-button [class*="el-icon-"] + span {
- margin-left: 1px;
- }
- }
-}
+ .mt5 {
+ margin-top: 5px;
+ }
-/** 表单布局 **/
-.form-header {
- font-size:15px;
- color:#6379bb;
- border-bottom:1px solid #ddd;
- margin:8px 10px 25px 10px;
- padding-bottom:5px
-}
+ .mr5 {
+ margin-right: 5px;
+ }
-/** 表格布局 **/
-.pagination-container {
- position: relative;
- height: 25px;
- margin-bottom: 10px;
- margin-top: 15px;
- padding: 10px 20px !important;
-}
+ .mb5 {
+ margin-bottom: 5px;
+ }
-/* tree border */
-.tree-border {
- margin-top: 5px;
- border: 1px solid #e5e6e7;
- background: #FFFFFF none;
- border-radius:4px;
-}
+ .mb8 {
+ margin-bottom: 8px;
+ }
-.pagination-container .el-pagination {
- right: 0;
- position: absolute;
-}
+ .ml5 {
+ margin-left: 5px;
+ }
-@media ( max-width : 768px) {
- .pagination-container .el-pagination > .el-pagination__jump {
- display: none !important;
- }
- .pagination-container .el-pagination > .el-pagination__sizes {
- display: none !important;
- }
-}
+ .mt10 {
+ margin-top: 10px;
+ }
-.el-table .fixed-width .el-button--mini {
- padding-left: 0;
- padding-right: 0;
- width: inherit;
-}
+ .mr10 {
+ margin-right: 10px;
+ }
-/** 表格更多操作下拉样式 */
-.el-table .el-dropdown-link {
- cursor: pointer;
- color: #409EFF;
- margin-left: 5px;
-}
+ .mb10 {
+ margin-bottom: 10px;
+ }
-.el-table .el-dropdown, .el-icon-arrow-down {
- font-size: 12px;
-}
+ .ml10 {
+ margin-left: 10px;
+ }
-.el-tree-node__content > .el-checkbox {
- margin-right: 8px;
-}
+ .mt20 {
+ margin-top: 20px;
+ }
-.list-group-striped > .list-group-item {
- border-left: 0;
- border-right: 0;
- border-radius: 0;
- padding-left: 0;
- padding-right: 0;
-}
+ .mr20 {
+ margin-right: 20px;
+ }
-.list-group {
- padding-left: 0px;
- list-style: none;
-}
+ .mb20 {
+ margin-bottom: 20px;
+ }
-.list-group-item {
- border-bottom: 1px solid #e7eaec;
- border-top: 1px solid #e7eaec;
- margin-bottom: -1px;
- padding: 11px 0px;
- font-size: 13px;
-}
+ .ml20 {
+ margin-left: 20px;
+ }
-.pull-right {
- float: right !important;
-}
+ .h1,
+ .h2,
+ .h3,
+ .h4,
+ .h5,
+ .h6,
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ font-family: inherit;
+ font-weight: 500;
+ line-height: 1.1;
+ color: inherit;
+ }
-.el-card__header {
- padding: 14px 15px 7px;
- min-height: 40px;
-}
+ .el-dialog:not(.is-fullscreen) {
+ margin-top: 6vh !important;
+ }
-.el-card__body {
- padding: 15px 20px 20px 20px;
-}
+ .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
+ overflow: auto;
+ overflow-x: hidden;
+ max-height: 70vh;
+ padding: 10px 20px 0;
+ }
-.card-box {
- padding-right: 15px;
- padding-left: 15px;
- margin-bottom: 10px;
-}
+ .el-table {
+ .el-table__header-wrapper,
+ .el-table__fixed-header-wrapper {
+ th {
+ word-break: break-word;
+ background-color: #f8f8f9;
+ color: #515a6e;
+ height: 40px;
+ font-size: 13px;
+ }
+ }
+ .el-table__body-wrapper {
+ .el-button [class*="el-icon-"]+span {
+ margin-left: 1px;
+ }
+ }
+ }
+ /** 表单布局 **/
-/* button color */
-.el-button--cyan.is-active,
-.el-button--cyan:active {
- background: #20B2AA;
- border-color: #20B2AA;
- color: #FFFFFF;
-}
+ .form-header {
+ font-size: 15px;
+ color: #6379bb;
+ border-bottom: 1px solid #ddd;
+ margin: 8px 10px 25px 10px;
+ padding-bottom: 5px
+ }
+ /** 表格布局 **/
-.el-button--cyan:focus,
-.el-button--cyan:hover {
- background: #48D1CC;
- border-color: #48D1CC;
- color: #FFFFFF;
-}
+ .pagination-container {
+ position: relative;
+ height: 25px;
+ margin-bottom: 10px;
+ margin-top: 15px;
+ padding: 10px 20px !important;
+ }
+ /* tree border */
-.el-button--cyan {
- background-color: #20B2AA;
- border-color: #20B2AA;
- color: #FFFFFF;
-}
+ .tree-border {
+ margin-top: 5px;
+ border: 1px solid #e5e6e7;
+ background: #FFFFFF none;
+ border-radius: 4px;
+ }
-/* text color */
-.text-navy {
- color: #1ab394;
-}
+ .pagination-container .el-pagination {
+ right: 0;
+ position: absolute;
+ }
-.text-primary {
- color: inherit;
-}
+ @media ( max-width: 768px) {
+ .pagination-container .el-pagination>.el-pagination__jump {
+ display: none !important;
+ }
+ .pagination-container .el-pagination>.el-pagination__sizes {
+ display: none !important;
+ }
+ }
-.text-success {
- color: #1c84c6;
-}
+ .el-table .fixed-width .el-button--mini {
+ padding-left: 0;
+ padding-right: 0;
+ width: inherit;
+ }
+ /** 表格更多操作下拉样式 */
-.text-info {
- color: #23c6c8;
-}
+ .el-table .el-dropdown-link {
+ cursor: pointer;
+ color: #409EFF;
+ margin-left: 5px;
+ }
-.text-warning {
- color: #f8ac59;
-}
+ .el-table .el-dropdown,
+ .el-icon-arrow-down {
+ font-size: 12px;
+ }
-.text-danger {
- color: #ed5565;
-}
+ .el-tree-node__content>.el-checkbox {
+ margin-right: 8px;
+ }
-.text-muted {
- color: #888888;
-}
+ .list-group-striped>.list-group-item {
+ border-left: 0;
+ border-right: 0;
+ border-radius: 0;
+ padding-left: 0;
+ padding-right: 0;
+ }
-/* image */
-.img-circle {
- border-radius: 50%;
-}
+ .list-group {
+ padding-left: 0px;
+ list-style: none;
+ }
-.img-lg {
- width: 120px;
- height: 120px;
-}
+ .list-group-item {
+ border-bottom: 1px solid #e7eaec;
+ border-top: 1px solid #e7eaec;
+ margin-bottom: -1px;
+ padding: 11px 0px;
+ font-size: 13px;
+ }
-.avatar-upload-preview {
- position: absolute;
- top: 50%;
- transform: translate(50%, -50%);
- width: 200px;
- height: 200px;
- border-radius: 50%;
- box-shadow: 0 0 4px #ccc;
- overflow: hidden;
-}
+ .pull-right {
+ float: right !important;
+ }
-/* 拖拽列样式 */
-.sortable-ghost{
- opacity: .8;
- color: #fff!important;
- background: #42b983!important;
-}
+ .el-card__header {
+ padding: 14px 15px 7px;
+ min-height: 40px;
+ }
-.top-right-btn {
- position: relative;
- float: right;
-}
+ .el-card__body {
+ padding: 15px 20px 20px 20px;
+ }
+
+ .card-box {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-bottom: 10px;
+ }
+ /* button color */
+
+ .el-button--cyan.is-active,
+ .el-button--cyan:active {
+ background: #20B2AA;
+ border-color: #20B2AA;
+ color: #FFFFFF;
+ }
+
+ .el-button--cyan:focus,
+ .el-button--cyan:hover {
+ background: #48D1CC;
+ border-color: #48D1CC;
+ color: #FFFFFF;
+ }
+
+ .el-button--cyan {
+ background-color: #20B2AA;
+ border-color: #20B2AA;
+ color: #FFFFFF;
+ }
+ /* text color */
+
+ .text-navy {
+ color: #1ab394;
+ }
+
+ .text-primary {
+ color: inherit;
+ }
+
+ .text-success {
+ color: #1c84c6;
+ }
+
+ .text-info {
+ color: #23c6c8;
+ }
+
+ .text-warning {
+ color: #f8ac59;
+ }
+
+ .text-danger {
+ color: #ed5565;
+ }
+
+ .text-muted {
+ color: #888888;
+ }
+ /* image */
+
+ .img-circle {
+ border-radius: 50%;
+ }
+
+ .img-lg {
+ width: 120px;
+ height: 120px;
+ }
+
+ .avatar-upload-preview {
+ position: absolute;
+ top: 50%;
+ transform: translate(50%, -50%);
+ width: 200px;
+ height: 200px;
+ border-radius: 50%;
+ box-shadow: 0 0 4px #ccc;
+ overflow: hidden;
+ }
+ /* 拖拽列样式 */
+
+ .sortable-ghost {
+ opacity: .8;
+ color: #fff!important;
+ background: #42b983!important;
+ }
+
+ .top-right-btn {
+ position: relative;
+ float: right;
+ }
diff --git a/src/directives.js b/src/directives.js
deleted file mode 100644
index 99553b1..0000000
--- a/src/directives.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import Vue from 'vue'
-
-Vue.directive('loadmore', {
- bind(el, binding) {
- // 获取element-ui定义好的scroll盒子
- const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
- SELECTWRAP_DOM.addEventListener('scroll', function() {
- const CONDITION = this.scrollHeight - this.scrollTop === this.clientHeight;
- if (CONDITION == false) {
- binding.value()
- }
- })
- }
-})
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 5e41078..b432dfa 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,6 +1,5 @@
import Vue from 'vue'
-// import directives from "./directives";
-Vue.use(directives);
+
import Cookies from 'js-cookie'
@@ -41,10 +40,6 @@ import VueMeta from 'vue-meta'
import DictData from '@/components/DictData'
-import directives from "./directives";
-Vue.use(directives);
-
-
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
diff --git a/src/views/system/OperateGoodsInfo/index.vue b/src/views/system/OperateGoodsInfo/index.vue
index 4a0d696..7e3fa53 100644
--- a/src/views/system/OperateGoodsInfo/index.vue
+++ b/src/views/system/OperateGoodsInfo/index.vue
@@ -9,19 +9,9 @@
label-width="100px"
>
-
-
-
-
+ {{
+ queryParams.nurseStationName
+ }}
-
-
-
-
+
@@ -378,7 +330,7 @@
type="primary"
icon="el-icon-search"
size="mini"
- @click="addhd"
+ @click="info"
>搜索
-
+
+
+
diff --git a/src/views/system/StationDepartment/indexjs.js b/src/views/system/StationDepartment/indexjs.js
new file mode 100644
index 0000000..1194571
--- /dev/null
+++ b/src/views/system/StationDepartment/indexjs.js
@@ -0,0 +1,311 @@
+import {
+ listStationDepartment,
+ getStationDepartment,
+ delStationDepartment,
+ addStationDepartment,
+ updateStationDepartment,
+} from "@/api/system/StationDepartment";
+import { getListByUser } from "@/api/system/userlist.js";
+
+export default {
+ name: "StationDepartment",
+ 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("请输入正确的联系电话"));
+ };
+ return {
+ nurseStationlist: [],
+ // 遮罩层
+ loading: true,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ // 总条数
+ total: 0,
+ total2: 0,
+ // 护理站部门信息表格数据
+ StationDepartmentList: [],
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ addopen: false,
+ // 查询参数
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ departmentCode: null,
+ departmentName: null,
+ departmentPerson: null,
+ phone: null,
+ nurseStationName: null,
+ },
+ nurseStationqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 表单参数
+ form: {},
+ // 表单校验
+ rules: {
+ nurseStationDepartmentList: {
+ nurseStationId: [{
+ required: true,
+ message: "请选择所属护理站",
+ trigger: "blur",
+ }, ],
+ departmentName: [{
+ required: true,
+ message: "请选择科室名称",
+ trigger: "blur",
+ }, ],
+ departmentPerson: [{
+ required: true,
+ message: "请选择科室负责人",
+ trigger: "blur",
+ }, ],
+ phone: [{
+ required: true,
+ validator: checkMobile,
+ trigger: "blur",
+ message: "",
+ }, ],
+ },
+ nurseStationId: [{
+ required: true,
+ message: "请选择所属护理站",
+ trigger: "blur",
+ }, ],
+ departmentName: [{
+ required: true,
+ message: "请选择科室名称",
+ trigger: "blur",
+ }, ],
+ departmentPerson: [{
+ required: true,
+ message: "请选择科室负责人",
+ trigger: "blur",
+ }, ],
+ phone: [{
+ required: true,
+ validator: checkMobile,
+ trigger: "blur",
+ message: "",
+ }, ],
+ },
+ index: "",
+ stationid: null,
+ innerVisible: false,
+ homenumber: null,
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ ParamsStation(item) {
+ this.innerVisible = true
+ this.homenumber = item
+ this.stationid = this.queryParams.nurseStationId;
+ },
+ // add点击护理站名称
+ nurseclick(row) {
+ if (this.homenumber) {
+ this.stationid = this.queryParams.nurseStationId
+ this.queryParams.nurseStationName = row.nurseStationName;
+ this.queryParams.nurseStationId = row.id;
+ } else {
+ this.stationid = row.id;
+ this.form.nurseStationDepartmentList[this.index].nurseStationName =
+ row.nurseStationName;
+ this.form.nurseStationDepartmentList[this.index].nurseStationId = row.id;
+ }
+ this.innerVisible = false;
+ },
+ // 新增护理站按钮
+ clickinnerVisible(item, index) {
+ this.addresetQuery();
+ this.stationid = item.nurseStationId;
+ this.index = index;
+ this.innerVisible = true;
+ },
+ //删除deldisease
+ deldisease(index) {
+ this.form.nurseStationDepartmentList.splice(index, 1);
+ },
+ adddisease() {
+ var obj = {
+ nurseStationId: "",
+ departmentCode: "",
+ departmentName: "",
+ departmentPerson: "",
+ phone: "",
+ nurseStationName: "请选择所属护理站",
+ };
+ if (this.form.nurseStationDepartmentList.length == 5) {
+ this.$message.error("最多只能5条");
+ } else {
+ this.form.nurseStationDepartmentList.push(obj);
+ }
+ },
+ /** 查询护理站部门信息列表 */
+ getList() {
+ this.loading = true;
+ listStationDepartment(this.queryParams).then((response) => {
+ this.StationDepartmentList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 取消按钮
+ cancel() {
+ this.open = false;
+ this.addopen = false;
+ this.reset();
+ },
+ // 表单重置
+ reset() {
+ this.form = {
+ id: null,
+ nurseStationId: null,
+ departmentCode: null,
+ departmentName: null,
+ departmentPerson: null,
+ phone: null,
+ createBy: null,
+ createTime: null,
+ updateBy: null,
+ updateTime: null,
+ nurseStationName: null,
+ nurseStationId: null,
+ nurseStationDepartmentList: [{
+ nurseStationId: "",
+ departmentCode: "",
+ departmentName: "",
+ departmentPerson: "",
+ phone: "",
+ nurseStationName: "请选择所属护理站",
+ }, ],
+ };
+ this.resetForm("form");
+ },
+ /** 搜索按钮操作 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ innerVisiblecancel() {
+ this.innerVisible = false;
+ },
+ /** 重置按钮操作 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ departmentCode: null,
+ departmentName: null,
+ departmentPerson: null,
+ phone: null,
+ nurseStationName: null,
+ };
+ this.handleQuery();
+ },
+ addresetQuery() {
+ this.nurseStationqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ };
+ this.info();
+ },
+ //护理站list
+ info() {
+ this.loading = true
+ getListByUser(this.nurseStationqueryParams).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.total2 = res.total;
+ this.loading = false
+ });
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 新增按钮操作 */
+ handleAdd() {
+ this.homenumber = null
+ this.reset();
+ this.addopen = true;
+ // this.nurseStationName="",
+ this.title = "添加护理站部门信息";
+ },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+ const id = row.id || this.ids;
+ getStationDepartment(id).then((response) => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "修改护理站部门信息";
+ });
+ },
+ /** 提交按钮 */
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateStationDepartment(this.form).then((response) => {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addStationDepartment(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.addopen = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$modal
+ .confirm("是否确认删除护理站部门信息的数据项?")
+ .then(function() {
+ return delStationDepartment(ids);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("删除成功");
+ })
+ .catch(() => {});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ this.download(
+ "system/StationDepartment/export", {
+ ...this.queryParams,
+ },
+ `StationDepartment_${new Date().getTime()}.xlsx`
+ );
+ },
+ },
+};
\ No newline at end of file
diff --git a/src/views/system/goodsInfo/index.vue b/src/views/system/goodsInfo/index.vue
index 5943a38..7e8f0c9 100644
--- a/src/views/system/goodsInfo/index.vue
+++ b/src/views/system/goodsInfo/index.vue
@@ -9,19 +9,9 @@
label-width="100px"
>
-
-
-
-
+ {{
+ queryParams.nurseStationName
+ }}
-
-
-
-
取 消
-
-
+
@@ -457,546 +443,23 @@
:total="total2"
:page.sync="getListByUserquery.pageNum"
:limit.sync="getListByUserquery.pageSize"
- @pagination="handleQuery2"
+ @pagination="info"
/>
- -->
+
diff --git a/src/views/system/goodsInfo/indexjs.js b/src/views/system/goodsInfo/indexjs.js
new file mode 100644
index 0000000..918023e
--- /dev/null
+++ b/src/views/system/goodsInfo/indexjs.js
@@ -0,0 +1,431 @@
+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: [],
+ // 查询商品分类列表
+ 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: "是",
+ },
+ ],
+ 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,
+ 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" },
+ ],
+ },
+ stationid: null,
+ };
+ },
+ created() {
+ this.getList();
+ this.info();
+ },
+ methods: {
+ addcancel() {
+ this.innerVisible = false
+ },
+ upwhetherShelf(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) => {
+ 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;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 添加
+ addgoodAttributeDetail() {
+ 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) {
+ 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
+ );
+ }
+ }
+ },
+ // 取消按钮
+ cancel() {
+ var obj = { pictureUrlList: [] };
+ if (this.imgone != this.form.goodsPictureUrl) {
+ obj.pictureUrlList.push(this.form.goodsPictureUrl);
+ }
+ if (obj.pictureUrlList.length > 0) {
+ updatePicture(obj).then((res) => {});
+ }
+ this.open = false;
+ this.reset();
+ this.StationName = "请选择所属护理站";
+ this.goodDetailsLists = [{
+ attributeName: "",
+ goodAttributeDetailsLists: [{
+ attributePitureUrl: "",
+ goodsPrice: "",
+ goodsStock: "",
+ sort: "",
+ }, ],
+ }, ];
+ },
+ //护理站页面选择护理站
+ nurseclick(item) {
+ this.queryParams.nurseStationName = item.nurseStationName;
+ this.queryParams.nurseStationId = item.id;
+ this.stationid = item.id
+ this.innerVisible = false;
+ },
+ //页面所属护理站
+ ParamsStation(item) {
+ this.title = '选择护理站'
+ this.innerVisible = true
+ this.stationid = this.queryParams.nurseStationId;
+ },
+ //护理站列表
+ info() {
+ goodsCategory().then((res) => {
+ this.goodsCategorylist = res.rows;
+ });
+ getListByUser(this.getListByUserquery).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.total2 = res.total;
+ });
+ },
+ handleQuery2() {
+ this.info();
+ },
+ resetQuery2() {
+ this.resetForm("queryForm");
+ this.getListByUserquery = {
+ pageNum: 1,
+ pageSize: 10,
+ }
+ this.handleQuery2();
+ },
+ // 表单重置
+ 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) {
+ 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) {
+ const id = row.goodsInfoId || this.ids;
+ getGoodsInfo(id).then((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() {
+ this.form.goodAttributeDetailsLists = [];
+ this.form.goodDetailsLists = this.goodDetailsLists;
+ 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) => {});
+ }
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ // this.nurseStationId=this.form.nurseStationId
+ addGoodsInfo(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ this.$confirm("是否确认删除订单信息的数据项?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ var obj = { pictureUrlList: [] };
+ obj.pictureUrlList.push(row.goodsPictureUrl);
+ updatePicture(obj).then((res) => {});
+
+ delGoodsInfo(row.goodsInfoId).then((res) => {
+ this.$message.success("删除成功");
+ this.getList();
+ });
+ })
+ .catch(() => {});
+ },
+ imgUrl(imgUrl) {
+ this.form.goodsPictureUrl = imgUrl;
+ },
+ 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;
+ }
+ });
+ }
+ },
+ },
+};
\ No newline at end of file
diff --git a/src/views/system/goodsOrder/index.vue b/src/views/system/goodsOrder/index.vue
index 18613a4..624cc1d 100644
--- a/src/views/system/goodsOrder/index.vue
+++ b/src/views/system/goodsOrder/index.vue
@@ -8,21 +8,11 @@
v-show="showSearch"
label-width="90px"
>
-
-
-
-
-
-
+
+ {{
+ queryParams.nurseStationName
+ }}
+
重置
- 刷新商品订单
@@ -80,15 +74,10 @@
prop="orderNo"
width="190"
/>
-
+
-
+
修改物流单号
录入物流单号
录入物流单号
-
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/order/indexjs.js b/src/views/system/order/indexjs.js
new file mode 100644
index 0000000..665fbe1
--- /dev/null
+++ b/src/views/system/order/indexjs.js
@@ -0,0 +1,335 @@
+import {
+ appointmentOrderDetailsList,
+ Detailed,
+ deldetailed,
+ getPerson,
+ dispatchsubmit,
+ xylWeChatRefundNotify,
+ appointmentOrderDetails,
+} from "@/api/system/order";
+import { getListByUser } from "@/api/system/userlist.js";
+export default {
+ name: "order",
+ data() {
+ return {
+ orderStatuslist: [{
+ value: "WAIT_PAY",
+ label: "待付款",
+ },
+ {
+ value: "PAY",
+ label: "已付款",
+ },
+ {
+ value: "CANCEL",
+ label: "已取消",
+ },
+ {
+ value: "WAIT_DISPATCH",
+ label: "待派单",
+ },
+ {
+ value: "REFUNDED",
+ label: "已退款",
+ },
+
+ {
+ value: "WAIT_REFUND",
+ label: "退款中",
+ },
+ {
+ value: "COMPLETE",
+ label: "服务完成",
+ },
+
+ {
+ value: "NOT_FINISH",
+ label: "未完成",
+ },
+ ],
+ value: "",
+ // 遮罩层
+ loading: true,
+ innerVisible4: false,
+ innerrefund: false,
+ // 派单弹框
+ innerdispatch: false,
+ // 姓名弹框
+ nursePersonNameinfo: false,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ input: "",
+ // 总条数
+ total: 0,
+ // 护理类型信息表格数据
+ OrderDetailsList: [],
+ dispatchlist: [],
+ nurseName: "请选择护理员",
+ nursePersonid: "",
+ // querynursecencel:{
+ // appointmentOrderId:"",
+ // },
+ appointmentOrderId: "",
+ nurseStationPersonId: "",
+ total2: 0,
+ //护理站
+ stationtotal: 0,
+ nurseStationlist: [],
+ nurseStationshow: false,
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ open2: false,
+ // 查询参数
+ getListByUserquery: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ queryParams: {
+ patientName: null,
+ orderNo: null,
+ nurseStationId: null,
+ // orderStatus: null,
+ orderStatus: "",
+ pageNum: 1,
+ pageSize: 10,
+ },
+ querynursePersonname: {
+ orderNo: "",
+ nursePersonName: null,
+ nursePersonType: null,
+ departmentName: null,
+ pageNum: 1,
+ pageSize: 10,
+ },
+ query: [],
+ // 表单参数
+ form: {},
+ // 表单校验
+ rules: {},
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ //取消预约确定按钮
+ ordercacenl() {
+ var obj = {
+ orderNo: this.query.orderNo,
+ refundPrice: this.query.totalPrice,
+ refundReason: this.query.cancelAppointmentReason,
+ };
+ xylWeChatRefundNotify(obj).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("退款有延迟,请耐心等待");
+ }
+ this.getList();
+ this.innerrefund = false;
+ console.log(res);
+ });
+ },
+ // 取消按钮
+ cencelbtn() {
+ this.innerrefund = false;
+ },
+ switchOrderStatus(orderStatus) {
+ switch (orderStatus) {
+ case "WAIT_PAY":
+ return "待付款";
+ case "WAIT_DISPATCH":
+ return "待派单";
+ case "NOT_FINISH":
+ return "未完成";
+ case "COMPLETE":
+ return "服务完成";
+ case "PAY":
+ return "已付款";
+ case "WAIT_REFUND":
+ return "退款中";
+ case "CANCEL":
+ return "已取消";
+ case "REFUNDED":
+ return "已退款";
+ default:
+ break;
+ }
+ },
+ // 查看
+ seeLook(row) {
+ const id = row.orderNo;
+ appointmentOrderDetails(id).then((res) => {
+ res.data.forEach((e) => {
+ if (e.serviceDate) {
+ e.time =
+ e.serviceDate + "-" + e.serviceStartTime + "-" + e.serviceEndTime;
+ }
+ });
+ this.query = res.data[0];
+ this.innerVisible4 = true;
+ console.log(this.query);
+ });
+ },
+ // 派单
+ dispatch(row) {
+ console.log(row);
+ this.querynursePersonname.orderNo = row.orderNo;
+ this.nurseName = "请选择护理员";
+ this.innerdispatch = true;
+ this.nursePersonid = "";
+ },
+ // 姓名弹框
+ clicknursePersonName() {
+ getPerson(this.querynursePersonname).then((res) => {
+ this.dispatchlist = res.rows;
+ this.total2 = res.total;
+ this.nursePersonNameinfo = true;
+ });
+ },
+ // 姓名弹框确定按钮
+ submitForm() {
+ let params = {
+ nurseStationPersonId: this.nursePersonid,
+ orderNo: this.querynursePersonname.orderNo,
+ };
+ dispatchsubmit(params).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("派单成功");
+ }
+ this.innerdispatch = false;
+ this.getList();
+ this.nurseName = "请选择护理员";
+ });
+ },
+ // 选择姓名按钮
+ nursePersonclick(row) {
+ this.nursePersonid = row.nurseStationPersonId;
+ this.nurseName = row.nursePersonName;
+ this.nursePersonNameinfo = false;
+ console.log(row);
+ },
+ // 确认取消预约
+ cencel(row) {
+ Detailed(row.orderNo).then((res) => {
+ this.query = res.data;
+ this.innerrefund = true;
+ });
+ },
+ clicknurseStationshow() {
+ this.nurseStationshow = false;
+ },
+ //护理站重置
+ stationcancel() {
+ this.getListByUserquery = {
+ pageNum: 1,
+ pageSize: 10,
+ };
+ this.info();
+ },
+ //护理站页面选择护理站
+ choicestationid(item) {
+ this.queryParams.nurseStationName = item.nurseStationName;
+ this.queryParams.nurseStationId = item.id;
+ this.nurseStationshow = false;
+ },
+ //护理站list
+ info() {
+ getListByUser(this.getListByUserquery).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.stationtotal = res.total;
+ });
+ },
+ //页面所属护理站
+ ParamsStation(item) {
+ this.info();
+ this.nurseStationshow = true
+ },
+ /** 查询护理类型信息列表 */
+ getList() {
+ this.loading = true;
+ appointmentOrderDetailsList(this.queryParams).then((response) => {
+ this.OrderDetailsList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 取消按钮
+ cancel() {
+ this.open = false;
+ this.reset();
+ },
+ // 表单重置
+ reset() {
+ this.form = {
+ patientName: "",
+ orderNo: "",
+ orderStatus: "",
+ createTime: null,
+ };
+ this.resetForm("form");
+ },
+ /** 搜索按钮操作 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ handleQuery2() {
+ getPerson(this.querynursePersonname).then((res) => {
+ this.dispatchlist = res.rows;
+ console.log(this.querynursePersonname);
+ // this.innerdispatch = true;
+ });
+ },
+ /** 重置按钮操作 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ };
+ this.handleQuery();
+ },
+ resetQuery2() {
+ this.resetForm("queryForm");
+ this.handleQuery2();
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ // console.log('row :>> ', row);
+ this.$confirm("是否确认删除订单信息的数据项?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ deldetailed(row.appointmentOrderId).then((res) => {
+ this.$message.success("删除成功");
+ this.getList();
+ });
+ })
+ .catch(() => {});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ this.download(
+ "system/nurseType/export", {
+ ...this.queryParams,
+ },
+ `nurseType_${new Date().getTime()}.xlsx`
+ );
+ },
+ },
+};
\ No newline at end of file
diff --git a/src/views/system/person/index.vue b/src/views/system/person/index.vue
index 799c3b6..4b92ca9 100644
--- a/src/views/system/person/index.vue
+++ b/src/views/system/person/index.vue
@@ -6,43 +6,12 @@
size="small"
:inline="true"
v-show="showSearch"
- label-width="68px"
+ label-width="70px"
>
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {{
+ queryParams.nurseStationName
+ }}
-
-
-
-
+
diff --git a/src/views/system/person/indexjs.js b/src/views/system/person/indexjs.js
new file mode 100644
index 0000000..cdaff9f
--- /dev/null
+++ b/src/views/system/person/indexjs.js
@@ -0,0 +1,579 @@
+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: [],
+ 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,
+ nurseStationName: 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" },
+ ],
+ },
+ },
+ homenumber: null,
+ };
+ },
+ created() {
+ this.getList();
+ },
+ 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() {
+ 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) {
+ if (this.homenumber) {
+ this.queryParams.nurseStationName = row.nurseStationName;
+ this.queryParams.nurseStationId = row.id;
+ } else {
+ this.nurseStationName = row.nurseStationName;
+ this.stationid2 = row.id;
+ this.form.nurseStationId = row.id;
+ this.queryParams3.nurseStationId = row.id;
+ this.form.nursename = row.nurseStationName;
+ }
+ this.innerVisiblexg = false;
+ },
+ // 护理站名称
+ 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) {
+ this.departmentName = row.departmentName;
+ this.form.departmentCode = row.departmentCode;
+ this.departid2 = row.departmentCode;
+ this.form.departmentName = row.id;
+ this.innerVisiblexg2 = false;
+ },
+
+ //主页面打开护理站列表
+ ParamsStation(item) {
+ this.innerVisiblexg = true
+ this.title2 = '选择护理站'
+ this.homenumber = item
+ this.stationid2 = this.queryParams.nurseStationId;
+ },
+
+ //护理站列表
+ info() {
+ this.loading = true;
+ getListByUser(this.nurseStationqueryParams).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.nursetotal = res.total;
+ this.loading = 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.resetQuery4();
+ },
+ 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() {
+ 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();
+ },
+ // 多选框选中数据
+ 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) {
+ this.homenumber = null;
+ 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(
+ "" +
+ response.msg +
+ "
",
+ "导入结果", { 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`
+ );
+ },
+ },
+};
\ No newline at end of file
diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue
index 3ecb820..c2ef653 100644
--- a/src/views/system/station/index.vue
+++ b/src/views/system/station/index.vue
@@ -1,57 +1,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
@@ -127,13 +97,6 @@
prop="nurseStationName"
:show-overflow-tooltip="true"
/>
-
{{
@@ -149,7 +112,6 @@
prop="address"
:show-overflow-tooltip="true"
/>
-
@@ -182,40 +144,13 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/system/station/stationjs.js b/src/views/system/station/stationjs.js
new file mode 100644
index 0000000..7eb55c5
--- /dev/null
+++ b/src/views/system/station/stationjs.js
@@ -0,0 +1,452 @@
+import {
+ listStation,
+ getStation,
+ delStation,
+ addStation,
+ updateStation,
+ getFirstLevelInfo,
+ getSecondaryLevelInfo,
+ updatePicture,
+} from "@/api/system/station";
+import stationAcatar from "../stationAvatar/index.vue";
+import { getListByUser } from "@/api/system/userlist.js";
+import { getToken } from "@/utils/auth";
+import editor from "@/components/Editor";
+export default {
+ components: { stationAcatar, editor },
+ name: "Station",
+ 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 (!value) {
+ //所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
+ return cb();
+ } else {
+ if (regMobile.test(value)) {
+ return cb();
+ } else {
+ cb(new Error("请输入正确的联系电话"));
+ }
+ }
+ };
+ return {
+ imageUrl: "",
+ imageUrl2: "",
+ imgtwo: "",
+ imgone: "",
+ // 用户导入参数
+ upload: {
+ // 是否显示弹出层(用户导入)
+ open: false,
+ // 弹出层标题(用户导入)
+ title: "",
+ // 是否禁用上传
+ isUploading: false,
+ // 设置上传的请求头部
+ headers: { Authorization: "Bearer " + getToken() },
+ // 上传的地址
+ url: process.env.VUE_APP_BASE_API +
+ "/system/station/insertNurseStationImportList",
+ },
+ //护理类型
+ nurseTypeCode: "nurse_type_code",
+ nurseStationTypelist: [],
+ nurseStationType2: null,
+ // 遮罩层
+ loading: true,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ // 总条数
+ total2: 0,
+ //所属标签
+ looknurseStationLabel: [{
+ labelDescription: "",
+ sort: "",
+ ids: 1,
+ }, ],
+ // 护理站信息表格数据
+ stationList: [{
+ sysAreaVOList: [{
+ provinceName: null,
+ cityName: null,
+ streetName: null,
+ }, ],
+ }, ],
+ nurseStationlist: [],
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ //权限查询
+ getListByUserquery: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 表单参数
+ form: {},
+ ids: 1,
+ provincelist: [],
+ arealist: [],
+ citylist: [],
+ streetlist: [],
+ resid: null,
+ // 表单校验
+ rules: {
+ agencyIntroduce: [
+ { required: true, message: "请输入护理站简介", trigger: "blur" },
+ ],
+ stationIntroducePcitureUrl: [
+ { required: true, message: "请上传护理站简介头像", trigger: "blur" },
+ ],
+ stationPictureUrl: [
+ { required: true, message: "请上传护理站头像", trigger: "blur" },
+ ],
+ nurseStationDescription: [
+ { required: true, message: "护理站总概述不能为空", trigger: "blur" },
+ ],
+ phone: [{
+ required: true,
+ validator: checkMobile,
+ trigger: "blur",
+ message: "",
+ }, ],
+
+ dutyPhone: [{
+ validator: checkMobile2,
+ trigger: "blur",
+ message: "",
+ }, ],
+ sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
+ address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
+ longitude: [
+ { required: true, message: "经度不能为空", trigger: "blur" },
+ ],
+ latitude: [
+ { required: true, message: "纬度不能为空", trigger: "blur" },
+ ],
+ areaCode: [
+ { required: true, message: "所属区域不能为空", trigger: "blur" },
+ ],
+ nurseStationName: [
+ { required: true, message: "护理站名称不能为空", trigger: "blur" },
+ ],
+ nurseStationType: [
+ { required: true, message: "请选择护理站类型", trigger: "blur" },
+ ],
+ },
+ };
+ },
+ created() {
+ this.getaddress();
+ this.info();
+ },
+ methods: {
+ imgUrl(imgUrl) {
+ this.form.stationPictureUrl = imgUrl;
+ },
+ imgUrl2(imgUrl) {
+ this.form.stationIntroducePcitureUrl = imgUrl;
+ },
+ delnurseStationLabelList(index, item) {
+ console.log(index, item);
+ console.log();
+ // this.looknurseStationLabel.splice(index,1)
+ if (this.looknurseStationLabel.length === 1) {
+ this.looknurseStationLabel = [{
+ labelDescription: "",
+ sort: "",
+ ids: 1,
+ }, ];
+ } else {
+ this.looknurseStationLabel.splice(index, 1);
+ }
+
+ console.log(this.form.nurseStationLabelList);
+ },
+ addnurseStationLabelList() {
+ if (this.looknurseStationLabel.length == 5) {
+ this.$message.error("最多只能5条");
+ } else {
+ this.ids++;
+ var obj = {
+ labelDescription: "",
+ sort: "",
+ ids: this.ids,
+ };
+ this.looknurseStationLabel.push(obj);
+ }
+ console.log(this.looknurseStationLabel);
+ },
+ //点击街道
+ clickstreet(item) {
+ this.form.areaCode = item.areaCode;
+ console.log(item, this.form);
+ },
+ //点击区县城
+ clickarea(item) {
+ this.form.areaCode = "";
+ this.form.streetCode = "";
+ getSecondaryLevelInfo(item.id).then((res) => {
+ this.streetlist = res.data;
+ });
+ },
+ //点击市
+ clickcity(item) {
+ this.form.regionName = "";
+ this.form.areaCode = "";
+ this.form.streetCode = "";
+ getSecondaryLevelInfo(item.id).then((res) => {
+ this.arealist = res.data;
+ });
+ },
+ //点击省
+ province(item) {
+ this.form.cityName = "";
+ this.form.regionName = "";
+ this.form.areaCode = "";
+ this.form.streetCode = "";
+ getSecondaryLevelInfo(item.id).then((res) => {
+ this.citylist = res.data;
+ });
+ },
+ /** 获取省列表 */
+ getaddress() {
+ getFirstLevelInfo().then((res) => {
+ this.provincelist = res.data;
+ });
+ },
+ getList() {
+ this.info();
+ },
+ // 取消按钮
+ cancel() {
+ var obj = { pictureUrlList: [] };
+ if (this.imgone != this.form.stationIntroducePcitureUrl) {
+ obj.pictureUrlList.push(this.form.stationIntroducePcitureUrl);
+ }
+ if (this.imgtwo != this.form.stationPictureUrl) {
+ obj.pictureUrlList.push(this.form.stationPictureUrl);
+ }
+ if (obj.pictureUrlList.length > 0) {
+ updatePicture(obj).then((res) => {});
+ }
+ this.open = false;
+ this.reset();
+ },
+ // 表单重置
+ reset() {
+ this.nurseStationType2 = [];
+ this.form = {
+ id: null,
+ areaCode: 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,
+ stationIntroducePcitureUrl: null,
+ sort: null,
+ nurseStationLabelList: [],
+ streetCode: null,
+ };
+ this.resetForm("form");
+ },
+ //护理站列表
+ info() {
+ this.loading = true
+ getListByUser(this.getListByUserquery).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.total2 = res.total;
+ this.loading = false
+ });
+ },
+ handleQuery() {
+ this.loading = true;
+ this.getListByUserquery.pageNum = 1;
+ this.info();
+ },
+ /** 重置按钮操作 */
+ 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();
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 新增按钮操作 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.looknurseStationLabel = [{
+ labelDescription: "",
+ sort: "",
+ ids: 1,
+ }, ];
+ this.title = "添加护理站信息";
+ },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+ this.reset();
+ this.loading = true;
+ const id = row.id || this.ids;
+ getStation(id).then((response) => {
+ this.form = response.data;
+ this.form.streetCode = this.form.streetName;
+ this.imgone = this.form.stationIntroducePcitureUrl;
+ this.imgtwo = this.form.stationPictureUrl;
+ this.looknurseStationLabel = response.data.nurseStationLabel;
+ this.open = true;
+ this.loading = false;
+ console.log(this.form);
+ });
+ },
+ /** 提交按钮 */
+ submitForm() {
+ this.form.nurseStationLabelList = this.looknurseStationLabel;
+ this.form.nurseStationType = this.nurseStationType2;
+ console.log(this.form);
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ this.form.areaCode = Number(this.form.areaCode);
+ this.form.nurseStationType = this.nurseStationType2.join(",");
+ if (this.form.id != null) {
+ updateStation(this.form).then((response) => {
+ var obj = { pictureUrlList: [] };
+ if (this.imgone != this.form.stationIntroducePcitureUrl) {
+ obj.pictureUrlList.push(this.imgone);
+ }
+ if (this.imgtwo != this.form.stationPictureUrl) {
+ obj.pictureUrlList.push(this.imgtwo);
+ }
+ if (obj.pictureUrlList.length > 0) {
+ updatePicture(obj).then((res) => {});
+ }
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addStation(this.form).then((response) => {
+ if (response.code) {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ } else {
+ this.form.nurseStationType = obj;
+ }
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$modal
+ .confirm("是否确认删除此护理站信息?")
+ .then(function() {
+ return delStation(ids);
+ })
+ .then(() => {
+ var obj = { pictureUrlList: [] };
+ obj.pictureUrlList.push(row.stationIntroducePcitureUrl);
+ obj.pictureUrlList.push(row.stationPictureUrl);
+ if (obj.pictureUrlList.length > 0) {
+ updatePicture(obj).then((res) => {});
+ }
+ this.getList();
+ this.$modal.msgSuccess("删除成功");
+ })
+ .catch(() => {});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ this.download(
+ "system/station/export", {
+ ...this.getListByUserquery,
+ },
+ `station_${new Date().getTime()}.xlsx`
+ );
+ },
+ /** 导入按钮操作 */
+ handledata() {
+ this.upload.title = "护理站信息导入";
+ this.upload.open = true;
+ },
+ /** 下载模板操作 */
+ importTemplate() {
+ this.download(
+ "/system/station/downloadTemplate?fileType=nurseStation", {},
+ `护理站信息导入模板.xlsx`
+ );
+ },
+ // 提交上传文件
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
+ // 文件上传成功处理
+ handleFileSuccess(response, file, fileList) {
+ this.upload.open = false;
+ this.upload.isUploading = false;
+ this.$refs.upload.clearFiles();
+ this.$alert(
+ "" +
+ response.msg +
+ "
",
+ "导入结果", { dangerouslyUseHTMLString: true }
+ );
+ this.getList();
+ },
+ // 文件上传中处理
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ },
+ },
+};
\ No newline at end of file
diff --git a/src/views/system/stationConsumable/index.vue b/src/views/system/stationConsumable/index.vue
index 0a0aa98..4f50323 100644
--- a/src/views/system/stationConsumable/index.vue
+++ b/src/views/system/stationConsumable/index.vue
@@ -6,43 +6,16 @@
size="small"
:inline="true"
v-show="showSearch"
- label-width="110px"
+ label-width="150px"
>
-
-
-
-
-
-
-
-
-
-
-
+ {{
+ queryParams.nurseStationName
+ }}
-
+
@@ -160,7 +133,7 @@
prop="consumableCode"
/>
@@ -236,10 +209,10 @@
{{ form.nurseStationName }}
-
+
@@ -253,7 +226,7 @@
取 消
-
@@ -413,6 +385,15 @@
:inline="true"
label-width="90px"
>
+
+
+
-
-
-
+
-
-
-
-
-
-
-
+
-
-
+
diff --git a/src/views/system/stationConsumable/indexjs.js b/src/views/system/stationConsumable/indexjs.js
new file mode 100644
index 0000000..4ddf7f4
--- /dev/null
+++ b/src/views/system/stationConsumable/indexjs.js
@@ -0,0 +1,418 @@
+import {
+ listStationConsumable,
+ getStationConsumable,
+ delStationConsumable,
+ addStationConsumable,
+ updateStationConsumable,
+ list,
+} from "@/api/system/stationConsumable";
+import { getListByUser } from "@/api/system/userlist.js";
+import { getToken } from "@/utils/auth";
+export default {
+ name: "StationConsumable",
+ data() {
+ return {
+ upload: {
+ // 是否显示弹出层(用户导入)
+ open: false,
+ // 弹出层标题(用户导入)
+ title: "",
+ // 是否禁用上传
+ isUploading: false,
+ // 设置上传的请求头部
+ headers: { Authorization: "Bearer " + getToken() },
+ // 上传的地址
+ url: process.env.VUE_APP_BASE_API + "/system/stationConsumable/importData",
+ },
+ value: "",
+ // 遮罩层
+ loading: true,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ // 总条数
+ total: 0,
+ total2: 0,
+ total3: 0,
+ // 护理站耗材信息表格数据
+ stationConsumableList: [],
+ nurseStationlist: [],
+ nurseStationlist2: [],
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ open2: false,
+ open3: false,
+ xgopen: false,
+ index: "",
+ //权限查询
+ getListByUserquery: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 查询参数
+ nurseStationqueryParams: {
+ 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,
+ },
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ nurseStationName: null,
+ userId: null,
+ consumableCode: null,
+ consumableDetail: null,
+ consumableUnit: null,
+ consumablePrice: null,
+ sort: null,
+ },
+ // 表单参数
+ form: {},
+ // 表单校验
+ rules: {
+ nurseStationId: [{
+ required: true,
+ message: "请选择所属护理站",
+ trigger: "blur",
+ }, ],
+ consumableDetail: [{
+ required: true,
+ message: "请输入耗材包详情",
+ trigger: "blur",
+ }, ],
+ consumableUnit: [{
+ required: true,
+ message: "请输入耗材包单位",
+ trigger: "blur",
+ }, ],
+ consumablePrice: [{
+ required: true,
+ message: "请输入耗材包价格",
+ trigger: "blur",
+ }, ],
+ sort: [{
+ required: true,
+ message: "请输入排序",
+ trigger: "blur",
+ }, ],
+ nurseStationConsumables: {
+ consumableDetail: [{
+ required: true,
+ message: "请输入耗材包详情",
+ trigger: "blur",
+ }, ],
+ nurseStationId: [{
+ required: true,
+ message: "请选择所属护理站",
+ trigger: "blur",
+ }, ],
+ consumableUnit: [{
+ required: true,
+ message: "请输入耗材包单位",
+ trigger: "blur",
+ }, ],
+ consumablePrice: [{
+ required: true,
+ message: "请输入耗材包价格",
+ trigger: "blur",
+ }, ],
+ sort: [{
+ required: true,
+ message: "请输入排序",
+ trigger: "blur",
+ }, ],
+ },
+ },
+ homenumber: null,
+ stationid: null,
+ };
+ },
+ created() {
+ this.getList();
+ // this.listinfo();
+ },
+ methods: {
+ /** 下载模板操作 */
+ importTemplate() {
+ this.download(
+ "/system/stationItem/downloadTemplate?fileType=2", {},
+ `护理站耗材信息导入模板.xlsx`
+ );
+ },
+ // 提交上传文件
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
+ // 文件上传成功处理
+ handleFileSuccess(response, file, fileList) {
+ this.upload.open = false;
+ this.upload.isUploading = false;
+ this.$refs.upload.clearFiles();
+ this.$alert(
+ "" +
+ response.msg +
+ "
",
+ "导入结果", { dangerouslyUseHTMLString: true }
+ );
+ this.getList();
+ },
+ // 文件上传中处理
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ },
+ delnurseStationConsumables(index) {
+ this.form.nurseStationConsumables.splice(index, 1);
+ },
+ addnurseStationConsumables() {
+ var obj = {
+ nurseStationId: "",
+ consumableUnit: null,
+ sort: "",
+ consumablePrice: "",
+ consumableDetail: null,
+ nurseStationName: "请选择所属护理站",
+ };
+ if (this.form.nurseStationConsumables.length == 5) {
+ this.$message.error("最多只能5条");
+ } else {
+ this.form.nurseStationConsumables.push(obj);
+ }
+ },
+ choicenurseStation(item, index) {
+ this.index = index;
+ this.open2 = true;
+ this.info();
+ },
+ //页面所属护理站
+ ParamsStation(item) {
+ console.log(this.queryParams)
+ this.open3 = true
+ this.homenumber = item
+ this.stationid = this.queryParams.nurseStationId;
+ },
+ //点击护理站左侧按钮
+ clicknurseStation2(item) {
+ this.queryParams.nurseStationName = item.nurseStationName
+ this.queryParams.nurseStationId = item.id
+ this.form.nurseStationId = item.id;
+ this.form.nurseStationName = item.nurseStationName;
+ this.open3 = false;
+ this.reset2();
+ },
+ clicknurseStation(item) {
+ this.form.nurseStationConsumables[this.index].nurseStationId = item.id;
+ this.form.nurseStationConsumables[this.index].nurseStationName =
+ item.nurseStationName;
+ this.open2 = false;
+ this.reset2();
+ },
+ /** 查询护理站耗材信息列表 */
+ getList() {
+ this.loading = true;
+ this.listStationConsumableinfo();
+ },
+ // 取消按钮
+ cancel() {
+ this.open = false;
+ this.xgopen = false;
+ this.nurseStationName = "请选择所属护理站";
+ this.reset();
+ },
+ cancel2() {
+ this.open2 = false;
+ this.open3 = false;
+ this.reset2();
+ },
+ // 表单重置
+ reset2() {
+ 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,
+ };
+ },
+ reset() {
+ this.form = {
+ id: null,
+ consumablePrice: null,
+ sort: null,
+ nurseStationId: "",
+ nurseStationConsumables: [{
+ nurseStationId: "",
+ consumableUnit: null,
+ sort: "",
+ consumablePrice: "",
+ consumableDetail: null,
+ nurseStationName: "请选择所属护理站",
+ }, ],
+ };
+ this.resetForm("form");
+ },
+ /** 搜索按钮操作 */
+ listStationConsumableinfo() {
+ listStationConsumable(this.queryParams).then((response) => {
+ this.stationConsumableList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ handleQuery() {
+ this.loading = true;
+ this.queryParams.pageNum = 1;
+ this.listStationConsumableinfo();
+ },
+ //护理站搜索
+ handleQuery2() {
+ this.getListByUserquery.pageNum = 1;
+ getListByUser(this.getListByUserquery).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.total3 = res.total;
+ });
+ },
+ /** 重置按钮操作 */
+ sresetQuery() {
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ userId: null,
+ consumableCode: null,
+ consumableDetail: null,
+ consumableUnit: null,
+ consumablePrice: null,
+ sort: null,
+ };
+ this.handleQuery();
+ },
+ //护理站重置
+ resetQuery() {
+ this.reset2();
+ this.handleQuery2();
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 新增按钮操作 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "添加护理站耗材信息";
+ this.cancel2();
+ },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+ this.loading = true;
+ this.reset();
+ const id = row.id || this.ids;
+ getStationConsumable(id).then((response) => {
+ this.form = response.data;
+ this.xgopen = true;
+ this.title = "修改护理站耗材信息";
+ this.loading = false;
+ });
+ },
+ /** 提交按钮 */
+ submitForm() {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateStationConsumable(this.form).then((response) => {
+ this.$modal.msgSuccess("修改成功");
+ this.xgopen = false;
+ this.getList();
+ });
+ } else {
+ addStationConsumable(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.nurseStationName = "请选择所属护理站";
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$modal
+ .confirm("是否确认删除?")
+ .then(function() {
+ return delStationConsumable(ids);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("删除成功");
+ })
+ .catch(() => {});
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ this.download(
+ "system/stationConsumable/export", {
+ ...this.queryParams,
+ },
+ `stationConsumable_${new Date().getTime()}.xlsx`
+ );
+ },
+ /** 导入按钮操作 */
+ handleport() {
+ this.upload.title = "护理站耗材导入";
+ this.upload.open = true;
+ },
+ //护理站列表
+ info() {
+ getListByUser(this.getListByUserquery).then((res) => {
+ if (res.rows[0].isAdmin == "1") {
+ 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();
+ }
+ });
+ },
+ },
+};
\ No newline at end of file
diff --git a/src/views/system/stationItem/index.vue b/src/views/system/stationItem/index.vue
index 0f530e0..3e60e7f 100644
--- a/src/views/system/stationItem/index.vue
+++ b/src/views/system/stationItem/index.vue
@@ -12,45 +12,11 @@
label="护理站名称"
prop="nurseStationId"
label-width="100px"
- v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
-
-
-
-
+ {{
+ queryParams.nurseStationName
+ }}
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ form.nurseStationItem.nurseStationName }}
+
+
-
搜索
@@ -555,10 +537,10 @@
label-width="110px"
:inline="true"
>
-
+
@@ -595,7 +577,6 @@
)
"
>
-
@@ -690,560 +671,9 @@
-
diff --git a/src/views/system/stationItem/stationItemjs.js b/src/views/system/stationItem/stationItemjs.js
new file mode 100644
index 0000000..222860b
--- /dev/null
+++ b/src/views/system/stationItem/stationItemjs.js
@@ -0,0 +1,506 @@
+import { listStationConsumable } from "@/api/system/stationConsumable";
+import stationAcatar from "../stationAvatar/index.vue";
+
+import {
+ list,
+ getNurseItem,
+ delNurseItem,
+ addNurseItem,
+ updateNurseItem,
+ updatePicture,
+} from "@/api/system/nurseItem";
+import { getToken } from "@/utils/auth";
+import { getListByUser } from "@/api/system/userlist.js";
+
+export default {
+ components: { stationAcatar },
+ name: "NurseItem",
+ data() {
+ return {
+ imageUrl: "",
+ imgone: "",
+ // 用户导入参数
+ upload: {
+ // 是否显示弹出层(用户导入)
+ open: false,
+ // 弹出层标题(用户导入)
+ title: "",
+ // 是否禁用上传
+ isUploading: false,
+ // 设置上传的请求头部
+ headers: { Authorization: "Bearer " + getToken() },
+ // 上传的地址
+ url: process.env.VUE_APP_BASE_API + "/system/stationItem/importData",
+ },
+ // 遮罩层
+ loading: true,
+ stationConsumableshow: false,
+ nurseStationshow: false,
+ // 选中数组
+ ids: [],
+ // 非单个禁用
+ single: true,
+ // 非多个禁用
+ multiple: true,
+ // 显示搜索条件
+ showSearch: true,
+ // 总条数
+ total: 0,
+ total2: 0,
+ total3: 0,
+ total4: 0,
+ //耗材
+ stationConsumableList: [],
+ // 护理站护理项目表格数据
+ nurseItemList: [],
+ //护理站类型表
+ typelist: [],
+ // 弹出层标题
+ title: "",
+ // 是否显示弹出层
+ open: false,
+ //权限查询
+ nurseStationlist: [],
+ nurseStationlist2: [],
+ getListByUserquery: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ // 查询参数
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ nurseTypeId: null,
+ userId: null,
+ nurseItemCode: null,
+ nurseItemName: null,
+ nurseItemContent: null,
+ advanceAppointDuration: null,
+ sort: null,
+ },
+ // 查询参数
+ StationConsumablequeryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ consumableDetail: null,
+ },
+ // 表单参数
+ form: {
+ nurseStationItem: {
+ nurseStationId: null,
+ nurseTypeId: null,
+ nurseItemName: "",
+ nurseItemContent: "",
+ advanceAppointDuration: "",
+ itemPictureUrl: "",
+ sort: "",
+ nurseStationName: "请选择所属护理站",
+ },
+ },
+ ids: 1,
+ // 表单校验
+ rules: {
+ "nurseStationItem.nurseItemName": [
+ { required: true, message: "护理项目名称不能为空", trigger: "blur" },
+ ],
+ "nurseStationItem.nurseItemContent": [
+ { required: true, message: "项目内容简介不能为空", trigger: "blur" },
+ ],
+ "nurseStationItem.sort": [
+ { required: true, message: "排序不能为空", trigger: "blur" },
+ ],
+ "nurseStationItem.advanceAppointDuration": [
+ { required: true, message: "提前预约时长不能为空", trigger: "blur" },
+ ],
+ "nurseStationItem.itemPictureUrl": [{
+ required: true,
+ trigger: "blur",
+ message: "请选择项目头像",
+ }, ],
+ nurseStationId: [
+ { required: true, trigger: "blur", message: "请选择所属护理站" },
+ ],
+ nurseTypeId: [
+ { required: true, message: "请选择护理类型", trigger: "blur" },
+ ],
+ },
+ homenumber: null,
+ stationid: null,
+ addxg: null,
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ imgUrl(imgUrl) {
+ this.form.nurseStationItem.itemPictureUrl = imgUrl;
+ },
+ handleAvatarSuccess(res, file) {
+ this.imageUrl = URL.createObjectURL(file.raw);
+ },
+ /** 下载模板操作 */
+ importTemplate() {
+ this.download(
+ "/system/stationItem/downloadTemplate?fileType=1", {},
+ `护理站项目信息导入模板.xlsx`
+ );
+ },
+ // 提交上传文件
+ submitFileForm() {
+ this.$refs.upload.submit();
+ },
+ // 文件上传成功处理
+ handleFileSuccess(response, file, fileList) {
+ this.upload.open = false;
+ this.upload.isUploading = false;
+ this.$refs.upload.clearFiles();
+ this.$alert(
+ "" +
+ response.msg +
+ "
",
+ "导入结果", { dangerouslyUseHTMLString: true }
+ );
+ this.getList();
+ },
+ // 文件上传中处理
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ },
+ //耗材包选择完成
+ stationConsumablechoiceok() {
+ this.form.nurseStationItemConsumables.forEach((e) => {
+ e.nurseStationConsumableId = e.id;
+ });
+ this.stationConsumableshow = false;
+ },
+ //删除已经选择的耗材包
+ delConsumable(item) {
+ this.form.nurseStationItemConsumables =
+ this.form.nurseStationItemConsumables.filter((e) => e.id != item.id);
+ },
+ //双击耗材包
+ cellchoiceConsumable(item) {
+ if (this.form.nurseStationItemConsumables.find((e) => e.id == item.id)) {
+ this.form.nurseStationItemConsumables =
+ this.form.nurseStationItemConsumables.filter((e) => e.id != item.id);
+ } else {
+ this.form.nurseStationItemConsumables.push(item);
+ }
+ },
+ //选择耗材宝
+ choiceConsumable(item) {
+ this.form.nurseStationItemConsumables.push(item);
+ },
+ //页面所属护理站
+ ParamsStation(item) {
+ this.info();
+ this.nurseStationshow = true
+ this.homenumber = item
+ this.stationid = this.queryParams.nurseStationId;
+ },
+ //打开护理站列表
+ nurseStationshowclick() {
+ this.stationcancel();
+ this.stationid = this.form.nurseStationItem.nurseStationId
+ this.nurseStationshow = true
+ },
+ //护理站页面选择护理站
+ choicestationid(item) {
+ if (this.homenumber) {
+ this.queryParams.nurseStationName = item.nurseStationName;
+ this.queryParams.nurseStationId = item.id;
+ } else {
+ this.stationid = item.id
+ this.form.nurseStationItem.nurseStationId = item.id;
+ this.form.nurseStationItem.nurseStationName = item.nurseStationName;
+ this.StationConsumablequeryParams.nurseStationId = item.id;
+ }
+ this.nurseStationshow = false;
+ this.stationcancel();
+ },
+ //关闭护理站页面
+ clicknurseStationshow() {
+ this.nurseStationshow = false;
+ },
+ //耗材包关闭
+ clickstationConsumableshow() {
+ this.listStationConsumableinfocancel();
+ this.stationConsumableshow = false;
+ },
+ // 耗材重置
+ listStationConsumableinfocancel() {
+ this.StationConsumablequeryParams.consumableDetail = null;
+ this.StationConsumablequeryParams.pageNum = 1;
+ this.StationConsumablequeryParams.pageSize = 10;
+ this.listStationConsumable();
+ },
+ //护理站重置
+ stationcancel() {
+ this.getListByUserquery = {
+ pageNum: 1,
+ pageSize: 10,
+ };
+ this.info();
+ },
+ /** 耗材列表 */
+ listStationConsumable() {
+ listStationConsumable(this.StationConsumablequeryParams).then(
+ (response) => {
+ this.stationConsumableList = response.rows;
+ this.total3 = response.total;
+ }
+ );
+ },
+ listStationConsumableinfo() {
+ if (this.form.nurseStationItem.nurseStationId != null) {
+ listStationConsumable(this.StationConsumablequeryParams).then(
+ (response) => {
+ this.stationConsumableList = response.rows;
+ this.total3 = response.total;
+ this.stationConsumableshow = true;
+ }
+ );
+ } else {
+ this.$message.error("请先选择护理站");
+ }
+ },
+ /** 查询护理站护理项目列表 */
+ getList() {
+ this.loading = true;
+ list(this.queryParams).then((response) => {
+ this.nurseItemList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ //护理站list
+ info() {
+ getListByUser(this.getListByUserquery).then((res) => {
+ this.nurseStationlist = res.rows;
+ this.total4 = res.total;
+ });
+ },
+ // 取消按钮
+ cancel() {
+ 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) => {});
+ }
+
+ this.open = false;
+ this.reset();
+ },
+ //时长价格
+ addnurseStationItemPrices(item, index) {
+ if (this.form.nurseStationItemPrices.length == 5) {
+ this.$message.error("最多只能5条");
+ } else {
+ this.ids++;
+ var obj = {
+ serveDurationUnit: "",
+ price: "",
+ description: "",
+ ids: this.ids,
+ };
+ this.form.nurseStationItemPrices.push(obj);
+ }
+ },
+ delnurseStationItemPrices(item) {
+ 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.nurseItemPriceId) {
+ if (this.form.nurseStationItemPrices.length == 1) {
+ this.$message.error("最后一条不可删除");
+ } else {
+ this.form.nurseStationItemPrices =
+ this.form.nurseStationItemPrices.filter(
+ (e) => e.nurseItemPriceId != item.nurseItemPriceId
+ );
+ }
+ }
+ },
+ // 表单重置
+ reset() {
+ this.form = {
+ nurseStationItem: {
+ nurseStationId: null,
+ nurseTypeId: null,
+ nurseItemName: null,
+ nurseItemContent: null,
+ advanceAppointDuration: null,
+ itemPictureUrl: null,
+ sort: null,
+ nurseStationName: "请选择所属护理站",
+ },
+ nurseStationItemConsumables: [
+ // {
+ // nurseStationConsumableId: "",
+ // consumableCount: "",
+ // consumablePrice: "",
+ // },
+ ],
+ nurseStationItemPrices: [{
+ serveDurationUnit: null,
+ price: null,
+ description: null,
+ ids: this.ids,
+ }, ],
+ };
+ this.resetForm("form");
+ },
+ /** 搜索按钮操作 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 重置按钮操作 */
+ resetQuery() {
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ nurseStationId: null,
+ nurseTypeId: null,
+ userId: null,
+ nurseItemCode: null,
+ nurseItemName: null,
+ nurseItemContent: null,
+ advanceAppointDuration: null,
+ sort: null,
+ };
+ this.stationid = null
+ this.handleQuery();
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 新增按钮操作 */
+ handleAdd() {
+ this.addxg = 'add'
+ this.homenumber = null;
+ this.reset();
+ this.open = true;
+ this.StationConsumablequeryParams.nurseStationId = null;
+ this.title = "添加护理站护理项目";
+ },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+ this.addxg = 'xg';
+ this.homenumber = null;
+ this.reset();
+ 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;
+ this.imgone = this.form.nurseStationItem.itemPictureUrl;
+ if (this.form.nurseStationItemPrices == []) {
+ var obj = {
+ serveDurationUnit: "",
+ price: "",
+ description: "",
+ ids: this.ids,
+ };
+ this.form.nurseStationItemPrices.push(obj);
+ } else if (this.form.nurseStationItemPrices.length == 0) {
+ var obj = {
+ serveDurationUnit: "",
+ price: "",
+ description: "",
+ ids: this.ids,
+ };
+ this.form.nurseStationItemPrices.push(obj);
+ } else if (this.form.nurseStationItemPrices == null) {
+ var obj = {
+ serveDurationUnit: "",
+ price: "",
+ description: "",
+ ids: this.ids,
+ };
+ this.form.nurseStationItemPrices.push(obj);
+ }
+ console.log(this.form)
+ this.open = true;
+ this.title = "修改护理站护理项目";
+ });
+ },
+ /** 提交按钮 */
+ submitForm() {
+ this.form.nurseStationItemConsumables.forEach((e) => {
+ e.nurseStationConsumableId = e.id;
+ });
+ this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.form.nurseStationItem.id != null) {
+ this.form.nurseStationItemPrices.forEach((e) => {
+ e.nurseStationItemId = this.form.nurseStationItem.id;
+ });
+ 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();
+ });
+ } else {
+ addNurseItem(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.$forceUpdate();
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ var that = this;
+ this.$modal
+ .confirm("是否确认删除此护理站护理项目?")
+ .then(function() {
+ delNurseItem(ids).then(res => {
+ var obj = { pictureUrlList: [] };
+ obj.pictureUrlList.push(row.itemPictureUrl);
+ updatePicture(obj).then((res) => {});
+ that.getList();
+ that.$modal.msgSuccess("删除成功");
+ })
+ })
+ .catch(() => {});
+ },
+ /** 导入按钮操作 */
+ handleExport() {
+ this.upload.title = "护理站护理项目导入";
+ this.upload.open = true;
+ },
+ },
+};
\ No newline at end of file
From 956bfd00fda1a790a5a6a49aa5c52ad4fff04ee6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com>
Date: Thu, 17 Nov 2022 16:51:49 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/goodsInfo/indexjs.js | 19 +++++--------------
src/views/system/goodsOrder/indexjs.js | 17 +++++------------
src/views/system/stationConsumable/indexjs.js | 11 ++---------
3 files changed, 12 insertions(+), 35 deletions(-)
diff --git a/src/views/system/goodsInfo/indexjs.js b/src/views/system/goodsInfo/indexjs.js
index 918023e..4d966f8 100644
--- a/src/views/system/goodsInfo/indexjs.js
+++ b/src/views/system/goodsInfo/indexjs.js
@@ -304,20 +304,11 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
- if (this.nurseStationlist[0].isAdmin == "1") {
- this.resetForm("queryForm");
- this.queryParams = {
- pageNum: 1,
- pageSize: 10,
- };
- } else {
- this.queryParams.pageNum = 1;
- this.queryParams.pageSize = 10;
- this.queryParams.goodsName = null;
- this.queryParams.goodsCategoryName = null;
- this.queryParams.goodsPurpose = null;
- this.queryParams.whetherShelf = null;
- }
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ };
this.handleQuery();
},
// 多选框选中数据
diff --git a/src/views/system/goodsOrder/indexjs.js b/src/views/system/goodsOrder/indexjs.js
index 16ba6bf..25421a1 100644
--- a/src/views/system/goodsOrder/indexjs.js
+++ b/src/views/system/goodsOrder/indexjs.js
@@ -340,18 +340,11 @@ 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;
- }
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ };
this.handleQuery();
},
diff --git a/src/views/system/stationConsumable/indexjs.js b/src/views/system/stationConsumable/indexjs.js
index 4ddf7f4..89df9c6 100644
--- a/src/views/system/stationConsumable/indexjs.js
+++ b/src/views/system/stationConsumable/indexjs.js
@@ -403,15 +403,8 @@ export default {
//护理站列表
info() {
getListByUser(this.getListByUserquery).then((res) => {
- if (res.rows[0].isAdmin == "1") {
- 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;
});
},
},
From b270c126846337052d255da337ecea2af214f25e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com>
Date: Fri, 18 Nov 2022 12:50:42 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/userlist.js | 4 +-
src/views/system/StationDepartment/indexjs.js | 1 +
src/views/system/goodsInfo/index.vue | 37 +++---
src/views/system/goodsOrder/index.vue | 16 ---
src/views/system/order/index.vue | 115 +++++++-----------
src/views/system/order/indexjs.js | 4 +-
src/views/system/person/index.vue | 2 +-
src/views/system/person/indexjs.js | 1 +
src/views/system/station/index.vue | 2 +-
src/views/system/stationConsumable/index.vue | 5 +-
src/views/system/stationConsumable/indexjs.js | 4 +-
src/views/system/stationItem/index.vue | 3 +
src/views/system/stationItem/stationItemjs.js | 14 +--
13 files changed, 90 insertions(+), 118 deletions(-)
diff --git a/src/api/system/userlist.js b/src/api/system/userlist.js
index ac33759..8fe2e54 100644
--- a/src/api/system/userlist.js
+++ b/src/api/system/userlist.js
@@ -2,8 +2,8 @@ import request from '@/utils/request'
export function getListByUser(query) {
return request({
- url: '/system/user/getListByUser',
+ url: '/system/station/list',
method: 'GET',
params: query
})
-}
+}
\ No newline at end of file
diff --git a/src/views/system/StationDepartment/indexjs.js b/src/views/system/StationDepartment/indexjs.js
index 1194571..192a242 100644
--- a/src/views/system/StationDepartment/indexjs.js
+++ b/src/views/system/StationDepartment/indexjs.js
@@ -117,6 +117,7 @@ export default {
},
methods: {
ParamsStation(item) {
+ this.info();
this.innerVisible = true
this.homenumber = item
this.stationid = this.queryParams.nurseStationId;
diff --git a/src/views/system/goodsInfo/index.vue b/src/views/system/goodsInfo/index.vue
index 7e8f0c9..cf5bfb5 100644
--- a/src/views/system/goodsInfo/index.vue
+++ b/src/views/system/goodsInfo/index.vue
@@ -67,7 +67,7 @@
>
-
+
- 已上架
+ 未上架
+
- 删除
-
+ -->
-
-
-
-
+
+
+
@@ -290,6 +296,7 @@
diff --git a/src/views/system/goodsOrder/index.vue b/src/views/system/goodsOrder/index.vue
index 624cc1d..cdff701 100644
--- a/src/views/system/goodsOrder/index.vue
+++ b/src/views/system/goodsOrder/index.vue
@@ -47,13 +47,6 @@
重置
- 刷新商品订单
@@ -171,15 +164,6 @@
v-hasPermi="['system:goodsOrder:editExpressNo']"
>录入物流单号
- 不可录入物流单号
重置
- 刷新预约订单
派单
- 派单
取消预约
- 取消预约