mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-10 08:25:31 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
66
app/ome/model/platform/set.php
Normal file
66
app/ome/model/platform/set.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
class ome_mdl_platform_set extends dbeav_model{
|
||||
|
||||
/**
|
||||
* 根据平台获取场景映射
|
||||
*
|
||||
* @param string $shop_type 平台编码,为空时返回所有场景
|
||||
* @return array
|
||||
*/
|
||||
public static function get_scene_map($shop_type = '')
|
||||
{
|
||||
// 默认所有平台都有的场景
|
||||
$scenes = array(
|
||||
'delivery' => '发货时效'
|
||||
);
|
||||
|
||||
// 如果指定了平台,根据平台返回可用场景
|
||||
if ($shop_type) {
|
||||
if ($shop_type == 'taobao') {
|
||||
// 淘宝平台额外增加天猫优品佣金场景
|
||||
$scenes['tmyp_commission'] = '天猫优品佣金';
|
||||
// 淘宝平台额外增加天猫喵速达佣金场景
|
||||
$scenes['tmsd_commission'] = '天猫喵速达佣金';
|
||||
}
|
||||
return $scenes;
|
||||
}
|
||||
|
||||
// 未指定平台时返回所有场景
|
||||
$scenes['tmyp_commission'] = '天猫优品佣金';
|
||||
$scenes['tmsd_commission'] = '天猫喵速达佣金';
|
||||
return $scenes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 平台编码修饰器
|
||||
*
|
||||
* @param string $shop_type 平台编码
|
||||
* @param array $list 数据列表
|
||||
* @param array $row 当前行数据
|
||||
* @return string
|
||||
*/
|
||||
public function modifier_shop_type($shop_type, $list, $row)
|
||||
{
|
||||
$shopTypeList = ome_shop_type::get_shop_type();
|
||||
$shopTypeList['taobao'] = '淘宝/天猫';
|
||||
unset($shopTypeList['tmall']);
|
||||
return $shopTypeList[$shop_type] ? : $shop_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 场景修饰器
|
||||
*
|
||||
* @param string $scene 场景
|
||||
* @param array $list 数据列表
|
||||
* @param array $row 当前行数据
|
||||
* @return string
|
||||
*/
|
||||
public function modifier_scene($scene, $list, $row)
|
||||
{
|
||||
$sceneMap = self::get_scene_map();
|
||||
return isset($sceneMap[$scene]) ? $sceneMap[$scene] : $scene;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user