|
|
@@ -2,56 +2,29 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="客户姓名" prop="userName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.userName"
|
|
|
- placeholder="请输入客户姓名"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <el-input v-model="queryParams.userName" 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-input v-model="queryParams.doctorName" placeholder="请输入约诊医生" clearable size="small"
|
|
|
+ @keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="商品名称" prop="packageName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.packageName"
|
|
|
- placeholder="请输入挂载商品名称"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <el-input v-model="queryParams.packageName" placeholder="请输入挂载商品名称" clearable size="small"
|
|
|
+ @keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="订单号" prop="orderCode">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.orderCode"
|
|
|
- placeholder="请输入订单号"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <el-input v-model="queryParams.orderCode" placeholder="请输入订单号" clearable size="small"
|
|
|
+ @keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="当前进度" prop="currentStep">
|
|
|
<el-select v-model="queryParams.currentStep" placeholder="当前进度" clearable size="small">
|
|
|
- <el-option
|
|
|
- v-for="dict in currentStepOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- />
|
|
|
+ <el-option v-for="dict in currentStepOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="完成时间" prop="completedTime">
|
|
|
- <el-date-picker clearable size="small"
|
|
|
- v-model="queryParams.completedTime"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
+ <el-date-picker clearable size="small" v-model="queryParams.completedTime" type="date" value-format="yyyy-MM-dd"
|
|
|
placeholder="选择完成时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
@@ -70,11 +43,8 @@
|
|
|
<el-table-column label="挂载商品" align="center" prop="packageName" />
|
|
|
<el-table-column label="当前进度" align="center" prop="currentStep">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag
|
|
|
- v-if="scope.row.currentStep != null"
|
|
|
- :type="stepColorMap[scope.row.currentStep] || 'info'"
|
|
|
- size="small"
|
|
|
- >
|
|
|
+ <el-tag v-if="scope.row.currentStep != null" :type="stepColorMap[scope.row.currentStep] || 'info'"
|
|
|
+ size="small">
|
|
|
{{ getStepLabel(scope.row.currentStep) }}
|
|
|
</el-tag>
|
|
|
<span v-else>—</span>
|
|
|
@@ -93,37 +63,23 @@
|
|
|
<el-table-column label="终止原因" align="center" prop="remark" />
|
|
|
<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-delete"
|
|
|
- @click="endProcess(scope.row)"
|
|
|
- v-hasPermi="['qw:collectionSchedule:stop']"
|
|
|
- :disabled="scope.row.status !== 1"
|
|
|
- :style="{ color: scope.row.status === 1 ? '#f56c6c' : '#999' }"
|
|
|
- >终止</el-button>
|
|
|
+ <el-button v-if="scope.row.currentStep == 5 && scope.row.status == 1" size="mini" type="text"
|
|
|
+ @click="confirmHandle(scope.row)">确认</el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="endProcess(scope.row)"
|
|
|
+ v-hasPermi="['qw:collectionSchedule:stop']" :disabled="scope.row.status !== 1"
|
|
|
+ :style="{ color: scope.row.status === 1 ? '#f56c6c' : '#999' }">终止</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"
|
|
|
- />
|
|
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList" />
|
|
|
|
|
|
<!-- 终止原因弹窗 -->
|
|
|
<el-dialog title="终止进度" :visible.sync="endProcessVisible" width="400px" @close="resetEndForm">
|
|
|
<el-form :model="endForm" ref="endFormRef" label-width="80px">
|
|
|
<el-form-item label="终止原因" prop="remark" :rules="[{ required: true, message: '请输入终止原因', trigger: 'blur' }]">
|
|
|
- <el-input
|
|
|
- v-model="endForm.remark"
|
|
|
- type="textarea"
|
|
|
- :rows="4"
|
|
|
- placeholder="请输入终止原因"
|
|
|
- />
|
|
|
+ <el-input v-model="endForm.remark" type="textarea" :rows="4" placeholder="请输入终止原因" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -136,7 +92,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listCollectionSchedule, addCollectionSchedule, updateCollectionSchedule, exportCollectionSchedule,getCollectionScheduleSteps,stop } from "@/api/qw/collectionSchedule";
|
|
|
+import { listCollectionSchedule, addCollectionSchedule, updateCollectionSchedule, exportCollectionSchedule, getCollectionScheduleSteps, stop, confirm } from "@/api/qw/collectionSchedule";
|
|
|
|
|
|
export default {
|
|
|
name: "CollectionSchedule",
|
|
|
@@ -148,7 +104,7 @@ export default {
|
|
|
3: 'danger', // 待药师审核 —— 红色
|
|
|
4: 'success', // 待建议 —— 绿色
|
|
|
5: 'info', // 待用户二次确认 —— 灰蓝
|
|
|
- 6: 'success' , // 完成 —— 蓝色
|
|
|
+ 6: 'success', // 完成 —— 蓝色
|
|
|
7: 'warning', //待支付
|
|
|
};
|
|
|
return {
|
|
|
@@ -223,6 +179,27 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ async confirmHandle(row) {
|
|
|
+ const param = row;
|
|
|
+ try {
|
|
|
+ await this.$confirm('是否确认删除该课程?', "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+
|
|
|
+ const res = await confirm(param);
|
|
|
+
|
|
|
+ if (res && res.code === 200) {
|
|
|
+ this.getList();// 刷新列表
|
|
|
+ this.$message.success('确认成功');
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
|
@@ -304,7 +281,7 @@ export default {
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
@@ -337,16 +314,16 @@ export default {
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有用户信息采集进度数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.exportLoading = true;
|
|
|
- return exportCollectionSchedule(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.exportLoading = true;
|
|
|
+ return exportCollectionSchedule(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ this.exportLoading = false;
|
|
|
+ }).catch(() => { });
|
|
|
},
|
|
|
getStepLabel(currentStep) {
|
|
|
if (currentStep == null) return '—';
|