|
@@ -4064,6 +4064,13 @@ class Sale extends Base
|
|
|
if (empty($einfo)) {
|
|
|
return error_show(1002, "未找到销售订单数据");
|
|
|
}
|
|
|
+
|
|
|
+ //判断供应商是否开通账号,若开通的话,则只能由供应商账号操作
|
|
|
+ if ($this->level != 3) {
|
|
|
+ $temp = checkHasAccountBySupplierNos([$einfo['supNo']]);
|
|
|
+ if (isset($temp[$einfo['supNo']])) return json_show(1004, '非供应商账号不能操作');
|
|
|
+ }
|
|
|
+
|
|
|
$is_reurn = Db::name("sale_return")->where(['orderCode' => $outinfo['orderCode'], 'is_del' => 0])->where("status", "in", [1,2,3,7,9,10])->find();
|
|
|
if ($is_reurn != false) {
|
|
|
return error_show(1002, "销售单存在退货未处理完成");
|