Commit f2aed4ee by 郑云飞

地址修改

parent 41c619c8
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
</div> </div>
</div> </div>
<div class="layui-card-body"> <div class="layui-card-body">
<table class="layui-table" id="tableId" lay-data="{id: 'tableId', toolbar: '#toolbarUtil', even: true, height: 'full-400', page: false, limit: 10, cols: [[ <table class="layui-table" id="tableId" lay-data="{id: 'tableId', toolbar: '#toolbarUtil', even: true, height: 'full-400', page: false, limit: 9999, cols: [[
{field: 'id', title: '编码'}, {field: 'id', title: '编码'},
{field: 'sshortpic', title: '头图'}, {field: 'sshortpic', title: '头图'},
{field: 'sname', title: '名称'}, {field: 'sname', title: '名称'},
...@@ -189,7 +189,6 @@ ...@@ -189,7 +189,6 @@
} else { } else {
selectedValues.push(parseInt(data.value)); selectedValues.push(parseInt(data.value));
} }
console.log(selectedValues); // 打印选中的值
}); });
}); });
...@@ -234,18 +233,16 @@ ...@@ -234,18 +233,16 @@
$(function () { $(function () {
if (id) { if (id) {
console.log("===========================", '[[${obj}]]')
console.log("===========================", '[[${areaList}]]')
showPic('[[${obj.groupBuyPic}]]'); showPic('[[${obj.groupBuyPic}]]');
showTable('[[${obj.productList}]]'); showTable('[[${obj.productList}]]');
console.log(111111111, selectedData)
renderTable(); renderTable();
} }
}); });
window.addEventListener('message', function (event) { window.addEventListener('message', function (event) {
console.log(event); selectedData.push(...event.data);
selectedData = event.data; const idSet = new Set(selectedData.map(item => item.id));
selectedData = Array.from(idSet).map(id => selectedData.find(item => item.id === id));
for (var i = 0; i < selectedData.length; i++) { for (var i = 0; i < selectedData.length; i++) {
selectedData[i].productPrice = selectedData[i].productPrice || selectedData[i].dsaleprice; selectedData[i].productPrice = selectedData[i].productPrice || selectedData[i].dsaleprice;
} }
...@@ -253,12 +250,13 @@ ...@@ -253,12 +250,13 @@
}, false); }, false);
function renderTable() { function renderTable() {
table.render({ table.render({
elem: '#tableId', elem: '#tableId',
data: selectedData, data: selectedData,
toolbar: '#toolbarUtil', //开启头部工具栏,并为其绑定左侧模板 toolbar: '#toolbarUtil', //开启头部工具栏,并为其绑定左侧模板
even: true, //隔行换色 even: true, //隔行换色
page: false,
limit: 9999,
cols: [ cols: [
[ [
{field: 'id', title: '编码'}, {field: 'id', title: '编码'},
...@@ -400,7 +398,6 @@ ...@@ -400,7 +398,6 @@
return data; return data;
}, {}) }, {})
); );
console.log(products)
groupBuy = JSON.parse(groupBuy) groupBuy = JSON.parse(groupBuy)
groupBuy.areaIdList = areaIdList; groupBuy.areaIdList = areaIdList;
groupBuy.products = products; groupBuy.products = products;
...@@ -416,9 +413,7 @@ ...@@ -416,9 +413,7 @@
processData: false, processData: false,
contentType: "application/json", contentType: "application/json",
success: function (result) { success: function (result) {
console.log("sdffffffffffffffffff", result);
if (result.code == 100) { if (result.code == 100) {
console.log("sdffffffffffffffffff", 100);
closeLayer(); closeLayer();
parent.layui.table.reload('tableId'); parent.layui.table.reload('tableId');
} else { } else {
...@@ -458,7 +453,6 @@ ...@@ -458,7 +453,6 @@
for (var i = 0; i < selectedData.length; i++) { for (var i = 0; i < selectedData.length; i++) {
selectedData[i].productPrice = selectedData[i].productPrice || ''; selectedData[i].productPrice = selectedData[i].productPrice || '';
} }
console.log(222222222, selectedData)
} }
layui.use('form', function () { layui.use('form', function () {
...@@ -468,7 +462,6 @@ ...@@ -468,7 +462,6 @@
function closeLayer() { function closeLayer() {
console.log("sdffffffffffffffffff");
//关闭当前frame //关闭当前frame
parent.layer.close(parent.layer.getFrameIndex(window.name)); parent.layer.close(parent.layer.getFrameIndex(window.name));
} }
......
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