【优化】实收退导入界面

【新增】快捷菜单功能入口

【新增】爱库存电子面单获取
This commit is contained in:
chenping
2026-04-21 22:36:45 +08:00
parent 8b4b4cc49f
commit b20d422532
45 changed files with 2367 additions and 191 deletions

View File

@@ -348,7 +348,8 @@ EOF;
$data['shop_id'] = $_POST['shop_id'];
$is_ome_bind_unionpay = false;
#检测是否已绑定银联
//检测是否已绑定银联
base_kvstore::instance('ome/bind/unionpay')->fetch('ome_bind_unionpay', $is_ome_bind_unionpay);
if (!$is_ome_bind_unionpay) {
$bind_status = kernel::single('erpapi_router_request')->set('unionpay', '1705101437')->unionpay_bind();
@@ -359,7 +360,7 @@ EOF;
}
}
} elseif ($data['channel_type'] == 'jdalpha') {
#编辑的时候,支付方式,不允许改
//编辑的时候,支付方式,不允许改
if ($_POST['channel_id']) {
$channel = $channelObj->dump(array('channel_id' => $_POST['channel_id']));
$sfinfo = explode('|||', $channel['shop_id']);
@@ -518,13 +519,11 @@ EOF;
kernel::single('wms_event_trigger_logistics_electron')->bufferGetWaybill($data['channel_id']);
}
if (in_array($data['channel_type'], ['taobao','jdalpha'])) {
//默认获取发货地址
//默认获取发货地址
$extendObj = app::get('logisticsmanager')->model('channel_extend');
$extend = $extendObj->dump(array('channel_id' => $data['channel_id']), 'id');
if (!$extend) {
kernel::single('erpapi_router_request')->set('logistics', $data['channel_id'])->electron_getWaybillISearch();
}
}
echo "SUCC";
@@ -852,11 +851,14 @@ EOF;
if ($res['request_logistics_code']!=$v['delivery_id']) {
continue;
}
$key = $v['acct_id'];
if (isset($v['_unique_acct_id']) && $v['_unique_acct_id']) {
$key = $v['_unique_acct_id'];
// 与云起一致xhs/美团医药/爱库存等接口可能返回空 acct_id不能用 acct_id 作数组键,否则单选 value 为空且 POST 校验失败
$uniqueKey = $v['acct_id'];
if (in_array($res['channel_type'], array('xhs', 'meituan4medicine', 'aikucun'))) {
$uniqueKey = $k + 1;
} elseif (isset($v['_unique_acct_id']) && $v['_unique_acct_id']) {
$uniqueKey = $v['_unique_acct_id'];
}
$accountList[$key] = [
$accountList[$uniqueKey] = [
'available' => $v['available'],
'status' => $v['status'],
'delivery_id' => $v['delivery_id'],
@@ -882,6 +884,7 @@ EOF;
'district_name' => $v['district_name'],
'city_code' => $v['city_code'],
'province_name' => $v['province_name'],
'bizLine' => isset($v['bizLine']) ? $v['bizLine'] : '',
];
}
}
@@ -906,7 +909,8 @@ EOF;
}
$accountList = json_decode($_POST['account_list_json'], 1);
$accountInfo = $accountList[$_POST['_unique_acct_id']];
$pickKey = (string) $_POST['_unique_acct_id'];
$accountInfo = isset($accountList[$pickKey]) ? $accountList[$pickKey] : null;
if (!$accountInfo) {
$this->end(false, '电子面单账号id无效');
}
@@ -926,8 +930,8 @@ EOF;
'address_detail' => $accountInfo['detail_address'],
'street' => $accountInfo['street_name'],
'default_sender' => $accountInfo['name'],
'mobile' => $accountInfo['mobile'],
'tel' => $accountInfo['phone'],
'mobile' => $accountInfo['mobile'] ? $accountInfo['mobile'] : $accountInfo['phone'],
'tel' => $accountInfo['phone'] ? $accountInfo['phone'] : $accountInfo['mobile'],
'shop_name' => $accountInfo['site_name'],
'seller_id' => $accountInfo['acct_id'],
);
@@ -938,6 +942,7 @@ EOF;
'site_code' => $accountInfo['site_code'],
'acct_id' => $accountInfo['acct_id'],
'shop_id' => $accountInfo['shop_id'],
'bizLine' => isset($accountInfo['bizLine']) ? $accountInfo['bizLine'] : '',
];
}
@@ -1125,10 +1130,6 @@ EOF;
$this->end(false, '保存失败:'.$channelMdl->db->errorinfo());
}
$channelExt = [
'channel_id' => $channel['channel_id'],
'province' => $netsite_address['province_name'],

View File

@@ -40,6 +40,7 @@ class logisticsmanager_ctl_admin_express_cainiao extends desktop_controller {
'dewu'=>'得物品牌直发电子面单',
'meituan4bulkpurchasing'=>'美团电商',
'youzan'=>'有赞电子面单',
'aikucun'=>'爱库存电子面单',
];
$this->display('admin/express/pre_sync_tpl.html');
}

