diff --git a/api/AccountPricePreliminaryRreview.js b/api/AccountPricePreliminaryRreview.js
new file mode 100644
index 0000000..1848460
--- /dev/null
+++ b/api/AccountPricePreliminaryRreview.js
@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+// 获取地域列表
+export const getPricePreliminaryReviewList = (data, query) => {
+ return request({
+ method: 'post',
+ url: '/bussiness/baseusercredithistory/credit-period-initial-review-list',
+ data,
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 60eb447..1547bd0 100644
--- a/pages.json
+++ b/pages.json
@@ -163,6 +163,20 @@
"navigationBarTitleText": "订单综合查询",
"props": true
}
+ },
+ {
+ "path": "pages/work/AccountPricePreliminaryRreview/index",
+ "style": {
+ "navigationBarTitleText": "账期价格初审",
+ "props": true
+ }
+ },
+ {
+ "path": "pages/work/AccountPriceFinallReview/index",
+ "style": {
+ "navigationBarTitleText": "账期价格复审",
+ "props": true
+ }
}
],
"tabBar": {
diff --git a/pages/work/AccountPricePreliminaryRreview/index.vue b/pages/work/AccountPricePreliminaryRreview/index.vue
new file mode 100644
index 0000000..d35607e
--- /dev/null
+++ b/pages/work/AccountPricePreliminaryRreview/index.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 序号
+ 公司名称
+ 地域
+ 账期审核
+ 额度审核
+ 价格审核
+
+
+ {{ index + 1 }}
+ {{ item.userName }}
+ {{ item.areaName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/utils/utils.js b/utils/utils.js
index c53fd25..c4223a9 100644
--- a/utils/utils.js
+++ b/utils/utils.js
@@ -6,13 +6,13 @@ import {securityFileDownload} from '@/api/FileUpload/FileUpload.js'
// 移动端文件预览优化版 - H5兼容修复
export const YuLanfile = async (filePath) => {
-
- uni.showToast({
- title: '预览还在开发完善中!!',
- icon: 'none',
- duration: 2000
- })
- return false;
+
+ uni.showToast({
+ title: '预览还在开发完善中!!',
+ icon: 'none',
+ duration: 2000
+ })
+ return false;
console.log("预览文件:", filePath)
if (!filePath) {
uni.showToast({
@@ -21,25 +21,25 @@ export const YuLanfile = async (filePath) => {
});
return;
}
-
+
try {
uni.showLoading({
title: '正在加载文件...',
mask: true
});
-
+
const response = await securityFileDownload({
fileName: filePath,
delete: false
});
-
+
const fileExtension = filePath.split('.').pop().toLowerCase();
const fileName = filePath.split('\\').pop() || 'preview.' + fileExtension;
-
+
// 判断运行环境
const platform = getPlatform();
console.log('当前平台:', platform);
-
+
// 根据平台和文件类型选择预览方式
if (['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'].includes(fileExtension)) {
await previewImage(response, fileExtension, fileName, platform);
@@ -48,9 +48,9 @@ export const YuLanfile = async (filePath) => {
} else {
await handleOtherFile(response, fileName, fileExtension, platform);
}
-
+
uni.hideLoading();
-
+
} catch (error) {
console.error('预览失败:', error);
uni.hideLoading();
@@ -78,10 +78,10 @@ const getPlatform = () => {
// 图片预览
const previewImage = async (response, fileExtension, fileName, platform) => {
return new Promise((resolve, reject) => {
- const blob = new Blob([response], {
- type: `image/${fileExtension === 'jpg' ? 'jpeg' : fileExtension}`
+ const blob = new Blob([response], {
+ type: `image/${fileExtension === 'jpg' ? 'jpeg' : fileExtension}`
});
-
+
// H5环境 - 使用简单可靠的方式
if (platform === 'h5') {
const blobUrl = URL.createObjectURL(blob);
@@ -89,7 +89,7 @@ const previewImage = async (response, fileExtension, fileName, platform) => {
showImageModalH5(blobUrl, fileName, resolve);
return;
}
-
+
// App环境
if (platform === 'app') {
const reader = new FileReader();
@@ -110,7 +110,7 @@ const previewImage = async (response, fileExtension, fileName, platform) => {
reader.readAsDataURL(blob);
return;
}
-
+
// 微信小程序环境
if (platform === 'weixin') {
const reader = new FileReader();
@@ -143,7 +143,7 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
if (existingModal) {
document.body.removeChild(existingModal);
}
-
+
const modal = document.createElement('div');
modal.id = 'h5-preview-modal';
modal.style.cssText = `
@@ -159,7 +159,7 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
align-items: center;
flex-direction: column;
`;
-
+
const header = document.createElement('div');
header.style.cssText = `
position: absolute;
@@ -179,7 +179,7 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
${fileName}
×
`;
-
+
const img = document.createElement('img');
img.src = imageUrl;
img.style.cssText = `
@@ -187,14 +187,14 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
max-height: 100%;
object-fit: contain;
`;
-
+
// 关闭按钮点击
header.querySelector('span:last-child').onclick = () => {
document.body.removeChild(modal);
URL.revokeObjectURL(imageUrl);
resolve();
};
-
+
// 点击背景关闭
modal.onclick = (e) => {
if (e.target === modal) {
@@ -203,7 +203,7 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
resolve();
}
};
-
+
// 按ESC关闭
const escHandler = (e) => {
if (e.key === 'Escape') {
@@ -214,7 +214,7 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
}
};
document.addEventListener('keydown', escHandler);
-
+
modal.appendChild(header);
modal.appendChild(img);
document.body.appendChild(modal);
@@ -223,26 +223,26 @@ const showImageModalH5 = (imageUrl, fileName, resolve) => {
// PDF预览
const previewPDF = async (response, fileName, platform) => {
return new Promise((resolve, reject) => {
- const blob = new Blob([response], { type: 'application/pdf' });
-
+ const blob = new Blob([response], {type: 'application/pdf'});
+
// H5环境
if (platform === 'h5') {
const blobUrl = URL.createObjectURL(blob);
showPDFModalH5(blobUrl, fileName, resolve);
return;
}
-
+
// App环境
if (platform === 'app') {
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const base64Data = arrayBufferToBase64(arrayBuffer);
-
- plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function(fs) {
- fs.root.getFile(fileName, {create: true}, function(fileEntry) {
- fileEntry.createWriter(function(writer) {
- writer.onwrite = function() {
+
+ plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function (fs) {
+ fs.root.getFile(fileName, {create: true}, function (fileEntry) {
+ fileEntry.createWriter(function (writer) {
+ writer.onwrite = function () {
plus.runtime.openFile(fileEntry.toLocalURL());
resolve();
};
@@ -255,14 +255,14 @@ const previewPDF = async (response, fileName, platform) => {
reader.readAsArrayBuffer(blob);
return;
}
-
+
// 微信小程序环境
if (platform === 'weixin') {
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const base64Data = arrayBufferToBase64(arrayBuffer);
-
+
wx.getFileSystemManager().writeFile({
filePath: wx.env.USER_DATA_PATH + '/' + fileName,
data: base64Data,
@@ -289,7 +289,7 @@ const showPDFModalH5 = (pdfUrl, fileName, resolve) => {
if (existingModal) {
document.body.removeChild(existingModal);
}
-
+
const modal = document.createElement('div');
modal.id = 'h5-preview-modal';
modal.style.cssText = `
@@ -303,7 +303,7 @@ const showPDFModalH5 = (pdfUrl, fileName, resolve) => {
display: flex;
flex-direction: column;
`;
-
+
const header = document.createElement('div');
header.style.cssText = `
height: 50px;
@@ -318,7 +318,7 @@ const showPDFModalH5 = (pdfUrl, fileName, resolve) => {
${fileName}
×
`;
-
+
const iframe = document.createElement('iframe');
iframe.src = pdfUrl;
iframe.style.cssText = `
@@ -326,14 +326,14 @@ const showPDFModalH5 = (pdfUrl, fileName, resolve) => {
flex: 1;
border: none;
`;
-
+
// 关闭按钮
header.querySelector('span:last-child').onclick = () => {
document.body.removeChild(modal);
URL.revokeObjectURL(pdfUrl);
resolve();
};
-
+
// 按ESC关闭
const escHandler = (e) => {
if (e.key === 'Escape') {
@@ -344,7 +344,7 @@ const showPDFModalH5 = (pdfUrl, fileName, resolve) => {
}
};
document.addEventListener('keydown', escHandler);
-
+
modal.appendChild(header);
modal.appendChild(iframe);
document.body.appendChild(modal);
@@ -375,7 +375,7 @@ const handleOtherFile = async (response, fileName, fileExtension, platform) => {
const openWithDefaultApp = (response, fileName, fileExtension, platform) => {
return new Promise((resolve, reject) => {
const blob = new Blob([response]);
-
+
// H5环境
if (platform === 'h5') {
const blobUrl = URL.createObjectURL(blob);
@@ -391,18 +391,18 @@ const openWithDefaultApp = (response, fileName, fileExtension, platform) => {
resolve();
return;
}
-
+
// App环境
if (platform === 'app') {
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const base64Data = arrayBufferToBase64(arrayBuffer);
-
- plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function(fs) {
- fs.root.getFile(fileName, {create: true}, function(fileEntry) {
- fileEntry.createWriter(function(writer) {
- writer.onwrite = function() {
+
+ plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function (fs) {
+ fs.root.getFile(fileName, {create: true}, function (fileEntry) {
+ fileEntry.createWriter(function (writer) {
+ writer.onwrite = function () {
plus.runtime.openFile(fileEntry.toLocalURL());
resolve();
};
@@ -415,14 +415,14 @@ const openWithDefaultApp = (response, fileName, fileExtension, platform) => {
reader.readAsArrayBuffer(blob);
return;
}
-
+
// 微信小程序环境
if (platform === 'weixin') {
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const base64Data = arrayBufferToBase64(arrayBuffer);
-
+
wx.getFileSystemManager().writeFile({
filePath: wx.env.USER_DATA_PATH + '/' + fileName,
data: base64Data,
@@ -446,7 +446,7 @@ const openWithDefaultApp = (response, fileName, fileExtension, platform) => {
const saveFile = (response, fileName, platform) => {
return new Promise((resolve, reject) => {
const blob = new Blob([response]);
-
+
// H5环境
if (platform === 'h5') {
const blobUrl = URL.createObjectURL(blob);
@@ -462,18 +462,18 @@ const saveFile = (response, fileName, platform) => {
resolve();
return;
}
-
+
// App环境
if (platform === 'app') {
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const base64Data = arrayBufferToBase64(arrayBuffer);
-
- plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function(fs) {
- fs.root.getFile(fileName, {create: true}, function(fileEntry) {
- fileEntry.createWriter(function(writer) {
- writer.onwrite = function() {
+
+ plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function (fs) {
+ fs.root.getFile(fileName, {create: true}, function (fileEntry) {
+ fileEntry.createWriter(function (writer) {
+ writer.onwrite = function () {
uni.showToast({
title: '保存成功',
icon: 'success'
@@ -489,14 +489,14 @@ const saveFile = (response, fileName, platform) => {
reader.readAsArrayBuffer(blob);
return;
}
-
+
// 微信小程序环境
if (platform === 'weixin') {
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const base64Data = arrayBufferToBase64(arrayBuffer);
-
+
wx.getFileSystemManager().writeFile({
filePath: wx.env.USER_DATA_PATH + '/' + fileName,
data: base64Data,
@@ -542,4 +542,10 @@ const getMimeType = (extension) => {
'txt': 'text/plain'
};
return mimeTypes[extension] || 'application/octet-stream';
+}
+
+export const navigateTo = (path) => {
+ uni.navigateTo({
+ url: path
+ })
}
\ No newline at end of file