1. 【新增】售后单售后原因类型支持搜索

2. 【新增】手工创建订单折扣可输入正数

3. 【优化】盘点申请单确认

4. 【修复】采购退货单模拟出库失败问题

5. 【新增】订单金额客户实付与结算金额

6. 【优化】仓库发货统计报表物料名称显示

7. 【优化】自有仓储虚拟发货逻辑

8. 【修复】基础物料分类管理问题
This commit is contained in:
chenping
2026-04-01 11:59:17 +08:00
parent 9341122827
commit 61783b7d01
754 changed files with 46179 additions and 5700 deletions

View File

@@ -1156,7 +1156,30 @@ class inventorydepth_ctl_regulation_apply extends desktop_controller
$apply_detail = $applyObj->dump(array('id' => $id), '*');
$apply_detail['heading'] = str_replace('%', '', $apply_detail['heading']);
$data['name'] = $apply_detail['heading'] . '货品列表';
$csvObj->export_header($data, $applyObj);
// 设置正确的 Content-Type包含 charset
header("Content-Type: text/csv; charset=UTF-8");
// 设置文件下载响应头
$filename = $data['name'] . ".csv";
$encoded_filename = urlencode($filename);
$encoded_filename = str_replace("+", "%20", $encoded_filename);
$ua = $_SERVER["HTTP_USER_AGENT"];
if (preg_match("/MSIE/", $ua)) {
header('Content-Disposition: attachment; filename="' . $encoded_filename . '"');
} else if (preg_match("/Firefox\/8/", $ua)) {
header('Content-Disposition: attachment; filename="' . $filename . '"');
} else if (preg_match("/Firefox/", $ua)) {
header('Content-Disposition: attachment; filename*="utf8\'\'' . $filename . '"');
} else {
header('Content-Disposition: attachment; filename="' . $filename . '"');
}
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
// 添加 UTF-8 BOM 标记,解决 Office 打开 CSV 乱码问题
echo "\xEF\xBB\xBF";
$title = ['*:销售物料编码', '*:销售物料名称', '*:销售物料类型'];
$salesMaterialCsv[] = '"' . implode('","', $title) . '"';

View File

@@ -14,11 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author chenping<chenping@shopex.cn>
*/
class inventorydepth_ctl_shop extends desktop_controller
{
@@ -261,9 +256,14 @@ class inventorydepth_ctl_shop extends desktop_controller
break;
}
$loadList = $loadList ? : [];
$width = 0;
if($loadList){
$width = intval(100 / count($loadList));
}
$this->pagedata['url'] = $url;
$this->pagedata['loadList'] = $loadList;
$this->pagedata['width'] = intval(100 / count($loadList));
$this->pagedata['width'] = $width;
$this->pagedata['downloadType'] = $downloadType;
if ($_GET['redirectUrl']) {

View File

@@ -302,7 +302,7 @@ class inventorydepth_ctl_shop_adjustment extends desktop_controller {
$_POST['id'] = $id;
# 发布库存超出可售库存提示
$sku = $this->app->model('shop_adjustment')->select()->columns('shop_product_bn,shop_id,shop_bn,release_stock')
$sku = $this->app->model('shop_adjustment')->select()->columns('shop_product_bn,shop_id,shop_bn,release_stock,shop_sku_id,shop_iid')
->where('id=?',$id)->instance()->fetch_row();
$delivery_mode = app::get('ome')->model('shop')->db_dump(['shop_id'=>$sku['shop_id']], 'delivery_mode')['delivery_mode'];
@@ -373,6 +373,7 @@ class inventorydepth_ctl_shop_adjustment extends desktop_controller {
'sku_id' => $sku['shop_sku_id'],
'num_iid' => $sku['shop_iid'],
'barcode' => $sku['shop_sku_id'],
'shop_sku_id' => $sku['shop_sku_id'] ? $sku['shop_sku_id'] : $sku['shop_iid'],
);
// 查询增量库存
@@ -676,7 +677,7 @@ EOF;
}
$adjustmentModel = $this->app->model('shop_adjustment');
$skus = $adjustmentModel->getList('shop_product_bn,bind,shop_id,shop_bn,id,mapping',array('id'=>$ids));
$skus = $adjustmentModel->getList('shop_product_bn,bind,shop_id,shop_bn,id,mapping,shop_sku_id,shop_iid',array('id'=>$ids));
$pbns = [];
foreach ($skus as $sku) {
$pbns[] = $sku['shop_product_bn'];
@@ -702,8 +703,12 @@ EOF;
$data = array();
foreach ($skus as $sku) {
$product = $products[$sku['shop_product_bn']];
$product['shop_sku_id'] = $sku['shop_sku_id'] ? $sku['shop_sku_id'] : $sku['shop_iid'];
// 发布库存
$stock = kernel::single('inventorydepth_logic_stock')->getStock($products[$sku['shop_product_bn']],$sku['shop_id'],$sku['shop_bn']);
$stock = kernel::single('inventorydepth_logic_stock')->getStock($product,$sku['shop_id'],$sku['shop_bn']);
$quantity = $stock['quantity'];
$actual_stock = $stock['actual_stock'];

View File

@@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* 商品明细controller
*
@@ -391,9 +390,9 @@ class inventorydepth_ctl_shop_frame extends desktop_controller {
$products_pko = $salesMaterialObj->getList('sm_id,sales_material_name,sales_material_bn,shop_id', array('sales_material_bn'=>$shop_product_bn, 'sales_material_type'=>5));
$products = $products ? $products : array();
kernel::single('inventorydepth_stock_pkg')->writeMemory($products_pkg);
kernel::single('inventorydepth_stock_products')->writeMemory($products);
kernel::single('inventorydepth_stock_pko')->writeMemory($products_pko);
// kernel::single('inventorydepth_stock_pkg')->writeMemory($products_pkg);
// kernel::single('inventorydepth_stock_products')->writeMemory($products);
// kernel::single('inventorydepth_stock_pko')->writeMemory($products_pko);
$skuMapping = array();
$list = $this->app->model('shop_adjustment')->getList('shop_product_bn,bind',array('shop_product_bn'=>$shop_product_bn,'mapping'=>'1','shop_id'=>$shop_id));
@@ -458,7 +457,7 @@ EOF;
}
$shop_product_bn = array(); $pkgFlag = $productFlag = $pkoFlag = array();
if ($r['skus']['sku']) {
if (isset($r['skus']['sku']) && $r['skus']['sku']) {
foreach ($r['skus']['sku'] as $sku) {
$shop_product_bn[] = $sku['outer_id'];
if (isset($skuMapping[$sku['outer_id']]) && $skuMapping[$sku['outer_id']] == 1) {