全部
常见问题
产品动态
精选推荐
功能建议

分析中 已回复 待规划 {{opt.name}}
分析中 已回复 待规划
CRMEB 多门店v3.5客服改价问题

管理 管理 编辑 删除

1、文件:app/controller/kefu/Order.php

按照下图(修改后截图)增加参数:

9381f202603231027178235.png

2、文件:app/services/order/StoreOrderServices.php

增加参数: string $type = 'admin'
增加一行代码:$f[] = Form::hidden('type', $type);

0580e20260323102832463.png

3、文件:app/common/controller/Order.php

找到方法:update,替换成下面代码

public function update($id)
    {
        if (!$id) return app('json')->fail('Missing order ID');
		$type = $this->request->param('type', 'admin');
		if ($type == 'admin') {
			$data = $this->request->postMore([
				['gain_integral', 0],//赠送积分
				['is_postage', 0],//是否包邮
				['cart_info', []],//商品改价数组[['id' => 1, 'true_price' => 11.00],['id' => 2, 'true_price' => 11.00]]
			]);
			if ($data['cart_info']) {
				foreach ($data['cart_info'] as $cart) {
					if (!isset($cart['id']) || !$cart['id'] || !isset($cart['true_price'])) {
						return app('json')->fail('请选择需要改价的商品进行操作');
					}
				}
			}
			$this->services->setItem('change_manager_type', 'admin')->setItem('change_manager_id', $this->request->adminId());

		} else {//客服
			$data = $this->request->postMore([
				['order_id', ''],
				['total_price', 0],
				['total_postage', 0],
				['pay_price', 0],
				['pay_postage', 0],
				['gain_integral', 0],
			]);

			validate(StoreOrderValidate::class)->check($data);

			if ($data['total_price'] < 0) {
				return $this->fail('Please enter the total price');
			}
			if ($data['pay_price'] < 0) {
				return $this->fail('Please enter the actual payment amount');
			}
			$this->services->setItem('change_manager_type', 'kefu')->setItem('change_manager_id', $this->request->kefuInfo()['uid'] ?? 0);
		}
		$this->services->updateOrder((int)$id, $data);
		$this->services->reset();
        return app('json')->success('Modified success');
    }

4、重启swoole,重新改价操作试试

{{voteData.voteSum}} 人已参与
支持
反对
请登录后查看

return; 最后编辑于2026-03-23 10:30:38

快捷回复
回复
回复
回复({{post_count}}) {{!is_user ? '我的回复' :'全部回复'}}
排序 默认正序 回复倒序 点赞倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level || item.bbs_level }}

作者 管理员 企业

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推荐': '推荐'}}
{{item.is_suggest == 1? '取消推荐': '推荐'}} 【已收集】
{{item.floor}}# 沙发 板凳 地板 {{item.floor}}# 【已收集】
{{item.user_info.title || '暂无简介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打赏
已打赏¥{{item.reward_price}}
{{item.like_count}}
分享
{{item.showReply ? '取消回复' : '回复'}}
删除
回复
回复

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回复 {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打赏
已打赏¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回复' : '回复'}}
删除
回复
回复
收起 展开更多
查看更多
打赏
已打赏¥{{reward_price}}
55
{{like_count}}
{{collect_count}}
添加回复 ({{post_count}})

相关推荐

快速安全登录

使用微信扫码登录
回复
回复
问题:
问题自动获取的帖子内容,不准确时需要手动修改. [获取答案]
答案:
提交
bug 需求 取 消 确 定
打赏金额
当前余额:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
请输入 0.1-{{reward_max_price}} 范围内的数值
打赏成功
¥{{price}}
完成 确认打赏

微信登录/注册

切换手机号登录

{{ bind_phone ? '绑定手机' : '手机登录'}}

{{codeText}}
切换微信登录/注册
暂不绑定
CRMEB客服
CRMEB咨询热线 400-8888-794

扫码领取产品资料

功能清单
思维导图
安装教程
CRMEB开源商城下载 源码下载 CRMEB帮助文档 帮助文档
返回顶部 返回顶部
CRMEB客服