You need to sign in or sign up before continuing.
Commit 5b201fd4 authored by limengyang's avatar limengyang

feat(lmy):提交

parent aaa1adfc
......@@ -12,9 +12,10 @@ enum Api {
OpsDeleteProduct = '/system/opsProduct/opsDeleteProduct',
OpsEditProduct = '/system/opsProduct/opsEditProduct',
UploadOpsProduct = '/excel/excelNew/uploadOpsProduct',
QueryList = '/system/logProductManager/queryList',
RevokeExcelUpload = '/system/logProductManager/revokeExcelUpload',
PlatformProBatchList = '/system/logNegotiationProductOperate/getList',
PlatformProBatchGetDetail = '/system/logNegotiationProductOperate/getList',
PlatformProBatchGetDetail = '/system/logNegotiationProductOperate/getDetail',
}
/**
......@@ -92,8 +93,7 @@ export const regionalSpotManageUploadOpsProductApi = (data) =>
/**
* @description: 任务中心获取列表
*/
export const taskCenterQueryListApi = (data) =>
tmallabHttp.post({ url: Api.RevokeExcelUpload, data }, { errorMessageMode: 'message' });
export const taskCenterQueryListApi = (data) => tmallabHttp.post({ url: Api.QueryList, data });
/**
* @description: 撤销
......
......@@ -8,7 +8,7 @@
let list = ref<any[]>([]);
let listLoading = ref(false);
const downLoad = (url) => {
window.open(config.VITE_GLOB_API_URL + '/system/' + url, '_blank');
window.open(config.VITE_GLOB_TMALLAB_URL + '/system/' + url, '_blank');
};
const getList = async () => {
listLoading.value = true;
......@@ -60,8 +60,8 @@
</a-table-column>
<a-table-column title="操作" align="center" :width="200">
<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>
</template>
......
......@@ -28,6 +28,7 @@
const config = import.meta.env;
const userInfo: any = getAuthCache('USER__INFO__');
const ghsCode = userInfo.supplier.ghsCode;
const ghsName = userInfo.supplier.ghsName;
const router = useRouter();
const list = ref<any[]>([]);
onMounted(async () => {
......@@ -383,7 +384,10 @@
productExcelList.value = [];
};
const downLoad = () => {
window.open(config.VITE_GLOB_API_URL, '_blank');
window.open(
config.VITE_GLOB_TMALLAB_URL + '/system/resources/区域现货商品上传模板.xlsx',
'_blank',
);
};
let importLoading = ref(false);
const confirmImport = async () => {
......@@ -391,6 +395,7 @@
if (!impotrCheckboxValue.value.length) return message.error('请选择现货区域');
const param: FormData = new FormData();
param.append('ghsCode', ghsCode);
param.append('ghsName', ghsName);
param.append('file', productExcelList.value[0]);
param.append('areaIds', impotrCheckboxValue.value as any);
importLoading.value = true;
......
......@@ -38,7 +38,7 @@
pageSize: pagination.value.pageSize,
});
listLoading.value = true;
const res = await platformProBatchGetListApi(param);
const res = await platformProBatchGetListApi(param.value);
if (res.success) {
list.value = res.data;
pagination.value.total = res.data[0].total;
......@@ -59,11 +59,13 @@
};
const getDetails = async (item) => {
const param = ref<{ [key: string]: any }>({
currentPage: 1,
pageSize: 10,
sysid: item.sysid,
type: '',
});
detailLoading.value = true;
const res = await platformProBatchGetDetailApi(param);
const res = await platformProBatchGetDetailApi(param.value);
if (res.success) {
operationList.value = res.data;
} else {
......@@ -75,33 +77,12 @@
// =================导出========================
let exportLoading = ref(false);
const exportExcel = async () => {
handleDownload([
{
brand: '生工',
category: '',
createTime: '2024-03-29 14:42:35',
discount: null,
expirationDate: null,
failReason: '该商品在商品目录不存在;',
identificationType: '商品议价',
itemNo: 'G508013-0001',
negotiationPrice: 5000,
operateSysid: 13877,
platforms: ['北京协和医院'],
productName: '微孔板迷你离心机,500~3000 rpm',
spec: '1 /PK',
status: false,
sysid: 83466873,
total: 32,
type: 2,
},
]);
const param = ref<{ [key: string]: any }>({
sysid: curItem.value.sysid,
type: '',
});
exportLoading.value = true;
const res = await platformProBatchGetDetailApi(param);
const res = await platformProBatchGetDetailApi(param.value);
if (res.success) {
handleDownload(res.data);
} else {
......@@ -145,13 +126,13 @@
});
const data = formatJson(filterVal, list);
excel.export_json_to_excel({
header: tHeader as any,
data: data as any,
filename: '操作记录详情' as any,
autoWidth: true as any,
bookType: 'xlsx' as any,
XlsWidth: null as any,
searchList: [] as any,
header: tHeader,
data: data,
filename: '操作记录详情',
autoWidth: false,
bookType: 'xlsx',
XlsWidth: [],
searchList: null,
});
});
};
......@@ -232,7 +213,6 @@
:loading="detailLoading"
bordered
:rowKey="(record) => record.sysid"
style="margin-top: -15px"
>
<a-table-column title="商品名称" align="center" :width="100">
<template #default="{ record }">
......
......@@ -12,12 +12,12 @@
let list = ref<any[]>([]);
let listLoading = ref(false);
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) => {
if (record.failNum === 0) return;
let href =
config.VITE_GLOB_API_URL +
config.VITE_GLOB_TMALLAB_URL +
'/excel/excelNew/fail/download?sysid=' +
record.sysid +
'&type=' +
......@@ -84,7 +84,7 @@
</a-table-column>
<a-table-column title="操作数据" align="center" :width="100">
<template #default="{ record }">
{{ record.sproductNumpec }}
{{ record.productNum }}
</template>
</a-table-column>
<a-table-column title="成功数据" align="center" :width="100">
......@@ -104,12 +104,12 @@
</a-table-column>
<a-table-column title="操作" align="center" :width="200">
<template #default="{ record }">
<Button type="link" @click="downLoad(record.fileUrl)">下载源文件</Button>
<Button type="link" v-if="record.failNum" @click="downloadFail(record)"
>下载错误数据</Button
<a-button type="link" @click="downLoad(record.fileUrl)">下载源文件</a-button>
<a-button type="link" v-if="record.failNum" @click="downloadFail(record)"
>下载错误数据</a-button
>
<Button type="link" v-if="record.status == 0 && !record.isRevoke" @click="cancel(record)"
>撤销</Button
<a-button type="link" v-if="record.status == 0 && !record.isRevoke" @click="cancel(record)"
>撤销</a-button
>
</template>
</a-table-column>
......
......@@ -56,6 +56,7 @@ declare global {
interface ImportMeta {
env: {
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