This commit is contained in:
yuhawu 2025-08-25 09:48:12 +08:00
parent 830e78e376
commit 263a27c6a4
17 changed files with 2049 additions and 2034 deletions

View File

@ -15,3 +15,6 @@ export { userLoginApi } from './modules/userLogin'
export { priceTemplateApi } from './modules/priceTemplate' export { priceTemplateApi } from './modules/priceTemplate'
export { filterSetApi } from './modules/filterSet' export { filterSetApi } from './modules/filterSet'
export { shopGoodsPublishedApi } from './modules/shopGoodsPublished' export { shopGoodsPublishedApi } from './modules/shopGoodsPublished'
// 导出店铺订单接口
export * as shopOrderApi from './modules/shopOrder'

View File

@ -28,6 +28,11 @@ export function setupResponseInterceptors(instance) {
return response; return response;
} }
// 如果是获取图片接口,直接返回字符串数据
if (config.url && config.url.includes('/zhishu/image/getImage')) {
return data;
}
// 对于普通的JSON响应进行业务逻辑检查 // 对于普通的JSON响应进行业务逻辑检查
if (data.code != 200) { if (data.code != 200) {
const error = new Error(data.message || '业务逻辑错误'); const error = new Error(data.message || '业务逻辑错误');

View File

@ -4,7 +4,7 @@ const ImageApi = {
/** /**
* 获取商品标准类目接口 * 获取商品标准类目接口
*/ */
getImage: (data) => instance.get('/zhishu/image/getImage', data), getImage: (params) => instance.get('/zhishu/image/getImage', { params }),
/** /**
* 用户上传图片接口 * 用户上传图片接口

View File

@ -65,7 +65,13 @@ const depotApi = {
* @param {Number|String} id - 二级货架ID * @param {Number|String} id - 二级货架ID
* @returns {Promise} - 请求Promise * @returns {Promise} - 请求Promise
*/ */
getFreightByShelveId: (id) => instance.get(`/depot/freight/${id}`) getFreightByShelveId: (id) => instance.get(`/depot/freight/${id}`),
/**
* 获取仓库名称列表
* @returns {Promise} - 请求Promise
*/
getDepotNameList: () => instance.get('/depot/nameList')
} }
// 导出模块 // 导出模块

View File

@ -9,9 +9,15 @@ export const getProvinces = () => {
return instance.get('/district/provinces'); return instance.get('/district/provinces');
}; };
// 获取运费信息
export const getFreInfo = (templateId) => {
return instance.get(`/district/freInfo/${templateId}`);
};
// 为了向后兼容,也导出整个对象 // 为了向后兼容,也导出整个对象
export const districtApi = { export const districtApi = {
getProvinces, getProvinces,
getFreInfo
}; };
export default districtApi; export default districtApi;

View File

