mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-25 18:25:50 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
||||
*
|
||||
@@ -14,14 +15,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* ============================
|
||||
* @Author: yaokangming
|
||||
* @Version: 1.0
|
||||
* @DateTime: 库存调整单
|
||||
* @describe: 类
|
||||
* ============================
|
||||
*/
|
||||
class console_finder_adjust {
|
||||
function __construct(){
|
||||
if(in_array($_REQUEST['action'], ['exportcnf', 'to_export', 'export'])){
|
||||
@@ -34,12 +27,6 @@ class console_finder_adjust {
|
||||
public $column_edit = "操作";
|
||||
public $column_edit_width = "80";
|
||||
public $column_edit_order = "-1";
|
||||
/**
|
||||
* column_edit
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
|
||||
public function column_edit($row) {
|
||||
$confirmBtn = '<a class="lnk" target="dialog::{width:550,height:250,title:\'单据确认\'}"
|
||||
href="index.php?app=console&ctl=admin_adjust&act=singleConfirm&p[0]='.$row['id'].'&finder_id='.$_GET['_finder']['finder_id'].'">
|
||||
@@ -53,12 +40,7 @@ class console_finder_adjust {
|
||||
return '';
|
||||
}
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
/**
|
||||
* detail_item
|
||||
* @param mixed $id ID
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('adjust_items')->getList('*', ['adjust_id'=>$id]);
|
||||
@@ -67,11 +49,6 @@ class console_finder_adjust {
|
||||
}
|
||||
|
||||
public $detail_oplog = "操作记录";
|
||||
/**
|
||||
* detail_oplog
|
||||
* @param mixed $id ID
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function detail_oplog($id){
|
||||
$render = app::get('console')->render();
|
||||
$opObj = app::get('ome')->model('operation_log');
|
||||
@@ -84,11 +61,6 @@ class console_finder_adjust {
|
||||
}
|
||||
|
||||
public $detail_useful = "有效期列表";
|
||||
/**
|
||||
* detail_useful
|
||||
* @param mixed $id ID
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function detail_useful($id){
|
||||
$render = app::get('console')->render();
|
||||
$itemsObj = app::get('console')->model('adjust_items');
|
||||
@@ -112,12 +84,6 @@ class console_finder_adjust {
|
||||
public $column_branch_bn = "仓库编码";
|
||||
public $column_branch_bn_width = 100;
|
||||
public $column_branch_bn_order = 15;
|
||||
/**
|
||||
* column_branch_bn
|
||||
* @param mixed $row row
|
||||
* @param mixed $list list
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_branch_bn($row, $list)
|
||||
{
|
||||
if (empty($row['branch_id'])) {
|
||||
@@ -145,4 +111,4 @@ class console_finder_adjust {
|
||||
return isset($branchCache[$row['branch_id']]) ? $branchCache[$row['branch_id']] : '';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,15 @@ class console_finder_basic_material_stock_artificial_freeze{
|
||||
return $rs_ma['material_bn'];
|
||||
}
|
||||
|
||||
var $column_basic_material_spu = '基础物料款号';
|
||||
var $column_basic_material_spu_width = 150;
|
||||
var $column_basic_material_spu_order = 16;
|
||||
function column_basic_material_spu($row){
|
||||
$bm_id = $row[$this->col_prefix.'bm_id'];
|
||||
$rs_ma = $this->_mdl_ma_ba_ma->dump(array("bm_id"=>$bm_id),"material_spu");
|
||||
return $rs_ma['material_spu'];
|
||||
}
|
||||
|
||||
var $column_status = '状态';
|
||||
var $column_status_width = 150;
|
||||
var $column_status_order = 20;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class console_finder_branch_product
|
||||
{
|
||||
public $_braProExtObj = null;
|
||||
@@ -28,7 +27,7 @@ class console_finder_branch_product
|
||||
|
||||
|
||||
|
||||
var $addon_cols = 'product_id,branch_id';
|
||||
var $addon_cols = 'product_id,branch_id,store';
|
||||
var $column_barcode = '条形码';
|
||||
var $column_barcode_width = 150;
|
||||
var $column_barcode_order = 30;
|
||||
@@ -40,7 +39,7 @@ class console_finder_branch_product
|
||||
return $code['code'];
|
||||
}
|
||||
|
||||
var $column_bn = '货号';
|
||||
var $column_bn = '基础物料编码';
|
||||
var $column_bn_width = 200;
|
||||
var $column_bn_order = 10;
|
||||
var $column_bn_order_field = 'p.material_bn';
|
||||
@@ -49,7 +48,7 @@ class console_finder_branch_product
|
||||
return $row['bn'];
|
||||
}
|
||||
|
||||
var $column_product_name = '货品名称';
|
||||
var $column_product_name = '基础物料名称';
|
||||
var $column_product_name_width = 300;
|
||||
var $column_product_name_order = 20;
|
||||
function column_product_name($row)
|
||||
@@ -109,6 +108,19 @@ class console_finder_branch_product
|
||||
return $store_freeze;
|
||||
}
|
||||
|
||||
//可售库存
|
||||
var $column_available_store = '可售库存';
|
||||
var $column_available_store_width = 100;
|
||||
var $column_available_store_order = 16;
|
||||
function column_available_store($row)
|
||||
{
|
||||
$store = isset($row[$this->col_prefix.'store']) ? $row[$this->col_prefix.'store'] : 0;
|
||||
$store_freeze = $this->_basicMStockFreezeLib->getBranchFreeze($row[$this->col_prefix.'product_id'], $row[$this->col_prefix.'branch_id']);
|
||||
|
||||
// 可售库存 = 库存 - 冻结库存,最小为0
|
||||
return max(0, $store - $store_freeze);
|
||||
}
|
||||
|
||||
var $column_material_spu = '款号';
|
||||
var $column_material_spu_width = 120;
|
||||
var $column_material_spu_order = 20;
|
||||
@@ -137,7 +149,7 @@ class console_finder_branch_product
|
||||
|
||||
/**
|
||||
* 批量获取基础物料关联的唯品会库存预占
|
||||
*
|
||||
*
|
||||
* @param array $list
|
||||
* @return null
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@ class console_finder_branch_product_extend
|
||||
|
||||
public $_basicMStockFreezeLib = null;
|
||||
|
||||
//货品信息列表
|
||||
//基础物料信息列表
|
||||
static $_productList = null;
|
||||
|
||||
//仓库信息列表
|
||||
@@ -76,7 +76,7 @@ class console_finder_branch_product_extend
|
||||
return $render->fetch('admin/branch/product/extend_detail_logs.html');
|
||||
}
|
||||
|
||||
var $column_bn = '货号';
|
||||
var $column_bn = '基础物料编码';
|
||||
var $column_bn_width = 200;
|
||||
var $column_bn_order = 10;
|
||||
function column_bn($row, $list)
|
||||
@@ -135,7 +135,7 @@ class console_finder_branch_product_extend
|
||||
return self::$_productList[$product_id]['material_bn'];
|
||||
}
|
||||
|
||||
var $column_product_name = '货品名称';
|
||||
var $column_product_name = '基础物料名称';
|
||||
var $column_product_name_width = 300;
|
||||
var $column_product_name_order = 20;
|
||||
function column_product_name($row)
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class console_finder_delivery{
|
||||
var $detail_basic = "发货单详情";
|
||||
var $detail_item = "货品详情";
|
||||
var $detail_item = "基础物料详情";
|
||||
var $detail_delivery = "物流单列表";
|
||||
|
||||
private $write = '1';
|
||||
@@ -255,12 +254,6 @@ class console_finder_delivery{
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ViewPanel
|
||||
* @param mixed $caption caption
|
||||
* @param mixed $color color
|
||||
* @return mixed 返回结果
|
||||
*/
|
||||
public function getViewPanel($caption, $color) {
|
||||
if ($color == '#eeeeee')
|
||||
$caption .= '未打印';
|
||||
@@ -298,11 +291,6 @@ class console_finder_delivery{
|
||||
var $column_beartime = "成单时间";
|
||||
var $column_beartime_width = '140';
|
||||
var $column_beartime_order_field= 'order_createtime';
|
||||
/**
|
||||
* column_beartime
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_beartime($row) {
|
||||
return $row[$this->col_prefix . 'order_createtime'] ? date('Y-m-d H:i:s',$row[$this->col_prefix . 'order_createtime']) : '-';
|
||||
}
|
||||
@@ -746,11 +734,6 @@ EOF;
|
||||
|
||||
var $column_delivery = '配送方式';
|
||||
var $column_delivery_width = 90;
|
||||
/**
|
||||
* column_delivery
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_delivery($row)
|
||||
{
|
||||
$delivery_mode = $row[$this->col_prefix . 'delivery'];
|
||||
@@ -765,10 +748,10 @@ EOF;
|
||||
|
||||
/**
|
||||
* 查询仓库
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
* @author
|
||||
* */
|
||||
**/
|
||||
private function _getBranch($branch_id, $list)
|
||||
{
|
||||
static $branchList;
|
||||
@@ -818,12 +801,6 @@ EOF;
|
||||
public $column_order_label = '标记';
|
||||
public $column_order_label_width = 160;
|
||||
public $column_order_label_order = 30;
|
||||
/**
|
||||
* column_order_label
|
||||
* @param mixed $row row
|
||||
* @param mixed $list list
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_order_label($row, $list)
|
||||
{
|
||||
$delivery_id = $row['delivery_id'];
|
||||
@@ -889,4 +866,4 @@ EOF;
|
||||
|
||||
return $arrOrderLabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class console_finder_inventory_apply{
|
||||
|
||||
var $detail_item = "详情";
|
||||
@@ -38,11 +37,6 @@ class console_finder_inventory_apply{
|
||||
}
|
||||
|
||||
public $detail_oplog = "操作记录";
|
||||
/**
|
||||
* detail_oplog
|
||||
* @param mixed $id ID
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function detail_oplog($id){
|
||||
$render = app::get('console')->render();
|
||||
$opObj = app::get('ome')->model('operation_log');
|
||||
@@ -56,21 +50,21 @@ class console_finder_inventory_apply{
|
||||
|
||||
var $column_operation = '操作';
|
||||
var $column_operation_width = 70;
|
||||
/**
|
||||
* column_operation
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_operation($row){
|
||||
$apply_id = $row['inventory_apply_id'];
|
||||
$inv_aObj = app::get('console')->model('inventory_apply');
|
||||
$info = $inv_aObj->dump($apply_id);
|
||||
if (empty($info)) {
|
||||
return '';
|
||||
}
|
||||
$id = $info['inventory_apply_id'];
|
||||
$fid = $_GET['_finder']['finder_id'];
|
||||
|
||||
if (in_array($info['status'], ['unconfirmed', 'confirming'])){
|
||||
$fid = isset($_GET['_finder']['finder_id']) ? $_GET['_finder']['finder_id'] : '';
|
||||
$return = '';
|
||||
if ($info['status'] == 'unconfirmed') {
|
||||
$return = ' <a href="index.php?app=console&ctl=admin_inventory_apply&act=do_confirm&p[0]='.$id.'&finder_id='.$fid.'" target="_blank">确认</a>';
|
||||
$return .= ' | '.sprintf('<a href="javascript:if (confirm(\'确认要关闭吗?\')){W.page(\'index.php?app=console&ctl=admin_inventory_apply&act=do_close&p[0]=%s&finder_id=%s\', $extend({method: \'get\'}, JSON.decode({})), this);}void(0);" target="">关闭</a>',$id,$fid);
|
||||
} elseif ($info['status'] == 'confirming') {
|
||||
$return = ' '.sprintf('<a href="javascript:if (confirm(\'确认要关闭吗?\')){W.page(\'index.php?app=console&ctl=admin_inventory_apply&act=do_close&p[0]=%s&finder_id=%s\', $extend({method: \'get\'}, JSON.decode({})), this);}void(0);" target="">关闭</a>',$id,$fid);
|
||||
}
|
||||
|
||||
return $return;
|
||||
@@ -78,11 +72,6 @@ class console_finder_inventory_apply{
|
||||
|
||||
|
||||
public $detail_useful = "有效期列表";
|
||||
/**
|
||||
* detail_useful
|
||||
* @param mixed $apply_id ID
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function detail_useful($apply_id){
|
||||
$render = app::get('console')->render();
|
||||
$inv_aiObj = app::get('console')->model('inventory_apply_items');
|
||||
|
||||
@@ -57,12 +57,7 @@ class console_finder_material_package {
|
||||
return implode(' | ', $btn);
|
||||
}
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
/**
|
||||
* detail_item
|
||||
* @param mixed $id ID
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('material_package_items')->getList('*', ['mp_id'=>$id]);
|
||||
@@ -108,4 +103,4 @@ class console_finder_material_package {
|
||||
|
||||
return $render->fetch("admin/useful/iso.html");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class console_finder_wms_delivery {
|
||||
return implode('|', $btn);
|
||||
}*/
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('wms_delivery_items')->getList('*', ['wd_id'=>$id]);
|
||||
|
||||
@@ -41,7 +41,7 @@ class console_finder_wms_reship {
|
||||
return implode('|', $btn);
|
||||
}*/
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('wms_reship_items')->getList('*', ['wr_id'=>$id]);
|
||||
|
||||
@@ -34,7 +34,7 @@ class console_finder_wms_stockin {
|
||||
return implode('|', $btn);
|
||||
}*/
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('wms_stockin_items')->getList('*', ['wsi_id'=>$id]);
|
||||
|
||||
@@ -34,7 +34,7 @@ class console_finder_wms_stockout {
|
||||
return implode('|', $btn);
|
||||
}*/
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('wms_stockout_items')->getList('*', ['wso_id'=>$id]);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
class console_finder_wms_storeprocess {
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$materialItems = app::get('console')->model('wms_storeprocess_materialitems')->getList('*', ['wsp_id'=>$id]);
|
||||
|
||||
@@ -34,7 +34,7 @@ class console_finder_wms_transferorder {
|
||||
return implode('|', $btn);
|
||||
}*/
|
||||
|
||||
public $detail_item = "货品详情";
|
||||
public $detail_item = "基础物料详情";
|
||||
public function detail_item($id){
|
||||
$render = app::get('console')->render();
|
||||
$items = app::get('console')->model('wms_transferorder_items')->getList('*', ['wst_id'=>$id]);
|
||||
|
||||
Reference in New Issue
Block a user