作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

1

<?php
return array(
0 =>
array(
'name' => 'EBusinessID',
'title' => '商户ID',
'type' => 'string',
'content' =>
array(),
'value' => '',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
),
1 =>
array(
'name' => 'AppKey',
'title' => 'AppKey',
'type' => 'string',
'content' =>
array(),
'value' => '',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
),
2 =>
array(
'name' => 'ReqURL',
'title' => 'API请求地址',
'type' => 'string',
'content' =>
array(),
'value' => 'http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
),
return array (
0 =>
array (
'name' => 'EBusinessID',
'title' => '商户ID',
'type' => 'string',
'content' =>
array (
),
'value' => 'test1661089',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
),
1 =>
array (
'name' => 'AppKey',
'title' => 'AppKey',
'type' => 'string',
'content' =>
array (
),
'value' => '35c46d02-759e-48d0-868c-05667279296d',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
),
2 =>
array (
'name' => 'ReqURL',
'title' => 'API请求地址',
'type' => 'string',
'content' =>
array (
),
'value' => 'http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json',
'rule' => 'required',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
),
);
... ...
... ... @@ -103,6 +103,7 @@ class Order extends Backend
$result = $row->allowField(true)->save(array_merge([
'delivery_status' => '1',
'delivery_time' => time(),
'express_company' => db('kdniao')->where('code',$params['express_code'])->value('company')
],$params));
if ($result !== false) {
$this->success();
... ... @@ -117,6 +118,7 @@ class Order extends Backend
}
$this->error(__('Parameter %s can not be empty', ''));
}
$this->view->assign('express_company_list',db('kdniao')->select());
return $this->view->fetch();
}
}
... ...
... ... @@ -3,13 +3,17 @@
<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-express_company" data-rule="required" class="form-control" name="row[express_company]" type="text" value="">
<select id="c-express_code" data-rule="required" class="form-control selectpicker" name="row[express_code]">
{foreach name="express_company_list" item="vo"}
<option value="{$vo.code}" {in name="key" value=""}selected{/in}>{$vo.company}</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">
<input id="c-express_no" data-rule="required" class="form-control" name="row[express_no]" type="text" value="">
<input id="c-express_no" data-rule="required" class="form-control" name="row[express_no]" placeholder="测试请固定填写:1234561" type="text" value="">
</div>
</div>
<div class="form-group layer-footer">
... ...
... ... @@ -96,7 +96,7 @@
<div class="panel-body">
<div class="row show-grid">
<div class="col-xs-6" >快递公司: {$row.express_company}</div>
<div class="col-xs-6">快递单号: {$row.express_no} | <button class="btn btn-info btn-xs" type="button">物流查询</button></div>
<div class="col-xs-6">快递单号: {$row.express_no} | <button class="kdniao" type="button" data-company="{$row.express_code}" data-code="{$row.express_no}">物流查询</button></div>
</div>
</div>
</div>
... ...