Commit f2aed4ee by 郑云飞

地址修改

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