Accept Merge Request #38: (feature/dgg -> develop)

Merge Request: feat: 平台收款不需要提交收款相关信息

Created By: @大狗哥
Accepted By: @大狗哥
URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/38
This commit is contained in:
大狗哥 2025-04-28 23:02:58 +08:00 committed by Coding
commit f4c3362733
3 changed files with 17 additions and 17 deletions

View File

@ -12,11 +12,6 @@ class OrderAbnormalService extends BaseService
*/
public function create(int $workerId, array $params)
{
$data = $this->getOrderAbnormal($workerId, $params['order_id']);
if ($data) {
$this->apiError('您已上报过异常,请勿重复提交');
}
$abnormal = $this->getAbnormalModel()->find($params['abnormal_id']);
if (!$abnormal) {
$this->apiError('异常原因不存在,请重新选择');

View File

@ -329,18 +329,21 @@ class OrderDispatchService extends BaseService
$orderDispatch = $this->getOrderDispatchInfo($workerId, $params['order_dispatch_id']);
$orderDispatch->status = OrderDispatch::STATUS_FINISH;
$orderDispatch->images = $this->removeStrCdnUrl($params['complete_images']);
$orderDispatch->image = $this->removeStrCdnUrl($params['payment_image']);
$orderDispatch->offline_total_type = $params['offline_total_type'];
$orderDispatch->finish_time = $time;
//线下尾款
if ($params['final_payment_method'] == 1) {
$orderDispatch->total = $params['amount'];
}
if ($params['receive_type'] === 1) {
$orderDispatch->image = $this->removeStrCdnUrl($params['payment_image']);
$orderDispatch->offline_total_type = $params['offline_total_type'];
//线上尾款
if ($params['final_payment_method'] == 2) {
$orderDispatch->online_total = $params['amount'];
//线下尾款
if ($params['final_payment_method'] == 1) {
$orderDispatch->total = $params['amount'];
}
//线上尾款
if ($params['final_payment_method'] == 2) {
$orderDispatch->online_total = $params['amount'];
}
}
$orderDispatch->save();

View File

@ -14,10 +14,12 @@ class OrderDispatch extends Validate
'images|上门图片' => 'require|max:3000',
'complete_images|完成图片' => 'require|max:3000',
'final_payment_method|收款方式' => 'require|in:1,2',
'amount|收款金额' => 'require|number|between:0,10000000',
'payment_image|收款图片' => 'require|max:255',
'final_payment_method|收款方式' => 'requireIf:receive_type,1|in:1,2',
'amount|收款金额' => 'requireIf:receive_type,1|number|between:0,10000000',
'payment_image|收款图片' => 'requireIf:receive_type,1|max:255',
'offline_total_type|尾款收款方' => 'in:0,1,2',
'receive_type' => 'require|in:1,2',
'reject_reason|拒接原因' => 'max:100',
'worker_remark|备注信息' => 'max:500',
];