订单优化

This commit is contained in:
todaywindy 2025-06-11 20:00:27 +08:00
parent c949340c04
commit 65d22c70da
3 changed files with 8 additions and 5 deletions

View File

@ -34,7 +34,7 @@ class AutoDispatchLogic
'order_id' => $order->id,
'type' => 2,
'worker_id' => $worker_id,
'plan_time' => $order->plan_time,
'plan_time' => $order->plan_time ?? null,
'is_receipt' => $order->receive_type == 1,
];

View File

@ -222,7 +222,7 @@ class Order extends Backend
}
if (!$params['set_time']) {
$params['plan_time'] = null;
$params['plan_time'] = '';
}
$params = array_filter($params, function ($val) {
@ -277,7 +277,7 @@ class Order extends Backend
if ($result === false) {
$this->error(__('No rows were inserted'));
}
$this->success();
$this->success(data:$this->model);
}
public function edit($ids = null)

View File

@ -416,8 +416,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
const res = $("form[role=form]").isValid();
if ($('#lng').val() && $('#lng').val() !== ''){
if (res) {
Form.api.submit($("form[role=form]"));
// Toastr.success('录入成功');
Form.api.submit($("form[role=form]"),function (data){
copyToClipboard(assembleOrderMessage(data));
});
}
}else{
Toastr.success('请选择有效地址');
@ -433,6 +435,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
if (res) {
Form.api.submit($("form[role=form]"), function (data, ret) {
clearInfo();
copyToClipboard(assembleOrderMessage(data));
return false;
});
}