yangll 4 лет назад
Родитель
Сommit
1f4bd0c745

+ 21 - 6
src/views/smscheck/TaskMain.vue

@@ -10,9 +10,16 @@
   <!-- 导入页 -->
   <task-import v-else-if="showType === 'import'"
             @goList="showList" :task="task"/>
-  <!-- 导入页 -->
+  <!-- 稽核列表页 -->
   <task-check-list v-else-if="showType === 'checkList'"
-              @goList="showList" :task="task"/>
+                   :task="taskInfo"
+                   @goList="showList"
+                   @goCheckDetail="showCheckDetail"/>
+  <!-- 稽核详情页 -->
+  <task-check-detail v-else-if="showType === 'checkDetail'"
+                     :checkInfo="checkInfo"
+                     @goList="showList"
+                     @goCheckList="showCheckList"/>
 </template>
 
 <script>
@@ -21,6 +28,7 @@
   import TaskAdd from './modules/TaskAdd'
   import TaskImport from './modules/TaskImport'
   import TaskCheckList from './modules/TaskCheckList'
+  import TaskCheckDetail from './modules/TaskCheckDetail'
 
   export default {
     name: 'TaskMain',
@@ -29,12 +37,14 @@
       TaskAdd,
       TaskImport,
       TaskCheckList,
+      TaskCheckDetail,
     },
     data () {
       return {
         description: '稽核任务管理主页面',
         showType: 'list',
-        task:{}
+        taskInfo: {},
+        checkInfo: {},
       }
     },
     methods: {
@@ -51,10 +61,15 @@
         this.showType = 'import'
         this.task = task;
       },
-      // 显示导入页面
-      showCheckList(task) {
+      // 显示稽核列表页面
+      showCheckList(taskInfo) {
         this.showType = 'checkList'
-        this.task = task;
+        this.taskInfo = taskInfo;
+      },
+      // 显示详情页面
+      showCheckDetail(checkInfo) {
+        this.showType = 'checkDetail'
+        this.checkInfo = checkInfo;
       },
     }
   }

+ 69 - 0
src/views/smscheck/modules/TaskCheckDetail.vue

