| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975 |
- <template>
- <a-row :gutter="10">
- <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
- <div>
- <a-page-header
- style="background-color: #FFFFFF;"
- title="客户列表"
- sub-title=""
- @back="goBack"
- >
- <a-descriptions :title="'任务名称: '+task.taskName" :column="3" :bordered="false">
- <a-descriptions-item label="状态">
- <a-tag :color="task.taskStateColor">{{ task.taskStateText }}</a-tag>
- </a-descriptions-item>
- <a-descriptions-item label="开始时间">{{ task.taskStartTime }}</a-descriptions-item>
- <a-descriptions-item label="结束时间">{{ task.taskEndTime }}</a-descriptions-item>
- <!-- <a-descriptions-item label="描述"><span v-html="task.description"></span></a-descriptions-item>-->
- </a-descriptions>
- <a-divider style="margin: 6px;"/>
- </a-page-header>
- <a-card :bordered="false" style="margin-top: -20px;">
- <a-tabs :active-key="currentTab" default-active-key="all" @change="tabChange">
- <a-tab-pane key="all" :tab="tabAll"></a-tab-pane>
- <a-tab-pane key="noUp" :tab="noUp"></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">
- <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.customerNo"></j-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="客户名称">
- <j-input placeholder="请输入客户名称" v-model="queryParam.customerName"></j-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="员工编号">
- <j-input placeholder="请输入员工编号" v-model="queryParam.staffNo"></j-input>
- </a-form-item>
- </a-col>
- <template v-if="toggleSearchStatus">
- </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-button type="primary" icon="download" @click="handleExportXls('客户列表')">导出</a-button>
- <a-button type="primary" @click="handleOpen">转派<a-icon type="right" /></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;">
- <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">
- <template slot="action" slot-scope="text, record">
- <span v-has="'truck:task:check:list:upload:improve'" v-if="record.checkState == 0 || record.checkState == 1 ">
- <a @click="showImproveAndUpload(record)">上传资料</a>
- <a-divider type="vertical"/>
- </span>
- <span v-has="'truck:task:check:list:audit'" v-if="record.checkState === 2 || record.checkState === 3">
- <a @click="showCheckCheck(record)">稽核</a>
- <a-divider type="vertical"/>
- </span>
- <span v-has="'truck:check:list:selectData'" v-if="record.checkState === 5">
- <a @click="selectData(record)">查看数据</a>
- <a-divider type="vertical" />
- </span>
- <span v-has="'truck:check:list:truckout'" >
- <a @click="transferOut(record)">回退转派</a>
- <a-divider type="vertical" />
- </span>
- <span v-has="'task:check:list:selectDataDown'">
- <a @click="getFileUrls(record)">下载资料</a>
- <a-divider type="vertical" />
- </span>
- <span v-has="'truck:check:list:history'" v-if="record.checkState === 4">
- <a @click="showImproveGZ(record)">整改</a>
- <a-divider type="vertical" />
- </span>
- <span v-has="'truck:task:check:list:notice'"
- v-if="record.checkState != 2 && record.checkState != 3 && record.checkState != 5">
- <a @click="noticeDeal(record)">催办</a>
- <a-divider type="vertical"/>
- </span>
- <a-dropdown>
- <a class="ant-dropdown-link">更多
- <a-icon type="down"/>
- </a>
- <a-menu slot="overlay">
- <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>
- <template v-slot:customerName="text, record">
- <a @click="showCheckDetail(record)">{{ text }}</a>
- </template>
- <template v-slot:checkState="status">
- <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
- </template>
- <template v-slot:rowIndex="text,records,index">
- {{ (ipagination.current - 1) * ipagination.pageSize + Number(index) + 1 }}
- </template>
- </a-table>
- </div>
- <!-- table区域 end -->
- </a-card>
- </div>
- </a-col>
- <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
- <a-card :bordered="false">
- <div style="text-align: right;">
- <a-icon type="close-circle" @click="hideUserList" />
- </div>
- <div style='margin-top: 30px;font-size: 25px' >请选择转派给哪位员工:</div>
- <div style='margin-top:65px' ></div>
- <!-- 查询区域 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline">
- <a-row :gutter="24">
- <a-col :md="15" :sm="24">
- <a-form-item label="用户账号">
- <a-input placeholder="" v-model="queryParam2.username"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="15" :sm="24">
- <a-form-item label="用户名称">
- <a-input placeholder="" v-model="queryParam2.realname"></a-input>
- </a-form-item>
- </a-col>
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
- <a-col :md="9" :sm="24">
- <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>
- <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>
- <a-button type="danger" @click="transfer" style="margin-left: 8px">转派</a-button>
- <!-- <a-button type="danger" @click="transfer" style="margin-left: 8px">转派</a-button>-->
- </a-col>
- </span>
- </a-row>
- </a-form>
- </div>
- <!-- 操作按钮区域 -->
- <div class="table-operator" :md="24" :sm="24">
- </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">{{
- selectedRowKeys2.length }}</a>项
- <a style="margin-left: 24px" @click="onClearSelected2">清空</a>
- </div>
- <a-table
- style="height:500px"
- ref="table2"
- bordered
- size="middle"
- rowKey="id"
- :columns="columns2"
- :dataSource="dataSource2"
- :pagination="ipagination2"
- :rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2 ,type:'radio'}"
- @change="handleTableChange2">
- <span slot="action" slot-scope="text, record">
- <a-divider type="vertical"/>
- <a-dropdown>
- </a-dropdown>
- </span>
- </a-table>
- <a-modal v-model="visible" title="请选择所属部门" on-ok="handleOk">
- <template slot="footer">
- <a-button key="back" @click="handleCancel">
- 返回
- </a-button>
- <!-- <a-button key="submit" type="primary" :loading="loading" @click="handleOk">-->
- <!-- 确认-->
- <!-- </a-button>-->
- <a-button type="danger" @click="transfer" style="margin-left: 8px">转派</a-button>
- </template>
- <div> 请选择部门
- <a-select style="width: 220px" v-model="orgCode">
- <a-select-option v-for="item in statusList" :key="statusList.orgCode" :value="item.orgCode">
- {{ item.departName }}
- </a-select-option>
- </a-select>
- </div>
- </a-modal>
- </div>
- <!-- 表单区域 -->
- </a-card>
- </a-col>
- </a-row>
- </template>
- <script>
- import {postAction, getAction, httpAction, deleteAction} from '@api/manage'
- import '@/assets/less/TableExpand.less'
- import {JeecgListMixin} from '@/mixins/JeecgListMixin'
- import JSZip from 'jszip'
- import FileSaver from 'file-saver'
- import RoleModal from '@views/system/modules/RoleModal.vue'
- import SelectUserModal from '@views/system/modules/SelectUserModal.vue'
- import UserModal from '@views/system/modules/UserModal.vue'
- import { filterObj } from '@/utils/util'
- const statusMap1 = {
- 1: {
- color: 'green',
- text: '正常'
- },
- 2: {
- color: 'red',
- text: '冻结'
- }
- }
- export default {
- name: 'TaskCheckList',
- components: { UserModal, SelectUserModal, RoleModal },
- mixins: [JeecgListMixin],
- inject: ['closeCurrent'],
- data() {
- let _self = this;
- return {
- statusList:[],
- loading: false,
- visible: false,
- dataSource1: [],
- dataSource2: [],
- currentRoleId: '',
- ipagination2: {
- current: 1,
- pageSize: 10,
- pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + '-' + range[1] + ' 共' + total + '条'
- },
- showQuickJumper: true,
- showSizeChanger: true,
- total: 0
- },
- queryParam2: {},
- rightcolval:0,
- selectedRowKeys1: [],
- selectedRowKeys2: [],
- description: '稽核详情页面',
- currentTab: 'all',
- currentCheckState: null,
- task: {
- id: '',
- taskName: '',
- taskStartTime: '',
- taskEndTime: '',
- description: '',
- taskState: 0,
- taskStateText: '',
- taskStateColor: '',
- },
- tabAll: '全部(0)',
- noUp: '未处理(0)',
- tabUndo: '未完善(0)',
- tabUncheck: '待稽核(0)',
- tabChecked: '待整改(0)',
- tabPassed: '稽核通过(0)',
- count: 0,
- noUpCount:0,
- undoCount: 0,
- uncheckCount: 0,
- checkedCount: 0,
- passedCount: 0,
- orgCode:"",
- columns2: [{
- title: '用户账号',
- align: 'center',
- dataIndex: 'username',
- width: 120
- },
- {
- title: '用户名称',
- align: 'center',
- width: 100,
- dataIndex: 'realname'
- }],
- columns: [
- {
- title: '#',
- dataIndex: '',
- key:'rowIndex',
- width:60,
- align:"center",
- scopedSlots: { customRender: 'rowIndex' }
- },
- // {
- // title:'客户名称',
- // align:"left",
- // sorter: true,
- // dataIndex: 'customerName',
- // scopedSlots: { customRender: 'customerName' }
- // },
- {
- title:'客户编号',
- align:"center",
- sorter: true,
- dataIndex: 'customerNo'
- },
- // {
- // title:'服务号码(全)',
- // align:"center",
- // dataIndex: 'smsNumber'
- // },
- {
- title:'用户编号',
- align:"center",
- dataIndex: 'userNo'
- },
- {
- title:'入网时间',
- align:"center",
- sorter: true,
- dataIndex: 'networkAccessTime'
- },
- // {
- // title:'用户状态',
- // align:"center",
- // dataIndex: 'userState',
- // customRender:function (text,record,index) {
- // if (text === '1') {
- // return '在用';
- // } else if (text === '2') {
- // return '拆机';
- // }
- // return text;
- // }
- // },
- {
- title:'员工姓名',
- align:"center",
- dataIndex: 'staffName'
- },
- {
- title:'员工编号',
- align:"center",
- sorter: true,
- dataIndex: 'staffNo'
- },
- {
- title:'稽核进度',
- align:"center",
- sorter: true,
- dataIndex: 'checkState',
- scopedSlots: { customRender: 'checkState' }
- },
- {
- title: '员工二级部门',
- align: "center",
- dataIndex: 'staffDeptLevel2Name'
- },
- // {
- // title: '员工二级部门编号',
- // align: "center",
- // dataIndex: 'staffDeptLevel2No'
- // },
- {
- title: '员工三级部门',
- align: "center",
- dataIndex: 'staffDeptLevel3Name'
- },
- // {
- // title: '员工三级部门编号',
- // align: "center",
- // dataIndex: 'staffDeptLevel3No'
- // },
- {
- title: '首次激活时间(固网起租时间)',
- align: "center",
- dataIndex: 'firstActivationDate'
- }, {
- title: '账户编码',
- align: "center",
- dataIndex: 'accountCode'
- }, {
- title: '楼宇名称',
- align: "center",
- dataIndex: 'floorName'
- },
- // {
- // title: '楼宇编号',
- // align: "center",
- // dataIndex: 'floorCode'
- // },
- {
- title: '操作',
- dataIndex: 'action',
- align:"center",
- scopedSlots: { customRender: 'action' }
- }
- ],
- isorter: {
- column: 'checkState',
- order: 'asc',
- },
- url: {
- deleteBatch : "smsCheck/customerInfo/deleteBatch",
- queryTask: "/smsCheck/task/queryById",
- list: "/smsCheck/customerInfo/list",
- count: "/smsCheck/customerInfo/count",
- 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/exportXlsTruck",
- list2: '/sys/user/userRoleList',
- },
- autoSearch: false,
- }
- },
- computed: {
- leftColMd() {
- return this.selectedRowKeys1.length === 0 ? 24 : 15
- },
- rightColMd() {
- return this.selectedRowKeys1.length === 0 ? 0 : 9
- }
- },
- created() {
- this.task.id = this.$route.query.id;
- this.queryTaskById(this.task.id);
- this.queryParam.taskId = this.task.id;
- this.loadData();
- this.loadTabNumber(this.task.id);
- },
- filters: {
- statusTypeFilter(type) {
- const statusTypeMap = {
- '0': 'error',
- '1': 'error',
- '2': 'warning',
- '3': 'warning',
- '4': 'processing',
- '5': 'success'
- }
- return statusTypeMap[type]
- },
- statusFilter(status) {
- const statusMap = {
- '0': '未处理',
- '1': '未完善',
- '2': '待稽核',
- '3': '待稽核',
- '4': '待整改',
- '5': '通过'
- }
- return statusMap[status]
- }
- },
- methods: {
- onSelectChange2(selectedRowKeys, selectionRows) {
- this.selectedRowKeys2 = selectedRowKeys
- this.selectionRows2 = selectionRows
- let url = '/smsCheck/customerData/queryDeptById';
- let params = {
- workNo: selectionRows[0].workNo
- }
- this.statusList=[]
- this.orgCode=''
- getAction(url, params).then(res => {
- if (res.success) {
- this.statusList=res.result
- return
- }
- })
- //this.visible = true;
- },
- showModal() {
- this.visible = true;
- },
- handleOk(e) {
- this.loading = true;
- setTimeout(() => {
- this.visible = false;
- this.loading = false;
- }, 3000);
- },
- handleTableChange2(pagination, filters, sorter) {
- //分页、排序、筛选变化时触发
- //TODO 筛选
- if (Object.keys(sorter).length > 0) {
- this.isorter2.column = sorter.field
- this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
- }
- this.ipagination2 = pagination
- this.loadData2()
- },
- hideUserList(){
- //this.rightcolval = 0
- this.selectedRowKeys1 = []
- },
- getQueryParams2() {
- //获取查询条件
- let sqp = {}
- if (this.superQueryParams2) {
- sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
- sqp['superQueryMatchType'] = this.superQueryMatchType2
- }
- var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
- param.field = this.getQueryField2()
- param.pageNo = this.ipagination2.current
- param.pageSize = this.ipagination2.pageSize
- return filterObj(param)
- },
- getQueryField2() {
- //TODO 字段权限控制
- var str = 'id,'
- this.columns2.forEach(function(value) {
- str += ',' + value.dataIndex
- })
- return str
- },
- transfer(){
- if (this.selectedRowKeys2.length===0){
- this.$message.warn('未选择转派人!')
- return
- }
- if (this.selectedRowKeys.length===0){
- this.$message.warn('未选择需转派的数据!')
- return
- }
- // if ( this.orgCode===''){
- // this.$message.warn('部门不可为空!')
- // return
- // }
- let url = '/smsCheck/customerData/transfer';
- let params = {
- userId : this.selectedRowKeys2[0],
- ids:this.selectedRowKeys,
- orgCode: this.orgCode
- }
- postAction(url, params).then(res => {
- if (res.success) {
- this.$message.success('转派成功!')
- this.visible = false;
- this.rightcolval=0;
- this.selectedRowKeys1=[];
- this.searchReset()
- return
- }
- })
- },
- searchQuery2() {
- this.loadData2(1)
- },
- searchReset2() {
- this.queryParam2 = {}
- this.loadData2(1)
- },
- loadData2(arg) {
- if (!this.url.list2) {
- this.$message.error('请设置url.list2属性!')
- return
- }
- //加载数据 若传入参数1则加载第一页的内容
- if (arg === 1) {
- this.ipagination2.current = 1
- }
- let params = this.getQueryParams2()//查询条件
- //params.roleId = this.currentRoleId
- getAction(this.url.list2, params).then((res) => {
- if (res.success) {
- this.dataSource2 = res.result.records
- this.ipagination2.total = res.result.total
- }
- })
- },
- handleOpen(record) {
- if (this.selectedRowKeys.length===0){
- this.$message.warn('未选择需转派的数据!')
- return
- }
- this.rightcolval = 1
- this.selectedRowKeys1 = '1'
- this.model1 = Object.assign({}, record)
- this.onClearSelected2()
- this.loadData2()
- },
- onClearSelected2() {
- this.selectedRowKeys2 = []
- this.selectionRows2 = []
- },
- getFileUrls(data) {
- let url = '/smsCheck/customerInfo/queryUrlById';
- let params = {
- id: data.id
- }
- let that = this;
- getAction(url, params).then(res => {
- if (res.success) {
- that.fileInfoList = res.result
- this.$message.success('开始下载请等待...')
- this.filesToRar(this.fileInfoList, '客户:'+data.customerNo+'资料下载');
- }else {
- this.$message.warn('无上传资料,若有疑问请联系管理员')
- return
- }
- })
- },
- /**文件打包* arrImages:文件list:[{fileUrl:文件url,renameFileName:文件名}]* filename 压缩包名* */
- filesToRar(arrImages, filename) {
- let _this = this;
- let zip = new JSZip();
- let cache = {};
- let promises = [];
- _this.title = '正在加载压缩文件';
- // const loading = this.$loading({lock: true,text: '正在加载压缩文件',spinner: 'el-icon-loading',background: 'rgba(0, 0, 0, 0.7)'});
- for (let item of arrImages) {
- for (let url of item.fileStaticUrl) {
- console.log("item",item)
- // 下载文件, 并存成ArrayBuffer对象
- const promise = this.getImgArrayBuffer(url.fileStaticUrl).then(data => {
- var testZip = zip.folder(item.fileId);
- // 获取文件名
- const file_name = url.fileName
- // 逐个添加文件
- testZip.file(file_name, data, { binary: true })
- //testZip.file(file_name,item.fileId)
- cache[file_name] = data})
- promises.push(promise);
- }
- }
- Promise.all(promises)
- // 生成二进制流
- .then(() => {zip.generateAsync({ type: "blob" })
- .then(content => {_this.title = '正在压缩';
- // 利用file-saver保存文件 自定义文件名
- FileSaver.saveAs(content, filename);
- _this.title = '压缩完成';}
- );
- }).catch(res=>{
- _this.$message.error('文件压缩失败');
- });
- },
- getImgArrayBuffer(url) {
- return new Promise((resolve, reject) => {
- //通过请求获取文件blob格式
- let xmlhttp = new XMLHttpRequest();
- xmlhttp.open("GET", url, true);
- xmlhttp.responseType = "blob";
- xmlhttp.onload = function () {
- if (this.status == 200) {
- resolve(this.response);
- } else {
- reject(this.status);
- }};
- xmlhttp.send();
- });
- },
- // 整改
- showImproveGZ(record) {
- this.$router.push({path: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
- },
- // 历史
- selectData(record) {
- this.$router.push({path: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
- },
- transferOut(record) {
- let url = '/smsCheck/customerData/transferOut';
- let dataOut=[]
- dataOut.push(record.id)
- let params = {
- ids:dataOut,
- }
- postAction(url, params).then(res => {
- if (res.success) {
- this.$message.success('转派成功!')
- this.visible = false;
- this.rightcolval=0;
- this.selectedRowKeys1=[];
- this.searchReset()
- return
- }else {
- this.$message.error(res.message)
- }
- })
- },
- // 返回上一级
- goBack() {
- this.$router.go(-1);
- //关闭当前页面
- this.closeCurrent();
- },
- // 上传客户资料
- showImproveAndUpload(record){
- this.$router.push({path: '/truck/check/data/upload', query: {id: record.id}});
- },
- // 显示完善页面
- 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: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
- },
- // 显示稽核详情页面
- showCheckDetail(record) {
- this.$router.push({path: '/truckCheck/modules/TaskCheckDetails', query: {id: record.id}});
- },
- // 显示稽核历史页面
- showCheckLog(record) {
- this.$router.push({path: '/sms/check/task/check/log', query: {id: record.id}});
- },
- // 构建任务信息
- buildTaskInfo(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;
- return {
- task: this.task,
- info: record
- }
- },
- handleCancel() {
- this.visible = false;
- },
- detail(record) {
- this.model = Object.assign({}, record);
- this.visible = true;
- },
- searchQuery() {
- this.loadData(1);
- this.selectedRowKeys = [];
- this.selectionRows = [];
- this.loadTabNumber(this.task.id);
- },
- searchReset() {
- this.queryParam = {};
- this.queryParam.taskId = this.task.id;
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.tabChange('all');
- this.loadTabNumber(this.queryParam.taskId);
- },
- tabChange(key) {
- // 稽核状态(0:未处理;1:未完善;2:待稽核;3:待整改;4:已整改;5:稽核通过;)
- if (key === 'all') {
- this.currentCheckState = null;
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.currentTab = 'all';
- } else if (key === 'undo') {
- this.currentCheckState = '1';
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.currentTab = 'undo';
- } else if (key === 'uncheck') {
- this.currentCheckState = '2,3';
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.currentTab = 'uncheck';
- } else if (key === 'checked') {
- this.currentCheckState = '4';
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.currentTab = 'checked';
- } else if (key === 'passed') {
- this.currentCheckState = '5';
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.currentTab = 'passed';
- } else if (key === 'noUp') {
- this.currentCheckState = '0';
- this.queryParam.checkState_MultiString = this.currentCheckState;
- this.currentTab = 'noUp';
- }
- this.loadData(1);
- },
- loadTabNumber(taskId) {
- let url = this.url.count;
- let params = {
- id: taskId
- }
- 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.noUpCount = result.noUpCount;
- that.tabAll = '全部(' + result.count + ')';
- that.noUp= '未处理(' + result.noUpCount + ')';
- that.tabUndo = '未完善(' + result.undoCount + ')';
- that.tabUncheck = '待稽核(' + result.uncheckCount + ')';
- that.tabChecked = '待整改(' + result.checkedCount + ')';
- that.tabPassed = '稽核通过(' + result.passedCount + ')';
- }
- }).finally(() => {
- })
- },
- noticeDeal(record) {
- let url = this.url.notice;
- let params = {
- customerName: record.customerName,
- smsNumber: record.smsNumber,
- staffNo: record.staffNo,
- userNo: record.userNo,
- customerNo:record.customerNo,
- taskId:record.taskId,
- }
- let that = this;
- postAction(url, params).then(res => {
- let {result} = res;
- if (res.success) {
- that.$message.info('已通知客户经理,进行材料补充!');
- }
- }).finally(() => {
- })
- },
- queryTaskById(id) {
- let url = this.url.queryTask;
- let params = {
- id: id
- }
- let that = this;
- getAction(url, params).then(res => {
- if (res.success) {
- that.task = res.result;
- that.getTaskState(that.task.taskState);
- }
- }).finally(() => {
- })
- },
- getTaskState(taskState) {
- if (taskState === 0) {
- this.task.taskStateColor = '#fadb14';
- this.task.taskStateText = '未开始';
- } else if (taskState === 1) {
- this.task.taskStateColor = '#1890ff';
- this.task.taskStateText = '稽核中';
- } else if (taskState === 2) {
- this.task.taskStateColor = '#52c41a';
- this.task.taskStateText = '稽核完成';
- }
- }
- }
- }
- </script>
- <style scoped>
- </style>
|