123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\admin\controller;
- use app\abutment\logic\Filing as FilingLogic;
- use think\facade\Validate;
- //报备单
- class Filing extends Base
- {
- //列表
- public function getList()
- {
- $param = $this->request->only(['page' => 1, 'size' => 10, 'cat_id' => '', 'start_date' => '', 'end_date' => '', 'filingCode' => '', 'status' => '', 'good_name' => '', 'companyName' => '', 'companyCode' => '', 'orderCode' => ''], 'post');
- return FilingLogic::list($param);
- }
- //详情
- public function detail()
- {
- $id = $this->request->post('id/d', 0);
- return FilingLogic::detail($id);
- }
- //审核
- public function status()
- {
- $param = $this->request->only(['id', 'status', 'companyCode', 'plat_code' => '', 'service_charge', 'service_proportion'], 'post');
- $val = Validate::rule([
- 'id' => 'require|number|gt:0',
- 'status|状态' => 'require|number|in:1,2',
- 'companyCode|客户' => 'require|length:18',
- 'service_charge|服务费' => 'require|float|max:99999999.99',
- 'service_proportion|服务费比例' => 'require|number|between:0,100',
- ]);
- if (!$val->check($param)) return json_show(1004, $val->getError());
- return FilingLogic::status($param);
- }
- }
|