新增入库登记

This commit is contained in:
weipengfei 2024-06-13 15:59:44 +08:00
parent a1ab6200e5
commit 25be510191
4 changed files with 173 additions and 20 deletions

View File

@ -76,3 +76,18 @@ export function saleStoreListApi(data) {
export function merchantCategoryListApi(data) { export function merchantCategoryListApi(data) {
return request.get(`goods/goodsclass/lists`, { params: data }) return request.get(`goods/goodsclass/lists`, { params: data })
} }
/**
* @description 门店入库操作列表
*/
export function storeStorageInfoListsApi(data) {
return request.get('/system_store_storage/systemstorestorage/lists', { params: data })
}
/**
* @description 门店入库操作入库
*/
export function storeStorageInfoEditApi(data) {
return request.post('/system_store_storage/systemstorestorage/edit', data)
}

View File

@ -76,6 +76,12 @@ const list = ref([
ico: "TrendCharts", ico: "TrendCharts",
count: 0, count: 0,
}, },
{
name: "putStorage",
title: "入库登记",
ico: "Van",
count: 0,
},
// { name: "purchaseOrder", title: "", ico: "Van", count: 0 }, // { name: "purchaseOrder", title: "", ico: "Van", count: 0 },
// { name: "orderCount", title: "", ico: "DocumentRemove", count: 0 }, // { name: "orderCount", title: "", ico: "DocumentRemove", count: 0 },
// { name: "wallet", title: "", ico: "Wallet", count: 0 }, // { name: "wallet", title: "", ico: "Wallet", count: 0 },

View File

@ -20,21 +20,15 @@ const routes = [
{ {
path: '/saleOrder', path: '/saleOrder',
name: 'saleOrder', name: 'saleOrder',
meta: { title: '采购订单' }, meta: { title: '收银订单' },
component: () => import('@/views/saleOrder/index.vue'), component: () => import('@/views/saleOrder/index.vue'),
}, },
{ {
path: '/order', path: '/order',
name: 'order', name: 'order',
meta: { title: '待提采购' }, meta: { title: '线上采购' },
component: () => import('@/views/order/index.vue'), component: () => import('@/views/order/index.vue'),
}, },
{
path: '/purchaseOrder',
name: 'purchaseOrder',
meta: { title: '采购订单' },
component: () => import('@/views/purchaseOrder/index.vue'),
},
{ {
path: '/orderCount', path: '/orderCount',
name: 'orderCount', name: 'orderCount',
@ -59,6 +53,12 @@ const routes = [
meta: { title: '盈收统计' }, meta: { title: '盈收统计' },
component: () => import('@/views/statistics/index.vue'), component: () => import('@/views/statistics/index.vue'),
}, },
{
path: '/putStorage',
name: 'putStorage',
meta: { title: '入库登记' },
component: () => import('@/views/putStorage/index.vue'),
},
{ {
path: '/test', path: '/test',
name: 'test', name: 'test',

View File

@ -0,0 +1,132 @@
<script setup>
import { ref, nextTick } from "vue";
import { storeStorageInfoEditApi, storeStorageInfoListsApi } from "@/api/shop.js"
import { ElMessage } from "element-plus";
const orderList = ref([]);
const where = ref({
page_no: 1,
page_size: 20,
loadend: false
});
const loading = ref(false);
const getOrderList = () => {
if(where.value.loadend) return ;
loading.value = true;
storeStorageInfoListsApi({
page_no: where.value.page_no,
page_size: where.value.page_size
}).then((res) => {
orderList.value = [...orderList.value, ...res.data.lists];
if(res.data.lists.length<where.value.page_size) where.value.loadend = true;
where.value.page_no++;
loading.value = false;
});
};
getOrderList();
//
const handleEdit = async (data) => {
storeStorageInfoEditApi({
id: data.id
}).then(res => {
data.status = 1;
ElMessage.success("入库成功");
})
}
</script>
<template>
<div class="my-card put-storage">
<div
class="order-lists"
v-loading="loading"
v-infinite-scroll="getOrderList"
:infinite-scroll-distance="300"
:infinite-scroll-delay="500"
:infinite-scroll-immediate="false"
style="overflow: auto">
<el-table :data="orderList" >
<el-table-column label="导入人员" prop="admin_name" />
<el-table-column label="门店确认人员" prop="staff_name" />
<el-table-column label="商品图" prop="image" >
<template #default="{ row }">
<el-image class="image" :src="row.image" />
</template>
</el-table-column>
<el-table-column label="商品" prop="store_name" />
<el-table-column label="数量" prop="nums" />
<el-table-column label="状态" prop="status" >
<template #default="{ row }">
<el-tag type="success" v-if="row.status === 1">已入库</el-tag>
<el-tag type="warning" v-else-if="row.status === 0">待确认</el-tag>
<el-tag type="danger" v-else-if="row.status === -1">库存不足</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="mark" />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-if="row.status == 0"
type="success" @click="handleEdit(row)">
确认入库
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<style lang="scss">
.put-storage {
background-color: #fff;
border-radius: 1.2rem;
box-sizing: border-box;
padding: 1rem;
height: 100%;
.image{
width: 4rem;
height: 4rem;
}
.order-lists{
height: 100%;
width: 100%;
}
}
.my-card {}
/* 修改滚动条的样式 */
::-webkit-scrollbar {
width: 0.315rem;
/* 设置滚动条的宽度 */
}
/* 设置滚动条的轨道样式 */
::-webkit-scrollbar-track {
background-color: #f1f1f1;
/* 设置轨道的背景色 */
/* margin: 1.25rem 0; */
}
/* 设置滚动条的滑块样式 */
::-webkit-scrollbar-thumb {
background-color: #ccc;
/* 设置滑块的背景色 */
border-radius: 0.315rem;
/* 设置滑块的圆角 */
}
/* 设置滚动条鼠标悬停时的滑块样式 */
::-webkit-scrollbar-thumb:hover {
background-color: #999;
/* 设置鼠标悬停时滑块的背景色 */
}
</style>