出现重复销售卡
This commit is contained in:
parent
7c74300ded
commit
ffcdd297db
@ -21,6 +21,7 @@ use App\Models\Real\OrderCardPartition as RealOrderCardPartition;
|
||||
use App\Domains\Virtual\Repositories\OrderCardPartitionRepository;
|
||||
use App\Domains\Real\Repositories\OrderRepository as RealOrderRepository;
|
||||
use App\Domains\Real\Repositories\OrderCardPartitionRepository as RealOrderCardPartitionRepository;
|
||||
use App\Exceptions\ExistedException;
|
||||
|
||||
class OrderService extends Service
|
||||
{
|
||||
@ -752,6 +753,10 @@ class OrderService extends Service
|
||||
}
|
||||
|
||||
foreach (array_chunk($data, 1000) as $value) {
|
||||
if ($table === 'virtual_order_cards' && DB::table($table)->where('sim', array_pluck($value, 'sim'))->whereNotNull('deleted_at')->count()) {
|
||||
throw new ExistedException('出现重复销售卡');
|
||||
}
|
||||
|
||||
DB::table($table)->upsert($value, ['sim', 'order_id', 'deleted_at']);
|
||||
$simArray = implode(',', array_pluck($value, 'sim'));
|
||||
DB::statement("select fix_timelines('{{$simArray}}'::INT8[]);");
|
||||
|
@ -10,7 +10,15 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="f-r">
|
||||
<div class="handle-item">
|
||||
<div class="handle-item lh-32" v-has="'locked'">
|
||||
<b class="umar-r10">数据锁定</b>
|
||||
<Switch v-model="locked" size="large">
|
||||
<span slot="open">开</span>
|
||||
<span slot="close">关</span>
|
||||
</Switch>
|
||||
</div>
|
||||
|
||||
<div class="handle-item" v-has="'create'">
|
||||
<Button
|
||||
@click="openCards(true, 1, null)"
|
||||
icon="md-eye"
|
||||
@ -18,7 +26,7 @@
|
||||
v-has="'create'"
|
||||
>RD订单</Button>
|
||||
</div>
|
||||
<div class="handle-item">
|
||||
<div class="handle-item" v-has="'create'">
|
||||
<Button
|
||||
@click="openEdit(true, 0, null)"
|
||||
icon="md-add"
|
||||
|
@ -26,6 +26,7 @@ export default {
|
||||
]
|
||||
},
|
||||
type: 0,
|
||||
locked: true,
|
||||
list_data: null,
|
||||
editObj: {
|
||||
show: false,
|
||||
@ -469,6 +470,15 @@ export default {
|
||||
}, '清单'));
|
||||
}
|
||||
|
||||
if (this.locked && this.moment(row.order_at).isBefore(this.moment().subtract('1', 'months').startOf('month').format('YYYY-MM-DD'))) {
|
||||
html.push(h('Tag', {
|
||||
props: {
|
||||
color: 'default'
|
||||
}
|
||||
}, '数据已锁定'));
|
||||
return h('div', html);
|
||||
}
|
||||
|
||||
if (this.haveJurisdiction('update')) {
|
||||
html.push(h('Button', {
|
||||
props: {
|
||||
|
2
public/js/app.e80d0ca6.js
Normal file
2
public/js/app.e80d0ca6.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/app.e80d0ca6.js.map
Normal file
1
public/js/app.e80d0ca6.js.map
Normal file
File diff suppressed because one or more lines are too long
15
public/js/chunk-01a502ce.41cb7095.js
Normal file
15
public/js/chunk-01a502ce.41cb7095.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/chunk-01a502ce.41cb7095.js.map
Normal file
1
public/js/chunk-01a502ce.41cb7095.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-01a502ce.e5be0e8f.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-01a502ce.ca27e38d.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-996b1e80.d3b45e46.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.f73ae2bf.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.f73ae2bf.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-01a502ce.e5be0e8f.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-01a502ce.41cb7095.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-996b1e80.d3b45e46.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.e80d0ca6.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.e80d0ca6.js></script></body></html>
|
Loading…
x
Reference in New Issue
Block a user