更新联营物料

parent cd844c43
......@@ -79,7 +79,7 @@ class ApiController extends Controller
private function ApiAbnormalListExport($request, $id){
$data= $request->input();
$data['is_consign'] = 1; //供应商代发
$id = (new UploadLogModel())->addLog($request->account_id,1,$data);
$id = (new UploadLogModel())->addLog($request->account_id,2,$data);
if(!$id) return Export(20003,'任务推送失败');
dispatch(new JopExportAbnormlList($id));
Export(0,$id);
......@@ -98,7 +98,7 @@ class ApiController extends Controller
private function ApiPutawayListExport($request, $id){
$data= $request->input();
$data['picking_type'] = 2; //寄售
$id = (new UploadLogModel())->addLog($request->account_id,1,$data);
$id = (new UploadLogModel())->addLog($request->account_id,3,$data);
if(!$id) return Export(20003,'任务推送失败');
dispatch(new JopExportPutawayList($id));
Export(0,$id);
......@@ -141,22 +141,22 @@ class ApiController extends Controller
$input['supplier_com_code'] = $request->supplier_com_code;
ExportLayui2((new ServerMicModel())->getSkuList($input));
}
//自营商品列表导出
private function ApiGoodsListExport($request, $id){
$id = (new UploadLogModel())->addLog($request->account_id,4,$request->input());
if(!$id) return Export(20003,'任务推送失败');
dispatch(new JopExportGoodsList($id));
Export(0,$id);
}
//联营商品导出
private function ApiGoodsComListExport($request, $id){
$data= $request->input();
$data['supplier_com_code'] = $request->supplier_com_code;
$id = (new UploadLogModel())->addLog($request->account_id,1,$data,$request->mobile);
$id = (new UploadLogModel())->addLog($request->account_id,5,$data,$request->mobile);
if(!$id) return Export(20003,'任务推送失败');
dispatch(new JopExportGoodsComList($id));
Export(0,$id);
}
//商品列表导出
private function ApiGoodsListExport($request, $id){
$id = (new UploadLogModel())->addLog($request->account_id,1,$request->input());
if(!$id) return Export(20003,'任务推送失败');
dispatch(new JopExportGoodsList($id));
Export(0,$id);
}
//查询品牌
private function GetBrand($request){
(new ServerFoostoneModel($request->appid,$request->key))->getBrand($request->input("p"),100,2);
......
......@@ -1183,4 +1183,11 @@ function sctonum($num, $double = 5){
return bcmul($a[0], bcpow(10, $a[1], $double), $double);
}
}
function unicodeDecode($unicode_str){
$json = '{"str":"'.$unicode_str.'"}';
$arr = json_decode($json,true);
print_r($arr);
die();
if(empty($arr)) return '';
return $arr['str'];
}
......@@ -14,10 +14,20 @@ class UploadLogMap{
self::STATUS_SUCCESS => "处理成功",
self::STATUS_ERROR => "处理失败",
];
//类型:1 批量导入sku价格 2
const type_import_sku = 1;
const type_update_sku = 1;
//类型:1:订单导出 2:退货导出 3:入库导出 4:自营商品导出 5:联营商品导出 6:批量导入联营物料 7:批量修改联营物料
const type_export_order = 1;
const type_export_refund = 2;
const type_export_putaway = 3;
const type_export_self_goods = 4;
const type_export_com_goods = 5;
const type_import_sku = 6;
const type_update_sku = 7;
static $type = [
self::type_export_order =>'订单导出',
self::type_export_refund =>'退货导出',
self::type_export_putaway =>'入库导出',
self::type_export_self_goods =>'自营商品导出',
self::type_export_com_goods =>'联营商品导出',
self::type_import_sku =>'批量导入联营sku',
self::type_update_sku =>'批量修改联营sku'
];
......
......@@ -28,7 +28,6 @@ class UploadLogModel extends Model
$type = @$collert['type']; //日志类型
//查数据
$list=$this->where('type',$type)->where("create_uid",$create_uid)->orderBy('id','desc')->paginate($limit,['*'],'p',$p)->toArray();
$data = $list['data'];
if ($type == UploadLogMap::type_import_sku){
//如果是联营sku导入,查询状态
......
......@@ -69,7 +69,7 @@ ADD INDEX `idx_supplier_com_name` (`supplier_com_name`) ;
-- 上传日志添加字段
ALTER TABLE `lie_upload_log`
MODIFY COLUMN `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '1: 批量导入联营物料 2: 批量修改联营物料' AFTER `id`;
MODIFY COLUMN `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '1:订单导出 2:退货导出 3:入库导出 4:自营商品导出 5:联营商品导出 6:批量导入联营物料 7:批量修改联营物料' AFTER `id`,
ADD COLUMN `create_name` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人名称' AFTER `create_uid`;
原因:添加联营账号
......
......@@ -18,7 +18,7 @@
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,where: {"type":1} //formJson('form1')
,where: {"type":6} //formJson('form1')
,loading:true
,first: true //不显示首页
,last: false //不显示尾页
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment