|
@@ -80,6 +80,10 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="check-btns" v-if="false">
|
|
|
+ <el-button type="primary" @click="allClick">批量审核</el-button>
|
|
|
+ <el-button type="primary" @click="quickAuditClick">快捷审核</el-button>
|
|
|
+ </div>
|
|
|
<div class="tips">当前选择表格已选择{{ totalNum }}项,总积分:{{ totalScore }}</div>
|
|
|
|
|
|
<div class="table">
|
|
@@ -109,7 +113,7 @@
|
|
|
<vxe-table-column field="taskScore" title="服务分值" width="100"></vxe-table-column>
|
|
|
<vxe-table-column field="salesName" title="推广员姓名" width="150"></vxe-table-column>
|
|
|
<vxe-table-column field="createTime" title="服务提交时间" width="200"></vxe-table-column>
|
|
|
- <vxe-table-column field="taskStatusName" title="服务当前状态" width="120"></vxe-table-column>
|
|
|
+ <vxe-table-column field="checkResultName" title="服务当前状态" width="120"></vxe-table-column>
|
|
|
<vxe-table-column field="entName" title="服务提供商" width="200"></vxe-table-column>
|
|
|
<vxe-table-column field="mahName" title="产品所属生产企业" width="200"></vxe-table-column>
|
|
|
<vxe-table-column field="skuName" title="关联产品名称" width="200"></vxe-table-column>
|
|
@@ -136,49 +140,57 @@
|
|
|
</vxe-pager>
|
|
|
|
|
|
<!-- 审核弹窗 -->
|
|
|
-
|
|
|
<el-dialog title="审核" :close-on-click-modal="false" :visible.sync="reviewDialog" top="12vh" width="50%" :before-close="handleClose" center>
|
|
|
<div class="reviewContent">
|
|
|
- <div class="review-detail">
|
|
|
+ <div class="check-tips">审核令牌有效期为3分钟,请在【{{ expireTime }}】前完成审核操作,如果失效,请重新打开弹窗。</div>
|
|
|
+ <div class="review-detail" v-if="singleFlag">
|
|
|
<div class="teskDetailsty">服务详情</div>
|
|
|
- <TaskDetail :id="examineVal" />
|
|
|
+ <TaskDetail ref="taskDetailRef" :id="currentTaskId" />
|
|
|
</div>
|
|
|
<div class="teskDetailsty">审批意见</div>
|
|
|
<el-form :model="taskForm" :rules="rules" ref="taskForm" label-width="100px">
|
|
|
- <el-form-item label="审批意见:" prop="taskStatus" class="formitem-box">
|
|
|
- <el-radio-group v-model="taskForm.taskStatus">
|
|
|
- <el-radio label="3">通过</el-radio>
|
|
|
- <el-radio label="4">拒绝</el-radio>
|
|
|
+ <el-form-item label="审批意见:" prop="checkResult" class="formitem-box">
|
|
|
+ <el-radio-group v-model="taskForm.checkResult">
|
|
|
+ <el-radio :label="true">通过</el-radio>
|
|
|
+ <el-radio :label="false">拒绝</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item
|
|
|
label="意见说明:"
|
|
|
- prop="taskStatusInfo"
|
|
|
+ prop="checkMessage"
|
|
|
class="formitem-box"
|
|
|
:rules="[
|
|
|
{
|
|
|
- required: taskForm.taskStatus == 3 ? false : true,
|
|
|
+ required: !taskForm.checkResult,
|
|
|
message: '请输入审批说明',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]"
|
|
|
>
|
|
|
- <el-input type="textarea" v-model="taskForm.taskStatusInfo"></el-input>
|
|
|
+ <el-input type="textarea" v-model="taskForm.checkMessage"></el-input>
|
|
|
</el-form-item>
|
|
|
<refuseReason @selectRefuseReason="selectRefuseReason" />
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
|
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="checkForm">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getTaskV2PageApi, getTaskTypeAvailApi, getDeptv2Avail, getDrug2Avail, getUserV2Avail } from '@/api/serviceManagement/servicesToBeReviewed/index.js';
|
|
|
+import {
|
|
|
+ getTaskV2PageApi,
|
|
|
+ getTaskTypeAvailApi,
|
|
|
+ getDeptv2Avail,
|
|
|
+ getDrug2Avail,
|
|
|
+ getUserV2Avail,
|
|
|
+ getTaskV2TokenApi,
|
|
|
+ checkSingleApi
|
|
|
+} from '@/api/serviceManagement/servicesToBeReviewed/index.js';
|
|
|
import { tableOptin } from './index.js';
|
|
|
import { getDictType } from '@/api/common';
|
|
|
import abbreviationsProvinces from '@/const/abbreviationsProvinces.js';
|
|
@@ -186,15 +198,16 @@ import dayjs from 'dayjs';
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import TaskDetail from './components/TaskDetail.vue';
|
|
|
import refuseReason from '@/components/refuseReason';
|
|
|
+import Config from '@/settings';
|
|
|
|
|
|
export default {
|
|
|
- components: { TaskDetail, refuseReason, TaskDetail },
|
|
|
+ components: { refuseReason, TaskDetail },
|
|
|
data() {
|
|
|
return {
|
|
|
tableOptin,
|
|
|
tableData: [],
|
|
|
tableLoading: false,
|
|
|
- taskStatusArr: [],
|
|
|
+ checkResultArr: [],
|
|
|
taskTypeAvailArr: [],
|
|
|
mahNameArr: [],
|
|
|
deptListArr: [],
|
|
@@ -205,9 +218,9 @@ export default {
|
|
|
abbreviationsProvincesList: abbreviationsProvinces,
|
|
|
nodeId: '',
|
|
|
searchFrom: {
|
|
|
- year: '2024',
|
|
|
+ year: '',
|
|
|
taskTypeId: '',
|
|
|
- quarter: '4',
|
|
|
+ quarter: '',
|
|
|
createTime: '',
|
|
|
provAbbr: '',
|
|
|
mahName: '',
|
|
@@ -226,14 +239,17 @@ export default {
|
|
|
},
|
|
|
reviewDialog: false,
|
|
|
taskForm: {
|
|
|
- taskStatus: '',
|
|
|
- taskStatusInfo: ''
|
|
|
+ checkResult: '',
|
|
|
+ checkMessage: ''
|
|
|
},
|
|
|
rules: {
|
|
|
- taskStatus: [{ required: true, message: '请选择审批意见', trigger: 'change' }]
|
|
|
+ checkResult: [{ required: true, message: '请选择审批意见', trigger: 'change' }]
|
|
|
},
|
|
|
singleFlag: false,
|
|
|
- examineVal: ''
|
|
|
+ checkIds: [],
|
|
|
+ currentTaskId: '',
|
|
|
+ reviewToken: '',
|
|
|
+ expireTime: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -246,7 +262,7 @@ export default {
|
|
|
const roles = this.userInfo.roles;
|
|
|
|
|
|
let nodeId = '';
|
|
|
- switch (roles) {
|
|
|
+ switch (true) {
|
|
|
// 43 地市管理员
|
|
|
case roles.includes(43):
|
|
|
nodeId = 1;
|
|
@@ -276,7 +292,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
const currentYear = dayjs().format('YYYY');
|
|
|
- // this.searchFrom.year = currentYear;
|
|
|
+ this.searchFrom.year = currentYear;
|
|
|
this.nodeId = nodeId;
|
|
|
this.searchFrom.nodeId = nodeId;
|
|
|
this.getList();
|
|
@@ -285,7 +301,7 @@ export default {
|
|
|
methods: {
|
|
|
getDict() {
|
|
|
getDictType({ type: 'task_status' }).then((res) => {
|
|
|
- this.taskStatusArr = res.data.data;
|
|
|
+ this.checkResultArr = res.data.data;
|
|
|
});
|
|
|
getDictType({ type: 'mah_name' }).then((res) => {
|
|
|
this.mahNameArr = res.data.data;
|
|
@@ -319,9 +335,9 @@ export default {
|
|
|
this.tableData = res.data.data.records;
|
|
|
this.tableData.forEach((item) => {
|
|
|
const currA = this.taskTypeAvailArr.find((itn) => itn.id === item.taskTypeId);
|
|
|
- const currB = this.taskStatusArr.find((itn) => itn.value === item.taskStatus);
|
|
|
+ const currB = this.checkResultArr.find((itn) => itn.value === item.taskStatus);
|
|
|
item.taskTypeName = currA?.name ?? '';
|
|
|
- item.taskStatusName = currB?.label ?? '';
|
|
|
+ item.checkResultName = currB?.label ?? '';
|
|
|
item.cycle = item.pkgStartTime + '~' + item.pkgEndTime;
|
|
|
});
|
|
|
this.page.total = res.data.data.total;
|
|
@@ -348,7 +364,6 @@ export default {
|
|
|
this.searchFrom.nodeId = this.nodeId;
|
|
|
},
|
|
|
pageChange(obj) {
|
|
|
- console.log('obj', obj);
|
|
|
this.page.currentPage = obj.currentPage;
|
|
|
this.page.pageSize = obj.pageSize;
|
|
|
this.getList();
|
|
@@ -367,6 +382,7 @@ export default {
|
|
|
},
|
|
|
selectAllChangeEvent(obj) {
|
|
|
const records = obj.selection;
|
|
|
+ this.checkIds = records.map((item) => item.taskId);
|
|
|
this.totalNum = records.length;
|
|
|
this.totalScore = records.reduce((pre, cur) => {
|
|
|
return pre + (Number(cur.taskScore) || 0);
|
|
@@ -374,6 +390,7 @@ export default {
|
|
|
},
|
|
|
selectChangeEvent(obj) {
|
|
|
const records = obj.selection;
|
|
|
+ this.checkIds = records.map((item) => item.taskId);
|
|
|
this.totalNum = records.length;
|
|
|
this.totalScore = records.reduce((pre, cur) => {
|
|
|
return pre + (Number(cur.taskScore) || 0);
|
|
@@ -382,27 +399,116 @@ export default {
|
|
|
|
|
|
selectRefuseReason(refuseReason) {
|
|
|
let info;
|
|
|
- if (this.taskForm.taskStatusInfo) {
|
|
|
- info = this.taskForm.taskStatusInfo + refuseReason + ';';
|
|
|
+ if (this.taskForm.checkMessage) {
|
|
|
+ info = this.taskForm.checkMessage + refuseReason + ';';
|
|
|
} else {
|
|
|
info = refuseReason + ';';
|
|
|
}
|
|
|
|
|
|
- this.$set(this.taskForm, 'taskStatusInfo', info);
|
|
|
+ this.$set(this.taskForm, 'checkMessage', info);
|
|
|
},
|
|
|
- reviewBtn(row) {
|
|
|
- console.log('row', row);
|
|
|
- this.singleFlag = true;
|
|
|
- this.examineVal = row.taskId;
|
|
|
+ async reviewBtn(row) {
|
|
|
+ this.currentTaskId = row.taskId;
|
|
|
+ const tokenRes = await getTaskV2TokenApi({ taskIds: [row.taskId] });
|
|
|
+ if (tokenRes.data.code !== 0 || !tokenRes.data.data?.token) {
|
|
|
+ return this.$message.error('获取token失败');
|
|
|
+ }
|
|
|
+ this.reviewToken = tokenRes.data.data.token;
|
|
|
+ this.expireTime = tokenRes.data.data.expireTime;
|
|
|
this.reviewDialog = true;
|
|
|
+ this.singleFlag = true;
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.taskDetailRef.getInfo(row.taskId);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.reviewDialog = false;
|
|
|
+ this.taskForm = {
|
|
|
+ checkResult: '',
|
|
|
+ checkMessage: ''
|
|
|
+ };
|
|
|
+ this.currentTaskId = '';
|
|
|
},
|
|
|
- handleClose() {},
|
|
|
serviceDetail(row) {
|
|
|
window.open(
|
|
|
Config.outsideUrl + '/h5/#/pages/task/task-detail/index?id=' + row.taskId,
|
|
|
'newwindow',
|
|
|
'height=500, width=400, top=200, left=300, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no'
|
|
|
);
|
|
|
+ },
|
|
|
+
|
|
|
+ checkForm() {
|
|
|
+ this.$refs.taskForm.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.checkBtn();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ allClick() {
|
|
|
+ if (!this.checkIds.length) {
|
|
|
+ return this.$message.error('请选择待审核数据');
|
|
|
+ }
|
|
|
+ this.singleFlag = false;
|
|
|
+ this.reviewDialog = true;
|
|
|
+ },
|
|
|
+ // 快捷审核
|
|
|
+ quickAuditClick() {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/serviceManagement/quickReview/index'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async checkBtn() {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ let res;
|
|
|
+ // 单条审核
|
|
|
+ if (this.singleFlag) {
|
|
|
+ let obj = {
|
|
|
+ token: this.reviewToken,
|
|
|
+ taskId: this.currentTaskId,
|
|
|
+ checkResult: this.taskForm.checkResult,
|
|
|
+ checkMessage: this.taskForm.checkMessage,
|
|
|
+ nodeId: nodeId
|
|
|
+ };
|
|
|
+ res = await checkSingleApi(obj);
|
|
|
+ if (res.data.code === 0 && res.data.data) {
|
|
|
+ this.$message.success('审核成功!');
|
|
|
+ this.getList();
|
|
|
+ this.handleClose();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -437,4 +543,17 @@ export default {
|
|
|
border-bottom: 1px solid #d7d6d5;
|
|
|
margin: 0 0 10px 0;
|
|
|
}
|
|
|
+.check-btns {
|
|
|
+ width: 150px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.check-tips {
|
|
|
+ margin-bottom: 5px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: rgb(233 77 77);
|
|
|
+ text-align: center;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
</style>
|