newadmin
This commit is contained in:
parent
830e78e376
commit
263a27c6a4
@ -14,4 +14,7 @@ export { userApi } from './modules/user'
|
||||
export { userLoginApi } from './modules/userLogin'
|
||||
export { priceTemplateApi } from './modules/priceTemplate'
|
||||
export { filterSetApi } from './modules/filterSet'
|
||||
export { shopGoodsPublishedApi } from './modules/shopGoodsPublished'
|
||||
export { shopGoodsPublishedApi } from './modules/shopGoodsPublished'
|
||||
|
||||
// 导出店铺订单接口
|
||||
export * as shopOrderApi from './modules/shopOrder'
|
||||
@ -28,6 +28,11 @@ export function setupResponseInterceptors(instance) {
|
||||
return response;
|
||||
}
|
||||
|
||||
// 如果是获取图片接口,直接返回字符串数据
|
||||
if (config.url && config.url.includes('/zhishu/image/getImage')) {
|
||||
return data;
|
||||
}
|
||||
|
||||
// 对于普通的JSON响应,进行业务逻辑检查
|
||||
if (data.code != 200) {
|
||||
const error = new Error(data.message || '业务逻辑错误');
|
||||
|
||||
@ -4,7 +4,7 @@ const ImageApi = {
|
||||
/**
|
||||
* 获取商品标准类目接口
|
||||
*/
|
||||
getImage: (data) => instance.get('/zhishu/image/getImage', data),
|
||||
getImage: (params) => instance.get('/zhishu/image/getImage', { params }),
|
||||
|
||||
/**
|
||||
* 用户上传图片接口
|
||||
@ -22,4 +22,4 @@ const ImageApi = {
|
||||
}
|
||||
|
||||
// 导出 pdd API 对象
|
||||
export { ImageApi };
|
||||
export { ImageApi };
|
||||
@ -65,8 +65,14 @@ const depotApi = {
|
||||
* @param {Number|String} id - 二级货架ID
|
||||
* @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')
|
||||
}
|
||||
|
||||
// 导出模块
|
||||
export { depotApi }
|
||||
export { depotApi }
|
||||
@ -9,9 +9,15 @@ export const getProvinces = () => {
|
||||
return instance.get('/district/provinces');
|
||||
};
|
||||
|
||||
// 获取运费信息
|
||||
export const getFreInfo = (templateId) => {
|
||||
return instance.get(`/district/freInfo/${templateId}`);
|
||||
};
|
||||
|
||||
// 为了向后兼容,也导出整个对象
|
||||
export const districtApi = {
|
||||
getProvinces,
|
||||
getFreInfo
|
||||
};
|
||||
|
||||
export default districtApi;
|
||||
@ -57,6 +57,11 @@ export const updateSyncOrderStatus = (id, isSynOrder) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 加密URL方法
|
||||
export const encrypUrlMenthod = (data) => {
|
||||
return instance.post('/shop/encrypUrl', data);
|
||||
};
|
||||
|
||||
// 为了向后兼容,也导出整个对象
|
||||
export const shopApi = {
|
||||
getShopList,
|
||||
@ -66,5 +71,6 @@ export const shopApi = {
|
||||
updateShop,
|
||||
deleteShop,
|
||||
batchDeleteShop,
|
||||
updateSyncOrderStatus
|
||||
updateSyncOrderStatus,
|
||||
encrypUrlMenthod
|
||||
};
|
||||
|
||||
@ -92,8 +92,18 @@ const taskApi = {
|
||||
// 中心图书接口
|
||||
centerBooks: (jsonStr) => instance.post('/task/centerBooks', `jsonStr=${jsonStr}`, {
|
||||
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}`),
|
||||
|
||||
};
|
||||
|
||||
// 导出模块
|
||||
export { taskApi };
|
||||
export { taskApi };
|
||||
@ -1,10 +1,14 @@
|
||||
import RefreshButton from './RefreshButton.vue'
|
||||
import ActionBar from './ActionBar.vue'
|
||||
import RightToolbar from './RightToolbar.vue'
|
||||
import Pagination from './Pagination.vue'
|
||||
|
||||
// 全局组件列表
|
||||
const components = [
|
||||
RefreshButton,
|
||||
ActionBar
|
||||
ActionBar,
|
||||
RightToolbar,
|
||||
Pagination
|
||||
]
|
||||
|
||||
// 全局注册方法
|
||||
@ -14,4 +18,4 @@ export default {
|
||||
app.component(component.name || component.__name, component)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -79,6 +79,14 @@ const menuData = shallowRef([
|
||||
{
|
||||
title: '价格模板',
|
||||
path: '/shop/priceTemplate'
|
||||
},
|
||||
{
|
||||
title: '发布商品数据',
|
||||
path: '/shop/shopPublishedData'
|
||||
},,
|
||||
{
|
||||
title: '店铺商品',
|
||||
path: '/shop/pddGoods'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -111,6 +119,10 @@ const menuData = shallowRef([
|
||||
title: '已发布书品管理',
|
||||
path: '/book/shopGoodsPublished'
|
||||
// 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: '工具管理',
|
||||
path: '/tools',
|
||||
@ -154,6 +178,10 @@ const menuData = shallowRef([
|
||||
{
|
||||
title: '违规列表',
|
||||
path: '/examine/violation/list'
|
||||
},
|
||||
{
|
||||
title: '图书审核管理',
|
||||
path: '/bookAudit'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -192,6 +220,16 @@ const menuData = shallowRef([
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '申请入驻',
|
||||
path: '/audit',
|
||||
children: [
|
||||
{
|
||||
title: '审核',
|
||||
path: '/audit/audit',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '升级完整版',
|
||||
path: '/NewUser',
|
||||
|
||||
@ -82,6 +82,11 @@ const routes = [{
|
||||
component: () => import('@/views/Examine/Violation/List.vue'),
|
||||
meta: { title: '违规列表' }
|
||||
},
|
||||
{
|
||||
path: '/bookAudit',
|
||||
component: () => import('@/views/bookAudit/index.vue'),
|
||||
meta: { title: '图书审核管理' }
|
||||
},
|
||||
// 日志管理
|
||||
{
|
||||
path: '/log/runningLog/list',
|
||||
@ -153,6 +158,31 @@ const routes = [{
|
||||
path: '/purse/userRecharge',
|
||||
component: () => import('@/views/UserRecharge/index.vue'),
|
||||
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: '店铺商品' }
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
@ -175,7 +175,10 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ShopGoodsPublished">
|
||||
<script setup>
|
||||
defineOptions({
|
||||
name: 'ShopGoodsPublished'
|
||||
})
|
||||
import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished'
|
||||
import { getListShop } from '@/api/modules/shop'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
|
||||
@ -248,7 +248,10 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Task">
|
||||
<script setup>
|
||||
defineOptions({
|
||||
name: 'Task'
|
||||
})
|
||||
import { taskApi } from '@/api/modules/task.js';
|
||||
import { pddApi } from '@/api/modules/pdd.js';
|
||||
import { shopApi } from '@/api/modules/shop.js';
|
||||
|
||||
@ -173,7 +173,10 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="UserRecharge">
|
||||
<script setup>
|
||||
defineOptions({
|
||||
name: 'UserRecharge'
|
||||
})
|
||||
import { ref, reactive, onMounted, getCurrentInstance, toRefs } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { userRechargeApi } from '@/api/modules/userRecharge.js'
|
||||
|
||||
@ -237,7 +237,10 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script setup name="Logistics">
|
||||
<script setup>
|
||||
defineOptions({
|
||||
name: 'Logistics'
|
||||
})
|
||||
import { ref, reactive, computed, onMounted, toRefs } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
|
||||
@ -1,122 +1,135 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition enter-active-class="animate__animated animate__fadeInDown" leave-active-class="animate__animated animate__fadeOutUp">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="店铺" prop="shopId">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家编码" prop="itemNumber">
|
||||
<el-input v-model="queryParams.itemNumber" placeholder="请输入编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['zhishu:shopGoodsPublished:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="shopGoodsPublishedList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="图示" align="center" prop="bookPic" :show-overflow-tooltip="true">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
style="width: 50px;height: 50px"
|
||||
:src="row.bookPic"
|
||||
fit="scale-down"
|
||||
:preview-src-list="[row.bookPic]"
|
||||
preview-teleported
|
||||
>
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
暂无
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商家编码" align="left" prop="itemNumber"/>
|
||||
|
||||
<el-table-column label="线上商品名称" align="left" prop="goodsName" :show-overflow-tooltip="true">
|
||||
<template #default="{ row }">
|
||||
<div class="truncate-cell">
|
||||
<el-link
|
||||
v-if="row.shopType === 1"
|
||||
type="primary"
|
||||
:href="`https://mobile.yangkeduo.com/goods.html?goods_id=${row.onlineId}`"
|
||||
target="_blank"
|
||||
:underline="false"
|
||||
>
|
||||
{{ row.goodsName }}
|
||||
</el-link>
|
||||
|
||||
<el-link
|
||||
v-else-if="row.shopType === 2"
|
||||
type="primary"
|
||||
:href="`https://book.kongfz.com/${row.mallId}/${row.onlineId}`"
|
||||
target="_blank"
|
||||
:underline="false"
|
||||
>
|
||||
{{ row.goodsName }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="店铺" align="left" prop="shopName"/>
|
||||
|
||||
<el-table-column label="线上商品/规格ID" align="left" prop="onlineId"/>
|
||||
|
||||
<el-table-column label="状态" align="left" prop="status">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.status==0">在售</span>
|
||||
<span v-else>未售</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ShopGoodsPublished">
|
||||
import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished';
|
||||
import { getListShop } from '@/api/zhishu/shop';
|
||||
import { ref, reactive, toRefs, onMounted } from 'vue';
|
||||
import { depotNameList } from '@/api/zhishu/shelves';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
// 响应式数据
|
||||
const shopGoodsPublishedList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref();
|
||||
|
||||
const initFormData = {
|
||||
id: undefined,
|
||||
<div class="p-2">
|
||||
<transition enter-active-class="animate__animated animate__fadeInDown"
|
||||
leave-active-class="animate__animated animate__fadeOutUp">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="店铺" prop="shopId">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家编码" prop="itemNumber">
|
||||
<el-input v-model="queryParams.itemNumber" placeholder="请输入编码" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||
v-hasPermi="['zhishu:shopGoodsPublished:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="shopGoodsPublishedList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="图示" align="center" prop="bookPic" :show-overflow-tooltip="true">
|
||||
<template #default="{ row }">
|
||||
<el-image style="width: 50px;height: 50px" :src="row.bookPic" fit="scale-down"
|
||||
:preview-src-list="[row.bookPic]" preview-teleported>
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
暂无
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商家编码" align="left" prop="itemNumber" />
|
||||
|
||||
<el-table-column label="线上商品名称" align="left" prop="goodsName" :show-overflow-tooltip="true">
|
||||
<template #default="{ row }">
|
||||
<div class="truncate-cell">
|
||||
<el-link v-if="row.shopType === 1" type="primary"
|
||||
:href="`https://mobile.yangkeduo.com/goods.html?goods_id=${row.onlineId}`" target="_blank"
|
||||
:underline="false">
|
||||
{{ row.goodsName }}
|
||||
</el-link>
|
||||
|
||||
<el-link v-else-if="row.shopType === 2" type="primary"
|
||||
:href="`https://book.kongfz.com/${row.mallId}/${row.onlineId}`" target="_blank" :underline="false">
|
||||
{{ row.goodsName }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="店铺" align="left" prop="shopName" />
|
||||
|
||||
<el-table-column label="线上商品/规格ID" align="left" prop="onlineId" />
|
||||
|
||||
<el-table-column label="状态" align="left" prop="status">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.status == 0">在售</span>
|
||||
<span v-else>未售</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineOptions({
|
||||
name: 'ShopGoodsPublished'
|
||||
})
|
||||
// import { getShopGoodsPublishedList, deleteShopGoodsPublished } from '@/api/modules/shopGoodsPublished';
|
||||
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 loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
|
||||
const queryFormRef = ref();
|
||||
|
||||
const initFormData = {
|
||||
id: undefined,
|
||||
shopGoodsId: undefined,
|
||||
shopId: undefined,
|
||||
goodsName: undefined,
|
||||
shopName: undefined,
|
||||
platformId: undefined,
|
||||
status: undefined,
|
||||
itemNumber: undefined,
|
||||
bookPic: undefined,
|
||||
isbn: undefined,
|
||||
conditionCode: undefined,
|
||||
price: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined
|
||||
}
|
||||
|
||||
const data = reactive({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopGoodsId: undefined,
|
||||
shopId: undefined,
|
||||
goodsName: undefined,
|
||||
@ -129,188 +142,148 @@
|
||||
conditionCode: undefined,
|
||||
price: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined
|
||||
updateTime: undefined,
|
||||
depotId: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "主键不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
|
||||
const data = reactive({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopGoodsId: undefined,
|
||||
shopId: undefined,
|
||||
goodsName: undefined,
|
||||
shopName: undefined,
|
||||
platformId: undefined,
|
||||
status: undefined,
|
||||
itemNumber: undefined,
|
||||
bookPic: undefined,
|
||||
isbn: undefined,
|
||||
conditionCode: undefined,
|
||||
price: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined,
|
||||
depotId: undefined,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "主键不能为空", trigger: "blur" }
|
||||
],
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 查询记录发布数据列表
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await shopGoodsPublishedApi.getShopGoodsPublishedList(queryParams.value);
|
||||
shopGoodsPublishedList.value = res.data.list|| [];
|
||||
total.value = res.data.total || res.total || 0;
|
||||
} catch (error) {
|
||||
console.error('获取列表失败:', error);
|
||||
ElMessage.error('获取列表失败');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
const conditionCodeTypes = [
|
||||
{ value: '1', label: '一品' },
|
||||
{ value: '2', label: '二品' },
|
||||
{ value: '3', label: '三品' },
|
||||
{ value: '4', label: '四品' },
|
||||
{ value: '5', label: '五品' },
|
||||
{ value: '6', label: '六品' },
|
||||
{ value: '6.5', label: '六五品' },
|
||||
{ value: '7', label: '七品' },
|
||||
{ value: '7.5', label: '七五品' },
|
||||
{ value: '8', label: '八品' },
|
||||
{ value: '8.5', label: '八五品' },
|
||||
{ value: '9', label: '九品' },
|
||||
{ value: '9.5', label: '九五品' },
|
||||
{ value: '10', label: '全新' }
|
||||
];
|
||||
|
||||
// 搜索按钮操作
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 重置按钮操作
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
// 删除按钮操作
|
||||
const handleDelete = async (row) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
try {
|
||||
await ElMessageBox.confirm('是否确认删除记录发布数据编号为"' + _ids + '"的数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
});
|
||||
|
||||
await shopGoodsPublishedApi.deleteShopGoodsPublished(_ids);
|
||||
ElMessage.success("删除成功");
|
||||
await getList();
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
console.error('删除失败:', error);
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 查询记录发布数据列表
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const res = await getShopGoodsPublishedList(queryParams.value);
|
||||
shopGoodsPublishedList.value = res.data.rows || res.rows || [];
|
||||
total.value = res.data.total || res.total || 0;
|
||||
} catch (error) {
|
||||
console.error('获取列表失败:', error);
|
||||
ElMessage.error('获取列表失败');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 店铺列表
|
||||
const shopList = ref([]);
|
||||
|
||||
const getShopList = async () => {
|
||||
try {
|
||||
const res = await getListShop();
|
||||
const data = res.data || res;
|
||||
|
||||
if (!data || data.length === 0) {
|
||||
shopList.value = [];
|
||||
} else {
|
||||
shopList.value = data.map(item => ({
|
||||
value: item.id,
|
||||
label: item.shopName
|
||||
}));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取店铺列表失败:', error);
|
||||
ElMessage.error('获取店铺列表失败');
|
||||
}
|
||||
|
||||
const depotList = ref([]);
|
||||
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: '2', label: '二品' },
|
||||
{ value: '3', label: '三品' },
|
||||
{ value: '4', label: '四品' },
|
||||
{ value: '5', label: '五品' },
|
||||
{ value: '6', label: '六品' },
|
||||
{ value: '6.5', label: '六五品' },
|
||||
{ value: '7', label: '七品' },
|
||||
{ value: '7.5', label: '七五品' },
|
||||
{ value: '8', label: '八品' },
|
||||
{ value: '8.5', label: '八五品' },
|
||||
{ value: '9', label: '九品' },
|
||||
{ value: '9.5', label: '九五品' },
|
||||
{ value: '10', label: '全新' }
|
||||
];
|
||||
|
||||
// 搜索按钮操作
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 重置按钮操作
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
// 删除按钮操作
|
||||
const handleDelete = async (row) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
try {
|
||||
await ElMessageBox.confirm('是否确认删除记录发布数据编号为"' + _ids + '"的数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
});
|
||||
|
||||
await deleteShopGoodsPublished(_ids);
|
||||
ElMessage.success("删除成功");
|
||||
await getList();
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
console.error('删除失败:', error);
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 店铺列表
|
||||
const shopList = ref([]);
|
||||
|
||||
const getShopList = async () => {
|
||||
try {
|
||||
const res = await getListShop();
|
||||
const data = res.data || res;
|
||||
|
||||
if (!data || data.length === 0) {
|
||||
shopList.value = [];
|
||||
} else {
|
||||
shopList.value = data.map(item => ({
|
||||
value: item.id,
|
||||
label: item.shopName
|
||||
}));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取店铺列表失败:', error);
|
||||
ElMessage.error('获取店铺列表失败');
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
loadData();
|
||||
getShopList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 调整表头字体大小 */
|
||||
:deep(.el-table__header) th .cell {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* 调整表格内容字体大小 */
|
||||
.el-table {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
|
||||
.truncate-cell {
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.image-slot {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f5f7fa;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
// getShopList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 调整表头字体大小 */
|
||||
:deep(.el-table__header) th .cell {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* 调整表格内容字体大小 */
|
||||
.el-table {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
|
||||
.truncate-cell {
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.image-slot {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f5f7fa;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
@ -74,7 +74,7 @@
|
||||
<div class="login-url">
|
||||
<p class="url-label">后台管理系统地址:</p>
|
||||
<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>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user