|
@@ -106,7 +106,12 @@ class Buy
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $result['order'] = Dever::db($this->table)->getAll($where);
|
|
|
+ $excel = Dever::input('excel', 1);
|
|
|
+ if ($excel == 2) {
|
|
|
+ $result['order'] = Dever::db($this->table)->getData($where);
|
|
|
+ } else {
|
|
|
+ $result['order'] = Dever::db($this->table)->getAll($where);
|
|
|
+ }
|
|
|
|
|
|
if ($result['order']) {
|
|
|
foreach ($result['order'] as $k => $v) {
|
|
@@ -703,12 +708,14 @@ class Buy
|
|
|
'name' => '打印货单',
|
|
|
);
|
|
|
|
|
|
- $button[] = array
|
|
|
- (
|
|
|
- 'type' => 'link',
|
|
|
- 'link' => Dever::url('lib/buy.excel_one?type='.$info['type'].'&type_id='.$info['type_id'].'&id='.$info['id'], 'mshop'),
|
|
|
- 'name' => '导出货单',
|
|
|
- );
|
|
|
+ if ($info['type'] == 2) {
|
|
|
+ $button[] = array
|
|
|
+ (
|
|
|
+ 'type' => 'link',
|
|
|
+ 'link' => Dever::url('lib/buy.excel_one?type='.$info['type'].'&type_id='.$info['type_id'].'&id='.$info['id'], 'mshop'),
|
|
|
+ 'name' => '导出货单',
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
if ($info['status'] == 3 && $info['type'] == 1) {
|
|
|
$button[] = array
|
|
@@ -948,7 +955,7 @@ class Buy
|
|
|
if ($tk && $v['status'] == 3 && $tk['status'] != 3) {
|
|
|
$d['status'] = $tk_status[$tk['status']];
|
|
|
if ($noprice == 1) {
|
|
|
- //unset($d['price']);
|
|
|
+ unset($d['price']);
|
|
|
}
|
|
|
$refund_body[] = $d;
|
|
|
$price = $v['price']*$v['num'];
|
|
@@ -956,7 +963,7 @@ class Buy
|
|
|
$refund_body_total['num'] += $v['num'];
|
|
|
} else {
|
|
|
if ($noprice == 1) {
|
|
|
- //unset($d['price']);
|
|
|
+ unset($d['price']);
|
|
|
}
|
|
|
$body[] = $d;
|
|
|
$price = $v['price']*$v['num'];
|
|
@@ -975,8 +982,8 @@ class Buy
|
|
|
}
|
|
|
|
|
|
if ($noprice == 1) {
|
|
|
- //unset($body_total['price']);
|
|
|
- //unset($body_total['set_price']);
|
|
|
+ unset($body_total['price']);
|
|
|
+ unset($body_total['set_price']);
|
|
|
}
|
|
|
|
|
|
$result['商品清单'] = array
|
|
@@ -990,7 +997,7 @@ class Buy
|
|
|
if ($refund_body) {
|
|
|
|
|
|
if ($noprice == 1) {
|
|
|
- //unset($refund_body_total['price']);
|
|
|
+ unset($refund_body_total['price']);
|
|
|
}
|
|
|
|
|
|
$result['缺货与报损商品'] = array
|
|
@@ -1027,7 +1034,7 @@ class Buy
|
|
|
$head = array('序号', '结算单号', '数量', '金额', '结算类型', '入账状态', '审核状态', '结算时间', '审核未通过原因', '管理');
|
|
|
|
|
|
if ($search_option_type == 3) {
|
|
|
- //unset($head[3]);
|
|
|
+ unset($head[3]);
|
|
|
}
|
|
|
|
|
|
$body = array();
|
|
@@ -1062,7 +1069,7 @@ class Buy
|
|
|
);
|
|
|
|
|
|
if ($search_option_type == 3) {
|
|
|
- //unset($d[3]);
|
|
|
+ unset($d[3]);
|
|
|
}
|
|
|
$body[] = $d;
|
|
|
}
|
|
@@ -1712,13 +1719,11 @@ class Buy
|
|
|
$file = '入库订单';
|
|
|
$type = Dever::input('search_option_type', $this->type);
|
|
|
|
|
|
- $header = array('所属仓库', '订单号', '商品来源', '发货日期', '商品名称', '商品规格属性', '商品采购价格', '商品数量', '采购总价格', '报损退款状态', '订单状态');
|
|
|
+ $header = array('所属仓库', '订单号', '商品来源', '发货日期', '商品名称', '商品规格属性', '商品数量', '报损退款状态', '订单状态');
|
|
|
|
|
|
$table = 'store/info';
|
|
|
if ($type == 1) {
|
|
|
$header[0] = '所属门店';
|
|
|
- $header[6] = '商品销售价格';
|
|
|
- $header[8] = '销售总价格';
|
|
|
$table = 'shop/info';
|
|
|
}
|
|
|
|
|
@@ -1744,9 +1749,7 @@ class Buy
|
|
|
$v['cdate'],
|
|
|
$goods_info['name'],
|
|
|
$sku,
|
|
|
- $v1['price'],
|
|
|
$v1['num'],
|
|
|
- $v1['price']*$v1['num'],
|
|
|
$v1['status_name'],
|
|
|
$v['status_name'],
|
|
|
);
|