合并页面
This commit is contained in:
parent
f450f07eb3
commit
b711159df6
69
src/api/system/OperateGoodsInfo.js
Normal file
69
src/api/system/OperateGoodsInfo.js
Normal file
@ -0,0 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品基本信息列表
|
||||
export function goodsInfoList(query) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/goodsInfoList',
|
||||
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'
|
||||
})
|
||||
}
|
||||
@ -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,40 +11,61 @@ 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',
|
||||
} )
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
// 派单
|
||||
export function getPerson(query) {
|
||||
return request({
|
||||
url: '/system/appointmentOrder/getPerson',
|
||||
method: 'get',
|
||||
params: query
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// 确认派单
|
||||
export function dispatchsubmit(params) {
|
||||
export function dispatchsubmit(data) {
|
||||
return request({
|
||||
url: '/system/appointmentOrder/dispatch',
|
||||
method: 'post',
|
||||
params
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 认取消订单
|
||||
export function confirmCancel(params) {
|
||||
|
||||
|
||||
// 确认取消订单
|
||||
export function confirmCancel(appointmentOrderId) {
|
||||
return request({
|
||||
url: '/system/appointmentOrder/confirmCancel',
|
||||
method: 'post',
|
||||
params
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
@ -16,14 +16,6 @@ export function stationList(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//查看所属护理类型
|
||||
|
||||
export function getInfoLists(Code) {
|
||||
return request({
|
||||
url: `/system/station/getNurseStationType?nurseTypeCode=${Code}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所属科室
|
||||
export function StationDepartmentList(query) {
|
||||
|
||||
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
989
src/views/system/OperateGoodsInfo/index.vue
Normal file
989
src/views/system/OperateGoodsInfo/index.vue
Normal file
@ -0,0 +1,989 @@
|
||||
<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="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,
|
||||
} from "@/api/system/OperateGoodsInfo";
|
||||
import editor from "@/components/Editor";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
|
||||
export default {
|
||||
components: { stationAcatar, editor },
|
||||
name: "OperateGoodsInfo",
|
||||
data() {
|
||||
return {
|
||||
imgone: "",
|
||||
|
||||
imageUrl: "", //商品图片
|
||||
value: "",
|
||||
datas: null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
|
||||
// 商品基本信息表格数据
|
||||
goodsInfoList: [],
|
||||
// 护理站列表
|
||||
nurseStationlist: [],
|
||||
// 查询商品分类列表
|
||||
goodsCategorylist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// open2: false,
|
||||
innerVisible: false,
|
||||
StationName: "请选择所属护理站",
|
||||
nursetotal: 0,
|
||||
nurseStationId: null,
|
||||
goods: [
|
||||
{
|
||||
value: "BUSINESS",
|
||||
label: "买卖",
|
||||
},
|
||||
{
|
||||
value: "LEASE",
|
||||
label: "租赁",
|
||||
},
|
||||
],
|
||||
options: [
|
||||
{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
// 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: {},
|
||||
// 表单校验
|
||||
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.getList2();
|
||||
},
|
||||
getList2(){
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
},
|
||||
resetQuery2() {
|
||||
this.resetForm("queryForm");
|
||||
(this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}),
|
||||
this.handleQuery2();
|
||||
},
|
||||
addcancel() {
|
||||
this.innerVisible = false;
|
||||
// this.innerVisiblexg = false;
|
||||
this.resetQuery2();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
storeInfoId: null,
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
// goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
goodsRemark: null,
|
||||
goodsUnit: null,
|
||||
goodsPurpose: null,
|
||||
sort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
},
|
||||
];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == '1') {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
} else {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.goodsName = null
|
||||
this.queryParams.goodsCategoryName = null
|
||||
this.queryParams.goodsPurpose = null
|
||||
}
|
||||
this.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;
|
||||
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();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
// handleDelete(row) {
|
||||
// const ids = row.id || this.ids;
|
||||
// this.$modal
|
||||
// .confirm("是否确认删除?")
|
||||
// .then(function () {
|
||||
// return delGoodsInfo(ids);
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// /** 导出按钮操作 */
|
||||
// handleExport() {
|
||||
// this.download(
|
||||
// "system/goodsInfo/export",
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// },
|
||||
// `goodsInfo_${new Date().getTime()}.xlsx`
|
||||
// );
|
||||
// },
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
this.form.goodsPictureUrl = imgUrl;
|
||||
},
|
||||
attributePitureUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
// this.form.attributePitureUrl = imgUrl;
|
||||
},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.ids && !items.id) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.ids == items.ids) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.ids && items.attributeDetailsId) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
goodsCategory().then((res) => {
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
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>
|
||||
<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"
|
||||
@ -259,7 +257,6 @@
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="联系电话"
|
||||
:rules="rules.nurseStationDepartmentList.phone"
|
||||
@ -280,7 +277,6 @@
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@ -299,34 +295,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 +333,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 +443,6 @@ import {
|
||||
delStationDepartment,
|
||||
addStationDepartment,
|
||||
updateStationDepartment,
|
||||
list,
|
||||
} from "@/api/system/StationDepartment";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
|
||||
@ -391,14 +474,13 @@ export default {
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
|
||||
// 护理站部门信息表格数据
|
||||
StationDepartmentList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open2: false,
|
||||
addopen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -431,7 +513,7 @@ export default {
|
||||
nurseStationId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择护理站",
|
||||
message: "请选择所属护理站",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -450,18 +532,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 +570,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 +608,7 @@ export default {
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
phone: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
};
|
||||
if (this.form.nurseStationDepartmentList.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
@ -525,12 +625,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 +643,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 +655,7 @@ export default {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
this.addopen = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
@ -595,6 +680,7 @@ export default {
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
phone: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
},
|
||||
],
|
||||
};
|
||||
@ -605,22 +691,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 +719,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 +743,6 @@ export default {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
console.log(this.queryParams)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -655,7 +755,7 @@ export default {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.addopen = true;
|
||||
// this.nurseStationName="",
|
||||
this.title = "添加护理站部门信息";
|
||||
},
|
||||
@ -671,6 +771,7 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -682,7 +783,7 @@ export default {
|
||||
} else {
|
||||
addStationDepartment(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open2 = false;
|
||||
this.addopen = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
@ -693,7 +794,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除护理站部门信息的数据项?')
|
||||
.confirm("是否确认删除护理站部门信息的数据项?")
|
||||
.then(function () {
|
||||
return delStationDepartment(ids);
|
||||
})
|
||||
|
||||
@ -142,7 +142,6 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加疾病信息字典对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
|
||||
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"
|
||||
@ -17,7 +32,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName" >
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
@ -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"
|
||||
@ -78,7 +86,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:goodsInfo:add']"
|
||||
v-hasPermi="['system:operateGoodInfo:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -90,33 +98,11 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:goodsInfo:edit']"
|
||||
v-hasPermi="['system:operateGoodInfo: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: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"
|
||||
@ -196,25 +174,17 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsInfo:edit']"
|
||||
v-hasPermi="['system:operateGoodInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
v-hasPermi="['system:operateGoodInfo: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,33 +206,28 @@
|
||||
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"
|
||||
max="40"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationId" label-width="100">
|
||||
<el-select
|
||||
style="width: 210px;margin-left:10px"
|
||||
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" label-width="100">
|
||||
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryId">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.goodsCategoryId"
|
||||
@ -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"
|
||||
@ -298,7 +258,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit" label-width="100">
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
@ -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,7 +300,8 @@
|
||||
<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>
|
||||
@ -347,7 +309,8 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeDetailsSort"
|
||||
maxlength="40"
|
||||
type="number"
|
||||
oninput=" if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -394,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="100px"
|
||||
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,
|
||||
@ -576,6 +498,8 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
|
||||
// 商品基本信息表格数据
|
||||
goodsInfoList: [],
|
||||
// 护理站列表
|
||||
@ -587,6 +511,10 @@ export default {
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// open2: false,
|
||||
innerVisible: false,
|
||||
// StationName: "请选择所属护理站",
|
||||
nursetotal: 0,
|
||||
nurseStationId: null,
|
||||
goods: [
|
||||
{
|
||||
value: "BUSINESS",
|
||||
@ -615,6 +543,10 @@ export default {
|
||||
id: null,
|
||||
whetherShelf: null,
|
||||
},
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryParams: {
|
||||
id: null,
|
||||
pageNum: 1,
|
||||
@ -623,7 +555,7 @@ export default {
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
goodsCode: null,
|
||||
// goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
@ -631,27 +563,36 @@ export default {
|
||||
goodsUnit: null,
|
||||
goodsPurpose: null,
|
||||
sort: null,
|
||||
// mame:null,
|
||||
},
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
nurseStationName:"",
|
||||
nurseStationId:"",
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsName: [
|
||||
goodsName: [
|
||||
{ required: true, message: "请输入商品名称", trigger: "blur" },
|
||||
],
|
||||
goodsCategoryId:[
|
||||
goodsCategoryId: [
|
||||
{ required: true, message: "请选择商品分类名称", trigger: "blur" },
|
||||
],
|
||||
nurseStationId:[
|
||||
{ required: true, message: "请选择护理站名称", trigger: "blur" },
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
goodsPurpose:[
|
||||
goodsPurpose: [
|
||||
{ required: true, message: "请选择商品用途", trigger: "blur" },
|
||||
],
|
||||
goodsUnit:[
|
||||
goodsUnit: [
|
||||
{ required: true, message: "请输入商品度量单位", trigger: "blur" },
|
||||
],
|
||||
goodsPictureUrl:[
|
||||
goodsPictureUrl: [
|
||||
{ required: true, message: "请输入选择图片", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
@ -659,7 +600,8 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.list();
|
||||
this.info();
|
||||
// this.getList2();
|
||||
},
|
||||
methods: {
|
||||
upwhetherShelf(row) {
|
||||
@ -702,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);
|
||||
@ -753,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: "",
|
||||
@ -768,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 = {
|
||||
@ -786,7 +754,7 @@ export default {
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
goodsCode: null,
|
||||
// goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
@ -799,6 +767,15 @@ export default {
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
},
|
||||
];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -808,7 +785,19 @@ 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.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -820,9 +809,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: "",
|
||||
@ -836,29 +827,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;
|
||||
@ -873,10 +860,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();
|
||||
});
|
||||
}
|
||||
@ -884,17 +874,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("删除成功");
|
||||
@ -902,7 +888,7 @@ export default {
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
// handleDelete(row) {
|
||||
// const ids = row.id || this.ids;
|
||||
@ -951,6 +937,42 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
goodsCategory().then((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>
|
||||
|
||||
@ -6,8 +6,23 @@
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
label-width="90px"
|
||||
>
|
||||
<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
|
||||
v-model="queryParams.orderNo"
|
||||
@ -16,14 +31,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="收货人" prop="receiver">
|
||||
<el-input
|
||||
v-model="queryParams.receiver"
|
||||
placeholder="请输入收货人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select
|
||||
v-model="queryParams.orderStatus"
|
||||
@ -58,6 +66,11 @@
|
||||
@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"
|
||||
@ -66,14 +79,51 @@
|
||||
/>
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button type="primary" v-if="scope.row.orderStatus=='WAIT_PAY'" style="background-color:red;border:none">待付款</el-button> -->
|
||||
{{ orderStatus(scope.row.orderStatus) }}
|
||||
<!-- {{ orderStatus(scope.row.orderStatus) }} -->
|
||||
<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="danger" v-if="scope.row.orderStatus == 'CANCEL'"
|
||||
>已取消</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'"
|
||||
>待收货</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.orderStatus == 'RECEIVED_GOODS'"
|
||||
>已收货</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 == 'WAIT_RETURNED_GOODS'"
|
||||
>待退货</el-button
|
||||
>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'REFUNDED'"
|
||||
>退款成功</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="scope.row.orderStatus == 'RETURNED_GOODS'"
|
||||
>已退货</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
|
||||
<!-- <el-table-column label="收货人" align="center" prop="receiver" />
|
||||
<el-table-column label="收货地址" align="center" prop="receiveAddress" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" /> -->
|
||||
|
||||
<el-table-column
|
||||
label="下单时间"
|
||||
align="center"
|
||||
@ -88,6 +138,46 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注信息" align="center" prop="remark" />
|
||||
<el-table-column label="录入物流单号" align="center" prop="remark">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>修改物流单号</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo==''"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>录入物流单号</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo==null"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>录入物流单号</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus != 'WAIT_RECEIVED_GOODS'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
disabled
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>不可录入物流单号</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@ -102,24 +192,7 @@
|
||||
v-hasPermi="['system:goodsOrder:goodsOrderByOrder']"
|
||||
>查看商品信息</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus == 'PAY'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row.id)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>录入物流单号</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="refund(scope.row.id)"
|
||||
v-hasPermi="['system:nurseType:edit']"
|
||||
>确认退款</el-button
|
||||
> -->
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
|
||||
size="mini"
|
||||
@ -129,35 +202,18 @@
|
||||
v-hasPermi="['system:goodsOrder:goodsOrderRefund']"
|
||||
>确认退款</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:nurseType:edit']"
|
||||
>确认退款</el-button
|
||||
> -->
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:remove']"
|
||||
>删除</el-button
|
||||
> -->
|
||||
icon="el-icon-edit"
|
||||
disabled
|
||||
v-hasPermi="['system:goodsOrder:goodsOrderRefund']"
|
||||
>确认退款</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
@ -274,7 +330,7 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买来源" prop="orderChannel">
|
||||
<el-form-item label="购买来源" prop="orderChannel">
|
||||
<el-input
|
||||
:value="orderChannelinfo(orderList.orderChannel)"
|
||||
clearable
|
||||
@ -336,14 +392,12 @@
|
||||
</el-table> -->
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看物流信息弹框 -->
|
||||
<el-dialog
|
||||
title="录入物流单号"
|
||||
:visible.sync="innerlogistics"
|
||||
append-to-body
|
||||
width="500px"
|
||||
style="margin-top: 10%"
|
||||
>
|
||||
<el-form
|
||||
:model="queryexpressNo"
|
||||
@ -351,33 +405,50 @@
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="收货人" prop="receiver">
|
||||
<el-input
|
||||
style="width: 230px"
|
||||
v-model="queryexpressNo.receiver"
|
||||
placeholder=""
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
style="width: 230px"
|
||||
v-model="queryexpressNo.phone"
|
||||
placeholder=""
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="queryexpressNo.receiveAddress"
|
||||
style="width: 230px"
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder=""
|
||||
disabled
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryexpressNo.expressNo"
|
||||
style="width: 230px"
|
||||
placeholder="请输入物流单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="searchlogistics()"
|
||||
>确认</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="cencellogistics"
|
||||
>取消</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cencellogistics">取 消</el-button>
|
||||
<el-button type="primary" @click="searchlogistics">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 退款弹框 -->
|
||||
<el-dialog
|
||||
@ -385,7 +456,6 @@
|
||||
:visible.sync="innerrefund"
|
||||
append-to-body
|
||||
width="700px"
|
||||
style="margin-top: 10%"
|
||||
>
|
||||
<el-form
|
||||
:model="refundlist"
|
||||
@ -400,7 +470,6 @@
|
||||
v-model="refundlist.goodsName"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -416,60 +485,30 @@
|
||||
v-model="refundlist.dictLabel"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退款金额" prop="godTotalPrice">
|
||||
<el-input
|
||||
v-model="refundlist.godTotalPrice"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="补充描述和凭证"
|
||||
prop="refundReasonRemark"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item label="补充描述和凭证" prop="refundReasonRemark">
|
||||
<el-input
|
||||
style="width: 300px"
|
||||
v-model="refundlist.refundReasonRemark"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
:rows="5"
|
||||
disabled
|
||||
/>
|
||||
<!-- <textarea cols="50" rows="10" v-model="refundlist.refundReasonRemark">
|
||||
</textarea> -->
|
||||
<!-- <editor
|
||||
:min-height="70"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="refundlist.refundReasonRemark"
|
||||
|
||||
></editor> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!--
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="searchlogistics()"
|
||||
>确认</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="cencellogistics"
|
||||
>取消</el-button
|
||||
> -->
|
||||
</el-form-item>
|
||||
<el-form-item> </el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="refundcancel">取 消</el-button>
|
||||
@ -532,7 +571,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listGoodsOrder, getGoodsOrder, delGoodsOrder, addGoodsOrder, updateGoodsOrder, getGoodsOrderlist, goodsOrderRefundinfo, editExpressNo, goodsOrderrefund, weChatRefundOrderApply } from "@/api/system/goodsOrder";
|
||||
import {
|
||||
listGoodsOrder,
|
||||
getGoodsOrder,
|
||||
delGoodsOrder,
|
||||
addGoodsOrder,
|
||||
updateGoodsOrder,
|
||||
getGoodsOrderlist,
|
||||
goodsOrderRefundinfo,
|
||||
editExpressNo,
|
||||
goodsOrderrefund,
|
||||
weChatRefundOrderApply,
|
||||
} from "@/api/system/goodsOrder";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
|
||||
export default {
|
||||
name: "GoodsOrder",
|
||||
@ -546,8 +597,9 @@ export default {
|
||||
innerrefund: false,
|
||||
orderList: [],
|
||||
refundlist: [],
|
||||
nurseStationlist: [],
|
||||
orderStatuslist: [
|
||||
{
|
||||
{
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
@ -559,6 +611,7 @@ export default {
|
||||
value: "CANCEL",
|
||||
label: "已取消",
|
||||
},
|
||||
|
||||
{
|
||||
value: "WAIT_RECEIVED_GOODS",
|
||||
label: "待收货",
|
||||
@ -574,7 +627,11 @@ export default {
|
||||
},
|
||||
{
|
||||
value: "REFUNDED",
|
||||
label: "已退款",
|
||||
label: "退款成功",
|
||||
},
|
||||
{
|
||||
value: "COMPLETE",
|
||||
label: "服务完成",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RETURNED_GOODS",
|
||||
@ -584,7 +641,6 @@ export default {
|
||||
value: "RETURNED_GOODS",
|
||||
label: "已退货",
|
||||
},
|
||||
|
||||
],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -622,6 +678,11 @@ export default {
|
||||
queryexpressNo: {
|
||||
id: "",
|
||||
expressNo: null,
|
||||
},
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
refundinfo: {
|
||||
id: "",
|
||||
@ -629,16 +690,15 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
// 退款类型
|
||||
|
||||
refundTypeStatus(refundType) {
|
||||
switch (refundType) {
|
||||
case "REFUND_MONEY_GOODS":
|
||||
@ -675,9 +735,9 @@ export default {
|
||||
}
|
||||
},
|
||||
// 下单方式
|
||||
orderChannelinfo(orderChannel){
|
||||
switch (orderChannel) {
|
||||
case "MOBILE_APP":
|
||||
orderChannelinfo(orderChannel) {
|
||||
switch (orderChannel) {
|
||||
case "MOBILE_APP":
|
||||
return "手机APP";
|
||||
case "WECHAT_APPLET":
|
||||
return "微信小程序";
|
||||
@ -686,127 +746,125 @@ orderChannelinfo(orderChannel){
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 购买来源
|
||||
buySourceinfo(buySource){
|
||||
switch (buySource) {
|
||||
case "NURSE_STATION":
|
||||
}
|
||||
},
|
||||
// 购买来源
|
||||
buySourceinfo(buySource) {
|
||||
switch (buySource) {
|
||||
case "NURSE_STATION":
|
||||
return "护理站";
|
||||
case "SHOPPING_MALL":
|
||||
return "商城";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 查询商品订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsOrder(this.queryParams).then(response => {
|
||||
this.goodsOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 查看商品信息
|
||||
seeOrder(row) {
|
||||
console.log(row);
|
||||
const id = row.orderNo;
|
||||
getGoodsOrderlist(id).then(res => {
|
||||
this.orderList = res.data
|
||||
this.innerorder = true
|
||||
})
|
||||
},
|
||||
// 查看录入物流单号弹框
|
||||
seelogistics(id) {
|
||||
// console.log(id);
|
||||
this.queryexpressNo.id = id
|
||||
console.log(this.queryexpressNo)
|
||||
this.innerlogistics = true
|
||||
|
||||
},
|
||||
// 确定按钮
|
||||
searchlogistics() {
|
||||
console.log(this.queryexpressNo)
|
||||
editExpressNo(this.queryexpressNo).then(res => {
|
||||
if(res.code == 200){
|
||||
}
|
||||
},
|
||||
/** 查询商品订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsOrder(this.queryParams).then((response) => {
|
||||
this.goodsOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 查看商品信息
|
||||
seeOrder(row) {
|
||||
console.log(row);
|
||||
const id = row.orderNo;
|
||||
getGoodsOrderlist(id).then((res) => {
|
||||
this.orderList = res.data;
|
||||
this.innerorder = true;
|
||||
});
|
||||
},
|
||||
// 查看录入物流单号弹框
|
||||
seelogistics(row) {
|
||||
// console.log(id);
|
||||
// this.queryexpressNo.id = row.id;
|
||||
this.queryexpressNo = JSON.parse(JSON.stringify(row));
|
||||
this.innerlogistics = true;
|
||||
},
|
||||
// 确定按钮
|
||||
searchlogistics() {
|
||||
console.log(this.queryexpressNo);
|
||||
editExpressNo(this.queryexpressNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess("录入成功");
|
||||
}
|
||||
this.queryexpressNo.expressNo = ""
|
||||
this.innerlogistics = false
|
||||
console.log(res)
|
||||
this.queryexpressNo.expressNo = "";
|
||||
this.getList();
|
||||
this.innerlogistics = false;
|
||||
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cencellogistics() {
|
||||
this.innerlogistics = false
|
||||
this.queryexpressNo.expressNo = ""
|
||||
},
|
||||
// 确认退款
|
||||
refund(id) {
|
||||
console.log(id);
|
||||
goodsOrderRefundinfo(id).then(res => {
|
||||
this.refundlist = res.data;
|
||||
console.log(this.refundlist)
|
||||
this.innerrefund = true
|
||||
})
|
||||
},
|
||||
//确认退款 确定按钮
|
||||
submitRefundOrder() {
|
||||
console.log(this.refundlist)
|
||||
var obj = {}
|
||||
obj.orderNo = this.refundlist.goOrderNo
|
||||
obj.refundReason = this.refundlist.dictLabel
|
||||
obj.refundPrice = this.refundlist.godTotalPrice
|
||||
obj.remark = this.refundlist.refundReasonRemark
|
||||
obj.goodsStatus = this.refundlist.orderStatus
|
||||
weChatRefundOrderApply(obj).then(res => {
|
||||
if(res.code == 200){
|
||||
this.$modal.msgSuccess("退款成功");
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cencellogistics() {
|
||||
this.innerlogistics = false;
|
||||
this.queryexpressNo.expressNo = "";
|
||||
},
|
||||
// 确认退款
|
||||
refund(id) {
|
||||
console.log(id);
|
||||
goodsOrderRefundinfo(id).then((res) => {
|
||||
this.refundlist = res.data;
|
||||
console.log(this.refundlist);
|
||||
this.innerrefund = true;
|
||||
// this.getList();
|
||||
});
|
||||
},
|
||||
//确认退款 确定按钮
|
||||
submitRefundOrder() {
|
||||
var obj = {};
|
||||
obj.orderNo = this.refundlist.goOrderNo;
|
||||
obj.refundReason = this.refundlist.dictLabel;
|
||||
obj.refundPrice = this.refundlist.godTotalPrice;
|
||||
obj.remark = this.refundlist.refundReasonRemark;
|
||||
obj.goodsStatus = this.refundlist.orderStatus;
|
||||
weChatRefundOrderApply(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess("退款有延迟,请耐心等待");
|
||||
}
|
||||
// console.log(obj)
|
||||
this.innerrefund = false
|
||||
})
|
||||
this.getList();
|
||||
this.innerrefund = false;
|
||||
|
||||
},
|
||||
// refund(id){
|
||||
// console.log(id);
|
||||
// this.$confirm('是否确认退款?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// this.refundinfo.id=id
|
||||
// goodsOrderrefund(this.refundinfo).then((res) => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '退款成功'
|
||||
// });
|
||||
// this.getList();
|
||||
// });
|
||||
});
|
||||
},
|
||||
// refund(id){
|
||||
// console.log(id);
|
||||
// this.$confirm('是否确认退款?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// this.refundinfo.id=id
|
||||
// goodsOrderrefund(this.refundinfo).then((res) => {
|
||||
// this.$message({
|
||||
// type: 'success',
|
||||
// message: '退款成功'
|
||||
// });
|
||||
// this.getList();
|
||||
// });
|
||||
|
||||
// }).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消退款'
|
||||
// });
|
||||
// });
|
||||
// }).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消退款'
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// },
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
//退款取消按钮
|
||||
refundcancel() {
|
||||
this.innerrefund = false
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.queryParams={
|
||||
//退款取消按钮
|
||||
refundcancel() {
|
||||
this.innerrefund = false;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
@ -819,112 +877,153 @@ reset() {
|
||||
phone: null,
|
||||
orderTime: null,
|
||||
orderChannel: null,
|
||||
}
|
||||
this.form = {
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
patientId: null,
|
||||
orderNo: null,
|
||||
totalPrice: null,
|
||||
receiver: null,
|
||||
receiveAddress: null,
|
||||
phone: null,
|
||||
orderTime: null,
|
||||
orderChannel: null,
|
||||
remark: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
orderStatus: "",
|
||||
};
|
||||
this.resetForm("queryParams");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.reset();
|
||||
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
|
||||
getGoodsOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改商品订单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGoodsOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
};
|
||||
this.form = {
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
patientId: null,
|
||||
orderNo: null,
|
||||
totalPrice: null,
|
||||
receiver: null,
|
||||
receiveAddress: null,
|
||||
phone: null,
|
||||
orderTime: null,
|
||||
orderChannel: null,
|
||||
remark: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
orderStatus: "",
|
||||
};
|
||||
this.resetForm("queryParams");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == '1') {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
} else {
|
||||
addGoodsOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.orderNo = null
|
||||
this.queryParams.orderStatus = null
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除商品订单编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delGoodsOrder(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/goodsOrder/export', {
|
||||
...this.queryParams
|
||||
}, `goodsOrder_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
orderStatus(code) {
|
||||
var obj = {
|
||||
WAIT_PAY: '待付款',
|
||||
PAY: '已付款',
|
||||
CANCEL: '已取消',
|
||||
WAIT_RECEIVED_GOODS: '待收货',
|
||||
RECEIVED_GOODS: '已收货',
|
||||
WAIT_REFUND: '退款中',
|
||||
REFUNDED: '已退款',
|
||||
WAIT_RETURNED_GOODS: '待退货',
|
||||
RETURNED_GOODS: '已退货',
|
||||
}
|
||||
return obj[code]
|
||||
}
|
||||
}
|
||||
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;
|
||||
getGoodsOrder(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改商品订单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGoodsOrder(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGoodsOrder(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 delGoodsOrder(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/goodsOrder/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`goodsOrder_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
// goodsCategory().then((res) => {
|
||||
// console.log(this.form);
|
||||
// this.goodsCategorylist = res.rows;
|
||||
// });
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
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>
|
||||
|
||||
@ -8,7 +8,22 @@
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="客户" prop="patientName" style="margin-left:-4%">
|
||||
<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="patientName">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入客户"
|
||||
@ -53,26 +68,59 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="OrderDetailsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
|
||||
|
||||
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="会员名称" align="center" prop="patientName" />
|
||||
<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="nurseItemName"
|
||||
/>
|
||||
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
|
||||
<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 == 'WAIT_RETURNED_GOODS'"
|
||||
>待退货</el-button
|
||||
>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
|
||||
>已取消</el-button
|
||||
>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'REFUNDED'"
|
||||
>退款成功</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" align="center" prop="createTime" />
|
||||
@ -96,14 +144,33 @@
|
||||
icon="el-icon-s-promotion"
|
||||
@click="dispatch(scope.row)"
|
||||
v-hasPermi="['system:appointmentOrder:dispatch']"
|
||||
v-if="scope.row.orderStatus=='WAIT_DISPATCH'"
|
||||
v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
|
||||
>派单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
disabled
|
||||
icon="el-icon-s-promotion"
|
||||
@click="dispatch(scope.row)"
|
||||
v-else
|
||||
>派单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-error"
|
||||
@click="cencel(scope.row.appointmentOrderId)"
|
||||
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
|
||||
>
|
||||
@ -125,131 +192,119 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 查看弹框 -->
|
||||
<el-dialog
|
||||
title="查看订单信息"
|
||||
:visible.sync="innerVisible4"
|
||||
append-to-body
|
||||
width="1048px"
|
||||
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="form"
|
||||
:model="form"
|
||||
:model="query"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
class="orderInfo"
|
||||
>
|
||||
<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: 150px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="query.nurseStationName"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单数量" prop="orderCount">
|
||||
<el-input
|
||||
v-model="query.orderCount"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目名称" prop="nurseItemName">
|
||||
<el-input
|
||||
v-model="query.nurseItemName"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务时间" prop="time">
|
||||
<el-input
|
||||
v-model="query.time"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目时长" prop="itemServeDurationUnit">
|
||||
<el-input
|
||||
v-model="query.itemServeDurationUnit"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理项目价格" prop="nurseItemPrice">
|
||||
<el-input
|
||||
v-model="query.nurseItemPrice"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
:disabled="true"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务地址" prop="serviceAddress">
|
||||
<el-input
|
||||
v-model="query.serviceAddress"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
: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-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: 150px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderConsumableName"
|
||||
label="耗材包名称"
|
||||
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderConsumableCount"
|
||||
label="耗材包数量"
|
||||
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderConsumablePrice"
|
||||
label="耗材包价格"
|
||||
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- </div> -->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="query.nurseStationName"
|
||||
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: 150px"
|
||||
/>
|
||||
</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="nurseItemPrice">
|
||||
<el-input
|
||||
v-model="query.nurseItemPrice"
|
||||
clearable
|
||||
:disabled="true"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</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>
|
||||
<!-- 派单弹框 -->
|
||||
@ -260,12 +315,12 @@
|
||||
width="500px"
|
||||
height="100px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||
<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
|
||||
>
|
||||
@ -274,7 +329,7 @@
|
||||
@click="clicknursePersonName()"
|
||||
v-else
|
||||
style="
|
||||
width: 362px;
|
||||
width: 300px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
@ -300,6 +355,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="time">
|
||||
<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"
|
||||
@ -318,17 +422,9 @@
|
||||
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="querynursePersonname.phone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -342,11 +438,11 @@
|
||||
>
|
||||
</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"
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px; overflow: hidden"
|
||||
v-if="nursePersonid == scope.row.nurseStationPersonId"
|
||||
circle
|
||||
@ -416,34 +512,73 @@ import {
|
||||
deldetailed,
|
||||
getPerson,
|
||||
dispatchsubmit,
|
||||
confirmCancel
|
||||
xylWeChatRefundNotify,
|
||||
appointmentOrderDetails,
|
||||
} from "@/api/system/order";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import { weChatRefundOrderApply } from "@/api/system/goodsOrder";
|
||||
export default {
|
||||
name: "order",
|
||||
data() {
|
||||
return {
|
||||
orderStatuslist: [
|
||||
orderStatuslist: [
|
||||
{
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
{
|
||||
value: "PAY",
|
||||
label: "已付款",
|
||||
},
|
||||
{
|
||||
value: "CANCEL",
|
||||
label: "已取消",
|
||||
},
|
||||
|
||||
// {
|
||||
// value: "WAIT_RECEIVED_GOODS",
|
||||
// label: "待收货",
|
||||
// },
|
||||
|
||||
// {
|
||||
// value: "RECEIVED_GOODS",
|
||||
// label: "已收货",
|
||||
// },
|
||||
{
|
||||
value: "WAIT_DISPATCH",
|
||||
label: "待派单",
|
||||
},
|
||||
|
||||
{
|
||||
value: "NOT_FINISH",
|
||||
label: "未完成",
|
||||
value: "WAIT_REFUND",
|
||||
label: "退款中",
|
||||
},
|
||||
{
|
||||
value: "REFUNDED",
|
||||
label: "退款成功",
|
||||
},
|
||||
{
|
||||
value: "COMPLETE",
|
||||
label: "服务完成",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RETURNED_GOODS",
|
||||
label: "待退货",
|
||||
},
|
||||
{
|
||||
value: "RETURNED_GOODS",
|
||||
label: "已退货",
|
||||
},
|
||||
{
|
||||
value: "NOT_FINISH",
|
||||
label: "未完成",
|
||||
},
|
||||
],
|
||||
value: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
innerVisible4: false,
|
||||
innerrefund: false,
|
||||
// 派单弹框
|
||||
innerdispatch: false,
|
||||
// 姓名弹框
|
||||
@ -461,16 +596,16 @@ export default {
|
||||
total: 0,
|
||||
// 护理类型信息表格数据
|
||||
OrderDetailsList: [],
|
||||
OrderDetailsLists: [],
|
||||
dispatchlist: [],
|
||||
nurseName: "请选择护理员",
|
||||
nursePersonid: "",
|
||||
// querynursecencel:{
|
||||
// appointmentOrderId:"",
|
||||
// },
|
||||
appointmentOrderId:"",
|
||||
nurseStationPersonId :"",
|
||||
appointmentOrderId: "",
|
||||
nurseStationPersonId: "",
|
||||
total2: 0,
|
||||
nurseStationlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -480,34 +615,22 @@ 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: {
|
||||
orderNo:"",
|
||||
nursePersonName:null,
|
||||
orderNo: "",
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
departmentName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
// detailsId: "",
|
||||
// nursePersonName: null,
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
query: [],
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@ -516,8 +639,30 @@ 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":
|
||||
@ -534,39 +679,32 @@ export default {
|
||||
},
|
||||
// 查看
|
||||
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[0];
|
||||
this.innerVisible4 = true;
|
||||
console.log(this.query);
|
||||
});
|
||||
},
|
||||
|
||||
// 派单
|
||||
dispatch(row) {
|
||||
console.log(row)
|
||||
this.querynursePersonname.orderNo = row.orderNo
|
||||
console.log(row);
|
||||
this.querynursePersonname.orderNo = row.orderNo;
|
||||
console.log(this.querynursePersonname.orderNo);
|
||||
// console.log(row)
|
||||
this.nurseName = "请选择护理员";
|
||||
this.innerdispatch = true;
|
||||
this.nursePersonid =""
|
||||
this.nursePersonid = "";
|
||||
},
|
||||
// 姓名弹框
|
||||
clicknursePersonName() {
|
||||
// console.log(this.dispatchlist);
|
||||
getPerson(this.querynursePersonname).then((res) => {
|
||||
this.dispatchlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
@ -576,72 +714,33 @@ export default {
|
||||
},
|
||||
// 姓名弹框确定按钮
|
||||
submitForm() {
|
||||
// console.log(this.querynursePersonname)
|
||||
// var obj = {}
|
||||
// obj.nurseStationPersonId = nurseStationPersonId
|
||||
// obj.orderNo = this.querynursePersonname.orderNo
|
||||
let params={
|
||||
nurseStationPersonId:this.nursePersonid,
|
||||
orderNo:this.querynursePersonname.orderNo
|
||||
}
|
||||
let params = {
|
||||
nurseStationPersonId: this.nursePersonid,
|
||||
orderNo: this.querynursePersonname.orderNo,
|
||||
};
|
||||
dispatchsubmit(params).then((res) => {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess("派单成功");
|
||||
}
|
||||
this.nurseName = "请选择护理员";
|
||||
this.innerdispatch = false;
|
||||
// this.nursePersonid =""
|
||||
|
||||
})
|
||||
this.getList();
|
||||
this.nurseName = "请选择护理员";
|
||||
});
|
||||
},
|
||||
// 选择姓名按钮
|
||||
nursePersonclick(row) {
|
||||
this.nursePersonid = row.nurseStationPersonId
|
||||
this.nurseName = row.nursePersonName
|
||||
this.nursePersonid = row.nurseStationPersonId;
|
||||
this.nurseName = row.nursePersonName;
|
||||
this.nursePersonNameinfo = false;
|
||||
console.log(row)
|
||||
|
||||
console.log(row);
|
||||
},
|
||||
// 确认取消预约
|
||||
cencel(row) {
|
||||
Detailed(row.orderNo).then((res) => {
|
||||
this.query = res.data;
|
||||
this.innerrefund = true;
|
||||
});
|
||||
},
|
||||
|
||||
// cencel(appointmentOrderId) {
|
||||
// confirmCancel(appointmentOrderId).then((res) => {
|
||||
// // this.nurseName="请选择护理员";
|
||||
// // this.innerdispatch = false;
|
||||
|
||||
// })
|
||||
// console.log(appointmentOrderId)
|
||||
// },
|
||||
// console.log(row.appointmentOrderId)
|
||||
// this.appointmentOrderId = row.appointmentOrderId
|
||||
// console.log('row :>> ', this.querynursecencel.appointmentOrderId);
|
||||
// obj.appointmentOrderId=row.appointmentOrderId
|
||||
|
||||
|
||||
// 确认取消预约
|
||||
cencel(appointmentOrderId) {
|
||||
this.$confirm(
|
||||
'是否确认取消订单',
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
console.log(appointmentOrderId)
|
||||
let params={
|
||||
appointmentOrderId:appointmentOrderId
|
||||
}
|
||||
confirmCancel(params).then((res) => {
|
||||
this.$message.success("取消成功");
|
||||
// this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 查询护理类型信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -680,10 +779,49 @@ 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.handleQuery();
|
||||
},
|
||||
resetQuery2() {
|
||||
//权限列表
|
||||
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();
|
||||
},
|
||||
@ -696,20 +834,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(() => {});
|
||||
@ -727,9 +860,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-delete"
|
||||
@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() {
|
||||
|
||||
@ -125,17 +125,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:person:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
@ -237,7 +226,7 @@
|
||||
<el-button
|
||||
type=""
|
||||
@click="clickinnerVisible(item, index)"
|
||||
v-if="item.nurseStationName == '请选择护理站名称'"
|
||||
v-if="item.nurseStationName == '请选择所属护理站'"
|
||||
style="
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
@ -265,8 +254,8 @@
|
||||
<el-form-item
|
||||
label="所属科室"
|
||||
label-width="120px"
|
||||
:rules="rules.nurseStationPersonList.departmentName"
|
||||
:prop="`nurseStationPersonList.${index}.departmentName`"
|
||||
:rules="rules.nurseStationPersonList.departmentCode"
|
||||
:prop="`nurseStationPersonList.${index}.departmentCode`"
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
@ -397,39 +386,30 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增护理站名称弹框 -->
|
||||
<el-dialog
|
||||
:title="title2"
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="addcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="queryParams2"
|
||||
:model="StationqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<!-- <el-form
|
||||
:model="queryParams2"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
> -->
|
||||
<el-form-item
|
||||
label="护理站编码"
|
||||
prop="nurseStationCode"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams2.nurseStationCode"
|
||||
v-model="StationqueryParams.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -438,10 +418,9 @@
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams2.nurseStationName"
|
||||
v-model="StationqueryParams.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -457,8 +436,8 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="stationLists" @cell-dblclick="nurseclick">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -478,55 +457,33 @@
|
||||
<el-table-column
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
width="150"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="护理站类型"
|
||||
align="center"
|
||||
prop="nurseStationType"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.nurseStationType == "LX202209140018" ? "生活护理" : ""
|
||||
}}
|
||||
{{
|
||||
scope.row.nurseStationType == "LX202209140019" ? "医疗护理" : ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理地址"
|
||||
width="150"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="queryParams2.pageNum"
|
||||
:limit.sync="queryParams2.pageSize"
|
||||
@pagination="handleQuery2"
|
||||
v-show="nursetotal > 0"
|
||||
:total="nursetotal"
|
||||
:page.sync="StationqueryParams.pageNum"
|
||||
:limit.sync="StationqueryParams.pageSize"
|
||||
@pagination="getList2"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 修改护理站名称弹框 -->
|
||||
@ -535,32 +492,24 @@
|
||||
:visible.sync="innerVisiblexg"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="addcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="queryParams2"
|
||||
:model="StationqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<!-- <el-form
|
||||
:model="queryParams2"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
> -->
|
||||
<el-form-item
|
||||
label="护理站编码"
|
||||
prop="nurseStationCode"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams2.nurseStationCode"
|
||||
v-model="StationqueryParams.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -569,10 +518,9 @@
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams2.nurseStationName"
|
||||
v-model="StationqueryParams.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -580,16 +528,16 @@
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery2"
|
||||
@click="handleQuery4"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery4"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="stationLists" @cell-dblclick="nurseclick2">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick2">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -609,53 +557,26 @@
|
||||
<el-table-column
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="护理站类型"
|
||||
align="center"
|
||||
prop="nurseStationType"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.nurseStationType == "LX202209140018" ? "生活护理" : ""
|
||||
}}
|
||||
{{
|
||||
scope.row.nurseStationType == "LX202209140019" ? "医疗护理" : ""
|
||||
}}
|
||||
</template>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理地址"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="address" label="护理站地址" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="queryParams2.pageNum"
|
||||
:limit.sync="queryParams2.pageSize"
|
||||
@pagination="handleQuery2"
|
||||
v-show="nursetotal > 0"
|
||||
:total="nursetotal"
|
||||
:page.sync="StationqueryParams.pageNum"
|
||||
:limit.sync="StationqueryParams.pageSize"
|
||||
@pagination="getList2"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 所属科室弹框 -->
|
||||
@ -664,6 +585,7 @@
|
||||
:visible.sync="innerVisible2"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="departcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
@ -677,7 +599,6 @@
|
||||
v-model="queryParams3.departmentCode"
|
||||
placeholder="请输入科室编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="" label-width="120">
|
||||
@ -685,7 +606,6 @@
|
||||
v-model="queryParams3.departmentName"
|
||||
placeholder="请输入科室名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -705,7 +625,7 @@
|
||||
:data="StationDepartmentLists"
|
||||
@cell-dblclick="StationDepartmentclick"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -725,14 +645,12 @@
|
||||
<el-table-column
|
||||
property="departmentCode"
|
||||
label="科室编码"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="departmentName"
|
||||
label="科室名称"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
@ -740,24 +658,18 @@
|
||||
<el-table-column
|
||||
property="departmentPerson"
|
||||
label="科室负责人"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
v-show="departtotal > 0"
|
||||
:total="departtotal"
|
||||
:page.sync="queryParams3.pageNum"
|
||||
:limit.sync="queryParams3.pageSize"
|
||||
@pagination="handleQuery3"
|
||||
@pagination="getList3"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 修改所属科室弹框 -->
|
||||
@ -766,6 +678,7 @@
|
||||
:visible.sync="innerVisiblexg2"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="departcancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
@ -774,20 +687,11 @@
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<!-- <el-form
|
||||
:model="queryParams2"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
> -->
|
||||
<el-form-item label="科室编码" prop="departmentCode" label-width="120">
|
||||
<el-input
|
||||
v-model="queryParams3.departmentCode"
|
||||
placeholder="请输入科室编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="" label-width="120">
|
||||
@ -795,7 +699,6 @@
|
||||
v-model="queryParams3.departmentName"
|
||||
placeholder="请输入科室名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -815,7 +718,7 @@
|
||||
:data="StationDepartmentLists"
|
||||
@cell-dblclick="StationDepartmentclick2"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -835,14 +738,12 @@
|
||||
<el-table-column
|
||||
property="departmentCode"
|
||||
label="科室编码"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="departmentName"
|
||||
label="科室名称"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
@ -850,27 +751,20 @@
|
||||
<el-table-column
|
||||
property="departmentPerson"
|
||||
label="科室负责人"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
v-show="departtotal > 0"
|
||||
:total="departtotal"
|
||||
:page.sync="queryParams3.pageNum"
|
||||
:limit.sync="queryParams3.pageSize"
|
||||
@pagination="handleQuery3"
|
||||
@pagination="getList3"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
@ -881,17 +775,15 @@
|
||||
style="margin-left: -20px"
|
||||
>
|
||||
<el-button
|
||||
disabled
|
||||
type=""
|
||||
@click="clickinnerVisible2"
|
||||
v-if="nurseStationName == '请选择护理站名称'"
|
||||
@click="departclickxg"
|
||||
v-if="nurseStationName == '请选择所属护理站'"
|
||||
style="width: 362px; text-align: left; height: 36px; color: #c0c4cc"
|
||||
>{{ nurseStationName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
disabled
|
||||
type=""
|
||||
@click="clickinnerVisible2"
|
||||
@click="departclickxg()"
|
||||
v-else
|
||||
style="
|
||||
width: 362px;
|
||||
@ -929,19 +821,14 @@
|
||||
>{{ departmentName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="nursePersonName" >
|
||||
<el-form-item label="姓名" prop="nursePersonName">
|
||||
<el-input
|
||||
maxlength="15"
|
||||
v-model="form.nursePersonName"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="护理人职称"
|
||||
prop="nursePersonType"
|
||||
label-width="120px"
|
||||
style="margin-left: -22px"
|
||||
>
|
||||
<el-form-item label="护理人职称" prop="nursePersonType">
|
||||
<el-select
|
||||
v-model="form.nursePersonType"
|
||||
clearable
|
||||
@ -1124,12 +1011,9 @@ export default {
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
// total:null,
|
||||
total: 0,
|
||||
total2: 0,
|
||||
total3: 0,
|
||||
total4: 0,
|
||||
total5: 0,
|
||||
departtotal: 0,
|
||||
nursetotal: 0,
|
||||
// 护理站人员信息表格数据
|
||||
nurseStationPersonList: [],
|
||||
// 护理站名称
|
||||
@ -1140,14 +1024,15 @@ export default {
|
||||
stationid: "",
|
||||
stationid2: "",
|
||||
departid: "",
|
||||
nurseStationName: "请选择护理站名称",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
departmentName: "请选择所属科室",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title2: "",
|
||||
title3: "",
|
||||
// 是否显示弹出层
|
||||
// 修改弹出层
|
||||
open: false,
|
||||
// 添加弹出层
|
||||
open2: false,
|
||||
//权限查询
|
||||
// 查询参数
|
||||
@ -1186,15 +1071,25 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
StationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
index: "",
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
departmentName: [
|
||||
{ required: true, message: "所属科室不能为空", trigger: "blur" },
|
||||
],
|
||||
|
||||
nursePersonName: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" },
|
||||
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
|
||||
],
|
||||
nursePersonType: [
|
||||
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
|
||||
@ -1215,15 +1110,15 @@ export default {
|
||||
nursePersonName: [
|
||||
{
|
||||
required: true,
|
||||
message: "护理站人员名称不能为空",
|
||||
message: "请选择所属护理站",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentName: [
|
||||
departmentCode: [
|
||||
{ required: true, message: "所属科室不能为空", trigger: "blur" },
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "所属护理站不能为空", trigger: "blur" },
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
nursePersonName: [
|
||||
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
|
||||
@ -1243,28 +1138,18 @@ export default {
|
||||
address: [
|
||||
{ required: true, message: "居住地址不能为空", trigger: "blur" },
|
||||
],
|
||||
// nurseStationPersonList: {
|
||||
// nursePersonName: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入护理站人员名称",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList2();
|
||||
// this.nurselist();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
// // 新增所属科室按钮
|
||||
departclick(item, index) {
|
||||
this.getList3();
|
||||
console.log(item);
|
||||
this.departid = item.departmentCode;
|
||||
this.innerVisible2 = true;
|
||||
@ -1272,61 +1157,33 @@ export default {
|
||||
},
|
||||
// // 修改所属科室按钮
|
||||
departclick2() {
|
||||
StationDepartmentList(this.queryParams3).then((res) => {
|
||||
this.StationDepartmentLists = res.rows;
|
||||
this.total3 = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
// console.log(item);
|
||||
this.getList3();
|
||||
this.departid2 = this.form.departmentCode;
|
||||
this.innerVisiblexg2 = true;
|
||||
// this.index = index;
|
||||
},
|
||||
//修改护理站按钮
|
||||
departclickxg() {
|
||||
this.getList2();
|
||||
this.stationid2 = this.form.nurseStationId;
|
||||
this.innerVisiblexg = true;
|
||||
this.index = index;
|
||||
},
|
||||
// 新增护理站按钮
|
||||
clickinnerVisible(item, index) {
|
||||
// console.log(item);
|
||||
this.getList2();
|
||||
this.stationid = item.nurseStationId;
|
||||
this.innerVisible = true;
|
||||
this.index = index;
|
||||
},
|
||||
// 修改护理站按钮
|
||||
clickinnerVisible2() {
|
||||
stationList(this.queryParams2).then((res) => {
|
||||
this.stationLists = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
// console.log(item);
|
||||
this.stationid2 = this.form.nurseStationId;
|
||||
this.innerVisiblexg = true;
|
||||
// this.index = index;
|
||||
},
|
||||
//xialakuang
|
||||
// loadMore() {
|
||||
// console.log("1");
|
||||
// var a = Math.ceil(this.total4 / 10);
|
||||
// console.log(this.nurseStationlist.length);
|
||||
// if (this.nurseStationlist.length + 1 >= this.total4) {
|
||||
// } else {
|
||||
// if (this.nurseStationqueryParams.pageNum >= a) {
|
||||
// } else {
|
||||
// this.nurseStationqueryParams.pageNum++;
|
||||
// stationList(this.nurseStationqueryParams).then((res) => {
|
||||
// console.log(res);
|
||||
// res.rows.forEach((e) => {
|
||||
// this.nurseStationlist.push(e);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
nurselist() {
|
||||
stationList(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total4 = res.total;
|
||||
console.log(this.nurseStationlist);
|
||||
});
|
||||
// 修改护理站
|
||||
nurseclick2(row) {
|
||||
console.log(row);
|
||||
this.nurseStationName = row.nurseStationName;
|
||||
this.stationid2 = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
this.innerVisiblexg = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
},
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
@ -1335,8 +1192,6 @@ export default {
|
||||
},
|
||||
|
||||
adddisease() {
|
||||
// this.nurseStationName = "请选择护理站名称";
|
||||
// this.departmentName=""
|
||||
var obj = {
|
||||
nursePersonCode: "",
|
||||
nursePersonCode: "",
|
||||
@ -1346,7 +1201,6 @@ export default {
|
||||
address: "",
|
||||
sex: "",
|
||||
nurseStationId: "",
|
||||
|
||||
departmentName: "请选择所属科室",
|
||||
// departname: "",
|
||||
nurseStationName: "请选择护理站名称",
|
||||
@ -1370,16 +1224,7 @@ export default {
|
||||
row.nurseStationName;
|
||||
this.form.nurseStationPersonList[this.index].nurseStationId = row.id;
|
||||
},
|
||||
// 修改护理站
|
||||
nurseclick2(row) {
|
||||
console.log(row);
|
||||
this.nurseStationName = row.nurseStationName;
|
||||
this.stationid2 = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
console.log(this.form);
|
||||
this.innerVisiblexg = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
},
|
||||
|
||||
// 所属科室
|
||||
StationDepartmentclick(row) {
|
||||
console.log(row);
|
||||
@ -1416,16 +1261,18 @@ export default {
|
||||
});
|
||||
},
|
||||
getList2() {
|
||||
// 护理站名称
|
||||
this.loading = true;
|
||||
stationList(this.queryParams2).then((res) => {
|
||||
this.stationLists = res.rows;
|
||||
this.total2 = res.total;
|
||||
getListByUser(this.StationqueryParams).then((res) => {
|
||||
this.nursetotal = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getList3() {
|
||||
this.loading = true;
|
||||
StationDepartmentList(this.queryParams3).then((res) => {
|
||||
this.StationDepartmentLists = res.rows;
|
||||
this.total3 = res.total;
|
||||
this.departtotal = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
@ -1433,7 +1280,7 @@ export default {
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
this.nurseStationName = "请选择护理站名称";
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
// this.upload.open=false;
|
||||
this.reset();
|
||||
@ -1454,7 +1301,7 @@ export default {
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
nurseStationName: "请选择护理站名称",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
departmentName: "请选择所属科室",
|
||||
nurseStationPersonList: [
|
||||
{
|
||||
@ -1464,7 +1311,7 @@ export default {
|
||||
nursePersonCode: "",
|
||||
nursePersonName: "",
|
||||
nursePersonType: "",
|
||||
nurseStationName: "请选择护理站名称",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
phone: "",
|
||||
address: "",
|
||||
sex: "",
|
||||
@ -1474,54 +1321,52 @@ export default {
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery2() {
|
||||
this.queryParams.pageNum = 1;
|
||||
stationList(this.queryParams2).then((res) => {
|
||||
this.stationLists = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.innerVisible = true;
|
||||
this.StationqueryParams.pageNum = 1;
|
||||
this.getList2();
|
||||
},
|
||||
|
||||
// 修改护理站弹框的搜索
|
||||
handleQuery4() {
|
||||
this.StationqueryParams.pageNum = 1;
|
||||
this.getList2();
|
||||
},
|
||||
//修改所属科室
|
||||
handleQuery3() {
|
||||
console.log(this.queryParams3);
|
||||
StationDepartmentList(this.queryParams3).then((response) => {
|
||||
this.StationDepartmentLists = response.rows;
|
||||
this.total3 = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
this.queryParams3.pageNum = 1;
|
||||
this.getList3();
|
||||
},
|
||||
handleQuery() {
|
||||
// stationList(this.nurseStationqueryParams).then((res) => {
|
||||
// console.log(res);
|
||||
// this.nurseStationlist = res.rows;
|
||||
// this.total4 = res.total;
|
||||
// console.log(this.nurseStationlist);
|
||||
// });
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
// this.nurselist()
|
||||
// this.stationList();
|
||||
// this.nurseStationlist()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
addcancel() {
|
||||
this.innerVisible = false;
|
||||
this.innerVisiblexg = false;
|
||||
this.resetQuery2();
|
||||
},
|
||||
departcancel() {
|
||||
this.innerVisible2 = false;
|
||||
this.innerVisiblexg2 = false;
|
||||
this.resetQuery3();
|
||||
},
|
||||
resetQuery2() {
|
||||
this.queryParams2 = {
|
||||
this.resetForm("queryForm");
|
||||
this.StationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationName: null,
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
|
||||
};
|
||||
stationList(this.queryParams2).then((res) => {
|
||||
this.stationLists = res.rows;
|
||||
this.total2 = res.total;
|
||||
});
|
||||
this.handleQuery2();
|
||||
},
|
||||
resetQuery4() {
|
||||
this.resetForm("queryForm");
|
||||
this.StationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.handleQuery4();
|
||||
},
|
||||
resetQuery3() {
|
||||
this.queryParams3 = {
|
||||
@ -1533,13 +1378,8 @@ export default {
|
||||
departmentName: null,
|
||||
nurseStationId: null,
|
||||
};
|
||||
StationDepartmentList(this.queryParams3).then((response) => {
|
||||
this.StationDepartmentLists = response.rows;
|
||||
this.total3 = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.handleQuery3();
|
||||
},
|
||||
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
@ -1555,7 +1395,6 @@ export default {
|
||||
phone: null,
|
||||
address: null,
|
||||
};
|
||||
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
@ -1578,16 +1417,14 @@ export default {
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.title = "添加护理站人员信息";
|
||||
this.title2 = "请选择护理站";
|
||||
this.title2 = "请选择所属护理站";
|
||||
this.title3 = "请选择科室";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
// this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getPerson(id).then((response) => {
|
||||
console.log(response);
|
||||
// this.departmentName="请选择科室"
|
||||
this.departmentName = response.data.departmentName;
|
||||
this.nurseStationName = response.data.nurseStationName;
|
||||
this.form = response.data;
|
||||
@ -1604,9 +1441,6 @@ export default {
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
// this.form.nursename = null;
|
||||
// this.form.nurseStationId = null;
|
||||
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePerson(this.form).then((response) => {
|
||||
@ -1619,7 +1453,7 @@ export default {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open2 = false;
|
||||
this.getList();
|
||||
this.nurseStationName = "请选择护理站名称";
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
});
|
||||
}
|
||||
@ -1695,9 +1529,9 @@ export default {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
console.log(true);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total5 = res.total;
|
||||
this.nursetotal = res.total;
|
||||
} else {
|
||||
this.total5 = res.total;
|
||||
this.nursetotal = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
@ -1706,8 +1540,8 @@ export default {
|
||||
},
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total5 / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total5) {
|
||||
var a = Math.ceil(this.nursetotal / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.nursetotal) {
|
||||
} else {
|
||||
if (this.nurseStationqueryParams.pageNum >= a) {
|
||||
} else {
|
||||
@ -1722,24 +1556,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// loadMore() {
|
||||
// console.log("1");
|
||||
// var a = Math.ceil(this.total4 / 10);
|
||||
// console.log(this.nurseStationlist.length);
|
||||
// if (this.nurseStationlist.length + 1 >= this.total4) {
|
||||
// } else {
|
||||
// if (this.nurseStationqueryParams.pageNum >= a) {
|
||||
// } else {
|
||||
// this.nurseStationqueryParams.pageNum++;
|
||||
// stationList(this.nurseStationqueryParams).then((res) => {
|
||||
// console.log(res);
|
||||
// res.rows.forEach((e) => {
|
||||
// this.nurseStationlist.push(e);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站类型" prop="nurseStationName">
|
||||
<!-- <el-form-item label="护理站类型" prop="nurseStationName">
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationType"
|
||||
clearable
|
||||
@ -74,7 +74,7 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
@ -145,18 +145,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 +157,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 +182,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 +204,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 +218,6 @@
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -304,33 +271,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"
|
||||
@ -439,22 +379,7 @@
|
||||
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 +387,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,15 +410,7 @@
|
||||
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"
|
||||
@ -565,7 +491,7 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delnurseStationLabelList(scope.$index,scope.row)"
|
||||
@click="delnurseStationLabelList(scope.$index, scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
@ -629,6 +555,8 @@ import {
|
||||
getFirstLevelInfo,
|
||||
getSecondaryLevelInfo,
|
||||
getInfoLists,
|
||||
updatePicture,
|
||||
|
||||
} from "@/api/system/station";
|
||||
import { getInfoList } from "@/api/system/nurseItem";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
@ -667,6 +595,8 @@ export default {
|
||||
return {
|
||||
imageUrl: "",
|
||||
imageUrl2: "",
|
||||
imgtwo:"",
|
||||
imgone:"",
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -710,7 +640,7 @@ export default {
|
||||
looknurseStationLabel: [
|
||||
{
|
||||
labelDescription: "",
|
||||
labelSort: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
],
|
||||
@ -739,6 +669,7 @@ export default {
|
||||
pageSize: 10,
|
||||
},
|
||||
// 查询参数
|
||||
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -788,18 +719,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 +761,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,27 +783,17 @@ 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,
|
||||
};
|
||||
|
||||
|
||||
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);
|
||||
@ -934,6 +851,19 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
console.log(this.form);
|
||||
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) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.value3 = "";
|
||||
@ -1029,7 +959,7 @@ export default {
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
labelDescription: "",
|
||||
labeSort:"",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
@ -1044,8 +974,9 @@ export default {
|
||||
getStation(id).then((response) => {
|
||||
console.log(response);
|
||||
this.form = response.data;
|
||||
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;
|
||||
@ -1061,7 +992,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("修改成功");
|
||||
|
||||
@ -230,9 +230,9 @@
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="所属护理站" prop="nurseStationId">
|
||||
<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 +240,7 @@
|
||||
{{ form.nurseStationName }}
|
||||
</el-button>
|
||||
<el-button
|
||||
disabled
|
||||
disabled
|
||||
style="width: 360px; text-align: left; height: 36px"
|
||||
@click="open3 = true"
|
||||
>
|
||||
@ -285,6 +285,7 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加护理站耗材信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -403,51 +404,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 +418,7 @@
|
||||
:before-close="cancel2"
|
||||
>
|
||||
<el-form
|
||||
:model="nurseStationqueryParams"
|
||||
:model="getListByUserquery"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
@ -471,7 +427,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 +436,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 +457,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 +502,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 +518,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 +558,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 +582,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 +602,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 +826,7 @@ export default {
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.listinfo();
|
||||
// this.listinfo();
|
||||
},
|
||||
methods: {
|
||||
/** 下载模板操作 */
|
||||
@ -892,8 +848,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 +917,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 +973,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 +1077,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -1141,7 +1094,6 @@ export default {
|
||||
this.upload.title = "护理站耗材导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
|
||||
@ -95,7 +95,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -147,7 +146,6 @@
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseItemList"
|
||||
@ -183,7 +181,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 +192,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"
|
||||
@ -248,7 +231,6 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改护理站护理项目对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -309,22 +291,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"
|
||||
@ -336,6 +302,14 @@
|
||||
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 +337,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="小数点后两位"
|
||||
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 +369,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 +387,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 +399,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 +471,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 +502,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 +524,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 +665,6 @@
|
||||
@pagination="listStationConsumable"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
@ -762,6 +717,7 @@ import {
|
||||
updateNurseItem,
|
||||
getInfoList,
|
||||
liststation,
|
||||
updatePicture,
|
||||
} from "@/api/system/nurseItem";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
@ -772,6 +728,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
imageUrl: "",
|
||||
imgone:"",
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -819,6 +776,7 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -839,10 +797,6 @@ export default {
|
||||
nurseStationId: null,
|
||||
consumableDetail: null,
|
||||
},
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationItem: {
|
||||
@ -871,9 +825,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 +845,7 @@ export default {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.getInfoListinfo();
|
||||
this.stationlist();
|
||||
// this.stationlist();
|
||||
// this.listStationConsumableinfo();
|
||||
},
|
||||
methods: {
|
||||
@ -917,8 +875,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 +945,7 @@ export default {
|
||||
},
|
||||
//护理站重置
|
||||
stationcancel() {
|
||||
this.nurseStationqueryParams = {
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
@ -995,9 +953,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;
|
||||
});
|
||||
},
|
||||
//护理类型
|
||||
@ -1046,7 +1004,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 +1103,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;
|
||||
@ -1161,6 +1129,7 @@ export default {
|
||||
getNurseItem(id).then((response) => {
|
||||
console.log(response);
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.nurseStationItem.itemPictureUrl;
|
||||
if (this.form.nurseStationItemPrices == []) {
|
||||
var obj = {
|
||||
serveDurationUnit: "",
|
||||
@ -1211,7 +1180,7 @@ export default {
|
||||
} else {
|
||||
addNurseItem(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$forceUpdate()
|
||||
this.$forceUpdate()
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
@ -1231,7 +1200,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"
|
||||
>
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user