Ver código fonte

客户提出修改意见

yangll 4 anos atrás
pai
commit
b89c9f5951

+ 8 - 6
src/views/dashboard/IndexChart2.vue

@@ -343,7 +343,7 @@
         },{
           title: '任务状态',
           align:"left",
-          dataIndex: 'taskState_dictText'
+          dataIndex: 'taskStateText'
         },{
           title: '任务开始时间',
           align:"left",
@@ -352,11 +352,13 @@
           title: '任务结束时间',
           align:"left",
           dataIndex: 'taskEndTime'
-        },{
-          title: '描述',
-          align:"left",
-          dataIndex: 'description'
-        }],
+        },
+        //   {
+        //   title: '描述',
+        //   align:"left",
+        //   dataIndex: 'description'
+        // }
+        ],
       }
     },
     created() {

+ 295 - 0
src/views/dataupload/TaskList.vue

@@ -0,0 +1,295 @@
+<template>
+
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="任务名称">
+              <j-input placeholder="请输入任务名称" v-model="queryParam.taskName"></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="任务状态">
+              <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.taskState" dictCode="sms_check_task_state"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="10" :lg="11" :md="12" :sm="24">
+              <a-form-item label="开始时间">
+                <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.taskStartTime_begin"></j-date>
+                <span class="query-group-split-cust"></span>
+                <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.taskStartTime_end"></j-date>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="10" :lg="11" :md="12" :sm="24">
+              <a-form-item label="结束时间">
+                <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.taskEndTime_begin"></j-date>
+                <span class="query-group-split-cust"></span>
+                <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.taskEndTime_end"></j-date>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域 begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDetail(record)">详情</a>
+        </span>
+
+        <!-- 任务名称可点击 -->
+        <template v-slot:taskName="text, record" >
+          <a @click="showCheckList(record)">{{text}}</a>
+        </template>
+      </a-table>
+    </div>
+    <!-- table区域 end -->
+
+    <!-- 任务添加 -->
+    <task-detail ref="modalDetail" @ok="modalFormOk"></task-detail>
+  </a-card>
+
+
+</template>
+
+<script>
+
+  import { putAction } from '@api/manage'
+  import '@/assets/less/TableExpand.less'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import TaskDetail from './modules/TaskDetail'
+
+  export default {
+    name: 'TaskList',
+    mixins:[JeecgListMixin],
+    inject:['closeCurrent'],
+    components: {
+      TaskDetail,
+    },
+    data () {
+      return {
+        description: '稽核任务管理页面',
+        disableSubmit: false,
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'任务名称',
+            align:"center",
+            sorter: true,
+            dataIndex: 'taskName',
+            scopedSlots: { customRender: 'taskName' }
+          },
+          {
+            title:'任务状态',
+            align:"center",
+            sorter: true,
+            dataIndex: 'taskState_dictText'
+          },
+          {
+            title:'任务开始时间',
+            align:"center",
+            sorter: true,
+            dataIndex: 'taskStartTime'
+          },
+          {
+            title:'任务结束时间',
+            align:"center",
+            sorter: true,
+            dataIndex: 'taskEndTime'
+          },
+          // {
+          //   title:'描述',
+          //   align:"center",
+          //   dataIndex: 'description'
+          // },
+          {
+            title:'客户总数',
+            align:"center",
+            dataIndex: 'customerCount'
+          },
+          // {
+          //   title:'待稽核数',
+          //   align:"center",
+          //   dataIndex: 'uncheckCount'
+          // },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/smsCheck/task/list",
+          delete: "/smsCheck/task/delete",
+          edit: "/smsCheck/task/edit",
+          deleteBatch: "/smsCheck/task/deleteBatch",
+          exportXlsUrl: "/smsCheck/task/exportXls",
+          importExcelUrl: "smsCheck/task/importExcel",
+        },
+        dictOptions: {},
+        superFieldList: [],
+        currentTaskState: 0,
+        autoSearch: false,
+      }
+    },
+    created() {
+      this.queryParam.taskState = this.$route.query.state;
+      this.loadData();
+      this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      // 显示添加页面
+      showAdd() {
+        this.$emit('goAdd');
+      },
+      // 显示导入页面
+      showImport() {
+        // 选择一条
+        if (this.selectedRowKeys.length !== 1) {
+          this.$message.warning('请选择一条记录!');
+          return;
+        }
+        let taskInfo = this.buildTaskInfo(this.selectionRows[0]);
+        this.$router.push({ path: '/sms/check/task/import' ,query:{id:taskInfo.id}});
+      },
+      // 显示导入页面
+      showCheckList(record) {
+        this.$router.push({ path: '/sms/check/task/check' ,query:{id:record.id}});
+      },
+      /**
+       * 构建 任务信息对象
+       * @param record 任务信息
+       * @returns {*} 任务信息对象
+       */
+      buildTaskInfo(record) {
+        return {
+          id: record.id,
+          name: record.taskName,
+          startTime: record.taskStartTime,
+          endTime: record.taskEndTime,
+          state: record.taskState,
+          stateText: record.taskState_dictText,
+          description: record.description,
+          count: record.customerCount,
+          uncheckCount: record.uncheckCount,
+          checkCount: record.checkCount,
+        };
+      },
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'taskName',text:'任务名称',dictCode:''})
+        fieldList.push({type:'string',value:'taskState',text:'任务状态',dictCode:'sms_check_task_state'})
+        fieldList.push({type:'datetime',value:'taskStartTime',text:'任务开始时间'})
+        fieldList.push({type:'datetime',value:'taskEndTime',text:'任务结束时间'})
+        this.superFieldList = fieldList
+      },
+      handleDetail(record){
+        this.$refs.modalDetail.detail(record);
+        this.$refs.modalDetail.title="详情";
+      },
+      checkStart(record){
+        record.taskState = 1;
+        let that = this;
+        let httpUrl = this.url.edit;
+        let param = record;
+
+        // 发送请求
+        putAction(httpUrl, param)
+          .then((res) => {
+            if(res.success){
+              that.$message.success("稽核任务已开始!");
+            }else{
+              that.$message.warning(res.message);
+            }
+          }).finally(() => {
+            that.loadData();
+        })
+      },
+      checkEnd(record){
+        record.taskState = 2;
+        let that = this;
+        let httpUrl = this.url.edit;
+        let param = record;
+
+        // 发送请求
+        putAction(httpUrl, param)
+          .then((res) => {
+            if(res.success){
+              that.$message.success("稽核任务已结束!");
+            }else{
+              that.$message.warning(res.message);
+            }
+          }).finally(() => {
+            that.loadData();
+        })
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 70 - 0
src/views/dataupload/modules/TaskDetail.vue

@@ -0,0 +1,70 @@
+<template>
+
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    :okButtonProps="{ class:{'jee-hidden': true} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+
+    <a-spin :spinning="confirmLoading">
+      <a-descriptions :title="model.taskName" :column="3" :bordered="true" size="small">
+        <a-descriptions-item label="任务状态"><a-tag :color="model.taskStateColor">{{model.taskStateText}}</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="客户总数" :span="3">{{model.customerCount}}</a-descriptions-item>
+        <a-descriptions-item label="描述"><span v-html="model.description"></span></a-descriptions-item>
+<!--        <a-descriptions-item label="待稽核数">{{model.checkCount}}</a-descriptions-item>-->
+      </a-descriptions>
+    </a-spin>
+
+  </j-modal>
+
+</template>
+
+<script>
+
+export default {
+  name: 'TaskDetail',
+  data () {
+    return {
+      description: '详情页面',
+      title: '详情页面',
+      width: 960,
+      visible: false,
+      disableSubmit: false,
+      model:{
+      },
+      confirmLoading: false,
+    }
+  },
+  methods: {
+    handleCancel () {
+      this.visible = false;
+    },
+    detail (record) {
+      this.model = Object.assign({}, record);
+      this.getTaskState(this.model.taskState);
+      this.visible = true;
+    },
+    getTaskState(taskState) {
+      if (taskState === 0) {
+        this.model.taskStateColor = '#fadb14';
+        this.model.taskStateText = '未开始';
+      } else if (taskState === 1) {
+        this.model.taskStateColor = '#1890ff';
+        this.model.taskStateText = '稽核中';
+      } else if (taskState === 2) {
+        this.model.taskStateColor = '#52c41a';
+        this.model.taskStateText = '稽核完成';
+      }
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/views/dataupload/modules/TaskList.vue

@@ -231,7 +231,7 @@ export default {
         this.$message.warning('用户编号不能为空!');
         return;
       }
-      this.$router.push({ path: '/sms/check/data/import' ,query:{id:record.id}});
+      this.$router.push({ path: '/sms/check/data/upload' ,query:{id:record.id}});
     },
     // 显示添加页面
     showEdit(record) {

+ 512 - 0
src/views/dataupload/modules/TaskUpload.vue

@@ -0,0 +1,512 @@
+<template>
+
+  <div>
+
+    <div style="background-color: #ececec; padding: 2px">
+      <a-row :gutter="16">
+        <a-col :span="6">
+          <a-spin :spinning="spinning">
+            <a-card  :bordered="false">
+              <div slot="title">
+                <a-page-header
+                  size="small"
+                  style="background-color: #FFFFFF;"
+                  title="资料管理 / 资料上传"
+                  sub-title=""
+                  @back="goBack"
+                ></a-page-header>
+              </div>
+              <div class="table-operator">
+                <a-upload
+                  name="file"
+                  :multiple="false"
+                  :action="importMinioUploadAction"
+                  :headers="tokenHeader"
+                  :showUploadList="false"
+                  :beforeUpload="importBeforeUpload"
+                  @change="importHandleChange">
+                  <a-button>
+                    <a-icon type="upload"/>
+                    客户资料上传
+                  </a-button>
+                </a-upload>
+              </div>
+
+              <a-radio-group v-model:value="value1" button-style="solid" style="width: 250px" @change="fileTypeClick">
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.businessContract].len
+                         :show-zero=fileTypeBadge[fileType.businessContract].showZero
+                         :number-style=fileTypeBadge[fileType.businessContract].numberStyle
+                >
+                  <a-radio-button style="display: flex" :value=fileType.businessContract>业务合同</a-radio-button>
+                </a-badge>
+
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.smsNumberCertificate].len
+                         :show-zero=fileTypeBadge[fileType.smsNumberCertificate].showZero
+                         :number-style=fileTypeBadge[fileType.smsNumberCertificate].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.smsNumberCertificate>
+                    号码证书
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.recordNotice].len
+                         :show-zero=fileTypeBadge[fileType.recordNotice].showZero
+                         :number-style=fileTypeBadge[fileType.recordNotice].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.recordNotice>
+                    备案通知
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.groupPriceApproval].len
+                         :show-zero=fileTypeBadge[fileType.groupPriceApproval].showZero
+                         :number-style=fileTypeBadge[fileType.groupPriceApproval].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.groupPriceApproval>
+                    集团政企价格审批单
+                  </a-radio-button>
+                </a-badge>
+
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.businessLicence].len
+                         :show-zero=fileTypeBadge[fileType.businessLicence].showZero
+                         :number-style=fileTypeBadge[fileType.businessLicence].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.businessLicence>
+                    营业执照
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.customerIntroductionLetter].len
+                         :show-zero=fileTypeBadge[fileType.customerIntroductionLetter].showZero
+                         :number-style=fileTypeBadge[fileType.customerIntroductionLetter].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.customerIntroductionLetter>
+                    集团政企价格审批单
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.handlerIdNumberCopy].len
+                         :show-zero=fileTypeBadge[fileType.handlerIdNumberCopy].showZero
+                         :number-style=fileTypeBadge[fileType.handlerIdNumberCopy].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.handlerIdNumberCopy>
+                    经办人身份复印件
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.crmScreenshot].len
+                         :show-zero=fileTypeBadge[fileType.crmScreenshot].showZero
+                         :number-style=fileTypeBadge[fileType.crmScreenshot].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.crmScreenshot>
+                    CRM 行短业务截图
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.valueAddedLicence].len
+                         :show-zero=fileTypeBadge[fileType.valueAddedLicence].showZero
+                         :number-style=fileTypeBadge[fileType.valueAddedLicence].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.valueAddedLicence>
+                    增值业务许可证
+                  </a-radio-button>
+                </a-badge>
+
+                <a-badge class="badge-width-100" :count=fileTypeBadge[fileType.otherData].len
+                         :show-zero=fileTypeBadge[fileType.otherData].showZero
+                         :number-style=fileTypeBadge[fileType.otherData].numberStyle>
+                  <a-radio-button style="display: flex" :value=fileType.otherData>
+                    其他资料
+                  </a-radio-button>
+                </a-badge>
+
+              </a-radio-group>
+
+
+            </a-card>
+          </a-spin>
+
+        </a-col>
+        <a-col :span="18">
+          <a-card  :bordered="false">
+            <a-list item-layout="vertical" :data-source="delList">
+              <a-list-item slot="renderItem" slot-scope="item, index">
+
+                <iframe
+                  frameborder="1"
+                  :src=item.href
+                  ref="ifr"
+                  width="100%"
+                  height="560px"
+                  scrolling="auto">
+                </iframe>
+                <a-button type="danger" slot="actions" @click="removeFile(item)">移除</a-button>
+
+              </a-list-item>
+            </a-list>
+          </a-card>
+        </a-col>
+      </a-row>
+    </div>
+
+  </div>
+
+</template>
+
+<script>
+
+import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+import {httpAction, postAction} from '@api/manage'
+import pdf from 'vue-pdf';
+
+let Base64 = require('js-base64').Base64
+
+
+export default {
+  name: 'TaskUpload',
+  mixins: [JeecgListMixin],
+  inject:['closeCurrent'],
+  components: {
+    pdf
+  },
+  data() {
+    return {
+
+      fileType: {
+        businessContract: "businessContract",
+        smsNumberCertificate: "smsNumberCertificate",
+        recordNotice: "recordNotice",
+        groupPriceApproval: "groupPriceApproval",
+        businessLicence: "businessLicence",
+        customerIntroductionLetter: "customerIntroductionLetter",
+        handlerIdNumberCopy: "handlerIdNumberCopy",
+        crmScreenshot: "crmScreenshot",
+        valueAddedLicence: "valueAddedLicence",
+        otherData: "otherData",
+      },
+
+      fileTypeBadge: {
+        "businessContract": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "smsNumberCertificate": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "recordNotice": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "groupPriceApproval": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "businessLicence": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "customerIntroductionLetter": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "handlerIdNumberCopy": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "crmScreenshot": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "valueAddedLicence": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+        "otherData": {
+          len: 0,
+          showZero: true,
+          numberStyle: {
+            backgroundColor: '#fa073f'
+          }
+        },
+      },
+
+      spinning: false,
+      value1: "businessContract",
+      expandedKeys: ['0-0', '0-1'],
+      selectedKeys: ['0-0'],
+      description: '导入页面',
+      autoSearch: false,
+      dataSource: [],
+      errorCount: 0,
+
+      url: {
+        importExcel: window._CONFIG['domainURL'] + "/smsCheck/task/importCustomerExcel",
+        importData: "/smsCheck/task/importCustomerData",
+        minioUpload: "/smsCheck/customerData/uploadMinio",
+        editUrl: "/smsCheck/customerData/edit/info/id",
+        list: "/smsCheck/customerData/list"
+      },
+
+      delList: [],
+      model: {},
+    }
+  },
+  created() {
+    //this.badgeCount()
+    this.model.id = this.$route.query.id;
+
+    this.customerDataList();
+    this.badgeCount()
+  },
+  computed: {
+    importMinioUploadAction() {
+      return window._CONFIG['domianURL'] + this.url.minioUpload;
+    },
+  },
+  methods: {
+    // 返回上一级
+    goBack() {
+      this.$router.go(-1);
+      this.closeCurrent();
+    },
+    // 返回上一级
+    removeFile(item) {
+      console.log(item)
+    },
+
+    customerDataList() {
+      let model = {
+        "infoId": this.model.id
+      }
+      postAction(this.url.list, model)
+        .then((res) => {
+          if (res.success) {
+            let records = res.result.records;
+            if (records.length > 0) {
+              this.delList = [];
+              let record = records[0];
+              let recordElement = record[this.value1];
+              if (recordElement != null || recordElement != undefined) {
+                let splitList = recordElement.split(",");
+                for (var i in splitList) {
+                  let splitListElement = splitList[i];
+                  let split = splitListElement.split("/");
+                  let splitElement = split[split.length - 1];
+                  let del = {
+                    title: splitElement,
+                    href: window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(Base64.encode((splitListElement))),
+                    information: "",//"上传用户:" + record.createBy
+                    url: splitListElement
+                  }
+                  this.delList.push(del)
+                }
+              } else {
+                this.delList = [];
+              }
+              console.log(this.delList)
+            } else {
+              this.delList = [];
+            }
+
+          } else {
+            this.$message.error('查询资料信息失败')
+          }
+        }).finally(() => {
+
+      })
+    },
+    badgeCount() {
+      //this.fileTypeBadge = []
+      let model = {
+        "infoId": this.model.id
+      }
+      let res = null;
+      postAction(this.url.list, model)
+        .then((res) => {
+          if (res.success) {
+            res = res.result.records
+            if (res.length > 0 && res != null) {
+              let data = res[0];
+              for (var i in this.fileType) {
+                let fileTypeElement = this.fileType[i];
+                let datum = data[fileTypeElement];
+                let badge = {};
+                if (datum == null) {
+
+                } else {
+                  let length = datum.split(",").length;
+                  let showZero = length > 0 ? false : true;
+                  badge = {
+                    len: parseInt(length),
+                    showZero: showZero,
+                    numberStyle: {
+                      backgroundColor: "#52c41a"
+                    }
+                  }
+                  this.fileTypeBadge[fileTypeElement] = badge;
+                }
+
+              }
+
+            }
+
+          } else {
+            /* for (var i in this.fileType) {
+               let fileTypeElement = this.fileType[i];
+               let badge = {
+                 len: 0,
+                 showZero: true,
+                 style: {}
+
+               }
+               this.fileTypeBadge[fileTypeElement] = badge;
+             }*/
+          }
+        })
+    },
+
+
+    importBeforeUpload(file) {
+      var fileType = file.type;
+      if (fileType === 'image') {
+        if (fileType.indexOf('image') < 0) {
+          this.$message.warning('请上传图片');
+          return false;
+        }
+      } else if (fileType === 'file') {
+        if (fileType.indexOf('image') >= 0) {
+          this.$message.warning('请上传文件');
+          return false;
+        }
+      }
+
+
+      return true
+    },
+
+    importHandleChange(info) {
+      this.spinning = true;
+      info.file
+      if (info.file.status === 'done') {
+        if (info.file.response.success) {
+          //this.loadData()
+          this.spinning = false;
+          this.$message.success(`${info.file.name} 上传成功!`);
+          let fileUrl = info.file.response.message;
+          let value1 = this.value1;
+          let model = {
+            "infoId": this.model.id,
+            //value1:fileUrl
+          }
+          model[value1] = fileUrl
+          postAction(this.url.editUrl, model)
+            .then((res) => {
+              if (res.success) {
+                this.customerDataList();
+                this.badgeCount();
+              } else {
+              }
+            }).finally(() => {
+
+          })
+
+        } else {
+          this.spinning = false;
+          this.$message.error(`${info.file.response.message}`);
+        }
+      } else if (info.file.status === 'error') {
+        this.spinning = false;
+        this.$message.error(`${info.file.response.message}`);
+      }
+    },
+
+    fileTypeClick(a, event) {
+      this.customerDataList();
+    },
+
+    radioStyle() {
+      return {
+        display: 'flex',
+        height: '30px',
+        lineHeight: '30px'
+      }
+    },
+
+    renderContent(h, {node, data, store}) {
+      return (
+        <span class="custom-tree-node">
+            <span>{node.label}</span>
+            <span>
+              <el-button size="mini" type="text" on-click={() => this.append(data)}>Append</el-button>
+              <el-button size="mini" type="text" on-click={() => this.remove(node, data)}>Delete</el-button>
+            </span>
+          </span>);
+    },
+
+    /**
+     * 上传事件回调
+     *
+     * @param result 回调值
+     */
+    importUploadChange(result) {
+      let file = result.file;
+      let event = result.event;
+      if (event === undefined && file.status === 'uploading') {
+        this.$message.info('开始上传');
+      }
+      if (event && file.status === 'uploading') {
+        this.$message.info('上传中,请稍等……');
+      }
+      if (file.response) {
+        let success = file.response.success;
+        let message = file.response.message;
+        if (!success) {
+          this.$message.error(message);
+        }
+        if (file.status === 'done') {
+          this.dataSource = file.response.result.data;
+          this.errorCount = file.response.result.errorCount;
+          if (this.errorCount > 0) {
+            this.$message.error('导入含有错误项,请检查内容')
+          } else {
+            this.$message.info('上传完成');
+          }
+        }
+      }
+
+    },
+
+  },
+
+}
+</script>
+
+<style scoped>
+.badge-width-100 {
+  width: 100%;
+}
+
+</style>