@@ -0,0 +1,69 @@
+<template>
+
+  <div>
+    <a-page-header
+      style="background-color: #FFFFFF;"
+      title="稽核详情-客户详情"
+      sub-title=""
+      @back="showCheckList"
+    >
+      <a-descriptions :title="checkInfo.info.customerName" :column="3" :bordered="true" size="small">
+        <a-descriptions-item label="客户编号">{{checkInfo.info.customerNo}}</a-descriptions-item>
+        <a-descriptions-item label="服务号码">{{checkInfo.info.smsNumber}}</a-descriptions-item>
+        <a-descriptions-item label="用户编号">{{checkInfo.info.userNo}}</a-descriptions-item>
+        <a-descriptions-item label="入网时间">{{checkInfo.info.networkAccessTime}}</a-descriptions-item>
+        <a-descriptions-item label="用户状态" :span="2">{{checkInfo.info.userState}}</a-descriptions-item>
+        <a-descriptions-item label="员工姓名">{{checkInfo.info.staffName}}</a-descriptions-item>
+        <a-descriptions-item label="员工工号">{{checkInfo.info.staffNo}}</a-descriptions-item>
+      </a-descriptions>
+    </a-page-header>
+
+    <a-card :bordered="false" style="margin-top: -22px;">
+
+    </a-card>
+
+  </div>
+
+</template>
+
+<script>
+
+import { httpAction, getAction } from '@api/manage'
+import '@/assets/less/TableExpand.less'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+export default {
+  name: 'TaskCheckDetail',
+  mixins:[JeecgListMixin],
+  props: {
+    checkInfo: {
+      type: Object,
+      require: true
+    }
+  },
+  data () {
+    return {
+      description: '稽核详情页面',
+      url: {
+        list: "/smsCheck/customerInfo/list",
+      },
+      autoSearch: false,
+    }
+  },
+  methods: {
+    // 显示列表页面
+    showList() {
+      this.$emit('goList');
+    },
+    // 显示列表页面
+    showCheckList() {
+      let taskInfo = this.checkInfo.task;
+      this.$emit('goCheckList', taskInfo);
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 80 - 20
src/views/smscheck/modules/TaskCheckList.vue

@@ -3,11 +3,11 @@
   <div>
     <a-page-header
       style="background-color: #FFFFFF;"
-      title="稽核详情"
+      title="稽核详情-客户列表"
       sub-title=""
       @back="showList"
     >
-      <a-descriptions :title="task.name" size="small" :column="3">
+      <a-descriptions :title="task.name" size="small" :bordered="true" :column="3">
         <a-descriptions-item label="状态"><a-tag color="blue">{{task.stateText}}</a-tag></a-descriptions-item>
         <a-descriptions-item label="开始时间">{{task.startTime}}</a-descriptions-item>
         <a-descriptions-item label="结束时间">{{task.endTime}}</a-descriptions-item>
@@ -16,11 +16,13 @@
 <!--      <a-divider style="margin: 6px;"/>-->
     </a-page-header>
 
-    <a-card :bordered="false" style="margin-top: -22px;">
-      <a-tabs default-active-key="1" @change="">
-        <a-tab-pane key="1" :tab="tab1"></a-tab-pane>
-        <a-tab-pane key="2" :tab="tab2"></a-tab-pane>
-        <a-tab-pane key="3" :tab="tab3"></a-tab-pane>
+    <a-card :bordered="false" style="margin-top: -15px;">
+      <a-tabs default-active-key="1" @change="tabChange">
+        <a-tab-pane key="all" :tab="tabAll"></a-tab-pane>
+        <a-tab-pane key="undo" :tab="tabUndo"></a-tab-pane>
+        <a-tab-pane key="uncheck" :tab="tabUncheck"></a-tab-pane>
+        <a-tab-pane key="checked" :tab="tabChecked"></a-tab-pane>
+        <a-tab-pane key="passed" :tab="tabPassed"></a-tab-pane>
       </a-tabs>
       <!-- 查询区域 -->
       <div class="table-page-search-wrapper">
@@ -96,10 +98,10 @@
           </template>
 
           <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
+<!--          <a @click="handleEdit(record)">编辑</a>-->
 
-          <a-divider type="vertical" />
-          <a @click="handleDetail(record)">详情</a>
+<!--          <a-divider type="vertical" />-->
+          <a @click="showCheckDetail(record)">详情</a>
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -119,15 +121,13 @@
       <!-- table区域 end -->
     </a-card>
 
-
-
   </div>
 
 </template>
 
 <script>
 
-import { httpAction } from '@api/manage'
+import { httpAction, getAction } from '@api/manage'
 import '@/assets/less/TableExpand.less'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
@@ -143,9 +143,16 @@ export default {
   data () {
     return {
       description: '稽核详情页面',
-      tab1: '全部(' + this.task.customerCount + ')',
-      tab2: '待稽核(' + this.task.customerCount + ')',
-      tab3: '已稽核(' + this.task.checkCount + ')',
+      tabAll: '全部(0)',
+      tabUndo: '未完善(0)',
+      tabUncheck: '待稽核(0)',
+      tabChecked: '待整改(0)',
+      tabPassed: '稽核通过(0)',
+      count: 0,
+      undoCount: 0,
+      uncheckCount: 0,
+      checkedCount: 0,
+      passedCount: 0,
       columns: [
         {
           title: '#',
@@ -208,19 +215,59 @@ export default {
       ],
       url: {
         list: "/smsCheck/customerInfo/list",
+        count: "/smsCheck/customerInfo/count",
         delete: "/smsCheck/task/delete",
         edit: "/smsCheck/task/edit",
-        deleteBatch: "/smsCheck/task/deleteBatch",
-        exportXlsUrl: "/smsCheck/task/exportXls",
-        importExcelUrl: "smsCheck/task/importExcel",
 
       },
+      autoSearch: false,
+    }
+  },
+  created() {
+    this.queryParam.taskId = this.task.id;
+    this.loadData();
+    let url = this.url.count;
+    let params = {
+      id: this.task.id
     }
+    let that = this;
+    getAction(url, params).then(res => {
+      let { result } = res;
+      if (result) {
+        that.count = result.count;
+        that.undoCount = result.undoCount;
+        that.uncheckCount = result.uncheckCount;
+        that.checkedCount = result.checkedCount;
+        that.passedCount = result.passedCount;
+        that.tabAll= '全部(' + result.count + ')';
+        that.tabUndo= '未完善(' + result.undoCount + ')';
+        that.tabUncheck= '待稽核(' + result.uncheckCount + ')';
+        that.tabChecked= '待整改(' + result.checkedCount + ')';
+        that.tabPassed= '稽核通过(' + result.passedCount + ')';
+      }
+    }).finally(() => {
+
+    })
   },
   methods: {
     // 显示列表页面
     showList() {
-      this.$emit('goList', true);
+      this.$emit('goList');
+    },
+    // 显示列表页面
+    showCheckDetail(record) {
+      let taskInfo = Object.assign({}, this.task);
+      taskInfo.count = this.count;
+      taskInfo.undoCount = this.undoCount;
+      taskInfo.uncheckCount = this.uncheckCount;
+      taskInfo.checkedCount = this.checkedCount;
+      taskInfo.passedCount = this.passedCount;
+      let info = {
+        task: this.task,
+        info: record
+      };
+
+      this.$emit('goCheckDetail', info);
     },
     handleCancel () {
       this.visible = false;
@@ -229,6 +276,19 @@ export default {
       this.model = Object.assign({}, record);
       this.visible = true;
     },
+    tabChange (key) {
+      // 稽核状态(0:未处理;1:未完善;2:待稽核;3:待整改;4:已整改;5:稽核通过;)
+      if (key === 'undo') {
+        this.queryParam.checkState_MultiString = '0,1';
+      } else if (key === 'uncheck') {
+        this.queryParam.checkState_MultiString = '2,4';
+      } else if (key === 'checked') {
+        this.queryParam.checkState_MultiString = '3';
+      } else if (key === 'passed') {
+        this.queryParam.checkState_MultiString = '5';
+      }
+      this.loadData();
+    },
   }
 }
 </script>

+ 2 - 5
src/views/smscheck/modules/TaskDetail.vue

@@ -10,14 +10,11 @@
     cancelText="关闭">
 
     <a-spin :spinning="confirmLoading">
-
-      <a-descriptions :title="model.taskName">
+      <a-descriptions :title="model.taskName" :column="3" :bordered="true" size="small">
         <a-descriptions-item label="任务状态"><a-tag color="blue">{{model.taskState_dictText}}</a-tag></a-descriptions-item>
         <a-descriptions-item label="开始时间">{{model.taskStartTime}}</a-descriptions-item>
         <a-descriptions-item label="结束时间">{{model.taskEndTime}}</a-descriptions-item>
-        <a-descriptions-item label="描述">{{model.description}}</a-descriptions-item>
-      </a-descriptions>
-      <a-descriptions>
+        <a-descriptions-item label="描述" :span="3">{{model.description}}</a-descriptions-item>
         <a-descriptions-item label="客户总数">{{model.customerCount}}</a-descriptions-item>
         <a-descriptions-item label="待稽核数">{{model.checkCount}}</a-descriptions-item>
       </a-descriptions>

+ 1 - 1
src/views/smscheck/modules/TaskImport.vue

@@ -159,7 +159,7 @@
     methods: {
       // 显示列表页面
       showList() {
-        this.$emit('goList', true);
+        this.$emit('goList');
       },
       /**
        * 上传事件回调

+ 17 - 20
src/views/smscheck/modules/TaskList.vue

@@ -208,7 +208,7 @@
           {
             title:'待稽核数',
             align:"center",
-            dataIndex: 'checkCount'
+            dataIndex: 'uncheckCount'
           },
           {
             title: '操作',
@@ -226,7 +226,6 @@
           deleteBatch: "/smsCheck/task/deleteBatch",
           exportXlsUrl: "/smsCheck/task/exportXls",
           importExcelUrl: "smsCheck/task/importExcel",
-
         },
         dictOptions: {},
         superFieldList: [],
@@ -244,7 +243,7 @@
     methods: {
       // 显示添加页面
       showAdd() {
-        this.$emit('goAdd', true);
+        this.$emit('goAdd');
       },
       // 显示导入页面
       showImport() {
@@ -253,23 +252,21 @@
           this.$message.warning('请选择一条记录!');
           return;
         }
-        let row = this.selectionRows[0]
-        let task = {
-          id: row.id,
-          name: row.taskName,
-          startTime: row.taskStartTime,
-          endTime: row.taskEndTime,
-          state: row.taskState,
-          stateText: row.taskState_dictText,
-          description: row.description,
-          customerCount: row.customerCount,
-          checkCount: row.checkCount,
-        }
-        this.$emit('goImport', task);
+        let taskInfo = this.buildTaskInfo(this.selectionRows[0]);
+        this.$emit('goImport', taskInfo);
       },
       // 显示导入页面
       showCheckList(record) {
-        let task = {
+        let taskInfo = this.buildTaskInfo(record);
+        this.$emit('goCheckList', taskInfo);
+      },
+      /**
+       * 构建 任务信息对象
+       * @param record 任务信息
+       * @returns {*} 任务信息对象
+       */
+      buildTaskInfo(record) {
+        return {
           id: record.id,
           name: record.taskName,
           startTime: record.taskStartTime,
@@ -277,10 +274,10 @@
           state: record.taskState,
           stateText: record.taskState_dictText,
           description: record.description,
-          customerCount: record.customerCount,
+          count: record.customerCount,
+          uncheckCount: record.uncheckCount,
           checkCount: record.checkCount,
-        }
-        this.$emit('goCheckList', task);
+        };
       },
       initDictConfig(){
       },