Commit 5b201fd4 authored by limengyang's avatar limengyang

feat(lmy):提交

parent aaa1adfc
...@@ -12,9 +12,10 @@ enum Api { ...@@ -12,9 +12,10 @@ enum Api {
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',
} }
/** /**
...@@ -92,8 +93,7 @@ export const regionalSpotManageUploadOpsProductApi = (data) => ...@@ -92,8 +93,7 @@ export const regionalSpotManageUploadOpsProductApi = (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: 撤销
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
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/' + url, '_blank'); window.open(config.VITE_GLOB_TMALLAB_URL + '/system/' + url, '_blank');
}; };
const getList = async () => { const getList = async () => {
listLoading.value = true; listLoading.value = true;
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
</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 v-if="record.fileUrl" type="link" @click="downLoad(record.fileUrl)" <a-button v-if="record.fileUrl" type="link" @click="downLoad(record.fileUrl)"
>下载文件</Button >下载文件</a-button
> >
<span v-else>——</span> <span v-else>——</span>
</template> </template>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
const config = import.meta.env; const config = import.meta.env;
const userInfo: any = getAuthCache('USER__INFO__'); const userInfo: any = getAuthCache('USER__INFO__');
const ghsCode = userInfo.supplier.ghsCode; const ghsCode = userInfo.supplier.ghsCode;
const ghsName = userInfo.supplier.ghsName;
const router = useRouter(); const router = useRouter();
const list = ref<any[]>([]); const list = ref<any[]>([]);
onMounted(async () => { onMounted(async () => {
...@@ -383,7 +384,10 @@ ...@@ -383,7 +384,10 @@
productExcelList.value = []; productExcelList.value = [];
}; };
const downLoad = () => { 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); let importLoading = ref(false);
const confirmImport = async () => { const confirmImport = async () => {
...@@ -391,6 +395,7 @@ ...@@ -391,6 +395,7 @@
if (!impotrCheckboxValue.value.length) return message.error('请选择现货区域'); if (!impotrCheckboxValue.value.length) return message.error('请选择现货区域');
const param: FormData = new FormData(); const param: FormData = new FormData();
param.append('ghsCode', ghsCode); param.append('ghsCode', ghsCode);
param.append('ghsName', ghsName);
param.append('file', productExcelList.value[0]); param.append('file', productExcelList.value[0]);
param.append('areaIds', impotrCheckboxValue.value as any); param.append('areaIds', impotrCheckboxValue.value as any);
importLoading.value = true; importLoading.value = true;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
pageSize: pagination.value.pageSize, pageSize: pagination.value.pageSize,
}); });
listLoading.value = true; listLoading.value = true;
const res = await platformProBatchGetListApi(param); const res = await platformProBatchGetListApi(param.value);
if (res.success) { if (res.success) {
list.value = res.data; list.value = res.data;
pagination.value.total = res.data[0].total; pagination.value.total = res.data[0].total;
...@@ -59,11 +59,13 @@ ...@@ -59,11 +59,13 @@
}; };
const getDetails = async (item) => { const getDetails = async (item) => {
const param = ref<{ [key: string]: any }>({ const param = ref<{ [key: string]: any }>({
currentPage: 1,
pageSize: 10,
sysid: item.sysid, sysid: item.sysid,
type: '', type: '',
}); });
detailLoading.value = true; detailLoading.value = true;
const res = await platformProBatchGetDetailApi(param); const res = await platformProBatchGetDetailApi(param.value);
if (res.success) { if (res.success) {
operationList.value = res.data; operationList.value = res.data;
} else { } else {
...@@ -75,33 +77,12 @@ ...@@ -75,33 +77,12 @@
// =================导出======================== // =================导出========================
let exportLoading = ref(false); let exportLoading = ref(false);
const exportExcel = async () => { 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 }>({ const param = ref<{ [key: string]: any }>({
sysid: curItem.value.sysid, sysid: curItem.value.sysid,
type: '', type: '',
}); });
exportLoading.value = true; exportLoading.value = true;
const res = await platformProBatchGetDetailApi(param); const res = await platformProBatchGetDetailApi(param.value);
if (res.success) { if (res.success) {
handleDownload(res.data); handleDownload(res.data);
} else { } else {
...@@ -145,13 +126,13 @@ ...@@ -145,13 +126,13 @@
}); });
const data = formatJson(filterVal, list); const data = formatJson(filterVal, list);
excel.export_json_to_excel({ excel.export_json_to_excel({
header: tHeader as any, header: tHeader,
data: data as any, data: data,
filename: '操作记录详情' as any, filename: '操作记录详情',
autoWidth: true as any, autoWidth: false,
bookType: 'xlsx' as any, bookType: 'xlsx',
XlsWidth: null as any, XlsWidth: [],
searchList: [] as any, searchList: null,
}); });
}); });
}; };
...@@ -232,7 +213,6 @@ ...@@ -232,7 +213,6 @@
:loading="detailLoading" :loading="detailLoading"
bordered bordered
:rowKey="(record) => record.sysid" :rowKey="(record) => record.sysid"
style="margin-top: -15px"
> >
<a-table-column title="商品名称" align="center" :width="100"> <a-table-column title="商品名称" align="center" :width="100">
<template #default="{ record }"> <template #default="{ record }">
......
...@@ -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=' +
...@@ -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>
......
...@@ -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