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

1

1 <?php 1 <?php
2 2
3 -return array(  
4 - 0 =>  
5 - array(  
6 - 'name' => 'EBusinessID',  
7 - 'title' => '商户ID',  
8 - 'type' => 'string',  
9 - 'content' =>  
10 - array(),  
11 - 'value' => '',  
12 - 'rule' => 'required',  
13 - 'msg' => '',  
14 - 'tip' => '',  
15 - 'ok' => '',  
16 - 'extend' => '',  
17 - ),  
18 - 1 =>  
19 - array(  
20 - 'name' => 'AppKey',  
21 - 'title' => 'AppKey',  
22 - 'type' => 'string',  
23 - 'content' =>  
24 - array(),  
25 - 'value' => '',  
26 - 'rule' => 'required',  
27 - 'msg' => '',  
28 - 'tip' => '',  
29 - 'ok' => '',  
30 - 'extend' => '',  
31 - ),  
32 - 2 =>  
33 - array(  
34 - 'name' => 'ReqURL',  
35 - 'title' => 'API请求地址',  
36 - 'type' => 'string',  
37 - 'content' =>  
38 - array(),  
39 - 'value' => 'http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx',  
40 - 'rule' => 'required',  
41 - 'msg' => '',  
42 - 'tip' => '',  
43 - 'ok' => '',  
44 - 'extend' => '',  
45 - ), 3 +return array (
  4 + 0 =>
  5 + array (
  6 + 'name' => 'EBusinessID',
  7 + 'title' => '商户ID',
  8 + 'type' => 'string',
  9 + 'content' =>
  10 + array (
  11 + ),
  12 + 'value' => 'test1661089',
  13 + 'rule' => 'required',
  14 + 'msg' => '',
  15 + 'tip' => '',
  16 + 'ok' => '',
  17 + 'extend' => '',
  18 + ),
  19 + 1 =>
  20 + array (
  21 + 'name' => 'AppKey',
  22 + 'title' => 'AppKey',
  23 + 'type' => 'string',
  24 + 'content' =>
  25 + array (
  26 + ),
  27 + 'value' => '35c46d02-759e-48d0-868c-05667279296d',
  28 + 'rule' => 'required',
  29 + 'msg' => '',
  30 + 'tip' => '',
  31 + 'ok' => '',
  32 + 'extend' => '',
  33 + ),
  34 + 2 =>
  35 + array (
  36 + 'name' => 'ReqURL',
  37 + 'title' => 'API请求地址',
  38 + 'type' => 'string',
  39 + 'content' =>
  40 + array (
  41 + ),
  42 + 'value' => 'http://sandboxapi.kdniao.com:8080/kdniaosandbox/gateway/exterfaceInvoke.json',
  43 + 'rule' => 'required',
  44 + 'msg' => '',
  45 + 'tip' => '',
  46 + 'ok' => '',
  47 + 'extend' => '',
  48 + ),
46 ); 49 );
@@ -103,6 +103,7 @@ class Order extends Backend @@ -103,6 +103,7 @@ class Order extends Backend
103 $result = $row->allowField(true)->save(array_merge([ 103 $result = $row->allowField(true)->save(array_merge([
104 'delivery_status' => '1', 104 'delivery_status' => '1',
105 'delivery_time' => time(), 105 'delivery_time' => time(),
  106 + 'express_company' => db('kdniao')->where('code',$params['express_code'])->value('company')
106 ],$params)); 107 ],$params));
107 if ($result !== false) { 108 if ($result !== false) {
108 $this->success(); 109 $this->success();
@@ -117,6 +118,7 @@ class Order extends Backend @@ -117,6 +118,7 @@ class Order extends Backend
117 } 118 }
118 $this->error(__('Parameter %s can not be empty', '')); 119 $this->error(__('Parameter %s can not be empty', ''));
119 } 120 }
  121 + $this->view->assign('express_company_list',db('kdniao')->select());
120 return $this->view->fetch(); 122 return $this->view->fetch();
121 } 123 }
122 } 124 }
@@ -3,13 +3,17 @@ @@ -3,13 +3,17 @@
3 <div class="form-group"> 3 <div class="form-group">
4 <label class="control-label col-xs-12 col-sm-2">{:__('快递公司')}:</label> 4 <label class="control-label col-xs-12 col-sm-2">{:__('快递公司')}:</label>
5 <div class="col-xs-12 col-sm-8"> 5 <div class="col-xs-12 col-sm-8">
6 - <input id="c-express_company" data-rule="required" class="form-control" name="row[express_company]" type="text" value=""> 6 + <select id="c-express_code" data-rule="required" class="form-control selectpicker" name="row[express_code]">
  7 + {foreach name="express_company_list" item="vo"}
  8 + <option value="{$vo.code}" {in name="key" value=""}selected{/in}>{$vo.company}</option>
  9 + {/foreach}
  10 + </select>
7 </div> 11 </div>
8 </div> 12 </div>
9 <div class="form-group"> 13 <div class="form-group">
10 <label class="control-label col-xs-12 col-sm-2">{:__('快递单号')}:</label> 14 <label class="control-label col-xs-12 col-sm-2">{:__('快递单号')}:</label>
11 <div class="col-xs-12 col-sm-8"> 15 <div class="col-xs-12 col-sm-8">
12 - <input id="c-express_no" data-rule="required" class="form-control" name="row[express_no]" type="text" value=""> 16 + <input id="c-express_no" data-rule="required" class="form-control" name="row[express_no]" placeholder="测试请固定填写:1234561" type="text" value="">
13 </div> 17 </div>
14 </div> 18 </div>
15 <div class="form-group layer-footer"> 19 <div class="form-group layer-footer">
@@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@
96 <div class="panel-body"> 96 <div class="panel-body">
97 <div class="row show-grid"> 97 <div class="row show-grid">
98 <div class="col-xs-6" >快递公司: {$row.express_company}</div> 98 <div class="col-xs-6" >快递公司: {$row.express_company}</div>
99 - <div class="col-xs-6">快递单号: {$row.express_no} | <button class="btn btn-info btn-xs" type="button">物流查询</button></div> 99 + <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>
100 </div> 100 </div>
101 </div> 101 </div>
102 </div> 102 </div>