|
|
@@ -8,6 +8,7 @@
|
|
|
v-show="showSearch"
|
|
|
label-width="80px"
|
|
|
>
|
|
|
+ <!-- 原有表单项保持不变 -->
|
|
|
<el-form-item label="患者姓名" prop="patientName">
|
|
|
<el-input
|
|
|
v-model="queryParams.patientName"
|
|
|
@@ -18,6 +19,33 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="开方状态" prop="dynamicConditions">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.dynamicConditions"
|
|
|
+ placeholder="请选择查询条件"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 160px"
|
|
|
+ >
|
|
|
+ <el-option label="暂不开方" :value="0" />
|
|
|
+ <el-option label="待开方" :value="1" />
|
|
|
+ <el-option label="开方未成交" :value="2" />
|
|
|
+ <el-option label="开方已成交" :value="3" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="销售名称" prop="companyUserName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.companyUserName"
|
|
|
+ placeholder="请输入销售名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 150px"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="医生" prop="doctorId">
|
|
|
<el-select
|
|
|
v-model="queryParams.doctorId"
|
|
|
@@ -34,6 +62,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="开始时间" prop="beginTime">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.beginTime"
|
|
|
@@ -44,6 +73,7 @@
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="结束时间" prop="endTime">
|
|
|
<el-date-picker
|
|
|
v-model="queryParams.endTime"
|
|
|
@@ -54,19 +84,28 @@
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
/>
|
|
|
</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-button type="success" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
- <!-- 数据表格 -->
|
|
|
+ <!-- 数据表格(保持不变) -->
|
|
|
<el-table v-loading="loading" :data="prescribeList" stripe border>
|
|
|
<el-table-column label="处方编号" align="center" prop="prescribeCode" width="180" show-overflow-tooltip />
|
|
|
<el-table-column label="医生姓名" align="center" prop="doctorName" width="100" />
|
|
|
+ <el-table-column label="销售姓名" align="center" prop="companyUserName" width="100" />
|
|
|
<el-table-column label="患者姓名" align="center" prop="patientName" width="100" />
|
|
|
<el-table-column label="患者年龄" align="center" prop="patientAge" width="80" />
|
|
|
<el-table-column label="患者电话" align="center" prop="patientTel" width="80" />
|
|
|
+ <el-table-column label="订单编号" align="center" prop="orderCode" width="160" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.orderCode || '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="处方状态" align="center" prop="doctorConfirm" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.doctorConfirm === 0" class="warning">待开方</span>
|
|
|
@@ -84,26 +123,10 @@
|
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="不开方理由" align="center" prop="notPrescribeReason" min-width="120" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.notPrescribeReason" class="primary">{{ scope.row.notPrescribeReason }}</span>
|
|
|
- <span v-else class="empty-text">-</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- width="100"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- >
|
|
|
+ <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-document"
|
|
|
- @click="handleViewDetail(scope.row)"
|
|
|
- >详情</el-button>
|
|
|
+ <el-button type="text" size="mini" icon="el-icon-document" @click="handleViewDetail(scope.row)">详情</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -117,7 +140,7 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
- <!-- 详情弹窗 -->
|
|
|
+ <!-- 详情弹窗(保持不变) -->
|
|
|
<doctor-not-prescribe-detail
|
|
|
:visible.sync="detailDialogVisible"
|
|
|
:prescribe-id="currentPrescribeId"
|
|
|
@@ -130,8 +153,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { doctorNotPrescribeList} from "@/api/his/scrmPrescribe";
|
|
|
-import { getDoctorList } from "@/api/his/doctor";
|
|
|
+import { doctorNotPrescribeList,exportDoctorNotPrescribe } from "@/api/his/scrmPrescribe";
|
|
|
+import { getDoctorList } from "@/api/his/doctor";
|
|
|
import DoctorNotPrescribeDetail from "./doctorNotPrescribeDetail.vue";
|
|
|
|
|
|
export default {
|
|
|
@@ -151,16 +174,11 @@ export default {
|
|
|
patientName: null,
|
|
|
doctorId: null,
|
|
|
beginTime: null,
|
|
|
- endTime: null
|
|
|
+ endTime: null,
|
|
|
+ dynamicConditions: null,
|
|
|
+ companyUserName: null
|
|
|
},
|
|
|
- prescribeTypeOptions: [
|
|
|
- { dictLabel: "西药", dictValue: "1" },
|
|
|
- { dictLabel: "中药", dictValue: "2" },
|
|
|
- { dictLabel: "中药+西药", dictValue: "3" }
|
|
|
- ],
|
|
|
doctorList: [],
|
|
|
-
|
|
|
- // 详情弹窗
|
|
|
detailDialogVisible: false,
|
|
|
currentPrescribeId: null,
|
|
|
currentDoctorId: null,
|
|
|
@@ -174,7 +192,6 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- /** 获取医生列表 */
|
|
|
getDoctorList() {
|
|
|
getDoctorList()
|
|
|
.then(response => {
|
|
|
@@ -184,8 +201,6 @@ export default {
|
|
|
this.$message.error('获取医生列表失败');
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- /** 获取列表数据 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
doctorNotPrescribeList(this.queryParams)
|
|
|
@@ -198,20 +213,18 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
-
|
|
|
resetQuery() {
|
|
|
this.$refs.queryForm.resetFields();
|
|
|
this.queryParams.beginTime = null;
|
|
|
this.queryParams.endTime = null;
|
|
|
+ this.queryParams.dynamicConditions = null;
|
|
|
+ this.queryParams.companyUserName = null;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
-
|
|
|
- /** 查看详情 */
|
|
|
handleViewDetail(row) {
|
|
|
this.currentPrescribeId = row.prescribeId;
|
|
|
this.currentDoctorId = row.doctorId;
|
|
|
@@ -219,6 +232,26 @@ export default {
|
|
|
this.currentCompanyCustomerId = row.companyCustomerId;
|
|
|
this.currentNotPrescribeReason = row.notPrescribeReason || '';
|
|
|
this.detailDialogVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ handleExport() {
|
|
|
+ this.$confirm('确认导出当前查询条件下的所有数据吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ const params = { ...this.queryParams };
|
|
|
+ delete params.pageNum;
|
|
|
+ delete params.pageSize;
|
|
|
+ this.exportLoading = true;
|
|
|
+ return exportDoctorNotPrescribe(params);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg, response.data);
|
|
|
+ this.exportLoading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.exportLoading = false;
|
|
|
+ this.$message.error('导出失败');
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|