lqmac 1 year ago
parent e48202a6d9
commit 648b27a6a1
  1. 1
      application/admin/controller/Order.php
  2. 4
      application/admin/controller/Warehouse.php
  3. 4
      application/admin/view/user/user/edit.html
  4. 4
      application/admin/view/warehouse/add.html
  5. 4
      application/admin/view/warehouse/edit.html
  6. 6
      application/api/controller/User.php
  7. 4
      application/common/service/OrderService.php
  8. 1
      public/assets/js/backend/income/expend.js

@ -244,6 +244,7 @@ class Order extends Backend
"warehouse_id" => $row->warehouse_id,
"order_amount" => $value['price'],
"pay_amount" => $value['price'],
"actual_amount" => $value['price'],
"coupon_price" => 0,
"coupon_id" => 0,
"status" => 3,

@ -54,7 +54,7 @@ class Warehouse extends Backend
if (time() > strtotime($v['end'])) {
$v['show_status'] = 1;
$info = Expend::where('date', date("Y-m-d"))->find();
$info = Expend::where('date', date("Y-m-d"))->where('is_delete', 0)->find();
if ($info) {
if ($info['status'] == 0) {
$v['show_status'] = 2;
@ -138,7 +138,7 @@ class Warehouse extends Backend
if (!$row)
$this->error(__('No Results were found'));
if ($this->request->isPost()){
$info = Expend::where('date', date("Y-m-d"))->find();
$info = Expend::where('date', date("Y-m-d"))->where('is_delete', 0)->find();
if ($info) {
$this->error(__('今日订单汇算已生成过了'));
}

@ -64,12 +64,12 @@
<input id="c-advance_access_minute" data-rule="required" class="form-control" name="row[advance_access_minute]" type="number" value="{$row.advance_access_minute}">
</div>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label for="c-deadline" class="control-label col-xs-12 col-sm-2">{:__('失效时间')}:</label>
<div class="col-xs-12 col-sm-4">
<input id="c-deadline" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[deadline]" type="text" value="{$row.deadline|datetime}">
</div>
</div>
</div> -->
<div class="form-group">
<label for="c-buy_goods_num_per_day" class="control-label col-xs-12 col-sm-2">{:__('次数(正常进入)')}:</label>
<div class="col-xs-12 col-sm-4">

@ -32,7 +32,7 @@
<input id="c-end" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[end]" type="text" value="{:date('H:i')}">
</div>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Before_activity_hour')}:</label>
<div class="col-xs-6 col-sm-4">
<input id="c-before_activity_hour" data-rule="required" min="0" class="form-control" name="row[before_activity_hour]" type="number" value="0">
@ -57,7 +57,7 @@
<div class="col-xs-12 col-sm-8">
<input id="c-entrustment_ratio" data-rule="required" min="0" class="form-control" step="0.01" name="row[entrustment_ratio]" type="number" value="0.00">
</div>
</div>
</div> -->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit_buy_num')}:</label>
<div class="col-xs-12 col-sm-8">

@ -32,7 +32,7 @@
<input id="c-end" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[end]" type="text" value="{$row.end}">
</div>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Before_activity_hour')}:</label>
<div class="col-xs-6 col-sm-4">
<input id="c-before_activity_hour" data-rule="required" min="0" class="form-control" name="row[before_activity_hour]" type="number" value="{$row.before_activity_hour|htmlentities}">
@ -57,7 +57,7 @@
<div class="col-xs-12 col-sm-8">
<input id="c-entrustment_ratio" data-rule="required" min="0" class="form-control" step="0.01" name="row[entrustment_ratio]" type="number" value="{$row.entrustment_ratio|htmlentities}">
</div>
</div>
</div> -->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit_buy_num')}:</label>
<div class="col-xs-12 col-sm-8">

@ -635,7 +635,7 @@ class User extends Api
*/
public function getUserIncomeAndExpandList(){
$user = $this->auth->getUserinfo();
$list = Db::name('income_expend')->where(function ($query) use($user) {
$list = Db::name('income_expend')->where('is_delete', 0)->where(function ($query) use($user) {
$query->where('payee_id', $user['id'])->whereor('payer_id', $user['id']);
@ -678,7 +678,7 @@ class User extends Api
}
Db::name('income_expend')->where("id", $id)->update(["pay_voucher" => $pay_voucher, "updatetime" => time(),'status' => 2]);
//是否都提交了了支付凭证,更新我的买单为支付待确认,卖单为已完成
$is_all = Db::name('income_expend')->whereTime('createtime', 'today')->where("payer_id", $user['id'])->where('pay_voucher', '')->find();
$is_all = Db::name('income_expend')->where('is_delete', 0)->whereTime('createtime', 'today')->where("payer_id", $user['id'])->where('pay_voucher', '')->find();
// var_dump($is_all);
// exit();
if (!$is_all) {
@ -715,7 +715,7 @@ class User extends Api
}
Db::name('income_expend')->where("id", $id)->update(['status' => 3, "updatetime" => time()]);
//把今天自己的卖单订单都改为已完成,买单更新为已支付
$is_all = Db::name('income_expend')->whereTime('createtime', 'today')->where("payee_id", $user['id'])->where('status','<>', 3)->find();
$is_all = Db::name('income_expend')->where('is_delete', 0)->whereTime('createtime', 'today')->where("payee_id", $user['id'])->where('status','<>', 3)->find();
if (!$is_all) {
Db::name('order')
->whereTime('createtime', 'today')

@ -31,8 +31,8 @@ class OrderService
->field('user_id,actual_amount as pay_amount,sell_order_id')
->whereTime('createtime', 'today')
->where('warehouse_id', $warehouse_id)
->whereIn('status', 0)
->whereIn('order_type', 0)
->whereIn('status', [0,1])
->whereIn('order_type', [0])
->select();
if (!$buyer_order) {
return false;

@ -35,6 +35,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'status', title: __('Status'),formatter: Table.api.formatter.status, searchList: Config.statusList},
{field: 'user.nickname', title: __('付款人'),operate: 'LIKE'},
{field: 'user.mobile', title: __('付款人电话'),operate: 'LIKE'},
{field: 'is_delete', title: __('是否删除'),formatter: Table.api.formatter.status, searchList: {1: __('是'), 0: __('否')}},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]

Loading…
Cancel
Save