订单异常
This commit is contained in:
parent
e2d99f31c2
commit
a7842e1fc8
|
|
@ -2,72 +2,67 @@
|
|||
|
||||
return [
|
||||
[
|
||||
'name' => 'key',
|
||||
'title' => '应用key',
|
||||
'type' => 'string',
|
||||
'name' => 'key',
|
||||
'title' => '应用key',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'your key',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => 'LTAI5t87F5mAkaXVKfLcmnrB',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'secret',
|
||||
'title' => '密钥secret',
|
||||
'type' => 'string',
|
||||
'name' => 'secret',
|
||||
'title' => '密钥secret',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'your secret',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => 'fk7KgdqRdJUS6Jc99TlB6mNLKorrsD',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'sign',
|
||||
'title' => '签名',
|
||||
'type' => 'string',
|
||||
'name' => 'sign',
|
||||
'title' => '签名',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'your sign',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '超邦手',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'template',
|
||||
'title' => '短信模板',
|
||||
'type' => 'array',
|
||||
'name' => 'template',
|
||||
'title' => '短信模板',
|
||||
'type' => 'array',
|
||||
'content' => [],
|
||||
'value' => [
|
||||
'register' => 'SMS_114000000',
|
||||
'resetpwd' => 'SMS_114000000',
|
||||
'changepwd' => 'SMS_114000000',
|
||||
'changemobile' => 'SMS_114000000',
|
||||
'profile' => 'SMS_114000000',
|
||||
'notice' => 'SMS_114000000',
|
||||
'mobilelogin' => 'SMS_114000000',
|
||||
'bind' => 'SMS_114000000',
|
||||
'value' => [
|
||||
'stop_custom' => 'SMS_487200413',
|
||||
'start_custom' => 'SMS_487260356',
|
||||
'start_worker' => 'SMS_487375365',
|
||||
],
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => '__tips__',
|
||||
'title' => '温馨提示',
|
||||
'type' => 'string',
|
||||
'name' => '__tips__',
|
||||
'title' => '温馨提示',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '应用key和密钥你可以通过 https://ak-console.aliyun.com/?spm=a2c4g.11186623.2.13.fd315777PX3tjy#/accesskey 获取',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '应用key和密钥你可以通过 https://ak-console.aliyun.com/?spm=a2c4g.11186623.2.13.fd315777PX3tjy#/accesskey 获取',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ author = FastAdmin
|
|||
website = https://www.fastadmin.net
|
||||
version = 1.0.10
|
||||
state = 1
|
||||
url = http://fast.cc:8088/addons/alisms
|
||||
url = http://127.0.0.1:8088/addons/alisms
|
||||
license = regular
|
||||
licenseto = 15976
|
||||
|
|
|
|||
|
|
@ -31,9 +31,17 @@ class Test extends Command
|
|||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$order = (new Order())->find(110);
|
||||
$id = (new DispatchLogic())->getMaxScoreWorker($order);
|
||||
dd($id);
|
||||
$res = \app\common\library\Sms::notice('17381847364',[], 'start_worker');
|
||||
|
||||
$alisms = new \addons\alisms\library\Alisms();
|
||||
$ret = $alisms->mobile('13038128325')
|
||||
->template('SMS_487375365')
|
||||
->sign('超邦手')
|
||||
->send();
|
||||
|
||||
dd($ret);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -439,6 +439,52 @@ class Order extends Backend
|
|||
}
|
||||
|
||||
|
||||
public function warning($ids = null)
|
||||
{
|
||||
|
||||
|
||||
if (false === $this->request->isPost()) {
|
||||
$order = $this->model->where('id', $ids)->find();
|
||||
$abnormals = model('abnormal')->where('type',3)->order('sort','desc')->select();
|
||||
$options = [];
|
||||
foreach ($abnormals as $abnormal){
|
||||
$options [] = $abnormal->toArray();
|
||||
}
|
||||
return $this->fetch('warning',['row' => $order,'options' => $options]);
|
||||
}
|
||||
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
$order = model('order')->get($params['order_id']);
|
||||
|
||||
|
||||
$area_id = substr($order->area_id,0,4);
|
||||
|
||||
$res = Admin::where('area_ids','like','%'.$area_id.'%')
|
||||
->column('id');
|
||||
$message = $params['detail'] ?? '';
|
||||
|
||||
|
||||
$insert = [];
|
||||
foreach ($res as $re){
|
||||
$insert [] = [
|
||||
'to_id' => $re,
|
||||
'type' => 1,
|
||||
'title' => '订单内容变更',
|
||||
'content' => '【订单内容变更】您有一条订单信息被修改,修改内容为:【'.$message.'】,请注意查收。'
|
||||
];
|
||||
}
|
||||
$build = new Message();
|
||||
$build->saveAll($insert);
|
||||
|
||||
$this->success('操作成功');
|
||||
}
|
||||
|
||||
|
||||
public function addAbnormal($ids = null){
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">异常类型:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">报错类型:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-coupon" data-live-search="true" title="请选择" data-rule="required" name="row[abnormal_id]" class="form-control">
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">异常类型:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">紧急程度:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select data-live-search="true" title="请选择" data-rule="required" name="row[level]" class="form-control">
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">异常详情:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">报错详情:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-detail" data-rule="required" class="form-control" rows="5" name="row[detail]" cols="50"></textarea>
|
||||
</div>
|
||||
|
|
|
|||
41
application/admin/view/order/warning.html
Normal file
41
application/admin/view/order/warning.html
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('order/warning')}">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">订单编号</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_id"
|
||||
disabled
|
||||
class="form-control" type="text" value="{$row->order_no}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="row[order_id]" value="{$row->id}" >
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">异常类型:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-coupon" data-live-search="true" title="请选择" data-rule="required" name="row[abnormal_id]" class="form-control">
|
||||
{foreach $options as $item}
|
||||
<option value="{$item['id']}">{$item['title']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">异常详情:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-detail" data-rule="required" class="form-control" rows="5" name="row[detail]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
{:build_heading()}
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-tabs" data-field="type">
|
||||
<li class="{:$Think.get.type === (string)1 ? 'active' : ''}"><a href="#t-1" data-value="1" data-toggle="tab">订单异常类型</a></li>
|
||||
<li class="{:$Think.get.type === (string)1 ? 'active' : ''}"><a href="#t-1" data-value="1" data-toggle="tab">订单报错类型</a></li>
|
||||
<li class="{:$Think.get.type === (string)2 ? 'active' : ''}"><a href="#t-2" data-value="2" data-toggle="tab">订单取消类型</a></li>
|
||||
<li class="{:$Think.get.type === (string)2 ? 'active' : ''}"><a href="#t-3" data-value="3" data-toggle="tab">订单报错类型</a></li>
|
||||
<li class="{:$Think.get.type === (string)2 ? 'active' : ''}"><a href="#t-3" data-value="3" data-toggle="tab">订单异常类型</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
define([], function () {
|
||||
require([], function () {
|
||||
//绑定data-toggle=addresspicker属性点击事件
|
||||
console.log('111');
|
||||
|
||||
$(document).on('click', "[data-toggle='addresspicker']", function () {
|
||||
var that = this;
|
||||
var callback = $(that).data('callback');
|
||||
|
|
|
|||
|
|
@ -237,6 +237,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
},
|
||||
refresh: true,
|
||||
},
|
||||
|
||||
{
|
||||
name: "warning",
|
||||
text: "发起异常",
|
||||
title: "发起异常",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-dialog',
|
||||
icon: 'fa fa-add',
|
||||
url: 'order/warning',
|
||||
visible: function (row) {
|
||||
if (row.status == 10) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
dropdown: "更多",
|
||||
refresh: true,
|
||||
},
|
||||
{
|
||||
name: "mapdispatch",
|
||||
text: "地图派单",
|
||||
|
|
@ -277,7 +295,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
//return false;
|
||||
},
|
||||
error: function (data, ret) {
|
||||
console.log(data, ret);
|
||||
Layer.alert(ret.msg);
|
||||
return false;
|
||||
},
|
||||
|
|
@ -473,6 +490,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
addabnormal: function () {
|
||||
Form.api.bindevent($("#add-form"));
|
||||
},
|
||||
warning: function () {
|
||||
Form.api.bindevent($("#add-form"));
|
||||
},
|
||||
delete: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user