Просмотр исходного кода

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_adminUI

xgb 1 день назад
Родитель
Сommit
1567865230

+ 68 - 8
src/api/his/complaint.js

@@ -1,19 +1,79 @@
 import request from '@/utils/request'
 
+// 查询投诉模板列表
+export function listTemplate(query) {
+  return request({
+    url: '/his/template/list',
+    method: 'get',
+    params: query
+  })
+}
 
-// 查询用户投诉列表
-export function listComplaint(data) {
+// 查询投诉模板列表
+export function treeListTemplate(query) {
   return request({
-    url: '/user/complaint/list',
+    url: '/his/template/treeList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询投诉模板详细
+export function getTemplate(id) {
+  return request({
+    url: '/his/template/' + id,
+    method: 'get'
+  })
+}
+
+// 新增投诉模板
+export function addTemplate(data) {
+  return request({
+    url: '/his/template',
     method: 'post',
     data: data
   })
 }
 
+// 修改投诉模板
+export function updateTemplate(data) {
+  return request({
+    url: '/his/template',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除投诉模板
+export function delTemplate(id) {
+  return request({
+    url: '/his/template/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出投诉模板
+export function exportTemplate(query) {
+  return request({
+    url: '/his/template/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询用户投诉列表
+export function listComplaint(query) {
+  return request({
+    url: '/his/complaint/list',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询用户投诉详细
 export function getComplaint(id) {
   return request({
-    url: '/user/complaint/' + id,
+    url: '/his/complaint/' + id,
     method: 'get'
   })
 }
@@ -21,7 +81,7 @@ export function getComplaint(id) {
 // 新增用户投诉
 export function addComplaint(data) {
   return request({
-    url: '/user/complaint',
+    url: '/his/complaint',
     method: 'post',
     data: data
   })
@@ -30,7 +90,7 @@ export function addComplaint(data) {
 // 修改用户投诉
 export function updateComplaint(data) {
   return request({
-    url: '/user/complaint',
+    url: '/his/complaint',
     method: 'put',
     data: data
   })
@@ -39,7 +99,7 @@ export function updateComplaint(data) {
 // 删除用户投诉
 export function delComplaint(id) {
   return request({
-    url: '/user/complaint/' + id,
+    url: '/his/complaint/' + id,
     method: 'delete'
   })
 }
@@ -47,7 +107,7 @@ export function delComplaint(id) {
 // 导出用户投诉
 export function exportComplaint(query) {
   return request({
-    url: '/user/complaint/export',
+    url: '/his/complaint/export',
     method: 'get',
     params: query
   })

+ 9 - 0
src/api/his/user.js

@@ -73,6 +73,15 @@ export function exportUser(query) {
   })
 }
 
+// 导出项目用户
+export function exportListProject(query) {
+  return request({
+    url: '/his/user/exportListProject',
+    method: 'get',
+    params: query
+  })
+}
+
 // 获取小黑屋用户列表
 export function darkRoomList(query) {
   return request({

+ 2 - 0
src/views/components/his/storeOrderDetails.vue

@@ -694,6 +694,8 @@ import {getCitys} from "@/api/store/city";
           this.express = response.data;
           if(this.express!=null&&this.express.Traces!=null){
               this.traces=this.express.Traces
+          } else {
+            this.traces = []
           }
       });
     },

+ 1 - 1
src/views/course/userWatchCourseStatistics/index.vue

@@ -97,7 +97,7 @@
       <el-table-column label="正确人数" align="center" prop="answerRightNum" />
       <el-table-column label="正确率" align="center" prop="answerRightRatePercent" />
       <el-table-column label="红包领取个数" align="center" prop="redPacketNum" />
-      <el-table-column label="红包领取额" align="center" prop="redPacketAmount" />
+      <el-table-column label="红包领取额" align="center" prop="redPacketAmount" />
     </el-table>
 
     <pagination

+ 1 - 0
src/views/course/userWatchCourseTotalStatistics/index.vue

@@ -102,6 +102,7 @@
       <el-table-column label="完播人数" align="center" prop="completeWatchNum" />
       <el-table-column label="完播率" align="center" prop="completeWatchRatePercent" />
       <el-table-column label="红包领取个数" align="center" prop="redPacketNum" />
+      <el-table-column label="红包领取总额" align="center" prop="redPacketAmount" />
     </el-table>
 
     <pagination

+ 130 - 557
src/views/his/complaint/index.vue

@@ -10,6 +10,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <!-- <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 label="联系方式" prop="phone">
         <el-input
           v-model="queryParams.phone"
@@ -19,6 +28,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <!-- 添加处理状态筛选 -->
       <el-form-item label="处理状态" prop="isHandle">
         <el-select
           v-model="queryParams.isHandle"
@@ -31,7 +41,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="投诉时间" prop="complaintTime">
-        <el-date-picker v-model="complaintTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
+            <el-date-picker v-model="complaintTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -40,6 +50,38 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:complaint:add']"
+        >新增</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:complaint:edit']"
+        >修改</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:complaint:remove']"
+        >删除</el-button>
+      </el-col> -->
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -57,53 +99,21 @@
     <el-table border v-loading="loading" :data="complaintList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="id" align="center" prop="id" />
-      <el-table-column label="用户" align="center" prop="nickName" />
-      <el-table-column label="投诉方式" align="center" prop="complaintType" >
-        <template slot-scope="scope">
-          <template v-for="item in complaintTypeOptions">
-            <el-tag v-if="item.dictValue === scope.row.complaintType" :key="item.dictValue">
-              {{ item.dictLabel }}
-            </el-tag>
-          </template>
-        </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="userName" />
+      <!-- <el-table-column label="联系方式" align="center" prop="phone" /> -->
       <el-table-column label="投诉时间" align="center" prop="createTime" />
-      <el-table-column
-        label="是否处理"
-        align="center"
-        prop="isHandlePlatform"
-        :render-header="renderHandleHeader"
-      >
-        <template slot-scope="scope">
-          <el-tag
-            :type="scope.row.isHandlePlatform == 1 ? 'success' : 'warning'"
-            disable-transitions
-          >
-            {{ formatHandleStatus(scope.row.isHandle) }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column 
-        label="店铺是否处理"
-        align="center"
-        prop="isHandlePlatform"
-        :render-header="renderHandleHeader"
-      >
+      <!-- 修改处理状态列显示 -->
+      <el-table-column label="是否处理" align="center" prop="isHandle">
         <template slot-scope="scope">
           <el-tag
-            :type="(scope.row.isHandleStore == 1)? 'success' : 'warning'"
+            :type="scope.row.isHandle == 1 ? 'success' : 'warning'"
             disable-transitions
           >
             {{ formatHandleStatus(scope.row.isHandle) }}
           </el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remarks" />
+       <el-table-column label="备注" align="center" prop="remarks" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -113,6 +123,13 @@
             v-hasPermi="['his:complaint:edit']"
             @click="handleUpdate(scope.row)"
           >投诉详情</el-button>
+          <!-- <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:complaint:edit']"
+          >修改</el-button> -->
           <el-button
             size="mini"
             type="text"
@@ -133,238 +150,60 @@
     />
 
     <!-- 修改用户投诉对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
-      <!-- 修改tab-click事件处理器名称 -->
-      <el-tabs v-model="activeTab" type="card" @tab-click="handleClick">
-        <!-- 投诉详情标签页 -->
-        <el-tab-pane label="投诉详情" name="complaint">
-          <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-            <el-form-item label="投诉内容" prop="name">
-              <el-input v-model="form.name" :disabled="true" />
-            </el-form-item>
-            <el-form-item label="详细内容" v-if="form.content && form.content!=''">
-              <el-input type="textarea" v-model="form.content" :disabled="true"/>
-            </el-form-item>
-            <el-form-item label="联系方式" prop="phone" v-if="form.phone && form.phone!=''">
-              <el-input v-model="form.phone" :disabled="true"/>
-            </el-form-item>
-            <el-form-item label="图片" v-if="form.images && form.images!=''">
-              <div v-for="(url, index) in imageUrls(form.images)" :key="index" class="image-container">
-                <el-image :src="url" :preview-src-list="[url]" style="width: 100px; height: 100px;"></el-image>
-              </div>
-            </el-form-item>
-            <!-- <el-form-item label="交易截图" v-if="form.tradeImage && form.tradeImage!=''">
-              <div v-for="(url, index) in imageUrls(form.tradeImage)" :key="index" class="image-container">
-                <el-image :src="url" :preview-src-list="[url]" style="width: 100px; height: 100px;"></el-image>
-              </div>
-            </el-form-item> -->
-            <el-form-item label="用户" prop="nickName">
-              <el-input v-model="form.nickName" :disabled="true"/>
-            </el-form-item>
-            <el-form-item label="是否处理" prop="isHandle">
-              <el-select v-model="form.isHandlePlatform" placeholder="请选择处理状态" :disabled="true">
-                <el-option label="未处理" :value="0"></el-option>
-                <el-option label="已处理" :value="1"></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="备注" prop="remarks" >
-              <el-input type="textarea" v-model="form.remarks" :maxlength="250" :disabled="true"/>
-            </el-form-item>
-          </el-form>
-        </el-tab-pane>
-
-        <!-- 回复详情标签页 -->
-        <el-tab-pane label="回复详情" name="replies">
-          <div class="reply-section">
-            <!-- 添加回复表单 -->
-            <el-card class="add-reply-card" shadow="never">
-              <div slot="header">
-                <span>添加回复</span>
-              </div>
-              <el-form :model="replyForm" ref="replyForm" label-width="80px">
-                <el-form-item label="回复内容" prop="content" :rules="[{ required: true, message: '请输入回复内容', trigger: 'blur' }]">
-                  <el-input
-                    type="textarea"
-                    v-model="replyForm.content"
-                    placeholder="请输入回复内容"
-                    :rows="3"
-                    maxlength="500"
-                    show-word-limit
-                  />
-                </el-form-item>
-                
-                <!-- 添加图片上传功能 -->
-                <el-form-item label="上传图片" prop="images">
-                  <!-- <div class="image-upload-container">
-                     <el-upload
-                      ref="imageUpload"
-                      :action="uploadUrl"
-                      :show-file-list="false"
-                      :file-list="replyImageList"
-                      :on-success="handleSuccess"
-                      :before-upload="beforeUpload"
-                      :limit="4"
-                      list-type="picture-card"
-                      accept="image/*"
-                    >
-                      <i class="el-icon-plus"></i>
-                      <div slot="tip" class="el-upload__tip">
-                        最多上传4张图片,单张图片不超过2MB
-                      </div>
-                    </el-upload>
-                  </div> -->
-                  <ImageUpload v-model="replyForm.images" type="image" :num="4" :width="150" :height="150"/>  
-
-                </el-form-item>
-
-                <el-form-item>
-                  <el-button type="primary" size="small" @click="submitReply" :loading="replyLoading">
-                    <i class="el-icon-s-promotion"></i> 发送回复
-                  </el-button>
-                </el-form-item>
-              </el-form>
-            </el-card>
-
-            <!-- 回复列表 -->
-            <el-card class="reply-list-card" shadow="never">
-              <div slot="header">
-                <span>回复记录 ({{ replyTotal }}条)</span>
-              </div>
-              
-              <div v-loading="replyLoading" class="reply-list">
-                <div v-if="replyList.length === 0" class="empty-replies">
-                  <el-empty description="暂无回复记录" :image-size="100"></el-empty>
-                </div>
-                
-                <div v-else>
-                  <div v-for="reply in replyList" :key="reply.id" class="reply-item">
-                    <div class="reply-header">
-                      <div class="reply-user">
-                        <el-avatar :size="32" :src="reply.avatar || '/default-avatar.png'">
-                          {{ reply.userName ? reply.userName.charAt(0) : 'U' }}
-                        </el-avatar>
-                        <!-- <span class="user-name">{{ reply.userName || '系统管理员' }}</span> -->
-                        <el-tag size="mini" :type="reply.sendType != 1 ? 'success' : 'info'">
-                          {{ reply.sendType === 1 ? '用户' : reply.sendType === 2 ? '系统平台':'店铺平台' }}
-                        </el-tag>
-                      </div>
-                      <div class="reply-time">
-                        {{ reply.createTime }}
-                      </div>
-                    </div>
-                    <div class="reply-content">
-                      {{ reply.content }}
-                    </div>
-                    
-                    <!-- 显示回复中的图片 -->
-                    <div class="reply-images" v-if="reply.images && reply.images !== ''">
-                      <div v-for="(url, index) in imageUrls(reply.images)" :key="index" class="reply-image-container">
-                        <el-image 
-                          :src="url" 
-                          :preview-src-list="imageUrls(reply.images)" 
-                          style="width: 80px; height: 80px;"
-                          fit="cover"
-                        ></el-image>
-                      </div>
-                    </div>
-
-                    <div class="reply-actions" v-if="reply.userType === 'admin'">
-                      <el-button type="text" size="mini" @click="editReply(reply)">
-                        <i class="el-icon-edit"></i> 编辑
-                      </el-button>
-                      <el-button type="text" size="mini" @click="deleteReply(reply)" style="color: #f56c6c;">
-                        <i class="el-icon-delete"></i> 删除
-                      </el-button>
-                    </div>
-                  </div>
-                </div>
-              </div>
-
-              <!-- 回复分页 -->
-              <div class="reply-pagination" v-if="replyTotal > 0">
-                <el-pagination
-                  @size-change="handleReplySizeChange"
-                  @current-change="handleReplyCurrentChange"
-                  :current-page="replyQueryParams.pageNum"
-                  :page-sizes="[5, 10, 20]"
-                  :page-size="replyQueryParams.pageSize"
-                  layout="total, sizes, prev, pager, next, jumper"
-                  :total="replyTotal"
-                  small
-                />
-              </div>
-            </el-card>
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!-- <el-form-item label="用户id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入用户id" />
+        </el-form-item> -->
+        <el-form-item label="投诉内容" prop="name">
+          <el-input v-model="form.name" :disabled="true" />
+        </el-form-item>
+        <el-form-item label="详细内容" v-if="form.content && form.content!=''">
+          <el-input type="textarea" v-model="form.content" :disabled="true"/>
+        </el-form-item>
+        <el-form-item label="联系方式" prop="phone" v-if="form.phone && form.phone!=''">
+          <el-input v-model="form.phone"  :disabled="true"/>
+        </el-form-item>
+        <el-form-item label="图片" v-if="form.urls && form.urls!=''">
+          <div v-for="(url, index) in imageUrls(form.urls)" :key="index" class="image-container">
+            <el-image :src="url" :preview-src-list="[url]" style="width: 100px; height: 100px;"></el-image>
           </div>
-        </el-tab-pane>
-      </el-tabs>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm" v-if="activeTab === 'complaint' && form.id==null">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-
-
-    <!-- 编辑回复对话框 -->
-    <el-dialog title="编辑回复" :visible.sync="editReplyVisible" width="500px" append-to-body>
-      <el-form :model="editReplyForm" ref="editReplyForm" label-width="80px">
-        <el-form-item label="回复内容" prop="content" :rules="[{ required: true, message: '请输入回复内容', trigger: 'blur' }]">
-          <el-input
-            type="textarea"
-            v-model="editReplyForm.content"
-            placeholder="请输入回复内容"
-            :rows="4"
-            maxlength="500"
-            show-word-limit
-          />
+        </el-form-item>
+        <el-form-item label="交易截图" v-if="form.tradeImage && form.tradeImage!=''">
+          <!-- <ImageUpload v-model="form.tradeImage" type="image" :num="10" :width="150" :height="150" /> -->
+          <div v-for="(url, index) in imageUrls(form.tradeImage)" :key="index" class="image-container">
+            <el-image :src="url" :preview-src-list="[url]" style="width: 100px; height: 100px;"></el-image>
+          </div>
+        </el-form-item>
+        <el-form-item label="被投诉人信息" prop="account" v-if="form.account && form.account!=''">
+          <el-input v-model="form.account"  :disabled="true"/>
+        </el-form-item>
+        <!-- 修改处理状态为下拉选择 -->
+        <el-form-item label="是否处理" prop="isHandle">
+          <el-select v-model="form.isHandle" placeholder="请选择处理状态">
+            <el-option label="未处理" :value="0"></el-option>
+            <el-option label="已处理" :value="1"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+              <el-input type="textarea" v-model="form.remarks" :maxlength="250" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="updateReply" :loading="replyLoading">确 定</el-button>
-        <el-button @click="editReplyVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { listComplaint, getComplaint, delComplaint, addComplaint, updateComplaint, exportComplaint,listMsg,addMsg } from "@/api/his/complaint";
-import ImageUpload from '@/components/ImageUpload/index';
+import { listComplaint, getComplaint, delComplaint, addComplaint, updateComplaint, exportComplaint } from "@/api/his/complaint";
+
 export default {
   name: "Complaint",
-  components: {
-     ImageUpload
-  },
   data() {
     return {
-      replyImageList: [],
-      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
-      complaintId:null,
-      activeName:"0",
-      typeOptions:[
-        {
-          dictValue:'0',
-          dictLabel:'默认'
-        },
-        {
-          dictValue:'1',
-          dictLabel:'店铺'
-        },
-        {
-          dictValue:'2',
-          dictLabel:'商品'
-        },
-      ],
-      complaintTypeOptions:[
-        {
-          dictValue:1,
-          dictLabel:'咨询'
-        },
-        {
-          dictValue:2,
-          dictLabel:'投诉/举报'
-        },
-      ],
       complaintTime:null,
       // 遮罩层
       loading: true,
@@ -386,14 +225,12 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
-      // 当前激活的标签页
-      activeTab: 'complaint',
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         userId: null,
-        userName: null,
+        userName: null, // 添加用户名查询参数
         templateId: null,
         content: null,
         phone: null,
@@ -411,92 +248,43 @@ export default {
         templateId: [
           { required: true, message: "投诉模板id不能为空", trigger: "blur" }
         ],
-      },
-      // 回复相关数据
-      replyList: [],
-      replyTotal: 0,
-      replyLoading: false,
-      replyQueryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        complaintId: null
-      },
-      replyForm: {
-        content: '',
-        complaintId: null
-      },
-      // 编辑回复
-      editReplyVisible: false,
-      editReplyForm: {
-        id: null,
-        content: ''
       }
     };
   },
   created() {
     this.getList();
   },
+
   methods: {
-    handleClick(tab) {
-      if (tab.name === 'replies') {
-        this.getReplyList();
-      }
-    },
-    renderHandleHeader(h, { column }) {
-      if (column.label === '是否处理') {
-        return h('div', [
-          '是否处理',
-          h('el-tooltip', {
-            props: {
-              content: '仅需要处理投诉/举报类',
-              placement: 'top'
-            }
-          }, [
-            h('i', {
-              class: 'el-icon-question',
-              style: 'margin-left: 5px; cursor: pointer; color: #909399;'
-            })
-          ])
-        ]);
-      } else if (column.label === '店铺是否处理') {
-        return h('div', [
-          '店铺是否处理',
-          h('el-tooltip', {
-            props: {
-              content: '仅需要处理咨询类',
-              placement: 'top'
-            }
-          }, [
-            h('i', {
-              class: 'el-icon-question',
-              style: 'margin-left: 5px; cursor: pointer; color: #909399;'
-            })
-          ])
-        ]);
-      }
-      return column.label;
-    },
     imageUrls(urls) {
       return String(urls).split(",");
     },
+    /**
+     * 格式化处理状态显示
+     * @param {Number} status - 处理状态 0:未处理 1:已处理
+     * @returns {String} - 格式化后的状态文本
+     */
     formatHandleStatus(status) {
       return status == 1 ? '已处理' : '未处理';
     },
+
     /** 查询用户投诉列表 */
     getList() {
       this.loading = true;
+      console.log(this.queryParams);
       listComplaint(this.queryParams).then(response => {
         this.complaintList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
     },
+    
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
-      this.resetReplyData();
     },
+    
     // 表单重置
     reset() {
       this.form = {
@@ -508,71 +296,54 @@ export default {
         urls: null,
         account: null,
         createTime: null,
-        isHandle: 0,
+        isHandle: 0, // 默认设置为未处理
         remarks:null
       };
       this.resetForm("form");
     },
-    // 重置回复数据
-    resetReplyData() {
-      this.activeTab = 'complaint';
-      this.replyList = [];
-      this.replyTotal = 0;
-      this.replyQueryParams = {
-        pageNum: 1,
-        pageSize: 10,
-        complaintId: null
-      };
-      this.replyForm = {
-        content: '',
-        complaintId: null,
-        images: '' // 重置图片字段
-      };
-      this.replyImageList = [];
-      this.editReplyImageList = [];
-    },
+    
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.getList();
     },
+    
     /** 重置按钮操作 */
     resetQuery() {
+      
       this.complaintTime = null;
       this.queryParams.complaintsTime=null;
       this.queryParams.complainteTime=null;
+      
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
+    
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
       this.open = true;
       this.title = "添加用户投诉";
     },
+    
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      this.resetReplyData();
-      // const id = row.id || this.ids
-      const complaintId = row.id || this.complaintId
-      this.complaintId = complaintId;
-      getComplaint(complaintId).then(response => {
+      const id = row.id || this.ids
+      getComplaint(id).then(response => {
         this.form = response.data;
-        this.replyForm.complaintId = complaintId;
-        this.replyQueryParams.complaintId = complaintId;
         this.open = true;
         this.title = "投诉详情";
-        // 加载回复列表
-        this.getReplyList();
       });
     },
+    
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
@@ -593,6 +364,7 @@ export default {
         }
       });
     },
+    
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
@@ -607,6 +379,7 @@ export default {
           this.msgSuccess("删除成功");
         }).catch(() => {});
     },
+    
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
@@ -623,216 +396,16 @@ export default {
         }).catch(() => {});
     },
     changeTime(){
-      if(this.complaintTime!=null){
-        this.queryParams.complaintsTime=this.complaintTime[0];
-        this.queryParams.complainteTime=this.complaintTime[1];
-      }else{
-        this.queryParams.complaintsTime=null;
-        this.queryParams.complainteTime=null;
-      }
-    },
-    // 获取回复列表
-    getReplyList() {
-      this.replyLoading = true;
-      // 模拟API调用 - 你需要替换为实际的API
-      setTimeout(() => {
-        // 模拟数据
-        listMsg(this.replyQueryParams).then(response => {
-              this.replyList = response.rows;
-              this.replyTotal = response.total;
-              this.replyLoading = false;
-            });
-      }, 500);
-    },
-    // 提交回复
-    submitReply() {
-      this.$refs.replyForm.validate(valid => {
-        if (valid) {
-          this.replyLoading = true;
-          // const imageUrls = this.replyImageList.map(file => file.url || file.response?.url).filter(url => url);
-          // this.replyForm.images = imageUrls.join(',');
-          // 模拟API调用
-          setTimeout(() => {
-            const newReply = {
-              content: this.replyForm.content,
-              complaintId:this.replyForm.complaintId,
-              images: this.replyForm.images, // 包含图片数据
-              sendType: 2
-            };
-            addMsg(newReply).then(response => {
-              this.replyLoading = false;
-              this.$message.success('回复发送成功');
-              this.replyForm.content = '';
-              this.replyForm.images = ''; // 重置图片字段
-              this.replyImageList = []; // 重置图片列表
-              this.getReplyList()
-            });
-            
-          }, 500);
+        if(this.complaintTime!=null){
+          this.queryParams.complaintsTime=this.complaintTime[0];
+          this.queryParams.complainteTime=this.complaintTime[1];
+        }else{
+          this.queryParams.complaintsTime=null;
+          this.queryParams.complainteTime=null;
         }
-      });
-    },
-    // 编辑回复
-    editReply(reply) {
-      this.editReplyForm = {
-        id: reply.id,
-        content: reply.content,
-        images: reply.images || '' // 包含图片数据
-      };
-      this.editReplyImageList = reply.images ? 
-        reply.images.split(',').map((url, index) => ({
-          uid: index,
-          name: `image-${index}`,
-          url: url
-        })) : [];
-      this.editReplyVisible = true;
-    },
-    
-    // 更新回复
-    updateReply() {
-      this.$refs.editReplyForm.validate(valid => {
-        if (valid) {
-          this.replyLoading = true;
-          // const imageUrls = this.editReplyImageList.map(file => file.url || file.response?.url).filter(url => url);
-          // this.editReplyForm.images = imageUrls.join(',');
-          
-          // 模拟API调用
-          setTimeout(() => {
-            const index = this.replyList.findIndex(item => item.id === this.editReplyForm.id);
-            if (index !== -1) {
-              this.replyList[index].content = this.editReplyForm.content;
-              this.replyList[index].images = this.editReplyForm.images; // 更新图片
-            }
-            this.editReplyVisible = false;
-            this.replyLoading = false;
-            this.$message.success('回复更新成功');
-          }, 500);
-        }
-      });
-    },
-    // 删除回复
-    deleteReply(reply) {
-      this.$confirm('确定要删除这条回复吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        const index = this.replyList.findIndex(item => item.id === reply.id);
-        if (index !== -1) {
-          this.replyList.splice(index, 1);
-          this.replyTotal--;
-          this.$message.success('删除成功');
-        }
-      });
-    },
-    // 回复分页大小改变
-    handleReplySizeChange(val) {
-      this.replyQueryParams.pageSize = val;
-      this.getReplyList();
-    },
-    // 回复当前页改变
-    handleReplyCurrentChange(val) {
-      this.replyQueryParams.pageNum = val;
-      this.getReplyList();
-    },
-    handleSuccess(res, file) {
-        if(res.code==200){
-          this.form.licenseImages=res.url;
-          this.$forceUpdate()
-        }
-        else{
-          this.msgError(res.msg);
-        }
-    },
-    
-    beforeUpload(file) {
-      const isLt1M = file.size / 1024 / 1024 < 1;
-      if (!isLt1M) {
-        this.$message.error('上传图片大小不能超过 1MB!');
-      }
-      return   isLt1M;
-    },
+        
+
+      },
   }
 };
-</script>
-
-<style scoped>
-.reply-section {
-  margin-top: 10px;
-}
-
-.add-reply-card {
-  margin-bottom: 20px;
-}
-
-.reply-list-card {
-  min-height: 400px;
-}
-
-.reply-list {
-  min-height: 300px;
-}
-
-.empty-replies {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 200px;
-}
-
-.reply-item {
-  border-bottom: 1px solid #f0f0f0;
-  padding: 15px 0;
-}
-
-.reply-item:last-child {
-  border-bottom: none;
-}
-
-.reply-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 10px;
-}
-
-.reply-user {
-  display: flex;
-  align-items: center;
-  gap: 8px;
-}
-
-.user-name {
-  font-weight: 500;
-  color: #303133;
-}
-
-.reply-time {
-  color: #909399;
-  font-size: 12px;
-}
-
-.reply-content {
-  background-color: #f8f9fa;
-  padding: 12px;
-  border-radius: 6px;
-  margin-bottom: 8px;
-  line-height: 1.5;
-  color: #606266;
-}
-
-.reply-actions {
-  text-align: right;
-}
-
-.reply-pagination {
-  margin-top: 20px;
-  text-align: center;
-}
-
-.image-container {
-  display: inline-block;
-  margin-right: 10px;
-  margin-bottom: 10px;
-}
-</style>
+</script>

+ 475 - 0
src/views/his/complaint/template.vue

@@ -0,0 +1,475 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      
+      <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>
+        <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-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:template:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:template:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table
+      height="500" 
+      border
+      v-loading="loading"
+      :data="templateList"
+      row-key="id"
+      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+    >
+      <el-table-column label="ID" align="left" prop="id" />
+      <el-table-column label="投诉分类" align="left" prop="name" />
+      <el-table-column label="排序" sortable align="center" prop="sort" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-if="isLeafNode(scope.row)"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleDesc(scope.row)"
+            v-hasPermi="['his:template:edit']"
+          >填写字段</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:template:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:template:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <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="上级" prop="parentId">
+          <treeselect 
+            v-model="form.parentId" 
+            :options="categoryOptions" 
+            :show-count="true" 
+            :normalizer="normalizer" 
+            :disable-branch-nodes="false"
+            :searchable="true"
+            :clearable="true"
+            placeholder="请选择上级分类" 
+          />
+        </el-form-item>
+        <el-form-item label="投诉分类" prop="name">
+          <el-input v-model="form.name" placeholder="请输入标签名称" />
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort" placeholder="请输入排序" />
+        </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>
+
+    <el-dialog title="选择填写字段" :visible.sync="descOpen" width="600px" append-to-body>
+      <!-- 添加表头说明 -->
+      <div class="field-header">
+        <div class="field-name-header">字段名称</div>
+        <div class="field-required-header">是否必填</div>
+      </div>
+      
+      <el-checkbox-group v-model="descForm">
+        <div v-for="(item, index) in fields" :key="index" class="field-item">
+          <div class="field-checkbox-wrapper">
+            <el-checkbox :label="item.label" name="desc" v-model="item.checked"></el-checkbox>
+          </div>
+          <div class="field-switch-wrapper">
+            <el-switch
+              v-model="item.isRequire"
+              active-value="1"
+              inactive-value="0"
+              :disabled="!item.checked"
+              class="require-switch"
+            ></el-switch>
+          </div>
+        </div>
+      </el-checkbox-group>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDescForm">确 定</el-button>
+        <el-button @click="descCancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { treeListTemplate, listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate, exportTemplate } from "@/api/his/complaint";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+export default {
+  name: "Template",
+  components: {
+    Treeselect
+  },
+  data() {
+    return {
+      descId: null,
+      fields: [
+        { label: "详细内容", checked: false, isRequire: 0, desc: "content",type:"文本框" },
+        { label: "联系方式", checked: false, isRequire: 0, desc: "phone",type:"文本框"},
+        { label: "上传图片", checked: false, isRequire: 0, desc: "urls",type:"图片" },
+        { label: "交易截图", checked: false, isRequire: 0, desc: "tradeImage",type:"图片" },
+        { label: "被投诉人账号信息", checked: false, isRequire: 0, desc: "account",type:"文本框" },
+      ],
+      descOpen: false,
+      categoryOptions: [],
+      loading: true,
+      exportLoading: false,
+      ids: [],
+      single: true,
+      multiple: true,
+      showSearch: true,
+      total: 0,
+      templateList: [],
+      title: "",
+      open: false,
+      queryParams: {
+        name: null,
+        isDel: null
+      },
+      form: {},
+      rules: {
+        parentId: [
+          { required: true, message: "上级编码不能为空", trigger: "blur" }
+        ],
+        sort: [
+          { required: true, message: "同级下排序不能为空", trigger: "blur" }
+        ],
+        name: [
+          { required: true, message: "投诉分类不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  computed: {
+    descForm: {
+      get() {
+        return this.fields.filter(item => item.checked).map(item => item.label);
+      },
+      set(value) {
+        this.fields.forEach(item => {
+          item.checked = value.includes(item.label);
+        });
+      },
+    },
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /**
+     * 判断是否为叶子节点(最后一级)
+     */
+    isLeafNode(row) {
+      return !row.children || row.children.length === 0;
+    },
+
+    submitDescForm() {
+      const result = this.fields
+        .filter(item => item.checked)
+        .map(item => ({
+          name: item.label,
+          isRequire: item.isRequire,
+          desc: item.desc,
+          type: item.type,
+        }));
+      console.log("提交的数据:", result);
+      const param = { id: this.descId, description: JSON.stringify(result) }
+      updateTemplate(param).then(response => {
+        this.msgSuccess("修改成功");
+        this.descOpen = false;
+        this.getList();
+      });
+    },
+    
+    /** 转换标签数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.name,
+        children: node.children
+      };
+    },
+    
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeListTemplate().then(response => {
+        const rootOption = { id: 0, name: '根目录', children: response.data || [] };
+        this.categoryOptions = [rootOption];
+      });
+    },
+    
+    /** 查询投诉模板列表 */
+    getList() {
+      this.loading = true;
+      treeListTemplate(this.queryParams).then(response => {
+        this.templateList = response.data;
+        this.total = response.data.length;
+        this.loading = false;
+      });
+    },
+    
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    
+    descCancel() {
+      this.descOpen = false;
+      this.descReset();
+    },
+    
+    descReset() {
+      this.descForm = [];
+    },
+    
+    reset() {
+      this.form = {
+        id: null,
+        parentId: 0,
+        sort: null,
+        name: null,
+        updateTime: null,
+        createTime: null,
+        isDel: null
+      };
+      this.resetForm("form");
+    },
+    
+    handleQuery() {
+      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
+    },
+    
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.getTreeselect();
+      this.open = true;
+      this.title = "添加投诉模板";
+    },
+    
+    handleDesc(row) {
+      if (!this.isLeafNode(row)) {
+        this.msgWarning("只有最后一级分类才能配置填写字段");
+        return;
+      }
+      
+      this.descOpen = true;
+      this.descId = row.id
+      if (row.description) {
+        const description = JSON.parse(row.description);
+        
+        this.fields.forEach(field => {
+          // 修复:添加 return 语句或者直接使用箭头函数的简写形式
+          const found = description.find(item => item.name === field.label);
+          
+          if (found) {
+            field.checked = true;
+            field.isRequire = found.isRequire;
+          } else {
+            field.checked = false;
+            field.isRequire = 0;
+          }
+        });
+      } else {
+        // 重置所有字段
+        this.fields.forEach(field => {
+          field.checked = false;
+          field.isRequire = 0;
+        });
+      }
+      
+      // 添加调试信息,查看最终的 fields 状态
+      console.log("最终 fields 状态:", JSON.stringify(this.fields));
+    },
+    
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.getTreeselect();
+      const id = row.id || this.ids
+      getTemplate(id).then(response => {
+        this.form = response.data;
+        if (this.form.parentId === null || this.form.parentId === undefined) {
+          this.form.parentId = 0;
+        }
+        this.open = true;
+        this.title = "修改投诉模板";
+      });
+    },
+    
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateTemplate(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTemplate(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 delTemplate(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有投诉模板数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.exportLoading = true;
+        return exportTemplate(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    }
+  }
+};
+</script>
+
+<style scoped>
+/* 表头样式 */
+.field-header {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 15px;
+  padding: 10px 0;
+  border-bottom: 1px solid #e4e7ed;
+  font-weight: bold;
+  color: #606266;
+}
+
+.field-name-header {
+  flex: 1;
+  text-align: left;
+  padding-left: 20px;
+}
+
+.field-required-header {
+  width: 120px;
+  text-align: center;
+}
+
+/* 字段项样式 */
+.field-item {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 15px;
+  padding: 8px 0;
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.field-checkbox-wrapper {
+  flex: 1;
+  display: flex;
+  align-items: center;
+}
+
+.field-checkbox-wrapper .el-checkbox {
+  margin-right: 20px;
+}
+
+.field-switch-wrapper {
+  width: 120px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.require-switch {
+  margin: 0;
+}
+
+/* 对话框内容区域样式调整 */
+.el-dialog__body {
+  padding: 20px;
+}
+</style>

+ 51 - 63
src/views/his/storeOrder/order1.vue

@@ -433,16 +433,38 @@
             >创建erp</el-button>
           </el-tooltip>
         </el-col>
-        <!-- <el-col :span="1.5">
-          <el-tooltip content="批量推送erp" placement="top">
-            <el-tag
-              plain
-              size="mini"
-              effect="plain"
-            v-hasPermi="['his:storeOrder:createErpOrder']"
-          >创建erp</el-tag>
-          </el-tooltip>
-        </el-col> -->
+        <el-col :span="1.5">
+          <el-button
+            disabled
+            plain
+            type="primary"
+            size="mini"
+        >应付金额: {{ payPriceTotal}}</el-button>
+      </el-col>
+        <el-col :span="1.5">
+          <el-button
+            disabled
+            plain
+            type="primary"
+            size="mini"
+        >实付金额: {{payMoneyTotal}}</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            disabled
+            plain
+            type="primary"
+            size="mini"
+        >物流代收金额: {{payRemainTotal }}</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            disabled
+            plain
+            type="primary"
+            size="mini"
+        >订单量/金额: {{ total }}/{{payPriceTotal }}</el-button>
+        </el-col>
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
       <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
@@ -523,6 +545,9 @@
           </template>
         </el-table-column>
       </el-table>
+      <div>
+        商品数量合计:{{ productInfo }}
+      </div>
       <pagination
         v-show="total>0"
         :total="total"
@@ -788,6 +813,10 @@ export default {
   },
   data() {
     return {
+      productInfo:"",
+      payPriceTotal:"0",
+      payMoneyTotal:"0",
+      payRemainTotal:"0",
       // 新增排序相关数据
       currentSort: {
         prop: null,
@@ -1178,6 +1207,18 @@ export default {
       listOrder(this.queryParams).then(response => {
         this.orderList = response.rows;
         this.total = response.total;
+        if(this.total>0){
+          this.payPriceTotal = response.payPriceTotal;
+          this.payMoneyTotal = response.payMoneyTotal;
+          this.payRemainTotal = response.payRemainTotal;
+          this.productInfo = response.productInfo;
+        } else {
+          this.payPriceTotal = "0"
+          this.payMoneyTotal = "0"
+          this.payRemainTotal = "0"
+          this.productInfo = response.productInfo;
+        }
+        
         this.loading = false;
         
         if(response.msg == 'jnmy'){
@@ -1798,59 +1839,6 @@ export default {
         this.storeOPtions = response.rows;
       });
     },
-    /** 查询订单列表 */
-    getList() {
-      this.loading = true;
-      if(this.payTypeArr.length>0){
-        this.queryParams.payType=this.payTypeArr.toString();
-      }
-      else{
-        this.queryParams.payType=null
-      }
-      if(this.scheduleIdArr.length>0){
-        this.queryParams.scheduleId=this.scheduleIdArr.toString();
-      }
-      else{
-        this.queryParams.scheduleId=null
-      }
-      if(this.buyTypeArr.length>0){
-        this.queryParams.orderBuyType=this.buyTypeArr.toString();
-      }
-      else{
-        this.queryParams.orderbuyType=null
-      }
-      if(this.channelArr.length>0){
-        this.queryParams.orderChannel=this.channelArr.toString();
-      }
-      else{
-        this.queryParams.orderChannel=null
-      }
-      if(this.qwSubjectArr.length>0){
-        this.queryParams.qwSubject=this.qwSubjectArr.toString();
-      }
-      else{
-        this.queryParams.qwSubject=null
-      }
-      if(this.companyIds && this.companyIds.length>1){
-        this.queryParams.companyIds = this.companyIds
-        this.queryParams.companyId = null;
-        this.queryParams.deptId = null;
-      } else {
-        this.queryParams.companyId = this.companyId
-        this.queryParams.companyIds = null;
-      }
-      listOrder(this.queryParams).then(response => {
-        this.orderList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-        if(response.msg == 'jnmy'){
-          this.SFDFopen = true;
-        } else{
-          this.SFDFopen = false;
-        }
-      });
-
-    },
     // 取消按钮
     cancel() {
       this.open = false;

+ 6 - 6
src/views/his/user/indexProject.vue

@@ -351,7 +351,7 @@
     <el-dialog title="更换会员归属" :visible.sync="changeCompanyUserOpen" width="500px" append-to-body>
       <el-form ref="changeCompanyUserForm" :model="changeCompanyUserForm" :rules="changeCompanyUserRules" label-width="100px">
         <el-form-item label="选择公司" prop="companyId">
-          <el-select v-model="changeCompanyUserForm.companyId" placeholder="请选择公司" style="width: 100%" @change="handleCompanyChange">
+          <el-select v-model="changeCompanyUserForm.companyId" placeholder="请选择公司" filterable style="width: 100%" @change="handleCompanyChange">
             <el-option
               v-for="item in companyOptions"
               :key="item.companyId"
@@ -361,7 +361,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="选择销售" prop="companyUserId">
-          <el-select v-model="changeCompanyUserForm.companyUserId" placeholder="请选择销售" style="width: 100%" @change="handleCompanyUserChange">
+          <el-select v-model="changeCompanyUserForm.companyUserId" placeholder="请选择销售" filterable style="width: 100%" @change="handleCompanyUserChange">
             <el-option
               v-for="item in companyUserOptions"
               :key="item.userId"
@@ -380,7 +380,7 @@
 </template>
 
 <script>
-import {listUserByProject, getUser, addUser, updateUser, exportUser, delUserCompanyUser} from "@/api/his/user";
+import {listUserByProject, getUser, addUser, updateUser, exportUser, delUserCompanyUser,exportListProject} from "@/api/his/user";
 import { getCompanyUserList, changeCompanyUser, getCompanyList } from '@/api/company/companyUser';
 import userDetailsByNew from '@/views/his/user/userDetails.vue'
 export default {
@@ -703,13 +703,13 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(function() {
-        return exportUser(queryParams);
+        return exportListProject(queryParams);
       }).then(response => {
         console.log(response)
         this.download(response.msg);
       }).catch(function() {});
-    }
-    ,handleShow(row){
+    },
+    handleShow(row){
       var that=this;
       that.show.open=true;
       setTimeout(() => {

+ 78 - 34
src/views/system/config/config.vue

@@ -333,7 +333,7 @@
               <el-input-number  v-model="form7.followRate" :min="0" :max="1000"    ></el-input-number>
             </el-tooltip>
           </el-form-item>
-          <el-form-item  label="是否需要根据物流信息更新订单完成状态" prop="followRate">
+          <el-form-item  label="是否需要根据物流信息更新订单完成状态" prop="isUpdateOrder">
             <el-switch
               v-model="form7.isUpdateOrder"
               active-color="#13ce66"
@@ -342,6 +342,24 @@
               :inactive-value=0>
             </el-switch>
           </el-form-item>
+          <el-form-item  label="是否开启就诊人身份验证" prop="isIdVerification">
+            <el-switch
+              v-model="form7.isIdVerification"
+              active-color="#13ce66"
+              inactive-color="#ff4949"
+              :active-value=1
+              :inactive-value=0>
+            </el-switch>
+          </el-form-item>
+          <el-form-item label="API_URL" v-if="form7.isIdVerification == 1" prop="API_URL">
+              <el-input   v-model="form7.API_URL"  label="请输入API_URL"></el-input>
+          </el-form-item>
+          <el-form-item label="HASHCODE" v-if="form7.isIdVerification == 1" prop="HASHCODE">
+              <el-input   v-model="form7.HASHCODE"  label="请输入HASHCODE"></el-input>
+          </el-form-item>
+          <el-form-item label="SECRET_KEY" v-if="form7.isIdVerification == 1" prop="SECRET_KEY">
+              <el-input   v-model="form7.SECRET_KEY"  label="请输入SECRET_KEY"></el-input>
+          </el-form-item>
          <div   class="footer">
             <el-button type="primary" @click="submitForm7">提  交</el-button>
           </div>
@@ -1317,6 +1335,14 @@
              </el-switch>
            </el-form-item>
 
+           <el-form-item label="是否开启IM" prop="isOpenIM">
+             <el-switch
+               v-model="form18.isOpenIM"
+               active-color="#13ce66"
+               inactive-color="#ff4949">
+             </el-switch>
+           </el-form-item>
+
            <div class="line"></div>
            <div style="float:right;margin-right:20px">
              <el-button type="primary" @click="submitForm18">提交</el-button>
@@ -1648,7 +1674,7 @@
     </el-tab-pane>
 
     <el-tab-pane label="健康指标配置" name="his.healthIndexConfig">
-      
+
         <el-form ref="form26" :model="form26" label-width="200px">
           <!-- 红色提示 严格按照对应格式参数填写,指标参数只能是数字和特殊符号,数值保留一位小数,特殊符号只能有 < > ≥ ≤ ~ 不能有空格 -->
           <el-card class="box-card">
@@ -1658,38 +1684,38 @@
           </el-card>
 
 
-          
+
           <!-- 血糖指标 -->
         <el-card class="box-card" style="margin-bottom: 20px;">
           <div slot="header" class="clearfix">
             <span>血糖指标 (mmol/L)</span>
           </div>
-          
+
           <el-form-item label="空腹血糖正常值">
             <el-input v-model="form26.bloodGlucose.fasting.normal" placeholder="例如: 3.9-6.1">
               <template slot="append">mmol/L</template>
             </el-input>
           </el-form-item>
-          
+
           <el-form-item label="餐后1小时血糖正常值">
             <el-input v-model="form26.bloodGlucose.post1Hour.normal" placeholder="例如: 6.7-9.0">
               <template slot="append">mmol/L</template>
             </el-input>
           </el-form-item>
-          
+
           <el-form-item label="餐后2小时血糖正常值">
             <el-input v-model="form26.bloodGlucose.post2Hour.normal" placeholder="例如: ≤7.8">
               <template slot="append">mmol/L</template>
             </el-input>
           </el-form-item>
-          
+
           <el-form-item label="血糖异常程度配置">
             <el-table :data="form26.bloodGlucose.severity" style="width: 100%;">
               <el-table-column prop="level" label="严重程度" width="120">
                 <template slot-scope="scope">
-                  <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                  <el-tag :type="scope.row.level === 'normal' ? 'success' :
                             scope.row.level === 'mild' ? 'warning' : 'danger'">
-                    {{ scope.row.level === 'normal' ? '正常' : 
+                    {{ scope.row.level === 'normal' ? '正常' :
                       scope.row.level === 'mild' ? '轻微' : '严重' }}
                   </el-tag>
                 </template>
@@ -1707,22 +1733,22 @@
             </el-table>
           </el-form-item>
         </el-card>
-        
+
         <!-- 血压指标 -->
         <el-card class="box-card" style="margin-bottom: 20px;">
           <div slot="header" class="clearfix">
             <span>血压指标 (mmHg)</span>
           </div>
-          
 
-          
+
+
           <el-form-item label="血压异常程度配置">
             <el-table :data="form26.bloodPressure.severity" style="width: 100%;">
               <el-table-column prop="level" label="严重程度" width="120">
                 <template slot-scope="scope">
-                  <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                  <el-tag :type="scope.row.level === 'normal' ? 'success' :
                             scope.row.level === 'mild' ? 'warning' : 'danger'">
-                    {{ scope.row.level === 'normal' ? '正常' : 
+                    {{ scope.row.level === 'normal' ? '正常' :
                       scope.row.level === 'mild' ? '轻微' : '严重' }}
                   </el-tag>
                 </template>
@@ -1757,9 +1783,9 @@
                 <el-table :data="form26.uricAcid.male" style="width: 100%;">
                   <el-table-column prop="level" label="风险等级" width="120">
                     <template slot-scope="scope">
-                      <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                      <el-tag :type="scope.row.level === 'normal' ? 'success' :
                                 scope.row.level === 'mild' ? 'warning' : 'danger'">
-                        {{ scope.row.level === 'normal' ? '正常' : 
+                        {{ scope.row.level === 'normal' ? '正常' :
                           scope.row.level === 'mild' ? '不良' : '高风险' }}
                       </el-tag>
                     </template>
@@ -1776,14 +1802,14 @@
                   </el-table-column>
                 </el-table>
               </el-tab-pane>
-              
+
               <el-tab-pane label="女性" name="female">
                 <el-table :data="form26.uricAcid.female" style="width: 100%;">
                   <el-table-column prop="level" label="风险等级" width="120">
                     <template slot-scope="scope">
-                      <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                      <el-tag :type="scope.row.level === 'normal' ? 'success' :
                                 scope.row.level === 'mild' ? 'warning' : 'danger'">
-                        {{ scope.row.level === 'normal' ? '正常' : 
+                        {{ scope.row.level === 'normal' ? '正常' :
                           scope.row.level === 'mild' ? '不良' : '高风险' }}
                       </el-tag>
                     </template>
@@ -1814,9 +1840,9 @@
             <el-table :data="form26.bmi.severity" style="width: 100%;">
               <el-table-column prop="level" label="严重程度" width="120">
                 <template slot-scope="scope">
-                  <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                  <el-tag :type="scope.row.level === 'normal' ? 'success' :
                             scope.row.level === 'mild' ? 'warning' : 'danger'">
-                    {{ scope.row.level === 'normal' ? '正常' : 
+                    {{ scope.row.level === 'normal' ? '正常' :
                       scope.row.level === 'mild' ? '偏瘦' : '偏胖' }}
                   </el-tag>
                 </template>
@@ -1848,9 +1874,9 @@
                 <el-table :data="form26.waist.male" style="width: 100%;">
                   <el-table-column prop="level" label="风险等级" width="120">
                     <template slot-scope="scope">
-                      <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                      <el-tag :type="scope.row.level === 'normal' ? 'success' :
                                 scope.row.level === 'mild' ? 'warning' : 'danger'">
-                        {{ scope.row.level === 'normal' ? '正常' : 
+                        {{ scope.row.level === 'normal' ? '正常' :
                           scope.row.level === 'mild' ? '偏小' : '偏大' }}
                       </el-tag>
                     </template>
@@ -1867,14 +1893,14 @@
                   </el-table-column>
                 </el-table>
               </el-tab-pane>
-              
+
               <el-tab-pane label="女性" name="female">
                 <el-table :data="form26.waist.female" style="width: 100%;">
                   <el-table-column prop="level" label="风险等级" width="120">
                     <template slot-scope="scope">
-                      <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                      <el-tag :type="scope.row.level === 'normal' ? 'success' :
                                 scope.row.level === 'mild' ? 'warning' : 'danger'">
-                        {{ scope.row.level === 'normal' ? '正常' : 
+                        {{ scope.row.level === 'normal' ? '正常' :
                           scope.row.level === 'mild' ? '偏小' : '偏大' }}
                       </el-tag>
                     </template>
@@ -1906,9 +1932,9 @@
                 <el-table :data="form26.hip.male" style="width: 100%;">
                   <el-table-column prop="level" label="风险等级" width="120">
                     <template slot-scope="scope">
-                      <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                      <el-tag :type="scope.row.level === 'normal' ? 'success' :
                                 scope.row.level === 'mild' ? 'warning' : 'danger'">
-                        {{ scope.row.level === 'normal' ? '正常' : 
+                        {{ scope.row.level === 'normal' ? '正常' :
                           scope.row.level === 'mild' ? '偏小' : '偏大' }}
                       </el-tag>
                     </template>
@@ -1925,14 +1951,14 @@
                   </el-table-column>
                 </el-table>
               </el-tab-pane>
-              
+
               <el-tab-pane label="女性" name="female">
                 <el-table :data="form26.hip.female" style="width: 100%;">
                   <el-table-column prop="level" label="风险等级" width="120">
                     <template slot-scope="scope">
-                      <el-tag :type="scope.row.level === 'normal' ? 'success' : 
+                      <el-tag :type="scope.row.level === 'normal' ? 'success' :
                                 scope.row.level === 'mild' ? 'warning' : 'danger'">
-                        {{ scope.row.level === 'normal' ? '正常' : 
+                        {{ scope.row.level === 'normal' ? '正常' :
                           scope.row.level === 'mild' ? '偏小' : '偏大' }}
                       </el-tag>
                     </template>
@@ -1952,7 +1978,7 @@
             </el-tabs>
           </el-form-item>
         </el-card>
-        
+
         <div class="footer">
           <el-button type="primary" @click="submitForm26">提交</el-button>
         </div>
@@ -2614,6 +2640,24 @@ export default {
      });
   },
   submitForm7(){
+      if (this.form7.isIdVerification  == null){
+        this.form7.isIdVerification = 0;
+      }
+    if(this.form7.isIdVerification != 1){
+      this.form7.API_URL = null;
+      this.form7.HASHCODE = null;
+      this.form7.SECRET_KEY = null;
+    } else{
+      // 校验这三个参数是否为空
+      if (
+        !this.form7.API_URL ||
+        !this.form7.HASHCODE ||
+        !this.form7.SECRET_KEY
+      ) {
+        this.msgError("API_URL、HASHCODE 和 SECRET_KEY 为必填项");
+        return; // 阻止提交
+      }
+    }
     var param={configId:this.configId,configValue:JSON.stringify(this.form7)}
     updateConfigByKey(param).then(response => {
        if (response.code === 200) {
@@ -2645,7 +2689,7 @@ export default {
       }
     });
   },
-  
+
   submitForm10(){
     var param={configId:this.configId,configValue:JSON.stringify(this.form10)}
     updateConfigByKey(param).then(response => {
@@ -2780,7 +2824,7 @@ export default {
         configKey:this.configKey,
         configValue: JSON.stringify(this.form26)
       };
-      
+
       updateConfigByKey(param).then(response => {
         if (response.code === 200) {
           this.msgSuccess("健康指标配置保存成功");