|
|
|
@ -1,11 +1,10 @@
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh">
|
|
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta
|
|
|
|
<meta name="viewport"
|
|
|
|
name="viewport"
|
|
|
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
|
|
|
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
|
|
<link type="image/x-icon" rel="shortcut icon" href="./favicon.png" />
|
|
|
|
<link type="image/x-icon" rel="shortcut icon" href="./favicon.png" />
|
|
|
|
<link rel="stylesheet" href="./assets/import/element-plus.css" />
|
|
|
|
<link rel="stylesheet" href="./assets/import/element-plus.css" />
|
|
|
|
@ -20,9 +19,11 @@
|
|
|
|
[v-cloak] {
|
|
|
|
[v-cloak] {
|
|
|
|
display: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cursor-pointer {
|
|
|
|
.cursor-pointer {
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.page_wrapper {
|
|
|
|
.page_wrapper {
|
|
|
|
width: calc(100vw - 40px);
|
|
|
|
width: calc(100vw - 40px);
|
|
|
|
margin: 0 auto;
|
|
|
|
margin: 0 auto;
|
|
|
|
@ -55,21 +56,115 @@
|
|
|
|
font-size: 18px;
|
|
|
|
font-size: 18px;
|
|
|
|
color: rgb(201, 90, 90);
|
|
|
|
color: rgb(201, 90, 90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.select_flex_wrapper {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.combo_active {
|
|
|
|
|
|
|
|
--el-table-tr-bg-color: #4e75a620;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_show_wrapper {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_item_wrapper {
|
|
|
|
|
|
|
|
width: calc((100% / 6) - 10px);
|
|
|
|
|
|
|
|
height: 48px;
|
|
|
|
|
|
|
|
background: #9fea6a;
|
|
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
margin: 5px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
|
|
border: 4px solid #ffffff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_item_blank_wrapper {
|
|
|
|
|
|
|
|
width: calc((100% / 6) - 10px);
|
|
|
|
|
|
|
|
margin: 5px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_item_vip_wrapper {
|
|
|
|
|
|
|
|
background: #f6c65e;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_item_error_wrapper {
|
|
|
|
|
|
|
|
background: #cccccc;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.plan_item_active_wrapper {
|
|
|
|
|
|
|
|
border: 4px solid #cf6464;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.select_flex_center_wrapper {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
<script></script>
|
|
|
|
<script></script>
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="app">
|
|
|
|
<div id="app">
|
|
|
|
<el-config-provider :button="button_config">
|
|
|
|
<el-config-provider :button="button_config">
|
|
|
|
|
|
|
|
<el-dialog v-model="combo_dialog_show" title="选择套餐" width="800">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-table border :data="combo_list" style="width: 100%" height="calc(50vh - 45px)" show-overflow-tooltip
|
|
|
|
|
|
|
|
ref="combo_table_ref" @row-click="comboRowClick" :row-class-name="comboRowClassName">
|
|
|
|
|
|
|
|
<el-table-column property="combo_id" label="套餐ID" width="120"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column property="name" label="套餐名称"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="性别" width="60">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
{{ ['全部','男','女'][scope.row.sex] }}
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column property="pinyin" label="套餐简拼" width="120"></el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="plan_dialog_show" title="号源" width="800">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<div class="select_flex_wrapper">
|
|
|
|
|
|
|
|
<el-form label-width="40px" inline>
|
|
|
|
|
|
|
|
<el-form-item label="日期">
|
|
|
|
|
|
|
|
<el-date-picker v-model="plan_data.date" type="date" placeholder="请选择号源日期" format="YYYY-MM-DD"
|
|
|
|
|
|
|
|
value-format="YYYY-MM-DD"></el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item></el-form>
|
|
|
|
|
|
|
|
<el-button @click="getPlanList()" type="primary">查看号源</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="plan_show_wrapper">
|
|
|
|
|
|
|
|
<div @click="selectPlanClick(i)" class="plan_item_wrapper" v-for="(i,k) in plan_list" :key="k" :class="[
|
|
|
|
|
|
|
|
i.is_vip === 1 ? 'plan_item_vip_wrapper' : '',
|
|
|
|
|
|
|
|
(i.sex !== Number(input_data.gender) && i.sex !== 0) ? 'plan_item_error_wrapper' : '',
|
|
|
|
|
|
|
|
i.status === 2 ? 'plan_item_error_wrapper' : '',
|
|
|
|
|
|
|
|
(i.is_vip === 1 && input_data.vip !== '1') ? 'plan_item_error_wrapper' : '',
|
|
|
|
|
|
|
|
(i.id === plan_data.active) ? 'plan_item_active_wrapper' : '',
|
|
|
|
|
|
|
|
]">
|
|
|
|
|
|
|
|
{{ i.plan_number }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="plan_item_blank_wrapper" v-for="(i,k) in 6" :key="k"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="select_flex_center_wrapper">
|
|
|
|
|
|
|
|
<el-button @click="plan_dialog_show = false">取消</el-button>
|
|
|
|
|
|
|
|
<el-button @click="createOrderClick()" type="primary">预约</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page_wrapper">
|
|
|
|
<div class="page_wrapper">
|
|
|
|
<div class="input_box_wrapper">
|
|
|
|
<div class="input_box_wrapper">
|
|
|
|
<el-form label-width="80px">
|
|
|
|
<el-form label-width="80px">
|
|
|
|
<el-form-item label="院区">
|
|
|
|
<el-form-item label="院区">
|
|
|
|
<el-select
|
|
|
|
<el-select v-model="input_data.hospital" placeholder="请选择院区">
|
|
|
|
v-model="input_data.hospital"
|
|
|
|
<el-option label="秀英院区" value="1"></el-option>
|
|
|
|
placeholder="请选择院区"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option label="海南现代妇幼" value="1"></el-option>
|
|
|
|
|
|
|
|
<el-option label="府城院区" value="4"></el-option>
|
|
|
|
<el-option label="府城院区" value="4"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
@ -77,17 +172,10 @@
|
|
|
|
<el-input v-model="input_data.name" placeholder="请输入姓名" />
|
|
|
|
<el-input v-model="input_data.name" placeholder="请输入姓名" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="身份证号">
|
|
|
|
<el-form-item label="身份证号">
|
|
|
|
<el-input
|
|
|
|
<el-input @change="idNumberUpdate" v-model="input_data.id_number" placeholder="请输入身份证号" />
|
|
|
|
@change="idNumberUpdate"
|
|
|
|
|
|
|
|
v-model="input_data.id_number"
|
|
|
|
|
|
|
|
placeholder="请输入身份证号"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="手机号">
|
|
|
|
<el-form-item label="手机号">
|
|
|
|
<el-input
|
|
|
|
<el-input v-model="input_data.phone" placeholder="请输入手机号" />
|
|
|
|
v-model="input_data.phone"
|
|
|
|
|
|
|
|
placeholder="请输入手机号"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="性别">
|
|
|
|
<el-form-item label="性别">
|
|
|
|
<el-select v-model="input_data.gender" placeholder="请选择性别">
|
|
|
|
<el-select v-model="input_data.gender" placeholder="请选择性别">
|
|
|
|
@ -95,117 +183,92 @@
|
|
|
|
<el-option label="女" value="2"></el-option>
|
|
|
|
<el-option label="女" value="2"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="婚否">
|
|
|
|
|
|
|
|
<el-select v-model="input_data.married" placeholder="请选择婚否">
|
|
|
|
|
|
|
|
<el-option label="是" value="1"></el-option>
|
|
|
|
|
|
|
|
<el-option label="否" value="2"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="VIP">
|
|
|
|
|
|
|
|
<el-select v-model="input_data.vip" placeholder="请选择VIP类型">
|
|
|
|
|
|
|
|
<el-option label="是" value="1"></el-option>
|
|
|
|
|
|
|
|
<el-option label="否" value="2"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="出生日期">
|
|
|
|
<el-form-item label="出生日期">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker v-model="input_data.birthday" type="date" placeholder="请选择出生日期" format="YYYY-MM-DD"
|
|
|
|
v-model="input_data.birthday"
|
|
|
|
value-format="YYYY-MM-DD"></el-date-picker>
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
placeholder="请选择出生日期"
|
|
|
|
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="select_box_wrapper">
|
|
|
|
<div class="select_box_wrapper">
|
|
|
|
<div class="select_input_wrapper">
|
|
|
|
<div class="select_input_wrapper">
|
|
|
|
<div>
|
|
|
|
<div class="select_flex_wrapper">
|
|
|
|
<el-form label-width="40px" inline>
|
|
|
|
<el-form label-width="40px" inline>
|
|
|
|
<el-form-item label="简拼">
|
|
|
|
<el-form-item label="简拼">
|
|
|
|
<el-input
|
|
|
|
<el-input v-model="search_input" placeholder="" /> </el-form-item></el-form>
|
|
|
|
v-model="search_input"
|
|
|
|
<el-button type="primary" @click="searchClick()">搜索</el-button>
|
|
|
|
placeholder=""
|
|
|
|
|
|
|
|
/> </el-form-item
|
|
|
|
|
|
|
|
></el-form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div class="select_flex_wrapper">
|
|
|
|
<el-button type="primary">选择套餐</el-button>
|
|
|
|
<el-form v-if="combo_list.length > 0" label-width="40px" inline>
|
|
|
|
|
|
|
|
<el-form-item label="套餐">
|
|
|
|
|
|
|
|
<div class="combo_show_wrapper">
|
|
|
|
|
|
|
|
{{ !!combo_show ? combo_show.name : '无' }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-form-item></el-form>
|
|
|
|
|
|
|
|
<el-button @click="combo_dialog_show = true" type="primary">选择套餐</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-table
|
|
|
|
<el-table border @selection-change="itemSelectionChange" row-class-name="cursor-pointer"
|
|
|
|
border
|
|
|
|
highlight-current-row @row-click="tableRowClick" ref="item_table_ref" show-overflow-tooltip
|
|
|
|
@selection-change="itemSelectionChange"
|
|
|
|
:data="item_list_show" style="width: 100%" height="calc(50vh - 100px)">
|
|
|
|
row-class-name="cursor-pointer"
|
|
|
|
|
|
|
|
highlight-current-row
|
|
|
|
|
|
|
|
@row-click="tableRowClick"
|
|
|
|
|
|
|
|
ref="item_table_ref"
|
|
|
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
|
|
:data="item_list_computed"
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
height="calc(50vh - 100px)"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="38"></el-table-column>
|
|
|
|
<el-table-column type="selection" width="38"></el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column property="title" label="项目名称" width="120"></el-table-column>
|
|
|
|
property="title"
|
|
|
|
<el-table-column property="price" label="价格" width="80"></el-table-column>
|
|
|
|
label="项目名称"
|
|
|
|
<el-table-column property="group" label="科室" width="80"></el-table-column>
|
|
|
|
width="120"
|
|
|
|
<el-table-column label="性别" width="60">
|
|
|
|
></el-table-column>
|
|
|
|
<template #default="scope">
|
|
|
|
<el-table-column
|
|
|
|
{{ ['全部','男','女'][scope.row.sex] }}
|
|
|
|
property="price"
|
|
|
|
</template>
|
|
|
|
label="价格"
|
|
|
|
</el-table-column>
|
|
|
|
width="80"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
property="group"
|
|
|
|
|
|
|
|
label="科室"
|
|
|
|
|
|
|
|
width="80"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column property="desc" label="备注"></el-table-column>
|
|
|
|
<el-table-column property="desc" label="备注"></el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column property="id" label="项目ID" width="120"></el-table-column>
|
|
|
|
property="id"
|
|
|
|
<el-table-column property="can_qian_hou" label="餐前/餐后" width="90"></el-table-column>
|
|
|
|
label="项目ID"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mt-3">
|
|
|
|
<div class="mt-3">
|
|
|
|
<el-table
|
|
|
|
<el-table border :data="select_table_computed" style="width: 100%" height="calc(50vh - 45px)"
|
|
|
|
border
|
|
|
|
show-overflow-tooltip ref="select_table_ref" row-class-name="cursor-pointer" highlight-current-row
|
|
|
|
:data="select_table_computed"
|
|
|
|
@row-click="itemRowClick">
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
height="calc(50vh - 45px)"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="38"></el-table-column>
|
|
|
|
<el-table-column type="selection" width="38"></el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column property="name" label="项目名称" width="120"></el-table-column>
|
|
|
|
property="title"
|
|
|
|
<el-table-column property="group" label="科室" width="100"></el-table-column>
|
|
|
|
label="项目名称"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
property="price"
|
|
|
|
|
|
|
|
label="价格"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
property="group"
|
|
|
|
|
|
|
|
label="科室"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column property="desc" label="备注"></el-table-column>
|
|
|
|
<el-table-column property="desc" label="备注"></el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column property="type" label="类型" width="80"></el-table-column>
|
|
|
|
property="id"
|
|
|
|
<el-table-column property="id" label="项目ID" width="120"></el-table-column>
|
|
|
|
label="项目ID"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="price_wrapper">
|
|
|
|
<div class="price_wrapper">
|
|
|
|
<div class="price_value_wrapper">合计价格:¥ 9999.99</div>
|
|
|
|
<div class="price_value_wrapper">
|
|
|
|
|
|
|
|
<span v-if="!!pay_info">合计价格:¥ {{ pay_info.true_price }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-button type="primary">预约登记</el-button>
|
|
|
|
<el-button @click="removeItemClick()" type="danger">移除项目</el-button>
|
|
|
|
|
|
|
|
<el-button @click="planDialogShowClick()" type="primary">预约登记</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-config-provider>
|
|
|
|
</el-config-provider>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
const { createApp, onMounted, ref, nextTick, computed } = Vue;
|
|
|
|
const { createApp, onMounted, ref, nextTick, computed } = Vue;
|
|
|
|
const { ElLoading, ElMessage, ElMessageBox } = ElementPlus;
|
|
|
|
const { ElLoading, ElMessage, ElMessageBox } = ElementPlus;
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<script src="./assets/mounting.js"></script>
|
|
|
|
<script src="./assets/mounting.js"></script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
const App = {
|
|
|
|
const App = {
|
|
|
|
setup() {
|
|
|
|
setup() {
|
|
|
|
const button_config = {
|
|
|
|
const button_config = {
|
|
|
|
@ -243,12 +306,19 @@
|
|
|
|
.replace("mm", minute)
|
|
|
|
.replace("mm", minute)
|
|
|
|
.replace("ss", second);
|
|
|
|
.replace("ss", second);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const plan_data_default = {
|
|
|
|
|
|
|
|
active: '',
|
|
|
|
|
|
|
|
date: formatDatetime(new Date(), "YYYY-MM-DD"),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const plan_data = ref(JSON.parse(JSON.stringify(plan_data_default)))
|
|
|
|
const input_data_default = {
|
|
|
|
const input_data_default = {
|
|
|
|
hospital: "1",
|
|
|
|
hospital: "1",
|
|
|
|
name: "",
|
|
|
|
name: "",
|
|
|
|
id_number: "",
|
|
|
|
id_number: "",
|
|
|
|
phone: "",
|
|
|
|
phone: "",
|
|
|
|
gender: "1",
|
|
|
|
gender: "1",
|
|
|
|
|
|
|
|
married: "2",
|
|
|
|
|
|
|
|
vip: "2",
|
|
|
|
birthday: formatDatetime(new Date(), "YYYY-MM-DD"),
|
|
|
|
birthday: formatDatetime(new Date(), "YYYY-MM-DD"),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const api_map = {
|
|
|
|
const api_map = {
|
|
|
|
@ -256,31 +326,116 @@
|
|
|
|
ComboGetList: "/api/Web/ComboGetList",
|
|
|
|
ComboGetList: "/api/Web/ComboGetList",
|
|
|
|
BuyInfo: "/api/Web/BuyInfo",
|
|
|
|
BuyInfo: "/api/Web/BuyInfo",
|
|
|
|
Create: "/api/Web/Create",
|
|
|
|
Create: "/api/Web/Create",
|
|
|
|
|
|
|
|
GetDayPlanList: "/api/H5/GetDayPlanList"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const $api = (key) => {
|
|
|
|
const $api = (key) => {
|
|
|
|
return api_map[key];
|
|
|
|
return api_map[key];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const item_list = ref([]);
|
|
|
|
const item_list = ref([]);
|
|
|
|
const item_list_computed = computed(() => {
|
|
|
|
const item_list_show = ref([]);
|
|
|
|
|
|
|
|
const saveSelectDeep = () => {
|
|
|
|
|
|
|
|
const select_str = select_data.value.items;
|
|
|
|
|
|
|
|
const deep_str = select_items_deep.value;
|
|
|
|
|
|
|
|
let ids = [];
|
|
|
|
|
|
|
|
let ids_array = [];
|
|
|
|
|
|
|
|
for (let i in item_list_show.value) {
|
|
|
|
|
|
|
|
ids_array.push(item_list_show.value[i].id)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const deep_str_split = deep_str.split(",")
|
|
|
|
|
|
|
|
const select_str_split = select_str.split(",")
|
|
|
|
|
|
|
|
for (let i in deep_str_split) {
|
|
|
|
|
|
|
|
if (!ids_array.includes(deep_str_split[i])) {
|
|
|
|
|
|
|
|
if (!ids.includes(deep_str_split[i])) {
|
|
|
|
|
|
|
|
!!deep_str_split[i] && ids.push(deep_str_split[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i in select_str_split) {
|
|
|
|
|
|
|
|
if (!ids.includes(select_str_split[i])) {
|
|
|
|
|
|
|
|
!!select_str_split[i] && ids.push(select_str_split[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
select_items_deep.value = ids.join(',');
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const search_input_deep = ref('search_input_deep')
|
|
|
|
|
|
|
|
const searchClick = () => {
|
|
|
|
|
|
|
|
if (search_input_deep.value === search_input.value) {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
search_input_deep.value = search_input.value
|
|
|
|
|
|
|
|
saveSelectDeep();
|
|
|
|
if (!!search_input.value) {
|
|
|
|
if (!!search_input.value) {
|
|
|
|
let il = [];
|
|
|
|
let search_str = search_input.value.toUpperCase();
|
|
|
|
|
|
|
|
let il = []
|
|
|
|
for (let i in item_list.value) {
|
|
|
|
for (let i in item_list.value) {
|
|
|
|
let item = item_list.value[i];
|
|
|
|
if (!!item_list.value[i].pinyin.includes(search_str)) {
|
|
|
|
if (!!item.pinyin.includes(search_input.value.toUpperCase())) {
|
|
|
|
il.push(item_list.value[i])
|
|
|
|
il.push(item);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!select_items_deep.value) {
|
|
|
|
item_list_show.value = il
|
|
|
|
select_items_deep.value = select_data.value.items;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return il;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (!select_items_deep.value) {
|
|
|
|
item_list_show.value = item_list.value
|
|
|
|
select_items_deep.value = select_data.value.items;
|
|
|
|
}
|
|
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
|
|
let select_deep = JSON.parse(JSON.stringify(select_items_deep.value)).split(',')
|
|
|
|
|
|
|
|
get_buy_info.value = false
|
|
|
|
|
|
|
|
for (let i in item_list_show.value) {
|
|
|
|
|
|
|
|
if (select_deep.includes(item_list_show.value[i].id)) {
|
|
|
|
|
|
|
|
item_table_ref.value.toggleRowSelection(item_list_show.value[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return item_list.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
const select_items = item_table_ref.value.getSelectionRows();
|
|
|
|
|
|
|
|
let ids = [];
|
|
|
|
|
|
|
|
select_items.forEach((item) => {
|
|
|
|
|
|
|
|
if (!ids.includes(item.id)) {
|
|
|
|
|
|
|
|
ids.push(item.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
select_data.value.items = ids.join(",");
|
|
|
|
|
|
|
|
get_buy_info.value = true
|
|
|
|
|
|
|
|
getBuyInfo('2');
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const getSelectItemIds = () => {
|
|
|
|
|
|
|
|
const select_str = select_data.value.items;
|
|
|
|
|
|
|
|
const deep_str = select_items_deep.value;
|
|
|
|
|
|
|
|
let ids = [];
|
|
|
|
|
|
|
|
let ids_array = [];
|
|
|
|
|
|
|
|
for (let i in item_list_show.value) {
|
|
|
|
|
|
|
|
ids_array.push(item_list_show.value[i].id)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const deep_str_split = deep_str.split(",")
|
|
|
|
|
|
|
|
const select_str_split = select_str.split(",")
|
|
|
|
|
|
|
|
for (let i in deep_str_split) {
|
|
|
|
|
|
|
|
if (!ids_array.includes(deep_str_split[i])) {
|
|
|
|
|
|
|
|
if (!ids.includes(deep_str_split[i])) {
|
|
|
|
|
|
|
|
!!deep_str_split[i] && ids.push(deep_str_split[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i in select_str_split) {
|
|
|
|
|
|
|
|
if (!ids.includes(select_str_split[i])) {
|
|
|
|
|
|
|
|
!!select_str_split[i] && ids.push(select_str_split[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ids
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const pay_info = ref(false)
|
|
|
|
|
|
|
|
const getBuyInfo = async (type) => {
|
|
|
|
|
|
|
|
let item_ids = getSelectItemIds();
|
|
|
|
|
|
|
|
let combo_id = select_data.value.combo;
|
|
|
|
|
|
|
|
if (item_ids.length === 0 && !combo_id && type !== '3') {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const response = await await axios.post($api('BuyInfo'), {
|
|
|
|
|
|
|
|
hospital: input_data.value.hospital,
|
|
|
|
|
|
|
|
combo_id: combo_id,
|
|
|
|
|
|
|
|
item_ids: item_ids,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
window.$response(response, () => {
|
|
|
|
|
|
|
|
pay_info.value = response.data.data;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
const getItemGetList = async () => {
|
|
|
|
const getItemGetList = async () => {
|
|
|
|
const response = await axios.post($api("ItemGetList"));
|
|
|
|
const response = await axios.post($api("ItemGetList"));
|
|
|
|
window.$response(response.data, () => {
|
|
|
|
window.$response(response.data, () => {
|
|
|
|
@ -296,6 +451,18 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
item_list.value = il;
|
|
|
|
item_list.value = il;
|
|
|
|
|
|
|
|
searchClick();
|
|
|
|
|
|
|
|
getComboGetList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const combo_list = ref([])
|
|
|
|
|
|
|
|
const getComboGetList = async () => {
|
|
|
|
|
|
|
|
const response = await axios.post($api("ComboGetList"), {
|
|
|
|
|
|
|
|
hospital: input_data.value.hospital,
|
|
|
|
|
|
|
|
sex: !!input_data.value.name ? input_data.value.gender : 0,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
window.$response(response.data, () => {
|
|
|
|
|
|
|
|
combo_list.value = response.data.data.list;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const input_data = ref(JSON.parse(JSON.stringify(input_data_default)));
|
|
|
|
const input_data = ref(JSON.parse(JSON.stringify(input_data_default)));
|
|
|
|
@ -362,8 +529,38 @@
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const item_table_ref = ref(false);
|
|
|
|
const item_table_ref = ref(false);
|
|
|
|
const select_table_computed = computed(() => {
|
|
|
|
const select_table_computed = computed(() => {
|
|
|
|
console.log("item_table_ref", item_table_ref.value);
|
|
|
|
let items = []
|
|
|
|
return [];
|
|
|
|
if (!!pay_info.value) {
|
|
|
|
|
|
|
|
if (!!pay_info.value.items_info) {
|
|
|
|
|
|
|
|
let group_items = pay_info.value.items_info.items
|
|
|
|
|
|
|
|
for (let i in group_items) {
|
|
|
|
|
|
|
|
for (let j in group_items[i].children) {
|
|
|
|
|
|
|
|
items.push({
|
|
|
|
|
|
|
|
...group_items[i].children[j],
|
|
|
|
|
|
|
|
group: group_items[i].keshi_name,
|
|
|
|
|
|
|
|
type: '自选'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!!pay_info.value) {
|
|
|
|
|
|
|
|
if (!!pay_info.value.combo_info) {
|
|
|
|
|
|
|
|
let combo_items = pay_info.value.combo_info.items
|
|
|
|
|
|
|
|
for (let i in combo_items) {
|
|
|
|
|
|
|
|
for (let j in combo_items[i].children) {
|
|
|
|
|
|
|
|
items.push({
|
|
|
|
|
|
|
|
...combo_items[i].children[j],
|
|
|
|
|
|
|
|
group: combo_items[i].keshi_name,
|
|
|
|
|
|
|
|
type: '套餐'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
...items,
|
|
|
|
|
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const tableRowClick = (e, index) => {
|
|
|
|
const tableRowClick = (e, index) => {
|
|
|
|
const select_rows = item_table_ref.value.getSelectionRows();
|
|
|
|
const select_rows = item_table_ref.value.getSelectionRows();
|
|
|
|
@ -375,39 +572,225 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
item_table_ref.value.toggleRowSelection(e, !is_exist);
|
|
|
|
item_table_ref.value.toggleRowSelection(e, !is_exist);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const itemSelectionChange = () => {
|
|
|
|
const itemRowClick = (e, index) => {
|
|
|
|
if (select_items_deep.value !== "") {
|
|
|
|
if (e.type === '自选') {
|
|
|
|
const sid = select_items_deep.value;
|
|
|
|
const select_rows = select_table_ref.value.getSelectionRows();
|
|
|
|
const sl = JSON.parse(JSON.stringify(item_list_computed.value));
|
|
|
|
let is_exist = false;
|
|
|
|
select_items_deep.value = "";
|
|
|
|
select_rows.forEach((item) => {
|
|
|
|
const select_items_array = sid.split(",");
|
|
|
|
if (item.id === e.id) {
|
|
|
|
for (let i in sl) {
|
|
|
|
is_exist = true;
|
|
|
|
if (select_items_array.includes(sl[i].id)) {
|
|
|
|
|
|
|
|
item_table_ref.value.toggleRowSelection(sl[i], true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
select_table_ref.value.toggleRowSelection(e, !is_exist);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const get_buy_info = ref(true)
|
|
|
|
|
|
|
|
const itemSelectionChange = () => {
|
|
|
|
const select_items = item_table_ref.value.getSelectionRows();
|
|
|
|
const select_items = item_table_ref.value.getSelectionRows();
|
|
|
|
let ids = [];
|
|
|
|
let ids = [];
|
|
|
|
select_items.forEach((item) => {
|
|
|
|
select_items.forEach((item) => {
|
|
|
|
if(!ids.includes(item.id)){
|
|
|
|
if (!ids.includes(item.id)) {
|
|
|
|
ids.push(item.id);
|
|
|
|
ids.push(item.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
select_data.value.items = ids.join(",");
|
|
|
|
select_data.value.items = ids.join(",");
|
|
|
|
console.log("select_data.value.items", select_data.value.items);
|
|
|
|
if (!!get_buy_info.value) {
|
|
|
|
|
|
|
|
getBuyInfo('1');
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const select_table_ref = ref(null)
|
|
|
|
|
|
|
|
const removeItemClick = () => {
|
|
|
|
|
|
|
|
const select_items = select_table_ref.value.getSelectionRows();
|
|
|
|
|
|
|
|
let has_combo_items = false
|
|
|
|
|
|
|
|
for (let i in select_items) {
|
|
|
|
|
|
|
|
if (select_items[i].type !== '自选') {
|
|
|
|
|
|
|
|
has_combo_items = true
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!!has_combo_items) {
|
|
|
|
|
|
|
|
return window.$message().error('套餐内项目不可移除')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const select_str = select_data.value.items;
|
|
|
|
|
|
|
|
const deep_str = select_items_deep.value;
|
|
|
|
|
|
|
|
const select_str_split = select_str.split(",")
|
|
|
|
|
|
|
|
const deep_str_split = deep_str.split(",")
|
|
|
|
|
|
|
|
let select_ids = []
|
|
|
|
|
|
|
|
for (let i in select_items) {
|
|
|
|
|
|
|
|
select_ids.push(select_items[i].id)
|
|
|
|
|
|
|
|
if (select_str_split.includes(select_items[i])) {
|
|
|
|
|
|
|
|
select_str_split.splice(select_str_split.indexOf(select_items[i]), 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (deep_str_split.includes(select_items[i])) {
|
|
|
|
|
|
|
|
deep_str_split.splice(deep_str_split.indexOf(select_items[i]), 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const select_rows = item_table_ref.value.getSelectionRows();
|
|
|
|
|
|
|
|
for (let i in select_rows) {
|
|
|
|
|
|
|
|
if (select_ids.includes(select_rows[i].id)) {
|
|
|
|
|
|
|
|
item_table_ref.value.toggleRowSelection(select_rows[i], false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getBuyInfo('3');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const combo_table_ref = ref(null)
|
|
|
|
|
|
|
|
const combo_dialog_show = ref(false)
|
|
|
|
|
|
|
|
const comboRowClick = (e, index) => {
|
|
|
|
|
|
|
|
if (select_data.value.combo === e.combo_id) {
|
|
|
|
|
|
|
|
select_data.value.combo = ''
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
select_data.value.combo = e.combo_id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getBuyInfo('4');
|
|
|
|
|
|
|
|
combo_dialog_show.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const comboRowClassName = ({ row }) => {
|
|
|
|
|
|
|
|
if (select_data.value.combo === row.combo_id) {
|
|
|
|
|
|
|
|
return 'combo_active cursor-pointer'
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return 'cursor-pointer'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const combo_show = computed(() => {
|
|
|
|
|
|
|
|
if (!select_data.value.combo) {
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
for (let i in combo_list.value) {
|
|
|
|
|
|
|
|
if (Number(select_data.value.combo) === Number(combo_list.value[i].combo_id)) {
|
|
|
|
|
|
|
|
return combo_list.value[i]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
select_data.value.combo = ''
|
|
|
|
|
|
|
|
getBuyInfo('5');
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const plan_dialog_show = ref(false)
|
|
|
|
|
|
|
|
const checkInputData = () => {
|
|
|
|
|
|
|
|
if (input_data.value.name === '') {
|
|
|
|
|
|
|
|
window.$message().error('请输入姓名')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (input_data.value.phone === '') {
|
|
|
|
|
|
|
|
window.$message().error('请输入手机号')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (input_data.value.id_number === '') {
|
|
|
|
|
|
|
|
window.$message().error('请输入身份证号')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const planDialogShowClick = () => {
|
|
|
|
|
|
|
|
const check = checkInputData()
|
|
|
|
|
|
|
|
if (!!check) {
|
|
|
|
|
|
|
|
plan_data.value.active = ''
|
|
|
|
|
|
|
|
getPlanList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const selectPlanClick = (plan) => {
|
|
|
|
|
|
|
|
if (plan_data.value.active === plan.id) {
|
|
|
|
|
|
|
|
plan_data.value.active = ''
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (plan.status === 2) {
|
|
|
|
|
|
|
|
return window.$message().error('号源不可用')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (plan.sex === Number(input_data.value.gender) && plan.sex !== 0) {
|
|
|
|
|
|
|
|
return window.$message().error('号源性别不符')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (plan.is_vip === 1 && input_data.value.vip !== '1') {
|
|
|
|
|
|
|
|
return window.$message().error('号源VIP不符')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
plan_data.value.active = plan.id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const plan_list = ref([])
|
|
|
|
|
|
|
|
const getPlanList = async () => {
|
|
|
|
|
|
|
|
const response = await axios.post($api("GetDayPlanList"), {
|
|
|
|
|
|
|
|
hospital: input_data.value.hospital,
|
|
|
|
|
|
|
|
openid: "",
|
|
|
|
|
|
|
|
person_id: "",
|
|
|
|
|
|
|
|
date: plan_data.value.date,
|
|
|
|
|
|
|
|
use_type: 1,
|
|
|
|
|
|
|
|
checkup_type_id: 1,
|
|
|
|
|
|
|
|
amount: "500"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
window.$response(response.data, () => {
|
|
|
|
|
|
|
|
plan_list.value = response.data.data.list;
|
|
|
|
|
|
|
|
plan_dialog_show.value = true
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const createOrderClick = async () => {
|
|
|
|
|
|
|
|
let item_ids = getSelectItemIds();
|
|
|
|
|
|
|
|
let combo_id = select_data.value.combo;
|
|
|
|
|
|
|
|
if (item_ids.length === 0 && !combo_id) {
|
|
|
|
|
|
|
|
return window.$message().error('预约内容为空')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!plan_data.value.active) {
|
|
|
|
|
|
|
|
return window.$message().error('请选择预约号源')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const check = checkInputData()
|
|
|
|
|
|
|
|
if (!check) {
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const response = await axios.post($api("Create"), {
|
|
|
|
|
|
|
|
type: 1,
|
|
|
|
|
|
|
|
hospital: input_data.value.hospital,
|
|
|
|
|
|
|
|
combo_id: combo_id,
|
|
|
|
|
|
|
|
item_ids: item_ids,
|
|
|
|
|
|
|
|
person: {
|
|
|
|
|
|
|
|
sex: input_data.value.gender,
|
|
|
|
|
|
|
|
birthday: input_data.value.birthday,
|
|
|
|
|
|
|
|
married: input_data.value.married,
|
|
|
|
|
|
|
|
name: input_data.value.name,
|
|
|
|
|
|
|
|
id_number: input_data.value.id_number,
|
|
|
|
|
|
|
|
phone: input_data.value.phone,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
group_id: '',
|
|
|
|
|
|
|
|
plan_id: plan_data.value.active
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
window.$response(response.data, () => {
|
|
|
|
|
|
|
|
window.$message().success('预约完成')
|
|
|
|
|
|
|
|
plan_dialog_show.value = false
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
// window.location.reload();
|
|
|
|
|
|
|
|
}, 2000);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
getQueryData();
|
|
|
|
getQueryData();
|
|
|
|
getItemGetList();
|
|
|
|
getItemGetList();
|
|
|
|
|
|
|
|
// getPlanList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
createOrderClick,
|
|
|
|
|
|
|
|
selectPlanClick,
|
|
|
|
|
|
|
|
getPlanList,
|
|
|
|
|
|
|
|
comboRowClassName,
|
|
|
|
|
|
|
|
comboRowClick,
|
|
|
|
|
|
|
|
itemRowClick,
|
|
|
|
|
|
|
|
removeItemClick,
|
|
|
|
itemSelectionChange,
|
|
|
|
itemSelectionChange,
|
|
|
|
|
|
|
|
searchClick,
|
|
|
|
idNumberUpdate,
|
|
|
|
idNumberUpdate,
|
|
|
|
tableRowClick,
|
|
|
|
tableRowClick,
|
|
|
|
item_list_computed,
|
|
|
|
planDialogShowClick,
|
|
|
|
|
|
|
|
plan_list,
|
|
|
|
|
|
|
|
plan_data,
|
|
|
|
|
|
|
|
plan_dialog_show,
|
|
|
|
|
|
|
|
combo_show,
|
|
|
|
|
|
|
|
combo_table_ref,
|
|
|
|
|
|
|
|
combo_dialog_show,
|
|
|
|
|
|
|
|
combo_list,
|
|
|
|
|
|
|
|
select_table_ref,
|
|
|
|
|
|
|
|
pay_info,
|
|
|
|
|
|
|
|
item_list_show,
|
|
|
|
select_table_computed,
|
|
|
|
select_table_computed,
|
|
|
|
item_table_ref,
|
|
|
|
item_table_ref,
|
|
|
|
item_list,
|
|
|
|
item_list,
|
|
|
|
@ -421,5 +804,6 @@
|
|
|
|
const app = createApp(App);
|
|
|
|
const app = createApp(App);
|
|
|
|
app.use(ElementPlus);
|
|
|
|
app.use(ElementPlus);
|
|
|
|
app.mount("#app");
|
|
|
|
app.mount("#app");
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</html>
|
|
|
|
</html>
|