|
@@ -340,12 +340,17 @@ class Headquarters extends BaseController
|
|
|
{
|
|
|
$companyNo = $this->request->filter('trim')->post('code');
|
|
|
|
|
|
- $res = Db::name('headquarters')
|
|
|
+ $res_1 = Db::name('headquarters')
|
|
|
->where('is_del', 0)
|
|
|
->whereIn('code', $companyNo)
|
|
|
->column('name', 'code');
|
|
|
|
|
|
- return json_show(0, '请求成功', $res);
|
|
|
+ $res_2 = Db::name('headquarters')
|
|
|
+ ->where('is_del', 0)
|
|
|
+ ->whereIn('relation_code', $companyNo)
|
|
|
+ ->column('name', 'relation_code');
|
|
|
+
|
|
|
+ return json_show(0, '请求成功', array_merge($res_1, $res_2));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -488,6 +493,7 @@ class Headquarters extends BaseController
|
|
|
'invoice_mobile' => $param['mobile'],
|
|
|
'invoice_bank' => $param['inv_bank'],
|
|
|
'invoice_bankNo' => $param['inv_bankNo'],
|
|
|
+ 'invoice_title' => $param['invoice_title'],
|
|
|
'updatetime' => date("Y-m-d H:i:s"),
|
|
|
]);
|
|
|
|
|
@@ -626,7 +632,7 @@ class Headquarters extends BaseController
|
|
|
->where(['a.code' => $code, 'a.is_del' => 0])
|
|
|
->findOrEmpty();
|
|
|
|
|
|
- if (empty($info)) return json_show(1002, "未找到数据");
|
|
|
+ if (empty($info)) return json_show(1002, "未找到供应商数据");
|
|
|
return json_show(0, '获取成功', $info);
|
|
|
}
|
|
|
|
|
@@ -724,8 +730,7 @@ class Headquarters extends BaseController
|
|
|
//供应商升级成业务公司
|
|
|
public function supplerUpgrade()
|
|
|
{
|
|
|
-
|
|
|
- $post = $this->request->only(['code', 'inv_bank', 'inv_bankNo', 'inv_addr', 'mobile', 'uid', 'uname'], 'post', 'trim');
|
|
|
+ $post = $this->request->only(['code', 'inv_bank', 'inv_bankNo', 'inv_addr', 'mobile', 'uid', 'uname','invoice_title'], 'post', 'trim');
|
|
|
|
|
|
$val = Validate::rule([
|
|
|
'code|供应商编码' => 'require',
|
|
@@ -733,6 +738,7 @@ class Headquarters extends BaseController
|
|
|
'inv_bankNo|银行卡号' => 'require|number',
|
|
|
'inv_addr|联系地址' => 'require|max:255',
|
|
|
'mobile|联系电话' => 'require',
|
|
|
+ 'invoice_title|公司抬头' => 'require',
|
|
|
]);
|
|
|
|
|
|
if ($val->check($post) == false) return json_show(1004, $val->getError());
|
|
@@ -782,6 +788,7 @@ class Headquarters extends BaseController
|
|
|
'addr' => $res['addr'],
|
|
|
'inv_scope' => $res['scope'],
|
|
|
'license_img' => $res['license_img'],
|
|
|
+ 'invoice_title' => $post['invoice_title'],
|
|
|
'status' => 1,
|
|
|
'is_del' => 0,
|
|
|
'addtime' => $date,
|