feat: show Adpingid in order coverage
This commit is contained in:
+16
-7
@@ -332,13 +332,16 @@
|
||||
}
|
||||
|
||||
function applyFilters() {
|
||||
const query = document.getElementById('search').value.trim().toLocaleLowerCase();
|
||||
const search = document.getElementById('search');
|
||||
search.placeholder = '搜索 Adpingid、Pkg 或产品名';
|
||||
const query = search.value.trim().toLocaleLowerCase();
|
||||
const country = document.getElementById('countryFilter').value;
|
||||
const platform = document.getElementById('platformFilter').value;
|
||||
const status = document.getElementById('statusFilter').value;
|
||||
state.filtered = state.data.records.filter(row => {
|
||||
const recordStatus = statusOf(row).key;
|
||||
return (!query || `${row.pkg} ${row.product}`.toLocaleLowerCase().includes(query))
|
||||
const searchable = `${row.adpingids.join(' ')} ${row.pkg} ${row.product}`.toLocaleLowerCase();
|
||||
return (!query || searchable.includes(query))
|
||||
&& (country === 'all' || row.country === country)
|
||||
&& (platform === 'all' || row.platforms.includes(platform))
|
||||
&& (status === 'all' || recordStatus === status);
|
||||
@@ -364,17 +367,18 @@
|
||||
const table = el('table');
|
||||
const thead = el('thead');
|
||||
const header = el('tr');
|
||||
['搬单状态', '产品', 'Pkg', '国家', '已出现平台', '源订单行数'].forEach(label => header.append(el('th', '', label)));
|
||||
['搬单状态', 'Adpingid', '产品', 'Pkg', '国家', '已出现平台', '源订单行数'].forEach(label => header.append(el('th', '', label)));
|
||||
thead.append(header); table.append(thead);
|
||||
const tbody = el('tbody');
|
||||
if (!rows.length) {
|
||||
const cell = el('td', 'empty', '没有符合当前条件的记录'); cell.colSpan = 6;
|
||||
const cell = el('td', 'empty', '没有符合当前条件的记录'); cell.colSpan = 7;
|
||||
const row = el('tr'); row.append(cell); tbody.append(row);
|
||||
}
|
||||
rows.forEach(record => {
|
||||
const row = el('tr');
|
||||
const status = statusOf(record);
|
||||
const badgeCell = el('td'); badgeCell.append(el('span', `badge ${status.key}`, status.label));
|
||||
const adpingids = el('td', 'pkg', record.adpingids.join(' / ') || '-');
|
||||
const product = el('td', 'product', record.product);
|
||||
const pkg = el('td', 'pkg', record.pkg);
|
||||
const country = el('td'); country.append(el('span', 'country-pill', record.country));
|
||||
@@ -382,7 +386,7 @@
|
||||
const pills = el('div', 'platforms');
|
||||
record.platforms.forEach(name => pills.append(el('span', `platform-pill ${name === state.data.meta.target_platform ? 'target' : ''}`.trim(), name)));
|
||||
platforms.append(pills);
|
||||
row.append(badgeCell, product, pkg, country, platforms, el('td', '', nf.format(record.order_count)));
|
||||
row.append(badgeCell, adpingids, product, pkg, country, platforms, el('td', '', nf.format(record.order_count)));
|
||||
tbody.append(row);
|
||||
});
|
||||
table.append(tbody); wrap.append(table);
|
||||
@@ -405,7 +409,11 @@
|
||||
rows.forEach(record => {
|
||||
const row = el('tr');
|
||||
const key = el('td');
|
||||
key.append(el('div', 'pkg', record.pkg), el('div', 'panel-desc', record.country));
|
||||
key.append(
|
||||
el('div', 'pkg', record.pkg),
|
||||
el('div', 'panel-desc', record.country),
|
||||
el('div', 'panel-desc', `Adpingid:${record.adpingids.join(' / ') || '-'}`)
|
||||
);
|
||||
row.append(key);
|
||||
platforms.forEach(name => {
|
||||
const cell = el('td');
|
||||
@@ -430,9 +438,10 @@
|
||||
}
|
||||
|
||||
function exportCsv() {
|
||||
const headers = ['搬单状态', '产品', 'Pkg', '投放国家', '已出现平台', '是否有TaurusxDSP', '源订单行数'];
|
||||
const headers = ['搬单状态', 'Adpingid', '产品', 'Pkg', '投放国家', '已出现平台', '是否有TaurusxDSP', '源订单行数'];
|
||||
const csvRows = [headers, ...state.filtered.map(record => [
|
||||
statusOf(record).label,
|
||||
record.adpingids.join(' / '),
|
||||
record.product,
|
||||
record.pkg,
|
||||
record.country,
|
||||
|
||||
Reference in New Issue
Block a user