|
@@ -98,7 +98,14 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
-
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ >创建订单</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
@@ -204,7 +211,127 @@
|
|
|
<inquiryOrderDetails ref="Details" />
|
|
|
</el-drawer>
|
|
|
|
|
|
+ <el-dialog :title="title" v-if="open" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal ="false">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label="会员信息" prop="userId">
|
|
|
+ <el-row>
|
|
|
+ <el-col >
|
|
|
+ <el-input placeholder="请输入会员手机号" style="width:240px;cursor:pointer" v-model="phone"/>
|
|
|
+ <el-button plain style="margin-left:10px;" @click="searchUser()">查询</el-button>
|
|
|
+ <el-button plain style="margin-left:10px;" icon="el-icon-plus" type="primary" @click="handleAddUser()">添加会员</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-table border style="margin-top:5px;" v-loading="userloading" :data="users">
|
|
|
+ <el-table-column label="ID" align="center" prop="userId" />
|
|
|
+ <el-table-column label="会员头像" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover placement="right" title="" trigger="hover">
|
|
|
+ <img slot="reference" :src="scope.row.avatar" width="50" >
|
|
|
+ <img :src="scope.row.avatar" style="max-width: 120px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="昵称" align="center" prop="nickName" />
|
|
|
+ <el-table-column label="手机号" align="center" prop="phone" />
|
|
|
+ <el-table-column label="状态" align="center" prop="status" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag prop="status" v-for="(item, index) in userStatusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="就诊人信息" prop="patientId">
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <el-button plain type="primary" icon="el-icon-plus" @click="handleAddUserPatient()">添加就诊人</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-radio-group v-model="form.patientId" style="width:100%">
|
|
|
+ <el-table border style="margin-top:5px;" v-loading="patientLoading" :data="patientList">
|
|
|
+ <el-table-column label="ID" align="center" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-radio :label="scope.row.patientId"></el-radio>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="患者姓名" align="center" prop="patientName" />
|
|
|
+ <el-table-column label="所属会员" align="center" width="150px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.nickName!=null"> {{scope.row.nickName}}-{{scope.row.phone}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="身份证号" align="center" prop="idCard" width="170px"/>
|
|
|
+ <el-table-column label="出生年月" align="center" prop="birthday" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="性别" align="center" prop="sex" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="sexOptions" :value="scope.row.sex"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="体重G" align="center" prop="weight" />
|
|
|
+ <el-table-column label="手机号" align="center" prop="mobile" />
|
|
|
+ <el-table-column label="状态" align="center" prop="status" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="userStatusOptions" :value="scope.row.status"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="与本人关系" align="center" prop="relation" />
|
|
|
+ <el-table-column label="肝功能是否异常" align="center" prop="liverUnusual" />
|
|
|
+ <el-table-column label="肾功能是否异常" align="center" prop="renalUnusual" />
|
|
|
+ <el-table-column label="过敏史" align="center" prop="historyAllergic" />
|
|
|
+ <el-table-column label="家族病史" align="center" prop="familyMedHistory" />
|
|
|
+ <el-table-column label="个人病史" align="center" prop="selfMedHistory" />
|
|
|
+ </el-table>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="销售备注" prop="companyUserRemark">
|
|
|
+ <el-input type="textarea" rows="2" v-model="form.companyUserRemark" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+<!-- <el-form-item label="订单类型" prop="inquiryType">
|
|
|
+ <el-select v-model="form.inquiryType" placeholder="请选择" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in inquiryTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item> -->
|
|
|
+
|
|
|
|
|
|
+ <el-form-item label="问诊子类型" prop="inquirySubType">
|
|
|
+ <el-select v-model="form.inquirySubType" placeholder="请选择" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in inquirySubTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="咨询的问题" prop="title">
|
|
|
+ <el-input type="textarea" rows="2" v-model="form.title" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="检测报告或者患处照片" prop="imgs">
|
|
|
+ <el-input type="textarea" rows="2" v-model="form.imgs" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :title="userPatient.title" v-if="userPatient.open" :visible.sync="userPatient.open" width="800px" append-to-body>
|
|
|
+ <add-patient ref="addPatient" @addUserPatient="addUserPatient" />
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :title="user.title" v-if="user.open" :visible.sync="user.open" width="500px" append-to-body>
|
|
|
+ <add-user @addUser="addUser" />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -212,10 +339,13 @@
|
|
|
import { listinquiryOrder,myExport,getinquiryOrder,myList, delinquiryOrder, addinquiryOrder, updateinquiryOrder, exportinquiryOrder } from "@/api/store/inquiryOrder";
|
|
|
import inquiryOrderDetails from '../components/inquiryOrderDetails.vue';
|
|
|
import { getTask } from "@/api/common";
|
|
|
-
|
|
|
+import { userList } from "@/api/store/user";
|
|
|
+import addUser from "../components/addUser";
|
|
|
+import addPatient from "../components/addPatient";
|
|
|
+import { listPatient } from "@/api/store/patient";
|
|
|
export default {
|
|
|
name: "ofast",
|
|
|
- components: { inquiryOrderDetails },
|
|
|
+ components: { inquiryOrderDetails,addUser,addPatient },
|
|
|
data() {
|
|
|
return {
|
|
|
show:{
|
|
@@ -228,6 +358,7 @@ export default {
|
|
|
startTime:null,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
+
|
|
|
// 导出遮罩层
|
|
|
exportLoading: false,
|
|
|
// 选中数组
|
|
@@ -277,11 +408,39 @@ export default {
|
|
|
sendName:null,
|
|
|
phone:null,
|
|
|
},
|
|
|
+ phone:null,
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ user:{
|
|
|
+ open:false,
|
|
|
+ title:"创建会员"
|
|
|
+ },
|
|
|
+ userPatient:{
|
|
|
+ open:false,
|
|
|
+ title:"创建病人"
|
|
|
+ },
|
|
|
+ patientList:[],
|
|
|
+ userloading :false,
|
|
|
+ users:[],
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
+ userId: [
|
|
|
+ { required: true, message: "会员信息不能为空" }
|
|
|
+ ],
|
|
|
+ addressId: [
|
|
|
+ { required: true, message: "收货信息不能为空" }
|
|
|
+ ],
|
|
|
+ packageId: [
|
|
|
+ { required: true, message: "套餐包不能为空" }
|
|
|
+ ],
|
|
|
+ payType: [
|
|
|
+ { required: true, message: "支付方式不能为空" }
|
|
|
+ ],
|
|
|
+ patientId: [
|
|
|
+ { required: true, message: "就诊人不能为空" }
|
|
|
+ ],
|
|
|
},
|
|
|
+ patientLoading:false,
|
|
|
inquiryStatusOptions:[],
|
|
|
inquiryTypeOptions:[],
|
|
|
inquiryPayOptions:[],
|
|
@@ -347,11 +506,67 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ handleAddUserPatient(){
|
|
|
+ if(this.form.userId==null){
|
|
|
+ this.msgError("请选择会员");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.userPatient.open=true;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.addPatient.init(this.form.userId);
|
|
|
+ }, 500);
|
|
|
+ },
|
|
|
+ addUserPatient(){
|
|
|
+ this.userPatient.open=false;
|
|
|
+ //获取地址
|
|
|
+ this.getPatentList(this.form.userId);
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加套餐订单";
|
|
|
+ },
|
|
|
+ addUser(phone){
|
|
|
+ this.user.open=false;
|
|
|
+ this.phone=phone;
|
|
|
+ this.searchUser();
|
|
|
+ },
|
|
|
+ getPatentList(userId){
|
|
|
+ var data={userId:userId}
|
|
|
+ this.patientLoading = true;
|
|
|
+ this.patientList=[];
|
|
|
+ listPatient(data).then(response => {
|
|
|
+ this.patientList = response.rows;
|
|
|
+ this.patientLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ searchUser(){
|
|
|
+ if(this.phone==null||this.phone==""){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var data={phone:this.phone}
|
|
|
+ this.userloading = true;
|
|
|
+ this.users=[];
|
|
|
+ this.address=[];
|
|
|
+ userList(data).then(response => {
|
|
|
+ this.users = response.rows;
|
|
|
+ this.userloading = false;
|
|
|
+ if(this.users!=null&&this.users.length==1){
|
|
|
+ this.form.userId=this.users[0].userId;
|
|
|
+
|
|
|
+ this.getPatentList(this.form.userId)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleAddUser(){
|
|
|
+ this.user.open=true;
|
|
|
+ },
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -435,19 +650,11 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- if (this.form.orderId != null) {
|
|
|
- updateinquiryOrder(this.form).then(response => {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- } else {
|
|
|
addinquiryOrder(this.form).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
},
|