From 9cfae77ca705c8e48020b5f3af0a8e712fac4113 Mon Sep 17 00:00:00 2001 From: lqmac Date: Mon, 8 Jul 2024 12:47:05 +0800 Subject: [PATCH] 1 --- app/admin/controller/Goods.php | 1 + app/common/model/Goods.php | 2 +- app/job/service/goods/AdminImport.php | 1 + app/job/service/goods/Collector.php | 3 +++ app/job/service/goods/GoodsStoreImport.php | 1 + app/job/service/goods/GoodsUpdateImport.php | 1 + app/store/controller/Goods.php | 1 + app/store/model/goods/Import.php | 1 + 8 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/admin/controller/Goods.php b/app/admin/controller/Goods.php index 310cbda3..7d2e55e4 100644 --- a/app/admin/controller/Goods.php +++ b/app/admin/controller/Goods.php @@ -350,6 +350,7 @@ class Goods extends Controller ['goods_source'=>'商品来源 (GC:工厂 CC:仓储 ZC:自采 填其中一项)'], ['delivery_time'=>'发货时效(0:24小时 1:48小时 2:72小时 3:7天内 4:15天内 5:30天内 6:45天内 填写其中一项)'], ['is_check'=>'是否审单(是填1 否填0)'], + ['is_use_jd_stock'=>'是否使用京东库存(是填1 否填0)'], ]; downLoadExcel('导出数据-'.date('Y-m-d', time()),$titles,$data['data']); diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index 02177c1f..1aaf0293 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -209,7 +209,7 @@ class Goods extends BaseModel // 执行查询 $list = $query ->alias($this->name) - ->field(['goods.goods_id', 'goods.goods_name', 'cmmdty_model', 'remark', 'cost_price_min', 'stock_total', 'is_check', 'goods_price_min','goods_no','goods_source','delivery_time','delivery_id','status','link','link_other','channel']) + ->field(['goods.goods_id', 'goods.goods_name', 'cmmdty_model', 'remark', 'cost_price_min', 'stock_total', 'is_check', 'goods_price_min','goods_no','goods_source','delivery_time','delivery_id','status','link','link_other','channel','is_use_jd_stock']) ->where('is_delete', '=', 0) ->order($sort) ->paginate($listRows); diff --git a/app/job/service/goods/AdminImport.php b/app/job/service/goods/AdminImport.php index 80390d10..6fdb934b 100644 --- a/app/job/service/goods/AdminImport.php +++ b/app/job/service/goods/AdminImport.php @@ -239,6 +239,7 @@ class AdminImport extends BaseService 'cost_price' => $original["G"], 'stock_num' => $original["H"], 'remark' => $original["I"], + 'is_use_jd_stock' => $original["M"], //'delivery_id' => $original["K"], //'link' => $original["D"], 'categoryIds' => $this->ids2array($original["E"]), diff --git a/app/job/service/goods/Collector.php b/app/job/service/goods/Collector.php index f602499f..b8f80773 100644 --- a/app/job/service/goods/Collector.php +++ b/app/job/service/goods/Collector.php @@ -225,6 +225,7 @@ class Collector extends BaseService $original['region_text'] = $form['region_text'] ?? ""; $original['delivery_time'] = $form['delivery_time'] ?? 2; $original['is_check'] = $form['is_check'] ?? 0; + $original['is_use_jd_stock'] = $form['is_use_jd_stock'] ?? 0; $original['goods_source'] = $form['goods_source'] ?? "GC"; $original['data_type'] = 1; $original['link'] = $url; @@ -335,6 +336,7 @@ class Collector extends BaseService $data['cmmdty_model'] = $form['cmmdty_model']; $data['delivery_time'] = $form['delivery_time']; $data['is_check'] = $form['is_check']; + $data['is_use_jd_stock'] = $form['is_use_jd_stock']; $data['goods_price_min'] = $original['goods_price']; $data['goods_price_max'] = $original['goods_price']; $data['line_price_min'] = $original['goods_price']; @@ -544,6 +546,7 @@ class Collector extends BaseService 'goods_name' => $original['goods_name'], 'goods_no' => $original['goods_sku_no'] ?? "", 'is_check' => $original['is_check'] ?? 0, + 'is_use_jd_stock' => $original['is_use_jd_stock'] ?? 0, 'delivery_time' => $original['delivery_time'] ?? 0, 'goods_source' => $original['goods_source'] ?? "", 'data_type' => $original['data_type'],//数据类型 diff --git a/app/job/service/goods/GoodsStoreImport.php b/app/job/service/goods/GoodsStoreImport.php index 208b95c2..895fdecd 100644 --- a/app/job/service/goods/GoodsStoreImport.php +++ b/app/job/service/goods/GoodsStoreImport.php @@ -258,6 +258,7 @@ class GoodsStoreImport extends BaseService 'stock_num' => $original["J"], 'remark' => $original["K"], 'delivery_id' => $original["M"], + 'is_use_jd_stock' => $original["N"] ?? 0, //'link' => $original["D"], 'categoryIds' => $this->ids2array($original["E"]), 'imageStorage' => 20,//下载图片到本地 diff --git a/app/job/service/goods/GoodsUpdateImport.php b/app/job/service/goods/GoodsUpdateImport.php index b1941a27..f2e22166 100644 --- a/app/job/service/goods/GoodsUpdateImport.php +++ b/app/job/service/goods/GoodsUpdateImport.php @@ -131,6 +131,7 @@ class GoodsUpdateImport extends BaseService 'goods_source' => $original['J'] ?? "GC", 'delivery_time' => $original['K'] ?? 2, 'is_check' => $original['L'] ?? 0, + 'is_use_jd_stock' => $original['M'] ?? 0, ]; return $data; diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index 2280e527..5322a0f0 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -347,6 +347,7 @@ class Goods extends Controller ['stock_total'=>'库存量'], // ['stock_total'=>'库存量'], ['remark'=>'下单须知'], + ['is_use_jd_stock'=>'是否使用京东库存(是填1 否填0)'], ]; downLoadExcel('导出数据-'.date('Y-m-d', time()),$titles,$data['data']); diff --git a/app/store/model/goods/Import.php b/app/store/model/goods/Import.php index 6a83cc02..f8cce590 100644 --- a/app/store/model/goods/Import.php +++ b/app/store/model/goods/Import.php @@ -258,6 +258,7 @@ class Import extends ImportModel // 'line_price_max'=> $value['L'], 'stock_total'=> $value['M'], 'remark'=> $value['N'], + 'is_use_jd_stock'=> $value['O'], ]; $goods = GoodsModel::where('goods_id', $value['A'])->find(); if (!$goods) {