mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
订单重置基础完成
This commit is contained in:
parent
2b7fcc998a
commit
fddb5ac67e
@ -11,6 +11,7 @@ use App\Http\Requests\GoodsSkuRequest;
|
|||||||
use App\Imports\InventoryImport;
|
use App\Imports\InventoryImport;
|
||||||
use App\Imports\NewSetImport;
|
use App\Imports\NewSetImport;
|
||||||
use App\Models\BusinessOrderItem;
|
use App\Models\BusinessOrderItem;
|
||||||
|
use App\Models\DeveloperConfig;
|
||||||
use App\Models\Goods;
|
use App\Models\Goods;
|
||||||
use App\Models\Log;
|
use App\Models\Log;
|
||||||
use App\Models\Log as LogModel;
|
use App\Models\Log as LogModel;
|
||||||
@ -46,13 +47,19 @@ class GoodsSkusController extends Controller
|
|||||||
'external_sku_id',
|
'external_sku_id',
|
||||||
'SUM(goods_number) - SUM(already_cancel_number) as number',
|
'SUM(goods_number) - SUM(already_cancel_number) as number',
|
||||||
]);
|
]);
|
||||||
|
$orderRestTime = DeveloperConfig::query()
|
||||||
|
->where('key', DeveloperConfig::$ORDER_RESET_TIME)
|
||||||
|
->value('value');
|
||||||
|
if (is_null($orderRestTime)) {
|
||||||
|
$orderRestTime = date('Y-m-d 07:00:00');
|
||||||
|
}
|
||||||
$businessOrderItems = BusinessOrderItem::query()
|
$businessOrderItems = BusinessOrderItem::query()
|
||||||
->select(DB::raw($fields))
|
->select(DB::raw($fields))
|
||||||
->with([
|
->with([
|
||||||
'shop:id,name',
|
'shop:id,name',
|
||||||
'goodsSku:id,external_sku_id'
|
'goodsSku:id,external_sku_id'
|
||||||
])
|
])
|
||||||
->where('created_at', '>', date('Y-m-d 07:00:00'))
|
->where('created_at', '>', $orderRestTime)
|
||||||
->where('external_sku_id', '<>', '')
|
->where('external_sku_id', '<>', '')
|
||||||
->groupBy(['shop_id', 'external_sku_id'])
|
->groupBy(['shop_id', 'external_sku_id'])
|
||||||
->orderByDesc('number')
|
->orderByDesc('number')
|
||||||
|
|||||||
15932
resources/frontend/package-lock.json
generated
15932
resources/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
7
resources/frontend/src/api/shop.js
vendored
7
resources/frontend/src/api/shop.js
vendored
@ -75,3 +75,10 @@ export function saveSenders(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function orderRest(params) {
|
||||||
|
return http({
|
||||||
|
url: '/api/order/reset',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -57,6 +57,7 @@
|
|||||||
<span> 玫瑰合计: {{ rose_num }}</span>
|
<span> 玫瑰合计: {{ rose_num }}</span>
|
||||||
<span> 其它合计: {{ other_num }}</span>
|
<span> 其它合计: {{ other_num }}</span>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
|
<el-button type="primary" plain @click="resetOrderCount()">订单重置</el-button>
|
||||||
<el-button type="primary" plain @click="update()">上新</el-button>
|
<el-button type="primary" plain @click="update()">上新</el-button>
|
||||||
<el-upload ref="newset" action="/api/new/set/goods_skus" :multiple="false" name="newSetFile"
|
<el-upload ref="newset" action="/api/new/set/goods_skus" :multiple="false" name="newSetFile"
|
||||||
:show-file-list="false" :on-success="inventorySuccess" :before-upload="beforeInventory"
|
:show-file-list="false" :on-success="inventorySuccess" :before-upload="beforeInventory"
|
||||||
@ -330,7 +331,7 @@
|
|||||||
<div>
|
<div>
|
||||||
选择:
|
选择:
|
||||||
<template>
|
<template>
|
||||||
<el-select v-model="value" placeholder="盘点表/运营表/成本表">
|
<el-select v-model="value" placeholder="盘点表/成本表/周数据">
|
||||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -374,6 +375,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { goods_types, Brand_goods_types } from "../../api/rankingData.js";
|
import { goods_types, Brand_goods_types } from "../../api/rankingData.js";
|
||||||
import { goods, update, singleUpdate, getStockNum } from "../../api/goods";
|
import { goods, update, singleUpdate, getStockNum } from "../../api/goods";
|
||||||
|
import { orderRest } from "../../api/shop";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -414,6 +416,10 @@ export default {
|
|||||||
value: "cost",
|
value: "cost",
|
||||||
label: "成本表",
|
label: "成本表",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: "week_data",
|
||||||
|
label: "周数据",
|
||||||
|
},
|
||||||
], //表格导出选项下拉列表
|
], //表格导出选项下拉列表
|
||||||
value: "", //表格导出选择的选项
|
value: "", //表格导出选择的选项
|
||||||
options3: [
|
options3: [
|
||||||
@ -596,7 +602,23 @@ export default {
|
|||||||
handleExport() {
|
handleExport() {
|
||||||
this.Tableexport = true;
|
this.Tableexport = true;
|
||||||
},
|
},
|
||||||
|
// 订单重置计数
|
||||||
|
resetOrderCount() {
|
||||||
|
this.$confirm('确定重置订单计数?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
orderRest().then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: res.data.message
|
||||||
|
});
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 点击上新
|
// 点击上新
|
||||||
update() {
|
update() {
|
||||||
this.isShow = true;
|
this.isShow = true;
|
||||||
|
|||||||
2
resources/frontend/vue.config.js
vendored
2
resources/frontend/vue.config.js
vendored
@ -7,7 +7,7 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// 配置代理
|
// 配置代理
|
||||||
"/api": {
|
"/api": {
|
||||||
// target: "http://192.168.247.186:81",
|
// target: "http://erp.test",
|
||||||
target: "http://erp.chutang66.com",
|
target: "http://erp.chutang66.com",
|
||||||
changeOrigin: true, // 开启代理
|
changeOrigin: true, // 开启代理
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|||||||
@ -43,6 +43,7 @@ Route::middleware(['auth:api', 'check.permissions'])->group(function () {
|
|||||||
Route::get('count/orders/num', [ShopsController::class, 'countOrdersNumWithSkuCode'])->name('goods_sku.orders_num');
|
Route::get('count/orders/num', [ShopsController::class, 'countOrdersNumWithSkuCode'])->name('goods_sku.orders_num');
|
||||||
Route::get('download/{id}/goods', [ShopsController::class, 'downloadGoods'])->name('business.goods_sku.download');
|
Route::get('download/{id}/goods', [ShopsController::class, 'downloadGoods'])->name('business.goods_sku.download');
|
||||||
Route::put('sync/shop/stock', [ShopsController::class, 'syncStock'])->name('business.shop.sync_stock');
|
Route::put('sync/shop/stock', [ShopsController::class, 'syncStock'])->name('business.shop.sync_stock');
|
||||||
|
Route::get('order/reset', [ShopsController::class, 'orderReset'])->name('order.reset_count');
|
||||||
// 角色
|
// 角色
|
||||||
Route::resource('roles', 'Role\RolesController', ['only' => ['index', 'store', 'show', 'update']]);
|
Route::resource('roles', 'Role\RolesController', ['only' => ['index', 'store', 'show', 'update']]);
|
||||||
Route::post('roles/{id}/permissions', [RolesController::class, 'addPermissions'])->name('roles.permission');
|
Route::post('roles/{id}/permissions', [RolesController::class, 'addPermissions'])->name('roles.permission');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user