View File

@@ -20,7 +20,7 @@ class logisticsmanager_ctl_admin_express_template extends desktop_controller{
var $workground = "setting_tools";
function index(){
$base_filter = array('template_type' => array('normal', 'electron' , 'cainiao', 'cainiao_standard', 'cainiao_user', 'pdd_standard', 'pdd_user', 'jd_standard', 'jd_user', 'douyin_standard', 'douyin_user','kuaishou_standard','kuaishou_user','wphvip_standard','wphvip_user', 'sf', 'xhs_standard', 'xhs_user', 'wxshipin_standard', 'wxshipin_user','dewu_ppzf','dewu_ppzf_zy','meituan4bulkpurchasing_user','youzan_standard'));
$base_filter = array('template_type' => array('normal', 'electron' , 'cainiao', 'cainiao_standard', 'cainiao_user', 'pdd_standard', 'pdd_user', 'jd_standard', 'jd_user', 'douyin_standard', 'douyin_user','kuaishou_standard','kuaishou_user','wphvip_standard','wphvip_user', 'sf', 'xhs_standard', 'xhs_user', 'aikucun_standard', 'aikucun_user', 'wxshipin_standard', 'wxshipin_user','dewu_ppzf','dewu_ppzf_zy','meituan4bulkpurchasing_user','youzan_standard'));
$params = array(
'title'=>'快递面单管理',
'actions' => array(
@@ -78,6 +78,7 @@ class logisticsmanager_ctl_admin_express_template extends desktop_controller{
'wphvip' => array('label' => app::get('base')->_('唯品会vip'), 'filter' => array('filter_sql' => 'template_type in("wphvip_user","wphvip_standard")', 'status' => 'true'), 'optional' => false),
'sf' => array('label' => app::get('base')->_('顺丰'), 'filter' => array('filter_sql' => 'template_type in("sf")', 'status' => 'true'), 'optional' => false),
'xhs' => array('label' => app::get('base')->_('小红书'), 'filter' => array('filter_sql' => 'template_type in("xhs_standard","xhs_user")', 'status' => 'true'), 'optional' => false),
'aikucun' => array('label' => app::get('base')->_('爱库存'), 'filter' => array('filter_sql' => 'template_type in("aikucun_standard","aikucun_user")', 'status' => 'true'), 'optional' => false),
'wxshipin' => array('label' => app::get('base')->_('微信视频号'), 'filter' => array('filter_sql' => 'template_type in("wxshipin_standard","wxshipin_user")', 'status' => 'true'), 'optional' => false),
'youzan' => array('label' => app::get('base')->_('有赞'), 'filter' => array('filter_sql' => 'template_type in("youzan_standard")', 'status' => 'true'), 'optional' => false),
'dewu' => array('label' => app::get('base')->_('得物'), 'filter' => array('filter_sql' => 'template_type in("dewu_ppzf","dewu_ppzf_zy")', 'status' => 'true'), 'optional' => false),

View File

@@ -74,18 +74,32 @@ class logisticsmanager_ctl_admin_waybill extends desktop_controller{
* @return mixed 返回结果
*/
public function getEncryptPrintData() {
$logiNo = trim($_POST['logi_no']);
$batchLogiNo = trim($_POST['batch_logi_no']);
$deliveryId = intval($_POST['delivery_id']);
$channelId = trim($_POST['channel_id']);
$logiNo = trim($_POST['logi_no']);
$batchLogiNo = trim($_POST['batch_logi_no']);
$deliveryId = intval($_POST['delivery_id']);
$channelId = trim($_POST['channel_id']);
$requestData = [
'logi_no' => $logiNo,
'batch_logi_no' => $batchLogiNo,
'delivery_id' => $deliveryId,
];
$channelType = '';
if ($channelId) {
$channel = app::get('logisticsmanager')->model('channel')->dump(['channel_id' => $channelId], 'channel_type');
$channelType = isset($channel['channel_type']) ? $channel['channel_type'] : '';
}
if ($channelType === 'aikucun') {
$requestData['print_name'] = isset($_POST['print_name']) ? trim($_POST['print_name']) : '';
$requestData['mode'] = isset($_POST['mode']) ? trim($_POST['mode']) : '';
$requestData['prepare_data'] = isset($_POST['prepare_data']) ? $_POST['prepare_data'] : '';
} elseif (isset($_POST['custom_data'])) {
$requestData['custom_data'] = $_POST['custom_data'];
}
$rs = kernel::single('erpapi_router_request')
->set('logistics',$channelId)
->electron_getEncryptPrintData([
'logi_no' =>$logiNo,
'batch_logi_no' =>$batchLogiNo,
'delivery_id' =>$deliveryId,
'custom_data' => $_POST['custom_data']
]);
->set('logistics', $channelId)
->electron_getEncryptPrintData($requestData);
echo json_encode($rs);
}
}