This commit is contained in:
xman 2025-04-21 10:17:16 +08:00
parent 47e27cbb85
commit 2e61682f94
2 changed files with 17 additions and 2 deletions

View File

@ -88,6 +88,17 @@ class Dispatch2 extends Backend
return json($result);
}
$abnormal = \app\admin\model\Abnormal::where('type',3)->select();
$newList = [];
foreach ($abnormal as $item){
$newList[$item->title] = $item->title;
}
$selectBuild = build_select('reason_title',$newList,null,['id'=>'reason_title']);
$this->assignconfig('abnormal_select',$selectBuild);
return $this->view->fetch();
}

View File

@ -214,16 +214,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
'<div style="margin-bottom: 10px; color: #f39c12; font-size: 14px;">' +
'提示:取消后该订单会重新进入待派单状态' +
'</div>' +
// '<input id="input-title" data-field="title" data-params=\'{"custom[type]":"1"}\' data-rule="required" data-source="setting/abnormal/index" class="form-control selectpage" type="text" value="">'+
'<textarea id="input-reason" class="form-control" data-rule="required" rows="4" placeholder="请输入操作理由"></textarea>' +
//'<input id="input-title" data-field="title" data-params=\'{"custom[type]":"1"}\' data-rule="required" data-source="setting/abnormal/index" class="form-control selectpage" type="text" value="">'+
Config.abnormal_select +
'<textarea style="margin-top: 10px" id="input-reason" class="form-control" data-rule="required" rows="4" placeholder="请输入操作理由"></textarea>' +
'</div>',
yes: function(index, layero) {
var inputTitle = $("#reason_title").val()+',';
var inputValue = $("#input-reason").val().trim();
if (!inputValue) {
Layer.msg('输入内容不能为空!');
return;
}
inputValue = inputTitle + inputValue
Layer.close(index);