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

新增“统计管理—医生/销售sop总览统计”功能

cgp преди 2 седмици
родител
ревизия
4c90f7ab1d

+ 88 - 0
src/api/statistics/sopStatistics.js

@@ -0,0 +1,88 @@
+import request from '@/utils/request'
+
+// 查询医生处理sop任务列表
+export function listDoctorTask(query) {
+  return request({
+    url: '/sop/statistics/doctorStatsOverviewList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询销售处理sop任务列表
+export function listCompanyTask(query) {
+  return request({
+    url: '/sop/statistics/companyStatsOverviewList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 医生查询解密后的用户电话
+export function doctorGetUserPhone(id) {
+  return request({
+    url: '/sop/statistics/doctorGetUserPhone/' + id,
+    method: 'get'
+  })
+}
+
+// 销售查询解密后的用户电话
+export function companyGetUserPhone(id) {
+  return request({
+    url: '/sop/statistics/statistics/companyGetUserPhone/' + id,
+    method: 'get'
+  })
+}
+
+
+
+// 查询病人详细
+export function getPatientByUserId(userId) {
+  return request({
+    url: '/sop/statistics/getPatient/' + userId,
+    method: 'get'
+  })
+}
+
+export function getUser(userId) {
+  return request({
+    url: '/sop/statistics/userInfo/' + userId,
+    method: 'get'
+  })
+}
+
+// 查询用户详细
+export function getUserAddr(userId) {
+  return request({
+    url: '/sop/statistics/getUserAddr/' + userId,
+    method: 'get'
+  })
+}
+
+export function getListUserCoupon(query) {
+  return request({
+    url: '/sop/statistics/userCoupon/getList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询病人列表
+export function listPatient(query) {
+  return request({
+    url: '/sop/statistics/patient/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function userOrderList(query) {
+  return request({
+    url: '/sop/statistics/storeOrder/userOrderList',
+    method: 'get',
+    params: query
+  })
+}
+

+ 315 - 0
src/views/his/statistics/companyUserTaskStatsOverview/companyUserTaskStatsOverview.vue

@@ -0,0 +1,315 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="医生" prop="doctorName">
+        <el-input
+          v-model="queryParams.doctorName"
+          placeholder="请输入医生姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入客户姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="升单类型" prop="type">
+        <el-select v-model="queryParams.type" placeholder="请选择升单类型" clearable size="small">
+          <el-option
+            v-for="dict in typeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="处理状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择处理状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <div class="tab-status-filter mb10">
+      <el-radio-group v-model="queryParams.status" @change="handleStatusChange" size="small">
+        <el-radio-button label="">全部</el-radio-button>
+        <el-radio-button label="0">待处理</el-radio-button>
+        <el-radio-button label="1">已完成</el-radio-button>
+      </el-radio-group>
+    </div>
+    <el-table border v-loading="loading" :data="companyUserTaskList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="医生" align="center" prop="doctorName"/>
+      <el-table-column label="客户" align="center" prop="name"/>
+      <el-table-column label="电话" align="center" prop="phone">
+        <template slot-scope="scope">
+          <div style="display: flex; align-items: center; gap: 8px;">
+            <!-- 显示解密后的电话,或原始加密电话,或占位符 -->
+            <span class="detail-value">
+        {{ scope.row._decryptedPhone !== undefined
+              ? (scope.row._decryptedPhone || '—')
+              : (scope.row.phone ? '******' : '—') }}
+      </span>
+
+            <!-- 放大镜图标按钮 -->
+            <el-button
+              v-if="scope.row.id"
+              type="text"
+              icon="el-icon-search"
+              size="mini"
+              :loading="scope.row._phoneLoading"
+              @click="fetchDecryptedPhoneForRow(scope.row)"
+              title="点击查看真实号码"
+              style="padding: 0; margin-left: 0;"
+            ></el-button>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="升单类型" align="center" prop="type">
+        <template slot-scope="scope">
+          <dict-tag :options="typeOptions" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="处理状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="派发时间" align="center" prop="createTime"/>
+      <el-table-column label="处理时间" align="center" prop="updateTime"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-user"
+            @click="handleMemberDetails(scope.row)"
+          >用户详情
+          </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-drawer
+      :title="show.title"
+      :visible.sync="show.open"
+      direction="rtl"
+      size="75%"
+      :before-close="handleCloseDrawer"
+      append-to-body
+    >
+      <overviewUserDetails ref="overviewUserDetails" @close="handleCloseDrawer" />
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+
+import { listCompanyTask,companyGetUserPhone } from "@/api/statistics/sopStatistics";
+import overviewUserDetails from '../overviewUserDetails/userDetails.vue';
+export default {
+  name: "TaskStatsOverview",
+  components: {
+    overviewUserDetails  // 注册组件
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 销售处理sop任务表格数据
+      companyUserTaskList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 处理状态字典
+      statusOptions: [],
+      // 会员详情抽屉
+      show: {
+        title: "会员详情",
+        open: false,
+      },
+      // 1:未升单未购 2:未升单已购单 3:升单未购 4:升单已购字典
+      typeOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderCode: null,
+        doctorId: null,
+        doctorName: null,
+        userId: null,
+        name: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sop_task_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("upgrade_order_type").then(response => {
+      this.typeOptions = response.data;
+    });
+  },
+  beforeDestroy() {
+    // 关闭抽屉
+    this.show.open = false;
+  },
+  methods: {
+    /** 查询销售处理sop任务列表 */
+    getList() {
+      this.loading = true;
+      listCompanyTask(this.queryParams).then(response => {
+        // 清理每行的临时解密字段(避免旧数据显示)
+        this.companyUserTaskList = (response.rows || []).map(row => {
+          const { _decryptedPhone, _phoneLoading, ...cleanRow } = row; // 移除临时字段
+          return { ...cleanRow };
+        });
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        orderCode: null,
+        doctorId: null,
+        userId: null,
+        status: null,
+        remark: 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.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+
+    /** 切换状态Tab */
+    handleStatusChange() {
+      this.queryParams.pageNum = 1; // 切换时重置页码
+      this.getList();
+    },
+    /** 获取并显示当前行解密后的电话 */
+    async fetchDecryptedPhoneForRow(row) {
+      if (!row.id || row._phoneLoading) return;
+
+      // 避免重复请求
+      this.$set(row, '_phoneLoading', true);
+
+      try {
+        const response = await companyGetUserPhone(row.id);
+        const phone = response.userPhone || '—';
+        this.$set(row, '_decryptedPhone', phone);
+      } catch (error) {
+        this.$message.error('获取电话失败');
+        this.$set(row, '_decryptedPhone', '获取失败');
+      } finally {
+        this.$set(row, '_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.overviewUserDetails) {
+          this.$refs.overviewUserDetails.getDetails(row.userId, row);
+        }
+      });
+    },
+
+    /** 关闭会员详情抽屉 */
+    handleCloseDrawer() {
+      this.show.open = false;
+      // 重置子组件状态
+      if (this.$refs.overviewUserDetails && this.$refs.overviewUserDetails.reset) {
+        this.$refs.overviewUserDetails.reset();
+      }
+    },
+  }
+};
+</script>
+
+<style scoped>
+.mb10 {
+  margin-bottom: 10px;
+}
+
+.tab-status-filter {
+  margin-bottom: 10px;
+}
+
+.detail-value {
+  font-weight: 500;
+  color: #606266;
+}
+</style>

+ 321 - 0
src/views/his/statistics/doctorUserTaskStatsOverview/doctorUserTaskStatsOverview.vue

@@ -0,0 +1,321 @@
+<template>
+  <div class="app-container">
+    <!-- 查询条件 -->
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="升单类型" prop="type">
+        <el-select v-model="queryParams.type" placeholder="请选择升单类型" clearable size="small">
+          <el-option
+            v-for="dict in typeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+<!--      <el-form-item label="销售" prop="companyUserName">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.companyUserName"-->
+<!--          placeholder="请输入销售姓名"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+      <el-form-item label="医生" prop="doctorName">
+        <el-input
+          v-model="queryParams.doctorName"
+          placeholder="请输入医生姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入客户姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="处理状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择处理状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <!-- 状态 Tab 快速筛选 -->
+    <div class="tab-status-filter mb10">
+      <el-radio-group v-model="queryParams.status" @change="handleStatusChange" size="small">
+        <el-radio-button label="">全部</el-radio-button>
+        <el-radio-button label="0">待处理</el-radio-button>
+        <el-radio-button label="1">已完成</el-radio-button>
+      </el-radio-group>
+    </div>
+
+    <!-- 数据表格 -->
+    <el-table border v-loading="loading" :data="doctorTaskList">
+<!--      <el-table-column label="销售" align="center" prop="companyUserName"/>-->
+      <el-table-column label="医生" align="center" prop="doctorName"/>
+      <el-table-column label="客户" align="center" prop="name"/>
+      <el-table-column label="电话" align="center" prop="phone">
+        <template slot-scope="scope">
+          <div style="display: flex; align-items: center; gap: 8px;">
+            <!-- 显示解密后的电话,或原始加密电话,或占位符 -->
+            <span class="detail-value">
+        {{ scope.row._decryptedPhone !== undefined
+              ? (scope.row._decryptedPhone || '—')
+              : (scope.row.phone ? '******' : '—') }}
+      </span>
+
+            <!-- 放大镜图标按钮 -->
+            <el-button
+              v-if="scope.row.id"
+              type="text"
+              icon="el-icon-search"
+              size="mini"
+              :loading="scope.row._phoneLoading"
+              @click="fetchDecryptedPhoneForRow(scope.row)"
+              title="点击查看真实号码"
+              style="padding: 0; margin-left: 0;"
+            ></el-button>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="客户头像" align="center" width="100px">
+        <template slot-scope="scope">
+          <div v-if="scope.row.avatar">
+            <el-popover placement="right" trigger="hover">
+              <img slot="reference" :src="scope.row.avatar" width="60" style="object-fit: cover; border-radius: 4px;" />
+              <img :src="scope.row.avatar" style="max-width: 200px; object-fit: cover;" />
+            </el-popover>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="升单类型" align="center" prop="type">
+        <template slot-scope="scope">
+          <dict-tag :options="typeOptions" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="处理状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <el-tag
+            v-if="scope.row.status === 0"
+            type="danger"
+            size="small"
+          >待处理</el-tag>
+          <el-tag
+            v-else-if="scope.row.status === 1"
+            type="success"
+            size="small"
+          >已完成</el-tag>
+          <span v-else>—</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="派发时间" align="center" prop="createTime"/>
+      <el-table-column label="处理时间" align="center" prop="updateTime"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-user"
+            @click="handleMemberDetails(scope.row)"
+          >用户详情
+          </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-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>
+
+<script>
+import { listDoctorTask,doctorGetUserPhone } from "@/api/statistics/sopStatistics";
+
+import userDetails from '../overviewUserDetails/userDetails.vue';
+export default {
+  name: "DoctorTask",
+  components: {
+    userDetails
+  },
+  data() {
+    return {
+      loading: true,
+      showSearch: true,
+      total: 0,
+      doctorTaskList: [],
+      title: "",
+      open: false,
+      statusOptions: [],
+      show: {
+        title: "会员详情",
+        open: false,
+      },
+      // 1:未升单未购 2:未升单已购单 3:升单未购 4:升单已购字典
+      typeOptions: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderCode: null,
+        companyUserName: null,
+        doctorName: null,
+        name: null,
+        status: null,
+        packageId: null,
+        standbyId: null
+      },
+      form: {},
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sop_task_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("upgrade_order_type").then(response => {
+      this.typeOptions = response.data;
+    });
+  },
+  beforeDestroy() {
+    // 关闭抽屉
+    this.show.open = false;
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      listDoctorTask(this.queryParams).then(response => {
+        // 清理每行的临时解密字段(避免旧数据显示)
+        this.doctorTaskList = (response.rows || []).map(row => {
+          const { _decryptedPhone, _phoneLoading, ...cleanRow } = row; // 移除临时字段
+          return { ...cleanRow };
+        });
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    reset() {
+      this.form = {};
+    },
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    resetQuery() {
+      this.$refs["queryForm"].resetFields();
+      this.handleQuery();
+    },
+    handleStatusChange() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 获取并显示当前行解密后的电话 */
+    async fetchDecryptedPhoneForRow(row) {
+      if (!row.id || row._phoneLoading) return;
+
+      // 避免重复请求
+      this.$set(row, '_phoneLoading', true);
+
+      try {
+        const response = await doctorGetUserPhone(row.id);
+        const phone = response.userPhone || '—';
+        this.$set(row, '_decryptedPhone', phone);
+      } catch (error) {
+        this.$message.error('获取电话失败');
+        this.$set(row, '_decryptedPhone', '获取失败');
+      } finally {
+        this.$set(row, '_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();
+      }
+    },
+  }
+};
+
+</script>
+
+<style scoped>
+.mb10 {
+  margin-bottom: 10px;
+}
+
+.tab-status-filter {
+  margin-bottom: 10px;
+}
+
+.detail-value {
+  font-weight: 500;
+  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>

+ 56 - 0
src/views/his/statistics/overviewUserDetails/userDetails.vue

@@ -0,0 +1,56 @@
+<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, rowData) {
+      this. activeName='basic';
+      setTimeout(() => {
+        this.$refs.userDetailsTemp.getDetails(userId,rowData);
+      }, 1);
+    },
+  }
+}
+</script>
+<style>
+
+</style>

+ 214 - 0
src/views/his/statistics/overviewUserDetails/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/statistics/sopStatistics";
+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(userId, rowData) {
+      this.item=null;
+      getUser(userId).then(response => {
+        this.item = response.data;
+        setTimeout(() => {
+          this.$refs.userDetails.getUserDetails(userId,rowData.companyUserId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.InquiryDetails.getInquiryDetails(userId,1);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userPatietDetail.getPatList(userId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userAddDetail.getAddList(userId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userIntegralDetail.getIntegralLogs(userId);
+        }, 1);
+      });
+
+      this.patient=null;
+      getPatientByUserId(userId).then(response => {
+        this.patient = response.data;
+      });
+
+      getUserAddr(userId).then(response => {
+        this.addr = response.data;
+      });
+
+      this.queryParams.userId=userId;
+      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>

+ 323 - 0
src/views/his/statistics/overviewUserDetails/userPatietDetails.vue

@@ -0,0 +1,323 @@
+<template>
+  <div >
+    <el-row :gutter="10" class="mb8" style="float: right; top: -30px;">
+      <el-col :span="1.5">
+      </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>
+    <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/statistics/sopStatistics";
+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>

+ 385 - 0
src/views/his/statistics/overviewUserDetails/userStorerDetails.vue

@@ -0,0 +1,385 @@
+<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/statistics/sopStatistics";
+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,
+        companyUserId: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,companyUserId){
+      this.queryParams.userId=id
+      this.queryParams.companyUserId=companyUserId
+      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>