|
|
@@ -33,6 +33,34 @@ class OrderController extends BaseController
|
|
|
|
|
|
public $guestAccess = ['create-order', 'order-relate', 'fast-pay', 'info'];
|
|
|
|
|
|
+ //发货 ssh 20230613
|
|
|
+ public function actionFn()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $id = $post['id'] ?? '';
|
|
|
+ $order = OrderClass::getById($id, true);
|
|
|
+ OrderClass::valid($order, $this->shopId);
|
|
|
+ $fhWl = $post['fhWl'] ?? '';
|
|
|
+ $fhWlNo = $post['fhWlNo'] ?? '';
|
|
|
+ $fhType = $post['fhType'] ?? '';
|
|
|
+ $params = [
|
|
|
+ 'fhType' => $fhType,
|
|
|
+ 'fhWl' => $fhWl,
|
|
|
+ 'fhWlNo' => $fhWlNo,
|
|
|
+ ];
|
|
|
+ $connection = Yii::$app->db;
|
|
|
+ $transaction = $connection->beginTransaction();
|
|
|
+ try {
|
|
|
+ OrderClass::orderFh($order, $params);
|
|
|
+ $transaction->commit();
|
|
|
+ util::complete();
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ $transaction->rollBack();
|
|
|
+ Yii::error("操作失败原因:" . $e->getMessage());
|
|
|
+ util::fail('操作失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//修改分工 ssh 20221129
|
|
|
public function actionChangeWorker()
|
|
|
{
|
|
|
@@ -912,8 +940,8 @@ class OrderController extends BaseController
|
|
|
$colorData = json_decode($colorItem, true);
|
|
|
if (!empty($colorData) && is_array($colorData)) {
|
|
|
foreach ($colorData as $colorInfo) {
|
|
|
- $ptItemId = $colorInfo['ptItemId']??0;
|
|
|
- $colorList = $colorInfo['list']??[];
|
|
|
+ $ptItemId = $colorInfo['ptItemId'] ?? 0;
|
|
|
+ $colorList = $colorInfo['list'] ?? [];
|
|
|
if (!empty($colorList)) {
|
|
|
foreach ($colorList as $colorItemKey => $colorItem) {
|
|
|
$newXj[$ptItemId][] = $colorItem;
|