提交媒体代码

This commit is contained in:
wangchengming 2025-08-28 21:14:00 +08:00
parent 71db047c4f
commit c552385e10
8 changed files with 1310 additions and 698 deletions

40
src/api/pitchPrice.js Normal file
View File

@ -0,0 +1,40 @@
import request from '@/utils/request'
// 获取供应商比稿价分页列表
export function busSupplierComparePricePage(query) {
return request({
url: '/admin/busSupplierComparePrice/getBusSupplierComparePricePage',
method: 'post',
data: query
})
}
// 添加供应商比稿价
export function addBusSupplierComparePrice(query) {
return request({
url: '/admin/busSupplierComparePrice/addBusSupplierComparePrice',
method: 'post',
data: query
})
}
// 修改供应商比稿价
export function updateBusSupplierComparePrice(query) {
return request({
url: '/admin/busSupplierComparePrice/updateBusSupplierComparePrice',
method: 'post',
data: query
})
}
// 删除供应商比稿价
export function deleteBusSupplierComparePrice(priceId) {
return request({
url: '/admin/busSupplierComparePrice/deleteBusSupplierComparePrice/' + priceId,
method: 'post'
})
}
// 获取供应商比稿价详情
export function getBusSupplierComparePrice(priceId) {
return request({
url: '/admin/busSupplierComparePrice/getBusSupplierComparePrice/' + priceId,
method: 'post'
})
}

26
src/api/supplierLogs.js Normal file
View File

@ -0,0 +1,26 @@
import request from '@/utils/request'
// 获取供应商分页列表
export function busSupplierLogPage(query) {
return request({
url: '/admin/busSupplierLog/getBusSupplierLogPage',
method: 'post',
data: query
})
}
// 供应商日志,不分页
export function listBusSupplierLog(query) {
return request({
url: '/admin/busSupplierLog/listBusSupplierLog',
method: 'post',
data: query
})
}
// 获取供应商详情
export function getBusSupplierLog(logsId) {
return request({
url: '/admin/busSupplierLog/getBusSupplierLog/' + logsId,
method: 'post'
})
}

View File

