|
@@ -13,11 +13,13 @@ use app\common\model\Area;
|
|
|
use app\common\model\LogisticsCompany;
|
|
|
use app\common\model\MobileOrder;
|
|
|
use app\common\model\MobileOrderOperation;
|
|
|
+use app\common\model\Produce;
|
|
|
use app\common\service\MobileOrderExport;
|
|
|
use app\common\service\TransferCheck;
|
|
|
use app\common\service\ZopOrderService;
|
|
|
use app\common\validate\RefundValidate;
|
|
|
use app\service\byte_dance\ByteDanceSettle;
|
|
|
+use Exception;
|
|
|
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
|
|
|
use PhpOffice\PhpSpreadsheet\Reader\Csv;
|
|
|
use PhpOffice\PhpSpreadsheet\Reader\Xls;
|
|
@@ -228,8 +230,9 @@ class Produceorder extends Backend
|
|
|
->where($map)
|
|
|
->where('type',1)
|
|
|
// ->where(['platform_source'=>'敢探号','api_goods_id'=>123564678989,'or'])
|
|
|
- ->whereOr('platform_source','敢探号')
|
|
|
- ->whereOr('api_goods_id','123564678989')
|
|
|
+ // ->whereOr('platform_source','敢探号')
|
|
|
+ // ->whereOr('api_goods_id','123564678989')
|
|
|
+ ->where('is_need_push', 1)
|
|
|
->where(function($q) {
|
|
|
//供应商
|
|
|
if($this->proxy){
|
|
@@ -273,9 +276,10 @@ class Produceorder extends Backend
|
|
|
return $q->where('mobile_order.admin_id', $this->auth->id);
|
|
|
}
|
|
|
})
|
|
|
- ->where(function ($q){
|
|
|
- $q->whereOr('platform_source','敢探号')->whereOr('api_goods_id','123564678989');
|
|
|
- })
|
|
|
+ // ->where(function ($q){
|
|
|
+ // $q->whereOr('platform_source','敢探号')->whereOr('api_goods_id','123564678989');
|
|
|
+ // })
|
|
|
+ ->where('is_need_push', 1)
|
|
|
// ->whereOr('platform_source','敢探号')
|
|
|
|
|
|
->order($sort, $order)
|
|
@@ -594,6 +598,11 @@ class Produceorder extends Backend
|
|
|
// $params['city'] = implode('/', Area::getTreeId($params['city']));
|
|
|
$params['city'] = implode(',',Area::getTreeId(explode('/',$params['city'])[2]));
|
|
|
$params['status'] = 10;
|
|
|
+ $params['pay_time'] = strtotime($params['pay_time']);
|
|
|
+ $params['order_no'] = order_no();
|
|
|
+ $params['is_need_push'] = 1;
|
|
|
+ $params['is_push_zop'] = 0;
|
|
|
+ $params['is_auto'] = 0;
|
|
|
$result = MobileOrder::insert($params);
|
|
|
// exit();
|
|
|
// $result = $this->model->allowField(true)->save($params);
|
|
@@ -617,6 +626,9 @@ class Produceorder extends Backend
|
|
|
}
|
|
|
$this->error(__('Parameter %s can not be empty', ''));
|
|
|
}
|
|
|
+ $produces = Produce::all();
|
|
|
+ $this->assign('produces', $produces);
|
|
|
+
|
|
|
return $this->view->fetch();
|
|
|
}
|
|
|
|