Browse Source

Update Reject.html and supply.html

pull/1/head
Default User 2 months ago
parent
commit
1d888152c2
  1. 36
      Reject.html
  2. 4
      supply.html

36
Reject.html

@ -3408,23 +3408,9 @@
window.confirmTerminate = confirmTerminate;
window.confirmSupplierToCooperation = confirmSupplierToCooperation;
window.loadSuppliers = loadSuppliers;
// 修复showImageViewer未定义问题,先定义函数再赋值
function showImageViewer(imageUrl) {
const viewer = document.getElementById('imageViewer');
const viewerImage = document.getElementById('viewerImage');
viewerImage.src = imageUrl;
viewer.classList.add('active');
viewer.style.display = 'flex';
document.body.style.overflow = 'hidden'; // 阻止背景滚动
// 重置缩放和位置
scale = 1;
translateX = 0;
translateY = 0;
if (viewerImage.style.transform) {
viewerImage.style.transform = 'scale(1) translate(0, 0)';
}
// 修复showImageViewer未定义问题,直接调用openImageViewer函数
function showImageViewer(imgElement) {
openImageViewer(imgElement);
}
</script>
@ -3472,21 +3458,10 @@ function showImageViewer(imageUrl) {
const supplyItem = imgElement.closest('.supply-item');
if (supplyItem) {
// 获取该产品项中所有图片
const allImages = supplyItem.querySelectorAll('.supply-images img');
// 获取该产品项中所有带有data-product-image属性的图片,包括证明材料
const allImages = supplyItem.querySelectorAll('img[data-product-image="true"]');
currentImageUrls = Array.from(allImages).map(img => img.src.split('?')[0]);
// 找到当前图片在数组中的索引
currentImageIndex = currentImageUrls.findIndex(url => url === currentImageUrl);
if (currentImageIndex === -1) currentImageIndex = 0;
} else {
// 检查是否是供应商证明材料的图片
const proofItem = imgElement.closest('.proof-item');
if (proofItem && proofItem.closest('.supplier-detail-content')) {
// 查找同一份供应商证明中的所有图片
const allSupplierImages = document.querySelectorAll('.supplier-detail-content .proof-item img[data-product-image="true"]');
currentImageUrls = Array.from(allSupplierImages).map(img => img.src.split('?')[0]);
// 找到当前图片在数组中的索引
currentImageIndex = currentImageUrls.findIndex(url => url === currentImageUrl);
if (currentImageIndex === -1) currentImageIndex = 0;
@ -3495,7 +3470,6 @@ function showImageViewer(imageUrl) {
currentImageUrls = [currentImageUrl];
currentImageIndex = 0;
}
}
viewerImage.src = currentImageUrls[currentImageIndex];

4
supply.html

@ -1672,7 +1672,7 @@
let editAllSourceTypes = ['平台货源', '三方认证', '三方未认证'];
let editFilteredSourceTypes = [...editAllSourceTypes];
let editSelectedSourceType = '';
let editAllCategories = ['粉壳', '壳', '绿壳', '白壳'];
let editAllCategories = ['粉壳', '壳', '绿壳', '白壳'];
let editFilteredCategories = [...editAllCategories];
let editSelectedCategory = '';
let editAllProductNames = ['罗曼粉', '伊莎粉', '罗曼灰', '海蓝灰', '海蓝褐', '绿壳', '双黄蛋'];
@ -1851,7 +1851,7 @@
let selectedYolk = '';
// 种类选择功能
let allCategoryOptions = ['粉壳', '壳', '绿壳', '白壳'];
let allCategoryOptions = ['粉壳', '壳', '绿壳', '白壳'];
let filteredCategoryOptions = [...allCategoryOptions];
let selectedCategory = '';

Loading…
Cancel
Save