提交媒体代码

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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