+ 0 - 1
src/views/smscheck/modules/TaskAdd.vue

@@ -32,7 +32,6 @@
             </a-col>
             <a-col :span="24">
               <a-form-model-item label="描述" prop="description" v-bind="labelCol1">
-<!--                <a-textarea v-model="model.description" rows="4" placeholder="请输入描述" />-->
                 <j-editor v-model="model.description"/>
               </a-form-model-item>
             </a-col>

+ 1 - 6
src/views/smscheck/modules/TaskCheckDetail.vue

@@ -12,7 +12,7 @@
         <a-descriptions-item label="服务号码">{{info.smsNumber}}</a-descriptions-item>
         <a-descriptions-item label="用户编号">{{info.userNo}}</a-descriptions-item>
         <a-descriptions-item label="入网时间">{{info.networkAccessTime}}</a-descriptions-item>
-        <a-descriptions-item label="用户状态" :span="2">{{info.userStateStr}}</a-descriptions-item>
+        <a-descriptions-item label="用户状态" :span="2">{{info.userState}}</a-descriptions-item>
         <a-descriptions-item label="员工姓名">{{info.staffName}}</a-descriptions-item>
         <a-descriptions-item label="员工工号">{{info.staffNo}}</a-descriptions-item>
       </a-descriptions>
@@ -416,11 +416,6 @@ export default {
       getAction(url, params).then(res => {
         if (res.success) {
           that.info = res.result;
-          that.info = res.result;
-          that.info.userStateStr = that.info.userState;
-          if (that.info.userState === '1') {
-            that.info.userStateStr = '在用';
-          }
         }
       }).finally(() => {
 

+ 81 - 13
src/views/smscheck/modules/TaskCheckList.vue

@@ -56,6 +56,18 @@
       </div>
       <!-- 查询区域-END -->
 
+      <!-- 操作按钮区域 -->
+      <div class="table-operator">
+        <a-button type="primary" icon="download" @click="handleExportXls('客户列表')">导出</a-button>
+        <!-- 高级查询区域 -->
+        <a-dropdown v-if="selectedRowKeys.length > 0">
+          <a-menu slot="overlay">
+            <a-menu-item key="1" @click="batchDel" v-has="'task:check:list:delete'"><a-icon type="delete"/>删除</a-menu-item>
+          </a-menu>
+          <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+        </a-dropdown>
+      </div>
+
       <!-- table区域-begin -->
       <div>
         <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
@@ -79,28 +91,50 @@
 
 
           <template slot="action" slot-scope="text, record">
-            <template v-if="record.checkState === 2 || record.checkState === 3">
+            <span v-has="'task:check:list:improve'">
+              <a @click="showImprove(record)">完善</a>
+              <a-divider type="vertical"/>
+            </span>
+
+            <span v-has="'task:check:list:upload'">
+              <a @click="showUpload(record)">上传</a>
+              <a-divider type="vertical"/>
+            </span>
+
+            <span v-has="'task:check:list:submit'" v-if="record.checkState == 1 || record.checkState == 4">
+              <a @click="handSubmit(record)">提交</a>
+              <a-divider type="vertical"/>
+            </span>
+
+            <span v-has="'task:check:list:check'" v-if="record.checkState === 2 || record.checkState === 3">
               <a @click="showCheckCheck(record)">稽核</a>
               <a-divider type="vertical" />
-            </template>
-            <template v-if="record.checkState >= 4">
+            </span>
+
+            <span v-has="'task:check:list:history'" v-if="record.checkState >= 4">
               <a @click="showCheckLog(record)">历史</a>
               <a-divider type="vertical" />
-            </template>
-            <template v-if="record.checkState != 2 && record.checkState != 3 && record.checkState != 5">
+            </span>
+
+            <span v-has="'task:check:list:notice'" v-if="record.checkState != 2 && record.checkState != 3 && record.checkState != 5">
               <a @click="noticeDeal(record)">催办</a>
               <a-divider type="vertical" />
-            </template>
+            </span>
 
             <a-dropdown>
               <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
               <a-menu slot="overlay">
 
-                <a-menu-item>
+                <a-menu-item v-has="'task:check:list:delete'">
                   <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                     <a>删除</a>
                   </a-popconfirm>
                 </a-menu-item>
+                <a-menu-item v-has="'task:check:list:clear'">
+                  <a-popconfirm title="确定清空吗?" @confirm="() => dataDelete(record.id)">
+                    <a>清空</a>
+                  </a-popconfirm>
+                </a-menu-item>
               </a-menu>
             </a-dropdown>
           </template>
@@ -127,7 +161,7 @@
 
 <script>
 
-import { postAction, getAction, httpAction } from '@api/manage'
+import { postAction, getAction, httpAction, deleteAction } from '@api/manage'
 import '@/assets/less/TableExpand.less'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
@@ -169,9 +203,6 @@ export default {
           width:60,
           align:"center",
           scopedSlots: { customRender: 'rowIndex' }
-          // customRender: ({ text, record, index }) => {
-          //   return `${ (ipagination.current - 1) * ipagination.pageSize + index + 1}`;
-          // }
         },
         {
           title:'客户名称',
@@ -237,8 +268,6 @@ export default {
           title: '操作',
           dataIndex: 'action',
           align:"center",
-          fixed:"right",
-          width: 160,
           scopedSlots: { customRender: 'action' }
         }
       ],
@@ -253,6 +282,9 @@ export default {
         delete: "/smsCheck/customerInfo/delete",
         edit: "/smsCheck/customerInfo/edit",
         notice: "/smsCheck/customerInfo/notice",
+        editCheck: "/smsCheck/customerInfo/edit/check/state",
+        dataDelete: "/smsCheck/customerData/clear",
+        exportXlsUrl: "smsCheck/customerInfo/exportXls",
       },
       autoSearch: false,
     }
@@ -295,6 +327,42 @@ export default {
       this.$router.go(-1);
       this.closeCurrent();
     },
+    // 显示完善页面
+    showImprove(record) {
+      this.$router.push({ path: '/sms/check/data/edit' ,query:{id:record.id}});
+    },
+    // 显示上传页面
+    showUpload(record) {
+      this.$router.push({ path: '/sms/check/data/upload' ,query:{id:record.id}});
+    },
+    // 显示上传页面
+    handSubmit(record) {
+      let that = this;
+      let model = {
+        id: record.id,
+      }
+      postAction(this.url.editCheck, model)
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message)
+            that.loadData(that.ipagination.current);
+          } else {
+            that.$message.warning(res.message)
+          }
+        }).finally(() => {
+
+      })
+    },
+    dataDelete(id) {
+      var that = this;
+      deleteAction(that.url.dataDelete, {infoId: id}).then((res) => {
+        if (res.success) {
+          that.$message.success('附件资料清空完成!');
+        } else {
+          that.$message.warning('附件资料清空失败!');
+        }
+      });
+    },
     // 显示列表页面
     showCheckCheck(record) {
       this.$router.push({ path: '/sms/check/task/check/check', query: { id: record.id}});

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

@@ -112,7 +112,7 @@
           {
             title:'用户状态',
             align:"center",
-            dataIndex: 'userStateStr'
+            dataIndex: 'userState'
           },
           {
             title:'员工姓名',

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

@@ -48,14 +48,14 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button @click="showImport" type="primary" icon="import">客户资料导入</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('稽核任务')">导出</a-button>
+      <a-button @click="handleAdd" v-has="'task:list:add'" type="primary" icon="plus">新增</a-button>
+      <a-button @click="showImport" v-has="'task:list:import'" type="primary" icon="import">导入客户</a-button>
+      <a-button type="primary" v-has="'task:list:export'" icon="download" @click="handleExportXls('稽核任务')">导出任务</a-button>
       <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+          <a-menu-item key="1" @click="batchDel" v-has="'task:list:delete'"><a-icon type="delete"/>删除</a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
       </a-dropdown>
@@ -83,38 +83,47 @@
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
+          <span v-has="'task:list:edit'">
+            <a @click="handleEdit(record)">编辑</a>
+            <a-divider type="vertical" />
+          </span>
+          <span v-has="'task:list:detail'">
+            <a @click="handleDetail(record)">详情</a>
+            <a-divider type="vertical" />
+          </span>
+          <span v-has="'task:list:detail'">
+            <a @click="showCheckList(record)">稽核详情</a>
+            <a-divider type="vertical" />
+          </span>
 
-          <a-divider type="vertical" />
-          <a @click="handleDetail(record)">详情</a>
-          <a-divider type="vertical" />
-          <a @click="showCheckList(record)">稽核详情</a>
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+          <a-dropdown v-has="'task:list:more'">
+            <a class="ant-dropdown-link">更多<a-icon type="down" /></a>
             <a-menu slot="overlay">
 
-              <a-menu-item v-if="record.taskState == 0">
+              <a-menu-item v-has="'task:list:start'" v-if="record.taskState == 0">
                 <a-popconfirm title="确定开始稽核吗?" @confirm="() => checkStart(record)">
                   <a>开始稽核</a>
                 </a-popconfirm>
               </a-menu-item>
-              <a-menu-item v-if="record.taskState == 1">
+
+              <a-menu-item v-has="'task:list:end'" v-if="record.taskState == 1">
                 <a-popconfirm title="确定结束稽核吗?" @confirm="() => checkEnd(record)">
                   <a>结束稽核</a>
                 </a-popconfirm>
               </a-menu-item>
-              <a-menu-item>
+
+              <a-menu-item v-has="'task:list:delete'">
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>
                 </a-popconfirm>
               </a-menu-item>
+
             </a-menu>
           </a-dropdown>
         </span>
 
         <!-- 任务名称可点击 -->
-        <template v-slot:taskName="text, record" >
+        <template v-slot:taskName="text, record">
           <a @click="showCheckList(record)">{{text}}</a>
         </template>
       </a-table>