订单优化
This commit is contained in:
parent
c949340c04
commit
65d22c70da
|
|
@ -34,7 +34,7 @@ class AutoDispatchLogic
|
||||||
'order_id' => $order->id,
|
'order_id' => $order->id,
|
||||||
'type' => 2,
|
'type' => 2,
|
||||||
'worker_id' => $worker_id,
|
'worker_id' => $worker_id,
|
||||||
'plan_time' => $order->plan_time,
|
'plan_time' => $order->plan_time ?? null,
|
||||||
'is_receipt' => $order->receive_type == 1,
|
'is_receipt' => $order->receive_type == 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ class Order extends Backend
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$params['set_time']) {
|
if (!$params['set_time']) {
|
||||||
$params['plan_time'] = null;
|
$params['plan_time'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = array_filter($params, function ($val) {
|
$params = array_filter($params, function ($val) {
|
||||||
|
|
@ -277,7 +277,7 @@ class Order extends Backend
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$this->error(__('No rows were inserted'));
|
$this->error(__('No rows were inserted'));
|
||||||
}
|
}
|
||||||
$this->success();
|
$this->success(data:$this->model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($ids = null)
|
public function edit($ids = null)
|
||||||
|
|
|
||||||
|
|
@ -416,8 +416,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
||||||
const res = $("form[role=form]").isValid();
|
const res = $("form[role=form]").isValid();
|
||||||
if ($('#lng').val() && $('#lng').val() !== ''){
|
if ($('#lng').val() && $('#lng').val() !== ''){
|
||||||
if (res) {
|
if (res) {
|
||||||
Form.api.submit($("form[role=form]"));
|
Form.api.submit($("form[role=form]"),function (data){
|
||||||
// Toastr.success('录入成功');
|
copyToClipboard(assembleOrderMessage(data));
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
Toastr.success('请选择有效地址');
|
Toastr.success('请选择有效地址');
|
||||||
|
|
@ -433,6 +435,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
||||||
if (res) {
|
if (res) {
|
||||||
Form.api.submit($("form[role=form]"), function (data, ret) {
|
Form.api.submit($("form[role=form]"), function (data, ret) {
|
||||||
clearInfo();
|
clearInfo();
|
||||||
|
copyToClipboard(assembleOrderMessage(data));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user