Commit f97656c0 authored by cxr's avatar cxr

Merge branch 'lmy' of http://119.78.67.12/git/root/ops_2024_vue into feature/JiraTML-148/cxr

parents b1eca428 c1da8356
import { tmallabHttp } from '/@/utils/http/axios'; import { tmallabHttp } from '/@/utils/http/axios';
enum Api { enum Api {
List = '/system/productNegotiated/getList', GetStatus = '/system/opsProduct/IsOpsSupplier',
BrandList = '/regionalSpotManage/commit', List = '/system/opsProduct/getList',
GroupList = '/system/opsProduct/getTypeList',
BrandList = '/system/supplierBrandQualification/getApproveList',
ProductList = '/system/productNegotiated/getProductList',
GetAreaList = '/system/opsProduct/getAreaList', GetAreaList = '/system/opsProduct/getAreaList',
OpsAddProduct = '/system/opsProduct/opsAddProduct', OpsAddProduct = '/system/opsProduct/opsAddProduct',
GetGhsAreaList = '/system/opsProduct/getGhsAreaList', GetGhsAreaList = '/system/opsProduct/getGhsAreaList',
OpsDeleteProduct = '/system/opsProduct/opsDeleteProduct', OpsDeleteProduct = '/system/opsProduct/opsDeleteProduct',
OpsEditProduct = '/system/opsProduct/opsEditProduct', OpsEditProduct = '/system/opsProduct/opsEditProduct',
UploadOpsProduct = '/excel/excelNew/uploadOpsProduct', UploadOpsProduct = '/excel/excelNew/uploadOpsProduct',
QueryList = '/system/logProductManager/queryList',
RevokeExcelUpload = '/system/logProductManager/revokeExcelUpload', RevokeExcelUpload = '/system/logProductManager/revokeExcelUpload',
PlatformProBatchList = '/system/logNegotiationProductOperate/getList', PlatformProBatchList = '/system/logNegotiationProductOperate/getList',
PlatformProBatchGetDetail = '/system/logNegotiationProductOperate/getList', PlatformProBatchGetDetail = '/system/logNegotiationProductOperate/getDetail',
} }
/**
* @description: 区域现货管理列表
*/
export const regionalSpotManageGetStatusApi = () => tmallabHttp.post({ url: Api.GetStatus });
/** /**
* @description: 区域现货管理列表 * @description: 区域现货管理列表
*/ */
export const regionalSpotManageListApi = (data) => export const regionalSpotManageListApi = (data) =>
tmallabHttp.post({ url: Api.List, data }, { errorMessageMode: 'message'}); tmallabHttp.post({ url: Api.List, data }, { errorMessageMode: 'message' });
/** /**
* @description: 获取品牌列表 * @description: 获取品牌列表
*/ */
export const regionalSpotManageBrandListApi = (data) => export const regionalSpotManageBrandListApi = (data) =>
tmallabHttp.post({ url: Api.BrandList,data }, { errorMessageMode: 'message'}); tmallabHttp.post({ url: Api.BrandList, data });
/**
* @description: 获取分组列表
*/
export const regionalSpotManageGroupListApi = (data) =>
tmallabHttp.post({ url: Api.GroupList, data });
/**
* @description: 获取左边穿梭框商品列表
*/
export const regionalSpotManageProductListApi = (data) =>
tmallabHttp.post({ url: Api.ProductList, data });
/** /**
* @description: 获取现货区域列表 * @description: 获取现货区域列表
*/ */
export const regionalSpotManageGetAreaListApi = (data) => export const regionalSpotManageGetAreaListApi = (data) =>
tmallabHttp.post({ url: Api.GetAreaList,data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.GetAreaList, data });
/** /**
* @description: 新增商品接口 * @description: 新增商品接口
*/ */
export const regionalSpotManageOpsAddProductApi = (data) => export const regionalSpotManageOpsAddProductApi = (data) =>
tmallabHttp.post({ url: Api.OpsAddProduct, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.OpsAddProduct, data }, { errorMessageMode: 'message' });
/** /**
* @description: 获取已开通区域 * @description: 获取已开通区域
*/ */
export const regionalSpotManageGetGhsAreaListApi = (data) => export const regionalSpotManageGetGhsAreaListApi = (data) =>
tmallabHttp.post({ url: Api.GetGhsAreaList, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.GetGhsAreaList, data });
/** /**
* @description: 单条/批量删除 * @description: 单条/批量删除
*/ */
export const regionalSpotManageOpsDeleteProductApi = (data) => export const regionalSpotManageOpsDeleteProductApi = (data) =>
tmallabHttp.post({ url: Api.OpsDeleteProduct, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.OpsDeleteProduct, data }, { errorMessageMode: 'message' });
/** /**
* @description: 增加区域 * @description: 增加区域
*/ */
export const regionalSpotManageOpsEditProductApi = (data) => export const regionalSpotManageOpsEditProductApi = (data) =>
tmallabHttp.post({ url: Api.OpsEditProduct, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.OpsEditProduct, data }, { errorMessageMode: 'message' });
/** /**
* @description: 批量上传 * @description: 批量上传
*/ */
export const regionalSpotManageUploadOpsProductApi = (data) => export const regionalSpotManageUploadOpsProductApi = (data, file) =>
tmallabHttp.post({ url: Api.UploadOpsProduct, data },{ errorMessageMode: 'message' }); tmallabHttp.uploadFile(
{
url: Api.UploadOpsProduct,
method: 'POST',
data,
baseURL: import.meta.env.VITE_GLOB_TMALLAB_URL,
},
{ file, data },
);
/** /**
* @description: 任务中心获取列表 * @description: 任务中心获取列表
*/ */
export const taskCenterQueryListApi = (data) => export const taskCenterQueryListApi = (data) => tmallabHttp.post({ url: Api.QueryList, data });
tmallabHttp.post({ url: Api.RevokeExcelUpload, data },{ errorMessageMode: 'message' });
/** /**
* @description: 撤销 * @description: 撤销
*/ */
export const taskCenterRevokeExcelUploadApi = (data) => export const taskCenterRevokeExcelUploadApi = (data) =>
tmallabHttp.post({ url: Api.RevokeExcelUpload, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.RevokeExcelUpload, data }, { errorMessageMode: 'message' });
/** /**
* @description: 任务中心获取列表--平台商品批量页签 * @description: 任务中心获取列表--平台商品批量页签
*/ */
export const platformProBatchGetListApi = (data) => export const platformProBatchGetListApi = (data) =>
tmallabHttp.post({ url: Api.PlatformProBatchList, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.PlatformProBatchList, data }, { errorMessageMode: 'message' });
/** /**
* @description: 任务中心获取列表--平台商品批量页签--操作记录详情 * @description: 任务中心获取列表--平台商品批量页签--操作记录详情
*/ */
export const platformProBatchGetDetailApi = (data) => export const platformProBatchGetDetailApi = (data) =>
tmallabHttp.post({ url: Api.PlatformProBatchGetDetail, data },{ errorMessageMode: 'message' }); tmallabHttp.post({ url: Api.PlatformProBatchGetDetail, data }, { errorMessageMode: 'message' });
...@@ -69,5 +69,5 @@ span.anticon:not(.app-iconify) { ...@@ -69,5 +69,5 @@ span.anticon:not(.app-iconify) {
margin-left: 24px; margin-left: 24px;
} }
.ant-modal-body { .ant-modal-body {
margin-top: 20px; padding: 20px !important;
} }
...@@ -41,7 +41,7 @@ async function bootstrap() { ...@@ -41,7 +41,7 @@ async function bootstrap() {
app.use(Antd); app.use(Antd);
app.mount('#app'); app.mount('#app');
app.use(Antd) app.use(Antd);
} }
bootstrap(); bootstrap();
...@@ -12,6 +12,7 @@ const product: AppRouteModule = { ...@@ -12,6 +12,7 @@ const product: AppRouteModule = {
orderNo: 500, orderNo: 500,
icon: 'ion:grid-outline', icon: 'ion:grid-outline',
title: '商品管理', title: '商品管理',
roles: ['supplier'],
}, },
children: [ children: [
{ {
...@@ -29,7 +30,7 @@ const product: AppRouteModule = { ...@@ -29,7 +30,7 @@ const product: AppRouteModule = {
meta: { meta: {
title: '任务中心', title: '任务中心',
}, },
} },
], ],
}; };
......
...@@ -6,18 +6,19 @@ ...@@ -6,18 +6,19 @@
const emit = defineEmits(['close']); const emit = defineEmits(['close']);
import { import {
regionalSpotManageBrandListApi, regionalSpotManageBrandListApi,
regionalSpotManageProductListApi,
regionalSpotManageGetAreaListApi, regionalSpotManageGetAreaListApi,
regionalSpotManageOpsAddProductApi, regionalSpotManageOpsAddProductApi,
} from '/@/api/regionalSpotManage'; } from '/@/api/regionalSpotManage';
import { getAuthCache } from '/@/utils/auth'; import { getAuthCache } from '/@/utils/auth';
const userInfo: any = getAuthCache('USER__INFO__'); const userInfo: any = getAuthCache('USER__INFO__');
const ghsCode = userInfo.supplier.ghsCode; const ghsCode = userInfo.supplier.ghsCode;
let searchBrand = ref(''); const searchBrand = ref('');
let searchItemNo = ref(''); const searchItemNo = ref('');
let searchBrandList = ref<any[]>([]); const searchBrandList = ref<any[]>([]);
const handleSearch = async (value) => { const handleSearch = async (value) => {
const res = await regionalSpotManageBrandListApi({ brand: value }); const res = await regionalSpotManageBrandListApi({ brand: value });
if (res.code === 20000) { if (res.success) {
searchBrandList.value = res.data; searchBrandList.value = res.data;
} else { } else {
searchBrandList.value = []; searchBrandList.value = [];
...@@ -26,11 +27,11 @@ ...@@ -26,11 +27,11 @@
const closeModal = () => { const closeModal = () => {
emit('close', false); emit('close', false);
}; };
const leftLoading = ref(false);
const leftData = ref<any[]>([]); const leftData = ref<any[]>([]);
const leftColumns = [ const leftColumns = [
{ {
title: '商品名称', title: '商品名称',
dataIndex: 'productName',
key: 'productName', key: 'productName',
width: '25%', width: '25%',
align: 'center', align: 'center',
...@@ -58,53 +59,29 @@ ...@@ -58,53 +59,29 @@
getLeftData(); getLeftData();
}, },
}); });
const getLeftData = () => { const reset = () => {
leftData.value = [ searchBrand.value = '';
{ searchItemNo.value = '';
productName: '测试产品1', pagination.value.current = 1;
brand: '测试品牌1', getLeftData();
goodsNo: '213651', };
spec: '100ml', const getLeftData = async () => {
sysid: '1', const param = {
}, pageIndex: pagination.value.current,
{ pageSize: pagination.value.pageSize,
productName: '测试产品2', ghsCode: ghsCode,
brand: '测试品牌2', productName: '',
goodsNo: '213652', brand: searchBrand.value,
spec: '100ml', goodsNo: searchItemNo.value,
sysid: '2', };
}, leftLoading.value = true;
{ const res = await regionalSpotManageProductListApi(param);
productName: '测试产品3', if (res.success) {
brand: '测试品牌3', leftData.value = res.data;
goodsNo: '213653', } else {
spec: '100ml', leftData.value = [];
sysid: '3', }
}, leftLoading.value = false;
{
productName: '测试产品4',
brand: '测试品牌4',
goodsNo: '213654',
spec: '100ml',
sysid: '4',
},
{
productName: '测试产品5',
brand: '测试品牌5',
goodsNo: '213655',
spec: '100ml',
sysid: '5',
choice: true,
},
{
productName: '测试产品6',
brand: '测试品牌6',
goodsNo: '213656',
spec: '100ml',
sysid: '6',
choice: true,
},
];
if (rightData.value.length > 0) { if (rightData.value.length > 0) {
for (let i = 0; i < rightData.value.length; i++) { for (let i = 0; i < rightData.value.length; i++) {
if ( if (
...@@ -125,8 +102,8 @@ ...@@ -125,8 +102,8 @@
leftData.value = [...leftData.value]; leftData.value = [...leftData.value];
pagination.value.total = leftData.value.length; pagination.value.total = leftData.value.length;
}; };
let selectedRowKeys = ref<any[]>([]); const selectedRowKeys = ref<any[]>([]);
let selectedRows = ref<any[]>([]); const selectedRows = ref<any[]>([]);
const rowSelection = computed(() => { const rowSelection = computed(() => {
return { return {
selectedRowKeys: selectedRowKeys.value, selectedRowKeys: selectedRowKeys.value,
...@@ -140,7 +117,6 @@ ...@@ -140,7 +117,6 @@
}; };
}); });
const toRight = () => { const toRight = () => {
console.log(selectedRows.value);
let arr = JSON.parse(JSON.stringify(selectedRows.value)); let arr = JSON.parse(JSON.stringify(selectedRows.value));
rightData.value = [...arr, ...rightData.value]; rightData.value = [...arr, ...rightData.value];
for (let i = 0; i < selectedRows.value.length; i++) { for (let i = 0; i < selectedRows.value.length; i++) {
...@@ -227,14 +203,14 @@ ...@@ -227,14 +203,14 @@
const rowClassName = () => { const rowClassName = () => {
return 'table-back'; return 'table-back';
}; };
let loading = ref(false); const loading = ref(false);
let addressLoading = ref(false); const addressLoading = ref(false);
const goNext = async () => { const goNext = async () => {
if (!rightData.value.length) return message.error('请先选择商品'); if (!rightData.value.length) return message.error('请先选择商品');
addressVisible.value = true; addressVisible.value = true;
addressLoading.value = true; addressLoading.value = true;
const res = await regionalSpotManageGetAreaListApi({}); const res = await regionalSpotManageGetAreaListApi({});
if (res.code === 20000) { if (res.success) {
areaList.value = res.data; areaList.value = res.data;
} else { } else {
areaList.value = []; areaList.value = [];
...@@ -245,53 +221,16 @@ ...@@ -245,53 +221,16 @@
const confirmLoading = ref(false); const confirmLoading = ref(false);
const addressVisible = ref(false); const addressVisible = ref(false);
const checkboxValue = ref([]); const checkboxValue = ref([]);
const areaList = ref<any[]>([ interface AreaIds {
{ city?: string;
id: '0', cityId?: number;
provinceId: '0', creationTime?: string;
province: '北京市', creator?: string;
cityId: 0, id?: number;
city: '市辖区', province?: string;
creator: '', provinceId?: number;
creationTime: '', }
}, const areaList = ref<AreaIds[]>([]);
{
id: '1',
provinceId: '1',
province: '河北省',
cityId: 1,
city: '保定市',
creator: '',
creationTime: '',
},
{
id: '2',
provinceId: '2',
province: '河北省',
cityId: 2,
city: '石家庄市',
creator: '',
creationTime: '',
},
{
id: '3',
provinceId: '3',
province: '河北省',
cityId: 3,
city: '秦皇岛市',
creator: '',
creationTime: '',
},
{
id: '4',
provinceId: '4',
province: '河北省',
cityId: 3,
city: '承德市',
creator: '',
creationTime: '',
},
]);
const handleCancel = () => { const handleCancel = () => {
addressVisibleClose(); addressVisibleClose();
}; };
...@@ -316,14 +255,13 @@ ...@@ -316,14 +255,13 @@
ghscode: ghsCode, ghscode: ghsCode,
}; };
}); });
param.value.areas = checkboxValue.value.join; param.value.areas = checkboxValue.value;
console.log(param.value);
confirmLoading.value = true; confirmLoading.value = true;
const res = await regionalSpotManageOpsAddProductApi(param.value); const res = await regionalSpotManageOpsAddProductApi(param.value);
if (res.code === 20000) { if (res.success) {
message.success('新增成功'); message.success('新增成功');
addressVisibleClose(); addressVisibleClose();
emit('close', false); emit('close', false, 'refresh');
} else { } else {
message.error(res.message); message.error(res.message);
} }
...@@ -359,11 +297,11 @@ ...@@ -359,11 +297,11 @@
> >
<a-select-option <a-select-option
v-for="item in searchBrandList" v-for="item in searchBrandList"
:key="item.value" :key="item.brand"
:label="item.label" :label="item.brand"
:value="item.value" :value="item.brand"
> >
{{ item.label }} {{ item.brand }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<span style="margin-left: 15px">货号:</span> <span style="margin-left: 15px">货号:</span>
...@@ -373,7 +311,7 @@ ...@@ -373,7 +311,7 @@
placeholder="请输入货号" placeholder="请输入货号"
style="width: 200px" style="width: 200px"
/> />
<Button style="margin-left: 10px">重置</Button> <Button @click="reset" style="margin-left: 10px">重置</Button>
<Button @click="getLeftData" type="primary" style="margin-left: 10px">查询</Button> <Button @click="getLeftData" type="primary" style="margin-left: 10px">查询</Button>
</div> </div>
<div class="main"> <div class="main">
...@@ -392,13 +330,13 @@ ...@@ -392,13 +330,13 @@
:rowKey="(record) => record.brand + record.goodsNo + record.spec" :rowKey="(record) => record.brand + record.goodsNo + record.spec"
:scroll="{ x: false, y: 280 }" :scroll="{ x: false, y: 280 }"
:rowClassName="rowClassName" :rowClassName="rowClassName"
:loading="loading" :loading="leftLoading"
> >
<!-- <template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'productName'"> <template v-if="column.key === 'productName'">
<span>{{ record.chineseName ? record.chineseName : record.englishName }}</span> <span>{{ record.chineseName ? record.chineseName : record.englishName }}</span>
</template> </template>
</template> --> </template>
</a-table> </a-table>
</div> </div>
</div> </div>
...@@ -440,7 +378,13 @@ ...@@ -440,7 +378,13 @@
:scroll="{ x: false, y: 280 }" :scroll="{ x: false, y: 280 }"
:rowClassName="rowClassName" :rowClassName="rowClassName"
:row-selection="rightRowSelection" :row-selection="rightRowSelection"
/> >
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'productName'">
<span>{{ record.chineseName ? record.chineseName : record.englishName }}</span>
</template>
</template>
</a-table>
</div> </div>
</div> </div>
</div> </div>
...@@ -472,7 +416,7 @@ ...@@ -472,7 +416,7 @@
<a-checkbox-group v-model:value="checkboxValue" style="width: 100%"> <a-checkbox-group v-model:value="checkboxValue" style="width: 100%">
<a-row> <a-row>
<a-col :span="6" v-for="(item, index) in areaList" :key="index"> <a-col :span="6" v-for="(item, index) in areaList" :key="index">
<a-checkbox :value="item.id">{{ item.province }}-{{ item.city }}</a-checkbox> <a-checkbox :value="item.cityId">{{ item.province }}-{{ item.city }}</a-checkbox>
</a-col> </a-col>
</a-row> </a-row>
</a-checkbox-group> </a-checkbox-group>
......
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
const config = import.meta.env const config = import.meta.env;
import { import { taskCenterQueryListApi } from '/@/api/regionalSpotManage';
taskCenterQueryListApi, onMounted(async () => {
} from '/@/api/regionalSpotManage'; getList();
onMounted(async () => { });
getList() let list = ref<any[]>([]);
}); let listLoading = ref(false);
let list = ref<any[]>([]) const downLoad = (url) => {
let listLoading = ref(false) window.open(config.VITE_GLOB_TMALLAB_URL + '/system/' + url, '_blank');
const downLoad = (url) => { };
window.open(config.VITE_GLOB_API_URL + '/system/' + url, '_blank') const getList = async () => {
} listLoading.value = true;
const getList = async () => { const res = await taskCenterQueryListApi({ type: 1 });
listLoading.value = true if (res.success) {
const res = await taskCenterQueryListApi({type:1}) list.value = res.data;
if (res.code === 20000) {
list.value = res.data
} else { } else {
list.value = [] list.value = [];
} }
listLoading.value = false listLoading.value = false;
} };
</script> </script>
<template> <template>
...@@ -36,39 +34,39 @@ const getList = async () => { ...@@ -36,39 +34,39 @@ const getList = async () => {
style="margin-top: 15px" style="margin-top: 15px"
> >
<a-table-column title="操作时间" align="center" :width="100"> <a-table-column title="操作时间" align="center" :width="100">
<template v-slot="{record}"> <template #default="{ record }">
{{ record.createTime }} {{ record.createTime }}
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="类型" align="center" :width="100"> <a-table-column title="类型" align="center" :width="100">
<template v-slot="{record}"> <template #default="{ record }">
{{ record.type }} {{ record.type }}
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="导出状态" align="center" :width="100"> <a-table-column title="导出状态" align="center" :width="100">
<template v-slot="{record}"> <template #default="{ record }">
<p>{{ record.status == 0 ? '待进行 ': (record.status == 1 ? '进行中' : '已完成') }}</p> <p>{{ record.status == 0 ? '待进行 ' : record.status == 1 ? '进行中' : '已完成' }}</p>
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="数据量" align="center" :width="100"> <a-table-column title="数据量" align="center" :width="100">
<template v-slot="{record}"> <template #default="{ record }">
{{ record.successNum }} {{ record.successNum }}
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="操作人" align="center" :width="100"> <a-table-column title="操作人" align="center" :width="100">
<template v-slot="{record}"> <template #default="{ record }">
{{ record.createName }} {{ record.createName }}
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="操作" align="center" :width="200"> <a-table-column title="操作" align="center" :width="200">
<template v-slot="{record}"> <template #default="{ record }">
<Button v-if="record.fileUrl" type="link" @click="downLoad(record.fileUrl)">下载文件</Button> <a-button v-if="record.fileUrl" type="link" @click="downLoad(record.fileUrl)"
>下载文件</a-button
>
<span v-else>——</span> <span v-else>——</span>
</template> </template>
</a-table-column> </a-table-column>
</a-table> </a-table>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
let list = ref<any[]>([]); let list = ref<any[]>([]);
let listLoading = ref(false); let listLoading = ref(false);
const downLoad = (url) => { const downLoad = (url) => {
window.open(config.VITE_GLOB_API_URL + '/system/excelFile/' + url, '_blank'); window.open(config.VITE_GLOB_TMALLAB_URL + '/system/excelFile/' + url, '_blank');
}; };
const downloadFail = (record) => { const downloadFail = (record) => {
if (record.failNum === 0) return; if (record.failNum === 0) return;
let href = let href =
config.VITE_GLOB_API_URL + config.VITE_GLOB_TMALLAB_URL +
'/excel/excelNew/fail/download?sysid=' + '/excel/excelNew/fail/download?sysid=' +
record.sysid + record.sysid +
'&type=' + '&type=' +
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
sysid: record.sysid, sysid: record.sysid,
}); });
const res = await taskCenterRevokeExcelUploadApi(param.value); const res = await taskCenterRevokeExcelUploadApi(param.value);
if (res.code === 20000) { if (res.success) {
message.success('操作成功'); message.success('操作成功');
getList(); getList();
} else { } else {
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
const getList = async () => { const getList = async () => {
listLoading.value = true; listLoading.value = true;
const res = await taskCenterQueryListApi({ type: 0 }); const res = await taskCenterQueryListApi({ type: 0 });
if (res.code === 20000) { if (res.success) {
list.value = res.data; list.value = res.data;
} else { } else {
list.value = []; list.value = [];
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</a-table-column> </a-table-column>
<a-table-column title="操作数据" align="center" :width="100"> <a-table-column title="操作数据" align="center" :width="100">
<template #default="{ record }"> <template #default="{ record }">
{{ record.sproductNumpec }} {{ record.productNum }}
</template> </template>
</a-table-column> </a-table-column>
<a-table-column title="成功数据" align="center" :width="100"> <a-table-column title="成功数据" align="center" :width="100">
...@@ -104,12 +104,12 @@ ...@@ -104,12 +104,12 @@
</a-table-column> </a-table-column>
<a-table-column title="操作" align="center" :width="200"> <a-table-column title="操作" align="center" :width="200">
<template #default="{ record }"> <template #default="{ record }">
<Button type="link" @click="downLoad(record.fileUrl)">下载源文件</Button> <a-button type="link" @click="downLoad(record.fileUrl)">下载源文件</a-button>
<Button type="link" v-if="record.failNum" @click="downloadFail(record)" <a-button type="link" v-if="record.failNum" @click="downloadFail(record)"
>下载错误数据</Button >下载错误数据</a-button
> >
<Button type="link" v-if="record.status == 0 && !record.isRevoke" @click="cancel(record)" <a-button type="link" v-if="record.status == 0 && !record.isRevoke" @click="cancel(record)"
>撤销</Button >撤销</a-button
> >
</template> </template>
</a-table-column> </a-table-column>
......
<script lang="ts" setup> <script lang="ts" setup>
import ManageList from './components/list.vue'; import { ref, onMounted } from 'vue';
import { regionalSpotManageGetStatusApi } from '/@/api/regionalSpotManage';
import ManageList from './components/list.vue';
const show = ref(false);
const loading = ref(false);
onMounted(async () => {
loading.value = true;
const res = await regionalSpotManageGetStatusApi().catch(() => (loading.value = false));
if (res.success) {
show.value = true;
}
loading.value = false;
});
</script> </script>
<template> <template>
<ManageList /> <div>
<!-- <ManageList /> -->
<a-spin v-if="loading" style="height: 150px; width: 100%; line-height: 150px" />
<ManageList v-if="show && !loading" />
<div v-if="!show && !loading" class="status">
<img src="../../assets/images/logo.png" alt="" srcset="" />
</div>
</div>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.status {
height: 100vh;
img {
width: 100%;
height: 100vh;
object-fit: contain;
}
}
</style> </style>
...@@ -56,6 +56,7 @@ declare global { ...@@ -56,6 +56,7 @@ declare global {
interface ImportMeta { interface ImportMeta {
env: { env: {
VITE_GLOB_API_URL?: string; VITE_GLOB_API_URL?: string;
VITE_GLOB_TMALLAB_URL?: string;
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment