|
@@ -1,5 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <basic-container class="cardTitle">
|
|
|
+ <p>
|
|
|
+ <el-button type="primary" @click="backPage" style="width: 80px">返回</el-button>
|
|
|
+ </p>
|
|
|
+ </basic-container>
|
|
|
<basic-container>
|
|
|
<div class="search-content">
|
|
|
<el-form :model="searchFrom" label-width="140px">
|
|
@@ -81,15 +86,133 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</basic-container>
|
|
|
- <basic-container>测试qaq</basic-container>
|
|
|
+ <basic-container>
|
|
|
+ <div class="card-list">
|
|
|
+ <div v-infinite-scroll="getList" style="overflow: auto">
|
|
|
+ <div class="cards" v-masonry :gutter="20">
|
|
|
+ <div v-for="curr in list" class="card" v-masonry-tile :key="curr.info.taskId">
|
|
|
+ <div class="task-info">
|
|
|
+ <div class="task-type-info">服务类型: {{ getName(curr?.info.taskTypeId) }}</div>
|
|
|
+ <div class="info">
|
|
|
+ <p>任务ID:{{ curr?.info.taskId }}</p>
|
|
|
+ <p>任务编号:{{ curr?.info.taskNumber }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="info">
|
|
|
+ <p>服务积分:{{ curr?.info.taskScore }}</p>
|
|
|
+ <p>代表姓名:{{ curr?.info.salesName }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="info">
|
|
|
+ <p>产品名称:{{ curr?.info.skuName }}</p>
|
|
|
+ <p>生产企业:{{ curr?.info.mahName }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="info">
|
|
|
+ <p>执行包名称:{{ curr?.info.pkgName }}</p>
|
|
|
+ <p>起止时间:{{ curr?.info.pkgStartTime }} ~ {{ curr?.info.pkgEndTime }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="detail">服务详情</div>
|
|
|
+ <template v-if="curr?.info?.configs">
|
|
|
+ <div v-for="(item, index) in curr?.info?.configs" :key="index" class="field-box">
|
|
|
+ <template v-if="item.taskFiledType == 'domain' || item.taskFiledType == 'select'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value" v-show="!(item.taskTypeId == '19' && item.taskFiledKey == 'temp3')">
|
|
|
+ {{ getDesc(curr.info, item) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 城市选择 -->
|
|
|
+ <template v-if="item.taskFiledType === 'area'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value">
|
|
|
+ {{ curr.info.taskContent[item.taskFiledKey] || '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 文字输入 -->
|
|
|
+ <template v-if="item.taskFiledType == 'text' || item.taskFiledType == 'inputautoselect' || item.taskFiledType == 'map' || item.taskFiledType == 'mapwithimg'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value">
|
|
|
+ {{ curr.info.taskContent[item.taskFiledKey] || '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 时间 -->
|
|
|
+ <template v-if="item.taskFiledType == 'datetime'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value">
|
|
|
+ {{ curr.info.taskContent[item.taskFiledKey] || '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 日期范围 -->
|
|
|
+ <template v-if="item.taskFiledType == 'datatimerange'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value">
|
|
|
+ {{ curr.info.taskContent[item.taskFiledKey] || '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 图片上传 -->
|
|
|
+ <div v-if="item.taskFiledType == 'img'" class="divline" style="width: 100%; height: 15px; background-color: #e9e9e9; margin-bottom: 5px"></div>
|
|
|
+ <template v-if="item.taskFiledType == 'img'">
|
|
|
+ <div class="upload-field">
|
|
|
+ <div class="field-text" :class="{ required: item.isMustfill == '1' }">{{ item.taskFiledValue }}:</div>
|
|
|
+ <!-- 上传组件 -->
|
|
|
+ <div class="img-box" v-if="item.imgList">
|
|
|
+ <div v-for="(iItem, index) in item.imgList" :key="index" class="img-box-content">
|
|
|
+ <span class="type">{{ iItem.type }}</span>
|
|
|
+ <el-image class="img-item" lazy :src="iItem.url" :preview-src-list="getPreviewList(item.previewList, index)" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 金额 -->
|
|
|
+ <template v-if="item.taskFiledType == 'money'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value">
|
|
|
+ {{ curr.info.taskContent[item.taskFiledKey] || '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 数字 -->
|
|
|
+ <template v-if="item.taskFiledType == 'number'">
|
|
|
+ <div class="title-value">{{ item.taskFiledValue }}:</div>
|
|
|
+ <div class="desc-value">
|
|
|
+ {{ curr.info.taskContent[item.taskFiledKey] || '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 长文本 -->
|
|
|
+ <template v-if="item.taskFiledType == 'longtext'">
|
|
|
+ <div class="longtext-box">
|
|
|
+ <div class="field-text" :class="{ required: item.isMustfill == '1' }">{{ item.taskFiledValue }}:</div>
|
|
|
+ <textarea class="textarea-box" :disabled="true" :value="curr.info.taskContent[item.taskFiledKey] || '--'" :maxlength="item.taskFiledMaxsize" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <div class="btns">
|
|
|
+ <el-button class="btn" type="danger" @click="passClick(curr, true)">不通过</el-button>
|
|
|
+ <el-button class="btn" type="primary" @click="passClick(curr, true)">通过</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </basic-container>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getTaskV2PageApi, getTaskTypeAvailApi, getDeptv2Avail, getDrug2Avail, getUserV2Avail, getTaskV2TokenApi } from '@/api/serviceManagement/servicesToBeReviewed/index.js';
|
|
|
+import {
|
|
|
+ getTaskV2PageApi,
|
|
|
+ getTaskTypeAvailApi,
|
|
|
+ getDeptv2Avail,
|
|
|
+ getDrug2Avail,
|
|
|
+ getUserV2Avail,
|
|
|
+ getTaskV2TokenApi,
|
|
|
+ taskV2CheckBatchApi,
|
|
|
+ checkSingleApi,
|
|
|
+ getTaskV2PageTileApi
|
|
|
+} from '@/api/serviceManagement/servicesToBeReviewed/index.js';
|
|
|
import { getDictType } from '@/api/common';
|
|
|
import abbreviationsProvinces from '@/const/abbreviationsProvinces.js';
|
|
|
import dayjs from 'dayjs';
|
|
|
+import { mapGetters } from 'vuex';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -105,9 +228,9 @@ export default {
|
|
|
abbreviationsProvincesList: abbreviationsProvinces,
|
|
|
nodeId: '',
|
|
|
searchFrom: {
|
|
|
- year: '2024',
|
|
|
+ year: '',
|
|
|
taskTypeId: '',
|
|
|
- quarter: '4',
|
|
|
+ quarter: '',
|
|
|
createTime: '',
|
|
|
provAbbr: '',
|
|
|
mahName: '',
|
|
@@ -115,12 +238,62 @@ export default {
|
|
|
salesId: '',
|
|
|
skuId: '',
|
|
|
taskStatus: 3
|
|
|
- }
|
|
|
+ },
|
|
|
+ page: {
|
|
|
+ current: 1,
|
|
|
+ size: 50
|
|
|
+ },
|
|
|
+ nodeId: '',
|
|
|
+ list: []
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- this.getDict();
|
|
|
+ async created() {
|
|
|
+ await this.getDict();
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['userInfo'])
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ const roles = this.userInfo.roles;
|
|
|
+
|
|
|
+ let nodeId = '';
|
|
|
+ switch (true) {
|
|
|
+ // 43 地市管理员
|
|
|
+ case roles.includes(43):
|
|
|
+ nodeId = 1;
|
|
|
+ break;
|
|
|
+ // 4 区域管理员
|
|
|
+ case roles.includes(4):
|
|
|
+ nodeId = 2;
|
|
|
+ break;
|
|
|
+ // 42 市场管理员: 获取审核节点为3和9 nodeid为12
|
|
|
+ case roles.includes(42):
|
|
|
+ nodeId = 12;
|
|
|
+ break;
|
|
|
+ // 40 商务管理员: 获取审核节点为3和8 nodeid为11
|
|
|
+ case roles.includes(40):
|
|
|
+ nodeId = 11;
|
|
|
+ break;
|
|
|
+ // 41 事业部分管领导
|
|
|
+ case roles.includes(41):
|
|
|
+ nodeId = 9;
|
|
|
+ break;
|
|
|
+ // 39 事业部总经理
|
|
|
+ case roles.includes(39):
|
|
|
+ nodeId = 15;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ nodeId = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ const currentYear = dayjs().format('YYYY');
|
|
|
+ this.searchFrom.year = currentYear;
|
|
|
+ this.nodeId = nodeId;
|
|
|
+ this.searchFrom.nodeId = nodeId;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
getDict() {
|
|
|
getDictType({ type: 'task_status' }).then((res) => {
|
|
@@ -143,7 +316,32 @@ export default {
|
|
|
this.drugListArr = res.data.data;
|
|
|
});
|
|
|
},
|
|
|
- getList() {},
|
|
|
+ mahNameChange(e) {
|
|
|
+ if (e) {
|
|
|
+ const curr = this.drugListArr[e];
|
|
|
+ this.currDrugList = curr;
|
|
|
+
|
|
|
+ this.drugDisabled = false;
|
|
|
+ } else {
|
|
|
+ this.searchFrom.skuId = '';
|
|
|
+ this.currDrugList = [];
|
|
|
+ this.drugDisabled = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ const obj = Object.assign(
|
|
|
+ {
|
|
|
+ current: this.page.currentPage,
|
|
|
+ size: this.page.pageSize
|
|
|
+ },
|
|
|
+ this.searchFrom
|
|
|
+ );
|
|
|
+ const res = await getTaskV2PageTileApi(obj);
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.list = res.data.data.records;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
clickBtn() {
|
|
|
this.tableData = [];
|
|
|
this.page.currentPage = 1;
|
|
@@ -163,6 +361,86 @@ export default {
|
|
|
taskStatus: 3
|
|
|
};
|
|
|
this.searchFrom.nodeId = this.nodeId;
|
|
|
+ },
|
|
|
+ getName(taskType) {
|
|
|
+ let curr = this.taskTypeAvailArr.find((item) => item.id == taskType);
|
|
|
+ return curr.name;
|
|
|
+ },
|
|
|
+ getDesc(curr, item) {
|
|
|
+ // 拜访类任务
|
|
|
+ const arr = ['51', '52', '53'];
|
|
|
+ if (arr.includes(item.taskTypeId) && item.taskFiledKey === 'temp24') {
|
|
|
+ return curr.taskContent['temp24label'];
|
|
|
+ }
|
|
|
+ // 获取需要转换的字符串(例如 '1,2,3')
|
|
|
+ const contentValue = curr.taskContent[item.taskFiledKey];
|
|
|
+ if (!contentValue) return '--';
|
|
|
+ // 获取字典表对应数组
|
|
|
+ const itemList = curr.dict[item.dictGroupName] || [];
|
|
|
+ // 按逗号拆分成数组
|
|
|
+ const valueArray = contentValue.split(',');
|
|
|
+ // 将每个拆分值找到对应的 label
|
|
|
+ const result = valueArray.map((val) => {
|
|
|
+ const foundItem = itemList.find((dictItem) => dictItem.value === val);
|
|
|
+ return foundItem ? foundItem.label : null;
|
|
|
+ });
|
|
|
+ // 如果有任意一个值无法找到对应的 label,则直接返回 '--'
|
|
|
+ if (result.some((label) => label === null)) {
|
|
|
+ return '--';
|
|
|
+ }
|
|
|
+ // 否则,使用逗号拼接并返回
|
|
|
+ return result.join(',');
|
|
|
+ },
|
|
|
+ async passClick(item, flag) {
|
|
|
+ let nodeId = '';
|
|
|
+ const roles = this.userInfo.roles;
|
|
|
+ switch (true) {
|
|
|
+ // 43 地市管理员
|
|
|
+ case roles.includes(43):
|
|
|
+ nodeId = 2;
|
|
|
+ break;
|
|
|
+ // 4 区域管理员
|
|
|
+ case roles.includes(4):
|
|
|
+ nodeId = 3;
|
|
|
+ break;
|
|
|
+ // 42 市场管理员
|
|
|
+ case roles.includes(42):
|
|
|
+ nodeId = 8;
|
|
|
+ break;
|
|
|
+ // 40 商务管理员
|
|
|
+ case roles.includes(40):
|
|
|
+ nodeId = 9;
|
|
|
+ break;
|
|
|
+ // 39 事业部总经理
|
|
|
+ case roles.includes(39):
|
|
|
+ nodeId = 6;
|
|
|
+ break;
|
|
|
+ // 41 事业部分管领导
|
|
|
+ case roles.includes(41):
|
|
|
+ nodeId = 5;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ nodeId = 1;
|
|
|
+ }
|
|
|
+ console.log('item', item);
|
|
|
+ let obj = {
|
|
|
+ token: item.token.token,
|
|
|
+ taskId: item.token.value,
|
|
|
+ checkResult: flag,
|
|
|
+ checkMessage: '',
|
|
|
+ nodeId: nodeId
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ res = await checkSingleApi(obj);
|
|
|
+ console.log('res', res);
|
|
|
+ } catch (err) {
|
|
|
+ console.log('err', err);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ backPage() {
|
|
|
+ this.$router.$avueRouter.closeTag();
|
|
|
+ this.$router.back();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -174,4 +452,124 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
+
|
|
|
+.card-list {
|
|
|
+ height: calc(100vh - 550px);
|
|
|
+ .cards {
|
|
|
+ width: 100%;
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card {
|
|
|
+ border-radius: 4px;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
+ background-color: #fff;
|
|
|
+ color: #303133;
|
|
|
+ transition: 0.3s;
|
|
|
+ min-height: 300px;
|
|
|
+ width: 49%;
|
|
|
+ min-width: 500px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .task-type-info {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333;
|
|
|
+ font-weight: 600;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ display: flex;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #7f7f7f;
|
|
|
+ margin-bottom: 5px;
|
|
|
+
|
|
|
+ p {
|
|
|
+ flex: 1;
|
|
|
+ margin-right: 30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .detail {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333333;
|
|
|
+ border-bottom: 2px solid #d7d6d5;
|
|
|
+ line-height: 30px;
|
|
|
+ margin: 5px 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.field-box {
|
|
|
+ padding: 0 10px 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ .title-value {
|
|
|
+ //width: 50%;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .desc-value {
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .upload-field {
|
|
|
+ .img-box {
|
|
|
+ padding-top: 5px;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+ .file-box {
|
|
|
+ .file-item {
|
|
|
+ padding: 2px 8px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ color: #2d8cf0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .img-box-content {
|
|
|
+ padding-top: 15px;
|
|
|
+ position: relative;
|
|
|
+ .type {
|
|
|
+ font-size: 12px;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .img-item {
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+ .longtext-box {
|
|
|
+ .textarea-box {
|
|
|
+ margin-top: 5px !important;
|
|
|
+ width: 100%;
|
|
|
+ padding: 3px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .divline {
|
|
|
+ width: 100%;
|
|
|
+ height: 5px;
|
|
|
+ background-color: #e9e9e9;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+ .img-iten {
|
|
|
+ height: 60px;
|
|
|
+ margin-right: 5px;
|
|
|
+ width: 50px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+}
|
|
|
+.btns {
|
|
|
+ padding: 0 20px;
|
|
|
+ padding-top: 5px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ .btn {
|
|
|
+ width: 48%;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|