|
|
@@ -16,6 +16,7 @@ namespace app\api\lists\recharge;
|
|
|
|
|
|
use app\api\lists\BaseApiDataLists;
|
|
|
use app\common\enum\PayEnum;
|
|
|
+use app\common\enum\WorkEnum;
|
|
|
use app\common\model\recharge\RechargeOrder;
|
|
|
use app\common\model\works\ServiceWork;
|
|
|
|
|
|
@@ -54,7 +55,7 @@ class ServiceOrderLists extends BaseApiDataLists
|
|
|
$lists = RechargeOrder::with(['order_goods'=>function ($query) {
|
|
|
$query->visible(['goods_name','goods_image','goods_number','good_unit']);
|
|
|
},'service_work'=>function ($query) {
|
|
|
- $query->visible(['service_status'])->append(['service_status_text']);
|
|
|
+ $query->visible(['service_status','work_status','user_confirm_status'])->append(['service_status_text','work_status_text','user_confirm_status_text']);
|
|
|
}])
|
|
|
->where($this->queryWhere())
|
|
|
->visible(['id','sn','order_total','order_amount','pay_status','create_time'])
|
|
|
@@ -65,9 +66,14 @@ class ServiceOrderLists extends BaseApiDataLists
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
->group('work_id')
|
|
|
->order('id', 'desc')
|
|
|
- ->select()
|
|
|
+ ->select()->each(function ($item) {
|
|
|
+ //用户按钮状态显示
|
|
|
+
|
|
|
+ })
|
|
|
->toArray();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$this->count = RechargeOrder::where([
|
|
|
'order_type' => 0,
|
|
|
'user_id' => $this->userId,
|