This commit is contained in:
dute7liang
2024-01-19 21:10:04 +08:00
parent b8ba8e8ce7
commit 3e45791613
3 changed files with 30 additions and 17 deletions

View File

@@ -26,21 +26,12 @@ export function getConsumeLogTraceId(traceId) {
})
}
// 新增分销记录
export function addConsumeLog(data) {
return request({
url: '/cai/consumeLog',
method: 'post',
data: data
})
}
// 修改分销记录
export function updateConsumeLog(data) {
export function fenxiaoConsumeLog(id) {
return request({
url: '/cai/consumeLog',
method: 'put',
data: data
url: '/cai/consumeLog/consumer',
method: 'get',
params: {id}
})
}

View File

@@ -58,9 +58,13 @@
</template>
</el-table-column>
<el-table-column label="业务操作" align="center" prop="cateAdminName" />
<el-table-column label="客户显示" align="center" prop="cateAppName" />
<el-table-column label="说明" align="center" prop="cateAdminName" min-width="200">
<template v-slot="scope">
<span>{{scope.row.showMessage}}</span><image-preview v-if="scope.row.tarImg" :src="scope.row.tarImg" :width="30" :height="30"/>
</template>
</el-table-column>
<el-table-column label="变动" align="center" prop="changeValue" />
<el-table-column label="说明" align="center" prop="remark" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="后台操作" align="center" prop="isAdmin" >
<template v-slot="scope">
<cai-dict-tag :options="yesOrNoList" :value="scope.row.isAdmin"/>

View File

@@ -120,9 +120,14 @@
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleInfo(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status === 0"
@click="handleUpdate(scope.row)"
>分销</el-button>
</template>
</el-table-column>
</el-table>
@@ -139,7 +144,7 @@
</template>
<script>
import {listConsumeLog} from "@/api/cai/consumeLog";
import {fenxiaoConsumeLog, listConsumeLog} from "@/api/cai/consumeLog";
import {consumeLogCalculateStatusList, consumeLogStatusList, consumeLogTypeList} from "@/constant/statusMap";
import ConsumeLogInfo from "@/views/cai/consumeLog/consume-log-info";
@@ -214,6 +219,19 @@ export default {
this.$refs.consumeLogInfo.init(row.id)
})
},
handleUpdate(row){
this.$modal.confirm('确定要分销该数据项?').then(() => {
this.loading = true;
return fenxiaoConsumeLog(row.id);
}).then(() => {
this.loading = false;
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {
}).finally(() => {
this.loading = false;
});
}
}
};
</script>