|
@@ -75,7 +75,9 @@
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div class="wrapper">
|
|
<div class="wrapper">
|
|
<div>
|
|
<div>
|
|
- <span>{{ scope.row.cost_money }}</span>
|
|
|
|
|
|
+ <span v-if="!checkPermission('statistic.ROITJ.updateCostmoney')">{{ scope.row.cost_money }}</span>
|
|
|
|
+ <el-input v-else v-model.number="scope.row.cost_money" min="0" type="number"
|
|
|
|
+ @blur="changeCostMoney(scope.row)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -235,8 +237,9 @@ import { shortcuts } from '@/utils/shortcuts';
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
import { InfoFilled } from '@element-plus/icons-vue';
|
|
import { InfoFilled } from '@element-plus/icons-vue';
|
|
import { useGetList } from '@/hook/curd/useGetList';
|
|
import { useGetList } from '@/hook/curd/useGetList';
|
|
-import { statisticRoiListTotal } from '@/api/dataStatistics/roiStatistical/index';
|
|
|
|
|
|
+import { statisticRoiListTotal, statisticRoiUpdateCostmoney } from '@/api/dataStatistics/roiStatistical/index';
|
|
import { titleObj } from "./excelTitle";
|
|
import { titleObj } from "./excelTitle";
|
|
|
|
+import { checkPermission } from '@/directives/permission';
|
|
import {
|
|
import {
|
|
channelMiniprogramUseList,
|
|
channelMiniprogramUseList,
|
|
channelPromotionsOptions,
|
|
channelPromotionsOptions,
|
|
@@ -266,6 +269,31 @@ const remoteMethod = (query: string, type: string,) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const changeCostMoney = (row: object) => {
|
|
|
|
+ if (!checkPermission('statistic.ROITJ.updateCostmoney')) return;
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
+ `确认修改此投放成本吗?`,
|
|
|
|
+ '提示',
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then((action) => {
|
|
|
|
+ console.log(action, row);
|
|
|
|
+ statisticRoiUpdateCostmoney({ id: row.id, cost_money: row.cost_money }).then(res => {
|
|
|
|
+ ElMessage.success(res.message)
|
|
|
|
+ search()
|
|
|
|
+ }).catch((e) => {
|
|
|
|
+ search()
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ search()
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
const initRemoteOption = (type: string, params?: object) => {
|
|
const initRemoteOption = (type: string, params?: object) => {
|
|
switch (type) {
|
|
switch (type) {
|
|
case 'channelPromotions':
|
|
case 'channelPromotions':
|