去掉无用的参数

修改表单构建关联字段的逻辑
修改外部插件说明
This commit is contained in:
2021-03-01 03:02:47 +08:00
parent 2418516c49
commit eebbdf279e
63 changed files with 1273 additions and 1380 deletions
+1 -11
View File
@@ -60,16 +60,6 @@ class CustomerApplyHook
bank_address
')->first();
// 自动处理区域
if ($apply['region_id']) {
$regions = DB::table('customer_region')->get()->keyBy('id');
$region1 = $regions[$apply['region_id']];
$region2 = $regions[$region1['parent_id']];
$region3 = $regions[$region2['parent_id']];
$apply['region2_id'] = $region2['id'];
$apply['region3_id'] = $region3['id'];
}
// 新建客户
$customer = new Customer;
$customer->fill($apply);
@@ -113,7 +103,7 @@ class CustomerApplyHook
$_apply->code = $customer['code'];
$_apply->save();
// 客户档案写入用友
// 客户档案写入外部接口
$department = DB::table('department')->where('id', $customer['department_id'])->first();
$class = DB::table('customer_class')->where('id', $customer['class_id'])->first();
$customer['class_code'] = $class['code'];
+1 -19
View File
@@ -40,16 +40,6 @@ class CustomerHook
}
$user->fill($_user)->save();
$master['user_id'] = $user->id;
// 自动处理区域
if ($master['region_id']) {
$regions = DB::table('customer_region')->get()->keyBy('id');
$region1 = $regions[$master['region_id']];
$region2 = $regions[$region1['parent_id']];
$region3 = $regions[$region2['parent_id']];
$master['region2_id'] = $region2['id'];
$master['region3_id'] = $region3['id'];
}
$params['master'] = $master;
return $params;
@@ -78,7 +68,7 @@ class CustomerHook
'status' => 1,
]);
// 客户档案写入用友
// 客户档案写入外部接口
$department = DB::table('department')->where('id', $master['department_id'])->first();
$class = DB::table('customer_class')->where('id', $customer['class_id'])->first();
$customer['class_code'] = $class['code'];
@@ -105,13 +95,5 @@ class CustomerHook
$row = $params['row'];
$ret = $params['ret'];
abort_error('客户档案暂时无法导入');
// $row['password']
if ($ret['id']) {
//DB::table($table)->where('id', $ret['id'])->update($row);
} else {
//$row['id'] = DB::table($table)->insertGetId($row);
}
//print_r($row);
// exit;
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ class TaxHook
$customer->tax_max_id = $max_id;
$customer->save();
// 客户档案写入用友
// 客户档案写入外部接口
$department = DB::table('department')->where('id', $tax['department_id'])->first();
$class = DB::table('customer_class')->where('id', $tax['class_id'])->first();
$tax['class_code'] = $class['code'];