@ -57,6 +57,11 @@ export const updateSyncOrderStatus = (id, isSynOrder) => {
}); });
}; };
// 加密URL方法
export const encrypUrlMenthod = (data) => {
return instance.post('/shop/encrypUrl', data);
};
// 为了向后兼容,也导出整个对象 // 为了向后兼容,也导出整个对象
export const shopApi = { export const shopApi = {
getShopList, getShopList,
@ -66,5 +71,6 @@ export const shopApi = {
updateShop, updateShop,
deleteShop, deleteShop,
batchDeleteShop, batchDeleteShop,
updateSyncOrderStatus updateSyncOrderStatus,
encrypUrlMenthod
}; };

View File

@ -92,7 +92,17 @@ const taskApi = {
// 中心图书接口 // 中心图书接口
centerBooks: (jsonStr) => instance.post('/task/centerBooks', `jsonStr=${jsonStr}`, { centerBooks: (jsonStr) => instance.post('/task/centerBooks', `jsonStr=${jsonStr}`, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' } headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}) }),
// 获取重复数据
getRepeatData: (shopId, pageNum, pageSize) => instance.get(`/task/getRepeatData?shopId=${shopId}&pageNum=${pageNum}&pageSize=${pageSize}`),
// 根据任务类型查询任务状态
selectTaskStatusByTaskType: (shopId, taskType) => instance.get(`/task/selectTaskStatusByTaskType?shopId=${shopId}&taskType=${taskType}`),
// 获取店铺任务总数
getShopTaskAllNum: (shopId, taskType) => instance.get(`/task/getShopTaskAllNum?shopId=${shopId}&taskType=${taskType}`),
}; };
// 导出模块 // 导出模块

View File

@ -1,10 +1,14 @@
import RefreshButton from './RefreshButton.vue' import RefreshButton from './RefreshButton.vue'
import ActionBar from './ActionBar.vue' import ActionBar from './ActionBar.vue'
import RightToolbar from './RightToolbar.vue'
import Pagination from './Pagination.vue'
// 全局组件列表 // 全局组件列表
const components = [ const components = [
RefreshButton, RefreshButton,
ActionBar ActionBar,
RightToolbar,
Pagination
] ]
// 全局注册方法 // 全局注册方法

View File

@ -79,6 +79,14 @@ const menuData = shallowRef([
{ {
title: '价格模板', title: '价格模板',
path: '/shop/priceTemplate' path: '/shop/priceTemplate'
},
{
title: '发布商品数据',
path: '/shop/shopPublishedData'
},,
{
title: '店铺商品',
path: '/shop/pddGoods'
} }
] ]
}, },
@ -111,6 +119,10 @@ const menuData = shallowRef([
title: '已发布书品管理', title: '已发布书品管理',
path: '/book/shopGoodsPublished' path: '/book/shopGoodsPublished'
// permission: 'book:shopGoodsPublished:view' // permission: 'book:shopGoodsPublished:view'
},
{
title: '书品导入任务列表',
path: '/book/excelTask'
} }
] ]
}, },
@ -130,6 +142,18 @@ const menuData = shallowRef([
} }
] ]
}, },
{
title: '订单中心',
path: '/order',
icon: Box,
children: [
{
title: '订单信息',
path: '/order/shopOrder'
//
}
]
},
{ {
title: '工具管理', title: '工具管理',
path: '/tools', path: '/tools',
@ -154,6 +178,10 @@ const menuData = shallowRef([
{ {
title: '违规列表', title: '违规列表',
path: '/examine/violation/list' path: '/examine/violation/list'
},
{
title: '图书审核管理',
path: '/bookAudit'
} }
] ]
}, },
@ -192,6 +220,16 @@ const menuData = shallowRef([
} }
] ]
}, },
{
title: '申请入驻',
path: '/audit',
children: [
{
title: '审核',
path: '/audit/audit',
}
]
},
{ {
title: '升级完整版', title: '升级完整版',
path: '/NewUser', path: '/NewUser',

View File

@ -82,6 +82,11 @@ const routes = [{
component: () => import('@/views/Examine/Violation/List.vue'), component: () => import('@/views/Examine/Violation/List.vue'),
meta: { title: '违规列表' } meta: { title: '违规列表' }
}, },
{
path: '/bookAudit',
component: () => import('@/views/bookAudit/index.vue'),
meta: { title: '图书审核管理' }
},
// 日志管理 // 日志管理
{ {
path: '/log/runningLog/list', path: '/log/runningLog/list',
@ -153,6 +158,31 @@ const routes = [{
path: '/purse/userRecharge', path: '/purse/userRecharge',
component: () => import('@/views/UserRecharge/index.vue'), component: () => import('@/views/UserRecharge/index.vue'),
meta: { title: '用户充值' } meta: { title: '用户充值' }
},
{
path: '/shop/shopPublishedData',
component: () => import('@/views/onlineProducts/index.vue'),
meta: { title: '发布商品数据' }
},
{
path: '/order/shopOrder',
component: () => import('@/views/shopOrder/index.vue'),
meta: { title: '订单信息' }
},
{
path: '/book/excelTask',
component: () => import('@/views/excelTask/index.vue'),
meta: { title: '书品导入任务列表' }
},
{
path: '/audit/audit',
component: () => import('@/views/Audit/index.vue'),
meta: { title: '审核' }
},
{
path: '/shop/pddGoods',
component: () => import('@/views/pddGoods/index.vue'),
meta: { title: '店铺商品' }
} }
] ]

View File

@ -175,7 +175,10 @@
</div> </div>
</template> </template>
<script setup name="ShopGoodsPublished"> <script setup>
defineOptions({
name: 'ShopGoodsPublished'
})
import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished' import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished'
import { getListShop } from '@/api/modules/shop' import { getListShop } from '@/api/modules/shop'
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'

View File

@ -248,7 +248,10 @@
</div> </div>
</template> </template>
<script setup name="Task"> <script setup>
defineOptions({
name: 'Task'
})
import { taskApi } from '@/api/modules/task.js'; import { taskApi } from '@/api/modules/task.js';
import { pddApi } from '@/api/modules/pdd.js'; import { pddApi } from '@/api/modules/pdd.js';
import { shopApi } from '@/api/modules/shop.js'; import { shopApi } from '@/api/modules/shop.js';

View File

@ -173,7 +173,10 @@
</div> </div>
</template> </template>
<script setup name="UserRecharge"> <script setup>
defineOptions({
name: 'UserRecharge'
})
import { ref, reactive, onMounted, getCurrentInstance, toRefs } from 'vue' import { ref, reactive, onMounted, getCurrentInstance, toRefs } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { userRechargeApi } from '@/api/modules/userRecharge.js' import { userRechargeApi } from '@/api/modules/userRecharge.js'

View File

@ -237,7 +237,10 @@
</template> </template>
<script setup name="Logistics"> <script setup>
defineOptions({
name: 'Logistics'
})
import { ref, reactive, computed, onMounted, toRefs } from 'vue' import { ref, reactive, computed, onMounted, toRefs } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'

View File

@ -1,12 +1,14 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<transition enter-active-class="animate__animated animate__fadeInDown" leave-active-class="animate__animated animate__fadeOutUp"> <transition enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutUp">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true"> <el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="店铺" prop="shopId"> <el-form-item label="店铺" prop="shopId">
<el-select v-model="queryParams.shopId" placeholder="请选择店铺"> <el-select v-model="queryParams.shopId" placeholder="请选择店铺">
<el-option v-for="item in shopList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in shopList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商家编码" prop="itemNumber"> <el-form-item label="商家编码" prop="itemNumber">
@ -25,7 +27,8 @@
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['zhishu:shopGoodsPublished:remove']">删除</el-button> <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
v-hasPermi="['zhishu:shopGoodsPublished:remove']">删除</el-button>
</el-col> </el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -35,13 +38,8 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="图示" align="center" prop="bookPic" :show-overflow-tooltip="true"> <el-table-column label="图示" align="center" prop="bookPic" :show-overflow-tooltip="true">
<template #default="{ row }"> <template #default="{ row }">
<el-image <el-image style="width: 50px;height: 50px" :src="row.bookPic" fit="scale-down"
style="width: 50px;height: 50px" :preview-src-list="[row.bookPic]" preview-teleported>
:src="row.bookPic"
fit="scale-down"
:preview-src-list="[row.bookPic]"
preview-teleported
>
<template #error> <template #error>
<div class="image-slot"> <div class="image-slot">
暂无 暂无
@ -50,72 +48,67 @@
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商家编码" align="left" prop="itemNumber"/> <el-table-column label="商家编码" align="left" prop="itemNumber" />
<el-table-column label="线上商品名称" align="left" prop="goodsName" :show-overflow-tooltip="true"> <el-table-column label="线上商品名称" align="left" prop="goodsName" :show-overflow-tooltip="true">
<template #default="{ row }"> <template #default="{ row }">
<div class="truncate-cell"> <div class="truncate-cell">
<el-link <el-link v-if="row.shopType === 1" type="primary"
v-if="row.shopType === 1" :href="`https://mobile.yangkeduo.com/goods.html?goods_id=${row.onlineId}`" target="_blank"
type="primary" :underline="false">
:href="`https://mobile.yangkeduo.com/goods.html?goods_id=${row.onlineId}`"
target="_blank"
:underline="false"
>
{{ row.goodsName }} {{ row.goodsName }}
</el-link> </el-link>
<el-link <el-link v-else-if="row.shopType === 2" type="primary"
v-else-if="row.shopType === 2" :href="`https://book.kongfz.com/${row.mallId}/${row.onlineId}`" target="_blank" :underline="false">
type="primary"
:href="`https://book.kongfz.com/${row.mallId}/${row.onlineId}`"
target="_blank"
:underline="false"
>
{{ row.goodsName }} {{ row.goodsName }}
</el-link> </el-link>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="店铺" align="left" prop="shopName"/> <el-table-column label="店铺" align="left" prop="shopName" />
<el-table-column label="线上商品/规格ID" align="left" prop="onlineId"/> <el-table-column label="线上商品/规格ID" align="left" prop="onlineId" />
<el-table-column label="状态" align="left" prop="status"> <el-table-column label="状态" align="left" prop="status">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row.status==0">在售</span> <span v-if="row.status == 0">在售</span>
<span v-else>未售</span> <span v-else>未售</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card> </el-card>
</div> </div>
</template> </template>
<script setup name="ShopGoodsPublished"> <script setup>
import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished'; defineOptions({
import { getListShop } from '@/api/zhishu/shop'; name: 'ShopGoodsPublished'
import { ref, reactive, toRefs, onMounted } from 'vue'; })
import { depotNameList } from '@/api/zhishu/shelves'; // import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished';
import { ElMessage, ElMessageBox } from 'element-plus'; import { shopGoodsPublishedApi } from '@/api/modules/shopGoodsPublished';
import { getListShop } from '@/api/modules/shop';
import { ref, reactive, toRefs, onMounted } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus';
// //
const shopGoodsPublishedList = ref([]); const shopGoodsPublishedList = ref([]);
const loading = ref(true); const loading = ref(true);
const showSearch = ref(true); const showSearch = ref(true);
const ids = ref([]); const ids = ref([]);
const single = ref(true); const single = ref(true);
const multiple = ref(true); const multiple = ref(true);
const total = ref(0); const total = ref(0);
const queryFormRef = ref(); const queryFormRef = ref();
const initFormData = { const initFormData = {
id: undefined, id: undefined,
shopGoodsId: undefined, shopGoodsId: undefined,
shopId: undefined, shopId: undefined,
@ -130,9 +123,9 @@
price: undefined, price: undefined,
createTime: undefined, createTime: undefined,
updateTime: undefined updateTime: undefined
} }
const data = reactive({ const data = reactive({
form: { ...initFormData }, form: { ...initFormData },
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -158,16 +151,16 @@
{ required: true, message: "主键不能为空", trigger: "blur" } { required: true, message: "主键不能为空", trigger: "blur" }
], ],
} }
}); });
const { queryParams, form, rules } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
// //
const getList = async () => { const getList = async () => {
loading.value = true; loading.value = true;
try { try {
const res = await getShopGoodsPublishedList(queryParams.value); const res = await shopGoodsPublishedApi.getShopGoodsPublishedList(queryParams.value);
shopGoodsPublishedList.value = res.data.rows || res.rows || []; shopGoodsPublishedList.value = res.data.list|| [];
total.value = res.data.total || res.total || 0; total.value = res.data.total || res.total || 0;
} catch (error) { } catch (error) {
console.error('获取列表失败:', error); console.error('获取列表失败:', error);
@ -175,28 +168,9 @@
} finally { } finally {
loading.value = false; loading.value = false;
} }
} }
const depotList = ref([]); const conditionCodeTypes = [
const selectedId = ref(null);
const handleDepotChange = (val) => {
queryParams.value.depotId = val?.id || null;
}
const loadData = async () => {
loading.value = true;
try {
const res = await depotNameList();
depotList.value = res.rows || [];
} catch (error) {
console.error('加载数据失败:', error);
} finally {
loading.value = false;
}
}
const conditionCodeTypes = [
{ value: '1', label: '一品' }, { value: '1', label: '一品' },
{ value: '2', label: '二品' }, { value: '2', label: '二品' },
{ value: '3', label: '三品' }, { value: '3', label: '三品' },
@ -211,29 +185,29 @@
{ value: '9', label: '九品' }, { value: '9', label: '九品' },
{ value: '9.5', label: '九五品' }, { value: '9.5', label: '九五品' },
{ value: '10', label: '全新' } { value: '10', label: '全新' }
]; ];
// //
const handleQuery = () => { const handleQuery = () => {
queryParams.value.pageNum = 1; queryParams.value.pageNum = 1;
getList(); getList();
} }
// //
const resetQuery = () => { const resetQuery = () => {
queryFormRef.value?.resetFields(); queryFormRef.value?.resetFields();
handleQuery(); handleQuery();
} }
// //
const handleSelectionChange = (selection) => { const handleSelectionChange = (selection) => {
ids.value = selection.map(item => item.id); ids.value = selection.map(item => item.id);
single.value = selection.length != 1; single.value = selection.length != 1;
multiple.value = !selection.length; multiple.value = !selection.length;
} }
// //
const handleDelete = async (row) => { const handleDelete = async (row) => {
const _ids = row?.id || ids.value; const _ids = row?.id || ids.value;
try { try {
await ElMessageBox.confirm('是否确认删除记录发布数据编号为"' + _ids + '"的数据项?', '警告', { await ElMessageBox.confirm('是否确认删除记录发布数据编号为"' + _ids + '"的数据项?', '警告', {
@ -242,7 +216,7 @@
type: 'warning' type: 'warning'
}); });
await deleteShopGoodsPublished(_ids); await shopGoodsPublishedApi.deleteShopGoodsPublished(_ids);
ElMessage.success("删除成功"); ElMessage.success("删除成功");
await getList(); await getList();
} catch (error) { } catch (error) {
@ -253,12 +227,12 @@
} finally { } finally {
loading.value = false; loading.value = false;
} }
} }
// //
const shopList = ref([]); const shopList = ref([]);
const getShopList = async () => { const getShopList = async () => {
try { try {
const res = await getListShop(); const res = await getListShop();
const data = res.data || res; const data = res.data || res;
@ -275,35 +249,34 @@
console.error('获取店铺列表失败:', error); console.error('获取店铺列表失败:', error);
ElMessage.error('获取店铺列表失败'); ElMessage.error('获取店铺列表失败');
} }
} }
onMounted(() => { onMounted(() => {
getList(); getList();
loadData(); // getShopList();
getShopList(); });
}); </script>
</script>
<style scoped> <style scoped>
/* 调整表头字体大小 */ /* 调整表头字体大小 */
:deep(.el-table__header) th .cell { :deep(.el-table__header) th .cell {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
/* 调整表格内容字体大小 */ /* 调整表格内容字体大小 */
.el-table { .el-table {
font-size: 17px !important; font-size: 17px !important;
} }
.truncate-cell { .truncate-cell {
max-width: 200px; max-width: 200px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.image-slot { .image-slot {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -312,5 +285,5 @@
background: #f5f7fa; background: #f5f7fa;
color: #909399; color: #909399;
font-size: 12px; font-size: 12px;
} }
</style> </style>

View File

@ -74,7 +74,7 @@
<div class="login-url"> <div class="login-url">
<p class="url-label">后台管理系统地址</p> <p class="url-label">后台管理系统地址</p>
<div class="url-box"> <div class="url-box">
<span class="url-text">https://erp.buzhiyushu.cn/</span> <a class="url-text" href="https://erp.buzhiyushu.cn/" target="_blank" rel="noopener noreferrer">https://erp.buzhiyushu.cn/</a>
<el-button type="primary" size="small" @click="copyLoginUrl" class="copy-btn"> <el-button type="primary" size="small" @click="copyLoginUrl" class="copy-btn">
复制链接 复制链接
</el-button> </el-button>

File diff suppressed because it is too large Load Diff