Преглед на файлове

益寿缘医生端-sop任务用户详情

cgp преди 11 часа
родител
ревизия
40a534be89

+ 51 - 0
src/api/userDetail.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 查询病人详细
+export function getPatientByUserId(userId) {
+  return request({
+    url: '/his/doctorTask/getPatient/' + userId,
+    method: 'get'
+  })
+}
+
+export function getUser(userId) {
+  return request({
+    url: '/his/doctorTask/userInfo/' + userId,
+    method: 'get'
+  })
+}
+
+// 查询用户详细
+export function getUserAddr(userId) {
+  return request({
+    url: '/his/doctorTask/getUserAddr/' + userId,
+    method: 'get'
+  })
+}
+
+export function getListUserCoupon(query) {
+  return request({
+    url: '/his/doctorTask/userCoupon/getList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询病人列表
+export function listPatient(query) {
+  return request({
+    url: '/his/doctorTask/patient/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function userOrderList(query) {
+  return request({
+    url: '/his/doctorTask/storeOrder/userOrderList',
+    method: 'get',
+    params: query
+  })
+}

+ 132 - 16
src/views/his/doctorTask/index.vue

@@ -91,9 +91,10 @@
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-view"
-            @click="handleView(scope.row)"
-          >详情</el-button>
+            icon="el-icon-user"
+            @click="handleMemberDetails(scope.row)"
+          >会员详情
+          </el-button>
           <el-button
             size="mini"
             type="text"
@@ -133,16 +134,16 @@
                   {{form.phone ? form.phone : '—' }}
                 </span>
               </div>
-<!--              <el-button-->
-<!--                v-if="form.id"-->
-<!--                type="text"-->
-<!--                icon="el-icon-search"-->
-<!--                size="mini"-->
-<!--                @click="fetchDecryptedPhone(form.id)"-->
-<!--                :loading="phoneLoading"-->
-<!--                title="点击查看真实号码"-->
-<!--                class="phone-decrypt-btn"-->
-<!--              ></el-button>-->
+              <!--              <el-button-->
+              <!--                v-if="form.id"-->
+              <!--                type="text"-->
+              <!--                icon="el-icon-search"-->
+              <!--                size="mini"-->
+              <!--                @click="fetchDecryptedPhone(form.id)"-->
+              <!--                :loading="phoneLoading"-->
+              <!--                title="点击查看真实号码"-->
+              <!--                class="phone-decrypt-btn"-->
+              <!--              ></el-button>-->
             </el-form-item>
           </el-col>
 
@@ -192,6 +193,73 @@
         <el-button @click="cancel">关 闭</el-button>
       </div>
     </el-dialog>
+
+
+    <!-- 销售处理sop任务详情对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form :model="form" label-width="100px" size="small">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="医生:">
+              <span class="detail-value">{{ form.doctorName || '—' }}</span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="客户:">
+              <span class="detail-value">{{ form.name || '—' }}</span>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="客户电话:">
+              <div style="display: flex; align-items: center; gap: 8px;">
+                <span class="detail-value">
+                  {{ decryptedPhone || (form.phone ? '******' : '—') }}
+                </span>
+                <el-button
+                  v-if="form.id"
+                  type="text"
+                  icon="el-icon-search"
+                  size="mini"
+                  @click="fetchDecryptedPhone(form.id)"
+                  :loading="phoneLoading"
+                  title="点击查看真实号码"
+                  style="padding: 0; margin-left: 0;"
+                ></el-button>
+              </div>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="处理状态:">
+              <dict-tag :options="statusOptions" :value="form.status"/>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="备注:">
+              <span class="detail-value">{{ form.remark || '—' }}</span>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancel">关 闭</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 会员详情抽屉 -->
+    <el-drawer
+      :title="show.title"
+      :visible.sync="show.open"
+      direction="rtl"
+      size="75%"
+      :before-close="handleCloseDrawer"
+      append-to-body
+    >
+      <userDetails ref="userDetails" @close="handleCloseDrawer" />
+    </el-drawer>
   </div>
 </template>
 
@@ -202,9 +270,12 @@ import {
   updateDoctorTask,
   getUserPhone
 } from "@/api/his/doctorTask";
-
+import userDetails from './userDetails.vue';
 export default {
   name: "DoctorTask",
+  components: {
+    userDetails
+  },
   data() {
     return {
       loading: true,
@@ -216,6 +287,10 @@ export default {
       statusOptions: [],
       decryptedPhone: '',
       phoneLoading: false,
+      show: {
+        title: "会员详情",
+        open: false,
+      },
 
       queryParams: {
         pageNum: 1,
@@ -227,7 +302,7 @@ export default {
         packageId: null,
         standbyId: null
       },
-      form: {}
+      form: {},
     };
   },
   created() {
@@ -236,6 +311,10 @@ export default {
       this.statusOptions = response.data;
     });
   },
+  beforeDestroy() {
+    // 关闭抽屉
+    this.show.open = false;
+  },
   methods: {
     getList() {
       this.loading = true;
@@ -310,7 +389,32 @@ export default {
       } finally {
         this.phoneLoading = false;
       }
-    }
+    },
+    /** 会员详情按钮操作 */
+    handleMemberDetails(row) {
+      if (!row.userId) {
+        this.$message.warning("该客户未绑定会员");
+        return;
+      }
+
+      this.show.title = `会员详情 - ${row.name || '未知客户'}`;
+      this.show.open = true;
+
+      // 确保DOM更新后再调用子组件方法
+      this.$nextTick(() => {
+        if (this.$refs.userDetails) {
+          this.$refs.userDetails.getDetails(row.userId, row);
+        }
+      });
+    },
+    /** 关闭会员详情抽屉 */
+    handleCloseDrawer() {
+      this.show.open = false;
+      // 重置子组件状态
+      if (this.$refs.userDetails && this.$refs.userDetails.reset) {
+        this.$refs.userDetails.reset();
+      }
+    },
   }
 };
 
@@ -330,4 +434,16 @@ export default {
   color: #606266;
 }
 
+/* 抽屉样式优化 */
+.el-drawer__header {
+  margin-bottom: 0;
+  padding: 15px 20px;
+  border-bottom: 1px solid #eee;
+}
+
+.el-drawer__body {
+  padding: 15px 20px;
+  overflow-y: auto;
+}
+
 </style>

+ 62 - 0
src/views/his/doctorTask/userDetails.vue

@@ -0,0 +1,62 @@
+<template>
+  <div>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+        会员详情
+      </div>
+    </div>
+    <template>
+      <el-tabs v-model="activeName"  :tab-position="tabPosition" style="height: 200px;margin: 40px">
+        <el-tab-pane label="基本信息" name="basic"><userDetailsTemp  ref="userDetailsTemp" /></el-tab-pane>
+      </el-tabs>
+    </template>
+  </div>
+</template>
+<script>
+import userDetailsTemp from './userDetailsTemp.vue';
+export default {
+  name: "userDetailsByNew",
+  props:["data"],
+  components: { userDetailsTemp},
+  data() {
+    return {
+      activeName: 'basic',
+      // 左侧遮罩层
+      leftLoading: true,
+      // 左侧查询参数
+      leftQueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        hasNextPage: false,
+        scs: 'order_number(desc),training_camp_id(desc)',
+        trainingCampName: null,
+        userId:null,
+      },
+      tabPosition: 'top',
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    getDetails(userId) {
+      this. activeName='basic';
+      setTimeout(() => {
+        this.$refs.userDetailsTemp.getDetails(userId);
+      }, 1);
+      setTimeout(() => {
+        this.$refs.userBehavior.getDetails(userId);
+      }, 1);
+      setTimeout(() => {
+        this.$refs.userCoursePeriod.getDetails(userId);
+      }, 1);
+    },
+  }
+}
+</script>
+<style>
+
+</style>

+ 214 - 0
src/views/his/doctorTask/userDetailsTemp.vue

@@ -0,0 +1,214 @@
+<template>
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div class="contentx" v-if="item!=null" >
+      <div class="desct">
+        基本信息
+      </div>
+      <el-descriptions title="" :column="3" border>
+
+        <el-descriptions-item label="会员id" >
+          <span v-if="item!=null">{{item.userId}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="用户昵称" >
+          <span v-if="item!=null">{{item.nickName}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="用户头像" >
+          <el-image v-if="item.avatar!=null"
+                    style="width: 50px;"
+                    :src="item.avatar">
+          </el-image>
+        </el-descriptions-item>
+        <el-descriptions-item label="手机号码" >
+          <span v-if="item!=null">{{item.phone}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="用户积分" >
+          <span v-if="item!=null">{{item.integral}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="状态" >
+                 <span v-if="item!=null">
+                       <dict-tag :options="userOptions" :value="item.status"/>
+                 </span>
+        </el-descriptions-item>
+
+        <el-descriptions-item label="上级昵称" >
+          <span v-if="item!=null">{{item.tuiName}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="上级手机号码" >
+          <span v-if="item!=null">{{item.tuiPhone}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="推广员关联时间" >
+          <span v-if="item!=null">{{item.tuiTime}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="下级人数" >
+          <span v-if="item!=null">{{item.tuiUserCount}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="最后一次登录ip" >
+          <span v-if="item!=null">{{item.lastIp}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="余额" >
+          <span v-if="item!=null">{{item.balance}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="创建时间" >
+          <span v-if="item!=null">{{item.createTime}}</span>
+        </el-descriptions-item>
+
+        <el-descriptions-item label="更新时间" >
+          <span v-if="item!=null">{{item.updateTime}}</span>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+
+
+    <div class="contentx" v-if="item!=null">
+      <div class="desct">
+              <span v-if="patientInfo">
+                {{ patientInfo }}
+              </span>
+        <span v-else>
+                患者信息
+              </span>
+      </div>
+      <userPatietDetails  ref="userPatietDetail" />
+
+    </div>
+
+    <div class="contentx" v-if="item!=null" >
+      <div class="desct">
+        用户药品订单
+      </div>
+      <userStorerDetails  ref="userDetails" />
+    </div>
+
+  </div>
+</template>
+
+<script>
+import {getPatientByUserId,getUser,getUserAddr,getListUserCoupon} from "@/api/userDetail";
+import userStorerDetails from "./userStorerDetails.vue";
+import userPatietDetails from "./userPatietDetails.vue";
+
+export default {
+  name: "storedet",
+  props:["data"],
+  components: {
+    userStorerDetails,
+    userPatietDetails,
+  },
+  data() {
+    return {
+      refreshKey: 0, // 每次点击刷新用
+      patientInfo: process.env.VUE_APP_PATIENT_INFO,
+      addr:[],
+      patient:[],
+      userOptions: [],
+      statusOptions: [],
+      sexOptions: [],
+      pOptions: [],
+      item:null,
+      total: 0,
+      loading: true,
+      // 积分购相关
+      integralPurchaseVisible: false,
+      currentUserId: null,
+      // 会员优惠券表格数据
+      userCouponList: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+        couponId: null,
+      },
+      actName:"10",
+      businessTypeOptions:[],
+      couponStatusOptions:[],
+    }
+  },
+  created() {
+    this.getDicts("sys_user_status").then(response => {
+      this.userOptions = response.data;
+    });
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_patient_status").then(response => {
+      this.pOptions = response.data;
+    });
+    this.getDicts("sys_patient_sex").then(response => {
+      this.sexOptions = response.data;
+    });
+    this.getDicts("sys_coupon_business_type").then(response => {
+      this.businessTypeOptions = response.data;
+    });
+
+    this.getDicts("sys_coupon_status").then(response => {
+      this.couponStatusOptions = response.data;
+    });
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      getListUserCoupon(this.queryParams).then(response => {
+        this.userCouponList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+
+    getDetails(orderId) {
+      this.item=null;
+      getUser(orderId).then(response => {
+        this.item = response.data;
+        setTimeout(() => {
+          this.$refs.userDetails.getUserDetails(orderId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.InquiryDetails.getInquiryDetails(orderId,1);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userPatietDetail.getPatList(orderId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userAddDetail.getAddList(orderId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userIntegralDetail.getIntegralLogs(orderId);
+        }, 1);
+      });
+
+      this.patient=null;
+      getPatientByUserId(orderId).then(response => {
+        this.patient = response.data;
+      });
+
+      getUserAddr(orderId).then(response => {
+        this.addr = response.data;
+      });
+
+      this.queryParams.userId=orderId;
+      this.getList();
+    },
+  }
+}
+</script>
+
+<style>
+.contentx{
+  height: 100%;
+  background-color: #fff;
+  padding: 0px 20px 20px;
+  margin: 20px;
+}
+.el-descriptions-item__label.is-bordered-label{
+  font-weight: normal;
+}
+.el-descriptions-item__content {
+  max-width: 150px;
+  min-width: 100px;
+}
+.desct{
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #524b4a;
+  font-weight: bold;
+}
+</style>

+ 349 - 0
src/views/his/doctorTask/userPatietDetails.vue

@@ -0,0 +1,349 @@
+<template>
+  <div >
+    <el-row :gutter="10" class="mb8" style="float: right; top: -30px;">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:patient:add']"
+        >新增</el-button>
+      </el-col>
+      </el-row>
+    <el-table v-loading="loading" border :data="patientList" @selection-change="handleSelectionChange" style="top: -30px;">
+      <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="pOptions" :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-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:patient:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:patient:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改病人对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="125px">
+        <el-form-item label="患者姓名" prop="patientName">
+          <el-input v-model="form.patientName" placeholder="请输入患者姓名" />
+        </el-form-item>
+        <el-form-item label="身份证号" prop="idCard">
+          <el-input v-model="form.idCard" placeholder="请输入身份证号" @blur="parseBirthdayFromIdCard(form.idCard)" />
+        </el-form-item>
+        <el-form-item label="出生年月" prop="birthday">
+          <el-date-picker clearable size="small"
+            v-model="form.birthday"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择出生年月">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="性别" prop="sex">
+          <el-select v-model="form.sex" placeholder="性别" clearable size="small">
+               <el-option
+                 v-for="dict in sexOptions"
+                 :key="dict.dictValue"
+                 :label="dict.dictLabel"
+                 :value="dict.dictValue"
+               />
+             </el-select>
+        </el-form-item>
+        <el-form-item label="体重KG" prop="weight">
+          <el-input v-model="form.weight" placeholder="请输入体重KG" />
+        </el-form-item>
+        <el-form-item label="手机号" prop="mobile">
+          <el-input v-model="form.mobile" placeholder="请输入手机号" />
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-select v-model="form.status" placeholder="状态" clearable size="small">
+             <el-option
+               v-for="dict in pOptions"
+               :key="dict.dictValue"
+               :label="dict.dictLabel"
+               :value="dict.dictValue"
+             />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否默认" prop="isDefault">
+          <el-radio-group v-model="form.isDefault">
+            <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="与本人关系" prop="relation">
+          <el-select  v-model="form.relation">
+              <el-option v-for="(option, index) in relationOptions" :key="index" :value="option" clearable></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="肝功能是否异常" prop="liverUnusual">
+          <el-radio-group v-model="form.liverUnusual">
+            <el-radio :label="item" v-for="item in isGoodOptions" >{{item}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="肾功能是否异常" prop="renalUnusual">
+          <el-radio-group v-model="form.renalUnusual" >
+            <el-radio :label="item" v-for="item in isGoodOptions" >{{item}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="过敏史" prop="historyAllergic">
+          <el-radio-group v-model="form.historyAllergic">
+            <el-radio :label="item" v-for="item in isOptions" >{{item}}</el-radio>
+          </el-radio-group>
+          <el-checkbox-group v-model="historyAllergic" size="medium" v-if="form.historyAllergic=='有'">
+           <el-checkbox   v-for="item in historyAllergicOptions" :key="item" :label="item"
+                      >{{item}}</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+        <el-form-item label="家族病史" prop="familyMedHistory">
+          <el-radio-group v-model="form.familyMedHistory">
+            <el-radio :label="item" v-for="item in isOptions" >{{item}}</el-radio>
+          </el-radio-group>
+          <el-checkbox-group v-model="familyMedHistory" size="medium" v-if="form.familyMedHistory=='有'">
+           <el-checkbox   v-for="item in historyOptions" :key="item" :label="item"
+                      >{{item}}</el-checkbox>
+           </el-checkbox-group>
+        </el-form-item>
+        <el-form-item label="个人病史" prop="selfMedHistory" >
+         <el-radio-group v-model="form.selfMedHistory">
+            <el-radio :label="item" v-for="item in isOptions" >{{item}}</el-radio>
+          </el-radio-group>
+          <el-checkbox-group v-model="selfMedHistory" size="medium" v-if="form.selfMedHistory=='有'">
+           <el-checkbox   v-for="item in historyOptions" :key="item" :label="item"
+                      >{{item}}</el-checkbox>
+           </el-checkbox-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { listPatient} from "@/api/userDetail";
+export default {
+  name: "Patient",
+  data() {
+    return {
+      addPatientInfo: process.env.VUE_APP_ADD_PATIENT,
+      orOptions:[],
+      show:{
+          title:"患者详情",
+          open:false,
+      },
+      // 遮罩层
+      userList:[],
+      userName: {name:null},
+      sexOptions: [],
+      pOptions: [],
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      historyAllergic:[],
+      familyMedHistory:[],
+      selfMedHistory:[],
+      historyAllergicOptions:['阿司匹林', '磺胺类', '头孢类', '青霉素类', '奶制品', '其他'],
+      historyOptions:['糖尿病', '哮喘', '恶性肿瘤', '高血压', '其他'],
+      isOptions:['有', '无'],
+      isGoodOptions:['正常', '异常'],
+      relationOptions: ['本人', '配偶', '父母', '子女', '朋友', '亲戚', '其他'],
+      // 总条数
+      total: 0,
+      // 病人表格数据
+      patientList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        patientName: null,
+        nickName:null,
+        userId: null,
+        idCard: null,
+        birthday: null,
+        sex: null,
+        weight: null,
+        mobile: null,
+        isDel: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        patientName: [
+          { required: true, message: "名称不能为空", trigger: "blur" }
+        ],
+        // idCard: [
+        //   { required: true, message: "身份证号不能为空", trigger: "blur" }
+        // ],
+        sex: [
+          { required: true, message: "性别不能为空", trigger: "blur" }
+        ],
+        birthday: [
+          { required: true, message: "生日不能为空", trigger: "blur" }
+        ],
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+        // mobile: [
+        //   { required: true, message: "手机号不能为空", trigger: "blur" },
+        // ],
+        relation: [
+          { required: true, message: '请选择与本人关系', trigger: 'change' }
+        ],
+        liverUnusual: [
+          { required: true, message: '请选择肝功能是否异常', trigger: 'change' }
+        ],
+        renalUnusual: [
+          { required: true, message: '请选择肾功能是否异常', trigger: 'change' }
+        ],
+        historyAllergic: [
+          { required: true, message: '请选择过敏史', trigger: 'change' }
+        ],
+        familyMedHistory: [
+          { required: true, message: '请选择家族病史', trigger: 'change' }
+        ],
+        selfMedHistory: [
+          { required: true, message: '请选择个人病史', trigger: 'change' }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getDicts("sys_company_or").then(response => {
+      this.orOptions = response.data;
+    });
+    this.getDicts("sys_patient_status").then(response => {
+        this.pOptions = response.data;
+    });
+    this.getDicts("sys_patient_sex").then(response => {
+            this.sexOptions = response.data;
+    });
+  },
+  methods: {
+
+    /** 查询病人列表 */
+    getList() {
+      this.loading = true;
+      listPatient(this.queryParams).then(response => {
+        this.patientList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getPatList(id){
+      this.loading = true;
+      this.queryParams.userId=id;
+      listPatient(this.queryParams).then(response => {
+        this.patientList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        patientId: null,
+        patientName: null,
+        userId: null,
+        idCard: null,
+        birthday: null,
+        nickName:null,
+        sex: null,
+        weight: null,
+        mobile: null,
+        isDel: null,
+        status: null,
+        createTime: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.patientId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+
+  }
+};
+</script>

+ 383 - 0
src/views/his/doctorTask/userStorerDetails.vue

@@ -0,0 +1,383 @@
+<template>
+  <div class="aacontainer">
+
+    <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
+      <el-tab-pane label="全部订单" name="10"></el-tab-pane>
+      <el-tab-pane v-for="(item,index) in orderOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
+    </el-tabs>
+    <el-table v-loading="loading" :data="orderList" >
+      <el-table-column label="药品订单号" align="center" prop="orderCode" width="180px"/>
+        <el-table-column label="所属公司" align="center" prop="companyName" />
+        <el-table-column label="员工" align="center" prop="companyUserName" />
+        <el-table-column label="就诊人" align="center" prop="patientName" />
+        <el-table-column label="应收金额" align="center" prop="payPrice" />
+        <el-table-column label="实收金额" align="center" prop="payMoney" />
+        <el-table-column label="支付方式" align="center" prop="payType" >
+          <template slot-scope="scope">
+                <dict-tag :options="PayOptions" :value="scope.row.payType"/>
+           </template>
+        </el-table-column>
+
+          <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
+          <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
+          <el-table-column label="订单状态" align="center" prop="status" >
+            <template slot-scope="scope">
+                  <dict-tag :options="orderOptions" :value="scope.row.status"/>
+             </template>
+          </el-table-column>
+       <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
+         <template slot-scope="scope">
+               <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
+          </template>
+       </el-table-column>
+      <el-table-column label="结算状态" align="center" prop="deliveryPayStatus" >
+        <template slot-scope="scope">
+              <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
+         </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+
+
+  </div>
+</template>
+
+<script>
+import { userOrderList} from "@/api/userDetail";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "userInquir",
+  props:["data"],
+  data() {
+    return {
+      actName:"10",
+      show:{
+              title:"订单详情",
+              open:false,
+            },
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/his/order/importData"
+      },
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 订单表格数据
+      orderList: [],
+      // 弹出层标题
+      title: "",
+      createTime:null,
+      payTime:null,
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        storeId: null,
+        orderCode: null,
+        userId: null,
+        userName: null,
+        userPhone: null,
+        userAddress: null,
+        cartId: null,
+        totalNum: null,
+        totalPrice: null,
+        payPrice: null,
+        payMoney: null,
+        isPay: null,
+        payTime: null,
+        payType: null,
+        status: null,
+        refundStatus: null,
+        refundImg: null,
+        refundExplain: null,
+        refundTime: null,
+        refundReason: null,
+        refundMoney: null,
+        deliveryCode: null,
+        deliveryName: null,
+        deliverySn: null,
+        isDel: null,
+        costPrice: null,
+        verifyCode: null,
+        shippingType: null,
+        isChannel: null,
+        isPrescribe: null,
+        prescribeId: null,
+        finishTime: null,
+        patientName: null,
+        doctorName: null,
+        sTime:null,
+        eTime:null,
+        paysTime:null,
+        payeTime:null,
+        deliveryTime: null,
+        tuiMoney: null,
+        tuiMoneyStatus: null,
+        tuiUserId: null,
+        orderCreateType: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      PayOptions:[],
+      orderOptions:[],
+      payStatusOptions:[],
+      refundOptions:[],
+      channelOptions:[],
+      orderTypeOptions:[],
+      deliveryStatusOptions:[],
+      deliveryPayStatusOptions:[],
+      deliveryTypeOptions:[],
+      tuiOptions:[],
+      orOptions:[],
+      storeOPtions:[],
+    };
+  },
+  created() {
+    this.getDicts("sys_inquiry_pay").then(response => {
+        this.PayOptions = response.data;
+      });
+    this.getDicts("store_order_type").then(response => {
+        this.orderTypeOptions = response.data;
+      });
+    this.getDicts("sys_order_status").then(response => {
+        this.orderOptions = response.data;
+      });
+    this.getDicts("sys_order_pay").then(response => {
+        this.payStatusOptions = response.data;
+      });
+    this.getDicts("sys_refund_status").then(response => {
+        this.refundOptions = response.data;
+      });
+    this.getDicts("sys_channel").then(response => {
+        this.channelOptions = response.data;
+      });
+    this.getDicts("sys_tui_money_status").then(response => {
+          this.tuiOptions = response.data;
+        });
+    this.getDicts("sys_company_or").then(response => {
+          this.orOptions = response.data;
+        });
+        this.getDicts("sys_store_delivery_pay_status").then(response => {
+             this.deliveryPayStatusOptions = response.data;
+           });
+       this.getDicts("sys_store_order_delivery_status").then(response => {
+             this.deliveryStatusOptions = response.data;
+           });
+        this.getDicts("sys_delivery_type").then(response => {
+              this.deliveryTypeOptions = response.data;
+            });
+
+  },
+  methods: {
+    getUserDetails(id){
+      this.queryParams.userId=id
+      this.getList();
+    },
+
+
+    /** 查询订单列表 */
+    getList() {
+      this.loading = true;
+      userOrderList(this.queryParams).then(response => {
+        this.orderList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        orderId: null,
+        storeId: null,
+        orderCode: null,
+        userId: null,
+        userName: null,
+        userPhone: null,
+        userAddress: null,
+        cartId: null,
+        totalNum: null,
+        totalPrice: null,
+        payPrice: null,
+        payMoney: null,
+        isPay: null,
+        payTime: null,
+        payType: null,
+        createTime: null,
+        updateTime: null,
+        status: null,
+        refundStatus: "0",
+        refundImg: null,
+        refundExplain: null,
+        refundTime: null,
+        refundReason: null,
+        refundMoney: null,
+        deliveryCode: null,
+        deliveryName: null,
+        deliverySn: null,
+        remark: null,
+        isDel: null,
+        costPrice: null,
+        verifyCode: null,
+        shippingType: null,
+        isChannel: null,
+        isPrescribe: null,
+        prescribeId: null,
+        finishTime: null,
+        deliveryTime: null,
+        tuiMoney: null,
+        tuiMoneyStatus: 0,
+        tuiUserId: null,
+        orderCreateType: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+   handleClickX(tab, event) {
+    if(tab.name=="10"){
+      this.queryParams.status=null;
+    }else{
+      this.queryParams.status=tab.name;
+    }
+     this.handleQuery();
+   },
+  changeTime(){
+        if(this.createTime!=null){
+          this.queryParams.sTime=this.createTime[0];
+          this.queryParams.eTime=this.createTime[1];
+        }else{
+          this.queryParams.sTime=null;
+          this.queryParams.eTime=null;
+        }
+
+      },
+  changePayTime(){
+      if(this.payTime!=null){
+        this.queryParams.sTime=this.payTime[0];
+        this.queryParams.eTime=this.payTime[1];
+      }else{
+        this.queryParams.paysTime=null;
+        this.queryParams.payeTime=null;
+      }
+
+    },
+
+
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+       this.createTime=null;
+      this.queryParams.sTime=null;
+      this.queryParams.eTime=null;
+       this.payTime=null;
+      this.queryParams.paysTime=null;
+      this.queryParams.payeTime=null;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.orderId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加订单";
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.orderId != null) {
+            updateOrder(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addOrder(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const orderIds = row.orderId || this.ids;
+      this.$confirm('是否确认删除订单编号为"' + orderIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delOrder(orderIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有订单数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportOrder(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>