From 864c18c46c2db1ae92220181e40b291b3b0d9446 Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期一, 27 十月 2025 09:57:48 +0800
Subject: [PATCH] #1
---
src/main/webapp/static/js/locDetl/locDetl.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 48 insertions(+), 1 deletions(-)
diff --git a/src/main/webapp/static/js/locDetl/locDetl.js b/src/main/webapp/static/js/locDetl/locDetl.js
index d46cb7c..7130954 100644
--- a/src/main/webapp/static/js/locDetl/locDetl.js
+++ b/src/main/webapp/static/js/locDetl/locDetl.js
@@ -17,7 +17,12 @@
,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
- ,{field: 'sku', align: 'center',title: '绠�鍥�', hide: false}
+ // ,{fixed: 'right', title:'绠�鍥�', align: 'center', toolbar: '#operate1', width: 300}
+ ,{field: 'right', align: 'center',title: '绠�鍥�', templet:function(row){
+ var html = "<img src='http://127.0.0.1:8080/czkhasrs/previewImage?maktx=" +row.maktx+"'/>";
+
+ return html;
+ }}
,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true}
,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
,{field: 'origin', align: 'center',title: '浜у湴', hide: true}
@@ -371,6 +376,48 @@
});
}
break;
+ // 鏌ョ湅绠�鍥�
+ case 'showPic':
+ let imgHtml = '<div style="height:100%;display: flex;justify-content: space-around;align-items: center;flex-wrap: wrap;">';
+ $.ajax({
+ url: baseUrl+"/previewImage",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ maktx: data.maktx
+ },
+ method: 'GET',
+ traditional:true,
+ success: function (res) {
+ if (res.code === 200){
+ res.data.forEach((item) => {
+ let maktx = item.maktx;
+ let pics = item.pics;
+ pics.forEach((pic) => {
+ let tmp = '<div><div><img width="600" src="' + pic + '" /></div><div>' + maktx + '</div></div>';
+ imgHtml += tmp;
+ })
+ })
+ imgHtml += "</div>";
+
+ layer.open({
+ type: 1,
+ title: '鏌ョ湅绠�鍥�',
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: imgHtml,
+ success: function(layero, index){
+ }
+ });
+
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ });
+ console.log(imgHtml)
+ break;
}
});
--
Gitblit v1.9.1