12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace app\api\controller;
- use think\facade\Lang;
- class Sellercost extends MobileSeller
- {
- public function initialize()
- {
- parent::initialize();
- }
-
- public function cost_list()
- {
- $storecost_model = model('storecost');
- $condition = array();
- $condition[] = array('storecost_store_id', '=', $this->store_info['store_id']);
- $storecost_remark = input('param.storecost_remark');
- if (!empty($storecost_remark)) {
- $condition[] = array('storecost_remark', 'like', '%' . $storecost_remark . '%');
- }
- $add_time_from = input('param.add_time_from');
- $add_time_to = input('param.add_time_to');
- if (!empty($add_time_from) && !empty($add_time_to)) {
- $condition[] = array('storecost_time', 'between', array(strtotime($add_time_from), strtotime($add_time_to)));
- }
- $cost_list = $storecost_model->getStorecostList($condition, 10, 'storecost_id desc');
- $result = array_merge(array('cost_list' => $cost_list), mobile_page($storecost_model->page_info));
- ds_json_encode(10000, lang('ds_common_op_succ'), $result);
- }
- }
|