套餐排序、订单增加显示预约失败状态

main
yanzai 1 year ago
parent c1a976b6e7
commit fbbf3c591f

@ -164,7 +164,7 @@ class ComboController extends Controller
} }
$list=$list->where(['combos.status'=>1]); $list=$list->where(['combos.status'=>1]);
$count = $list->count(); $count = $list->count();
$list = $list $list = $list->orderBy('combos.order','asc')
->skip(($page - 1) * $pageSize) // 跳过前9999条记录 ->skip(($page - 1) * $pageSize) // 跳过前9999条记录
->take($pageSize)->get(); ->take($pageSize)->get();
@ -202,7 +202,8 @@ class ComboController extends Controller
'cover' => $Info['cover'], 'cover' => $Info['cover'],
'intro' => $Info['intro'], 'intro' => $Info['intro'],
'sub_intro' => $Info['sub_intro'], 'sub_intro' => $Info['sub_intro'],
'desc' => $Info['desc'] 'desc' => $Info['desc'],
'order' => $Info['order'],
]); ]);
if ($u) { if ($u) {
return \Yz::Return(true, "更新完成", []); return \Yz::Return(true, "更新完成", []);

@ -140,7 +140,7 @@ class ComboController extends Controller
$combos = DB::select("select * from combos as a LEFT JOIN ( $combos = DB::select("select * from combos as a LEFT JOIN (
select combo_id as c_id,count(*) as count from orders where status in(2,4) group by combo_id select combo_id as c_id,count(*) as count from orders where status in(2,4) group by combo_id
) as b on a.combo_id=b.c_id where a.status=1 and a.sex in(?,0)" . $sql, $canshu); ) as b on a.combo_id=b.c_id where a.status=1 and a.sex in(?,0) " . $sql ." order by a.`order` ", $canshu);
foreach ($combos as $key => $combo) { foreach ($combos as $key => $combo) {
$combo->count=$combo->count?$combo->count:0; $combo->count=$combo->count?$combo->count:0;

@ -22,6 +22,7 @@
<el-tag v-if="scope.row.sex==2" class="ml-2" type="success"></el-tag> <el-tag v-if="scope.row.sex==2" class="ml-2" type="success"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="order" label="排序" />
<el-table-column prop="updated_at" label="更新时间" /> <el-table-column prop="updated_at" label="更新时间" />
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template #default="scope"> <template #default="scope">
@ -75,6 +76,9 @@
<el-form-item label="标签2"> <el-form-item label="标签2">
<el-input v-model="Info.tags2" type="textarea" /> <el-input v-model="Info.tags2" type="textarea" />
</el-form-item> </el-form-item>
<el-form-item label="排序">
<el-input v-model="Info.order" type="number" />
</el-form-item>
<el-form-item label="简介"> <el-form-item label="简介">
<el-input v-model="Info.intro" type="textarea" /> <el-input v-model="Info.intro" type="textarea" />
</el-form-item> </el-form-item>

@ -145,7 +145,8 @@
<view v-if="!!order_info" class="order_wrapper"> <view v-if="!!order_info" class="order_wrapper">
<view class="order_status_wrapper" :class="[`status${order_info.status}`]"> <view class="order_status_wrapper" :class="[`status${order_info.status}`]">
<view v-if="[1].includes(order_info.status)"> </view> <view v-if="[1].includes(order_info.status)"> </view>
<view v-if="[2].includes(order_info.status)"> </view> <view v-if="[2].includes(order_info.status) && order_info.appointment_number.length>0"> </view>
<view v-if="[2].includes(order_info.status) && order_info.appointment_number.length==0"> </view>
<view v-if="[3, 5].includes(order_info.status)"> </view> <view v-if="[3, 5].includes(order_info.status)"> </view>
<view v-if="[4].includes(order_info.status)"> </view> <view v-if="[4].includes(order_info.status)"> </view>
</view> </view>
@ -214,7 +215,7 @@
<view class="order_pay_button_wrapper"> <view class="order_pay_button_wrapper">
<view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)" <view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)"
class="button_item_wrapper pay_button_wrapper">继续付款</view> class="button_item_wrapper pay_button_wrapper">继续付款</view>
<view v-if="[2].includes(order_info.status)" @click="GaiYueClick(order_info.id)" <view v-if="[2].includes(order_info.status) && order_info.appointment_number.length>0" @click="GaiYueClick(order_info.id)"
class="button_item_wrapper change_button_wrapper"> class="button_item_wrapper change_button_wrapper">
改约</view> 改约</view>
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)" <view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"

Loading…
Cancel
Save