提交 be1b78bb 编写于 作者: lyf's avatar lyf

添加路由

上级 6c7b767d
......@@ -145,6 +145,14 @@
@click="reMatchDot(scope.row)"
>重新匹配医生</el-button
>
<el-button
type="primary"
size="small"
class="btn"
v-if="showBtn(scope.row, 3, 25, 26)"
@click="reMatchDot(scope.row)"
>重新联系助诊医生</el-button
>
<el-button
type="primary"
size="small"
......@@ -295,6 +303,7 @@ export default {
},
//重新匹配医生
reMatchDot(row) {
console.log(row)
this.$emit("reMatchDot", row);
},
//修改时间
......
......@@ -311,24 +311,25 @@ export const ALL_TAB_LIST = [
}
]
//运营预约单列表
export const RUN_TAB_LIST = [
{
label: '全部',
active: '99'
},
{
label: '待匹配',
active: '2'
},
{
label: '已匹配',
active: '21'
},
{
label: '待确认时间',
active: '25'
},
// {
// label: '待匹配',
// active: '2'
// },
// {
// label: '已匹配',
// active: '21'
// },
// {
// label: '待确认时间',
// active: '25'
// },
{
label: '待问诊',
active: '26'
......@@ -353,10 +354,14 @@ export const TRIAGE_TAB_LIST = [
label: '全部',
active: '99'
},
// {
// label: '待分诊',
// active: '22'
// },
{
label: '待分诊',
active: '22'
}
label: '待匹配',
active: '2'
},
]
// 接诊列表
......
<template>
<div class="diagnosis-list-content">
<div class="component-content screenSet" id="screenSet">
<div class="select-content screenSet">
<div class="title">助诊医生列表</div>
<el-form ref="form" :inline="true" :model="searchParam" label-suffix=":" label-width="120px" label-position="right" style="width:100%;">
<el-row :gutter="30" type="flex" style="margin-bottom:0;">
<el-collapse-transition>
<div v-show="isUp">
<el-form
ref="form"
:inline="true"
:model="searchParam"
label-suffix=":"
label-width="120px"
label-position="right"
style="width: 100%"
>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="12">
<el-form-item label="助诊医生">
<el-input v-model="searchParam.searchKey" size="middle" placeholder="请输入医生姓名或联系电话" style="width: 120%;"></el-input>
<el-input
v-model="searchParam.searchKey"
size="middle"
placeholder="请输入医生姓名或联系电话"
style="width: 120%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10" style="margin-left: 45px;">
<el-col :span="10" style="margin-left: 45px">
<el-form-item label="所在机构">
<el-input v-model="searchParam.hospitalName" size="middle" placeholder="请输入所在机构名称" style="width: 120%;"></el-input>
<el-input
v-model="searchParam.hospitalName"
size="middle"
placeholder="请输入所在机构名称"
style="width: 120%"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-bottom:0;">
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="15">
<el-form-item label="创建时间">
<el-date-picker
......@@ -26,19 +46,20 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"
:picker-options="pickerOptions1">
style="width: 100%"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="分佣方式" style="margin-left: 10px;">
<el-form-item label="分佣方式" style="margin-left: 10px">
<el-select
v-model="searchParam.commissionType"
id="statusSelector"
placeholder="请选择分佣方式"
clearable
style="width:110%;height: 32px;line-height: 32px;"
style="width: 110%; height: 32px; line-height: 32px"
>
<el-option
v-for="item in commissionTypeList"
......@@ -49,21 +70,43 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="3" style="text-align:center;padding-right:55px;padding-left: 0px;">
<el-button type="primary" size="small" @click="search()">搜索</el-button>
<el-col
:span="3"
style="
text-align: center;
padding-right: 55px;
padding-left: 0px;
"
>
<el-button type="primary" size="small" @click="search()"
>搜索</el-button
>
</el-col>
</el-row>
</el-form>
</div>
</el-collapse-transition>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<el-row :gutter="30" type="flex" style="margin-bottom:0;float: right;">
<el-col :span="5" style="text-align:right;margin-bottom: 10px;margin-right: 40px;">
<el-button type="primary" size="small" @click="refresh()">刷新页面</el-button>
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" type="flex" style="margin-bottom: 0; float: right">
<el-col
:span="5"
style="text-align: right; margin-bottom: 10px; margin-right: 40px"
>
<el-button type="primary" size="small" @click="refresh()"
>刷新页面</el-button
>
</el-col>
<el-col :span="5" style="text-align:right;">
<el-button type="primary" size="small" @click="add()">添加助诊医生</el-button>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="add()"
>添加助诊医生</el-button
>
</el-col>
</el-row>
<!-- 表格 -->
......@@ -72,52 +115,146 @@
:data="tableData"
style="width: 100%"
v-loading="loading"
@selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column prop="userId" label="ID" min-width="100" align="left"></el-table-column>
<el-table-column prop="userName" label="助诊医生" min-width="100" align="left"></el-table-column>
<el-table-column prop="mobile" label="手机号" min-width="100" align="left"></el-table-column>
<el-table-column prop="address" label="地区" min-width="100" align="left"></el-table-column>
<el-table-column prop="hospitalName" label="所在机构" min-width="100" align="left"></el-table-column>
<el-table-column prop="department" label="科室" min-width="100" align="left"></el-table-column>
<el-table-column prop="title" label="职称" min-width="100" align="left"></el-table-column>
<el-table-column prop="audioCommissionTypeStr" label="语音分佣规则" min-width="120" align="left"></el-table-column>
<el-table-column prop="audioPrice" label="语音分佣" min-width="100" align="left">
<el-table-column
prop="userId"
label="ID"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="userName"
label="助诊医生"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="mobile"
label="手机号"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="address"
label="地区"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="hospitalName"
label="所在机构"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="department"
label="科室"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="title"
label="职称"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="audioCommissionTypeStr"
label="语音分佣规则"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="audioPrice"
label="语音分佣"
min-width="100"
align="left"
>
<template slot-scope="scope">
<span v-if="scope.row.audioCommissionType == 1">{{scope.row.audioPrice | priceNum}}%</span>
<span v-if="scope.row.audioCommissionType == 2">{{scope.row.audioPrice | priceNum}}</span>
<span v-if="scope.row.audioCommissionType == 1"
>{{ scope.row.audioPrice | priceNum }}%</span
>
<span v-if="scope.row.audioCommissionType == 2"
>{{ scope.row.audioPrice | priceNum }}</span
>
</template>
</el-table-column>
<el-table-column prop="videoCommissionTypeStr" label="视频分佣规则" min-width="120" align="left"></el-table-column>
<el-table-column prop="videoPrice" label="视频分佣" min-width="100" align="left">
<el-table-column
prop="videoCommissionTypeStr"
label="视频分佣规则"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="videoPrice"
label="视频分佣"
min-width="100"
align="left"
>
<template slot-scope="scope">
<span v-if="scope.row.videoCommissionType == 1">{{scope.row.videoPrice | priceNum}}%</span>
<span v-if="scope.row.videoCommissionType == 2">{{scope.row.videoPrice | priceNum}}</span>
<span v-if="scope.row.videoCommissionType == 1"
>{{ scope.row.videoPrice | priceNum }}%</span
>
<span v-if="scope.row.videoCommissionType == 2"
>{{ scope.row.videoPrice | priceNum }}</span
>
</template>
</el-table-column>
<el-table-column prop="imgCommissionTypeStr" label="图文分佣规则" min-width="120" align="left"></el-table-column>
<el-table-column prop="imgPrice" label="图文分佣" min-width="100" align="left">
<el-table-column
prop="imgCommissionTypeStr"
label="图文分佣规则"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="imgPrice"
label="图文分佣"
min-width="100"
align="left"
>
<template slot-scope="scope">
<span v-if="scope.row.imgCommissionType == 1">{{scope.row.imgPrice | priceNum}}%</span>
<span v-if="scope.row.imgCommissionType == 2">{{scope.row.imgPrice | priceNum}}</span>
<span v-if="scope.row.imgCommissionType == 1"
>{{ scope.row.imgPrice | priceNum }}%</span
>
<span v-if="scope.row.imgCommissionType == 2"
>{{ scope.row.imgPrice | priceNum }}</span
>
</template>
</el-table-column>
<!-- <el-table-column prop="price" label="价格(元)" min-width="60" align="left">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.price | rounding}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="status" label="状态" min-width="80" align="left">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.status | statusFilter}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="createdTime" label="创建时间" min-width="160" align="left">
<!-- <el-table-column prop="price" label="价格(元)" min-width="60" align="left">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.price | rounding}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="status" label="状态" min-width="80" align="left">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{scope.row.status | statusFilter}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="createdTime"
label="创建时间"
min-width="160"
align="left"
>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="150">
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="150"
>
<template slot-scope="scope">
<div>
<el-button type="primary" size="small" @click="setPrice(scope.row, false)" style="margin-top: 10px;">设置分佣</el-button>
<el-button
type="primary"
size="small"
@click="setPrice(scope.row, false)"
style="margin-top: 10px"
>设置分佣</el-button
>
</div>
</template>
</el-table-column>
......@@ -132,129 +269,237 @@
:page-sizes="[15, 30, 50, 100, 200]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
:total="totalRows"
>
</el-pagination>
</div>
<el-dialog
:title="title"
:visible.sync="setAddVisible"
width="60%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setPriceForm"
<el-dialog :title="title" :visible.sync="setAddVisible" width="60%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form
ref="setPriceForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
style="width: 100%"
>
<el-form-item label="助诊医生" class="required-label" prop="userName">
<el-col :span="15">
<el-select v-model="model.userName"
<el-select
v-model="model.userName"
filterable
remote
placeholder="请输入专家姓名或医院名称,多个关键字用空格隔开,至少输入两个字符"
clearable
style="width: 130%;"
style="width: 130%"
:remote-method="remoteMethod"
:disabled="isEdit"
@change="nameChange"
@visible-change="noSelectHand">
@visible-change="noSelectHand"
>
<el-option
v-for="item in nameList"
:key="item.id"
:label="item.name"
:value="item.id">
<span>{{item.value}}</span>
:value="item.id"
>
<span>{{ item.value }}</span>
</el-option>
</el-select>
</el-col>
</el-form-item>
<!-- <el-col :span="15" style="margin-left: 105px;">-->
<!-- 实际收入(接诊后实际到账金额): ¥{{tempPrice | rounding}}-->
<!-- </el-col>-->
<!-- <el-col :span="15" style="margin-left: 105px;">-->
<!-- 实际收入(接诊后实际到账金额): ¥{{tempPrice | rounding}}-->
<!-- </el-col>-->
<el-form-item label="助诊医生职称" class="required-label">
<el-col :span="15">
<el-input v-model="model.title" style="width: 130%;" disabled size="small" ></el-input>
<el-input
v-model="model.title"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="助诊医生所在机构" class="required-label">
<el-col :span="15">
<el-input v-model="model.hospitalName" style="width: 130%;" disabled size="small" ></el-input>
<el-input
v-model="model.hospitalName"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="助诊医生所在科室" class="required-label">
<el-col :span="15">
<el-input v-model="model.department" style="width: 130%;" disabled size="small" ></el-input>
<el-input
v-model="model.department"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="助诊电话" class="required-label">
<el-col :span="15">
<el-input v-model="model.mobile" style="width: 130%;" disabled size="small" ></el-input>
<el-input
v-model="model.mobile"
style="width: 130%"
disabled
size="small"
></el-input>
</el-col>
</el-form-item>
<el-form-item label="语音问诊分佣" prop="audioCommissionType" class="required-label">
<el-form-item
label="语音问诊分佣"
prop="audioCommissionType"
class="required-label"
>
<el-col :span="16">
<el-radio-group v-model="model.audioCommissionType" size="small" style="line-height: 45px;">
<el-radio-group
v-model="model.audioCommissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="model.audioPrice1" size="small" :precision="2" :min="0"></el-input-number></span>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.audioPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="model.audioPrice2" size="small" :precision="2" :min="0" :max="9999"></el-input-number></span>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.audioPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
<el-form-item label="视频问诊分佣" prop="videoCommissionType" class="required-label">
<el-form-item
label="视频问诊分佣"
prop="videoCommissionType"
class="required-label"
>
<el-col :span="16">
<el-radio-group v-model="model.videoCommissionType" size="small" style="line-height: 45px;">
<el-radio-group
v-model="model.videoCommissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="model.videoPrice1" size="small" :precision="2" :min="0"></el-input-number></span>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.videoPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="model.videoPrice2" size="small" :precision="2" :min="0" :max="9999"></el-input-number></span>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.videoPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
<el-form-item label="图文问诊分佣" prop="imgCommissionType" class="required-label">
<el-form-item
label="图文问诊分佣"
prop="imgCommissionType"
class="required-label"
>
<el-col :span="16">
<el-radio-group v-model="model.imgCommissionType" size="small" style="line-height: 45px;">
<el-radio-group
v-model="model.imgCommissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="model.imgPrice1" size="small" :precision="2" :min="0"></el-input-number></span>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.imgPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="model.imgPrice2" size="small" :precision="2" :min="0" :max="9999"></el-input-number></span>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="model.imgPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center;">
<!-- </el-row>-->
<span slot="footer" class="dialog-footer" style="text-align: center">
<el-button @click="setAddVisible = false">取 消</el-button>
<el-button type="primary" @click="submit">确定</el-button>
</span>
......@@ -265,43 +510,44 @@
<script>
let vm = null;
export default {
data(){
data() {
return {
isUp: false,
endFlag: false,
beginFlag: false,
loading: false,
setPriceVisible: false,
rangeTime: "",
searchParam: {
searchKey: '',
hospitalName: '',
searchKey: "",
hospitalName: "",
commissionType: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1
pageNo: 1,
},
batchUpdatePriceFlag: false,
model:{
name: '',
userId: '',
userName: '',
mobile:'',
address:'',
hospitalName:'',
title:'',
audioCommissionType: '',
audioPrice: '',
audioPrice1: '',
audioPrice2: '',
videoCommissionType: '',
videoPrice: '',
videoPrice1: '',
videoPrice2: '',
imgCommissionType: '',
imgPrice: '',
imgPrice1: '',
imgPrice2: '',
model: {
name: "",
userId: "",
userName: "",
mobile: "",
address: "",
hospitalName: "",
title: "",
audioCommissionType: "",
audioPrice: "",
audioPrice1: "",
audioPrice2: "",
videoCommissionType: "",
videoPrice: "",
videoPrice1: "",
videoPrice2: "",
imgCommissionType: "",
imgPrice: "",
imgPrice1: "",
imgPrice2: "",
},
timeSelect: [],
diagnosisSelect: [],
......@@ -321,38 +567,40 @@ export default {
statusList: [
{
value: 0,
label: "全部"
label: "全部",
},
{
value: 1,
label: "下架"
label: "下架",
},
{
value: 2,
label: "上架"
}],
label: "上架",
},
],
profit: 0,
selectedList:[],
selectedPriceList:[],
selectedList: [],
selectedPriceList: [],
setAddVisible: false,
title: '添加助诊医生',
title: "添加助诊医生",
isEdit: false,
nameList: [],
commissionTypeList: [
{
value: 0,
label: "全部"
label: "全部",
},
{
value: 1,
label: "按比例分佣"
label: "按比例分佣",
},
{
value: 2,
label: "固定分佣"
}],
label: "固定分佣",
},
],
pickerOptions0: {
disabledDate: time => {
disabledDate: (time) => {
if (
this.searchParam.endTimestamp != "" &&
this.searchParam.endTimestamp != null
......@@ -361,66 +609,70 @@ export default {
time.getTime() > new Date(this.searchParam.endTimestamp).getTime()
);
}
}
},
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() > new Date().getTime()
); //减去一天的时间代表可以选择同一天;
}
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
},
addRules: {
userName: [
{required: true, message: "请输入助诊医生", trigger: 'blur'}
{ required: true, message: "请输入助诊医生", trigger: "blur" },
],
audioCommissionType: [
{required: true, message: "请设置语音问诊分佣", trigger: 'blur'}
{ required: true, message: "请设置语音问诊分佣", trigger: "blur" },
],
videoCommissionType: [
{required: true, message: "请设置视频问诊分佣", trigger: 'blur'}
{ required: true, message: "请设置视频问诊分佣", trigger: "blur" },
],
imgCommissionType: [
{required: true, message: "请设置图文问诊分佣", trigger: 'blur'}
{ required: true, message: "请设置图文问诊分佣", trigger: "blur" },
],
audioPrice1: [
{required: true, message: "请设置图文问诊分佣", trigger: 'blur'},
{ pattern: /^(\d|[1-9]\d|100)(\.\d{1,2})?$/, message: '范围在0-100',trigger: 'blur'}
{ required: true, message: "请设置图文问诊分佣", trigger: "blur" },
{
pattern: /^(\d|[1-9]\d|100)(\.\d{1,2})?$/,
message: "范围在0-100",
trigger: "blur",
},
],
}
}
},
};
},
mounted() {
vm = this;
this.getServiceTypeList();
// this.getDiagnoseList()
this.search()
this.search();
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 服务名称
getServiceTypeList() {
let url = `/diagnose/doctorService/serviceType`
this.GET(url).then(res => {
let url = `/diagnose/doctorService/serviceType`;
this.GET(url).then((res) => {
if (res.code == "000000") {
this.serviceTypeList = res.data
this.serviceTypeList = res.data;
}
})
});
},
search() {
if(this.rangeTime){
if (this.rangeTime) {
this.searchParam.startTime = this.rangeTime[0];
this.searchParam.endTime = this.rangeTime[1];
}
else {
} else {
this.searchParam.startTime = "";
this.searchParam.endTime = "";
}
this.loading = true
let url = `/diagnose/commission/downDoctor/pageSearch`
let params = this.searchParam
this.POST(url, params).then(res => {
this.loading = false
this.loading = true;
let url = `/diagnose/commission/downDoctor/pageSearch`;
let params = this.searchParam;
this.POST(url, params).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.contentList;
this.totalRows = res.data.total;
......@@ -435,159 +687,192 @@ export default {
},
submit() {
if(this.model.audioCommissionType == 1 && this.model.audioPrice1 == undefined){
if (
this.model.audioCommissionType == 1 &&
this.model.audioPrice1 == undefined
) {
this.$message({
message: '请输入语音问诊分佣中的按比例分佣',
type: "warning"
message: "请输入语音问诊分佣中的按比例分佣",
type: "warning",
});
return;
}
else if(this.model.audioCommissionType == 1 && this.model.audioPrice1 > 100){
} else if (
this.model.audioCommissionType == 1 &&
this.model.audioPrice1 > 100
) {
this.$message({
message: '请输入语音问诊分佣中的按比例分佣0-100',
type: "warning"
message: "请输入语音问诊分佣中的按比例分佣0-100",
type: "warning",
});
return;
}
if(this.model.audioCommissionType == 2 && this.model.audioPrice2 == undefined){
if (
this.model.audioCommissionType == 2 &&
this.model.audioPrice2 == undefined
) {
this.$message({
message: '请输入语音问诊分佣中的固定分佣金额',
type: "warning"
message: "请输入语音问诊分佣中的固定分佣金额",
type: "warning",
});
return;
}
if(this.model.videoCommissionType == 1 && this.model.videoPrice1 == undefined){
if (
this.model.videoCommissionType == 1 &&
this.model.videoPrice1 == undefined
) {
this.$message({
message: '请输入视频问诊分佣中的按比例分佣',
type: "warning"
message: "请输入视频问诊分佣中的按比例分佣",
type: "warning",
});
return;
}
else if(this.model.videoCommissionType == 1 && this.model.videoPrice1 > 100){
} else if (
this.model.videoCommissionType == 1 &&
this.model.videoPrice1 > 100
) {
this.$message({
message: '请输入视频问诊分佣中的按比例分佣0-100',
type: "warning"
message: "请输入视频问诊分佣中的按比例分佣0-100",
type: "warning",
});
return;
}
if(this.model.videoCommissionType == 2 && this.model.videoPrice2 == undefined){
if (
this.model.videoCommissionType == 2 &&
this.model.videoPrice2 == undefined
) {
this.$message({
message: '请输入视频问诊分佣中的固定分佣金额',
type: "warning"
message: "请输入视频问诊分佣中的固定分佣金额",
type: "warning",
});
return;
}
if(this.model.imgCommissionType == 1 && this.model.imgPrice1 == undefined){
if (
this.model.imgCommissionType == 1 &&
this.model.imgPrice1 == undefined
) {
this.$message({
message: '请输入图文问诊分佣中的按比例分佣',
type: "warning"
message: "请输入图文问诊分佣中的按比例分佣",
type: "warning",
});
return;
}
else if(this.model.imgCommissionType == 1 && this.model.imgPrice1 > 100){
} else if (
this.model.imgCommissionType == 1 &&
this.model.imgPrice1 > 100
) {
this.$message({
message: '请输入图文问诊分佣中的按比例分佣0-100',
type: "warning"
message: "请输入图文问诊分佣中的按比例分佣0-100",
type: "warning",
});
return;
}
if(this.model.imgCommissionType == 2 && this.model.imgPrice2 == undefined){
if (
this.model.imgCommissionType == 2 &&
this.model.imgPrice2 == undefined
) {
this.$message({
message: '请输入图文问诊分佣中的固定分佣金额',
type: "warning"
message: "请输入图文问诊分佣中的固定分佣金额",
type: "warning",
});
return;
}
let timeoutId = null
timeoutId && clearTimeout(timeoutId)
let timeoutId = null;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
this.clickHandle()
}, 500)
this.clickHandle();
}, 500);
},
// 防止按钮多次点击
clickHandle() {
this.$refs.setPriceForm.validate((valid) => {
if(valid) {
vm.loading = true
if (valid) {
vm.loading = true;
vm.setSubmitPrice();
this.POST('/diagnose/commission/downDoctor/save', vm.model).then(res => {
vm.loading = false
this.POST("/diagnose/commission/downDoctor/save", vm.model).then(
(res) => {
vm.loading = false;
// closeLoading(this);
if (res.code == "000000") {
vm.$message({
message: '设置成功',
type: "success"
message: "设置成功",
type: "success",
});
vm.setAddVisible = false;
vm.search()
}else {
vm.search();
} else {
vm.$message({
message: res.message,
type: "error"
})
}
type: "error",
});
}
})
}
);
}
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value
this.search()
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value
this.search()
this.searchParam.pageNo = value;
this.search();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 刷新页面
refresh(){
refresh() {
this.searchParam = {
searchKey: '',
hospitalName: '',
searchKey: "",
hospitalName: "",
commissionType: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1
pageNo: 1,
};
this.rangeTime = "";
this.search();
},
setSelectedList(){
if(this.multipleSelection.length > 0){
setSelectedList() {
if (this.multipleSelection.length > 0) {
this.selectedList = [];
for(let i = 0; i < this.multipleSelection.length; i++){
this.selectedList.push({doctorId: this.multipleSelection[i].doctorId, serviceType: this.multipleSelection[i].serviceType});
for (let i = 0; i < this.multipleSelection.length; i++) {
this.selectedList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
});
}
}
},
setSelectedPriceList(){
if(this.multipleSelection.length > 0){
setSelectedPriceList() {
if (this.multipleSelection.length > 0) {
this.selectedPriceList = [];
for(let i = 0; i < this.multipleSelection.length; i++){
if(this.multipleSelection[i].price != 0 && (this.multipleSelection[i].price == "" || this.multipleSelection[i].price == null)){
for (let i = 0; i < this.multipleSelection.length; i++) {
if (
this.multipleSelection[i].price != 0 &&
(this.multipleSelection[i].price == "" ||
this.multipleSelection[i].price == null)
) {
this.$message({
message: '请先设置"问诊价格"',
type: "warning"
type: "warning",
});
return false;
}
this.selectedPriceList.push({doctorId: this.multipleSelection[i].doctorId, serviceType: this.multipleSelection[i].serviceType, price: this.multipleSelection[i].price});
this.selectedPriceList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
price: this.multipleSelection[i].price,
});
}
return true;
}
},
setPrice(row, batchUpdatePriceFlag){
if(this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields()
setPrice(row, batchUpdatePriceFlag) {
if (this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields();
}
this.batchUpdatePriceFlag = batchUpdatePriceFlag;
// this.setPriceVisible = true
......@@ -622,102 +907,106 @@ export default {
vm.model.audioCommissionType = row.audioCommissionType;
// vm.model.videoCommissionType = row.videoCommissionType;
// vm.model.imgCommissionType = row.imgCommissionType;
if(row.audioCommissionType == 1){
if (row.audioCommissionType == 1) {
vm.model.audioPrice1 = vm.priceNum(row.audioPrice);
}
else if(row.audioCommissionType == 2){
} else if (row.audioCommissionType == 2) {
vm.model.audioPrice2 = vm.priceNum(row.audioPrice);
}
vm.model.videoCommissionType = row.videoCommissionType;
if(row.videoCommissionType == 1){
if (row.videoCommissionType == 1) {
vm.model.videoPrice1 = vm.priceNum(row.videoPrice);
}
else if(row.videoCommissionType == 2){
} else if (row.videoCommissionType == 2) {
vm.model.videoPrice2 = vm.priceNum(row.videoPrice);
}
vm.model.imgCommissionType = row.imgCommissionType;
if(row.imgCommissionType == 1){
if (row.imgCommissionType == 1) {
vm.model.imgPrice1 = vm.priceNum(row.imgPrice);
}
else if(row.imgCommissionType == 2){
} else if (row.imgCommissionType == 2) {
vm.model.imgPrice2 = vm.priceNum(row.imgPrice);
}
// this.getProfit(row);
},
initAdd(){
this.POST(`/diagnose/commission/rule/info`, {userType: "2", defaultFlag: 1}).then(res => {
initAdd() {
this.POST(`/diagnose/commission/rule/info`, {
userType: "2",
defaultFlag: 1,
}).then((res) => {
if (res.code == "000000") {
vm.initData = res.data;
vm.model.audioCommissionType = res.data.audioCommissionType;
if(vm.model.audioCommissionType == 1){
if (vm.model.audioCommissionType == 1) {
vm.model.audioPrice1 = vm.priceNum(res.data.audioPrice);
}
else if(vm.model.audioCommissionType == 2){
} else if (vm.model.audioCommissionType == 2) {
vm.model.audioPrice2 = vm.priceNum(res.data.audioPrice);
}
vm.model.videoCommissionType = res.data.videoCommissionType;
if(vm.model.videoCommissionType == 1){
if (vm.model.videoCommissionType == 1) {
vm.model.videoPrice1 = vm.priceNum(res.data.videoPrice);
}
else if(vm.model.videoCommissionType == 2){
} else if (vm.model.videoCommissionType == 2) {
vm.model.videoPrice2 = vm.priceNum(res.data.videoPrice);
}
vm.model.imgCommissionType = res.data.imgCommissionType;
if(vm.model.imgCommissionType == 1){
if (vm.model.imgCommissionType == 1) {
vm.model.imgPrice1 = vm.priceNum(res.data.imgPrice);
}
else if(vm.model.imgCommissionType == 2){
} else if (vm.model.imgCommissionType == 2) {
vm.model.imgPrice2 = vm.priceNum(res.data.imgPrice);
}
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
},
getProfit(row){
this.POST(`/diagnose/doctorService/profit`, {doctorId: row.doctorId, serviceType: row.serviceType}).then(res => {
getProfit(row) {
this.POST(`/diagnose/doctorService/profit`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
vm.profit = res.data;
if(vm.setPriceForm.price != 0 && (vm.setPriceForm.price == "" || vm.setPriceForm.price == null)){
if (
vm.setPriceForm.price != 0 &&
(vm.setPriceForm.price == "" || vm.setPriceForm.price == null)
) {
this.tempPrice = "";
}
else {
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
},
changePrice(e){
if(this.setPriceForm.price != 0 && (this.setPriceForm.price == "" || this.setPriceForm.price == undefined)){
changePrice(e) {
if (
this.setPriceForm.price != 0 &&
(this.setPriceForm.price == "" || this.setPriceForm.price == undefined)
) {
this.tempPrice = "";
}
else {
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
},
add(){
add() {
this.setAddVisible = true;
this.isEdit = false;
this.title = "添加助诊医生";
if(!this.isEdit){
if (!this.isEdit) {
vm.model.id = null;
vm.model.userName = '';
vm.model.mobile = '';
vm.model.hospitalName = '';
vm.model.department = '';
vm.model.title = '';
vm.model.userId = '';
vm.model.userName = "";
vm.model.mobile = "";
vm.model.hospitalName = "";
vm.model.department = "";
vm.model.title = "";
vm.model.userId = "";
vm.model.audioCommissionType = "";
vm.model.audioPrice = "";
vm.model.audioPrice1 = undefined;
......@@ -737,9 +1026,11 @@ export default {
remoteMethod(val) {
if (val.length >= 2) {
// console.log('搜索',val)
this.GET(`/diagnose/commission/downDoctor/doctorInfoByNameLike?name=${val}`)
this.GET(
`/diagnose/commission/downDoctor/doctorInfoByNameLike?name=${val}`
)
.then(function (res) {
if (res.code == '000000') {
if (res.code == "000000") {
// let data = JSON.parse(JSON.stringify(res.data.data));//通过这个实现深拷贝
let list = res.data;
vm.expertData = list;
......@@ -749,15 +1040,16 @@ export default {
value: `${item.name} ${item.mobilePhone} ${item.hospital} ${item.title}`,
id: item.doctorId,
name: item.name,
}
})
};
});
// console.log('新数组',newList)
vm.nameList = newList;
}
}).catch(function (error) {
})
.catch(function (error) {
errorResponseCheck(error, vm);
});
}else {
} else {
vm.expertData = [];
vm.nameList = [];
}
......@@ -765,7 +1057,7 @@ export default {
nameChange(val) {
// console.log('选中的值',val)
if (val) {
for(let i=0; i < vm.expertData.length; i++){
for (let i = 0; i < vm.expertData.length; i++) {
if (val == vm.expertData[i].doctorId) {
let item = vm.expertData[i];
vm.model.userName = item.name;
......@@ -776,7 +1068,7 @@ export default {
vm.model.userId = item.doctorId;
}
}
}else {
} else {
// vm.model.name = '';
// vm.model.mobilePhone = '';
// vm.model.provinceName = '';
......@@ -788,12 +1080,12 @@ export default {
// vm.model.title = '';
// vm.expertData = [];
// vm.model.doctorId = '';
vm.model.userName = '';
vm.model.mobile = '';
vm.model.hospitalName = '';
vm.model.department = '';
vm.model.title = '';
vm.model.userId = '';
vm.model.userName = "";
vm.model.mobile = "";
vm.model.hospitalName = "";
vm.model.department = "";
vm.model.title = "";
vm.model.userId = "";
}
vm.nameList = [];
},
......@@ -802,54 +1094,77 @@ export default {
vm.nameList = [];
}
},
priceNum (value) {
if(value != "" && value != null && value != "null"){
return (value/100).toFixed(2);
}
else if(value == 0){
return (value/100).toFixed(2);
}
else {
priceNum(value) {
if (value != "" && value != null && value != "null") {
return (value / 100).toFixed(2);
} else if (value == 0) {
return (value / 100).toFixed(2);
} else {
return value;
}
},
setSubmitPrice(){
if(this.model.audioCommissionType == 1 && this.model.audioPrice1 != ""){
setSubmitPrice() {
if (this.model.audioCommissionType == 1 && this.model.audioPrice1 != "") {
this.model.audioPrice = this.model.audioPrice1;
}
else if(this.model.audioCommissionType == 2 && this.model.audioPrice2 != ""){
} else if (
this.model.audioCommissionType == 2 &&
this.model.audioPrice2 != ""
) {
this.model.audioPrice = this.model.audioPrice2;
}
if(this.model.videoCommissionType == 1 && this.model.videoPrice1 != ""){
if (this.model.videoCommissionType == 1 && this.model.videoPrice1 != "") {
this.model.videoPrice = this.model.videoPrice1;
}
else if(this.model.videoCommissionType == 2 && this.model.videoPrice2 != ""){
} else if (
this.model.videoCommissionType == 2 &&
this.model.videoPrice2 != ""
) {
this.model.videoPrice = this.model.videoPrice2;
}
if(this.model.imgCommissionType == 1 && this.model.imgPrice1 != ""){
if (this.model.imgCommissionType == 1 && this.model.imgPrice1 != "") {
this.model.imgPrice = this.model.imgPrice1;
}
else if(this.model.imgCommissionType == 2 && this.model.imgPrice2 != ""){
} else if (
this.model.imgCommissionType == 2 &&
this.model.imgPrice2 != ""
) {
this.model.imgPrice = this.model.imgPrice2;
}
if(this.model.audioPrice != null){
if (this.model.audioPrice != null) {
this.model.audioPrice = this.model.audioPrice * 100;
}
if(this.model.videoPrice != null){
if (this.model.videoPrice != null) {
this.model.videoPrice = this.model.videoPrice * 100;
}
if(this.model.imgPrice != null){
if (this.model.imgPrice != null) {
this.model.imgPrice = this.model.imgPrice * 100;
}
}
}
}
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
}
.component-content {
padding: 10px;
background: #fff;
......@@ -860,9 +1175,9 @@ export default {
}
}
.required-label {
.el-form-item__label::before{
content: '*';
color: #F56C6C;
.el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
......@@ -872,5 +1187,4 @@ export default {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
</style>
......@@ -452,6 +452,10 @@ export default {
this.setTableHeight();
},
destroyed(){
clearInterval(this.timer);
},
methods: {
selectToggle() {
......@@ -826,6 +830,7 @@ export default {
},
//重新匹配医生
reMatchDot(row) {
console.log(row)
this.rematchingVisible = true;
this.diagnoseLogId = row.diagnoseLogId;
this.bizType = 10;
......
<template>
<div class="diagnosis-list-content">
<div class="component-content screenSet" id="screenSet">
<div class="select-content screenSet">
<div class="title">咨询订单管理后台</div>
<el-form :inline="true" class="demo-form-inline from-box" :model="searchParam" label-width="80px" ref="from">
<el-collapse-transition>
<div v-show="isUp" class="form-container">
<el-form
:inline="true"
class="demo-form-inline from-box"
:model="searchParam"
label-width="80px"
ref="from"
>
<el-row :gutter="20" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="订单搜索" class="t-b">
......@@ -11,21 +18,39 @@
v-model="searchParam.searchVal"
clearable
placeholder="输入ID、订单ID或姓名搜索订单"
style="width:280px;"
style="width: 280px"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约类型" class="t-b">
<el-select v-model="searchParam.diagnoseType" placeholder="请选择预约类型" style="width:280px;">
<el-option v-for="item of tyleList" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select
v-model="searchParam.diagnoseType"
placeholder="请选择预约类型"
style="width: 280px"
>
<el-option
v-for="item of tyleList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="创建方式" class="t-b">
<el-select v-model="searchParam.createType" placeholder="创建方式" style="width:280px;">
<el-option v-for="item of createList" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select
v-model="searchParam.createType"
placeholder="创建方式"
style="width: 280px"
>
<el-option
v-for="item of createList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -33,22 +58,49 @@
<el-row :gutter="20" type="flex" justify="center">
<el-col :span="8" class="t-c">
<el-form-item label="是否跟进" class="t-b">
<el-select v-model="searchParam.followFlag" placeholder="请选择是否跟进" style="width:280px;">
<el-option v-for="item of fllowList" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select
v-model="searchParam.followFlag"
placeholder="请选择是否跟进"
style="width: 280px"
>
<el-option
v-for="item of fllowList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="预约来源" class="t-b">
<el-select v-model="searchParam.appointSource" placeholder="请选择预约来源" style="width:280px;">
<el-option v-for="item of sourceList" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select
v-model="searchParam.appointSource"
placeholder="请选择预约来源"
style="width: 280px"
>
<el-option
v-for="item of sourceList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
<el-form-item label="是否匹配" class="t-b">
<el-select v-model="searchParam.operateFlag" placeholder="是否匹配" style="width:280px;">
<el-option v-for="item of operateList" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select
v-model="searchParam.operateFlag"
placeholder="是否匹配"
style="width: 280px"
>
<el-option
v-for="item of operateList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -63,30 +115,31 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%;"
:picker-options="pickerOptions1">
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.createdTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.createdTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.createdTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.createdTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
......@@ -98,30 +151,31 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%;"
:picker-options="pickerOptions1">
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.operateTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt2"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.operateTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt3"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.operateTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt2"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.operateTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt3"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
<el-col :span="8" class="t-c">
......@@ -133,30 +187,31 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%;"
:picker-options="pickerOptions1">
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.appointBeginTime"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt4"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.appointEndTime"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt5"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.appointBeginTime"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt4"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.appointEndTime"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt5"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
</el-row>
......@@ -170,42 +225,58 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%;"
:picker-options="pickerOptions1">
style="width: 90%"
:picker-options="pickerOptions1"
>
</el-date-picker>
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.doneTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.doneTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="开始时间"-->
<!-- v-model="searchParam.doneTimeBegin"-->
<!-- style="width: 135px;"-->
<!-- :picker-options="endDateOpt"-->
<!-- format="yyyy-MM-dd"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- <span>-</span>-->
<!-- <el-date-picker-->
<!-- type="date"-->
<!-- placeholder="结束时间"-->
<!-- v-model="searchParam.doneTimeEnd"-->
<!-- style="width: 135px;"-->
<!-- format="yyyy-MM-dd"-->
<!-- :picker-options="endDateOpt1"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- >-->
<!-- </el-date-picker>-->
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex" justify="center" align="center">
<el-col :span="24" class="btn-wrap">
<el-button type="primary" class="submit-btn" @click="search">搜索</el-button>
<el-button type="warning" class="submit-btn" @click="reset">重置</el-button>
<el-button type="info" class="submit-btn" @click="download">导出</el-button>
<el-button type="primary" class="submit-btn" @click="search"
>搜索</el-button
>
<el-button type="warning" class="submit-btn" @click="reset"
>重置</el-button
>
<el-button type="info" class="submit-btn" @click="download"
>导出</el-button
>
</el-col>
</el-row>
</el-form>
</div>
</el-collapse-transition>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部" name="first">
<table-component
......@@ -308,19 +379,23 @@
</el-tabs>
<!-- 预约时间 -->
<el-dialog
title="预约时间"
:visible.sync="timeVisible"
width="40%">
<el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">
<el-form ref="timeForm"
<el-dialog title="预约时间" :visible.sync="timeVisible" width="40%">
<el-row
:gutter="30"
class="row search"
type="flex"
style="margin-bottom: 0"
>
<el-form
ref="timeForm"
:rules="timeRules"
:model="timeForm"
label-width="150px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
style="width: 100%"
>
<el-col :span="24">
<el-form-item label="开始时间" prop="beginTime">
<el-date-picker
......@@ -328,9 +403,12 @@
type="datetime"
placeholder="请选择开始时间"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeBeginTime">
@change="changeBeginTime"
>
</el-date-picker>
<p v-if="beginFlag" style="color: red;font-size: 12px">开始时间不能大于结束时间</p>
<p v-if="beginFlag" style="color: red; font-size: 12px">
开始时间不能大于结束时间
</p>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-date-picker
......@@ -338,9 +416,12 @@
type="datetime"
placeholder="请选择结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeEndTime">
@change="changeEndTime"
>
</el-date-picker>
<p v-if="endFlag" style="color: red;font-size: 12px">结束时间不能小于开始时间</p>
<p v-if="endFlag" style="color: red; font-size: 12px">
结束时间不能小于开始时间
</p>
</el-form-item>
</el-col>
</el-form>
......@@ -354,131 +435,149 @@
</div>
</template>
<script>
import TableComponent from '@/components/list/table-component'
import { TYPE_LIST, IS_FLLOW, CREATE_TYPE, SOURCE_LIST, OPERATE_LIST } from '@/utils/constants'
import TableComponent from "@/components/list/table-component";
import {
TYPE_LIST,
IS_FLLOW,
CREATE_TYPE,
SOURCE_LIST,
OPERATE_LIST,
} from "@/utils/constants";
export default {
components: {
TableComponent
TableComponent,
},
data(){
data() {
return {
isUp:false,
endFlag: false,
beginFlag: false,
loading: false,
activeName: 'first',
activeName: "first",
timeVisible: false,
createRangeTime:"",
matchRangeTime:"",
orderRangeTime:"",
completeRangeTime:"",
searchParam:{
searchVal: '',
diagnoseType: '',
createType: '',
followFlag: '',
appointSource: '',
operateFlag: '',
createdTimeBegin: '',
createdTimeEnd: '',
operateTimeBegin: '',
operateTimeEnd: '',
appointBeginTime: '',
appointEndTime: '',
doneTimeBegin: '',
doneTimeEnd: '',
status: '', //1、初始状态(未支付) 2、待问诊(支付成功待完善) 3、问诊中(已完善) 4、已问诊")
createRangeTime: "",
matchRangeTime: "",
orderRangeTime: "",
completeRangeTime: "",
searchParam: {
searchVal: "",
diagnoseType: "",
createType: "",
followFlag: "",
appointSource: "",
operateFlag: "",
createdTimeBegin: "",
createdTimeEnd: "",
operateTimeBegin: "",
operateTimeEnd: "",
appointBeginTime: "",
appointEndTime: "",
doneTimeBegin: "",
doneTimeEnd: "",
status: "", //1、初始状态(未支付) 2、待问诊(支付成功待完善) 3、问诊中(已完善) 4、已问诊")
bizType: 1, //1、分页查询 2、导出"
pageSize: 15,
pageNo: 1
pageNo: 1,
},
tyleList: TYPE_LIST,
fllowList: IS_FLLOW,
sourceList: SOURCE_LIST,
createList: CREATE_TYPE,
operateList: OPERATE_LIST,
timeForm:{
diagnoseLogId: '',
beginTime: '',
endTime: ''
timeForm: {
diagnoseLogId: "",
beginTime: "",
endTime: "",
},
tableData: [],
totalRows: 0,
timeRules: {
'beginTime': [
{ required: true, message: '请选择预约开始时间', trigger: 'change'}
beginTime: [
{ required: true, message: "请选择预约开始时间", trigger: "change" },
],
endTime: [
{ required: true, message: "请选择预约结束时间", trigger: "change" },
],
'endTime': [
{ required: true, message: '请选择预约结束时间', trigger: 'change'}
]
},
liveBack: false,
timeClickFlag: true,
tableHeight: 500,
endDateOpt: {
disabledData: (time) => {
if ( this.searchParam.createdTimeEnd != "" && this.searchParam.createdTimeEnd != null) {
if (
this.searchParam.createdTimeEnd != "" &&
this.searchParam.createdTimeEnd != null
) {
return (
time.getTime() > new Date(this.searchParam.createdTimeEnd).getTime()
time.getTime() >
new Date(this.searchParam.createdTimeEnd).getTime()
);
}
}
},
},
endDateOpt1: {
disabledDate: time => {
disabledDate: (time) => {
return (
time.getTime() < new Date(this.searchParam.createdTimeBegin).getTime()
time.getTime() <
new Date(this.searchParam.createdTimeBegin).getTime()
);
}
},
},
endDateOpt2: {
disabledData: (time) => {
if ( this.searchParam.operateTimeEnd != "" && this.searchParam.operateTimeEnd != null) {
if (
this.searchParam.operateTimeEnd != "" &&
this.searchParam.operateTimeEnd != null
) {
return (
time.getTime() > new Date(this.searchParam.operateTimeEnd).getTime()
time.getTime() >
new Date(this.searchParam.operateTimeEnd).getTime()
);
}
}
},
},
endDateOpt3: {
disabledDate: time => {
disabledDate: (time) => {
return (
time.getTime() < new Date(this.searchParam.operateTimeBegin).getTime()
time.getTime() <
new Date(this.searchParam.operateTimeBegin).getTime()
);
}
},
},
endDateOpt4: {
disabledData: (time) => {
if ( this.searchParam.appointEndTime != "" && this.searchParam.appointEndTime != null) {
if (
this.searchParam.appointEndTime != "" &&
this.searchParam.appointEndTime != null
) {
return (
time.getTime() > new Date(this.searchParam.appointEndTime).getTime()
time.getTime() >
new Date(this.searchParam.appointEndTime).getTime()
);
}
}
},
},
endDateOpt5: {
disabledDate: time => {
disabledDate: (time) => {
return (
time.getTime() < new Date(this.searchParam.appointBeginTime).getTime()
time.getTime() <
new Date(this.searchParam.appointBeginTime).getTime()
);
}
},
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() > new Date().getTime()
); //减去一天的时间代表可以选择同一天;
}
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
}
},
activated() {
this.search()
};
},
created() {
activated() {
this.search();
},
created() {},
mounted() {
this.liveBack = this.$route.query.liveBack || false
this.liveBack = this.$route.query.liveBack || false;
// if(this.liveBack) {
// this.activeName = 'first'
// this.searchParam.status = ''
......@@ -486,68 +585,79 @@ export default {
// this.activeName = 'second'
// this.searchParam.status = 2
// }
this.setTableHeight()
this.search()
this.setTableHeight();
this.search();
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 设置table的高度
setTableHeight() {
setTimeout(() => {
this.$nextTick(() => {
if (document.getElementsByClassName('from-box') && document.getElementsByClassName('from-box')[0].clientHeight) {
let height = window.innerHeight-50-140-10-160-document.getElementsByClassName('from-box')[0].clientHeight
if(height > 300) {
this.tableHeight = height
if (
document.getElementsByClassName("from-box") &&
document.getElementsByClassName("from-box")[0].clientHeight
) {
let height =
window.innerHeight -
50 -
140 -
10 -
160 -
document.getElementsByClassName("from-box")[0].clientHeight;
if (height > 300) {
this.tableHeight = height;
}
}
})
},20)
});
}, 20);
},
changeBeginTime(val) {
this.beginFlag = false
this.endFlag = false
this.beginFlag = false;
this.endFlag = false;
let b = new Date(val).getTime(),
e
if(this.timeForm.endTime) {
e = new Date(this.timeForm.endTime).getTime()
e;
if (this.timeForm.endTime) {
e = new Date(this.timeForm.endTime).getTime();
}
if(val) this.beginFlag = b > e ? true : false
if (val) this.beginFlag = b > e ? true : false;
},
changeEndTime(val) {
this.beginFlag = false
this.endFlag = false
this.beginFlag = false;
this.endFlag = false;
let b = new Date(val).getTime(),
e
if(this.timeForm.beginTime) {
e = new Date(this.timeForm.beginTime).getTime()
e;
if (this.timeForm.beginTime) {
e = new Date(this.timeForm.beginTime).getTime();
}
if(val) this.endFlag = b < e ? true : false
if (val) this.endFlag = b < e ? true : false;
},
// tab切换
handleClick(val) {
let tab = 1
let tab = 1;
switch (val.name) {
case 'first':
tab = ''
break
case 'second':
tab = 2
break
case 'three':
tab = 3
break
case 'four':
tab = 4
break
case 'five':
tab = 5
break
case "first":
tab = "";
break;
case "second":
tab = 2;
break;
case "three":
tab = 3;
break;
case "four":
tab = 4;
break;
case "five":
tab = 5;
break;
default:
break
break;
}
this.searchParam.status = tab
this.search()
this.searchParam.status = tab;
this.search();
},
search() {
this.searchParam.createdTimeBegin = this.createRangeTime[0];
......@@ -558,16 +668,16 @@ export default {
this.searchParam.appointEndTime = this.orderRangeTime[1];
this.searchParam.doneTimeBegin = this.completeRangeTime[0];
this.searchParam.doneTimeEnd = this.completeRangeTime[1];
this.loading = true
let url = `/diagnose/admin/diagnose/list`
this.searchParam.bizType = 1
this.searchParam.searchVal = this.searchParam.searchVal.trim()
let params = this.searchParam
this.POST(url, params).then(res => {
this.loading = false
this.loading = true;
let url = `/diagnose/admin/diagnose/list`;
this.searchParam.bizType = 1;
this.searchParam.searchVal = this.searchParam.searchVal.trim();
let params = this.searchParam;
this.POST(url, params).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.list
this.totalRows = res.data.allSize
this.tableData = res.data.list;
this.totalRows = res.data.allSize;
}
});
},
......@@ -578,261 +688,310 @@ export default {
this.orderRangeTime = "";
this.completeRangeTime = "";
this.searchParam = {
searchVal: '',
diagnoseType: '',
createType: '',
followFlag: '',
appointSource: '',
operateFlag: '',
createdTimeBegin: '',
createdTimeEnd: '',
operateTimeBegin: '',
operateTimeEnd: '',
appointBeginTime: '',
appointEndTime: '',
status: '', //1、初始状态(未支付) 2、待问诊(支付成功待完善) 3、问诊中(已完善) 4、已问诊")
searchVal: "",
diagnoseType: "",
createType: "",
followFlag: "",
appointSource: "",
operateFlag: "",
createdTimeBegin: "",
createdTimeEnd: "",
operateTimeBegin: "",
operateTimeEnd: "",
appointBeginTime: "",
appointEndTime: "",
status: "", //1、初始状态(未支付) 2、待问诊(支付成功待完善) 3、问诊中(已完善) 4、已问诊")
bizType: 1, //1、分页查询 2、导出"
pageSize: 15,
pageNo: 1
}
this.search()
pageNo: 1,
};
this.search();
},
// 导出
download() {
let url = `/diagnose/admin/diagnose/export`
let params = this.searchParam
params.bizType = 2
this.POST(url, params).then(res => {
let url = `/diagnose/admin/diagnose/export`;
let params = this.searchParam;
params.bizType = 2;
this.POST(url, params)
.then((res) => {
if (res.code == "000000") {
this.downloadFile(res.data.attachments.base64,res.data.attachments.name);
this.downloadFile(
res.data.attachments.base64,
res.data.attachments.name
);
}
}).catch(err => {
console.log('网络出现点儿问题,稍后重试')
})
.catch((err) => {
console.log("网络出现点儿问题,稍后重试");
});
},
/* 文件下载*/
downloadFile(base64,name) {
let a = document.createElement('a');
let href = 'data:application/xls;base64,' + base64;
a.setAttribute('href',href);
a.setAttribute('download',name);
downloadFile(base64, name) {
let a = document.createElement("a");
let href = "data:application/xls;base64," + base64;
a.setAttribute("href", href);
a.setAttribute("download", name);
a.click();
this.$message.success('导出成功')
this.$message.success("导出成功");
},
// 预约时间
timeHandle(row) {
if ( row.appointBeginTime && row.appointEndTime) {
let bTime = new Date(row.appointBeginTime)
let eTime = new Date(row.appointEndTime)
if ((new Date() - bTime) > 0 && (eTime - new Date()) > 0) {
this.$confirm(' 当前问诊正在进行中,一旦将立即关闭进行中的问诊且无法恢复,确定继续更改时间?', '提醒', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.timeHandleFn(row)
}).catch(() => {
if (row.appointBeginTime && row.appointEndTime) {
let bTime = new Date(row.appointBeginTime);
let eTime = new Date(row.appointEndTime);
if (new Date() - bTime > 0 && eTime - new Date() > 0) {
this.$confirm(
" 当前问诊正在进行中,一旦将立即关闭进行中的问诊且无法恢复,确定继续更改时间?",
"提醒",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
this.timeHandleFn(row);
})
.catch(() => {});
} else {
this.timeHandleFn(row)
this.timeHandleFn(row);
}
} else {
this.timeHandleFn(row)
this.timeHandleFn(row);
}
},
timeHandleFn(row) {
this.beginFlag = false
this.endFlag = false
this.timeVisible = true
if(this.$refs.timeForm) {
this.$refs.timeForm.resetFields()
this.beginFlag = false;
this.endFlag = false;
this.timeVisible = true;
if (this.$refs.timeForm) {
this.$refs.timeForm.resetFields();
}
this.timeForm.diagnoseLogId = row.diagnoseLogId
this.timeForm.beginTime = row.appointBeginTime
this.timeForm.endTime = row.appointEndTime
this.timeForm.diagnoseLogId = row.diagnoseLogId;
this.timeForm.beginTime = row.appointBeginTime;
this.timeForm.endTime = row.appointEndTime;
},
confirmTime() {
if (this.beginFlag || this.endFlag) return
let timeoutId = null
if(this.timeClickFlag) {
this.timeClickFlag = false
timeoutId && clearTimeout(timeoutId)
if (this.beginFlag || this.endFlag) return;
let timeoutId = null;
if (this.timeClickFlag) {
this.timeClickFlag = false;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
this.clickHandle()
}, 2000)
this.clickHandle();
}, 2000);
}
},
// 防止按钮多次点击
clickHandle() {
this.$refs.timeForm.validate((valid) => {
if(valid) {
if(this.beginFlag || this.endFlag) {
return
}
this.loading = true
this.POST('/diagnose/admin/diagnose/appointTime', this.timeForm).then(res => {
this.loading = false
this.timeClickFlag = true
if (valid) {
if (this.beginFlag || this.endFlag) {
return;
}
this.loading = true;
this.POST("/diagnose/admin/diagnose/appointTime", this.timeForm).then(
(res) => {
this.loading = false;
this.timeClickFlag = true;
if (res.code == "000000") {
this.$message({
message: '修改预约时间成功',
type: "success"
message: "修改预约时间成功",
type: "success",
});
this.activeName = 'first'
this.searchParam.status = ''
this.timeVisible = false
this.search()
}else {
this.activeName = "first";
this.searchParam.status = "";
this.timeVisible = false;
this.search();
} else {
this.$message({
message: res.message,
type: "error"
})
}
type: "error",
});
}
})
}
);
}
});
},
// 结束问诊
endDiagnosis(row) {
this.$confirm('确定结束问诊吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定结束问诊吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, '').then(res => {
this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, "").then(
(res) => {
if (res.code == "000000") {
this.$message({
message: '成功结束问诊',
type: "success"
})
this.activeName = 'first'
this.searchParam.status = ''
this.search()
}else {
message: "成功结束问诊",
type: "success",
});
this.activeName = "first";
this.searchParam.status = "";
this.search();
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
}
);
});
})
},
// 呼叫双方
callAll(row) {
this.$confirm('确定呼叫双方吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定呼叫双方吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.POST(`/diagnose/admin/diagnose/call/${row.diagnoseLogId}`, '').then(res => {
this.POST(
`/diagnose/admin/diagnose/call/${row.diagnoseLogId}`,
""
).then((res) => {
if (res.code != "000000") {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
})
})
});
});
},
// 加入问诊
jionCommunicate(row) {
this.$confirm('确定加入问诊吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定加入问诊吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.clearSession()
this.$router.push({path: '/diagnosis-live', query: {tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId}})
})
this.clearSession();
this.$router.push({
path: "/diagnosis-live",
query: { tid: row.imTeamId, diagnoseLogId: row.diagnoseLogId },
});
});
},
// 发送消息
sendMessage(row) {
this.$router.push({path: '/diagnosis-im', query: {tid: row.imTeamId}})
this.$router.push({
path: "/diagnosis-im",
query: { tid: row.imTeamId },
});
},
// 选择
selectBtn(row) {
this.POST(`/diagnose/admin/diagnose/choose/${row.diagnoseLogId}`, '')
.then(res => {
this.POST(`/diagnose/admin/diagnose/choose/${row.diagnoseLogId}`, "")
.then((res) => {
if (res.code == "000000") {
this.$message({
message: '选择成功',
type: "success"
message: "选择成功",
type: "success",
});
this.searchParam.status = ''
this.search()
}else {
this.searchParam.status = "";
this.search();
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
})
.catch((error) => {
this.$message({
message: error,
type: "error"
})
})
this.activeName = 'first'
this.searchParam.status = ''
this.search()
},
goEditor(row,flag) {
this.$router.push({path: '/diagnosis-editor', query: {id:row.diagnoseLogId,editorType: flag}})
type: "error",
});
});
this.activeName = "first";
this.searchParam.status = "";
this.search();
},
goEditor(row, flag) {
this.$router.push({
path: "/diagnosis-editor",
query: { id: row.diagnoseLogId, editorType: flag },
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value
this.search()
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value
this.search()
this.searchParam.pageNo = value;
this.search();
},
// 清除直播时间相关的seession
clearSession() {
sessionStorage.removeItem('TIME_askTime')
sessionStorage.removeItem('TIME_answerTime')
sessionStorage.removeItem('TIME_useTime')
sessionStorage.removeItem('TIME_loseTime')
sessionStorage.removeItem("TIME_askTime");
sessionStorage.removeItem("TIME_answerTime");
sessionStorage.removeItem("TIME_useTime");
sessionStorage.removeItem("TIME_loseTime");
},
// 取消预约
cancelBtn(row){
this.$confirm('问诊一旦取消成功将无法恢复,请谨慎操作,确定取消?', '确定取消问诊', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.clearSession()
this.POST(`/diagnose/admin/diagnose/cancel/${row.diagnoseLogId}`, '')
.then(res => {
cancelBtn(row) {
this.$confirm(
"问诊一旦取消成功将无法恢复,请谨慎操作,确定取消?",
"确定取消问诊",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
this.clearSession();
this.POST(`/diagnose/admin/diagnose/cancel/${row.diagnoseLogId}`, "")
.then((res) => {
if (res.code == "000000") {
this.$message({
message: '取消预约成功',
type: "success"
message: "取消预约成功",
type: "success",
});
this.searchParam.status = ''
this.search()
}else {
this.searchParam.status = "";
this.search();
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
})
.catch((error) => {
this.$message({
message: error,
type: "error"
})
})
})
}
}
}
type: "error",
});
});
});
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
}
.component-content {
padding: 10px;
background: #fff;
......
<template>
<div class="diagnosis-list-content">
<div class="component-content screenSet" id="screenSet">
<div class="select-content screenSet">
<div class="title">服务列表</div>
<el-form ref="form" :inline="true" :model="searchParam" label-suffix=":" label-width="120px" label-position="right" style="width:100%;">
<el-row :gutter="30" type="flex" style="margin-bottom:0;">
<el-collapse-transition>
<div v-show="isUp">
<el-form
ref="form"
:inline="true"
:model="searchParam"
label-suffix=":"
label-width="120px"
label-position="right"
style="width: 100%"
>
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="13">
<el-form-item label="服务医生">
<el-input v-model="searchParam.searchKey" size="middle" placeholder="请输入医生姓名或联系电话" style="width: 120%;"></el-input>
<el-input
v-model="searchParam.searchKey"
size="middle"
placeholder="请输入医生姓名或联系电话"
style="width: 120%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
......@@ -16,7 +31,7 @@
id="statusSelector"
placeholder="请选择服务名称"
clearable
style="margin-left:20px;height: 32px;line-height: 32px;"
style="margin-left: 20px; height: 32px; line-height: 32px"
>
<el-option
v-for="item in serviceTypeList"
......@@ -28,7 +43,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-bottom:0;">
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="13">
<el-form-item label="创建时间">
<el-date-picker
......@@ -38,8 +53,9 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"
:picker-options="pickerOptions1">
style="width: 100%"
:picker-options="pickerOptions1"
>
</el-date-picker>
</el-form-item>
</el-col>
......@@ -50,7 +66,7 @@
id="statusSelector"
placeholder="请选择服务状态"
clearable
style="margin-left:20px;height: 32px;line-height: 32px;"
style="margin-left: 20px; height: 32px; line-height: 32px"
>
<el-option
v-for="item in statusList"
......@@ -62,7 +78,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30" type="flex" style="margin-bottom:0;">
<el-row :gutter="30" type="flex" style="margin-bottom: 0">
<el-col :span="8">
<el-form-item label="接诊分佣方式">
<el-select
......@@ -70,7 +86,7 @@
id="statusSelector"
placeholder="请选择服务状态"
clearable
style="height: 32px;line-height: 32px;width: 100%;"
style="height: 32px; line-height: 32px; width: 100%"
>
<el-option
v-for="item in commissionTypeList"
......@@ -81,23 +97,41 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align:right;padding-right:55px;">
<el-button type="primary" size="small" @click="search()">搜索</el-button>
<el-col :span="16" style="text-align: right; padding-right: 55px">
<el-button type="primary" size="small" @click="search()"
>搜索</el-button
>
</el-col>
</el-row>
</el-form>
<el-row :gutter="30" type="flex" style="margin-bottom:0;float: right;">
<el-col :span="5" style="text-align:right;margin-bottom: 10px;">
<el-button type="primary" size="small" @click="refresh()">刷新页面</el-button>
</div>
</el-collapse-transition>
<div class="select-bottom" @click="selectToggle">
<span v-if="!isUp">展开筛选<i class="el-icon-arrow-down"></i></span>
<span v-else>收起筛选<i class="el-icon-arrow-up"></i></span>
</div>
</div>
<div class="component-content screenSet" id="screenSet">
<el-row :gutter="30" type="flex" style="margin-bottom: 0; float: right">
<el-col :span="5" style="text-align: right; margin-bottom: 10px">
<el-button type="primary" size="small" @click="refresh()"
>刷新页面</el-button
>
</el-col>
<el-col :span="5" style="text-align:right;">
<el-button type="primary" size="small" @click="batchOffline()">批量下架</el-button>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="batchOffline()"
>批量下架</el-button
>
</el-col>
<el-col :span="5" style="text-align:right;">
<el-button type="primary" size="small" @click="batchOnline()">批量上架</el-button>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="batchOnline()"
>批量上架</el-button
>
</el-col>
<el-col :span="5" style="text-align:right;">
<el-button type="primary" size="small" @click="batchSetPrice()">批量设置价格</el-button>
<el-col :span="5" style="text-align: right">
<el-button type="primary" size="small" @click="batchSetPrice()"
>批量设置价格</el-button
>
</el-col>
</el-row>
<!-- 表格 -->
......@@ -106,37 +140,103 @@
:data="tableData"
style="width: 100%"
v-loading="loading"
@selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50"></el-table-column>
<el-table-column prop="id" label="ID" min-width="50" align="left"></el-table-column>
<el-table-column prop="serviceName" label="服务名称" min-width="100" align="left"></el-table-column>
<el-table-column prop="doctorName" label="服务医生" min-width="120" align="left"></el-table-column>
<el-table-column prop="mobilePhone" label="联系电话" min-width="120" align="left"></el-table-column>
<el-table-column prop="price" label="价格(元)" min-width="80" align="left">
<el-table-column
prop="id"
label="ID"
min-width="50"
align="left"
></el-table-column>
<el-table-column
prop="serviceName"
label="服务名称"
min-width="100"
align="left"
></el-table-column>
<el-table-column
prop="doctorName"
label="服务医生"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="mobilePhone"
label="联系电话"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="price"
label="价格(元)"
min-width="80"
align="left"
>
<template slot-scope="scope">
<span>{{scope.row.price | rounding}}</span>
<span>{{ scope.row.price | rounding }}</span>
</template>
</el-table-column>
<el-table-column prop="commissionTypeStr" label="接诊分佣方式" min-width="120" align="left"></el-table-column>
<el-table-column prop="commissionFee" label="分佣金额(元)" min-width="120" align="left">
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.commissionType == 1">{{scope.row.commissionFee}}%</span>-->
<!-- <span v-if="scope.row.commissionType == 2">{{scope.row.commissionFee}}元</span>-->
<!-- </template>-->
<el-table-column
prop="commissionTypeStr"
label="接诊分佣方式"
min-width="120"
align="left"
></el-table-column>
<el-table-column
prop="commissionFee"
label="分佣金额(元)"
min-width="120"
align="left"
>
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.commissionType == 1">{{scope.row.commissionFee}}%</span>-->
<!-- <span v-if="scope.row.commissionType == 2">{{scope.row.commissionFee}}元</span>-->
<!-- </template>-->
</el-table-column>
<el-table-column prop="status" label="状态" min-width="80" align="left">
<template slot-scope="scope">
<span>{{scope.row.status | statusFilter}}</span>
<span>{{ scope.row.status | statusFilter }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" min-width="160" align="left">
<el-table-column
prop="createTime"
label="创建时间"
min-width="160"
align="left"
>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="150">
<el-table-column
label="操作"
fixed="right"
align="center"
min-width="150"
>
<template slot-scope="scope">
<div>
<el-button v-if="scope.row.status == 1" type="primary" size="small" @click="online(scope.row)" style="margin-top: 10px;">上架</el-button>
<el-button v-if="scope.row.status == 2" type="primary" size="small" @click="offline(scope.row)" style="margin-top: 10px;">下架</el-button>
<el-button type="primary" size="small" @click="setPrice(scope.row, false)" style="margin-top: 10px;">设置价格</el-button>
<el-button
v-if="scope.row.status == 1"
type="primary"
size="small"
@click="online(scope.row)"
style="margin-top: 10px"
>上架</el-button
>
<el-button
v-if="scope.row.status == 2"
type="primary"
size="small"
@click="offline(scope.row)"
style="margin-top: 10px"
>下架</el-button
>
<el-button
type="primary"
size="small"
@click="setPrice(scope.row, false)"
style="margin-top: 10px"
>设置价格</el-button
>
</div>
</template>
</el-table-column>
......@@ -151,50 +251,84 @@
:page-sizes="[15, 30, 50, 100, 200]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
:total="totalRows"
>
</el-pagination>
</div>
<!-- 设置价格 -->
<el-dialog
title="设置价格"
:visible.sync="setPriceVisible"
width="55%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setPriceForm"
<el-dialog title="设置价格" :visible.sync="setPriceVisible" width="55%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form
ref="setPriceForm"
:rules="setPriceRules"
:model="setPriceForm"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
style="width: 100%"
>
<el-form-item label="问诊价格" class="required-label" prop="price">
<el-col :span="18">
<el-input-number v-model="setPriceForm.price" size="small" :precision="2" :min="0" :max="9999" placeholder="请输入价格" @change="changePrice($event)"></el-input-number>
<el-input-number
v-model="setPriceForm.price"
size="small"
:precision="2"
:min="0"
:max="9999"
placeholder="请输入价格"
@change="changePrice($event)"
></el-input-number>
</el-col>
</el-form-item>
<el-form-item label="接诊服务费结算方式(上级医生)" prop="commissionType">
<el-form-item
label="接诊服务费结算方式(上级医生)"
prop="commissionType"
>
<el-col :span="18">
<el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">
<el-radio-group
v-model="setPriceForm.commissionType"
size="small"
style="line-height: 45px"
>
<div>
<el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="setPriceForm.commissionPrice1" size="small" :precision="2" :min="0"></el-input-number></span>
<el-radio
:label="1"
style="float: left; margin-top: 5px; line-height: 20px"
>按比例分佣(%)</el-radio
>
<span style="float: right; width: 100px"
><el-input-number
v-model="setPriceForm.commissionPrice1"
size="small"
:precision="2"
:min="0"
></el-input-number
></span>
</div>
<div>
<el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>
<span style="float: right;width: 100px;margin-left: 14px;"><el-input-number v-model="setPriceForm.commissionPrice2" size="small" :precision="2" :min="0" :max="9999"></el-input-number></span>
<el-radio
:label="2"
style="float: left; margin-top: 30px; line-height: 20px"
>固定分佣金额(元)</el-radio
>
<span style="float: right; width: 100px; margin-left: 14px"
><el-input-number
v-model="setPriceForm.commissionPrice2"
size="small"
:precision="2"
:min="0"
:max="9999"
></el-input-number
></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<!-- </el-row>-->
<span slot="footer" class="dialog-footer">
<el-button @click="setPriceVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmSetPrice">确 定</el-button>
......@@ -206,31 +340,32 @@
<script>
let vm = null;
export default {
data(){
data() {
return {
isUp: false,
endFlag: false,
beginFlag: false,
loading: false,
setPriceVisible: false,
rangeTime: "",
searchParam: {
searchKey: '',
searchKey: "",
serviceTypeId: 0,
status: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1
pageNo: 1,
},
batchUpdatePriceFlag: false,
setPriceForm:{
setPriceForm: {
commissionType: 1,
commissionPrice: '',
commissionPrice1: '',
commissionPrice2: '',
doctorId: '',
serviceType: '',
price: ''
commissionPrice: "",
commissionPrice1: "",
commissionPrice2: "",
doctorId: "",
serviceType: "",
price: "",
},
timeSelect: [],
diagnosisSelect: [],
......@@ -238,12 +373,14 @@ export default {
tableData: [],
totalRows: 0,
setPriceRules: {
price: [
{required: true, message: "请输入问诊价格", trigger: 'blur'}
],
price: [{ required: true, message: "请输入问诊价格", trigger: "blur" }],
commissionType: [
{required: true, message: "请选择接诊服务费结算方式", trigger: 'blur'}
]
{
required: true,
message: "请选择接诊服务费结算方式",
trigger: "blur",
},
],
},
liveBack: false,
timeClickFlag: true,
......@@ -252,34 +389,36 @@ export default {
statusList: [
{
value: 0,
label: "全部"
label: "全部",
},
{
value: 1,
label: "下架"
label: "下架",
},
{
value: 2,
label: "上架"
}],
label: "上架",
},
],
commissionTypeList: [
{
value: 0,
label: "全部"
label: "全部",
},
{
value: 1,
label: "按比例分佣"
label: "按比例分佣",
},
{
value: 2,
label: "固定分佣"
}],
label: "固定分佣",
},
],
profit: 0,
selectedList:[],
selectedPriceList:[],
selectedList: [],
selectedPriceList: [],
pickerOptions0: {
disabledDate: time => {
disabledDate: (time) => {
if (
this.searchParam.endTimestamp != "" &&
this.searchParam.endTimestamp != null
......@@ -288,49 +427,48 @@ export default {
time.getTime() > new Date(this.searchParam.endTimestamp).getTime()
);
}
}
},
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() > new Date().getTime()
); //减去一天的时间代表可以选择同一天;
}
disabledDate: (time) => {
return time.getTime() > new Date().getTime(); //减去一天的时间代表可以选择同一天;
},
}
},
};
},
mounted() {
vm = this;
this.getServiceTypeList();
// this.getDiagnoseList()
this.search()
this.search();
},
methods: {
selectToggle() {
this.isUp = !this.isUp;
},
// 服务名称
getServiceTypeList() {
let url = `/diagnose/doctorService/serviceType`
this.GET(url).then(res => {
let url = `/diagnose/doctorService/serviceType`;
this.GET(url).then((res) => {
if (res.code == "000000") {
this.serviceTypeList = res.data
this.serviceTypeList = res.data;
}
})
});
},
search() {
if(this.rangeTime){
if (this.rangeTime) {
this.searchParam.startTime = this.rangeTime[0];
this.searchParam.endTime = this.rangeTime[1];
}
else {
} else {
this.searchParam.startTime = "";
this.searchParam.endTime = "";
}
this.loading = true
let url = `/diagnose/doctorService/search`
let params = this.searchParam
this.POST(url, params).then(res => {
this.loading = false
this.loading = true;
let url = `/diagnose/doctorService/search`;
let params = this.searchParam;
this.POST(url, params).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.tableData = res.data.contentList;
this.totalRows = res.data.total;
......@@ -345,211 +483,245 @@ export default {
},
confirmSetPrice() {
if(this.setPriceForm.price != 0 && (this.setPriceForm.price == "" || this.setPriceForm.price == undefined)){
if (
this.setPriceForm.price != 0 &&
(this.setPriceForm.price == "" || this.setPriceForm.price == undefined)
) {
this.$message({
message: '请输入问诊价格',
type: "warning"
message: "请输入问诊价格",
type: "warning",
});
return;
}
if(this.setPriceForm.commissionType == null || this.setPriceForm.commissionType == ""){
if (
this.setPriceForm.commissionType == null ||
this.setPriceForm.commissionType == ""
) {
this.$message({
message: '请选择接诊服务费结算方式(上级医生)',
type: "warning"
message: "请选择接诊服务费结算方式(上级医生)",
type: "warning",
});
return;
}
if(this.setPriceForm.commissionType == 1 && this.setPriceForm.commissionPrice1 == undefined ){
if (
this.setPriceForm.commissionType == 1 &&
this.setPriceForm.commissionPrice1 == undefined
) {
this.$message({
message: '请输入按比例分佣',
type: "warning"
message: "请输入按比例分佣",
type: "warning",
});
return;
}
else if(this.setPriceForm.commissionType == 1 && this.setPriceForm.commissionPrice1 > 100){
} else if (
this.setPriceForm.commissionType == 1 &&
this.setPriceForm.commissionPrice1 > 100
) {
this.$message({
message: '请输入按比例分佣0-100',
type: "warning"
message: "请输入按比例分佣0-100",
type: "warning",
});
return;
}
if(this.setPriceForm.commissionType == 2 && this.setPriceForm.commissionPrice2 == undefined ){
if (
this.setPriceForm.commissionType == 2 &&
this.setPriceForm.commissionPrice2 == undefined
) {
this.$message({
message: '请输入固定分佣金额',
type: "warning"
message: "请输入固定分佣金额",
type: "warning",
});
return;
}
let timeoutId = null
timeoutId && clearTimeout(timeoutId)
let timeoutId = null;
timeoutId && clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
this.clickHandle()
}, 500)
this.clickHandle();
}, 500);
},
// 防止按钮多次点击
clickHandle() {
this.$refs.setPriceForm.validate((valid) => {
if(valid) {
this.loading = true
if (valid) {
this.loading = true;
// 批量设置价格
if(this.batchUpdatePriceFlag){
if (this.batchUpdatePriceFlag) {
let setPriceList = [];
for(let i = 0; i < this.multipleSelection.length; i++){
if(this.setPriceForm.commissionType == 1){
this.setPriceForm.commissionPriceStr = this.setPriceForm.commissionPrice1;
}
else if(this.setPriceForm.commissionType == 2){
this.setPriceForm.commissionPriceStr = this.setPriceForm.commissionPrice2;
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.setPriceForm.commissionType == 1) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice1;
} else if (this.setPriceForm.commissionType == 2) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice2;
}
setPriceList.push({doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType, price: this.setPriceForm.price,
commissionType: this.setPriceForm.commissionType,commissionPriceStr: this.setPriceForm.commissionPriceStr,
commissionPrice:this.setPriceForm.commissionPriceStr
setPriceList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
price: this.setPriceForm.price,
commissionType: this.setPriceForm.commissionType,
commissionPriceStr: this.setPriceForm.commissionPriceStr,
commissionPrice: this.setPriceForm.commissionPriceStr,
});
}
this.POST('/diagnose/doctorService/batchUpdatePrice', setPriceList).then(res => {
this.loading = false
this.POST(
"/diagnose/doctorService/batchUpdatePrice",
setPriceList
).then((res) => {
this.loading = false;
// closeLoading(this);
if (res.code == "000000") {
this.$message({
message: '设置价格成功',
type: "success"
message: "设置价格成功",
type: "success",
});
this.setPriceVisible = false
this.search()
}else {
this.setPriceVisible = false;
this.search();
} else {
this.$message({
message: res.message,
type: "error"
})
}
type: "error",
});
}
else {
if(this.setPriceForm.commissionType == 1){
this.setPriceForm.commissionPriceStr = this.setPriceForm.commissionPrice1;
}
else if(this.setPriceForm.commissionType == 2){
this.setPriceForm.commissionPriceStr = this.setPriceForm.commissionPrice2;
}
this.setPriceForm.commissionPrice = this.setPriceForm.commissionPriceStr;
this.POST('/diagnose/doctorService/updatePrice', this.setPriceForm).then(res => {
this.loading = false
});
} else {
if (this.setPriceForm.commissionType == 1) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice1;
} else if (this.setPriceForm.commissionType == 2) {
this.setPriceForm.commissionPriceStr =
this.setPriceForm.commissionPrice2;
}
this.setPriceForm.commissionPrice =
this.setPriceForm.commissionPriceStr;
this.POST(
"/diagnose/doctorService/updatePrice",
this.setPriceForm
).then((res) => {
this.loading = false;
// closeLoading(this);
if (res.code == "000000") {
this.$message({
message: '设置价格成功',
type: "success"
message: "设置价格成功",
type: "success",
});
this.setPriceVisible = false
this.search()
}else {
this.setPriceVisible = false;
this.search();
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
}
}
})
});
},
handleSizeChange(value) {
this.searchParam.pageSize = value
this.search()
this.searchParam.pageSize = value;
this.search();
},
handleCurrentChange(value) {
this.searchParam.pageNo = value
this.search()
this.searchParam.pageNo = value;
this.search();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 刷新页面
refresh(){
refresh() {
this.searchParam = {
searchKey: '',
searchKey: "",
serviceTypeId: 0,
status: 0,
startTime: "",
endTime: "",
pageSize: 15,
pageNo: 1
pageNo: 1,
};
this.rangeTime = "";
this.search();
},
// 批量下架
batchOffline(){
if(this.multipleSelection.length == 0){
batchOffline() {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请先选择要操作的数据',
type: "warning"
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
this.setSelectedList();
this.$confirm('一旦下架将无法预约您的问诊,已预约的问诊不受影响,确定下架?', '确定下架问诊吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.POST(`/diagnose/doctorService/batchUndeploy`, this.selectedList).then(res => {
this.$confirm(
"一旦下架将无法预约您的问诊,已预约的问诊不受影响,确定下架?",
"确定下架问诊吗?",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
this.POST(
`/diagnose/doctorService/batchUndeploy`,
this.selectedList
).then((res) => {
if (res.code == "000000") {
this.$message({
message: '下架成功',
type: "success"
})
message: "下架成功",
type: "success",
});
this.search();
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
})
});
},
// 批量上架
batchOnline(){
if(this.multipleSelection.length == 0){
batchOnline() {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请先选择要操作的数据',
type: "warning"
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
if(!this.setSelectedPriceList()){
if (!this.setSelectedPriceList()) {
return;
}
// this.setSelectedList();
this.POST(`/diagnose/doctorService/batchDeploy`, this.selectedPriceList).then(res => {
this.POST(
`/diagnose/doctorService/batchDeploy`,
this.selectedPriceList
).then((res) => {
if (res.code == "000000") {
this.$message({
message: '上架成功',
type: "success"
})
message: "上架成功",
type: "success",
});
this.search();
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
},
// 批量设置价格
batchSetPrice(){
if(this.multipleSelection.length == 0){
batchSetPrice() {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请先选择要操作的数据',
type: "warning"
message: "请先选择要操作的数据",
type: "warning",
});
return;
}
......@@ -558,81 +730,102 @@ export default {
// }
this.setPrice(this.multipleSelection[0], true);
},
setSelectedList(){
if(this.multipleSelection.length > 0){
setSelectedList() {
if (this.multipleSelection.length > 0) {
this.selectedList = [];
for(let i = 0; i < this.multipleSelection.length; i++){
this.selectedList.push({doctorId: this.multipleSelection[i].doctorId, serviceType: this.multipleSelection[i].serviceType});
for (let i = 0; i < this.multipleSelection.length; i++) {
this.selectedList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
});
}
}
},
setSelectedPriceList(){
if(this.multipleSelection.length > 0){
setSelectedPriceList() {
if (this.multipleSelection.length > 0) {
this.selectedPriceList = [];
for(let i = 0; i < this.multipleSelection.length; i++){
if(this.multipleSelection[i].price != 0 && (this.multipleSelection[i].price == "" || this.multipleSelection[i].price == null)){
for (let i = 0; i < this.multipleSelection.length; i++) {
if (
this.multipleSelection[i].price != 0 &&
(this.multipleSelection[i].price == "" ||
this.multipleSelection[i].price == null)
) {
this.$message({
message: '请先设置"问诊价格"',
type: "warning"
type: "warning",
});
return false;
}
this.selectedPriceList.push({doctorId: this.multipleSelection[i].doctorId, serviceType: this.multipleSelection[i].serviceType, price: this.multipleSelection[i].price});
this.selectedPriceList.push({
doctorId: this.multipleSelection[i].doctorId,
serviceType: this.multipleSelection[i].serviceType,
price: this.multipleSelection[i].price,
});
}
return true;
}
},
// 上架
online(row){
if(row.price == null){
online(row) {
if (row.price == null) {
this.$message({
message: '请先设置价格',
type: "warning"
message: "请先设置价格",
type: "warning",
});
return;
}
this.POST(`/diagnose/doctorService/deploy`, {'doctorId': row.doctorId, 'serviceType': row.serviceType}).then(res => {
this.POST(`/diagnose/doctorService/deploy`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
this.$message({
message: '上架成功',
type: "success"
})
message: "上架成功",
type: "success",
});
this.search();
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
},
// 下架
offline(row){
this.$confirm('一旦下架将无法预约您的问诊,已预约的问诊不受影响,确定下架?', '确定下架问诊吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.POST(`/diagnose/doctorService/undeploy`, {'doctorId': row.doctorId, 'serviceType': row.serviceType}).then(res => {
offline(row) {
this.$confirm(
"一旦下架将无法预约您的问诊,已预约的问诊不受影响,确定下架?",
"确定下架问诊吗?",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
).then(() => {
this.POST(`/diagnose/doctorService/undeploy`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
this.$message({
message: '下架成功',
type: "success"
})
message: "下架成功",
type: "success",
});
this.search();
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
})
});
},
setPrice(row, batchUpdatePriceFlag){
if(this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields()
setPrice(row, batchUpdatePriceFlag) {
if (this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields();
}
this.batchUpdatePriceFlag = batchUpdatePriceFlag;
this.setPriceForm.doctorId = row.doctorId;
......@@ -642,10 +835,9 @@ export default {
this.setPriceForm.commissionPrice1 = undefined;
this.setPriceForm.commissionPrice2 = undefined;
this.setPriceForm.commissionType = row.commissionType;
if(this.setPriceForm.commissionType == 1){
if (this.setPriceForm.commissionType == 1) {
this.setPriceForm.commissionPrice1 = row.commissionPriceStr;
}
else if(this.setPriceForm.commissionType == 2){
} else if (this.setPriceForm.commissionType == 2) {
this.setPriceForm.commissionPrice2 = row.commissionPriceStr;
}
this.setPriceForm.price = row.price;
......@@ -656,38 +848,65 @@ export default {
// this.getProfit(row);
},
getProfit(row){
this.POST(`/diagnose/doctorService/profit`, {doctorId: row.doctorId, serviceType: row.serviceType}).then(res => {
getProfit(row) {
this.POST(`/diagnose/doctorService/profit`, {
doctorId: row.doctorId,
serviceType: row.serviceType,
}).then((res) => {
if (res.code == "000000") {
vm.profit = res.data;
if(vm.setPriceForm.price != 0 && (vm.setPriceForm.price == "" || vm.setPriceForm.price == null)){
if (
vm.setPriceForm.price != 0 &&
(vm.setPriceForm.price == "" || vm.setPriceForm.price == null)
) {
this.tempPrice = "";
}
else {
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
}else {
} else {
this.$message({
message: res.message,
type: "error"
})
type: "error",
});
}
});
},
changePrice(e){
if(this.setPriceForm.price != 0 && (this.setPriceForm.price == "" || this.setPriceForm.price == undefined)){
changePrice(e) {
if (
this.setPriceForm.price != 0 &&
(this.setPriceForm.price == "" || this.setPriceForm.price == undefined)
) {
this.tempPrice = "";
}
else {
} else {
this.tempPrice = this.setPriceForm.price * this.profit;
}
}
}
}
},
},
};
</script>
<style lang="scss" scoped>
.diagnosis-list-content {
.select-content {
margin-bottom: 10px;
padding: 10px;
background: #fff;
overflow: hidden !important;
.title {
height: 50px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.select-bottom {
height: 50px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
color: #0d9078;
}
}
.component-content {
padding: 10px;
background: #fff;
......@@ -698,9 +917,8 @@ export default {
}
}
.required-label .el-form-item__label::before {
content: '*';
color: #F56C6C;
content: "*";
color: #f56c6c;
margin-right: 4px;
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册