@ -1082,10 +1082,14 @@ h6 {
}
// 弹窗tab页
.myInsertForm .el-tabs__nav-wrap:after{
height: 1px;
}
.my_dialog .el-tabs__nav-wrap:after {
height: 0px;
}
.myInsertForm .el-tabs__item,
.my_dialog .el-tabs__item {
align-items: center;
box-sizing: border-box;
@ -1097,6 +1101,7 @@ h6 {
padding: 0 20px;
}
.myInsertForm .el-tabs__item.is-active,
.my_dialog .el-tabs__item.is-active,
.el-tabs__item:hover {
font-family: Microsoft YaHei;
@ -1104,7 +1109,7 @@ h6 {
font-size: 22px;
color: #1E1E1E;
}
.myInsertForm .el-tabs__active-bar,
.my_dialog .el-tabs__active-bar {
height: 3px;
background: #1a75e6;
@ -1229,6 +1234,11 @@ h6 {
color: #B8B8B8;
}
.myInsertForm .my-collapse .el-collapse-item__content {
padding-top: 20px;
padding-bottom: 0px;
}
.myDetailForm .el-form-item--default {
margin-bottom: 0px;
}
@ -1266,7 +1276,7 @@ h6 {
min-height: 120px;
line-height: 120px;
}
.my_detailform_label .el-form-item__label {
line-height: 20px;
padding-top: 10px;

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,18 @@
<template>
<div class="app-container">
<div class="searchPanel">
<el-form :inline="true" v-show="showSearch" class="searchPanelForm">
<el-form :inline="true" class="searchPanelForm">
<el-form-item label="供应商:">
<el-select class="filterSelect" v-model="queryParams.supplierId" filterable remote reserve-keyword :remote-method="getSupplierList" :loading="selectLoading"
placeholder="请输入" remote-show-suffix clearable
style="min-width: 70px;">
<el-select class="filterSelect" v-model="queryParams.busSupplierId" filterable remote
reserve-keyword :remote-method="getSupplierList" :loading="selectLoading" placeholder="请输入"
remote-show-suffix clearable style="min-width: 70px;">
<el-option v-for="item in supplierList" :key="item.supplierId" :label="item.supplierName"
:value="item.supplierId" />
</el-select>
</el-form-item>
<el-form-item label="类型:">
<el-select v-model="queryParams.type" placeholder="请选择" style="min-width: 30px;" clearable>
<el-select v-model="queryParams.type" placeholder="请选择" style="min-width: 30px;"
@change="handleChangeType" clearable>
<el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@ -22,27 +23,28 @@
<el-col :span="24">
<el-button type="primary" class="primaryBtn" @click="handleQuery">查询</el-button>
<el-button type="primary" class="primaryBtn" @click="resetQuery">重置</el-button>
<el-button type="primary" class="primaryBtn" @click="handleAdd">新建</el-button>
<el-button type="primary" class="primaryBtn" @click="handleImport">导入</el-button>
</el-col>
</el-row>
<el-table v-if="queryParams.type == 0" v-loading="loading" :data="feedbackList"
<el-table v-if="queryParams.type == 1" v-loading="loading" :data="pitchPriceList"
height="calc(100vh - 308px)">
<el-table-column label="序号" align="center" width="80">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="left" prop="content" width="230" />
<el-table-column label="城市" align="center" prop="feedbackUser" width="150" />
<el-table-column label="场站" align="center" prop="feedbackUser" width="150" />
<el-table-column label="媒体位置" align="center" prop="feedbackUser" min-width="260" />
<el-table-column label="频次" align="center" prop="feedbackUser" width="120" />
<el-table-column label="刊例价" align="center" prop="feedbackUser" width="120" />
<el-table-column label="单位" align="center" prop="feedbackUser" width="100" />
<el-table-column label="折扣" align="center" prop="feedbackUser" width="100" />
<el-table-column label="首次制作安装费(元/次)" align="center" prop="feedbackUser" min-width="230" />
<el-table-column label="换画费(RMB)" align="center" prop="feedbackUser" width="150" />
<el-table-column label="供应商" align="left" prop="supplierName" width="180" />
<el-table-column label="城市" align="center" prop="city" width="130" />
<el-table-column label="场站" align="center" prop="station" width="100" />
<el-table-column label="媒体位置" align="center" prop="mediaPlacement" min-width="260" />
<el-table-column label="频次" align="center" prop="frequency" width="120" />
<el-table-column label="刊例价" align="center" prop="subscriptionPrice" width="120" />
<el-table-column label="单位" align="center" prop="unit" width="100" />
<el-table-column label="折扣" align="center" prop="discount" width="100" />
<el-table-column label="首次制作安装费(元/次)" align="center" prop="firstMakeFee" min-width="230" />
<el-table-column label="换画费(RMB)" align="center" prop="frameChangeFee" width="150" />
<el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
@ -52,22 +54,22 @@
</template>
</el-table-column>
</el-table>
<el-table v-if="queryParams.type == 1" v-loading="loading" :data="feedbackList"
<el-table v-if="queryParams.type == 2" v-loading="loading" :data="pitchPriceList"
height="calc(100vh - 308px)">
<el-table-column label="序号" align="center" width="80">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="left" prop="content" width="230" />
<el-table-column label="城市" align="center" prop="feedbackUser" width="150" />
<el-table-column label="资源描述" align="center" prop="feedbackUser" min-width="260" />
<el-table-column label="刊例价" align="center" prop="feedbackUser" width="120" />
<el-table-column label="单位" align="center" prop="feedbackUser" width="100" />
<el-table-column label="折扣" align="center" prop="feedbackUser" width="100" />
<el-table-column label="首次制作安装费(元/次)" align="center" prop="feedbackUser" min-width="230" />
<el-table-column label="换画费(RMB)" align="center" prop="feedbackUser" width="150" />
<el-table-column label="备注" align="center" prop="feedbackUser" min-width="230" />
<el-table-column label="供应商" align="left" prop="supplierName" width="180" />
<el-table-column label="城市" align="center" prop="city" width="130" />
<el-table-column label="资源描述" align="center" prop="resourceDesc" min-width="160" />
<el-table-column label="刊例价" align="center" prop="subscriptionPrice" width="130" />
<el-table-column label="单位" align="center" prop="unit" width="100" />
<el-table-column label="折扣" align="center" prop="discount" width="100" />
<el-table-column label="首次制作安装费(元/次)" align="center" prop="firstMakeFee" min-width="230" />
<el-table-column label="换画费(RMB)" align="center" prop="frameChangeFee" width="150" />
<el-table-column label="备注" align="center" prop="remark" min-width="230" />
<el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
@ -77,22 +79,22 @@
</template>
</el-table-column>
</el-table>
<el-table v-if="queryParams.type == 2" v-loading="loading" :data="feedbackList"
<el-table v-if="queryParams.type == 3" v-loading="loading" :data="pitchPriceList"
height="calc(100vh - 308px)">
<el-table-column label="序号" align="center" width="80">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="left" prop="content" width="230" />
<el-table-column label="城市" align="center" prop="feedbackUser" width="150" />
<el-table-column label="媒体名称" align="center" prop="feedbackUser" min-width="150" />
<el-table-column label="频次" align="center" prop="feedbackUser" width="120" />
<el-table-column label="刊例价" align="center" prop="feedbackUser" width="120" />
<el-table-column label="单位" align="center" prop="feedbackUser" width="100" />
<el-table-column label="折扣" align="center" prop="feedbackUser" width="100" />
<el-table-column label="首次制作安装费(元/次)" align="center" prop="feedbackUser" min-width="230" />
<el-table-column label="换画费(RMB)" align="center" prop="feedbackUser" width="150" />
<el-table-column label="供应商" align="left" prop="supplierName" width="180" />
<el-table-column label="城市" align="center" prop="city" width="130" />
<el-table-column label="媒体名称" align="center" prop="mediaPlacement" min-width="260" />
<el-table-column label="频次" align="center" prop="frequency" width="120" />
<el-table-column label="刊例价" align="center" prop="subscriptionPrice" width="120" />
<el-table-column label="单位" align="center" prop="unit" width="100" />
<el-table-column label="折扣" align="center" prop="discount" width="100" />
<el-table-column label="首次制作安装费(元/次)" align="center" prop="firstMakeFee" min-width="230" />
<el-table-column label="换画费(RMB)" align="center" prop="frameChangeFee" width="150" />
<el-table-column label="操作" width="130" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)"
@ -103,50 +105,151 @@
</el-table-column>
</el-table>
<pagination :total="total" v-model:page="queryParams.pageIndex" v-model:limit="queryParams.pageSize"
@pagination="getBusProblemFeedbackPage" />
@pagination="getPitchPricePage" />
</el-card>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" v-model="open" width="850px" class="my_dialog" align-center :destroy-on-close="true"
:close-on-click-modal="false">
<el-form ref="pitchPriceRef" :model="form" :rules="rules" label-width="140px" class="myInsertForm">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型" style="min-width: 30px;" clearable>
<el-option v-for="item in types" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="供应商" prop="busSupplierId">
<el-select class="filterSelect" v-model="form.busSupplierId" filterable remote
reserve-keyword :remote-method="getSupplierList" :loading="selectLoading"
placeholder="请输入" remote-show-suffix clearable>
<el-option v-for="item in supplierList" :key="item.supplierId"
:label="item.supplierName" :value="item.supplierId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="城市" prop="city">
<el-input v-model="form.city" placeholder="请输入城市" clearable />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 1">
<el-form-item label="场站" prop="station">
<el-input v-model="form.station" placeholder="请输入场站" clearable />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 1 || form.type == 3">
<el-form-item label="媒体位置/名称" prop="mediaPlacement">
<el-input v-model="form.mediaPlacement" placeholder="请输入媒体位置/名称" clearable />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 2">
<el-form-item label="资源描述" prop="resourceDesc">
<el-input v-model="form.resourceDesc" placeholder="请输入资源描述" clearable />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 1 || form.type == 3">
<el-form-item label="频次" prop="frequency">
<el-input v-model="form.frequency" placeholder="请输入频次" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="单位" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单位" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="刊例价" prop="subscriptionPrice">
<el-input v-model="form.subscriptionPrice" placeholder="请输入刊例价" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="折扣" prop="discount">
<el-input v-model="form.discount" placeholder="请输入折扣" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="首次制作安装费" prop="firstMakeFee">
<el-input v-model="form.firstMakeFee" placeholder="请输入首次制作安装费" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="换画费" prop="frameChangeFee">
<el-input v-model="form.frameChangeFee" placeholder="请输入换画费" clearable />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.type == 2">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" :rows="5" type="textarea" placeholder="请输入备注" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button class="my-cancel-btn" @click="cancel"> </el-button>
<el-button class="my-confirm-btn" type="primary" @click="submitForm"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Post">
import { onMounted, ref } from 'vue';
import { listBusSupplier } from "@/api/supplier"
import { busSupplierComparePricePage, addBusSupplierComparePrice, updateBusSupplierComparePrice, deleteBusSupplierComparePrice, getBusSupplierComparePrice } from "@/api/pitchPrice"
import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png'
const bgStore = useBackgroundStore()
const { proxy } = getCurrentInstance()
//
const supplierList = ref([])
// 1- 2- 3-
const types = ref([
{ value: 0, label: '高铁' },
{ value: 1, label: '候车亭' },
{ value: 2, label: '门禁道闸' },
{ value: 1, label: '高铁' },
{ value: 2, label: '候车厅' },
{ value: 3, label: '门禁道闸' },
])
const feedbackList = ref([])
const title = ref('新建')
const open = ref(false)
const loading = ref(true)
const selectLoading = ref(false)
const showSearch = ref(true)
const total = ref(0)
const dateRange = ref([])
const pitchPriceList = ref([])
const data = reactive({
form: {},
queryParams: {
pageIndex: 1,
pageSize: 10,
supplierId: undefined,
type: 0
busSupplierId: undefined,
type: 1 //1- 2- 3-
},
rules: {
content: [{ required: true, message: "反馈内容不能为空", trigger: "blur" }]
type: [{ required: true, message: "类型不能为空", trigger: "change" }],
busSupplierId: [{ required: true, message: "供应商不能为空", trigger: "change" }],
city: [{ required: true, message: "城市不能为空", trigger: "blur" }],
station: [{ required: true, message: "场站不能为空", trigger: "blur" }],
mediaPlacement: [{ required: true, message: "媒体位置不能为空", trigger: "blur" }],
frequency: [{ required: true, message: "频次不能为空", trigger: "blur" }],
resourceDesc: [{ required: true, message: "资源描述不能为空", trigger: "blur" }],
subscriptionPrice: [{ required: true, message: "刊例价不能为空", trigger: "blur" }],
discount: [{ required: true, message: "折扣不能为空", trigger: "blur" }],
unit: [{ required: true, message: "单位不能为空", trigger: "blur" }],
firstMakeFee: [{ required: true, message: "首次制作安装费不能为空", trigger: "blur" }],
frameChangeFee: [{ required: true, message: "换画费不能为空", trigger: "blur" }]
}
})
const { queryParams, form, rules } = toRefs(data)
//
const getSupplierList = (queryText) => {
if (queryText) {
selectLoading.value = true
@ -160,80 +263,90 @@ const getSupplierList = (queryText) => {
}
}
//
const handleDateChange = (val) => {
dateRange.value = val;
queryParams.value.startDate = val[0]
queryParams.value.endDate = val[1]
};
/** 查询反馈问题列表 */
const getBusProblemFeedbackPage = () => {
loading.value = false
// busProblemFeedbackPage(queryParams.value).then(response => {
// feedbackList.value = response.data.list
// total.value = response.data.total
// loading.value = false
// })
// 稿
const getPitchPricePage = () => {
loading.value = true
busSupplierComparePricePage(queryParams.value).then(res => {
pitchPriceList.value = res.data.list
total.value = res.data.total
loading.value = false
})
}
//
const handleChangeType = (val) => {
queryParams.value.type = val
pitchPriceList.value = []
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageIndex = 1
getBusProblemFeedbackPage()
getPitchPricePage()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryParams.value = {
pageIndex: 1,
pageSize: 10,
feedbackUser: undefined,
startDate: undefined,
endDate: undefined
}
queryParams.value.pageIndex = 1
handleQuery()
}
//
const handleImport = () => {
//
const handleAdd = () => {
title.value = '新建'
form.value.type = 1
open.value = true
}
//
const handleUpdate = (row) => {
form.value = {
feedbackUser: undefined,
content: undefined
}
getBusProblemFeedback(row.id).then(res => {
getBusSupplierComparePrice(row.id).then(res => {
form.value = res.data
if (form.value.busSupplierId) {
listBusSupplier({}).then(res => {
supplierList.value = res.data
})
}
open.value = true
})
}
//
const handleImport = () => {
}
const cancel = () => {
open.value = false
form.value = {}
}
const submitForm = () => {
proxy.$refs["feedBackRef"].validate(valid => {
proxy.$refs["pitchPriceRef"].validate(valid => {
if (valid) {
updateBusProblemFeedback(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功")
getBusProblemFeedbackPage()
open.value = false
form.value = {}
proxy.resetForm("feedBackRef")
})
if (form.value.id != undefined) {
updateBusSupplierComparePrice(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功")
cancel()
getPitchPricePage()
})
} else {
addBusSupplierComparePrice(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功")
cancel()
getPitchPricePage()
})
}
}
})
}
/** 删除按钮操作 */
const handleDelete = (row) => {
proxy.$modal.confirm('是否确认删除该问题吗?').then(function () {
return deleteBusProblemFeedback(row.id)
proxy.$modal.confirm('是否确认删除该比稿价格吗?').then(function () {
return deleteBusSupplierComparePrice(row.id)
}).then(() => {
getBusProblemFeedbackPage()
getPitchPricePage()
proxy.$modal.msgSuccess("删除成功")
}).catch(() => { })
}
@ -241,6 +354,6 @@ const handleDelete = (row) => {
//
onMounted(() => {
bgStore.setBgImage(otherbg)
getBusProblemFeedbackPage()
getPitchPricePage()
});
</script>

View File

@ -330,7 +330,7 @@ const getCountyList = (value) => {
/** 查询供应商分页列表 */
const getSupplierPageList = () => {
loading.value = false
loading.value = true
busSupplierPage(queryParams.value).then(res => {
res.data.list.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
@ -465,7 +465,7 @@ const handleUpdate = (row) => {
const handleLogs = (row) => {
showLogs.value = true
nextTick(() => {
// supplierLogsRef.value.initForm('', row)
supplierLogsRef.value.initLog(row)
})
}
// 稿

View File

@ -63,7 +63,7 @@
{{ detailForm.meitiGuishu }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="媒体年限" prop="business_department">
{{ detailForm.meitiNianxian }}
</el-form-item>
@ -260,7 +260,7 @@
<el-table-column label="媒体名称" align="left" prop="medioName" width="360">
<template #default="scope">
<span class="supplierNameLabel" @click="handleOpenMedio">{{ scope.row.medioName
}}</span>
}}</span>
</template>
</el-table-column>
<el-table-column label="媒体编号" align="left" prop="medioCode" />

View File

@ -24,7 +24,7 @@
<el-col :span="12" style="text-align: right;">
<el-button-group>
<el-button v-for="(item, index) in ToolOptions" :key="index"
:type="activeIndex === index ? 'primary' : 'default'" @click="activeIndex = index">
:type="activeIndex === index ? 'primary' : 'default'" @click="handleChoseType(index)">
<img v-if="index == 0" :src="activeIndex === index ? item.activeIcon : item.defaultIcon" />
<img v-if="index == 1" :src="activeIndex === index ? item.activeIcon : item.defaultIcon" />
</el-button>
@ -32,76 +32,108 @@
</el-col>
</el-row>
<el-table v-if="activeIndex == 0" v-loading="loading" :data="activities" height="calc(100vh - 250px)">
<el-table v-if="activeIndex == 0" v-loading="loading" :data="supplierLogList" height="calc(100vh - 310px)">
<el-table-column label="序号" align="center" width="80">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="供应商名称" align="left" prop="supplierName" width="230" :show-overflow-tooltip="true" />
<el-table-column label="操作类型" align="left" prop="type" width="100" :show-overflow-tooltip="true" />
<el-table-column label="操作人" align="center" prop="user" width="160" :show-overflow-tooltip="true" />
<el-table-column label="操作时间" align="center" prop="timestamp" width="150" :show-overflow-tooltip="true" />
<el-table-column label="变更字段" align="center" prop="content" min-width="210" :show-overflow-tooltip="true">
<el-table-column label="操作类型" align="left" prop="operateType" width="100" :show-overflow-tooltip="true">
<template #default="scope">
<el-tag v-if="scope.row.operateType == 'ADD'" type="primary" effect="dark">新增</el-tag>
<el-tag v-if="scope.row.operateType == 'UPDATE'" type="primary" effect="dark">编辑</el-tag>
</template>
</el-table-column>
<el-table-column label="操作人" align="center" prop="createRealName" width="160"
:show-overflow-tooltip="true" />
<el-table-column label="操作时间" align="center" prop="createTime" width="150" :show-overflow-tooltip="true" />
<el-table-column label="变更字段" align="left" prop="content" min-width="210">
<template #default="scope">
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
<el-table :data="detailTable" height="230px">
<el-table-column label="字段名称" align="left" prop="type" min-width="100"
:show-overflow-tooltip="true" />
<el-table-column label="变更前" align="left" prop="type" min-width="100"
:show-overflow-tooltip="true" />
<el-table-column label="变更后" align="left" prop="type" min-width="100"
:show-overflow-tooltip="true" />
<el-table :data="JSON.parse(scope.row.updateContent)" height="230px">
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="fieldDescribeLale">{{ scope.row.fieldDescribe }}</span>
</template>
</el-table-column>
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="firstValLale">{{ scope.row.firstVal }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="secondValLale">{{ scope.row.secondVal }}</span>
</template>
</el-table-column>
</el-table>
<template #reference>
<span class="updatefiter" @click="handleOpenDetail(scope.row.supplierId)">{{
scope.row.content
}}</span>
<span class="updatefiter">{{ scope.row.updateDesc }}</span>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<div v-if="activeIndex == 1">
<el-timeline class="my-time-line" style="padding-left: 0;">
<el-timeline-item v-for="(activity, index) in activities" :key="index" placement="top"
:timestamp="activity.timestamp">
<div class="logsTitle mb20"><span class="mr10">{{ activity.user }}</span><span>{{ activity.type
}}</span>
<pagination v-if="activeIndex == 0" :total="total" v-model:page="queryParams.pageIndex"
v-model:limit="queryParams.pageSize" @pagination="getSupplierPageList" />
<div v-if="activeIndex == 1" v-loading="loading">
<el-timeline v-if="supplierLogList.length > 0" class="my-time-line" style="padding-left: 0;">
<el-timeline-item v-for="(activity, index) in supplierLogList" :key="index" placement="top"
:timestamp="activity.createTime">
<div class="logsTitle mb20">
<span class="mr10">{{ activity.createRealName }}</span>
<span v-if="activity.operateType == 'ADD'">新增</span>
<span v-if="activity.operateType == 'UPDATE'">编辑</span>
</div>
<ul class="defaultUL">
<li>
<span class="logsLable">变更字段</span>
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
<el-table :data="detailTable" height="230px">
<el-table-column label="字段名称" align="left" prop="type" min-width="100"
:show-overflow-tooltip="true" />
<el-table-column label="变更前" align="left" prop="type" min-width="100"
:show-overflow-tooltip="true" />
<el-table-column label="变更后" align="left" prop="type" min-width="100"
:show-overflow-tooltip="true" />
<el-table :data="JSON.parse(activity.updateContent)" height="230px">
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="fieldDescribeLale">{{ scope.row.fieldDescribe }}</span>
</template>
</el-table-column>
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="firstValLale">{{ scope.row.firstVal }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="secondValLale">{{ scope.row.secondVal }}</span>
</template>
</el-table-column>
</el-table>
<template #reference>
<span class="updatefiter">{{ activity.content }}</span>
<span class="updatefiter">{{ activity.updateDesc }}</span>
</template>
</el-popover>
</li>
</ul>
</el-timeline-item>
</el-timeline>
<el-empty v-else :image-size="500" description="暂无数据" />
</div>
</el-card>
</template>
<script setup>
import { onMounted, defineEmits, ref } from 'vue'
import { Close, Grid, Calendar } from '@element-plus/icons-vue'
import { defineEmits, ref } from 'vue'
import { Close, Search } from '@element-plus/icons-vue'
import iconList from '@/assets/images/iconList.png'
import iconTimeLine from '@/assets/images/iconTimeLine.png'
import iconListChose from '@/assets/images/iconListChose.png'
import iconTimeLineChose from '@/assets/images/iconTimeLineChose.png'
import { getBusSupplier } from "@/api/supplier"
import { busSupplierLogPage, listBusSupplierLog } from "@/api/supplierLogs"
const emit = defineEmits(['handleShowList']);
const ToolOptions = ref([
@ -109,52 +141,81 @@ const ToolOptions = ref([
{ defaultIcon: iconTimeLine, activeIcon: iconTimeLineChose }
])
const activeIndex = ref(0)
const supplierName = ref(null)
const supplierLogList = ref([])
const detailTable = ref([])
const loading = ref(false)
const total = ref(0)
const queryParams = ref({
keyword: undefined
})
pageIndex: 1,
pageSize: 10,
keyword: undefined,
busSupplierId: undefined
})
const activities = [{
content: '其他: ; 年营收金额: ; 供应商所在城市: 山西/长治市/东湖区; 税点: ; 合作采购金额: 0.0; 联系人职务: ; 发票类型: ; 不良记录信息: ; 邮箱: ;其他: ; 年营收金额: ; 供应商所在城市: 山西/长治市/东湖区; 税点: ; 合作采购金额: 0.0; 联系人职务: ; 发票类型: ; 不良记录信息: ; 邮箱: ; ',
content2: '其他: ; 年营收金额: 待定; 供应商所在城市: 山西/长治市; 税点: 待定; 合作采购金额: 0; 联系人职务: 待定; 发票类型: 暂定; 不良记录信息: ; 邮箱: ; ',
timestamp: '2018-04-15',
user: '优客传媒管理员',
type: '修改'
},
{
content: '其他: ; 年营收金额: ; 供应商所在城市: 山西/长治市/东湖区; 税点: ; 合作采购金额: 0.0; 联系人职务: ; 发票类型: ; 不良记录信息: ; 邮箱: ; ',
content2: '其他: ; 年营收金额: 待定; 供应商所在城市: 山西/长治市; 税点: 待定; 合作采购金额: 0; 联系人职务: 待定; 发票类型: 暂定; 不良记录信息: ; 邮箱: ; ',
timestamp: '2018-04-13',
user: '优客传媒管理员',
type: '修改'
},
{
content: '其他: ; 年营收金额: ; 供应商所在城市: 山西/长治市/东湖区; 税点: ; 合作采购金额: 0.0; 联系人职务: ; 发票类型: ; 不良记录信息: ; 邮箱: ; ',
content2: '其他: ; 年营收金额: 待定; 供应商所在城市: 山西/长治市; 税点: 待定; 合作采购金额: 0; 联系人职务: 待定; 发票类型: 暂定; 不良记录信息: ; 邮箱: ; ',
timestamp: '2018-04-11',
user: '优客传媒管理员',
type: '新增'
},
]
//
const handleChoseType = (index) => {
activeIndex.value = index
resetQuery()
}
/** 搜索按钮操作 */
const handleQuery = () => {
getSupplierPageList()
if (activeIndex.value == 0) getSupplierPageList()
else getSupplierList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryParams.value = {
keyword: undefined
if (activeIndex.value == 0) {
queryParams.value.pageIndex = 1
queryParams.value.pageSize = 10
}
else {
queryParams.value.pageIndex = undefined
queryParams.value.pageSize = undefined
}
handleQuery()
}
//
const getSupplierPageList = () => {
loading.value = true
busSupplierLogPage(queryParams.value).then(res => {
res.data.list.forEach(item => {
item.supplierName = supplierName.value
});
supplierLogList.value = res.data.list
total.value = res.data.total
loading.value = false
})
}
//
const getSupplierList = () => {
loading.value = true
listBusSupplierLog(queryParams.value).then(res => {
res.data.forEach(item => {
item.supplierName = supplierName.value
console.log(JSON.parse(item.updateContent))
});
supplierLogList.value = res.data
loading.value = false
})
}
//
const handleClose = () => {
emit('handleShowList')
}
//
const initLog = (_row) => {
queryParams.value.busSupplierId = _row.supplierId
supplierName.value = _row.supplierName
activeIndex.value = 0
getSupplierPageList()
}
// \
defineExpose({
initLog
});
</script>
<style lang='scss'>
.el-button,
@ -234,4 +295,25 @@ const handleClose = () => {
.logsValue {
color: #1A75E6;
}
.fieldDescribeLale {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
color: #1E1E1E;
}
.firstValLale {
font-family: Arial;
font-weight: 400;
font-size: 16px;
color: #1E1E1E;
}
.secondValLale {
font-family: Arial;
font-weight: 400;
font-size: 16px;
color: #985656;
}
</style>