|
|
@@ -14,6 +14,7 @@ use bizMall\order\services\OrderService;
|
|
|
use bizMall\promote\services\CouponService;
|
|
|
use bizMall\saas\services\RegionService;
|
|
|
use bizMall\user\services\UserService;
|
|
|
+use common\components\dateUtil;
|
|
|
use common\components\dict;
|
|
|
use common\components\httpUtil;
|
|
|
use common\components\noticeUtil;
|
|
|
@@ -27,6 +28,35 @@ use common\components\lakala\Lakala;
|
|
|
class OrderController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //记账单列表 ssh 20250627
|
|
|
+ public function actionDebtList()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $where = [];
|
|
|
+ $where['mainId'] = $this->mainId;
|
|
|
+ if (!empty($id)) {
|
|
|
+ $hd = \bizMall\hd\classes\HdClass::getById($id, true);
|
|
|
+ if (empty($hd)) {
|
|
|
+ util::fail('无效的花店');
|
|
|
+ }
|
|
|
+ if ($hd->shopId != $this->shopId) {
|
|
|
+ util::fail('不是你的店铺');
|
|
|
+ }
|
|
|
+ $where['hdId'] = $id;
|
|
|
+ }
|
|
|
+ $where['debt'] = 1;
|
|
|
+ $searchTime = $get['searchTime'] ?? '';
|
|
|
+ if (!empty($searchTime)) {
|
|
|
+ $startTime = $get['startTime'] ?? '';
|
|
|
+ $endTime = $get['endTime'] ?? '';
|
|
|
+ $period = dateUtil::formatTime($searchTime, $startTime, $endTime);
|
|
|
+ $where['addTime'] = ['between', [$period['startTime'], $period['endTime']]];
|
|
|
+ }
|
|
|
+ $respond = OrderClass::getDebtList($where);
|
|
|
+ util::success($respond);
|
|
|
+ }
|
|
|
+
|
|
|
//计算运费,请搜索关键词calc_freight,二个方法要合一起 ssh 20221014
|
|
|
public function actionFreight()
|
|
|
{
|
|
|
@@ -63,7 +93,7 @@ class OrderController extends BaseController
|
|
|
//普莲花艺、叶上花、丰行、小武鲜花、九江云朵、源花汇不能在花卉宝下单,多处要同步修改,关键词ls_mall_not_open
|
|
|
$mainId = $this->mainId;
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- if (in_array($mainId, [40057, 7779, 42940, 26374,10536])) {
|
|
|
+ if (in_array($mainId, [40057, 7779, 42940, 26374, 10536])) {
|
|
|
util::fail('暂时无法访问');
|
|
|
}
|
|
|
} else {
|
|
|
@@ -162,7 +192,7 @@ class OrderController extends BaseController
|
|
|
$user = $this->user;
|
|
|
$post['bookMobile'] = $user->mobile ?? '';
|
|
|
$post['bookName'] = $user->name ?? '';
|
|
|
- $return = OrderService::createOrder($post,$custom);
|
|
|
+ $return = OrderService::createOrder($post, $custom);
|
|
|
|
|
|
if (isset($return->shopId)) {
|
|
|
if ($return->shopId == 7610) {
|