|
|
@@ -45,6 +45,7 @@ class PurchaseController extends BaseController
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
$str = $post['id'] ?? 0;
|
|
|
+ $ghsId = $post['ghsId'] ?? 0;
|
|
|
if (empty($str)) {
|
|
|
util::fail('没有选择订单');
|
|
|
}
|
|
|
@@ -53,7 +54,17 @@ class PurchaseController extends BaseController
|
|
|
if (empty($ids)) {
|
|
|
util::fail('没有订单哦');
|
|
|
}
|
|
|
- print_r($ids);die;
|
|
|
+ $list = PurchaseOrderClass::getAllByCondition(['id' => ['in', $ids]], null, '*', null, true);
|
|
|
+ if (empty($list)) {
|
|
|
+ util::fail('没有订单');
|
|
|
+ }
|
|
|
+ foreach ($list as $order) {
|
|
|
+ if ($order->ghsId != $ghsId) {
|
|
|
+ util::fail('订单有问题');
|
|
|
+ }
|
|
|
+ $order->confirm = 1;
|
|
|
+ $order->save();
|
|
|
+ }
|
|
|
util::complete('确认成功');
|
|
|
}
|
|
|
|