修复内容
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">订单类型:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="order_ysck" title="已收款" value=""0 lay-filter="link" >
|
||||
<input type="radio" name="order_ysck" title="已收款" value="0" lay-filter="link" >
|
||||
<input type="radio" name="order_ysck" title="应收款" value="1" lay-filter="link" checked="turn">
|
||||
</div>
|
||||
</div>
|
||||
@@ -186,9 +186,12 @@
|
||||
var value = data.value;
|
||||
$('.link').hide();
|
||||
switch (value) {
|
||||
case '1':
|
||||
case '0': // 已收款时显示选择付款
|
||||
$('.page').show();
|
||||
break;
|
||||
case '1': // 应收款时隐藏
|
||||
$('.page').hide();
|
||||
break;
|
||||
case '2':
|
||||
$('.page').show();
|
||||
$('.url-tips').show();
|
||||
@@ -196,7 +199,6 @@
|
||||
case '3':
|
||||
$('.url').show();
|
||||
$('.url-tips').show();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -385,12 +385,12 @@
|
||||
{{# } }}
|
||||
</p>
|
||||
|
||||
{{# if(d.pay_status == 0){ }}
|
||||
{{# if(d.pay_status == 0 || d.pay_zd == 1){ }}
|
||||
<p style="color:#fe0707">订单状态:
|
||||
待支付
|
||||
</p>
|
||||
{{# } }}
|
||||
{{# if(d.pay_status == 1){ }}
|
||||
{{# if(d.pay_status == 1 && d.pay_zd == 0){ }}
|
||||
<p style="color:#3A91FB">订单状态:
|
||||
已支付
|
||||
</p>
|
||||
@@ -617,6 +617,7 @@
|
||||
, {field: 'order_goods', title: '商品信息', align: 'center',templet:'#goods',width:320}
|
||||
, {field: 'total_amount', title: '支付信息', align: 'center',templet:'#amount',width:180}
|
||||
, {field: 'admin_id', title: '订单归属人', align: 'center',width:180}
|
||||
, {field: 'order_remarks', title: '备注信息', align: 'center',width:130}
|
||||
, {fixed: 'right', title: '操作', width: 160, align: 'center', toolbar: '#order-operation'}
|
||||
]]
|
||||
, page: true
|
||||
|
||||
@@ -17,20 +17,23 @@ class Calendar extends ApiBase
|
||||
if (!preg_match('/^\d{4}-\d{2}$/', $month)) {
|
||||
return $this->_error("月份格式错误,请使用格式:2026-01");
|
||||
}
|
||||
|
||||
// 计算该月的开始和结束日期
|
||||
$startDate = $month . '-01';
|
||||
$endDate = date('Y-m-t', strtotime($startDate)); // 获取该月最后一天
|
||||
|
||||
// 查询该月份的所有服务数据,关联商品表和员工表
|
||||
$uid = $this->user_id;
|
||||
|
||||
// 查询该月份的所有服务数据,关联总订单表、商品表和员工表
|
||||
$service = Db::name('order_exe')
|
||||
->alias('oe')
|
||||
->join('order o', 'oe.order_sn = o.order_sn', 'INNER')
|
||||
->join('goods g', 'oe.goods_id = g.id', 'LEFT')
|
||||
->join('staff s', 'oe.staff_id = s.id', 'LEFT')
|
||||
->where('o.user_id', $uid)
|
||||
->where('oe.date', '>=', $startDate)
|
||||
->where('oe.date', '<=', $endDate)
|
||||
->where('oe.abnormal', 0)
|
||||
->field('oe.staff_status,oe.date,oe.addtime,oe.start_time,oe.timeout,oe.xq,oe.staff_id,s.name as staff_name,s.onwork,s.leave,g.name as goods_name')
|
||||
->field('oe.staff_status,oe.date,oe.addtime,oe.start_time,oe.timeout,oe.xq,oe.staff_id,oe.order_sn,s.name as staff_name,s.onwork,s.leave,g.name as goods_name')
|
||||
->order('oe.date asc, oe.addtime asc')
|
||||
->select();
|
||||
|
||||
@@ -38,9 +41,10 @@ class Calendar extends ApiBase
|
||||
if ($service) {
|
||||
foreach ($service as $v) {
|
||||
// 如果有绑定员工,但员工状态不符合要求,则跳过
|
||||
if (!empty($v['staff_id']) && ($v['onwork'] != 1 || $v['leave'] != 1)) {
|
||||
continue;
|
||||
}
|
||||
// 注释掉员工状态过滤,先看看是否能查询出来
|
||||
// if (!empty($v['staff_id']) && ($v['onwork'] != 1 || $v['leave'] != 1)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// 处理服务时间
|
||||
$timeRange = '';
|
||||
|
||||
@@ -75,7 +75,9 @@ class Payment extends ApiBase
|
||||
if ($order['pay_status'] == Pay::ISPAID || $order['order_amount'] == 0) {
|
||||
$this->_success('支付成功', ['order_id' => $order['id']], 10001);
|
||||
}
|
||||
|
||||
if ($post['order_source'] == null){
|
||||
$post['order_source'] = 1;
|
||||
}
|
||||
$result = PaymentLogic::pay($post['from'], $order, $post['order_source']);
|
||||
if (false === $result) {
|
||||
$this->_error(PaymentLogic::getError(), ['order_id' => $order['id']], PaymentLogic::getReturnCode());
|
||||
@@ -86,7 +88,6 @@ class Payment extends ApiBase
|
||||
* 支付成功
|
||||
* 添加对应商品积分
|
||||
*/
|
||||
|
||||
$this->_success('', $result, PaymentLogic::getReturnCode());
|
||||
}
|
||||
|
||||
|
||||
@@ -75,11 +75,11 @@ class UserAddress extends ApiBase
|
||||
$result = $this->validate($post, 'app\api\validate\UserAddress.add');
|
||||
if ($result === true) {
|
||||
$user_id = $this->user_id;
|
||||
$adder=Db::name('user_address')->whereLike('telephone',$post['telephone'])->find(); //判断电话号码存在
|
||||
if($adder){
|
||||
$adderss=Db::name('user_address')->whereLike('telephone',$post['telephone'])->update(['user_id'=>$user_id]);
|
||||
$this->_success('添加成功', $adderss);
|
||||
}
|
||||
// $adder=Db::name('user_address')->whereLike('telephone',$post['telephone'])->find(); //判断电话号码存在
|
||||
// if($adder){
|
||||
// $adderss=Db::name('user_address')->whereLike('telephone',$post['telephone'])->update(['user_id'=>$user_id]);
|
||||
// $this->_success('添加成功', $adderss);
|
||||
// }
|
||||
$result = UserAddressLogic::addUserAddress($user_id, $post);
|
||||
if ($result) {
|
||||
$this->_success('添加成功', $result);
|
||||
|
||||
@@ -32,11 +32,11 @@ class GoodsCategoryLogic{
|
||||
* @author: 2021/3/6 18:49
|
||||
*/
|
||||
public static function categoryThirdTree($client,$type){
|
||||
$cache_key = 'goods_category_'.$client.'_'.$type;
|
||||
$cache = Cache::get($cache_key);
|
||||
if ($cache) {
|
||||
return $cache;
|
||||
}
|
||||
// $cache_key = 'goods_category_'.$client.'_'.$type;
|
||||
// $cache = Cache::get($cache_key);
|
||||
// if ($cache) {
|
||||
// return $cache;
|
||||
// }
|
||||
|
||||
// 构建查询条件
|
||||
$where1 = ['is_show'=>1,'del'=>0,'level'=>1];
|
||||
@@ -137,7 +137,7 @@ class GoodsCategoryLogic{
|
||||
}
|
||||
}
|
||||
|
||||
Cache::set($cache_key, array_values($lists));
|
||||
// Cache::set($cache_key, array_values($lists));
|
||||
return array_values($lists);
|
||||
}
|
||||
|
||||
|
||||
@@ -1069,6 +1069,7 @@ class OrderLogic extends LogicBase
|
||||
case 'delivery':
|
||||
$where[] = ['pay_status', '=', 1];
|
||||
$where[] = ['order_status', '=', 1];
|
||||
$where[] = ['refund_status', '=', 0];
|
||||
break;
|
||||
case 'finish':
|
||||
$where[] = ['pay_status', '=', 1];
|
||||
@@ -1133,10 +1134,10 @@ class OrderLogic extends LogicBase
|
||||
$list['goods_name']=$goods['name'];
|
||||
$list['goods_price']=$goods['min_price'];
|
||||
$number=Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',3)->count(); //查询订单服务次数
|
||||
$list['ordercs']=$number;
|
||||
$list['ordercs'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status','<>',3)->count(); //已预约
|
||||
$list['orderyjfw']= $list['number']-$number;
|
||||
$list['orderdaifw'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',0)->count(); //待服务数量
|
||||
$list['orderfwzhon'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',1)->count(); //服务中数量
|
||||
$list['orderdaifw'] = $list['number']-$number; //待预约数量
|
||||
$list['orderfwzhon'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('status',3)->count(); //暂停中数量
|
||||
$list['orderyiwanchen'] = Db::name('order_exe')->where('order_sn',$list['order_sn'])->where('staff_status',3)->count(); //服务已完成
|
||||
$list['showBubble']=false;
|
||||
$list['more']="更多";
|
||||
@@ -1492,13 +1493,12 @@ class OrderLogic extends LogicBase
|
||||
break;
|
||||
}
|
||||
|
||||
$count =$order->where('order_sn',$order_sn)
|
||||
->count();
|
||||
$count =$order->where($where)->count();
|
||||
|
||||
$lists = $order->where('order_sn',$order_sn)
|
||||
->where($where)
|
||||
->page($page, $size)
|
||||
->order('autotime asc')
|
||||
->orderRaw('CASE WHEN staff_status = 3 THEN 1 ELSE 0 END, autotime ASC')
|
||||
->select();
|
||||
|
||||
foreach ($lists as $list){
|
||||
@@ -1518,8 +1518,6 @@ class OrderLogic extends LogicBase
|
||||
}
|
||||
|
||||
$list['autotime']=date("Y-m-d",$list['autotime']);
|
||||
|
||||
|
||||
}
|
||||
$data = [
|
||||
'list' => $lists,
|
||||
|
||||
@@ -136,7 +136,9 @@ class UserAddressLogic
|
||||
'district_id' => $post['district_id'],
|
||||
'address' => $post['address'],
|
||||
'is_default' => $post['is_default'],
|
||||
'createtime' => time()
|
||||
'createtime' => time(),
|
||||
'lng' => $post['latitude'],
|
||||
'lat' => $post['longitude']
|
||||
];
|
||||
$result = Db::name('user_address')->insert($data);
|
||||
Db::commit();
|
||||
@@ -175,7 +177,9 @@ class UserAddressLogic
|
||||
'district_id' => $post['district_id'],
|
||||
'address' => $post['address'],
|
||||
'is_default' => $post['is_default'],
|
||||
'updatetime' => time()
|
||||
'updatetime' => time(),
|
||||
'lng' => $post['latitude'],
|
||||
'lat' => $post['longitude']
|
||||
];
|
||||
|
||||
$result = Db::name('user_address')
|
||||
|
||||
Reference in New Issue
Block a user