wjj 3 週間 前
コミット
72476ece6f

+ 10 - 0
src/api/his/doctorTask.js

@@ -59,3 +59,13 @@ export function getUserPhone(id) {
     method: 'get'
     method: 'get'
   })
   })
 }
 }
+
+
+// 查询医生处理sop任务列表
+export function taskList(query) {
+  return request({
+    url: '/his/doctorTask/taskList',
+    method: 'get',
+    params: query
+  })
+}

+ 11 - 0
src/api/memberSales.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+// 查询医生会员搭销列表
+export function listMemberSales(query) {
+  return request({
+    url: '/doctor/memberSales/list',
+    method: 'get',
+    params: query
+  })
+}
+

+ 30 - 6
src/router/index.js

@@ -108,6 +108,36 @@ export const constantRoutes = [
     ]
     ]
   },
   },
 
 
+   {
+    path: '/memberSales',
+    component: Layout,
+    redirect: 'noredirect',
+    children: [
+      {
+        path: 'Index',
+        component: (resolve) => require(['@/views/memberSales/index'], resolve),
+        name: '搭销会员',
+        meta: { title: '搭销会员', icon: 'form', noCache: true, affix: false }
+      }
+    ]
+  },
+
+   {
+    path: '/task',
+    component: Layout,
+    redirect: 'noredirect',
+    hidden: true,
+    children: [
+      {
+        path: 'unprocessed',
+        component: (resolve) => require(['@/views/task/unprocessed'], resolve),
+        name: '未处理',
+        meta: { title: '未处理', icon: 'form', noCache: true, affix: false }
+      }
+    ]
+  },
+
+
   {
   {
     path: '/order',
     path: '/order',
     component: Layout,
     component: Layout,
@@ -144,12 +174,6 @@ export const constantRoutes = [
         name: '拒方列表',
         name: '拒方列表',
         meta: { title: '拒方列表', icon: 'job', noCache: true, affix: false }
         meta: { title: '拒方列表', icon: 'job', noCache: true, affix: false }
       },
       },
-      {
-        path: 'doctorTask',
-        component: (resolve) => require(['@/views/his/doctorTask/index'], resolve),
-        name: '今日sop任务',
-        meta: { title: '今日sop任务', icon: 'job', noCache: true, affix: false }
-      },
     ]
     ]
   },
   },
 
 

+ 236 - 0
src/views/memberSales/index.vue

@@ -0,0 +1,236 @@
+<template>
+  <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-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>
+
+    <el-table border v-loading="loading" :data="memberSalesList" @selection-change="handleSelectionChange">
+      <el-table-column label="企微会员ID" align="center" prop="exId" />
+      <el-table-column label="客户名称" align="center" prop="userName" />
+      <el-table-column label="客户电话" align="center" prop="phone" />
+      <el-table-column label="待处理条数" align="center" prop="unprocessed" />
+      <el-table-column label="销售名称" align="center" prop="companyUserName" />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <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-edit"
+            @click="selectUnprocessed(scope.row)"
+          >未处理</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(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-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="企业外部联系人id" prop="exId">
+          <el-input v-model="form.exId" placeholder="请输入企业外部联系人id" />
+        </el-form-item>
+        <el-form-item label="会员id" prop="fsUserId">
+          <el-input v-model="form.fsUserId" placeholder="请输入会员id" />
+        </el-form-item>
+        <el-form-item label="销售id" prop="companyUserId">
+          <el-input v-model="form.companyUserId" placeholder="请输入销售id" />
+        </el-form-item>
+        <el-form-item label="销售公司" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入销售公司" />
+        </el-form-item>
+        <el-form-item label="医生id" prop="doctorId">
+          <el-input v-model="form.doctorId" placeholder="请输入医生id" />
+        </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 { listMemberSales,} from "@/api/memberSales";
+
+export default {
+  name: "MemberSales",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 医生会员搭销表格数据
+      memberSalesList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        exId: null,
+        fsUserId: null,
+        companyUserId: null,
+        companyId: null,
+        doctorId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    selectUnprocessed(row){
+      const query = {
+        id: row.id,
+        status: 0,
+        userName: row.userName,
+        phone: row.phone
+      }
+      // 使用 params 传递参数
+      this.$router.push({
+        path: `/task/unprocessed`,
+        query// 如果需要传递更多参数,可以使用 query
+      });
+    },
+    /** 查询医生会员搭销列表 */
+    getList() {
+      this.loading = true;
+      listMemberSales(this.queryParams).then(response => {
+        this.memberSalesList = response.data.list;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        exId: null,
+        fsUserId: null,
+        createTime: null,
+        updateTime: null,
+        companyUserId: null,
+        companyId: null,
+        doctorId: 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
+    },
+    
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateMemberSales(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addMemberSales(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除医生会员搭销编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMemberSales(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有医生会员搭销数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportMemberSales(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 201 - 0
src/views/task/unprocessed.vue

@@ -0,0 +1,201 @@
+<template>
+  <div class="app-container">
+    <div style="margin-bottom: 10px">
+      <el-card>
+        <span class="custom-style" style="display: block; margin-bottom: 10px">会员名称: {{userName}}</span>
+        <span class="custom-style" style="display: block; margin-bottom: 10px">会员电话:{{phone}}</span>
+      </el-card>
+    </div>
+    <el-table border v-loading="loading" :data="unprocessedList" @selection-change="handleSelectionChange">
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          
+        </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="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="企业外部联系人id" prop="exId">
+          <el-input v-model="form.exId" placeholder="请输入企业外部联系人id" />
+        </el-form-item>
+        <el-form-item label="会员id" prop="fsUserId">
+          <el-input v-model="form.fsUserId" placeholder="请输入会员id" />
+        </el-form-item>
+        <el-form-item label="销售id" prop="companyUserId">
+          <el-input v-model="form.companyUserId" placeholder="请输入销售id" />
+        </el-form-item>
+        <el-form-item label="销售公司" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入销售公司" />
+        </el-form-item>
+        <el-form-item label="医生id" prop="doctorId">
+          <el-input v-model="form.doctorId" placeholder="请输入医生id" />
+        </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 { taskList,} from "@/api/his/doctorTask";
+
+export default {
+  name: "unprocessed",
+  data() {
+    return {
+
+      userName: null,
+      phone: null,
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 医生会员搭销表格数据
+      unprocessedList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.queryParams.status= this.$route.query.status;
+    this.queryParams.doctorMemberSalesId = this.$route.query.id;
+    this.userName = this.$route.query.userName;
+    this.phone = this.$route.query.phone;
+    this.getList();
+  },
+  methods: {
+    /** 查询医生会员搭销列表 */
+    getList() {
+      this.loading = true;
+      taskList(this.queryParams).then(response => {
+        this.unprocessedList = response.data.list;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        exId: null,
+        fsUserId: null,
+        createTime: null,
+        updateTime: null,
+        companyUserId: null,
+        companyId: null,
+        doctorId: 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
+    },
+    
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateMemberSales(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addMemberSales(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除医生会员搭销编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMemberSales(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有医生会员搭销数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportMemberSales(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>