mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-04 22:36:52 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
@@ -33,11 +33,12 @@ class console_ctl_admin_delivery_back extends desktop_controller {
|
||||
'target' => 'dialog::{width:600,height:300,title:\'导出\'}'
|
||||
);
|
||||
$base_filter = array(
|
||||
'type' => 'normal',
|
||||
'pause' => 'false',
|
||||
'parent_id' => 0,
|
||||
'disabled' => 'false',
|
||||
'status' => array('return_back'),
|
||||
'parent_id' => 0,
|
||||
'status' => array('return_back'),
|
||||
'type' => 'normal',
|
||||
'disabled' => 'false',
|
||||
'pause' => 'false',
|
||||
'sync|bthan' => 0,
|
||||
);
|
||||
$base_filter = array_merge($base_filter,$_GET);
|
||||
|
||||
@@ -65,16 +66,15 @@ class console_ctl_admin_delivery_back extends desktop_controller {
|
||||
|
||||
function cancel_list()
|
||||
{
|
||||
$user = kernel::single('desktop_user');
|
||||
|
||||
$actions = array();
|
||||
|
||||
$base_filter = array(
|
||||
'type' => 'normal',
|
||||
'pause' => 'false',
|
||||
'parent_id' => 0,
|
||||
'disabled' => 'false',
|
||||
'status' => array('cancel','back'),
|
||||
'type' => 'normal',
|
||||
'disabled' => 'false',
|
||||
'pause' => 'false',
|
||||
'sync|bthan' => 0,
|
||||
);
|
||||
$base_filter = array_merge($base_filter,$_GET);
|
||||
|
||||
|
||||
@@ -14,14 +14,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class console_ctl_admin_delivery_sync extends desktop_controller {
|
||||
|
||||
var $name = "通知仓库取消列表";
|
||||
var $workground = "console_center";
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 发货单列表
|
||||
*/
|
||||
function index(){
|
||||
@@ -130,14 +129,34 @@ class console_ctl_admin_delivery_sync extends desktop_controller {
|
||||
{
|
||||
$delivery_id = $delivery['delivery_id'];
|
||||
|
||||
$data = array(
|
||||
'status'=>'cancel',
|
||||
'memo'=>'发货单请求第三方仓储取消失败,强制取消!',
|
||||
'delivery_bn'=>$delivery['delivery_bn'],
|
||||
);
|
||||
kernel::single('ome_event_receive_delivery')->update($data);
|
||||
// 开启事务
|
||||
$transaction = kernel::database()->beginTransaction();
|
||||
try {
|
||||
$data = array(
|
||||
'status'=>'cancel',
|
||||
'memo'=>'发货单请求第三方仓储取消失败,强制取消!',
|
||||
'delivery_bn'=>$delivery['delivery_bn'],
|
||||
);
|
||||
$rs = kernel::single('ome_event_receive_delivery')->update($data);
|
||||
if ($rs['rsp'] != 'succ') {
|
||||
throw new Exception('发货单状态更新失败');
|
||||
}
|
||||
|
||||
// 完成订单明细处理:如果拆分数量为0且支付状态为全额退款,则更新为已删除并更新主表金额
|
||||
list($result, $msg) = kernel::single('console_delivery_cancel')->afterForce($delivery_id);
|
||||
if (!$result) {
|
||||
throw new Exception('订单明细处理失败:' . $msg['msg']);
|
||||
}
|
||||
$oOperation_log->write_log('delivery_back@ome', $delivery_id, '手工强制取消发货单成功');
|
||||
|
||||
// 提交事务
|
||||
kernel::database()->commit($transaction);
|
||||
} catch (Exception $e) {
|
||||
// 回滚事务
|
||||
kernel::database()->rollBack();
|
||||
$oOperation_log->write_log('delivery_back@ome', $delivery_id, '发货单强制取消失败:' . $e->getMessage());
|
||||
}
|
||||
|
||||
$oOperation_log->write_log('delivery_back@ome', $delivery_id, '手工强制取消发货单');
|
||||
}
|
||||
}
|
||||
$this->splash('success', $this->url, '命令已经被成功发送!!');
|
||||
|
||||
@@ -103,7 +103,9 @@ class console_ctl_admin_difference_inventory extends desktop_controller
|
||||
$data['items'][$key]['diff_status_value'] = $diff_status[$value['diff_status']];
|
||||
$value['diff_reason'] == 'other' && $data['items'][$key]['diff_reason'] .= '_' . $value['handle_type'];
|
||||
$data['items'][$key]['to_branch_bn'] = $value['to_branch_id'] ? $branch_list[$value['to_branch_id']]['name'] : '-';
|
||||
$data['items'][$key]['handle_type'] = $diff_items_obj->handle_type[$value['handle_type']];
|
||||
$data['items'][$key]['handle_type'] = isset($diff_items_obj->handle_type[$value['handle_type']])
|
||||
? $diff_items_obj->handle_type[$value['handle_type']]
|
||||
: '';
|
||||
|
||||
if ($value['responsible'] == '2') {
|
||||
$data['items'][$key]['description'] = sprintf($diff_items_obj->newDescribe[$value['diff_reason']], $diff_items_obj->newResponsible[$value['responsible']], $branch_list[$data['extrabranch_id']]['name']);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class console_ctl_admin_inventory_apply extends desktop_controller{
|
||||
var $workground = "console_center";
|
||||
function index(){
|
||||
@@ -31,6 +30,16 @@ class console_ctl_admin_inventory_apply extends desktop_controller{
|
||||
function do_confirm($apply_id=0){
|
||||
$objInAp = app::get('console')->model('inventory_apply');
|
||||
$main = $objInAp->db_dump(['inventory_apply_id'=>$apply_id], '*');
|
||||
if (empty($main)) {
|
||||
header("content-type:text/html; charset=utf-8");
|
||||
echo "<script>alert('盘点单不存在');window.close();</script>";
|
||||
exit;
|
||||
}
|
||||
if ($main['status'] == 'confirmed') {
|
||||
header("content-type:text/html; charset=utf-8");
|
||||
echo "<script>alert('盘点单已确认');window.close();</script>";
|
||||
exit;
|
||||
}
|
||||
$branch = app::get('ome')->model('branch')->db_dump(['branch_id'=>$main['branch_id']], 'name');
|
||||
if(empty($branch)) {
|
||||
header("content-type:text/html; charset=utf-8");
|
||||
@@ -61,6 +70,11 @@ class console_ctl_admin_inventory_apply extends desktop_controller{
|
||||
function finish_confirm(){
|
||||
$this->begin($this->url);
|
||||
$apply_id = (int) $_POST['inventory_apply_id'];
|
||||
$objInAp = app::get('console')->model('inventory_apply');
|
||||
$main = $objInAp->db_dump(['inventory_apply_id'=>$apply_id], 'status');
|
||||
if (!empty($main) && $main['status'] == 'confirmed') {
|
||||
$this->end(true, '已确认');
|
||||
}
|
||||
list($rs, $rsData) = kernel::single('console_inventory_apply')->confirm($apply_id);
|
||||
$this->end($rs, $rsData['msg']);
|
||||
}
|
||||
@@ -100,4 +114,4 @@ class console_ctl_admin_inventory_apply extends desktop_controller{
|
||||
);
|
||||
$this->finder('console_mdl_inventory_apply_items',$params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,6 +252,17 @@ class console_ctl_admin_material_package extends desktop_controller
|
||||
$storeManageLib = kernel::single('ome_store_manage');
|
||||
$storeManageLib->loadBranch(array('branch_id' => $main['branch_id']));
|
||||
|
||||
// 校验物料同步状态
|
||||
// 同时获取主商品和子商品进行校验
|
||||
$mainItems = app::get('console')->model('material_package_items')->getList('*', ['mp_id' => $id]);
|
||||
$detailItems = app::get('console')->model('material_package_items_detail')->getList('*', ['mp_id' => $id]);
|
||||
|
||||
// 调用封装的校验方法
|
||||
list($validateRs, $validateMsg) = $mpObj->_validateMaterialSyncStatus($main['branch_id'], $mainItems, $detailItems);
|
||||
if (!$validateRs) {
|
||||
$this->end(false, $validateMsg);
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params['main'] = $main;
|
||||
$params['items'] = $itemsDetail;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class console_ctl_admin_stock extends desktop_controller{
|
||||
var $name = "库存查看";
|
||||
var $workground = "console_center";
|
||||
@@ -96,7 +95,7 @@ class console_ctl_admin_stock extends desktop_controller{
|
||||
);
|
||||
|
||||
$params = array(
|
||||
'title'=>'基础物料列表',
|
||||
'title'=>'总库存列表',
|
||||
'base_filter' => $filter,
|
||||
'actions' => $actions,
|
||||
'use_buildin_new_dialog' => false,
|
||||
|
||||
Reference in New Issue
Block a user