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

添加路由

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