|
|
@@ -25,52 +25,6 @@ class PurchaseOrderController extends BaseController
|
|
|
|
|
|
public $guestAccess = ['detail', 'check-seat-update', 'assign-seat'];
|
|
|
|
|
|
- //修改入库时间 ssh 20240829
|
|
|
- public function actionModifyEntryTime()
|
|
|
- {
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $id = $get['id'] ?? 0;
|
|
|
- $date = $get['date'] ?? '';
|
|
|
- if (empty($date)) {
|
|
|
- util::fail('请选择日期');
|
|
|
- }
|
|
|
- $order = PurchaseOrderClass::getById($id, true);
|
|
|
- if (empty($order)) {
|
|
|
- util::fail('没有找到订单');
|
|
|
- }
|
|
|
- if ($order->mainId != $this->mainId) {
|
|
|
- util::fail('不是你的订单');
|
|
|
- }
|
|
|
- if ($order->status == 1) {
|
|
|
- util::fail('采购单待入库');
|
|
|
- }
|
|
|
- if ($order->status == 5) {
|
|
|
- util::fail('采购单已取消');
|
|
|
- }
|
|
|
- $mainId = $this->mainId;
|
|
|
- //超管或者约定的人可以修改日期
|
|
|
- if (getenv('YII_ENV') == 'production') {
|
|
|
- if (in_array($mainId, [23390])) {
|
|
|
- if (!in_array($this->adminId, [24586, 23960])) {
|
|
|
- util::fail('你不能修改哦');
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (in_array($mainId, [644])) {
|
|
|
- if (!in_array($this->adminId, [919])) {
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- $entryTime = $order->entryTime;
|
|
|
- $time = strtotime($entryTime);
|
|
|
- $after = date("H:i:s", $time);
|
|
|
- $new = $date . ' ' . $after;
|
|
|
- $order->entryTime = $new;
|
|
|
- $order->save();
|
|
|
- util::complete('修改成功');
|
|
|
- }
|
|
|
-
|
|
|
//打印多联 ssh 2024509
|
|
|
public function actionPrintPaper()
|
|
|
{
|