mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-23 09:50:25 +08:00
修改模板文件
This commit is contained in:
parent
41aecdf38c
commit
bd2429dd4a
@ -137,28 +137,20 @@
|
|||||||
window.form.render();
|
window.form.render();
|
||||||
require(['excel'], function (excel) {
|
require(['excel'], function (excel) {
|
||||||
excel.bind(function (data) {
|
excel.bind(function (data) {
|
||||||
console.log(data);
|
|
||||||
var items = [];
|
var items = [];
|
||||||
items.push(['订单号', '用户手机', '用户姓名', '商品名称', '商品编码', '商品规格SKU', '商品规格描述', '商品数量', '商品单价', '支付单号', '支付方式', '支付状态', '支付金额', '支付时间']);
|
items.push(['订单号', '用户手机', '用户姓名', '订单类型', '支付单号', '支付方式', '支付状态', '支付金额', '支付时间']);
|
||||||
data.forEach(function (order, index) {
|
data.forEach(function (order) {
|
||||||
order.items.forEach(function (goods) {
|
items.push([
|
||||||
items.push([
|
order.order_no,
|
||||||
order.order_no,
|
order.user.phone,
|
||||||
order.user.phone,
|
order.user.username || order.user.nickname || '',
|
||||||
order.user.username || order.user.nickname || '',
|
order.truck_type ? '虚拟商品' : '实物商品',
|
||||||
goods.goods_name,
|
order.payment_trade || '',
|
||||||
goods.goods_code,
|
order.payment_name || order.payment_type || '',
|
||||||
goods.goods_sku,
|
order.payment_status ? '已支付' : '未支付',
|
||||||
goods.goods_spec,
|
order.payment_amount || '0.00',
|
||||||
goods.stock_sales,
|
order.payment_datetime || '',
|
||||||
goods.price_selling,
|
]);
|
||||||
order.payment_trade || '',
|
|
||||||
order.payment_name || order.payment_type || '',
|
|
||||||
order.payment_status ? '已支付' : '未支付',
|
|
||||||
order.payment_amount || '0.00',
|
|
||||||
order.payment_datetime || '',
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
return items;
|
return items;
|
||||||
}, '用户订单记录');
|
}, '用户订单记录');
|
||||||
|
@ -98,6 +98,8 @@
|
|||||||
rows.push([
|
rows.push([
|
||||||
order.order_no,
|
order.order_no,
|
||||||
item.goods_name,
|
item.goods_name,
|
||||||
|
item.goods_sku,
|
||||||
|
item.goods_spec,
|
||||||
item.stock_sales,
|
item.stock_sales,
|
||||||
item.price_selling,
|
item.price_selling,
|
||||||
item.total_selling,
|
item.total_selling,
|
||||||
@ -110,10 +112,10 @@
|
|||||||
order.truck.address_area,
|
order.truck.address_area,
|
||||||
order.truck.address_content,
|
order.truck.address_content,
|
||||||
]);
|
]);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
rows.unshift([
|
rows.unshift([
|
||||||
'订单号', '物品名称', '数量', '单价', '总额',
|
'订单号', '物品名称', '物品SKU编码', '物品规格描述', '数量', '单价', '总额',
|
||||||
'寄件方', '身份证号', '收货人', '电话', '省份', '城市', '区', '地址'
|
'寄件方', '身份证号', '收货人', '电话', '省份', '城市', '区', '地址'
|
||||||
]);
|
]);
|
||||||
return rows;
|
return rows;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user