|
@@ -423,7 +423,7 @@ class Buy
|
|
} else {
|
|
} else {
|
|
$status = 5;
|
|
$status = 5;
|
|
}
|
|
}
|
|
- $state = Dever::db('shop/buy_order')->update(array('where_id' => $data['id'], 'status' => $status));
|
|
|
|
|
|
+ $state = Dever::db('shop/buy_order')->update(array('where_id' => $data['id'], 'status' => $status, 'fdate' => time()));
|
|
if ($state) {
|
|
if ($state) {
|
|
$this->updatePs($data, 3);
|
|
$this->updatePs($data, 3);
|
|
# 增加库存
|
|
# 增加库存
|
|
@@ -542,7 +542,18 @@ class Buy
|
|
$tk = Dever::db('shop/buy_order_refund')->find(array('order_id' => $info['id'], 'type' => 1));
|
|
$tk = Dever::db('shop/buy_order_refund')->find(array('order_id' => $info['id'], 'type' => 1));
|
|
|
|
|
|
$cdate = date('Y-m-d H:i', $info['cdate']);
|
|
$cdate = date('Y-m-d H:i', $info['cdate']);
|
|
- $opertime = date('Y-m-d H:i', $info['operdate']);
|
|
|
|
|
|
+ if ($info['operdate']) {
|
|
|
|
+ $opertime = date('Y-m-d H:i', $info['operdate']);
|
|
|
|
+ } else {
|
|
|
|
+ $opertime = '';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($info['fdate']) {
|
|
|
|
+ $fdate = date('Y-m-d H:i', $info['fdate']);
|
|
|
|
+ } else {
|
|
|
|
+ $fdate = '';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
$html = '<div class="layui-col-md12"><div class="layui-card"><div class="layui-card-header">基本信息</div><div class="layui-card-body">';
|
|
$html = '<div class="layui-col-md12"><div class="layui-card"><div class="layui-card-header">基本信息</div><div class="layui-card-body">';
|
|
$html .= '<table class="layui-table"><thead><tr><th style="width:20%">项目</th><th style="width:80%">详情</th></tr> </thead><tbody>';
|
|
$html .= '<table class="layui-table"><thead><tr><th style="width:20%">项目</th><th style="width:80%">详情</th></tr> </thead><tbody>';
|
|
@@ -551,7 +562,7 @@ class Buy
|
|
$info['price'] = $info['p_price'];
|
|
$info['price'] = $info['p_price'];
|
|
}
|
|
}
|
|
$html .= '<tr>
|
|
$html .= '<tr>
|
|
- <td>基本信息</td>
|
|
|
|
|
|
+ <td>订单信息</td>
|
|
<td>'.$this->table(false, array(array('订单号:' . $info['order_num'], '金额:' . $info['price'], '数量:' . $info['num'], '状态:' . $status))).'</td>
|
|
<td>'.$this->table(false, array(array('订单号:' . $info['order_num'], '金额:' . $info['price'], '数量:' . $info['num'], '状态:' . $status))).'</td>
|
|
|
|
|
|
</tr>';
|
|
</tr>';
|
|
@@ -565,6 +576,10 @@ class Buy
|
|
} else {
|
|
} else {
|
|
$time = array('订货时间:' . $opertime);
|
|
$time = array('订货时间:' . $opertime);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if ($fdate) {
|
|
|
|
+ $time[] = '完成时间:' . $fdate;
|
|
|
|
+ }
|
|
|
|
|
|
$html .= '<tr>
|
|
$html .= '<tr>
|
|
<td>订单时间</td>
|
|
<td>订单时间</td>
|
|
@@ -670,6 +685,8 @@ class Buy
|
|
$info['ps_info']['cdate'] = date('Y-m-d H:i', $info['ps_info']['cdate']);
|
|
$info['ps_info']['cdate'] = date('Y-m-d H:i', $info['ps_info']['cdate']);
|
|
if ($info['ps_info']['ydate']) {
|
|
if ($info['ps_info']['ydate']) {
|
|
$info['ps_info']['ydate'] = date('Y-m-d H:i', $info['ps_info']['ydate']);
|
|
$info['ps_info']['ydate'] = date('Y-m-d H:i', $info['ps_info']['ydate']);
|
|
|
|
+ } else {
|
|
|
|
+ $info['ps_info']['ydate'] = '无';
|
|
}
|
|
}
|
|
|
|
|
|
$status = Dever::db('shop/buy_order_ps')->config['status'];
|
|
$status = Dever::db('shop/buy_order_ps')->config['status'];
|
|
@@ -681,19 +698,11 @@ class Buy
|
|
$info['ps_info']['service_name'] = $service['name'];
|
|
$info['ps_info']['service_name'] = $service['name'];
|
|
}
|
|
}
|
|
|
|
|
|
- $head = array('名称', '单号', '费用', '配货员', '更多');
|
|
|
|
|
|
+ $head = array('名称', '单号', '费用', '数量', '重量', '体积', '配货员', '打包员', '发货时间', '收货时间');
|
|
|
|
|
|
- $table = array();
|
|
|
|
- $table['打包员'] = $info['ps_info']['dby'];
|
|
|
|
- $table['数量'] = $info['ps_info']['num'];
|
|
|
|
- $table['重量'] = $info['ps_info']['zl'];
|
|
|
|
- $table['体积'] = $info['ps_info']['tj'];
|
|
|
|
- $table['发货时间'] = $info['ps_info']['cdate'];
|
|
|
|
- if ($info['ps_info']['ydate']) {
|
|
|
|
- $table['收货时间'] = $info['ps_info']['ydate'];
|
|
|
|
- }
|
|
|
|
|
|
+ //, '<a href="javascript:showAlert($(\'#refund_content\').html());">查看</a><span id="refund_content" style="display:none">'.Dever::table($table).'</span>')
|
|
|
|
|
|
- $body = array(array($info['ps_info']['service_name'], $info['ps_info']['order_num'], $info['ps_info']['price'], $info['ps_info']['phy'], '<a href="javascript:showAlert($(\'#refund_content\').html());">查看</a><span id="refund_content" style="display:none">'.Dever::table($table).'</span>'));
|
|
|
|
|
|
+ $body = array(array($info['ps_info']['service_name'], $info['ps_info']['order_num'], $info['ps_info']['price'], $info['ps_info']['num'], $info['ps_info']['zl'], $info['ps_info']['tj'], $info['ps_info']['phy'], $info['ps_info']['dby'], $info['ps_info']['cdate'], $info['ps_info']['ydate']));
|
|
|
|
|
|
$html .= '<div class="layui-card"><div class="layui-card-header">物流信息</div><div class="layui-card-body">' . $this->table($head, $body) . '</div></div>';
|
|
$html .= '<div class="layui-card"><div class="layui-card-header">物流信息</div><div class="layui-card-body">' . $this->table($head, $body) . '</div></div>';
|
|
}
|
|
}
|
|
@@ -793,7 +802,7 @@ class Buy
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
- $html .= '<div class="layui-card"><div class="layui-card-header">商品清单</div><div class="layui-card-body" style="max-height: 500px;overflow: auto;">' . $this->table($head, $body) . '</div></div>';
|
|
|
|
|
|
+ $html .= '<div class="layui-card"><div class="layui-card-header">商品清单</div><div class="layui-card-body" style="max-heights: 500px;overflow: auto;">' . $this->table($head, $body) . '</div></div>';
|
|
}
|
|
}
|
|
|
|
|
|
if ($refund_body) {
|
|
if ($refund_body) {
|
|
@@ -808,7 +817,7 @@ class Buy
|
|
'-'
|
|
'-'
|
|
);
|
|
);
|
|
|
|
|
|
- $html .= '<div class="layui-card"><div class="layui-card-header">缺货与报损商品</div><div class="layui-card-body" style="max-height: 300px;overflow: auto;">' . $this->table($head, $refund_body) . '</div></div>';
|
|
|
|
|
|
+ $html .= '<div class="layui-card"><div class="layui-card-header">缺货与报损商品</div><div class="layui-card-body" style="max-heights: 300px;overflow: auto;">' . $this->table($head, $refund_body) . '</div></div>';
|
|
}
|
|
}
|
|
|
|
|
|
if ($type == 1) {
|
|
if ($type == 1) {
|