|
@@ -39,7 +39,7 @@ class Buy
|
|
|
if ($this->type > 10) {
|
|
|
$type = $this->type - 10;
|
|
|
$where['source_type'] = $type;
|
|
|
- $where['source_type_id'] = $id;
|
|
|
+ $where['source_id'] = $id;
|
|
|
} else {
|
|
|
$where['type'] = $this->type;
|
|
|
$where['type_id'] = $id;
|
|
@@ -61,8 +61,9 @@ class Buy
|
|
|
if ($status) {
|
|
|
if ($status == 'refund') {
|
|
|
$where['refund_status'] = 2;
|
|
|
+ } else {
|
|
|
+ $where['status'] = $status;
|
|
|
}
|
|
|
- $where['status'] = $status;
|
|
|
}
|
|
|
|
|
|
$order_num = Dever::input('order_num');
|
|
@@ -470,13 +471,53 @@ class Buy
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function refund_api()
|
|
|
+ public function refund_commit_api()
|
|
|
{
|
|
|
$id = Dever::input('id');
|
|
|
$process = Dever::input('process');
|
|
|
return Dever::load('shop/lib/refund')->set('buy')->action($id, $process, false);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function refund_apply_commit_api()
|
|
|
+ {
|
|
|
+ $order_id = Dever::input('order_id');
|
|
|
+ $type = Dever::input('type');
|
|
|
+ $type_id = Dever::input('type_id');
|
|
|
+ $desc = Dever::input('desc');
|
|
|
+ $pic = Dever::input('pic');
|
|
|
+
|
|
|
+ return Dever::load('shop/lib/refund')->set('buy')->apply($type, $type_id, $order_id, false, 3, 0, $desc, $pic, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function refund_apply_info_commit_api()
|
|
|
+ {
|
|
|
+ $order_id = Dever::input('order_id');
|
|
|
+ $status = Dever::input('status');
|
|
|
+ $desc = Dever::input('desc');
|
|
|
+ $pic = Dever::input('pic');
|
|
|
+ $type = Dever::input('type');
|
|
|
+ $type_id = Dever::input('type_id');
|
|
|
+
|
|
|
+ return Dever::load('shop/lib/refund')->set('buy')->apply($type, $type_id, $order_id, false, $status, 0, $desc, $pic, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function refund_apply_info_one_commit_api()
|
|
|
+ {
|
|
|
+ $order_id = Dever::input('order_id');
|
|
|
+ $order_goods_id = Dever::input('order_goods_id');
|
|
|
+ $num = Dever::input('num', 0);
|
|
|
+ $status = Dever::input('status');
|
|
|
+ $desc = Dever::input('desc');
|
|
|
+ $pic = Dever::input('pic');
|
|
|
+ $type = Dever::input('type');
|
|
|
+ $type_id = Dever::input('type_id');
|
|
|
+
|
|
|
+ return Dever::load('shop/lib/refund')->set('buy')->apply($type, $type_id, $order_id, $order_goods_id, $status, $num, $desc, $pic, 1);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public function show()
|
|
|
{
|
|
@@ -495,10 +536,15 @@ class Buy
|
|
|
|
|
|
$tk = Dever::db('shop/buy_order_refund')->find(array('order_id' => $info['id'], 'type' => 1));
|
|
|
|
|
|
+ $cdate = date('Y-m-d H:i', $info['cdate']);
|
|
|
$opertime = date('Y-m-d H:i', $info['operdate']);
|
|
|
|
|
|
- $html = '[基本信息]:<table class="layui-table"><thead><tr><th style="width:20%">项目</th><th style="width:80%">详情</th></tr> </thead><tbody>';
|
|
|
+ $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>';
|
|
|
|
|
|
+ if ($type == 2) {
|
|
|
+ $info['price'] = $info['p_price'];
|
|
|
+ }
|
|
|
$html .= '<tr>
|
|
|
<td>基本信息</td>
|
|
|
<td>'.$this->table(false, array(array('订单号:' . $info['order_num'], '金额:' . $info['price'], '数量:' . $info['num'], '状态:' . $status))).'</td>
|
|
@@ -509,7 +555,12 @@ class Buy
|
|
|
$status = '申请' . $tk_status[$tk['status']];
|
|
|
}
|
|
|
|
|
|
- $time = array($opertime);
|
|
|
+ if ($type == 1) {
|
|
|
+ $time = array('下单时间:' . $cdate, '订货时间:' . $opertime);
|
|
|
+ } else {
|
|
|
+ $time = array('订货时间:' . $opertime);
|
|
|
+ }
|
|
|
+
|
|
|
$html .= '<tr>
|
|
|
<td>订单时间</td>
|
|
|
<td>'.$this->table(false, array($time)).'</td>
|
|
@@ -554,9 +605,29 @@ class Buy
|
|
|
</tr>';
|
|
|
}
|
|
|
|
|
|
- $html .= '</tbody></table>';
|
|
|
+ if ($type == 2) {
|
|
|
+ $config = Dever::load('factory/admin/auth.config');
|
|
|
+ $button = array();
|
|
|
+ if ($info['status'] < 5) {
|
|
|
+ $button[] = '<button class="layui-btn layui-btn-primary" onclick="$(\'#print_'.$info['id'].'\').click()">打印货单</button>';
|
|
|
+ }
|
|
|
+ if ($info['status'] == 3) {
|
|
|
+ $cancel = Dever::url('lib/buy.refund_apply_commit?json=1', 'mshop');
|
|
|
+ $button[] = '<button class="layui-btn layui-btn-primary" onclick="$(\'#send_'.$info['id'].'\').click()">配送发货</button>';
|
|
|
+ $button[] = '<button class="layui-btn layui-btn-primary" onclick="cancel('.$info['id'].','.$info['source_id'].', \''.$cancel.'\')">取消订单</button>';
|
|
|
+ }
|
|
|
+ $config['phone'] = '您的专属客服:' . $config['kf_name'] . ',联系电话:' . $config['phone'];
|
|
|
+ $button[] = '<button class="layui-btn layui-btn-primary" onclick="showAlert(\''.$config['phone'].'\')">联系平台</button>';
|
|
|
+ $html .= '<tr>
|
|
|
+ <td>功能按钮</td>
|
|
|
+ <td>'.$this->table(false, array($button)).'</td>
|
|
|
+
|
|
|
+ </tr>';
|
|
|
+ }
|
|
|
+
|
|
|
+ $html .= '</tbody></table></div></div>';
|
|
|
|
|
|
- $url = Dever::url('lib/buy.refund', 'mshop');
|
|
|
+ $url = Dever::url('lib/buy.refund_commit?json=1', 'mshop');
|
|
|
if (!$info['refund_cash']) {
|
|
|
$info['refund_cash'] = 0;
|
|
|
}
|
|
@@ -570,22 +641,21 @@ class Buy
|
|
|
}
|
|
|
$desc = array();
|
|
|
$desc['退款原因'] = $tk['desc'];
|
|
|
+ $desc['退款图片'] = '暂无';
|
|
|
if ($tk['pic']) {
|
|
|
$desc['退款图片'] = '';
|
|
|
$pic = explode(',', $tk['pic']);
|
|
|
foreach ($pic as $k => $v) {
|
|
|
- $desc['图片'] .= '<a href="'.$v.'" target="_blank"><img src="'.$v.'" width="100"/></a>';
|
|
|
+ $desc['退款图片'] .= '<a href="'.$v.'" target="_blank"><img src="'.$v.'" width="100"/></a>';
|
|
|
}
|
|
|
}
|
|
|
$tk['desc'] = '<a href="javascript:showAlert($(\'#desc_content\').html());">查看</a><span id="desc_content" style="display:none">'.Dever::table($desc).'</span>';
|
|
|
|
|
|
- $html .= '[退款信息]:';
|
|
|
-
|
|
|
$head = array('退款金额', '数量', '退款进度', '退款原因');
|
|
|
|
|
|
$body = array(array($info['refund_cash'], $info['num'], $process, $tk['desc']));
|
|
|
|
|
|
- $html .= $this->table($head, $body);
|
|
|
+ $html .= '<div class="layui-card"><div class="layui-card-header">退款信息</div><div class="layui-card-body">' . $this->table($head, $body) . '</div></div>';
|
|
|
|
|
|
}
|
|
|
|
|
@@ -606,60 +676,137 @@ class Buy
|
|
|
$info['ps_info']['service_name'] = $service['name'];
|
|
|
}
|
|
|
|
|
|
- $html .= '[物流信息]:';
|
|
|
+ $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'];
|
|
|
+ }
|
|
|
|
|
|
- $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']['status_name']));
|
|
|
+ $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>'));
|
|
|
|
|
|
- $html .= $this->table($head, $body);
|
|
|
+ $html .= '<div class="layui-card"><div class="layui-card-header">物流信息</div><div class="layui-card-body">' . $this->table($head, $body) . '</div></div>';
|
|
|
}
|
|
|
|
|
|
- $html .= '[商品清单]:';
|
|
|
-
|
|
|
- $head = array('名称', '属性', '价格', '数量', '状态');
|
|
|
+
|
|
|
|
|
|
$body = array();
|
|
|
+ $body_total = array();
|
|
|
+ $body_total['price'] = 0;
|
|
|
+ $body_total['num'] = 0;
|
|
|
$goods = Dever::db('shop/buy_order_goods')->select(array('order_id' => $info['id']));
|
|
|
$goods_status = Dever::db('shop/buy_order_goods')->config['status'];
|
|
|
+
|
|
|
+ $refund_body = array();
|
|
|
+ $refund_body_total = array();
|
|
|
+ $refund_body_total['price'] = 0;
|
|
|
+ $refund_body_total['num'] = 0;
|
|
|
foreach ($goods as $k => $v) {
|
|
|
+ if ($type == 2) {
|
|
|
+ $v['price'] = $v['p_price'];
|
|
|
+ }
|
|
|
$goods_info = Dever::load('goods/lib/info')->getInfoBySku($v['goods_id'], $v['sku_id']);
|
|
|
$status = $goods_status[$v['status']];
|
|
|
+
|
|
|
$tk = Dever::db('shop/buy_order_refund')->find(array('order_id' => $info['id'], 'order_goods_id' => $v['id'], 'type' => 2));
|
|
|
if ($tk && $tk['process'] == 1) {
|
|
|
- $status = '申请' . $tk_status[$tk['status']];
|
|
|
-
|
|
|
- $desc = array();
|
|
|
- $desc['原因'] = $tk['desc'];
|
|
|
- if ($tk['pic']) {
|
|
|
- $desc['图片'] = '';
|
|
|
- $pic = explode(',', $tk['pic']);
|
|
|
- foreach ($pic as $k => $v) {
|
|
|
- $desc['图片'] .= '<a href="'.$v.'" target="_blank"><img src="'.$v.'" width="100"/></a>';
|
|
|
- }
|
|
|
+ if ($type == 1) {
|
|
|
+ $status = '申请' . $tk_status[$tk['status']];
|
|
|
+ } else {
|
|
|
+ $status = '已上报';
|
|
|
}
|
|
|
- $status .= ' <a href="javascript:layer.alert($(\'#desc_content\').html());">查看原因</a><span id="desc_content" style="display:none">'.Dever::table($desc).'</span>';
|
|
|
|
|
|
- if ($type == 1 && $tk['process'] == 1) {
|
|
|
+ if ($type == 1) {
|
|
|
+ $desc = array();
|
|
|
+ $desc['退款原因'] = $tk['desc'];
|
|
|
+ $desc['退款图片'] = '暂无';
|
|
|
+ if ($tk['pic']) {
|
|
|
+ $desc['退款图片'] = '';
|
|
|
+ $pic = explode(',', $tk['pic']);
|
|
|
+ foreach ($pic as $k => $v) {
|
|
|
+ $desc['退款图片'] .= '<a href="'.$v.'" target="_blank"><img src="'.$v.'" width="100"/></a>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $status .= ' <a href="javascript:showAlert($(\'#desc_content\').html());">查看原因</a><span id="desc_content" style="display:none">'.Dever::table($desc).'</span>';
|
|
|
+
|
|
|
$status .= ' <a href="javascript:;" onclick="audit('.$tk['id'].', 2, \''.$url.'\')" class="layui-btn">通过</a><a href="javascript:;" onclick="audit('.$tk['id'].', 3, \''.$url.'\')" class="layui-btn layui-btn-danger">驳回</a>';
|
|
|
}
|
|
|
+ } elseif ($type > 1 && (!$tk || ($tk && $tk['process'] == 3))) {
|
|
|
+
|
|
|
+ $tui = Dever::url('lib/buy.refund_apply_info_one_commit?json=1', 'mshop');
|
|
|
+ if ($info['status'] == 3) {
|
|
|
+ $status = '<a href="javascript:;" onclick="tui('.$v['id'].','.$info['id'].','.$info['source_id'].', 2, \''.$tui.'\')" class="layui-btn">缺货退款</a>';
|
|
|
+ } elseif ($info['status'] == 4) {
|
|
|
+ $status = '<a href="javascript:;" onclick="tui('.$v['id'].','.$info['id'].','.$info['source_id'].', 1, \''.$tui.'\')" class="layui-btn">报损退款</a>';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (isset($goods_info['sku'])) {
|
|
|
- $sku = $goods_info['sku']['string'];
|
|
|
+ $sku = '[' . $goods_info['sku']['string'] . ']';
|
|
|
+ } else {
|
|
|
+ $sku = '';
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($tk && $v['status'] == 3) {
|
|
|
+ $refund_body[] = array
|
|
|
+ (
|
|
|
+ $goods_info['name'] . ' ' . $sku,
|
|
|
+ $v['price'],
|
|
|
+ $v['num'],
|
|
|
+ $tk_status[$tk['status']],
|
|
|
+ );
|
|
|
+ $refund_body_total['price'] += $v['price'];
|
|
|
+ $refund_body_total['num'] += $v['num'];
|
|
|
} else {
|
|
|
- $sku = '无';
|
|
|
+ $body[] = array
|
|
|
+ (
|
|
|
+ $goods_info['name'] . ' ' . $sku,
|
|
|
+ $v['price'],
|
|
|
+ $v['num'],
|
|
|
+ $status,
|
|
|
+ );
|
|
|
+ $body_total['price'] += $v['price'];
|
|
|
+ $body_total['num'] += $v['num'];
|
|
|
}
|
|
|
- $body[$k] = array
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($body) {
|
|
|
+
|
|
|
+ $head = array('名称', '金额', '数量', '状态');
|
|
|
+
|
|
|
+ $body[] = array
|
|
|
+ (
|
|
|
+ '合计',
|
|
|
+ $body_total['price'],
|
|
|
+ $body_total['num'],
|
|
|
+ '-'
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ $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>';
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($refund_body) {
|
|
|
+
|
|
|
+ $head = array('名称', '金额', '数量', '状态');
|
|
|
+
|
|
|
+ $refund_body[] = array
|
|
|
(
|
|
|
- $goods_info['name'],
|
|
|
- $sku,
|
|
|
- $v['price'],
|
|
|
- $v['num'],
|
|
|
- $status,
|
|
|
+ '合计',
|
|
|
+ $refund_body_total['price'],
|
|
|
+ $refund_body_total['num'],
|
|
|
+ '-'
|
|
|
);
|
|
|
+
|
|
|
+ $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 .= $this->table($head, $body);
|
|
|
+
|
|
|
+ $html .= '</div>';
|
|
|
|
|
|
return $html;
|
|
|
}
|
|
@@ -778,8 +925,10 @@ class Buy
|
|
|
array_multisort($distance, SORT_ASC, SORT_NUMERIC, $factory);
|
|
|
|
|
|
$this->order_num = 0;
|
|
|
+ $this->order_id = array();
|
|
|
$delete = array();
|
|
|
$yes = array();
|
|
|
+
|
|
|
foreach ($goods as $k => $v) {
|
|
|
|
|
|
$find = $this->store($order['id'], $order['order_num'] . '_' . $this->order_num, $shop, $store, $v);
|
|
@@ -799,11 +948,27 @@ class Buy
|
|
|
|
|
|
if ($this->order_num > 0) {
|
|
|
if ($this->order_num == 1) {
|
|
|
- Dever::db('shop/buy_order')->update(array('where_id' => $order['id'], 'status' => 3, 'source_type' => $find[0], 'source_id' => implode('', $find[1]), 'p_price' => $find[3][0], 'operdate' => time()));
|
|
|
-
|
|
|
Dever::db('shop/buy_order')->delete($find[2][0]);
|
|
|
+ $goods = Dever::db('shop/buy_order_goods')->select(array('order_id' => $find[2][0]));
|
|
|
+
|
|
|
+ $p_price = 0;
|
|
|
+ foreach ($goods as $k => $v) {
|
|
|
+ $goods_info = Dever::db('shop/buy_order_goods')->find(array('order_id' => $order['id'], 'goods_id' => $v['goods_id']));
|
|
|
+
|
|
|
+ if ($goods_info) {
|
|
|
+
|
|
|
+ Dever::db('shop/buy_order_goods')->update(array('where_id' => $goods_info['id'], 'set_p_price' => $v['p_price']));
|
|
|
+ $p_price += $v['p_price'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Dever::db('shop/buy_order')->update(array('where_id' => $order['id'], 'status' => 3, 'source_type' => $find[0], 'source_id' => $find[1][0], 'p_price' => $p_price, 'operdate' => time()));
|
|
|
+
|
|
|
Dever::db('shop/buy_order_goods')->delete(array('order_id' => $find[2][0]));
|
|
|
|
|
|
+ unset($this->order_id[$find[2][0]]);
|
|
|
+ $this->order_id[$order['id']] = array($find[0], $find[1][0]);
|
|
|
+
|
|
|
} else {
|
|
|
if (!$yes) {
|
|
|
Dever::db('shop/buy_order')->update(array('where_id' => $order['id'], 'state' => 2));
|
|
@@ -827,6 +992,12 @@ class Buy
|
|
|
Dever::load('shop/lib/refund')->set('buy')->apply(1, $shop['id'], $order_id, false, 3, 0, '供货商库存不足');
|
|
|
}
|
|
|
|
|
|
+ if ($this->order_id) {
|
|
|
+ foreach ($this->order_id as $k => $v) {
|
|
|
+ $this->sendMsg($v[0], $v[1], $k);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return 'ok';
|
|
|
}
|
|
|
|
|
@@ -835,9 +1006,8 @@ class Buy
|
|
|
$find = array();
|
|
|
$type_id = array();
|
|
|
$id = array();
|
|
|
- $p_price = array();
|
|
|
if (!$store) {
|
|
|
- return array(2, $type_id, $id, $p_price);
|
|
|
+ return array(2, $type_id, $id);
|
|
|
}
|
|
|
foreach ($store as $k => $v) {
|
|
|
$where['store_id'] = $v['id'];
|
|
@@ -852,7 +1022,7 @@ class Buy
|
|
|
if ($state) {
|
|
|
$type_id[] = $where['store_id'];
|
|
|
$id[] = $state;
|
|
|
- $p_price[] = $goods['price'];
|
|
|
+ $this->order_id[$state] = array(2, $where['store_id']);
|
|
|
break;
|
|
|
}
|
|
|
} elseif ($state == 1 && $sku['total'] > 0) {
|
|
@@ -865,7 +1035,7 @@ class Buy
|
|
|
} else {
|
|
|
$type_id[] = $where['store_id'];
|
|
|
$id[] = $state;
|
|
|
- $p_price[] = $goods['price'];
|
|
|
+ $this->order_id[$state] = array(2, $where['store_id']);
|
|
|
}
|
|
|
continue;
|
|
|
|
|
@@ -876,7 +1046,7 @@ class Buy
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return array(2, $type_id, $id, $p_price);
|
|
|
+ return array(2, $type_id, $id);
|
|
|
}
|
|
|
|
|
|
private function factory($order_id, $order_num, $shop, $factory, $goods)
|
|
@@ -884,23 +1054,22 @@ class Buy
|
|
|
$find = array();
|
|
|
$type_id = array();
|
|
|
$id = array();
|
|
|
- $p_price = array();
|
|
|
if (!$factory) {
|
|
|
- return array(3, $type_id, $id, $p_price);
|
|
|
+ return array(3, $type_id, $id);
|
|
|
}
|
|
|
|
|
|
foreach ($factory as $k => $v) {
|
|
|
$where['factory_id'] = $v['id'];
|
|
|
$where['goods_id'] = $goods['goods_id'];
|
|
|
$where['sku_id'] = ($goods['sku_id'] && $goods['sku_id'] > 0) ? $goods['sku_id'] : -1;
|
|
|
- $sku = Dever::db('factory/goods_sku')->select($where);
|
|
|
+ $sku = Dever::db('factory/goods_sku')->getOne($where);
|
|
|
|
|
|
if ($sku) {
|
|
|
$state = $this->createOrder($order_id, $order_num, 1, $shop['id'], 3, $where['factory_id'], $goods['price'], $sku['p_price'], $goods['num'], $where['goods_id'], $where['sku_id']);
|
|
|
if ($state) {
|
|
|
$type_id[] = $where['factory_id'];
|
|
|
$id[] = $state;
|
|
|
- $p_price[] = $sku['p_price'];
|
|
|
+ $this->order_id[$state] = array(3, $where['factory_id']);
|
|
|
break;
|
|
|
}
|
|
|
} else {
|
|
@@ -908,7 +1077,22 @@ class Buy
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return array(3, $type_id, $id, $p_price);
|
|
|
+ return array(3, $type_id, $id);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private function sendMsg($source_type, $source_id, $id)
|
|
|
+ {
|
|
|
+ if (Dever::project('message')) {
|
|
|
+ $msg_param['type'] = 1;
|
|
|
+ $msg_param['id'] = $id;
|
|
|
+ $msg_param['source_id'] = $source_id;
|
|
|
+ $msg_param['source_type'] = $source_type;
|
|
|
+ $msg_param = Dever::json_encode($msg_param);
|
|
|
+ $project = $source_type + 1;
|
|
|
+ $msg = '您有一个新的订货单,请及时处理。';
|
|
|
+ Dever::load('message/lib/data')->push(-1, $source_id, '订货通知', $msg, 2, $project, false, $msg_param);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|