Merge remote-tracking branch 'origin/dev'
# Conflicts: # src/views/system/order/index.vue # src/views/system/person/index.vue # src/views/system/station/index.vue
This commit is contained in:
commit
4f4bc04d53
@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 全医通护理站管理平台
|
||||
VUE_APP_TITLE = 泉医到家运营管理平台
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 全医通护理站管理平台/开发环境
|
||||
# 泉医到家运营管理平台/开发环境
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = 'http://192.168.16.30:8080'
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 全医通护理站管理平台
|
||||
VUE_APP_TITLE = 泉医到家运营管理平台
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 全医通护理站管理平台/生产环境
|
||||
# 泉医到家运营管理平台/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 全医通护理站管理平台
|
||||
VUE_APP_TITLE = 泉医到家运营管理平台
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 全医通护理站管理平台/测试环境
|
||||
# 泉医到家运营管理平台/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 17 KiB |
@ -1,3 +1,3 @@
|
||||
var baseurl = "http://192.168.16.49:8080";
|
||||
var baseurl = "http://192.168.16.76:8080";
|
||||
|
||||
export default baseurl
|
||||
export default baseurl
|
||||
76
src/api/system/OperateGoodsInfo.js
Normal file
76
src/api/system/OperateGoodsInfo.js
Normal file
@ -0,0 +1,76 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品基本信息列表
|
||||
export function goodsInfoList(query) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/goodsInfoList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//所属护理站
|
||||
export function stationList(query) {
|
||||
return request({
|
||||
url: '/system/station/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询商品基本信息详细
|
||||
export function getGoodsInfo(id) {
|
||||
return request({
|
||||
url: `/system/operateGoodInfo/goodsDetails?` + `goodsInfoId=${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//取消
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品基本信息
|
||||
export function addGoodsInfo(data) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品分类列表
|
||||
export function goodsCategory(query) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/list ',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 修改商品基本信息
|
||||
export function updateGoodsInfo(data) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/edit',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改上架下架状态
|
||||
// system/goodsInfo/editGoodsWhetherShelf
|
||||
export function editGoodsWhetherShelf(data) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/editGoodsWhetherShelf',
|
||||
method: 'post',
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
// 删除商品基本信息
|
||||
export function delGoodsInfo(goodsInfoId) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/' + goodsInfoId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
52
src/api/system/goodsCategory.js
Normal file
52
src/api/system/goodsCategory.js
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品分类信息列表
|
||||
export function listGoodsCategory(query) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品分类信息详细
|
||||
export function getGoodsCategory(id) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//取消
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品分类信息
|
||||
export function addGoodsCategory(data) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改商品分类信息
|
||||
export function updateGoodsCategory(data) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/edit',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除商品分类信息
|
||||
export function delGoodsCategory(id) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/' + id,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 查询商品基本信息列表
|
||||
export function listGoodsInfo(query) {
|
||||
return request({
|
||||
url: '/system/goodsInfo/list',
|
||||
url: '/system/goodsCategory/getStationCategoryList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -46,7 +46,7 @@ export function listStation(query) {
|
||||
// 查询商品分类列表
|
||||
export function goodsCategory(query) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/list ',
|
||||
url: '/system/goodsCategory/getStationCategoryList ',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -76,3 +76,12 @@ export function delGoodsInfo(goodsInfoId) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//取消
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -19,14 +19,14 @@ export function getGoodsOrder(id) {
|
||||
// 查看商品详细信息
|
||||
export function getGoodsOrderlist(id) {
|
||||
return request({
|
||||
url: `/system/goodsOrder/goodsOrderByOrder`+`?orderNo=${id}`,
|
||||
url: `/system/goodsOrder/goodsOrderByOrder` + `?orderNo=${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 退款
|
||||
export function goodsOrderRefundinfo(id) {
|
||||
return request({
|
||||
url: `/system/goodsOrder/goodsOrderRefund`+`?goodsOrderId=${id}`,
|
||||
url: `/system/goodsOrder/goodsOrderRefund` + `?goodsOrderId=${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@ -41,7 +41,6 @@ export function editExpressNo(data) {
|
||||
}
|
||||
|
||||
// 退款确定按钮
|
||||
|
||||
export function weChatRefundOrderApply(data) {
|
||||
return request({
|
||||
url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
|
||||
@ -74,4 +73,4 @@ export function delGoodsOrder(id) {
|
||||
url: '/system/goodsOrder/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -59,4 +59,12 @@ export function delNurseItem(id) {
|
||||
url: '/system/stationItem/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
}
|
||||
// 删除图片
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@ -11,15 +11,33 @@ export function appointmentOrderDetailsList(query) {
|
||||
|
||||
export function Detailed(id) {
|
||||
return request({
|
||||
url: `/system/appointmentOrderDetails/Detailed`+`?orderNo=${id}`,
|
||||
url: `/system/appointmentOrderDetails/getCancelOrderInfo` + `?orderNo=${id}`,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function appointmentOrderDetails(id) {
|
||||
return request({
|
||||
url: `/system/appointmentOrderDetails/Detailed` + `?orderNo=${id}`,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 确定按钮
|
||||
export function xylWeChatRefundNotify(data) {
|
||||
return request({
|
||||
|
||||
url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//删除
|
||||
export function deldetailed(appointmentOrderId) {
|
||||
return request({
|
||||
url: '/system/appointmentOrder/'+appointmentOrderId,
|
||||
url: '/system/appointmentOrder/' + appointmentOrderId,
|
||||
method: 'post',
|
||||
|
||||
})
|
||||
@ -45,10 +63,9 @@ export function dispatchsubmit(data) {
|
||||
|
||||
|
||||
// 确认取消订单
|
||||
export function confirmCancel(data) {
|
||||
export function confirmCancel(appointmentOrderId) {
|
||||
return request({
|
||||
url: '/system/appointmentOrder/confirmCancel',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: `/system/appointmentOrder/confirmCancel?appointmentOrderId=${appointmentOrderId}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
@ -63,3 +63,11 @@ export function delPatientArchives(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 重置密码
|
||||
export function updatePassword(params) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePassword',
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
@ -95,4 +95,12 @@ export function getLabelList(id) {
|
||||
url: `/system/nurseStationlabel/getLabelList?nurseStationId=${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
//取消
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
BIN
src/assets/images/bg2.png
Normal file
BIN
src/assets/images/bg2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 190 KiB |
BIN
src/assets/images/bg3.png
Normal file
BIN
src/assets/images/bg3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
BIN
src/assets/images/body.png
Normal file
BIN
src/assets/images/body.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
BIN
src/assets/logo/lg.png
Normal file
BIN
src/assets/logo/lg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from '@/assets/logo/logo.png'
|
||||
import logoImg from '@/assets/logo/lg.png'
|
||||
import variables from '@/assets/styles/variables.scss'
|
||||
|
||||
export default {
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '泉医到家护理站管理平台',
|
||||
title: '泉医到家运营管理平台',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
|
||||
<div :class="show ? 'bj' : ''">
|
||||
<div :class="{'fixed-header':fixedHeader}">
|
||||
<navbar />
|
||||
<tags-view v-if="needTagsView" />
|
||||
@ -11,6 +12,7 @@
|
||||
<right-panel>
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -31,6 +33,11 @@ export default {
|
||||
Settings,
|
||||
Sidebar,
|
||||
TagsView
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
};
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
@ -53,8 +60,27 @@ export default {
|
||||
variables() {
|
||||
return variables;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.info();
|
||||
},
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
if (to.path != "/index") {
|
||||
this.show = false;
|
||||
} else {
|
||||
this.show = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
if (this.$route.path != "/index") {
|
||||
this.show = false;
|
||||
} else {
|
||||
this.show = true;
|
||||
}
|
||||
},
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
@ -65,7 +91,11 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/styles/mixin.scss";
|
||||
@import "~@/assets/styles/variables.scss";
|
||||
|
||||
.bj {
|
||||
background-image: url("../assets/images/body.png");
|
||||
-moz-background-size: 100% 100%;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
width: 100%;
|
||||
background-size: cover;
|
||||
// margin-top: 300px;
|
||||
background-image: url("../assets/images/mian.png");
|
||||
// background-image: url("../assets/images/mian.png");
|
||||
// blockquote {
|
||||
// padding: 10px 20px;
|
||||
// margin: 0 0 20px;
|
||||
|
||||
@ -6,14 +6,14 @@
|
||||
:rules="loginRules"
|
||||
class="login-form"
|
||||
>
|
||||
<h3 class="title">泉医到家护理站管理平台</h3>
|
||||
<h3 class="title">泉医到家运营管理平台</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="账号"
|
||||
style="width: 300px;"
|
||||
style="width: 310px;"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
@ -29,7 +29,7 @@
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter.native="handleLogin"
|
||||
style="width: 300px"
|
||||
style="width: 310px"
|
||||
>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
@ -68,7 +68,7 @@
|
||||
style="
|
||||
width: 300px;
|
||||
height: 50px;
|
||||
background-image: linear-gradient(to right, #90c8df, #4ca8cd);
|
||||
background-image: linear-gradient(to right, #01A4FF, #1259EE );
|
||||
border-radius: -33px;
|
||||
border: none;
|
||||
color: #ffffff;
|
||||
@ -86,6 +86,13 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="bg" style="border-radius: 0 6px 6px 0; padding: 0">
|
||||
<img
|
||||
src="../assets/images/bg3.png"
|
||||
alt=""
|
||||
style="width: 1400px; height: 700px; border-radius: 0 6px 6px 0;"
|
||||
/>
|
||||
</div>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<!-- <span>Copyright © 2018-2022 xinyilu.vip All Rights Reserved.</span> -->
|
||||
@ -187,13 +194,31 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.bg{
|
||||
position:absolute;
|
||||
}
|
||||
// .el-input el-input--medium el-input--prefix{
|
||||
// height: 50px;
|
||||
// line-height: 36px;
|
||||
// background-color: red;
|
||||
// border: none;
|
||||
// border-radius: 10px;
|
||||
// }
|
||||
.el-input--medium ::v-deep .el-input__inner{
|
||||
height: 50px;
|
||||
line-height: 36px;
|
||||
// background-color: red;
|
||||
border: none;
|
||||
border: 1px solid #E5E5E5;
|
||||
border-radius: 36px;
|
||||
}
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/images/bg.png");
|
||||
background-image: url("../assets/images/bg2.png");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
@ -208,6 +233,8 @@ export default {
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
z-index: 999;
|
||||
margin-right: 50%;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
input {
|
||||
@ -217,7 +244,8 @@ export default {
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 2px;
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
.login-tip {
|
||||
@ -249,6 +277,7 @@ export default {
|
||||
}
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
// .el-button{
|
||||
// background-image: linear-gradient(to right , #90C8DF, #4CA8CD);
|
||||
|
||||
974
src/views/system/OperateGoodsInfo/index.vue
Normal file
974
src/views/system/OperateGoodsInfo/index.vue
Normal file
@ -0,0 +1,974 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
v-loadmore="loadMore"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="queryParams.goodsPurpose"
|
||||
placeholder="请选择商品用途"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否上架" prop="whetherShelf">
|
||||
<el-select v-model="queryParams.whetherShelf" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:operateGoodInfo:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:operateGoodInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="goodsInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="商品编码" align="center" prop="goodsCode" />
|
||||
<el-table-column
|
||||
label="商品名称"
|
||||
align="center"
|
||||
prop="goodsName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品分类名称"
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
|
||||
<el-table-column label="商品用途" align="center" prop="goodsPurpose">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.goodsPurpose == "BUSINESS" ? "买卖" : "" }}
|
||||
{{ scope.row.goodsPurpose == "LEASE" ? "租赁" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上架状态" align="center" prop="whetherShelf">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.whetherShelf"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="upwhetherShelf(scope.row)"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="上架时间"
|
||||
align="center"
|
||||
prop="shelfTime"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.whetherShelf">{{ scope.row.shelfTime }}</div>
|
||||
<div v-else></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>chaxun
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:operateGoodInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:operateGoodInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 添加或修改商品基本信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="form.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
max="40"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationId">
|
||||
<el-button
|
||||
type=""
|
||||
@click="clickinnerVisible"
|
||||
v-if="StationName == '请选择所属护理站'"
|
||||
style="
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ StationName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
@click="clickinnerVisible"
|
||||
v-else
|
||||
style="
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ StationName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryId">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.goodsCategoryId"
|
||||
clearable
|
||||
placeholder="请选择商品分类名称"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goodsCategorylist"
|
||||
:key="item.id"
|
||||
:label="item.goodsCategoryName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="form.goodsPurpose"
|
||||
placeholder="请选择商品用途"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodsPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.goodsPictureUrl"
|
||||
:type="'goodsPictureUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-table
|
||||
ref="goodDetailsLists"
|
||||
:data="goodDetailsLists"
|
||||
label-width="50px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-table-column label="商品属性名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeName"
|
||||
maxlength="40"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品单价" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.goodsPrice"
|
||||
type="number"
|
||||
oninput=" if(value.length>7){value=value.slice(0,7)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.goodsStock"
|
||||
type="number"
|
||||
oninput="if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示顺序" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeDetailsSort"
|
||||
type="number"
|
||||
oninput=" if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品属性图片" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<stationAcatar
|
||||
@imgUrl="attributePitureUrl"
|
||||
@item="attributePitureitem"
|
||||
:img="scope.row.attributePitureUrl"
|
||||
:type="'attributePitureUrl'"
|
||||
:item="scope.row"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="addgoodAttributeDetail"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delgoodAttributeDetail(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item
|
||||
label="商品概述"
|
||||
prop="goodsRemark"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<editor
|
||||
:min-height="100"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="form.goodsRemark"
|
||||
></editor>
|
||||
</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>
|
||||
<!-- 新增护理站名称弹框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="addcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="getListByUserquery"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item
|
||||
label="护理站编码"
|
||||
prop="nurseStationCode"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
prop="nurseStationName"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery2"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.nurseStationId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="handleQuery2"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getGoodsInfo,
|
||||
delGoodsInfo,
|
||||
addGoodsInfo,
|
||||
updateGoodsInfo,
|
||||
updatePicture,
|
||||
goodsInfoList,
|
||||
goodsCategory,
|
||||
editGoodsWhetherShelf,
|
||||
stationList
|
||||
} from "@/api/system/OperateGoodsInfo";
|
||||
import editor from "@/components/Editor";
|
||||
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: "是",
|
||||
},
|
||||
],
|
||||
// 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,
|
||||
},
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationId: null,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsName: [
|
||||
{ required: true, message: "请输入商品名称", trigger: "blur" },
|
||||
],
|
||||
goodsCategoryId: [
|
||||
{ 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.getList2();
|
||||
},
|
||||
methods: {
|
||||
upwhetherShelf(row) {
|
||||
console.log(row);
|
||||
if (row.whetherShelf == false) {
|
||||
var obj = {
|
||||
id: row.goodsInfoId,
|
||||
whetherShelf: 0,
|
||||
};
|
||||
} else if (row.whetherShelf == true) {
|
||||
var obj = {
|
||||
id: row.goodsInfoId,
|
||||
whetherShelf: 1,
|
||||
};
|
||||
}
|
||||
editGoodsWhetherShelf(obj).then((res) => {
|
||||
console.log(obj);
|
||||
if (obj.whetherShelf == 0) {
|
||||
this.$modal.msgSuccess("已修改上架状态为未上架");
|
||||
} else {
|
||||
this.$modal.msgSuccess("已修改上架状态为上架");
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 查询商品基本信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
goodsInfoList(this.queryParams).then((response) => {
|
||||
response.rows.forEach((e) => {
|
||||
if (e.whetherShelf == 1) {
|
||||
e.whetherShelf = true;
|
||||
} else if (e.whetherShelf == 0) {
|
||||
e.whetherShelf = false;
|
||||
}
|
||||
});
|
||||
this.goodsInfoList = response.rows;
|
||||
console.log(this.goodsInfoList);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
addgoodAttributeDetail() {
|
||||
console.log(this.goodDetailsLists);
|
||||
if (this.goodDetailsLists.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
var obj = {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: this.ids,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
delgoodAttributeDetail(item) {
|
||||
console.log(item);
|
||||
if (item.ids && !item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.ids != item.ids
|
||||
);
|
||||
}
|
||||
} else if (!item.ids && item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.attributeDetailsId != item.attributeDetailsId
|
||||
);
|
||||
}
|
||||
}
|
||||
console.log(this.goodDetailsLists);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
console.log(this.form);
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.goodsPictureUrl) {
|
||||
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.StationName = "请选择所属护理站";
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributeName: "",
|
||||
goodAttributeDetailsLists: [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
clickinnerVisible() {
|
||||
this.innerVisible = true;
|
||||
},
|
||||
nurseclick(row) {
|
||||
// console.log(this.form);
|
||||
console.log(row);
|
||||
this.form.nurseStationId = row.id;
|
||||
this.StationName = row.nurseStationName;
|
||||
this.innerVisible = false;
|
||||
},
|
||||
handleQuery2() {
|
||||
// this.getListByUserquery.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
// getList2() {
|
||||
// stationList(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.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() {
|
||||
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
goodsName: null,
|
||||
goodsCategoryName: null,
|
||||
goodsPurpose: null,
|
||||
}
|
||||
|
||||
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.goodsInfoId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.nurseStationId = "";
|
||||
this.title = "商品基本信息";
|
||||
// this.nurseName = "请选择护理员";
|
||||
this.StationName = "请选择所属护理站";
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
},
|
||||
];
|
||||
this.open = true;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.goodsInfoId || this.ids;
|
||||
this.StationName = row.nurseStationName;
|
||||
if(this.StationName == null){
|
||||
this.StationName = "请选择所属护理站";
|
||||
}
|
||||
console.log(this.StationName)
|
||||
getGoodsInfo(id).then((response) => {
|
||||
this.form = response.data[0];
|
||||
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) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
console.log(this.form);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.StationName = "请选择所属护理站";
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log("row :>> ", row);
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
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(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
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();
|
||||
// }
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.getListByUserquery.pageNum >= a) {
|
||||
} else {
|
||||
this.getListByUserquery.pageNum++;
|
||||
stationList(this.getListByUserquery).then((res) => {
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@ -8,8 +8,11 @@
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="护理站" prop="nurseStationId"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')">
|
||||
<el-form-item
|
||||
label="护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@ -25,8 +28,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站" prop="nurseStationId"
|
||||
v-else>
|
||||
<el-form-item label="护理站" prop="nurseStationId" v-else>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@ -58,22 +60,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="科室负责人名称" prop="departmentPerson">
|
||||
<el-input
|
||||
v-model="queryParams.departmentPerson"
|
||||
placeholder="请输入科室负责人名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -136,7 +122,6 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<el-table-column
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
@ -144,22 +129,9 @@
|
||||
/>
|
||||
<el-table-column label="科室编码" align="center" prop="departmentCode" />
|
||||
<el-table-column label="科室名称" align="center" prop="departmentName" />
|
||||
<!-- <el-table-column
|
||||
label="科室负责人名称"
|
||||
align="center"
|
||||
prop="departmentPerson"
|
||||
/> -->
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<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"
|
||||
@ -197,7 +169,7 @@
|
||||
<!-- 添加护理站部门信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open2"
|
||||
:visible.sync="addopen"
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
@ -218,7 +190,34 @@
|
||||
:rules="rules.nurseStationDepartmentList.nurseStationId"
|
||||
:prop="`nurseStationDepartmentList.${index}.nurseStationId`"
|
||||
>
|
||||
<el-select
|
||||
<el-button
|
||||
type=""
|
||||
v-if="item.nurseStationName == '请选择所属护理站'"
|
||||
@click="clickinnerVisible(item, index)"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ item.nurseStationName }}</el-button
|
||||
>
|
||||
<!-- @click="clickinnerVisible(item, index)" -->
|
||||
<el-button
|
||||
@click="clickinnerVisible(item, index)"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ item.nurseStationName }}</el-button
|
||||
>
|
||||
<!-- <el-select
|
||||
v-model="item.nurseStationId"
|
||||
clearable
|
||||
placeholder="请选择护理站"
|
||||
@ -233,7 +232,7 @@
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="科室名称"
|
||||
@ -247,7 +246,6 @@
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="科室负责人"
|
||||
:rules="rules.nurseStationDepartmentList.departmentPerson"
|
||||
@ -257,9 +255,9 @@
|
||||
v-model="item.departmentPerson"
|
||||
placeholder="请输入科室负责人"
|
||||
style="width: 250px"
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="联系电话"
|
||||
:rules="rules.nurseStationDepartmentList.phone"
|
||||
@ -280,7 +278,6 @@
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@ -299,34 +296,21 @@
|
||||
<!-- 修改护理站部门信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item
|
||||
label="所属护理站"
|
||||
prop="nurseStationId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.nurseStationId"
|
||||
clearable
|
||||
placeholder="请选择护理站"
|
||||
v-loadmore="loadMore"
|
||||
<el-form-item label="所属护理站" prop="nurseStationId">
|
||||
<el-input
|
||||
v-model="form.nurseStationName"
|
||||
placeholder="请选择所属护理站"
|
||||
style="width: 250px"
|
||||
@click="nurseinfo"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="departmentName">
|
||||
<el-input
|
||||
v-model="form.departmentName"
|
||||
placeholder="请输入科室名称"
|
||||
style="width: 250px"
|
||||
maxlength="15"
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室负责人" prop="departmentPerson">
|
||||
@ -350,6 +334,107 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 新增护理站名称弹框 -->
|
||||
<el-dialog
|
||||
title="选择护理站"
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="innerVisiblecancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="nurseStationqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item
|
||||
label="护理站编码"
|
||||
prop="nurseStationCode"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="nurseStationqueryParams.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
clearable
|
||||
@keyup.enter.native="addhd"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
prop="nurseStationName"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="nurseStationqueryParams.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="addhd"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="addhd"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="stationid == scope.row.id"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="nurseStationqueryParams.pageNum"
|
||||
:limit.sync="nurseStationqueryParams.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -359,7 +444,6 @@ import {
|
||||
delStationDepartment,
|
||||
addStationDepartment,
|
||||
updateStationDepartment,
|
||||
list,
|
||||
} from "@/api/system/StationDepartment";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
|
||||
@ -391,14 +475,13 @@ export default {
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
|
||||
// 护理站部门信息表格数据
|
||||
StationDepartmentList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open2: false,
|
||||
addopen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -431,7 +514,7 @@ export default {
|
||||
nurseStationId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择护理站",
|
||||
message: "请选择所属护理站",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -450,18 +533,18 @@ export default {
|
||||
},
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
nurseStationId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择护理站",
|
||||
message: "请选择所属护理站",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -488,15 +571,32 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
index: "",
|
||||
stationid: "",
|
||||
innerVisible: false,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList();
|
||||
// this.listinfo();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
// add点击护理站名称
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.stationid = row.id;
|
||||
this.innerVisible = false;
|
||||
this.form.nurseStationDepartmentList[this.index].nurseStationName =
|
||||
row.nurseStationName;
|
||||
this.form.nurseStationDepartmentList[this.index].nurseStationId = row.id;
|
||||
},
|
||||
// 新增护理站按钮
|
||||
clickinnerVisible(item, index) {
|
||||
this.stationid = item.nurseStationId;
|
||||
this.innerVisible = true;
|
||||
this.index = index;
|
||||
},
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.nurseStationDepartmentList.splice(index, 1);
|
||||
@ -509,6 +609,7 @@ export default {
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
phone: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
};
|
||||
if (this.form.nurseStationDepartmentList.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
@ -525,12 +626,8 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
nurseinfo() {
|
||||
this.nurseStationId = row.nurseStationId;
|
||||
},
|
||||
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
@ -547,17 +644,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 查询护理站
|
||||
listinfo() {
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
// res.rows.forEach((e) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
console.log(this.nurseStationlist);
|
||||
});
|
||||
// });
|
||||
},
|
||||
/** 查询护理站部门信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -570,7 +656,7 @@ export default {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
this.addopen = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
@ -595,6 +681,7 @@ export default {
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
phone: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
},
|
||||
],
|
||||
};
|
||||
@ -605,22 +692,26 @@ export default {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
innerVisiblecancel() {
|
||||
this.innerVisible = false;
|
||||
this.addresetQuery();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
phone: null,
|
||||
nurseStationName: null,
|
||||
};
|
||||
this.handleQuery();
|
||||
}else {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
phone: null,
|
||||
nurseStationName: null,
|
||||
};
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
this.queryParams.departmentCode = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
@ -629,12 +720,23 @@ export default {
|
||||
this.handleQuery();
|
||||
}
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
addhd() {
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
},
|
||||
addresetQuery() {
|
||||
this.nurseStationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.addhd();
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
console.log(true);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
@ -642,7 +744,6 @@ export default {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
console.log(this.queryParams)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -655,7 +756,7 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.addopen = true;
|
||||
// this.nurseStationName="",
|
||||
this.title = "添加护理站部门信息";
|
||||
},
|
||||
@ -671,6 +772,7 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -682,7 +784,7 @@ export default {
|
||||
} else {
|
||||
addStationDepartment(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open2 = false;
|
||||
this.addopen = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
@ -693,7 +795,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除护理站部门信息的数据项?')
|
||||
.confirm("是否确认删除护理站部门信息的数据项?")
|
||||
.then(function () {
|
||||
return delStationDepartment(ids);
|
||||
})
|
||||
|
||||
@ -16,14 +16,15 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="疾病描述" prop="description">
|
||||
<el-form-item label="疾病编码" prop="diseaseCode">
|
||||
<el-input
|
||||
v-model="queryParams.description"
|
||||
placeholder="请输入疾病描述"
|
||||
v-model="queryParams.diseaseCode"
|
||||
placeholder="请输入疾病编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -293,6 +294,7 @@ export default {
|
||||
diseaseName: null,
|
||||
description: null,
|
||||
sort: null,
|
||||
diseaseCode:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
408
src/views/system/goodsCategory/index.vue
Normal file
408
src/views/system/goodsCategory/index.vue
Normal file
@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryCode"
|
||||
placeholder="请输入商品分类编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
v-model="queryParams.sort"
|
||||
placeholder="请输入显示顺序"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:goodsCategory:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:goodsCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:goodsCategory:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="goodsCategoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
:show-overflow-tooltip="true"
|
||||
label="商品分类名称"
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品分类编码"
|
||||
align="center"
|
||||
prop="goodsCategoryCode"
|
||||
/>
|
||||
<!-- <el-table-column label="商品分类图片地址" align="center" prop="goodsCategoryPicture" /> -->
|
||||
<el-table-column
|
||||
label="分类概述"
|
||||
align="center"
|
||||
prop="categoryRemark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsCategory:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改商品分类信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="form.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
maxlength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="商品分类编码" prop="goodsCategoryCode">
|
||||
<el-input
|
||||
v-model="form.goodsCategoryCode"
|
||||
placeholder="请输入商品分类编码"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="商品分类图片" prop="goodsCategoryPicture">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.goodsCategoryPicture"
|
||||
:type="'goodsCategoryPicture'"
|
||||
/>
|
||||
<!-- <img :src="form.goodsCategoryPicture" alt="" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="分类概述" prop="categoryRemark">
|
||||
<el-input
|
||||
v-model="form.categoryRemark"
|
||||
placeholder="请输入分类概述"
|
||||
maxlength="300"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
v-model="form.sort"
|
||||
type="number"
|
||||
oninput="if(value.length>9){value=value.slice(0,9)}"
|
||||
placeholder="请输入显示顺序"
|
||||
/>
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGoodsCategory,
|
||||
getGoodsCategory,
|
||||
delGoodsCategory,
|
||||
updatePicture ,
|
||||
addGoodsCategory,
|
||||
updateGoodsCategory,
|
||||
} from "@/api/system/goodsCategory";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl";
|
||||
export default {
|
||||
name: "GoodsCategory",
|
||||
components: { stationAcatar },
|
||||
data() {
|
||||
return {
|
||||
imgone:"",
|
||||
baseurl: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品分类信息表格数据
|
||||
goodsCategoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
goodsCategoryName: null,
|
||||
goodsCategoryCode: null,
|
||||
goodsCategoryPicture: null,
|
||||
categoryRemark: null,
|
||||
sort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsCategoryName: [
|
||||
{ required: true, message: "商品分类名称不能为空", trigger: "blur" },
|
||||
],
|
||||
goodsCategoryCode: [
|
||||
{ required: true, message: "商品分类编码不能为空", trigger: "blur" },
|
||||
],
|
||||
goodsCategoryPicture: [
|
||||
{ required: true, message: "商品分类图片不能为空", trigger: "blur" },
|
||||
],
|
||||
categoryRemark: [
|
||||
{ required: true, message: "分类概述不能为空", trigger: "blur" },
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "显示顺序不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.baseurl = baseurl;
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品分类信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsCategory(this.queryParams).then((response) => {
|
||||
this.goodsCategoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
console.log(this.form);
|
||||
var obj = { pictureUrlList: [] };
|
||||
if(this.imgone !=this.form.goodsCategoryPicture ){
|
||||
obj.pictureUrlList.push(this.form.goodsCategoryPicture);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
goodsCategoryName: null,
|
||||
goodsCategoryCode: null,
|
||||
goodsCategoryPicture: null,
|
||||
categoryRemark: null,
|
||||
sort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
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.title = "添加商品分类信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getGoodsCategory(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.goodsCategoryPicture;
|
||||
this.open = true;
|
||||
this.title = "修改商品分类信息";
|
||||
console.log(this.form);
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGoodsCategory(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGoodsCategory(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除商品分类信息编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delGoodsCategory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/goodsCategory/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`goodsCategory_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
this.form.goodsCategoryPicture = imgUrl;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -8,6 +8,21 @@
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
v-loadmore="loadMore"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsName"
|
||||
@ -25,16 +40,9 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="queryParams.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择">
|
||||
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
@ -94,29 +102,7 @@
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:goodsInfo:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
@ -128,7 +114,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
@ -175,16 +161,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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"
|
||||
@ -199,7 +177,7 @@
|
||||
v-hasPermi="['system:goodsInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@ -207,14 +185,6 @@
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-search"
|
||||
@click="reference(scope.row)"
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
>查询商品信息</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -236,32 +206,27 @@
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
label-width="120px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="form.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
style="width: 210px; margin-left: 10px"
|
||||
maxlength="40"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationId">
|
||||
<el-select
|
||||
style="width: 210px; "
|
||||
v-model="form.nurseStationId"
|
||||
clearable
|
||||
placeholder="请选择护理站"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.nurseStationId"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.nurseStationId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="form.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
max="40"
|
||||
style="width: 210px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryId">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
@ -277,17 +242,12 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input
|
||||
v-model="form.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
style="width: 210px"
|
||||
/> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="form.goodsPurpose"
|
||||
placeholder="请选择"
|
||||
style="width: 210px; margin-left: 10px"
|
||||
placeholder="请选择商品用途"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
@ -331,7 +291,8 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.goodsPrice"
|
||||
maxlength="40"
|
||||
type="number"
|
||||
oninput=" if(value.length>7){value=value.slice(0,7)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -339,16 +300,17 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.goodsStock"
|
||||
maxlength="40"
|
||||
type="number"
|
||||
oninput="if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示顺序" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="scope.row.attributeDetailsSort"
|
||||
maxlength="40"
|
||||
v-model="scope.row.attributeDetailsSort"
|
||||
type="number"
|
||||
oninput=" if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -395,173 +357,132 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 查看商品详情 -->
|
||||
<!-- 新增护理站名称弹框 -->
|
||||
<!-- <el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open2"
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="addcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
ref="queryForm"
|
||||
:model="getListByUserquery"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="form.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
clearable
|
||||
v-model="form.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.nurseStationId"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.nurseStationId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.goodsCategoryId"
|
||||
clearable
|
||||
placeholder="请选择商品分类名称"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goodsCategorylist"
|
||||
:key="item.id"
|
||||
:label="item.goodsCategoryName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="form.goodsPurpose"
|
||||
placeholder="请选择"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodsPictureUrl">
|
||||
<img
|
||||
:src="form.goodsPictureUrl"
|
||||
alt=""
|
||||
style="width: 150px; height: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-table
|
||||
ref="goodDetailsLists"
|
||||
:data="goodDetailsLists"
|
||||
label-width="50px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
label="商品属性名称"
|
||||
align="center"
|
||||
prop="attributeName"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品单价" align="center" prop="goodsPrice">
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" align="center" prop="goodsStock">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="显示顺序"
|
||||
align="center"
|
||||
prop="attributeDetailsSort"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品属性图片" align="center">
|
||||
<template slot-scope="scope">
|
||||
<img
|
||||
:src="scope.row.attributePitureUrl"
|
||||
alt=""
|
||||
style="width: 100px; height: 100px"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item
|
||||
label="商品概述"
|
||||
prop="goodsRemark"
|
||||
style="margin-top: 20px"
|
||||
label="护理站编码"
|
||||
prop="nurseStationCode"
|
||||
label-width="120"
|
||||
>
|
||||
<textarea
|
||||
style="margin-left: 30px"
|
||||
v-model="form.goodsRemark"
|
||||
name=""
|
||||
id=""
|
||||
cols="130"
|
||||
rows="10"
|
||||
:disabled="true"
|
||||
></textarea>
|
||||
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
prop="nurseStationName"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery2"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="nurseStationId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="open2 = false">确定</el-button>
|
||||
</div>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="handleQuery2"
|
||||
/>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGoodsInfo,
|
||||
getGoodsInfo,
|
||||
delGoodsInfo,
|
||||
addGoodsInfo,
|
||||
updateGoodsInfo,
|
||||
updatePicture,
|
||||
goodsInfoList,
|
||||
listStation,
|
||||
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: "GoodsInfo",
|
||||
name: "OperateGoodsInfo",
|
||||
data() {
|
||||
return {
|
||||
imgone: "",
|
||||
|
||||
imageUrl: "", //商品图片
|
||||
value: "",
|
||||
datas: null,
|
||||
@ -577,6 +498,8 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
|
||||
// 商品基本信息表格数据
|
||||
goodsInfoList: [],
|
||||
// 护理站列表
|
||||
@ -588,6 +511,10 @@ export default {
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// open2: false,
|
||||
innerVisible: false,
|
||||
// StationName: "请选择所属护理站",
|
||||
nursetotal: 0,
|
||||
nurseStationId: null,
|
||||
goods: [
|
||||
{
|
||||
value: "BUSINESS",
|
||||
@ -616,6 +543,10 @@ export default {
|
||||
id: null,
|
||||
whetherShelf: null,
|
||||
},
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryParams: {
|
||||
id: null,
|
||||
pageNum: 1,
|
||||
@ -624,7 +555,7 @@ export default {
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
goodsCode: null,
|
||||
// goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
@ -632,9 +563,18 @@ export default {
|
||||
goodsUnit: null,
|
||||
goodsPurpose: null,
|
||||
sort: null,
|
||||
// mame:null,
|
||||
},
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
nurseStationName:"",
|
||||
nurseStationId:"",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsName: [
|
||||
@ -644,7 +584,7 @@ export default {
|
||||
{ required: true, message: "请选择商品分类名称", trigger: "blur" },
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择护理站名称", trigger: "blur" },
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
goodsPurpose: [
|
||||
{ required: true, message: "请选择商品用途", trigger: "blur" },
|
||||
@ -660,7 +600,8 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.list();
|
||||
this.info();
|
||||
// this.getList2();
|
||||
},
|
||||
methods: {
|
||||
upwhetherShelf(row) {
|
||||
@ -703,16 +644,6 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
list() {
|
||||
listStation().then((res) => {
|
||||
console.log(res);
|
||||
this.nurseStationlist = res.data;
|
||||
});
|
||||
goodsCategory().then((res) => {
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
addgoodAttributeDetail() {
|
||||
console.log(this.goodDetailsLists);
|
||||
@ -754,8 +685,19 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
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: "",
|
||||
@ -769,16 +711,41 @@ export default {
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// this.goodDetailsLists = [{
|
||||
// attributeName: "",
|
||||
// attributePitureUrl: "",
|
||||
// goodsPrice: "",
|
||||
// goodsStock: "",
|
||||
// sort: "",
|
||||
// ids: 1,
|
||||
// }]
|
||||
},
|
||||
// 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 = {
|
||||
@ -787,7 +754,7 @@ export default {
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
goodsCode: null,
|
||||
// goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
@ -800,6 +767,15 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
},
|
||||
];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -809,7 +785,21 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
if (this.nurseStationlist[0].isAdmin == '1') {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
} else {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.goodsName = null
|
||||
this.queryParams.goodsCategoryName = null
|
||||
this.queryParams.goodsPurpose = null
|
||||
this.queryParams.whetherShelf = null
|
||||
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -821,9 +811,11 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.reset()
|
||||
this.form.nurseStationName=this.nurseStationlist[0].nurseStationName
|
||||
this.form.nurseStationId =this.nurseStationlist[0].id;
|
||||
this.title = "商品基本信息";
|
||||
console.log(this.ids);
|
||||
this.StationName = "请选择所属护理站";
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
@ -837,29 +829,25 @@ export default {
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
console.log(row)
|
||||
// this.reset();
|
||||
const id = row.goodsInfoId || this.ids;
|
||||
getGoodsInfo(id).then((response) => {
|
||||
console.log(response)
|
||||
this.form = response.data[0];
|
||||
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
||||
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 = "修改商品基本信息";
|
||||
});
|
||||
},
|
||||
// reference(row) {
|
||||
// getGoodsInfo(row.goodsInfoId).then((response) => {
|
||||
// response.data[0].goodsPictureUrl =
|
||||
// baseurl + response.data[0].goodsPictureUrl;
|
||||
// this.form = response.data[0];
|
||||
// response.data[0].goodAttributeDetailsLists.forEach((e) => {
|
||||
// e.attributePitureUrl = baseurl + e.attributePitureUrl;
|
||||
// });
|
||||
// this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
||||
// this.open2 = true;
|
||||
// });
|
||||
// },
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
console.log(this.goodDetailsLists);
|
||||
this.form.goodAttributeDetailsLists = [];
|
||||
this.form.goodDetailsLists = this.goodDetailsLists;
|
||||
@ -874,10 +862,13 @@ export default {
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
console.log(this.form);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
||||
// this.StationName = "请选择所属护理站";
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
@ -885,17 +876,13 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log('row :>> ', row);
|
||||
this.$confirm(
|
||||
'是否确认删除订单信息的数据项?',
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
handleDelete(row) {
|
||||
console.log("row :>> ", row);
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
@ -903,7 +890,7 @@ export default {
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
// handleDelete(row) {
|
||||
// const ids = row.id || this.ids;
|
||||
@ -952,6 +939,44 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
goodsCategory().then((res) => {
|
||||
console.log(res)
|
||||
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
console.log(res)
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
// console.log(this.queryParams)
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.getListByUserquery.pageNum >= a) {
|
||||
} else {
|
||||
this.getListByUserquery.pageNum++;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -85,7 +85,7 @@
|
||||
v-hasPermi="['system:nurseType:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
|
||||
@ -6,15 +6,22 @@
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="客户" prop="patientName" style="margin-left:-4%">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入客户"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
v-loadmore="loadMore"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
@ -24,7 +31,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select
|
||||
v-model="queryParams.orderStatus"
|
||||
@ -39,7 +45,14 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="会员名称" prop="patientName">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入会员名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -51,26 +64,70 @@
|
||||
<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
|
||||
v-loading="loading"
|
||||
:data="OrderDetailsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="会员名称" align="center" prop="patientName" />
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="订单编号" align="center" prop="orderNo" />
|
||||
<el-table-column
|
||||
label="护理项目名称"
|
||||
align="center"
|
||||
prop="nurseItemName"
|
||||
/>
|
||||
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
|
||||
<el-table-column label="下单时间" align="center" prop="createTime" />
|
||||
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderStatus == "WAIT_PAY" ? "待付款" : "" }}
|
||||
{{ scope.row.orderStatus == "WAIT_DISPATCH" ? "待派单" : "" }}
|
||||
{{ scope.row.orderStatus == "NOT_FINISH" ? "未完成" : "" }}
|
||||
{{ scope.row.orderStatus == "COMPLETE" ? "服务完成" : "" }}
|
||||
<el-button v-if="scope.row.orderStatus == 'WAIT_PAY'"
|
||||
>待付款</el-button
|
||||
>
|
||||
<el-button type="primary" v-if="scope.row.orderStatus == 'PAY'"
|
||||
>已付款</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
|
||||
>待派单</el-button
|
||||
>
|
||||
<el-button type="primary" v-if="scope.row.orderStatus == 'NOT_FINISH'"
|
||||
>未完成</el-button
|
||||
>
|
||||
<el-button type="success" v-if="scope.row.orderStatus == 'COMPLETE'"
|
||||
>服务完成</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
|
||||
>退款中</el-button
|
||||
>
|
||||
<el-button type="warning" v-if="scope.row.orderStatus == 'REFUNDED'"
|
||||
>退款成功</el-button
|
||||
>
|
||||
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
|
||||
>已取消</el-button
|
||||
>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" align="center" prop="createTime" />
|
||||
<el-table-column label="会员名称" align="center" prop="patientName" />
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@ -80,35 +137,55 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="seeLook(scope.row)"
|
||||
v-hasPermi="['system:nurseType:edit']"
|
||||
v-hasPermi="['system:appointmentOrder:query']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-s-promotion"
|
||||
@click="dispatch(scope.row)"
|
||||
v-hasPermi="['system:nurseType:edit']"
|
||||
v-hasPermi="['system:appointmentOrder:dispatch']"
|
||||
v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
|
||||
>派单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="cencel(scope.row.appointmentOrderId)"
|
||||
v-hasPermi="['system:nurseType:edit']"
|
||||
disabled
|
||||
icon="el-icon-s-promotion"
|
||||
@click="dispatch(scope.row)"
|
||||
v-else
|
||||
>派单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-error"
|
||||
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
|
||||
@click="cencel(scope.row)"
|
||||
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"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:nurseType:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -119,136 +196,119 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 查看弹框 -->
|
||||
<el-dialog
|
||||
title="查看订单信息"
|
||||
title="查看预约订单信息"
|
||||
:visible.sync="innerVisible4"
|
||||
append-to-body
|
||||
width="1048px"
|
||||
|
||||
width="1100px"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="form"
|
||||
:model="form"
|
||||
:model="query"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
class="orderInfo"
|
||||
>
|
||||
|
||||
<div v-for="(item, index) in query" :key="index">
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="item.orderNo"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input
|
||||
:value="switchOrderStatus(item.orderStatus)"
|
||||
disabled
|
||||
style="width: 150px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="item.nurseStationName"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单数量" prop="orderCount">
|
||||
<el-input
|
||||
v-model="item.orderCount"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="护理项目名称" prop="nurseItemName">
|
||||
<el-input
|
||||
v-model="item.nurseItemName"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务时间" prop="time">
|
||||
<el-input
|
||||
v-model="item.time"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目时长" prop="itemServeDurationUnit">
|
||||
<el-input
|
||||
v-model="item.itemServeDurationUnit"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理项目价格" prop="nurseItemPrice">
|
||||
<el-input
|
||||
v-model="item.nurseItemPrice"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务地址" prop="serviceAddress">
|
||||
<el-input
|
||||
v-model="item.serviceAddress"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-table
|
||||
:data="item.appointmentOrderConsumableList"
|
||||
align="center"
|
||||
style="margin: 10px 0 20px 0; padding-bottom: 20px"
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="query.orderNo"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input
|
||||
:value="switchOrderStatus(query.orderStatus)"
|
||||
disabled
|
||||
style="width: 180px"
|
||||
>
|
||||
<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>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单总金额" prop="totalPrice">
|
||||
<el-input
|
||||
v-model="query.totalPrice"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单数量" prop="orderCount">
|
||||
<el-input
|
||||
v-model="query.orderCount"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目名称" prop="nurseItemName">
|
||||
<el-input
|
||||
v-model="query.nurseItemName"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务时间" prop="time">
|
||||
<el-input
|
||||
v-model="query.time"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目时长" prop="itemServeDurationUnit">
|
||||
<el-input
|
||||
v-model="query.itemServeDurationUnit"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="query.nurseStationName"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务地址" prop="serviceAddress">
|
||||
<el-input
|
||||
v-model="query.serviceAddress"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-table
|
||||
:data="query.appointmentOrderConsumableList"
|
||||
align="center"
|
||||
style="margin: 10px 0 20px 0; padding-bottom: 20px"
|
||||
>
|
||||
<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>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 派单弹框 -->
|
||||
@ -259,12 +319,12 @@
|
||||
width="500px"
|
||||
height="100px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-form-item label="护理员姓名" prop="nursePersonName">
|
||||
<el-button
|
||||
type=""
|
||||
v-if="nurseName == '请选择护理员'"
|
||||
style="width: 200px; text-align: left; height: 36px; color: #c0c4cc"
|
||||
style="width: 300px; text-align: left; height: 36px; color: #c0c4cc"
|
||||
@click="clicknursePersonName()"
|
||||
>{{ nurseName }}</el-button
|
||||
>
|
||||
@ -273,7 +333,7 @@
|
||||
@click="clicknursePersonName()"
|
||||
v-else
|
||||
style="
|
||||
width: 362px;
|
||||
width: 300px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
@ -299,6 +359,55 @@
|
||||
<!-- <el-button @click="cancel">取 消</el-button> -->
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 取消预约弹框 -->
|
||||
<el-dialog
|
||||
title="取消预约"
|
||||
:visible.sync="innerrefund"
|
||||
append-to-body
|
||||
width="500px"
|
||||
>
|
||||
<el-form :inline="true" :rules="rules" label-width="120px">
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
style="width: 260px"
|
||||
v-model="query.orderNo"
|
||||
clearable
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务项目" prop="nurseItemName">
|
||||
<el-input
|
||||
v-model="query.nurseItemName"
|
||||
style="width: 260px"
|
||||
clearable
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员姓名" prop="patientName">
|
||||
<el-input
|
||||
v-model="query.patientName"
|
||||
style="width: 260px"
|
||||
clearable
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款原因" prop="cancelAppointmentReason">
|
||||
<el-input
|
||||
style="width: 260px"
|
||||
v-model="query.cancelAppointmentReason"
|
||||
placeholder=""
|
||||
clearable
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cencelbtn">取 消</el-button>
|
||||
<el-button type="primary" @click="ordercacenl">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 姓名弹框 -->
|
||||
<el-dialog
|
||||
:visible.sync="nursePersonNameinfo"
|
||||
@ -307,27 +416,19 @@
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="querynursePerson"
|
||||
:model="querynursePersonname"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="姓名" prop="nursePersonName" label-width="120">
|
||||
<el-input
|
||||
v-model="querynursePerson.nursePersonName"
|
||||
v-model="querynursePersonname.nursePersonName"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone" label-width="120">
|
||||
<el-input
|
||||
v-model="querynursePerson.phone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -336,18 +437,18 @@
|
||||
@click="handleQuery2"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="dispatchlist">
|
||||
<el-table :data="dispatchlist" @cell-dblclick="nursePersonclick">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px; overflow: hidden"
|
||||
v-if="nursePersonid == scope.row.id"
|
||||
v-if="nursePersonid == scope.row.nurseStationPersonId"
|
||||
circle
|
||||
@click="nursePersonclick(scope.row)"
|
||||
></el-button>
|
||||
@ -368,7 +469,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nursePersonName"
|
||||
label="会员姓名"
|
||||
label="护理站人员姓名"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
@ -398,13 +499,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="querynursePerson.pageNum"
|
||||
:limit.sync="querynursePerson.pageSize"
|
||||
:page.sync="querynursePersonname.pageNum"
|
||||
:limit.sync="querynursePersonname.pageSize"
|
||||
@pagination="handleQuery2"
|
||||
/> -->
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -415,8 +516,10 @@ import {
|
||||
deldetailed,
|
||||
getPerson,
|
||||
dispatchsubmit,
|
||||
confirmCancel
|
||||
xylWeChatRefundNotify,
|
||||
appointmentOrderDetails,
|
||||
} from "@/api/system/order";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
export default {
|
||||
name: "order",
|
||||
data() {
|
||||
@ -426,23 +529,42 @@ export default {
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
{
|
||||
value: "PAY",
|
||||
label: "已付款",
|
||||
},
|
||||
{
|
||||
value: "CANCEL",
|
||||
label: "已取消",
|
||||
},
|
||||
{
|
||||
value: "WAIT_DISPATCH",
|
||||
label: "待派单",
|
||||
},
|
||||
{
|
||||
value: "NOT_FINISH",
|
||||
label: "未完成",
|
||||
value: "REFUNDED",
|
||||
label: "已退款",
|
||||
},
|
||||
|
||||
{
|
||||
value: "WAIT_REFUND",
|
||||
label: "退款中",
|
||||
},
|
||||
{
|
||||
value: "COMPLETE",
|
||||
label: "服务完成",
|
||||
},
|
||||
|
||||
{
|
||||
value: "NOT_FINISH",
|
||||
label: "未完成",
|
||||
},
|
||||
],
|
||||
value: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
innerVisible4: false,
|
||||
innerrefund: false,
|
||||
// 派单弹框
|
||||
innerdispatch: false,
|
||||
// 姓名弹框
|
||||
@ -460,14 +582,16 @@ export default {
|
||||
total: 0,
|
||||
// 护理类型信息表格数据
|
||||
OrderDetailsList: [],
|
||||
OrderDetailsLists: [],
|
||||
dispatchlist: [],
|
||||
nurseName: "请选择护理员",
|
||||
nursePersonid: "",
|
||||
querynursecencel:{
|
||||
appointmentOrderId:"",
|
||||
},
|
||||
// total2: 0,
|
||||
// querynursecencel:{
|
||||
// appointmentOrderId:"",
|
||||
// },
|
||||
appointmentOrderId: "",
|
||||
nurseStationPersonId: "",
|
||||
total2: 0,
|
||||
nurseStationlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -477,27 +601,21 @@ export default {
|
||||
queryParams: {
|
||||
patientName: null,
|
||||
orderNo: null,
|
||||
nurseStationId: null,
|
||||
// orderStatus: null,
|
||||
orderStatus: "",
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
querynursePerson: {
|
||||
nursePersonName: null,
|
||||
phone: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
querynursePersonname: {
|
||||
detailsId: "",
|
||||
orderNo: "",
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
departmentName: null,
|
||||
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
query: [],
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@ -506,8 +624,29 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
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":
|
||||
@ -518,103 +657,77 @@ export default {
|
||||
return "未完成";
|
||||
case "COMPLETE":
|
||||
return "服务完成";
|
||||
case "PAY":
|
||||
return "已付款";
|
||||
case "WAIT_REFUND":
|
||||
return "退款中";
|
||||
case "CANCEL":
|
||||
return "已取消";
|
||||
case "REFUNDED":
|
||||
return "已退款";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 查看
|
||||
seeLook(row) {
|
||||
this.innerVisible4 = true;
|
||||
const id = row.orderNo;
|
||||
// console.log(row);
|
||||
Detailed(id).then((res) => {
|
||||
appointmentOrderDetails(id).then((res) => {
|
||||
res.data.forEach((e) => {
|
||||
if (e.serviceDate) {
|
||||
e.time =
|
||||
e.serviceDate +
|
||||
"-" +
|
||||
e.serviceStartTime +
|
||||
"-" +
|
||||
e.serviceEndTime
|
||||
e.serviceDate + "-" + e.serviceStartTime + "-" + e.serviceEndTime;
|
||||
}
|
||||
} );
|
||||
this.OrderDetailsLists = res.data;
|
||||
this.query = res.data;
|
||||
});
|
||||
this.query = res.data[0];
|
||||
this.innerVisible4 = true;
|
||||
console.log(this.query);
|
||||
});
|
||||
},
|
||||
|
||||
// 派单
|
||||
dispatch(row) {
|
||||
console.log(row)
|
||||
this.querynursePersonname.detailsId = row.detailsId
|
||||
console.log(this.querynursePersonname.detailsId);
|
||||
// console.log(row)
|
||||
console.log(row);
|
||||
this.querynursePersonname.orderNo = row.orderNo;
|
||||
this.nurseName = "请选择护理员";
|
||||
this.innerdispatch = true;
|
||||
this.nursePersonid = "";
|
||||
},
|
||||
// 姓名弹框
|
||||
clicknursePersonName() {
|
||||
// console.log(this.dispatchlist);
|
||||
getPerson(this.querynursePersonname).then((res) => {
|
||||
this.dispatchlist = res.rows;
|
||||
// this.total2 = res.total;
|
||||
console.log(this.dispatchlist);
|
||||
this.total2 = res.total;
|
||||
this.nursePersonNameinfo = true;
|
||||
});
|
||||
},
|
||||
// 姓名弹框确定按钮
|
||||
submitForm() {
|
||||
console.log(this.dispatchlist)
|
||||
var obj = {}
|
||||
obj.id = this.nursePersonid
|
||||
obj.nurseStationPersonId = this.querynursePersonname.detailsId
|
||||
dispatchsubmit(obj).then((res) => {
|
||||
this.nurseName = "请选择护理员";
|
||||
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.id
|
||||
this.nurseName = row.nursePersonName
|
||||
this.nursePersonid = row.nurseStationPersonId;
|
||||
this.nurseName = row.nursePersonName;
|
||||
this.nursePersonNameinfo = false;
|
||||
console.log(row)
|
||||
|
||||
console.log(row);
|
||||
},
|
||||
// 确认取消预约
|
||||
// cencel(appointmentOrderId) {
|
||||
// confirmCancel(appointmentOrderId).then((res) => {
|
||||
// // this.nurseName="请选择护理员";
|
||||
// // this.innerdispatch = false;
|
||||
|
||||
// })
|
||||
// console.log(appointmentOrderId)
|
||||
// },
|
||||
|
||||
cencel(row) {
|
||||
console.log('row :>> ', this.querynursecencel.appointmentOrderId);
|
||||
this.querynursecencel.appointmentOrderId = row.appointmentOrderId
|
||||
// obj.appointmentOrderId=row.appointmentOrderId
|
||||
this.$confirm(
|
||||
'是否确认取消订单',
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
|
||||
confirmCancel(this.querynursecencel).then((res) => {
|
||||
this.$message.success("取消成功");
|
||||
this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
Detailed(row.orderNo).then((res) => {
|
||||
this.query = res.data;
|
||||
this.innerrefund = true;
|
||||
});
|
||||
},
|
||||
/** 查询护理类型信息列表 */
|
||||
getList() {
|
||||
@ -646,17 +759,63 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
handleQuery2() {
|
||||
getPerson(this.querynursePerson).then((res) => {
|
||||
this.dispatchlist = res.data;
|
||||
console.log(this.dispatchlist);
|
||||
this.innerdispatch = true;
|
||||
getPerson(this.querynursePersonname).then((res) => {
|
||||
this.dispatchlist = res.rows;
|
||||
console.log(this.querynursePersonname);
|
||||
// this.innerdispatch = true;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
} else {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.orderNo = null
|
||||
this.queryParams.orderStatus = null
|
||||
this.queryParams.patientName=null
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.queryParams).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total = res.total;
|
||||
} else {
|
||||
this.total = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total) {
|
||||
} else {
|
||||
if (this.queryParams.pageNum >= a) {
|
||||
} else {
|
||||
this.queryParams.pageNum++;
|
||||
getListByUser(this.queryParams).then((res) => {
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
resetQuery2() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery2();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
@ -666,20 +825,15 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// console.log('row :>> ', row);
|
||||
this.$confirm(
|
||||
'是否确认删除订单信息的数据项?',
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
deldetailed(row.appointmentOrderId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
@ -697,9 +851,11 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .orderInfo{
|
||||
::v-deep .orderInfo {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -71,18 +71,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="居住小区" prop="communityAliasName">
|
||||
<!-- <el-form-item label="居住小区" prop="communityAliasName">
|
||||
<el-input
|
||||
v-model="queryParams.communityAliasName"
|
||||
placeholder="请输入居住小区"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="patientName">
|
||||
</el-form-item> -->
|
||||
<el-form-item label="会员姓名" prop="patientName">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入姓名"
|
||||
placeholder="请输入会员姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
@ -158,18 +158,18 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column label="会员姓名" align="center" prop="patientName" />
|
||||
<el-table-column
|
||||
label="所属区域"
|
||||
align="center"
|
||||
prop="area"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="居住小区"
|
||||
align="center"
|
||||
prop="communityAliasName"
|
||||
/>
|
||||
/> -->
|
||||
<el-table-column label="身份证号" align="center" prop="cardNo" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column label="居住地址" align="center" prop="address" />
|
||||
@ -197,6 +197,14 @@
|
||||
v-hasPermi="['system:patientArchives:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-key"
|
||||
@click="handleResetPwd(scope.row)"
|
||||
v-hasPermi="['system:patientArchives:remove']"
|
||||
>重置密码</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -223,20 +231,16 @@
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="姓名" prop="patientName">
|
||||
<el-form-item label="客户姓名" prop="patientName">
|
||||
<el-input
|
||||
v-model="form.patientName"
|
||||
placeholder="请输入姓名"
|
||||
placeholder="请输入客户姓名"
|
||||
maxlength="20"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="所属区域" prop="areaName">
|
||||
<el-input v-model="form.areaName" placeholder="请输入所属区域" :disabled="true"/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="所属区域" prop="areaCode" :disabled="true">
|
||||
<!-- <el-input v-model="form.province" placeholder="请输入姓名" :disabled="true"/> -->
|
||||
<!-- <el-input v-model="form.city" placeholder="请输入姓名" :disabled="true" style="width:100px"/> -->
|
||||
<!-- <input type="text"> -->
|
||||
<el-select
|
||||
v-model="form.province"
|
||||
clearable
|
||||
@ -310,14 +314,7 @@
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户姓名" prop="patientName">
|
||||
<el-input
|
||||
v-model="form.patientName"
|
||||
placeholder="请输入客户姓名"
|
||||
maxlength="20"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="form.phone"
|
||||
@ -387,16 +384,20 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="头像" prop="headPictureUrl">
|
||||
<img
|
||||
:src="baseUrl + form.headPictureUrl"
|
||||
style="width: 200px; height: 200px"
|
||||
/>
|
||||
<img
|
||||
:src="baseUrl + form.headPictureUrl"
|
||||
style="width: 200px; height: 200px"
|
||||
/>
|
||||
|
||||
<!-- <el-input v-model="form.headPictureUrl" placeholder="请输入个人头像地址" /> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="margin-top:-50px;margin-right: 40%">
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
style="margin-top: -50px; margin-right: 40%"
|
||||
>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
@ -414,6 +415,7 @@ import {
|
||||
FirstLevel,
|
||||
SecondaryLevelInfo,
|
||||
getSubordinateRegions,
|
||||
updatePassword,
|
||||
} from "@/api/system/patientArchives";
|
||||
|
||||
export default {
|
||||
@ -598,6 +600,31 @@ export default {
|
||||
// this.areas();
|
||||
},
|
||||
methods: {
|
||||
// 重置密码
|
||||
handleResetPwd(row) {
|
||||
console.log(row)
|
||||
const id= row.id
|
||||
console.log(id)
|
||||
// const id=row.userId
|
||||
this.$prompt('请输入新的密码', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputPattern: /^.{5,20}$/,
|
||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
const params = {
|
||||
id,
|
||||
password: res.value
|
||||
}
|
||||
updatePassword(params).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功,新密码是:" + res.value);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
// 查询省事件
|
||||
province(item) {
|
||||
console.log(item);
|
||||
@ -831,7 +858,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -8,14 +8,6 @@
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- <el-form-item label="区域编码" prop="areaCode">
|
||||
<el-input
|
||||
v-model="queryParams.areaCode"
|
||||
placeholder="请输入所属区域编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
prop="nurseStationName"
|
||||
@ -59,54 +51,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站类型" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationType"
|
||||
clearable
|
||||
placeholder="请选择护理类型"
|
||||
style="width: 208px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationTypelist"
|
||||
:key="item.nurseTypeCode"
|
||||
:label="item.nurseTypeName"
|
||||
:value="item.nurseTypeCode"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="护理站地址" prop="address">
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
placeholder="请输入护理站地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="负责人" prop="dutyPerson">
|
||||
<el-input
|
||||
v-model="queryParams.dutyPerson"
|
||||
placeholder="请输入负责人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="dutyPhone">
|
||||
<el-input
|
||||
v-model="queryParams.dutyPhone"
|
||||
placeholder="请输入负责人联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -145,18 +90,7 @@
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:station:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
@ -168,17 +102,7 @@
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:station:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
@ -203,13 +127,13 @@
|
||||
prop="nurseStationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="护理站类型" align="center" prop="nurseTypeName">
|
||||
<!-- <el-table-column label="护理站类型" align="center" prop="nurseTypeName">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="looktype(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="所属区域" align="center" prop="area">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
@ -225,18 +149,7 @@
|
||||
prop="address"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="护理站简介"
|
||||
align="center"
|
||||
prop="agencyIntroduce"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="护理站总概述"
|
||||
align="center"
|
||||
prop="nurseStationDescription"
|
||||
: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" />
|
||||
@ -250,7 +163,6 @@
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -304,33 +216,6 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看标签信息 -->
|
||||
<!-- <el-dialog
|
||||
title="标签信息"
|
||||
:visible.sync="nurseStationLabelopen"
|
||||
width="700px"
|
||||
append-to-body
|
||||
>
|
||||
<el-table v-loading="loading" :data="looknurseStationLabel">
|
||||
<el-table-column
|
||||
label="标签名称"
|
||||
align="center"
|
||||
prop="labelDescription"
|
||||
/>
|
||||
<el-table-column label="标签编号" align="center" prop="labelCode" />
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="nurseStationLabelopen = false"
|
||||
size="small"
|
||||
>关闭窗口</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog> -->
|
||||
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -393,7 +278,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="form.streetName"
|
||||
v-model="form.streetCode"
|
||||
clearable
|
||||
placeholder="请选择街道"
|
||||
style="width: 129px; margin-left: 10px"
|
||||
@ -408,13 +293,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站地址" prop="address">
|
||||
<el-input
|
||||
v-model="form.address"
|
||||
placeholder="请输入护理站地址"
|
||||
maxlength="80"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="form.nurseStationName"
|
||||
@ -422,7 +300,13 @@
|
||||
maxlength="40"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理站地址" prop="address">
|
||||
<el-input
|
||||
v-model="form.address"
|
||||
placeholder="请输入护理站地址"
|
||||
maxlength="80"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站经度" prop="longitude">
|
||||
<el-input
|
||||
v-model="form.longitude"
|
||||
@ -439,22 +323,6 @@
|
||||
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理类型" prop="nurseStationType">
|
||||
<el-select
|
||||
v-model="nurseStationType2"
|
||||
multiple
|
||||
placeholder="请选择护理类型"
|
||||
style="width: 208px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationTypelist"
|
||||
:key="item.nurseTypeCode"
|
||||
:label="item.nurseTypeName"
|
||||
:value="item.nurseTypeCode"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="form.phone"
|
||||
@ -462,6 +330,15 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
v-model="form.sort"
|
||||
placeholder="排序不可输入小数点"
|
||||
type="number"
|
||||
min="0"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>8){value=value.slice(0,8)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="dutyPerson">
|
||||
<el-input
|
||||
v-model="form.dutyPerson"
|
||||
@ -476,18 +353,9 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
v-model="form.sort"
|
||||
placeholder="排序不可输入小数点"
|
||||
type="number"
|
||||
min="0"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>8){value=value.slice(0,8)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||
<el-input
|
||||
style="width: 208px"
|
||||
style="width: 540px"
|
||||
v-model="form.nurseStationDescription"
|
||||
placeholder="请输入护理站信息总概述"
|
||||
type="textarea"
|
||||
@ -565,7 +433,7 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delnurseStationLabelList(scope.$index,scope.row)"
|
||||
@click="delnurseStationLabelList(scope.$index, scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
@ -578,7 +446,6 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
@ -629,6 +496,7 @@ import {
|
||||
getFirstLevelInfo,
|
||||
getSecondaryLevelInfo,
|
||||
getInfoLists,
|
||||
updatePicture,
|
||||
} from "@/api/system/station";
|
||||
import { getInfoList } from "@/api/system/nurseItem";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
@ -667,6 +535,8 @@ export default {
|
||||
return {
|
||||
imageUrl: "",
|
||||
imageUrl2: "",
|
||||
imgtwo: "",
|
||||
imgone: "",
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -686,11 +556,6 @@ export default {
|
||||
nurseTypeCode: "nurse_type_code",
|
||||
nurseStationTypelist: [],
|
||||
nurseStationType2: null,
|
||||
//shengshiqu
|
||||
value3: "",
|
||||
value2: "",
|
||||
value1: "",
|
||||
value: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -710,7 +575,7 @@ export default {
|
||||
looknurseStationLabel: [
|
||||
{
|
||||
labelDescription: "",
|
||||
labelSort: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
],
|
||||
@ -739,6 +604,7 @@ export default {
|
||||
pageSize: 10,
|
||||
},
|
||||
// 查询参数
|
||||
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -788,18 +654,14 @@ export default {
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
// { required: true, message: "联系电话不能为空", trigger: "blur" },
|
||||
],
|
||||
// dutyPerson: [
|
||||
// { required: true, message: "负责人不能为空", trigger: "blur" },
|
||||
// ],
|
||||
|
||||
dutyPhone: [
|
||||
{
|
||||
validator: checkMobile2,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
// { required: false, message: "负责人电话不能为空", trigger: "blur" },
|
||||
],
|
||||
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
@ -834,20 +696,20 @@ export default {
|
||||
console.log(imgUrl);
|
||||
this.form.stationIntroducePcitureUrl = imgUrl;
|
||||
},
|
||||
delnurseStationLabelList(index,item) {
|
||||
console.log(index,item);
|
||||
console.log()
|
||||
delnurseStationLabelList(index, item) {
|
||||
console.log(index, item);
|
||||
console.log();
|
||||
// this.looknurseStationLabel.splice(index,1)
|
||||
if(this.looknurseStationLabel.length===1){
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
labelDescription: "",
|
||||
labelSort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
}else{
|
||||
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);
|
||||
@ -856,28 +718,16 @@ export default {
|
||||
if (this.looknurseStationLabel.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids+=1;
|
||||
this.ids++;
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
labelSort: "",
|
||||
sort: "",
|
||||
ids: this.ids,
|
||||
};
|
||||
// looknurseStationLabel 这是啥标签信息
|
||||
// 你这新增 肯定是循环出来的啊
|
||||
|
||||
this.looknurseStationLabel.push(obj);
|
||||
}
|
||||
console.log(this.looknurseStationLabel);
|
||||
},
|
||||
//查看标签
|
||||
// looknurseStationLabelList(item) {
|
||||
// console.log(item);
|
||||
// nurseStationlabel(item.id).then((res) => {
|
||||
// this.looknurseStationLabel = res.rows;
|
||||
// this.nurseStationLabelopen = true;
|
||||
// console.log(this.looknurseStationLabel);
|
||||
// });
|
||||
// },
|
||||
//查看类型
|
||||
looktype(item) {
|
||||
// console.log(item);
|
||||
@ -890,34 +740,33 @@ export default {
|
||||
},
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.streetCode = item.areaCode;
|
||||
this.form.areaCode = item.areaCode;
|
||||
this.value3 = item.areaCode;
|
||||
console.log(this.form);
|
||||
console.log(item, this.form);
|
||||
},
|
||||
//点击区县城
|
||||
clickarea(item) {
|
||||
this.value3 = "";
|
||||
console.log(item);
|
||||
this.form.areaCode = "";
|
||||
this.form.streetName = "";
|
||||
getSecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.streetlist = res.data;
|
||||
});
|
||||
},
|
||||
//点击市
|
||||
clickcity(item) {
|
||||
this.value2 = "";
|
||||
this.value3 = "";
|
||||
console.log(item);
|
||||
this.form.regionName = "";
|
||||
this.form.areaCode = "";
|
||||
this.form.streetName = "";
|
||||
getSecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.arealist = res.data;
|
||||
});
|
||||
},
|
||||
//点击省
|
||||
province(item) {
|
||||
this.value1 = "";
|
||||
this.value2 = "";
|
||||
this.value3 = "";
|
||||
this.form.cityName = "";
|
||||
this.form.regionName = "";
|
||||
this.form.areaCode = "";
|
||||
this.form.streetName = "";
|
||||
getSecondaryLevelInfo(item.id).then((res) => {
|
||||
this.citylist = res.data;
|
||||
});
|
||||
@ -935,12 +784,18 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
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();
|
||||
this.value3 = "";
|
||||
this.value2 = "";
|
||||
this.value1 = "";
|
||||
this.value = "";
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -1005,11 +860,10 @@ export default {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
// this.queryParams.nurseStationCode = null;
|
||||
// console.log(1);
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseStationType = null;
|
||||
this.queryParams.nurseStationCode = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
},
|
||||
@ -1022,15 +876,11 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.value3 = "";
|
||||
this.value2 = "";
|
||||
this.value1 = "";
|
||||
this.value = "";
|
||||
this.open = true;
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
labelDescription: "",
|
||||
labeSort:"",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
@ -1038,19 +888,18 @@ export default {
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
console.log(row, "看一当前行数据");
|
||||
this.reset();
|
||||
this.loading = true;
|
||||
const id = row.id || this.ids;
|
||||
getStation(id).then((response) => {
|
||||
console.log(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.nurseStationType2 = this.form.nurseStationType.split(",");
|
||||
console.log(this.list);
|
||||
this.open = true;
|
||||
this.loading = false;
|
||||
console.log(this.form);
|
||||
console.log(this.form)
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@ -1062,7 +911,6 @@ export default {
|
||||
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) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
@ -68,7 +68,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包价格" prop="consumablePrice">
|
||||
<el-form-item label="耗材包价格(元)" prop="consumablePrice">
|
||||
<el-input
|
||||
v-model="queryParams.consumablePrice"
|
||||
placeholder="请输入耗材包价格"
|
||||
@ -126,17 +126,6 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:stationConsumable:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
@ -181,7 +170,7 @@
|
||||
prop="consumableUnit"
|
||||
/>
|
||||
<el-table-column
|
||||
label="耗材包价格"
|
||||
label="耗材包价格(元)"
|
||||
align="center"
|
||||
prop="consumablePrice"
|
||||
/>
|
||||
@ -229,10 +218,10 @@
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="所属护理站" prop="nurseStationId">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="所属护理站">
|
||||
<el-button
|
||||
disabled
|
||||
disabled
|
||||
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
|
||||
@click="open3 = true"
|
||||
v-if="form.nurseStationName == '请选择所属护理站'"
|
||||
@ -240,7 +229,7 @@
|
||||
{{ form.nurseStationName }}
|
||||
</el-button>
|
||||
<el-button
|
||||
disabled
|
||||
disabled
|
||||
style="width: 360px; text-align: left; height: 36px"
|
||||
@click="open3 = true"
|
||||
>
|
||||
@ -261,12 +250,12 @@
|
||||
maxlength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包价格" prop=" ">
|
||||
<el-form-item label="耗材包价格(元)" prop=" ">
|
||||
<el-input
|
||||
v-model="form.consumablePrice"
|
||||
placeholder="请输入耗材包价格"
|
||||
placeholder="请输入耗材包价格"
|
||||
type="number"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>10){value=value.slice(0,10)}"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
||||
min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -285,6 +274,7 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加护理站耗材信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -296,7 +286,7 @@
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
label-width="120px"
|
||||
:inline="true"
|
||||
>
|
||||
<div
|
||||
@ -358,7 +348,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="耗材包价格"
|
||||
label="耗材包价格(元)"
|
||||
:rules="rules.nurseStationConsumables.consumablePrice"
|
||||
:prop="`nurseStationConsumables.${index}.consumablePrice`"
|
||||
>
|
||||
@ -367,7 +357,7 @@
|
||||
placeholder="保留小数点后两位"
|
||||
type="number"
|
||||
min="0"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>5){value=value.slice(0,5)}"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -403,51 +393,6 @@
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="所属护理站" prop="nurseStationId">
|
||||
<el-button
|
||||
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
|
||||
@click="open2 = true"
|
||||
v-if="nurseStationName == '请选择所属护理站'"
|
||||
>
|
||||
{{ nurseStationName }}
|
||||
</el-button>
|
||||
<el-button
|
||||
style="width: 360px; text-align: left; height: 36px"
|
||||
@click="open2 = true"
|
||||
v-else
|
||||
>
|
||||
{{ nurseStationName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包编号" prop="consumableCode">
|
||||
<el-input
|
||||
v-model="form.consumableCode"
|
||||
placeholder="请输入耗材包编号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包详情" prop="consumableDetail">
|
||||
<el-input
|
||||
v-model="form.consumableDetail"
|
||||
placeholder="请输入服务项目耗材包详情"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包单位" prop="consumableUnit">
|
||||
<el-input
|
||||
v-model="form.consumableUnit"
|
||||
placeholder="请输入耗材包单位"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="耗材包价格" prop="consumablePrice">
|
||||
<el-input
|
||||
v-model="form.consumablePrice"
|
||||
placeholder="请输入耗材包价格"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序" />
|
||||
</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>
|
||||
@ -462,7 +407,7 @@
|
||||
:before-close="cancel2"
|
||||
>
|
||||
<el-form
|
||||
:model="nurseStationqueryParams"
|
||||
:model="getListByUserquery"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
@ -471,7 +416,7 @@
|
||||
<el-form-item label="护理站名称">
|
||||
<el-input
|
||||
style="width: 180px"
|
||||
v-model="nurseStationqueryParams.nurseStationName"
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery2"
|
||||
@ -480,7 +425,7 @@
|
||||
<el-form-item label="护理站编号">
|
||||
<el-input
|
||||
style="width: 180px"
|
||||
v-model="nurseStationqueryParams.nurseStationCode"
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery2"
|
||||
@ -501,7 +446,7 @@
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist2"
|
||||
:data="nurseStationlist"
|
||||
@cell-dblclick="clicknurseStation2"
|
||||
>
|
||||
<el-table-column width="60" align="center" label="请选择">
|
||||
@ -546,11 +491,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="nurseStationqueryParams.pageNum"
|
||||
:limit.sync="nurseStationqueryParams.pageSize"
|
||||
@pagination="listinfo"
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- add//选择所属护理站 -->
|
||||
@ -562,26 +507,27 @@
|
||||
:before-close="cancel2"
|
||||
>
|
||||
<el-form
|
||||
:model="nurseStationqueryParams"
|
||||
:model="getListByUserquery"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
|
||||
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||
<el-input
|
||||
style="width: 180px"
|
||||
v-model="nurseStationqueryParams.nurseStationName"
|
||||
placeholder="请输入项目名称"
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery2"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站编号" prop="nurseStationCode">
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
style="width: 180px"
|
||||
v-model="nurseStationqueryParams.nurseStationCode"
|
||||
placeholder="请输入护理站编号"
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery2"
|
||||
/>
|
||||
@ -601,7 +547,7 @@
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist2"
|
||||
:data="nurseStationlist"
|
||||
@cell-dblclick="clicknurseStation"
|
||||
>
|
||||
<el-table-column width="60" align="center" label="请选择">
|
||||
@ -625,19 +571,19 @@
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="护理站编码"
|
||||
align="center"
|
||||
prop="nurseStationCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="护理站编号"
|
||||
align="center"
|
||||
prop="nurseStationCode"
|
||||
/>
|
||||
<el-table-column label="护理站经度" align="center" prop="longitude" />
|
||||
<el-table-column label="护理站纬度" align="center" prop="latitude" />
|
||||
|
||||
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column
|
||||
label="护理站地址"
|
||||
@ -645,16 +591,15 @@
|
||||
prop="address"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="负责人" align="center" prop="dutyPerson" />
|
||||
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="nurseStationqueryParams.pageNum"
|
||||
:limit.sync="nurseStationqueryParams.pageSize"
|
||||
@pagination="listinfo"
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- //导入 -->
|
||||
@ -870,7 +815,7 @@ export default {
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.listinfo();
|
||||
// this.listinfo();
|
||||
},
|
||||
methods: {
|
||||
/** 下载模板操作 */
|
||||
@ -892,8 +837,8 @@ export default {
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
@ -961,15 +906,10 @@ export default {
|
||||
this.open2 = false;
|
||||
this.open3 = false;
|
||||
this.reset2();
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
});
|
||||
},
|
||||
// 表单重置
|
||||
reset2() {
|
||||
this.nurseStationqueryParams = {
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
@ -1022,18 +962,20 @@ export default {
|
||||
this.listStationConsumableinfo();
|
||||
},
|
||||
//护理站分页
|
||||
listinfo() {
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
this.nurseStationlist2 = res.rows;
|
||||
console.log(this.nurseStationlist2);
|
||||
this.total2 = res.total;
|
||||
});
|
||||
},
|
||||
// listinfo() {
|
||||
// list(this.nurseStationqueryParams).then((res) => {
|
||||
// this.nurseStationlist2 = res.rows;
|
||||
// console.log(this.nurseStationlist2);
|
||||
// this.total2 = res.total;
|
||||
// });
|
||||
// },
|
||||
//护理站搜索
|
||||
handleQuery2() {
|
||||
console.log(this.nurseStationqueryParams);
|
||||
this.nurseStationqueryParams.pageNum = 1;
|
||||
this.listinfo();
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total3 = res.total;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
sresetQuery() {
|
||||
@ -1124,7 +1066,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -1141,7 +1083,6 @@ export default {
|
||||
this.upload.title = "护理站耗材导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
|
||||
@ -50,22 +50,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理类型" prop="nurseTypeId" label-width="90px">
|
||||
<el-select
|
||||
v-model="queryParams.nurseTypeId"
|
||||
clearable
|
||||
placeholder="请选择护理类型"
|
||||
v-loadmore="loadMore"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typelist"
|
||||
:key="item.id"
|
||||
:label="item.nurseTypeName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理项目编号" prop="nurseItemCode">
|
||||
<el-input
|
||||
v-model="queryParams.nurseItemCode"
|
||||
@ -95,7 +80,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -147,7 +131,6 @@
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseItemList"
|
||||
@ -166,7 +149,7 @@
|
||||
{{ item.serveDurationUnit }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" style="margin-left: 30px">
|
||||
<el-form-item label="价格(元)" style="margin-left: 30px">
|
||||
<div
|
||||
v-for="(item, index) in props.row.nurseStationItemPrices"
|
||||
:key="index"
|
||||
@ -183,7 +166,7 @@
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="护理类型" align="center" prop="nurseTypeName" />
|
||||
<!-- <el-table-column label="护理类型" align="center" prop="nurseTypeName" /> -->
|
||||
<el-table-column
|
||||
label="护理项目编号"
|
||||
align="center"
|
||||
@ -194,28 +177,13 @@
|
||||
align="center"
|
||||
prop="nurseItemName"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="护理项目内容简介"
|
||||
align="center"
|
||||
prop="nurseItemContent"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="提前预约时长(h)"
|
||||
align="center"
|
||||
prop="advanceAppointDuration"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
/>
|
||||
|
||||
<!-- <el-table-column label="排序" align="center" prop="sort" /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@ -227,7 +195,7 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:nurseItem:edit']"
|
||||
v-hasPermi="['system:stationItem:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -235,7 +203,7 @@
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:nurseItem:remove']"
|
||||
v-hasPermi="['system:stationItem:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
@ -248,7 +216,6 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改护理站护理项目对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -309,22 +276,6 @@
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理类型" prop="nurseTypeId">
|
||||
<el-select
|
||||
v-model="form.nurseTypeId"
|
||||
clearable
|
||||
placeholder="请选择护理类型"
|
||||
style="width: 208px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typelist"
|
||||
:key="item.id"
|
||||
:label="item.nurseTypeName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="提前预约时长"
|
||||
prop="nurseStationItem.advanceAppointDuration"
|
||||
@ -332,10 +283,19 @@
|
||||
<el-input
|
||||
v-model="form.nurseStationItem.advanceAppointDuration"
|
||||
placeholder="提前预约时长(单位小时)"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>5){value=value.slice(0,5)}"
|
||||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目头像" prop="nurseStationItem.itemPictureUrl">
|
||||
<stationAcatar
|
||||
style="width: 208px"
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.nurseStationItem.itemPictureUrl"
|
||||
:type="'itemPictureUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="nurseStationItem.sort">
|
||||
<el-input
|
||||
v-model="form.nurseStationItem.sort"
|
||||
@ -363,43 +323,31 @@
|
||||
<el-table
|
||||
ref="nurseStationItemPrices"
|
||||
:data="form.nurseStationItemPrices"
|
||||
style="margin-top: 20px; width: 100%"
|
||||
style="margin-top: 20px; width: 900px"
|
||||
>
|
||||
<el-table-column
|
||||
property="serveDurationUnit"
|
||||
label="服务时长和单位"
|
||||
width="145"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.serveDurationUnit"
|
||||
maxlength="50"
|
||||
maxlength="6"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="price"
|
||||
label="价格"
|
||||
width="166"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="price" label="价格" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.price"
|
||||
placeholder="小数点后两位"
|
||||
placeholder="小数点后两位(元)"
|
||||
type="number"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>10){value=value.slice(0,10)}"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>6){value=value.slice(0,6)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="description"
|
||||
label="描述"
|
||||
width="140"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="description" label="描述" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.description"
|
||||
@ -407,7 +355,7 @@
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="105">
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -425,14 +373,8 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目头像" prop="nurseStationItem.itemPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.nurseStationItem.itemPictureUrl"
|
||||
:type="'itemPictureUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目耗材" required>
|
||||
|
||||
<el-form-item label="护理项目耗材">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@ -443,7 +385,7 @@
|
||||
<el-table
|
||||
ref="singleTable"
|
||||
:data="form.nurseStationItemConsumables"
|
||||
style="margin-top: 20px; width: 850px"
|
||||
style="margin-top: 20px; width: 900px"
|
||||
>
|
||||
<el-table-column
|
||||
property="nurseStationConsumableId"
|
||||
@ -515,20 +457,20 @@
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="nurseStationqueryParams"
|
||||
:model="getListByUserquery"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||
<el-input
|
||||
v-model="nurseStationqueryParams.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站编号" prop="nurseStationCode">
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="nurseStationqueryParams.nurseStationCode"
|
||||
placeholder="请输入护理站编号"
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -546,7 +488,7 @@
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist2"
|
||||
:data="nurseStationlist"
|
||||
@cell-dblclick="choicestationid"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
@ -568,37 +510,37 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属区域编码" align="center" prop="areaCode" />
|
||||
<el-table-column
|
||||
label="护理站编号"
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
align="center"
|
||||
prop="nurseStationCode"
|
||||
/>
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="护理类型"
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
prop="nurseStationType"
|
||||
/>
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column label="护理站地址" align="center" prop="address" />
|
||||
<el-table-column label="负责人" align="center" prop="dutyPerson" />
|
||||
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="nurseStationqueryParams.pageNum"
|
||||
:limit.sync="nurseStationqueryParams.pageSize"
|
||||
v-show="total4 > 0"
|
||||
:total="total4"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="stationlist"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 耗材弹框 -->
|
||||
<el-dialog
|
||||
title="添加护理项目耗材"
|
||||
@ -709,7 +651,6 @@
|
||||
@pagination="listStationConsumable"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
@ -762,6 +703,7 @@ import {
|
||||
updateNurseItem,
|
||||
getInfoList,
|
||||
liststation,
|
||||
updatePicture,
|
||||
} from "@/api/system/nurseItem";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
@ -772,6 +714,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
imageUrl: "",
|
||||
imgone: "",
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -839,10 +782,6 @@ export default {
|
||||
nurseStationId: null,
|
||||
consumableDetail: null,
|
||||
},
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationItem: {
|
||||
@ -871,9 +810,13 @@ export default {
|
||||
"nurseStationItem.advanceAppointDuration": [
|
||||
{ required: true, message: "提前预约时长不能为空", trigger: "blur" },
|
||||
],
|
||||
"nurseStationItem.itemPictureUrl":[{
|
||||
required: true, trigger: "blur", message: "请选择项目头像"
|
||||
}],
|
||||
"nurseStationItem.itemPictureUrl": [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请选择项目头像",
|
||||
},
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, trigger: "blur", message: "请选择所属护理站" },
|
||||
],
|
||||
@ -887,7 +830,7 @@ export default {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.getInfoListinfo();
|
||||
this.stationlist();
|
||||
// this.stationlist();
|
||||
// this.listStationConsumableinfo();
|
||||
},
|
||||
methods: {
|
||||
@ -917,8 +860,8 @@ export default {
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
@ -987,7 +930,7 @@ export default {
|
||||
},
|
||||
//护理站重置
|
||||
stationcancel() {
|
||||
this.nurseStationqueryParams = {
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
@ -995,9 +938,9 @@ export default {
|
||||
},
|
||||
//下拉框
|
||||
stationlist() {
|
||||
liststation(this.nurseStationqueryParams).then((res) => {
|
||||
this.nurseStationlist2 = res.rows;
|
||||
this.total2 = res.total;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.total4 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
},
|
||||
//护理类型
|
||||
@ -1008,6 +951,7 @@ export default {
|
||||
},
|
||||
/** 耗材列表 */
|
||||
listStationConsumable() {
|
||||
|
||||
listStationConsumable(this.StationConsumablequeryParams).then(
|
||||
(response) => {
|
||||
this.stationConsumableList = response.rows;
|
||||
@ -1046,7 +990,17 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
// this.$refs["form"].clearValidate();
|
||||
console.log(this.form.nurseStationItem);
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.nurseStationItem.itemPictureUrl) {
|
||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
@ -1135,7 +1089,7 @@ export default {
|
||||
};
|
||||
this.handleQuery();
|
||||
} else {
|
||||
this.queryParams.pageNu = 1;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseTypeId = null;
|
||||
this.queryParams.nurseItemCode = null;
|
||||
this.queryParams.nurseItemName = null;
|
||||
@ -1152,15 +1106,19 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.StationConsumablequeryParams.nurseStationId = null;
|
||||
this.title = "添加护理站护理项目";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.StationConsumablequeryParams.nurseStationId = null
|
||||
const id = row.id || this.ids;
|
||||
getNurseItem(id).then((response) => {
|
||||
console.log(response);
|
||||
this.form = response.data;
|
||||
this.StationConsumablequeryParams.nurseStationId = response.data.nurseStationItem.nurseStationId
|
||||
this.imgone = this.form.nurseStationItem.itemPictureUrl;
|
||||
if (this.form.nurseStationItemPrices == []) {
|
||||
var obj = {
|
||||
serveDurationUnit: "",
|
||||
@ -1211,6 +1169,7 @@ export default {
|
||||
} else {
|
||||
addNurseItem(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$forceUpdate()
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
@ -1230,7 +1189,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleExport() {
|
||||
|
||||
@ -364,10 +364,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<!-- multiple -->
|
||||
<el-form-item label="护理站" prop="nurseStationIds">
|
||||
<el-select
|
||||
v-model="form.nurseStationIds"
|
||||
multiple
|
||||
placeholder="请选择护理站"
|
||||
v-loadmore="loadMore"
|
||||
>
|
||||
@ -612,9 +612,9 @@ export default {
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
nurseStationIds: [
|
||||
{ required: true, message: "护理站不能为空", trigger: "blur" },
|
||||
],
|
||||
// nurseStationIds: [
|
||||
// { required: true, message: "护理站不能为空", trigger: "blur" },
|
||||
// ],
|
||||
nickName: [
|
||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||
],
|
||||
@ -797,17 +797,18 @@ export default {
|
||||
const userId = row.userId || this.ids;
|
||||
getUser(userId).then((response) => {
|
||||
this.form = response.data;
|
||||
if (
|
||||
!this.form.nurseStationIds ||
|
||||
this.form.nurseStationIds == null ||
|
||||
this.form.nurseStationIds.length == 0
|
||||
) {
|
||||
} else {
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.split(",");
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.map((e) => {
|
||||
return (e = Number(e));
|
||||
});
|
||||
}
|
||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
// if (
|
||||
// !this.form.nurseStationIds ||
|
||||
// this.form.nurseStationIds == null ||
|
||||
// this.form.nurseStationIds.length == 0
|
||||
// ) {
|
||||
// } else {
|
||||
// this.form.nurseStationIds = this.form.nurseStationIds.split(",");
|
||||
// this.form.nurseStationIds = this.form.nurseStationIds.map((e) => {
|
||||
// return (e = Number(e));
|
||||
// });
|
||||
// }
|
||||
|
||||
console.log(this.form);
|
||||
this.postOptions = response.posts;
|
||||
@ -821,6 +822,7 @@ export default {
|
||||
},
|
||||
/** 重置密码按钮操作 */
|
||||
handleResetPwd(row) {
|
||||
|
||||
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
@ -845,7 +847,13 @@ export default {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||
// this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||
// this.form.nurseStationIds = JSON.stringify(this.form.nurseStationIds);
|
||||
// var obj = [];
|
||||
// obj.push(this.form.nurseStationIds);
|
||||
// console.log(obj)
|
||||
// this.form.nurseStationIds = obj;
|
||||
console.log(this.form);
|
||||
if (this.form.userId != undefined) {
|
||||
updateUser(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
@ -923,4 +931,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
235
vue.config.js
235
vue.config.js
@ -2,12 +2,12 @@
|
||||
const path = require('path')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '泉医到家护理站管理平台' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || '泉医到家运营管理平台' // 网页标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 82 // 端口
|
||||
|
||||
@ -15,122 +15,121 @@ const port = process.env.port || process.env.npm_config_port || 82 // 端口
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
// 这里只列一部分,具体配置参考文档
|
||||
module.exports = {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.xinyilu.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.xinyilu.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
open: true,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
disableHostCheck: true
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
sassOptions: { outputStyle: "expanded" }
|
||||
}
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
name: name,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
// http://doc.xinyilu.vip/xinyilu-vue/other/faq.html#使用gzip解压缩静态文件
|
||||
new CompressionPlugin({
|
||||
cache: false, // 不启用文件缓存
|
||||
test: /\.(js|css|html)?$/i, // 压缩文件格式
|
||||
filename: '[path].gz[query]', // 压缩后的文件名
|
||||
algorithm: 'gzip', // 使用gzip压缩
|
||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||
})
|
||||
],
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
|
||||
// set svg-sprite-loader
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
.include.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
})
|
||||
.end()
|
||||
|
||||
config
|
||||
.when(process.env.NODE_ENV !== 'development',
|
||||
config => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
config
|
||||
.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.xinyilu.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.xinyilu.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
open: true,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
config.optimization.runtimeChunk('single'),
|
||||
{
|
||||
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||
to: './' //到根目录下
|
||||
}
|
||||
}
|
||||
},
|
||||
disableHostCheck: true
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
sassOptions: { outputStyle: "expanded" }
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
name: name,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
// http://doc.xinyilu.vip/xinyilu-vue/other/faq.html#使用gzip解压缩静态文件
|
||||
new CompressionPlugin({
|
||||
cache: false, // 不启用文件缓存
|
||||
test: /\.(js|css|html)?$/i, // 压缩文件格式
|
||||
filename: '[path].gz[query]', // 压缩后的文件名
|
||||
algorithm: 'gzip', // 使用gzip压缩
|
||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||
})
|
||||
],
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
|
||||
// set svg-sprite-loader
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
.include.add(resolve('src/assets/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
})
|
||||
.end()
|
||||
|
||||
config
|
||||
.when(process.env.NODE_ENV !== 'development',
|
||||
config => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
config
|
||||
.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
})
|
||||
config.optimization.runtimeChunk('single'), {
|
||||
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||
to: './' //到根目录下
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user