|
@@ -127,7 +127,7 @@ class Filing extends Base
|
|
// ->where(['companyNo' => $param['customerCode']])
|
|
// ->where(['companyNo' => $param['customerCode']])
|
|
// ->value('company', '');
|
|
// ->value('company', '');
|
|
// if ($customerName == '') return json_show(1004, '该业务公司不存在');
|
|
// if ($customerName == '') return json_show(1004, '该业务公司不存在');
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
$names = $userCommon->handle('getCodeAndName', ['code' => [$param['customerCode'], $param['supplierNo']]]);
|
|
$names = $userCommon->handle('getCodeAndName', ['code' => [$param['customerCode'], $param['supplierNo']]]);
|
|
if (!isset($names['data'][$param['customerCode']]) || $names['data'][$param['customerCode']] == '') return json_show(1004, '该业务公司不存在');
|
|
if (!isset($names['data'][$param['customerCode']]) || $names['data'][$param['customerCode']] == '') return json_show(1004, '该业务公司不存在');
|
|
if (!isset($names['data'][$param['supplierNo']]) || $names['data'][$param['supplierNo']] == '') return json_show(1004, '该供应商不存在');
|
|
if (!isset($names['data'][$param['supplierNo']]) || $names['data'][$param['supplierNo']] == '') return json_show(1004, '该供应商不存在');
|
|
@@ -232,7 +232,7 @@ class Filing extends Base
|
|
->findOrEmpty();
|
|
->findOrEmpty();
|
|
if (empty($rs)) return json_show(1005, '该报备单不存在或不允许审核');
|
|
if (empty($rs)) return json_show(1005, '该报备单不存在或不允许审核');
|
|
|
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
$company = $userCommon->handle('cInfo', ['companyNo' => $param['companyCode']]);
|
|
$company = $userCommon->handle('cInfo', ['companyNo' => $param['companyCode']]);
|
|
if (!isset($company['data'])) return json_show(1005, '该客户不存在');
|
|
if (!isset($company['data'])) return json_show(1005, '该客户不存在');
|
|
// $companyName = Db::name('customer_info')
|
|
// $companyName = Db::name('customer_info')
|
|
@@ -301,7 +301,7 @@ class Filing extends Base
|
|
//level3账号都可以操作
|
|
//level3账号都可以操作
|
|
//level2账号的话,只有供应商负责人能操作
|
|
//level2账号的话,只有供应商负责人能操作
|
|
if ($this->level == 2) {
|
|
if ($this->level == 2) {
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
$supp = $userCommon->handle('sInfo', ['code' => $rs['supplierNo']]);
|
|
$supp = $userCommon->handle('sInfo', ['code' => $rs['supplierNo']]);
|
|
if ($this->uid != $supp['data']['personid']) return json_show(1004, '只有供应商负责人才能操作');
|
|
if ($this->uid != $supp['data']['personid']) return json_show(1004, '只有供应商负责人才能操作');
|
|
}
|
|
}
|
|
@@ -352,7 +352,7 @@ class Filing extends Base
|
|
// ->field('id,person,personid,name,code')
|
|
// ->field('id,person,personid,name,code')
|
|
// ->where(['code' => $filing['supplierNo']])
|
|
// ->where(['code' => $filing['supplierNo']])
|
|
// ->findOrEmpty();
|
|
// ->findOrEmpty();
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
$supplier = $userCommon->handle('sInfo', ['code' => $filing['supplierNo']]);
|
|
$supplier = $userCommon->handle('sInfo', ['code' => $filing['supplierNo']]);
|
|
|
|
|
|
// $names = $userCommon->handle('getCodeAndName', ['code' => [$filing['companyCode'], $filing['customerCode'],]]);
|
|
// $names = $userCommon->handle('getCodeAndName', ['code' => [$filing['companyCode'], $filing['customerCode'],]]);
|
|
@@ -714,7 +714,7 @@ class Filing extends Base
|
|
$qrdcode = makeNo("QR");
|
|
$qrdcode = makeNo("QR");
|
|
$cgddcode = makeNo("CG");
|
|
$cgddcode = makeNo("CG");
|
|
$goodCode = makeNo("SKU");
|
|
$goodCode = makeNo("SKU");
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
$tmp = $userCommon->handle('getCodeAndName',['code'=>[$param['khNo'],$param['supplierNo'],$param['companyNo']]]);
|
|
$tmp = $userCommon->handle('getCodeAndName',['code'=>[$param['khNo'],$param['supplierNo'],$param['companyNo']]]);
|
|
if(!isset($tmp['code']) || $tmp['code']!=0) return json_show($tmp['code'],$tmp['message'],$tmp['data']);
|
|
if(!isset($tmp['code']) || $tmp['code']!=0) return json_show($tmp['code'],$tmp['message'],$tmp['data']);
|
|
if(!isset($tmp['data'][$param['khNo']])) return json_show(1004, "未找到客户数据");
|
|
if(!isset($tmp['data'][$param['khNo']])) return json_show(1004, "未找到客户数据");
|
|
@@ -917,7 +917,7 @@ class Filing extends Base
|
|
$platform = Db::name("platform")->where(["id" => $saleinfo['platform_id']])->field("platform_name,pay_title")
|
|
$platform = Db::name("platform")->where(["id" => $saleinfo['platform_id']])->field("platform_name,pay_title")
|
|
->findOrEmpty();
|
|
->findOrEmpty();
|
|
|
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon =\app\admin\common\User::getIns();
|
|
$names = $userCommon->handle('getCodeAndName', ['code' => [$saleinfo['supplierNo'], $saleinfo['customer_code']]]);
|
|
$names = $userCommon->handle('getCodeAndName', ['code' => [$saleinfo['supplierNo'], $saleinfo['customer_code']]]);
|
|
|
|
|
|
$data = [
|
|
$data = [
|
|
@@ -1008,7 +1008,7 @@ class Filing extends Base
|
|
->findOrEmpty();
|
|
->findOrEmpty();
|
|
if (empty($cgd)) return error_show(1004, "采购单不存在");
|
|
if (empty($cgd)) return error_show(1004, "采购单不存在");
|
|
|
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
$tmp = $userCommon->handle('getCodeAndName',['code'=>[$param['supplierNo'],$cgd['companyNo']]]);
|
|
$tmp = $userCommon->handle('getCodeAndName',['code'=>[$param['supplierNo'],$cgd['companyNo']]]);
|
|
if(!isset($tmp['code']) || $tmp['code']!=0) return json_show($tmp['code'],$tmp['message'],$tmp['data']);
|
|
if(!isset($tmp['code']) || $tmp['code']!=0) return json_show($tmp['code'],$tmp['message'],$tmp['data']);
|
|
// if(!isset($tmp['data'][$param['khNo']])) return json_show(1004, "未找到客户数据");
|
|
// if(!isset($tmp['data'][$param['khNo']])) return json_show(1004, "未找到客户数据");
|